File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/PanelWindowContainer.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/PanelWindowContainer.java | |||
Method name: void paintHorizBorder(Graphics, int, int, int)
|
Method name: void paintVertBorder(Graphics, int, int, int)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | g.setColor(color3);↵ | 1 | g.setColor(color3);↵ | |
2 | g.fillRect(x,y,width,SPLITTER_WIDTH);↵ | 2 | g.fillRect(x,y,SPLITTER_WIDTH,height);↵ | |
3 | for(int i = 0; i < width / 4 - 1; i++)↵ | 3 | for(int i = 0; i < height / 4 - 1; i++)↵ | |
4 | {↵ | 4 | {↵ | |
5 | g.setColor(color1);↵ | 5 | g.setColor(color1);↵ | |
6 | g.drawLine(x + i * 4 + 2,y + 3,↵ | 6 | g.drawLine(x + 3,y + i * 4 + 2,↵ | |
7 | x + i * 4 + 2,y + 3);↵ | 7 | x + 3,y + i * 4 + 2);↵ | |
8 | g.setColor(color2);↵ | 8 | g.setColor(color2);↵ | |
9 | g.drawLine(x + i * 4 + 3,y + 4,↵ | 9 | g.drawLine(x + 4,y + i * 4 + 3,↵ | |
10 | x + i * 4 + 3,y + 4);↵ | 10 | x + 4,y + i * 4 + 3);↵ | |
11 | g.setColor(color1);↵ | 11 | g.setColor(color1);↵ | |
12 | g.drawLine(x + i * 4 + 4,y + 5,↵ | 12 | g.drawLine(x + 5,y + i * 4 + 4,↵ | |
13 | x + i * 4 + 4,y + 5);↵ | 13 | x + 5,y + i * 4 + 4);↵ | |
14 | g.setColor(color2);↵ | 14 | g.setColor(color2);↵ | |
15 | g.drawLine(x + i * 4 + 5,y + 6,↵ | 15 | g.drawLine(x + 6,y + i * 4 + 5,↵ | |
16 | x + i * 4 + 5,y + 6);↵ | 16 | x + 6,y + i * 4 + 5);↵ | |
17 | } | 17 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 85 |
Number of mapped statements | 11 |
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) | 23.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | g.setColor(color3); | 1 | g.setColor(color3); | ||||||||||||||||||||||||||||||
2 | g.fillRect(x, y, width, SPLITTER_WIDTH); |
| 2 | g.fillRect(x, y, SPLITTER_WIDTH, height); | |||||||||||||||||||||||||||||
3 | for (int i = 0; i < width / 4 - 1; i++) |
| 3 | for (int i = 0; i < height / 4 - 1; i++) | |||||||||||||||||||||||||||||
4 | g.setColor(color1); | 4 | g.setColor(color1); | ||||||||||||||||||||||||||||||
5 | g.drawLine(x + i * 4 + 2, y + 3, x + i * 4 + 2, y + 3); |
| 8 | g.setColor(color1); | |||||||||||||||||||||||||||||
6 | g.setColor(color2); | 6 | g.setColor(color2); | ||||||||||||||||||||||||||||||
7 | g.drawLine(x + i * 4 + 3, y + 4, x + i * 4 + 3, y + 4); |
| 5 | g.drawLine(x + 3, y + i * 4 + 2, x + 3, y + i * 4 + 2); | |||||||||||||||||||||||||||||
8 | g.setColor(color1); |
| 7 | g.drawLine(x + 4, y + i * 4 + 3, x + 4, y + i * 4 + 3); | |||||||||||||||||||||||||||||
9 | g.drawLine(x + i * 4 + 4, y + 5, x + i * 4 + 4, y + 5); |
| 11 | g.drawLine(x + 6, y + i * 4 + 5, x + 6, y + i * 4 + 5); | |||||||||||||||||||||||||||||
10 | g.setColor(color2); | 10 | g.setColor(color2); | ||||||||||||||||||||||||||||||
11 | g.drawLine(x + i * 4 + 5, y + 6, x + i * 4 + 5, y + 6); |
| 9 | g.drawLine(x + 5, y + i * 4 + 4, x + 5, y + i * 4 + 4); |
Row | Violation |
---|---|
1 | Expression g.drawLine(x + i * 4 + 2,y + 3,x + i * 4 + 2,y + 3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression g.drawLine(x + i * 4 + 2,y + 3,x + i * 4 + 2,y + 3) is a void method call, and thus it cannot be parameterized |
3 | Expression g.setColor(color1) is a void method call, and thus it cannot be parameterized |
4 | Expression g.drawLine(x + i * 4 + 2,y + 3,x + i * 4 + 2,y + 3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression g.drawLine(x + i * 4 + 2,y + 3,x + i * 4 + 2,y + 3) is a void method call, and thus it cannot be parameterized |
6 | Expression g.setColor(color1) is a void method call, and thus it cannot be parameterized |
7 | Expression x + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression y + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression x + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression y + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression g.drawLine(x + 4,y + i * 4 + 3,x + 4,y + i * 4 + 3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression g.setColor(color1) is a void method call, and thus it cannot be parameterized |
13 | Expression g.drawLine(x + 4,y + i * 4 + 3,x + 4,y + i * 4 + 3) is a void method call, and thus it cannot be parameterized |
14 | Expression g.drawLine(x + 4,y + i * 4 + 3,x + 4,y + i * 4 + 3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression g.setColor(color1) is a void method call, and thus it cannot be parameterized |
16 | Expression g.drawLine(x + 4,y + i * 4 + 3,x + 4,y + i * 4 + 3) is a void method call, and thus it cannot be parameterized |
17 | Expression x + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression y + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression x + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression y + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression x + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression y + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression x + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression y + i * 4 cannot be parameterized, because it has dependencies to/from statements that will be extracted |