File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/BinaryResourceImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/BinaryResourceImpl.java | |||
Method name: int allocateEClassID()
|
Method name: int allocateEClassID()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for (int i = 0, length = eClassData.length; i < length; ++i)↵ | 1 | for (int i = 0, length = eClassData.length; i < length; ++i)↵ | |
2 | {↵ | 2 | {↵ | |
3 | EClassData eClassData = this.eClassData[i];↵ | 3 | EClassData eClassData = this.eClassData[i];↵ | |
4 | if (eClassData == null)↵ | 4 | if (eClassData == null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | return i;↵ | 6 | return i;↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | return -1; | 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.3 |
Clones location | Clones are in the same java file |
Number of node comparisons | 9 |
Number of mapped statements | 4 |
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) | 0.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (int i = 0, length = eClassData.length; i < length; ++i) |
| 1 | for (int i = 0, length = eClassData.length; i < length; ++i) | |||||||||||
|
| 2 | EClassData eClassData = this.eClassData[i]; | ||||||||||||
2 | EClassData eClassData = this.eClassData[i]; |
| | ||||||||||||
3 | if (eClassData == null) |
| 3 | if (eClassData == null) | |||||||||||
4 | return i; | 4 | return i; | ||||||||||||
5 | return -1; | 5 | return -1; |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectInputStream.EClassData[] of variable eClassData does not match with type org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectOutputStream.EClassData[] of variable eClassData |
2 | Unmatched statement EClassData eClassData=this.eClassData[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement EClassData eClassData=this.eClassData[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectInputStream.EClassData of variable eClassData does not match with type org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectOutputStream.EClassData of variable eClassData |