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;
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;
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: 4
|
|
Number of AST nodes: 7
|
|
1 | center = comp;↵ | | 1 | topButtons = comp;↵
|
2 | else if(TOP_TOOLBARS.equals(cons))↵ | | 2 | else if(LEFT_BUTTONS.equals(cons))↵
|
3 | topToolbars = comp;↵ | | 3 | leftButtons = comp;↵
|
4 | else if(BOTTOM_TOOLBARS.equals(cons))↵ | | 4 | else if(BOTTOM_BUTTONS.equals(cons))↵
|
5 | bottomToolbars = comp;↵ | | 5 | bottomButtons = comp;↵
|
6 | else if(TOP.equals(cons))↵ | | 6 | else if(RIGHT_BUTTONS.equals(cons))↵
|
7 | top = comp; | | 7 | rightButtons = 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 |
2 | center = comp; | | 16 | topButtons = comp; |
Precondition Violations (2)
Row |
Violation |
1 | Expression center is a field being modified, and thus it cannot be parameterized |
2 | Expression topButtons is a field being modified, and thus it cannot be parameterized |