code: public static double computeCover(boolean[] cover) {
      int covered = 0;
      for (boolean i : cover) {
        if (i) {
          covered++;
        }
      }
      return (double) covered / (double) cover.length;
    }
docs: Compute the covered percentage.
  
  @param cover the cover array.
  @return coverage percentage.