if (resourceAttributes == null) { resourceAttributes = resource.getResourceAttributes(); } resourceAttributes.setExecutable(executable);
if (resourceAttributes == null) { resourceAttributes = resource.getResourceAttributes(); } resourceAttributes.setArchive(archive);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/PlatformResourceURIHandlerImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/PlatformResourceURIHandlerImpl.java
Method name: void updateAttributes(String, Map, Map) Method name: void updateAttributes(String, Map, Map)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (resourceAttributes == null)
1
if (resourceAttributes == null)
2
            {
2
            {
3
              resourceAttributes = resource.getResourceAttributes();
3
              resourceAttributes = resource.getResourceAttributes();
4
            }
4
            }
5
            resourceAttributes.setExecutable(executable);
5
            resourceAttributes.setArchive(archive);
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 the same method
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    20
    if (resourceAttributes == null)
    15
    if (resourceAttributes == null)
    21
    resourceAttributes = resource.getResourceAttributes();
    16
    resourceAttributes = resource.getResourceAttributes();
    22
    resourceAttributes.setExecutable(executable);
    22
    resourceAttributes.setExecutable(executable);
    17
    resourceAttributes.setArchive(archive);
    Differences
    Expression1Expression2Difference
    setExecutablesetArchiveMETHOD_INVOCATION_NAME_MISMATCH
    executablearchiveVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression resourceAttributes.setExecutable(executable) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression resourceAttributes.setArchive(archive) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression resourceAttributes.setExecutable(executable) is a void method call, and thus it cannot be parameterized
    Expression resourceAttributes.setArchive(archive) is a void method call, and thus it cannot be parameterized
    17
    resourceAttributes.setArchive(archive);
    Precondition Violations (4)
    Row Violation
    1Expression resourceAttributes.setExecutable(executable) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression resourceAttributes.setArchive(archive) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression resourceAttributes.setExecutable(executable) is a void method call, and thus it cannot be parameterized
    4Expression resourceAttributes.setArchive(archive) is a void method call, and thus it cannot be parameterized