nus-yam/ex-repair huggingface dataset:
Program: 94572
Project: 94572
Buggy source:
protected void handleLaunchEditorForFile(final User fromuser,final String resourceName){
  final User local=getUserForID(fromuser.getUserID());
  if (local != null) {
    final Runnable runnable=createOpenEditorForFileRunnable(resourceName);
    showEventInChatOutput(fromuser,resourceName,null,runnable);
    verifyAndOpenEditorLocally(fromuser,resourceName,runnable);
  }
}

Fixed version (ground truth):
protected void handleLaunchEditorForFile(final IUser fromuser,final String resourceName){
  final IUser local=getUserForID(fromuser.getID());
  if (local != null) {
    final Runnable runnable=createOpenEditorForFileRunnable(resourceName);
    showEventInChatOutput(fromuser,resourceName,null,runnable);
    verifyAndOpenEditorLocally(fromuser,resourceName,runnable);
  }
}
Program: 94573
Project: 94573
Buggy source:
protected void verifyAndOpenEditorLocally(final User fromuser,final String resourceName,final Runnable runnable){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (isLocalUser(fromuser)) {
        runnable.run();
      }
 else {
        if (showSharedEditorEventsImmediately()) {
          if (!askUserToDisplaySharedEditorEvents() || MessageDialog.openQuestion(null,Messages.EclipseCollabSharedObject_DIALOG_OPEN_SHARED_EDITOR_TEXT,NLS.bind(Messages.EclipseCollabSharedObject_OPEN_SHARED_EDITOR_QUESTION,resourceName,fromuser.getNickname()))) {
            runnable.run();
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
protected void verifyAndOpenEditorLocally(final IUser fromuser,final String resourceName,final Runnable runnable){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      if (isLocalUser(fromuser)) {
        runnable.run();
      }
 else {
        if (showSharedEditorEventsImmediately()) {
          if (!askUserToDisplaySharedEditorEvents() || MessageDialog.openQuestion(null,Messages.EclipseCollabSharedObject_DIALOG_OPEN_SHARED_EDITOR_TEXT,NLS.bind(Messages.EclipseCollabSharedObject_OPEN_SHARED_EDITOR_QUESTION,resourceName,fromuser.getNickname()))) {
            runnable.run();
          }
        }
      }
    }
  }
);
}
Program: 94574
Project: 94574
Buggy source:
public void sendPrivateMessageToUser(User touser,String msg){
  try {
    forwardMsgTo(touser.getUserID(),SharedObjectMsg.createMsg(null,HANDLE_SHOW_PRIVATE_TEXT_MSG,localUser,msg));
  }
 catch (  final Exception e) {
    log("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void sendPrivateMessageToUser(IUser touser,String msg){
  try {
    forwardMsgTo(touser.getID(),SharedObjectMsg.createMsg(null,HANDLE_SHOW_PRIVATE_TEXT_MSG,localUser,msg));
  }
 catch (  final Exception e) {
    log("String_Node_Str",e);
  }
}
Program: 94575
Project: 94575
Buggy source:
public User getUser(){
  return localUser;
}

Fixed version (ground truth):
public IUser getUser(){
  return localUser;
}
Program: 94576
Project: 94576
Buggy source:
protected void handleOpenAndSelectForFile(final User fromuser,final String resourceName,SharedMarker marker){
  final User local=getUserForID(fromuser.getUserID());
  if (local != null) {
    final Runnable runnable=createOpenEditorAndSelectForFileRunnable(resourceName,marker);
    showEventInChatOutput(fromuser,resourceName,marker,runnable);
    verifyAndOpenEditorLocally(fromuser,resourceName,runnable);
  }
}

Fixed version (ground truth):
protected void handleOpenAndSelectForFile(final IUser fromuser,final String resourceName,SharedMarker marker){
  final IUser local=getUserForID(fromuser.getID());
  if (local != null) {
    final Runnable runnable=createOpenEditorAndSelectForFileRunnable(resourceName,marker);
    showEventInChatOutput(fromuser,resourceName,marker,runnable);
    verifyAndOpenEditorLocally(fromuser,resourceName,runnable);
  }
}
Program: 94577
Project: 94577
Buggy source:
protected synchronized void handleStartedTyping(User user){
  if (localGUI != null)   localGUI.startedTyping(user);
}

Fixed version (ground truth):
protected synchronized void handleStartedTyping(IUser user){
  if (localGUI != null)   localGUI.startedTyping(user);
}
Program: 94578
Project: 94578
Buggy source:
protected void showEventInChatOutput(User fromuser,String resourceName,SharedMarker marker,Runnable runnable){
  if (localGUI != null) {
    showRawLine(fromuser.getUserID(),createDisplayStringForEditorOpen(resourceName,marker),runnable);
  }
}

Fixed version (ground truth):
protected void showEventInChatOutput(IUser fromuser,String resourceName,SharedMarker marker,Runnable runnable){
  if (localGUI != null) {
    showRawLine(fromuser.getID(),createDisplayStringForEditorOpen(resourceName,marker),runnable);
  }
}
Program: 94579
Project: 94579
Buggy source:
protected void handleAddMarkerForFile(final User fromuser,final String resourceName,SharedMarker marker){
  addMarkerForFile(getLocalFileForRemote(resourceName),marker);
}

Fixed version (ground truth):
protected void handleAddMarkerForFile(final IUser fromuser,final String resourceName,SharedMarker marker){
  addMarkerForFile(getLocalFileForRemote(resourceName),marker);
}
Program: 94581
Project: 94581
Buggy source:
protected boolean addRequest(Request request){
  return requests.add(request);
}

Fixed version (ground truth):
private boolean addRequest(Request request){
  return requests.add(request);
}
Program: 94582
Project: 94582
Buggy source:
public void dispose(ID containerID){
  super.dispose(containerID);
  unregisterAllServiceRegistrations();
  remoteRegistrys.clear();
  serviceListeners.clear();
  localServiceRegistrations.clear();
  addRegistrationRequests.clear();
}

Fixed version (ground truth):
public void dispose(ID containerID){
  super.dispose(containerID);
  unregisterAllServiceRegistrations();
  remoteRegistrys.clear();
  serviceListeners.clear();
  localServiceRegistrations.clear();
  addRegistrationRequests.clear();
  requests.clear();
}
Program: 94583
Project: 94583
Buggy source:
protected void handleCallResponse(Response response){
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),CALL_RESPONSE,new Object[]{response});
  final Request request=findRequestForId(response.getRequestId());
  if (request == null) {
    log(REQUEST_NOT_FOUND_ERROR_CODE,REQUEST_NOT_FOUND_ERROR_MESSAGE,new NullPointerException());
    return;
  }
  final IRemoteCallListener listener=request.getListener();
  if (listener != null) {
    fireCallCompleteEvent(listener,request.getRequestId(),response.getResponse(),response.hadException(),response.getException());
    return;
  }
synchronized (request) {
    request.setResponse(response);
    request.setDone(true);
    request.notify();
  }
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),CALL_RESPONSE);
}

Fixed version (ground truth):
protected void handleCallResponse(Response response){
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),CALL_RESPONSE,new Object[]{response});
  final Request request=getRequest(response.getRequestId());
  if (request == null) {
    log(REQUEST_NOT_FOUND_ERROR_CODE,REQUEST_NOT_FOUND_ERROR_MESSAGE,new NullPointerException());
    return;
  }
  removeRequest(request);
  final IRemoteCallListener listener=request.getListener();
  if (listener != null) {
    fireCallCompleteEvent(listener,request.getRequestId(),response.getResponse(),response.hadException(),response.getException());
    return;
  }
synchronized (request) {
    request.setResponse(response);
    request.setDone(true);
    request.notify();
  }
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),CALL_RESPONSE);
}
Program: 94584
Project: 94584
Buggy source:
protected boolean removeRequest(Request request){
  return requests.remove(request);
}

Fixed version (ground truth):
private boolean removeRequest(Request request){
  return requests.remove(request);
}
Program: 94585
Project: 94585
Buggy source:
protected long sendCallRequest(RemoteServiceRegistrationImpl remoteRegistration,final IRemoteCall call) throws IOException {
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",new Object[]{remoteRegistration,call});
  final Request request=createRequest(remoteRegistration,call,null);
  addRequest(request);
  try {
    sendSharedObjectMsgTo(remoteRegistration.getContainerID(),SharedObjectMsg.createMsg(CALL_REQUEST,request));
  }
 catch (  final IOException e) {
    removeRequest(request);
    throw e;
  }
  final long requestId=request.getRequestId();
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",new Long(requestId));
  return requestId;
}

Fixed version (ground truth):
protected Request sendCallRequest(RemoteServiceRegistrationImpl remoteRegistration,final IRemoteCall call) throws IOException {
  Trace.entering(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",new Object[]{remoteRegistration,call});
  final Request request=createRequest(remoteRegistration,call,null);
  addRequest(request);
  try {
    sendSharedObjectMsgTo(remoteRegistration.getContainerID(),SharedObjectMsg.createMsg(CALL_REQUEST,request));
  }
 catch (  final IOException e) {
    removeRequest(request);
    throw e;
  }
  Trace.exiting(Activator.PLUGIN_ID,IRemoteServiceProviderDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",request);
  return request;
}
Program: 94586
Project: 94586
Buggy source:
private AdditionalClientRosterEntry updatePresenceForMatchingEntry(org.eclipse.ecf.presence.roster.RosterEntry entry,XMPPID fromID,IPresence newPresence){
  final IUser user=entry.getUser();
  XMPPID oldID=(XMPPID)user.getID();
  if (oldID.equals(fromID)) {
    entry.setPresence(newPresence);
    rosterManager.notifyRosterUpdate(entry);
  }
 else   if (oldID.getUsernameAtHost().equals(fromID.getUsernameAtHost())) {
    if (oldID.getResourceName() == null) {
      oldID.setResourceName(fromID.getResourceName());
      entry.setPresence(newPresence);
      rosterManager.notifyRosterUpdate(entry);
    }
 else     if (fromID.getResourceName() != null && !newPresence.getType().equals(IPresence.Type.UNAVAILABLE)) {
      return new AdditionalClientRosterEntry(entry.getParent(),new User(fromID,user.getName()),newPresence);
    }
  }
  return null;
}

Fixed version (ground truth):
private AdditionalClient updatePresenceForMatchingEntry(org.eclipse.ecf.presence.roster.RosterEntry entry,XMPPID fromID,IPresence newPresence){
  final IUser user=entry.getUser();
  XMPPID oldID=(XMPPID)user.getID();
  if (newPresence.getType().equals(IPresence.Type.UNAVAILABLE)) {
    if (oldID.equals(fromID))     return removeEntryFromRoster(oldID,entry,newPresence,user);
  }
 else {
    if (oldID.equals(fromID)) {
      entry.setPresence(newPresence);
      rosterManager.notifyRosterUpdate(entry);
    }
 else     if (oldID.getUsernameAtHost().equals(fromID.getUsernameAtHost())) {
      if (oldID.getResourceName() == null) {
        oldID.setResourceName(fromID.getResourceName());
        entry.setPresence(newPresence);
        rosterManager.notifyRosterUpdate(entry);
      }
 else       return new AdditionalClient(entry.getParent(),new User(fromID,user.getName()),newPresence,true);
    }
  }
  return null;
}
Program: 94587
Project: 94587
Buggy source:
private boolean removeItemFromRosterGroup(org.eclipse.ecf.presence.roster.RosterGroup group,XMPPID itemIDToRemove){
  final Collection groupEntries=group.getEntries();
synchronized (groupEntries) {
    for (final Iterator i=group.getEntries().iterator(); i.hasNext(); ) {
      final org.eclipse.ecf.presence.roster.RosterEntry entry=(org.eclipse.ecf.presence.roster.RosterEntry)i.next();
      if (entry.getUser().getID().equals(itemIDToRemove)) {
        i.remove();
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean removeItemFromRosterGroup(org.eclipse.ecf.presence.roster.RosterGroup group,XMPPID itemIDToRemove){
  final Collection groupEntries=group.getEntries();
synchronized (groupEntries) {
    for (final Iterator i=group.getEntries().iterator(); i.hasNext(); ) {
      final org.eclipse.ecf.presence.roster.RosterEntry entry=(org.eclipse.ecf.presence.roster.RosterEntry)i.next();
      XMPPID entryID=(XMPPID)entry.getUser().getID();
      if (entryID.equals(itemIDToRemove)) {
        i.remove();
        return true;
      }
    }
  }
  return false;
}
Program: 94588
Project: 94588
Buggy source:
private void updatePresence(XMPPID fromID,IPresence newPresence){
  final Collection rosterItems=roster.getItems();
  List newEntrys=new ArrayList();
synchronized (rosterItems) {
    for (final Iterator i=roster.getItems().iterator(); i.hasNext(); ) {
      final IRosterItem item=(IRosterItem)i.next();
      if (item instanceof IRosterGroup) {
        AdditionalClientRosterEntry[] es=updatePresenceInGroup((IRosterGroup)item,fromID,newPresence);
        for (int j=0; j < es.length; j++) {
          newEntrys.add(es[j]);
        }
      }
 else       if (item instanceof org.eclipse.ecf.presence.roster.RosterEntry) {
        AdditionalClientRosterEntry entry=updatePresenceForMatchingEntry((org.eclipse.ecf.presence.roster.RosterEntry)item,fromID,newPresence);
        if (entry != null)         newEntrys.add(entry);
      }
    }
  }
  AdditionalClientRosterEntry[] entrys=(AdditionalClientRosterEntry[])newEntrys.toArray(new AdditionalClientRosterEntry[]{});
  IRosterEntry entry=null;
  if (entrys.length > 0) {
    for (int i=0; i < entrys.length; i++) {
      entry=new org.eclipse.ecf.presence.roster.RosterEntry(entrys[i].parent,entrys[i].user,entrys[i].presence);
    }
    rosterManager.notifyRosterUpdate(roster);
    fireSetRosterEntry(false,entry);
  }
}

Fixed version (ground truth):
private void updatePresence(XMPPID fromID,IPresence newPresence){
  final Collection rosterItems=roster.getItems();
  AdditionalClient newEntry=null;
synchronized (rosterItems) {
    for (final Iterator i=roster.getItems().iterator(); i.hasNext(); ) {
      final IRosterItem item=(IRosterItem)i.next();
      if (item instanceof IRosterGroup) {
        AdditionalClient newClient=updatePresenceInGroup((IRosterGroup)item,fromID,newPresence);
        if (newClient != null)         newEntry=newClient;
      }
 else       if (item instanceof org.eclipse.ecf.presence.roster.RosterEntry) {
        AdditionalClient newClient=updatePresenceForMatchingEntry((org.eclipse.ecf.presence.roster.RosterEntry)item,fromID,newPresence);
        if (newClient != null)         newEntry=newClient;
      }
    }
  }
  if (newEntry != null) {
    if (newEntry.add) {
      if (!rosterContainsEntry(fromID)) {
        IRosterEntry entry=new org.eclipse.ecf.presence.roster.RosterEntry(newEntry.parent,newEntry.user,newEntry.presence);
        rosterManager.notifyRosterUpdate(roster);
        fireSetRosterEntry(false,entry);
      }
    }
 else {
      removeFromRoster(fromID);
    }
  }
}
Program: 94589
Project: 94589
Buggy source:
private AdditionalClientRosterEntry[] updatePresenceInGroup(IRosterGroup group,XMPPID fromID,IPresence newPresence){
  List results=new ArrayList();
  final Collection groupEntries=group.getEntries();
synchronized (groupEntries) {
    for (final Iterator i=group.getEntries().iterator(); i.hasNext(); ) {
      AdditionalClientRosterEntry newEntry=updatePresenceForMatchingEntry((org.eclipse.ecf.presence.roster.RosterEntry)i.next(),fromID,newPresence);
      if (newEntry != null)       results.add(newEntry);
    }
  }
  return (AdditionalClientRosterEntry[])results.toArray(new AdditionalClientRosterEntry[]{});
}

Fixed version (ground truth):
private AdditionalClient updatePresenceInGroup(IRosterGroup group,XMPPID fromID,IPresence newPresence){
  final Collection groupEntries=group.getEntries();
  AdditionalClient newEntry=null;
synchronized (groupEntries) {
    for (final Iterator i=group.getEntries().iterator(); i.hasNext(); ) {
      AdditionalClient newClient=updatePresenceForMatchingEntry((org.eclipse.ecf.presence.roster.RosterEntry)i.next(),fromID,newPresence);
      if (newClient != null)       newEntry=newClient;
    }
  }
  return newEntry;
}
Program: 94590
Project: 94590
Buggy source:
protected void handleIQEvent(IQEvent evt){
  final IQ iq=evt.getIQ();
  if (iq instanceof RosterPacket) {
    final RosterPacket rosterPacket=(RosterPacket)iq;
    if (rosterPacket.getType() == IQ.Type.SET || rosterPacket.getType() == IQ.Type.RESULT) {
      for (final Iterator i=rosterPacket.getRosterItems(); i.hasNext(); ) {
        final RosterPacket.Item item=(RosterPacket.Item)i.next();
        final RosterPacket.ItemType itemType=item.getItemType();
        boolean remove=false;
        XMPPID newID=createIDFromName(item.getUser());
        final IRosterItem items[]=createRosterEntries(newID,item);
        final IRosterEntry entry=createRosterEntry(newID,item);
        if (itemType == RosterPacket.ItemType.NONE || itemType == RosterPacket.ItemType.REMOVE) {
          removeItemFromRoster(roster.getItems(),createIDFromName(item.getUser()));
          remove=true;
        }
 else {
          remove=false;
          addToRoster(items);
        }
        fireSetRosterEntry(remove,entry);
      }
    }
  }
 else {
    trace("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void handleIQEvent(IQEvent evt){
  final IQ iq=evt.getIQ();
  if (iq instanceof RosterPacket) {
    final RosterPacket rosterPacket=(RosterPacket)iq;
    if (rosterPacket.getType() == IQ.Type.SET || rosterPacket.getType() == IQ.Type.RESULT) {
      for (final Iterator i=rosterPacket.getRosterItems(); i.hasNext(); ) {
        final RosterPacket.Item item=(RosterPacket.Item)i.next();
        final RosterPacket.ItemType itemType=item.getItemType();
        boolean remove=false;
        XMPPID newID=createIDFromName(item.getUser());
        final IRosterItem items[]=createRosterEntries(newID,item);
        final IRosterEntry entry=createRosterEntry(newID,item);
        if (itemType == RosterPacket.ItemType.NONE || itemType == RosterPacket.ItemType.REMOVE) {
          removeFromRoster(createIDFromName(item.getUser()));
          remove=true;
        }
 else {
          remove=false;
          addToRoster(items);
        }
        fireSetRosterEntry(remove,entry);
      }
    }
  }
 else {
    trace("String_Node_Str");
  }
}
Program: 94591
Project: 94591
Buggy source:
private void updateXMPPID(XMPPID newID,XMPPID oldID){
  String newResource=newID.getResourceName();
  String oldResource=oldID.getResourceName();
  if (oldResource == null) {
    oldID.setResourceName(newResource);
  }
 else {
    if (newResource != null && (oldResource.compareTo(newResource) < 0)) {
      oldID.setResourceName(newResource);
    }
  }
}

Fixed version (ground truth):
private void updateXMPPID(XMPPID newID,XMPPID oldID){
  String newResource=newID.getResourceName();
  String oldResource=oldID.getResourceName();
  if (oldResource == null)   oldID.setResourceName(newResource);
 else   if (newResource != null)   oldID.setResourceName(newResource);
}
Program: 94592
Project: 94592
Buggy source:
private void updatePresenceForMatchingEntry(org.eclipse.ecf.presence.roster.RosterEntry entry,XMPPID fromID,IPresence newPresence){
  final IUser user=entry.getUser();
  if (fromID.equals(user.getID())) {
    entry.setPresence(newPresence);
    rosterManager.notifyRosterUpdate(entry);
  }
}

Fixed version (ground truth):
private void updatePresenceForMatchingEntry(org.eclipse.ecf.presence.roster.RosterEntry entry,XMPPID fromID,IPresence newPresence){
  final IUser user=entry.getUser();
  ID oldID=user.getID();
  if (fromID.equals(oldID)) {
    if (oldID instanceof XMPPID)     updateXMPPID(fromID,(XMPPID)oldID);
    entry.setPresence(newPresence);
    rosterManager.notifyRosterUpdate(entry);
  }
}
Program: 94593
Project: 94593
Buggy source:
public String getFQName(){
  return getUsernameAtHost() + getResourceName();
}

Fixed version (ground truth):
public String getFQName(){
  String rn=getResourceName();
  return getUsernameAtHost() + PATH_DELIMITER + ((rn == null) ? "String_Node_Str" : rn);
}
Program: 94594
Project: 94594
Buggy source:
public XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  unamehost=fixPercentEscape(unamehost);
  if (unamehost == null)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_XMPPID_USERNAME_NOT_NULL);
  int atIndex=unamehost.lastIndexOf(USER_HOST_DELIMITER);
  if (atIndex == -1)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_HOST_PORT_NOT_VALID);
  username=fixEscapeInNode(unamehost.substring(0,atIndex));
  final String remainder=unamehost.substring(atIndex + 1);
  atIndex=remainder.lastIndexOf(PORT_DELIMITER);
  if (atIndex != -1) {
    try {
      final int slashLoc=remainder.indexOf(PATH_DELIMITER);
      if (slashLoc != -1)       port=Integer.parseInt(remainder.substring(atIndex + 1,slashLoc));
 else       port=Integer.parseInt(remainder.substring(atIndex + 1));
    }
 catch (    final NumberFormatException e) {
      throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_INVALID_PORT);
    }
    hostname=remainder.substring(0,atIndex);
  }
  atIndex=remainder.indexOf(PATH_DELIMITER);
  if (atIndex != -1) {
    if (hostname == null)     hostname=remainder.substring(0,atIndex);
    resourcename=PATH_DELIMITER + remainder.substring(atIndex + 1);
  }
 else {
    resourcename=PATH_DELIMITER + "String_Node_Str";
  }
  if (hostname == null)   hostname=remainder;
  uri=new URI(namespace.getScheme(),username,hostname,port,resourcename,null,null);
}

Fixed version (ground truth):
public XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  unamehost=fixPercentEscape(unamehost);
  if (unamehost == null)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_XMPPID_USERNAME_NOT_NULL);
  int atIndex=unamehost.lastIndexOf(USER_HOST_DELIMITER);
  if (atIndex == -1)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_HOST_PORT_NOT_VALID);
  username=fixEscapeInNode(unamehost.substring(0,atIndex));
  final String remainder=unamehost.substring(atIndex + 1);
  atIndex=remainder.lastIndexOf(PORT_DELIMITER);
  if (atIndex != -1) {
    try {
      final int slashLoc=remainder.indexOf(PATH_DELIMITER);
      if (slashLoc != -1)       port=Integer.parseInt(remainder.substring(atIndex + 1,slashLoc));
 else       port=Integer.parseInt(remainder.substring(atIndex + 1));
    }
 catch (    final NumberFormatException e) {
      throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_INVALID_PORT);
    }
    hostname=remainder.substring(0,atIndex);
  }
  atIndex=remainder.indexOf(PATH_DELIMITER);
  if (atIndex != -1) {
    if (hostname == null)     hostname=remainder.substring(0,atIndex);
    setResourceName(remainder.substring(atIndex + 1));
  }
 else {
    setResourceName(null);
  }
  if (hostname == null)   hostname=remainder;
  uri=new URI(namespace.getScheme(),username,hostname,port,PATH_DELIMITER + ((resourcename == null) ? "String_Node_Str" : resourcename),null,null);
}
Program: 94595
Project: 94595
Buggy source:
protected void setResumeRequestHeaderValues() throws IOException {
  if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)   throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR);
  setRangeHeader("String_Node_Str" + this.bytesReceived + "String_Node_Str");
}

Fixed version (ground truth):
protected void setResumeRequestHeaderValues() throws IOException {
  if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)   throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR);
  setRangeHeader("String_Node_Str" + this.bytesReceived + "String_Node_Str");
  urlConnection.setRequestProperty("String_Node_Str","String_Node_Str");
}
Program: 94596
Project: 94596
Buggy source:
protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
  final IFileRangeSpecification rangeSpec=getFileRangeSpecification();
  if (rangeSpec != null && isHTTP()) {
    final long startPosition=rangeSpec.getStartPosition();
    final long endPosition=rangeSpec.getEndPosition();
    if (startPosition < 0)     throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO,rangeSpec);
    if (endPosition != -1L && endPosition <= startPosition)     throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START,rangeSpec);
    setRangeHeader("String_Node_Str" + startPosition + "String_Node_Str"+ ((endPosition == -1L) ? "String_Node_Str" : ("String_Node_Str" + endPosition)));
  }
  urlConnection.setRequestProperty("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
  final IFileRangeSpecification rangeSpec=getFileRangeSpecification();
  if (rangeSpec != null && isHTTP()) {
    final long startPosition=rangeSpec.getStartPosition();
    final long endPosition=rangeSpec.getEndPosition();
    if (startPosition < 0)     throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO,rangeSpec);
    if (endPosition != -1L && endPosition <= startPosition)     throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START,rangeSpec);
    setRangeHeader("String_Node_Str" + startPosition + "String_Node_Str"+ ((endPosition == -1L) ? "String_Node_Str" : ("String_Node_Str" + endPosition)));
  }
  urlConnection.setRequestProperty("String_Node_Str","String_Node_Str");
  urlConnection.setRequestProperty("String_Node_Str","String_Node_Str");
}
Program: 94597
Project: 94597
Buggy source:
protected void setResumeRequestHeaderValues() throws IOException {
  if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)   throw new IOException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_ERROR);
  setRangeHeader("String_Node_Str" + this.bytesReceived + "String_Node_Str");
}

Fixed version (ground truth):
protected void setResumeRequestHeaderValues() throws IOException {
  if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)   throw new IOException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_ERROR);
  setRangeHeader("String_Node_Str" + this.bytesReceived + "String_Node_Str");
  getMethod.addRequestHeader("String_Node_Str","String_Node_Str");
}
Program: 94598
Project: 94598
Buggy source:
protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
  final IFileRangeSpecification rangeSpec=getFileRangeSpecification();
  if (rangeSpec != null) {
    final long startPosition=rangeSpec.getStartPosition();
    final long endPosition=rangeSpec.getEndPosition();
    if (startPosition < 0)     throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO,rangeSpec);
    if (endPosition != -1L && endPosition <= startPosition)     throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START,rangeSpec);
    setRangeHeader("String_Node_Str" + startPosition + "String_Node_Str"+ ((endPosition == -1L) ? "String_Node_Str" : ("String_Node_Str" + endPosition)));
  }
}

Fixed version (ground truth):
protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
  final IFileRangeSpecification rangeSpec=getFileRangeSpecification();
  if (rangeSpec != null) {
    final long startPosition=rangeSpec.getStartPosition();
    final long endPosition=rangeSpec.getEndPosition();
    if (startPosition < 0)     throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO,rangeSpec);
    if (endPosition != -1L && endPosition <= startPosition)     throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START,rangeSpec);
    setRangeHeader("String_Node_Str" + startPosition + "String_Node_Str"+ ((endPosition == -1L) ? "String_Node_Str" : ("String_Node_Str" + endPosition)));
  }
  getMethod.addRequestHeader("String_Node_Str","String_Node_Str");
}
Program: 94603
Project: 94603
Buggy source:
public void run(){
  for (int i=0; i < 10; i++) {
    String text=fDocument.get();
    String newText="String_Node_Str";
    text=text.concat(newText);
    fDocument.set(text);
    IModelChange change=new DocumentChangeMessage(i + 150,1,newText);
    IModelChangeMessage[] changes=initiator.registerLocalChange(change);
    getReceiverQueue().put(changes);
  }
}

Fixed version (ground truth):
public void run(){
  for (int i=0; i < 10; i++) {
    String text=fDocument.get();
    String newText="String_Node_Str";
    text=text.concat(newText);
    fDocument.set(text);
    IModelChange change=new DocumentChangeMessage(i + 150,newText.length(),newText);
    IModelChangeMessage[] changes=initiator.registerLocalChange(change);
    getReceiverQueue().put(changes);
  }
}
Program: 94604
Project: 94604
Buggy source:
public ColaDocumentChangeMessage(DocumentChangeMessage msg,long localOperationsCount,long remoteOperationsCount){
  super(msg.getOffset(),msg.getLengthOfReplacedText(),msg.getText());
  this.localOperationsCount=localOperationsCount;
  this.remoteOperationsCount=remoteOperationsCount;
  this.splitUp=false;
  this.splitUpRepresentation=new LinkedList();
  if (super.getLengthOfReplacedText() == 0) {
    trafoStrat=ColaInsertionTransformationStategy.getInstance();
  }
 else {
    if (super.getText().length() == 0) {
      trafoStrat=ColaDeletionTransformationStrategy.getInstance();
    }
 else {
      trafoStrat=ColaReplacementTransformationStategy.getInstance();
    }
  }
}

Fixed version (ground truth):
public ColaDocumentChangeMessage(DocumentChangeMessage msg,long localOperationsCount,long remoteOperationsCount){
  super(msg.getOffset(),msg.getLengthOfReplacedText(),msg.getText());
  this.localOperationsCount=localOperationsCount;
  this.remoteOperationsCount=remoteOperationsCount;
  this.splitUp=false;
  this.splitUpRepresentation=new LinkedList();
  if (super.getLengthOfReplacedText() == 0) {
    transformType=0;
  }
 else {
    if (super.getText().length() == 0) {
      transformType=1;
    }
 else {
      transformType=2;
    }
  }
}
Program: 94605
Project: 94605
Buggy source:
public boolean isDeletion(){
  return (this.trafoStrat instanceof ColaDeletionTransformationStrategy);
}

Fixed version (ground truth):
public boolean isDeletion(){
  return (transformType == 1);
}
Program: 94606
Project: 94606
Buggy source:
public boolean isReplacement(){
  return (this.trafoStrat instanceof ColaReplacementTransformationStategy);
}

Fixed version (ground truth):
public boolean isReplacement(){
  return (transformType == 2);
}
Program: 94607
Project: 94607
Buggy source:
public boolean isInsertion(){
  return (this.trafoStrat instanceof ColaInsertionTransformationStategy);
}

Fixed version (ground truth):
public boolean isInsertion(){
  return (transformType == 0);
}
Program: 94608
Project: 94608
Buggy source:
public ColaDocumentChangeMessage transformAgainst(ColaDocumentChangeMessage localMsg,boolean localMsgHighPrio){
  Trace.entering(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",localMsg);
  final ColaDocumentChangeMessage transformedMsg=trafoStrat.getOperationalTransform(this,localMsg,localMsgHighPrio);
  Trace.entering(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",transformedMsg);
  return transformedMsg;
}

Fixed version (ground truth):
public ColaDocumentChangeMessage transformAgainst(ColaDocumentChangeMessage localMsg,boolean localMsgHighPrio){
  Trace.entering(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_ENTERING,this.getClass(),"String_Node_Str",localMsg);
  final ColaDocumentChangeMessage transformedMsg=getTransformationStrategy().getOperationalTransform(this,localMsg,localMsgHighPrio);
  Trace.entering(Activator.PLUGIN_ID,SyncDebugOptions.METHODS_EXITING,this.getClass(),"String_Node_Str",transformedMsg);
  return transformedMsg;
}
Program: 94609
Project: 94609
Buggy source:
protected XMPPID createIDFromName(String uname){
  try {
    if (uname.indexOf('@') == -1) {
      return new XMPPID(container.getConnectNamespace(),"String_Node_Str" + "String_Node_Str" + uname);
    }
    return new XMPPID(container.getConnectNamespace(),uname);
  }
 catch (  final Exception e) {
    traceStack("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
protected XMPPID createIDFromName(String uname){
  try {
    if (uname.lastIndexOf('@') == -1) {
      return new XMPPID(container.getConnectNamespace(),"String_Node_Str" + "String_Node_Str" + uname);
    }
    return new XMPPID(container.getConnectNamespace(),uname);
  }
 catch (  final Exception e) {
    traceStack("String_Node_Str",e);
    return null;
  }
}
Program: 94611
Project: 94611
Buggy source:
public String getUsername(){
  return username;
}

Fixed version (ground truth):
public String getUsername(){
  return unfixEscapeInNode(username);
}
Program: 94612
Project: 94612
Buggy source:
public XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  unamehost=fixEscape(unamehost);
  if (unamehost == null)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_XMPPID_USERNAME_NOT_NULL);
  int atIndex=unamehost.lastIndexOf(USER_HOST_DELIMITER);
  if (atIndex == -1)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_HOST_PORT_NOT_VALID);
  username=unamehost.substring(0,atIndex);
  final String remainder=unamehost.substring(atIndex + 1);
  atIndex=remainder.lastIndexOf(PORT_DELIMITER);
  if (atIndex != -1) {
    try {
      final int slashLoc=remainder.indexOf(PATH_DELIMITER);
      if (slashLoc != -1)       port=Integer.parseInt(remainder.substring(atIndex + 1,slashLoc));
 else       port=Integer.parseInt(remainder.substring(atIndex + 1));
    }
 catch (    final NumberFormatException e) {
      throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_INVALID_PORT);
    }
    hostname=remainder.substring(0,atIndex);
  }
  atIndex=remainder.indexOf(PATH_DELIMITER);
  if (atIndex != -1) {
    if (hostname == null)     hostname=remainder.substring(0,atIndex);
    resourcename=PATH_DELIMITER + remainder.substring(atIndex + 1);
  }
 else {
    resourcename=PATH_DELIMITER + "String_Node_Str";
  }
  if (hostname == null)   hostname=remainder;
  uri=new URI(namespace.getScheme(),username,hostname,port,resourcename,null,null);
}

Fixed version (ground truth):
public XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  unamehost=fixPercentEscape(unamehost);
  if (unamehost == null)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_XMPPID_USERNAME_NOT_NULL);
  int atIndex=unamehost.lastIndexOf(USER_HOST_DELIMITER);
  if (atIndex == -1)   throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_HOST_PORT_NOT_VALID);
  username=fixEscapeInNode(unamehost.substring(0,atIndex));
  final String remainder=unamehost.substring(atIndex + 1);
  atIndex=remainder.lastIndexOf(PORT_DELIMITER);
  if (atIndex != -1) {
    try {
      final int slashLoc=remainder.indexOf(PATH_DELIMITER);
      if (slashLoc != -1)       port=Integer.parseInt(remainder.substring(atIndex + 1,slashLoc));
 else       port=Integer.parseInt(remainder.substring(atIndex + 1));
    }
 catch (    final NumberFormatException e) {
      throw new URISyntaxException(unamehost,Messages.XMPPID_EXCEPTION_INVALID_PORT);
    }
    hostname=remainder.substring(0,atIndex);
  }
  atIndex=remainder.indexOf(PATH_DELIMITER);
  if (atIndex != -1) {
    if (hostname == null)     hostname=remainder.substring(0,atIndex);
    resourcename=PATH_DELIMITER + remainder.substring(atIndex + 1);
  }
 else {
    resourcename=PATH_DELIMITER + "String_Node_Str";
  }
  if (hostname == null)   hostname=remainder;
  uri=new URI(namespace.getScheme(),username,hostname,port,resourcename,null,null);
}
Program: 94613
Project: 94613
Buggy source:
public void stop(BundleContext ctxt) throws Exception {
  this.context=null;
  plugin=null;
}

Fixed version (ground truth):
public void stop(BundleContext ctxt) throws Exception {
  if (sslSocketFactoryModifier != null) {
    sslSocketFactoryModifier.dispose();
    sslSocketFactoryModifier=null;
  }
  if (sslSocketFactoryTracker != null) {
    sslSocketFactoryTracker.close();
  }
  if (logServiceTracker != null) {
    logServiceTracker.close();
  }
  this.context=null;
  plugin=null;
}
Program: 94614
Project: 94614
Buggy source:
public void start(BundleContext ctxt) throws Exception {
  plugin=this;
  this.context=ctxt;
}

Fixed version (ground truth):
public void start(BundleContext ctxt) throws Exception {
  plugin=this;
  this.context=ctxt;
  try {
    Class socketFactoryModifierClass=Class.forName("String_Node_Str");
    sslSocketFactoryModifier=(ISSLSocketFactoryModifier)socketFactoryModifierClass.newInstance();
  }
 catch (  ClassNotFoundException e) {
  }
catch (  Throwable t) {
    log(new Status(IStatus.ERROR,PLUGIN_ID,"String_Node_Str",t));
  }
}
Program: 94616
Project: 94616
Buggy source:
public void dispose(){
  if (sslSocketFactoryTracker != null) {
    sslSocketFactoryTracker.close();
    sslSocketFactoryTracker=null;
  }
  this.context=null;
  this.proxy=null;
}

Fixed version (ground truth):
public void dispose(){
  this.proxy=null;
  Protocol.unregisterProtocol("String_Node_Str");
}
Program: 94618
Project: 94618
Buggy source:
public void handleEvent(final IContainerEvent evt){
  if (evt instanceof ISharedObjectActivatedEvent) {
    final ISharedObjectActivatedEvent soae=(ISharedObjectActivatedEvent)evt;
    fireChannelContainerListeners(new IChannelContainerChannelActivatedEvent(){
      public ID getChannelID(){
        return soae.getActivatedID();
      }
      public ID getChannelContainerID(){
        return soae.getLocalContainerID();
      }
      public String toString(){
        StringBuffer buf=new StringBuffer("String_Node_Str");
        buf.append("String_Node_Str").append(soae.getActivatedID()).append("String_Node_Str");
        buf.append("String_Node_Str").append(soae.getLocalContainerID()).append("String_Node_Str");
        return buf.toString();
      }
    }
);
  }
 else   if (evt instanceof ISharedObjectDeactivatedEvent) {
    final ISharedObjectDeactivatedEvent sode=(ISharedObjectDeactivatedEvent)evt;
    fireChannelContainerListeners(new IChannelContainerChannelDeactivatedEvent(){
      public ID getChannelID(){
        return sode.getDeactivatedID();
      }
      public ID getChannelContainerID(){
        return sode.getLocalContainerID();
      }
      public String toString(){
        StringBuffer buf=new StringBuffer("String_Node_Str");
        buf.append("String_Node_Str").append(sode.getDeactivatedID()).append("String_Node_Str");
        buf.append("String_Node_Str").append(sode.getLocalContainerID()).append("String_Node_Str");
        return buf.toString();
      }
    }
);
  }
}

Fixed version (ground truth):
public void handleEvent(final IContainerEvent evt){
  if (evt instanceof ISharedObjectActivatedEvent) {
    final ISharedObjectActivatedEvent soae=(ISharedObjectActivatedEvent)evt;
    fireChannelContainerListeners(new IChannelContainerChannelActivatedEvent(){
      public ID getChannelID(){
        return soae.getActivatedID();
      }
      public ID getChannelContainerID(){
        return soae.getLocalContainerID();
      }
      public String toString(){
        final StringBuffer buf=new StringBuffer("String_Node_Str");
        buf.append("String_Node_Str").append(soae.getActivatedID()).append("String_Node_Str");
        buf.append("String_Node_Str").append(soae.getLocalContainerID()).append("String_Node_Str");
        return buf.toString();
      }
    }
);
  }
 else   if (evt instanceof ISharedObjectDeactivatedEvent) {
    final ISharedObjectDeactivatedEvent sode=(ISharedObjectDeactivatedEvent)evt;
    fireChannelContainerListeners(new IChannelContainerChannelDeactivatedEvent(){
      public ID getChannelID(){
        return sode.getDeactivatedID();
      }
      public ID getChannelContainerID(){
        return sode.getLocalContainerID();
      }
      public String toString(){
        final StringBuffer buf=new StringBuffer("String_Node_Str");
        buf.append("String_Node_Str").append(sode.getDeactivatedID()).append("String_Node_Str");
        buf.append("String_Node_Str").append(sode.getLocalContainerID()).append("String_Node_Str");
        return buf.toString();
      }
    }
);
  }
}
Program: 94619
Project: 94619
Buggy source:
private ISharedObject createSharedObject(SharedObjectTypeDescription sotypedesc,IChannelListener listener) throws SharedObjectCreateException {
  Class clazz;
  try {
    clazz=Class.forName(sotypedesc.getClassName());
  }
 catch (  ClassNotFoundException e) {
    throw new SharedObjectCreateException("String_Node_Str" + sotypedesc.getClassName(),e);
  }
  Constructor cons=null;
  try {
    cons=clazz.getDeclaredConstructor(new Class[]{IChannelListener.class});
  }
 catch (  NoSuchMethodException e) {
    throw new SharedObjectCreateException("String_Node_Str" + sotypedesc.getClassName(),e);
  }
  ISharedObject so=null;
  try {
    so=(ISharedObject)cons.newInstance(new Object[]{listener});
  }
 catch (  Exception e) {
    throw new SharedObjectCreateException("String_Node_Str" + sotypedesc.getClassName(),e);
  }
  return so;
}

Fixed version (ground truth):
private ISharedObject createSharedObject(SharedObjectTypeDescription sotypedesc,IChannelListener listener) throws SharedObjectCreateException {
  Class clazz;
  try {
    clazz=Class.forName(sotypedesc.getClassName());
  }
 catch (  final ClassNotFoundException e) {
    throw new SharedObjectCreateException("String_Node_Str" + sotypedesc.getClassName(),e);
  }
  Constructor cons=null;
  try {
    cons=clazz.getDeclaredConstructor(new Class[]{IChannelListener.class});
  }
 catch (  final NoSuchMethodException e) {
    throw new SharedObjectCreateException("String_Node_Str" + sotypedesc.getClassName(),e);
  }
  ISharedObject so=null;
  try {
    so=(ISharedObject)cons.newInstance(new Object[]{listener});
  }
 catch (  final Exception e) {
    throw new SharedObjectCreateException("String_Node_Str" + sotypedesc.getClassName(),e);
  }
  return so;
}
Program: 94621
Project: 94621
Buggy source:
public IMergeableChannel createChannel(IChannelConfig newChannelConfig) throws ECFException {
  IChannelListener listener=newChannelConfig.getListener();
  SharedObjectDescription sodesc=new SharedObjectDescription(FeedSharedObject.class,IDFactory.getDefault().createGUID(),new HashMap());
  SharedObjectTypeDescription sotypedesc=sodesc.getTypeDescription();
  ISharedObject sharedObject=null;
  if (sotypedesc.getName() != null) {
    sharedObject=SharedObjectFactory.getDefault().createSharedObject(sotypedesc,new Object[]{listener});
  }
 else {
    sharedObject=createSharedObject(sotypedesc,listener);
  }
  IMergeableChannel channel=(IMergeableChannel)sharedObject.getAdapter(IMergeableChannel.class);
  if (channel == null) {
    throw new SharedObjectCreateException("String_Node_Str" + channel + "String_Node_Str");
  }
  ID newID=sodesc.getID();
  if (newID == null) {
    newID=IDFactory.getDefault().createGUID();
  }
  Map properties=sodesc.getProperties();
  if (properties == null) {
    properties=new HashMap();
  }
  getSharedObjectManager().addSharedObject(newID,sharedObject,properties);
  return channel;
}

Fixed version (ground truth):
public IMergeableChannel createChannel(IChannelConfig newChannelConfig) throws ECFException {
  final IChannelListener listener=newChannelConfig.getListener();
  final SharedObjectDescription sodesc=new SharedObjectDescription(FeedSharedObject.class,IDFactory.getDefault().createGUID(),new HashMap());
  final SharedObjectTypeDescription sotypedesc=sodesc.getTypeDescription();
  ISharedObject sharedObject=null;
  if (sotypedesc.getName() != null) {
    sharedObject=SharedObjectFactory.getDefault().createSharedObject(sotypedesc,new Object[]{listener});
  }
 else {
    sharedObject=createSharedObject(sotypedesc,listener);
  }
  final IMergeableChannel channel=(IMergeableChannel)sharedObject.getAdapter(IMergeableChannel.class);
  if (channel == null) {
    throw new SharedObjectCreateException("String_Node_Str" + channel + "String_Node_Str");
  }
  ID newID=sodesc.getID();
  if (newID == null) {
    newID=IDFactory.getDefault().createGUID();
  }
  Map properties=sodesc.getProperties();
  if (properties == null) {
    properties=new HashMap();
  }
  getSharedObjectManager().addSharedObject(newID,sharedObject,properties);
  return channel;
}
Program: 94622
Project: 94622
Buggy source:
protected void fireChannelContainerListeners(IChannelContainerEvent event){
synchronized (channelContainerListener) {
    for (Iterator i=channelContainerListener.iterator(); i.hasNext(); ) {
      IChannelContainerListener l=(IChannelContainerListener)i.next();
      if (l != null)       l.handleChannelContainerEvent(event);
    }
  }
}

Fixed version (ground truth):
protected void fireChannelContainerListeners(IChannelContainerEvent event){
synchronized (channelContainerListener) {
    for (final Iterator i=channelContainerListener.iterator(); i.hasNext(); ) {
      final IChannelContainerListener l=(IChannelContainerListener)i.next();
      if (l != null)       l.handleChannelContainerEvent(event);
    }
  }
}
Program: 94623
Project: 94623
Buggy source:
protected ISynchAsynchConnection createConnection(ID remoteSpace,Object data) throws ConnectionCreateException {
  trace("String_Node_Str" + remoteSpace + "String_Node_Str"+ data);
  ISynchAsynchConnection conn=new HttpClient(receiver);
  return conn;
}

Fixed version (ground truth):
protected ISynchAsynchConnection createConnection(ID remoteSpace,Object data) throws ConnectionCreateException {
  trace("String_Node_Str" + remoteSpace + "String_Node_Str"+ data);
  final ISynchAsynchConnection conn=new HttpClient(receiver);
  return conn;
}
Program: 94624
Project: 94624
Buggy source:
public RssFeed receiveFeed(String feedPath) throws IOException {
  RssFeed feed=null;
  ISynchAsynchConnection connection=getConnection();
synchronized (connection) {
    if (connection.isConnected()) {
      try {
        feed=FeedParser.parse((byte[])connection.sendSynch(null,feedPath.getBytes()));
      }
 catch (      ParseException e) {
        throw new IOException(e.getMessage());
      }
    }
  }
  return feed;
}

Fixed version (ground truth):
public RssFeed receiveFeed(String feedPath) throws IOException {
  RssFeed feed=null;
  final ISynchAsynchConnection connection=getConnection();
synchronized (connection) {
    if (connection.isConnected()) {
      try {
        feed=FeedParser.parse((byte[])connection.sendSynch(null,feedPath.getBytes()));
      }
 catch (      final ParseException e) {
        throw new IOException(e.getMessage());
      }
    }
  }
  return feed;
}
Program: 94625
Project: 94625
Buggy source:
public String toString(){
  StringBuffer buf=new StringBuffer("String_Node_Str");
  buf.append("String_Node_Str").append(sode.getDeactivatedID()).append("String_Node_Str");
  buf.append("String_Node_Str").append(sode.getLocalContainerID()).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(sode.getDeactivatedID()).append("String_Node_Str");
  buf.append("String_Node_Str").append(sode.getLocalContainerID()).append("String_Node_Str");
  return buf.toString();
}