File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java | |||
Method name: void SchemaUpdate(Configuration, Properties)
|
Method name: void SchemaValidator(Configuration, Properties)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 6 | |||
1 | this.configuration = cfg;↵ | 1 | this.configuration = cfg;↵ | |
2 | dialect = Dialect.getDialect( connectionProperties );↵ | 2 | dialect = Dialect.getDialect( connectionProperties );↵ | |
3 | Properties props = new Properties();↵ | 3 | Properties props = new Properties();↵ | |
4 | props.putAll( dialect.getDefaultProperties() );↵ | 4 | props.putAll( dialect.getDefaultProperties() );↵ | |
5 | props.putAll( connectionProperties );↵ | 5 | props.putAll( connectionProperties );↵ | |
6 | connectionHelper = new ManagedProviderConnectionHelper( props );↵ | 6 |
| |
7 | exceptions = new ArrayList();↵ | |||
8 | formatter = ( PropertiesHelper.getBoolean( Environment.FORMAT_SQL, props ) ? FormatStyle.DDL : FormatStyle.NONE ).getFormatter(); | |||
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 18 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | this.configuration = cfg; | 1 | this.configuration = cfg; | |
2 | dialect = Dialect.getDialect(connectionProperties); | 2 | dialect = Dialect.getDialect(connectionProperties); | |
3 | Properties props = new Properties(); | 3 | Properties props = new Properties(); | |
4 | props.putAll(dialect.getDefaultProperties()); | 4 | props.putAll(dialect.getDefaultProperties()); | |
5 | props.putAll(connectionProperties); | 5 | props.putAll(connectionProperties); | |
6 | connectionHelper = new ManagedProviderConnectionHelper(props); | 6 | connectionHelper = new ManagedProviderConnectionHelper(props); | |
7 | exceptions = new ArrayList(); | | ||
8 | formatter = (PropertiesHelper.getBoolean(Environment.FORMAT_SQL, props) ? FormatStyle.DDL : FormatStyle.NONE).getFormatter(); | |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables props , while Clone fragment #2 returns variables |