if (!theFile.exists()) { throw new FileNotFoundException(path); }
if (!theFile.exists()) { throw runtime.newErrnoENOENTError("file not found - " + path); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/io/ChannelDescriptor.java File path: /jruby-1.4.0/src/org/jruby/util/io/ChannelStream.java
Method name: ChannelDescriptor open(String, String, ModeFlags, int, POSIX) Method name: void freopen(Ruby, String, ModeFlags)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (!theFile.exists()) {
1
if (!theFile.exists()) {
2
                    throw new FileNotFoundException(path);
2
                    throw runtime.newErrnoENOENTError("file not found - " + path);
3
                }
3
                }
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.3
Clones locationClones are in different classes
Number of node comparisons6
  1. {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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    28
    if (!theFile.exists())
    18
    if (!theFile.exists())
    29
    throw new FileNotFoundException(path);
    29
    throw new FileNotFoundException(path);
    19
    throw runtime.newErrnoENOENTError("file not found - " + path);
    Differences
    Expression1Expression2Difference
    new FileNotFoundException(path)runtime.newErrnoENOENTError("file not found - " + path)TYPE_COMPATIBLE_REPLACEMENT
    19
    throw runtime.newErrnoENOENTError("file not found - " + path);
    Precondition Violations (0)
    Row Violation