File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/impl/Ecore2XMLPackageImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/ChangePackageImpl.java | |||
Method name: Ecore2XMLPackage init()
|
Method name: ChangePackage init()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (isInited) return (Ecore2XMLPackage)EPackage.Registry.INSTANCE.getEPackage(Ecore2XMLPackage.eNS_URI);↵ | 1 | if (isInited) return (ChangePackage)EPackage.Registry.INSTANCE.getEPackage(ChangePackage.eNS_URI);↵ | |
2 | ↵ | |||
2 | // Obtain or create and register package↵ | 3 | // Obtain or create and register package ↵ | |
3 | Ecore2XMLPackageImpl theEcore2XMLPackage = (Ecore2XMLPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Ecore2XMLPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new Ecore2XMLPackageImpl());↵ | 4 | ChangePackageImpl theChangePackage = (ChangePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ChangePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ChangePackageImpl());↵ | |
5 | ↵ | |||
4 | isInited = true;↵ | 6 | isInited = true;↵ | |
7 | ↵ | |||
5 | // Initialize simple dependencies↵ | 8 | // Initialize simple dependencies ↵ | |
6 | EcorePackage.eINSTANCE.eClass();↵ | 9 | EcorePackage.eINSTANCE.eClass();↵ | |
10 | ↵ | |||
7 | // Create package meta-data objects↵ | 11 | // Create package meta-data objects ↵ | |
8 | theEcore2XMLPackage.createPackageContents();↵ | 12 | theChangePackage.createPackageContents();↵ | |
13 | ↵ | |||
9 | // Initialize created meta-data↵ | 14 | // Initialize created meta-data ↵ | |
10 | theEcore2XMLPackage.initializePackageContents();↵ | 15 | theChangePackage.initializePackageContents();↵ | |
16 | ↵ | |||
11 | // Mark meta-data to indicate it can't be changed↵ | 17 | // Mark meta-data to indicate it can't be changed ↵ | |
12 | theEcore2XMLPackage.freeze();↵ | 18 | theChangePackage.freeze();↵ | |
19 | ↵ | |||
13 | return theEcore2XMLPackage; | 20 | return theChangePackage; | |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 29 |
Number of mapped statements | 8 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isInited) | 1 | if (isInited) | ||||||||||||||||||||||||||
|
| 2 | return (ChangePackage)EPackage.Registry.INSTANCE.getEPackage(ChangePackage.eNS_URI); | ||||||||||||||||||||||||||
2 | return (Ecore2XMLPackage)EPackage.Registry.INSTANCE.getEPackage(Ecore2XMLPackage.eNS_URI); |
| | ||||||||||||||||||||||||||
3 | Ecore2XMLPackageImpl theEcore2XMLPackage = (Ecore2XMLPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Ecore2XMLPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new Ecore2XMLPackageImpl()); |
| 3 | ChangePackageImpl theChangePackage = (ChangePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ChangePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ChangePackageImpl()); | |||||||||||||||||||||||||
4 | isInited = true; | 4 | isInited = true; | ||||||||||||||||||||||||||
5 | EcorePackage.eINSTANCE.eClass(); | 5 | EcorePackage.eINSTANCE.eClass(); | ||||||||||||||||||||||||||
6 | theEcore2XMLPackage.createPackageContents(); |
| 6 | theChangePackage.createPackageContents(); | |||||||||||||||||||||||||
7 | theEcore2XMLPackage.initializePackageContents(); |
| 7 | theChangePackage.initializePackageContents(); | |||||||||||||||||||||||||
8 | theEcore2XMLPackage.freeze(); |
| 8 | theChangePackage.freeze(); | |||||||||||||||||||||||||
9 | return theEcore2XMLPackage; |
| 9 | return theChangePackage; |
Row | Violation |
---|---|
1 | Unmatched return (ChangePackage)EPackage.Registry.INSTANCE.getEPackage(ChangePackage.eNS_URI); |
2 | Unmatched return (Ecore2XMLPackage)EPackage.Registry.INSTANCE.getEPackage(Ecore2XMLPackage.eNS_URI); |
3 | Expression theEcore2XMLPackage cannot be unified with expression theChangePackage , because common superclass org.eclipse.emf.ecore.impl.EPackageImpl does not declare member(s) public void createPackageContents() |
4 | Expression theEcore2XMLPackage cannot be unified with expression theChangePackage , because common superclass org.eclipse.emf.ecore.impl.EPackageImpl does not declare member(s) public void initializePackageContents() |