code: public static State merge(Map<Attribute, Merger> mapping, List<State> copies) {
          State first;
          State result;
          int c;
          int copiesSize;
          int a;
          int attribSize;
          State current;
          Alternative firstAb;
          Alternative destAb;
          Alternative srcAb;
  
          if (copies.size() == 0) {
              throw new IllegalStateException();
          }
          first = copies.get(0);
          result = new State(Merger.map(mapping, first.getAttribute()));
          attribSize = first.alternatives.size();
          copiesSize = copies.size();
          for (a = 0; a < attribSize; a++) {
              firstAb = first.alternatives.get(a);
              destAb = new Alternative(firstAb.production, firstAb.resultOfs);
              for (c = 0; c < copiesSize; c++) {
                  current = copies.get(c);
                  srcAb = current.alternatives.get(a);
                  addMappedArguments(srcAb, destAb, mapping);
              }
              result.alternatives.add(destAb);
          }
          return result;
      }
docs: --