if (position != null) {
TextUtilities.drawRotatedString(label, g2,
(float) anchorPoint.getX(), (float) anchorPoint.getY(),
position.getTextAnchor(), position.getAngle(),
position.getRotationAnchor());
}
if (position != null) {
TextUtilities.drawRotatedString(label, g2,
(float) anchorPoint.getX(), (float) anchorPoint.getY(),
position.getTextAnchor(), position.getAngle(),
position.getRotationAnchor());
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BarRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBarRenderer.java
|
Method name: void drawItemLabel(Graphics2D, CategoryDataset, int, int, CategoryPlot, CategoryItemLabelGenerator, Rectangle2D, boolean)
|
|
Method name: void drawItemLabel(Graphics2D, XYDataset, int, int, XYPlot, XYItemLabelGenerator, Rectangle2D, boolean)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | if (position != null) {↵ | | 1 | if (position != null) {↵
|
2 | TextUtilities.drawRotatedString(label, g2,↵ | | 2 | TextUtilities.drawRotatedString(label, g2, ↵
|
3 | (float) anchorPoint.getX(), (float) anchorPoint.getY(),↵ | | 3 | (float) anchorPoint.getX(), (float) anchorPoint.getY(),↵
|
4 | position.getTextAnchor(), position.getAngle(),↵ | | 4 | position.getTextAnchor(), position.getAngle(), ↵
|
5 | position.getRotationAnchor());↵ | | 5 | position.getRotationAnchor());↵
|
6 | } | | 6 | }
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 4 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 2.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
22 | if (position != null) | | 24 | if (position != null) |
23 | TextUtilities.drawRotatedString(label, g2, (float)anchorPoint.getX(), (float)anchorPoint.getY(), position.getTextAnchor(), position.getAngle(), position.getRotationAnchor()); | | 25 | TextUtilities.drawRotatedString(label, g2, (float)anchorPoint.getX(), (float)anchorPoint.getY(), position.getTextAnchor(), position.getAngle(), position.getRotationAnchor()); |
Precondition Violations (0)
Row |
Violation |