try { InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { LOG.info(">" + line); //$NON-NLS-1$ buf.append(line + "\n"); //$NON-NLS-1$ } } catch (IOException ioe) { ioe.printStackTrace(); }
try { InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { LOG.fine(type + ">" + line); //$NON-NLS-1$ buf.append(line + "\n"); //$NON-NLS-1$ } } catch (IOException ioe) { ioe.printStackTrace(); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/base/IPCHelper.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/base/StreamThread.java
Method name: void run() Method name: void run()
Number of AST nodes: 7 Number of AST nodes: 7
1
try {
1
try {
2
		InputStreamReader isr = new InputStreamReader(is);
2
            InputStreamReader isr = new InputStreamReader(is);
3
		BufferedReader br = new BufferedReader(isr);
3
            BufferedReader br = new BufferedReader(isr);
4
		String line = null;
4
            String line = null;
5
		while ((line = br.readLine()) != null) {
5
            while ((line = br.readLine()) != null) {
6
		    LOG.info(">" + line); //$NON-NLS-1$
6
                LOG.fine(type + ">" + line); //$NON-NLS-1$
7
		    buf.append(line + "\n"); //$NON-NLS-1$
7
                buf.append(line + "\n"); //$NON-NLS-1$
8
		}
9
	
8
            }
10
    } catch (IOException ioe) {
9
        } catch (IOException ioe) {
11
		ioe.printStackTrace();
10
            ioe.printStackTrace();
12
	    }
11
        }
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    InputStreamReader isr = new InputStreamReader(is);
    2
    InputStreamReader isr = new InputStreamReader(is);
    3
    BufferedReader br = new BufferedReader(isr);
    3
    BufferedReader br = new BufferedReader(isr);
    4
    String line = null;
    4
    String line = null;
    5
    while ((line = br.readLine()) != null)
    5
    while ((line = br.readLine()) != null)
    6
    LOG.info(">" + line);
    6
    LOG.info(">" + line);
    6
    LOG.fine(type + ">" + line);
    Differences
    Expression1Expression2Difference
    infofineMETHOD_INVOCATION_NAME_MISMATCH
    ">"typeTYPE_COMPATIBLE_REPLACEMENT
    line">"TYPE_COMPATIBLE_REPLACEMENT
    ">" + linetype + ">" + lineINFIX_EXTENDED_OPERAND_NUMBER_MISMATCH
    Preondition Violations
    Expression LOG.info(">" + line) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression LOG.fine(type + ">" + line) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression LOG.info(">" + line) is a void method call, and thus it cannot be parameterized
    Expression LOG.fine(type + ">" + line) is a void method call, and thus it cannot be parameterized
    Expression line cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ">" + line cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression type + ">" + line cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    LOG.fine(type + ">" + line);
    7
    buf.append(line + "\n");
    7
    buf.append(line + "\n");
    Precondition Violations (7)
    Row Violation
    1Expression LOG.info(">" + line) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression LOG.fine(type + ">" + line) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression LOG.info(">" + line) is a void method call, and thus it cannot be parameterized
    4Expression LOG.fine(type + ">" + line) is a void method call, and thus it cannot be parameterized
    5Expression line cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression ">" + line cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression type + ">" + line cannot be parameterized, because it has dependencies to/from statements that will be extracted