super(domain, LABEL, DESCRIPTION);
this.owner = owner;
this.feature = feature;
this.collection = collection;
this.index = index;
ownerList = getOwnerList(owner, feature);
super(domain, LABEL, DESCRIPTION);
// Initialize all the fields from the command parameter.
//
this.owner = owner;
this.feature = feature;
this.value = value;
this.collection = collection;
ownerList = getOwnerList(this.owner, feature);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/AddCommand.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/ReplaceCommand.java
|
Method name: void AddCommand(EditingDomain, EObject, EStructuralFeature, Collection>, int)
|
|
Method name: void ReplaceCommand(EditingDomain, EObject, EStructuralFeature, Object, Collection>)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | super(domain, LABEL, DESCRIPTION);↵ | | 1 | super(domain, LABEL, DESCRIPTION);↵
|
|
| | | 2 | // Initialize all the fields from the command parameter.↵
|
| | | 3 | //↵
|
2 | this.owner = owner;↵ | | 4 | this.owner = owner;↵
|
3 | this.feature = feature;↵ | | 5 | this.feature = feature;↵
|
4 | this.collection = collection;↵ | | 6 | this.↵
|
5 | this.index = index↵ | | 7 | value = value;↵
|
6 | ;↵ | | 8 | this.collection = collection;↵
|
|
7 | ownerList = getOwnerList(owner, feature); | | 9 | ownerList = getOwnerList(this.owner, feature);
|
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 having the same super class |
Number of node comparisons | 21 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super(domain, LABEL, DESCRIPTION); | | 1 | super(domain, LABEL, DESCRIPTION); |
2 | this.owner = owner; | | 2 | this.owner = owner; |
3 | this.feature = feature; | | 3 | this.feature = feature; |
| | | 4 | this.value = value; |
4 | this.collection = collection; | | | |
| | | 5 | this.collection = collection; |
5 | this.index = index; | | | |
6 | ownerList = getOwnerList(owner, feature); | | 6 | ownerList = getOwnerList(this.owner, feature); |
Precondition Violations (1)
Row |
Violation |
1 | Expression this.owner cannot be parameterized, because it has dependencies to/from statements that will be extracted |