public class CloseAllSQLResultTabsButCurrentAction extends SquirrelAction implements ISQLPanelAction { /** Current panel. */ private ISQLPanelAPI _panel; /** * Ctor specifying Application API. * * @param app Application API. */ public CloseAllSQLResultTabsButCurrentAction(IApplication app) { super(app); } public void setSQLPanel(ISQLPanelAPI panel) { _panel = panel; setEnabled(null != _panel); } /** * Display the previous results tab. * * @param evt Event being executed. */ public synchronized void actionPerformed(ActionEvent evt) { if (_panel != null) { _panel.closeAllButCurrentResultTabs()
public class ToolsPopupAction extends SquirrelAction implements ISQLPanelAction { private ISQLPanelAPI _panel; /** * Ctor. * * @param app Application API. */ public ToolsPopupAction(IApplication app) { super(app); } public void setSQLPanel(ISQLPanelAPI panel) { _panel = panel; setEnabled(null != panel); } /** * Perform this action. Use the <TT>CloseAllSQLResultTabsCommand</TT>. * * @param evt The current event. */ public void actionPerformed(ActionEvent evt) { if(null == _panel) { return; } _panel.showToolsPopup()
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/CloseAllSQLResultTabsButCurrentAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/ToolsPopupAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CloseAllSQLResultTabsButCurrentAction extends SquirrelAction
1
public class ToolsPopupAction extends SquirrelAction
2
											implements ISQLPanelAction
2
											implements ISQLPanelAction
3
{
3
{
4
	/** Current panel. */
5
	private ISQLPanelAPI _panel;
4
	private ISQLPanelAPI _panel;
6
	/**
5
	/**
7
	 * Ctor specifying Application API.
6
	 * Ctor.
8
	 *
7
	 *
9
	 * @param	app	Application API.
8
	 * @param	app		Application API.
10
	 */
9
	 */
11
	public CloseAllSQLResultTabsButCurrentAction(IApplication app)
10
	public ToolsPopupAction(IApplication app)
12
	{
11
	{
13
		super(app);
12
		super(app);
14
	}
13
	}
15
	public void setSQLPanel(ISQLPanelAPI panel)
14
	public void setSQLPanel(ISQLPanelAPI panel)
16
	{
15
	{
17
		_panel = panel;
16
		_panel = panel;
18
      setEnabled(null != _panel);
17
      setEnabled(null != panel);
19
	}
18
	}
20
	/**
19
	/**
21
	 * Display the previous results tab.
20
	 * Perform this action. Use the <TT>CloseAllSQLResultTabsCommand</TT>.
22
	 *
21
	 * 
23
	 * @param	evt		Event being executed.
22
	 * @param	evt		The current event.
24
	 */
23
	 */
25
	public synchronized void actionPerformed(ActionEvent evt)
24
	public void actionPerformed(ActionEvent evt)
26
	{
25
	{
27
		if (_panel != null)
26
      if(null == 
28
		{
29
         _panel.closeAllButCurrentResultTabs
27
_panel)
28
      {
29
         return;
30
      }
30
()
31
      _panel.showToolsPopup()
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