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: 5 | Number of AST nodes: 5 | |||
1 | int btnHeight = comp[i].getPreferredSize().height;↵ | 1 | int btnWidth = comp[i].getPreferredSize().width;↵ | |
2 | if(btnHeight + y > height)↵ | 2 | if(btnWidth + x > width)↵ | |
3 | {↵ | 3 | {↵ | |
4 | returnValue.width += colWidth;↵ | 4 | returnValue.height += rowHeight;↵ | |
5 | y = insets.top;↵ | 5 | x = insets.left;↵ | |
6 | }↵ | 6 | }↵ | |
7 | y += btnHeight; | 7 | x += btnWidth; | |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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) | 4.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23 | int btnHeight = comp[i].getPreferredSize().height; |
| 12 | int btnWidth = comp[i].getPreferredSize().width; | ||||||||||||||||
24 | if (btnHeight + y > height) |
| 13 | if (btnWidth + x > width) | ||||||||||||||||
25 | returnValue.width += colWidth; |
| 14 | returnValue.height += rowHeight; | ||||||||||||||||
26 | y = insets.top; |
| 15 | x = insets.left; | ||||||||||||||||
27 | y += btnHeight; |
| 16 | x += btnWidth; |
Row | Violation |
---|---|
1 | Expression returnValue.width is a field being modified, and thus it cannot be parameterized |
2 | Expression returnValue.height is a field being modified, and thus it cannot be parameterized |