Program: 4391
Project: 4391
Buggy source:
protected void handleVendorMessage(VendorMessage vm){
  super.handleVendorMessage(vm);
  if (vm instanceof HopsFlowVendorMessage) {
    HopsFlowVendorMessage hops=(HopsFlowVendorMessage)vm;
    if (isSupernodeClientConnection())     setBusy(hops.getHopValue() == 0);
    softMaxHops=hops.getHopValue();
  }
 else   if (vm instanceof PushProxyAcknowledgement) {
    PushProxyAcknowledgement ack=(PushProxyAcknowledgement)vm;
    if (Arrays.equals(ack.getGUID(),RouterService.getMessageRouter()._clientGUID)) {
      pushProxyPort=ack.getListeningPort();
      pushProxyAddr=ack.getListeningAddress();
    }
  }
 else   if (vm instanceof CapabilitiesVM) {
    CapabilitiesVM capVM=(CapabilitiesVM)vm;
    if (capVM.supportsSIMPP() > SimppManager.instance().getVersion()) {
      SimppRequestVM simppReq=new SimppRequestVM();
      send(simppReq);
    }
    if (capVM.supportsUpdate() > UpdateHandler.instance().getLatestId()) {
      send(new UpdateRequest());
    }
  }
 else   if (vm instanceof MessagesSupportedVendorMessage) {
    if (isClientSupernodeConnection() && (remoteHostSupportsLeafGuidance() >= 0)) {
      SearchResultHandler srh=RouterService.getSearchResultHandler();
      List queries=srh.getQueriesToReSend();
      for (Iterator i=queries.iterator(); i.hasNext(); )       send((Message)i.next());
    }
    if (remoteHostSupportsPushProxy() > -1) {
      GUID clientGUID=new GUID(RouterService.getMessageRouter()._clientGUID);
      PushProxyRequest req=new PushProxyRequest(clientGUID);
      send(req);
    }
    if (!UDPService.instance().canReceiveUnsolicited() && (_numUDPConnectBackRequests < MAX_UDP_CONNECT_BACK_ATTEMPTS) && (remoteHostSupportsUDPRedirect() > -1)) {
      GUID connectBackGUID=RouterService.getUDPConnectBackGUID();
      Message udp=new UDPConnectBackVendorMessage(RouterService.getPort(),connectBackGUID);
      send(udp);
      _numUDPConnectBackRequests++;
    }
    if (!RouterService.acceptedIncomingConnection() && (_numTCPConnectBackRequests < MAX_TCP_CONNECT_BACK_ATTEMPTS) && (remoteHostSupportsTCPRedirect() > -1)) {
      Message tcp=new TCPConnectBackVendorMessage(RouterService.getPort());
      send(tcp);
      _numTCPConnectBackRequests++;
    }
  }
}

Fixed version (ground truth):
protected void handleVendorMessage(VendorMessage vm){
  super.handleVendorMessage(vm);
  if (vm instanceof HopsFlowVendorMessage) {
    HopsFlowVendorMessage hops=(HopsFlowVendorMessage)vm;
    if (isSupernodeClientConnection())     setBusy(hops.getHopValue() == 0);
    hopsFlowMax=hops.getHopValue();
  }
 else   if (vm instanceof PushProxyAcknowledgement) {
    PushProxyAcknowledgement ack=(PushProxyAcknowledgement)vm;
    if (Arrays.equals(ack.getGUID(),RouterService.getMessageRouter()._clientGUID)) {
      pushProxyPort=ack.getListeningPort();
      pushProxyAddr=ack.getListeningAddress();
    }
  }
 else   if (vm instanceof CapabilitiesVM) {
    CapabilitiesVM capVM=(CapabilitiesVM)vm;
    if (capVM.supportsSIMPP() > SimppManager.instance().getVersion()) {
      SimppRequestVM simppReq=new SimppRequestVM();
      send(simppReq);
    }
    if (capVM.supportsUpdate() > UpdateHandler.instance().getLatestId()) {
      send(new UpdateRequest());
    }
  }
 else   if (vm instanceof MessagesSupportedVendorMessage) {
    if (isClientSupernodeConnection() && (remoteHostSupportsLeafGuidance() >= 0)) {
      SearchResultHandler srh=RouterService.getSearchResultHandler();
      List queries=srh.getQueriesToReSend();
      for (Iterator i=queries.iterator(); i.hasNext(); )       send((Message)i.next());
    }
    if (remoteHostSupportsPushProxy() > -1) {
      GUID clientGUID=new GUID(RouterService.getMessageRouter()._clientGUID);
      PushProxyRequest req=new PushProxyRequest(clientGUID);
      send(req);
    }
    if (!UDPService.instance().canReceiveUnsolicited() && (_numUDPConnectBackRequests < MAX_UDP_CONNECT_BACK_ATTEMPTS) && (remoteHostSupportsUDPRedirect() > -1)) {
      GUID connectBackGUID=RouterService.getUDPConnectBackGUID();
      Message udp=new UDPConnectBackVendorMessage(RouterService.getPort(),connectBackGUID);
      send(udp);
      _numUDPConnectBackRequests++;
    }
    if (!RouterService.acceptedIncomingConnection() && (_numTCPConnectBackRequests < MAX_TCP_CONNECT_BACK_ATTEMPTS) && (remoteHostSupportsTCPRedirect() > -1)) {
      Message tcp=new TCPConnectBackVendorMessage(RouterService.getPort());
      send(tcp);
      _numTCPConnectBackRequests++;
    }
  }
}