left = comp;
else if(BOTTOM.equals(cons))
bottom = comp;
else if(RIGHT.equals(cons))
right = comp;
else if(TOP_BUTTONS.equals(cons))
topButtons = comp;
else if(LEFT_BUTTONS.equals(cons))
leftButtons = comp;
else if(BOTTOM_BUTTONS.equals(cons))
bottomButtons = comp;
else if(RIGHT_BUTTONS.equals(cons))
rightButtons = comp;
center = comp;
else if(TOP_TOOLBARS.equals(cons))
topToolbars = comp;
else if(BOTTOM_TOOLBARS.equals(cons))
bottomToolbars = comp;
else if(TOP.equals(cons))
top = comp;
else if(LEFT.equals(cons))
left = comp;
else if(BOTTOM.equals(cons))
bottom = comp;
else if(RIGHT.equals(cons))
right = comp;
Clone fragments detected by clone detection tool
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: void addLayoutComponent(Component, Object)
|
|
Method name: void addLayoutComponent(Component, Object)
|
Number of AST nodes: 13
|
|
Number of AST nodes: 7
|
|
1 | left = comp;↵ | | 1 | center = comp;↵
|
2 | else if(BOTTOM.equals(cons))↵ | | 2 | else if(TOP_TOOLBARS.equals(cons))↵
|
3 | bottom = comp;↵ | | 3 | topToolbars = comp;↵
|
4 | else if(RIGHT.equals(cons))↵ | | 4 | else if(BOTTOM_TOOLBARS.equals(cons))↵
|
5 | right = comp;↵ | | 5 | bottomToolbars = comp;↵
|
6 | else if(TOP_BUTTONS.equals(cons))↵ | | 6 | else if(TOP.equals(cons))↵
|
7 | topButtons = comp;↵ | | 7 | top = comp;↵
|
8 | else if(LEFT_BUTTONS.equals(cons))↵ | | 8 | else if(LEFT.equals(cons))↵
|
9 | leftButtons = comp;↵ | | 9 | left = comp;↵
|
10 | else if(BOTTOM_BUTTONS.equals(cons))↵ | | 10 | else if(BOTTOM.equals(cons))↵
|
11 | bottomButtons = comp;↵ | | 11 | bottom = comp;↵
|
12 | else if(RIGHT_BUTTONS.equals(cons))↵ | | 12 | else if(RIGHT.equals(cons))↵
|
13 | rightButtons = comp; | | 13 | right = comp;
|
See real code fragment |
|
See real code fragment |
Summary
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 | 1 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
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 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | left = comp; | | 2 | center = comp; |
Precondition Violations (2)
Row |
Violation |
1 | Expression left is a field being modified, and thus it cannot be parameterized |
2 | Expression center is a field being modified, and thus it cannot be parameterized |