Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
33 | 2 | 0 | 1.000 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 33 | 173 | plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/EnvUtil.java |
2 | 33 | 385 | plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/util/Visitors.java |
| ||||
public void preVisit(ASTNode node) { final int startingOffset = node.getStartPosition(); final int endingOffset = startingOffset + node.getLength(); // starting offset is inclusive int startIndex = Arrays.binarySearch(_sortedStartingOffset, startingOffset); // ending offset is exclusive int endIndex = Arrays.binarySearch(_sortedStartingOffset, endingOffset); if (startIndex < 0) startIndex = - startIndex - 1; if (endIndex < 0) endIndex = - endIndex - 1; else // endIndex needs to be exclusive and we want to // include the 'endIndex'th entry in our computation. endIndex++; if (startIndex >= _sortedStartingOffset.length) return; for (int i = startIndex; i < endIndex; i++) { if (_endingOffsets[i] == 0) _endingOffsets[i] = endingOffset; else if (endingOffset < _endingOffsets[i]) _endingOffsets[i] = endingOffset; } } public int getEndingOffset( final int startingOffset) { int index = Arrays.binarySearch(_sortedStartingOffset, startingOffset); if (index == -1) return 0; return _endingOffsets[index]; } |
| ||||
public void preVisit(ASTNode node) { final int startingOffset = node.getStartPosition(); final int endingOffset = startingOffset + node.getLength(); // starting offset is inclusive int startIndex = Arrays.binarySearch(_sortedStartingOffset, startingOffset); // ending offset is exclusive int endIndex = Arrays.binarySearch(_sortedStartingOffset, endingOffset); if (startIndex < 0) startIndex = - startIndex - 1; if (endIndex < 0) endIndex = - endIndex - 1; else // endIndex needs to be exclusive and we want to // include the 'endIndex'th entry in our computation. endIndex++; if (startIndex >= _sortedStartingOffset.length) return; for (int i = startIndex; i < endIndex; i++) { if (_endingOffsets[i] == 0) _endingOffsets[i] = endingOffset; else if (endingOffset < _endingOffsets[i]) _endingOffsets[i] = endingOffset; } } public int getEndingOffset( final int startingOffset) { int index = Arrays.binarySearch(_sortedStartingOffset, startingOffset); if (index == -1) return 0; return _endingOffsets[index]; } |
| |||
public void preVisit(ASTNode node) { final int startingOffset = node.getStartPosition(); final int endingOffset = startingOffset + node.getLength(); // starting offset is inclusive int startIndex = Arrays.binarySearch(_sortedStartingOffset, startingOffset); // ending offset is exclusive int endIndex = Arrays.binarySearch(_sortedStartingOffset, endingOffset); if (startIndex < 0) startIndex = -startIndex - 1; if (endIndex < 0) endIndex = -endIndex - 1; else // endIndex needs to be exclusive and we want to // include the 'endIndex'th entry in our computation. endIndex++; if (startIndex >= _sortedStartingOffset.length) return; for (int i = startIndex; i < endIndex; i++) { if (_endingOffsets[i] == 0) _endingOffsets[i] = endingOffset; else if (endingOffset < _endingOffsets[i]) _endingOffsets[i] = endingOffset; } } public int getEndingOffset( final int startingOffset) { int index = Arrays.binarySearch(_sortedStartingOffset, startingOffset); if (index == -1) return 0; return _endingOffsets[index]; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |