super.removeNotify(); if (_listLis != null) { _stylesList.removeListSelectionListener(_listLis); _listLis = null; }
super.removeNotify(); if (_propsLis != null) { _app.getSquirrelPreferences().removePropertyChangeListener(_propsLis); _propsLis = null; }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferencesPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/mainframe/MainFrameMenuBar.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 (_listLis != null)
2
		if (_propsLis != null)
3
			{
3
		{
4
				_stylesList.removeListSelectionListener(_listLis);
4
			_app.getSquirrelPreferences().removePropertyChangeListener(_propsLis);
5
				_listLis = null;
5
			_propsLis = null;
6
			}
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.2
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)24.4
    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 (_listLis != null)
    2
    if (_listLis != null)
    2
    if (_propsLis != null)
    Differences
    Expression1Expression2Difference
    _listLis_propsLisVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListenernet.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameMenuBar.SquirrelPropertiesListenerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListener of variable _listLis does not match with type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameMenuBar.SquirrelPropertiesListener of variable _propsLis
    • Make classes net.sourceforge.squirrel_sql.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListener and net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameMenuBar.SquirrelPropertiesListener extend a common superclass
    2
    if (_propsLis != null)
                                                                                                                                                      
    3
    _app.getSquirrelPreferences().removePropertyChangeListener(_propsLis);
    Preondition Violations
    Unmatched statement _app.getSquirrelPreferences().removePropertyChangeListener(_propsLis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    _app.getSquirrelPreferences().removePropertyChangeListener(_propsLis);
    3
    _stylesList.removeListSelectionListener(_listLis);
    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
                                                                                                              
                                        
    4
    _propsLis = null;
    Preondition Violations
    Unmatched statement _propsLis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4
    _propsLis = null;
    4
    _listLis = null;
    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
                                      
    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.plugins.syntax.SyntaxPreferencesPanel.MyPanel.StylesListSelectionListener of variable _listLis does not match with type net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameMenuBar.SquirrelPropertiesListener of variable _propsLis
    4Unmatched statement _app.getSquirrelPreferences().removePropertyChangeListener(_propsLis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement _stylesList.removeListSelectionListener(_listLis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched statement _propsLis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7Unmatched statement _listLis=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.plugins.syntax.SyntaxPreferencesPanel.MyPanel and net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrameMenuBar do not have a common superclass