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