it = namespaces.getOtherUserIterator();
while (it.hasNext()) {
Namespace pN = (Namespace) it.next();
ListInfo[] list = store.list("", pN.getPrefix() + '%');
result.addAll(Arrays.asList(list));
}
it = namespaces.getSharedIterator();
while (it.hasNext()) {
Namespace pN = (Namespace) it.next();
ListInfo[] list = store.list("", pN.getPrefix() + '%');
result.addAll(Arrays.asList(list));
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/subscribe/SynchronizeFolderListCommand.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/subscribe/SynchronizeFolderListCommand.java
|
Method name: List fetchUnsubscribedFolders(String)
|
|
Method name: List fetchUnsubscribedFolders(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | it = namespaces.getOtherUserIterator();↵ | | 1 | it = namespaces.getSharedIterator();↵
|
2 | while (it.hasNext()) {↵ | | 2 | while (it.hasNext()) {↵
|
3 | Namespace pN = (Namespace) it.next();↵ | | 3 | Namespace pN = (Namespace) it.next();↵
|
|
4 | ListInfo[] list = store.list("", pN.getPrefix() + '%');↵ | | 4 | ListInfo[] list = store.list("", pN.getPrefix() + '%');↵
|
5 | result.addAll(Arrays.asList(list));↵ | | 5 | result.addAll(Arrays.asList(list));↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 27 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 37.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
15 | it = namespaces.getOtherUserIterator(); | | 21 | it = namespaces.getSharedIterator(); |
16 | while (it.hasNext()) | | 22 | while (it.hasNext()) |
17 | Namespace pN = (Namespace)it.next(); | | 23 | Namespace pN = (Namespace)it.next(); |
18 | ListInfo[] list = store.list("", pN.getPrefix() + '%'); | | 24 | ListInfo[] list = store.list("", pN.getPrefix() + '%'); |
19 | result.addAll(Arrays.asList(list)); | | 25 | result.addAll(Arrays.asList(list)); |
Precondition Violations (0)
Row |
Violation |