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: 5 | Number of AST nodes: 5 | |||
1 | if (serverSaslMechansims != null) {↵ | 1 | if (serverSaslMechansims != null) {↵ | |
2 | List authMechanisms = AuthenticationFactory.getInstance()↵ | 2 | List authMechanisms = AuthenticationFactory.getInstance()↵ | |
3 | .getSupportedMechanisms(oneLine.toString());↵ | 3 | .getSupportedMechanisms(serverSaslMechansims);↵ | |
4 | Iterator it = authMechanisms.iterator();↵ | 4 | Iterator it = authMechanisms.iterator();↵ | |
5 | while (it.hasNext()) {↵ | 5 | while (it.hasNext()) {↵ | |
6 | supportedMechanisms.add(new Integer(AuthenticationManager↵ | 6 | supportedMechanisms.add(new Integer(AuthenticationManager↵ | |
7 | .getSaslCode((String) it.next())));↵ | 7 | .getSaslCode((String) it.next())));↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 20.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | if (serverSaslMechansims != null) |
| 9 | if (serverSaslMechansims != null) | |||||||||||
10 | List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(oneLine.toString()); |
| 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()))); |
Row | Violation |
---|---|
1 | Type java.lang.String[] of variable serverSaslMechansims does not match with type java.lang.String of variable serverSaslMechansims |
2 | Expression oneLine.toString() cannot be parameterized, because it has dependencies to/from statements that will be extracted |