if (orientation == PlotOrientation.HORIZONTAL) {
anchorRect = markerOffset.createAdjustedRectangle(markerArea,
labelOffsetType, LengthAdjustmentType.CONTRACT);
}
else if (orientation == PlotOrientation.VERTICAL) {
anchorRect = markerOffset.createAdjustedRectangle(markerArea,
LengthAdjustmentType.CONTRACT, labelOffsetType);
}
if (orientation == PlotOrientation.HORIZONTAL) {
anchorRect = markerOffset.createAdjustedRectangle(markerArea,
LengthAdjustmentType.CONTRACT, labelOffsetType);
}
else if (orientation == PlotOrientation.VERTICAL) {
anchorRect = markerOffset.createAdjustedRectangle(markerArea,
labelOffsetType, LengthAdjustmentType.CONTRACT);
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
|
Method name: Point2D calculateRangeMarkerTextAnchorPoint(Graphics2D, PlotOrientation, Rectangle2D, Rectangle2D, RectangleInsets, LengthAdjustmentType, RectangleAnchor)
|
|
Method name: Point2D calculateDomainMarkerTextAnchorPoint(Graphics2D, PlotOrientation, Rectangle2D, Rectangle2D, RectangleInsets, LengthAdjustmentType, RectangleAnchor)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | | 1 | if (orientation == PlotOrientation.HORIZONTAL) {↵
|
2 | anchorRect = markerOffset.createAdjustedRectangle(markerArea,↵ | | 2 | anchorRect = markerOffset.createAdjustedRectangle(markerArea,↵
|
3 | labelOffsetType, LengthAdjustmentType.CONTRACT);↵ | | 3 | LengthAdjustmentType.CONTRACT, labelOffsetType);↵
|
4 | }↵ | | 4 | }↵
|
5 | else if (orientation == PlotOrientation.VERTICAL) {↵ | | 5 | else if (orientation == PlotOrientation.VERTICAL) {↵
|
6 | anchorRect = markerOffset.createAdjustedRectangle(markerArea,↵ | | 6 | anchorRect = markerOffset.createAdjustedRectangle(markerArea,↵
|
7 | LengthAdjustmentType.CONTRACT, labelOffsetType);↵ | | 7 | labelOffsetType, LengthAdjustmentType.CONTRACT);↵
|
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (orientation == PlotOrientation.HORIZONTAL) | | 4 | if (orientation == PlotOrientation.VERTICAL) |
3 | anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT); | | 5 | anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT); |
4 | else if (orientation == PlotOrientation.VERTICAL) | | 2 | else if (orientation == PlotOrientation.HORIZONTAL) |
5 | anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType); | | 3 | anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType); |
Precondition Violations (0)
Row |
Violation |