if (listener == null) { throw new IllegalArgumentException("InternalFrameListener == null"); } _listenerList.add(WidgetListener.class, listener);
if (lis == null) { throw new IllegalArgumentException("ISQLExecutionListener == null"); } _listeners.add(ISQLExecutionListener.class, lis);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/WindowManager.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java
Method name: void addSessionWidgetListener(WidgetAdapter) Method name: void addSQLExecutionListener(ISQLExecutionListener)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (listener == null)
1
if (lis == null)
2
		{
2
		{
3
			throw new IllegalArgumentException("InternalFrameListener == null");
3
			throw new IllegalArgumentException("ISQLExecutionListener == null");
4
		}
4
		}
5
		_listenerList.add(WidgetListener.class, listener);
5
		_listeners.add(ISQLExecutionListener.class, lis);
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.1
Clones locationClones are in different classes
Number of node comparisons5
  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)1.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (listener == null)
    1
    if (listener == null)
    1
    if (lis == null)
    Differences
    Expression1Expression2Difference
    listenerlisVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapternet.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListenerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapter of variable listener does not match with type net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener of variable lis
    • Make classes net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapter and net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener extend a common superclass
    1
    if (lis == null)
    2
    throw new IllegalArgumentException("InternalFrameListener == null");
    2
    throw new IllegalArgumentException("InternalFrameListener == null");
    2
    throw new IllegalArgumentException("ISQLExecutionListener == null");
    Differences
    Expression1Expression2Difference
    "InternalFrameListener == null""ISQLExecutionListener == null"LITERAL_VALUE_MISMATCH
    2
    throw new IllegalArgumentException("ISQLExecutionListener == null");
    3
    _listenerList.add(WidgetListener.class, listener);
    3
    _listenerList.add(WidgetListener.class, listener);
    3
    _listeners.add(ISQLExecutionListener.class, lis);
    Differences
    Expression1Expression2Difference
    WidgetListener.classISQLExecutionListener.classLITERAL_VALUE_MISMATCH
    listenerlisVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapternet.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListenerVARIABLE_TYPE_MISMATCH
    _listenerList_listenersVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapter of variable listener does not match with type net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener of variable lis
    • Make classes net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapter and net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener extend a common superclass
    3
    _listeners.add(ISQLExecutionListener.class, lis);
    Precondition Violations (2)
    Row Violation
    1Type net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapter of variable listener does not match with type net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener of variable lis
    2Type net.sourceforge.squirrel_sql.client.gui.desktopcontainer.WidgetAdapter of variable listener does not match with type net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener of variable lis