File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/ActionSet.java | |||
Method name: void writeBooleanArray(DataOutputStream, boolean[])
|
Method name: void ActionSet(PluginJAR, String[], boolean[], URL)
|
|||
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 < cachedActionNames.length; i++)↵ | |
3 | {↵ | 2 | {↵ | |
4 | dout.writeBoolean(bools[i]↵ | 3 | actions.put(cachedActionNames[i],placeholder);↵ | |
4 | jEdit.setTemporaryProperty(cachedActionNames[i]↵ | |||
5 | + ".toggle",cachedActionToggleFlags[i]↵ | |||
5 | );↵ | 6 | ? "true" : "false");↵ | |
6 | } | 7 | } | |
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++) |
| 5 | for (int i = 0; i < cachedActionNames.length; i++) | ||||||||||||||
5 | dout.writeBoolean(bools[i]); |
| | |||||||||||||||
|
| 6 | actions.put(cachedActionNames[i], placeholder); | |||||||||||||||
|
| 7 | jEdit.setTemporaryProperty(cachedActionNames[i] + ".toggle", cachedActionToggleFlags[i] ? "true" : "false"); |
Row | Violation |
---|---|
1 | Type boolean[] of variable bools does not match with type java.lang.String[] of variable cachedActionNames |
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 actions.put(cachedActionNames[i],placeholder); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement jEdit.setTemporaryProperty(cachedActionNames[i] + ".toggle",cachedActionToggleFlags[i] ? "true" : "false"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |