List authMechanisms = AuthenticationFactory.getInstance() .getSupportedMechanisms(oneLine.toString()); Iterator it = authMechanisms.iterator(); while (it.hasNext()) { supportedMechanisms.add(new Integer(AuthenticationManager .getSaslCode((String) it.next()))); }
List authMechanisms = AuthenticationFactory.getInstance() .getSupportedMechanisms(serverSaslMechansims); Iterator it = authMechanisms.iterator(); while (it.hasNext()) { supportedMechanisms.add(new Integer(AuthenticationManager .getSaslCode((String) it.next()))); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/imap/IMAPServer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pop3/POP3Store.java
Method name: List checkSupportedAuthenticationMethods() Method name: List checkSupportedAuthenticationMethods()
Number of AST nodes: 4 Number of AST nodes: 4
1
List authMechanisms = AuthenticationFactory.getInstance()
1
List authMechanisms = AuthenticationFactory.getInstance()
2
						.getSupportedMechanisms(oneLine.toString());
2
						.getSupportedMechanisms(serverSaslMechansims);
3
				Iterator it = authMechanisms.iterator();
3
				Iterator it = authMechanisms.iterator();
4
				while (it.hasNext()) {
4
				while (it.hasNext()) {
5
					supportedMechanisms.add(new Integer(AuthenticationManager
5
					supportedMechanisms.add(new Integer(AuthenticationManager
6
							.getSaslCode((String) it.next())));
6
							.getSaslCode((String) it.next())));
7
				}
7
				}
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 comparisons9
  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 fragment0
    Time elapsed for statement mapping (ms)20.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(oneLine.toString());
    10
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(oneLine.toString());
    10
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(serverSaslMechansims);
    Differences
    Expression1Expression2Difference
    oneLine.toString()serverSaslMechansimsTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression oneLine.toString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(serverSaslMechansims);
    11
    Iterator it = authMechanisms.iterator();
    11
    Iterator it = authMechanisms.iterator();
    12
    while (it.hasNext())
    12
    while (it.hasNext())
    13
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
    13
    supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next())));
    Precondition Violations (1)
    Row Violation
    1Expression oneLine.toString() cannot be parameterized, because it has dependencies to/from statements that will be extracted