try { dialect.getColumnNullableAlterSQL(notNullThirdCol, qualifier, prefs); failDialect(dialect, "column nullable alter"); } catch (UnsupportedOperationException e) { // this is expected System.err.println(e.getMessage()); }
try { dialect.getAddAutoIncrementSQL(autoIncrementColumn, qualifier, prefs); failDialect(dialect, "for adding an auto increment column"); } catch (Exception e) { // this is expected System.err.println(e.getMessage()); }
Clone fragments detected by clone detection tool
File path: /sql12/test/external/net/sourceforge/squirrel_sql/fw/dialects/DialectExternalTest.java File path: /sql12/test/external/net/sourceforge/squirrel_sql/fw/dialects/DialectExternalTest.java
Method name: void testAlterNull(ISession) Method name: void testAddAutoIncrement(ISession)
Number of AST nodes: 3 Number of AST nodes: 3
1
try {
1
try {
2
            dialect.getColumnNullableAlterSQL(notNullThirdCol, qualifier, prefs);
2
   			dialect.getAddAutoIncrementSQL(autoIncrementColumn, qualifier, prefs);
3
            failDialect(dialect, "column nullable alter");
3
   			failDialect(dialect, "for adding an auto increment column");
4
         } catch (UnsupportedOperationException e) {
4
   		} catch (Exception e) {
5
            // this is expected
5
   			// this is expected
6
            System.err.println(e.getMessage());
6
   			System.err.println(e.getMessage());
7
         }
7
   		}
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.4
Clones locationClones are declared in the same class
Number of node comparisons10
  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)809.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    11
    try
    11
    try
    8
    try
    Differences
    Expression1Expression2Difference
    java.lang.UnsupportedOperationExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.UnsupportedOperationExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    java.lang.UnsupportedOperationExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    8
    try
    12
    dialect.getColumnNullableAlterSQL(notNullThirdCol, qualifier, prefs);
    12
    dialect.getColumnNullableAlterSQL(notNullThirdCol, qualifier, prefs);
    9
    dialect.getAddAutoIncrementSQL(autoIncrementColumn, qualifier, prefs);
    Differences
    Expression1Expression2Difference
    notNullThirdColautoIncrementColumnVARIABLE_NAME_MISMATCH
    getColumnNullableAlterSQLgetAddAutoIncrementSQLMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression dialect.getColumnNullableAlterSQL(notNullThirdCol,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression dialect.getAddAutoIncrementSQL(autoIncrementColumn,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression dialect.getColumnNullableAlterSQL(notNullThirdCol,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    Expression dialect.getAddAutoIncrementSQL(autoIncrementColumn,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    9
    dialect.getAddAutoIncrementSQL(autoIncrementColumn, qualifier, prefs);
    13
    failDialect(dialect, "column nullable alter");
    13
    failDialect(dialect, "column nullable alter");
    10
    failDialect(dialect, "for adding an auto increment column");
    Differences
    Expression1Expression2Difference
    "column nullable alter""for adding an auto increment column"LITERAL_VALUE_MISMATCH
    10
    failDialect(dialect, "for adding an auto increment column");
    Precondition Violations (4)
    Row Violation
    1Expression dialect.getColumnNullableAlterSQL(notNullThirdCol,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    2Expression dialect.getAddAutoIncrementSQL(autoIncrementColumn,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    3Expression dialect.getColumnNullableAlterSQL(notNullThirdCol,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    4Expression dialect.getAddAutoIncrementSQL(autoIncrementColumn,qualifier,prefs) is a void method call, and thus it cannot be parameterized