File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/NamingHelper.java | |||
Method name: Properties getConnectionProperties(Properties)
|
Method name: Properties getJndiProperties(Properties)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if ( prop.indexOf(Environment.CONNECTION_PREFIX) > -1 && !SPECIAL_PROPERTIES.contains(prop) ) {↵ | 1 | if ( prop.indexOf(Environment.JNDI_PREFIX) > -1 && !specialProps.contains(prop) ) {↵ | |
2 | result.setProperty(↵ | 2 | result.setProperty(↵ | |
3 | prop.substring( Environment.CONNECTION_PREFIX.length()+1 ),↵ | 3 | prop.substring( Environment.JNDI_PREFIX.length()+1 ),↵ | |
4 | properties.getProperty(prop)↵ | 4 | properties.getProperty(prop)↵ | |
5 | );↵ | 5 | );↵ | |
6 | } | 6 |
| |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (prop.indexOf(Environment.CONNECTION_PREFIX) > -1 && !SPECIAL_PROPERTIES.contains(prop)) |
| 8 | if (prop.indexOf(Environment.JNDI_PREFIX) > -1 && !specialProps.contains(prop)) | ||||||||||||||||
6 | result.setProperty(prop.substring(Environment.CONNECTION_PREFIX.length() + 1), properties.getProperty(prop)); |
| 9 | result.setProperty(prop.substring(Environment.JNDI_PREFIX.length() + 1), properties.getProperty(prop)); |
Row | Violation |
---|