float y = (float) axis.valueToJava2D(value, adjusted,
plot.getRangeAxisEdge());
float x = (float) dataArea.getX();
path = new GeneralPath();
path.moveTo(x, y);
path.lineTo(x + (float) this.xOffset, y - (float) this.yOffset);
path.lineTo((float) (adjusted.getMaxX() + this.xOffset),
y - (float) this.yOffset);
path.lineTo((float) (adjusted.getMaxX()), y);
path.closePath();
float y = (float) axis.valueToJava2D(value, adjusted,
plot.getRangeAxisEdge());
float x = (float) dataArea.getX();
path = new GeneralPath();
path.moveTo(x, y);
path.lineTo(x + (float) this.xOffset, y - (float) this.yOffset);
path.lineTo((float) (adjusted.getMaxX() + this.xOffset),
y - (float) this.yOffset);
path.lineTo((float) (adjusted.getMaxX()), y);
path.closePath();
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BarRenderer3D.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineRenderer3D.java
|
Method name: void drawRangeMarker(Graphics2D, CategoryPlot, ValueAxis, Marker, Rectangle2D)
|
|
Method name: void drawRangeMarker(Graphics2D, CategoryPlot, ValueAxis, Marker, Rectangle2D)
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | float y = (float) axis.valueToJava2D(value, adjusted,↵ | | 1 | float y = (float) axis.valueToJava2D(value, adjusted,↵
|
2 | plot.getRangeAxisEdge());↵ | | 2 | plot.getRangeAxisEdge());↵
|
3 | float x = (float) dataArea.getX();↵ | | 3 | float x = (float) dataArea.getX();↵
|
4 | path = new GeneralPath();↵ | | 4 | path = new GeneralPath();↵
|
5 | path.moveTo(x, y);↵ | | 5 | path.moveTo(x, y);↵
|
6 | path.lineTo(x + (float) this.xOffset, y - (float) this.yOffset);↵ | | 6 | path.lineTo(x + (float) this.xOffset, y - (float) this.yOffset);↵
|
7 | path.lineTo((float) (adjusted.getMaxX() + this.xOffset),↵ | | 7 | path.lineTo((float) (adjusted.getMaxX() + this.xOffset),↵
|
8 | y - (float) this.yOffset);↵ | | 8 | y - (float) this.yOffset);↵
|
9 | path.lineTo((float) (adjusted.getMaxX()), y);↵ | | 9 | path.lineTo((float) (adjusted.getMaxX()), y);↵
|
10 | path.closePath(); | | 10 | path.closePath();
|
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 different classes having the same super class |
Number of node comparisons | 64 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 8 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
20 | float y = (float)axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); | | 20 | float y = (float)axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); |
21 | float x = (float)dataArea.getX(); | | 21 | float x = (float)dataArea.getX(); |
22 | path = new GeneralPath(); | | 22 | path = new GeneralPath(); |
23 | path.moveTo(x, y); | | 23 | path.moveTo(x, y); |
24 | path.lineTo(x + (float)this.xOffset, y - (float)this.yOffset); | | 24 | path.lineTo(x + (float)this.xOffset, y - (float)this.yOffset); |
25 | path.lineTo((float)(adjusted.getMaxX() + this.xOffset), y - (float)this.yOffset); | | 25 | path.lineTo((float)(adjusted.getMaxX() + this.xOffset), y - (float)this.yOffset); |
26 | path.lineTo((float)(adjusted.getMaxX()), y); | | 26 | path.lineTo((float)(adjusted.getMaxX()), y); |
27 | path.closePath(); | | 27 | path.closePath(); |
Precondition Violations (0)
Row |
Violation |