it = namespaces.getSharedIterator(); while (it.hasNext()) { Namespace pN = (Namespace) it.next(); ListInfo[] list = store.list("", pN.getPrefix() + '%'); result.addAll(Arrays.asList(list)); }
List authMechanisms = AuthenticationFactory.getInstance() .getSupportedMechanisms(capas[i]); Iterator it = authMechanisms.iterator(); while (it.hasNext()) { supportedMechanisms.add(new Integer(AuthenticationManager .getSaslCode((String) it.next()))); } break;
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/smtp/SMTPServer.java
Method name: List fetchUnsubscribedFolders(String) Method name: List checkSupportedAuthenticationMethods()
Number of AST nodes: 5 Number of AST nodes: 5
1
it = namespaces.getSharedI
1
List authMechanisms = AuthenticationFactory.getInstance()
2
						.getSupportedMechanisms(capas[i]);
2
terator();
3
				Iterator it = authMechanisms.iterator();
3
			while (it.hasNext()) {
4
				while (it.hasNext()) {
4
				Namespace pN = (Namespace) it.next();
5
				
5
				ListInfo[] list = store.list("", pN.getPrefix() + '%');
6
				result.addAll(Arrays.asList(list));
7
			}
6
	supportedMechanisms.add(new Integer(AuthenticationManager
7
							.getSaslCode((String) it.next())));
8
				}
9
				break;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment4
    Time elapsed for statement mapping (ms)13.5
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                                            
    5
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(capas[i]);
                                                                                      
    6
    Iterator it = authMechanisms.iterator();
    Preondition Violations
    Unmatched statement Iterator it=authMechanisms.iterator(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    Iterator it = authMechanisms.iterator();
                      
    9
    break;
    Preondition Violations
    Unmatched break;
    9
    break;
    21
    it = namespaces.getSharedIterator();
                                                                                
    22
    while (it.hasNext())
    7
    while (it.hasNext())
                                                                                                                                                                                                
    8
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
    Preondition Violations
    Unmatched statement supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next()))); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
    23
    Namespace pN = (Namespace)it.next();
    23
    Namespace pN = (Namespace)it.next();
    Preondition Violations
    Unmatched statement Namespace pN=(Namespace)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                
    24
    ListInfo[] list = store.list("", pN.getPrefix() + '%');
    24
    ListInfo[] list = store.list("", pN.getPrefix() + '%');
    Preondition Violations
    Unmatched statement ListInfo[] list=store.list("",pN.getPrefix() + '%'); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                    
    25
    result.addAll(Arrays.asList(list));
    25
    result.addAll(Arrays.asList(list));
    Preondition Violations
    Unmatched statement result.addAll(Arrays.asList(list)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                  
    Precondition Violations (6)
    Row Violation
    1Unmatched statement Iterator it=authMechanisms.iterator(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched break;
    3Unmatched statement supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next()))); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement Namespace pN=(Namespace)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched statement ListInfo[] list=store.list("",pN.getPrefix() + '%'); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement result.addAll(Arrays.asList(list)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted