if (_refreshPeriod != seconds) { _refreshPeriod = seconds; resetTimer(); }
if (_showToolbar != value) { _showToolbar = value; getPropertyChangeReporter().firePropertyChange( IPropertyNames.SHOW_TOOL_BAR, !_showToolbar, _showToolbar); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/dboutput/DBOutputPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionProperties.java
Method name: void setAutoRefreshPeriod(int) Method name: void setShowToolBar(boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (_refreshPeriod != seconds)
1
if (_
2
      {
3
         _refreshPeriod = seconds;
4
         resetTimer(
2
showToolbar != value)
3
      {
4
         _showToolbar = value;
5
         getPropertyChangeReporter().firePropertyChange(
6
            IPropertyNames.SHOW_TOOL_BAR,
5
);
7
            !_showToolbar, _showToolbar);
6
      }
8
      }
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_refreshPeriod != seconds)
    1
    if (_refreshPeriod != seconds)
    1
    if (_showToolbar != value)
    Differences
    Expression1Expression2Difference
    _refreshPeriod_showToolbarVARIABLE_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    secondsvalueVARIABLE_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable _refreshPeriod does not match with type boolean of variable _showToolbar
    Type int of variable seconds does not match with type boolean of variable value
    1
    if (_showToolbar != value)
                                                
    2
    _showToolbar = value;
    Preondition Violations
    Unmatched statement _showToolbar=value; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    _showToolbar = value;
    2
    _refreshPeriod = seconds;
    2
    _refreshPeriod = seconds;
    Preondition Violations
    Unmatched statement _refreshPeriod=seconds; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                        
                                                                                                                                                                                                                          
    3
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_TOOL_BAR, !_showToolbar, _showToolbar);
    Preondition Violations
    Unmatched statement getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_TOOL_BAR,!_showToolbar,_showToolbar); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_TOOL_BAR, !_showToolbar, _showToolbar);
    3
    resetTimer();
    3
    resetTimer();
    Preondition Violations
    Unmatched statement resetTimer(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                    
    Precondition Violations (7)
    Row Violation
    1Type int of variable _refreshPeriod does not match with type boolean of variable _showToolbar
    2Type int of variable seconds does not match with type boolean of variable value
    3Unmatched statement _showToolbar=value; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement _refreshPeriod=seconds; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement getPropertyChangeReporter().firePropertyChange(IPropertyNames.SHOW_TOOL_BAR,!_showToolbar,_showToolbar); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched statement resetTimer(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero