super.removeNotify(); if (_prefsListener != null) { _prefs.removePropertyChangeListener(_prefsListener); _prefsListener = null; }
super.removeNotify(); if (_lis != null) { _ta.removeMouseListener(_lis); _lis = null; }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/builders/SquirrelTabbedPane.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/PopupEditableIOPanel.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 (_prefsListener != null)
2
		if (_lis != null)
3
		{
3
		{
4
			_prefs.removePropertyChangeListener(_prefsListener);
4
			_ta.remove
5
			_prefsListener
5
MouseListener(_lis);
6
 = null;
6
			_lis = null;
7
		}
7
		}
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)14.5
    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 (_prefsListener != null)
    2
    if (_prefsListener != null)
    2
    if (_lis != null)
    Differences
    Expression1Expression2Difference
    _prefsListener_lisVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.gui.builders.SquirrelTabbedPane.PropsListenerjava.awt.event.MouseAdapterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.builders.SquirrelTabbedPane.PropsListener of variable _prefsListener does not match with type java.awt.event.MouseAdapter of variable _lis
    • Make classes net.sourceforge.squirrel_sql.client.gui.builders.SquirrelTabbedPane.PropsListener and java.awt.event.MouseAdapter extend a common superclass
    2
    if (_lis != null)
                                                                      
    3
    _ta.removeMouseListener(_lis);
    Preondition Violations
    Unmatched statement _ta.removeMouseListener(_lis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    _ta.removeMouseListener(_lis);
    3
    _prefs.removePropertyChangeListener(_prefsListener);
    3
    _prefs.removePropertyChangeListener(_prefsListener);
    Preondition Violations
    Unmatched statement _prefs.removePropertyChangeListener(_prefsListener); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                  
                              
    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
    4
    _lis = null;
    4
    _prefsListener = null;
    4
    _prefsListener = null;
    Preondition Violations
    Unmatched statement _prefsListener=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.gui.builders.SquirrelTabbedPane.PropsListener of variable _prefsListener does not match with type java.awt.event.MouseAdapter of variable _lis
    4Unmatched statement _ta.removeMouseListener(_lis); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement _prefs.removePropertyChangeListener(_prefsListener); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched statement _lis=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7Unmatched statement _prefsListener=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.builders.SquirrelTabbedPane and net.sourceforge.squirrel_sql.fw.datasetviewer.PopupEditableIOPanel do not have a common superclass