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.getPersonalI↵ | 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 |
| |||
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 25.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 5 | List authMechanisms = AuthenticationFactory.getInstance().getSupportedMechanisms(capas[i]); | |||||||||||||||||||
9 | it = namespaces.getPersonalIterator(); |
| 6 | Iterator it = authMechanisms.iterator(); | ||||||||||||||||||
10 | while (it.hasNext()) | 7 | while (it.hasNext()) | |||||||||||||||||||
|
| 8 | supportedMechanisms.add(new Integer(AuthenticationManager.getSaslCode((String)it.next()))); | |||||||||||||||||||
11 | Namespace pN = (Namespace)it.next(); |
| | |||||||||||||||||||
12 | ListInfo[] list = store.list("", pN.getPrefix() + '%'); |
| | |||||||||||||||||||
13 | result.addAll(Arrays.asList(list)); |
| | |||||||||||||||||||
|
| 9 | break; |
Row | Violation |
---|---|
1 | Unmatched statement List authMechanisms=AuthenticationFactory.getInstance().getSupportedMechanisms(capas[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression authMechanisms.iterator() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.columba.ristretto.imap.NamespaceCollection of variable namespaces does not match with type java.util.List of variable authMechanisms |
4 | 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 |
5 | 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 |
6 | 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 |
7 | Unmatched statement ListInfo[] list=store.list("",pN.getPrefix() + '%'); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
8 | 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 |
9 | Unmatched break; |
10 | The refactoring of the clones is infeasible, because classes org.columba.mail.gui.config.subscribe.SynchronizeFolderListCommand and org.columba.mail.smtp.SMTPServer do not have a common superclass |