Program: 86377
Project: 86377
Buggy source:
/** 
 * Instantiates a <tt>FakeUser</tt> with a specified <tt>nickname</tt> that will connect to the XMPP server contained in <tt>hostInfo</tt>.
 * @param hammer the <tt>Hammer</tt> instance to which this <tt>FakeUser</tt> belongs
 * @param mdc The <tt>MediaDeviceChooser</tt> that will be used by this<tt>FakeUser</tt> to choose the <tt>MediaDevice</tt> for each of its <tt>MediaStream</tt>s.
 * @param nickname the nickname used by this <tt>FakeUser</tt> in theconnection.
 * @param smackDebug the boolean activating or not the debug screen of smack
 */
public FakeUser(Hammer hammer,MediaDeviceChooser mdc,String nickname,boolean smackDebug,boolean statisticsEnabled){
  this.hammer=hammer;
  this.serverInfo=hammer.getServerInfo();
  this.mediaDeviceChooser=mdc;
  this.nickname=(nickname == null) ? "String_Node_Str" : nickname;
  this.conferenceInfo=hammer.getConferenceInfo();
  fakeUserStats=statisticsEnabled ? new FakeUserStats(nickname) : null;
  try {
    config=BOSHConfiguration.builder().setUseHttps(serverInfo.getUseHTTPS()).setHost(serverInfo.getBOSHhostname()).setFile(serverInfo.getBOSHpath()).setPort(serverInfo.getPort()).setXmppDomain(serverInfo.getXMPPDomain()).setDebuggerEnabled(true).performSaslAnonymousAuthentication().build();
  }
 catch (  XmppStringprepException e) {
    logger.fatal("String_Node_Str" + e.toString());
    System.exit(1);
  }
  ProviderManager.addIQProvider(NewJingleIQ.ELEMENT_NAME,NewJingleIQ.NAMESPACE,new JingleProvider());
  ProviderManager.addIQProvider(ConferenceInitiationIQ.ELEMENT_NAME,ConferenceInitiationIQ.NAMESPACE,new ConferenceInitiationIQProvider());
  ProviderManager.addExtensionProvider(NewContentPacketExtension.ELEMENT_NAME,NewContentPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewContentPacketExtension.class));
  ProviderManager.addExtensionProvider(RtpDescriptionPacketExtension.ELEMENT_NAME,RtpDescriptionPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewRtpDescriptionPacketExtension.class));
  ProviderManager.addExtensionProvider(NewPayloadTypePacketExtension.ELEMENT_NAME,NewPayloadTypePacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewPayloadTypePacketExtension.class));
  ProviderManager.addExtensionProvider(NewParameterPacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewParameterPacketExtension.class));
  ProviderManager.addExtensionProvider(NewParameterPacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewParameterPacketExtension.class));
  ProviderManager.addExtensionProvider(NewRtcpFbPacketExtension.ELEMENT_NAME,NewRtcpFbPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewRtcpFbPacketExtension.class));
  ProviderManager.addExtensionProvider(NewRTPHdrExtPacketExtension.ELEMENT_NAME,NewRTPHdrExtPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewRTPHdrExtPacketExtension.class));
  ProviderManager.addExtensionProvider(NewSourcePacketExtension.ELEMENT_NAME,NewSourcePacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewSourcePacketExtension.class));
  ProviderManager.addExtensionProvider(NewSSRCInfoPacketExtension.ELEMENT_NAME,NewSSRCInfoPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewSSRCInfoPacketExtension.class));
  ProviderManager.addExtensionProvider(NewIceUdpTransportPacketExtension.ELEMENT_NAME,NewIceUdpTransportPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewIceUdpTransportPacketExtension.class));
  ProviderManager.addExtensionProvider(NewDtlsFingerprintPacketExtension.ELEMENT_NAME,NewDtlsFingerprintPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewDtlsFingerprintPacketExtension.class));
  ProviderManager.addExtensionProvider(NewCandidatePacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewCandidatePacketExtension.class));
  ProviderManager.addExtensionProvider(NewCandidatePacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewCandidatePacketExtension.class));
  ProviderManager.addExtensionProvider(NewSourceGroupPacketExtension.ELEMENT_NAME,NewSourceGroupPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewSourceGroupPacketExtension.class));
  connection=new XMPPBOSHConnection(config);
  connection.addSyncStanzaListener(this,(  Stanza packet) -> packet instanceof NewJingleIQ);
  mediaStreamMap=HammerUtils.createMediaStreams();
  if (fakeUserStats != null) {
    fakeUserStats.setMediaStreamStats(mediaStreamMap.get(MediaType.AUDIO.toString()));
    fakeUserStats.setMediaStreamStats(mediaStreamMap.get(MediaType.VIDEO.toString()));
  }
  ServiceDiscoveryManager discoManager=ServiceDiscoveryManager.getInstanceFor(connection);
  discoManager.addFeature(JingleIQ.NAMESPACE);
  discoManager.addFeature(RtpDescriptionPacketExtension.NAMESPACE);
  discoManager.addFeature(RawUdpTransportPacketExtension.NAMESPACE);
  discoManager.addFeature(IceUdpTransportPacketExtension.NAMESPACE);
  discoManager.addFeature(DtlsFingerprintPacketExtension.NAMESPACE);
  discoManager.addFeature(RTPHdrExtPacketExtension.NAMESPACE);
  discoManager.addFeature("String_Node_Str");
  discoManager.addFeature("String_Node_Str");
  org.jivesoftware.smackx.ping.PingManager.getInstanceFor(connection).setPingInterval(15);
}

Fixed version (ground truth):
/** 
 * Instantiates a <tt>FakeUser</tt> with a specified <tt>nickname</tt> that will connect to the XMPP server contained in <tt>hostInfo</tt>.
 * @param hammer the <tt>Hammer</tt> instance to which this <tt>FakeUser</tt> belongs
 * @param mdc The <tt>MediaDeviceChooser</tt> that will be used by this<tt>FakeUser</tt> to choose the <tt>MediaDevice</tt> for each of its <tt>MediaStream</tt>s.
 * @param nickname the nickname used by this <tt>FakeUser</tt> in theconnection.
 * @param smackDebug the boolean activating or not the debug screen of smack
 */
public FakeUser(Hammer hammer,MediaDeviceChooser mdc,String nickname,boolean smackDebug,boolean statisticsEnabled){
  this.hammer=hammer;
  this.serverInfo=hammer.getServerInfo();
  this.mediaDeviceChooser=mdc;
  this.nickname=(nickname == null) ? "String_Node_Str" : nickname;
  this.conferenceInfo=hammer.getConferenceInfo();
  fakeUserStats=statisticsEnabled ? new FakeUserStats(nickname) : null;
  try {
    config=BOSHConfiguration.builder().setUseHttps(serverInfo.getUseHTTPS()).setHost(serverInfo.getBOSHhostname()).setFile(serverInfo.getBOSHpath()).setPort(serverInfo.getPort()).setXmppDomain(serverInfo.getXMPPDomain()).setDebuggerEnabled(true).performSaslAnonymousAuthentication().build();
  }
 catch (  XmppStringprepException e) {
    logger.fatal("String_Node_Str" + e.toString());
    System.exit(1);
  }
  ProviderManager.addIQProvider(NewJingleIQ.ELEMENT_NAME,NewJingleIQ.NAMESPACE,new JingleProvider());
  ProviderManager.addIQProvider(ConferenceInitiationIQ.ELEMENT_NAME,ConferenceInitiationIQ.NAMESPACE,new ConferenceInitiationIQProvider());
  ProviderManager.addExtensionProvider(NewContentPacketExtension.ELEMENT_NAME,NewContentPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewContentPacketExtension.class));
  ProviderManager.addExtensionProvider(RtpDescriptionPacketExtension.ELEMENT_NAME,RtpDescriptionPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewRtpDescriptionPacketExtension.class));
  ProviderManager.addExtensionProvider(NewPayloadTypePacketExtension.ELEMENT_NAME,NewPayloadTypePacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewPayloadTypePacketExtension.class));
  ProviderManager.addExtensionProvider(NewParameterPacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewParameterPacketExtension.class));
  ProviderManager.addExtensionProvider(NewParameterPacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewParameterPacketExtension.class));
  ProviderManager.addExtensionProvider(NewRtcpFbPacketExtension.ELEMENT_NAME,NewRtcpFbPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewRtcpFbPacketExtension.class));
  ProviderManager.addExtensionProvider(NewRTPHdrExtPacketExtension.ELEMENT_NAME,NewRTPHdrExtPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewRTPHdrExtPacketExtension.class));
  ProviderManager.addExtensionProvider(NewSourcePacketExtension.ELEMENT_NAME,NewSourcePacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewSourcePacketExtension.class));
  ProviderManager.addExtensionProvider(NewSSRCInfoPacketExtension.ELEMENT_NAME,NewSSRCInfoPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewSSRCInfoPacketExtension.class));
  ProviderManager.addExtensionProvider(NewIceUdpTransportPacketExtension.ELEMENT_NAME,NewIceUdpTransportPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewIceUdpTransportPacketExtension.class));
  ProviderManager.addExtensionProvider(NewDtlsFingerprintPacketExtension.ELEMENT_NAME,NewDtlsFingerprintPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewDtlsFingerprintPacketExtension.class));
  ProviderManager.addExtensionProvider(NewCandidatePacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewCandidatePacketExtension.class));
  ProviderManager.addExtensionProvider(NewCandidatePacketExtension.ELEMENT_NAME,"String_Node_Str",new NewAbstractExtensionElementProvider<>(NewCandidatePacketExtension.class));
  ProviderManager.addExtensionProvider(NewSourceGroupPacketExtension.ELEMENT_NAME,NewSourceGroupPacketExtension.NAMESPACE,new NewAbstractExtensionElementProvider<>(NewSourceGroupPacketExtension.class));
  connection=new XMPPBOSHConnection(config);
  connection.registerIQRequestHandler(new AbstractIqRequestHandler(NewJingleIQ.ELEMENT_NAME,NewJingleIQ.NAMESPACE,IQ.Type.set,IQRequestHandler.Mode.sync){
    @Override public IQ handleIQRequest(    IQ iq){
      NewJingleIQ jiq=(NewJingleIQ)iq;
      System.out.println("String_Node_Str" + jiq.toXML());
      IQ result=IQ.createResultIQ(iq);
switch (jiq.getAction()) {
case SESSION_INITIATE:
        logger.info("String_Node_Str");
      sessionInitiate=jiq;
    acceptJingleSession();
}
return result;
}
}
);
mediaStreamMap=HammerUtils.createMediaStreams();
if (fakeUserStats != null) {
fakeUserStats.setMediaStreamStats(mediaStreamMap.get(MediaType.AUDIO.toString()));
fakeUserStats.setMediaStreamStats(mediaStreamMap.get(MediaType.VIDEO.toString()));
}
ServiceDiscoveryManager discoManager=ServiceDiscoveryManager.getInstanceFor(connection);
discoManager.addFeature(JingleIQ.NAMESPACE);
discoManager.addFeature(RtpDescriptionPacketExtension.NAMESPACE);
discoManager.addFeature(RawUdpTransportPacketExtension.NAMESPACE);
discoManager.addFeature(IceUdpTransportPacketExtension.NAMESPACE);
discoManager.addFeature(DtlsFingerprintPacketExtension.NAMESPACE);
discoManager.addFeature(RTPHdrExtPacketExtension.NAMESPACE);
discoManager.addFeature("String_Node_Str");
discoManager.addFeature("String_Node_Str");
org.jivesoftware.smackx.ping.PingManager.getInstanceFor(connection).setPingInterval(15);
}