CursorChanger cursorChg = new CursorChanger(getApplication().getMainFrame()); cursorChg.show(); try { IPlugin plugin = _session.getApplication().getDummyAppPlugin(); _session.rollback(); } finally { cursorChg.restore(); }
CursorChanger cursorChg = new CursorChanger(_app.getMainFrame()); cursorChg.show(); try { super.actionPerformed(evt); } finally { cursorChg.restore(); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/RollbackAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/CascadeAction.java
Method name: void actionPerformed(ActionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 5 Number of AST nodes: 4
1
CursorChanger cursorChg = new CursorChanger(getApplication().getMainFrame());
1
CursorChanger cursorChg = new CursorChanger(_app.getMainFrame());
2
      cursorChg.show();
2
		cursorChg.show();
3
      try
4
      {
5
         IPlugin plugin = _session.getApplication().getDummyAppPlugin();
6
         _session.rollback();
7
      }
8
      finally
9
      {
10
         
3
		try
4
		{
5
			super.actionPerformed(evt);
6
		}
7
		finally
8
		{
11
cursorChg.restore();
9
			cursorChg.restore();
12
      }
10
		}
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)107.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    CursorChanger cursorChg = new CursorChanger(getApplication().getMainFrame());
    1
    CursorChanger cursorChg = new CursorChanger(getApplication().getMainFrame());
    1
    CursorChanger cursorChg = new CursorChanger(_app.getMainFrame());
    Differences
    Expression1Expression2Difference
    getApplication()_appFIELD_ACCESS_REPLACED_WITH_GETTER
    1
    CursorChanger cursorChg = new CursorChanger(_app.getMainFrame());
    2
    cursorChg.show();
    2
    cursorChg.show();
    3
    try
    3
    try
    4
    IPlugin plugin = _session.getApplication().getDummyAppPlugin();
                                                                                                                                    
    5
    _session.rollback();
    5
    _session.rollback();
    4
    super.actionPerformed(evt);
    Differences
    Expression1Expression2Difference
    _session.rollback()super.actionPerformed(evt)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression _session.rollback() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression _session.rollback() is a void method call, and thus it cannot be parameterized
    Expression super.actionPerformed(evt) is a void method call, and thus it cannot be parameterized
    Super method call super.actionPerformed(evt); cannot be extracted from method
    4
    super.actionPerformed(evt);
    Precondition Violations (4)
    Row Violation
    1Expression _session.rollback() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression _session.rollback() is a void method call, and thus it cannot be parameterized
    3Expression super.actionPerformed(evt) is a void method call, and thus it cannot be parameterized
    4Super method call super.actionPerformed(evt); cannot be extracted from method