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.getAddPrimaryKeySQL(pkName, colInfos, ti, 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[] getAddPrimaryKeySQL(String, TableColumnInfo[], ITableInfo, 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.getAddPrimaryKeySQL(pkName, colInfos, ti, 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 statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    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 new String[] {DialectUtils.getAddUniqueConstraintSQL(tableName, constraintName, columns, qualifier, prefs, this)};
    3
    return new String[] {DialectUtils.getAddUniqueConstraintSQL(tableName, constraintName, columns, qualifier, prefs, this)};
    3
    return super.getAddPrimaryKeySQL(pkName, colInfos, ti, qualifier, prefs);
    Differences
    Expression1Expression2Difference
    new String[]{DialectUtils.getAddUniqueConstraintSQL(tableName,constraintName,columns,qualifier,prefs,this)}super.getAddPrimaryKeySQL(pkName,colInfos,ti,qualifier,prefs)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression new String[]{DialectUtils.getAddUniqueConstraintSQL(tableName,constraintName,columns,qualifier,prefs,this)} cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression super.getAddPrimaryKeySQL(pkName,colInfos,ti,qualifier,prefs) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Super method call return super.getAddPrimaryKeySQL(pkName,colInfos,ti,qualifier,prefs); cannot be extracted from method
    3
    return super.getAddPrimaryKeySQL(pkName, colInfos, ti, qualifier, prefs);
    Precondition Violations (3)
    Row Violation
    1Expression new String[]{DialectUtils.getAddUniqueConstraintSQL(tableName,constraintName,columns,qualifier,prefs,this)} cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression super.getAddPrimaryKeySQL(pkName,colInfos,ti,qualifier,prefs) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Super method call return super.getAddPrimaryKeySQL(pkName,colInfos,ti,qualifier,prefs); cannot be extracted from method