code: public void tagPOS(List<CoreLabel> tokens, Tree tree) {
          try {
              List<TaggedWord> posList = tree.getChild(0).taggedYield();
              for (int i = 0; i < tokens.size(); i++) {
                  String pos = posList.get(i).tag();
                  tokens.get(i).setTag(pos);
              }
          } catch (Exception e) {
              tagPOS(tokens); // At least gives you something.
              LOG.warn("POS Failed:\n" + tree.pennString());
          }
      }
docs: This is for the backward compatibility