if (contactModel.getFormattedName() != null) parser.set(VCARD.FN, contactModel.getFormattedName()); // <nickname>value</nickname> if (contactModel.getNickName() != null) parser.set(VCARD.NICKNAME, contactModel.getNickName());
if (contactModel.getWeblog() != null) parser.set(VCARD.X_COLUMBA_URL_BLOG, contactModel.getWeblog()); if (contactModel.getFreeBusy() != null) parser.set(VCARD.X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy());
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/ContactModelXMLFactory.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/ContactModelXMLFactory.java
Method name: Document marshall(IContactModel) Method name: Document marshall(IContactModel)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (contactModel.getFormattedName() != null)
1
if (contactModel.getWeblog() != null)
2
			parser.set(VCARD.FN, contactModel.getFormattedName());
2
			parser.set(VCARD.
3
		// <nickname>value</nickname>;
3
X_COLUMBA_URL_BLOG, contactModel.getWeblog());
4
		if (contactModel.getNickName() != null)
4
		if (contactModel.getFreeBusy() != null)
5
			parser.set(VCARD.NICKNAME, contactModel.getNickName());
5
			parser.set(VCARD.X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy());
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.3
Clones locationClones are in the same method
Number of node comparisons13
  1. {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)9.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    if (contactModel.getFormattedName() != null)
    7
    if (contactModel.getFormattedName() != null)
    25
    if (contactModel.getFreeBusy() != null)
    Differences
    Expression1Expression2Difference
    getFormattedNamegetFreeBusyMETHOD_INVOCATION_NAME_MISMATCH
    25
    if (contactModel.getFreeBusy() != null)
    8
    parser.set(VCARD.FN, contactModel.getFormattedName());
    8
    parser.set(VCARD.FN, contactModel.getFormattedName());
    26
    parser.set(VCARD.X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy());
    Differences
    Expression1Expression2Difference
    FNX_COLUMBA_URL_FREEBUSYVARIABLE_NAME_MISMATCH
    getFormattedNamegetFreeBusyMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression contactModel.getFormattedName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression contactModel.getFreeBusy() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    26
    parser.set(VCARD.X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy());
    9
    if (contactModel.getNickName() != null)
    9
    if (contactModel.getNickName() != null)
    23
    if (contactModel.getWeblog() != null)
    Differences
    Expression1Expression2Difference
    getNickNamegetWeblogMETHOD_INVOCATION_NAME_MISMATCH
    23
    if (contactModel.getWeblog() != null)
    10
    parser.set(VCARD.NICKNAME, contactModel.getNickName());
    10
    parser.set(VCARD.NICKNAME, contactModel.getNickName());
    24
    parser.set(VCARD.X_COLUMBA_URL_BLOG, contactModel.getWeblog());
    Differences
    Expression1Expression2Difference
    NICKNAMEX_COLUMBA_URL_BLOGVARIABLE_NAME_MISMATCH
    getNickNamegetWeblogMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression contactModel.getNickName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression contactModel.getWeblog() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24
    parser.set(VCARD.X_COLUMBA_URL_BLOG, contactModel.getWeblog());
    Precondition Violations (4)
    Row Violation
    1Expression contactModel.getFormattedName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression contactModel.getFreeBusy() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression contactModel.getNickName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression contactModel.getWeblog() cannot be parameterized, because it has dependencies to/from statements that will be extracted