public class IndexDefragAction extends SquirrelAction implements ISessionAction { private static final long serialVersionUID = 1L; private ISession _session; private final MssqlPlugin _plugin; private final ITableInfo _tableInfo; private final String _indexName; public IndexDefragAction(IApplication app, Resources rsrc, MssqlPlugin plugin, ITableInfo tableInfo, String indexName) { super(app, rsrc); /* the constructor above sets this from resources, but we'll override it with * the name of the index. */ putValue(javax.swing.Action.NAME,indexName); _plugin = plugin; _tableInfo = tableInfo; _indexName = indexName; } public void actionPerformed(ActionEvent evt) { if (_session != null) new IndexDefragCommand(_session, _plugin, _tableInfo, _indexName).execute(); } public void setSession(ISession session) { _session = session
public class ShowStatisticsAction extends SquirrelAction implements ISessionAction { private static final long serialVersionUID = 1L; transient private ISession _session; transient private final MssqlPlugin _plugin; private final ITableInfo _tableInfo; private final String _indexName; public ShowStatisticsAction(IApplication app, Resources rsrc, MssqlPlugin plugin, ITableInfo tableInfo, String indexName) { super(app, rsrc); /* the constructor above sets this from resources, but we'll override it with * the name of the index. */ putValue(javax.swing.Action.NAME,indexName); _plugin = plugin; _tableInfo = tableInfo; _indexName = indexName; } public void actionPerformed(ActionEvent evt) { if (_session != null) new ShowStatisticsCommand(_session, _plugin, _tableInfo, _indexName).execute(); } public void setSession(ISession session) { _session = session
Clone fragments detected by clone detection tool
File path: /sql12/plugins/mssql/src/net/sourceforge/squirrel_sql/plugins/mssql/action/IndexDefragAction.java File path: /sql12/plugins/mssql/src/net/sourceforge/squirrel_sql/plugins/mssql/action/ShowStatisticsAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class IndexDefragAction extends SquirrelAction implements ISessionAction {
1
public class ShowStatisticsAction extends SquirrelAction implements ISessionAction {
2
   private static final long serialVersionUID = 1L;
2
    private static final long serialVersionUID = 1L;
3
   
3
   
4
	private ISession _session;
4
 transient private ISession _session;
5
	private final MssqlPlugin _plugin;
5
	transient private final MssqlPlugin _plugin;
6
    
6
    
7
    private final ITableInfo _tableInfo;
7
    private final ITableInfo _tableInfo;
8
    private final String _indexName;
8
    private final String _indexName;
9
	public IndexDefragAction(IApplication app, Resources rsrc, MssqlPlugin plugin, ITableInfo tableInfo, String indexName) {
9
	public ShowStatisticsAction(IApplication app, Resources rsrc, MssqlPlugin plugin, ITableInfo tableInfo, String indexName) {
10
		super(app, rsrc);
10
		super(app, rsrc);
11
		/* the constructor above sets this from resources, but we'll override it with
11
		/* the constructor above sets this from resources, but we'll override it with
12
         * the name of the index. */
12
         * the name of the index. */
13
        putValue(javax.swing.Action.NAME,indexName);
13
        putValue(javax.swing.Action.NAME,indexName);
14
        _plugin = plugin;
14
        _plugin = plugin;
15
        _tableInfo = tableInfo;
15
        _tableInfo = tableInfo;
16
        _indexName = indexName;
16
        _indexName = indexName;
17
	}
17
	}
18
	public void actionPerformed(ActionEvent evt) {
18
	public void actionPerformed(ActionEvent evt) {
19
		if (_session != null)
19
		if (_session != null)
20
    		new IndexDefragCommand(_session, _plugin, _tableInfo, _indexName).execute();
20
    		new ShowStatisticsCommand(_session, _plugin, _tableInfo, _indexName).execute();
21
	}
21
	}
22
	public void setSession(ISession session) {
22
	public void setSession(ISession session) {
23
		_session = session
23
		_session = 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