if (resourceAttributes == null) { resourceAttributes = resource.getResourceAttributes(); } result.put(URIConverter.ATTRIBUTE_EXECUTABLE, resourceAttributes.isExecutable());
if (resourceAttributes == null) { resourceAttributes = resource.getResourceAttributes(); } result.put(URIConverter.ATTRIBUTE_ARCHIVE, resourceAttributes.isArchive());
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: Map attributes(String, Map) Method name: Map attributes(String, 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
          result.put(URIConverter.ATTRIBUTE_EXECUTABLE,  resourceAttributes.isExecutable());
5
          result.put(URIConverter.ATTRIBUTE_ARCHIVE,  resourceAttributes.isArchive());
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.2
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)16.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    16
    if (resourceAttributes == null)
    12
    if (resourceAttributes == null)
    17
    resourceAttributes = resource.getResourceAttributes();
    13
    resourceAttributes = resource.getResourceAttributes();
    18
    result.put(URIConverter.ATTRIBUTE_EXECUTABLE, resourceAttributes.isExecutable());
    18
    result.put(URIConverter.ATTRIBUTE_EXECUTABLE, resourceAttributes.isExecutable());
    14
    result.put(URIConverter.ATTRIBUTE_ARCHIVE, resourceAttributes.isArchive());
    Differences
    Expression1Expression2Difference
    ATTRIBUTE_EXECUTABLEATTRIBUTE_ARCHIVEVARIABLE_NAME_MISMATCH
    isExecutableisArchiveMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression resourceAttributes.isExecutable() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression resourceAttributes.isArchive() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    result.put(URIConverter.ATTRIBUTE_ARCHIVE, resourceAttributes.isArchive());
    Precondition Violations (2)
    Row Violation
    1Expression resourceAttributes.isExecutable() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression resourceAttributes.isArchive() cannot be parameterized, because it has dependencies to/from statements that will be extracted