analoges in Sig.hasSig()
349409
public String getCode() {
        String codePath = "SegHead.code";
        return Optional.ofNullable(getElement(getPath() + "." + codePath))
            .map(Object::toString)
            .orElse(null);
    }
890074
function _objectIs(a, b) {
  // SameValue algorithm
  if (a === b) { // Steps 1-5, 7-10
    // Steps 6.b-6.e: +0 != -0
    return a !== 0 || 1 / a === 1 / b;
  } else {
    // Step 6.a: NaN == NaN
    return a !== a && b !== b;
  }
}
1308791
function _rsasign_getHexPaddedDigestInfoForString(s, keySize, hashAlg) {
    var hashFunc = function(s) { return KJUR.crypto.Util.hashString(s, hashAlg); };
    var sHashHex = hashFunc(s);

    return KJUR.crypto.Util.getPaddedDigestInfoHex(sHashHex, hashAlg, keySize);
}
998821
function (actualArgs, expectedArgs) {
    var i;
    if (actualArgs.length !== expectedArgs.length) {
      return false;
    }
    for (i = 0; i < expectedArgs.length; i++) {
      if (actualArgs[i] !== expectedArgs[i]) {
        return false;
      }
    }
    return true;
  }
482241
def operator_si(u):
    """"""
    global _aux
    if np.ndim(u) == 2:
        P = _P2
    elif np.ndim(u) == 3:
        P = _P3
    else:
        raise ValueError("u has an invalid number of dimensions "
                         "(should be 2 or 3)")
    
    if u.shape != _aux.shape[1:]:
        _aux = np.zeros((len(P),) + u.shape)
    
    for _aux_i, P_i in zip(_aux, P):
        _aux_i[:] = binary_erosion(u, P_i)
    
    return _aux.max(0)
65993
private void hashMix() {
       a = subtract(a, b); a = subtract(a, c); a = xor(a, c >> 13);
       b = subtract(b, c); b = subtract(b, a); b = xor(b, leftShift(a, 8));
       c = subtract(c, a); c = subtract(c, b); c = xor(c, (b >> 13));
       a = subtract(a, b); a = subtract(a, c); a = xor(a, (c >> 12));
       b = subtract(b, c); b = subtract(b, a); b = xor(b, leftShift(a, 16));
       c = subtract(c, a); c = subtract(c, b); c = xor(c, (b >> 5));
       a = subtract(a, b); a = subtract(a, c); a = xor(a, (c >> 3));
       b = subtract(b, c); b = subtract(b, a); b = xor(b, leftShift(a, 10));
       c = subtract(c, a); c = subtract(c, b); c = xor(c, (b >> 15));
     }
1075719
function isCTag (str, cTag, index) {
    var l = cTag.length, s = str.substr(index, l);
    if (cTag === s) {
        return {
            str: s,
            index: index,
            type: 1,
            jump: l - 1
        };
    }
}
677351
def split_sig(params):
    
    result = []
    current = ''
    level = 0
    for char in params:
        if char in ('<', '{', '['):
            level += 1
        elif char in ('>', '}', ']'):
            level -= 1
        if char != ',' or level > 0:
            current += char
        elif char == ',' and level == 0:
            result.append(current)
            current = ''
    if current.strip() != '':
        result.append(current)
    return result
1065619
function compareRssi(a,b) {
  if(a.rssi < b.rssi)
    return 1;
  if(a.rssi > b.rssi)
    return -1;
  return 0;
}
1272486
def p_sigtypes(self, p):
        ''
        p[0] = p[1] + (p[2],)
        p.set_lineno(0, p.lineno(1))
10692
def _get_api_sig(args):
    
    tmp_sig = api_secret
    for i in args:
        tmp_sig = tmp_sig + i[0] + i[1]
    api_sig = hashlib.md5(tmp_sig.encode('utf-8')).hexdigest()
    return 'api_sig', api_sig
1029692
private static int preferSignature(Object[] args,
                                       Class<?>[] sig1,
                                       boolean vararg1,
                                       Class<?>[] sig2,
                                       boolean vararg2 )
    {
        int totalPreference = 0;
        for (int j = 0; j < args.length; j++) {
            Class<?> type1 = vararg1 && j >= sig1.length ? sig1[sig1.length-1] : sig1[j];
            Class<?> type2 = vararg2 && j >= sig2.length ? sig2[sig2.length-1] : sig2[j];
            if (type1 == type2) {
                continue;
            }
            Object arg = args[j];

            // Determine which of type1, type2 is easier to convert from arg.

            int rank1 = NativeJavaObject.getConversionWeight(arg, type1);
            int rank2 = NativeJavaObject.getConversionWeight(arg, type2);

            int preference;
            if (rank1 < rank2) {
                preference = PREFERENCE_FIRST_ARG;
            } else if (rank1 > rank2) {
                preference = PREFERENCE_SECOND_ARG;
            } else {
                // Equal ranks
                if (rank1 == NativeJavaObject.CONVERSION_NONTRIVIAL) {
                    if (type1.isAssignableFrom(type2)) {
                        preference = PREFERENCE_SECOND_ARG;
                    } else if (type2.isAssignableFrom(type1)) {
                        preference = PREFERENCE_FIRST_ARG;
                    } else {
                        preference = PREFERENCE_AMBIGUOUS;
                    }
                } else {
                    preference = PREFERENCE_AMBIGUOUS;
                }
            }

            totalPreference |= preference;

            if (totalPreference == PREFERENCE_AMBIGUOUS) {
                break;
            }
        }
        return totalPreference;
    }
299437
def parse_sig(sig):
    """"""
    label, sig = sig
    assert label == b'sig-val'
    algo_name = sig[0]
    parser = {b'rsa': _parse_rsa_sig,
              b'ecdsa': _parse_ecdsa_sig,
              b'eddsa': _parse_eddsa_sig,
              b'dsa': _parse_dsa_sig}[algo_name]
    return parser(args=sig[1:])
6675
function idUnique(a) {
  var i,j,l=a.length,p,
      guid=(Math.random()*1E10).toString(32)+(+new Date).toString(32);
  for (i=j=0;i<l;i++) {
    p = a[i];
    if (p==null) continue;
    if (p.hasOwnProperty(guid)) continue;
    Object.defineProperty(p,guid,{
      value:1,enumerable:false
    });
    a[j++]=p;
  }
  i=j;
  while (i--) {//clean guid
    a[i][guid]=undefined;
  }
  a.length=j;
  return a;
}
929621
def crack_k_from_sigs(generator, sig1, val1, sig2, val2):
    

    # s1 = v1 / k1 + (se * r1) / k1
    # s2 = v2 / k2 + (se * r2) / k2
    # and k = k1 = k2
    # so
    # k * s1 = v1 + (se * r1)
    # k * s2 = v2 + (se * r2)
    # so
    # k * s1 * r2 = r2 * v1 + (se * r1 * r2)
    # k * s2 * r1 = r1 * v2 + (se * r2 * r1)
    # so
    # k (s1 * r2 - s2 * r1) = r2 * v1 - r1 * v2
    # so
    # k = (r2 * v1 - r1 * v2) / (s1 * r2 - s2 * r1)

    r1, s1 = sig1
    r2, s2 = sig2
    if r1 != r2:
        raise ValueError("r values of signature do not match")
    k = (r2 * val1 - r1 * val2) * generator.inverse(r2 * s1 - r1 * s2)
    return k % generator.order()
1026037
private static boolean incrementLexicographically(
        MutableIntTuple current, IntTuple min, IntTuple max, int index)
    {
        if (index == -1)
        {
            return false;
        }
        int oldValue = current.get(index);
        int newValue = oldValue + 1;
        current.set(index, newValue);
        if (newValue >= max.get(index))
        {
            current.set(index, min.get(index));
            return incrementLexicographically(current, min, max, index-1);
        }
        return true;
    }
1027594
private static String replaceNthArgWithCharsetString(String sig, int stackOffset) {

        List<String> arguments = SignatureUtils.getParameterSignatures(sig);

        StringBuilder sb = new StringBuilder("(");
        int argumentIndexToReplace = (arguments.size() - stackOffset) - 1;

        for (int i = 0; i < arguments.size(); i++) {
            if (i == argumentIndexToReplace) {
                sb.append(CHARSET_SIG);
            } else {
                sb.append(arguments.get(i));
            }
        }

        sb.append(sig.substring(sig.lastIndexOf(')'), sig.length()));
        return sb.toString();
    }