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
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same method
Number of node comparisons26
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)41.8
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    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