String resourceName = getBaseURL().toString() + "plugin.properties"; try { InputStream inputStream = new URL(resourceName).openStream(); bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream); inputStream.close(); } catch (IOException ioException) { throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties"); }
String resourceName = getBaseURL().toString() + "plugin.properties"; try { InputStream inputStream = new URL(resourceName).openStream(); bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream); inputStream.close(); } catch (IOException ioException) { throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties"); }
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: String getString(String, boolean) Method name: String doGetString(String, boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
String resourceName = getBaseURL().toString() + "plugin.properties";
1
String resourceName = getBaseURL().toString() + "plugin.properties";
2
          try
2
        try
3
          {
3
        {
4
            InputStream inputStream =  new URL(resourceName).openStream();
4
          InputStream inputStream =  new URL(resourceName).openStream();
5
            bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);
5
          bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);
6
            inputStream.close();
6
          inputStream.close();
7
          }
7
        
8
  
8
}
9
        catch (IOException ioException)
9
        catch (IOException ioException)
10
          {
10
        
11
  
11
{
12
          throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties");
12
          throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties");
13
          }
13
        }
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.4
Clones locationClones are in different classes
Number of node comparisons19
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    String resourceName = getBaseURL().toString() + "plugin.properties";
    10
    String resourceName = getBaseURL().toString() + "plugin.properties";
    6
    try
    6
    try
    11
    try
    Differences
    Expression1Expression2Difference
    java.lang.Classjava.lang.ClassVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()
    • Make classes java.lang.Class and java.lang.Class extend a common superclass
    11
    try
    7
    InputStream inputStream = new URL(resourceName).openStream();
    12
    InputStream inputStream = new URL(resourceName).openStream();
    8
    bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);
    13
    bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);
    9
    inputStream.close();
    14
    inputStream.close();
    Precondition Violations (1)
    Row Violation
    1Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()