CalendarItem calendarItem = new CalendarItem("example", ICalendarItem.TYPE.LOCAL, "example", null);
CalendarImporter importer = new CalendarImporter();
Iterator<IEventInfo> i = null;
try {
i = importer.importCalendar(calendarItem, example1);
} catch (Exception e) {
e.printStackTrace();
fail("Got following exception:" + e.getMessage());
}
CalendarItem calendarItem = new CalendarItem("example", ICalendarItem.TYPE.LOCAL, "example", null);
CalendarImporter importer = new CalendarImporter();
Iterator<IEventInfo> i = null;
try {
i = importer.importCalendar(calendarItem, example1);
} catch (Exception e) {
e.printStackTrace();
fail("Got following exception:" + e.getMessage());
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/test/java/org/columba/calendar/parser/CalendarImporterTest.java
|
|
File path: /columba-1.4-src/calendar/src/test/java/org/columba/calendar/parser/CalendarImporterTest.java
|
Method name: void testImportCalendar()
|
|
Method name: void testImportCalendarRecurrence()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | CalendarItem calendarItem = new CalendarItem("example", ICalendarItem.TYPE.LOCAL, "example", null);↵ | | 1 | CalendarItem calendarItem = new CalendarItem("example", ICalendarItem.TYPE.LOCAL, "example", null);↵
|
2 | CalendarImporter importer = new CalendarImporter();↵ | | 2 | CalendarImporter importer = new CalendarImporter();↵
|
3 | Iterator<IEventInfo> i = null;↵ | | 3 | Iterator<IEventInfo> i = null;↵
|
4 | try {↵ | | 4 | try {↵
|
5 | i = importer.importCalendar(calendarItem, example1);↵ | | 5 | i = importer.importCalendar(calendarItem, example1);↵
|
6 | } catch (Exception e) {↵ | | 6 | } catch (Exception e) {↵
|
7 | e.printStackTrace();↵ | | 7 | e.printStackTrace();↵
|
8 | fail("Got following exception:" + e.getMessage());↵ | | 8 | fail("Got following exception:" + e.getMessage());↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | CalendarItem calendarItem = new CalendarItem("example", ICalendarItem.TYPE.LOCAL, "example", null); | | 2 | CalendarItem calendarItem = new CalendarItem("example", ICalendarItem.TYPE.LOCAL, "example", null); |
3 | CalendarImporter importer = new CalendarImporter(); | | 3 | CalendarImporter importer = new CalendarImporter(); |
4 | Iterator<IEventInfo> i = null; | | 4 | Iterator<IEventInfo> i = null; |
5 | try | | 5 | try |
6 | i = importer.importCalendar(calendarItem, example1); | | 6 | i = importer.importCalendar(calendarItem, example1); |
Precondition Violations (0)
Row |
Violation |