File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/headercache/DefaultHeaderBinding.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/table/TableView.java | |||
Method name: void objectToEntry(Object, TupleOutput)
|
Method name: MessageNode[] getSelectedNodes()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for (int j = 0; j < columnNames.length; j++) {↵ | 1 | for (int i = 0; i < rows.length; i++) {↵ | |
2 | String v = (String) header.get(columnNames[j]);↵ | 2 | TreePath treePath = getTree().getPathForRow(rows[i]);↵ | |
3 | if ( v==null) v = "";↵ | 3 | if (treePath == null) ↵ | |
4 | out.writeString(v↵ | 4 | {↵ | |
5 | continue;↵ | |||
6 | }↵ | |||
5 | );↵ | 7 | nodes[i] = (MessageNode) treePath.getLastPathComponent();↵ | |
6 | } | 8 |
| |
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 | 13 |
Number of mapped statements | 2 |
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) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | for (int j = 0; j < columnNames.length; j++) |
| 5 | for (int i = 0; i < rows.length; i++) | |||||||||||||||||||||||
|
| 6 | TreePath treePath = getTree().getPathForRow(rows[i]); | ||||||||||||||||||||||||
27 | String v = (String)header.get(columnNames[j]); |
| | ||||||||||||||||||||||||
28 | if (v == null) |
| 7 | if (treePath == null) | |||||||||||||||||||||||
|
| 8 | continue; | ||||||||||||||||||||||||
29 | v = ""; |
| | ||||||||||||||||||||||||
|
| 9 | nodes[i] = (MessageNode)treePath.getLastPathComponent(); | ||||||||||||||||||||||||
30 | out.writeString(v); | |
Row | Violation |
---|---|
1 | Type int of variable columnNames.length does not match with type int of variable rows.length |
2 | Unmatched statement TreePath treePath=getTree().getPathForRow(rows[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement String v=(String)header.get(columnNames[j]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type java.lang.String of variable v does not match with type javax.swing.tree.TreePath of variable treePath |
5 | Unmatched continue; |
6 | Unmatched statement v=""; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched statement nodes[i]=(MessageNode)treePath.getLastPathComponent(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | The refactoring of the clones is infeasible, because classes org.columba.mail.folder.headercache.DefaultHeaderBinding and org.columba.mail.gui.table.TableView do not have a common superclass |