profiles.addAttribute("dont_ask", new Boolean(d
.isDontAskedSelected()).toString());
// save to profiles.xml
try {
xml.save();
} catch (Exception e) {
e.printStackTrace();
}
return new Profile("Default", location);
profiles.addAttribute("dont_ask", new Boolean(d
.isDontAskedSelected()).toString());
// save to profiles.xml
try {
xml.save();
} catch (Exception e) {
e.printStackTrace();
}
return getProfileForName(profileName);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/profiles/ProfileManager.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/profiles/ProfileManager.java
|
Method name: Profile promptForProfile()
|
|
Method name: Profile promptForProfile()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | profiles.addAttribute("dont_ask", new Boolean(d↵ | | 1 | profiles.addAttribute("dont_ask", new Boolean(d↵
|
2 | .isDontAskedSelected()).toString());↵ | | 2 | .isDontAskedSelected()).toString());↵
|
|
3 | // save to profiles.xml↵ | | 3 | // save to profiles.xml↵
|
4 | try {↵ | | 4 | try {↵
|
5 | xml.save();↵ | | 5 | xml.save();↵
|
6 | } catch (Exception e) {↵ | | 6 | } catch (Exception e) {↵
|
7 | e.printStackTrace();↵ | | 7 | e.printStackTrace();↵
|
8 | }↵ | | 8 | }↵
|
|
9 | return new Profile("Default", location); | | 9 | return getProfileForName(profileName);
|
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 the same method |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
17 | profiles.addAttribute("dont_ask", new Boolean(d.isDontAskedSelected()).toString()); | | 22 | profiles.addAttribute("dont_ask", new Boolean(d.isDontAskedSelected()).toString()); |
18 | try | | 23 | try |
19 | | | 24 | |
20 | return new Profile("Default", location); | | 25 | return getProfileForName(profileName); |
Precondition Violations (0)
Row |
Violation |