Get old-format BPF Pointer. Deprecated
165540
def _legacy_bpf_pointer(tcpdump_lines):
    """"""
    X86_64 = os.uname()[4] in ['x86_64', 'aarch64']
    size = int(tcpdump_lines[0])
    bpf = b""
    for l in tcpdump_lines[1:]:
        if six.PY2:
            int_type = long  # noqa: F821
        else:
            int_type = int
        bpf += struct.pack("HBBI", *map(int_type, l.split()))

    # Thanks to http://www.netprojects.de/scapy-with-pypy-solved/ for the pypy trick  # noqa: E501
    if conf.use_pypy:
        str_buffer = ctypes.create_string_buffer(bpf)
        return struct.pack('HL', size, ctypes.addressof(str_buffer))
    else:
        # XXX. Argl! We need to give the kernel a pointer on the BPF,
        # Python object header seems to be 20 bytes. 36 bytes for x86 64bits arch.  # noqa: E501
        if X86_64:
            return struct.pack("HL", size, id(bpf) + 36)
        else:
            return struct.pack("HI", size, id(bpf) + 20)
759524
@Override
    @Deprecated
    public Pointer getPointer(DataBuffer buffer, AllocationShape shape, boolean isView, CudaContext context) {
        return memoryHandler.getDevicePointer(buffer, context);
    }
748719
def old_checksum(self):
        """"""
        if self.context.is_file(self.checksum_file):
            logger.debug("Reading saved checksum from %s ..", format_path(self.checksum_file))
            checksum = self.context.read_file(self.checksum_file).decode('ascii')
            logger.debug("Saved checksum is %s.", checksum)
            return checksum
1124041
def db_getString(self, db_name, key):
        
        warnings.warn('deprecated', DeprecationWarning)
        return (yield from self.rpc_call('db_getString', [db_name, key]))
929379
def deprecated(replacement_description):
    

    def decorate(fn_or_class):
        if isinstance(fn_or_class, type):
            pass  # Can't change __doc__ of type objects
        else:
            try:
                fn_or_class.__doc__ = "This API point is obsolete. %s\n\n%s" % (
                    replacement_description,
                    fn_or_class.__doc__,
                )
            except AttributeError:
                pass  # For Cython method descriptors, etc.
        return fn_or_class

    return decorate
389619
def _pycall_path_old(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float:
    """"""
    func, userData = ffi.from_handle(handle)
    return func(x1, y1, x2, y2, userData)
798310
def get_file_contents(self, pointer=False):
        '''
        
        '''
        if self.pointer:
            if pointer:
                return self.old_pointed
            else:
                return self.old_data
        else:
            return self.old_data
760773
@Deprecated
    public void processBlasCall(String blasOpName) {
        String key = "BLAS";
        invocationsCount.incrementAndGet();

        // using blas function opName as key
        opCounter.incrementCount(blasOpName);

        // all blas calls share the same key
        classCounter.incrementCount(key);

        updatePairs(blasOpName, key);

        prevOpMatching = "";
        lastZ = 0;
    }
1330096
public void flattenToBufferForOriginalVersion(ByteBuffer buf) throws IOException
    {
        assert((params != null) || (serializedParams != null));

        // for self-check assertion
        int startPosition = buf.position();

        buf.put(ProcedureInvocationType.ORIGINAL.getValue());

        SerializationHelper.writeVarbinary(getProcNameBytes(), buf);

        buf.putLong(clientHandle);

        serializeParams(buf);

        int len = buf.position() - startPosition;
        assert(len == getSerializedSizeForOriginalVersion());
    }
1008328
def deprecated(context):
    """"""
    tar = context.get('tar', None)

    # at least 1 of tarExtract or tarArchive must exist in context
    tar_extract, tar_archive = context.keys_of_type_exist(
        ('tarExtract', list),
        ('tarArchive', list))

    found_at_least_one = (tar_extract.key_in_context
                          or tar_archive.key_in_context)

    if tar and not found_at_least_one:
        return
    elif found_at_least_one:
        tar = context['tar'] = {}

    if tar_extract.key_in_context and tar_extract.is_expected_type:
        tar['extract'] = context[tar_extract.key]

    if tar_archive.key_in_context and tar_archive.is_expected_type:
        tar['archive'] = context[tar_archive.key]

    if 'tarFormat' in context:
        tar['format'] = context['tarFormat']

    logger.warning("tarExtract and tarArchive are deprecated. They will "
                   "stop working upon the next major release. "
                   "Use the new context key env instead. It's a lot "
                   "better, promise! For the moment pypyr is creating the "
                   "new env key for you under the hood.")
27345
private static void getTreeFormat(StringBuffer sb, Event event, Boolean includeContextInfo,
			int noOfTabs, long currentNanoTime, int spacesRequiredForDuration) {
		//Defect 166820
		//Check for events that got added after we started dumping the tree.
		//We ignore these events.
		if(currentNanoTime < event.getStartTime()){
			return;
		}
		
		String executionTimeStr = getExecutionTimeStringFormat(currentNanoTime,
				event); // Convert the execution time into string with 3 decimal
						// places..
		try {
			/**
			 * If its root event add header to table and set the
			 * spacesRequiredForDuration field
			 */
			if (event.getParentEvent() == null) {
				if (spacesRequiredForDuration == 0)
					spacesRequiredForDuration = executionTimeStr.length() + 5;
				sb.append(appendHeader(event, executionTimeStr));
			}
			// Append the execution time
			if (event.getEndTime() == 0) {
				sb.append(String.format(
						"%n%" + spacesRequiredForDuration + "s",
						executionTimeStr + "ms + "));
			} else {
				sb.append(String.format(
						"%n%" + spacesRequiredForDuration + "s",
						executionTimeStr + "ms   "));
			}

			// Append tabs for Child Events
			if (event.getParentEvent() != null) {
				for (int i = 0; i < noOfTabs; i++) {
					sb.append("    ");
				}
			}

			// Append Type + Context information to string...
			if (includeContextInfo && event.getContextInfo() != null) {
				sb.append(event.getType()
						+ RequestProbeConstants.EVENT_CONTEXT_INFO_SEPARATOR
						+ event.getContextInfo());
			} else {
				sb.append(event.getType());
			}

			//Iterating using indices instead of the list iterator to avoid ConcurrentModificationException
			//It is safe to do it this way as we only add elements to the list
			List<Event> list = event.getChildEvents();
			for(int i = 0; i < list.size(); i++){
				//Defect 165134
				//for (Event eventChild : event.getChildEvents()) {
				// Call recursively for child events ..
				getTreeFormat(sb, list.get(i), includeContextInfo, noOfTabs + 1, currentNanoTime,
						spacesRequiredForDuration);
			}
		} catch (Exception e) {

			FFDCFilter.processException(e, EventStackFormatter.class.getName(),
					"94", event);
		}
	}
1292267
int writeFlagAttrs(long flags) {
        int acount = 0;
        if ((flags & DEPRECATED) != 0) {
            int alenIdx = writeAttr(names.Deprecated);
            endAttr(alenIdx);
            acount++;
        }
        return acount;
    }
18372
async def get_version(self, tp, params):
        
        tw = TypeWrapper(tp, params)
        if not tw.is_versioned():
            # self.registry.set_tr()
            return TypeWrapper.ELEMENTARY_RES

        # If not in the DB, load from archive at current position
        if not self.version_db.is_versioned(tw):
            tr = await load_uvarint(self.iobj)
            ver = await load_uvarint(self.iobj)
            self.version_db.set_version(tw, tr, ver)

        else:
            tr, ver = self.version_db.get_version(tw)

        obj_id = None if tr == 0 else await load_uvarint(self.iobj)
        self.registry.set_tr(obj_id)
        return ver
162147
def _depr(fn, usage, stacklevel=3):
    """"""
    warn('{0} is deprecated. Use {1} instead'.format(fn, usage),
         stacklevel=stacklevel, category=DeprecationWarning)
1031259
function v4(options, buf, offset) {
    // Deprecated - 'format' argument, as supported in v1.2
    var i = buf && offset || 0;

    if (typeof(options) === 'string') {
      buf = (options === 'binary') ? new BufferClass(16) : null;
      options = null;
    }
    options = options || {};

    var rnds = options.random || (options.rng || _rng)();

    // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
    rnds[6] = (rnds[6] & 0x0f) | 0x40;
    rnds[8] = (rnds[8] & 0x3f) | 0x80;

    // Copy bytes to buffer, if provided
    if (buf) {
      for (var ii = 0; ii < 16; ii++) {
        buf[i + ii] = rnds[ii];
      }
    }

    return buf || unparse(rnds);
  }
601468
def _get_old(self):
        """"""

        def _deserialize(d):
            if not len(d):
                return {}
            return dict(l.split(self.OLD_SEPARATOR) for l in d.split('\n'))

        data, stat = self.zk.get(self.path)
        return _deserialize(data.decode('utf8')), stat.version
1296873
def get_old_filename(diff_part):
    
    regexps = (
        # e.g. "+++ a/foo/bar"
        r'^--- a/(.*)',
        # e.g. "+++ /dev/null"
        r'^\-\-\- (.*)',
    )
    for regexp in regexps:
        r = re.compile(regexp, re.MULTILINE)
        match = r.search(diff_part)
        if match is not None:
            return match.groups()[0]
    raise MalformedGitDiff("No old filename in diff part found.  "
                           "Examined diff part: {}".format(diff_part))