File path: /columba-1.4-src/contact-facade/src/main/java/org/columba/addressbook/facade/HeaderItem.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/TagMessageCommand.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 | uri = new URI("columba://org.columba.mail/" + folderId + "/"↵ | |
4 | );↵ | 4 | + messageId); ↵ | |
5 | } catch (CloneNotSupportedException e) {↵ | 5 | } catch (↵ | |
6 | // This should never happen since superclass is Object↵ | 6 | URISyntaxException e) { ↵ | |
7 | e.printStackTrace();↵ | 7 | e.printStackTrace(); ↵ | |
8 | }↵ | 8 | } ↵ | |
9 | return item; | 9 | return uri; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | URI uri = null; | ||||||||||||||||||
1 | IHeaderItem item = null; | | ||||||||||||||||||
2 | try |
| 2 | try | ||||||||||||||||
|
| 3 | uri = new URI("columba://org.columba.mail/" + folderId + "/" + messageId); | |||||||||||||||||
3 | item = (IHeaderItem)super.clone(); |
| | |||||||||||||||||
|
| 4 | return uri; | |||||||||||||||||
4 | return item; |
| |
Row | Violation |
---|---|
1 | Unmatched statement uri=new URI("columba://org.columba.mail/" + folderId + "/"+ messageId); 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 |
2 | 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 |
3 | Unmatched return uri; |
4 | Unmatched return item; |
5 | The refactoring of the clones is infeasible, because classes org.columba.addressbook.facade.HeaderItem and org.columba.mail.folder.command.TagMessageCommand do not have a common superclass |