GridLayout layout = new GridLayout();
int spacing = 3;
layout.marginTop = -5;
layout.marginBottom = -5;
GridLayout layout = new GridLayout();
int spacing = 3;
layout.marginTop = -5;
layout.marginRight = -5;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/DiagnosticComposite.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/editor/ProblemEditorPart.java
|
Method name: void DiagnosticComposite(Composite, int)
|
|
Method name: void createPartControl(Composite)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | GridLayout layout = new GridLayout();↵ | | 1 | GridLayout layout = new GridLayout();↵
|
2 | int spacing = 3;↵ | | 2 | int spacing = 3;↵
|
3 | layout.marginTop = -5;↵ | | 3 | layout.marginTop = -5;↵
|
4 | layout.marginBottom = -5; | | 4 | layout.marginRight = -5;
|
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 different classes |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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 | GridLayout layout = new GridLayout(); | | 19 | GridLayout layout = new GridLayout(); |
3 | int spacing = 3; | | 20 | int spacing = 3; |
4 | layout.marginTop = -5; | | 21 | layout.marginTop = -5; |
5 | layout.marginBottom = -5; | | 22 | layout.marginRight = -5; |
Precondition Violations (3)
Row |
Violation |
1 | Expression layout.marginBottom cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression layout.marginRight cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables layout, spacing , while Clone fragment #2 returns variables layout, spacing |