File path: /emf-2.4.1/src/org/eclipse/emf/exporter/ModelExporter.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java | |||
Method name: boolean saveExporter()
|
Method name: void processAttributeExtensions(EObject)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (genModelAnnotation != null)↵ | 1 | if (eObjectToExtensionMap != null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | GenAnnotation nestedGenAnnotation = genModelAnnotation.getGenAnnotation(GENANNOTATION_SOURCE_SELECTED_REFERENCES);↵ | 3 | AnyType anyType = eObjectToExtensionMap.get(object);↵ | |
4 | if (nestedGenAnnotation != null)↵ | 4 | if (anyType != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | changed |= genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation);↵ | 6 | saveAttributeFeatureMap(anyType, XMLTypePackage.eINSTANCE.getAnyType_AnyAttribute());↵ | |
7 | }↵ | 7 | ↵ | |
8 | ↵ | 8 | }↵ | |
9 | } | 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 |
Number of node comparisons | 8 |
Number of mapped statements | 2 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36 | if (genModelAnnotation != null) |
| 1 | if (eObjectToExtensionMap != null) | ||||||||||||||
| 2 | AnyType anyType = eObjectToExtensionMap.get(object); | ||||||||||||||||
37 | GenAnnotation nestedGenAnnotation = genModelAnnotation.getGenAnnotation(GENANNOTATION_SOURCE_SELECTED_REFERENCES); | | ||||||||||||||||
38 | if (nestedGenAnnotation != null) |
| 3 | if (anyType != null) | ||||||||||||||
| 4 | saveAttributeFeatureMap(anyType, XMLTypePackage.eINSTANCE.getAnyType_AnyAttribute()); | ||||||||||||||||
39 | changed |= genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation); | |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.codegen.ecore.genmodel.GenAnnotation of variable genModelAnnotation does not match with type java.util.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.xml.type.AnyType> of variable eObjectToExtensionMap |
2 | Type org.eclipse.emf.codegen.ecore.genmodel.GenAnnotation of variable nestedGenAnnotation does not match with type org.eclipse.emf.ecore.xml.type.AnyType of variable anyType |