Program: 156367
Project: 156367
Buggy source:
@Override public void readPayload(int id,PacketBufferBC buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(id,buffer,side,ctx);
  if (side == Side.CLIENT) {
    if (id == NET_RENDER_DATA) {
      if (buffer.readBoolean()) {
        pipe=new Pipe(this,buffer,ctx);
        eventBus.registerHandler(pipe.behaviour);
        eventBus.registerHandler(pipe.flow);
      }
 else       if (pipe != null) {
        eventBus.unregisterHandler(pipe.behaviour);
        eventBus.unregisterHandler(pipe.flow);
        pipe=null;
      }
      for (      EnumFacing face : EnumFacing.VALUES) {
        pluggables.get(face).readCreationPayload(buffer);
      }
      wireManager.readPayload(buffer,side,ctx);
    }
 else     if (id == NET_UPDATE_MULTI) {
      int total=buffer.readUnsignedByte();
      for (      PipeMessageReceiver type : PipeMessageReceiver.VALUES) {
        if (((total >> type.ordinal()) & 1) == 1) {
          readPayload(getReceiverId(type),buffer,side,ctx);
        }
      }
    }
 else     if (id == NET_UPDATE_PIPE_BEHAVIOUR) {
      if (buffer.readBoolean()) {
        if (pipe == null) {
          throw new IllegalStateException("String_Node_Str");
        }
 else {
          pipe.readPayload(buffer,side,ctx);
        }
      }
    }
 else     if (id == NET_UPDATE_PIPE_FLOW) {
      if (buffer.readBoolean()) {
        if (pipe == null) {
          throw new IllegalStateException("String_Node_Str");
        }
 else {
          int fId=buffer.readShort();
          pipe.flow.readPayload(fId,buffer,side);
        }
      }
    }
 else     if (id == NET_UPDATE_PLUG_DOWN)     pluggables.get(EnumFacing.DOWN).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_UP)     pluggables.get(EnumFacing.UP).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_NORTH)     pluggables.get(EnumFacing.NORTH).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_SOUTH)     pluggables.get(EnumFacing.SOUTH).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_WEST)     pluggables.get(EnumFacing.WEST).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_EAST)     pluggables.get(EnumFacing.EAST).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_WIRES)     wireManager.readPayload(buffer,side,ctx);
  }
}

Fixed version (ground truth):
@Override public void readPayload(int id,PacketBufferBC buffer,Side side,MessageContext ctx) throws IOException {
  super.readPayload(id,buffer,side,ctx);
  if (side == Side.CLIENT) {
    if (id == NET_RENDER_DATA) {
      if (buffer.readBoolean()) {
        pipe=new Pipe(this,buffer,ctx);
        eventBus.registerHandler(pipe.behaviour);
        eventBus.registerHandler(pipe.flow);
        if (pipe.flow instanceof IFlowItems) {
          eventBus.registerHandler(FilterEventHandler.class);
        }
      }
 else       if (pipe != null) {
        eventBus.unregisterHandler(pipe.behaviour);
        eventBus.unregisterHandler(pipe.flow);
        pipe=null;
      }
      for (      EnumFacing face : EnumFacing.VALUES) {
        pluggables.get(face).readCreationPayload(buffer);
      }
      wireManager.readPayload(buffer,side,ctx);
    }
 else     if (id == NET_UPDATE_MULTI) {
      int total=buffer.readUnsignedByte();
      for (      PipeMessageReceiver type : PipeMessageReceiver.VALUES) {
        if (((total >> type.ordinal()) & 1) == 1) {
          readPayload(getReceiverId(type),buffer,side,ctx);
        }
      }
    }
 else     if (id == NET_UPDATE_PIPE_BEHAVIOUR) {
      if (buffer.readBoolean()) {
        if (pipe == null) {
          throw new IllegalStateException("String_Node_Str");
        }
 else {
          pipe.readPayload(buffer,side,ctx);
        }
      }
    }
 else     if (id == NET_UPDATE_PIPE_FLOW) {
      if (buffer.readBoolean()) {
        if (pipe == null) {
          throw new IllegalStateException("String_Node_Str");
        }
 else {
          int fId=buffer.readShort();
          pipe.flow.readPayload(fId,buffer,side);
        }
      }
    }
 else     if (id == NET_UPDATE_PLUG_DOWN)     pluggables.get(EnumFacing.DOWN).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_UP)     pluggables.get(EnumFacing.UP).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_NORTH)     pluggables.get(EnumFacing.NORTH).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_SOUTH)     pluggables.get(EnumFacing.SOUTH).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_WEST)     pluggables.get(EnumFacing.WEST).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_PLUG_EAST)     pluggables.get(EnumFacing.EAST).readPayload(buffer,side,ctx);
 else     if (id == NET_UPDATE_WIRES)     wireManager.readPayload(buffer,side,ctx);
  }
}