EStructuralFeature.Setting setting = j.next(); EStructuralFeature eStructuralFeature = setting.getEStructuralFeature(); out.print(" "); out.print(eStructuralFeature.getName()); out.print("<-"); out.print(getIdentification(setting.getEObject())); if (j.hasNext()) { out.println(","); }
EStructuralFeature.Setting setting = j.next(); EStructuralFeature eStructuralFeature = setting.getEStructuralFeature(); result.append(eStructuralFeature.getName()); result.append("<-"); result.append(getIdentification(setting.getEObject())); if (j.hasNext()) { result.append(", "); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java
Method name: void print(PrintStream, Map>) Method name: String toString()
Number of AST nodes: 8 Number of AST nodes: 7
1
EStructuralFeature.Setting setting = j.next();
1
EStructuralFeature.Setting setting = j.next();
2
            EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
2
          EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
3
            out.print("   ");
3
          
4
            out.print(eStructuralFeature.getName());
4
result.append(eStructuralFeature.getName());
5
            out.print("<-");
5
          result.append("<-");
6
            out.print(getIdentification(setting.getEObject()));
6
          result.append(getIdentification(setting.getEObject()));
7
            if (j.hasNext())
7
          if (j.hasNext())
8
            {
8
          {
9
              out.println(",");
9
            result.append(", ");
10
            }
10
          }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons37
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment5
    Number of unmapped statements in the second code fragment4
    Time elapsed for statement mapping (ms)10.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    11
    EStructuralFeature.Setting setting = j.next();
    8
    EStructuralFeature.Setting setting = j.next();
    12
    EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
    9
    EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
                                                                                                    
    10
    result.append(eStructuralFeature.getName());
    Preondition Violations
    Unmatched statement result.append(eStructuralFeature.getName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    result.append(eStructuralFeature.getName());
                                                    
    11
    result.append("<-");
                                                                                                                          
    12
    result.append(getIdentification(setting.getEObject()));
    Preondition Violations
    Unmatched statement result.append(getIdentification(setting.getEObject())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12
    result.append(getIdentification(setting.getEObject()));
    13
    out.print("   ");
                                              
    14
    out.print(eStructuralFeature.getName());
    14
    out.print(eStructuralFeature.getName());
    Preondition Violations
    Unmatched statement out.print(eStructuralFeature.getName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                            
    15
    out.print("<-");
                                            
    16
    out.print(getIdentification(setting.getEObject()));
    16
    out.print(getIdentification(setting.getEObject()));
    Preondition Violations
    Unmatched statement out.print(getIdentification(setting.getEObject())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                  
    17
    if (j.hasNext())
    13
    if (j.hasNext())
                                                    
    14
    result.append(", ");
    18
    out.println(",");
                                              
    Precondition Violations (5)
    Row Violation
    1Unmatched statement result.append(eStructuralFeature.getName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement result.append(getIdentification(setting.getEObject())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement out.print(eStructuralFeature.getName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement out.print(getIdentification(setting.getEObject())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Clone fragment #1 returns variables eStructuralFeature, setting , while Clone fragment #2 returns variables eStructuralFeature, setting