URI uri = null;
try {
uri = new URI("columba://org.columba.calendar/" + folderId + "/"
+ contactId);
} catch (URISyntaxException e) {
e.printStackTrace();
}
return uri;
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/calendar/src/main/java/org/columba/calendar/ui/tagging/TagCalendarMenu.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/contact/search/SearchResultBuilder.java
|
Method name: URI createURI(String, Object)
|
|
Method name: URI createURI(String, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | URI uri = null;↵ | | 1 | URI uri=null;↵
|
2 | try {↵ | | 2 | try {↵
|
3 | uri = new URI("columba://org.columba.calendar/" + folderId + "/"↵ | | 3 | uri = new URI("columba://org.columba.c↵
|
4 | + contactId);↵ | | 4 | ontact/"+folderId+"/"+contactId);↵
|
5 | } catch (URISyntaxException e) {↵ | | 5 | } catch (URISyntaxException e) {↵
|
6 | e.printStackTrace();↵ | | 6 | e.printStackTrace();↵
|
7 | }↵ | | 7 | }↵
|
8 | return uri; | | 8 | return uri;
|
See real code fragment |
|
See real code fragment |
Summary
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 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | URI uri = null; | | 1 | URI uri = null; |
2 | try | | 2 | try |
3 | uri = new URI("columba://org.columba.calendar/" + folderId + "/" + contactId); | | 3 | uri = new URI("columba://org.columba.contact/" + folderId + "/" + contactId); |
4 | return uri; | | 4 | return uri; |
Precondition Violations (1)
Row |
Violation |
1 | Type java.lang.Object of variable contactId does not match with type java.lang.String of variable contactId |