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);
super(domain, LABEL, DESCRIPTION);
// Initialize all the fields from the command parameter.
//
this.owner = owner;
this.feature = feature;
this.value = value;
this.index = CommandParameter.NO_INDEX;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/ReplaceCommand.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/SetCommand.java
|
Method name: void ReplaceCommand(EditingDomain, EObject, EStructuralFeature, Object, Collection>)
|
|
Method name: void SetCommand(EditingDomain, EObject, EStructuralFeature, Object)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | super(domain, LABEL, DESCRIPTION);↵ | | 1 | super(domain, LABEL, DESCRIPTION);↵
|
|
2 | // Initialize all the fields from the command parameter.↵ | | 2 | // Initialize all the fields from the command parameter.↵
|
3 | //↵ | | 3 | //↵
|
4 | this.owner = owner;↵ | | 4 | this.owner = owner;↵
|
5 | this.feature = feature;↵ | | 5 | this.feature = feature;↵
|
6 | this.value = value;↵ | | 6 | this.value = value;↵
|
7 | this.collection = collection;↵ | | 7 | this.↵
|
|
8 | ownerList = getOwnerList(this.owner, feature); | | 8 | index = CommandParameter.NO_INDEX;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 15 |
-
{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 | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
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.value = value; |
| | | 5 | this.index = CommandParameter.NO_INDEX; |
5 | this.collection = collection; | | | |
6 | ownerList = getOwnerList(this.owner, feature); | | | |
Precondition Violations (0)
Row |
Violation |