void clearFileFilters() { FileFilter[] filters = jfc.getChoosableFileFilters(); for (int x = 0; x < filters.length; x++) { jfc.removeChoosableFileFilter(filters[x]); } } public static JFileChooser promptToOpenFile() { return promptToOpenFile(new String[0]); } /** * Prompts the user to choose a file from their filesystems for our own * devious uses. This method maintains the last directory the user visited * before dismissing the dialog. This does NOT imply they actually chose a * file from that directory, only that they closed the dialog there. It is * the caller's responsibility to check to see if the selected file is * non-null. * * @return the JFileChooser that interacted with the user, after they are * finished using it (accept or otherwise). * @see #promptToOpenFile() */ public static JFileChooser promptToSaveFile(String filename) { return promptToSaveFile(filename, null); }
void clearFileFilters() { FileFilter[] filters = jfc.getChoosableFileFilters(); for (int x = 0; x < filters.length; x++) { jfc.removeChoosableFileFilter(filters[x]); } } public static JFileChooser promptToOpenFile() { return promptToOpenFile(new String[0]); } /** * Prompts the user to choose a file from their filesystems for our own * devious uses. This method maintains the last directory the user visited * before dismissing the dialog. This does NOT imply they actually chose a * file from that directory, only that they closed the dialog there. It is * the caller's responsibility to check to see if the selected file is * non-null. * * @return the JFileChooser that interacted with the user, after they are * finished using it - null if no file was chosen * @see #promptToOpenFile() */ public static JFileChooser promptToSaveFile(String filename) { return promptToSaveFile(filename, null); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportFileDialoger.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/FileDialoger.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void clearFileFilters() {
1
void clearFileFilters() {
2
		FileFilter[] filters = jfc.getChoosableFileFilters();
2
		FileFilter[] filters = jfc.getChoosableFileFilters();
3
		for (int x = 0; x < filters.length; x++) {
3
		for (int x = 0; x < filters.length; x++) {
4
			jfc.removeChoosableFileFilter(filters[x]);
4
			jfc.removeChoosableFileFilter(filters[x]);
5
		}
5
		}
6
	}
6
	}
7
	public static JFileChooser promptToOpenFile() {
7
	public static JFileChooser promptToOpenFile() {
8
		return promptToOpenFile(new String[0]);
8
		return promptToOpenFile(new String[0]);
9
	}
9
	}
10
	/**
10
	/**
11
	 * Prompts the user to choose a file from their filesystems for our own
11
	 * Prompts the user to choose a file from their filesystems for our own
12
	 * devious uses. This method maintains the last directory the user visited
12
	 * devious uses. This method maintains the last directory the user visited
13
	 * before dismissing the dialog. This does NOT imply they actually chose a
13
	 * before dismissing the dialog. This does NOT imply they actually chose a
14
	 * file from that directory, only that they closed the dialog there. It is
14
	 * file from that directory, only that they closed the dialog there. It is
15
	 * the caller's responsibility to check to see if the selected file is
15
	 * the caller's responsibility to check to see if the selected file is
16
	 * non-null.
16
	 * non-null.
17
	 * 
17
	 * 
18
	 * @return the JFileChooser that interacted with the user, after they are
18
	 * @return the JFileChooser that interacted with the user, after they are
19
	 *         finished using it (accept or otherwise).
19
	 *         finished using it - null if no file was chosen
20
	 * @see #promptToOpenFile()
20
	 * @see #promptToOpenFile()
21
	 */
21
	 */
22
	public static JFileChooser promptToSaveFile(String filename) {
22
	public static JFileChooser promptToSaveFile(String filename) {
23
		return promptToSaveFile(filename, null);
23
		return promptToSaveFile(filename, null);
24
	}
24
	}
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