try { mergeRAMtoIndex(); } catch (IOException e) { LOG.severe(e.getMessage()); }
while (!this.open) { try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/search/LuceneQueryEngine.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/base/Barrier.java
Method name: void save() Method name: void join()
Number of AST nodes: 2 Number of AST nodes: 3
1
try {
2
			mergeRAMtoIndex
1
while (!this.open) {
2
	    try {
3
();
3
		wait();
4
		} catch (IOException e) {
4
	    } catch (InterruptedException e) {
5
			LOG.severe(e.getMessage());
5
		e.printStackTrace();
6
	
6
	    }
7
	}
7
	}
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.4
Clones locationClones are in different classes
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)2.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    try
    Differences
    Expression1Expression2Difference
    java.io.IOExceptionjava.lang.InterruptedExceptionSUBCLASS_TYPE_MISMATCH
    java.io.IOExceptionjava.lang.InterruptedExceptionSUBCLASS_TYPE_MISMATCH
    severeprintStackTraceMETHOD_INVOCATION_NAME_MISMATCH
    LOGeVARIABLE_NAME_MISMATCH
    java.util.logging.Loggerjava.lang.InterruptedExceptionVARIABLE_TYPE_MISMATCH
    LOG.severe(e.getMessage())e.printStackTrace()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression LOG.severe(e.getMessage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression LOG.severe(e.getMessage()) is a void method call, and thus it cannot be parameterized
    Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    Expression e cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.util.logging.Logger of variable LOG does not match with type java.lang.InterruptedException of variable e
    • Make classes java.util.logging.Logger and java.lang.InterruptedException extend a common superclass
    Expression LOG.severe(e.getMessage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression LOG.severe(e.getMessage()) is a void method call, and thus it cannot be parameterized
    Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    2
    try
    2
    mergeRAMtoIndex();
    2
    mergeRAMtoIndex();
    3
    wait();
    Differences
    Expression1Expression2Difference
    mergeRAMtoIndexwaitMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression mergeRAMtoIndex() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression wait() is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression mergeRAMtoIndex() is a void method call, and thus it cannot be parameterized
    Expression wait() is a void method call, and thus it cannot be parameterized
    3
    wait();
    Precondition Violations (14)
    Row Violation
    1Expression LOG.severe(e.getMessage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression LOG.severe(e.getMessage()) is a void method call, and thus it cannot be parameterized
    4Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    5Expression e cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type java.util.logging.Logger of variable LOG does not match with type java.lang.InterruptedException of variable e
    7Expression LOG.severe(e.getMessage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression LOG.severe(e.getMessage()) is a void method call, and thus it cannot be parameterized
    10Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized
    11Expression mergeRAMtoIndex() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression wait() is a method call throwing exception(s) that should be caught by a try block that will be extracted
    13Expression mergeRAMtoIndex() is a void method call, and thus it cannot be parameterized
    14Expression wait() is a void method call, and thus it cannot be parameterized