void addHTTPFileArg(HTTPFileArg file) { TestElementProperty newHTTPFileArg = new TestElementProperty(file.getPath(), file); if (isRunningVersion()) { this.setTemporary(newHTTPFileArg); } getHTTPFileArgsCollection().addItem(newHTTPFileArg); } /** * adds a new File to the HTTPFileArgs list to be uploaded with http * request. * * @param path file full path. * @param param http parameter name. * @param mime mime type of file. */ public void addHTTPFileArg(String path, String param, String mime) { addHTTPFileArg(new HTTPFileArg(path, param, mime)); } /** * Get a PropertyIterator of the files. * * @return an iteration of the files */ public PropertyIterator iterator() { return getHTTPFileArgsCollection().iterator(); }
void addArgument(Argument arg) { TestElementProperty newArg = new TestElementProperty(arg.getName(), arg); if (isRunningVersion()) { this.setTemporary(newArg); } getArguments().addItem(newArg); } /** * Add a new argument with the given name, value, and metadata. * * @param name * the name of the argument * @param value * the value of the argument * @param metadata * the metadata for the argument */ public void addArgument(String name, String value, String metadata) { addArgument(new Argument(name, value, metadata)); } /** * Get a PropertyIterator of the arguments. * * @return an iteration of the arguments */ public PropertyIterator iterator() { return getArguments().iterator(); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/util/HTTPFileArgs.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/config/Arguments.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void addHTTPFileArg(HTTPFileArg file) {
1
void addArgument(Argument arg) {
2
		TestElementProperty newHTTPFileArg = new TestElementProperty(file.getPath(), file);
2
		TestElementProperty newArg = new TestElementProperty(arg.getName(), arg);
3
		if (isRunningVersion()) {
3
		if (isRunningVersion()) {
4
			this.setTemporary(newHTTPFileArg);
4
			this.setTemporary(newArg);
5
		}
5
		}
6
		getHTTPFileArgsCollection().addItem(newHTTPFileArg);
6
		getArguments().addItem(newArg);
7
	}
7
	}
8
    /**
8
	/**
9
     * adds a new File to the HTTPFileArgs list to be uploaded with http
9
	 * Add a new 
10
     * request.
11
 
10
argument with the given name, value, and metadata.
11
	 * 
12
	 * @param name
12
    *
13
	 *    
13
     * @param path file full path.
14
     
14
     * @param param http parameter name.
15
     * @param mime mime type of file.
16
    
15
   the name of the argument
16
	 * @param value
17
	 *            the value of the argument
18
	 * @param metadata
19
	 *            the metadata for the argument
17
 */
20
	 */
18
    public void addHTTPFileArg(String path, String param, String mime) {
21
	public void addArgument(String name, String value, String m
19
        addHTTPFileArg(new HTTPFileArg(path, param, mime
22
etadata) {
20
));
23
		addArgument(new Argument(name, value, metadata));
21
    }
24
	}
22
	/**
25
	/**
23
	 * Get a PropertyIterator of the files.
26
	 * Get a PropertyIterator of the arguments.
24
	 *
27
	 * 
25
	 * @return an iteration of the files
28
	 * @return an iteration of the arguments
26
	 */
29
	 */
27
	public PropertyIterator iterator() {
30
	public PropertyIterator iterator() {
28
		return getHTTPFileArgsCollection().iterator();
31
		return getArguments().iterator();
29
	}
32
	}
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