File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/PanelWindowContainer.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/PanelWindowContainer.java | |||
Method name: Dimension preferredLayoutSize(Container)
|
Method name: int getWrappedDimension(JComponent, int)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | int rowHeight = Math.max(dim.height,closeBox.getPreferredSize().width);↵ | 1 | int rowHeight = Math.max(dim.height,closeBox.getPreferredSize().width);↵ | |
2 | int x = rowHeight * 2 + insets.left;↵ | 2 | int x = rowHeight * 2 + insets.left;↵ | |
3 | Dimension returnValue = new Dimension(0,rowHeight↵ | 3 | Dimension returnValue = new Dimension(0,rowHeight↵ | |
4 | + insets.top + insets.bottom);↵ | 4 | + insets.top + insets.bottom);↵ | |
5 | for(int i = 2; i < comp.length; i++)↵ | 5 | for(int i = 2; i < comp.length; i++)↵ | |
6 | {↵ | 6 | {↵ | |
7 | int btnWidth = comp[i].getPreferredSize().width;↵ | 7 | int btnWidth = comp[i].getPreferredSize().width;↵ | |
8 | if(btnWidth + x > width)↵ | 8 | if(btnWidth + x > width)↵ | |
9 | {↵ | 9 | {↵ | |
10 | returnValue.height += rowHeight;↵ | 10 | returnValue.height += rowHeight;↵ | |
11 | x = insets.left;↵ | 11 | x = insets.left;↵ | |
12 | }↵ | 12 | }↵ | |
13 | x += btnWidth;↵ | 13 | x += btnWidth;↵ | |
14 | } | 14 |
| |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 24 |
Number of mapped statements | 9 |
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.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
8 | int rowHeight = Math.max(dim.height, closeBox.getPreferredSize().width); | 8 | int rowHeight = Math.max(dim.height, closeBox.getPreferredSize().width); | |
9 | int x = rowHeight * 2 + insets.left; | 9 | int x = rowHeight * 2 + insets.left; | |
10 | Dimension returnValue = new Dimension(0, rowHeight + insets.top + insets.bottom); | 10 | Dimension returnValue = new Dimension(0, rowHeight + insets.top + insets.bottom); | |
11 | for (int i = 2; i < comp.length; i++) | 11 | for (int i = 2; i < comp.length; i++) | |
12 | int btnWidth = comp[i].getPreferredSize().width; | 12 | int btnWidth = comp[i].getPreferredSize().width; | |
13 | if (btnWidth + x > width) | 13 | if (btnWidth + x > width) | |
14 | returnValue.height += rowHeight; | 14 | returnValue.height += rowHeight; | |
15 | x = insets.left; | 15 | x = insets.left; | |
16 | x += btnWidth; | 16 | x += btnWidth; |
Row | Violation |
---|