public class RefreshSchemaInfoAction extends SquirrelAction implements ISessionAction { /** Current Object Tree. */ private ISession _session; /** * Ctor specifying application API. */ public RefreshSchemaInfoAction(IApplication app) { super(app); } public void setSession(ISession session) { _session = session; } public void actionPerformed(ActionEvent evt) { if (_session != null) { IObjectTreeAPI objectTreeAPI = _session.getSessionSheet().getObjectTreePanel(); CursorChanger cursorChg = new CursorChanger(getApplication().getMainFrame()); cursorChg.show(); try { new RefreshObjectTreeCommand(objectTreeAPI).execute(); } finally { cursorChg.restore()
public class ShowNativeSQLAction extends SquirrelAction implements ISQLPanelAction { private ISQLPanelAPI _panel; /** * Ctor. * * @param app Application API. */ public ShowNativeSQLAction(IApplication app) { super(app); } public void setSQLPanel(ISQLPanelAPI panel) { _panel = panel; setEnabled(null != _panel); } /** * Perform this action. Use the <TT>ShowNativeSQLCommand</TT>. * * @param evt The current event. */ public void actionPerformed(ActionEvent evt) { IApplication app = getApplication(); CursorChanger cursorChg = new CursorChanger(app.getMainFrame()); cursorChg.show(); try { new ShowNativeSQLCommand(_panel).execute(); } finally { cursorChg.restore()
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/RefreshSchemaInfoAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/ShowNativeSQLAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class RefreshSchemaInfoAction extends SquirrelAction
1
public class ShowNativeSQLAction extends SquirrelAction
2
                              implements ISessionAction
2
									implements ISQLPanelAction
3
{
3
{
4
   /** Current Object Tree. */
5
   private ISession _session;
6
   
4
	private ISQLPanelAPI _panel;
7
/**
5
	/**
8
    * Ctor specifying a
6
	 * Ctor.
7
	 *
9
pplication API.
8
	 * @param	app		Application API.
10
    */
9
	 */
11
   public RefreshSchemaInfoAction(IApplication app)
10
	public ShowNativeSQLAction(IApplication app)
12
   {
13
      
11
	{
14
super(app);
12
		super(app);
15
   }
16
   
13
	}
17
public void setSession(ISession session)
14
	public void setS
18
   {
19
      _session = session;
20
   }
21
   
15
QLPanel(ISQLPanelAPI panel)
16
	{
17
		_panel = panel;
18
      setEnabled(null != _panel);
19
	}
20
	/**
21
	 * Perform this action. Use the <TT>ShowNativeSQLCommand</TT>.
22
	 *
23
	 * @param	evt	The current event.
24
	 */
22
public void actionPerformed(ActionEvent evt)
25
	public void actionPerformed(ActionEvent evt)
23
   {
24
      if (_session != null)
25
      {
26
         IObjectTreeAPI objectTreeAPI = _session.getSessionSheet().getObjectTreePanel();
27
         
26
	{
27
		IApplication app = getApplication();
28
CursorChanger cursorChg = new CursorChanger(getApplication().getMainFrame());
28
		CursorChanger cursorChg = new CursorChanger(app.getMainFrame());
29
         cursorChg.show();
29
		cursorChg.show();
30
         try
31
         {
32
            new RefreshObjectTreeCommand(objectTreeAPI).execute();
33
         }
34
         finally
35
         {
36
            
30
		try
31
		{
32
			new ShowNativeSQLCommand(_panel).execute();
33
		}
34
		finally
35
		{
37
cursorChg.restore()
36
			cursorChg.restore()
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0