public class CreateSelectScriptAction extends SquirrelAction implements IObjectTreeAction { /** * Current session. */ private ISession _session; /** * Current plugin. */ private final SQLScriptPlugin _plugin; public CreateSelectScriptAction(IApplication app, Resources rsrc, SQLScriptPlugin plugin) { super(app, rsrc); _plugin = plugin; } public void actionPerformed(ActionEvent evt) { if (_session != null) { new CreateSelectScriptCommand(_session, _plugin).execute(); } } /** * Set the current session. * * @param session The current session. */ public void setSession(ISession session) { _session = session; } public void setObjectTree(IObjectTreeAPI tree) { if (null != tree) { _session = tree.getSession(); } else { _session = null; } setEnabled(null != _session)
public class CreateTableScriptAction extends SquirrelAction implements IObjectTreeAction{ /** Current session. */ private ISession _session; /** Current plugin. */ private final SQLScriptPlugin _plugin; public CreateTableScriptAction(IApplication app, Resources rsrc, SQLScriptPlugin plugin) { super(app, rsrc); _plugin = plugin; } public void actionPerformed(ActionEvent evt) { if (_session != null) { new CreateTableScriptCommand(_session, _plugin).execute(); } } /** * Set the current session. * * @param session The current session. */ public void setSession(ISession session) { _session = session; } public void setObjectTree(IObjectTreeAPI tree) { if(null != tree) { _session = tree.getSession(); } else { _session = null; } setEnabled(null != _session)
Clone fragments detected by clone detection tool
File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateSelectScriptAction.java File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateTableScriptAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CreateSelectScriptAction 
1
public class CreateTableScriptAction 
2
extends SquirrelAction
2
    extends SquirrelAction
3
  implements IObjectTreeAction
3
    implements IObjectTreeAction
4
{
4
{
5
   /**
6
    * Current session.
5
	/** Current session.
7
    */
6
 */
8
   private ISession _session;
7
    private ISession _session;
9
   /**
10
    * Current plugin.
8
	/** Current plugin.
11
    */
9
 */
12
   private final SQLScriptPlugin _plugin;
10
	private final SQLScriptPlugin _plugin;
13
   public CreateSelectScriptAction(IApplication app, Resources rsrc, 
11
    public CreateTableScriptAction(IApplication app, Resources rsrc,
14
SQLScriptPlugin plugin)
12
    									SQLScriptPlugin plugin)
15
   {
13
 {
16
      super(app, rsrc);
14
        super(app, rsrc);
17
      _plugin = plugin;
15
        _plugin = plugin;
18
   }
16
    }
19
   public void actionPerformed(ActionEvent evt)
17
    public void actionPerformed(ActionEvent evt)
20
   {
18
 {
21
      if (_session != null)
19
        if (_session != null) {
22
      {
20
     
23
         new CreateSelectScriptCommand(_session, _plugin).execute();
21
       new CreateTableScriptCommand(_session, _plugin).execute();
24
      }
22
        }
25
   }
23
    }
26
   /**
24
	/**
27
    * Set the current session.
25
	 * Set the current session.
28
    *
29
   
26
	 * 
30
 * @param   session      The current session.
27
	 * @param	session		The current session.
31
    */
28
	 */
32
   public void setSession(ISession session)
29
    public void setSession(ISession session)
33
   {
30
 {
34
      _session = session;
31
        _session = session;
35
   }
32
    }
36
   public void setObjectTree(IObjectTreeAPI tree)
33
   public void setObjectTree(IObjectTreeAPI tree)
37
   {
34
   {
38
      if (null != tree)
35
      if(null != tree)
39
      {
36
      {
40
         _session = tree.getSession();
37
         _session = tree.getSession();
41
      }
38
      }
42
      else
39
      else
43
      {
40
      {
44
         _session = null;
41
         _session = null;
45
      }
42
      }
46
      setEnabled(null != _session)
43
      setEnabled(null != _session)
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