Program: 105040
Project: 105040
Buggy source:
/** 
 * Sets the receiving simulcast substream for the peers in the endpoints parameter.
 * @param options
 */
protected void configure(SimulcastReceiverOptions options){
  if (options == null) {
    if (logger.isWarnEnabled()) {
      Map<String,Object> map=new HashMap<String,Object>(1);
      map.put("String_Node_Str",getSelf());
      StringCompiler sc=new StringCompiler(map);
      logger.warn(sc.c("String_Node_Str" + "String_Node_Str"));
    }
    return;
  }
  SimulcastManager peerSM=this.getPeerSM();
  if (peerSM == null || !peerSM.hasLayers()) {
    if (logger.isWarnEnabled()) {
      Map<String,Object> map=new HashMap<String,Object>(1);
      map.put("String_Node_Str",getSelf());
      StringCompiler sc=new StringCompiler(map);
      logger.warn(sc.c("String_Node_Str"));
    }
    return;
  }
  SimulcastLayer next=peerSM.getSimulcastLayer(options.getTargetOrder());
  if (next == null || (next.getOrder() != SimulcastManager.SIMULCAST_LAYER_ORDER_LQ && !next.isStreaming())) {
    if (logger.isDebugEnabled()) {
      Map<String,Object> map=new HashMap<String,Object>(1);
      map.put("String_Node_Str",getSelf());
      StringCompiler sc=new StringCompiler(map);
      logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
    }
    return;
  }
  SimulcastLayer current=getCurrent();
  if (current == next) {
    if (logger.isDebugEnabled()) {
      Map<String,Object> map=new HashMap<String,Object>(4);
      map.put("String_Node_Str",getSelf());
      map.put("String_Node_Str",getPeer());
      map.put("String_Node_Str",current);
      map.put("String_Node_Str",next);
      StringCompiler sc=new StringCompiler(map);
      logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
    }
    return;
  }
 else {
    if (options.isHardSwitch() && next != getNext()) {
      this.askForKeyframe(next);
    }
synchronized (receiveLayersSyncRoot) {
      if (options.isUrgent() || current == null) {
        this.sendSimulcastLayersChangedEvent(next);
        this.weakCurrent=new WeakReference<SimulcastLayer>(next);
        this.weakNext=null;
        this.seenNext=0;
        if (logger.isDebugEnabled()) {
          Map<String,Object> map=new HashMap<String,Object>(4);
          map.put("String_Node_Str",getSelf());
          map.put("String_Node_Str",getPeer());
          map.put("String_Node_Str",next);
          map.put("String_Node_Str",options.isUrgent() ? "String_Node_Str" : "String_Node_Str");
          StringCompiler sc=new StringCompiler(map);
          logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str").toString().replaceAll("String_Node_Str","String_Node_Str"));
        }
      }
 else {
        this.sendSimulcastLayersChangingEvent(next);
        this.weakNext=new WeakReference<SimulcastLayer>(next);
        this.seenNext=0;
        if (logger.isDebugEnabled()) {
          Map<String,Object> map=new HashMap<String,Object>(3);
          map.put("String_Node_Str",getSelf());
          map.put("String_Node_Str",getPeer());
          map.put("String_Node_Str",next);
          StringCompiler sc=new StringCompiler(map);
          logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets the receiving simulcast substream for the peers in the endpoints parameter.
 * @param options
 */
protected void configure(SimulcastReceiverOptions options){
  if (options == null) {
    if (logger.isWarnEnabled()) {
      Map<String,Object> map=new HashMap<String,Object>(1);
      map.put("String_Node_Str",getSelf());
      StringCompiler sc=new StringCompiler(map);
      logger.warn(sc.c("String_Node_Str" + "String_Node_Str"));
    }
    return;
  }
  SimulcastManager peerSM=this.getPeerSM();
  if (peerSM == null || !peerSM.hasLayers()) {
    if (logger.isWarnEnabled()) {
      Map<String,Object> map=new HashMap<String,Object>(1);
      map.put("String_Node_Str",getSelf());
      StringCompiler sc=new StringCompiler(map);
      logger.warn(sc.c("String_Node_Str"));
    }
    return;
  }
  SimulcastLayer next=peerSM.getSimulcastLayer(options.getTargetOrder());
  if (next == null || (next.getOrder() != SimulcastManager.SIMULCAST_LAYER_ORDER_LQ && !next.isStreaming())) {
    if (logger.isDebugEnabled()) {
      Map<String,Object> map=new HashMap<String,Object>(1);
      map.put("String_Node_Str",getSelf());
      StringCompiler sc=new StringCompiler(map);
      logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
    }
    return;
  }
synchronized (receiveLayersSyncRoot) {
    SimulcastLayer current=getCurrent();
    if (current == next) {
      this.weakNext=null;
      this.seenNext=0;
      if (logger.isDebugEnabled()) {
        Map<String,Object> map=new HashMap<String,Object>(4);
        map.put("String_Node_Str",getSelf());
        map.put("String_Node_Str",getPeer());
        map.put("String_Node_Str",current);
        map.put("String_Node_Str",next);
        StringCompiler sc=new StringCompiler(map);
        logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
      }
      return;
    }
 else {
      if (options.isHardSwitch() && next != getNext()) {
        this.askForKeyframe(next);
      }
      if (options.isUrgent() || current == null) {
        this.sendSimulcastLayersChangedEvent(next);
        this.weakCurrent=new WeakReference<SimulcastLayer>(next);
        this.weakNext=null;
        this.seenNext=0;
        if (logger.isDebugEnabled()) {
          Map<String,Object> map=new HashMap<String,Object>(4);
          map.put("String_Node_Str",getSelf());
          map.put("String_Node_Str",getPeer());
          map.put("String_Node_Str",next);
          map.put("String_Node_Str",options.isUrgent() ? "String_Node_Str" : "String_Node_Str");
          StringCompiler sc=new StringCompiler(map);
          logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str").toString().replaceAll("String_Node_Str","String_Node_Str"));
        }
      }
 else {
        this.sendSimulcastLayersChangingEvent(next);
        this.weakNext=new WeakReference<SimulcastLayer>(next);
        this.seenNext=0;
        if (logger.isDebugEnabled()) {
          Map<String,Object> map=new HashMap<String,Object>(3);
          map.put("String_Node_Str",getSelf());
          map.put("String_Node_Str",getPeer());
          map.put("String_Node_Str",next);
          StringCompiler sc=new StringCompiler(map);
          logger.debug(sc.c("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"));
        }
      }
    }
  }
}