nus-yam/ex-repair huggingface dataset:
Program: 95260
Project: 95260
Buggy source:
public void handleAccept(Socket aSocket) throws Exception {
  ObjectOutputStream oStream=new ExObjectOutputStream(new BufferedOutputStream(aSocket.getOutputStream()));
  oStream.flush();
  ObjectInputStream iStream=new ExObjectInputStream(aSocket.getInputStream());
  ConnectRequestMessage req=(ConnectRequestMessage)iStream.readObject();
  if (Trace.ON && debug != null) {
    debug.msg("String_Node_Str" + req);
  }
  if (req == null)   throw new InvalidObjectException(INVALID_CONNECT + "String_Node_Str");
  URI uri=req.getTarget();
  if (uri == null)   throw new InvalidObjectException(INVALID_CONNECT + "String_Node_Str");
  String path=uri.getPath();
  if (path == null)   throw new InvalidObjectException(INVALID_CONNECT + "String_Node_Str");
  TCPServerSOContainer srs=(TCPServerSOContainer)get(path);
  debug("String_Node_Str" + srs.getID().getName() + "String_Node_Str"+ uri);
  if (srs == null)   throw new InvalidObjectException("String_Node_Str" + path + "String_Node_Str");
  Client newClient=new Client(aSocket,iStream,oStream,srs.getReceiver(),srs.keepAlive);
synchronized (newClient) {
    Serializable resp=(Serializable)((ConnectionRequestHandler)srs).checkConnect(aSocket,path,req.getData(),newClient);
    oStream.writeObject(new ConnectResultMessage(resp));
    oStream.flush();
  }
}

Fixed version (ground truth):
public void handleAccept(Socket aSocket) throws Exception {
  ObjectOutputStream oStream=new ExObjectOutputStream(new BufferedOutputStream(aSocket.getOutputStream()));
  oStream.flush();
  ObjectInputStream iStream=new ExObjectInputStream(aSocket.getInputStream());
  ConnectRequestMessage req=(ConnectRequestMessage)iStream.readObject();
  if (Trace.ON && debug != null) {
    debug.msg("String_Node_Str" + req);
  }
  if (req == null)   throw new InvalidObjectException(INVALID_CONNECT + "String_Node_Str");
  URI uri=req.getTarget();
  if (uri == null)   throw new InvalidObjectException(INVALID_CONNECT + "String_Node_Str");
  String path=uri.getPath();
  if (path == null)   throw new InvalidObjectException(INVALID_CONNECT + "String_Node_Str");
  TCPServerSOContainer srs=(TCPServerSOContainer)get(path);
  if (srs == null)   throw new InvalidObjectException("String_Node_Str" + path + "String_Node_Str");
  debug("String_Node_Str" + srs.getID().getName() + "String_Node_Str"+ uri);
  Client newClient=new Client(aSocket,iStream,oStream,srs.getReceiver(),srs.keepAlive);
synchronized (newClient) {
    Serializable resp=(Serializable)((ConnectionRequestHandler)srs).checkConnect(aSocket,path,req.getData(),newClient);
    oStream.writeObject(new ConnectResultMessage(resp));
    oStream.flush();
  }
}
Program: 95261
Project: 95261
Buggy source:
public void drop(DropTargetEvent event){
  if (fileTransfer.isSupportedType(event.currentDataType)) {
    String[] files=(String[])event.data;
    for (int i=0; i < files.length; i++) {
      ID target=(selectedUser == null) ? null : selectedUser.getUserID();
      File file=new File(files[i]);
      if (file.exists() && !file.isDirectory() && composite != null) {
        composite.sendFile(file.getPath(),this.view.downloaddir + file.getName(),null,target,false);
      }
    }
  }
}

Fixed version (ground truth):
public void drop(DropTargetEvent event){
  if (fileTransfer.isSupportedType(event.currentDataType)) {
    String[] files=(String[])event.data;
    for (int i=0; i < files.length; i++) {
      ID target=(selectedUser == null) ? null : selectedUser.getUserID();
      File file=new File(files[i]);
      if (file.exists() && !file.isDirectory() && composite != null) {
        composite.sendFile(file.getPath(),this.view.downloaddir + File.separatorChar + file.getName(),null,target,false);
      }
    }
  }
}
Program: 95262
Project: 95262
Buggy source:
public void run(){
  Thread me=Thread.currentThread();
  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(address + "String_Node_Str" + port+ "String_Node_Str");
          }
        }
      }
    }
 catch (    Exception e) {
      if (isClosing) {
        isClosing=false;
synchronized (Client.this) {
          Client.this.notifyAll();
        }
      }
 else {
        if (handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
          handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
        }
      }
      break;
    }
  }
}

Fixed version (ground truth):
public void run(){
  Thread me=Thread.currentThread();
  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(address + "String_Node_Str" + port+ "String_Node_Str");
          }
        }
      }
    }
 catch (    Exception e) {
      if (isClosing) {
        isClosing=false;
synchronized (Client.this) {
          Client.this.notifyAll();
        }
      }
 else {
        if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
          handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
        }
      }
      break;
    }
  }
}
Program: 95263
Project: 95263
Buggy source:
private Thread setupPing(){
  return new Thread(new Runnable(){
    public void run(){
      Thread me=Thread.currentThread();
      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(address + "String_Node_Str" + port+ "String_Node_Str");
              }
            }
          }
        }
 catch (        Exception e) {
          if (isClosing) {
            isClosing=false;
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            if (handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
    }
  }
,"String_Node_Str" + address + "String_Node_Str"+ port);
}

Fixed version (ground truth):
private Thread setupPing(){
  return new Thread(new Runnable(){
    public void run(){
      Thread me=Thread.currentThread();
      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(address + "String_Node_Str" + port+ "String_Node_Str");
              }
            }
          }
        }
 catch (        Exception e) {
          if (isClosing) {
            isClosing=false;
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
    }
  }
,"String_Node_Str" + address + "String_Node_Str"+ port);
}
Program: 95264
Project: 95264
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 {
          debug("String_Node_Str" + address + "String_Node_Str"+ port+ "String_Node_Str"+ aMsg);
          sendIt(aMsg);
          queue.removeHead();
          if (msgCount > maxMsg) {
synchronized (outputStream) {
              outputStream.reset();
            }
            msgCount=0;
          }
 else           msgCount++;
        }
 catch (        IOException e) {
          if (isClosing) {
            isClosing=false;
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            if (handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      debug("String_Node_Str" + address + "String_Node_Str"+ port+ "String_Node_Str");
    }
  }
,"String_Node_Str" + address + "String_Node_Str"+ port);
  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 {
          debug("String_Node_Str" + address + "String_Node_Str"+ port+ "String_Node_Str"+ aMsg);
          sendIt(aMsg);
          queue.removeHead();
          if (msgCount > maxMsg) {
synchronized (outputStream) {
              outputStream.reset();
            }
            msgCount=0;
          }
 else           msgCount++;
        }
 catch (        IOException e) {
          if (isClosing) {
            isClosing=false;
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      debug("String_Node_Str" + address + "String_Node_Str"+ port+ "String_Node_Str");
    }
  }
,"String_Node_Str" + address + "String_Node_Str"+ port);
  aThread.setPriority(SNDR_PRIORITY);
  return aThread;
}
Program: 95265
Project: 95265
Buggy source:
private Thread getRcvThread(){
  Thread aThread=new Thread(new Runnable(){
    public void run(){
      Thread me=Thread.currentThread();
      for (; ; ) {
        if (me.isInterrupted())         break;
        try {
          handleRcv(readObject());
        }
 catch (        IOException e) {
          if (isClosing) {
            isClosing=false;
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            if (handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      debug("String_Node_Str" + address + "String_Node_Str"+ port+ "String_Node_Str");
    }
  }
,"String_Node_Str" + address + "String_Node_Str"+ port);
  aThread.setPriority(RCVR_PRIORITY);
  return aThread;
}

Fixed version (ground truth):
private Thread getRcvThread(){
  Thread aThread=new Thread(new Runnable(){
    public void run(){
      Thread me=Thread.currentThread();
      for (; ; ) {
        if (me.isInterrupted())         break;
        try {
          handleRcv(readObject());
        }
 catch (        IOException e) {
          if (isClosing) {
            isClosing=false;
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      debug("String_Node_Str" + address + "String_Node_Str"+ port+ "String_Node_Str");
    }
  }
,"String_Node_Str" + address + "String_Node_Str"+ port);
  aThread.setPriority(RCVR_PRIORITY);
  return aThread;
}
Program: 95266
Project: 95266
Buggy source:
protected void processDisconnect(DisconnectConnectionEvent e){
  debug("String_Node_Str" + e);
  try {
    ContainerMessage mess=getObjectFromBytes((byte[])e.getData());
  }
 catch (  Exception except) {
    logException("String_Node_Str",except);
  }
}

Fixed version (ground truth):
protected void processDisconnect(DisconnectConnectionEvent e){
  debug("String_Node_Str" + e);
  try {
    IAsynchConnection conn=(IAsynchConnection)e.getConnection();
    if (!conn.isConnected())     return;
    ID fromID=null;
synchronized (getGroupMembershipLock()) {
      fromID=getIDForConnection(conn);
      memberLeave(fromID,conn);
    }
    if (fromID != null)     fireContainerEvent(new SharedObjectContainerDepartedEvent(getID(),fromID));
  }
 catch (  Exception except) {
    logException("String_Node_Str",except);
  }
}
Program: 95267
Project: 95267
Buggy source:
public void dispose(long waittime){
  debug("String_Node_Str" + waittime + "String_Node_Str");
  isClosing=true;
  fireContainerEvent(new SharedObjectContainerDisposeEvent(getID()));
  if (groupManager != null) {
    groupManager.removeAllMembers();
    groupManager=null;
  }
  if (sharedObjectManager != null) {
    sharedObjectManager.dispose();
    sharedObjectManager=null;
  }
  if (sharedObjectThreadGroup != null) {
    sharedObjectThreadGroup.interrupt();
    sharedObjectThreadGroup=null;
  }
  if (loadingThreadGroup != null) {
    loadingThreadGroup.interrupt();
    loadingThreadGroup=null;
  }
  if (listeners != null) {
    listeners.clear();
    listeners=null;
  }
}

Fixed version (ground truth):
public void dispose(long waittime){
  debug("String_Node_Str" + waittime + "String_Node_Str");
  isClosing=true;
  fireContainerEvent(new SharedObjectContainerDisposeEvent(getID()));
  if (groupManager != null) {
    groupManager.removeAllMembers();
  }
  if (sharedObjectManager != null) {
    sharedObjectManager.dispose();
    sharedObjectManager=null;
  }
  if (sharedObjectThreadGroup != null) {
    sharedObjectThreadGroup.interrupt();
    sharedObjectThreadGroup=null;
  }
  if (loadingThreadGroup != null) {
    loadingThreadGroup.interrupt();
    loadingThreadGroup=null;
  }
  if (listeners != null) {
    listeners.clear();
    listeners=null;
  }
}
Program: 95268
Project: 95268
Buggy source:
public void run(){
  debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
  Event evt=null;
  for (; ; ) {
    if (Thread.currentThread().isInterrupted())     break;
    evt=(Event)queue.dequeue();
    if (Thread.currentThread().isInterrupted() || evt == null)     break;
    try {
      if (evt instanceof ProcEvent) {
        SOWrapper.this.svc(((ProcEvent)evt).getEvent());
      }
 else       if (evt instanceof DisposeEvent) {
        SOWrapper.this.doDestroy();
      }
    }
 catch (    Throwable t) {
      handleRuntimeException(t);
    }
  }
  if (Thread.currentThread().isInterrupted()) {
    debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
  }
 else {
    debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void run(){
  debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
  Event evt=null;
  for (; ; ) {
    if (Thread.currentThread().isInterrupted())     break;
    evt=(Event)queue.dequeue();
    if (Thread.currentThread().isInterrupted() || evt == null)     break;
    try {
      if (evt instanceof ProcEvent) {
        SOWrapper.this.svc(((ProcEvent)evt).getEvent());
      }
 else       if (evt instanceof DisposeEvent) {
        SOWrapper.this.doDestroy();
      }
 else {
        SOWrapper.this.svc(evt);
      }
    }
 catch (    Throwable t) {
      handleRuntimeException(t);
    }
  }
  if (Thread.currentThread().isInterrupted()) {
    debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
  }
 else {
    debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
  }
}
Program: 95269
Project: 95269
Buggy source:
protected Thread getThread(){
  return container.getNewSharedObjectThread(sharedObjectID,new Runnable(){
    public void run(){
      debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
      Event evt=null;
      for (; ; ) {
        if (Thread.currentThread().isInterrupted())         break;
        evt=(Event)queue.dequeue();
        if (Thread.currentThread().isInterrupted() || evt == null)         break;
        try {
          if (evt instanceof ProcEvent) {
            SOWrapper.this.svc(((ProcEvent)evt).getEvent());
          }
 else           if (evt instanceof DisposeEvent) {
            SOWrapper.this.doDestroy();
          }
        }
 catch (        Throwable t) {
          handleRuntimeException(t);
        }
      }
      if (Thread.currentThread().isInterrupted()) {
        debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
      }
 else {
        debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
      }
    }
  }
);
}

Fixed version (ground truth):
protected Thread getThread(){
  return container.getNewSharedObjectThread(sharedObjectID,new Runnable(){
    public void run(){
      debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
      Event evt=null;
      for (; ; ) {
        if (Thread.currentThread().isInterrupted())         break;
        evt=(Event)queue.dequeue();
        if (Thread.currentThread().isInterrupted() || evt == null)         break;
        try {
          if (evt instanceof ProcEvent) {
            SOWrapper.this.svc(((ProcEvent)evt).getEvent());
          }
 else           if (evt instanceof DisposeEvent) {
            SOWrapper.this.doDestroy();
          }
 else {
            SOWrapper.this.svc(evt);
          }
        }
 catch (        Throwable t) {
          handleRuntimeException(t);
        }
      }
      if (Thread.currentThread().isInterrupted()) {
        debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
      }
 else {
        debug("String_Node_Str" + sharedObjectID + "String_Node_Str");
      }
    }
  }
);
}
Program: 95270
Project: 95270
Buggy source:
public void dispose(long timeout){
  URI aURI=null;
  try {
    aURI=new URI(getID().getName());
  }
 catch (  Exception e) {
  }
  if (aURI != null)   group.remove(aURI.getPath());
  group=null;
  super.dispose(timeout);
}

Fixed version (ground truth):
public void dispose(long timeout){
  URI aURI=null;
  try {
    aURI=new URI(getID().getName());
  }
 catch (  Exception e) {
  }
  if (aURI != null)   group.remove(aURI.getPath());
  if (isSingle) {
    group.takeOffTheAir();
  }
  group=null;
  super.dispose(timeout);
}
Program: 95271
Project: 95271
Buggy source:
protected void makeInactive(){
  this.standAloneContext.makeInactive();
  this.standAloneContext=null;
  isActive=false;
}

Fixed version (ground truth):
protected void makeInactive(){
  this.context.makeInactive();
  this.context=null;
  isActive=false;
}
Program: 95272
Project: 95272
Buggy source:
public ISharedObjectContext getContext(){
  if (isActive) {
    return null;
  }
 else   return null;
}

Fixed version (ground truth):
public ISharedObjectContext getContext(){
  if (isActive) {
    return context;
  }
 else   return null;
}
Program: 95273
Project: 95273
Buggy source:
protected void makeActive(QueueEnqueue queue){
  isActive=true;
  this.standAloneContext=new SOContext(sharedObjectID,homeContainerID,container,properties,queue);
}

Fixed version (ground truth):
protected void makeActive(QueueEnqueue queue){
  isActive=true;
  this.context=container.makeNewSharedObjectContext(this,queue);
}
Program: 95274
Project: 95274
Buggy source:
protected SOConfig makeNewSharedObjectConfig(SharedObjectDescription sd,SOContainer cont){
  ID homeID=sd.getHomeID();
  if (homeID == null)   homeID=getID();
  return new SOConfig(sd.getID(),homeID,this,sd.getProperties());
}

Fixed version (ground truth):
protected SOConfig makeNewSharedObjectConfig(SharedObjectDescription sd,ISharedObject obj){
  ID homeID=sd.getHomeID();
  if (homeID == null)   homeID=getID();
  return new SOConfig(sd.getID(),homeID,this,sd.getProperties());
}
Program: 95275
Project: 95275
Buggy source:
public SOContainer(ISharedObjectContainerConfig config){
  if (config == null)   throw new InstantiationError("String_Node_Str");
  this.config=config;
  groupManager=new SOContainerGMM(this,new Member(config.getID()));
  sharedObjectManager=new SOManager(this);
  loadingThreadGroup=getLoadingThreadGroup();
  sharedObjectThreadGroup=getSharedObjectThreadGroup();
  listeners=new Vector();
  receiver=new MessageReceiver();
  debug("String_Node_Str");
}

Fixed version (ground truth):
public SOContainer(ISharedObjectContainerConfig config){
  if (config == null)   throw new InstantiationError("String_Node_Str");
  this.config=config;
  groupManager=new SOContainerGMM(this,new Member(config.getID()));
  sharedObjectManager=new SOManager(this);
  loadingThreadGroup=makeLoadingThreadGroup();
  sharedObjectThreadGroup=getSharedObjectThreadGroup();
  listeners=new Vector();
  receiver=new MessageReceiver();
  debug("String_Node_Str");
}
Program: 95276
Project: 95276
Buggy source:
protected void handleCreateMessage(ContainerMessage mess) throws IOException {
  debug("String_Node_Str" + mess);
  SharedObjectDescription desc=(SharedObjectDescription)mess.getData();
  ID fromID=mess.getFromContainerID();
  ID toID=mess.getToContainerID();
  long seq=mess.getSequence();
  Object result=checkCreate(fromID,toID,seq,desc);
  if (result != null && (toID == null || toID.equals(getID()))) {
    LoadingSharedObject lso=new LoadingSharedObject(desc,result);
synchronized (getGroupMembershipLock()) {
      if (!addToLoading(lso)) {
        ID sharedObjectID=desc.getID();
        try {
          sendCreateResponse(fromID,sharedObjectID,new SharedObjectAddException("String_Node_Str" + sharedObjectID),desc.getIdentifier());
        }
 catch (        IOException e) {
          logException("String_Node_Str",e);
        }
      }
      forward(fromID,toID,mess);
      return;
    }
  }
synchronized (getGroupMembershipLock()) {
    forward(fromID,toID,mess);
  }
}

Fixed version (ground truth):
protected void handleCreateMessage(ContainerMessage mess) throws IOException {
  debug("String_Node_Str" + mess);
  ContainerMessage.CreateMessage create=(ContainerMessage.CreateMessage)mess.getData();
  SharedObjectDescription desc=(SharedObjectDescription)create.getData();
  ID fromID=mess.getFromContainerID();
  ID toID=mess.getToContainerID();
  long seq=mess.getSequence();
  Object result=checkCreate(fromID,toID,seq,desc);
  if (result != null) {
    LoadingSharedObject lso=new LoadingSharedObject(desc,result);
synchronized (getGroupMembershipLock()) {
      if (!addToLoading(lso)) {
        ID sharedObjectID=desc.getID();
        try {
          sendCreateResponse(fromID,sharedObjectID,new SharedObjectAddException("String_Node_Str" + sharedObjectID),desc.getIdentifier());
        }
 catch (        IOException e) {
          logException("String_Node_Str",e);
        }
      }
      forward(fromID,toID,mess);
      return;
    }
  }
synchronized (getGroupMembershipLock()) {
    forward(fromID,toID,mess);
  }
}
Program: 95277
Project: 95277
Buggy source:
protected Thread getNewSharedObjectThread(ID sharedObjectID,Runnable runnable){
  return new Thread(sharedObjectThreadGroup,runnable,getID().getName() + "String_Node_Str" + sharedObjectID.getName());
}

Fixed version (ground truth):
protected Thread getNewSharedObjectThread(ID sharedObjectID,Runnable runnable){
  return new Thread(sharedObjectThreadGroup,runnable,sharedObjectID.getName() + "String_Node_Str");
}
Program: 95278
Project: 95278
Buggy source:
protected SOWrapper makeNewSharedObjectWrapper(SharedObjectDescription sd,ISharedObject s){
  SOConfig newConfig=makeNewSharedObjectConfig(sd,this);
  return new SOWrapper(newConfig,s,this);
}

Fixed version (ground truth):
protected SOWrapper makeNewSharedObjectWrapper(SharedObjectDescription sd,ISharedObject s){
  SOConfig newConfig=makeNewSharedObjectConfig(sd,s);
  return new SOWrapper(newConfig,s,this);
}
Program: 95279
Project: 95279
Buggy source:
protected void sendMessage(ID toContainerID,ID sharedObjectID,Object message) throws IOException {
  if (message == null)   return;
  if (message instanceof Serializable)   throw new NotSerializableException(message.getClass().getName());
  sendSharedObjectMessage(toContainerID,sharedObjectID,(Serializable)message);
}

Fixed version (ground truth):
protected void sendMessage(ID toContainerID,ID sharedObjectID,Object message) throws IOException {
  if (message == null)   return;
  sendSharedObjectMessage(toContainerID,sharedObjectID,(Serializable)message);
}
Program: 95280
Project: 95280
Buggy source:
Thread getThread(){
  return new Thread(loadingThreadGroup,new Runnable(){
    public void run(){
      try {
        if (Thread.currentThread().isInterrupted() || isClosing())         throw new InterruptedException("String_Node_Str" + getID().getName());
        ISharedObject obj=load(description);
        SOConfig aConfig=makeSharedObjectConfig(description,obj);
        obj.init(aConfig);
        if (Thread.currentThread().isInterrupted() || isClosing())         throw new InterruptedException("String_Node_Str" + getID().getName());
        SOContainer.this.moveFromLoadingToActive(new SOWrapper(aConfig,obj,SOContainer.this));
      }
 catch (      Exception e) {
        SOContainer.this.removeFromLoading(getID());
        try {
          sendCreateResponse(getHomeID(),getID(),e,description.getIdentifier());
        }
 catch (        Exception e1) {
        }
      }
    }
  }
,"String_Node_Str" + getID().getName());
}

Fixed version (ground truth):
Thread getThread(){
  return new Thread(loadingThreadGroup,new Runnable(){
    public void run(){
      try {
        if (Thread.currentThread().isInterrupted() || isClosing())         throw new InterruptedException("String_Node_Str" + getID().getName());
        ISharedObject obj=load(description);
        SOConfig aConfig=makeNewSharedObjectConfig(description,obj);
        obj.init(aConfig);
        if (Thread.currentThread().isInterrupted() || isClosing())         throw new InterruptedException("String_Node_Str" + getID().getName());
        SOContainer.this.moveFromLoadingToActive(new SOWrapper(aConfig,obj,SOContainer.this));
      }
 catch (      Exception e) {
        dumpStack("String_Node_Str",e);
        SOContainer.this.removeFromLoading(getID());
        try {
          sendCreateResponse(getHomeID(),getID(),e,description.getIdentifier());
        }
 catch (        Exception e1) {
          dumpStack("String_Node_Str",e1);
        }
      }
    }
  }
,getID().getName() + "String_Node_Str");
}
Program: 95281
Project: 95281
Buggy source:
public static final ID makeStringID(String idstring) throws IDInstantiationException {
  Namespace n=new Namespace(StringID.class.getClassLoader(),StringID.STRINGID_NAME,StringID.STRINGID_INSTANTIATOR_CLASS,null);
  return makeID(n,new String[]{String.class.getName()},new Object[]{idstring});
}

Fixed version (ground truth):
public static final ID makeStringID(String idstring) throws IDInstantiationException {
  if (idstring == null)   throw new IDInstantiationException("String_Node_Str");
  Namespace n=new Namespace(StringID.class.getClassLoader(),StringID.STRINGID_NAME,StringID.STRINGID_INSTANTIATOR_CLASS,null);
  return makeID(n,new String[]{String.class.getName()},new Object[]{idstring});
}
Program: 95282
Project: 95282
Buggy source:
public static String convertStringAToString(String[] strings){
  if (strings == null)   return "String_Node_Str";
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < strings.length; i++) {
    sb.append(strings[i]);
    if (i != (strings.length - 1))     sb.append("String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
public static String convertStringAToString(String[] strings){
  if (strings == null)   return "String_Node_Str";
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < strings.length; i++) {
    if (strings[i] == null)     sb.append("String_Node_Str");
 else     sb.append(strings[i]);
    if (i != (strings.length - 1))     sb.append("String_Node_Str");
  }
  return sb.toString();
}
Program: 95283
Project: 95283
Buggy source:
public static String convertObjectAToString(Object[] objs){
  if (objs == null)   return "String_Node_Str";
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < objs.length; i++) {
    sb.append(objs[i].toString());
    if (i != (objs.length - 1))     sb.append("String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
public static String convertObjectAToString(Object[] objs){
  if (objs == null)   return "String_Node_Str";
  StringBuffer sb=new StringBuffer();
  for (int i=0; i < objs.length; i++) {
    if (objs[i] == null)     sb.append("String_Node_Str");
 else     sb.append(objs[i].toString());
    if (i != (objs.length - 1))     sb.append("String_Node_Str");
  }
  return sb.toString();
}
Program: 95284
Project: 95284
Buggy source:
public final static Namespace getNamespaceByName(String name) throws SecurityException {
  debug("String_Node_Str" + name + "String_Node_Str");
  Namespace ns=new Namespace(null,name,null,null);
  return getNamespace(ns);
}

Fixed version (ground truth):
public final static Namespace getNamespaceByName(String name) throws SecurityException {
  debug("String_Node_Str" + name + "String_Node_Str");
  Namespace ns=new Namespace(null,name,name,null);
  return getNamespace(ns);
}
Program: 95285
Project: 95285
Buggy source:
protected boolean namespaceEquals(BaseID o){
  if (!(o instanceof LongID))   return false;
  LongID obj=(LongID)o;
  return value.equals(obj);
}

Fixed version (ground truth):
protected boolean namespaceEquals(BaseID o){
  if (!(o instanceof LongID))   return false;
  LongID obj=(LongID)o;
  return value.equals(obj.value);
}
Program: 95287
Project: 95287
Buggy source:
public static Map<Integer,Set<String>> of(String resource){
  Map<Integer,Set<String>> resourceItemsLengthMap=new HashMap<Integer,Set<String>>();
  Scanner sc=new Scanner(ResourceLoader.class.getResourceAsStream(File.separator + resource),"String_Node_Str");
  while (sc.hasNext()) {
    String element=sc.next();
    if (!resourceItemsLengthMap.containsKey(element.length())) {
      resourceItemsLengthMap.put(element.length(),new HashSet<String>());
    }
    resourceItemsLengthMap.get(element.length()).add(element);
  }
  return resourceItemsLengthMap;
}

Fixed version (ground truth):
public static Map<Integer,Set<String>> of(String resource){
  Map<Integer,Set<String>> resourceItemsLengthMap=new HashMap<Integer,Set<String>>();
  Scanner sc=new Scanner(ResourceLoader.class.getResourceAsStream("String_Node_Str" + resource),"String_Node_Str");
  while (sc.hasNext()) {
    String element=sc.next();
    if (!resourceItemsLengthMap.containsKey(element.length())) {
      resourceItemsLengthMap.put(element.length(),new HashSet<String>());
    }
    resourceItemsLengthMap.get(element.length()).add(element);
  }
  return resourceItemsLengthMap;
}
Program: 95288
Project: 95288
Buggy source:
/** 
 * @param units the units
 * @param value the value
 */
private void setValueProgrammatically(String units,double value){
  double absValue;
  Slider slider=getRealComponent();
  if (units.equalsIgnoreCase(ValueSets.Measure.percent.rcValue())) {
    if (value < 0 || 100 < value) {
      throwInvalidValueMessage();
    }
    absValue=slider.getMin() + value * ((slider.getMax() - slider.getMin())) * 0.01;
  }
 else {
    absValue=value;
  }
  double closestPossibleValue=absValue;
  double incr=slider.getMajorTickUnit() / (slider.getMinorTickCount() + 1);
  double val=slider.getMin();
  while (val < absValue) {
    val+=incr;
  }
  final double valueToSet;
  if (!slider.snapToTicksProperty().get()) {
    valueToSet=absValue;
  }
 else {
    valueToSet=(val - absValue) <= (absValue - (val - incr)) ? val : val - incr;
  }
  EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",(Callable<Void>)() -> {
    slider.setValue(valueToSet);
    LOG.warn("String_Node_Str" + getRealComponent());
    return null;
  }
);
}

Fixed version (ground truth):
/** 
 * @param units the units
 * @param value the value
 */
private void setValueProgrammatically(String units,double value){
  double absValue;
  Slider slider=getRealComponent();
  if (units.equalsIgnoreCase(ValueSets.Measure.percent.rcValue())) {
    if (value < 0 || 100 < value) {
      throwInvalidValueMessage();
    }
    absValue=slider.getMin() + value * ((slider.getMax() - slider.getMin())) * 0.01;
  }
 else {
    absValue=value;
  }
  double closestPossibleValue=absValue;
  double incr=slider.getMajorTickUnit() / (slider.getMinorTickCount() + 1);
  double val=slider.getMin();
  while (val < absValue) {
    val+=incr;
  }
  final double valueToSet;
  if (!slider.snapToTicksProperty().get()) {
    valueToSet=absValue;
  }
 else {
    valueToSet=(val - absValue) <= (absValue - (val - incr)) ? val : val - incr;
  }
  EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",(Callable<Void>)() -> {
    slider.setValue(valueToSet);
    return null;
  }
);
}
Program: 95290
Project: 95290
Buggy source:
/** 
 * Sets -javaagent, JRE arguments and the arguments for  the AutServer as environment variables.
 * @param parameters The parameters for starting the AUT
 * @param autServerClasspath The classpath of the AUT Server
 */
protected void setEnv(Map<String,String> parameters,String autServerClasspath){
  String env=parameters.get(AutConfigConstants.ENVIRONMENT);
  if (env == null) {
    env=StringConstants.EMPTY;
  }
 else {
    env+=ENV_SEPARATOR;
  }
  env+=setJavaOptions(parameters);
  if (isRunningFromExecutable(parameters)) {
    String serverPort="String_Node_Str";
    final Communicator autCommunicator=AutStarter.getInstance().getAutCommunicator();
    if (autCommunicator != null) {
      serverPort=String.valueOf(autCommunicator.getLocalPort());
    }
    env+=ENV_SEPARATOR + Constants.AUT_SERVER_PORT + "String_Node_Str"+ serverPort;
    env+=ENV_SEPARATOR + Constants.AUT_SERVER_CLASSPATH + "String_Node_Str"+ autServerClasspath;
    env+=ENV_SEPARATOR + Constants.AUT_SERVER_NAME + "String_Node_Str"+ getServerClassName();
    env+=ENV_SEPARATOR + AutConfigConstants.AUT_AGENT_HOST + "String_Node_Str"+ parameters.get(AutConfigConstants.AUT_AGENT_HOST);
    env+=ENV_SEPARATOR + AutConfigConstants.AUT_AGENT_PORT + "String_Node_Str"+ parameters.get(AutConfigConstants.AUT_AGENT_PORT);
    env+=ENV_SEPARATOR + AutConfigConstants.AUT_NAME + "String_Node_Str"+ parameters.get(AutConfigConstants.AUT_NAME);
  }
  parameters.put(AutConfigConstants.ENVIRONMENT,env);
}

Fixed version (ground truth):
/** 
 * Sets -javaagent, JRE arguments and the arguments for  the AutServer as environment variables.
 * @param parameters The parameters for starting the AUT
 * @param autServerClasspath The classpath of the AUT Server
 */
protected void setEnv(Map<String,String> parameters,String autServerClasspath){
  String env=parameters.get(AutConfigConstants.ENVIRONMENT);
  if (env == null) {
    env=StringConstants.EMPTY;
  }
 else {
    env+=ENV_SEPARATOR;
  }
  env+=setJavaOptions(parameters);
  if (isRunningFromExecutable(parameters)) {
    String serverPort="String_Node_Str";
    final Communicator autCommunicator=AutStarter.getInstance().getAutCommunicator();
    if (autCommunicator != null) {
      serverPort=String.valueOf(autCommunicator.getLocalPort());
    }
    env+=ENV_SEPARATOR + Constants.AUT_SERVER_PORT + "String_Node_Str"+ serverPort;
    env+=ENV_SEPARATOR + Constants.AUT_SERVER_CLASSPATH + "String_Node_Str"+ autServerClasspath;
    env+=ENV_SEPARATOR + Constants.AUT_SERVER_NAME + "String_Node_Str"+ getServerClassName();
    env+=ENV_SEPARATOR + Constants.AUT_JUB_INSTALL_DIRECTORY + "String_Node_Str"+ getInstallDir();
    env+=ENV_SEPARATOR + AutConfigConstants.AUT_AGENT_HOST + "String_Node_Str"+ parameters.get(AutConfigConstants.AUT_AGENT_HOST);
    env+=ENV_SEPARATOR + AutConfigConstants.AUT_AGENT_PORT + "String_Node_Str"+ parameters.get(AutConfigConstants.AUT_AGENT_PORT);
    env+=ENV_SEPARATOR + AutConfigConstants.AUT_NAME + "String_Node_Str"+ parameters.get(AutConfigConstants.AUT_NAME);
  }
  parameters.put(AutConfigConstants.ENVIRONMENT,env);
}
Program: 95291
Project: 95291
Buggy source:
/** 
 * @param parameters The AUT Configuration parameters.
 * @param valueSeparator The string to use to separate property names from property values.
 * @return the list of properties.
 */
private List<String> getConnectionProperties(Map<String,String> parameters,String valueSeparator){
  List<String> props=new ArrayList<String>();
  StringBuffer sb=new StringBuffer();
  sb=new StringBuffer();
  sb.append(AutConfigConstants.KEYBOARD_LAYOUT).append(valueSeparator).append(parameters.get(AutConfigConstants.KEYBOARD_LAYOUT));
  props.add(sb.toString());
  sb=new StringBuffer();
  sb.append(AutConfigConstants.AUT_AGENT_HOST).append(valueSeparator).append(parameters.get(AutConfigConstants.AUT_AGENT_HOST));
  props.add(sb.toString());
  sb=new StringBuffer();
  sb.append(AutConfigConstants.AUT_AGENT_PORT).append(valueSeparator).append(parameters.get(AutConfigConstants.AUT_AGENT_PORT));
  props.add(sb.toString());
  sb=new StringBuffer();
  sb.append(AutConfigConstants.AUT_NAME).append(valueSeparator).append(parameters.get(AutConfigConstants.AUT_NAME));
  props.add(sb.toString());
  return props;
}

Fixed version (ground truth):
/** 
 * @param parameters The AUT Configuration parameters.
 * @param valueSeparator The string to use to separate property names from property values.
 * @return the list of properties.
 */
private List<String> getConnectionProperties(Map<String,String> parameters,String valueSeparator){
  List<String> props=new ArrayList<String>();
  StringBuffer sb=new StringBuffer();
  sb=new StringBuffer();
  sb.append(AutConfigConstants.KEYBOARD_LAYOUT).append(valueSeparator).append(parameters.get(AutConfigConstants.KEYBOARD_LAYOUT));
  props.add(sb.toString());
  sb=new StringBuffer();
  sb.append(AutConfigConstants.AUT_AGENT_HOST).append(valueSeparator).append(parameters.get(AutConfigConstants.AUT_AGENT_HOST));
  props.add(sb.toString());
  sb=new StringBuffer();
  sb.append(AutConfigConstants.AUT_AGENT_PORT).append(valueSeparator).append(parameters.get(AutConfigConstants.AUT_AGENT_PORT));
  props.add(sb.toString());
  sb=new StringBuffer();
  sb.append(AutConfigConstants.AUT_NAME).append(valueSeparator).append(parameters.get(AutConfigConstants.AUT_NAME));
  props.add(sb.toString());
  sb=new StringBuffer();
  sb.append(Constants.AUT_JUB_INSTALL_DIRECTORY).append(valueSeparator).append(getInstallDir());
  props.add(sb.toString());
  return props;
}
Program: 95292
Project: 95292
Buggy source:
/** 
 * {@inheritDoc}
 */
protected String[] createCmdArray(String baseCmd,Map<String,String> parameters){
  List<String> cmds=new Vector<String>();
  cmds.add(baseCmd);
  StringBuffer autServerClasspath=new StringBuffer();
  createServerClasspath(autServerClasspath);
  List<String> autAgentArgs=new ArrayList<String>();
  autAgentArgs.add(String.valueOf(parameters.get(AutConfigConstants.AUT_AGENT_HOST)));
  autAgentArgs.add(String.valueOf(parameters.get(AutConfigConstants.AUT_AGENT_PORT)));
  autAgentArgs.add(String.valueOf(parameters.get(AutConfigConstants.AUT_NAME)));
  if (!isRunningFromExecutable(parameters)) {
    createAutServerLauncherClasspath(cmds,autServerClasspath,parameters);
    createAutServerClasspath(autServerClasspath,cmds,parameters);
    cmds.addAll(autAgentArgs);
    cmds.add(CommandConstants.RC_COMMON_AGENT_INACTIVE);
  }
 else {
    String serverBasePath=createServerBasePath();
    autServerClasspath.append(PATH_SEPARATOR).append(serverBasePath).append(PATH_SEPARATOR).append(getRcBundleClassPath());
    m_autServerClasspath=autServerClasspath.toString();
  }
  cmds.addAll(createAutArguments(parameters));
  return cmds.toArray(new String[cmds.size()]);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected String[] createCmdArray(String baseCmd,Map<String,String> parameters){
  List<String> cmds=new Vector<String>();
  cmds.add(baseCmd);
  StringBuffer autServerClasspath=new StringBuffer();
  createServerClasspath(autServerClasspath);
  List<String> autAgentArgs=new ArrayList<String>();
  autAgentArgs.add(String.valueOf(parameters.get(AutConfigConstants.AUT_AGENT_HOST)));
  autAgentArgs.add(String.valueOf(parameters.get(AutConfigConstants.AUT_AGENT_PORT)));
  autAgentArgs.add(String.valueOf(parameters.get(AutConfigConstants.AUT_NAME)));
  if (!isRunningFromExecutable(parameters)) {
    createAutServerLauncherClasspath(cmds,autServerClasspath,parameters);
    createAutServerClasspath(autServerClasspath,cmds,parameters);
    cmds.addAll(autAgentArgs);
    cmds.add(CommandConstants.RC_COMMON_AGENT_INACTIVE);
  }
 else {
    String serverBasePath=createServerBasePath();
    autServerClasspath.append(PATH_SEPARATOR).append(serverBasePath).append(PATH_SEPARATOR).append(getRcBundleClassPath());
    m_autServerClasspath=autServerClasspath.toString();
  }
  cmds.add(getInstallDir().getAbsolutePath());
  cmds.addAll(createAutArguments(parameters));
  return cmds.toArray(new String[cmds.size()]);
}
Program: 95294
Project: 95294
Buggy source:
/** 
 * puts the given arguments to member variables
 * @param args the args given to main() 
 */
protected void setArgs(String args[]){
  m_autMainClassName=args[Constants.ARG_AUTMAIN];
  m_autAgentHost=args[Constants.ARG_REG_HOST];
  m_autAgentPort=args[Constants.ARG_REG_PORT];
  m_autID=args[Constants.ARG_AUT_NAME];
  int numberAutArgs=args.length - Constants.MIN_ARGS_REQUIRED;
  m_autArgs=new String[numberAutArgs];
  for (int i=0; i < numberAutArgs; i++) {
    m_autArgs[i]=args[Constants.MIN_ARGS_REQUIRED + i];
  }
  if (args.length == Constants.MIN_ARGS_REQUIRED && args[Constants.ARG_AGENT_SET].equals(CommandConstants.RC_COMMON_AGENT_ACTIVE)) {
    m_isAgentSet=true;
  }
}

Fixed version (ground truth):
/** 
 * puts the given arguments to member variables
 * @param args the args given to main() 
 */
protected void setArgs(String args[]){
  m_autMainClassName=args[Constants.ARG_AUTMAIN];
  m_autAgentHost=args[Constants.ARG_REG_HOST];
  m_autAgentPort=args[Constants.ARG_REG_PORT];
  m_autID=args[Constants.ARG_AUT_NAME];
  m_installationDir=args[Constants.ARG_INSTALLATION_DIR];
  int numberAutArgs=args.length - Constants.MIN_ARGS_REQUIRED;
  m_autArgs=new String[numberAutArgs];
  for (int i=0; i < numberAutArgs; i++) {
    m_autArgs[i]=args[Constants.MIN_ARGS_REQUIRED + i];
  }
  if (args.length == Constants.MIN_ARGS_REQUIRED && args[Constants.ARG_AGENT_SET].equals(CommandConstants.RC_COMMON_AGENT_ACTIVE)) {
    m_isAgentSet=true;
  }
}
Program: 95295
Project: 95295
Buggy source:
/** 
 * Initializes the classloader of the user-supplied jars 
 */
private void initExternalLoader(){
  try {
    String start=AUTServer.class.getProtectionDomain().getCodeSource().getLocation().getPath();
    if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
      start=start.substring(1,start.length());
    }
    start=start.replaceFirst("String_Node_Str","String_Node_Str");
    File dir=new File(start);
    File[] res=dir.listFiles(new FilenameFilter(){
      public boolean accept(      File directory,      String name){
        return name.endsWith("String_Node_Str");
      }
    }
);
    if (res == null) {
      return;
    }
    ArrayList<URL> urls=new ArrayList<URL>();
    for (int i=0; i < res.length; i++) {
      try {
        urls.add(res[i].toURI().toURL());
      }
 catch (      MalformedURLException e) {
      }
    }
    if (!urls.isEmpty()) {
      m_externalLoader=new URLClassLoader(urls.toArray(new URL[0]));
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
/** 
 * Initializes the classloader of the user-supplied jars 
 */
private void initExternalLoader(){
  try {
    String start=null;
    if (StringUtils.isNotEmpty(m_installationDir)) {
      start=m_installationDir + StringConstants.SLASH + Constants.EXTERNAL_JARS_NAME;
    }
    if (StringUtils.isBlank(start)) {
      start=AUTServer.class.getProtectionDomain().getCodeSource().getLocation().getPath();
      if (System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
        start=start.substring(1,start.length());
      }
      start=start.replaceFirst("String_Node_Str",Constants.EXTERNAL_JARS_NAME);
    }
    File dir=new File(start);
    File[] res=dir.listFiles(new FilenameFilter(){
      public boolean accept(      File directory,      String name){
        return name.endsWith("String_Node_Str");
      }
    }
);
    if (res == null) {
      return;
    }
    ArrayList<URL> urls=new ArrayList<URL>();
    for (int i=0; i < res.length; i++) {
      try {
        urls.add(res[i].toURI().toURL());
      }
 catch (      MalformedURLException e) {
      }
    }
    if (!urls.isEmpty()) {
      m_externalLoader=new URLClassLoader(urls.toArray(new URL[0]));
    }
  }
 catch (  Exception e) {
  }
}
Program: 95297
Project: 95297
Buggy source:
/** 
 * Initializes the AUT Server for the host application.
 * @param display The Display to use for the AUT Server.
 * @return the AUTServer instance
 */
private AUTServer initAutServer(Display display){
  AUTServer instance=AUTServer.getInstance(CommandConstants.AUT_SWT_SERVER);
  ((SwtAUTServer)instance).setDisplay(display);
  instance.setAutAgentHost(EnvironmentUtils.getProcessOrSystemProperty(AutConfigConstants.AUT_AGENT_HOST));
  instance.setAutAgentPort(EnvironmentUtils.getProcessOrSystemProperty(AutConfigConstants.AUT_AGENT_PORT));
  instance.setAutID(EnvironmentUtils.getProcessOrSystemProperty(AutConfigConstants.AUT_NAME));
  instance.start(true);
  return instance;
}

Fixed version (ground truth):
/** 
 * Initializes the AUT Server for the host application.
 * @param display The Display to use for the AUT Server.
 * @return the AUTServer instance
 */
private AUTServer initAutServer(Display display){
  AUTServer instance=AUTServer.getInstance(CommandConstants.AUT_SWT_SERVER);
  ((SwtAUTServer)instance).setDisplay(display);
  instance.setAutAgentHost(EnvironmentUtils.getProcessOrSystemProperty(AutConfigConstants.AUT_AGENT_HOST));
  instance.setAutAgentPort(EnvironmentUtils.getProcessOrSystemProperty(AutConfigConstants.AUT_AGENT_PORT));
  instance.setAutID(EnvironmentUtils.getProcessOrSystemProperty(AutConfigConstants.AUT_NAME));
  instance.setInstallationDir(EnvironmentUtils.getProcessOrSystemProperty(Constants.AUT_JUB_INSTALL_DIRECTORY));
  instance.start(true);
  return instance;
}