XmlElement fonts = gui.getElement("fonts");
if (fonts == null) {
fonts = gui.addSubElement("fonts");
}
// register interest on configuration changes
fonts.addObserver(this);
XmlElement fonts = gui.getElement("fonts");
if (fonts == null) {
fonts = gui.addSubElement("fonts");
}
// register interest on configuratin changes
fonts.addObserver(this);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/SignatureView.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/text/TextEditorView.java
|
Method name: void SignatureView(ComposerController)
|
|
Method name: void TextEditorView(TextEditorController, HighlighterDocument)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | XmlElement fonts = gui.getElement("fonts");↵ | | 1 | XmlElement fonts = gui.getElement("fonts");↵
|
|
2 | if (fonts == null) {↵ | | 2 | if (fonts == null) {↵
|
3 | fonts = gui.addSubElement("fonts");↵ | | 3 | fonts = gui.addSubElement("fonts");↵
|
4 | }↵ | | 4 | }↵
|
|
5 | // register interest on configuration changes↵ | | 5 | // register interest on configuratin changes↵
|
6 | fonts.addObserver(this); | | 6 | fonts.addObserver(this);
|
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 | 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.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
28 | XmlElement fonts = gui.getElement("fonts"); | | 10 | XmlElement fonts = gui.getElement("fonts"); |
29 | if (fonts == null) | | 11 | if (fonts == null) |
30 | fonts = gui.addSubElement("fonts"); | | 12 | fonts = gui.addSubElement("fonts"); |
31 | fonts.addObserver(this); | | 13 | fonts.addObserver(this); |
Precondition Violations (0)
Row |
Violation |