if (DEBUG) { FileOutputStream fos = null; try { fos = new FileOutputStream(name + ".class"); fos.write(bytes); } catch (IOException ioe) { ioe.printStackTrace(); } finally { try {fos.close();} catch (Exception e) {} } }
if (DEBUG) { FileOutputStream fos = null; try { fos = new FileOutputStream(name + ".class"); fos.write(bytes); } catch (IOException ioe) { ioe.printStackTrace(); } finally { try {fos.close();} catch (Exception e) {} } }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/java/MiniJava.java File path: /jruby-1.4.0/src/org/jruby/java/MiniJava.java
Method name: Class defineOldStyleImplClass(Ruby, String, String[], Map>) Method name: Class defineImplClass(Ruby, String, String[], Map>)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (DEBUG) {
1
if (DEBUG) {
2
            FileOutputStream fos = null;
2
            FileOutputStream fos = null;
3
            try {
3
            try {
4
                fos = new FileOutputStream(name + ".class");
4
                fos = new FileOutputStream(name + ".class");
5
                fos.write(bytes);
5
                fos.write(bytes);
6
            } catch (IOException ioe) {
6
            } catch (IOException ioe) {
7
                ioe.printStackTrace();
7
                ioe.printStackTrace();
8
            } finally {
8
            } finally {
9
                try {fos.close();} catch (Exception e) {}
9
                try {fos.close();} catch (Exception e) {}
10
            }
10
            }
11
        }
11
        }
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 declared in the same class
Number of node comparisons13
  1. {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.2
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    140
    if (DEBUG)
    76
    if (DEBUG)
    141
    FileOutputStream fos = null;
    77
    FileOutputStream fos = null;
    142
    try
    78
    try
    143
    fos = new FileOutputStream(name + ".class");
    79
    fos = new FileOutputStream(name + ".class");
    144
    fos.write(bytes);
    80
    fos.write(bytes);
    Precondition Violations (0)
    Row Violation