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