@@ -301,7 +301,7 @@ private void makeLegend(String category, Set<Report> toolResults, double x, doub
301301 // Special hack to make it line up better if the letter is an 'I' or 'i'
302302 String label = ( ch == 'I' || ch == 'i' ? ch + ": " : "" +ch + ": " );
303303 double score = or .getResults (category ).score * 100 ;
304- String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + ( int ) score + "%)" ;
304+ String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + Math . round ( score ) + "%)" ;
305305 XYTextAnnotation stroketext3 = new XYTextAnnotation (msg , x , y + i * -3.3 );
306306 stroketext3 .setTextAnchor (TextAnchor .CENTER_LEFT );
307307 stroketext3 .setBackgroundPaint (Color .white );
@@ -342,7 +342,7 @@ private void makeLegend(String category, Set<Report> toolResults, double x, doub
342342 if (!BenchmarkScore .showAveOnlyMode ) {
343343 // Special hack to make it line up better if the letter is an 'I' or 'i'
344344 String label = ( ch == 'I' || ch == 'i' ? ch + ": " : "" +ch + ": " );
345- String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + ( int ) score + "%)" ;
345+ String msg = "\u25A0 " + label + r .getToolNameAndVersion () + " (" + Math . round ( score ) + "%)" ;
346346 XYTextAnnotation stroketext4 = new XYTextAnnotation (msg , x , y + i * -3.3 );
347347 stroketext4 .setTextAnchor (TextAnchor .CENTER_LEFT );
348348 stroketext4 .setBackgroundPaint (Color .white );
@@ -378,7 +378,7 @@ private void makeLegend(String category, Set<Report> toolResults, double x, doub
378378 if (commercialToolCount > 1 || (BenchmarkScore .showAveOnlyMode && commercialToolCount == 1 )) {
379379 commercialAve = commercialTotal / commercialToolCount ;
380380 XYTextAnnotation stroketext2 = new XYTextAnnotation ("\u25A0 " + ch + ": Commercial Average"
381- + " (" + ( int ) commercialAve + "%)" , x , y + i * -3.3 );
381+ + " (" + Math . round ( commercialAve ) + "%)" , x , y + i * -3.3 );
382382 stroketext2 .setTextAnchor (TextAnchor .CENTER_LEFT );
383383 stroketext2 .setBackgroundPaint (Color .white );
384384 stroketext2 .setPaint (Color .magenta );
@@ -413,19 +413,19 @@ public int getCommercialToolCount() {
413413 }
414414
415415 public int getCommercialLow () {
416- return (int ) commercialLow ;
416+ return (int ) Math . round ( commercialLow ) ;
417417 }
418418
419419 public TestResults .ToolType getCommercialLowToolType () {
420420 return commercialLowToolType ;
421421 }
422422
423423 public int getCommercialAve () {
424- return (int ) commercialAve ;
424+ return (int ) Math . round ( commercialAve ) ;
425425 }
426426
427427 public int getCommercialHigh () {
428- return (int ) commercialHigh ;
428+ return (int ) Math . round ( commercialHigh ) ;
429429 }
430430
431431 public TestResults .ToolType getCommercialHighToolType () {
0 commit comments