XmlElement options = Config.getInstance().get("options").getElement( "/options"); XmlElement gui1 = options.getElement("gui"); XmlElement fonts = gui1.getElement("fonts"); if (fonts == null) { fonts = gui1.addSubElement("fonts"); } // register interest on configuratin changes fonts.addObserver(this);
XmlElement options = Config.getInstance().get("options").getElement( "/options"); XmlElement gui = options.getElement("gui"); 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/message/viewer/TextViewer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/text/TextEditorView.java
Method name: void initConfiguration() Method name: void TextEditorView(TextEditorController, HighlighterDocument)
Number of AST nodes: 6 Number of AST nodes: 6
1
XmlElement options = Config.getInstance().get("options").getElement(
1
XmlElement options = Config.getInstance().get("options").getElement(
2
				"/options");
2
				"/options");
3
		XmlElement gui1 = options.getElement("gui");
3
		XmlElement gui = options.getElement("gui");
4
		XmlElement fonts = gui1.getElement("fonts");
4
		XmlElement fonts = gui.getElement("fonts");
5
		if (fonts == null) {
5
		if (fonts == null) {
6
			fonts = gui1.addSubElement("fonts");
6
			fonts = gui.addSubElement("fonts");
7
		}
7
		}
8
		// register interest on configuratin changes
8
		// register interest on configuratin changes
9
		fonts.addObserver(this);
9
		fonts.addObserver(this);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    20
    XmlElement options = Config.getInstance().get("options").getElement("/options");
    8
    XmlElement options = Config.getInstance().get("options").getElement("/options");
    21
    XmlElement gui1 = options.getElement("gui");
    21
    XmlElement gui1 = options.getElement("gui");
    9
    XmlElement gui = options.getElement("gui");
    Differences
    Expression1Expression2Difference
    gui1guiVARIABLE_NAME_MISMATCH
    9
    XmlElement gui = options.getElement("gui");
    22
    XmlElement fonts = gui1.getElement("fonts");
    22
    XmlElement fonts = gui1.getElement("fonts");
    10
    XmlElement fonts = gui.getElement("fonts");
    Differences
    Expression1Expression2Difference
    gui1guiVARIABLE_NAME_MISMATCH
    10
    XmlElement fonts = gui.getElement("fonts");
    23
    if (fonts == null)
    11
    if (fonts == null)
    24
    fonts = gui1.addSubElement("fonts");
    24
    fonts = gui1.addSubElement("fonts");
    12
    fonts = gui.addSubElement("fonts");
    Differences
    Expression1Expression2Difference
    gui1guiVARIABLE_NAME_MISMATCH
    12
    fonts = gui.addSubElement("fonts");
    25
    fonts.addObserver(this);
    13
    fonts.addObserver(this);
    Precondition Violations (1)
    Row Violation
    1The refactoring of the clones is infeasible, because classes org.columba.mail.gui.message.viewer.TextViewer and org.columba.mail.gui.composer.text.TextEditorView do not have a common superclass