public class NewObjectTreeAction extends SquirrelAction implements ISessionAction { private ISession _session; /** * Ctor. * * @param app Application API. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>IApplication</TT> passed. */ public NewObjectTreeAction(IApplication app) { super(app); if (app == null) { throw new IllegalArgumentException("Null IApplication passed"); } setEnabled(false); } /** * Display the tree. * * @param evt The event being processed. */ public void actionPerformed(ActionEvent evt) { getApplication().getWindowManager().createObjectTreeInternalFrame(_session); } public void setSession(ISession session) { _session = session; GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { setEnabled(null != _session)
public class NewSQLWorksheetAction extends SquirrelAction implements ISessionAction { private ISession _session; /** * Ctor. * * @param app Application API. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>IApplication</TT> passed. */ public NewSQLWorksheetAction(IApplication app) { super(app); if (app == null) { throw new IllegalArgumentException("Null IApplication passed"); } setEnabled(false); } /** * Display a new worksheet. * * @param evt The event being processed. */ public void actionPerformed(ActionEvent evt) { getApplication().getWindowManager().createSQLInternalFrame(_session); } public void setSession(ISession session) { _session = session; GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { setEnabled(null != _session)
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/NewObjectTreeAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/NewSQLWorksheetAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class NewObjectTreeAction extends SquirrelAction implements ISessionAction
1
public class NewSQLWorksheetAction extends SquirrelAction implements ISessionAction
2
{
2
{
3
   private ISession _session;
3
   private ISession _session;
4
   /**
4
   /**
5
    * Ctor.
5
    * Ctor.
6
    *
6
    *
7
    * @param	app	 Application API.
7
    * @param	app	 Application API.
8
    *
8
    *
9
    * @throws	IllegalArgumentException
9
    * @throws		IllegalArgumentException
10
    *			Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.
10
    *				Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.
11
    */
11
    */
12
   public NewObjectTreeAction(IApplication app)
12
   public NewSQLWorksheetAction(IApplication app)
13
   {
13
   {
14
      super(app);
14
      super(app);
15
      if (app == null)
15
      if (app == null)
16
      {
16
      {
17
         throw new IllegalArgumentException("Null IApplication passed");
17
         throw new IllegalArgumentException("Null IApplication passed");
18
      }
18
      }
19
      
20
      setEnabled(false);
19
      setEnabled(false);
21
   }
20
   }
22
	/**
21
	/**
23
	 * Display the tree.
22
	 * Display a new worksheet.
24
	 *
23
	 *
25
	 * @param	evt	 The event being processed.
24
	 * @param	evt	 The event being processed.
26
	 */
25
	 */
27
	public void actionPerformed(ActionEvent evt)
26
	public void actionPerformed(ActionEvent evt)
28
	{
27
	{
29
		getApplication().getWindowManager().createObjectTreeInternalFrame(_session);
28
		getApplication().getWindowManager().createSQLInternalFrame(_session);
30
	}
29
	}
31
   public void setSession(ISession session)
30
   public void setSession(ISession session)
32
   {
31
   {
33
      _session = session;
32
      _session = session;
34
      GUIUtils.processOnSwingEventThread(new Runnable() {
33
      GUIUtils.processOnSwingEventThread(new Runnable() {
35
          public void run() {
34
          public void run() {
36
              setEnabled(null != _session)
35
              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