HistogramDiffIndex(int maxChainLength, HashedSequenceComparator<S> cmp, HashedSequence<S> a, HashedSequence<S> b, Edit r) { this.maxChainLength = maxChainLength; this.cmp = cmp; this.a = a; this.b = b; this.region = r; if (region.endA >= MAX_PTR) throw new IllegalArgumentException( JGitText.get().sequenceTooLargeForDiffAlgorithm); final int sz = r.getLengthA(); final int tableBits = tableBits(sz); table = new int[1 << tableBits]; keyShift = 32 - tableBits; ptrShift = r.beginA; recs = new long[Math.max(4, sz >>> 3)]; next = new int[sz]; recIdx = new int[sz]; }
private void diff(Edit r) { switch (r.getType()) { case INSERT: case DELETE: edits.add(r); break; case REPLACE: if (r.getLengthA() == 1 && r.getLengthB() == 1) edits.add(r); else diffReplace(r); break; case EMPTY: default: throw new IllegalStateException(); } }
int sz = Math.min(recs.length << 1, 1 + region.getLengthA()); long[] n = new long[sz]; System.arraycopy(recs, 0, n, 0, recs.length);
if (lcs.getLengthA() < ae - as || rc < cnt) {
if (region.getLengthA() == 1 && region.getLengthB() == 1) return EditList.singleton(region);
HistogramDiffIndex(int maxChainLength, HashedSequenceComparator<S> cmp, HashedSequence<S> a, HashedSequence<S> b, Edit r) { this.maxChainLength = maxChainLength; this.cmp = cmp; this.a = a; this.b = b; this.region = r; if (region.endA >= MAX_PTR) throw new IllegalArgumentException( JGitText.get().sequenceTooLargeForDiffAlgorithm); final int sz = r.getLengthA(); final int tableBits = tableBits(sz); table = new int[1 << tableBits]; keyShift = 32 - tableBits; ptrShift = r.beginA; recs = new long[Math.max(4, sz >>> 3)]; next = new int[sz]; recIdx = new int[sz]; }
HistogramDiffIndex(int maxChainLength, HashedSequenceComparator<S> cmp, HashedSequence<S> a, HashedSequence<S> b, Edit r) { this.maxChainLength = maxChainLength; this.cmp = cmp; this.a = a; this.b = b; this.region = r; if (region.endA >= MAX_PTR) throw new IllegalArgumentException( JGitText.get().sequenceTooLargeForDiffAlgorithm); final int sz = r.getLengthA(); final int tableBits = tableBits(sz); table = new int[1 << tableBits]; keyShift = 32 - tableBits; ptrShift = r.beginA; recs = new long[Math.max(4, sz >>> 3)]; next = new int[sz]; recIdx = new int[sz]; }
@Override protected boolean include(final RevCommit commit, final DiffEntry diff, final Collection<Edit> edits) { for (Edit edit : edits) switch (edit.getType()) { case DELETE: count += edit.getLengthA(); break; case INSERT: case REPLACE: count += edit.getLengthB(); break; } return true; }
@Override protected boolean include(final RevCommit commit, final DiffEntry diff, final Edit edit) { switch (edit.getType()) { case DELETE: count += edit.getLengthA(); break; case INSERT: case REPLACE: count += edit.getLengthB(); break; } return true; }
protected boolean include(RevCommit commit, DiffEntry diff, Edit hunk) { switch (hunk.getType()) { case DELETE: deleted += hunk.getLengthA(); break; case INSERT: added += hunk.getLengthB(); break; case REPLACE: edited += hunk.getLengthB(); break; } return true; }
@Override protected boolean include(RevCommit commit, DiffEntry diff, Edit hunk) { switch (hunk.getType()) { case DELETE: delete += hunk.getLengthA(); break; case INSERT: add += hunk.getLengthB(); break; case REPLACE: edit += hunk.getLengthB(); break; } return true; }
private void diff(Edit r) { switch (r.getType()) { case INSERT: case DELETE: edits.add(r); break; case REPLACE: if (r.getLengthA() == 1 && r.getLengthB() == 1) edits.add(r); else diffReplace(r); break; case EMPTY: default: throw new IllegalStateException(); } }
private void diff(Edit r) { switch (r.getType()) { case INSERT: case DELETE: edits.add(r); break; case REPLACE: if (r.getLengthA() == 1 && r.getLengthB() == 1) edits.add(r); else diffReplace(r); break; case EMPTY: default: throw new IllegalStateException(); } }
int sz = Math.min(recs.length << 1, 1 + region.getLengthA()); long[] n = new long[sz]; System.arraycopy(recs, 0, n, 0, recs.length);
int sz = Math.min(recs.length << 1, 1 + region.getLengthA()); long[] n = new long[sz]; System.arraycopy(recs, 0, n, 0, recs.length);
nbLineDeleted += edit.getLengthA(); break; int diff = edit.getLengthA() - edit.getLengthB(); if (diff > 0) { nbLineAdded += edit.getLengthA(); nbLineDeleted += edit.getLengthB(); } else { nbLineDeleted += edit.getLengthA(); nbLineAdded += edit.getLengthB();
if (lcs.getLengthA() < ae - as || rc < cnt) {
if (region.getLengthA() == 1 && region.getLengthB() == 1) return EditList.singleton(region);
addedLines += edit.getLengthB(); } else if (edit.getType() == Type.DELETE) { deletedLines += edit.getLengthA(); } else if (edit.getType() == Type.REPLACE) { deletedLines += edit.getLengthA(); addedLines += edit.getLengthB();
if (region.getLengthA() == 1 && region.getLengthB() == 1) return EditList.singleton(region);