code: public static AminoAcidSequence translate(NucleotideSequence ns, TranslationParameters translationParameters) {
          byte[] data;
          if (translationParameters.fromLeft == null) {
              data = new byte[(ns.size() + (translationParameters.includeIncomplete ? 2 : 0)) / 3];
              int aaLength = ns.size() / 3;
              int leftAALength = (aaLength + 1) / 2;
              int rightAALength = aaLength - leftAALength;
              GeneticCode.translate(data, 0, ns, 0, leftAALength * 3);
              GeneticCode.translate(data, data.length - rightAALength, ns, ns.size() - rightAALength * 3, rightAALength * 3);
              if (ns.size() % 3 != 0)
                  data[leftAALength] = AminoAcidAlphabet.INCOMPLETE_CODON;
          } else if (translationParameters.fromLeft) {
              int aaLength = (ns.size() - translationParameters.frame + (translationParameters.includeIncomplete ? 2 : 0)) / 3;
              if (translationParameters.includeIncomplete && translationParameters.frame != 0)
                  ++aaLength;
              data = new byte[aaLength];
              int pointer = 0;
              if (translationParameters.includeIncomplete && translationParameters.frame != 0)
                  data[pointer++] = AminoAcidAlphabet.INCOMPLETE_CODON;
              int trLength = ((ns.size() - translationParameters.frame) / 3) * 3;
              GeneticCode.translate(data, pointer, ns, translationParameters.frame, trLength);
              pointer += trLength / 3;
              if (pointer != aaLength)
                  data[data.length - 1] = AminoAcidAlphabet.INCOMPLETE_CODON;
          } else
              return translate(ns, translationParameters.convertToLeftBound(ns.size()));
          return new AminoAcidSequence(data, true);
      }
docs: Use one of specialized method instead:
  
  <ul>
  <li>{@link #translateFromLeft(NucleotideSequence)}</li>
  <li>{@link #translateFromRight(NucleotideSequence)}</li>
  <li>{@link #translateFromCenter(NucleotideSequence)}</li>
  </ul>