File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java | |||
Method name: boolean addAll(int, EStructuralFeature, Collection>)
|
Method name: boolean addAll(int, EStructuralFeature, Collection>)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (collection.size() == 0)↵ | 1 | if (collection.size() == 0)↵ | |
2 | {↵ | 2 | {↵ | |
3 | return false;↵ | 3 | return false;↵ | |
4 | }↵ | 4 | }↵ | |
5 | boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature);↵ | 5 | boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature);↵ | |
6 | @SuppressWarnings("unchecked") Collection<Entry> entryCollection = ↵ | 6 | @SuppressWarnings("unchecked") Collection<Entry> entryCollection = ↵ | |
7 | isFeatureMap ? ↵ | 7 | isFeatureMap ? ↵ | |
8 | (Collection<Entry>)collection : ↵ | 8 | (Collection<Entry>)collection : ↵ | |
9 | new BasicEList<Entry>(collection.size()); | 9 |
| |
See real code fragment | See real code fragment |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
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) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (collection.size() == 0) |
| 1 | if (collection.size() == 0) | |||||||||||||||
2 | return false; |
| 2 | return false; | |||||||||||||||
3 | boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); | 3 | boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); | ||||||||||||||||
4 | @SuppressWarnings("unchecked") Collection<Entry> entryCollection = isFeatureMap ? (Collection<Entry>)collection : new BasicEList<Entry>(collection.size()); |
| 4 | @SuppressWarnings("unchecked") Collection<Entry> entryCollection = isFeatureMap ? (Collection<Entry>)collection : new BasicEList<Entry>(collection.size()); |
Row | Violation |
---|---|
1 | Type java.util.Collection<> of variable collection does not match with type java.util.Collection<> of variable collection |
2 | Type java.util.Collection<> of variable collection does not match with type java.util.Collection<> of variable collection |
3 | Type java.util.Collection<> of variable collection does not match with type java.util.Collection<> of variable collection |
4 | Clone fragment #1 returns variables entryCollection, isFeatureMap , while Clone fragment #2 returns variables entryCollection, isFeatureMap |
5 | Conditional return false; |
6 | Conditional return false; |