File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EReferenceItemProvider.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EAttributeItemProvider.java | |||
Method name: String getText(Object)
|
Method name: String getText(Object)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | EReference eReference = (EReference)object;↵ | 1 | EAttribute eAttribute = (EAttribute)object;↵ | |
2 | StringBuffer result = new StringBuffer();↵ | 2 | StringBuffer result = new StringBuffer();↵ | |
3 | result.append(eReference.getName());↵ | 3 | result.append(eAttribute.getName());↵ | |
4 | if (eReference.getEGenericType() != null)↵ | 4 | if (eAttribute.getEGenericType() != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | result.append(" : ");↵ | 6 | result.append(" : ");↵ | |
7 | result.append(EGenericTypeItemProvider.getText(eReference.getEGenericType()));↵ | 7 | result.append(EGenericTypeItemProvider.getText(eAttribute.getEGenericType()));↵ | |
8 | }↵ | 8 | }↵ | |
9 | return result.toString(); | 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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 17 |
Number of mapped statements | 6 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | EAttribute eAttribute = (EAttribute)object; | ||||||||||||||||
1 | EReference eReference = (EReference)object; | | ||||||||||||||||
2 | StringBuffer result = new StringBuffer(); | 2 | StringBuffer result = new StringBuffer(); | |||||||||||||||
3 | result.append(eReference.getName()); |
| 3 | result.append(eAttribute.getName()); | ||||||||||||||
4 | if (eReference.getEGenericType() != null) |
| 4 | if (eAttribute.getEGenericType() != null) | ||||||||||||||
5 | result.append(" : "); | 5 | result.append(" : "); | |||||||||||||||
6 | result.append(EGenericTypeItemProvider.getText(eReference.getEGenericType())); |
| 6 | result.append(EGenericTypeItemProvider.getText(eAttribute.getEGenericType())); | ||||||||||||||
7 | return result.toString(); | 7 | return result.toString(); |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EReference of variable eReference does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute |
2 | Type org.eclipse.emf.ecore.EReference of variable eReference does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute |
3 | Type org.eclipse.emf.ecore.EReference of variable eReference does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute |