nus-yam/ex-repair huggingface dataset:
Program: 95189
Project: 95189
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];
      for (int i=0; i < chatRooms.length; i++) {
        res[i]=getChatRoomInfo(chatRooms[i]);
      }
      return res;
    }
  }
;
}

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;
      }
      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: 95191
Project: 95191
Buggy source:
public IRoomInfo[] getChatRoomsInfo(){
  ID[] chatRooms=getChatRooms();
  if (chatRooms == null)   return null;
  IRoomInfo[] res=new IRoomInfo[chatRooms.length];
  for (int i=0; i < chatRooms.length; i++) {
    res[i]=getChatRoomInfo(chatRooms[i]);
  }
  return res;
}

Fixed version (ground truth):
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: 95192
Project: 95192
Buggy source:
protected String fixHostname(String host,String domain){
  String subHost=host;
  int dotIndex=host.indexOf('.');
  if (dotIndex > 0)   subHost=host.substring(0,dotIndex);
  if (domain == null)   domain=DOMAIN_DEFAULT;
  return domain + "String_Node_Str" + subHost;
}

Fixed version (ground truth):
protected String fixHostname(String host,String domain){
  if (domain == null)   domain=DOMAIN_DEFAULT;
  return domain + "String_Node_Str" + host;
}
Program: 95193
Project: 95193
Buggy source:
public void run(){
  Thread me=Thread.currentThread();
  try {
    Thread.sleep(pingStartWait);
  }
 catch (  InterruptedException e) {
    return;
  }
  while (!queue.isStopped()) {
    try {
      if (me.isInterrupted())       break;
      Thread.sleep(keepAlive / 2);
      if (me.isInterrupted())       break;
synchronized (outputStream) {
        if (System.currentTimeMillis() >= nextPingTime) {
          waitForPing=true;
          sendIt(ping);
          if (waitForPing) {
            try {
              outputStream.wait(keepAlive / 2);
            }
 catch (            InterruptedException e) {
            }
          }
          if (waitForPing) {
            throw new IOException(getAddressPort() + "String_Node_Str");
          }
        }
      }
    }
 catch (    Exception e) {
      if (isClosing) {
        dumpStack("String_Node_Str",e);
synchronized (Client.this) {
          Client.this.notifyAll();
        }
      }
 else {
        dumpStack("String_Node_Str",e);
        if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
          handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
        }
      }
      break;
    }
  }
  trace("String_Node_Str");
}

Fixed version (ground truth):
public void run(){
  Thread me=Thread.currentThread();
  try {
    Thread.sleep(pingStartWait);
  }
 catch (  InterruptedException e) {
    return;
  }
  while (!queue.isStopped()) {
    try {
      if (me.isInterrupted())       break;
      Thread.sleep(keepAlive / 2);
      if (me.isInterrupted())       break;
synchronized (pingLock) {
        if (System.currentTimeMillis() >= nextPingTime) {
          waitForPing=true;
          sendIt(ping);
          if (waitForPing) {
            try {
              pingLock.wait(keepAlive / 2);
            }
 catch (            InterruptedException e) {
              dumpStack("String_Node_Str",e);
              return;
            }
          }
          if (waitForPing) {
            throw new IOException(getAddressPort() + "String_Node_Str");
          }
        }
      }
    }
 catch (    Exception e) {
      if (isClosing) {
        dumpStack("String_Node_Str",e);
synchronized (Client.this) {
          Client.this.notifyAll();
        }
      }
 else {
        dumpStack("String_Node_Str",e);
        if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
          handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
        }
      }
      break;
    }
  }
  trace("String_Node_Str");
}
Program: 95194
Project: 95194
Buggy source:
private void receiveResp(){
synchronized (outputStream) {
    waitForPing=false;
    nextPingTime=System.currentTimeMillis() + (keepAlive / 2);
    outputStream.notifyAll();
  }
}

Fixed version (ground truth):
private void receiveResp(){
synchronized (pingLock) {
    waitForPing=false;
    nextPingTime=System.currentTimeMillis() + (keepAlive / 2);
  }
}
Program: 95196
Project: 95196
Buggy source:
private void sendIt(Serializable snd) throws IOException {
  trace("String_Node_Str" + snd + "String_Node_Str");
synchronized (outputStream) {
    outputStream.writeObject(snd);
    outputStream.flush();
    nextPingTime=System.currentTimeMillis() + (keepAlive / 2);
  }
}

Fixed version (ground truth):
private void sendIt(Serializable snd) throws IOException {
  trace("String_Node_Str" + snd + "String_Node_Str");
  nextPingTime=System.currentTimeMillis() + (keepAlive / 2);
  outputStream.writeObject(snd);
  outputStream.flush();
}
Program: 95197
Project: 95197
Buggy source:
private Thread getSendThread(){
  Thread aThread=new Thread(new Runnable(){
    public void run(){
      int msgCount=0;
      Thread me=Thread.currentThread();
      for (; ; ) {
        if (me.isInterrupted())         break;
        Serializable aMsg=(Serializable)queue.peekQueue();
        if (me.isInterrupted() || aMsg == null)         break;
        try {
          trace("String_Node_Str" + aMsg);
          sendIt(aMsg);
          queue.removeHead();
          if (msgCount > maxMsg) {
synchronized (outputStream) {
              outputStream.reset();
            }
            msgCount=0;
          }
 else           msgCount++;
        }
 catch (        IOException e) {
          if (isClosing) {
            dumpStack("String_Node_Str",e);
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            dumpStack("String_Node_Str",e);
            if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      trace("String_Node_Str");
    }
  }
,getLocalID() + "String_Node_Str" + getAddressPort());
  aThread.setPriority(SNDR_PRIORITY);
  return aThread;
}

Fixed version (ground truth):
private Thread getSendThread(){
  Thread aThread=new Thread(new Runnable(){
    public void run(){
      int msgCount=0;
      Thread me=Thread.currentThread();
      for (; ; ) {
        if (me.isInterrupted())         break;
        Serializable aMsg=(Serializable)queue.peekQueue();
        if (me.isInterrupted() || aMsg == null)         break;
        try {
          sendIt(aMsg);
          queue.removeHead();
          if (msgCount > maxMsg) {
            outputStream.reset();
            msgCount=0;
          }
 else           msgCount++;
        }
 catch (        IOException e) {
          if (isClosing) {
            dumpStack("String_Node_Str",e);
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            dumpStack("String_Node_Str",e);
            if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      trace("String_Node_Str");
    }
  }
,getLocalID() + "String_Node_Str" + getAddressPort());
  aThread.setPriority(SNDR_PRIORITY);
  return aThread;
}
Program: 95198
Project: 95198
Buggy source:
public synchronized Object connect(ID remote,Object data,int timeout) throws IOException {
  trace("String_Node_Str" + remote + "String_Node_Str"+ data+ "String_Node_Str"+ timeout+ "String_Node_Str");
  if (socket != null)   throw new ConnectException("String_Node_Str" + getAddressPort());
  URI anURI=null;
  try {
    anURI=remote.toURI();
  }
 catch (  URISyntaxException e) {
    throw new IOException("String_Node_Str");
  }
  SocketFactory fact=SocketFactory.getSocketFactory();
  if (fact == null) {
    fact=SocketFactory.getDefaultSocketFactory();
  }
  Socket s=fact.createSocket(anURI.getHost(),anURI.getPort(),timeout);
  setSocket(s);
  outputStream=new ExObjectOutputStream(new BufferedOutputStream(s.getOutputStream()),false);
  outputStream.flush();
  inputStream=new ExObjectInputStream(s.getInputStream(),false);
  trace("String_Node_Str" + anURI);
  sendIt(new ConnectRequestMessage(anURI,(Serializable)data));
  ConnectResultMessage res=null;
  res=(ConnectResultMessage)readObject();
  trace("String_Node_Str" + res);
  setupThreads();
  Object ret=res.getData();
  trace("String_Node_Str" + ret);
  return ret;
}

Fixed version (ground truth):
public synchronized Object connect(ID remote,Object data,int timeout) throws IOException {
  trace("String_Node_Str" + remote + "String_Node_Str"+ data+ "String_Node_Str"+ timeout+ "String_Node_Str");
  if (socket != null)   throw new ConnectException("String_Node_Str" + getAddressPort());
  URI anURI=null;
  try {
    anURI=remote.toURI();
  }
 catch (  URISyntaxException e) {
    IOException except=new IOException("String_Node_Str" + remote);
    except.setStackTrace(e.getStackTrace());
    throw except;
  }
  SocketFactory fact=SocketFactory.getSocketFactory();
  if (fact == null) {
    fact=SocketFactory.getDefaultSocketFactory();
  }
  Socket s=fact.createSocket(anURI.getHost(),anURI.getPort(),timeout);
  setSocket(s);
  outputStream=new ExObjectOutputStream(new BufferedOutputStream(s.getOutputStream()),false);
  outputStream.flush();
  inputStream=new ExObjectInputStream(s.getInputStream(),false);
  trace("String_Node_Str" + anURI);
  sendIt(new ConnectRequestMessage(anURI,(Serializable)data));
  ConnectResultMessage res=null;
  res=(ConnectResultMessage)readObject();
  trace("String_Node_Str" + res);
  setupThreads();
  Object ret=res.getData();
  trace("String_Node_Str" + ret);
  return ret;
}
Program: 95199
Project: 95199
Buggy source:
public synchronized ID getLocalID(){
  if (containerID != null)   return containerID;
  if (socket == null)   return null;
  ID retID=null;
  try {
    retID=IDFactory.getDefault().makeStringID(PROTOCOL + "String_Node_Str" + socket.getLocalAddress().getHostName()+ "String_Node_Str"+ socket.getLocalPort());
  }
 catch (  Exception e) {
    return null;
  }
  return retID;
}

Fixed version (ground truth):
public synchronized ID getLocalID(){
  if (containerID != null)   return containerID;
  if (socket == null)   return null;
  ID retID=null;
  try {
    retID=IDFactory.getDefault().makeStringID(PROTOCOL + "String_Node_Str" + socket.getLocalAddress().getHostName()+ "String_Node_Str"+ socket.getLocalPort());
  }
 catch (  Exception e) {
    dumpStack("String_Node_Str",e);
    return null;
  }
  return retID;
}
Program: 95200
Project: 95200
Buggy source:
private Serializable readObject() throws IOException {
  Serializable ret=null;
  try {
    ret=(Serializable)inputStream.readObject();
  }
 catch (  ClassNotFoundException e) {
    dumpStack("String_Node_Str",e);
    throw new IOException("String_Node_Str" + e.getMessage());
  }
  return ret;
}

Fixed version (ground truth):
private Serializable readObject() throws IOException {
  Serializable ret=null;
  try {
    ret=(Serializable)inputStream.readObject();
  }
 catch (  ClassNotFoundException e) {
    dumpStack("String_Node_Str",e);
    IOException except=new IOException("String_Node_Str" + e.getMessage());
    except.setStackTrace(e.getStackTrace());
    throw except;
  }
  return ret;
}
Program: 95201
Project: 95201
Buggy source:
protected void processAsynch(AsynchConnectionEvent e){
  try {
    Object obj=e.getData();
    if (obj == null) {
      debug("String_Node_Str" + e);
      return;
    }
    if (!(obj instanceof byte[])) {
      debug("String_Node_Str" + e);
    }
    ContainerMessage mess=validateContainerMessage(deserializeContainerMessage((byte[])obj));
    if (mess == null) {
      return;
    }
    Serializable submess=mess.getData();
    if (submess != null) {
      if (submess instanceof ContainerMessage.CreateMessage) {
        handleCreateMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.CreateResponseMessage) {
        handleCreateResponseMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.SharedObjectDisposeMessage) {
        handleSharedObjectDisposeMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.SharedObjectMessage) {
        handleSharedObjectMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.ViewChangeMessage) {
        handleViewChangeMessage(mess);
      }
 else {
        handleUnidentifiedMessage(mess);
      }
    }
 else {
      handleUnidentifiedMessage(mess);
    }
  }
 catch (  IOException except) {
    handleAsynchIOException(except,e);
  }
}

Fixed version (ground truth):
protected void processAsynch(AsynchConnectionEvent e){
  try {
    Object obj=e.getData();
    if (obj == null) {
      System.out.println("String_Node_Str" + e);
      debug("String_Node_Str" + e);
      return;
    }
    if (!(obj instanceof byte[])) {
      debug("String_Node_Str" + e);
      System.out.println("String_Node_Str" + e);
      return;
    }
    ContainerMessage mess=validateContainerMessage(deserializeContainerMessage((byte[])obj));
    if (mess == null) {
      System.out.println("String_Node_Str" + e);
      return;
    }
    Serializable submess=mess.getData();
    if (submess != null) {
      if (submess instanceof ContainerMessage.CreateMessage) {
        handleCreateMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.CreateResponseMessage) {
        handleCreateResponseMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.SharedObjectDisposeMessage) {
        handleSharedObjectDisposeMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.SharedObjectMessage) {
        handleSharedObjectMessage(mess);
      }
 else       if (submess instanceof ContainerMessage.ViewChangeMessage) {
        handleViewChangeMessage(mess);
      }
 else {
        handleUnidentifiedMessage(mess);
      }
    }
 else {
      handleUnidentifiedMessage(mess);
    }
  }
 catch (  IOException except) {
    handleAsynchIOException(except,e);
  }
}
Program: 95202
Project: 95202
Buggy source:
protected void forwardExcluding(ID from,ID excluding,ContainerMessage data) throws IOException {
  if (excluding == null) {
    queueContainerMessage(new ContainerMessage(from,null,getNextSequenceNumber(),data.getData()));
  }
 else {
    Object ms[]=groupManager.getMembers();
    for (int i=0; i < ms.length; i++) {
      Member m=(Member)ms[i];
      ID oldID=m.getID();
      if (!excluding.equals(oldID) && !from.equals(oldID)) {
        IAsynchConnection conn=(IAsynchConnection)m.getData();
        if (conn != null) {
          try {
            conn.sendAsynch(oldID,serializeObject(new ContainerMessage(from,oldID,getNextSequenceNumber(),data.getData())));
          }
 catch (          IOException e) {
            logException("String_Node_Str" + from + "String_Node_Str"+ oldID,e);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void forwardExcluding(ID from,ID excluding,ContainerMessage data) throws IOException {
  if (excluding == null) {
    queueContainerMessage(new ContainerMessage(from,null,getNextSequenceNumber(),data.getData()));
  }
 else {
    Object ms[]=groupManager.getMembers();
    for (int i=0; i < ms.length; i++) {
      Member m=(Member)ms[i];
      ID oldID=m.getID();
      if (!excluding.equals(oldID) && !from.equals(oldID)) {
        IAsynchConnection conn=(IAsynchConnection)m.getData();
        if (conn != null) {
          try {
            conn.sendAsynch(oldID,serializeObject(new ContainerMessage(from,oldID,getNextSequenceNumber(),data.getData())));
          }
 catch (          IOException e) {
            logException("String_Node_Str" + from + "String_Node_Str"+ oldID,e);
            e.printStackTrace();
          }
        }
      }
    }
  }
}
Program: 95203
Project: 95203
Buggy source:
protected void handleJoined(ISharedObjectContainerJoinedEvent event){
  if (isPrimary()) {
synchronized (lock) {
      ID newMember=event.getJoinedContainerID();
      getSharedObject().replicate(newMember);
      if (getTransactionState() == ISharedObjectContainerTransaction.VOTING)       addParticipants(new ID[]{newMember});
 else       getSharedObject().replicate(newMember);
    }
  }
 else {
  }
}

Fixed version (ground truth):
protected void handleJoined(ISharedObjectContainerJoinedEvent event){
  if (isPrimary()) {
synchronized (lock) {
      ID newMember=event.getJoinedContainerID();
      getSharedObject().replicate(newMember);
      if (getTransactionState() == ISharedObjectContainerTransaction.VOTING)       addParticipants(new ID[]{newMember});
    }
  }
 else {
  }
}
Program: 95204
Project: 95204
Buggy source:
protected void handleSharedObjectMessage(ContainerMessage mess) throws IOException {
  debug("String_Node_Str" + mess);
  ID fromID=mess.getFromContainerID();
  ID toID=mess.getToContainerID();
  long seq=mess.getSequence();
  ContainerMessage.SharedObjectMessage resp=(ContainerMessage.SharedObjectMessage)mess.getData();
  byte[] databytes=(byte[])resp.getData();
  Serializable obj=null;
  try {
    obj=(Serializable)deserializeSharedObjectMessage(databytes);
  }
 catch (  ClassNotFoundException e) {
    dumpStack("String_Node_Str",e);
    e.printStackTrace(System.err);
  }
synchronized (getGroupMembershipLock()) {
    if (toID == null || toID.equals(getID())) {
      SOWrapper sow=getSharedObjectWrapper(resp.getFromSharedObjectID());
      if (sow != null) {
        sow.deliverSharedObjectMessage(fromID,obj);
      }
    }
    forward(fromID,toID,mess);
  }
}

Fixed version (ground truth):
protected void handleSharedObjectMessage(ContainerMessage mess) throws IOException {
  debug("String_Node_Str" + mess);
  ID fromID=mess.getFromContainerID();
  ID toID=mess.getToContainerID();
  ContainerMessage.SharedObjectMessage resp=(ContainerMessage.SharedObjectMessage)mess.getData();
synchronized (getGroupMembershipLock()) {
    if (toID == null || toID.equals(getID())) {
      SOWrapper sow=getSharedObjectWrapper(resp.getFromSharedObjectID());
      if (sow != null) {
        try {
          sow.deliverSharedObjectMessage(fromID,(Serializable)deserializeSharedObjectMessage((byte[])resp.getData()));
        }
 catch (        ClassNotFoundException e) {
          dumpStack("String_Node_Str",e);
          e.printStackTrace(System.err);
        }
      }
    }
    forward(fromID,toID,mess);
  }
}
Program: 95205
Project: 95205
Buggy source:
protected void handleSharedObjectMessage(ContainerMessage mess) throws IOException {
  debug("String_Node_Str" + mess);
  ID fromID=mess.getFromContainerID();
  ID toID=mess.getToContainerID();
  long seq=mess.getSequence();
  ContainerMessage.SharedObjectMessage resp=(ContainerMessage.SharedObjectMessage)mess.getData();
  byte[] databytes=(byte[])resp.getData();
  Serializable obj=null;
  try {
    obj=(Serializable)deserializeSharedObjectMessage(databytes);
  }
 catch (  ClassNotFoundException e) {
    dumpStack("String_Node_Str",e);
    e.printStackTrace(System.err);
  }
synchronized (getGroupMembershipLock()) {
    SOWrapper sow=getSharedObjectWrapper(resp.getFromSharedObjectID());
    if (sow != null) {
      sow.deliverSharedObjectMessage(fromID,obj);
    }
    forward(fromID,toID,mess);
  }
}

Fixed version (ground truth):
protected void handleSharedObjectMessage(ContainerMessage mess) throws IOException {
  debug("String_Node_Str" + mess);
  ID fromID=mess.getFromContainerID();
  ID toID=mess.getToContainerID();
  long seq=mess.getSequence();
  ContainerMessage.SharedObjectMessage resp=(ContainerMessage.SharedObjectMessage)mess.getData();
  byte[] databytes=(byte[])resp.getData();
  Serializable obj=null;
  try {
    obj=(Serializable)deserializeSharedObjectMessage(databytes);
  }
 catch (  ClassNotFoundException e) {
    dumpStack("String_Node_Str",e);
    e.printStackTrace(System.err);
  }
synchronized (getGroupMembershipLock()) {
    if (toID == null || toID.equals(getID())) {
      SOWrapper sow=getSharedObjectWrapper(resp.getFromSharedObjectID());
      if (sow != null) {
        sow.deliverSharedObjectMessage(fromID,obj);
      }
    }
    forward(fromID,toID,mess);
  }
}
Program: 95206
Project: 95206
Buggy source:
public void handleSubscribed(ID fromID,IPresence presence){
  System.out.println("String_Node_Str" + fromID);
}

Fixed version (ground truth):
public void handleSubscribed(ID fromID,IPresence presence){
}
Program: 95207
Project: 95207
Buggy source:
public void handleUnsubscribed(ID fromID,IPresence presence){
  System.out.println("String_Node_Str" + fromID);
}

Fixed version (ground truth):
public void handleUnsubscribed(ID fromID,IPresence presence){
}
Program: 95209
Project: 95209
Buggy source:
public void handleMessage(ID fromID,ID toID,Type type,String subject,String message);

Fixed version (ground truth):
/** 
 * Handle message from remote user
 * @param fromID the ID of the user sending the message
 * @param toID the ID of the user to receive the message
 * @param type the Type of the message
 * @param subject the subject of the message
 * @param messageBody the message body
 */
public void handleMessage(ID fromID,ID toID,Type type,String subject,String messageBody);
Program: 95210
Project: 95210
Buggy source:
public void sendMessage(ID fromID,ID toID,Type type,String subject,String message);

Fixed version (ground truth):
/** 
 * Send text message
 * @param fromID the user id of the sender.  Cannot be null
 * @param toID the user id of the target receiver of the message.  Cannot be null
 * @param type the Type of the message
 * @param subject the subject of the message
 * @param messageBody the message body
 */
public void sendMessage(ID fromID,ID toID,Type type,String subject,String messageBody);
Program: 95211
Project: 95211
Buggy source:
public void addPresenceListener(IPresenceListener listener);

Fixed version (ground truth):
/** 
 * Setup listener for handling presence updates
 * @param listener
 */
public void addPresenceListener(IPresenceListener listener);
Program: 95212
Project: 95212
Buggy source:
public void addMessageListener(IMessageListener listener);

Fixed version (ground truth):
/** 
 * Setup listener for handling IM messages
 * @param listener
 */
public void addMessageListener(IMessageListener listener);
Program: 95213
Project: 95213
Buggy source:
public IMessageSender getMessageSender();

Fixed version (ground truth):
/** 
 * Get interface for sending messages
 * @return
 */
public IMessageSender getMessageSender();
Program: 95214
Project: 95214
Buggy source:
public IPresenceSender getPresenceSender();

Fixed version (ground truth):
/** 
 * Get interface for sending presence updates
 * @return
 */
public IPresenceSender getPresenceSender();
Program: 95215
Project: 95215
Buggy source:
public IAccountManager getAccountManager();

Fixed version (ground truth):
/** 
 * Get interface for managing account
 * @return
 */
public IAccountManager getAccountManager();
Program: 95216
Project: 95216
Buggy source:
public void addSubscribeListener(ISubscribeListener listener);

Fixed version (ground truth):
/** 
 * Setup listener for handling subscription requests
 * @param listener
 */
public void addSubscribeListener(ISubscribeListener listener);
Program: 95217
Project: 95217
Buggy source:
public void handleContainerJoined(ID joinedContainer);

Fixed version (ground truth):
/** 
 * Notification that a new group member (i.e. the server) has successfully joined/connected
 * @param joinedContainer
 */
public void handleContainerJoined(ID joinedContainer);
Program: 95218
Project: 95218
Buggy source:
public void handleRosterEntry(IRosterEntry entry);

Fixed version (ground truth):
/** 
 * Notification that a roster entry has been received
 * @param entry
 */
public void handleRosterEntry(IRosterEntry entry);
Program: 95219
Project: 95219
Buggy source:
public void handlePresence(ID fromID,IPresence presence);

Fixed version (ground truth):
/** 
 * Notification that a presence update has been received
 * @param fromID
 * @param presence
 */
public void handlePresence(ID fromID,IPresence presence);
Program: 95220
Project: 95220
Buggy source:
public void handleContainerDeparted(ID departedContainer);

Fixed version (ground truth):
/** 
 * Notification that a remote container (i.e. the server) has disconnected/left group
 * @param departedContainer
 */
public void handleContainerDeparted(ID departedContainer);
Program: 95221
Project: 95221
Buggy source:
public void handleSetRosterEntry(IRosterEntry entry);

Fixed version (ground truth):
/** 
 * Notification that a roster entry has been set
 * @param entry
 */
public void handleSetRosterEntry(IRosterEntry entry);
Program: 95222
Project: 95222
Buggy source:
public void sendPresenceUpdate(ID fromID,ID toID,IPresence presence);

Fixed version (ground truth):
/** 
 * Send a presence update to a remote target user
 * @param fromID the user the update is from
 * @param toID the target user
 * @param presence the presence information
 */
public void sendPresenceUpdate(ID fromID,ID toID,IPresence presence);
Program: 95223
Project: 95223
Buggy source:
public void sendRosterAdd(ID fromID,String user,String name,String[] groups);

Fixed version (ground truth):
/** 
 * Send a roster add request (subscribe) to a remote
 * @param fromID the user the subscription request is from
 * @param user the account name of the target user
 * @param groups an array of group names that this use will belong toon the roster entry
 */
public void sendRosterAdd(ID fromID,String user,String name,String[] groups);
Program: 95224
Project: 95224
Buggy source:
public void sendRosterRemove(ID fromID,ID userID);

Fixed version (ground truth):
/** 
 * Send roster remove request (unsubscribe) to a remote
 * @param fromID the user id the request is from
 * @param userID the user id the request it intended for
 */
public void sendRosterRemove(ID fromID,ID userID);
Program: 95225
Project: 95225
Buggy source:
protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,false);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,true);
  okButton=getButton(IDialogConstants.OK_ID);
  if (okButton != null) {
    okButton.setEnabled(false);
  }
}

Fixed version (ground truth):
protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,false);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,true);
  okButton=getButton(IDialogConstants.OK_ID);
  if (okButton != null) {
    if (user != null)     okButton.setEnabled(true);
 else     okButton.setEnabled(false);
  }
}
Program: 95227
Project: 95227
Buggy source:
protected void openDialogAndSendRequest(String name,String groupName){
  String[] groupNames=this.getGroupNames();
  List g=Arrays.asList(groupNames);
  int selected=(groupName == null) ? -1 : g.indexOf(groupName);
  AddBuddyDialog sg=new AddBuddyDialog(viewer.getControl().getShell(),name,groupNames,selected);
  sg.open();
  if (sg.getResult() == Window.OK) {
    String group=sg.getGroup();
    String user=sg.getUser();
    String nickname=sg.getNickname();
    sg.close();
    if (!Arrays.asList(groupNames).contains(group)) {
      this.addGroup(group);
    }
    String[] sendGroups=new String[]{group};
    inputHandler.sendRosterAdd(user,nickname,sendGroups);
    addPendingEntry(user,nickname,group);
  }
}

Fixed version (ground truth):
protected void openDialogAndSendRequest(String name,String groupName){
  String[] groupNames=this.getGroupNames();
  List g=Arrays.asList(groupNames);
  int selected=(groupName == null) ? -1 : g.indexOf(groupName);
  AddBuddyDialog sg=new AddBuddyDialog(viewer.getControl().getShell(),name,groupNames,selected);
  sg.open();
  if (sg.getResult() == Window.OK) {
    String group=sg.getGroup();
    String user=sg.getUser();
    String nickname=sg.getNickname();
    sg.close();
    if (!Arrays.asList(groupNames).contains(group)) {
      this.addGroup(group);
    }
    String[] sendGroups=new String[]{group};
    inputHandler.sendRosterAdd(user,nickname,sendGroups);
  }
}
Program: 95228
Project: 95228
Buggy source:
protected XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  uri=new URI(PROTOCOL + "String_Node_Str" + unamehost);
}

Fixed version (ground truth):
protected XMPPID(Namespace namespace,String unamehost) throws URISyntaxException {
  super(namespace);
  unamehost=fixEscape(unamehost);
  uri=new URI(PROTOCOL + "String_Node_Str" + unamehost);
}
Program: 95229
Project: 95229
Buggy source:
public void modifyText(ModifyEvent e){
  if (usertext.getText().length() > 3 && usertext.getText().indexOf("String_Node_Str") != -1) {
    okButton.setEnabled(true);
  }
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  if (user != null || (usertext.getText().length() > 3 && usertext.getText().indexOf("String_Node_Str") != -1)) {
    okButton.setEnabled(true);
  }
 else {
    okButton.setEnabled(false);
  }
}
Program: 95231
Project: 95231
Buggy source:
protected void handleTextInput(String text){
  ChatLine line=new ChatLine(text);
  if (lch != null) {
    line.setOriginator(userdata);
  }
  appendAndScrollToBottom(line);
  teamChat.clearInput();
  if (lch != null)   lch.inputText(text);
}

Fixed version (ground truth):
protected void handleTextInput(String text){
  if (showTimestamp) {
    text=dateTime() + text;
  }
  ChatLine line=new ChatLine(text);
  if (lch != null) {
    line.setOriginator(userdata);
  }
  appendAndScrollToBottom(line);
  teamChat.clearInput();
  if (lch != null)   lch.inputText(text);
}
Program: 95233
Project: 95233
Buggy source:
public void handleSubscribeRequest(ID fromID,IPresence presence){
  System.out.println("String_Node_Str" + fromID);
  if (messageSender != null) {
    messageSender.sendPresenceUpdate(localUser,fromID,new Presence(IPresence.Type.SUBSCRIBED));
  }
}

Fixed version (ground truth):
public void handleSubscribeRequest(ID fromID,IPresence presence){
  System.out.println("String_Node_Str" + fromID);
  if (presenceSender != null) {
    presenceSender.sendPresenceUpdate(localUser,fromID,new Presence(IPresence.Type.SUBSCRIBED));
  }
}
Program: 95236
Project: 95236
Buggy source:
public void handleUnsubscribeRequest(ID fromID,IPresence presence){
  System.out.println("String_Node_Str" + fromID);
  if (presenceSender != null) {
    presenceSender.sendPresenceUpdate(localUser,fromID,new Presence(IPresence.Type.UNSUBSCRIBED));
  }
}

Fixed version (ground truth):
public void handleUnsubscribeRequest(ID fromID,IPresence presence){
  if (presenceSender != null) {
    presenceSender.sendPresenceUpdate(localUser,fromID,new Presence(IPresence.Type.UNSUBSCRIBED));
  }
}
Program: 95238
Project: 95238
Buggy source:
protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,true);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,false);
}

Fixed version (ground truth):
protected void createButtonsForButtonBar(Composite parent){
  createButton(parent,IDialogConstants.OK_ID,IDialogConstants.OK_LABEL,false);
  createButton(parent,IDialogConstants.CANCEL_ID,IDialogConstants.CANCEL_LABEL,true);
  okButton=getButton(IDialogConstants.OK_ID);
  if (okButton != null) {
    okButton.setEnabled(false);
  }
}
Program: 95242
Project: 95242
Buggy source:
public void handleUnsubscribeRequest(ID fromID,IPresence presence){
  System.out.println("String_Node_Str" + fromID);
}

Fixed version (ground truth):
public void handleUnsubscribeRequest(ID fromID,IPresence presence){
  System.out.println("String_Node_Str" + fromID);
  if (presenceSender != null) {
    presenceSender.sendPresenceUpdate(localUser,fromID,new Presence(IPresence.Type.UNSUBSCRIBED));
  }
}
Program: 95244
Project: 95244
Buggy source:
public void removeUser(ID id){
  String name=getUserData(id);
  if (name != null) {
    final String str=makeChatLine("String_Node_Str" + name + "String_Node_Str"+ LEFT_STRING);
    showText(new ChatLine(str));
  }
  myNames.remove(id);
  removeUserFromTree(id);
}

Fixed version (ground truth):
public void removeUser(ID id){
  String name=getUserData(id);
  if (name != null) {
    final String str=makeChatLine(name + "String_Node_Str" + LEFT_STRING);
    showText(new ChatLine(str));
  }
  myNames.remove(id);
  removeUserFromTree(id);
}
Program: 95245
Project: 95245
Buggy source:
protected void handleShellCloseEvent(){
  if (!getShell().isDisposed()) {
    if (!disposed) {
      chat.dispose();
      chat=null;
      getShell().dispose();
    }
 else {
      getShell().setVisible(false);
    }
  }
}

Fixed version (ground truth):
protected void handleShellCloseEvent(){
  if (!getShell().isDisposed()) {
    if (disposed) {
      chat.dispose();
      chat=null;
      getShell().dispose();
    }
 else {
      getShell().setVisible(false);
    }
  }
}
Program: 95246
Project: 95246
Buggy source:
protected int namespaceCompareTo(BaseID obj){
  String ovalue=((StringID)obj).value;
  return value.compareTo(ovalue);
}

Fixed version (ground truth):
protected int namespaceCompareTo(BaseID obj){
  return getName().compareTo(obj.getName());
}
Program: 95247
Project: 95247
Buggy source:
protected void handleKeyPressed(KeyEvent evt){
  if (evt.keyCode == SWT.CR) {
    handleEnter();
  }
}

Fixed version (ground truth):
protected void handleKeyPressed(KeyEvent evt){
  if (evt.character == SWT.CR) {
    handleEnter();
  }
}
Program: 95248
Project: 95248
Buggy source:
public synchronized static ISharedObjectContainer getContainer(IResource proj){
  ClientEntry entry=getClientEntry(proj,GENERIC_CONTAINER_CLIENT_NAME);
  if (entry != null)   return entry.getContainer();
 else   return null;
}

Fixed version (ground truth):
public synchronized static ISharedObjectContainer getContainer(IResource proj){
  ClientEntry entry=getClientEntry(proj,GENERIC_CONTAINER_CLIENT_NAME);
  if (entry == null) {
    entry=getClientEntry(ResourcesPlugin.getWorkspace().getRoot(),GENERIC_CONTAINER_CLIENT_NAME);
  }
  if (entry != null)   return entry.getContainer();
 else   return null;
}
Program: 95249
Project: 95249
Buggy source:
public void showMessage(final ID fromID,ID toID,Type type,String subject,final String message){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      if (chat != null) {
        chat.appendText(new ChatLine(message,getRemoteUser()));
      }
    }
  }
);
}

Fixed version (ground truth):
public void showMessage(final ID fromID,ID toID,Type type,String subject,final String message){
  Display.getDefault().syncExec(new Runnable(){
    public void run(){
      if (!disposed && chat != null) {
        chat.appendText(new ChatLine(message,getRemoteUser()));
      }
    }
  }
);
}
Program: 95250
Project: 95250
Buggy source:
public void run(){
  if (chat != null) {
    chat.appendText(new ChatLine(message,getRemoteUser()));
  }
}

Fixed version (ground truth):
public void run(){
  if (!disposed && chat != null) {
    chat.appendText(new ChatLine(message,getRemoteUser()));
  }
}
Program: 95251
Project: 95251
Buggy source:
protected void handleShellCloseEvent(){
  if (!getShell().isDisposed())   getShell().setVisible(false);
}

Fixed version (ground truth):
protected void handleShellCloseEvent(){
  if (!getShell().isDisposed()) {
    if (!disposed) {
      chat.dispose();
      chat=null;
      getShell().dispose();
    }
 else {
      getShell().setVisible(false);
    }
  }
}
Program: 95252
Project: 95252
Buggy source:
protected void configureShell(final Shell newShell){
  super.configureShell(newShell);
  String shellTitlePrefix=MessageLoader.getString("String_Node_Str");
  if (shellTitlePrefix != null && !shellTitlePrefix.equals("String_Node_Str")) {
    shellTitlePrefix=shellTitlePrefix + "String_Node_Str";
  }
  titleBarText=shellTitlePrefix + titleBarText;
  newShell.setText(titleBarText);
  image=ImageDescriptor.createFromURL(UiPlugin.getDefault().find(new Path(ICONS_PERSON_GIF))).createImage();
  newShell.setImage(image);
  RGB[] colors=new RGB[2];
  colors[0]=new RGB(0,0,0);
  colors[1]=new RGB(255,255,255);
  ImageData data=new ImageData(16,16,1,new PaletteData(colors));
  data.transparentPixel=0;
  blank=new Image(newShell.getDisplay(),data);
  flash=new Flash(newShell.getDisplay());
  new Thread(flash).start();
  newShell.addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      flash();
      if (image != null)       image.dispose();
      if (blank != null)       blank.dispose();
    }
  }
);
  newShell.addShellListener(new ShellAdapter(){
    public void shellActivated(    ShellEvent e){
      stopFlashing();
      if (!chat.isDisposed())       chat.textinput.setFocus();
    }
  }
);
}

Fixed version (ground truth):
protected void configureShell(final Shell newShell){
  super.configureShell(newShell);
  String shellTitlePrefix=MessageLoader.getString("String_Node_Str");
  if (shellTitlePrefix != null && !shellTitlePrefix.equals("String_Node_Str")) {
    shellTitlePrefix=shellTitlePrefix + "String_Node_Str";
  }
  titleBarText=shellTitlePrefix + titleBarText;
  newShell.setText(titleBarText);
  image=ImageDescriptor.createFromURL(UiPlugin.getDefault().find(new Path(ICONS_PERSON_GIF))).createImage();
  newShell.setImage(image);
  RGB[] colors=new RGB[2];
  colors[0]=new RGB(0,0,0);
  colors[1]=new RGB(255,255,255);
  ImageData data=new ImageData(16,16,1,new PaletteData(colors));
  data.transparentPixel=0;
  blank=new Image(newShell.getDisplay(),data);
  flash=new Flash(newShell.getDisplay());
  flashThread=new Thread(flash);
  flashThread.start();
  newShell.addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      flash();
      if (image != null)       image.dispose();
      if (blank != null)       blank.dispose();
    }
  }
);
  newShell.addShellListener(new ShellAdapter(){
    public void shellActivated(    ShellEvent e){
      stopFlashing();
      if (!chat.isDisposed())       chat.textinput.setFocus();
    }
  }
);
}
Program: 95253
Project: 95253
Buggy source:
public void run(){
  showMessage("String_Node_Str");
}

Fixed version (ground truth):
public void run(){
  if (textInputHandler != null) {
    textInputHandler.disconnect();
    chatAction.setEnabled(false);
    this.setEnabled(false);
  }
}
Program: 95254
Project: 95254
Buggy source:
public Object getAdapter(Class clazz){
  if (clazz != null && clazz.equals(ITextInputHandler.class)) {
    return new ITextInputHandler(){
      public void handleTextLine(      ID userID,      String text){
        if (textInputHandler != null) {
          textInputHandler.handleTextLine(userID,text);
        }
 else         System.out.println("String_Node_Str" + text + "String_Node_Str");
      }
      public void handleStartTyping(      ID userID){
        if (textInputHandler != null) {
          textInputHandler.handleStartTyping(userID);
        }
 else         System.out.println("String_Node_Str");
      }
    }
;
  }
 else   if (clazz.equals(ILocalUserSettable.class)) {
    return this;
  }
 else   if (clazz.equals(IRosterViewer.class)) {
    return this;
  }
 else   if (clazz.equals(IMessageViewer.class)) {
    return this;
  }
 else   if (clazz.equals(IPresenceViewer.class)) {
    return this;
  }
 else   return null;
}

Fixed version (ground truth):
public Object getAdapter(Class clazz){
  if (clazz != null && clazz.equals(ITextInputHandler.class)) {
    return new ITextInputHandler(){
      public void handleTextLine(      ID userID,      String text){
        if (textInputHandler != null) {
          textInputHandler.handleTextLine(userID,text);
        }
 else         System.out.println("String_Node_Str" + text + "String_Node_Str");
      }
      public void handleStartTyping(      ID userID){
        if (textInputHandler != null) {
          textInputHandler.handleStartTyping(userID);
        }
 else         System.out.println("String_Node_Str");
      }
      public void disconnect(){
        if (textInputHandler != null) {
          textInputHandler.disconnect();
        }
 else         System.out.println("String_Node_Str");
      }
    }
;
  }
 else   if (clazz.equals(ILocalUserSettable.class)) {
    return this;
  }
 else   if (clazz.equals(IRosterViewer.class)) {
    return this;
  }
 else   if (clazz.equals(IMessageViewer.class)) {
    return this;
  }
 else   if (clazz.equals(IPresenceViewer.class)) {
    return this;
  }
 else   return null;
}
Program: 95255
Project: 95255
Buggy source:
public void setGroup(ID groupManager){
  groupID=groupManager;
}

Fixed version (ground truth):
public void setGroup(ID groupManager){
  if (groupManager != null) {
    groupID=groupManager;
    disconnectAction.setEnabled(true);
    chatAction.setEnabled(true);
  }
}
Program: 95256
Project: 95256
Buggy source:
private void makeActions(){
  chatAction=new Action(){
    public void run(){
      ID targetID=inputIMTarget();
      if (targetID != null)       openChatWindowForTarget(targetID);
    }
  }
;
  chatAction.setText("String_Node_Str");
  chatAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
  selectedDoubleClickAction=new Action(){
    public void run(){
      TreeObject treeObject=getSelectedTreeObject();
      final ID targetID=treeObject.getUserID();
      if (targetID != null)       openChatWindowForTarget(targetID);
    }
  }
;
  disconnectAction=new Action(){
    public void run(){
      showMessage("String_Node_Str");
    }
  }
;
  disconnectAction.setText("String_Node_Str");
  disconnectAction.setToolTipText("String_Node_Str");
}

Fixed version (ground truth):
private void makeActions(){
  chatAction=new Action(){
    public void run(){
      ID targetID=inputIMTarget();
      if (targetID != null)       openChatWindowForTarget(targetID);
    }
  }
;
  chatAction.setText("String_Node_Str");
  chatAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
  chatAction.setEnabled(false);
  selectedDoubleClickAction=new Action(){
    public void run(){
      TreeObject treeObject=getSelectedTreeObject();
      final ID targetID=treeObject.getUserID();
      if (targetID != null)       openChatWindowForTarget(targetID);
    }
  }
;
  disconnectAction=new Action(){
    public void run(){
      if (textInputHandler != null) {
        textInputHandler.disconnect();
        chatAction.setEnabled(false);
        this.setEnabled(false);
      }
    }
  }
;
  disconnectAction.setText("String_Node_Str");
  disconnectAction.setToolTipText("String_Node_Str" + ((groupID == null) ? "String_Node_Str" : groupID.getName()));
  disconnectAction.setEnabled(false);
}
Program: 95257
Project: 95257
Buggy source:
private void fillLocalToolBar(IToolBarManager manager){
  manager.add(chatAction);
  manager.add(new Separator());
}

Fixed version (ground truth):
private void fillLocalToolBar(IToolBarManager manager){
  manager.add(chatAction);
  manager.add(new Separator());
  manager.add(disconnectAction);
}
Program: 95258
Project: 95258
Buggy source:
protected void handleGroupManagerDeparted(){
}

Fixed version (ground truth):
protected void handleGroupManagerDeparted(){
  removeAllRosterEntries();
  disposeAllChatWindows("String_Node_Str");
  chatAction.setEnabled(false);
  disconnectAction.setEnabled(false);
}
Program: 95259
Project: 95259
Buggy source:
private void makeActions(){
  chatAction=new Action(){
    public void run(){
      TreeObject treeObject=getSelectedTreeObject();
      if (treeObject != null)       openChatWindowForTarget(treeObject.getUserID());
    }
  }
;
  chatAction.setText("String_Node_Str");
  chatAction.setToolTipText("String_Node_Str");
  chatAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
  selectedDoubleClickAction=new Action(){
    public void run(){
      chatAction.run();
    }
  }
;
  disconnectAction=new Action(){
    public void run(){
      showMessage("String_Node_Str");
    }
  }
;
  disconnectAction.setText("String_Node_Str");
  disconnectAction.setToolTipText("String_Node_Str");
}

Fixed version (ground truth):
private void makeActions(){
  chatAction=new Action(){
    public void run(){
      TreeObject treeObject=getSelectedTreeObject();
      if (treeObject != null)       openChatWindowForTarget(treeObject.getUserID());
 else {
      }
    }
  }
;
  chatAction.setText("String_Node_Str");
  chatAction.setToolTipText("String_Node_Str");
  chatAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
  selectedDoubleClickAction=new Action(){
    public void run(){
      chatAction.run();
    }
  }
;
  disconnectAction=new Action(){
    public void run(){
      showMessage("String_Node_Str");
    }
  }
;
  disconnectAction.setText("String_Node_Str");
  disconnectAction.setToolTipText("String_Node_Str");
}