this.configuration = cfg; dialect = Dialect.getDialect( connectionProperties ); Properties props = new Properties(); props.putAll( dialect.getDefaultProperties() ); props.putAll( connectionProperties ); connectionHelper = new ManagedProviderConnectionHelper( props ); exceptions = new ArrayList(); formatter = ( PropertiesHelper.getBoolean( Environment.FORMAT_SQL, props ) ? FormatStyle.DDL : FormatStyle.NONE ).getFormatter();
this.configuration = cfg; dialect = Dialect.getDialect( connectionProperties ); Properties props = new Properties(); props.putAll( dialect.getDefaultProperties() ); props.putAll( connectionProperties ); connectionHelper = new ManagedProviderConnectionHelper( props );
Clone fragments detected by clone detection tool
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
		connectionHelper = new ManagedProviderConnectionHelper( props );
7
		exceptions = new ArrayList();
8
		formatter = ( PropertiesHelper.getBoolean( Environment.FORMAT_SQL, props ) ? FormatStyle.DDL : FormatStyle.NONE ).getFormatter();
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    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();
                                                                                                                                                                                                                                                              
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables props , while Clone fragment #2 returns variables