code: public Reference addGoal() { //3
        Reference t = new Reference();
        if (this.goal == null)
          this.goal = new ArrayList<Reference>();
        this.goal.add(t);
        return t;
      }
docs: syntactic sugar