Program: 105032
Project: 105032
Buggy source:
@Override public void onStringData(WebRtcDataStream src,String msg){
  JSONParser parser=new JSONParser();
  JSONObject jsonObject;
  try {
    Object obj=parser.parse(msg);
    if (obj instanceof JSONObject)     jsonObject=(JSONObject)obj;
 else     return;
  }
 catch (  ParseException e) {
    logger.warn("String_Node_Str" + getID(),e);
    return;
  }
  Object colibriClass=jsonObject.get(Videobridge.COLIBRI_CLASS);
  if (colibriClass != null) {
    if ("String_Node_Str".equals(colibriClass)) {
      String oldSelectedEndpoint, newSelectedEndpoint;
      boolean changed;
synchronized (selectedEndpointSyncRoot) {
        oldSelectedEndpoint=this.selectedEndpointID;
        newSelectedEndpoint=(String)jsonObject.get("String_Node_Str");
        if (newSelectedEndpoint == null || newSelectedEndpoint.length() == 0) {
          newSelectedEndpoint=SELECTED_ENDPOINT_NOT_WATCHING_VIDEO;
        }
 else {
          newSelectedEndpoint=newSelectedEndpoint.trim();
        }
        changed=!newSelectedEndpoint.equals(oldSelectedEndpoint);
        if (changed)         this.selectedEndpointID=newSelectedEndpoint;
      }
      if (changed) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + getID() + "String_Node_Str"+ newSelectedEndpoint);
        }
        firePropertyChange(SELECTED_ENDPOINT_PROPERTY_NAME,oldSelectedEndpoint,newSelectedEndpoint);
      }
    }
 else     if ("String_Node_Str".equals(colibriClass)) {
      String oldPinnedEndpoint, newPinnedEndpoint;
      boolean changed;
synchronized (pinnedEndpointSyncRoot) {
        oldPinnedEndpoint=this.pinnedEndpointID;
        newPinnedEndpoint=(String)jsonObject.get("String_Node_Str");
        newPinnedEndpoint=newPinnedEndpoint == null ? "String_Node_Str" : newPinnedEndpoint.trim();
        changed=!newPinnedEndpoint.equals(oldPinnedEndpoint);
        if (changed)         this.pinnedEndpointID=newPinnedEndpoint;
      }
      if (changed) {
        if (logger.isDebugEnabled()) {
          logger.debug("String_Node_Str" + getID() + "String_Node_Str"+ newPinnedEndpoint);
        }
        firePropertyChange(PINNED_ENDPOINT_PROPERTY_NAME,oldPinnedEndpoint,newPinnedEndpoint);
      }
    }
  }
 else {
    logger.warn("String_Node_Str" + getID() + "String_Node_Str"+ "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onStringData(WebRtcDataStream src,String msg){
  JSONParser parser=new JSONParser();
  JSONObject jsonObject;
  try {
    Object obj=parser.parse(msg);
    if (obj instanceof JSONObject)     jsonObject=(JSONObject)obj;
 else     return;
  }
 catch (  ParseException e) {
    logger.warn("String_Node_Str" + getID(),e);
    return;
  }
  Object colibriClass=jsonObject.get(Videobridge.COLIBRI_CLASS);
  if (colibriClass != null) {
    if ("String_Node_Str".equals(colibriClass)) {
      String newSelectedEndpointID=(String)jsonObject.get("String_Node_Str");
      Conference conference=weakConference.get();
      Endpoint newSelectedEndpoint;
      if (!StringUtils.isNullOrEmpty(newSelectedEndpointID) && conference != null) {
        newSelectedEndpoint=conference.getEndpoint(newSelectedEndpointID);
      }
 else {
        newSelectedEndpoint=null;
      }
      boolean changed;
      Endpoint oldSelectedEndpoint=this.getSelectedEndpoint();
synchronized (selectedEndpointSyncRoot) {
        changed=newSelectedEndpoint != oldSelectedEndpoint;
        if (changed) {
          if (newSelectedEndpoint == null) {
            this.weakSelectedEndpoint=null;
          }
 else {
            this.weakSelectedEndpoint=new WeakReference<Endpoint>(newSelectedEndpoint);
          }
        }
      }
      if (changed) {
        if (logger.isDebugEnabled()) {
          StringCompiler sc=new StringCompiler();
          sc.bind("String_Node_Str",newSelectedEndpoint);
          sc.bind("String_Node_Str",this);
          logger.debug(sc.c("String_Node_Str"));
        }
        firePropertyChange(SELECTED_ENDPOINT_PROPERTY_NAME,oldSelectedEndpoint,newSelectedEndpoint);
      }
    }
 else     if ("String_Node_Str".equals(colibriClass)) {
      String newPinnedEndpointID=(String)jsonObject.get("String_Node_Str");
      Conference conference=weakConference.get();
      Endpoint newPinnedEndpoint;
      if (!StringUtils.isNullOrEmpty(newPinnedEndpointID) && conference != null) {
        newPinnedEndpoint=conference.getEndpoint(newPinnedEndpointID);
      }
 else {
        newPinnedEndpoint=null;
      }
      boolean changed;
      Endpoint oldPinnedEndpoint=this.getPinnedEndpoint();
synchronized (pinnedEndpointSyncRoot) {
        changed=newPinnedEndpoint != oldPinnedEndpoint;
        if (changed) {
          if (newPinnedEndpoint == null) {
            this.weakPinnedEndpoint=null;
          }
 else {
            this.weakPinnedEndpoint=new WeakReference<Endpoint>(newPinnedEndpoint);
          }
        }
      }
      if (changed) {
        if (logger.isDebugEnabled()) {
          StringCompiler sc=new StringCompiler();
          sc.bind("String_Node_Str",newPinnedEndpoint);
          sc.bind("String_Node_Str",this);
          logger.debug(sc.c("String_Node_Str"));
        }
        firePropertyChange(PINNED_ENDPOINT_PROPERTY_NAME,oldPinnedEndpoint,newPinnedEndpoint);
      }
    }
  }
 else {
    logger.warn("String_Node_Str" + getID() + "String_Node_Str"+ "String_Node_Str");
  }
}