if (!dialect.supportsDropView()) { try { dialect.getDropViewSQL(viewName, false, qualifier, prefs); failDialect(dialect, "dropping a view"); } catch (Exception e) { // this is expected System.err.println(e.getMessage()); } }
try { dialect.getDropSequenceSQL(testSequenceName, false, qualifier, prefs); failDialect(dialect, "for dropping a sequence"); } 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 testDropView(ISession) Method name: void testDropSequence(ISession)
Number of AST nodes: 4 Number of AST nodes: 3
1
if (!dialect.supportsDropView()) {
2
	   		try {
1
try {
3
	   			dialect.getDropViewSQL(viewName, false, qualifier, prefs);
2
   			dialect.getDropSequenceSQL(testSequenceName, false, qualifier, prefs);
4
	   			failDialect(dialect, "dropping a view");
3
   			failDialect(dialect, "for dropping a sequence");
5
	   		} catch (Exception e) {
4
   		} catch (Exception e) {
6
	   			// this is expected
5
   			// this is expected
7
	   			System.err.println(e.getMessage());
6
   			System.err.println(e.getMessage());
8
	   		}
9
   		}
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.3
Clones locationClones are declared in the same 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)10.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    try
    9
    try
    15
    dialect.getDropViewSQL(viewName, false, qualifier, prefs);
    15
    dialect.getDropViewSQL(viewName, false, qualifier, prefs);
    10
    dialect.getDropSequenceSQL(testSequenceName, false, qualifier, prefs);
    Differences
    Expression1Expression2Difference
    viewNametestSequenceNameVARIABLE_NAME_MISMATCH
    getDropViewSQLgetDropSequenceSQLMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression dialect.getDropViewSQL(viewName,false,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression dialect.getDropSequenceSQL(testSequenceName,false,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    Expression dialect.getDropViewSQL(viewName,false,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    Expression dialect.getDropSequenceSQL(testSequenceName,false,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    10
    dialect.getDropSequenceSQL(testSequenceName, false, qualifier, prefs);
    16
    failDialect(dialect, "dropping a view");
    16
    failDialect(dialect, "dropping a view");
    11
    failDialect(dialect, "for dropping a sequence");
    Differences
    Expression1Expression2Difference
    "dropping a view""for dropping a sequence"LITERAL_VALUE_MISMATCH
    11
    failDialect(dialect, "for dropping a sequence");
    Precondition Violations (4)
    Row Violation
    1Expression dialect.getDropViewSQL(viewName,false,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    2Expression dialect.getDropSequenceSQL(testSequenceName,false,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted
    3Expression dialect.getDropViewSQL(viewName,false,qualifier,prefs) is a void method call, and thus it cannot be parameterized
    4Expression dialect.getDropSequenceSQL(testSequenceName,false,qualifier,prefs) is a void method call, and thus it cannot be parameterized