try { dialect.getViewDefinitionSQL(viewName, qualifier, prefs); failDialect(dialect, "getting the view definition"); } catch (Exception e) { // this is expected System.err.println(e.getMessage()); }
try { dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs); failDialect(dialect, "getting sequence info"); } 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 testGetViewDefinition(ISession) Method name: void testGetSequenceInfo(ISession)
Number of AST nodes: 3 Number of AST nodes: 3
1
try {
1
try {
2
   			dialect.getViewDefinitionSQL(viewName, qualifier, prefs);
2
   			dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs);
3
   			failDialect(dialect, "getting the view definition");
3
   			failDialect(dialect, "getting sequence info");
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 cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)1.1
Clones locationClones are declared in the same class
Number of node comparisons15
  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)1268.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    21
    try
    13
    try
    22
    dialect.getViewDefinitionSQL(viewName, qualifier, prefs);
    22
    dialect.getViewDefinitionSQL(viewName, qualifier, prefs);
    14
    dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs);
    Differences
    Expression1Expression2Difference
    viewNametestSequenceNameVARIABLE_NAME_MISMATCH
    getViewDefinitionSQLgetSequenceInformationSQLMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression dialect.getViewDefinitionSQL(viewName,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression dialect.getSequenceInformationSQL(testSequenceName,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression dialect.getViewDefinitionSQL(viewName,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    Expression dialect.getSequenceInformationSQL(testSequenceName,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    14
    dialect.getSequenceInformationSQL(testSequenceName, qualifier, prefs);
    23
    failDialect(dialect, "getting the view definition");
    23
    failDialect(dialect, "getting the view definition");
    15
    failDialect(dialect, "getting sequence info");
    Differences
    Expression1Expression2Difference
    "getting the view definition""getting sequence info"LITERAL_VALUE_MISMATCH
    15
    failDialect(dialect, "getting sequence info");
    Precondition Violations (4)
    Row Violation
    1Expression dialect.getViewDefinitionSQL(viewName,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    2Expression dialect.getSequenceInformationSQL(testSequenceName,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    3Expression dialect.getViewDefinitionSQL(viewName,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    4Expression dialect.getSequenceInformationSQL(testSequenceName,qualifier,prefs) is a void method call, and thus it cannot be parameterized