class DetectionResults {
    private float time;
    private float timeWithout;
    private float detectionRate;
    private int wrongDetected;
    private long charsInText;
    private int sentencesInText;
    private int injectedSentecesInText;

    DetectionResults(float time, float timeWithout, float detectionRate, int wrongDetected, long charsInText, int sentencesInText, int injectedSentecesInText) {
      this.time = time;
      this.timeWithout = timeWithout;
      this.detectionRate = detectionRate;
      this.wrongDetected = wrongDetected;

      this.charsInText = charsInText;
      this.sentencesInText = sentencesInText;
      this.injectedSentecesInText = injectedSentecesInText;
    }

    public float getTimeDiff() {
      return time - timeWithout;
    }

  }

  private static DetectionResults runTest(MultiLangCorpora mlc) {
    return runTest(mlc, "http://localhost:8081");
  }

  private static DetectionResults runTest(MultiLangCorpora mlc, String languageToolServer) {<FILL_FUNCTION_BODY>

    RemoteLanguageTool remoteLanguageTool = new RemoteLanguageTool(Tools.getUrl(languageToolServer));
    String language = useLangDetectionService ? "auto" : getSupportedLangCode(mlc.getLanguage());
    long startTime = System.currentTimeMillis();
    RemoteResult results = null;
    try {
      Map<String, String> params = new HashMap<>();
      params.put("enableMultiLanguageChecks", "true");
      params.put("preferredLanguages", "de,en");
      results = remoteLanguageTool.check(mlc.getText(), language, params);
    } catch (RuntimeException ex) {
      if (spamToMe) {
        System.out.println("too many errors");
      }
      return null;
    }
    long endTime = System.currentTimeMillis();
    float timeToCheck = (endTime - startTime) / 1000f;
    //2nd check without multilanguage
    long startTimeRound2 = System.currentTimeMillis();
    try {
      Map<String, String> params = new HashMap<>();
      params.put("enableMultiLanguageChecks", "false");
      params.put("preferredLanguages", "de");
      remoteLanguageTool.check(mlc.getText(), language, params);
    } catch (RuntimeException ex) {
      if (spamToMe) {
        System.out.println("too many errors");
      }
      return null;
    }
    long endTimeRound2 = System.currentTimeMillis();
    float timeToCheckRound2 = (endTimeRound2 - startTimeRound2) / 1000f;

    //detected sentences by lt
    List<String> detectedSentences = new ArrayList<>();
    for (RemoteIgnoreRange range : results.getIgnoreRanges()) {
      detectedSentences.add(mlc.getText().substring(range.getFrom(), range.getTo()).trim());
    }
    //injected lines by checker
    List<String> injectedLines = mlc.getInjectedSentences().stream().map(InjectedSentence::getText).collect(Collectors.toList());

    //later cleaned by not detectedLines
    List<String> detectedLines = new ArrayList<>(injectedLines);

    //assume everything is not detected
    List<String> notDetectedLines = new ArrayList<>(injectedLines);

    //assume everything is wrong detected
    List<String> wrongDetectedSentences = new ArrayList<>(detectedSentences);

    //filter all correct detected sentences from wrong detected sentences.
    List<String> notWrongDetected = new ArrayList<>();
    List<String> tmpRemoveFromWrongDetectedSentences = new ArrayList<>();
    for (String sentence : wrongDetectedSentences) {
      for (String injectedLine : injectedLines) {
        if (injectedLine.contains(sentence)) { //If a line in the corpora has more than one sentence, but the range is per sentence
          notWrongDetected.add(injectedLine);
          tmpRemoveFromWrongDetectedSentences.add(sentence);
        }
      }
    }
    wrongDetectedSentences.removeAll(tmpRemoveFromWrongDetectedSentences);
    notDetectedLines.removeAll(notWrongDetected);
    detectedLines.removeAll(notDetectedLines);

    allWrongRanges.addAll(wrongDetectedSentences);
    allNotDetected.addAll(notDetectedLines);

    if (rounds == 1) {
      System.out.println(mlc.getText());
    }
    return new DetectionResults(timeToCheck, timeToCheckRound2, ((float) detectedLines.size() / (float) injectedLines.size()) * 100, wrongDetectedSentences.size(), mlc.getText().length(), mlc.getSentencesInText(), mlc.getInjectedSentences().size());
  
<no_super_class>