code: public void setSegmentObject(int seg, StringMatcher obj) {
          // Since we call parseSection() recursively, nested
          // segments will result in segment i+1 getting parsed
          // and stored before segment i; be careful with the
          // vector handling here.
          while (segmentObjects.size() < seg) {
              segmentObjects.add(null);
          }
          int index = getSegmentStandin(seg) - curData.variablesBase;
          if (segmentObjects.get(seg-1) != null ||
              variablesVector.get(index) != null) {
              throw new RuntimeException(); // should never happen
          }
          segmentObjects.set(seg-1, obj);
          variablesVector.set(index, obj);
      }
docs: Set the object for segment seg (1-based).