File path: /columba-1.4-src/contact-facade/src/main/java/org/columba/addressbook/facade/HeaderItem.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/search/SearchResultBuilder.java | |||
Method name: Object clone()
|
Method name: URI createURI(String, String)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | IHeaderItem item = null;↵ | |||
2 | try {↵ | |||
3 | item = (IHeaderItem)super.clone();↵ | |||
4 | } catch (CloneNotSupportedException e) {↵ | |||
5 | // This should never happen since superclass is Object↵ | 1 | URI uri=null;↵ | |
2 | try {↵ | |||
3 | uri = new URI("columba://org.columba.calendar/"+folderId+"/"+activityId);↵ | |||
4 | } catch (URISyntaxException e) {↵ | |||
6 | e.printStackTrace();↵ | 5 | e.printStackTrace();↵ | |
7 | }↵ | 6 | }↵ | |
8 | return item; | 7 | 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.2 |
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.calendar/" + folderId + "/" + activityId); | |||||||||||||||||
3 | item = (IHeaderItem)super.clone(); |
| | |||||||||||||||||
|
| 4 | return uri; | |||||||||||||||||
4 | return item; |
| |
Row | Violation |
---|---|
1 | Unmatched statement uri=new URI("columba://org.columba.calendar/" + folderId + "/"+ activityId); 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; |