File path: /emf-2.4.1/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java | File path: /emf-2.4.1/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java | |||
Method name: void analyzeType(JType)
|
Method name: void analyzeType(JType)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | String typeParameterNames = getModelAnnotationAttribute(methodAnnotation, "typeParameters");↵ | 1 | String typeParameterNames = getModelAnnotationAttribute(methodAnnotation, "typeParameters");↵ | |
2 | if (typeParameterNames != null)↵ | 2 | if (typeParameterNames != null)↵ | |
3 | {↵ | 3 | ↵ | |
4 | {↵ | |||
4 | for (StringTokenizer stringTokenizer = new StringTokenizer(typeParameterNames, " "); stringTokenizer.hasMoreTokens();)↵ | 5 | for (StringTokenizer stringTokenizer = new StringTokenizer(typeParameterNames, " "); stringTokenizer.hasMoreTokens();)↵ | |
5 | {↵ | 6 | ↵ | |
7 | {↵ | |||
6 | String typeParameterName = stringTokenizer.nextToken();↵ | 8 | String typeParameterName = stringTokenizer.nextToken();↵ | |
7 | ETypeParameter eTypeParameter = EcoreFactory.eINSTANCE.createETypeParameter();↵ | 9 | ETypeParameter eTypeParameter = EcoreFactory.eINSTANCE.createETypeParameter();↵ | |
8 | eTypeParameter.setName(typeParameterName);↵ | 10 | eTypeParameter.setName(typeParameterName);↵ | |
9 | String typeParameterModelAnnotation = getFilteredModelAnnotations(methodAnnotation, typeParameterName);↵ | 11 | String typeParameterModelAnnotation = getFilteredModelAnnotations(methodAnnotation, typeParameterName);↵ | |
10 | String bounds = getModelAnnotationAttribute(typeParameterModelAnnotation, "bounds");↵ | 12 | String bounds = getModelAnnotationAttribute(typeParameterModelAnnotation, "bounds");↵ | |
11 | if (bounds != null)↵ | 13 | if (bounds != null)↵ | |
12 | {↵ | 14 | ↵ | |
15 | {↵ | |||
13 | eTypeParameter.getEBounds().addAll(analyzeEGenericTypes(bounds));↵ | 16 | eTypeParameter.getEBounds().addAll(analyzeEGenericTypes(bounds));↵ | |
14 | for (EGenericType eBound : eTypeParameter.getEBounds())↵ | 17 | for (EGenericType eBound : eTypeParameter.getEBounds())↵ | |
15 | {↵ | 18 | {↵ | |
16 | ecoreEGenericTypeToJavaEGenericTypeMap.put(eBound, null);↵ | 19 | ecoreEGenericTypeToJavaEGenericTypeMap.put(eBound, null);↵ | |
17 | }↵ | 20 | ↵ | |
21 | }↵ | |||
18 | }↵ | 22 | }↵ | |
23 | ↵ | |||
19 | eDataType.getETypeParameters().add(eTypeParameter);↵ | 24 | eClass.getETypeParameters().add(eTypeParameter);↵ | |
20 | }↵ | 25 | ↵ | |
26 | }↵ | |||
21 | }↵ | 27 | }↵ | |
22 | eDataTypes.add(eDataType); | 28 | eClasses.add(eClass); | |
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.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 70 |
Number of mapped statements | 14 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 52.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
131 | String typeParameterNames = getModelAnnotationAttribute(methodAnnotation, "typeParameters"); | 155 | String typeParameterNames = getModelAnnotationAttribute(methodAnnotation, "typeParameters"); | ||||||||||||||||||||||
132 | if (typeParameterNames != null) | 156 | if (typeParameterNames != null) | ||||||||||||||||||||||
133 | for (StringTokenizer stringTokenizer = new StringTokenizer(typeParameterNames, " "); stringTokenizer.hasMoreTokens(); ) | 157 | for (StringTokenizer stringTokenizer = new StringTokenizer(typeParameterNames, " "); stringTokenizer.hasMoreTokens(); ) | ||||||||||||||||||||||
134 | String typeParameterName = stringTokenizer.nextToken(); | 158 | String typeParameterName = stringTokenizer.nextToken(); | ||||||||||||||||||||||
135 | ETypeParameter eTypeParameter = EcoreFactory.eINSTANCE.createETypeParameter(); | 159 | ETypeParameter eTypeParameter = EcoreFactory.eINSTANCE.createETypeParameter(); | ||||||||||||||||||||||
136 | eTypeParameter.setName(typeParameterName); | 160 | eTypeParameter.setName(typeParameterName); | ||||||||||||||||||||||
137 | String typeParameterModelAnnotation = getFilteredModelAnnotations(methodAnnotation, typeParameterName); | 161 | String typeParameterModelAnnotation = getFilteredModelAnnotations(methodAnnotation, typeParameterName); | ||||||||||||||||||||||
138 | String bounds = getModelAnnotationAttribute(typeParameterModelAnnotation, "bounds"); | 162 | String bounds = getModelAnnotationAttribute(typeParameterModelAnnotation, "bounds"); | ||||||||||||||||||||||
139 | if (bounds != null) | 163 | if (bounds != null) | ||||||||||||||||||||||
140 | eTypeParameter.getEBounds().addAll(analyzeEGenericTypes(bounds)); | 164 | eTypeParameter.getEBounds().addAll(analyzeEGenericTypes(bounds)); | ||||||||||||||||||||||
141 | for (EGenericType eBound : eTypeParameter.getEBounds()) | 165 | for (EGenericType eBound : eTypeParameter.getEBounds()) | ||||||||||||||||||||||
142 | ecoreEGenericTypeToJavaEGenericTypeMap.put(eBound, null); | 166 | ecoreEGenericTypeToJavaEGenericTypeMap.put(eBound, null); | ||||||||||||||||||||||
143 | eDataType.getETypeParameters().add(eTypeParameter); |
| 167 | eClass.getETypeParameters().add(eTypeParameter); | |||||||||||||||||||||
144 | eDataTypes.add(eDataType); |
| 168 | eClasses.add(eClass); |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EDataType of variable eDataType does not match with type org.eclipse.emf.ecore.EClass of variable eClass |
2 | Type org.eclipse.emf.ecore.EDataType of variable eDataType does not match with type org.eclipse.emf.ecore.EClass of variable eClass |
3 | Type java.util.List<org.eclipse.emf.ecore.EDataType> of variable eDataTypes does not match with type java.util.List<org.eclipse.emf.ecore.EClass> of variable eClasses |