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: int getWrappedDimension(JComponent, int)
|
Method name: Dimension preferredLayoutSize(Container)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | int colWidth = Math.max(dim.width,closeBox.getPreferredSize().height);↵ | 1 | int colWidth = Math.max(dim.width,closeBox.getPreferredSize().height);↵ | |
2 | int y = colWidth * 2 + insets.top;↵ | 2 | int y = colWidth * 2 + insets.top;↵ | |
3 | Dimension returnValue = new Dimension(colWidth↵ | 3 | Dimension returnValue = new Dimension(colWidth↵ | |
4 | + insets.left + insets.right,0);↵ | 4 | + insets.left + insets.right,0);↵ | |
5 | for(int i = 2; i < comp.length; i++)↵ | 5 | for(int i = 2; i < comp.length; i++)↵ | |
6 | {↵ | 6 | {↵ | |
7 | int btnHeight = comp[i].getPreferredSize().height;↵ | 7 | int btnHeight = comp[i].getPreferredSize().height;↵ | |
8 | if(btnHeight + y > height)↵ | 8 | if(btnHeight + y > height)↵ | |
9 | {↵ | 9 | {↵ | |
10 | returnValue.width += colWidth;↵ | 10 | returnValue.width += colWidth;↵ | |
11 | y = insets.top;↵ | 11 | y = insets.top;↵ | |
12 | }↵ | 12 | }↵ | |
13 | y += btnHeight;↵ | 13 | y += btnHeight;↵ | |
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) | 1.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
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) | 2.2 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
19 | int colWidth = Math.max(dim.width, closeBox.getPreferredSize().height); | 19 | int colWidth = Math.max(dim.width, closeBox.getPreferredSize().height); | |
20 | int y = colWidth * 2 + insets.top; | 20 | int y = colWidth * 2 + insets.top; | |
21 | Dimension returnValue = new Dimension(colWidth + insets.left + insets.right, 0); | 21 | Dimension returnValue = new Dimension(colWidth + insets.left + insets.right, 0); | |
22 | for (int i = 2; i < comp.length; i++) | 22 | for (int i = 2; i < comp.length; i++) | |
23 | int btnHeight = comp[i].getPreferredSize().height; | 23 | int btnHeight = comp[i].getPreferredSize().height; | |
24 | if (btnHeight + y > height) | 24 | if (btnHeight + y > height) | |
25 | returnValue.width += colWidth; | 25 | returnValue.width += colWidth; | |
26 | y = insets.top; | 26 | y = insets.top; | |
27 | y += btnHeight; | 27 | y += btnHeight; |
Row | Violation |
---|