if (optionsItem == null) { XmlElement xmlElement = getPlugin(mainFrameOptionsFile.getName()) .getRoot().getElement("options"); optionsItem = new OptionsItem(xmlElement); } return optionsItem;
if (composerItem == null) { XmlElement xmlElement = getPlugin(composerOptionsFile.getName()) .getRoot().getElement("options"); composerItem = new ComposerItem(xmlElement); } return composerItem;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/config/MailConfig.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/config/MailConfig.java
Method name: OptionsItem getOptionsItem() Method name: ComposerItem getComposerItem()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (optionsItem == null) {
1
if (composerItem == null) {
2
			XmlElement xmlElement = getPlugin(mainFrameOptionsFile.getName())
2
			XmlElement xmlElement = getPlugin(composerOptionsFile.getName())
3
					.getRoot().getElement("options");
3
					.getRoot().getElement("options");
4
			optionsItem = new OptionsItem(xmlElement);
4
			composerItem = new ComposerItem(xmlElement);
5
		}
5
		}
6
		return optionsItem;
6
		return composerItem;
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 declared in the same class
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (optionsItem == null)
    1
    if (optionsItem == null)
    1
    if (composerItem == null)
    Differences
    Expression1Expression2Difference
    optionsItemcomposerItemVARIABLE_NAME_MISMATCH
    org.columba.mail.config.OptionsItemorg.columba.mail.config.ComposerItemSUBCLASS_TYPE_MISMATCH
    1
    if (composerItem == null)
    2
    XmlElement xmlElement = getPlugin(mainFrameOptionsFile.getName()).getRoot().getElement("options");
    2
    XmlElement xmlElement = getPlugin(mainFrameOptionsFile.getName()).getRoot().getElement("options");
    2
    XmlElement xmlElement = getPlugin(composerOptionsFile.getName()).getRoot().getElement("options");
    Differences
    Expression1Expression2Difference
    mainFrameOptionsFilecomposerOptionsFileVARIABLE_NAME_MISMATCH
    2
    XmlElement xmlElement = getPlugin(composerOptionsFile.getName()).getRoot().getElement("options");
    3
    optionsItem = new OptionsItem(xmlElement);
    3
    optionsItem = new OptionsItem(xmlElement);
    3
    composerItem = new ComposerItem(xmlElement);
    Differences
    Expression1Expression2Difference
    optionsItemcomposerItemVARIABLE_NAME_MISMATCH
    org.columba.mail.config.OptionsItemorg.columba.mail.config.ComposerItemSUBCLASS_TYPE_MISMATCH
    org.columba.mail.config.OptionsItemorg.columba.mail.config.ComposerItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression optionsItem is a field being modified, and thus it cannot be parameterized
    Expression composerItem is a field being modified, and thus it cannot be parameterized
    Expression new OptionsItem(xmlElement) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new ComposerItem(xmlElement) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    composerItem = new ComposerItem(xmlElement);
    4
    return optionsItem;
    4
    return optionsItem;
    4
    return composerItem;
    Differences
    Expression1Expression2Difference
    optionsItemcomposerItemVARIABLE_NAME_MISMATCH
    org.columba.mail.config.OptionsItemorg.columba.mail.config.ComposerItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression optionsItem cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression composerItem cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    return composerItem;
    Precondition Violations (6)
    Row Violation
    1Expression optionsItem is a field being modified, and thus it cannot be parameterized
    2Expression composerItem is a field being modified, and thus it cannot be parameterized
    3Expression new OptionsItem(xmlElement) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression new ComposerItem(xmlElement) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression optionsItem cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression composerItem cannot be parameterized, because it has dependencies to/from statements that will be extracted