GenAnnotation nestedGenAnnotation = genModelAnnotation.getGenAnnotation(GENANNOTATION_SOURCE_SELECTED_REFERENCES); if (nestedGenAnnotation != null) { changed |= genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation); }
GenAnnotation nestedGenAnnotation = genAnnotation.getGenAnnotation(nestedGenAnnotationSource); if (nestedGenAnnotation != null) { return nestedGenAnnotation.getDetails(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/exporter/ModelExporter.java File path: /emf-2.4.1/src/org/eclipse/emf/exporter/ModelExporter.java
Method name: boolean saveExporter() Method name: EMap getExporterNestedGenAnnotationDetails(GenBase, String)
Number of AST nodes: 3 Number of AST nodes: 3
1
GenAnnotation nestedGenAnnotation = genModelAnnotation.getGenAnnotation(GENANNOTATION_SOURCE_SELECTED_REFERENCES);
1
GenAnnotation nestedGenAnnotation = genAnnotation.getGenAnnotation(nestedGenAnnotationSource);
2
        if (nestedGenAnnotation != null)
2
      if (nestedGenAnnotation != null)
3
        {
3
      {
4
          changed |= genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation);
4
        return nestedGenAnnotation.get
5
  
5
Details();
6
      }
6
      }
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.1
Clones locationClones are declared in the same class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    37
    GenAnnotation nestedGenAnnotation = genModelAnnotation.getGenAnnotation(GENANNOTATION_SOURCE_SELECTED_REFERENCES);
    37
    GenAnnotation nestedGenAnnotation = genModelAnnotation.getGenAnnotation(GENANNOTATION_SOURCE_SELECTED_REFERENCES);
    3
    GenAnnotation nestedGenAnnotation = genAnnotation.getGenAnnotation(nestedGenAnnotationSource);
    Differences
    Expression1Expression2Difference
    GENANNOTATION_SOURCE_SELECTED_REFERENCESnestedGenAnnotationSourceVARIABLE_NAME_MISMATCH
    genModelAnnotationgenAnnotationVARIABLE_NAME_MISMATCH
    3
    GenAnnotation nestedGenAnnotation = genAnnotation.getGenAnnotation(nestedGenAnnotationSource);
    38
    if (nestedGenAnnotation != null)
    4
    if (nestedGenAnnotation != null)
                                                                                          
    5
    return nestedGenAnnotation.getDetails();
    Preondition Violations
    Unmatched statement return nestedGenAnnotation.getDetails(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return nestedGenAnnotation.getDetails();
    5
    return nestedGenAnnotation.getDetails();
    39
    changed |= genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation);
    39
    changed |= genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation);
    Preondition Violations
    Unmatched statement changed|=genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                                                                    
    Precondition Violations (3)
    Row Violation
    1Unmatched statement return nestedGenAnnotation.getDetails(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return nestedGenAnnotation.getDetails();
    3Unmatched statement changed|=genModelAnnotation.getGenAnnotations().remove(nestedGenAnnotation); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted