if (h == LengthConstraintType.NONE) {
contentSize = arrangeRN(g2, cc.getWidthRange());
}
else if (h == LengthConstraintType.RANGE) {
contentSize = arrangeRR(g2, cc.getWidthRange(),
cc.getHeightRange());
}
else if (h == LengthConstraintType.FIXED) {
throw new RuntimeException("Not yet implemented.");
}
if (h == LengthConstraintType.NONE) {
contentSize = arrangeRN(g2, cc.getWidthRange());
}
else if (h == LengthConstraintType.RANGE) {
contentSize = arrangeRR(g2, cc.getWidthRange(),
cc.getHeightRange());
}
else if (h == LengthConstraintType.FIXED) {
throw new RuntimeException("Not yet implemented.");
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/title/ShortTextTitle.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/title/TextTitle.java
|
Method name: Size2D arrange(Graphics2D, RectangleConstraint)
|
|
Method name: Size2D arrange(Graphics2D, RectangleConstraint)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (h == LengthConstraintType.NONE) {↵ | | 1 | if (h == LengthConstraintType.NONE) {↵
|
2 | contentSize = arrangeRN(g2, cc.getWidthRange());↵ | | 2 | contentSize = arrangeRN(g2, cc.getWidthRange());↵
|
3 | }↵ | | 3 | }↵
|
4 | else if (h == LengthConstraintType.RANGE) {↵ | | 4 | else if (h == LengthConstraintType.RANGE) {↵
|
5 | contentSize = arrangeRR(g2, cc.getWidthRange(),↵ | | 5 | contentSize = arrangeRR(g2, cc.getWidthRange(),↵
|
6 | cc.getHeightRange());↵ | | 6 | cc.getHeightRange());↵
|
7 | }↵ | | 7 | }↵
|
8 | else if (h == LengthConstraintType.FIXED) {↵ | | 8 | else if (h == LengthConstraintType.FIXED) {↵
|
9 | throw new RuntimeException("Not yet implemented.");↵ | | 9 | throw new RuntimeException("Not yet implemented.");↵
|
10 | } | | 10 | }
|
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 28 |
-
{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) | 1.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | if (h == LengthConstraintType.NONE) | | 13 | if (h == LengthConstraintType.NONE) |
14 | contentSize = arrangeRN(g2, cc.getWidthRange()); | | 14 | contentSize = arrangeRN(g2, cc.getWidthRange()); |
15 | else if (h == LengthConstraintType.RANGE) | | 15 | else if (h == LengthConstraintType.RANGE) |
16 | contentSize = arrangeRR(g2, cc.getWidthRange(), cc.getHeightRange()); | | 16 | contentSize = arrangeRR(g2, cc.getWidthRange(), cc.getHeightRange()); |
17 | else if (h == LengthConstraintType.FIXED) | | 17 | else if (h == LengthConstraintType.FIXED) |
18 | throw new RuntimeException("Not yet implemented."); | | 18 | throw new RuntimeException("Not yet implemented."); |
Precondition Violations (0)
Row |
Violation |