File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/id/enhanced/TableStructure.java | |||
Method name: String[] sqlDropStrings(Dialect)
|
Method name: String[] sqlDropStrings(Dialect)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | StringBuffer sqlDropString = new StringBuffer().append( "drop table " );↵ | 1 | StringBuffer sqlDropString = new StringBuffer().append( "drop table " );↵ | |
2 | if ( dialect.supportsIfExistsBeforeTableName() ) {↵ | 2 | if ( dialect.supportsIfExistsBeforeTableName() ) {↵ | |
3 | sqlDropString.append( "if exists " );↵ | 3 | sqlDropString.append( "if exists " );↵ | |
4 | }↵ | 4 | }↵ | |
5 | sqlDropString.append( tableName ).append( dialect.getCascadeConstraintsString() );↵ | 5 | sqlDropString.append( tableName ).append( dialect.getCascadeConstraintsString() );↵ | |
6 | if ( dialect.supportsIfExistsAfterTableName() ) {↵ | 6 | if ( dialect.supportsIfExistsAfterTableName() ) {↵ | |
7 | sqlDropString.append( " if exists" );↵ | 7 | sqlDropString.append( " if exists" );↵ | |
8 | }↵ | 8 | }↵ | |
9 | return new String[] { sqlDropString.toString() }; | 9 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 7 |
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.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | StringBuffer sqlDropString = new StringBuffer().append("drop table "); | 1 | StringBuffer sqlDropString = new StringBuffer().append("drop table "); | |
2 | if (dialect.supportsIfExistsBeforeTableName()) | 2 | if (dialect.supportsIfExistsBeforeTableName()) | |
3 | sqlDropString.append("if exists "); | 3 | sqlDropString.append("if exists "); | |
4 | sqlDropString.append(tableName).append(dialect.getCascadeConstraintsString()); | 4 | sqlDropString.append(tableName).append(dialect.getCascadeConstraintsString()); | |
5 | if (dialect.supportsIfExistsAfterTableName()) | 5 | if (dialect.supportsIfExistsAfterTableName()) | |
6 | sqlDropString.append(" if exists"); | 6 | sqlDropString.append(" if exists"); | |
7 | return new String[] {sqlDropString.toString()}; | 7 | return new String[] {sqlDropString.toString()}; |
Row | Violation |
---|