try { dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs); failDialect(dialect, "getting sequence info"); } catch (Exception 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 testGetSequenceInfo(ISession) Method name: void testAddAutoIncrement(ISession)
Number of AST nodes: 3 Number of AST nodes: 3
1
try {
1
try {
2
   			dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs);
2
   			dialect.getAddAutoIncrementSQL(autoIncrementColumn, qualifier, prefs);
3
   			failDialect(dialect, "getting sequence info");
3
   			failDialect(dialect, "for adding an auto increment column");
4
   		} catch (Exception 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 cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons10
  1. {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)1.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    13
    try
    8
    try
                                                                                                                                                  
    9
    dialect.getAddAutoIncrementSQL(autoIncrementColumn, qualifier, prefs);
    Preondition Violations
    Unmatched statement dialect.getAddAutoIncrementSQL(autoIncrementColumn,qualifier,prefs); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    9
    dialect.getAddAutoIncrementSQL(autoIncrementColumn, qualifier, prefs);
    14
    dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs);
    14
    dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs);
    Preondition Violations
    Unmatched statement dialect.getSequenceInformationSQL(testSequenceName,qualifier,prefs); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
                                                                                                                                                    
    15
    failDialect(dialect, "getting sequence info");
    15
    failDialect(dialect, "getting sequence info");
    10
    failDialect(dialect, "for adding an auto increment column");
    Differences
    Expression1Expression2Difference
    "getting sequence info""for adding an auto increment column"LITERAL_VALUE_MISMATCH
    10
    failDialect(dialect, "for adding an auto increment column");
    Precondition Violations (2)
    Row Violation
    1Unmatched statement dialect.getAddAutoIncrementSQL(autoIncrementColumn,qualifier,prefs); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted
    2Unmatched statement dialect.getSequenceInformationSQL(testSequenceName,qualifier,prefs); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted