double x = midX + getColumnRadius() + 2;
double y = this.rangeAxis.valueToJava2D(value, dataArea,
RectangleEdge.LEFT);
Line2D line = new Line2D.Double(x, y, x + 10, y);
g2.setPaint(this.subrangePaint[WARNING]);
g2.draw(line);
double x = midX + getColumnRadius() + 2;
double y = this.rangeAxis.valueToJava2D(value, dataArea,
RectangleEdge.LEFT);
Line2D line = new Line2D.Double(x, y, x + 10, y);
g2.setPaint(this.subrangePaint[CRITICAL]);
g2.draw(line);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ThermometerPlot.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ThermometerPlot.java
|
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
|
|
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | double x = midX + getColumnRadius() + 2;↵ | | 1 | double x = midX + getColumnRadius() + 2;↵
|
2 | double y = this.rangeAxis.valueToJava2D(value, dataArea, ↵ | | 2 | double y = this.rangeAxis.valueToJava2D(value, dataArea, ↵
|
3 | RectangleEdge.LEFT);↵ | | 3 | RectangleEdge.LEFT);↵
|
4 | Line2D line = new Line2D.Double(x, y, x + 10, y);↵ | | 4 | Line2D line = new Line2D.Double(x, y, x + 10, y);↵
|
5 | g2.setPaint(this.subrangePaint[WARNING]);↵ | | 5 | g2.setPaint(this.subrangePaint[CRITICAL]);↵
|
6 | g2.draw(line); | | 6 | g2.draw(line);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
-
{Refactorable}
Mapping Summary
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
59 | double x = midX + getColumnRadius() + 2; | | 66 | double x = midX + getColumnRadius() + 2; |
60 | double y = this.rangeAxis.valueToJava2D(value, dataArea, RectangleEdge.LEFT); | | 67 | double y = this.rangeAxis.valueToJava2D(value, dataArea, RectangleEdge.LEFT); |
61 | Line2D line = new Line2D.Double(x, y, x + 10, y); | | 68 | Line2D line = new Line2D.Double(x, y, x + 10, y); |
62 | g2.setPaint(this.subrangePaint[WARNING]); | | 69 | g2.setPaint(this.subrangePaint[CRITICAL]); |
63 | g2.draw(line); | | 70 | g2.draw(line); |
Precondition Violations (0)
Row |
Violation |