code: protected static <T> T callClosureForLine(Closure<T> closure, String line, int counter) {
          if (closure.getMaximumNumberOfParameters() == 2) {
              return closure.call(new Object[]{line, counter});
          }
          return closure.call(line);
      }
docs: internal helper method