IEvent event = (IEvent) c; Calendar startDate = event.getDtStart(); startDateLabel.setText(df.format(startDate.getTime()));
ITodo todo = (ITodo) c; Calendar startDate = todo.getDtStart(); startDateLabel.setText(df.format(startDate.getTime()));
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/search/SearchResultList.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/search/SearchResultList.java
Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean) Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
IEvent event = (IEvent) c;
1
ITodo todo = (ITodo) c;
2
				Calendar startDate = event.getDtStart();
2
				Calendar startDate = todo.getDtStart();
3
				startDateLabel.setText(df.format(startDate.getTime()));
3
				startDateLabel.setText(df.format(startDate.getTime()));
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 statements3
    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
    14
    IEvent event = (IEvent)c;
    14
    IEvent event = (IEvent)c;
    18
    ITodo todo = (ITodo)c;
    Differences
    Expression1Expression2Difference
    org.columba.calendar.model.api.IEventorg.columba.calendar.model.api.ITodoSUBCLASS_TYPE_MISMATCH
    eventtodoVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IEventorg.columba.calendar.model.api.ITodoSUBCLASS_TYPE_MISMATCH
    org.columba.calendar.model.api.IEventorg.columba.calendar.model.api.ITodoSUBCLASS_TYPE_MISMATCH
    18
    ITodo todo = (ITodo)c;
    15
    Calendar startDate = event.getDtStart();
    15
    Calendar startDate = event.getDtStart();
    19
    Calendar startDate = todo.getDtStart();
    Differences
    Expression1Expression2Difference
    eventtodoVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IEventorg.columba.calendar.model.api.ITodoSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponent does not declare member(s) public abstract java.util.Calendar getDtStart()
    19
    Calendar startDate = todo.getDtStart();
    16
    startDateLabel.setText(df.format(startDate.getTime()));
    20
    startDateLabel.setText(df.format(startDate.getTime()));
    Precondition Violations (1)
    Row Violation
    1Expression event cannot be unified with expression todo , because common superclass org.columba.calendar.model.api.IComponent does not declare member(s) public abstract java.util.Calendar getDtStart()