File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/LineManager.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/LineManager.java | |||
Method name: void contentInserted(int, int, int, int, IntegerArray)
|
Method name: void contentInserted(int, int, int, int, IntegerArray)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if(this.endOffsets.length <= lineCount)↵ | 1 | if(lineInfo.length <= lineCount)↵ | |
2 | {↵ | 2 | {↵ | |
3 | int[] endOffsetsN = new int[(lineCount + 1) * 2];↵ | 3 | int[] lineInfoN = new int[(lineCount + 1) * 2];↵ | |
4 | System.arraycopy(this.endOffsets,0,endOffsetsN,0,↵ | 4 | System.arraycopy(↵ | |
5 | this.endOffsets.length);↵ | |||
6 | this.endOffsets = endOffsets↵ | 5 | lineInfo,0,lineInfoN,0,↵ | |
6 | lineInfo.length);↵ | |||
7 | N;↵ | 7 | lineInfo = lineInfoN;↵ | |
8 | } | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (this.endOffsets.length <= lineCount) |
| 9 | if (lineInfo.length <= lineCount) | ||||||||||||||||
6 | int[] endOffsetsN = new int[(lineCount + 1) * 2]; |
| 10 | int[] lineInfoN = new int[(lineCount + 1) * 2]; | ||||||||||||||||
7 | System.arraycopy(this.endOffsets, 0, endOffsetsN, 0, this.endOffsets.length); |
| 11 | System.arraycopy(lineInfo, 0, lineInfoN, 0, lineInfo.length); | ||||||||||||||||
8 | this.endOffsets = endOffsetsN; |
| 12 | lineInfo = lineInfoN; |
Row | Violation |
---|---|
1 | Expression this.endOffsets is a field being modified, and thus it cannot be parameterized |
2 | Expression lineInfo is a field being modified, and thus it cannot be parameterized |