IEventInfo event = (IEventInfo) c; result.add(new CalendarSearchResult(event.getEvent().getSummary(), event.getEvent().getLocation(), SearchResultBuilder.createURI( event.getCalendar(), event.getId()), c.getComponent()));
ITodoInfo todo = (ITodoInfo) c; result.add(new CalendarSearchResult(todo.getTodo().getSummary(), todo .getTodo().getDescription(), SearchResultBuilder.createURI( todo.getCalendar(), todo.getId()), c.getComponent()));
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/search/CalendarSearchProvider.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/search/CalendarSearchProvider.java
Method name: List query(String, String, boolean, int, int) Method name: List query(String, String, boolean, int, int)
Number of AST nodes: 2 Number of AST nodes: 2
1
IEventInfo event = (IEventInfo) c;
1
ITodoInfo todo = (ITodoInfo) c;
2
					result.add(new CalendarSearchResult(event.getEvent().getSummary(),
2
					result.add(new CalendarSearchResult(todo.getTodo().getSummary(), todo
3
							event.getEvent().getLocation(), SearchResultBuilder.createURI(
3
							.getTodo().getDescription(), SearchResultBuilder.createURI(
4
									event.getCalendar(), event.getId()), c.getComponent()));
4
							todo.getCalendar(), todo.getId()), c.getComponent()));
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.0
Clones locationClones are in the same method
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    13
    IEventInfo event = (IEventInfo)c;
    13
    IEventInfo event = (IEventInfo)c;
    16
    ITodoInfo todo = (ITodoInfo)c;
    Differences
    Expression1Expression2Difference
    org.columba.calendar.model.api.IEventInfoorg.columba.calendar.model.api.ITodoInfoSUBCLASS_TYPE_MISMATCH
    eventtodoVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IEventInfoorg.columba.calendar.model.api.ITodoInfoSUBCLASS_TYPE_MISMATCH
    org.columba.calendar.model.api.IEventInfoorg.columba.calendar.model.api.ITodoInfoSUBCLASS_TYPE_MISMATCH
    16
    ITodoInfo todo = (ITodoInfo)c;
    14
    result.add(new CalendarSearchResult(event.getEvent().getSummary(), event.getEvent().getLocation(), SearchResultBuilder.createURI(event.getCalendar(), event.getId()), c.getComponent()));
    14
    result.add(new CalendarSearchResult(event.getEvent().getSummary(), event.getEvent().getLocation(), SearchResultBuilder.createURI(event.getCalendar(), event.getId()), c.getComponent()));
    17
    result.add(new CalendarSearchResult(todo.getTodo().getSummary(), todo.getTodo().getDescription(), SearchResultBuilder.createURI(todo.getCalendar(), todo.getId()), c.getComponent()));
    Differences
    Expression1Expression2Difference
    getEventgetTodoMETHOD_INVOCATION_NAME_MISMATCH
    eventtodoVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IEventInfoorg.columba.calendar.model.api.ITodoInfoSUBCLASS_TYPE_MISMATCH
    getLocationgetDescriptionMETHOD_INVOCATION_NAME_MISMATCH
    getEventgetTodoMETHOD_INVOCATION_NAME_MISMATCH
    eventtodoVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IEventInfoorg.columba.calendar.model.api.ITodoInfoSUBCLASS_TYPE_MISMATCH
    eventtodoVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IEventInfoorg.columba.calendar.model.api.ITodoInfoSUBCLASS_TYPE_MISMATCH
    eventtodoVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IEventInfoorg.columba.calendar.model.api.ITodoInfoSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression event.getEvent() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression todo.getTodo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()
    Expression event.getEvent().getLocation() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression todo.getTodo().getDescription() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression event.getEvent() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression todo.getTodo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()
    Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()
    Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()
    17
    result.add(new CalendarSearchResult(todo.getTodo().getSummary(), todo.getTodo().getDescription(), SearchResultBuilder.createURI(todo.getCalendar(), todo.getId()), c.getComponent()));
    Precondition Violations (10)
    Row Violation
    1Expression event.getEvent() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression todo.getTodo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()
    4Expression event.getEvent().getLocation() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression todo.getTodo().getDescription() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression event.getEvent() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression todo.getTodo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()
    9Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()
    10Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponentInfo does not declare member(s) public abstract org.columba.calendar.model.api.IEvent getEvent() , public abstract org.columba.calendar.model.api.ITodo getTodo()