super.removeNotify(); if (_lis != null) { getObjectTreePanel().removeObjectTreeListener(_lis); _lis = null; }
super.removeNotify(); if (_listLis != null) { _stylesList.removeListSelectionListener(_listLis); _listLis = null; }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/session/SessionPanel.java File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferencesPanel.java
Method name: void removeNotify() Method name: void removeNotify()
Number of AST nodes: 4 Number of AST nodes: 4
1
super.removeNotify();
1
super.removeNotify();
2
         if (_lis != null)
2
			if (_listLis != null)
3
         {
4
            getObjectTreePanel().removeObjectTreeListener(_lis);
5
            _lis = null;
6
         
3
			{
4
				_stylesList.removeListSelectionListener(_listLis);
5
				_listLis = null;
7
}
6
			}
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 having the same super class
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)37.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super.removeNotify();
    1
    super.removeNotify();
    1
    super.removeNotify();
    Preondition Violations
    Super method call super.removeNotify(); cannot be extracted from method
    Super method call super.removeNotify(); cannot be extracted from method
    1
    super.removeNotify();
    2
    if (_lis != null)
    2
    if (_lis != null)
    2
    if (_listLis != null)
    Differences
    Expression1Expression2Difference
    _lis_listLisVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.IObjectTreeListenernet.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListenerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.IObjectTreeListener of variable _lis does not match with type net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListener of variable _listLis
    • Make classes net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.IObjectTreeListener and net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListener extend a common superclass
    2
    if (_listLis != null)
                                                                                                              
    3
    _stylesList.removeListSelectionListener(_listLis);
    Preondition Violations
    Unmatched statement _stylesList.removeListSelectionListener(_listLis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    _stylesList.removeListSelectionListener(_listLis);
    3
    getObjectTreePanel().removeObjectTreeListener(_lis);
    3
    getObjectTreePanel().removeObjectTreeListener(_lis);
    Preondition Violations
    Unmatched statement getObjectTreePanel().removeObjectTreeListener(_lis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                  
                                      
    4
    _listLis = null;
    Preondition Violations
    Unmatched statement _listLis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4
    _listLis = null;
    4
    _lis = null;
    4
    _lis = null;
    Preondition Violations
    Unmatched statement _lis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                              
    Precondition Violations (8)
    Row Violation
    1Super method call super.removeNotify(); cannot be extracted from method
    2Super method call super.removeNotify(); cannot be extracted from method
    3Type net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.IObjectTreeListener of variable _lis does not match with type net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListener of variable _listLis
    4Unmatched statement _stylesList.removeListSelectionListener(_listLis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement getObjectTreePanel().removeObjectTreeListener(_lis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched statement _listLis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7Unmatched statement _lis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    8The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.session.SessionPanel.MyToolBar and net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel do not have a common superclass