File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java | |||
Method name: void writeStringArray(DataOutputStream, String[])
|
Method name: void writeBooleanArray(DataOutputStream, boolean[])
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if(str == null)↵ | 1 | if(bools == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | dout.writeInt(0);↵ | 3 | dout.writeInt(0);↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | dout.writeInt(str.length);↵ | 7 | dout.writeInt(bools.length);↵ | |
8 | for(int i = 0; i < str.length; i++)↵ | 8 | for(int i = 0; i < bools.length; i++)↵ | |
9 | {↵ | 9 | {↵ | |
10 | writeString(dout,str[i]);↵ | 10 | dout.writeBoolean(bools[i]);↵ | |
11 | }↵ | 11 | }↵ | |
12 | } | 12 |
| |
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 declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (str == null) |
| 1 | if (bools == null) | ||||||||||||||||||||||||
2 | dout.writeInt(0); | 2 | dout.writeInt(0); | |||||||||||||||||||||||||
else | else | |||||||||||||||||||||||||||
3 | dout.writeInt(str.length); |
| 3 | dout.writeInt(bools.length); | ||||||||||||||||||||||||
4 | for (int i = 0; i < str.length; i++) |
| 4 | for (int i = 0; i < bools.length; i++) | ||||||||||||||||||||||||
5 | writeString(dout, str[i]); |
| 5 | dout.writeBoolean(bools[i]); |
Row | Violation |
---|---|
1 | Type java.lang.String[] of variable str does not match with type boolean[] of variable bools |
2 | Type java.lang.String[] of variable str does not match with type boolean[] of variable bools |
3 | Type java.lang.String[] of variable str does not match with type boolean[] of variable bools |
4 | Expression writeString(dout,str[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression dout.writeBoolean(bools[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression writeString(dout,str[i]) is a void method call, and thus it cannot be parameterized |
7 | Expression dout.writeBoolean(bools[i]) is a void method call, and thus it cannot be parameterized |
8 | Expression writeString(dout,str[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression dout.writeBoolean(bools[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression writeString(dout,str[i]) is a void method call, and thus it cannot be parameterized |
11 | Expression dout.writeBoolean(bools[i]) is a void method call, and thus it cannot be parameterized |