Program: 2357
Project: 2357
Buggy source:
private void generateActionAndSuccessorInterfacesAndCollectPreActions(Set<EndpointState> visited,EndpointState s){
  if (visited.contains(s) || s.isTerminal()) {
    return;
  }
  visited.add(s);
  Set<IOAction> as=s.getAcceptable();
  for (  IOAction a : as.stream().sorted(IOStateInterfaceGenerator.IOACTION_COMPARATOR).collect(Collectors.toList())) {
    if (!this.actions.containsKey(a)) {
      this.actions.put(a,new ActionInterfaceGenerator(this.apigen,s,a).generateType());
      this.succs.put(a,new SuccessorInterfaceGenerator(this.apigen,s,a).generateType());
      if (s.getStateKind() == Kind.POLY_INPUT) {
        InterfaceBuilder ib=new InterfaceBuilder();
        ib.setName("String_Node_Str" + ActionInterfaceGenerator.getActionString(a));
        ib.setPackage(IOInterfacesGenerator.getIOInterfacePackageName(this.apigen.getGProtocolName(),this.apigen.getSelf()));
        ib.addImports("String_Node_Str");
        ib.addImports(SessionApiGenerator.getEndpointApiRootPackageName(this.gpn) + "String_Node_Str");
        ib.addImports(SessionApiGenerator.getRolesPackageName(this.gpn) + "String_Node_Str");
        ib.addImports(SessionApiGenerator.getOpsPackageName(this.gpn) + "String_Node_Str");
        ib.addModifiers(JavaBuilder.PUBLIC);
        ib.addParameters("String_Node_Str" + SuccessorInterfaceGenerator.getSuccessorInterfaceName(a));
        AbstractMethodBuilder mb=ib.newAbstractMethod();
        HandlerInterfaceGenerator.setHandleMethodHeaderWithoutParamTypes(this.apigen,mb);
        mb.addParameters("String_Node_Str");
        HandlerInterfaceGenerator.addHandleMethodOpAndPayloadParams(this.apigen,a,mb);
        this.caseActions.put(a,ib);
      }
    }
    EndpointState succ=s.accept(a);
    putPreAction(succ,a);
    if (s.getStateKind() == Kind.POLY_INPUT) {
      putBranchPostAction(s,a);
    }
    generateActionAndSuccessorInterfacesAndCollectPreActions(visited,succ);
  }
}

Fixed version (ground truth):
private void generateActionAndSuccessorInterfacesAndCollectPreActions(Set<EndpointState> visited,EndpointState s){
  if (visited.contains(s) || s.isTerminal()) {
    return;
  }
  visited.add(s);
  Set<IOAction> as=s.getTakeable();
  for (  IOAction a : as.stream().sorted(IOStateInterfaceGenerator.IOACTION_COMPARATOR).collect(Collectors.toList())) {
    if (!this.actions.containsKey(a)) {
      this.actions.put(a,new ActionInterfaceGenerator(this.apigen,s,a).generateType());
      this.succs.put(a,new SuccessorInterfaceGenerator(this.apigen,s,a).generateType());
      if (s.getStateKind() == Kind.POLY_INPUT) {
        InterfaceBuilder ib=new InterfaceBuilder();
        ib.setName("String_Node_Str" + ActionInterfaceGenerator.getActionString(a));
        ib.setPackage(IOInterfacesGenerator.getIOInterfacePackageName(this.apigen.getGProtocolName(),this.apigen.getSelf()));
        ib.addImports("String_Node_Str");
        ib.addImports(SessionApiGenerator.getEndpointApiRootPackageName(this.gpn) + "String_Node_Str");
        ib.addImports(SessionApiGenerator.getRolesPackageName(this.gpn) + "String_Node_Str");
        ib.addImports(SessionApiGenerator.getOpsPackageName(this.gpn) + "String_Node_Str");
        ib.addModifiers(JavaBuilder.PUBLIC);
        ib.addParameters("String_Node_Str" + SuccessorInterfaceGenerator.getSuccessorInterfaceName(a));
        AbstractMethodBuilder mb=ib.newAbstractMethod();
        HandlerInterfaceGenerator.setHandleMethodHeaderWithoutParamTypes(this.apigen,mb);
        mb.addParameters("String_Node_Str");
        HandlerInterfaceGenerator.addHandleMethodOpAndPayloadParams(this.apigen,a,mb);
        this.caseActions.put(a,ib);
      }
    }
    EndpointState succ=s.take(a);
    putPreAction(succ,a);
    if (s.getStateKind() == Kind.POLY_INPUT) {
      putBranchPostAction(s,a);
    }
    generateActionAndSuccessorInterfacesAndCollectPreActions(visited,succ);
  }
}