try { openDatabase(); } catch (DatabaseException e) { LOG.severe(e.getMessage()); throw new RuntimeException(e); } return new BerkeleyDBIterator( (StoredIterator)new StoredValueSet(db,headerBinding, false).iterator());
try { load(); } catch (IOException e) { LOG.severe(e.getLocalizedMessage()); throw new RuntimeException("Mailbox is corrupted!"); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/headercache/BerkeleyDBHeaderList.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/mbox/MboxDataStorage.java
Method name: ICloseableIterator headerIterator() Method name: void MboxDataStorage(AbstractMessageFolder)
Number of AST nodes: 3 Number of AST nodes: 2
1
try {
1
try {
2
			openDatabase();
2
				load();
3
		} catch (DatabaseException e) {
3
			} catch (IOException e) {
4
			LOG.severe(e.getMessage());
4
				LOG.severe(e.getLocalizedMessage());
5
			
5
					
6
throw new RuntimeException(e);
6
				throw new RuntimeException(
7
		}
8
		return new BerkeleyDBIterator( (StoredIterator)new StoredValueSet(db,headerBinding, false).iterator());
7
"Mailbox is corrupted!");
8
			}
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.6
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 fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)12.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    8
    try
    Differences
    Expression1Expression2Difference
    com.sleepycat.je.DatabaseExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    com.sleepycat.je.DatabaseExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    getMessagegetLocalizedMessageMETHOD_INVOCATION_NAME_MISMATCH
    com.sleepycat.je.DatabaseExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    e"Mailbox is corrupted!"AST_TYPE_MISMATCH
    Preondition Violations
    Expression e.getMessage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression e.getLocalizedMessage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression e cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    try
    2
    openDatabase();
    2
    openDatabase();
    9
    load();
    Differences
    Expression1Expression2Difference
    openDatabaseloadMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression openDatabase() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method openDatabase
    Expression load() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression openDatabase() is a void method call, and thus it cannot be parameterized
    Expression load() is a void method call, and thus it cannot be parameterized
    9
    load();
    3
    return new BerkeleyDBIterator((StoredIterator)new StoredValueSet(db, headerBinding, false).iterator());
                                                                                                                                                                                                                    
    Precondition Violations (8)
    Row Violation
    1Expression e.getMessage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression e.getLocalizedMessage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression e cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression openDatabase() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression load() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression openDatabase() is a void method call, and thus it cannot be parameterized
    7Expression load() is a void method call, and thus it cannot be parameterized
    8The refactoring of the clones is infeasible, because classes org.columba.mail.folder.headercache.BerkeleyDBHeaderList and org.columba.mail.folder.mbox.MboxDataStorage do not have a common superclass