File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EPackageRegistryImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EPackageRegistryImpl.java | |||
Method name: EPackage.Registry getRegistrySecurely(ClassLoader)
|
Method name: EPackage.Registry getRegistry(ClassLoader)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | EPackage.Registry result = secureClassLoaderToRegistryMap.get(classLoader);↵ | 1 | EPackage.Registry result = classLoaderToRegistryMap.get(classLoader);↵ | |
2 | if (result == null)↵ | 2 | if (result == null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | if (classLoader != null)↵ | 4 | if (classLoader != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | result = new EPackageRegistryImpl(getRegistrySecurely(PARENT_CLASS_LOADER_GETTER.getParent(classLoader)));↵ | 6 | result = new EPackageRegistryImpl(getRegistry(classLoader.getParent()));↵ | |
7 | secureClassLoaderToRegistryMap.put(classLoader, result);↵ | 7 | classLoaderToRegistryMap.put(classLoader, result);↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | return result; | 10 |
| |
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 declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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) | 2.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | EPackage.Registry result = secureClassLoaderToRegistryMap.get(classLoader); |
| 1 | EPackage.Registry result = classLoaderToRegistryMap.get(classLoader); | ||||||||||
2 | if (result == null) | 2 | if (result == null) | |||||||||||
3 | if (classLoader != null) | 3 | if (classLoader != null) | |||||||||||
|
| 4 | result = new EPackageRegistryImpl(getRegistry(classLoader.getParent())); | |||||||||||
4 | result = new EPackageRegistryImpl(getRegistrySecurely(PARENT_CLASS_LOADER_GETTER.getParent(classLoader))); |
| | |||||||||||
5 | secureClassLoaderToRegistryMap.put(classLoader, result); |
| 5 | classLoaderToRegistryMap.put(classLoader, result); | ||||||||||
6 | return result; | 6 | return result; |
Row | Violation |
---|---|
1 | Unmatched statement result=new EPackageRegistryImpl(getRegistry(classLoader.getParent())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement result=new EPackageRegistryImpl(getRegistrySecurely(PARENT_CLASS_LOADER_GETTER.getParent(classLoader))); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |