File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryObjectFactory.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryObjectFactory.java | |||
Method name: Object getInstance(String)
|
Method name: Object getNamedInstance(String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | log.debug("lookup: uid=" + uid);↵ | 1 | log.debug("lookup: name=" + name);↵ | |
2 | Object result = INSTANCES.get(uid);↵ | 2 | Object result = NAMED_INSTANCES.get(name);↵ | |
3 | if (result==null) {↵ | 3 | if (result==null) {↵ | |
4 | log.debug("Not found: " + uid);↵ | 4 | log.debug("Not found: " + name);↵ | |
5 | log.debug( INSTANCES.toString() );↵ | 5 | log.debug( NAMED_INSTANCES.toString() );↵ | |
6 | }↵ | 6 | }↵ | |
7 | return result; | 7 |
| |
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) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
Number of mapped statements | 6 |
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) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | log.debug("lookup: uid=" + uid); |
| 1 | log.debug("lookup: name=" + name); | |||||||||||||
2 | Object result = INSTANCES.get(uid); |
| 2 | Object result = NAMED_INSTANCES.get(name); | |||||||||||||
3 | if (result == null) | 3 | if (result == null) | ||||||||||||||
4 | log.debug("Not found: " + uid); |
| 4 | log.debug("Not found: " + name); | |||||||||||||
5 | log.debug(INSTANCES.toString()); |
| 5 | log.debug(NAMED_INSTANCES.toString()); | |||||||||||||
6 | return result; | 6 | return result; |
Row | Violation |
---|