package org.batfish.question.string_expr.bgp_neighbor;

import org.batfish.question.Environment;
import org.batfish.question.bgp_neighbor_expr.BgpNeighborExpr;
import org.batfish.representation.BgpNeighbor;

public final class GroupBgpNeighborStringExpr extends BgpNeighborStringExpr {

   public GroupBgpNeighborStringExpr(BgpNeighborExpr caller) {
      super(caller);
   }

   @Override
   public String evaluate(Environment environment) {
      BgpNeighbor caller = _caller.evaluate(environment);
      return caller.getGroupName();
   }

}

@@ -504,37 +504,168 @@
     
-return caller.getGroupName();
+String groupName = caller.getGroupName();%0A      if (groupName != null) %7B%0A         return caller.getGroupName();%0A      %7D%0A      else %7B%0A         return %22%22;%0A      %7D
 %0A   

fix bgp group name query hitting nullpointerexception