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: 6 | Number of AST nodes: 6 | |||
1 | if (((int) dataArea.getMinX() < x) && (x < (int) dataArea.getMaxX())) {↵ | 1 | if (((int) dataArea.getMinY() < y) && (y < (int) dataArea.getMaxY())) {↵ | |
2 | if (this.verticalTraceLine != null) {↵ | 2 | if (this.horizontalTraceLine != null) {↵ | |
3 | g2.draw(this.verticalTraceLine);↵ | 3 | g2.draw(this.horizontalTraceLine);↵ | |
4 | this.verticalTraceLine.setLine(x, (int) dataArea.getMinY(), x,↵ | 4 | this.horizontalTraceLine.setLine((int) dataArea.getMinX(), y,↵ | |
5 | (int) dataArea.getMaxY());↵ | 5 | (int) dataArea.getMaxX(), y);↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | this.verticalTraceLine = new Line2D.Float(x,↵ | 8 | this.horizontalTraceLine = new Line2D.Float(↵ | |
9 | (int) dataArea.getMinY(), x, (int) dataArea.getMaxY()↵ | 9 | (int) dataArea.getMinX(), y, (int) dataArea.getMaxX(),↵ | |
10 | );↵ | 10 | y);↵ | |
11 | }↵ | 11 | }↵ | |
12 | g2.draw(this.verticalTraceLine);↵ | 12 | g2.draw(this.horizontalTraceLine);↵ | |
13 | } | 13 |
| |
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 | 20 |
Number of mapped statements | 6 |
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) | 7.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (((int)dataArea.getMinX() < x) && (x < (int)dataArea.getMaxX())) |
| 3 | if (((int)dataArea.getMinY() < y) && (y < (int)dataArea.getMaxY())) | ||||||||||||||||||||||||||||||
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 (int)dataArea.getMinX() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression (int)dataArea.getMinY() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression (int)dataArea.getMaxX() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression (int)dataArea.getMaxY() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
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 |
7 | Expression this.verticalTraceLine is a field being modified, and thus it cannot be parameterized |
8 | Expression this.horizontalTraceLine is a field being modified, and thus it cannot be parameterized |
9 | Expression (int)dataArea.getMinX() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression (int)dataArea.getMinY() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression (int)dataArea.getMaxX() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression (int)dataArea.getMaxY() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression this.verticalTraceLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression this.horizontalTraceLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |