if (!mappings.isEmpty() && contentOutlineViewer != null) { contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true); }
if (!mappings.isEmpty() && contentOutlineViewer != null) { contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java
Method name: void run() Method name: void selectionChanged(SelectionChangedEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (!mappings.isEmpty() && contentOutlineViewer != null)
1
if (!mappings.isEmpty() && contentOutlineViewer != null)
2
            {
2
            
3
   {
3
              contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true);
4
                 contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true);
4
            }
5
               }
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)1.2
Clones locationClones are in the same java file
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    23
    if (!mappings.isEmpty() && contentOutlineViewer != null)
    23
    if (!mappings.isEmpty() && contentOutlineViewer != null)
    36
    if (!mappings.isEmpty() && contentOutlineViewer != null)
    Differences
    Expression1Expression2Difference
    java.util.Collectionjava.util.Collection<>VARIABLE_TYPE_MISMATCH
    java.util.Collectionjava.util.Collection<>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Collection<org.eclipse.emf.mapping.Mapping> of variable mappings does not match with type java.util.Collection<> of variable mappings
    • Make classes java.util.Collection and java.util.Collection<> extend a common superclass
    Type java.util.Collection<org.eclipse.emf.mapping.Mapping> of variable mappings does not match with type java.util.Collection<> of variable mappings
    • Make classes java.util.Collection and java.util.Collection<> extend a common superclass
    36
    if (!mappings.isEmpty() && contentOutlineViewer != null)
    24
    contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true);
    24
    contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true);
    37
    contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true);
    Differences
    Expression1Expression2Difference
    java.util.Collectionjava.util.Collection<>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Collection<org.eclipse.emf.mapping.Mapping> of variable mappings does not match with type java.util.Collection<> of variable mappings
    • Make classes java.util.Collection and java.util.Collection<> extend a common superclass
    37
    contentOutlineViewer.setSelection(new StructuredSelection(mappings.toArray()), true);
    Precondition Violations (3)
    Row Violation
    1Type java.util.Collection<org.eclipse.emf.mapping.Mapping> of variable mappings does not match with type java.util.Collection<> of variable mappings
    2Type java.util.Collection<org.eclipse.emf.mapping.Mapping> of variable mappings does not match with type java.util.Collection<> of variable mappings
    3Type java.util.Collection<org.eclipse.emf.mapping.Mapping> of variable mappings does not match with type java.util.Collection<> of variable mappings