Program: 32458
Project: 32458
Buggy source:
public void initTransportBroker(){
  broker=new TransportBroker(context,appId,service){
    @Override public boolean onHardwareConnected(    TransportType type){
      if (super.onHardwareConnected(type)) {
        Log.d(TAG,"String_Node_Str");
        if (!connected) {
          connected=true;
          Log.d(TAG,"String_Node_Str");
          handleTransportConnected();
        }
 else {
          Log.d(TAG,"String_Node_Str");
        }
        return true;
      }
 else {
        this.start();
      }
      return false;
    }
    @Override public void onHardwareDisconnected(    TransportType type){
      super.onHardwareDisconnected(type);
      if (connected) {
        Log.d(TAG,"String_Node_Str");
        connected=false;
        SdlConnection.enableLegacyMode(isLegacyModeEnabled(),TransportType.BLUETOOTH);
        if (isLegacyModeEnabled()) {
          Log.d(TAG,"String_Node_Str");
          this.stop();
          isDisconnecting=true;
          handleTransportDisconnected("String_Node_Str");
        }
 else {
          Log.d(TAG,"String_Node_Str");
          isDisconnecting=true;
          handleTransportError("String_Node_Str",null);
        }
      }
    }
    @Override public void onPacketReceived(    Parcelable packet){
      if (packet != null) {
        SdlPacket sdlPacket=(SdlPacket)packet;
        handleReceivedPacket(sdlPacket);
      }
    }
  }
;
}

Fixed version (ground truth):
public void initTransportBroker(){
  broker=new TransportBroker(context,appId,service){
    @Override public boolean onHardwareConnected(    TransportType type){
      if (super.onHardwareConnected(type)) {
        Log.d(TAG,"String_Node_Str");
        if (!connected) {
          connected=true;
          Log.d(TAG,"String_Node_Str");
          handleTransportConnected();
        }
 else {
          Log.d(TAG,"String_Node_Str");
        }
        return true;
      }
 else {
        this.start();
      }
      return false;
    }
    @Override public void onHardwareDisconnected(    TransportType type){
      super.onHardwareDisconnected(type);
      if (connected) {
        Log.d(TAG,"String_Node_Str");
        connected=false;
        SdlConnection.enableLegacyMode(isLegacyModeEnabled(),TransportType.BLUETOOTH);
        if (isLegacyModeEnabled()) {
          Log.d(TAG,"String_Node_Str");
          this.stop();
          isDisconnecting=true;
          handleTransportError("String_Node_Str",null);
        }
 else {
          Log.d(TAG,"String_Node_Str");
          isDisconnecting=true;
          handleTransportError("String_Node_Str",null);
        }
      }
    }
    @Override public void onFailedRouterRegistration(    int reason){
      super.onFailedRouterRegistration(reason);
      SdlConnection.enableLegacyMode(isLegacyModeEnabled(),TransportType.BLUETOOTH);
      if (isLegacyModeEnabled()) {
        Log.d(TAG,"String_Node_Str");
        this.stop();
        isDisconnecting=true;
        handleTransportError("String_Node_Str",null);
      }
    }
    @Override public void onPacketReceived(    Parcelable packet){
      if (packet != null) {
        SdlPacket sdlPacket=(SdlPacket)packet;
        handleReceivedPacket(sdlPacket);
      }
    }
  }
;
}