void stopTableEditing() { if (table.isEditing()) { TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn()); cellEditor.stopCellEditing(); } } /** * Initialize the table model used for the arguments table. */ protected void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES[0], COLUMN_NAMES[1], COLUMN_NAMES[2] }, LDAPArgument.class, new Functor[] { new Functor("getName"), new Functor("getValue"), new Functor("getOpcode") }, new Functor[] { new Functor("setName"), new Functor("setValue"), new Functor("setOpcode") }, new Class[] { String.class, String.class, String.class }); } public static boolean testFunctors(){ LDAPArgumentsPanel instance = new LDAPArgumentsPanel(); instance.initializeTableModel(); return instance.tableModel.checkFunctors(null,instance.getClass()); }
void stopTableEditing() { if (table.isEditing()) { TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn()); cellEditor.stopCellEditing(); } } /** * Initialize the table model used for the arguments table. */ protected void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES_0, COLUMN_NAMES_1 }, Argument.class, new Functor[] { new Functor("getName"), // $NON-NLS-1$ new Functor("getValue") }, // $NON-NLS-1$ new Functor[] { new Functor("setName"), // $NON-NLS-1$ new Functor("setValue") }, // $NON-NLS-1$ new Class[] { String.class, String.class }); } public static boolean testFunctors(){ ArgumentsPanel instance = new ArgumentsPanel(); instance.initializeTableModel(); return instance.tableModel.checkFunctors(null,instance.getClass()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/config/gui/ArgumentsPanel.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void stopTableEditing() {
1
void stopTableEditing() {
2
		if (table.isEditing()) {
2
		if (table.isEditing()) {
3
			TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
3
			TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
4
			cellEditor.stopCellEditing();
4
			cellEditor.stopCellEditing();
5
		}
5
		}
6
	}
6
	}
7
	/**
7
	/**
8
	 * Initialize the table model used for the arguments table.
8
	 * Initialize the table model used for the arguments table.
9
	 */
9
	 */
10
	protected void initializeTableModel() {
10
	protected void initializeTableModel() {
11
		tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES[0], COLUMN_NAMES[1], COLUMN_NAMES[2] },
11
		tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES_0, COLUMN_NAMES_1 },
12
				LDAPArgument.class,
12
				Argument.class,
13
				new Functor[] { 
13
				new Functor[] {
14
new Functor("getName"), 
14
				new Functor("getName"), // $NON-NLS-1$
15
new Functor("getValue"), new Functor("getOpcode") },
15
				new Functor("getValue") },  // $NON-NLS-1$
16
				new Functor[] {
16
				new Functor[] {
17
 new Functor("setName"), 
17
			    new Functor("setName"), // $NON-NLS-1$
18
new Functor("setValue"), new Functor("setOpcode") },
18
				new Functor("setValue") }, // $NON-NLS-1$
19
				new Class[] { String.class, String.class, String.class });
19
				new Class[] { String.class, String.class });
20
	}
20
	}
21
	public static boolean testFunctors(){
21
	public static boolean testFunctors(){
22
		LDAPArgumentsPanel instance = new LDAPArgumentsPanel();
22
		ArgumentsPanel instance = new ArgumentsPanel();
23
		instance.initializeTableModel();
23
		instance.initializeTableModel();
24
		return instance.tableModel.checkFunctors(null,instance.getClass());
24
		return instance.tableModel.checkFunctors(null,instance.getClass());
25
	}
25
	}
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