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: 11 | Number of AST nodes: 11 | |||
1 | if ( name.startsWith( "get" ) && hasGetterSignature ) {↵ | 1 | if ( name.startsWith( "get" ) && hasGetterSignature ) {↵ | |
2 | String propName = name.substring( 3 );↵ | 2 | String propName = name.substring( 3 );↵ | |
3 | return data.get( propName );↵ | 3 | return data.get( propName );↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if ( name.startsWith( "is" ) && hasGetterSignature ) {↵ | 5 | else if ( name.startsWith( "is" ) && hasGetterSignature ) {↵ | |
6 | String propName = name.substring( 2 );↵ | 6 | String propName = name.substring( 2 );↵ | |
7 | return data.get( propName );↵ | 7 | return data.get( propName );↵ | |
8 | }↵ | 8 | }↵ | |
9 | else if ( name.startsWith( "set" ) && hasSetterSignature) {↵ | 9 | else if ( name.startsWith( "set" ) && hasSetterSignature) {↵ | |
10 | String propName = name.substring( 3 );↵ | 10 | String propName = name.substring( 3 );↵ | |
11 | data.put( propName, args[0] );↵ | 11 | data.put( propName, args[0] );↵ | |
12 | return null;↵ | 12 | return null;↵ | |
13 | }↵ | 13 | }↵ | |
14 | else {↵ | 14 | else {↵ | |
15 | // todo : what else to do here?↵ | 15 | // todo : what else to do here?↵ | |
16 | return null;↵ | 16 | return null;↵ | |
17 | } | 17 |
| |
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 in different classes |
Number of node comparisons | 85 |
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) | 2.1 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
10 | if (name.startsWith("get") && hasGetterSignature) | 10 | if (name.startsWith("get") && hasGetterSignature) | |
11 | String propName = name.substring(3); | 11 | String propName = name.substring(3); | |
12 | return data.get(propName); | 12 | return data.get(propName); | |
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 |
---|