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);
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 configuration 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/text/TextEditorView.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/SignatureView.java
Method name: void TextEditorView(TextEditorController, HighlighterDocument) Method name: void SignatureView(ComposerController)
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 gui = options.getElement("gui");
3
		XmlElement gui = options.getElement("gui");
4
		XmlElement fonts = gui.getElement("fonts");
4
		XmlElement fonts = gui.getElement("fonts");
5
		if (fonts == null) {
5
		if (fonts == null) {
6
			fonts = gui.addSubElement("fonts");
6
			fonts = gui.addSubElement("fonts");
7
		}
7
		}
8
		// register interest on configuratin changes
8
		// register interest on configuration changes
9
		fonts.addObserver(this);
9
		fonts.addObserver(this);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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. {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)1.1
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    8
    XmlElement options = Config.getInstance().get("options").getElement("/options");
    26
    XmlElement options = Config.getInstance().get("options").getElement("/options");
    9
    XmlElement gui = options.getElement("gui");
    27
    XmlElement gui = options.getElement("gui");
    10
    XmlElement fonts = gui.getElement("fonts");
    28
    XmlElement fonts = gui.getElement("fonts");
    11
    if (fonts == null)
    29
    if (fonts == null)
    12
    fonts = gui.addSubElement("fonts");
    30
    fonts = gui.addSubElement("fonts");
    13
    fonts.addObserver(this);
    31
    fonts.addObserver(this);
    Precondition Violations (0)
    Row Violation