File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java | File path: /jEdit-4.2/src/org/objectweb/asm/ClassWriter.java | |||
Method name: void init(int, String, String, String[])
|
Method name: void visit(int, String, String, String[], String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (exceptions != null && exceptions.length > 0) {↵ | 1 | if (interfaces != null && interfaces.length > 0) {↵ | |
2 | exceptionCount = exceptions.length;↵ | 2 | interfaceCount = interfaces.length;↵ | |
3 | this.exceptions = new int[exceptionCount];↵ | 3 | this.interfaces = new int[interfaceCount];↵ | |
4 | for (int i = 0; i < exceptionCount; ++i) {↵ | 4 | for (int i = 0; i < interfaceCount; ++i) {↵ | |
5 | this.exceptions[i] = cw.newClass(exceptions[i]).index;↵ | 5 | this.interfaces[i] = newClass(interfaces[i]).index;↵ | |
6 | }↵ | 6 | }↵ | |
7 | } | 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.5 |
Clones location | Clones are in different classes |
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) | 2.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (exceptions != null && exceptions.length > 0) |
| 4 | if (interfaces != null && interfaces.length > 0) | ||||||||||||||||||||
5 | exceptionCount = exceptions.length; |
| 5 | interfaceCount = interfaces.length; | ||||||||||||||||||||
6 | this.exceptions = new int[exceptionCount]; |
| 6 | this.interfaces = new int[interfaceCount]; | ||||||||||||||||||||
7 | for (int i = 0; i < exceptionCount; ++i) |
| 7 | for (int i = 0; i < interfaceCount; ++i) | ||||||||||||||||||||
8 | this.exceptions[i] = cw.newClass(exceptions[i]).index; |
| 8 | this.interfaces[i] = newClass(interfaces[i]).index; |
Row | Violation |
---|---|
1 | Expression exceptionCount is a field being modified, and thus it cannot be parameterized |
2 | Expression interfaceCount is a field being modified, and thus it cannot be parameterized |
3 | Expression this.exceptions is a field being modified, and thus it cannot be parameterized |
4 | Expression this.interfaces is a field being modified, and thus it cannot be parameterized |
5 | Expression exceptionCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression interfaceCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression exceptionCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression interfaceCount cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression this.exceptions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression this.interfaces cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression cw.newClass(exceptions[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression newClass(interfaces[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |