if (summary != null) event.setSummary(summary); if (eventClass != null) event.setEventClass(eventClass); if (location != null) event.setLocation(location); if (priority != null) event.setPriority(priority); if (status != null) event.setStatus(status); if (url != null) event.setUrl(url);
if (eventClass != null) event.setEventClass(eventClass); if (location != null) event.setLocation(location); if (priority != null) event.setPriority(priority); if (status != null) event.setStatus(status); if (url != null) event.setUrl(url); if (description != null) event.setDescription(description);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/CalendarImporter.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/CalendarImporter.java
Method name: Iterator importCalendar(ICalendarItem, File) Method name: Iterator importCalendar(ICalendarItem, File)
Number of AST nodes: 12 Number of AST nodes: 12
1
if (summary != null)
2
					event.setSummary(summary);
3
				if (eventClass != null)
1
if (eventClass != null)
4
					event.setEventClass(eventClass);
2
					event.setEventClass(eventClass);
5
				if (location != null)
3
				if (location != null)
6
					event.setLocation(location);
4
					event.setLocation(location);
7
				if (priority != null)
5
				if (priority != null)
8
					event.setPriority(priority);
6
					event.setPriority(priority);
9
				if (status != null)
7
				if (status != null)
10
					event.setStatus(status);
8
					event.setStatus(status);
11
				if (url != null)
9
				if (url != null)
12
					event.setUrl(url);
10
					event.setUrl(url);
11
				if (description != null)
12
					event.setDescription(description);
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)1.2
Clones locationClones are in the same method
Number of node comparisons102
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)4.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    107
    if (summary != null)
    107
    if (summary != null)
    109
    if (eventClass != null)
    Differences
    Expression1Expression2Difference
    summaryeventClassVARIABLE_NAME_MISMATCH
    109
    if (eventClass != null)
    108
    event.setSummary(summary);
    108
    event.setSummary(summary);
    110
    event.setEventClass(eventClass);
    Differences
    Expression1Expression2Difference
    setSummarysetEventClassMETHOD_INVOCATION_NAME_MISMATCH
    summaryeventClassVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression event.setSummary(summary) is a void method call, and thus it cannot be parameterized
    Expression event.setEventClass(eventClass) is a void method call, and thus it cannot be parameterized
    110
    event.setEventClass(eventClass);
    109
    if (eventClass != null)
    109
    if (eventClass != null)
    111
    if (location != null)
    Differences
    Expression1Expression2Difference
    eventClasslocationVARIABLE_NAME_MISMATCH
    111
    if (location != null)
    110
    event.setEventClass(eventClass);
    110
    event.setEventClass(eventClass);
    112
    event.setLocation(location);
    Differences
    Expression1Expression2Difference
    setEventClasssetLocationMETHOD_INVOCATION_NAME_MISMATCH
    eventClasslocationVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression event.setEventClass(eventClass) is a void method call, and thus it cannot be parameterized
    Expression event.setLocation(location) is a void method call, and thus it cannot be parameterized
    112
    event.setLocation(location);
    111
    if (location != null)
    111
    if (location != null)
    113
    if (priority != null)
    Differences
    Expression1Expression2Difference
    locationpriorityVARIABLE_NAME_MISMATCH
    113
    if (priority != null)
    112
    event.setLocation(location);
    112
    event.setLocation(location);
    114
    event.setPriority(priority);
    Differences
    Expression1Expression2Difference
    setLocationsetPriorityMETHOD_INVOCATION_NAME_MISMATCH
    locationpriorityVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression event.setLocation(location) is a void method call, and thus it cannot be parameterized
    Expression event.setPriority(priority) is a void method call, and thus it cannot be parameterized
    114
    event.setPriority(priority);
    113
    if (priority != null)
    113
    if (priority != null)
    115
    if (status != null)
    Differences
    Expression1Expression2Difference
    prioritystatusVARIABLE_NAME_MISMATCH
    115
    if (status != null)
    114
    event.setPriority(priority);
    114
    event.setPriority(priority);
    116
    event.setStatus(status);
    Differences
    Expression1Expression2Difference
    setPrioritysetStatusMETHOD_INVOCATION_NAME_MISMATCH
    prioritystatusVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression event.setPriority(priority) is a void method call, and thus it cannot be parameterized
    Expression event.setStatus(status) is a void method call, and thus it cannot be parameterized
    116
    event.setStatus(status);
    115
    if (status != null)
    115
    if (status != null)
    119
    if (description != null)
    Differences
    Expression1Expression2Difference
    statusdescriptionVARIABLE_NAME_MISMATCH
    119
    if (description != null)
    116
    event.setStatus(status);
    116
    event.setStatus(status);
    120
    event.setDescription(description);
    Differences
    Expression1Expression2Difference
    setStatussetDescriptionMETHOD_INVOCATION_NAME_MISMATCH
    statusdescriptionVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression event.setStatus(status) is a void method call, and thus it cannot be parameterized
    Expression event.setDescription(description) is a void method call, and thus it cannot be parameterized
    120
    event.setDescription(description);
    117
    if (url != null)
    117
    if (url != null)
    118
    event.setUrl(url);
    118
    event.setUrl(url);
    Precondition Violations (10)
    Row Violation
    1Expression event.setSummary(summary) is a void method call, and thus it cannot be parameterized
    2Expression event.setEventClass(eventClass) is a void method call, and thus it cannot be parameterized
    3Expression event.setEventClass(eventClass) is a void method call, and thus it cannot be parameterized
    4Expression event.setLocation(location) is a void method call, and thus it cannot be parameterized
    5Expression event.setLocation(location) is a void method call, and thus it cannot be parameterized
    6Expression event.setPriority(priority) is a void method call, and thus it cannot be parameterized
    7Expression event.setPriority(priority) is a void method call, and thus it cannot be parameterized
    8Expression event.setStatus(status) is a void method call, and thus it cannot be parameterized
    9Expression event.setStatus(status) is a void method call, and thus it cannot be parameterized
    10Expression event.setDescription(description) is a void method call, and thus it cannot be parameterized