if (anchor == ItemLabelAnchor.OUTSIDE10) {
result = new Point2D.Double(x0, y5);
}
else if (anchor == ItemLabelAnchor.OUTSIDE11) {
result = new Point2D.Double(x1, y6);
}
else if (anchor == ItemLabelAnchor.OUTSIDE12) {
result = new Point2D.Double(x3, y6);
}
if (anchor == ItemLabelAnchor.OUTSIDE10) {
result = new Point2D.Double(x0, y5);
}
else if (anchor == ItemLabelAnchor.OUTSIDE11) {
result = new Point2D.Double(x1, y6);
}
else if (anchor == ItemLabelAnchor.OUTSIDE12) {
result = new Point2D.Double(x3, y6);
}
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: Point2D calculateLabelAnchorPoint(ItemLabelAnchor, Rectangle2D, PlotOrientation)
|
|
Method name: Point2D calculateLabelAnchorPoint(ItemLabelAnchor, Rectangle2D, PlotOrientation)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (anchor == ItemLabelAnchor.OUTSIDE10) {↵ | | 1 | if (anchor == ItemLabelAnchor.OUTSIDE10) {↵
|
2 | result = new Point2D.Double(x0, y5);↵ | | 2 | result = new Point2D.Double(x0, y5);↵
|
3 | }↵ | | 3 | }↵
|
4 | else if (anchor == ItemLabelAnchor.OUTSIDE11) {↵ | | 4 | else if (anchor == ItemLabelAnchor.OUTSIDE11) {↵
|
5 | result = new Point2D.Double(x1, y6);↵ | | 5 | result = new Point2D.Double(x1, y6);↵
|
6 | }↵ | | 6 | }↵
|
7 | else if (anchor == ItemLabelAnchor.OUTSIDE12) {↵ | | 7 | else if (anchor == ItemLabelAnchor.OUTSIDE12) {↵
|
8 | result = new Point2D.Double(x3, y6);↵ | | 8 | result = new Point2D.Double(x3, y6);↵
|
9 | } | | 9 | }
|
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) | 1.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 27 |
-
{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) | 9.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
61 | else if (anchor == ItemLabelAnchor.OUTSIDE10) | | 61 | else if (anchor == ItemLabelAnchor.OUTSIDE10) |
62 | result = new Point2D.Double(x0, y5); | | 62 | result = new Point2D.Double(x0, y5); |
63 | else if (anchor == ItemLabelAnchor.OUTSIDE11) | | 63 | else if (anchor == ItemLabelAnchor.OUTSIDE11) |
64 | result = new Point2D.Double(x1, y6); | | 64 | result = new Point2D.Double(x1, y6); |
65 | else if (anchor == ItemLabelAnchor.OUTSIDE12) | | 65 | else if (anchor == ItemLabelAnchor.OUTSIDE12) |
66 | result = new Point2D.Double(x3, y6); | | 66 | result = new Point2D.Double(x3, y6); |
Precondition Violations (0)
Row |
Violation |