Program: 94160
Project: 94160
Buggy source:
void handleService(IServiceInfo serviceInfo,boolean discovered){
  if (locator == null)   return;
  trace("String_Node_Str","String_Node_Str" + getFrameworkUUID() + "String_Node_Str"+ serviceInfo+ "String_Node_Str"+ discovered);
  IServiceID serviceID=serviceInfo.getServiceID();
  if (matchServiceID(serviceID)) {
synchronized (edServiceIDMap) {
      org.osgi.service.remoteserviceadmin.EndpointDescription ed=findEDFromServiceID(serviceID);
      if (discovered) {
        if (ed == null) {
          DiscoveredEndpointDescription discoveredEndpointDescription=getDiscoveredEndpointDescription(serviceID,serviceInfo,true);
          if (discoveredEndpointDescription != null) {
            ed=discoveredEndpointDescription.getEndpointDescription();
            if (ed != null) {
              EndpointDescription prevEd=isEndpointDescriptionUpdate(ed,serviceID);
              if (prevEd == null) {
                if (!contains(ed)) {
                  addEDServiceID(ed,serviceID);
                  handleEndpointDescription(ed,true);
                }
 else                 trace("String_Node_Str","String_Node_Str");
              }
 else {
                trace("String_Node_Str","String_Node_Str" + prevEd + "String_Node_Str"+ ed);
                queueEndpointEvent(ed,EndpointEvent.MODIFIED);
              }
            }
 else             trace("String_Node_Str","String_Node_Str" + serviceID);
          }
 else           trace("String_Node_Str","String_Node_Str" + serviceID);
        }
 else         trace("String_Node_Str","String_Node_Str" + serviceID + "String_Node_Str");
      }
 else {
        if (ed != null) {
          removeEDServiceID(ed,serviceID);
          handleEndpointDescription(ed,false);
        }
 else         trace("String_Node_Str","String_Node_Str" + serviceID + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
void handleService(IServiceInfo serviceInfo,boolean discovered){
  if (locator == null)   return;
  trace("String_Node_Str","String_Node_Str" + getFrameworkUUID() + "String_Node_Str"+ serviceInfo+ "String_Node_Str"+ discovered+ "String_Node_Str"+ locator);
  IServiceID serviceID=serviceInfo.getServiceID();
  if (Arrays.asList(serviceID.getServiceTypeID().getServices()).contains(RemoteConstants.DISCOVERY_SERVICE_TYPE)) {
synchronized (edServiceIDMap) {
      org.osgi.service.remoteserviceadmin.EndpointDescription ed=findEDFromServiceID(serviceID);
      if (discovered) {
        if (ed == null) {
          DiscoveredEndpointDescription discoveredEndpointDescription=getDiscoveredEndpointDescription(serviceID,serviceInfo,true);
          if (discoveredEndpointDescription != null) {
            ed=discoveredEndpointDescription.getEndpointDescription();
            if (ed != null) {
              EndpointDescription prevEd=isEndpointDescriptionUpdate(ed,serviceID);
              if (prevEd == null) {
                if (!containsED(ed)) {
                  addEDServiceID(ed,serviceID);
                  handleEndpointDescription(ed,true);
                }
 else                 trace("String_Node_Str","String_Node_Str");
              }
 else {
                trace("String_Node_Str","String_Node_Str" + prevEd + "String_Node_Str"+ ed);
                queueEndpointEvent(ed,EndpointEvent.MODIFIED);
              }
            }
 else             trace("String_Node_Str","String_Node_Str" + serviceID);
          }
 else           trace("String_Node_Str","String_Node_Str" + serviceID);
        }
 else         trace("String_Node_Str","String_Node_Str" + serviceID + "String_Node_Str");
      }
 else {
        if (ed != null) {
          removeEDServiceID(ed,serviceID);
          handleEndpointDescription(ed,false);
        }
 else         trace("String_Node_Str","String_Node_Str" + serviceID + "String_Node_Str");
      }
    }
  }
}