File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/javassist/FieldTransformer.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/javassist/FieldTransformer.java | |||
Method name: void addTypeDependDataLoad(Bytecode, String, int)
|
Method name: void addTypeDependDataStore(Bytecode, String, int)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (typeName.equals("Z") || typeName.equals("B")↵ | 1 | if (typeName.equals("Z") || typeName.equals("B")↵ | |
2 | || typeName.equals("C") || typeName.equals("I")↵ | 2 | || typeName.equals("C") || typeName.equals("I")↵ | |
3 | || typeName.equals("S")) {↵ | 3 | || typeName.equals("S")) {↵ | |
4 | // boolean, byte, char, int, short↵ | 4 | // boolean, byte, char, int, short↵ | |
5 | code.addIload(i);↵ | 5 | code.addIstore(i);↵ | |
6 | } else if (typeName.equals("D")) {↵ | 6 | } else if (typeName.equals("D")) {↵ | |
7 | // double↵ | 7 | // double↵ | |
8 | code.addDload(i);↵ | 8 | code.addDstore(i);↵ | |
9 | } else if (typeName.equals("F")) {↵ | 9 | } else if (typeName.equals("F")) {↵ | |
10 | // float↵ | 10 | // float↵ | |
11 | code.addFload(i);↵ | 11 | code.addFstore(i);↵ | |
12 | } else if (typeName.equals("J")) {↵ | 12 | } else if (typeName.equals("J")) {↵ | |
13 | // long↵ | 13 | // long↵ | |
14 | code.addLload(i);↵ | 14 | code.addLstore(i);↵ | |
15 | } else {↵ | 15 | } else {↵ | |
16 | // bad type↵ | 16 | // bad type↵ | |
17 | throw new RuntimeException("bad type: " + typeName);↵ | 17 | throw new RuntimeException("bad type: " + typeName);↵ | |
18 | } | 18 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 1.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 57 |
Number of mapped statements | 9 |
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) | 3.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | else if (typeName.equals("Z") || typeName.equals("B") || typeName.equals("C") || typeName.equals("I") || typeName.equals("S")) | 3 | else if (typeName.equals("Z") || typeName.equals("B") || typeName.equals("C") || typeName.equals("I") || typeName.equals("S")) | |||||||||||||
4 | code.addIload(i); |
| 4 | code.addIstore(i); | ||||||||||||
5 | else if (typeName.equals("D")) | 5 | else if (typeName.equals("D")) | |||||||||||||
6 | code.addDload(i); |
| 6 | code.addDstore(i); | ||||||||||||
7 | else if (typeName.equals("F")) | 7 | else if (typeName.equals("F")) | |||||||||||||
8 | code.addFload(i); |
| 8 | code.addFstore(i); | ||||||||||||
9 | else if (typeName.equals("J")) | 9 | else if (typeName.equals("J")) | |||||||||||||
10 | code.addLload(i); |
| 10 | code.addLstore(i); | ||||||||||||
else | else | |||||||||||||||
11 | throw new RuntimeException("bad type: " + typeName); | 11 | throw new RuntimeException("bad type: " + typeName); |
Row | Violation |
---|---|
1 | Expression code.addIload(i) is a void method call, and thus it cannot be parameterized |
2 | Expression code.addIstore(i) is a void method call, and thus it cannot be parameterized |
3 | Expression code.addDload(i) is a void method call, and thus it cannot be parameterized |
4 | Expression code.addDstore(i) is a void method call, and thus it cannot be parameterized |
5 | Expression code.addFload(i) is a void method call, and thus it cannot be parameterized |
6 | Expression code.addFstore(i) is a void method call, and thus it cannot be parameterized |
7 | Expression code.addLload(i) is a void method call, and thus it cannot be parameterized |
8 | Expression code.addLstore(i) is a void method call, and thus it cannot be parameterized |