IHeaderItem item = null; try { item = (IHeaderItem)super.clone(); } catch (CloneNotSupportedException e) { // This should never happen since superclass is Object e.printStackTrace(); } return item;
URI uri = null; try { uri = new URI("columba://org.columba.contact/" + folderId + "/" + contactId); } catch (URISyntaxException e) { e.printStackTrace(); } return uri;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact-facade/src/main/java/org/columba/addressbook/facade/HeaderItem.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/action/TagContactMenu.java
Method name: Object clone() Method name: URI createURI(String, Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
IHeaderItem item = null;
1
URI uri = null;
2
		try {
2
		try {
3
			item = (IHeaderItem)super.clone();
3
			
4
		} catch (CloneNotSupportedException e) {
5
			// This should never happen since superclass is Object
4
uri = new URI("columba://org.columba.contact/" + folderId + "/"
5
					+ contactId);
6
		} catch (URISyntaxException e) {
6
			e.printStackTrace();
7
			e.printStackTrace();
7
		}
8
		}
8
		return item;
9
		return uri;
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
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)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                    
    1
    URI uri = null;
    1
    IHeaderItem item = null;
                                                      
    2
    try
    2
    try
    2
    try
    Differences
    Expression1Expression2Difference
    java.lang.CloneNotSupportedExceptionjava.net.URISyntaxExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.CloneNotSupportedExceptionjava.net.URISyntaxExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.CloneNotSupportedExceptionjava.net.URISyntaxExceptionSUBCLASS_TYPE_MISMATCH
    2
    try
                                                                                                                                                              
    3
    uri = new URI("columba://org.columba.contact/" + folderId + "/" + contactId);
    3
    item = (IHeaderItem)super.clone();
    3
    item = (IHeaderItem)super.clone();
    Preondition Violations
    Unmatched statement item=(IHeaderItem)super.clone(); 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
                                                                          
                                
    4
    return uri;
    Preondition Violations
    Unmatched return uri;
    4
    return uri;
    4
    return item;
    4
    return item;
    Preondition Violations
    Unmatched return item;
                                  
    Precondition Violations (3)
    Row Violation
    1Unmatched statement item=(IHeaderItem)super.clone(); 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 return uri;
    3Unmatched return item;