File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/parser/MailUrlParser.java | File path: /columba-1.4-src/plugins/org.columba.mail.ZippedMHFolder/src/org/columba/mail/folder/zippedmh/ZippedMHDataStorage.java | |||
Method name: Map parse(String)
|
Method name: Object[] getMessageUids()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | addressList.clear();↵ | |||
2 | for(int i=0; i<addresses.length; i++ ) { ↵ | 1 | for( int i=0; i<uids.length; i++) {↵ | |
3 | addressList.add(addresses[i].toString()); ↵ | 2 | matcher.reset(messageFiles[i].getName());↵ | |
4 | }↵ | 3 | ↵ | |
5 | result.put("bcc", addressList.toArray(new String[0])); | 4 | matcher.find(); ↵ | |
5 | uids[i] = new Integer(matcher.group(1));↵ | |||
6 |
| |||
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 | 8 |
Number of mapped statements | 1 |
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) | 1.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35 | addressList.clear(); |
| | |||||||||||||||
36 | for (int i = 0; i < addresses.length; i++) |
| 4 | for (int i = 0; i < uids.length; i++) | ||||||||||||||
|
| 5 | matcher.reset(messageFiles[i].getName()); | |||||||||||||||
|
| 6 | matcher.find(); | |||||||||||||||
|
| 7 | uids[i] = new Integer(matcher.group(1)); | |||||||||||||||
37 | addressList.add(addresses[i].toString()); |
| | |||||||||||||||
38 | result.put("bcc", addressList.toArray(new String[0])); |
| |
Row | Violation |
---|---|
1 | Unmatched statement addressList.clear(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Type int of variable addresses.length does not match with type int of variable uids.length |
3 | Unmatched statement matcher.reset(messageFiles[i].getName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement matcher.find(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement uids[i]=new Integer(matcher.group(1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement uids[i]=new Integer(matcher.group(1)); 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 |
7 | Unmatched statement addressList.add(addresses[i].toString()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement result.put("bcc",addressList.toArray(new String[0])); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
9 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |