if(null != _isqlEntryPanel) { uncomment(_isqlEntryPanel); } else if (null != _panel) { uncomment(_panel.getSQLEntryPanel()); }
if(null != _isqlEntryPanel) { duplicateLineAction(_isqlEntryPanel); } else if (null != _panel) { duplicateLineAction(_panel.getSQLEntryPanel()); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/UncommentAction.java File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/DuplicateLineAction.java
Method name: void actionPerformed(ActionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 4 Number of AST nodes: 4
1
if(null != _isqlEntryPanel)
1
if(null != _isqlEntryPanel)
2
      {
2
      {
3
         uncomment(_isqlEntryPanel);
3
         duplicateLineAction(_isqlEntryPanel);
4
      }
4
      }
5
      else if (null != _panel)
5
      else if (null != _panel)
6
      {
6
      {
7
         uncomment(_panel.getSQLEntryPanel());
7
         duplicateLineAction(_panel.getSQLEntryPanel());
8
      }
8
      }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)7.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (null != _isqlEntryPanel)
    1
    if (null != _isqlEntryPanel)
    2
    uncomment(_isqlEntryPanel);
    2
    uncomment(_isqlEntryPanel);
    2
    duplicateLineAction(_isqlEntryPanel);
    Differences
    Expression1Expression2Difference
    uncommentduplicateLineActionMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression uncomment(_isqlEntryPanel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method uncomment
    Expression duplicateLineAction(_isqlEntryPanel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method duplicateLineAction
    Expression uncomment(_isqlEntryPanel) is a void method call, and thus it cannot be parameterized
    Expression duplicateLineAction(_isqlEntryPanel) is a void method call, and thus it cannot be parameterized
    2
    duplicateLineAction(_isqlEntryPanel);
    3
    else if (null != _panel)
    3
    else if (null != _panel)
    4
    uncomment(_panel.getSQLEntryPanel());
    4
    uncomment(_panel.getSQLEntryPanel());
    4
    duplicateLineAction(_panel.getSQLEntryPanel());
    Differences
    Expression1Expression2Difference
    uncommentduplicateLineActionMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression uncomment(_panel.getSQLEntryPanel()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method uncomment
    Expression duplicateLineAction(_panel.getSQLEntryPanel()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method duplicateLineAction
    Expression uncomment(_panel.getSQLEntryPanel()) is a void method call, and thus it cannot be parameterized
    Expression duplicateLineAction(_panel.getSQLEntryPanel()) is a void method call, and thus it cannot be parameterized
    4
    duplicateLineAction(_panel.getSQLEntryPanel());
    Precondition Violations (8)
    Row Violation
    1Expression uncomment(_isqlEntryPanel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression duplicateLineAction(_isqlEntryPanel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression uncomment(_isqlEntryPanel) is a void method call, and thus it cannot be parameterized
    4Expression duplicateLineAction(_isqlEntryPanel) is a void method call, and thus it cannot be parameterized
    5Expression uncomment(_panel.getSQLEntryPanel()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression duplicateLineAction(_panel.getSQLEntryPanel()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression uncomment(_panel.getSQLEntryPanel()) is a void method call, and thus it cannot be parameterized
    8Expression duplicateLineAction(_panel.getSQLEntryPanel()) is a void method call, and thus it cannot be parameterized