if (eGenericType != null) { if (i + 5 < end && instanceTypeName[i + 1] == 'u' && instanceTypeName[i + 2] == 'p' && instanceTypeName[i + 3] == 'e' && instanceTypeName[i + 4] == 'r' && Character.isWhitespace(Character.codePointAt(instanceTypeName, i + 5))) { EGenericType eLowerBound = handleInstanceTypeName (instanceTypeName, Character.offsetByCodePoints(instanceTypeName, 0, instanceTypeName.length, i + 4, 1), end, diagnostics); eGenericType.setELowerBound(eLowerBound); } else { report (diagnostics, "_UI_EClassifierInstanceTypeNameExpectingSuper_diagnostic", new Object [] { i }, i); } } else { eGenericType = handleInstanceTypeName(instanceTypeName, start, end, diagnostics); } break LOOP;
if (eGenericType != null) { if (i + 7 < end && instanceTypeName[i + 1] == 'x' && instanceTypeName[i + 2] == 't' && instanceTypeName[i + 3] == 'e' && instanceTypeName[i + 4] == 'n' && instanceTypeName[i + 5] == 'd' && instanceTypeName[i + 6] == 's' && Character.isWhitespace(Character.codePointAt(instanceTypeName, i + 7))) { EGenericType eUpperBound = handleInstanceTypeName (instanceTypeName, Character.offsetByCodePoints(instanceTypeName, 0, instanceTypeName.length, i + 6, 1), end, diagnostics); eGenericType.setEUpperBound(eUpperBound); } else { report (diagnostics, "_UI_EClassifierInstanceTypeNameExpectingExtends_diagnostic", new Object [] { i }, i); } } else { eGenericType = handleInstanceTypeName(instanceTypeName, start, end, diagnostics); } break LOOP;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java
Method name: EGenericType handleTypeArgument(char[], int, int, DiagnosticChain) Method name: EGenericType handleTypeArgument(char[], int, int, DiagnosticChain)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (eGenericType != null)
1
if (eGenericType != null)
2
            {
2
            {
3
              if (i + 5 < end &&
3
              if (i + 7 < end &&
4
                    instanceTypeName[i + 1] == 'u' &&
4
                    instanceTypeName[i + 1] == 'x' &&
5
                    instanceTypeName[i + 2] == 'p' &&
5
                    instanceTypeName[i + 2] == 't' &&
6
                    instanceTypeName[i + 3] == 'e' &&
6
                    instanceTypeName[i + 3] == 'e' &&
7
                    instanceTypeName[i + 4] == 'r
7
                    instanceTypeName[i + 4] == 'n' &&
8
                    instanceTypeName[i + 5] == 'd' &&
8
' &&
9
                    instanceTypeName[i + 6] == 's' &&
9
                    Character.isWhitespace(Character.codePointAt(instanceTypeName, i + 5)))
10
                    Character.isWhitespace(Character.codePointAt(instanceTypeName, i + 7)))
10
              {
11
              {
11
                EGenericType eLowerBound = 
12
                EGenericType eUpperBound = 
12
                  handleInstanceTypeName
13
                  handleInstanceTypeName
13
                    (instanceTypeName, Character.offsetByCodePoints(instanceTypeName, 0, instanceTypeName.length, i + 4, 1), end, diagnostics);
14
                    (instanceTypeName, Character.offsetByCodePoints(instanceTypeName, 0, instanceTypeName.length, i + 6, 1), end, diagnostics);
14
                eGenericType.setELowerBound(eLowerBound);
15
                eGenericType.setEUpperBound(eUpperBound);
15
              }
16
              }
16
              else
17
              else
17
              {
18
              {
18
                report
19
                report
19
                  (diagnostics, 
20
                  (diagnostics, 
20
                   "_UI_EClassifierInstanceTypeNameExpectingSuper_diagnostic", 
21
                   "_UI_EClassifierInstanceTypeNameExpectingExtends_diagnostic", 
21
                   new Object [] { i },
22
                   new Object [] { i }, 
22
                   i);
23
                   i);
23
              }
24
              }
24
            }
25
            }
25
            else
26
            else
26
            {
27
            {
27
              eGenericType = handleInstanceTypeName(instanceTypeName, start, end, diagnostics);
28
              eGenericType = handleInstanceTypeName(instanceTypeName, start, end, diagnostics);
28
            }
29
            }
29
            break LOOP;
30
            break LOOP;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)1.2
Clones locationClones are in the same method
Number of node comparisons1