URL url = new URL(getBaseURL() + "icons/" + key + extensionFor(key)); InputStream inputStream = url.openStream(); inputStream.close(); return url;
URL url = new URL(getBaseURL() + "icons/" + key + extensionFor(key)); InputStream inputStream = url.openStream(); inputStream.close(); return url;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/EMFPlugin.java File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingResourceLocator.java
Method name: Object getImage(String) Method name: Object doGetImage(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
URL url = new URL(getBaseURL() + "icons/" + key + extensionFor(key));
1
URL url = new URL(getBaseURL() + "icons/" + key + extensionFor(key));
2
      InputStream inputStream = url.openStream(); 
2
    InputStream inputStream = url.openStream();
3
  
4
    inputStream.close();
3
    inputStream.close();
5
      return url;
4
    return url;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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.0
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    URL url = new URL(getBaseURL() + "icons/" + key + extensionFor(key));
    1
    URL url = new URL(getBaseURL() + "icons/" + key + extensionFor(key));
    2
    InputStream inputStream = url.openStream();
    2
    InputStream inputStream = url.openStream();
    3
    inputStream.close();
    3
    inputStream.close();
    4
    return url;
    4
    return url;
    Precondition Violations (0)
    Row Violation