File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cHTMLPart.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cHTMLPart.java | |||
Method name: void printView(Graphics2D, View, Shape, double)
|
Method name: double calcBreakHeightFromView(View, Shape, double)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for (int i = 0; i < view.getViewCount(); i++) {↵ | 1 | for (int i = 0; i < view.getViewCount(); i++) {↵ | |
2 | childAllocation = view.getChildAllocation(i, allocation);↵ | 2 | childAllocation = view.getChildAllocation(i, allocation);↵ | |
3 | if (childAllocation != null) {↵ | 3 | if (childAllocation != null) {↵ | |
4 | childView = view.getView(i);↵ | 4 | childView = view.getView(i);↵ | |
5 | // handle child view by recursive call↵ | 5 | // ↵ | |
6 | print↵ | 6 | calculate break height for child, and use updated↵ | |
7 | // value in the further processing↵ | |||
7 | View(g, childView,↵ | 8 | breakHeight = calcBreakHeightFromView(childView,↵ | |
8 | childAllocation, maxHeight);↵ | 9 | childAllocation, breakHeight);↵ | |
9 | }↵ | 10 | }↵ | |
10 | } | 11 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 4 |
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) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
4 | for (int i = 0; i < view.getViewCount(); i++) | 5 | for (int i = 0; i < view.getViewCount(); i++) | ||||
5 | childAllocation = view.getChildAllocation(i, allocation); | 6 | childAllocation = view.getChildAllocation(i, allocation); | ||||
6 | if (childAllocation != null) | 7 | if (childAllocation != null) | ||||
7 | childView = view.getView(i); | 8 | childView = view.getView(i); | ||||
8 | printView(g, childView, childAllocation, maxHeight); |
| | ||||
|
| 9 | breakHeight = calcBreakHeightFromView(childView, childAllocation, breakHeight); |
Row | Violation |
---|---|
1 | Unmatched statement printView(g,childView,childAllocation,maxHeight); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement breakHeight=calcBreakHeightFromView(childView,childAllocation,breakHeight); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables childAllocation, childView , while Clone fragment #2 returns variables childAllocation, childView |