profiles.addAttribute("dont_ask", new Boolean(d
.isDontAskedSelected()).toString());
// save to profiles.xml
try {
xml.save();
} catch (Exception e) {
e.printStackTrace();
}
profiles.addAttribute("dont_ask", new Boolean(d
.isDontAskedSelected()).toString());
// save to profiles.xml
try {
xml.save();
} catch (Exception e) {
e.printStackTrace();
}
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: 3
|
|
Number of AST nodes: 3
|
|
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 | }
|
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
22 | profiles.addAttribute("dont_ask", new Boolean(d.isDontAskedSelected()).toString()); | | 17 | profiles.addAttribute("dont_ask", new Boolean(d.isDontAskedSelected()).toString()); |
23 | try | | 18 | try |
24 | | | 19 | |
Precondition Violations (0)
Row |
Violation |