nus-yam/ex-repair huggingface dataset:
Program: 94518
Project: 94518
Buggy source:
public IModelChangeMessage[] registerLocalChange(IModelChange localChange){
  Trace.entering(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",localChange);
  if (localChange instanceof IDocumentChange) {
    final IDocumentChange docChange=(IDocumentChange)localChange;
    final ColaDocumentChangeMessage colaMsg=new ColaDocumentChangeMessage(new DocumentChangeMessage(docChange.getOffset(),docChange.getLengthOfReplacedText(),docChange.getText()),localOperationsCount,remoteOperationsCount);
    if (!colaMsg.isReplacement()) {
      unacknowledgedLocalOperations.add(colaMsg);
      localOperationsCount++;
    }
    Trace.exiting(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",colaMsg);
    return new IModelChangeMessage[]{colaMsg};
  }
 else   return new IModelChangeMessage[0];
}

Fixed version (ground truth):
public IModelChangeMessage[] registerLocalChange(IModelChange localChange){
  List results=new ArrayList();
  Trace.entering(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",localChange);
  if (localChange instanceof IDocumentChange) {
    final IDocumentChange docChange=(IDocumentChange)localChange;
    final ColaDocumentChangeMessage colaMsg=new ColaDocumentChangeMessage(new DocumentChangeMessage(docChange.getOffset(),docChange.getLengthOfReplacedText(),docChange.getText()),localOperationsCount,remoteOperationsCount);
    if (!colaMsg.isReplacement()) {
      unacknowledgedLocalOperations.add(colaMsg);
      localOperationsCount++;
      results.add(colaMsg);
    }
 else {
      ColaDocumentChangeMessage delMsg=new ColaDocumentChangeMessage(new DocumentChangeMessage(docChange.getOffset(),docChange.getLengthOfReplacedText(),"String_Node_Str"),localOperationsCount,remoteOperationsCount);
      unacknowledgedLocalOperations.add(delMsg);
      localOperationsCount++;
      results.add(delMsg);
      ColaDocumentChangeMessage insMsg=new ColaDocumentChangeMessage(new DocumentChangeMessage(docChange.getOffset(),0,docChange.getText()),localOperationsCount,remoteOperationsCount);
      unacknowledgedLocalOperations.add(insMsg);
      localOperationsCount++;
      results.add(insMsg);
    }
    Trace.exiting(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",colaMsg);
  }
  return (IModelChangeMessage[])results.toArray(new IModelChangeMessage[]{});
}
Program: 94520
Project: 94520
Buggy source:
public String toString(){
  final StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str").append(text).append("String_Node_Str").append(offset);
  buf.append("String_Node_Str").append(length).append("String_Node_Str");
  return buf.toString();
}

Fixed version (ground truth):
public String toString(){
  final StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str").append(offset);
  buf.append("String_Node_Str").append(length).append("String_Node_Str").append(text).append("String_Node_Str");
  return buf.toString();
}
Program: 94521
Project: 94521
Buggy source:
private boolean isZippedReply(){
  boolean zipped=(null != this.getResponseHeader(CONTENT_ENCODING) && this.getResponseHeader(CONTENT_ENCODING).getValue().equals(CONTENT_ENCODING_GZIP)) || (null != this.getResponseHeader(CONTENT_TYPE) && this.getResponseHeader(CONTENT_TYPE).getValue().equals(APPLICATION_X_GZIP));
  return zipped;
}

Fixed version (ground truth):
private boolean isZippedReply(){
  boolean zipped=(null != this.getResponseHeader(CONTENT_ENCODING) && this.getResponseHeader(CONTENT_ENCODING).getValue().equals(CONTENT_ENCODING_GZIP));
  return zipped;
}
Program: 94522
Project: 94522
Buggy source:
public InputStream getResponseBodyAsUnzippedStream() throws IOException {
  InputStream input=super.getResponseBodyAsStream();
  try {
    if (gzipReceived) {
      return new java.util.zip.GZIPInputStream(input);
    }
  }
 catch (  IOException e) {
    Activator.getDefault().log(new Status(IStatus.WARNING,Activator.PLUGIN_ID,IStatus.WARNING,NLS.bind("String_Node_Str",(gzipReceived ? "String_Node_Str" : (deflateReceived ? "String_Node_Str" : "String_Node_Str"))),e));
  }
  return input;
}

Fixed version (ground truth):
public InputStream getResponseBodyAsUnzippedStream() throws IOException {
  InputStream input=super.getResponseBodyAsStream();
  try {
    if (gzipReceived) {
      return new java.util.zip.GZIPInputStream(input);
    }
  }
 catch (  IOException e) {
    Activator.getDefault().log(new Status(IStatus.WARNING,Activator.PLUGIN_ID,IStatus.WARNING,"String_Node_Str",e));
    throw e;
  }
  return input;
}
Program: 94525
Project: 94525
Buggy source:
public void handleEvent(IContainerEvent event){
  final IContainerManager containerManager=Activator.getDefault().getContainerManager();
  if (containerManager == null)   return;
  IContainer container=containerManager.getContainer(event.getLocalContainerID());
  if (container == null)   return;
  if (event instanceof IContainerConnectedEvent || event instanceof IContainerDisconnectedEvent) {
    IChannelContainerAdapter cca=(IChannelContainerAdapter)container.getAdapter(IChannelContainerAdapter.class);
    if (cca == null)     return;
    ID containerID=container.getID();
    if (event instanceof IContainerConnectedEvent) {
      try {
        Activator.getDefault().addDocShare(containerID,cca);
      }
 catch (      ECFException e) {
        Activator.getDefault().getLog().log(new Status(IStatus.WARNING,Activator.PLUGIN_ID,IStatus.WARNING,NLS.bind(Messages.ECFStart_ERROR_DOCUMENT_SHARE_NOT_CREATED,container.getID()),null));
      }
    }
 else     if (event instanceof IContainerDisconnectedEvent) {
      Activator.getDefault().removeDocShare(containerID);
    }
  }
 else   if (event instanceof IContainerDisposeEvent) {
    containerManager.removeListener(containerManagerListener);
    container.removeListener(containerListener);
  }
}

Fixed version (ground truth):
public void handleEvent(IContainerEvent event){
  final IContainerManager containerManager=Activator.getDefault().getContainerManager();
  if (containerManager == null)   return;
  IContainer container=containerManager.getContainer(event.getLocalContainerID());
  if (container == null)   return;
  if (event instanceof IContainerConnectedEvent || event instanceof IContainerDisconnectedEvent) {
    IChannelContainerAdapter cca=(IChannelContainerAdapter)container.getAdapter(IChannelContainerAdapter.class);
    if (cca == null)     return;
    ID containerID=container.getID();
    if (event instanceof IContainerConnectedEvent) {
      try {
        Activator.getDefault().addDocShare(containerID,cca);
      }
 catch (      ECFException e) {
        Activator.getDefault().getLog().log(new Status(IStatus.WARNING,Activator.PLUGIN_ID,IStatus.WARNING,NLS.bind(Messages.ECFStart_ERROR_DOCUMENT_SHARE_NOT_CREATED,container.getID()),null));
      }
    }
 else     if (event instanceof IContainerDisconnectedEvent || event instanceof IContainerEjectedEvent) {
      DocShare docShare=Activator.getDefault().removeDocShare(containerID);
      if (docShare != null)       docShare.dispose();
    }
  }
 else   if (event instanceof IContainerDisposeEvent) {
    containerManager.removeListener(containerManagerListener);
    container.removeListener(containerListener);
  }
}
Program: 94526
Project: 94526
Buggy source:
public void dispose(){
  getRosterManager().removeRosterSubscriptionListener(subscriptionListener);
  getRosterManager().removeRosterListener(updateListener);
  container.removeListener(containerListener);
  final IContainerManager containerManager=Activator.getDefault().getContainerManager();
  if (containerManager != null) {
    containerManager.removeContainer(container);
  }
  container.dispose();
}

Fixed version (ground truth):
public void dispose(){
  getRosterManager().removeRosterSubscriptionListener(subscriptionListener);
  getRosterManager().removeRosterListener(updateListener);
  container.removeListener(containerListener);
}
Program: 94527
Project: 94527
Buggy source:
public void testCallAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"),createRemoteCallListener());
  traceCallEnd("String_Node_Str");
  sleep(1500);
}

Fixed version (ground truth):
public void testCallAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"),createRemoteCallListener());
  traceCallEnd("String_Node_Str");
}
Program: 94528
Project: 94528
Buggy source:
protected void addRemoteServiceListeners(){
  for (int i=0; i < adapters.length; i++) {
    adapters[i].addRemoteServiceListener(createRemoteServiceListener());
  }
}

Fixed version (ground truth):
protected void addRemoteServiceListeners(){
  for (int i=0; i < adapters.length; i++) {
    adapters[i].addRemoteServiceListener(createRemoteServiceListener(i == 0));
  }
}
Program: 94529
Project: 94529
Buggy source:
protected IRemoteServiceListener createRemoteServiceListener(){
  return new IRemoteServiceListener(){
    public void handleServiceEvent(    IRemoteServiceEvent event){
      System.out.println("String_Node_Str" + event + "String_Node_Str");
    }
  }
;
}

Fixed version (ground truth):
protected IRemoteServiceListener createRemoteServiceListener(final boolean server){
  return new IRemoteServiceListener(){
    public void handleServiceEvent(    IRemoteServiceEvent event){
      System.out.println((server ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + event+ "String_Node_Str");
    }
  }
;
}
Program: 94530
Project: 94530
Buggy source:
public void testProxy() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  final IConcatService proxy=(IConcatService)service.getProxy();
  assertNotNull(proxy);
  traceCallStart("String_Node_Str");
  final String result=proxy.concat("String_Node_Str","String_Node_Str");
  traceCallEnd("String_Node_Str",result);
  sleep(1500);
}

Fixed version (ground truth):
public void testProxy() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  final IConcatService proxy=(IConcatService)service.getProxy();
  assertNotNull(proxy);
  traceCallStart("String_Node_Str");
  final String result=proxy.concat("String_Node_Str","String_Node_Str");
  traceCallEnd("String_Node_Str",result);
}
Program: 94531
Project: 94531
Buggy source:
public void testAsyncResult() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  final IAsyncResult result=service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str",result);
  assertNotNull(result);
  sleep(4000);
}

Fixed version (ground truth):
public void testAsyncResult() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  final IAsyncResult result=service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str",result);
  assertNotNull(result);
}
Program: 94532
Project: 94532
Buggy source:
public void testFireAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  service.fireAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str");
  sleep(1500);
}

Fixed version (ground truth):
public void testFireAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  service.fireAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str");
}
Program: 94533
Project: 94533
Buggy source:
public void handleServiceEvent(IRemoteServiceEvent event){
  System.out.println("String_Node_Str" + event + "String_Node_Str");
}

Fixed version (ground truth):
public void handleServiceEvent(IRemoteServiceEvent event){
  if (event instanceof IRemoteServiceRegisteredEvent) {
    IRemoteServiceRegisteredEvent e=(IRemoteServiceRegisteredEvent)event;
    IRemoteServiceReference ref=e.getReference();
    remoteService=adapters[1].getRemoteService(ref);
    assertNotNull(remoteService);
synchronized (lock) {
      done=true;
      lock.notify();
    }
  }
}
Program: 94534
Project: 94534
Buggy source:
protected void handleAddRegistration(ID remoteContainerID,Integer requestId,final RemoteServiceRegistrationImpl registration){
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),ADD_REGISTRATION,new Object[]{remoteContainerID,registration});
  if (remoteContainerID == null || getLocalContainerID().equals(remoteContainerID)) {
    return;
  }
synchronized (remoteRegistrys) {
    RemoteServiceRegistryImpl registry=getRemoteRegistry(remoteContainerID);
    if (registry == null) {
      registry=new RemoteServiceRegistryImpl(remoteContainerID);
      addRemoteRegistry(registry);
    }
    registry.publishService(registration);
    localRegisterService(registration);
    fireRemoteServiceListeners(createRegisteredEvent(registration));
    notifyAddRegistrationResponse(requestId,null);
  }
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),ADD_REGISTRATION);
}

Fixed version (ground truth):
protected void handleAddRegistration(ID remoteContainerID,Integer requestId,final RemoteServiceRegistrationImpl registration){
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),ADD_REGISTRATION,new Object[]{remoteContainerID,registration});
  if (remoteContainerID == null || getLocalContainerID().equals(remoteContainerID)) {
    return;
  }
synchronized (remoteRegistrys) {
    RemoteServiceRegistryImpl registry=getRemoteRegistry(remoteContainerID);
    if (registry == null) {
      registry=new RemoteServiceRegistryImpl(remoteContainerID);
      addRemoteRegistry(registry);
    }
    registry.publishService(registration);
    localRegisterService(registration);
    notifyAddRegistrationResponse(requestId,null);
  }
  fireRemoteServiceListeners(createRegisteredEvent(registration));
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),ADD_REGISTRATION);
}
Program: 94535
Project: 94535
Buggy source:
/** 
 * @param remoteID the ID of the remote container where the replica should be destroyed.
 * @throws IOException if the destroy message cannot be sent (i.e. due to disconnection, etc).
 */
protected void destroyRemote(ID remoteID) throws IOException {
  getContext().sendDispose(remoteID);
}

Fixed version (ground truth):
/** 
 * @param remoteID the ID of the remote container where the replica should be destroyed.
 * @throws IOException if the destroy message cannot be sent (i.e. due to disconnection, etc).
 */
protected void destroyRemote(ID remoteID) throws IOException {
  ISharedObjectContext context=getContext();
  if (context != null)   context.sendDispose(remoteID);
}
Program: 94536
Project: 94536
Buggy source:
/** 
 * @return ID that is the local container ID for this shared object.  Will not be <code>null</code>.
 */
protected ID getLocalContainerID(){
  return getContext().getLocalContainerID();
}

Fixed version (ground truth):
/** 
 * @return ID that is the local container ID for this shared object.  Will be <code>null</code> ifthe shared object is *not* in a local container (i.e. has been removed from the container).
 */
protected ID getLocalContainerID(){
  ISharedObjectContext context=getContext();
  return (context == null) ? null : context.getLocalContainerID();
}
Program: 94537
Project: 94537
Buggy source:
/** 
 * Send SharedObjectMessage to container with given ID. The toID parameter may be null, and if null the message will be delivered to <b>all</b> containers in group. The second parameter may not be null.
 * @param toID the target container ID for the SharedObjectMsg. If null, the given message is sent to all other containers currently in group
 * @param msg the message instance to send
 * @throws IOException thrown if the local container is not connected or unable to send for other reason
 */
protected void sendSharedObjectMsgTo(ID toID,SharedObjectMsg msg) throws IOException {
  Assert.isNotNull(msg,Messages.BaseSharedObject_Message_Not_Null);
  String method="String_Node_Str";
  traceEntering(method,new Object[]{toID,msg});
  getContext().sendMessage(toID,new SharedObjectMsgEvent(getID(),toID,msg));
  traceExiting(method);
}

Fixed version (ground truth):
/** 
 * Send SharedObjectMessage to container with given ID. The toID parameter may be null, and if null the message will be delivered to <b>all</b> containers in group. The second parameter may not be null.
 * @param toID the target container ID for the SharedObjectMsg. If null, the given message is sent to all other containers currently in group
 * @param msg the message instance to send
 * @throws IOException thrown if the local container is not connected or unable to send for other reason
 */
protected void sendSharedObjectMsgTo(ID toID,SharedObjectMsg msg) throws IOException {
  ISharedObjectContext context=getContext();
  if (context != null) {
    Assert.isNotNull(msg,Messages.BaseSharedObject_Message_Not_Null);
    String method="String_Node_Str";
    traceEntering(method,new Object[]{toID,msg});
    context.sendMessage(toID,new SharedObjectMsgEvent(getID(),toID,msg));
    traceExiting(method);
  }
}
Program: 94538
Project: 94538
Buggy source:
/** 
 * Get IDs of remote containers currently in this group. This method consults the current container context to retrieve the current group membership
 * @return ID[] of current group membership. Will not return null;
 * @see ISharedObjectContext#getGroupMemberIDs()
 */
protected ID[] getGroupMemberIDs(){
  return getContext().getGroupMemberIDs();
}

Fixed version (ground truth):
/** 
 * Get IDs of remote containers currently in this group. This method consults the current container context to retrieve the current group membership
 * @return ID[] of current group membership. Will not return null;
 * @see ISharedObjectContext#getGroupMemberIDs()
 */
protected ID[] getGroupMemberIDs(){
  ISharedObjectContext context=getContext();
  return (context == null) ? new ID[]{} : context.getGroupMemberIDs();
}
Program: 94539
Project: 94539
Buggy source:
/** 
 * @return ID that is the home container ID (primary) for this shared object.  Will not be <code>null</code>.
 */
protected ID getHomeContainerID(){
  return getConfig().getHomeContainerID();
}

Fixed version (ground truth):
/** 
 * @return ID that is the home container ID (primary) for this shared object.  Will not be <code>null</code> as long as the  {@link #init(ISharedObjectConfig)} method has been called (by container) as a resultof  {@link ISharedObjectManager#addSharedObject(ID,ISharedObject,Map)}.
 */
protected ID getHomeContainerID(){
  return getConfig().getHomeContainerID();
}
Program: 94540
Project: 94540
Buggy source:
/** 
 * Replicate this shared object to a given set of remote containers. This method will invoke the method getReplicaDescriptions in order to determine the set of ReplicaSharedObjectDescriptions to send to remote containers.
 * @param remoteContainers the set of remote containers to replicate to. If null, <b>all</b> containers in the current group are sent a message to create a replica of this shared object.
 */
protected void replicateToRemoteContainers(ID[] remoteContainers){
  traceEntering("String_Node_Str",remoteContainers);
  try {
    ReplicaSharedObjectDescription[] createInfos=getReplicaDescriptions(remoteContainers);
    if (createInfos != null) {
      if (createInfos.length == 1) {
        getContext().sendCreate((remoteContainers == null) ? null : remoteContainers[0],createInfos[0]);
      }
 else {
        for (int i=0; i < remoteContainers.length; i++) {
          getContext().sendCreate(remoteContainers[i],createInfos[i]);
        }
      }
    }
  }
 catch (  IOException e) {
    traceCatching("String_Node_Str" + DESTROYREMOTE_CODE,e);
    log(DESTROYREMOTE_CODE,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Replicate this shared object to a given set of remote containers. This method will invoke the method getReplicaDescriptions in order to determine the set of ReplicaSharedObjectDescriptions to send to remote containers.
 * @param remoteContainers the set of remote containers to replicate to. If null, <b>all</b> containers in the current group are sent a message to create a replica of this shared object.
 */
protected void replicateToRemoteContainers(ID[] remoteContainers){
  ISharedObjectContext context=getContext();
  if (context != null) {
    traceEntering("String_Node_Str",remoteContainers);
    try {
      ReplicaSharedObjectDescription[] createInfos=getReplicaDescriptions(remoteContainers);
      if (createInfos != null) {
        if (createInfos.length == 1) {
          context.sendCreate((remoteContainers == null) ? null : remoteContainers[0],createInfos[0]);
        }
 else {
          for (int i=0; i < remoteContainers.length; i++) {
            context.sendCreate(remoteContainers[i],createInfos[i]);
          }
        }
      }
    }
 catch (    IOException e) {
      traceCatching("String_Node_Str" + DESTROYREMOTE_CODE,e);
      log(DESTROYREMOTE_CODE,"String_Node_Str",e);
    }
  }
}
Program: 94541
Project: 94541
Buggy source:
/** 
 * Get the config for this shared object.
 * @return ISharedObjectConfig for this object.  The ISharedObjectConfig is set within  {@link #init(ISharedObjectConfig)}.  Will not be <code>null</code>.
 */
protected final ISharedObjectConfig getConfig(){
  return config;
}

Fixed version (ground truth):
/** 
 * Get the config for this shared object.
 * @return ISharedObjectConfig for this object.  The ISharedObjectConfig is set within  {@link #init(ISharedObjectConfig)}.  Will not be <code>null</code> as long as the init method is called prior to this method being called.
 */
protected final ISharedObjectConfig getConfig(){
  return config;
}
Program: 94542
Project: 94542
Buggy source:
/** 
 * @return ID the connected ID for the container that contains this shared object.  Will be non-<code>null</code>if the surrounding container is not currently connected.
 */
protected ID getConnectedID(){
  return getContext().getConnectedID();
}

Fixed version (ground truth):
/** 
 * @return ID the connected ID for the container that contains this shared object.  Will be non-<code>null</code>if the surrounding container is not currently connected.
 */
protected ID getConnectedID(){
  ISharedObjectContext context=getContext();
  return (context == null) ? null : context.getConnectedID();
}
Program: 94543
Project: 94543
Buggy source:
public void testCallAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  traceCallStart("String_Node_Str");
  service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"),createRemoteCallListener());
  traceCallEnd("String_Node_Str");
  sleep(1500);
}

Fixed version (ground truth):
public void testCallAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"),createRemoteCallListener());
  traceCallEnd("String_Node_Str");
  sleep(1500);
}
Program: 94544
Project: 94544
Buggy source:
protected IRemoteService getRemoteService(IRemoteServiceContainerAdapter adapter,String clazz,String filter){
  final IRemoteServiceReference[] refs=getRemoteServiceReferences(adapter,clazz,filter);
  if (refs.length == 0)   return null;
  return adapter.getRemoteService(refs[0]);
}

Fixed version (ground truth):
protected IRemoteService getRemoteService(IRemoteServiceContainerAdapter adapter,String clazz,String filter){
  final IRemoteServiceReference[] refs=getRemoteServiceReferences(adapter,clazz,filter);
  if (refs == null || refs.length == 0)   return null;
  return adapter.getRemoteService(refs[0]);
}
Program: 94545
Project: 94545
Buggy source:
public void testCallSynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  traceCallStart("String_Node_Str");
  final Object result=service.callSynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str",result);
  assertNotNull(result);
  assertTrue(result.equals("String_Node_Str".concat("String_Node_Str")));
}

Fixed version (ground truth):
public void testCallSynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  final Object result=service.callSynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str",result);
  assertNotNull(result);
  assertTrue(result.equals("String_Node_Str".concat("String_Node_Str")));
}
Program: 94546
Project: 94546
Buggy source:
public void testBadCallSynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  try {
    service.callSynch(createRemoteCall("String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"}));
    fail();
  }
 catch (  final ECFException e) {
  }
  try {
    service.callSynch(createRemoteCall("String_Node_Str",new Object[]{"String_Node_Str"}));
    fail();
  }
 catch (  final ECFException e) {
  }
}

Fixed version (ground truth):
public void testBadCallSynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  try {
    service.callSynch(createRemoteCall("String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str"}));
    fail();
  }
 catch (  final ECFException e) {
  }
  try {
    service.callSynch(createRemoteCall("String_Node_Str",new Object[]{"String_Node_Str"}));
    fail();
  }
 catch (  final ECFException e) {
  }
}
Program: 94547
Project: 94547
Buggy source:
public void testProxy() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  final IConcatService proxy=(IConcatService)service.getProxy();
  assertNotNull(proxy);
  traceCallStart("String_Node_Str");
  final String result=proxy.concat("String_Node_Str","String_Node_Str");
  traceCallEnd("String_Node_Str",result);
  sleep(1500);
}

Fixed version (ground truth):
public void testProxy() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  final IConcatService proxy=(IConcatService)service.getProxy();
  assertNotNull(proxy);
  traceCallStart("String_Node_Str");
  final String result=proxy.concat("String_Node_Str","String_Node_Str");
  traceCallEnd("String_Node_Str",result);
  sleep(1500);
}
Program: 94548
Project: 94548
Buggy source:
public void testAsyncResult() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  traceCallStart("String_Node_Str");
  final IAsyncResult result=service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str",result);
  assertNotNull(result);
  sleep(4000);
}

Fixed version (ground truth):
public void testAsyncResult() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  final IAsyncResult result=service.callAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str",result);
  assertNotNull(result);
  sleep(4000);
}
Program: 94549
Project: 94549
Buggy source:
public void testGetServiceReferencesWithFilter() throws Exception {
  final IRemoteServiceContainerAdapter[] adapters=getRemoteServiceAdapters();
  final Properties props=new Properties();
  props.put("String_Node_Str","String_Node_Str");
  props.put("String_Node_Str","String_Node_Str");
  registerService(adapters[0],IConcatService.class.getName(),createService(),props,3000);
  final IRemoteServiceReference[] refs=getRemoteServiceReferences(adapters[1],IConcatService.class.getName(),getFilterFromServiceProperties(props));
  assertNotNull(refs);
  assertTrue(refs.length > 0);
}

Fixed version (ground truth):
public void testGetServiceReferencesWithFilter() throws Exception {
  final IRemoteServiceContainerAdapter[] adapters=getRemoteServiceAdapters();
  final Properties props=new Properties();
  props.put("String_Node_Str","String_Node_Str");
  props.put("String_Node_Str","String_Node_Str");
  registerService(adapters[0],IConcatService.class.getName(),createService(),props,3000);
  final IRemoteServiceReference[] refs=getRemoteServiceReferences(adapters[1],IConcatService.class.getName(),getFilterFromServiceProperties(props));
  if (refs == null)   return;
  assertNotNull(refs);
  assertTrue(refs.length > 0);
}
Program: 94550
Project: 94550
Buggy source:
public void testFireAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  traceCallStart("String_Node_Str");
  service.fireAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str");
  sleep(1500);
}

Fixed version (ground truth):
public void testFireAsynch() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  traceCallStart("String_Node_Str");
  service.fireAsynch(createRemoteConcat("String_Node_Str","String_Node_Str"));
  traceCallEnd("String_Node_Str");
  sleep(1500);
}
Program: 94551
Project: 94551
Buggy source:
public void testGetServiceReferences() throws Exception {
  final IRemoteServiceContainerAdapter[] adapters=getRemoteServiceAdapters();
  registerService(adapters[0],IConcatService.class.getName(),createService(),null,3000);
  final IRemoteServiceReference[] refs=getRemoteServiceReferences(adapters[1],IConcatService.class.getName(),null);
  assertNotNull(refs);
  assertTrue(refs.length > 0);
}

Fixed version (ground truth):
public void testGetServiceReferences() throws Exception {
  final IRemoteServiceContainerAdapter[] adapters=getRemoteServiceAdapters();
  registerService(adapters[0],IConcatService.class.getName(),createService(),null,3000);
  final IRemoteServiceReference[] refs=getRemoteServiceReferences(adapters[1],IConcatService.class.getName(),null);
  if (refs == null)   return;
  assertTrue(refs.length > 0);
}
Program: 94552
Project: 94552
Buggy source:
public void testGetService() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  assertNotNull(service);
}

Fixed version (ground truth):
public void testGetService() throws Exception {
  final IRemoteService service=registerAndGetRemoteService();
  if (service == null)   return;
  assertNotNull(service);
}
Program: 94553
Project: 94553
Buggy source:
public void sendOpenAndSelectForFile(User touser,String resourceName,int offset,int length){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getUserID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG,getUser(),resourceName,new SharedMarker(Messages.EclipseCollabSharedObject_MARKER_NAME,new Integer(offset),new Integer(length)));
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void sendOpenAndSelectForFile(IUser touser,String resourceName,int offset,int length){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG,getUser(),resourceName,new SharedMarker(Messages.EclipseCollabSharedObject_MARKER_NAME,new Integer(offset),new Integer(length)));
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str",e);
  }
}
Program: 94554
Project: 94554
Buggy source:
public void sendShowView(User touser,String id){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getUserID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_SHOW_VIEW_MSG,getUser(),id);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}

Fixed version (ground truth):
public void sendShowView(IUser touser,String id){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_SHOW_VIEW_MSG,getUser(),id);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}
Program: 94555
Project: 94555
Buggy source:
protected void handleUserUpdate(final User ud){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      try {
        if (localGUI != null)         localGUI.changeUser(ud);
      }
 catch (      final Exception e) {
        log("String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
protected void handleUserUpdate(final IUser ud){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      try {
        if (localGUI != null)         localGUI.changeUser(ud);
      }
 catch (      final Exception e) {
        log("String_Node_Str",e);
      }
    }
  }
);
}
Program: 94556
Project: 94556
Buggy source:
public EclipseCollabSharedObject(IResource proj,IWorkbenchWindow window,User user,String downloaddir){
  this.localResource=proj;
  this.workbenchWindow=window;
  this.localUser=user;
  this.downloadDirectory=downloaddir;
  createOutputView();
  Assert.isNotNull(localGUI,"String_Node_Str");
}

Fixed version (ground truth):
public EclipseCollabSharedObject(IResource proj,IWorkbenchWindow window,IUser user,String downloaddir){
  this.localResource=proj;
  this.workbenchWindow=window;
  this.localUser=user;
  this.downloadDirectory=downloaddir;
  createOutputView();
  Assert.isNotNull(localGUI,"String_Node_Str");
}
Program: 94557
Project: 94557
Buggy source:
public void sendRingMessageToUser(User user,String msg){
  ID receiver=null;
  if (user != null) {
    receiver=user.getUserID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_USER_MSG,this.localUser,msg);
    forwardMsgTo(receiver,m);
    if (receiver == null)     sendSelf(m);
  }
 catch (  final Exception e) {
    log("String_Node_Str" + user,e);
  }
}

Fixed version (ground truth):
public void sendRingMessageToUser(IUser user,String msg){
  ID receiver=null;
  if (user != null) {
    receiver=user.getID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_USER_MSG,this.localUser,msg);
    forwardMsgTo(receiver,m);
    if (receiver == null)     sendSelf(m);
  }
 catch (  final Exception e) {
    log("String_Node_Str" + user,e);
  }
}
Program: 94558
Project: 94558
Buggy source:
public void receiveStart(ID from,File aFile,long length,float rate){
  final User user=getUserForID(from);
  String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
  if (user != null) {
    nick=user.getNickname();
  }
  showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING,nick,aFile.getName()),null);
}

Fixed version (ground truth):
public void receiveStart(ID from,File aFile,long length,float rate){
  final IUser user=getUserForID(from);
  String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
  if (user != null) {
    nick=user.getNickname();
  }
  showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING,nick,aFile.getName()),null);
}
Program: 94559
Project: 94559
Buggy source:
public void sendCVSProjectUpdateRequest(User touser,String msg){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getUserID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_CVS_PROJECT_UPDATE_REQUEST_MSG,getUser(),msg);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}

Fixed version (ground truth):
public void sendCVSProjectUpdateRequest(IUser touser,String msg){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_CVS_PROJECT_UPDATE_REQUEST_MSG,getUser(),msg);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}
Program: 94560
Project: 94560
Buggy source:
protected void handleShowViewWithID(User fromUser,final String id,final String secID,final Integer mode){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      try {
        showViewWithID(id,secID,mode.intValue());
      }
 catch (      final Exception e) {
        log("String_Node_Str" + id + "String_Node_Str"+ secID+ "String_Node_Str"+ mode,e);
      }
    }
  }
);
}

Fixed version (ground truth):
protected void handleShowViewWithID(IUser fromUser,final String id,final String secID,final Integer mode){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      try {
        showViewWithID(id,secID,mode.intValue());
      }
 catch (      final Exception e) {
        log("String_Node_Str" + id + "String_Node_Str"+ secID+ "String_Node_Str"+ mode,e);
      }
    }
  }
);
}
Program: 94561
Project: 94561
Buggy source:
public void sendAddMarkerForFile(User touser,String resourceName,int offset,int length){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getUserID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_ADD_MARKER_FOR_FILE_MSG,getUser(),resourceName,new SharedMarker(Messages.EclipseCollabSharedObject_MARKER_NAME,new Integer(offset),new Integer(length)));
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}

Fixed version (ground truth):
public void sendAddMarkerForFile(IUser touser,String resourceName,int offset,int length){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_ADD_MARKER_FOR_FILE_MSG,getUser(),resourceName,new SharedMarker(Messages.EclipseCollabSharedObject_MARKER_NAME,new Integer(offset),new Integer(length)));
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}
Program: 94562
Project: 94562
Buggy source:
public FileReceiverUI getFileReceiverUI(EclipseFileTransfer transfer,FileTransferParams params){
  return new FileReceiverUI(){
    public void receiveStart(    ID from,    File aFile,    long length,    float rate){
      final User user=getUserForID(from);
      String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
      if (user != null) {
        nick=user.getNickname();
      }
      showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING,nick,aFile.getName()),null);
    }
    public void receiveData(    ID from,    File aFile,    int dataLength){
    }
    public void receiveDone(    ID from,    File aFile,    Exception e){
      final User user=getUserForID(from);
      String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
      if (user != null) {
        nick=user.getNickname();
      }
      showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED,new Object[]{aFile.getName(),nick,getLocalFullDownloadPath()}),null);
      refreshProject();
    }
  }
;
}

Fixed version (ground truth):
public FileReceiverUI getFileReceiverUI(EclipseFileTransfer transfer,FileTransferParams params){
  return new FileReceiverUI(){
    public void receiveStart(    ID from,    File aFile,    long length,    float rate){
      final IUser user=getUserForID(from);
      String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
      if (user != null) {
        nick=user.getNickname();
      }
      showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVING,nick,aFile.getName()),null);
    }
    public void receiveData(    ID from,    File aFile,    int dataLength){
    }
    public void receiveDone(    ID from,    File aFile,    Exception e){
      final IUser user=getUserForID(from);
      String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
      if (user != null) {
        nick=user.getNickname();
      }
      showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED,new Object[]{aFile.getName(),nick,getLocalFullDownloadPath()}),null);
      refreshProject();
    }
  }
;
}
Program: 94563
Project: 94563
Buggy source:
public void sendLaunchEditorForFile(User touser,String resourceName){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getUserID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_LAUNCH_EDITOR_FOR_FILE_MSG,getUser(),resourceName);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}

Fixed version (ground truth):
public void sendLaunchEditorForFile(IUser touser,String resourceName){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_LAUNCH_EDITOR_FOR_FILE_MSG,getUser(),resourceName);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}
Program: 94564
Project: 94564
Buggy source:
protected void handleShowView(User fromUser,final String id){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      try {
        showView(id);
      }
 catch (      final Exception e) {
        log("String_Node_Str" + id,e);
      }
    }
  }
);
}

Fixed version (ground truth):
protected void handleShowView(IUser fromUser,final String id){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      try {
        showView(id);
      }
 catch (      final Exception e) {
        log("String_Node_Str" + id,e);
      }
    }
  }
);
}
Program: 94565
Project: 94565
Buggy source:
public void handleNotifyUserAdded(User user){
  boolean add=false;
  try {
    final ID[] members=getContext().getGroupMemberIDs();
    for (int i=0; i < members.length; i++) {
      if (members[i].equals(user.getUserID())) {
        add=true;
        break;
      }
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str",e);
  }
  if (add) {
    boolean addUserResult=false;
    if (localGUI != null) {
      addUserResult=localGUI.addUser(user);
    }
    if (addUserResult)     sendNotifyUserAdded();
  }
}

Fixed version (ground truth):
public void handleNotifyUserAdded(IUser user){
  boolean add=false;
  try {
    final ID[] members=getContext().getGroupMemberIDs();
    for (int i=0; i < members.length; i++) {
      if (members[i].equals(user.getID())) {
        add=true;
        break;
      }
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str",e);
  }
  if (add) {
    boolean addUserResult=false;
    if (localGUI != null) {
      addUserResult=localGUI.addUser(user);
    }
    if (addUserResult)     sendNotifyUserAdded();
  }
}
Program: 94566
Project: 94566
Buggy source:
protected void handleUserMessage(final User sender,String msg){
  final String message=msg;
  if (sender == null)   return;
  if (localGUI != null) {
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        Display.getDefault().beep();
        final Shell[] shells=Display.getDefault().getShells();
        if (shells != null && shells.length > 0) {
          shells[0].setActive();
        }
        MessageDialog.openInformation(null,NLS.bind(Messages.EclipseCollabSharedObject_PRIVATE_MESSAGE_TEXT,sender.getNickname()),message);
      }
    }
);
  }
}

Fixed version (ground truth):
protected void handleUserMessage(final IUser sender,String msg){
  final String message=msg;
  if (sender == null)   return;
  if (localGUI != null) {
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        Display.getDefault().beep();
        final Shell[] shells=Display.getDefault().getShells();
        if (shells != null && shells.length > 0) {
          shells[0].setActive();
        }
        MessageDialog.openInformation(null,NLS.bind(Messages.EclipseCollabSharedObject_PRIVATE_MESSAGE_TEXT,sender.getNickname()),message);
      }
    }
);
  }
}
Program: 94567
Project: 94567
Buggy source:
public void sendShowViewWithID(User touser,String id,String secID,Integer mode){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getUserID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_SHOW_VIEW_WITH_ID_MSG,getUser(),id,secID,mode);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}

Fixed version (ground truth):
public void sendShowViewWithID(IUser touser,String id,String secID,Integer mode){
  ID receiver=null;
  if (touser != null) {
    receiver=touser.getID();
  }
  try {
    final SharedObjectMsg m=SharedObjectMsg.createMsg(null,HANDLE_SHOW_VIEW_WITH_ID_MSG,getUser(),id,secID,mode);
    forwardMsgTo(receiver,m);
    if (receiver == null) {
      sendSelf(m);
    }
  }
 catch (  final Exception e) {
    log("String_Node_Str" + touser,e);
  }
}
Program: 94568
Project: 94568
Buggy source:
public void receiveDone(ID from,File aFile,Exception e){
  final User user=getUserForID(from);
  String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
  if (user != null) {
    nick=user.getNickname();
  }
  showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED,new Object[]{aFile.getName(),nick,getLocalFullDownloadPath()}),null);
  refreshProject();
}

Fixed version (ground truth):
public void receiveDone(ID from,File aFile,Exception e){
  final IUser user=getUserForID(from);
  String nick=Messages.EclipseCollabSharedObject_UNKNOWN_USERNAME;
  if (user != null) {
    nick=user.getNickname();
  }
  showRawLine(from,NLS.bind(Messages.EclipseCollabSharedObject_FILE_TRANSFER_RECEIVED,new Object[]{aFile.getName(),nick,getLocalFullDownloadPath()}),null);
  refreshProject();
}
Program: 94569
Project: 94569
Buggy source:
public User getUserForID(final ID user){
  return (localGUI != null) ? localGUI.getUser(user) : null;
}

Fixed version (ground truth):
public IUser getUserForID(final ID user){
  return (localGUI != null) ? localGUI.getUser(user) : null;
}
Program: 94570
Project: 94570
Buggy source:
protected boolean isLocalUser(User fromuser){
  if (fromuser != null && fromuser.getUserID().equals(getUser().getUserID()))   return true;
  return false;
}

Fixed version (ground truth):
protected boolean isLocalUser(IUser fromuser){
  if (fromuser != null && fromuser.getID().equals(getUser().getID()))   return true;
  return false;
}
Program: 94571
Project: 94571
Buggy source:
protected void handleShowPrivateTextMsg(final User remote,final String aString){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      try {
        if (localGUI != null) {
          final ChatLine line=new ChatLine(aString);
          line.setOriginator(remote);
          line.setPrivate(true);
          localGUI.showLine(line);
          localGUI.toFront();
        }
      }
 catch (      final Exception e) {
        log("String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
protected void handleShowPrivateTextMsg(final IUser remote,final String aString){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      try {
        if (localGUI != null) {
          final ChatLine line=new ChatLine(aString);
          line.setOriginator(remote);
          line.setPrivate(true);
          localGUI.showLine(line);
          localGUI.toFront();
        }
      }
 catch (      final Exception e) {
        log("String_Node_Str",e);
      }
    }
  }
);
}