File userDir = FileUtils.getUserDirectory();
File outFile = new File(userDir, "stage-statistics.csv");
Writer writer = new FileWriter(outFile);
StateChangeLogGenerator statistics = new StateChangeLogGenerator(writer, null);
List<Plan> plans = parser.importProjects(in);
for (Iterator<Plan> iter = plans.iterator(); iter.hasNext();) {
statistics.writeStatistics(iter.next());
}
statistics.endReport();
System.out.printf("Statistics written to : %s", outFile.getAbsolutePath());