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