Another string representation of the junction.  these may be redundant.
977595
def get_range_string(self):
    """"""
    return self.left.chr+":"+str(self.left.end)+'/'+self.right.chr+":"+str(self.right.start)
1310157
def p_jointype(self,t):
    
    if len(t) <= 2 or t[1] == 'inner': t[0] = JoinTypeX(None, False, None)
    else: t[0] = JoinTypeX(t[1], True, None)
264507
function redundant(prev, p, next) {

            // 是否重合的点, 只有两个点同在曲线上或者同不在曲线上移出
            if (
                (p.onCurve && next.onCurve || !p.onCurve && !next.onCurve)
                && Math.pow(p.x - next.x, 2) + Math.pow(p.y - next.y, 2) <= 1
            ) {
                return true;
            }

            // 三点同线 检查直线点
            if (
                (p.onCurve && prev.onCurve && next.onCurve)
                && Math.abs((next.y - p.y) * (prev.x - p.x) - (prev.y - p.y) * (next.x - p.x)) <= 0.001
            ) {
                return true;
            }

            // 三点同线 检查控制点
            if (
                (!p.onCurve && prev.onCurve && next.onCurve)
                && Math.abs((next.y - p.y) * (prev.x - p.x) - (prev.y - p.y) * (next.x - p.x)) <= 0.001
            ) {
                return true;
            }

            return false;
        }
389684
private int readCorner2(int numRows, int numColumns) {
    int currentByte = 0;
    if (readModule(numRows - 3, 0, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(numRows - 2, 0, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(numRows - 1, 0, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(0, numColumns - 4, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(0, numColumns - 3, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(0, numColumns - 2, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(0, numColumns - 1, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(1, numColumns - 1, numRows, numColumns)) {
      currentByte |= 1;
    }
    return currentByte;
  }
87790
private static String join(String str, int times, String sep) {
    	StringBuilder sb = new StringBuilder();
    	for(int i = 0; i < times; i++) {
    		sb.append(str);
    		if(i < times - 1) {
    			sb.append(sep);
    		}
    	}
    	return sb.toString();
    }
176736
function(arr, seg, poly, pDist, coef) 
{
    var dta = vcross(seg.tn, seg.ta);
    var dtb = vcross(seg.tn, seg.tb);
    var n = vmult(seg.tn, coef);
    
    var verts = poly.tVerts;
    for(var i=0; i<verts.length; i+=2){
        var vx = verts[i];
        var vy = verts[i+1];
        if(vdot2(vx, vy, n.x, n.y) < vdot(seg.tn, seg.ta)*coef + seg.r){
            var dt = vcross2(seg.tn.x, seg.tn.y, vx, vy);
            if(dta >= dt && dt >= dtb){
                arr.push(new Contact(new Vect(vx, vy), n, pDist, hashPair(poly.hashid, i)));
            }
        }
    }
}
116599
def from_string(string):
        
        mnemonics = {
            # Arithmetic Instructions
            "add": ReilMnemonic.ADD,
            "sub": ReilMnemonic.SUB,
            "mul": ReilMnemonic.MUL,
            "div": ReilMnemonic.DIV,
            "mod": ReilMnemonic.MOD,
            "bsh": ReilMnemonic.BSH,

            # Bitwise Instructions
            "and": ReilMnemonic.AND,
            "or":  ReilMnemonic.OR,
            "xor": ReilMnemonic.XOR,

            # Data Transfer Instructions
            "ldm": ReilMnemonic.LDM,
            "stm": ReilMnemonic.STM,
            "str": ReilMnemonic.STR,

            # Conditional Instructions
            "bisz": ReilMnemonic.BISZ,
            "jcc":  ReilMnemonic.JCC,

            # Other Instructions
            "unkn":  ReilMnemonic.UNKN,
            "undef": ReilMnemonic.UNDEF,
            "nop":   ReilMnemonic.NOP,

            # Added Instructions
            "sext": ReilMnemonic.SEXT,
            "sdiv": ReilMnemonic.SDIV,
            "smod": ReilMnemonic.SMOD,
            "smul": ReilMnemonic.SMUL,
        }

        return mnemonics[string]
182174
private static int merging2_2(int[] buffer, int x) {
		int cnt1 = buffer[x + 1];
		int cnt2 = buffer[x + 3];
		final int w = buffer[x + 5];
		cnt1 = cnt1 - ((cnt1 >>> 1) & 0x55555555) + (w & 0x55555555);
		cnt2 = cnt2 - ((cnt2 >>> 1) & 0x55555555) + ((w >>> 1) & 0x55555555);
		cnt1 = (cnt1 & 0x33333333) + ((cnt1 >>> 2) & 0x33333333);
		cnt2 = (cnt2 & 0x33333333) + ((cnt2 >>> 2) & 0x33333333);
		cnt1 += cnt2;
		cnt1 = (cnt1 & 0x0F0F0F0F) + ((cnt1 >>> 4) & 0x0F0F0F0F);
		cnt1 += cnt1 >>> 8;
		cnt1 += cnt1 >>> 16;
		return cnt1 & 0x000000FF;
	}
1311848
public static String pointToString (int x, int y) {
        StringBuilder buf = new StringBuilder();
        if (x >= 0) buf.append("+");
        buf.append(x);
        if (y >= 0) buf.append("+");
        buf.append(y);
        return buf.toString();
    }
653831
public static String join(String delimiter, Iterable<String> strings) {
    StringBuilder sb = new StringBuilder();
    for (String item : strings) {
      if (sb.length() > 0) sb.append(delimiter);
      sb.append(item);
    }
    return sb.toString();
  }
60487
private static String mergeRealPathes(Mapping mapping, String parentRealPath, String newRealPath, RefBoolean isOutSide) {
	parentRealPath = pathRemoveLast(parentRealPath, isOutSide);
	while (newRealPath.startsWith("../")) {
	    parentRealPath = pathRemoveLast(parentRealPath, isOutSide);
	    newRealPath = newRealPath.substring(3);
	}

	// check if come back
	String path = parentRealPath.concat("/").concat(newRealPath);

	if (path.startsWith("../")) {
	    int count = 0;
	    do {
		count++;
		path = path.substring(3);
	    }
	    while (path.startsWith("../"));

	    String strRoot = mapping.getPhysical().getAbsolutePath().replace('\\', '/');
	    if (!StringUtil.endsWith(strRoot, '/')) {
		strRoot += '/';
	    }
	    int rootLen = strRoot.length();
	    String[] arr = ListUtil.toStringArray(ListUtil.listToArray(path, '/'), "");// path.split("/");
	    int tmpLen;
	    for (int i = count; i > 0; i--) {
		if (arr.length > i) {
		    String tmp = '/' + list(arr, 0, i);
		    tmpLen = rootLen - tmp.length();
		    if (strRoot.lastIndexOf(tmp) == tmpLen && tmpLen >= 0) {
			StringBuffer rtn = new StringBuffer();
			while (i < count - i) {
			    count--;
			    rtn.append("../");
			}
			isOutSide.setValue(rtn.length() != 0);
			return (rtn.length() == 0 ? "/" : rtn.toString()) + list(arr, i, arr.length);
		    }
		}
	    }
	}
	return parentRealPath.concat("/").concat(newRealPath);
    }
907479
private static String join(long[] a) {
    assert (a.length > 0);
    StringBuilder builder = new StringBuilder();
    builder.append(a[0]);
    for (int i = 1; i < a.length; ++i) {
      builder.append(',');
      builder.append(a[i]);
    }
    return builder.toString();
  }
671395
function() {
            var connI, connI1, dPosToAxis, axisToNextAxis;
            for (var i = 0; i < this.connectors_.length - 1; i++) {
                connI = this.connectors_[i], connI1 = this.connectors_[i + 1];
                if (connI1.point.minus(connI.point).dot(connI.axisvector) <= 0) {
                    throw("Invalid ConnectorList. Each connectors position needs to be within a <90deg range of previous connectors axisvector");
                }
                if (connI.axisvector.dot(connI1.axisvector) <= 0) {
                    throw("invalid ConnectorList. No neighboring connectors axisvectors may span a >=90deg angle");
                }
            }
        }
996355
private int merge(String[] dst, String[] srcA, int lengthA, Tag[] srcB, int lengthB) {
    int i = 0;
    int ai = 0;
    int bi = 0;

    while (ai < lengthA && bi < lengthB) {
      final String ak = srcA[ai];
      final String av = srcA[ai + 1];
      Tag b = srcB[bi];
      int cmp = ak.compareTo(b.key());
      if (cmp < 0) {
        dst[i++] = ak;
        dst[i++] = av;
        ai += 2;
      } else if (cmp > 0) {
        dst[i++] = b.key();
        dst[i++] = b.value();
        ++bi;
      } else {
        // Newer tags should override, use source B if there are duplicate keys.
        // If source B has duplicates, then use the last value for the given key.
        int j = bi + 1;
        for (; j < lengthB && ak.equals(srcB[j].key()); ++j) {
          b = srcB[j];
        }
        dst[i++] = b.key();
        dst[i++] = b.value();
        bi = j;
        ai += 2; // Ignore
      }
    }

    if (ai < lengthA) {
      System.arraycopy(srcA, ai, dst, i, lengthA - ai);
      i += lengthA - ai;
    } else if (bi < lengthB) {
      i = dedup(srcB, bi, dst, i, lengthB - bi);
    }

    return i;
  }
1008223
private int compareMultiSegments(BinaryString other) {

		if (sizeInBytes == 0 || other.sizeInBytes == 0) {
			return sizeInBytes - other.sizeInBytes;
		}

		int len = Math.min(sizeInBytes, other.sizeInBytes);

		MemorySegment seg1 = segments[0];
		MemorySegment seg2 = other.segments[0];

		int segmentSize = segments[0].size();
		int otherSegmentSize = other.segments[0].size();

		int sizeOfFirst1 = segmentSize - offset;
		int sizeOfFirst2 = otherSegmentSize - other.offset;

		int varSegIndex1 = 1;
		int varSegIndex2 = 1;

		// find the first segment of this string.
		while (sizeOfFirst1 <= 0) {
			sizeOfFirst1 += segmentSize;
			seg1 = segments[varSegIndex1++];
		}

		while (sizeOfFirst2 <= 0) {
			sizeOfFirst2 += otherSegmentSize;
			seg2 = other.segments[varSegIndex2++];
		}

		int offset1 = segmentSize - sizeOfFirst1;
		int offset2 = otherSegmentSize - sizeOfFirst2;

		int needCompare = Math.min(Math.min(sizeOfFirst1, sizeOfFirst2), len);

		while (needCompare > 0) {
			// compare in one segment.
			for (int i = 0; i < needCompare; i++) {
				int res = (seg1.get(offset1 + i) & 0xFF) - (seg2.get(offset2 + i) & 0xFF);
				if (res != 0) {
					return res;
				}
			}
			if (needCompare == len) {
				break;
			}
			len -= needCompare;
			// next segment
			if (sizeOfFirst1 < sizeOfFirst2) { //I am smaller
				seg1 = segments[varSegIndex1++];
				offset1 = 0;
				offset2 += needCompare;
				sizeOfFirst1 = segmentSize;
				sizeOfFirst2 -= needCompare;
			} else if (sizeOfFirst1 > sizeOfFirst2) { //other is smaller
				seg2 = other.segments[varSegIndex2++];
				offset2 = 0;
				offset1 += needCompare;
				sizeOfFirst2 = otherSegmentSize;
				sizeOfFirst1 -= needCompare;
			} else { // same, should go ahead both.
				seg1 = segments[varSegIndex1++];
				seg2 = other.segments[varSegIndex2++];
				offset1 = 0;
				offset2 = 0;
				sizeOfFirst1 = segmentSize;
				sizeOfFirst2 = otherSegmentSize;
			}
			needCompare = Math.min(Math.min(sizeOfFirst1, sizeOfFirst2), len);
		}

		checkArgument(needCompare == len);

		return sizeInBytes - other.sizeInBytes;
	}
374502
function repeatString(string, nb) {
    var s = string,
        l,
        i;

    if (nb <= 0)
      return '';

    for (i = 1, l = nb | 0; i < l; i++)
      s += string;
    return s;
  }
155493
protected static int compareStrings(int offset_1, int offset_2, ByteBuffer bb) {
    offset_1 += bb.getInt(offset_1);
    offset_2 += bb.getInt(offset_2);
    int len_1 = bb.getInt(offset_1);
    int len_2 = bb.getInt(offset_2);
    int startPos_1 = offset_1 + SIZEOF_INT;
    int startPos_2 = offset_2 + SIZEOF_INT;
    int len = Math.min(len_1, len_2);
    for(int i = 0; i < len; i++) {
      if (bb.get(i + startPos_1) != bb.get(i + startPos_2))
        return bb.get(i + startPos_1) - bb.get(i + startPos_2);
    }
    return len_1 - len_2;
  }