if (range.contains(value)) {
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[NORMAL]);
g2.draw(line);
}
if (range.contains(value)) {
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: 6
|
|
Number of AST nodes: 6
|
|
1 | if (range.contains(value)) {↵ | | 1 | if (range.contains(value)) {↵
|
2 | double x = midX + getColumnRadius() + 2;↵ | | 2 | double x = midX + getColumnRadius() + 2;↵
|
3 | double y = this.rangeAxis.valueToJava2D(value, dataArea, ↵ | | 3 | double y = this.rangeAxis.valueToJava2D(value, dataArea, ↵
|
4 | RectangleEdge.LEFT);↵ | | 4 | RectangleEdge.LEFT);↵
|
5 | Line2D line = new Line2D.Double(x, y, x + 10, y);↵ | | 5 | Line2D line = new Line2D.Double(x, y, x + 10, y);↵
|
6 | g2.setPaint(this.subrangePaint[NORMAL]);↵ | | 6 | g2.setPaint(this.subrangePaint[CRITICAL]);↵
|
7 | g2.draw(line);↵ | | 7 | g2.draw(line);↵
|
8 | } | | 8 | }
|
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 37 |
-
{Refactorable}
Mapping Summary
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) | 72.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
51 | if (range.contains(value)) | | 65 | if (range.contains(value)) |
52 | double x = midX + getColumnRadius() + 2; | | 66 | double x = midX + getColumnRadius() + 2; |
53 | double y = this.rangeAxis.valueToJava2D(value, dataArea, RectangleEdge.LEFT); | | 67 | double y = this.rangeAxis.valueToJava2D(value, dataArea, RectangleEdge.LEFT); |
54 | Line2D line = new Line2D.Double(x, y, x + 10, y); | | 68 | Line2D line = new Line2D.Double(x, y, x + 10, y); |
55 | g2.setPaint(this.subrangePaint[NORMAL]); | | 69 | g2.setPaint(this.subrangePaint[CRITICAL]); |
56 | | | 70 | |
Precondition Violations (0)
Row |
Violation |