code: protected boolean shouldReport(JavaFileObject file, int pos) {
          if (file == null)
              return true;
  
          Pair<JavaFileObject,Integer> coords = new Pair<>(file, pos);
          boolean shouldReport = !recorded.contains(coords);
          if (shouldReport)
              recorded.add(coords);
          return shouldReport;
      }
docs: Returns true if an error needs to be reported for a given
  source name and pos.