try { return doGetImage(key); } catch (MalformedURLException exception) { throw new WrappedException(exception); } catch (IOException exception) { throw new MissingResourceException (CommonPlugin.INSTANCE.getString("_UI_StringResourceNotFound_exception", new Object [] { key }), getClass().getName(), key); }
try { return doGetImage(key); } catch (MalformedURLException exception) { throw new WrappedException(exception); } catch (IOException exception) { throw new MissingResourceException (CommonPlugin.INSTANCE.getString("_UI_StringResourceNotFound_exception", new Object [] { key }), getClass().getName(), key); }
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/ui/EclipseUIPlugin.java
Method name: Object getImage(String) Method name: Object getImage(String)
Number of AST nodes: 2 Number of AST nodes: 2
1
try
1
try
2
      {
2
    
3
  
3
{
4
      return doGetImage(key);
4
      return doGetImage(key);
5
      }
5
    
6
  
6
}
7
    catch (MalformedURLException exception)
7
    catch (MalformedURLException exception)
8
      {
8
    
9
  
9
{
10
      throw new WrappedException(exception);
10
      throw new WrappedException(exception);
11
      }
11
    }
12
      catch (IOException exception)
12
    catch (IOException exception)
13
      {
13
    {
14
        throw 
14
      throw 
15
          new MissingResourceException
15
        new MissingResourceException
16
            (CommonPlugin.INSTANCE.getString("_UI_StringResourceNotFound_exception", new Object [] { key }),
16
          (CommonPlugin.INSTANCE.getString("_UI_StringResourceNotFound_exception", new Object [] { key }),
17
             getClass().getName(), 
17
           getClass().getName(), 
18
             key);
18
           key);
19
      }
19
    }
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.5
Clones locationClones are in different classes having the same super class
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    1
    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
    1
    try
    2
    return doGetImage(key);
    2
    return doGetImage(key);
    Precondition Violations (1)
    Row Violation
    1Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass()