Program: 2287
Project: 2287
Buggy source:
@Override protected void addMethods(){
  final String ROLE_PARAM="String_Node_Str";
  boolean hasConnect=false;
  boolean hasWrap=false;
  for (  IOAction a : curr.getTakeable()) {
    EndpointState succ=curr.take(a);
    MethodBuilder mb=this.cb.newMethod();
    if (a.isSend()) {
      setSendHeaderWithoutReturnType(apigen,a,mb);
    }
 else     if (a.isConnect()) {
      hasConnect=true;
      setConnectHeaderWithoutReturnType(apigen,a,mb);
    }
 else     if (a.isDisconnect()) {
      setDisconnectHeaderWithoutReturnType(apigen,a,mb);
    }
 else     if (a.isWrapClient()) {
      hasWrap=true;
      setWrapClientHeaderWithoutReturnType(apigen,a,mb);
    }
 else {
      throw new RuntimeException("String_Node_Str" + a);
    }
    setNextSocketReturnType(this.apigen,mb,succ);
    if (a.mid.isOp()) {
      this.cb.addImports(getOpsPackageName() + "String_Node_Str");
    }
    if (a.isSend()) {
      if (a.mid.isOp()) {
        List<String> args=getSendPayloadArgs(a);
        String body=JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str"+ getSessionApiOpConstant(a.mid);
        if (!a.payload.isEmpty()) {
          body+="String_Node_Str" + args.stream().collect(Collectors.joining("String_Node_Str"));
        }
        body+="String_Node_Str";
        mb.addBodyLine(body);
      }
 else {
        final String MESSAGE_PARAM="String_Node_Str";
        mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str"+ MESSAGE_PARAM+ "String_Node_Str");
      }
    }
 else     if (a.isConnect()) {
      mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str");
    }
 else     if (a.isDisconnect()) {
      mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str");
    }
 else     if (a.isWrapClient()) {
      mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str");
    }
 else {
      throw new RuntimeException("String_Node_Str" + a);
    }
    addReturnNextSocket(mb,succ);
  }
  if (hasConnect) {
    this.cb.addImports("String_Node_Str");
    this.cb.addImports("String_Node_Str");
  }
  if (hasWrap) {
    this.cb.addImports("String_Node_Str");
    this.cb.addImports("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override protected void addMethods() throws ScribbleException {
  final String ROLE_PARAM="String_Node_Str";
  boolean hasConnect=false;
  boolean hasWrap=false;
  for (  IOAction a : curr.getTakeable()) {
    EndpointState succ=curr.take(a);
    MethodBuilder mb=this.cb.newMethod();
    if (a.isSend()) {
      setSendHeaderWithoutReturnType(apigen,a,mb);
    }
 else     if (a.isConnect()) {
      hasConnect=true;
      setConnectHeaderWithoutReturnType(apigen,a,mb);
    }
 else     if (a.isDisconnect()) {
      setDisconnectHeaderWithoutReturnType(apigen,a,mb);
    }
 else     if (a.isWrapClient()) {
      hasWrap=true;
      setWrapClientHeaderWithoutReturnType(apigen,a,mb);
    }
 else {
      throw new RuntimeException("String_Node_Str" + a);
    }
    setNextSocketReturnType(this.apigen,mb,succ);
    if (a.mid.isOp()) {
      this.cb.addImports(getOpsPackageName() + "String_Node_Str");
    }
    if (a.isSend()) {
      if (a.mid.isOp()) {
        List<String> args=getSendPayloadArgs(a);
        String body=JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str"+ getSessionApiOpConstant(a.mid);
        if (!a.payload.isEmpty()) {
          body+="String_Node_Str" + args.stream().collect(Collectors.joining("String_Node_Str"));
        }
        body+="String_Node_Str";
        mb.addBodyLine(body);
      }
 else {
        final String MESSAGE_PARAM="String_Node_Str";
        mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str"+ MESSAGE_PARAM+ "String_Node_Str");
      }
    }
 else     if (a.isConnect()) {
      mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str");
    }
 else     if (a.isDisconnect()) {
      mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str");
    }
 else     if (a.isWrapClient()) {
      mb.addBodyLine(JavaBuilder.SUPER + "String_Node_Str" + ROLE_PARAM+ "String_Node_Str");
    }
 else {
      throw new RuntimeException("String_Node_Str" + a);
    }
    addReturnNextSocket(mb,succ);
  }
  if (hasConnect) {
    this.cb.addImports("String_Node_Str");
    this.cb.addImports("String_Node_Str");
  }
  if (hasWrap) {
    this.cb.addImports("String_Node_Str");
    this.cb.addImports("String_Node_Str");
  }
}