private static void addJavadoc(Set<MetricEvent> result,
                                 JavaRefactoringSettings settings,
                                 JavaRefactoringSettings defaultSettings,
                                 VarargEventId eventId, 
                                 Function<JavaRefactoringSettings, Integer> javadocOption) {
    addMetricIfDiffers(result, settings, defaultSettings,
                       s -> getJavadocOption(javadocOption.apply(s)),
                       javadoc -> eventId.metric(JAVADOC.with(javadoc)));
  }
private static void addJavadoc(Set<MetricEvent> result,
                                 JavaRefactoringSettings settings,
                                 JavaRefactoringSettings defaultSettings,
                                 VarargEventId eventId, 
                                 Function<JavaRefactoringSettings, Integer> javadocOption)