nus-yam/ex-repair huggingface dataset:
Program: 95132
Project: 95132
Buggy source:
public void intializeEditorSession() throws ECFException {
  container=ContainerFactory.getDefault().createContainer(Activator.getDefault().getPreferenceStore().getString(ClientPreferencePage.CONTAINER_TYPE));
  IChannelContainer channelContainer=(IChannelContainer)container.getAdapter(IChannelContainer.class);
  sessionID=Activator.getDefault().getPreferenceStore().getString(ClientPreferencePage.CHANNEL_ID) + "String_Node_Str" + editor.getTitle();
  Activator.getDefault().addSession(sessionID);
  final ID channelID=IDFactory.getDefault().createID(channelContainer.getChannelNamespace(),sessionID);
  channelListener=new EditChannelListener(document,editor);
  channel=channelContainer.createChannel(channelID,channelListener,new HashMap());
  container.connect(IDFactory.getDefault().createID(container.getConnectNamespace(),Activator.getDefault().getPreferenceStore().getString(ClientPreferencePage.TARGET_SERVER)),null);
}

Fixed version (ground truth):
public void intializeEditorSession() throws ECFException {
  container=ContainerFactory.getDefault().createContainer(Activator.getDefault().getPreferenceStore().getString(ClientPreferencePage.CONTAINER_TYPE));
  IChannelContainer channelContainer=(IChannelContainer)container.getAdapter(IChannelContainer.class);
  sessionID=Activator.getDefault().getPreferenceStore().getString(ClientPreferencePage.CHANNEL_ID) + SESSION_NAME_DELIMITER + editor.getTitle();
  Activator.getDefault().addSession(sessionID,editor.getTitle());
  final ID channelID=IDFactory.getDefault().createID(channelContainer.getChannelNamespace(),sessionID);
  channelListener=new EditChannelListener(document,editor);
  channel=channelContainer.createChannel(channelID,channelListener,new HashMap());
  container.connect(IDFactory.getDefault().createID(container.getConnectNamespace(),Activator.getDefault().getPreferenceStore().getString(ClientPreferencePage.TARGET_SERVER)),null);
}
Program: 95133
Project: 95133
Buggy source:
public void handleChannelEvent(IChannelEvent event){
  if (channel == null) {
    channel=Activator.getDefault().getPresenceChannel();
  }
  if (event instanceof IChannelMessageEvent) {
    IChannelMessageEvent msg=(IChannelMessageEvent)event;
    ByteArrayInputStream bins=new ByteArrayInputStream(msg.getData());
    ObjectInputStream ois;
    try {
      ois=new ObjectInputStream(bins);
      Object o=ois.readObject();
      if (o instanceof SharedEditorSessionListRequest) {
        channel.sendMessage(createMessage(new SharedEditorSessionList(Activator.getDefault().getSessionNames())));
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
catch (    ClassNotFoundException e) {
      e.printStackTrace();
    }
catch (    ECFException e) {
      e.printStackTrace();
    }
 finally {
      Activator.getDefault().setListenerActive(true);
      System.out.println("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void handleChannelEvent(IChannelEvent event){
  if (channel == null) {
    channel=Activator.getDefault().getPresenceChannel();
  }
  if (event instanceof IChannelMessageEvent) {
    IChannelMessageEvent msg=(IChannelMessageEvent)event;
    ByteArrayInputStream bins=new ByteArrayInputStream(msg.getData());
    ObjectInputStream ois;
    try {
      ois=new ObjectInputStream(bins);
      Object o=ois.readObject();
      if (o instanceof SharedEditorSessionListRequest) {
        channel.sendMessage(createMessage(new SharedEditorSessionList(Activator.getDefault().getSessionNames())));
      }
    }
 catch (    IOException e) {
      Activator.getDefault().getLog().log(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,e.getLocalizedMessage(),e));
    }
catch (    ClassNotFoundException e) {
      Activator.getDefault().getLog().log(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,e.getLocalizedMessage(),e));
    }
catch (    ECFException e) {
      Activator.getDefault().getLog().log(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,e.getLocalizedMessage(),e));
    }
 finally {
      Activator.getDefault().setListenerActive(true);
      System.out.println("String_Node_Str");
    }
  }
}
Program: 95134
Project: 95134
Buggy source:
public void run(){
  try {
    IEditorPart editorPart=page.openEditor(new FileEditorInput(file),editorDescriptor.getId());
    if (editorPart instanceof AbstractTextEditor) {
      IDocumentProvider dp=DocumentProviderRegistry.getDefault().getDocumentProvider(editorPart.getEditorInput());
      AbstractTextEditor textEditor=(AbstractTextEditor)editorPart;
      IDocument document=dp.getDocument(editorPart.getEditorInput());
      if (document != null) {
        EditorListener listener=new EditorListener(document,textEditor);
        document.addDocumentListener(listener);
      }
    }
  }
 catch (  PartInitException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    IEditorPart editorPart=page.openEditor(new FileEditorInput(file),editorDescriptor.getId());
    if (editorPart instanceof AbstractTextEditor) {
      IDocumentProvider dp=DocumentProviderRegistry.getDefault().getDocumentProvider(editorPart.getEditorInput());
      AbstractTextEditor textEditor=(AbstractTextEditor)editorPart;
      IDocument document=dp.getDocument(editorPart.getEditorInput());
      if (document != null) {
        EditorListener listener=new EditorListener(document,textEditor);
        document.addDocumentListener(listener);
      }
    }
  }
 catch (  PartInitException e) {
    Activator.getDefault().getLog().log(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,e.getLocalizedMessage(),e));
  }
}
Program: 95135
Project: 95135
Buggy source:
protected void performDefaults(){
  super.performDefaults();
  getPreferenceStore().setDefault(CONTAINER_TYPE,"String_Node_Str");
  getPreferenceStore().setDefault(TARGET_SERVER,"String_Node_Str");
  getPreferenceStore().setDefault(CHANNEL_ID,"String_Node_Str");
}

Fixed version (ground truth):
protected void performDefaults(){
  super.performDefaults();
  getPreferenceStore().setDefault(CONTAINER_TYPE,"String_Node_Str");
  getPreferenceStore().setDefault(TARGET_SERVER,"String_Node_Str");
  getPreferenceStore().setDefault(CHANNEL_ID,"String_Node_Str");
  try {
    getPreferenceStore().setDefault(LOCAL_NAME,Inet4Address.getLocalHost().getHostName());
  }
 catch (  UnknownHostException e) {
    Activator.getDefault().getLog().log(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,e.getLocalizedMessage(),e));
  }
}
Program: 95136
Project: 95136
Buggy source:
public void createFieldEditors(){
  addField(new StringFieldEditor(CONTAINER_TYPE,"String_Node_Str",this.getFieldEditorParent()));
  addField(new StringFieldEditor(TARGET_SERVER,"String_Node_Str",this.getFieldEditorParent()));
  addField(new StringFieldEditor(CHANNEL_ID,"String_Node_Str",this.getFieldEditorParent()));
}

Fixed version (ground truth):
public void createFieldEditors(){
  addField(new StringFieldEditor(CONTAINER_TYPE,"String_Node_Str",this.getFieldEditorParent()));
  addField(new StringFieldEditor(TARGET_SERVER,"String_Node_Str",this.getFieldEditorParent()));
  addField(new StringFieldEditor(CHANNEL_ID,"String_Node_Str",this.getFieldEditorParent()));
  addField(new StringFieldEditor(LOCAL_NAME,"String_Node_Str",this.getFieldEditorParent()));
}
Program: 95137
Project: 95137
Buggy source:
protected ContainerFactory(){
  ECFPlugin.getDefault().addDisposable(new IDisposable(){
    public void dispose(){
      doDispose();
    }
  }
);
}

Fixed version (ground truth):
protected ContainerFactory(){
  try {
    ECFPlugin.getDefault().addDisposable(new IDisposable(){
      public void dispose(){
        doDispose();
      }
    }
);
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
  }
}
Program: 95139
Project: 95139
Buggy source:
public static void log(String message,Throwable e){
  getDefault().getLog().log(new Status(IStatus.ERROR,ClientPlugin.getDefault().getBundle().getSymbolicName(),IStatus.OK,"String_Node_Str",e));
}

Fixed version (ground truth):
public static void log(String message,Throwable e){
  getDefault().getLog().log(new Status(IStatus.ERROR,ClientPlugin.getDefault().getBundle().getSymbolicName(),IStatus.OK,message,e));
}
Program: 95140
Project: 95140
Buggy source:
public void disconnect(){
  ID groupID=getConnectedID();
  debug("String_Node_Str" + groupID + "String_Node_Str");
  fireContainerEvent(new ContainerDisconnectingEvent(this.getID(),groupID));
synchronized (connectLock) {
    if (isConnected()) {
synchronized (connection) {
        try {
          connection.sendSynch(groupID,serializeObject(ContainerMessage.createLeaveGroupMessage(getID(),groupID,getNextSequenceNumber(),getLeaveData(groupID))));
        }
 catch (        Exception e) {
        }
synchronized (getGroupMembershipLock()) {
          memberLeave(groupID,connection);
        }
      }
    }
    connectionState=UNCONNECTED;
    connection=null;
    remoteServerID=null;
  }
  fireContainerEvent(new ContainerDisconnectedEvent(this.getID(),groupID));
}

Fixed version (ground truth):
public void disconnect(){
  ID groupID=getConnectedID();
  debug("String_Node_Str" + groupID + "String_Node_Str");
  fireContainerEvent(new ContainerDisconnectingEvent(this.getID(),groupID));
synchronized (getConnectLock()) {
    if (isConnected()) {
synchronized (connection) {
        try {
          connection.sendSynch(groupID,serializeObject(ContainerMessage.createLeaveGroupMessage(getID(),groupID,getNextSequenceNumber(),getLeaveData(groupID))));
        }
 catch (        Exception e) {
        }
synchronized (getGroupMembershipLock()) {
          memberLeave(groupID,connection);
        }
      }
    }
    setStateUnconnected(null);
  }
  fireContainerEvent(new ContainerDisconnectedEvent(this.getID(),groupID));
}
Program: 95143
Project: 95143
Buggy source:
public void createSharedObjects() throws Exception {
  if (sharedObjectClassNames != null) {
    for (int j=0; j < clientCount; j++) {
      ISharedObjectContainer scg=sm[j];
      sharedObjects=new ID[sharedObjectClassNames.length];
      for (int i=0; i < sharedObjectClassNames.length; i++) {
        System.out.println("String_Node_Str" + sharedObjectClassNames[i] + "String_Node_Str"+ scg.getID().getName());
        ISharedObject so=(ISharedObject)Class.forName(sharedObjectClassNames[i]).newInstance();
        scg.getSharedObjectManager().addSharedObject(sharedObjects[i],so,new HashMap());
        System.out.println("String_Node_Str" + scg.getID().getName());
      }
    }
  }
}

Fixed version (ground truth):
public void createSharedObjects() throws Exception {
  if (sharedObjectClassNames != null) {
    for (int j=0; j < clientCount; j++) {
      ISharedObjectContainer scg=sm[j];
      sharedObjects=new ID[sharedObjectClassNames.length];
      for (int i=0; i < sharedObjectClassNames.length; i++) {
        System.out.println("String_Node_Str" + sharedObjectClassNames[i] + "String_Node_Str"+ scg.getID().getName());
        ISharedObject so=(ISharedObject)Class.forName(sharedObjectClassNames[i]).newInstance();
        sharedObjects[i]=IDFactory.getDefault().createStringID(sharedObjectClassNames[i] + "String_Node_Str" + i);
        scg.getSharedObjectManager().addSharedObject(sharedObjects[i],so,new HashMap());
        System.out.println("String_Node_Str" + scg.getID().getName());
      }
    }
  }
}
Program: 95144
Project: 95144
Buggy source:
/** 
 * Check remote creation of shared objects. This method is called by the remote shared object creation message handler, to verify that the shared object from container 'fromID' to container 'toID' with description 'desc' is to be allowed to be created within the current container. If this method throws, a failure (and exception will be sent back to caller If this method returns null, the create message is ignored. If this method returns a non-null object, the creation is allowed to proceed. The default implementation is to return a non-null object
 * @param fromID the ID of the container sending us this create request
 * @param toID the ID (or null) of the container intended to receive this request
 * @param desc the SharedObjectDescription that describes the shared object to be created
 * @return Object null if the create message is to be ignored, non-null ifthe creation should continue
 * @throws Exception may throw any Exception to communicate back (via sendCreateResponse) to the sender that the creation has failed
 */
protected Object checkRemoteCreate(ID fromID,ID toID,SharedObjectDescription desc) throws Exception {
  debug("String_Node_Str" + fromID + "String_Node_Str"+ toID+ "String_Node_Str"+ desc+ "String_Node_Str");
  if (policy != null) {
    policy.checkAddSharedObject(fromID,toID,getID(),desc);
  }
  return desc;
}

Fixed version (ground truth):
/** 
 * Check remote creation of shared objects. This method is called by the remote shared object creation message handler, to verify that the shared object from container 'fromID' to container 'toID' with description 'desc' is to be allowed to be created within the current container. If this method throws, a failure (and exception will be sent back to caller If this method returns null, the create message is ignored. If this method returns a non-null object, the creation is allowed to proceed. The default implementation is to return a non-null object
 * @param fromID the ID of the container sending us this create request
 * @param toID the ID (or null) of the container intended to receive this request
 * @param desc the SharedObjectDescription that describes the shared object to be created
 * @return Object null if the create message is to be ignored, non-null ifthe creation should continue
 * @throws Exception may throw any Exception to communicate back (via sendCreateResponse) to the sender that the creation has failed
 */
protected Object checkRemoteCreate(ID fromID,ID toID,SharedObjectDescription desc) throws Exception {
  debug("String_Node_Str" + fromID + "String_Node_Str"+ toID+ "String_Node_Str"+ desc+ "String_Node_Str");
  if (policy != null) {
    return policy.checkAddSharedObject(fromID,toID,getID(),desc);
  }
  return desc;
}
Program: 95145
Project: 95145
Buggy source:
protected void removeUserFromTree(ID id){
  if (id == null)   return;
  TreeParent top=getPresenceRoot();
  if (top != null) {
    for (Iterator e=top.children().iterator(); e.hasNext(); ) {
      TreeUser tn=(TreeUser)e.next();
      User ud=(User)tn.getUser();
      if (id.equals(ud.getUserID())) {
        top.removeChild(tn);
        refreshTreeView();
      }
    }
  }
}

Fixed version (ground truth):
protected void removeUserFromTree(ID id){
  if (id == null)   return;
  TreeParent top=getPresenceRoot();
  if (top != null) {
    for (Iterator e=top.children().iterator(); e.hasNext(); ) {
      TreeUser tn=(TreeUser)e.next();
      User ud=(User)tn.getUser();
      if (id.equals(ud.getUserID())) {
        e.remove();
        refreshTreeView();
      }
    }
  }
}
Program: 95146
Project: 95146
Buggy source:
protected void replicateTo(ID[] remotes){
  trace("String_Node_Str" + Arrays.asList(remotes) + "String_Node_Str");
  try {
    ISharedObjectContext context=getSharedObject().getContext();
    if (context == null)     return;
    ID[] group=context.getGroupMemberIDs();
    if (group == null || group.length < 1) {
      return;
    }
    SharedObjectDescription[] createInfos=getSharedObject().getReplicaDescriptions(remotes);
    if (createInfos != null) {
      if (createInfos.length == 1) {
        context.sendCreate((remotes == null) ? null : remotes[0],createInfos[0]);
      }
 else {
        for (int i=0; i < remotes.length; i++) {
          context.sendCreate(remotes[i],createInfos[i]);
        }
      }
    }
  }
 catch (  IOException e) {
    traceStack("String_Node_Str" + Arrays.asList(remotes) + "String_Node_Str",e);
    return;
  }
}

Fixed version (ground truth):
protected void replicateTo(ID[] remotes){
  if (remotes == null) {
    trace("String_Node_Str");
  }
 else {
    trace("String_Node_Str" + Arrays.asList(remotes) + "String_Node_Str");
  }
  try {
    ISharedObjectContext context=getSharedObject().getContext();
    if (context == null)     return;
    ID[] group=context.getGroupMemberIDs();
    if (group == null || group.length < 1) {
      return;
    }
    SharedObjectDescription[] createInfos=getSharedObject().getReplicaDescriptions(remotes);
    if (createInfos != null) {
      if (createInfos.length == 1) {
        context.sendCreate((remotes == null) ? null : remotes[0],createInfos[0]);
      }
 else {
        for (int i=0; i < remotes.length; i++) {
          context.sendCreate(remotes[i],createInfos[i]);
        }
      }
    }
  }
 catch (  IOException e) {
    traceStack("String_Node_Str" + Arrays.asList(remotes) + "String_Node_Str",e);
    return;
  }
}
Program: 95147
Project: 95147
Buggy source:
protected void handleCreateResponse(ISharedObjectCreateResponseEvent event){
  trace("String_Node_Str" + event + "String_Node_Str");
  if (isPrimary()) {
synchronized (lock) {
      trace("String_Node_Str" + event + "String_Node_Str");
      Throwable except=event.getException();
      ID remoteID=event.getRemoteContainerID();
      long ident=event.getSequence();
      if (getTransactionState() == ISharedObjectContainerTransaction.VOTING) {
        if (except == null) {
          removeParticipant(remoteID);
        }
 else {
          addFailed(remoteID,except);
        }
      }
 else {
        handleVotingCompletedCreateResponse(remoteID,except,ident);
      }
      lock.notifyAll();
    }
  }
 else {
  }
}

Fixed version (ground truth):
protected void handleCreateResponse(ISharedObjectCreateResponseEvent event){
  trace("String_Node_Str" + event + "String_Node_Str");
  if (isPrimary()) {
synchronized (lock) {
      Throwable except=event.getException();
      ID remoteID=event.getRemoteContainerID();
      long ident=event.getSequence();
      if (getTransactionState() == ISharedObjectContainerTransaction.VOTING) {
        if (except == null) {
          removeParticipant(remoteID);
        }
 else {
          addFailed(remoteID,except);
        }
      }
 else {
        handleVotingCompletedCreateResponse(remoteID,except,ident);
      }
      lock.notifyAll();
    }
  }
 else {
  }
}
Program: 95148
Project: 95148
Buggy source:
protected void sendCommit() throws SharedObjectAddAbortException {
  trace("String_Node_Str");
  try {
    getContext().sendMessage(null,new SharedObjectCommitEvent(getSharedObject().getID()));
  }
 catch (  Exception e2) {
    doTMAbort(new SharedObjectAddAbortException("String_Node_Str",e2,getTimeout()));
  }
}

Fixed version (ground truth):
protected void sendCommit() throws SharedObjectAddAbortException {
  try {
    getContext().sendMessage(null,new SharedObjectCommitEvent(getSharedObject().getID()));
  }
 catch (  Exception e2) {
    doTMAbort(new SharedObjectAddAbortException("String_Node_Str",e2,getTimeout()));
  }
}
Program: 95149
Project: 95149
Buggy source:
protected void fillCombo(){
  List rawDescriptions=null;
  if (descriptions != null) {
    rawDescriptions=Arrays.asList(descriptions);
  }
 else {
    rawDescriptions=ContainerFactory.getDefault().getDescriptions();
  }
  int index=0;
  int def=0;
  Map defProps=null;
  for (Iterator i=rawDescriptions.iterator(); i.hasNext(); ) {
    final ContainerDescription desc=(ContainerDescription)i.next();
    String name=desc.getName();
    String description=desc.getDescription();
    Map props=desc.getProperties();
    String isServer=(String)props.get(ISSERVER_PROP_NAME);
    if (isServer == null || !isServer.equalsIgnoreCase("String_Node_Str")) {
      if (DEFAULT_CLIENT.equals(name)) {
        def=index;
        defProps=props;
      }
      combo.add(description + "String_Node_Str" + name,index);
      combo.setData("String_Node_Str" + index,desc);
      containerDescriptions.add(desc);
      index++;
    }
  }
  combo.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      ContainerDescription desc=(ContainerDescription)combo.getData(combo.getSelectionIndex() + "String_Node_Str");
      Map props=desc.getProperties();
      modifyUI(props);
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  if (combo.getItemCount() > 0)   combo.select(def);
  if (defProps != null)   modifyUI(defProps);
}

Fixed version (ground truth):
protected void fillCombo(){
  List rawDescriptions=null;
  if (descriptions != null) {
    rawDescriptions=Arrays.asList(descriptions);
  }
 else {
    rawDescriptions=ContainerFactory.getDefault().getDescriptions();
  }
  int index=0;
  int def=0;
  Map defProps=null;
  for (Iterator i=rawDescriptions.iterator(); i.hasNext(); ) {
    final ContainerDescription desc=(ContainerDescription)i.next();
    String name=desc.getName();
    String description=desc.getDescription();
    Map props=desc.getProperties();
    defProps=props;
    String isServer=(String)props.get(ISSERVER_PROP_NAME);
    if (isServer == null || !isServer.equalsIgnoreCase("String_Node_Str")) {
      if (DEFAULT_CLIENT.equals(name)) {
        def=index;
        defProps=props;
      }
      combo.add(description + "String_Node_Str" + name,index);
      combo.setData("String_Node_Str" + index,desc);
      containerDescriptions.add(desc);
      index++;
    }
  }
  combo.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      ContainerDescription desc=(ContainerDescription)combo.getData(combo.getSelectionIndex() + "String_Node_Str");
      Map props=desc.getProperties();
      modifyUI(props);
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  if (combo.getItemCount() > 0)   combo.select(def);
  if (defProps != null)   modifyUI(defProps);
}
Program: 95150
Project: 95150
Buggy source:
public void handleJoin(ID user){
  otherUsers.add(user);
}

Fixed version (ground truth):
public void handleJoin(ID user){
  if (disposed)   return;
  otherUsers.add(user);
}
Program: 95151
Project: 95151
Buggy source:
public void handleLeave(ID user){
  otherUsers.remove(user);
}

Fixed version (ground truth):
public void handleLeave(ID user){
  if (disposed)   return;
  otherUsers.remove(user);
}
Program: 95152
Project: 95152
Buggy source:
public void handlePresence(final ID fromID,final IPresence presence){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      boolean isAdd=presence.getType().equals(IPresence.Type.AVAILABLE);
      Participant p=new Participant(fromID);
      if (isAdd) {
        if (localUser == null && !otherUsers.contains(fromID)) {
          localUser=p;
        }
        addParticipant(p);
      }
 else {
        removeParticipant(p);
        if (localUser != null && localUser.getID().equals(fromID)) {
          setEnabled(false);
          String title=getPartName();
          setPartName("String_Node_Str" + title + "String_Node_Str");
          removeAllParticipants();
          dispose();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public void handlePresence(final ID fromID,final IPresence presence){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      if (disposed)       return;
      boolean isAdd=presence.getType().equals(IPresence.Type.AVAILABLE);
      Participant p=new Participant(fromID);
      if (isAdd) {
        if (localUser == null && !otherUsers.contains(fromID)) {
          localUser=p;
        }
        addParticipant(p);
      }
 else {
        removeParticipant(p);
        if (localUser != null && localUser.getID().equals(fromID)) {
          setEnabled(false);
          String title=getPartName();
          setPartName("String_Node_Str" + title + "String_Node_Str");
          removeAllParticipants();
          dispose();
        }
      }
    }
  }
);
}
Program: 95153
Project: 95153
Buggy source:
public void handleMessage(final ID fromID,final ID toID,final Type type,final String subject,final String messageBody){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      appendText(new ChatLine(messageBody,new Participant(fromID)));
    }
  }
);
}

Fixed version (ground truth):
public void handleMessage(final ID fromID,final ID toID,final Type type,final String subject,final String messageBody){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      if (disposed)       return;
      appendText(new ChatLine(messageBody,new Participant(fromID)));
    }
  }
);
}
Program: 95154
Project: 95154
Buggy source:
public void dispose(){
  if (closeListener != null) {
    closeListener.chatRoomViewClosing(viewID);
    closeListener=null;
    viewID=null;
  }
  super.dispose();
}

Fixed version (ground truth):
public void dispose(){
  if (closeListener != null) {
    closeListener.chatRoomViewClosing(viewID);
    closeListener=null;
    viewID=null;
  }
  otherUsers.clear();
  localUser=null;
  disposed=true;
  super.dispose();
}
Program: 95155
Project: 95155
Buggy source:
protected void addParticipant(IUser p){
  ChatLine cl=new ChatLine("String_Node_Str" + getDateTime() + "String_Node_Str"+ p.getID().getName()+ "String_Node_Str",null);
  appendText(cl);
  memberViewer.add(p);
}

Fixed version (ground truth):
protected void addParticipant(IUser p){
  if (p != null) {
    ID id=p.getID();
    if (id != null) {
      ChatLine cl=new ChatLine("String_Node_Str" + getDateTime() + "String_Node_Str"+ id.getName()+ "String_Node_Str",null);
      appendText(cl);
      memberViewer.add(p);
    }
  }
}
Program: 95156
Project: 95156
Buggy source:
protected void addParticipant(IUser p){
  if (p != null) {
    ID id=p.getID();
    if (id != null) {
      ChatLine cl=new ChatLine("String_Node_Str" + getDateTime() + "String_Node_Str"+ id.getName()+ "String_Node_Str",null);
      appendText(cl);
      memberViewer.add(p);
    }
  }
}

Fixed version (ground truth):
protected void addParticipant(IUser p){
  if (p != null) {
    ID id=p.getID();
    if (id != null) {
      appendText(new ChatLine("String_Node_Str" + getDateTime() + "String_Node_Str"+ trimUserID(id)+ "String_Node_Str",null));
      memberViewer.add(p);
    }
  }
}
Program: 95157
Project: 95157
Buggy source:
public void handlePresence(final ID fromID,final IPresence presence){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      if (disposed)       return;
      boolean isAdd=presence.getType().equals(IPresence.Type.AVAILABLE);
      Participant p=new Participant(fromID);
      if (isAdd) {
        if (localUser == null && !otherUsers.contains(fromID)) {
          localUser=p;
        }
        addParticipant(p);
      }
 else {
        removeParticipant(p);
        if (localUser != null && localUser.getID().equals(fromID)) {
          setEnabled(false);
          String title=getPartName();
          setPartName("String_Node_Str" + title + "String_Node_Str");
          removeAllParticipants();
          dispose();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public void handlePresence(final ID fromID,final IPresence presence){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      if (disposed)       return;
      boolean isAdd=presence.getType().equals(IPresence.Type.AVAILABLE);
      Participant p=new Participant(fromID);
      if (isAdd) {
        if (localUser == null && !otherUsers.contains(fromID)) {
          localUser=p;
        }
        addParticipant(p);
      }
 else {
        removeParticipant(p);
        if (isLocalUser(fromID))         removeLocalUser();
      }
    }
  }
);
}
Program: 95158
Project: 95158
Buggy source:
protected void removeParticipant(IUser p){
  if (p != null) {
    ID id=p.getID();
    if (id != null) {
      ChatLine cl=new ChatLine("String_Node_Str" + getDateTime() + "String_Node_Str"+ id.getName()+ "String_Node_Str",null);
      appendText(cl);
      memberViewer.remove(p);
    }
  }
}

Fixed version (ground truth):
protected void removeParticipant(IUser p){
  if (p != null) {
    ID id=p.getID();
    if (id != null) {
      appendText(new ChatLine("String_Node_Str" + getDateTime() + "String_Node_Str"+ trimUserID(id)+ "String_Node_Str",null));
      memberViewer.remove(p);
      if (isLocalUser(id))       removeLocalUser();
    }
  }
}
Program: 95159
Project: 95159
Buggy source:
public String toString(){
  String fullName=id.getName();
  int atIndex=fullName.indexOf('@');
  if (atIndex != -1) {
    fullName=fullName.substring(0,atIndex);
  }
  return fullName;
}

Fixed version (ground truth):
public String toString(){
  return trimUserID(id);
}
Program: 95162
Project: 95162
Buggy source:
public Namespace getConnectNamespace(){
  return IDFactory.getDefault().getNamespaceByName("String_Node_Str");
}

Fixed version (ground truth):
public Namespace getConnectNamespace(){
  return IDFactory.getDefault().getNamespaceByName(XmppPlugin.NAMESPACE_IDENTIFIER);
}
Program: 95163
Project: 95163
Buggy source:
public void connect(String groupName) throws ContainerConnectException {
  ID targetID=null;
  try {
    targetID=makeChatRoomID(groupName);
  }
 catch (  IDInstantiationException e) {
    ContainerConnectException newExcept=new ContainerConnectException("String_Node_Str",e);
    newExcept.setStackTrace(e.getStackTrace());
    throw newExcept;
  }
  this.connect(targetID,null);
}

Fixed version (ground truth):
public void connect(String groupName) throws ContainerConnectException {
  ID targetID=null;
  try {
    targetID=makeChatRoomID(groupName);
  }
 catch (  IDInstantiationException e) {
    throw new ContainerConnectException("String_Node_Str",e);
  }
  this.connect(targetID,null);
}
Program: 95164
Project: 95164
Buggy source:
protected ID makeUserIDFromName(String name){
  ID result=null;
  try {
    result=IDFactory.getDefault().makeID(usernamespace,new Object[]{name});
    return result;
  }
 catch (  Exception e) {
    dumpStack("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
protected ID makeUserIDFromName(String name){
  ID result=null;
  try {
    result=new XMPPID(usernamespace,name);
    return result;
  }
 catch (  Exception e) {
    dumpStack("String_Node_Str",e);
    return null;
  }
}
Program: 95165
Project: 95165
Buggy source:
protected String canonicalizeRoomFrom(String from){
  if (from == null)   return null;
  int atIndex=from.indexOf('@');
  String hostname=null;
  String username=null;
  int index=from.indexOf("String_Node_Str");
  if (atIndex > 0 && index > 0) {
    hostname=from.substring(atIndex + 1,index);
    int dotIndex=hostname.lastIndexOf('.');
    if (dotIndex > 0) {
      hostname=hostname.substring(dotIndex + 1);
    }
    username=from.substring(index + 1);
    return username + "String_Node_Str" + hostname;
  }
  return from;
}

Fixed version (ground truth):
protected String canonicalizeRoomFrom(String from){
  if (from == null)   return null;
  int atIndex=from.indexOf('@');
  String hostname=null;
  String username=null;
  int index=from.indexOf("String_Node_Str");
  if (atIndex > 0 && index > 0) {
    hostname=from.substring(atIndex + 1,index);
    username=from.substring(index + 1);
    return username + "String_Node_Str" + hostname;
  }
  return from;
}
Program: 95166
Project: 95166
Buggy source:
public String getHostname(){
  return uri.getHost();
}

Fixed version (ground truth):
public String getHostname(){
  return hostname;
}
Program: 95167
Project: 95167
Buggy source:
protected XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  unamehost=fixEscape(unamehost);
  if (unamehost == null)   throw new URISyntaxException(unamehost,"String_Node_Str");
  int atIndex=unamehost.indexOf(USER_HOST_DELIMITER);
  if (atIndex == -1)   throw new URISyntaxException(unamehost,"String_Node_Str");
  String username=unamehost.substring(0,atIndex);
  String host=unamehost.substring(atIndex + 1);
  uri=new URI(namespace.getScheme(),username,host,-1,null,null,null);
}

Fixed version (ground truth):
public XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  unamehost=fixEscape(unamehost);
  if (unamehost == null)   throw new URISyntaxException(unamehost,"String_Node_Str");
  int atIndex=unamehost.lastIndexOf(USER_HOST_DELIMITER);
  if (atIndex == -1)   throw new URISyntaxException(unamehost,"String_Node_Str");
  username=unamehost.substring(0,atIndex);
  hostname=unamehost.substring(atIndex + 1);
  uri=new URI(namespace.getScheme(),username,hostname,-1,null,null,null);
}
Program: 95168
Project: 95168
Buggy source:
public String getUsername(){
  return uri.getUserInfo();
}

Fixed version (ground truth):
public String getUsername(){
  return username;
}
Program: 95169
Project: 95169
Buggy source:
public ID makeInstance(Class[] argTypes,Object[] args) throws IDInstantiationException {
  try {
    if (args.length == 3) {
      return new XMPPID(this,(String)args[0],(String)args[1],(String)args[2]);
    }
 else     if (args.length == 2) {
      return new XMPPID(this,(String)args[0],(String)args[1]);
    }
 else     if (args.length == 1) {
      return new XMPPID(this,(String)args[0]);
    }
    throw new IllegalArgumentException("String_Node_Str");
  }
 catch (  Exception e) {
    throw new IDInstantiationException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public ID makeInstance(Class[] argTypes,Object[] args) throws IDInstantiationException {
  try {
    return new XMPPID(this,(String)args[0]);
  }
 catch (  Exception e) {
    throw new IDInstantiationException("String_Node_Str",e);
  }
}
Program: 95170
Project: 95170
Buggy source:
protected void handleTextInput(String text){
  if (messageSender == null) {
    MessageDialog.openError(getViewSite().getShell(),"String_Node_Str","String_Node_Str");
    return;
  }
 else {
    try {
      messageSender.sendMessage(text);
    }
 catch (    IOException e) {
      UiPlugin.log("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
protected void handleTextInput(String text){
  if (messageSender == null) {
    MessageDialog.openError(getViewSite().getShell(),"String_Node_Str","String_Node_Str");
    return;
  }
 else {
    try {
      messageSender.sendMessage(text);
    }
 catch (    IOException e) {
      removeLocalUser();
    }
  }
}
Program: 95171
Project: 95171
Buggy source:
protected void setEnabled(boolean enabled){
  writeText.setEnabled(enabled);
}

Fixed version (ground truth):
protected void setEnabled(boolean enabled){
  if (!writeText.isDisposed())   writeText.setEnabled(enabled);
}
Program: 95172
Project: 95172
Buggy source:
protected void removeLocalUser(){
  setEnabled(false);
  String title=getPartName();
  setPartName("String_Node_Str" + title + "String_Node_Str");
  removeAllParticipants();
  dispose();
}

Fixed version (ground truth):
protected void removeLocalUser(){
  String title=getPartName();
  setPartName("String_Node_Str" + title + "String_Node_Str");
  removeAllParticipants();
  cleanUp();
  setEnabled(false);
}
Program: 95173
Project: 95173
Buggy source:
public void dispose(){
  if (closeListener != null) {
    closeListener.chatRoomViewClosing(viewID);
    closeListener=null;
    viewID=null;
  }
  otherUsers.clear();
  localUser=null;
  disposed=true;
  super.dispose();
}

Fixed version (ground truth):
public void dispose(){
  disposed=true;
  cleanUp();
  super.dispose();
}
Program: 95174
Project: 95174
Buggy source:
public void initialize(final IChatRoomViewCloseListener parent,final String secondaryID,final IChatRoomContainer container,final IRoomInfo info,final IChatMessageSender sender){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      ChatRoomView.this.viewID=secondaryID;
      ChatRoomView.this.closeListener=parent;
      ChatRoomView.this.chatRoomContainer=container;
      ChatRoomView.this.messageSender=sender;
      ChatRoomView.this.roomInfo=info;
      ID roomID=info.getRoomID();
      ChatRoomView.this.setPartName(VIEW_PREFIX + roomInfo.getName());
      ChatRoomView.this.setTitleToolTip("String_Node_Str" + roomID.getName() + "String_Node_Str"+ roomInfo.getDescription());
      setEnabled(true);
    }
  }
);
}

Fixed version (ground truth):
public void initialize(final IChatRoomViewCloseListener parent,final String secondaryID,final IChatRoomContainer container,final IRoomInfo info,final IChatMessageSender sender){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      removeAllParticipants();
      otherUsers.clear();
      localUser=null;
      ChatRoomView.this.viewID=secondaryID;
      ChatRoomView.this.closeListener=parent;
      ChatRoomView.this.chatRoomContainer=container;
      ChatRoomView.this.messageSender=sender;
      ChatRoomView.this.roomInfo=info;
      ID roomID=info.getRoomID();
      ChatRoomView.this.setPartName(VIEW_PREFIX + roomInfo.getName());
      ChatRoomView.this.setTitleToolTip("String_Node_Str" + roomID.getName() + "String_Node_Str"+ roomInfo.getDescription());
      setEnabled(true);
    }
  }
);
}
Program: 95175
Project: 95175
Buggy source:
public void disconnect(){
  ID groupID=getConnectedID();
  fireContainerEvent(new SharedObjectContainerDisconnectingEvent(this.getID(),groupID));
synchronized (getConnectLock()) {
    if (isConnected()) {
      ISynchAsynchConnection conn=getConnection();
synchronized (conn) {
synchronized (getGroupMembershipLock()) {
          memberLeave(groupID,null);
        }
        try {
          conn.disconnect();
        }
 catch (        IOException e) {
          dumpStack("String_Node_Str",e);
        }
      }
    }
    connectionState=UNCONNECTED;
    this.connection=null;
    remoteServerID=null;
  }
  fireContainerEvent(new SharedObjectContainerDisconnectedEvent(this.getID(),groupID));
}

Fixed version (ground truth):
public void disconnect(){
  ID groupID=getConnectedID();
  fireContainerEvent(new SharedObjectContainerDisconnectingEvent(this.getID(),groupID));
synchronized (getConnectLock()) {
    if (isConnected()) {
      ISynchAsynchConnection conn=getConnection();
synchronized (conn) {
synchronized (getGroupMembershipLock()) {
          memberLeave(groupID,null);
        }
        try {
          conn.disconnect();
        }
 catch (        IOException e) {
          dumpStack("String_Node_Str",e);
        }
      }
    }
    connectionState=UNCONNECTED;
    this.connection=null;
    remoteServerID=null;
  }
  fireContainerEvent(new SharedObjectContainerDisconnectedEvent(this.getID(),groupID));
  dispose();
}
Program: 95176
Project: 95176
Buggy source:
public IChatRoomManager getChatRoomManager(){
  return new IChatRoomManager(){
    public ID[] getChatRooms(){
      return XMPPClientSOContainer.this.getChatRooms();
    }
    public IRoomInfo getChatRoomInfo(    ID roomID){
      return XMPPClientSOContainer.this.getChatRoomInfo(roomID);
    }
    public IChatRoomContainer makeChatRoomContainer() throws ContainerInstantiationException {
      IChatRoomContainer chatContainer=null;
      try {
        chatContainer=new XMPPGroupChatSOContainer(sharedObject.getConnection(),getConnectNamespace());
      }
 catch (      IDInstantiationException e) {
        ContainerInstantiationException newExcept=new ContainerInstantiationException("String_Node_Str" + getID(),e);
        newExcept.setStackTrace(e.getStackTrace());
        throw newExcept;
      }
      return chatContainer;
    }
    public IRoomInfo[] getChatRoomsInfo(){
      ID[] chatRooms=getChatRooms();
      if (chatRooms == null)       return null;
      IRoomInfo[] res=new IRoomInfo[chatRooms.length];
      int count=0;
      for (int i=0; i < chatRooms.length; i++) {
        IRoomInfo infoResult=getChatRoomInfo(chatRooms[i]);
        if (infoResult != null) {
          res[count++]=infoResult;
        }
      }
      IRoomInfo[] results=new IRoomInfo[count];
      for (int i=0; i < count; i++) {
        results[i]=res[i];
      }
      return results;
    }
  }
;
}

Fixed version (ground truth):
public IChatRoomManager getChatRoomManager(){
  return new IChatRoomManager(){
    public ID[] getChatRooms(){
      return XMPPClientSOContainer.this.getChatRooms();
    }
    public IRoomInfo getChatRoomInfo(    ID roomID){
      return XMPPClientSOContainer.this.getChatRoomInfo(roomID);
    }
    public IChatRoomContainer makeChatRoomContainer() throws ContainerInstantiationException {
      IChatRoomContainer chatContainer=null;
      try {
        chatContainer=new XMPPGroupChatSOContainer(sharedObject.getConnection(),getConnectNamespace());
      }
 catch (      IDInstantiationException e) {
        ContainerInstantiationException newExcept=new ContainerInstantiationException("String_Node_Str" + getID(),e);
        newExcept.setStackTrace(e.getStackTrace());
        throw newExcept;
      }
      chats.add(chatContainer);
      return chatContainer;
    }
    public IRoomInfo[] getChatRoomsInfo(){
      ID[] chatRooms=getChatRooms();
      if (chatRooms == null)       return null;
      IRoomInfo[] res=new IRoomInfo[chatRooms.length];
      int count=0;
      for (int i=0; i < chatRooms.length; i++) {
        IRoomInfo infoResult=getChatRoomInfo(chatRooms[i]);
        if (infoResult != null) {
          res[count++]=infoResult;
        }
      }
      IRoomInfo[] results=new IRoomInfo[count];
      for (int i=0; i < count; i++) {
        results[i]=res[i];
      }
      return results;
    }
  }
;
}
Program: 95178
Project: 95178
Buggy source:
public void dispose(){
  if (sharedObject != null) {
    getSharedObjectManager().removeSharedObject(sharedObjectID);
  }
  sharedObjectID=null;
  sharedObject=null;
  messageSender=null;
  super.dispose();
}

Fixed version (ground truth):
public void dispose(){
  if (sharedObject != null) {
    getSharedObjectManager().removeSharedObject(sharedObjectID);
  }
  sharedObjectID=null;
  sharedObject=null;
  messageSender=null;
  disposeChats();
  super.dispose();
}
Program: 95179
Project: 95179
Buggy source:
public IChatRoomContainer makeChatRoomContainer() throws ContainerInstantiationException {
  IChatRoomContainer chatContainer=null;
  try {
    chatContainer=new XMPPGroupChatSOContainer(sharedObject.getConnection(),getConnectNamespace());
  }
 catch (  IDInstantiationException e) {
    ContainerInstantiationException newExcept=new ContainerInstantiationException("String_Node_Str" + getID(),e);
    newExcept.setStackTrace(e.getStackTrace());
    throw newExcept;
  }
  return chatContainer;
}

Fixed version (ground truth):
public IChatRoomContainer makeChatRoomContainer() throws ContainerInstantiationException {
  IChatRoomContainer chatContainer=null;
  try {
    chatContainer=new XMPPGroupChatSOContainer(sharedObject.getConnection(),getConnectNamespace());
  }
 catch (  IDInstantiationException e) {
    ContainerInstantiationException newExcept=new ContainerInstantiationException("String_Node_Str" + getID(),e);
    newExcept.setStackTrace(e.getStackTrace());
    throw newExcept;
  }
  chats.add(chatContainer);
  return chatContainer;
}
Program: 95180
Project: 95180
Buggy source:
protected void removeRoomView(RoomWithAView roomView){
  chatRooms.remove(roomView);
}

Fixed version (ground truth):
protected void removeRoomView(RoomWithAView roomView){
  chatRooms.remove(roomView.getID());
}
Program: 95181
Project: 95181
Buggy source:
protected static void displayURL(String url,boolean external){
  try {
    IBrowser browser=BrowserManager.getInstance().createBrowser(external);
    browser.displayURL(url);
  }
 catch (  Exception e) {
    try {
      Shell[] shells=Display.getCurrent().getShells();
      if (shells != null && shells.length > 0) {
        MessageDialog.openError(shells[0],"String_Node_Str","String_Node_Str");
      }
    }
 catch (    Exception e1) {
    }
    ClientPlugin.log("String_Node_Str" + url,e);
  }
}

Fixed version (ground truth):
protected static void displayURL(String url,boolean external){
  IBrowser browser=null;
  Shell[] shells=Display.getCurrent().getShells();
  try {
    browser=BrowserManager.getInstance().createBrowser(external);
  }
 catch (  SWTError swterror) {
    try {
      if (shells != null && shells.length > 0) {
        MessageDialog.openError(shells[0],"String_Node_Str","String_Node_Str");
      }
    }
 catch (    Exception e1) {
    }
    ClientPlugin.log("String_Node_Str" + url,swterror);
    return;
  }
  try {
    browser.displayURL(url);
  }
 catch (  Exception e) {
    try {
      if (shells != null && shells.length > 0) {
        MessageDialog.openError(shells[0],"String_Node_Str","String_Node_Str");
      }
    }
 catch (    Exception e1) {
    }
    ClientPlugin.log("String_Node_Str" + url,e);
  }
catch (  SWTError swterror) {
  }
}
Program: 95182
Project: 95182
Buggy source:
public static void showURL(final String url,final boolean considerInternal){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      try {
        displayURL(url,considerInternal);
      }
 catch (      Exception e) {
        try {
          Runtime.getRuntime().exec(getBrowserExec(null,url));
        }
 catch (        Exception e1) {
          return;
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public static void showURL(final String url,final boolean considerInternal){
  Display.getDefault().asyncExec(new Runnable(){
    public void run(){
      displayURL(url,considerInternal);
    }
  }
);
}
Program: 95183
Project: 95183
Buggy source:
public void run(){
  try {
    displayURL(url,considerInternal);
  }
 catch (  Exception e) {
    try {
      Runtime.getRuntime().exec(getBrowserExec(null,url));
    }
 catch (    Exception e1) {
      return;
    }
  }
}

Fixed version (ground truth):
public void run(){
  displayURL(url,considerInternal);
}
Program: 95184
Project: 95184
Buggy source:
protected static void displayURL(String url,boolean external){
  IBrowser browser=BrowserManager.getInstance().createBrowser(external);
  try {
    browser.displayURL(url);
  }
 catch (  Exception e) {
    ClientPlugin.log("String_Node_Str" + url,e);
  }
}

Fixed version (ground truth):
protected static void displayURL(String url,boolean external){
  try {
    IBrowser browser=BrowserManager.getInstance().createBrowser(external);
    browser.displayURL(url);
  }
 catch (  Exception e) {
    try {
      Shell[] shells=Display.getCurrent().getShells();
      if (shells != null && shells.length > 0) {
        MessageDialog.openError(shells[0],"String_Node_Str","String_Node_Str");
      }
    }
 catch (    Exception e1) {
    }
    ClientPlugin.log("String_Node_Str" + url,e);
  }
}
Program: 95186
Project: 95186
Buggy source:
protected void handleChatMessage(Message mess) throws IOException {
  SOWrapper wrap=getSharedObjectWrapper(sharedObjectID);
  if (mess.getExtensions().hasNext()) {
    handleChatMessageWithExtension(mess);
  }
 else {
    if (wrap != null) {
      wrap.deliverEvent(new MessageEvent(mess));
    }
  }
}

Fixed version (ground truth):
protected void handleChatMessage(Message mess) throws IOException {
  SOWrapper wrap=getSharedObjectWrapper(sharedObjectID);
  if (wrap != null) {
    wrap.deliverEvent(new MessageEvent(mess));
  }
}
Program: 95187
Project: 95187
Buggy source:
public void handleRosterEntry(ID groupID,IRosterEntry entry){
  if (entry == null)   return;
  ViewContentProvider vcp=(ViewContentProvider)viewer.getContentProvider();
  if (vcp != null) {
    if (entry.getInterestType() == IRosterEntry.InterestType.REMOVE || entry.getInterestType() == IRosterEntry.InterestType.NONE) {
      vcp.removeRosterEntry(entry.getUserID());
    }
 else     vcp.addEntry(entry);
    refreshView();
  }
}

Fixed version (ground truth):
public void handleRosterEntry(ID groupID,IRosterEntry entry){
  System.out.println("String_Node_Str" + groupID + "String_Node_Str"+ entry+ "String_Node_Str");
  if (entry == null)   return;
  ViewContentProvider vcp=(ViewContentProvider)viewer.getContentProvider();
  if (vcp != null) {
    if (entry.getInterestType() == IRosterEntry.InterestType.REMOVE || entry.getInterestType() == IRosterEntry.InterestType.NONE) {
      vcp.removeRosterEntry(entry.getUserID());
    }
 else     vcp.addEntry(entry);
    refreshView();
  }
}
Program: 95188
Project: 95188
Buggy source:
public void handlePresence(ID groupID,ID userID,IPresence presence){
  IRosterEntry entry=new RosterEntry(groupID,userID,null,presence);
  handleRosterEntry(groupID,entry);
}

Fixed version (ground truth):
public void handlePresence(ID groupID,ID userID,IPresence presence){
  System.out.println("String_Node_Str" + groupID + "String_Node_Str"+ userID+ "String_Node_Str"+ presence+ "String_Node_Str");
  IRosterEntry entry=new RosterEntry(groupID,userID,null,presence);
  handleRosterEntry(groupID,entry);
}