public class CatalogsTab extends BaseDataSetTab { /** Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(CatalogsTab.class); /** * Return the title for the tab. * * @return The title for the tab. */ public String getTitle() { // i18n[CatalogsTab.title=Catalogs] return s_stringMgr.getString("CatalogsTab.title"); } /** * Return the hint for the tab. * * @return The hint for the tab. */ public String getHint() { // i18n[CatalogsTab.hint=Show all the catalogs] return s_stringMgr.getString("CatalogsTab.hint"); } /** * Create the <TT>IDataSet</TT> to be displayed in this tab. */ protected IDataSet createDataSet() throws DataSetException { final ISession session = getSession(); try { final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData(); return new ObjectArrayDataSet(md.getCatalogs()); } catch (SQLException ex) { throw new DataSetException(ex);
public class SystemFunctionsTab extends BaseDataSetTab { /** Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(SystemFunctionsTab.class); /** * Return the title for the tab. * * @return The title for the tab. */ public String getTitle() { // i18n[SystemFunctionsTab.title=System Functions] return s_stringMgr.getString("SystemFunctionsTab.title"); } /** * Return the hint for the tab. * * @return The hint for the tab. */ public String getHint() { // i18n[SystemFunctionsTab.hint=Show all the system functions available in DBMS] return s_stringMgr.getString("SystemFunctionsTab.hint"); } /** * Create the <TT>IDataSet</TT> to be displayed in this tab. */ protected IDataSet createDataSet() throws DataSetException { final ISession session = getSession(); try { final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData(); return new ObjectArrayDataSet(md.getSystemFunctions()); } catch (SQLException ex) { throw new DataSetException(ex);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/database/CatalogsTab.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/database/SystemFunctionsTab.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CatalogsTab extends BaseDataSetTab
1
public class SystemFunctionsTab extends BaseDataSetTab
2
{
2
{
3
    /** Internationalized strings for this class. */
3
    /** Internationalized strings for this class. */
4
    private static final StringManager s_stringMgr =
4
    private static final StringManager s_stringMgr =
5
        StringManagerFactory.getStringManager(CatalogsTab.class);
5
        StringManagerFactory.getStringManager(
6
            
6
SystemFunctionsTab.class);   
7
    
7
    
8
	/**
8
	/**
9
	 * Return the title for the tab.
9
	 * Return the title for the tab.
10
	 *
10
	 *
11
	 * @return	The title for the tab.
11
	 * @return	The title for the tab.
12
	 */
12
	 */
13
	public String getTitle()
13
	public String getTitle()
14
	{
14
	{
15
        // i18n[CatalogsTab.title=Catalogs]
15
        // i18n[SystemFunctionsTab.title=System Functions]
16
		return s_stringMgr.getString("CatalogsTab.title");
16
		return s_stringMgr.getString("SystemFunctionsTab.title");
17
	}
17
	}
18
	/**
18
	/**
19
	 * Return the hint for the tab.
19
	 * Return the hint for the tab.
20
	 *
20
	 *
21
	 * @return	The hint for the tab.
21
	 * @return	The hint for the tab.
22
	 */
22
	 */
23
	public String getHint()
23
	public String getHint()
24
	{
24
	{
25
        // i18n[CatalogsTab.hint=Show all the catalogs]
25
        // i18n[SystemFunctionsTab.hint=Show all the system functions available in DBMS]
26
		return s_stringMgr.getString("CatalogsTab.hint");
26
		return s_stringMgr.getString("SystemFunctionsTab.hint");
27
	}
27
	}
28
	/**
28
	/**
29
	 * Create the <TT>IDataSet</TT> to be displayed in this tab.
29
	 * Create the <TT>IDataSet</TT> to be displayed in this tab.
30
	 */
30
	 */
31
	protected IDataSet createDataSet() throws DataSetException
31
	protected IDataSet createDataSet() throws DataSetException
32
	{
32
	{
33
		final ISession session = getSession();
33
		final ISession session = getSession();
34
		try
34
		try
35
		{
35
		{
36
			final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
36
			final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
37
			return new ObjectArrayDataSet(md.getCatalogs());
37
			return new ObjectArrayDataSet(md.getSystemFunctions());
38
		}
38
		}
39
		catch (SQLException ex)
39
		catch (SQLException ex)
40
		{
40
		{
41
			throw new DataSetException(ex);
41
			throw new DataSetException(ex);
42
		
42
		
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