while (it.hasNext()) {
Namespace pN = (Namespace) it.next();
ListInfo[] list = store.list("", pN.getPrefix() + '%');
result.addAll(Arrays.asList(list));
}
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: 4
|
|
Number of AST nodes: 4
|
|
1 | while (it.hasNext()) {↵ | | 1 | while (it.hasNext()) {↵
|
2 | Namespace pN = (Namespace) it.next();↵ | | 2 | Namespace pN = (Namespace) it.next();↵
|
|
3 | ListInfo[] list = store.list("", pN.getPrefix() + '%');↵ | | 3 | ListInfo[] list = store.list("", pN.getPrefix() + '%');↵
|
4 | result.addAll(Arrays.asList(list));↵ | | 4 | result.addAll(Arrays.asList(list));↵
|
5 | } | | 5 | }
|
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 | 21 |
-
{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) | 37.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | while (it.hasNext()) | | 16 | while (it.hasNext()) |
11 | Namespace pN = (Namespace)it.next(); | | 17 | Namespace pN = (Namespace)it.next(); |
12 | ListInfo[] list = store.list("", pN.getPrefix() + '%'); | | 18 | ListInfo[] list = store.list("", pN.getPrefix() + '%'); |
13 | result.addAll(Arrays.asList(list)); | | 19 | result.addAll(Arrays.asList(list)); |
Precondition Violations (0)
Row |
Violation |