super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } if (driver == null) { throw new IllegalArgumentException("ISQLDriver == null"); } _app = app; _driver = driver;
super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } if (sqlAlias == null) { throw new IllegalArgumentException("Null ISQLAlias passed"); } _app = app; _sqlAlias = sqlAlias;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/ModifyDriverCommand.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/CopyAliasCommand.java
Method name: void ModifyDriverCommand(IApplication, ISQLDriver) Method name: void CopyAliasCommand(IApplication, SQLAlias)
Number of AST nodes: 7 Number of AST nodes: 7
1
super();
1
super();
2
		if (app == null)
2
      if (app == null)
3
		{
4
			
3
      {
5
throw new IllegalArgumentException("IApplication == null");
4
         throw new IllegalArgumentException("IApplication == null");
6
		}
7
		if (driver == null)
8
		{
9
			
5
      }
6
      if (sqlAlias == null)
7
      {
10
throw new IllegalArgumentException("ISQLDriver == null");
8
         throw new IllegalArgumentException("
11
		}
12
		_app = app;
13
		_driver = driver
9
Null ISQLAlias passed");
10
      }
11
      _app = app;
14
;
12
      _sqlAlias = sqlAlias;
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 in different classes
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super();
    1
    super();
    1
    super();
    Preondition Violations
    Super constructor call super(); cannot be extracted from constructor
    Super constructor call super(); cannot be extracted from constructor
    1
    super();
    2
    if (app == null)
    2
    if (app == null)
    3
    throw new IllegalArgumentException("IApplication == null");
    3
    throw new IllegalArgumentException("IApplication == null");
    4
    if (driver == null)
    4
    if (driver == null)
    4
    if (sqlAlias == null)
    Differences
    Expression1Expression2Difference
    driversqlAliasVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.ISQLDrivernet.sourceforge.squirrel_sql.client.gui.db.SQLAliasSUBCLASS_TYPE_MISMATCH
    4
    if (sqlAlias == null)
    5
    throw new IllegalArgumentException("ISQLDriver == null");
    5
    throw new IllegalArgumentException("ISQLDriver == null");
    5
    throw new IllegalArgumentException("Null ISQLAlias passed");
    Differences
    Expression1Expression2Difference
    "ISQLDriver == null""Null ISQLAlias passed"LITERAL_VALUE_MISMATCH
    5
    throw new IllegalArgumentException("Null ISQLAlias passed");
    6
    _app = app;
    6
    _app = app;
    7
    _driver = driver;
    7
    _driver = driver;
    7
    _sqlAlias = sqlAlias;
    Differences
    Expression1Expression2Difference
    _driver_sqlAliasVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.ISQLDrivernet.sourceforge.squirrel_sql.client.gui.db.SQLAliasSUBCLASS_TYPE_MISMATCH
    driversqlAliasVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.ISQLDrivernet.sourceforge.squirrel_sql.client.gui.db.SQLAliasSUBCLASS_TYPE_MISMATCH
    7
    _sqlAlias = sqlAlias;
    Precondition Violations (2)
    Row Violation
    1Super constructor call super(); cannot be extracted from constructor
    2Super constructor call super(); cannot be extracted from constructor