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 moveGap(int, int, String)
|
Method name: void moveGap(int, int, String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if(gapWidth != 0)↵ | 1 | if(gapWidth != 0)↵ | |
2 | {↵ | 2 | {↵ | |
3 | if(Debug.OFFSET_DEBUG && newGapLine != gapLine)↵ | 3 | if(Debug.OFFSET_DEBUG && gapLine != lineCount)↵ | |
4 | Log.log(Log.DEBUG,this,method + ": update from " + newGapLine + " to " + gapLine + " width " + gapWidth);↵ | 4 | Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth);↵ | |
5 | for(int i = newGapLine; i < gapLine; i++)↵ | 5 | for(int i = gapLine; i < lineCount; i++)↵ | |
6 | setLineEndOffset(i,getLineEndOffset(i) - gapWidth);↵ | 6 | setLineEndOffset(i,getLineEndOffset(i));↵ | |
7 | }↵ | 7 | }↵ | |
8 | gapWidth += newGapWidth; | 8 | gapWidth = newGapWidth; | |
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 16 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | if (gapWidth != 0) | 4 | if (gapWidth != 0) | ||||||||||||||
12 | if (Debug.OFFSET_DEBUG && newGapLine != gapLine) |
| 5 | if (Debug.OFFSET_DEBUG && gapLine != lineCount) | |||||||||||||
13 | Log.log(Log.DEBUG, this, method + ": update from " + newGapLine + " to " + gapLine + " width " + gapWidth); |
| 6 | Log.log(Log.DEBUG, this, method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth); | |||||||||||||
14 | for (int i = newGapLine; i < gapLine; i++) |
| 7 | for (int i = gapLine; i < lineCount; i++) | |||||||||||||
15 | setLineEndOffset(i, getLineEndOffset(i) - gapWidth); |
| 8 | setLineEndOffset(i, getLineEndOffset(i)); | |||||||||||||
| 9 | gapWidth = newGapWidth; | |||||||||||||||
16 | gapWidth += newGapWidth; | |
Row | Violation |
---|---|
1 | Expression getLineEndOffset(i) - gapWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getLineEndOffset(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted |