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/imap/IMAPServer.java | |||
Method name: boolean isSupported(String)
|
Method name: String[] getCapas(String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for (int i = 0; i < capas.length; i++) {↵ | 1 | for (int i = 0; i < capabilities.length; i++) {↵ | |
2 | if (capas[i].startsWith(command)) {↵ | 2 | if (capabilities[i].startsWith(command)) {↵ | |
3 | return true;↵ | 3 | list.add(capabilities[i]);↵ | |
4 | }↵ | 4 | }↵ | |
5 | } | 5 |
| |
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 | 5 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | for (int i = 0; i < capas.length; i++) |
| 3 | for (int i = 0; i < capabilities.length; i++) | ||||||||||
3 | if (capas[i].startsWith(command)) |
| 4 | if (capabilities[i].startsWith(command)) | ||||||||||
4 | return true; |
| | |||||||||||
|
| 5 | list.add(capabilities[i]); |
Row | Violation |
---|---|
1 | Unmatched return true; |
2 | Unmatched statement list.add(capabilities[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables i |