File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ReflectiveItemProvider.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ContentHandlerImpl.java | |||
Method name: void gatherAllMetaData(EObject)
|
Method name: int describe(InputStream, IContentDescription)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | EPackage ePackage = extendedMetaData.getPackage(entry.getValue());↵ | 1 | QualifiedName qualifiedName = requestedPropertyToQualifiedNameMap.get(property.getKey());↵ | |
2 | if (ePackage != null)↵ | 2 | if (qualifiedName != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | gatherMetaData((EModelElement)EcoreUtil.getRootContainer(ePackage));↵ | 4 | description.setProperty(qualifiedName, getDescriptionValue(qualifiedName, property.getValue()));↵ | |
5 | } | 5 |
| |
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 | 6 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 283.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | EPackage ePackage = extendedMetaData.getPackage(entry.getValue()); |
| | |||||||||||||||||||||
|
| 15 | QualifiedName qualifiedName = requestedPropertyToQualifiedNameMap.get(property.getKey()); | |||||||||||||||||||||
9 | if (ePackage != null) |
| 16 | if (qualifiedName != null) | ||||||||||||||||||||
10 | gatherMetaData((EModelElement)EcoreUtil.getRootContainer(ePackage)); |
| 17 | description.setProperty(qualifiedName, getDescriptionValue(qualifiedName, property.getValue())); |
Row | Violation |
---|---|
1 | Unmatched statement EPackage ePackage=extendedMetaData.getPackage(entry.getValue()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement QualifiedName qualifiedName=requestedPropertyToQualifiedNameMap.get(property.getKey()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.eclipse.emf.ecore.EPackage of variable ePackage does not match with type org.eclipse.core.runtime.QualifiedName of variable qualifiedName |
4 | Expression gatherMetaData((EModelElement)EcoreUtil.getRootContainer(ePackage)) is a void method call, and thus it cannot be parameterized |
5 | Expression description.setProperty(qualifiedName,getDescriptionValue(qualifiedName,property.getValue())) is a void method call, and thus it cannot be parameterized |
6 | Expression gatherMetaData((EModelElement)EcoreUtil.getRootContainer(ePackage)) is a void method call, and thus it cannot be parameterized |
7 | Expression description.setProperty(qualifiedName,getDescriptionValue(qualifiedName,property.getValue())) is a void method call, and thus it cannot be parameterized |