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: 11 | Number of AST nodes: 11 | |||
1 | if ((typeName.charAt(0) == 'L')↵ | 1 | if ((typeName.charAt(0) == 'L')↵ | |
2 | && (typeName.charAt(typeName.length() - 1) == ';')↵ | 2 | && (typeName.charAt(typeName.length() - 1) == ';')↵ | |
3 | || (typeName.charAt(0) == '[')) {↵ | 3 | || (typeName.charAt(0) == '[')) {↵ | |
4 | // reference type↵ | 4 | // reference type↵ | |
5 | code.addAload(i);↵ | 5 | code.addAstore(i);↵ | |
6 | } else if (typeName.equals("Z") || typeName.equals("B")↵ | 6 | } else if (typeName.equals("Z") || typeName.equals("B")↵ | |
7 | || typeName.equals("C") || typeName.equals("I")↵ | 7 | || typeName.equals("C") || typeName.equals("I")↵ | |
8 | || typeName.equals("S")) {↵ | 8 | || typeName.equals("S")) {↵ | |
9 | // boolean, byte, char, int, short↵ | 9 | // boolean, byte, char, int, short↵ | |
10 | code.addIload(i);↵ | 10 | code.addIstore(i);↵ | |
11 | } else if (typeName.equals("D")) {↵ | 11 | } else if (typeName.equals("D")) {↵ | |
12 | // double↵ | 12 | // double↵ | |
13 | code.addDload(i);↵ | 13 | code.addDstore(i);↵ | |
14 | } else if (typeName.equals("F")) {↵ | 14 | } else if (typeName.equals("F")) {↵ | |
15 | // float↵ | 15 | // float↵ | |
16 | code.addFload(i);↵ | 16 | code.addFstore(i);↵ | |
17 | } else if (typeName.equals("J")) {↵ | 17 | } else if (typeName.equals("J")) {↵ | |
18 | // long↵ | 18 | // long↵ | |
19 | code.addLload(i);↵ | 19 | code.addLstore(i);↵ | |
20 | } else {↵ | 20 | } else {↵ | |
21 | // bad type↵ | 21 | // bad type↵ | |
22 | throw new RuntimeException("bad type: " + typeName);↵ | 22 | throw new RuntimeException("bad type: " + typeName);↵ | |
23 | } | 23 |
| |
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) | 2.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 83 |
Number of mapped statements | 11 |
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) | 6.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if ((typeName.charAt(0) == 'L') && (typeName.charAt(typeName.length() - 1) == ';') || (typeName.charAt(0) == '[')) | 1 | if ((typeName.charAt(0) == 'L') && (typeName.charAt(typeName.length() - 1) == ';') || (typeName.charAt(0) == '[')) | |||||||||||||
2 | code.addAload(i); |
| 2 | code.addAstore(i); | ||||||||||||
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.addAload(i) is a void method call, and thus it cannot be parameterized |
2 | Expression code.addAstore(i) is a void method call, and thus it cannot be parameterized |
3 | Expression code.addIload(i) is a void method call, and thus it cannot be parameterized |
4 | Expression code.addIstore(i) is a void method call, and thus it cannot be parameterized |
5 | Expression code.addDload(i) is a void method call, and thus it cannot be parameterized |
6 | Expression code.addDstore(i) is a void method call, and thus it cannot be parameterized |
7 | Expression code.addFload(i) is a void method call, and thus it cannot be parameterized |
8 | Expression code.addFstore(i) is a void method call, and thus it cannot be parameterized |
9 | Expression code.addLload(i) is a void method call, and thus it cannot be parameterized |
10 | Expression code.addLstore(i) is a void method call, and thus it cannot be parameterized |