File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cHGroup.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cVGroup.java | |||
Method name: cSize getSize(cUnit)
|
Method name: cSize getSize(cUnit)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | act = ((cPrintObject) members.get(i)).getSize(width);↵ | 1 | act = ((cPrintObject) members.get(i)).getSize(width);↵ | |
2 | if (act.getHeight().getPoints() > maxHeight.getPoints()) {↵ | 2 | if (act.getWidth().getPoints() > maxWidth.getPoints()) {↵ | |
3 | maxHeight = act.getHeight();↵ | 3 | maxWidth = act.getWidth();↵ | |
4 | } | 4 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
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 | 6 |
Number of mapped statements | 3 |
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) | 7.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | act = ((cPrintObject)members.get(i)).getSize(width); |
| 5 | act = ((cPrintObject)members.get(i)).getSize(width); | |||||||||||||||
5 | if (act.getHeight().getPoints() > maxHeight.getPoints()) |
| 6 | if (act.getWidth().getPoints() > maxWidth.getPoints()) | |||||||||||||||
6 | maxHeight = act.getHeight(); |
| 7 | maxWidth = act.getWidth(); |
Row | Violation |
---|---|
1 | Expression act.getHeight() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression act.getWidth() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression act.getHeight() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression act.getWidth() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Clone fragment #1 returns variables maxHeight , while Clone fragment #2 returns variables act, maxWidth |