public static int getLineNumber(Location location, boolean zeroBased) {
    try {
      return location.lineNumber() - (zeroBased ? 1 : 0);
    }
    catch (InternalError | IllegalArgumentException e) {
      return -1;
    }
  }
public static int getLineNumber(Location location, boolean zeroBased)