FileOutputStream fout = new FileOutputStream(file); CalendarOutputter outputter = new CalendarOutputter(); outputter.setValidating(false); Calendar calendar = new Calendar(); calendar.getProperties().add( new ProdId("-//Columba Project//iCal4j 1.0//EN")); calendar.getProperties().add(Version.VERSION_2_0); calendar.getProperties().add(CalScale.GREGORIAN);
FileOutputStream fout = new FileOutputStream(file); CalendarOutputter outputter = new CalendarOutputter(); outputter.setValidating(true); Calendar calendar = new Calendar(); calendar.getProperties().add( new ProdId("-//Columba Project//iCal4j 1.0//EN")); calendar.getProperties().add(Version.VERSION_2_0); calendar.getProperties().add(CalScale.GREGORIAN);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/CalendarExporter.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/CalendarExporter.java
Method name: void exportCalendar(File, String, ICalendarStore) Method name: void exportSingleEvent(File, IComponentInfo, ICalendarStore)
Number of AST nodes: 7 Number of AST nodes: 7
1
FileOutputStream fout = new FileOutputStream(file);
1
FileOutputStream fout = new FileOutputStream(file);
2
		CalendarOutputter outputter = new CalendarOutputter();
2
		CalendarOutputter outputter = new CalendarOutputter();
3
		outputter.setValidating(false);
3
		outputter.setValidating(true);
4
		Calendar calendar = new Calendar();
4
		Calendar calendar = new Calendar();
5
		calendar.getProperties().add(
5
		calendar.getProperties().add(
6
				new ProdId("-//Columba Project//iCal4j 1.0//EN"));
6
				new ProdId("-//Columba Project//iCal4j 1.0//EN"));
7
		calendar.getProperties().add(Version.VERSION_2_0);
7
		calendar.getProperties().add(Version.VERSION_2_0);
8
		calendar.getProperties().add(CalScale.GREGORIAN);
8
		calendar.getProperties().add(CalScale.GREGORIAN);
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 declared in the same class
Number of node comparisons22
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    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
    1
    FileOutputStream fout = new FileOutputStream(file);
    1
    FileOutputStream fout = new FileOutputStream(file);
    2
    CalendarOutputter outputter = new CalendarOutputter();
    2
    CalendarOutputter outputter = new CalendarOutputter();
    3
    outputter.setValidating(false);
    3
    outputter.setValidating(false);
    3
    outputter.setValidating(true);
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    3
    outputter.setValidating(true);
    4
    Calendar calendar = new Calendar();
    4
    Calendar calendar = new Calendar();
    5
    calendar.getProperties().add(new ProdId("-//Columba Project//iCal4j 1.0//EN"));
    5
    calendar.getProperties().add(new ProdId("-//Columba Project//iCal4j 1.0//EN"));
    6
    calendar.getProperties().add(Version.VERSION_2_0);
    6
    calendar.getProperties().add(Version.VERSION_2_0);
    7
    calendar.getProperties().add(CalScale.GREGORIAN);
    7
    calendar.getProperties().add(CalScale.GREGORIAN);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables calendar, fout, outputter , while Clone fragment #2 returns variables calendar, fout, outputter