File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/LogViewer.java | |||
Method name: void writeBooleanArray(DataOutputStream, boolean[])
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | dout.writeInt(bools.length);↵ | |||
2 | for(int i = 0; i < bools.length; i++)↵ | 1 | for(int i = 0; i < selected.length; i++)↵ | |
3 | {↵ | 2 | {↵ | |
4 | dout.writeBoolean(bools[i]);↵ | 3 | ↵ | |
4 | buf.append(selected[i]);↵ | |||
5 | buf.append('\n');↵ | |||
5 | } | 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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | dout.writeInt(bools.length); | | ||||||||||||||||
4 | for (int i = 0; i < bools.length; i++) |
| 13 | for (int i = 0; i < selected.length; i++) | ||||||||||||||
5 | dout.writeBoolean(bools[i]); |
| | |||||||||||||||
|
| 14 | buf.append(selected[i]); | |||||||||||||||
| 15 | buf.append('\n'); |
Row | Violation |
---|---|
1 | Type boolean[] of variable bools does not match with type java.lang.Object[] of variable selected |
2 | Unmatched statement dout.writeBoolean(bools[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement buf.append(selected[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |