if (appendSignature && signatureFile != null) {
String signature = getSignature(signatureFile);
if (signature != null) {
body = body + "\r\n\r\n" + signature;
}
}
if (theme != null) {
PlasticTheme t = getTheme(theme);
if (t != null) {
list.setSelectedValue(t, true);
}
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/composer/MessageComposer.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/themes/plugin/PlasticLookAndFeelConfigPlugin.java
|
Method name: StreamableMimePart composeTextMimePart(boolean)
|
|
Method name: void updateComponents(boolean)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (appendSignature && signatureFile != null) {↵ | | 1 | if (↵
|
2 | String signature = getSignature(signatureFile);↵ | | |
|
|
3 | if (signature != null) {↵ | | |
|
4 | body = body + "\r\n\r\n" + signature;↵ | | |
|
5 | }↵ | | |
|
6 | ↵ | | 2 | theme != null) {↵
|
| | | 3 | PlasticTheme t = getTheme(theme);↵
|
|
| | | 4 | if (t != null) {↵
|
| | | 5 | list.setSelectedValue(t, true);↵
|
| | | 6 | }↵
|
7 | } | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 4 | PlasticTheme t = getTheme(theme); |
10 | String signature = getSignature(signatureFile); | | | |
11 | if (signature != null) | | 5 | if (t != null) |
| | | 6 | list.setSelectedValue(t, true); |
12 | body = body + "\r\n\r\n" + signature; | | | |
Precondition Violations (1)
Row |
Violation |
1 | Type java.lang.String of variable signature does not match with type com.jgoodies.looks.plastic.PlasticTheme of variable t |