if (isSameEditingDomainAdapterFactory) { return inputMetaObject; } else { return getCorrespondingType(inputMetaObject, mappingRoot.isTopToBottom() ? topToBottomTypeTable : bottomToTopTypeTable); }
if (exists) { return NOT_A_DIRECTORY; } else { return DIRECTORY_NOT_FOUND; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/domain/AdapterFactoryMappingDomain.java File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/Util.java
Method name: EObject getOutputMetaObject(EObject) Method name: int isValidPath(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (isSameEditingDomainAdapterFactory)
1
if (
2
exists)
2
    {
3
      {
3
      return inputMetaObject;
4
        return 
5
NOT_A_DIRECTORY;
4
    }
6
      }
5
    else
7
      else
6
    {
8
      {
7
      return getCorrespondingType(inputMetaObject, mappingRoot.isTopToBottom() ? topToBottomTypeTable : bottomToTopTypeTable);
9
        return 
10
DIRECTORY_NOT_FOUND;
8
    }
11
      }
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 in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (isSameEditingDomainAdapterFactory)
    1
    if (isSameEditingDomainAdapterFactory)
    11
    if (exists)
    Differences
    Expression1Expression2Difference
    isSameEditingDomainAdapterFactoryexistsVARIABLE_NAME_MISMATCH
    11
    if (exists)
    2
    return inputMetaObject;
    2
    return inputMetaObject;
    Preondition Violations
    Unmatched return inputMetaObject;
                                                        
    else
            
    3
    return getCorrespondingType(inputMetaObject, mappingRoot.isTopToBottom() ? topToBottomTypeTable : bottomToTopTypeTable);
    3
    return getCorrespondingType(inputMetaObject, mappingRoot.isTopToBottom() ? topToBottomTypeTable : bottomToTopTypeTable);
    Preondition Violations
    Unmatched return getCorrespondingType(inputMetaObject,mappingRoot.isTopToBottom() ? topToBottomTypeTable : bottomToTopTypeTable);
                                                                                                                                                                                                                                                        
                                                                  
    13
    return DIRECTORY_NOT_FOUND;
    Preondition Violations
    Unmatched return DIRECTORY_NOT_FOUND;
    13
    return DIRECTORY_NOT_FOUND;
                                                          
    12
    return NOT_A_DIRECTORY;
    Preondition Violations
    Unmatched return NOT_A_DIRECTORY;
    12
    return NOT_A_DIRECTORY;
    Precondition Violations (4)
    Row Violation
    1Unmatched return inputMetaObject;
    2Unmatched return getCorrespondingType(inputMetaObject,mappingRoot.isTopToBottom() ? topToBottomTypeTable : bottomToTopTypeTable);
    3Unmatched return DIRECTORY_NOT_FOUND;
    4Unmatched return NOT_A_DIRECTORY;