code: static String formatMultipleSynthesis(String[] matches,
        String leftSide, String rightSide) {
      String errorMessage;
      String suggestionLeft = "";
      String suggestionRight = "";
      String rightSideNew = rightSide;
      int sPos = leftSide.lastIndexOf(SUGGESTION_START_TAG);
      if (sPos >= 0) {
        suggestionLeft = leftSide.substring(sPos + SUGGESTION_START_TAG.length());
      }
      if (StringTools.isEmpty(suggestionLeft)) {
        errorMessage = leftSide;
      } else {
        errorMessage = leftSide.substring(0, leftSide.lastIndexOf(SUGGESTION_START_TAG)) + SUGGESTION_START_TAG;
      }
      int rPos = rightSide.indexOf(SUGGESTION_END_TAG);
      if (rPos >= 0) {
        suggestionRight = rightSide.substring(0, rPos);
      }
      if (!StringTools.isEmpty(suggestionRight)) {
        rightSideNew = rightSide.substring(rightSide.indexOf(SUGGESTION_END_TAG));
      }
      int lastLeftSugEnd = leftSide.indexOf(SUGGESTION_END_TAG);
      int lastLeftSugStart = leftSide.lastIndexOf(SUGGESTION_START_TAG);
      StringBuilder sb = new StringBuilder();
      sb.append(errorMessage);
      for (int z = 0; z < matches.length; z++) {
        sb.append(suggestionLeft);
        sb.append(matches[z]);
        sb.append(suggestionRight);
        if (z < matches.length - 1 && lastLeftSugEnd < lastLeftSugStart) {
          sb.append(SUGGESTION_END_TAG);
          sb.append(", ");
          sb.append(SUGGESTION_START_TAG);
        }
      }
      sb.append(rightSideNew);
      return sb.toString();
    }
docs: non-private for tests