if (serverSaslMechansims != null) { List authMechanisms = AuthenticationFactory.getInstance() .getSupportedMechanisms(serverSaslMechansims); Iterator it = authMechanisms.iterator(); while (it.hasNext()) { supportedMechanisms.add(new Integer(AuthenticationManager .getSaslCode((String) it.next()))); } }
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/pop3/POP3Store.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/smtp/SMTPServer.java
Method name: List checkSupportedAuthenticationMethods() Method name: List checkSupportedAuthenticationMethods()
Number of AST nodes: 5 Number of AST nodes: 5
1
if (serverSaslMechansims != null) {
2
				List authMechanisms = AuthenticationFactory.getInstance()
1
List authMechanisms = AuthenticationFactory.getInstance()
3
						.getSupportedMechanisms(serverSaslMechansims);
2
						.getSupportedMechanisms(capas[i]);
4
				Iterator it = authMechanisms.iterator();
3
				Iterator it = authMechanisms.iterator();
5
				while (it.hasNext()) {
4
				while (it.hasNext()) {
6
					supportedMechanisms.add(new Integer(AuthenticationManager
5
					supportedMechanisms.add(new Integer(AuthenticationManager
7
							.getSaslCode((String) it.next())));
6
							.getSaslCode((String) it.next())));
8
				}
7
				}
9
			}
8
				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.2
Clones locationClones are in different classes
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)32.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    10
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(serverSaslMechansims);
    10
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(serverSaslMechansims);
    5
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(capas[i]);
    Differences
    Expression1Expression2Difference
    serverSaslMechansimscapas[i]TYPE_COMPATIBLE_REPLACEMENT
    5
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(capas[i]);
    11
    Iterator it = authMechanisms.iterator();
    6
    Iterator it = authMechanisms.iterator();
    12
    while (it.hasNext())
    7
    while (it.hasNext())
    13
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
    13
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
    8
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
    Differences
    Expression1Expression2Difference
    java.util.ArrayListjava.util.ListSUBCLASS_TYPE_MISMATCH
    8
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
                      
    9
    break;
    Preondition Violations
    Unmatched break;
    9
    break;
    Precondition Violations (1)
    Row Violation
    1Unmatched break;