public class ColumnPriviligesTab extends BaseTableTab { /** Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ColumnPriviligesTab.class); private int[] columnIndices = new int[] { 4, 6, 7, 5, 8 }; /** * Return the title for the tab. * * @return The title for the tab. */ public String getTitle() { //i18n[ColumnPriviligesTab.title=Column Privileges] return s_stringMgr.getString("ColumnPriviligesTab.title"); } /** * Return the hint for the tab. * * @return The hint for the tab. */ public String getHint() { //i18n[ColumnPriviligesTab.hint=Show access rights for columns in the selected table] return s_stringMgr.getString("ColumnPriviligesTab.hint"); } /** * Create the <TT>IDataSet</TT> to be displayed in this tab. */ protected IDataSet createDataSet() throws DataSetException { final SQLDatabaseMetaData md = getSession().getSQLConnection().getSQLMetaData(); final ITableInfo ti = getTableInfo(); return md.getColumnPrivilegesDataSet(ti,columnIndices, true)
public class TablePriviligesTab extends BaseTableTab { /** Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(TablePriviligesTab.class); private int[] columnIndices = new int[] { 5, 6, 7, 4 }; /** * Return the title for the tab. * * @return The title for the tab. */ public String getTitle() { //i18n[TablePriviligesTab.title=Privileges] return s_stringMgr.getString("TablePriviligesTab.title"); } /** * Return the hint for the tab. * * @return The hint for the tab. */ public String getHint() { //i18n[TablePriviligesTab.hint=Show access rights for the selected table] return s_stringMgr.getString("TablePriviligesTab.hint"); } /** * Create the <TT>IDataSet</TT> to be displayed in this tab. */ protected IDataSet createDataSet() throws DataSetException { final SQLDatabaseMetaData md = getSession().getSQLConnection().getSQLMetaData(); ITableInfo ti = getTableInfo(); return md.getTablePrivilegesDataSet(ti, columnIndices, true)
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table/ColumnPriviligesTab.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/table/TablePriviligesTab.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class ColumnPriviligesTab extends BaseTableTab
1
public class TablePriviligesTab extends BaseTableTab
2
{
2
{
3
	
3
    /** Internationalized strings for this class. */
4
    /** Internationalized strings for this class. */
4
    private static final StringManager s_stringMgr =
5
    private static final StringManager s_stringMgr =
5
        StringManagerFactory.getStringManager(ColumnPriviligesTab.class);	
6
        StringManagerFactory.getStringManager(TablePriviligesTab.class);
6
	
7
        		
7
    private int[] columnIndices = new int[] { 4, 6, 7, 5, 8 };
8
    private int[] columnIndices = new int[] { 5, 6, 7, 4 };
8
    
9
    
9
	/**
10
	/**
10
	 * Return the title for the tab.
11
	 * Return the title for the tab.
11
	 *
12
	 *
12
	 * @return	The title for the tab.
13
	 * @return	The title for the tab.
13
	 */
14
	 */
14
	public String getTitle()
15
	public String getTitle()
15
	{
16
	{
16
		//i18n[ColumnPriviligesTab.title=Column Privileges]
17
		//i18n[TablePriviligesTab.title=Privileges]
17
		return s_stringMgr.getString("ColumnPriviligesTab.title");
18
		return s_stringMgr.getString("TablePriviligesTab.title");
18
	}
19
	}
19
	/**
20
	/**
20
	 * Return the hint for the tab.
21
	 * Return the hint for the tab.
21
	 *
22
	 *
22
	 * @return	The hint for the tab.
23
	 * @return	The hint for the tab.
23
	 */
24
	 */
24
	public String getHint()
25
	public String getHint()
25
	{
26
	{
26
		//i18n[ColumnPriviligesTab.hint=Show access rights for columns in the selected table] 
27
		//i18n[TablePriviligesTab.hint=Show access rights for the selected table]
27
		return s_stringMgr.getString("ColumnPriviligesTab.hint");
28
		return s_stringMgr.getString("TablePriviligesTab.hint");
28
	}
29
	}
29
	/**
30
	/**
30
	 * Create the <TT>IDataSet</TT> to be displayed in this tab.
31
	 * Create the <TT>IDataSet</TT> to be displayed in this tab.
31
	 */
32
	 */
32
	protected IDataSet createDataSet() throws DataSetException
33
	protected IDataSet createDataSet() throws DataSetException
33
	{
34
	{
34
		final SQLDatabaseMetaData md = 
35
		final SQLDatabaseMetaData md = 
35
            getSession().getSQLConnection().getSQLMetaData();
36
            getSession().getSQLConnection().getSQLMetaData();
36
        final ITableInfo ti = getTableInfo();
37
        ITableInfo ti = getTableInfo();
37
        return md.getColumnPrivilegesDataSet(ti,columnIndices, true)
38
        return md.getTablePrivilegesDataSet(ti, columnIndices, true)
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