if (fname == null) {
setTitle(DEFAULT_TITLE);
return;
}
// allow for windows / chars in filename
String temp = fname.replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$
String simpleName = temp.substring(temp.lastIndexOf("/") + 1);// $NON-NLS-1$
setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE);
if (fname == null) {
setTitle(DEFAULT_TITLE);
return;
}
// allow for windows / chars in filename
String temp = fname.replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$
String simpleName = temp.substring(temp.lastIndexOf("/") + 1);// $NON-NLS-1$
setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportMainFrame.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/MainFrame.java
|
Method name: void setExtendedFrameTitle(String)
|
|
Method name: void setExtendedFrameTitle(String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (fname == null) {↵ | | 1 | if (fname == null) {↵
|
2 | setTitle(DEFAULT_TITLE);↵ | | 2 | setTitle(DEFAULT_TITLE);↵
|
3 | return;↵ | | 3 | return;↵
|
4 | }↵ | | 4 | }↵
|
|
5 | // allow for windows / chars in filename↵ | | 5 | // allow for windows / chars in filename↵
|
6 | String temp = fname.replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$↵ | | 6 | String temp = fname.replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$↵
|
7 | String simpleName = temp.substring(temp.lastIndexOf("/") + 1);// $NON-NLS-1$↵ | | 7 | String simpleName = temp.substring(temp.lastIndexOf("/") + 1);// $NON-NLS-1$↵
|
8 | setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE); | | 8 | setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 1.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (fname == null) | | 1 | if (fname == null) |
2 | | | 2 | |
3 | | | 3 | |
4 | String temp = fname.replace('\\', '/'); | | 4 | String temp = fname.replace('\\', '/'); |
5 | String simpleName = temp.substring(temp.lastIndexOf("/") + 1); | | 5 | String simpleName = temp.substring(temp.lastIndexOf("/") + 1); |
6 | setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE); | | 6 | setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE); |
Precondition Violations (0)
Row |
Violation |