static StringBuffer helpSubstituteCharacters(StringBuffer self, String newChars, String oldChars) {
    { int pos = Stella.NULL_INTEGER;

      { int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = self.length() - 1;

        for (;iter000 <= upperBound000; iter000 = iter000 + 1) {
          i = iter000;
          pos = Native.string_position(oldChars, self.charAt(i), 0);
          if (pos != Stella.NULL_INTEGER) {
            edu.isi.stella.javalib.Native.mutableString_nthSetter(self, (newChars.charAt(pos)), i);
          }
        }
      }
      return (self);
    }
  }