File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/cglib/ProxyFactoryFactoryImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/javassist/ProxyFactoryFactoryImpl.java | |||
Method name: Object intercept(Object, Method, Object[], MethodProxy)
|
Method name: Object invoke(Object, Method, Method, Object[])
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if ( name.startsWith( "is" ) && hasGetterSignature ) {↵ | 1 | if ( name.startsWith( "is" ) && hasGetterSignature ) {↵ | |
2 | String propName = name.substring( 2 );↵ | 2 | String propName = name.substring( 2 );↵ | |
3 | return data.get( propName );↵ | 3 | return data.get( propName );↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if ( name.startsWith( "set" ) && hasSetterSignature) {↵ | 5 | else if ( name.startsWith( "set" ) && hasSetterSignature) {↵ | |
6 | String propName = name.substring( 3 );↵ | 6 | String propName = name.substring( 3 );↵ | |
7 | data.put( propName, args[0] );↵ | 7 | data.put( propName, args[0] );↵ | |
8 | return null;↵ | 8 | return null;↵ | |
9 | }↵ | 9 | }↵ | |
10 | else {↵ | 10 | else {↵ | |
11 | // todo : what else to do here?↵ | 11 | // todo : what else to do here?↵ | |
12 | return null;↵ | 12 | return null;↵ | |
13 | } | 13 |
| |
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 | 50 |
Number of mapped statements | 8 |
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.5 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
13 | else if (name.startsWith("is") && hasGetterSignature) | 13 | else if (name.startsWith("is") && hasGetterSignature) | |
14 | String propName = name.substring(2); | 14 | String propName = name.substring(2); | |
15 | return data.get(propName); | 15 | return data.get(propName); | |
16 | else if (name.startsWith("set") && hasSetterSignature) | 16 | else if (name.startsWith("set") && hasSetterSignature) | |
17 | String propName = name.substring(3); | 17 | String propName = name.substring(3); | |
18 | data.put(propName, args[0]); | 18 | data.put(propName, args[0]); | |
19 | return null; | 19 | return null; | |
else | else | |||
20 | return null; | 20 | return null; |
Row | Violation |
---|---|
1 | Not all possible execution flows end in a return statement |
2 | The refactoring of the clones is infeasible, because classes org.hibernate.bytecode.cglib.ProxyFactoryFactoryImpl.PassThroughInterceptor and org.hibernate.bytecode.javassist.ProxyFactoryFactoryImpl.PassThroughHandler do not have a common superclass |