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()); }
void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { ArgumentsPanel.COLUMN_NAMES_0, ArgumentsPanel.COLUMN_NAMES_1, ENCODE_OR_NOT, INCLUDE_EQUALS }, HTTPArgument.class, new Functor[] { new Functor("getName"), //$NON-NLS-1$ new Functor("getValue"), //$NON-NLS-1$ new Functor("isAlwaysEncoded"), //$NON-NLS-1$ new Functor("isUseEquals") }, //$NON-NLS-1$ new Functor[] { new Functor("setName"), //$NON-NLS-1$ new Functor("setValue"), //$NON-NLS-1$ new Functor("setAlwaysEncoded"), //$NON-NLS-1$ new Functor("setUseEquals") }, //$NON-NLS-1$ new Class[] {String.class, String.class, Boolean.class, Boolean.class }); } public static boolean testFunctors(){ HTTPArgumentsPanel instance = new HTTPArgumentsPanel(); 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/config/gui/ArgumentsPanel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void initializeTableModel() {
1
void initializeTableModel() {
2
		tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES_0, COLUMN_NAMES_1
2
		tableModel = new ObjectTableModel(new String[] {
3
 },
3
				ArgumentsPanel.COLUMN_NAMES_0, ArgumentsPanel.COLUMN_NAMES_1, ENCODE_OR_NOT, INCLUDE_EQUALS },
4
				Argument.class,
4
				HTTPArgument.class,
5
				new Functor[] {
5
				new Functor[] {
6
				new Functor("getName"), // $NON-NLS-1$
6
				new Functor("getName"), //$NON-NLS-1$
7
				new Functor("getValue") },  // 
7
				new Functor("getValue"), //$NON-NLS-1$
8
				new Functor("isAlwaysEncoded"), //$NON-NLS-1$
8
$NON-NLS-1$
9
				new Functor("isUseEquals") }, //$NON-NLS-1$
9
				new Functor[] {
10
				new Functor[] { 
10
			    new Functor("setName"), // $NON-NLS-1$
11
				new Functor("setName"), //$NON-NLS-1$
11
				new Functor("setValue")
12
				new Functor("setValue"), //$NON-NLS-1$
13
				new Functor("setAlwaysEncoded"), //$NON-NLS-1$
12
 }, // $NON-NLS-1$
14
				new Functor("setUseEquals") }, //$NON-NLS-1$
13
				new Class[] { String.class, String.class });
15
				new Class[] {String.class, String.class, Boolean.class, Boolean.class });
14
	}
16
	}
15
	public static boolean testFunctors(){
17
	public static boolean testFunctors(){
16
		ArgumentsPanel instance = new ArgumentsPanel();
18
		HTTPArgumentsPanel instance = new HTTPArgumentsPanel();
17
		instance.initializeTableModel();
19
		instance.initializeTableModel();
18
		return instance.tableModel.checkFunctors(null,instance.getClass());
20
		return instance.tableModel.checkFunctors(null,instance.getClass());
19
	}
21
	}
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