IComponentInfo basicModel = null; try { basicModel = VCalendarModelFactory.unmarshall(document); } catch (SyntaxException e) { throw new StoreException(e); } catch (IllegalArgumentException e) { throw new StoreException(e); } return basicModel;
Document doc = null; try { doc = builder.build(file); } catch (JDOMException e) { throw new StoreException(e); } catch (IOException e) { throw new StoreException(e); } return doc;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/LocalCalendarStore.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/LocalXMLFileStore.java
Method name: IComponentInfo get(Object) Method name: Document load(Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
IComponentInfo basicModel = null;
2
		try {
3
			basicModel = VCalendarModelFactory.unmarshall(document
1
Document doc = null;
2
		try {
4
);
3
			doc = builder.build(file);
5
		} catch (SyntaxException e) {
4
		} catch (JDOMException e) {
6
			throw new StoreException(e);
5
			throw new StoreException(e);
7
		} catch (IllegalArgumentException e) {
6
		} catch (IOException e) {
8
			throw new StoreException(e);
7
			throw new StoreException(e);
9
		}
8
		}
10
		return basicModel;
9
		return doc;
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.5
Clones locationClones are in different classes
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)2.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                              
    6
    Document doc = null;
    6
    IComponentInfo basicModel = null;
                                                                        
    7
    try
    7
    try
    7
    try
    Differences
    Expression1Expression2Difference
    org.columba.calendar.parser.SyntaxExceptionorg.jdom.JDOMExceptionSUBCLASS_TYPE_MISMATCH
    org.columba.calendar.parser.SyntaxExceptionorg.jdom.JDOMExceptionSUBCLASS_TYPE_MISMATCH
    org.columba.calendar.parser.SyntaxExceptionorg.jdom.JDOMExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.IllegalArgumentExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.IllegalArgumentExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.IllegalArgumentExceptionjava.io.IOExceptionSUBCLASS_TYPE_MISMATCH
    7
    try
                                                          
    8
    doc = builder.build(file);
    Preondition Violations
    Unmatched statement doc=builder.build(file); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    8
    doc = builder.build(file);
    8
    basicModel = VCalendarModelFactory.unmarshall(document);
    8
    basicModel = VCalendarModelFactory.unmarshall(document);
    Preondition Violations
    Unmatched statement basicModel=VCalendarModelFactory.unmarshall(document); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                                                      
                                
    9
    return doc;
    Preondition Violations
    Unmatched return doc;
    9
    return doc;
    9
    return basicModel;
    9
    return basicModel;
    Preondition Violations
    Unmatched return basicModel;
                                              
    Precondition Violations (4)
    Row Violation
    1Unmatched statement doc=builder.build(file); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched statement basicModel=VCalendarModelFactory.unmarshall(document); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    3Unmatched return doc;
    4Unmatched return basicModel;