if (tab == null) { throw new IllegalArgumentException("Null ResultTab passed"); } _tab = tab;
if (value == null) { throw new IllegalArgumentException("ActionClassName == null"); } _actionClassName = value;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/action/ActionKeys.java
Method name: void ResultTabInfo(ResultTab) Method name: void setActionClassName(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (tab == null)
1
if (value == null)
2
			{
2
		{
3
				throw new IllegalArgumentException("Null ResultTab passed");
3
			throw new IllegalArgumentException("ActionClassName == null");
4
			}
4
		}
5
			_tab = tab;
5
		_actionClassName = value;
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 comparisons5
  1. {Non-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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (tab == null)
    1
    if (tab == null)
    1
    if (value == null)
    Differences
    Expression1Expression2Difference
    tabvalueVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.session.mainpanel.ResultTabjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.session.mainpanel.ResultTab of variable tab does not match with type java.lang.String of variable value
    • Make classes net.sourceforge.squirrel_sql.client.session.mainpanel.ResultTab and java.lang.String extend a common superclass
    1
    if (value == null)
    2
    throw new IllegalArgumentException("Null ResultTab passed");
    2
    throw new IllegalArgumentException("Null ResultTab passed");
    2
    throw new IllegalArgumentException("ActionClassName == null");
    Differences
    Expression1Expression2Difference
    "Null ResultTab passed""ActionClassName == null"LITERAL_VALUE_MISMATCH
    2
    throw new IllegalArgumentException("ActionClassName == null");
                                                        
    3
    _actionClassName = value;
    Preondition Violations
    Unmatched statement _actionClassName=value; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    _actionClassName = value;
    3
    _tab = tab;
    3
    _tab = tab;
    Preondition Violations
    Unmatched statement _tab=tab; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                            
    Precondition Violations (3)
    Row Violation
    1Type net.sourceforge.squirrel_sql.client.session.mainpanel.ResultTab of variable tab does not match with type java.lang.String of variable value
    2Unmatched statement _actionClassName=value; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement _tab=tab; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted