@Test public void testOutputFile() throws FileNotFoundException, IOException { final String csvFileName = System.getProperty("user.dir") + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + BLANK_LINE_CSV; final String outFileName = System.getProperty("user.dir") + File.separator + "out.csv"; File csvFile = new File(csvFileName); Assume.assumeTrue(csvFile.exists()); File outFile = new File(outFileName); try { if (outFile.exists()) { outFile.delete(); } Score.main(new String[] { csvFileName, outFileName }); assertTrue(outFile.exists()); } finally { outFile.delete(); } }
public static void main(String[] args) throws IOException { if (args.length != 2) { System.out.println("Usage java " + Score.class.getName() + " <FILENAME>.csv <SCORE.csv>"); return; } final String csvFileName = args[0]; File csvFile = new File(csvFileName); if (!csvFile.exists()) { System.err.println("File " + csvFileName + " was not found"); return; } final String csvScoreFileName = args[1]; File csvScoreFile = new File(csvScoreFileName); if (csvScoreFile.exists()) { log("Deleting existing " + csvScoreFileName); csvScoreFile.delete(); } Map<ToolBudgetKey, Double> scoreMap = computeScore(csvFile); PrintStream writer = new PrintStream(csvScoreFile); log("Writing results to new file " + csvScoreFileName); printScore(writer, scoreMap); }
Score { public static void main(String[] args) throws IOException { if (args.length != 2) { System.out.println("Usage java " + Score.class.getName() + " <FILENAME>.csv <SCORE.csv>"); return; } final String csvFileName = args[0]; File csvFile = new File(csvFileName); if (!csvFile.exists()) { System.err.println("File " + csvFileName + " was not found"); return; } final String csvScoreFileName = args[1]; File csvScoreFile = new File(csvScoreFileName); if (csvScoreFile.exists()) { log("Deleting existing " + csvScoreFileName); csvScoreFile.delete(); } Map<ToolBudgetKey, Double> scoreMap = computeScore(csvFile); PrintStream writer = new PrintStream(csvScoreFile); log("Writing results to new file " + csvScoreFileName); printScore(writer, scoreMap); } }
Score { public static void main(String[] args) throws IOException { if (args.length != 2) { System.out.println("Usage java " + Score.class.getName() + " <FILENAME>.csv <SCORE.csv>"); return; } final String csvFileName = args[0]; File csvFile = new File(csvFileName); if (!csvFile.exists()) { System.err.println("File " + csvFileName + " was not found"); return; } final String csvScoreFileName = args[1]; File csvScoreFile = new File(csvScoreFileName); if (csvScoreFile.exists()) { log("Deleting existing " + csvScoreFileName); csvScoreFile.delete(); } Map<ToolBudgetKey, Double> scoreMap = computeScore(csvFile); PrintStream writer = new PrintStream(csvScoreFile); log("Writing results to new file " + csvScoreFileName); printScore(writer, scoreMap); }  }
Score { public static void main(String[] args) throws IOException { if (args.length != 2) { System.out.println("Usage java " + Score.class.getName() + " <FILENAME>.csv <SCORE.csv>"); return; } final String csvFileName = args[0]; File csvFile = new File(csvFileName); if (!csvFile.exists()) { System.err.println("File " + csvFileName + " was not found"); return; } final String csvScoreFileName = args[1]; File csvScoreFile = new File(csvScoreFileName); if (csvScoreFile.exists()) { log("Deleting existing " + csvScoreFileName); csvScoreFile.delete(); } Map<ToolBudgetKey, Double> scoreMap = computeScore(csvFile); PrintStream writer = new PrintStream(csvScoreFile); log("Writing results to new file " + csvScoreFileName); printScore(writer, scoreMap); }  static void log(String msg); static void main(String[] args); static Map<ToolBudgetKey, Double> aggregateScorePerTool(
			Map<ToolBudgetBenchmarkKey, Double> scorePerBenchmark); }
Score { public static void main(String[] args) throws IOException { if (args.length != 2) { System.out.println("Usage java " + Score.class.getName() + " <FILENAME>.csv <SCORE.csv>"); return; } final String csvFileName = args[0]; File csvFile = new File(csvFileName); if (!csvFile.exists()) { System.err.println("File " + csvFileName + " was not found"); return; } final String csvScoreFileName = args[1]; File csvScoreFile = new File(csvScoreFileName); if (csvScoreFile.exists()) { log("Deleting existing " + csvScoreFileName); csvScoreFile.delete(); } Map<ToolBudgetKey, Double> scoreMap = computeScore(csvFile); PrintStream writer = new PrintStream(csvScoreFile); log("Writing results to new file " + csvScoreFileName); printScore(writer, scoreMap); }  static void log(String msg); static void main(String[] args); static Map<ToolBudgetKey, Double> aggregateScorePerTool(
			Map<ToolBudgetBenchmarkKey, Double> scorePerBenchmark);  }