private static void clearFileFilters() {
FileFilter[] filters = jfc.getChoosableFileFilters();
for (FileFilter filter : filters) {
jfc.removeChoosableFileFilter(filter);
}
}
private static void clearFileFilters() {
FileFilter[] filters = jfc.getChoosableFileFilters();
for (int x = 0; x < filters.length; x++) {
jfc.removeChoosableFileFilter(filters[x]);
}
}
Clone fragments detected by clone detection tool
File path: /apache-jmeter-2.11/src/core/org/apache/jmeter/gui/util/FileDialoger.java
|
|
File path: /apache-jmeter-2.11/src/reports/org/apache/jmeter/gui/util/ReportFileDialoger.java
|
Method name: void clearFileFilters()
|
|
Method name: void clearFileFilters()
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | private static void clearFileFilters() {
| | 1 | private static void clearFileFilters() {
|
2 | FileFilter[] filters = jfc.getChoosableFileFilters();
| | 2 | FileFilter[] filters = jfc.getChoosableFileFilters();
|
3 | for (FileFilter filter : filters) {
| | 3 | for (int x = 0; x < filters.length; x++) {
|
4 | jfc.removeChoosableFileFilter(filter);
| | 4 | jfc.removeChoosableFileFilter(filters[x]);
|
5 | }
| | 5 | }
|
6 | } | | 6 | } |
See real code fragment |
|
See real code fragment |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.400 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | for (FileFilter filter : filters) | | 2 | for (int x = 0; x < filters.length; x++) |
3 | jfc.removeChoosableFileFilter(filter); | | 3 | jfc.removeChoosableFileFilter(filters[x]); |
Precondition Violations (2)
Row |
Violation |
1 | Expression filter cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression filters[x] cannot be parameterized, because it has dependencies to/from statements that will be extracted |