if (usingSSL) { // NOTE if SSL is possible we just need the plain login // since SSL does the encryption for us. result = ((Integer) supported.get(0)).intValue(); } else { Collections.sort(supported, new AuthenticationSecurityComparator()); result = ((Integer) supported.get(supported.size() - 1)) .intValue(); }
if (usingSSL) { // NOTE if SSL is possible we just need the plain login // since SSL does the encryption for us. method = ((Integer) supported.get(0)).intValue(); } else { Collections.sort(supported, new AuthenticationSecurityComparator()); method = ((Integer) supported.get(supported.size() - 1)) .intValue(); }
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/smtp/SMTPServer.java
Method name: int getLoginMethod() Method name: int getLoginMethod()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (usingSSL) {
1
if (usingSSL) {
2
				// NOTE if SSL is possible we just need the plain login
2
				// NOTE if SSL is possible we just need the plain login
3
				// since SSL does the encryption for us.
3
				// since SSL does the encryption for us.
4
				result = ((Integer) supported.get(0)).intValue();
4
				method = ((Integer) supported.get(0)).intValue();
5
			} else {
5
			} else {
6
				Collections.sort(supported,
6
				Collections.sort(supported,
7
						new AuthenticationSecurityComparator());
7
						new AuthenticationSecurityComparator());
8
				result = ((Integer) supported.get(supported.size() - 1))
8
				method = ((Integer) supported.get(supported.size() - 1))
9
						.intValue();
9
						.intValue();
10
			}
10
			}
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.1
Clones locationClones are in different classes
Number of node comparisons17
  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)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    if (usingSSL)
    11
    if (usingSSL)
    8
    result = ((Integer)supported.get(0)).intValue();
    8
    result = ((Integer)supported.get(0)).intValue();
    12
    method = ((Integer)supported.get(0)).intValue();
    Differences
    Expression1Expression2Difference
    resultmethodVARIABLE_NAME_MISMATCH
    12
    method = ((Integer)supported.get(0)).intValue();
    else
    else
    9
    Collections.sort(supported, new AuthenticationSecurityComparator());
    13
    Collections.sort(supported, new AuthenticationSecurityComparator());
    10
    result = ((Integer)supported.get(supported.size() - 1)).intValue();
    10
    result = ((Integer)supported.get(supported.size() - 1)).intValue();
    14
    method = ((Integer)supported.get(supported.size() - 1)).intValue();
    Differences
    Expression1Expression2Difference
    resultmethodVARIABLE_NAME_MISMATCH
    14
    method = ((Integer)supported.get(supported.size() - 1)).intValue();
    Precondition Violations (0)
    Row Violation