if (this.orientation == PlotOrientation.HORIZONTAL) {
space.ensureAtLeast(
this.fixedDomainAxisSpace.getLeft(), RectangleEdge.LEFT);
space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(),
RectangleEdge.RIGHT);
}
else if (this.orientation == PlotOrientation.VERTICAL) {
space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(),
RectangleEdge.TOP);
space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(),
RectangleEdge.BOTTOM);
}
if (this.orientation == PlotOrientation.HORIZONTAL) {
space.ensureAtLeast(this.fixedDomainAxisSpace.getLeft(),
RectangleEdge.LEFT);
space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(),
RectangleEdge.RIGHT);
}
else if (this.orientation == PlotOrientation.VERTICAL) {
space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(),
RectangleEdge.TOP);
space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(),
RectangleEdge.BOTTOM);
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
|
Method name: AxisSpace calculateDomainAxisSpace(Graphics2D, Rectangle2D, AxisSpace)
|
|
Method name: AxisSpace calculateDomainAxisSpace(Graphics2D, Rectangle2D, AxisSpace)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵ | | 1 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵
|
2 | space.ensureAtLeast(↵ | | 2 | space.ensureAtLeast(↵
|
3 | this.fixedDomainAxisSpace.getLeft(),↵ | | 3 | this.fixedDomainAxisSpace.getLeft(),↵
|
4 | RectangleEdge.LEFT);↵ | | 4 | RectangleEdge.LEFT);↵
|
5 | space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(),↵ | | 5 | space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(),↵
|
6 | RectangleEdge.RIGHT);↵ | | 6 | RectangleEdge.RIGHT);↵
|
7 | }↵ | | 7 | }↵
|
8 | else if (this.orientation == PlotOrientation.VERTICAL) {↵ | | 8 | else if (this.orientation == PlotOrientation.VERTICAL) {↵
|
9 | space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(),↵ | | 9 | space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(),↵
|
10 | RectangleEdge.TOP);↵ | | 10 | RectangleEdge.TOP);↵
|
11 | space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(),↵ | | 11 | space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(),↵
|
12 | RectangleEdge.BOTTOM);↵ | | 12 | RectangleEdge.BOTTOM);↵
|
13 | } | | 13 | }
|
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) | 2.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 29 |
-
{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) | 14.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | if (this.orientation == PlotOrientation.HORIZONTAL) | | 4 | if (this.orientation == PlotOrientation.HORIZONTAL) |
5 | space.ensureAtLeast(this.fixedDomainAxisSpace.getLeft(), RectangleEdge.LEFT); | | 5 | space.ensureAtLeast(this.fixedDomainAxisSpace.getLeft(), RectangleEdge.LEFT); |
6 | space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(), RectangleEdge.RIGHT); | | 6 | space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(), RectangleEdge.RIGHT); |
7 | else if (this.orientation == PlotOrientation.VERTICAL) | | 7 | else if (this.orientation == PlotOrientation.VERTICAL) |
8 | space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(), RectangleEdge.TOP); | | 8 | space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(), RectangleEdge.TOP); |
9 | space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(), RectangleEdge.BOTTOM); | | 9 | space.ensureAtLeast(this.fixedDomainAxisSpace.getBottom(), RectangleEdge.BOTTOM); |
Precondition Violations (0)
Row |
Violation |