File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartPanel.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartPanel.java | |||
Method name: void drawHorizontalAxisTrace(Graphics2D, int)
|
Method name: void drawVerticalAxisTrace(Graphics2D, int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (this.verticalTraceLine != null) {↵ | 1 | if (this.horizontalTraceLine != null) {↵ | |
2 | g2.draw(this.verticalTraceLine);↵ | 2 | g2.draw(this.horizontalTraceLine);↵ | |
3 | this.verticalTraceLine.setLine(x, (int) dataArea.getMinY(), x,↵ | 3 | this.horizontalTraceLine.setLine((int) dataArea.getMinX(), y,↵ | |
4 | (int) dataArea.getMaxY());↵ | 4 | (int) dataArea.getMaxX(), y);↵ | |
5 | }↵ | 5 | }↵ | |
6 | else {↵ | 6 | else {↵ | |
7 | this.verticalTraceLine = new Line2D.Float(x,↵ | 7 | this.horizontalTraceLine = new Line2D.Float(↵ | |
8 | (int) dataArea.getMinY(), x, (int) dataArea.getMaxY()↵ | 8 | (int) dataArea.getMinX(), y, (int) dataArea.getMaxX(),↵ | |
9 | );↵ | 9 | y);↵ | |
10 | }↵ | 10 | }↵ | |
11 | g2.draw(this.verticalTraceLine); | 11 | g2.draw(this.horizontalTraceLine); | |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
Number of mapped statements | 5 |
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) | 6.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (this.verticalTraceLine != null) |
| 4 | if (this.horizontalTraceLine != null) | ||||||||||||||||||||||||||
5 | g2.draw(this.verticalTraceLine); |
| 5 | g2.draw(this.horizontalTraceLine); | ||||||||||||||||||||||||||
6 | this.verticalTraceLine.setLine(x, (int)dataArea.getMinY(), x, (int)dataArea.getMaxY()); |
| 6 | this.horizontalTraceLine.setLine((int)dataArea.getMinX(), y, (int)dataArea.getMaxX(), y); | ||||||||||||||||||||||||||
else | else | |||||||||||||||||||||||||||||
7 | this.verticalTraceLine = new Line2D.Float(x, (int)dataArea.getMinY(), x, (int)dataArea.getMaxY()); |
| 7 | this.horizontalTraceLine = new Line2D.Float((int)dataArea.getMinX(), y, (int)dataArea.getMaxX(), y); | ||||||||||||||||||||||||||
8 | g2.draw(this.verticalTraceLine); |
| 8 | g2.draw(this.horizontalTraceLine); |
Row | Violation |
---|---|
1 | Expression this.verticalTraceLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.horizontalTraceLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression this.verticalTraceLine is a field being modified, and thus it cannot be parameterized |
4 | Expression this.horizontalTraceLine is a field being modified, and thus it cannot be parameterized |
5 | Expression this.verticalTraceLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression this.horizontalTraceLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |