super(); if (objectInfo == null) { throw new IllegalArgumentException("Null IDatabaseObjectInfo passed"); } if (objectTree == null) { throw new IllegalArgumentException("Null IObjectTreeAPI passed"); } _objectTree = objectTree; _objectInfo = objectInfo;
super(); if (newCursor == null) { throw new IllegalArgumentException("null Cursor passed"); } if (comp == null) { throw new IllegalArgumentException("null Component passed"); } _comp = comp; _newCursor = newCursor;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/SQLFilterCommand.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/CursorChanger.java
Method name: void SQLFilterCommand(IObjectTreeAPI, IDatabaseObjectInfo) Method name: void CursorChanger(Component, Cursor)
Number of AST nodes: 7 Number of AST nodes: 7
1
super();
1
super();
2
		if (objectInfo == null)
2
		if (newCursor == null)
3
		{
3
		{
4
			throw new IllegalArgumentException("Null IDatabaseObjectInfo passed");
4
			throw new IllegalArgumentException("null Cursor passed");
5
		}
5
		}
6
		if (objectTree == null)
6
		if (comp == null)
7
		{
7
		{
8
			throw new IllegalArgumentException("Null IObjectTreeAPI passed");
8
			throw new IllegalArgumentException("null Component passed");
9
		}
9
		}
10
		_objectTree = objectTree;
10
		_
11
		_objectInfo = objectInfo
11
comp = comp;
12
;
12
		_newCursor = newCursor;
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.2
Clones locationClones are in different classes
Number of node comparisons22
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    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 (objectInfo == null)
    2
    if (objectInfo == null)
    2
    if (newCursor == null)
    Differences
    Expression1Expression2Difference
    objectInfonewCursorVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfojava.awt.CursorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo of variable objectInfo does not match with type java.awt.Cursor of variable newCursor
    • Make classes net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo and java.awt.Cursor extend a common superclass
    2
    if (newCursor == null)
    3
    throw new IllegalArgumentException("Null IDatabaseObjectInfo passed");
    3
    throw new IllegalArgumentException("Null IDatabaseObjectInfo passed");
    3
    throw new IllegalArgumentException("null Cursor passed");
    Differences
    Expression1Expression2Difference
    "Null IDatabaseObjectInfo passed""null Cursor passed"LITERAL_VALUE_MISMATCH
    3
    throw new IllegalArgumentException("null Cursor passed");
    4
    if (objectTree == null)
    4
    if (objectTree == null)
    4
    if (comp == null)
    Differences
    Expression1Expression2Difference
    objectTreecompVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.session.IObjectTreeAPIjava.awt.ComponentVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI of variable objectTree does not match with type java.awt.Component of variable comp
    • Make classes net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI and java.awt.Component extend a common superclass
    4
    if (comp == null)
    5
    throw new IllegalArgumentException("Null IObjectTreeAPI passed");
    5
    throw new IllegalArgumentException("Null IObjectTreeAPI passed");
    5
    throw new IllegalArgumentException("null Component passed");
    Differences
    Expression1Expression2Difference
    "Null IObjectTreeAPI passed""null Component passed"LITERAL_VALUE_MISMATCH
    5
    throw new IllegalArgumentException("null Component passed");
                                
    6
    _comp = comp;
    Preondition Violations
    Unmatched statement _comp=comp; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6
    _comp = comp;
    6
    _objectTree = objectTree;
    6
    _objectTree = objectTree;
    Preondition Violations
    Unmatched statement _objectTree=objectTree; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                        
                                                    
    7
    _newCursor = newCursor;
    Preondition Violations
    Unmatched statement _newCursor=newCursor; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7
    _newCursor = newCursor;
    7
    _objectInfo = objectInfo;
    7
    _objectInfo = objectInfo;
    Preondition Violations
    Unmatched statement _objectInfo=objectInfo; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                        
    Precondition Violations (8)
    Row Violation
    1Super constructor call super(); cannot be extracted from constructor
    2Super constructor call super(); cannot be extracted from constructor
    3Type net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo of variable objectInfo does not match with type java.awt.Cursor of variable newCursor
    4Type net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI of variable objectTree does not match with type java.awt.Component of variable comp
    5Unmatched statement _comp=comp; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched statement _objectTree=objectTree; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7Unmatched statement _newCursor=newCursor; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    8Unmatched statement _objectInfo=objectInfo; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted