if (contactModel.getSortString() != null) parser.set(VCARD.SORTSTRING, contactModel.getSortString()); // <fn>value</fn> if (contactModel.getFormattedName() != null) parser.set(VCARD.FN, contactModel.getFormattedName());
if (contactModel.getFreeBusy() != null) parser.set(VCARD.X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy()); if (contactModel.getCalendar() != null) parser.set(VCARD.X_COLUMBA_URL_CALENDAR, contactModel.getCalendar());
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.getSortString() != null)
1
if (contactModel.getFreeBusy() != null)
2
			parser.set(VCARD.SORTSTRING, contactModel.getSortString());
2
			parser.set(VCARD.
3
		// <fn>value</fn>;
3
X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy());
4
		if (contactModel.getFormattedName() != null)
4
		if (contactModel.getCalendar() != null)
5
			parser.set(VCARD.FN, contactModel.getFormattedName());
5
			parser.set(VCARD.X_COLUMBA_URL_CALENDAR, contactModel.getCalendar());
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)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (contactModel.getSortString() != null)
    5
    if (contactModel.getSortString() != null)
    25
    if (contactModel.getFreeBusy() != null)
    Differences
    Expression1Expression2Difference
    getSortStringgetFreeBusyMETHOD_INVOCATION_NAME_MISMATCH
    25
    if (contactModel.getFreeBusy() != null)
    6
    parser.set(VCARD.SORTSTRING, contactModel.getSortString());
    6
    parser.set(VCARD.SORTSTRING, contactModel.getSortString());
    26
    parser.set(VCARD.X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy());
    Differences
    Expression1Expression2Difference
    SORTSTRINGX_COLUMBA_URL_FREEBUSYVARIABLE_NAME_MISMATCH
    getSortStringgetFreeBusyMETHOD_INVOCATION_NAME_MISMATCH
    26
    parser.set(VCARD.X_COLUMBA_URL_FREEBUSY, contactModel.getFreeBusy());
    7
    if (contactModel.getFormattedName() != null)
    7
    if (contactModel.getFormattedName() != null)
    27
    if (contactModel.getCalendar() != null)
    Differences
    Expression1Expression2Difference
    getFormattedNamegetCalendarMETHOD_INVOCATION_NAME_MISMATCH
    27
    if (contactModel.getCalendar() != null)
    8
    parser.set(VCARD.FN, contactModel.getFormattedName());
    8
    parser.set(VCARD.FN, contactModel.getFormattedName());
    28
    parser.set(VCARD.X_COLUMBA_URL_CALENDAR, contactModel.getCalendar());
    Differences
    Expression1Expression2Difference
    FNX_COLUMBA_URL_CALENDARVARIABLE_NAME_MISMATCH
    getFormattedNamegetCalendarMETHOD_INVOCATION_NAME_MISMATCH
    28
    parser.set(VCARD.X_COLUMBA_URL_CALENDAR, contactModel.getCalendar());
    Precondition Violations (0)
    Row Violation