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 |
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 |
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) | 5.3 |
Clone type | Type 2 |
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())); |
Row | Violation |
---|---|
1 | Unmatched statement drawingOrigin=new cPoint(drawingOrigin.getX().add(objectPosition),drawingOrigin.getY()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement drawingOrigin=new cPoint(drawingOrigin.getX(),objectPosition.add(drawingOrigin.getY())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |