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/persister/collection/CollectionPropertyMapping.java | |||
Method name: void addTypeDependDataReturn(Bytecode, String)
|
Method name: Type toType(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (typeName.equals("F")) {↵ | 1 | if ( propertyName.equals(↵ | |
2 | // float↵ | |||
3 | code.addOpcode(Opcode.FRETURN↵ | 2 | CollectionPropertyNames.COLLECTION_MAX_ELEMENT) ) {↵ | |
4 | );↵ | 3 | return memberPersister.getElementType();↵ | |
5 | } ↵ | 4 | }↵ | |
6 | else if (typeName.equals("J")) {↵ | 5 | else if ( propertyName.equals(↵ | |
7 | // long↵ | |||
8 | code.addOpcode(Opcode.LRETURN↵ | 6 | CollectionPropertyNames.COLLECTION_MIN_ELEMENT) ) {↵ | |
9 | );↵ | 7 | return memberPersister.getElementType();↵ | |
10 | } ↵ | 8 | }↵ | |
11 | else {↵ | 9 | else {↵ | |
12 | // bad type↵ | 10 | //return memberPersister.getPropertyType(propertyName);↵ | |
13 | throw new RuntimeException("bad type: " + typeName);↵ | 11 | throw new QueryException("illegal syntax near collection: " + propertyName);↵ | |
14 | } | 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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 3 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | else if (typeName.equals("F")) |
| 13 | else if (propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_ELEMENT)) | ||||||||||||||||
8 | code.addOpcode(Opcode.FRETURN); | | ||||||||||||||||||
|
| 14 | return memberPersister.getElementType(); | |||||||||||||||||
9 | else if (typeName.equals("J")) |
| 15 | else if (propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_ELEMENT)) | ||||||||||||||||
10 | code.addOpcode(Opcode.LRETURN); | | ||||||||||||||||||
|
| 16 | return memberPersister.getElementType(); | |||||||||||||||||
else | else | |||||||||||||||||||
11 | throw new RuntimeException("bad type: " + typeName); |
| 17 | throw new QueryException("illegal syntax near collection: " + propertyName); |
Row | Violation |
---|---|
1 | Unmatched return memberPersister.getElementType(); |
2 | Unmatched return memberPersister.getElementType(); |