File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEMap.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/URIMappingRegistryImpl.java | |||
Method name: Map
|
Method name: Map
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (view == null)↵ | 1 | if (view == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | view = new View<K, V>();↵ | 3 | view = new View<URI, URI>();↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (view.map == null)↵ | 5 | if (view.map == null)↵ | |
6 | {↵ | 6 | {↵ | |
7 | view.map = new DelegatingMap();↵ | 7 | view.map = new URIMapImpl();↵ | |
8 | }↵ | 8 | }↵ | |
9 | return view.map; | 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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (view == null) |
| 1 | if (view == null) | |||||||||||||||
|
| 2 | view = new View<URI, URI>(); | ||||||||||||||||
2 | view = new View<K, V>(); |
| | ||||||||||||||||
3 | if (view.map == null) |
| 3 | if (view.map == null) | |||||||||||||||
| 4 | view.map = new URIMapImpl(); | |||||||||||||||||
4 | view.map = new DelegatingMap(); | | |||||||||||||||||
|
| 5 | return view.map; | ||||||||||||||||
5 | return view.map; |
| |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.common.util.BasicEMap.View<K,V> of variable view does not match with type org.eclipse.emf.common.util.BasicEMap.View<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> of variable view |
2 | Unmatched statement view=new View<URI,URI>(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement view=new View<K,V>(); 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.common.util.BasicEMap.View<K,V> of variable view does not match with type org.eclipse.emf.common.util.BasicEMap.View<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> of variable view |
5 | Type java.util.Map<K,V> of variable view.map does not match with type java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> of variable view.map |
6 | Unmatched return view.map; |
7 | Unmatched return view.map; |