File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ENamedElementImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ENamedElementImpl.java | |||
Method name: EList
|
Method name: EList
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (eCrossReferences == null)↵ | 1 | if (eContents == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | EStructuralFeature [] eStructuralFeatures = ↵ | 3 | EStructuralFeature [] eStructuralFeatures = ↵ | |
4 | ((EClassImpl.FeatureSubsetSupplier)eClass().getEAllStructuralFeatures()).crossReferences();↵ | 4 | ((EClassImpl.FeatureSubsetSupplier)eClass().getEAllStructuralFeatures()).c↵ | |
5 | eCrossReference↵ | 5 | ontainments();↵ | |
6 | ↵ | |||
6 | s =↵ | 7 | eContents = ↵ | |
7 | eStructuralFeatures == null ?↵ | 8 | eStructuralFeatures == null ?↵ | |
8 | ECrossReferenceEList.<EObject>emptyCrossReferenceEList() :↵ | 9 | EContentsEList.<EObject>emptyContentsEList() :↵ | |
9 | new ECrossReferenceEList<EObject>(this, eStructuralFeatures)↵ | 10 | new EContentsEList<EObject>(this, eStructuralFeatures)↵ | |
10 | {↵ | 11 | {↵ | |
11 | @Override↵ | 12 | @Override↵ | |
12 | protected boolean useIsSet()↵ | 13 | protected boolean useIsSet()↵ | |
13 | {↵ | 14 | {↵ | |
14 | return false;↵ | 15 | return false;↵ | |
15 | }↵ | 16 | }↵ | |
16 | @Override↵ | 17 | @Override↵ | |
17 | protected ListIterator<EObject> newResolvingListIterator()↵ | 18 | protected ListIterator<EObject> newResolvingListIterator()↵ | |
18 | {↵ | 19 | {↵ | |
19 | return ↵ | 20 | return ↵ | |
20 | new ResolvingFeatureIteratorImpl<EObject>(eObject, eStructuralFeatures)↵ | 21 | new ResolvingFeatureIteratorImpl<EObject>(eObject, eStructuralFeatures)↵ | |
21 | {↵ | 22 | {↵ | |
22 | @Override↵ | 23 | @Override↵ | |
23 | protected boolean useIsSet()↵ | 24 | protected boolean useIsSet()↵ | |
24 | {↵ | 25 | {↵ | |
25 | return false;↵ | 26 | return false;↵ | |
26 | }↵ | 27 | }↵ | |
27 | };↵ | 28 | };↵ | |
28 | }↵ | 29 | }↵ | |
29 | @Override↵ | 30 | @Override↵ | |
30 | protected ListIterator<EObject> newNonResolvingListIterator()↵ | 31 | protected ListIterator<EObject> newNonResolvingListIterator()↵ | |
31 | {↵ | 32 | {↵ | |
32 | return ↵ | 33 | return ↵ | |
33 | new FeatureIteratorImpl<EObject>(eObject, eStructuralFeatures)↵ | 34 | new FeatureIteratorImpl<EObject>(eObject, eStructuralFeatures)↵ | |
34 | {↵ | 35 | {↵ | |
35 | @Override↵ | 36 | @Override↵ | |
36 | protected boolean useIsSet()↵ | 37 | protected boolean useIsSet()↵ | |
37 | {↵ | 38 | {↵ | |
38 | return false;↵ | 39 | return false;↵ | |
39 | }↵ | 40 | }↵ | |
40 | };↵ | 41 | };↵ | |
41 | }↵ | 42 | }↵ | |
42 | };↵ | 43 | };↵ | |
43 | }↵ | 44 | }↵ | |
44 | return eCrossReferences; | 45 | return eContents; | |
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 declared in the same class |
Number of node comparisons | 10 |
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) | 2.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (eCrossReferences == null) |
| 1 | if (eContents == null) | |||||||||||||||||||||||||||
2 | EStructuralFeature[] eStructuralFeatures = ((EClassImpl.FeatureSubsetSupplier)eClass().getEAllStructuralFeatures()).crossReferences(); |
| 2 | EStructuralFeature[] eStructuralFeatures = ((EClassImpl.FeatureSubsetSupplier)eClass().getEAllStructuralFeatures()).containments(); | |||||||||||||||||||||||||||
3 | eCrossReferences = eStructuralFeatures == null ? ECrossReferenceEList.<EObject>emptyCrossReferenceEList() : new ECrossReferenceEList<EObject>(this, eStructuralFeatures) {...}; |
| 3 | eContents = eStructuralFeatures == null ? EContentsEList.<EObject>emptyContentsEList() : new EContentsEList<EObject>(this, eStructuralFeatures) {...}; | |||||||||||||||||||||||||||
4 | return eCrossReferences; |
| 4 | return eContents; |
Row | Violation |
---|---|
1 | Expression eCrossReferences is a field being modified, and thus it cannot be parameterized |
2 | Expression eContents is a field being modified, and thus it cannot be parameterized |
3 | Expression eCrossReferences cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression eContents cannot be parameterized, because it has dependencies to/from statements that will be extracted |