.rightStart() - mstart, ystart, es.leftStart() - ystart, astart, es .ancestorStart() - astart); if (rd.maxLength() > 0)
RangeDifference es= in[i]; rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, es.rightStart() - mstart, ystart, es.leftStart() - ystart, astart, es.ancestorStart() - astart); if (rd.maxLength() > 0) out.add(rd);
RangeDifference es= in[i]; rd= factory.createRangeDifference(RangeDifference.NOCHANGE, mstart, es.rightStart() - mstart, ystart, es.leftStart() - ystart, astart, es.ancestorStart() - astart); if (rd.maxLength() > 0) out.add(rd);
.rightStart() - mstart, ystart, es.leftStart() - ystart, astart, es .ancestorStart() - astart); if (rd.maxLength() > 0)
.rightStart() - mstart, ystart, es.leftStart() - ystart, astart, es .ancestorStart() - astart); if (rd.maxLength() > 0)
int ancestorEnd= 0; if (sancestor != null) { ancestorStart= sancestor.getTokenStart(es.ancestorStart()); ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength());
private List<RangeDifference> preProcess(RangeDifference[] differences) { List<RangeDifference> newRanges = new LinkedList<RangeDifference>(); for (int i = 0; i < differences.length; i++) { int ancestorStart = differences[i].ancestorStart(); int ancestorEnd = differences[i].ancestorEnd(); int leftStart = differences[i].leftStart(); int leftEnd = differences[i].leftEnd(); int rightStart = differences[i].rightStart(); int rightEnd = differences[i].rightEnd(); int kind = differences[i].kind(); int ancestorLength = ancestorEnd - ancestorStart; int leftLength = leftEnd - leftStart; int rightLength = rightEnd - rightStart; while (i + 1 < differences.length && differences[i + 1].kind() == kind && score(leftLength, differences[i + 1].leftLength(), rightLength, differences[i + 1].rightLength()) > (differences[i + 1] .leftStart() - leftEnd)) { leftEnd = differences[i + 1].leftEnd(); rightEnd = differences[i + 1].rightEnd(); ancestorEnd = differences[i + 1].ancestorEnd(); leftLength = leftEnd - leftStart; rightLength = rightEnd - rightStart; ancestorLength = ancestorEnd - ancestorStart; i++; } newRanges.add(new RangeDifference(kind, rightStart, rightLength, leftStart, leftLength, ancestorStart, ancestorLength)); } return newRanges; }
int ancestorEnd= 0; if (sancestor != null) { ancestorStart= sancestor.getTokenStart(es.ancestorStart()); ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength()); a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength()); String s= extract2(lDoc, sleft, es.leftStart(), es.leftLength()); String d= extract2(rDoc, sright, es.rightStart(), es.rightLength()); if (s.length() > 0 && d.length() > 0) { if (a == null && sancestor != null) a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength()); if (USE_MERGING_TOKEN_DIFF) mergingTokenDiff(diff, aDoc, a, rDoc, d, lDoc, s);
.leftStart(), currentIndexAncestor, d.ancestorStart(), leftComparator); .rightStart(), currentIndexAncestor, d.ancestorStart(), rightComparator); leftComparator, d.ancestorStart(), d.ancestorEnd(), ModificationType.ADDED); rightComparator, d.ancestorStart(), d.ancestorEnd(), ModificationType.ADDED); ancestorComparator.markAsNew(d.ancestorStart(), d.ancestorEnd(), ModificationType.REMOVED);
int ancestorEnd2= ancestorStart; if (ancestorDoc != null) { ancestorStart2 += sa.getTokenStart(es.ancestorStart()); ancestorEnd2 += getTokenEnd(sa, es.ancestorStart(), es.ancestorLength());
int ancestorEnd2= ancestorStart; if (ancestorDoc != null) { ancestorStart2 += sa.getTokenStart(es.ancestorStart()); ancestorEnd2 += getTokenEnd(sa, es.ancestorStart(), es.ancestorLength());
int ancestorEnd= 0; if (sancestor != null) { ancestorStart= sancestor.getTokenStart(es.ancestorStart()); ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength()); a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength()); s= extract2(lDoc, sleft, es.leftStart(), es.leftLength()); d= extract2(rDoc, sright, es.rightStart(), es.rightLength()); a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength()); if (USE_MERGING_TOKEN_DIFF) mergingTokenDiff(diff, aDoc, a, rDoc, d, lDoc, s);
int ancestorEnd= 0; if (sancestor != null) { ancestorStart= sancestor.getTokenStart(es.ancestorStart()); ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength());
int ancestorEnd2= 0; if (ancestorDoc != null) { ancestorStart2= ancestorStart+sa.getTokenStart(first.ancestorStart()); ancestorEnd2= ancestorStart+getTokenEnd(sa, last.ancestorStart(), last.ancestorLength());
int ancestorEnd2= 0; if (ancestorDoc != null) { ancestorStart2= ancestorStart+sa.getTokenStart(first.ancestorStart()); ancestorEnd2= ancestorStart+getTokenEnd(sa, last.ancestorStart(), last.ancestorLength());