try { return feature instanceof EAttribute ? feature.isMany() ? !((List<?>)eObject.eGet(feature)).isEmpty() : eObject.eIsSet(feature) : eObject.eGet(feature) != null; } catch (Throwable exception) { return false; }
try { return Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri, options))); } catch (Exception exception) { return false; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemPropertyDescriptor.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/EFSURIHandlerImpl.java
Method name: boolean isPropertySet(Object) Method name: boolean exists(URI, Map)
Number of AST nodes: 2 Number of AST nodes: 2
1
try
1
try
2
      {
2
    
3
  
3
{
4
      return 
4
      return 
5
          feature instanceof EAttribute ? 
6
            feature.isMany() ?
7
              !((List<?>)eObject.eGet(feature)).isEmpty() : 
8
              eObject.eIsSet(feature) : 
9
            eObject.eGet(feature) != null;
10
      }
11
  
5
Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri, options)));
6
    }
12
    catch (Throwable exception)
7
    catch (Exception exception)
13
      {
8
    {
14
        return false;
9
      return false;
15
      }
10
    }
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 different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    try
    7
    try
    1
    try
    Differences
    Expression1Expression2Difference
    java.lang.Throwablejava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.Throwablejava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    1
    try
                                                                                                                                                                            
    2
    return Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri, options)));
    Preondition Violations
    Unmatched statement return Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri,options))); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    Unmatched return Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri,options)));
    2
    return Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri, options)));
    8
    return feature instanceof EAttribute ? feature.isMany() ? !((List<?>)eObject.eGet(feature)).isEmpty() : eObject.eIsSet(feature) : eObject.eGet(feature) != null;
    8
    return feature instanceof EAttribute ? feature.isMany() ? !((List<?>)eObject.eGet(feature)).isEmpty() : eObject.eIsSet(feature) : eObject.eGet(feature) != null;
    Preondition Violations
    Unmatched statement return feature instanceof EAttribute ? feature.isMany() ? !((List<?>)eObject.eGet(feature)).isEmpty() : eObject.eIsSet(feature) : eObject.eGet(feature) != null; cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    Unmatched return feature instanceof EAttribute ? feature.isMany() ? !((List<?>)eObject.eGet(feature)).isEmpty() : eObject.eIsSet(feature) : eObject.eGet(feature) != null;
                                                                                                                                                                                                                                                                                                                                          
    Precondition Violations (4)
    Row Violation
    1Unmatched statement return Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri,options))); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched return Boolean.TRUE.equals(FILE_INFO_EXISTS_METHOD.invoke(getInfo(uri,options)));
    3Unmatched statement return feature instanceof EAttribute ? feature.isMany() ? !((List<?>)eObject.eGet(feature)).isEmpty() : eObject.eIsSet(feature) : eObject.eGet(feature) != null; cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    4Unmatched return feature instanceof EAttribute ? feature.isMany() ? !((List<?>)eObject.eGet(feature)).isEmpty() : eObject.eIsSet(feature) : eObject.eGet(feature) != null;