if ((orientation == SOUTHEAST) || (orientation == EAST)
|| (orientation == NORTHEAST)) {
cUnit objectPosition = parentSize.getWidth().sub(
this.getSize().getWidth());
drawingOrigin = new cPoint(
drawingOrigin.getX().add(objectPosition), drawingOrigin
.getY());
}
if ((orientation == SOUTHWEST) || (orientation == SOUTH)
|| (orientation == SOUTHEAST)) {
cUnit objectPosition = parentSize.getHeight().sub(
getSize().getHeight());
drawingOrigin = new cPoint(drawingOrigin.getX(), objectPosition
.add(drawingOrigin.getY()));
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cPrintObject.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cPrintObject.java
|
Method name: void computePositionAndSize()
|
|
Method name: void computePositionAndSize()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if ((orientation == SOUTHEAST) || (orientation == EAST)↵ | | 1 | if ((orientation == SOUTHWEST) || (orientation == SOUTH)↵
|
2 | || (orientation == NORTHEAST)) {↵ | | 2 | || (orientation == SOUTHEAST)) {↵
|
3 | cUnit objectPosition = parentSize.getWidth().sub(↵ | | 3 | cUnit objectPosition = parentSize.getHeight().sub(↵
|
4 | this.getSize().getWidth());↵ | | 4 | getSize().getHeight());↵
|
|
5 | drawingOrigin = new cPoint(↵ | | 5 | drawingOrigin = new cPoint(↵
|
6 | drawingOrigin.getX().add(objectPosition), ↵ | | 6 | drawingOrigin.getX(), objectPosition↵
|
7 | drawingOrigin↵ | | 7 | .add(drawingOrigin↵
|
8 | .getY());↵ | | 8 | .getY()));↵
|
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) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
28 | if ((orientation == SOUTHEAST) || (orientation == EAST) || (orientation == NORTHEAST)) | | 36 | if ((orientation == SOUTHWEST) || (orientation == SOUTH) || (orientation == SOUTHEAST)) |
29 | cUnit objectPosition = parentSize.getWidth().sub(this.getSize().getWidth()); | | 37 | cUnit objectPosition = parentSize.getHeight().sub(getSize().getHeight()); |
30 | drawingOrigin = new cPoint(drawingOrigin.getX().add(objectPosition), drawingOrigin.getY()); | | | |
| | | 38 | drawingOrigin = new cPoint(drawingOrigin.getX(), objectPosition.add(drawingOrigin.getY())); |
Precondition Violations (0)
Row |
Violation |