File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/DockableWindowManager.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/DockableWindowManager.java | |||
Method name: int[] adjustDockingAreasToFit(Dimension, int, int, int, int, int, int, int, int, Dimension, Dimension)
|
Method name: int[] adjustDockingAreasToFit(Dimension, int, int, int, int, int, int, int, int, Dimension, Dimension)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | int maxTopHeight = size.height - bottomHeight↵ | 1 | int maxBottomHeight = size.height - topHeight↵ | |
2 | - topButtonHeight - bottomButtonHeight↵ | 2 | - topButtonHeight - bottomButtonHeight↵ | |
3 | - _topToolbars.height - _bottomToolbars.height;↵ | 3 | - _topToolbars.height - _bottomToolbars.height;↵ | |
4 | topHeight = Math.min(Math.max(0,maxTopHeight),↵ | 4 | bottomHeight = Math.min(Math.max(0,maxBottomHeight),↵ | |
5 | topHeight);↵ | 5 | bottomHeight);↵ | |
6 | leftWidth = Math.min(Math.max(0,↵ | 6 | rightWidth = Math.min(Math.max(0,↵ | |
7 | size.width - leftButtonWidth↵ | 7 | size.width - leftButtonWidth↵ | |
8 | - rightButtonWidth - rightWidth),leftWidth); | 8 | - rightButtonWidth - leftWidth),rightWidth); | |
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int maxTopHeight = size.height - bottomHeight - topButtonHeight - bottomButtonHeight - _topToolbars.height - _bottomToolbars.height; |
| 4 | int maxBottomHeight = size.height - topHeight - topButtonHeight - bottomButtonHeight - _topToolbars.height - _bottomToolbars.height; | ||||||||||||||||
2 | topHeight = Math.min(Math.max(0, maxTopHeight), topHeight); |
| 5 | bottomHeight = Math.min(Math.max(0, maxBottomHeight), bottomHeight); | ||||||||||||||||
3 | leftWidth = Math.min(Math.max(0, size.width - leftButtonWidth - rightButtonWidth - rightWidth), leftWidth); |
| 6 | rightWidth = Math.min(Math.max(0, size.width - leftButtonWidth - rightButtonWidth - leftWidth), rightWidth); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables topHeight, leftWidth , while Clone fragment #2 returns variables bottomHeight, rightWidth |