prefs.setQuoteConstraintNames(false); prefs.setQuoteColumnNames(false); return new String[] { DialectUtils.getAddUniqueConstraintSQL(tableName, constraintName, columns, qualifier, prefs, this) };
prefs.setQuoteColumnNames(false); // MySQL disallows quoted constraint names prefs.setQuoteConstraintNames(false); return super.getColumnDropSQL(tableName, columnName, qualifier, prefs);
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/OracleDialectExt.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/MySQLDialectExt.java
Method name: String[] getAddUniqueConstraintSQL(String, String, TableColumnInfo[], DatabaseObjectQualifier, SqlGenerationPreferences) Method name: String getColumnDropSQL(String, String, DatabaseObjectQualifier, SqlGenerationPreferences)
Number of AST nodes: 3 Number of AST nodes: 3
1
prefs.setQuoteConstraintNames(false);
1
prefs.setQuoteColumnNames(false);
2
		
2
		// MySQL disallows quoted constraint names
3
prefs.setQuoteColumnNames(false);
3
		prefs.setQuoteConstraintNames(false);
4
		
4
		
5
		return new String[] { DialectUtils.getAddUniqueConstraintSQL(tableName,
5
		return 
6
			constraintName,
7
			columns,
8
			qualifier,
6
super.getColumnDropSQL(tableName, columnName, qualifier,
9
			prefs,
7
 prefs
10
			this) };
8
);
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 having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    prefs.setQuoteConstraintNames(false);
    2
    prefs.setQuoteConstraintNames(false);
    2
    prefs.setQuoteColumnNames(false);
    1
    prefs.setQuoteColumnNames(false);
                                                                                                                                                  
    3
    return super.getColumnDropSQL(tableName, columnName, qualifier, prefs);
    3
    return new String[] {DialectUtils.getAddUniqueConstraintSQL(tableName, constraintName, columns, qualifier, prefs, this)};
    3
    return new String[] {DialectUtils.getAddUniqueConstraintSQL(tableName, constraintName, columns, qualifier, prefs, this)};
    Preondition Violations
    Unmatched statement return new String[]{DialectUtils.getAddUniqueConstraintSQL(tableName,constraintName,columns,qualifier,prefs,this)}; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return new String[]{DialectUtils.getAddUniqueConstraintSQL(tableName,constraintName,columns,qualifier,prefs,this)};
                                                                                                                                                                                                                                                
    Precondition Violations (2)
    Row Violation
    1Unmatched statement return new String[]{DialectUtils.getAddUniqueConstraintSQL(tableName,constraintName,columns,qualifier,prefs,this)}; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched return new String[]{DialectUtils.getAddUniqueConstraintSQL(tableName,constraintName,columns,qualifier,prefs,this)};