nus-yam/ex-repair huggingface dataset:
Program: 7197
Project: 7197
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  initializeListView();
  registerForContextMenu(getListView());
  if (!_adapterInitialized && _adapter != null) {
    _adapterInitialized=true;
    _adapter.home();
  }
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  restoreCMIS(savedInstanceState);
  initializeListView();
  registerForContextMenu(getListView());
  if (!_adapterInitialized && _adapter != null && _adapter.getCmis() != null) {
    _adapterInitialized=true;
    _adapter.home();
  }
}
Program: 7198
Project: 7198
Buggy source:
protected void initializeListView(){
  CMISApplication app=(CMISApplication)getApplication();
  CMIS cmis=app.getCMIS();
  if (cmis != null && cmis.getNetworkStatus() == NetworkStatus.OK) {
    setContentView(R.layout.nodes);
  }
 else {
    setContentView(R.layout.nodes_offline);
  }
  _adapter=new CMISAdapter(this,R.layout.node_ref_item,R.id.node_ref_label);
  _adapter.setCmis(app.getCMIS());
  setListAdapter(_adapter);
  if (cmis != null) {
    Resources res=getResources();
    StringBuilder title=new StringBuilder(res.getString(R.string.app_name)).append("String_Node_Str").append(cmis.getPrefs().getHostname());
    setTitle(title.toString());
  }
}

Fixed version (ground truth):
protected void initializeListView(){
  CMISApplication app=(CMISApplication)getApplication();
  CMIS cmis=app.getCMIS();
  if (cmis != null && cmis.getNetworkStatus() == NetworkStatus.OK) {
    setContentView(R.layout.nodes);
  }
 else {
    setContentView(R.layout.nodes_offline);
  }
  _adapter=new CMISAdapter(this,R.layout.node_ref_item,R.id.node_ref_label);
  _adapter.setCmis(cmis);
  setListAdapter(_adapter);
  if (cmis != null) {
    Resources res=getResources();
    StringBuilder title=new StringBuilder(res.getString(R.string.app_name)).append("String_Node_Str").append(cmis.getPrefs().getHostname());
    setTitle(title.toString());
  }
}
Program: 7199
Project: 7199
Buggy source:
public void emailContent(int position){
  final NodeRef ref=getItem(position);
  downloadContent(ref,new Handler(){
    public void handleMessage(    Message msg){
      Context context=getContext();
      boolean done=msg.getData().getBoolean("String_Node_Str");
      if (done && _progressDlg != null) {
        _progressDlg.dismiss();
        int bytes=(Integer)_dlThread.getResult();
        if (bytes > 0) {
          Resources res=context.getResources();
          File file=context.getFileStreamPath(ref.getName());
          Uri uri=Uri.fromFile(file);
          Intent emailIntent=new Intent(Intent.ACTION_SEND);
          emailIntent.putExtra(Intent.EXTRA_STREAM,uri);
          emailIntent.putExtra(Intent.EXTRA_SUBJECT,ref.getName());
          emailIntent.putExtra(Intent.EXTRA_TEXT,res.getString(R.string.email_text));
          emailIntent.setType(ref.getContentType());
          try {
            context.startActivity(Intent.createChooser(emailIntent,res.getString(R.string.email_title)));
          }
 catch (          ActivityNotFoundException e) {
            String text="String_Node_Str" + ref.getContentType();
            int duration=Toast.LENGTH_SHORT;
            Toast toast=Toast.makeText(context,text,duration);
            toast.show();
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public void emailContent(int position){
  final NodeRef ref=getItem(position);
  downloadContent(ref,new Handler(){
    public void handleMessage(    Message msg){
      Context context=getContext();
      boolean done=msg.getData().getBoolean("String_Node_Str");
      if (done && _progressDlg != null) {
        _progressDlg.dismiss();
        File file=(File)_dlThread.getResult();
        if (file != null) {
          Resources res=context.getResources();
          Uri uri=Uri.fromFile(file);
          Intent emailIntent=new Intent(Intent.ACTION_SEND);
          emailIntent.putExtra(Intent.EXTRA_STREAM,uri);
          emailIntent.putExtra(Intent.EXTRA_SUBJECT,ref.getName());
          emailIntent.putExtra(Intent.EXTRA_TEXT,res.getString(R.string.email_text));
          emailIntent.setType(ref.getContentType());
          try {
            context.startActivity(Intent.createChooser(emailIntent,res.getString(R.string.email_title)));
          }
 catch (          ActivityNotFoundException e) {
            String text="String_Node_Str" + ref.getContentType();
            int duration=Toast.LENGTH_SHORT;
            Toast toast=Toast.makeText(context,text,duration);
            toast.show();
          }
        }
      }
    }
  }
);
}
Program: 7200
Project: 7200
Buggy source:
public static void main(String... args) throws Exception {
  final String host=args[0];
  final int port=Integer.parseInt(args[1]);
  final int backlog=Integer.parseInt(args[2]);
  final int size=Integer.parseInt(args[3]);
  final String acceptorType=args[4];
  final String handlerType=args[5];
  final String schedulerType=args[6];
  final int thread=Integer.getInteger("String_Node_Str",Runtime.getRuntime().availableProcessors() * 2);
  final SocketAddress address=new InetSocketAddress(host,port);
  Runtime.getRuntime().addShutdownHook(new Thread("String_Node_Str"){
    @Override public void run(){
      running=false;
    }
  }
);
  System.out.println("String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str"+ backlog+ "String_Node_Str"+ size+ "String_Node_Str");
  final Acceptor acceptor=AcceptorType.valueOf(acceptorType.toUpperCase()).build(address,size,backlog);
  final Handler handler=Handler.valueOf(handlerType.toUpperCase());
  final Scheduler scheduler=SchedulerType.valueOf(schedulerType.toUpperCase()).builder(thread,backlog);
  while (running) {
    try {
      scheduler.schedule(acceptor.accept(),handler);
    }
 catch (    SocketTimeoutException e) {
    }
  }
  silentClose(acceptor);
  scheduler.shutdown();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String... args) throws Exception {
  final String host=args[0];
  final int port=Integer.parseInt(args[1]);
  final int backlog=Integer.parseInt(args[2]);
  final int size=Integer.parseInt(args[3]);
  final String acceptorType=args[4];
  final String handlerType=args[5];
  final String schedulerType=args[6];
  final int thread=Integer.getInteger("String_Node_Str",Runtime.getRuntime().availableProcessors() * 2);
  final SocketAddress address=new InetSocketAddress(host,port);
  Runtime.getRuntime().addShutdownHook(new Thread("String_Node_Str"){
    @Override public void run(){
      running=false;
    }
  }
);
  System.out.println("String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str"+ backlog+ "String_Node_Str"+ size+ "String_Node_Str");
  final Acceptor acceptor=AcceptorType.valueOf(acceptorType.toUpperCase()).build(address,size,backlog);
  final Handler handler=Handler.valueOf(handlerType.toUpperCase());
  final Scheduler scheduler=SchedulerType.valueOf(schedulerType.toUpperCase()).builder(thread,(backlog > 0 ? backlog : Integer.MAX_VALUE));
  while (running) {
    try {
      scheduler.schedule(acceptor.accept(),handler);
    }
 catch (    SocketTimeoutException e) {
    }
  }
  silentClose(acceptor);
  scheduler.shutdown();
  System.out.println("String_Node_Str");
}
Program: 7201
Project: 7201
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.ENTRY)) public static void readAndWriteEnter(@Self Object obj){
  vars.put(obj,System.nanoTime());
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.ENTRY)) public static void readAndWriteEnter(@Self Object obj,Object... args){
  vars.put(obj,System.nanoTime());
}
Program: 7202
Project: 7202
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(@Self Object obj){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.get(obj));
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(@Self Object obj,Object... args){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.get(obj));
}
Program: 7203
Project: 7203
Buggy source:
@OnTimer(1000) public static void print(){
  final long c=count.get();
  if (c == 0)   return;
  String status=MessageFormat.format("String_Node_Str",c,(durations.get() / c),registered.get(),daemonThreadCount(),(elapse.get() / c));
  System.out.println(status);
}

Fixed version (ground truth):
@OnTimer(1000) public static void print(){
  final long c=count.get();
  if (c == 0)   return;
  String status=MessageFormat.format("String_Node_Str",c,(durations.get() / c),registered.get(),daemonThreadCount(),(elapse.get() / c));
  println(status);
}
Program: 7204
Project: 7204
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(AnyType... args){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.get(args[0]));
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(AnyType... args){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.remove(args[0]));
}
Program: 7205
Project: 7205
Buggy source:
@Override public void run(){
  try {
    accept.setTcpNoDelay(true);
    accept.setSendBufferSize(1 * 1024);
    final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
    inputStream.read(BUFFER);
    inputStream.close();
    final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
    outputStream.write(RESPONSE);
    outputStream.close();
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
 finally {
    silentClose(accept);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    accept.setTcpNoDelay(true);
    accept.setSendBufferSize(1 * 1024);
    final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
    final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
    inputStream.read(BUFFER);
    outputStream.write(RESPONSE);
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
 finally {
    silentClose(accept);
  }
}
Program: 7206
Project: 7206
Buggy source:
private static void handle(final Socket accept){
  SERVICE.execute(new Runnable(){
    @Override public void run(){
      try {
        accept.setTcpNoDelay(true);
        accept.setSendBufferSize(1 * 1024);
        final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
        inputStream.read(BUFFER);
        inputStream.close();
        final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
        outputStream.write(RESPONSE);
        outputStream.close();
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
 finally {
        silentClose(accept);
      }
    }
  }
);
}

Fixed version (ground truth):
private static void handle(final Socket accept){
  SERVICE.execute(new Runnable(){
    @Override public void run(){
      try {
        accept.setTcpNoDelay(true);
        accept.setSendBufferSize(1 * 1024);
        final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
        final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
        inputStream.read(BUFFER);
        outputStream.write(RESPONSE);
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
 finally {
        silentClose(accept);
      }
    }
  }
);
}
Program: 7207
Project: 7207
Buggy source:
private void read(final SelectionKey key){
  uninterest(OP_READ,key);
  service.execute(new Runnable(){
    @Override public void run(){
      final SocketChannel channel=(SocketChannel)key.channel();
      try {
        channel.read(BUFFER);
        channel.write(OK_200);
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str" + channel,e);
      }
 finally {
        silentClose(channel);
      }
    }
  }
);
}

Fixed version (ground truth):
private void read(final SelectionKey key){
  uninterest(OP_READ,key);
  service.execute(new Runnable(){
    @Override public void run(){
      final SocketChannel channel=(SocketChannel)key.channel();
      try {
        channel.read(ByteBuffer.allocate(1024));
        channel.write(OK_200.asReadOnlyBuffer());
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str" + channel,e);
      }
 finally {
        silentClose(channel);
      }
    }
  }
);
}
Program: 7208
Project: 7208
Buggy source:
@Override public void run(){
  final SocketChannel channel=(SocketChannel)key.channel();
  try {
    channel.read(BUFFER);
    channel.write(OK_200);
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str" + channel,e);
  }
 finally {
    silentClose(channel);
  }
}

Fixed version (ground truth):
@Override public void run(){
  final SocketChannel channel=(SocketChannel)key.channel();
  try {
    channel.read(ByteBuffer.allocate(1024));
    channel.write(OK_200.asReadOnlyBuffer());
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str" + channel,e);
  }
 finally {
    silentClose(channel);
  }
}
Program: 7209
Project: 7209
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.ENTRY)) public static void readAndWriteEnter(@Self Object obj,Object... args){
  vars.put(obj,System.nanoTime());
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.ENTRY)) public static void readAndWriteEnter(@Self Object obj,AnyType... args){
  vars.put(obj,System.nanoTime());
}
Program: 7210
Project: 7210
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(@Self Object obj,Object... args){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.get(obj));
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(@Self Object obj,AnyType... args){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.get(obj));
}
Program: 7211
Project: 7211
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void registered(@Self Object obj,int result){
  registered.set(result);
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void registered(@Self Object obj,@Return int result){
  registered.set(result);
}
Program: 7212
Project: 7212
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.ENTRY)) public static void readAndWriteEnter(@Self Object obj,AnyType... args){
  vars.put(obj,System.nanoTime());
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.ENTRY)) public static void readAndWriteEnter(AnyType... args){
  vars.put(args[0],System.nanoTime());
}
Program: 7213
Project: 7213
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(@Self Object obj,AnyType... args){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.get(obj));
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str",location=@Location(Kind.RETURN)) public static void readAndWriteExit(AnyType... args){
  long current=System.nanoTime();
  elapse.addAndGet(current - vars.get(args[0]));
}
Program: 7214
Project: 7214
Buggy source:
@OnTimer(1000) public static void print(){
  if (count.get() == 0)   return;
  String status=String.format("String_Node_Str",count.get(),(durations.get() / count.get()),registered.get());
  System.out.println(status);
}

Fixed version (ground truth):
@OnTimer(1000) public static void print(){
  if (count.get() == 0)   return;
  String status=MessageFormat.format("String_Node_Str",count.get(),(durations.get() / count.get()),registered.get());
  System.out.println(status);
}
Program: 7215
Project: 7215
Buggy source:
public ChannelAcceptor(SocketAddress address,int size,int backlog) throws IOException {
  this.selector=Selector.open();
  this.channel=ServerSocketChannel.open();
  channel.socket().setReceiveBufferSize(Utils.kb(size));
  channel.socket().setReuseAddress(true);
  channel.socket().bind(address,backlog);
  channel.configureBlocking(false);
}

Fixed version (ground truth):
public ChannelAcceptor(SocketAddress address,int size,int backlog) throws IOException {
  this.selector=Selector.open();
  this.channel=ServerSocketChannel.open();
  channel.socket().setReceiveBufferSize(Utils.kb(size));
  channel.socket().setReuseAddress(true);
  channel.socket().bind(address,backlog);
  channel.configureBlocking(false);
  channel.register(selector,SelectionKey.OP_ACCEPT);
}
Program: 7216
Project: 7216
Buggy source:
@Override public void run(){
  try {
    accept.setTcpNoDelay(true);
    accept.setSendBufferSize(1 * 1024);
    final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
    final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
    inputStream.read(BUFFER);
    outputStream.write(RESPONSE);
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
 finally {
    silentClose(accept);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    accept.setTcpNoDelay(true);
    accept.setSendBufferSize(1 * 1024);
    final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
    final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
    inputStream.read(BUFFER);
    outputStream.write(RESPONSE);
    outputStream.close();
    inputStream.close();
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
 finally {
    silentClose(accept);
  }
}
Program: 7217
Project: 7217
Buggy source:
public static void handle(final Socket accept){
  SERVICE.execute(new Runnable(){
    @Override public void run(){
      try {
        accept.setTcpNoDelay(true);
        accept.setSendBufferSize(1 * 1024);
        final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
        final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
        inputStream.read(BUFFER);
        outputStream.write(RESPONSE);
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
 finally {
        silentClose(accept);
      }
    }
  }
);
}

Fixed version (ground truth):
public static void handle(final Socket accept){
  SERVICE.execute(new Runnable(){
    @Override public void run(){
      try {
        accept.setTcpNoDelay(true);
        accept.setSendBufferSize(1 * 1024);
        final InputStream inputStream=new BufferedInputStream(accept.getInputStream());
        final OutputStream outputStream=new BufferedOutputStream(accept.getOutputStream());
        inputStream.read(BUFFER);
        outputStream.write(RESPONSE);
        outputStream.close();
        inputStream.close();
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
 finally {
        silentClose(accept);
      }
    }
  }
);
}
Program: 7218
Project: 7218
Buggy source:
private void select() throws Exception {
  final int selected=selector.select(500L);
  final int registered=selector.keys().size();
  if (registered == 0 && thenShutdown())   return;
  if (selected > 0) {
    SelectionKey acceptableKey=null;
    final Iterator<SelectionKey> iterator=selector.selectedKeys().iterator();
    while (iterator.hasNext()) {
      final SelectionKey key=iterator.next();
      iterator.remove();
      if (key.isAcceptable())       acceptableKey=key;
      if (key.isReadable())       read(key);
      if (key.isWritable())       write(key);
    }
    if (acceptableKey == null)     return;
    accept(acceptableKey,selector);
  }
}

Fixed version (ground truth):
private void select() throws Exception {
  final int selected=selector.select(500L);
  final int registered=selector.keys().size();
  if (registered == 0 && thenShutdown())   return;
  if (selected > 0) {
    SelectionKey acceptableKey=null;
    final Iterator<SelectionKey> iterator=selector.selectedKeys().iterator();
    while (iterator.hasNext()) {
      final SelectionKey key=iterator.next();
      iterator.remove();
      if (key.isAcceptable())       acceptableKey=key;
 else       if (key.isReadable())       read(key);
 else       if (key.isWritable())       write(key);
    }
    if (acceptableKey == null)     return;
    accept(acceptableKey,selector);
  }
}
Program: 7219
Project: 7219
Buggy source:
private void read(final SelectionKey key){
  uninterest(OP_READ,key);
  service.execute(new Runnable(){
    @Override public void run(){
      final SocketChannel channel=(SocketChannel)key.channel();
      try {
        channel.read(BUFFER);
        channel.write(OK_200);
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str" + channel,e);
        silentClose(channel);
      }
    }
  }
);
}

Fixed version (ground truth):
private void read(final SelectionKey key){
  uninterest(OP_READ,key);
  service.execute(new Runnable(){
    @Override public void run(){
      final SocketChannel channel=(SocketChannel)key.channel();
      try {
        channel.read(BUFFER);
        channel.write(OK_200);
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str" + channel,e);
      }
 finally {
        silentClose(channel);
      }
    }
  }
);
}
Program: 7220
Project: 7220
Buggy source:
@Override public void run(){
  final SocketChannel channel=(SocketChannel)key.channel();
  try {
    channel.read(BUFFER);
    channel.write(OK_200);
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str" + channel,e);
    silentClose(channel);
  }
}

Fixed version (ground truth):
@Override public void run(){
  final SocketChannel channel=(SocketChannel)key.channel();
  try {
    channel.read(BUFFER);
    channel.write(OK_200);
  }
 catch (  IOException e) {
    LOGGER.error("String_Node_Str" + channel,e);
  }
 finally {
    silentClose(channel);
  }
}
Program: 7221
Project: 7221
Buggy source:
public Void call() throws Exception {
  ISession api=ISessionPool.getInstance().getPool().borrowObject(serverConfig);
  LOGGER.fine("String_Node_Str" + openFileHandler.get());
  if (openFileHandler.get() >= CHECKOUT_TRESHOLD) {
    LOGGER.fine("String_Node_Str" + api.toString() + "String_Node_Str");
    api.refreshAPISession();
    openFileHandler.set(1);
  }
  LOGGER.fine("String_Node_Str" + api.toString());
  try {
    IntegrityCMMember.checkout(api,configPath,memberID,memberRev,memberTimestamp,targetFile,restoreTimestamp,lineTerminator);
  }
 catch (  APIException aex) {
    LOGGER.severe("String_Node_Str");
    ExceptionHandler eh=new ExceptionHandler(aex);
    LOGGER.severe(eh.getMessage());
    LOGGER.fine(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
    throw new Exception(eh.getMessage());
  }
 finally {
    if (null != api)     ISessionPool.getInstance().getPool().returnObject(serverConfig,api);
  }
  openFileHandler.set(openFileHandler.get() + 1);
  if (calculateChecksum) {
    checksumHash.put(memberName,IntegrityCMMember.getMD5Checksum(targetFile));
  }
  return null;
}

Fixed version (ground truth):
public Void call() throws Exception {
  ISessionPool.getInstance().getPoolConfig().setTestOnBorrow(false);
  ISession api=ISessionPool.getInstance().getPool().borrowObject(serverConfig);
  LOGGER.fine("String_Node_Str" + openFileHandler.get());
  if (openFileHandler.get() >= CHECKOUT_TRESHOLD) {
    LOGGER.fine("String_Node_Str" + api.toString() + "String_Node_Str");
    api.refreshAPISession();
    openFileHandler.set(1);
  }
  LOGGER.fine("String_Node_Str" + api.toString());
  try {
    IntegrityCMMember.checkout(api,configPath,memberID,memberRev,memberTimestamp,targetFile,restoreTimestamp,lineTerminator);
  }
 catch (  APIException aex) {
    LOGGER.severe("String_Node_Str");
    ExceptionHandler eh=new ExceptionHandler(aex);
    LOGGER.severe(eh.getMessage());
    LOGGER.fine(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
    throw new Exception(eh.getMessage());
  }
 finally {
    if (null != api)     ISessionPool.getInstance().getPool().returnObject(serverConfig,api);
    ISessionPool.getInstance().getPoolConfig().setTestOnBorrow(true);
  }
  openFileHandler.set(openFileHandler.get() + 1);
  if (calculateChecksum) {
    checksumHash.put(memberName,IntegrityCMMember.getMD5Checksum(targetFile));
  }
  return null;
}
Program: 7222
Project: 7222
Buggy source:
@Override public String toString(){
  StringBuilder str=new StringBuilder();
  str.append("String_Node_Str" + name);
  str.append("String_Node_Str" + secure);
  str.append("String_Node_Str" + ipHostName);
  str.append("String_Node_Str" + ipPort);
  return str.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder str=new StringBuilder();
  str.append("String_Node_Str" + name + "String_Node_Str");
  str.append("String_Node_Str" + secure + "String_Node_Str");
  str.append("String_Node_Str" + ipHostName + "String_Node_Str");
  str.append("String_Node_Str" + ipPort + "String_Node_Str");
  return str.toString();
}
Program: 7223
Project: 7223
Buggy source:
/** 
 * Primes the Integrity Project Member metadata information
 * @return response Integrity API Response
 * @throws APIException
 * @throws SQLException
 * @throws AbortException
 * @throws ExecutionException
 * @throws InterruptedException
 */
private Response initializeCMProjectMembers() throws APIException, SQLException, AbortException, InterruptedException, ExecutionException {
  IntegrityCMProject siProject=getIntegrityProject();
  IAPICommand command=CommandFactory.createCommand(IAPICommand.VIEW_PROJECT_COMMAND,DescriptorImpl.INTEGRITY_DESCRIPTOR.getConfiguration(serverConfig));
  command.addOption(new APIOption(IAPIOption.PROJECT,siProject.getConfigurationPath()));
  MultiValue mv=APIUtils.createMultiValueField(IAPIFields.FIELD_SEPARATOR,IAPIFields.NAME,IAPIFields.CONTEXT,IAPIFields.CP_ID,IAPIFields.MEMBER_REV,IAPIFields.MEMBER_TIMESTAMP,IAPIFields.MEMBER_DESCRIPTION,IAPIFields.TYPE);
  command.addOption(new APIOption(IAPIOption.FIELDS,mv));
  applyMemberFilters(command);
  LOGGER.fine("String_Node_Str" + siProject.getConfigurationPath());
  Response viewRes=command.execute();
  siProject.parseProject(viewRes.getWorkItems());
  command.terminateAPI();
  return viewRes;
}

Fixed version (ground truth):
/** 
 * Primes the Integrity Project Member metadata information
 * @return response Integrity API Response
 * @throws APIException
 * @throws SQLException
 * @throws AbortException
 * @throws ExecutionException
 * @throws InterruptedException
 */
private Response initializeCMProjectMembers() throws APIException, SQLException, AbortException, InterruptedException, ExecutionException {
  IntegrityCMProject siProject=getIntegrityProject();
  IAPICommand command=CommandFactory.createCommand(IAPICommand.VIEW_PROJECT_COMMAND,DescriptorImpl.INTEGRITY_DESCRIPTOR.getConfiguration(serverConfig));
  command.addOption(new APIOption(IAPIOption.PROJECT,siProject.getConfigurationPath()));
  MultiValue mv=APIUtils.createMultiValueField(IAPIFields.FIELD_SEPARATOR,IAPIFields.NAME,IAPIFields.CONTEXT,IAPIFields.CP_ID,IAPIFields.MEMBER_REV,IAPIFields.MEMBER_TIMESTAMP,IAPIFields.MEMBER_DESCRIPTION,IAPIFields.TYPE);
  command.addOption(new APIOption(IAPIOption.FIELDS,mv));
  applyMemberFilters(command);
  LOGGER.fine("String_Node_Str" + siProject.getConfigurationPath());
  Response viewRes=command.execute();
  siProject.parseProject(viewRes.getWorkItems());
  try {
    command.terminateAPI();
  }
 catch (  Exception e) {
    LOGGER.log(Level.FINE,"String_Node_Str");
  }
  return viewRes;
}
Program: 7224
Project: 7224
Buggy source:
/** 
 * A credentials validation helper
 * @param hostName
 * @param port
 * @param userName
 * @param password
 * @param secure
 * @param ipHostName
 * @param ipPort
 * @return
 * @throws IOException
 * @throws ServletException
 */
public FormValidation doTestConnection(@QueryParameter("String_Node_Str") final String hostName,@QueryParameter("String_Node_Str") final int port,@QueryParameter("String_Node_Str") final String userName,@QueryParameter("String_Node_Str") final String password,@QueryParameter("String_Node_Str") final boolean secure,@QueryParameter("String_Node_Str") final String ipHostName,@QueryParameter("String_Node_Str") final int ipPort) throws IOException, ServletException {
  LOGGER.fine("String_Node_Str");
  LOGGER.fine("String_Node_Str" + hostName);
  LOGGER.fine("String_Node_Str" + port);
  LOGGER.fine("String_Node_Str" + userName);
  LOGGER.fine("String_Node_Str" + Secret.fromString(password).getEncryptedValue());
  LOGGER.fine("String_Node_Str" + secure);
  LOGGER.fine("String_Node_Str" + ipHostName);
  LOGGER.fine("String_Node_Str" + ipPort);
  IntegrityConfigurable ic=new IntegrityConfigurable("String_Node_Str",ipHostName,ipPort,hostName,port,secure,userName,password);
  ISession api=APISession.create(ic);
  if (null != api) {
    api.terminate();
    return FormValidation.ok("String_Node_Str");
  }
 else {
    return FormValidation.error("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * A credentials validation helper
 * @param hostName
 * @param port
 * @param userName
 * @param password
 * @param secure
 * @param ipHostName
 * @param ipPort
 * @return
 * @throws IOException
 * @throws ServletException
 */
public FormValidation doTestConnection(@QueryParameter("String_Node_Str") final String hostName,@QueryParameter("String_Node_Str") final int port,@QueryParameter("String_Node_Str") final String userName,@QueryParameter("String_Node_Str") final String password,@QueryParameter("String_Node_Str") final boolean secure,@QueryParameter("String_Node_Str") final String ipHostName,@QueryParameter("String_Node_Str") final int ipPort) throws IOException, ServletException {
  LOGGER.fine("String_Node_Str");
  LOGGER.fine("String_Node_Str" + hostName);
  LOGGER.fine("String_Node_Str" + port);
  LOGGER.fine("String_Node_Str" + userName);
  LOGGER.fine("String_Node_Str" + Secret.fromString(password).getEncryptedValue());
  LOGGER.fine("String_Node_Str" + secure);
  LOGGER.fine("String_Node_Str" + ipHostName);
  LOGGER.fine("String_Node_Str" + ipPort);
  IntegrityConfigurable ic=new IntegrityConfigurable(null,ipHostName,ipPort,hostName,port,secure,userName,password);
  ISession api=APISession.create(ic);
  if (null != api) {
    api.terminate();
    return FormValidation.ok("String_Node_Str");
  }
 else {
    return FormValidation.error("String_Node_Str");
  }
}
Program: 7225
Project: 7225
Buggy source:
@Override public void terminateAPI(){
  if (runCommandWithInterim && api != null) {
    LOGGER.log(Level.FINEST,"String_Node_Str" + api.toString());
    api.terminate();
  }
}

Fixed version (ground truth):
@Override public void terminateAPI() throws Exception {
  if (runCommandWithInterim && api != null) {
    LOGGER.log(Level.FINEST,"String_Node_Str" + api.toString());
    api.terminate();
    ISessionPool.getInstance().getPool().invalidateObject(serverConfig,api);
  }
}
Program: 7227
Project: 7227
Buggy source:
/** 
 * Function to explicitly terminate/return sessions to Session Pool for WITH_INTERIM commands
 */
public void terminateAPI();

Fixed version (ground truth):
/** 
 * Function to explicitly terminate/return sessions to Session Pool for WITH_INTERIM commands
 * @throws Exception
 */
public void terminateAPI() throws Exception ;
Program: 7228
Project: 7228
Buggy source:
/** 
 * Default way to execute the command using an auto-generated Integrity Session API
 * @return
 * @throws APICommandException
 * @throws AbortException 
 */
public Response execute() throws APIException, AbortException ;

Fixed version (ground truth):
/** 
 * Default way to execute the command using an auto-generated Integrity Session API
 * @return
 * @throws APICommandException
 * @throws AbortException
 */
public Response execute() throws APIException, AbortException ;
Program: 7229
Project: 7229
Buggy source:
/** 
 * Executes the actual Integrity Delete Non Members operation
 */
public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws InterruptedException, IOException {
  AbstractProject<?,?> rootProject=getRootProject(build.getProject());
  if (!(rootProject.getScm() instanceof IntegritySCM)) {
    listener.getLogger().println("String_Node_Str" + rootProject.getScm() + "String_Node_Str");
    return true;
  }
  IntegritySCM scm=IntegritySCM.class.cast(rootProject.getScm());
  IntegrityDeleteNonMembersTask deleteNonMembers=new IntegrityDeleteNonMembersTask(build,listener,scm.getAlternateWorkspace(),scm.getIntegrityProject());
  if (!build.getWorkspace().act(deleteNonMembers)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Executes the actual Integrity Delete Non Members operation
 */
public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws InterruptedException, IOException {
  AbstractProject<?,?> rootProject=build.getProject().getRootProject();
  if (!(rootProject.getScm() instanceof IntegritySCM)) {
    listener.getLogger().println("String_Node_Str" + rootProject.getScm() + "String_Node_Str");
    return true;
  }
  IntegritySCM scm=IntegritySCM.class.cast(rootProject.getScm());
  IntegrityDeleteNonMembersTask deleteNonMembers=new IntegrityDeleteNonMembersTask(build,listener,scm.getAlternateWorkspace(),scm.getIntegrityProject());
  if (!build.getWorkspace().act(deleteNonMembers)) {
    return false;
  }
  return true;
}
Program: 7230
Project: 7230
Buggy source:
public Boolean invoke(File f,VirtualChannel channel) throws IOException, InterruptedException {
  AbstractProject<?,?> rootProject=getRootProject(build.getProject());
  if (!(rootProject.getScm() instanceof IntegritySCM)) {
    listener.getLogger().println("String_Node_Str" + rootProject.getScm() + "String_Node_Str");
    return true;
  }
  try {
    deleteNonMembers(build,listener);
  }
 catch (  SQLException e) {
    listener.getLogger().println("String_Node_Str");
    listener.getLogger().println(e.getMessage());
    LOGGER.log(Level.SEVERE,"String_Node_Str",e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public Boolean invoke(File f,VirtualChannel channel) throws IOException, InterruptedException {
  AbstractProject<?,?> rootProject=build.getProject().getRootProject();
  if (!(rootProject.getScm() instanceof IntegritySCM)) {
    listener.getLogger().println("String_Node_Str" + rootProject.getScm() + "String_Node_Str");
    return true;
  }
  try {
    deleteNonMembers(build,listener);
  }
 catch (  SQLException e) {
    listener.getLogger().println("String_Node_Str");
    listener.getLogger().println(e.getMessage());
    LOGGER.log(Level.SEVERE,"String_Node_Str",e);
    return false;
  }
  return true;
}
Program: 7231
Project: 7231
Buggy source:
/** 
 * Adds Integrity CM Project info to the build variables  
 */
@Override public void buildEnvVars(AbstractBuild<?,?> build,Map<String,String> env){
  super.buildEnvVars(build,env);
  LOGGER.fine("String_Node_Str");
  IntegrityConfigurable ic=((DescriptorImpl)this.getDescriptor()).getConfiguration(serverConfig);
  env.put("String_Node_Str",IntegrityCheckpointAction.evalGroovyExpression(env,configPath));
  env.put("String_Node_Str",ic.getHostName());
  env.put("String_Node_Str",String.valueOf(ic.getPort()));
  env.put("String_Node_Str",ic.getUserName());
  IntegrityCMProject siProject=getIntegrityProject();
  if (null != siProject && siProject.isBuild()) {
    env.put("String_Node_Str",getIntegrityProject().getProjectRevision());
  }
}

Fixed version (ground truth):
/** 
 * Adds Integrity CM Project info to the build variables  
 */
@Override public void buildEnvVars(AbstractBuild<?,?> build,Map<String,String> env){
  super.buildEnvVars(build,env);
  LOGGER.fine("String_Node_Str");
  IntegrityConfigurable ic=((DescriptorImpl)this.getDescriptor()).getConfiguration(serverConfig);
  env.put("String_Node_Str",IntegrityCheckpointAction.evalGroovyExpression(env,configPath));
  env.put("String_Node_Str",ic.getHostName());
  env.put("String_Node_Str",String.valueOf(ic.getPort()));
  env.put("String_Node_Str",userName);
  IntegrityCMProject siProject=getIntegrityProject();
  if (null != siProject && siProject.isBuild()) {
    env.put("String_Node_Str",getIntegrityProject().getProjectRevision());
  }
}
Program: 7234
Project: 7234
Buggy source:
@DataBoundConstructor public IntegrityConfigurable(String ipHostName,int ipPort,String hostName,int port,boolean secure,String userName,String password){
  this.ipHostName=ipHostName;
  this.ipPort=ipPort;
  this.hostName=hostName;
  this.port=port;
  this.userName=userName;
  this.password=Secret.fromString(password);
  this.name=String.format("String_Node_Str",userName,hostName,port);
}

Fixed version (ground truth):
@DataBoundConstructor public IntegrityConfigurable(String ipHostName,int ipPort,String hostName,int port,boolean secure,String userName,String password){
  this.ipHostName=ipHostName;
  this.ipPort=ipPort;
  this.hostName=hostName;
  this.port=port;
  this.secure=secure;
  this.userName=userName;
  this.password=Secret.fromString(password);
  this.name=String.format("String_Node_Str",userName,hostName,port);
}
Program: 7235
Project: 7235
Buggy source:
/** 
 * Creates an authenticated API Session against the Integrity Server
 * @return An authenticated API Session
 */
public static APISession create(IntegrityConfigurable settings){
  try {
    LOGGER.fine("String_Node_Str");
    return new APISession(settings.getIpHostName(),settings.getIpPort(),settings.getHostName(),settings.getPort(),settings.getUserName(),settings.getPasswordInPlainText(),settings.getSecure());
  }
 catch (  APIException aex) {
    LOGGER.severe("String_Node_Str");
    ExceptionHandler eh=new ExceptionHandler(aex);
    LOGGER.severe(eh.getMessage());
    LOGGER.fine(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
    LOGGER.log(Level.SEVERE,"String_Node_Str",aex);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Creates an authenticated API Session against the Integrity Server
 * @return An authenticated API Session
 */
public static synchronized APISession create(IntegrityConfigurable settings){
  try {
    LOGGER.fine("String_Node_Str");
    return new APISession(settings.getIpHostName(),settings.getIpPort(),settings.getHostName(),settings.getPort(),settings.getUserName(),settings.getPasswordInPlainText(),settings.getSecure());
  }
 catch (  APIException aex) {
    LOGGER.severe("String_Node_Str");
    ExceptionHandler eh=new ExceptionHandler(aex);
    LOGGER.severe(eh.getMessage());
    LOGGER.fine(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
    LOGGER.log(Level.SEVERE,"String_Node_Str",aex);
    return null;
  }
}
Program: 7237
Project: 7237
Buggy source:
/** 
 * Collects the Test Results based on the list of Tests contained within an Integrity Test Session
 * @param testResultAction AggregatedTestResultAction
 * @param listener BuildListener
 * @param api Integrity API Session
 * @param testSessionID Integrity Test Session ID
 * @return
 * @throws APIException
 */
@SuppressWarnings("String_Node_Str") private boolean collectTestResults(AggregatedTestResultAction testResultAction,BuildListener listener,APISession api,String testSessionID) throws APIException {
  Command walk=new Command(Command.IM,"String_Node_Str");
  walk.addOption(new Option("String_Node_Str",testCaseTestNameField));
  MultiValue traverseFields=new MultiValue("String_Node_Str");
  traverseFields.add(testSessionTestsField);
  traverseFields.add(testSuiteContainsField);
  walk.addOption(new Option("String_Node_Str",traverseFields));
  walk.addSelection(testSessionID);
  Response walkResponse=api.runCommand(walk);
  if (null != walkResponse) {
    Field testSessionFld=walkResponse.getWorkItem(testSessionID).getField(testSessionTestsField);
    if (null != testSessionFld && null != testSessionFld.getList()) {
      updateTestResult(getTestResult(testResultAction),listener,api,testSessionID,testSessionFld.getList());
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Collects the Test Results based on the list of Tests contained within an Integrity Test Session
 * @param testResultAction AggregatedTestResultAction
 * @param listener BuildListener
 * @param api Integrity API Session
 * @param testSessionID Integrity Test Session ID
 * @return
 * @throws APIException
 */
@SuppressWarnings("String_Node_Str") private boolean collectTestResults(AggregatedTestResultAction testResultAction,BuildListener listener,APISession api,String testSessionID) throws APIException {
  Command walk=new Command(Command.IM,"String_Node_Str");
  walk.addOption(new Option("String_Node_Str",testCaseTestNameField));
  MultiValue traverseFields=new MultiValue("String_Node_Str");
  traverseFields.add(testSessionTestsField);
  traverseFields.add(testSuiteContainsField);
  walk.addOption(new Option("String_Node_Str",traverseFields));
  walk.addSelection(testSessionID);
  Response walkResponse=api.runCommand(walk);
  if (null != walkResponse) {
    Field testSessionFld=walkResponse.getWorkItem(testSessionID).getField(testSessionTestsField);
    if (null != testSessionFld && null != testSessionFld.getList()) {
      updateTestResult(getTestResult(testResultAction),listener,api,testSessionID,walkResponse,testSessionFld.getList());
    }
  }
  return true;
}
Program: 7239
Project: 7239
Buggy source:
/** 
 * Terminate the API Session and Integration Point
 */
public void Terminate(){
  boolean CommandRunnerKilled=false;
  boolean SessionKilled=false;
  boolean IntegrationPointKilled=false;
  if (!terminated) {
    try {
      if (null != icr) {
        if (!icr.isFinished()) {
          icr.interrupt();
        }
        icr.release();
        CommandRunnerKilled=true;
      }
 else {
        CommandRunnerKilled=true;
      }
    }
 catch (    APIException aex) {
      Logger.debug("String_Node_Str");
      aex.printStackTrace();
    }
    try {
      if (null != session) {
        session.release(true);
        SessionKilled=true;
      }
 else {
        SessionKilled=true;
      }
    }
 catch (    APIException aex) {
      Logger.debug("String_Node_Str");
      aex.printStackTrace();
    }
catch (    IOException ioe) {
      Logger.debug("String_Node_Str");
      ioe.printStackTrace();
    }
    if (null != ip) {
      ip.release();
      IntegrationPointKilled=true;
    }
 else {
      IntegrationPointKilled=true;
    }
    if (CommandRunnerKilled && SessionKilled && IntegrationPointKilled) {
      terminated=true;
      Logger.debug("String_Node_Str" + userName + "String_Node_Str"+ hostName+ "String_Node_Str"+ port);
    }
  }
}

Fixed version (ground truth):
/** 
 * Terminate the API Session and Integration Point
 */
public void Terminate(){
  boolean cmdRunnerKilled=false;
  boolean sessionKilled=false;
  boolean intPointKilled=false;
  if (!terminated) {
    try {
      if (null != icr) {
        if (!icr.isFinished()) {
          icr.interrupt();
        }
        icr.release();
        cmdRunnerKilled=true;
      }
 else {
        cmdRunnerKilled=true;
      }
    }
 catch (    APIException aex) {
      Logger.debug("String_Node_Str");
      aex.printStackTrace();
    }
    try {
      if (null != session) {
        session.release(true);
        sessionKilled=true;
      }
 else {
        sessionKilled=true;
      }
    }
 catch (    APIException aex) {
      Logger.debug("String_Node_Str");
      aex.printStackTrace();
    }
catch (    IOException ioe) {
      Logger.debug("String_Node_Str");
      ioe.printStackTrace();
    }
    if (null != ip) {
      ip.release();
      intPointKilled=true;
    }
 else {
      intPointKilled=true;
    }
    if (cmdRunnerKilled && sessionKilled && intPointKilled) {
      terminated=true;
      Logger.debug("String_Node_Str" + userName + "String_Node_Str"+ hostName+ "String_Node_Str"+ port);
    }
 else {
      Logger.warn("String_Node_Str" + userName + "String_Node_Str"+ hostName+ "String_Node_Str"+ port);
    }
  }
}
Program: 7241
Project: 7241
Buggy source:
public Void call() throws IOException, APIException {
  APISession api=apiSession.get();
  Logger.debug("String_Node_Str" + openFileHandler.get());
  if (openFileHandler.get() >= CHECKOUT_TRESHOLD) {
    Logger.debug("String_Node_Str" + api.toString() + "String_Node_Str");
    api.refreshAPISession();
    openFileHandler.set(1);
  }
  Logger.debug("String_Node_Str" + api.toString());
  IntegrityCMMember.checkout(api,configPath,memberID,memberRev,targetFile,restoreTimestamp,lineTerminator);
  openFileHandler.set(openFileHandler.get() + 1);
  if (calculateChecksum) {
    checksumHash.put(memberName,IntegrityCMMember.getMD5Checksum(targetFile));
  }
  return null;
}

Fixed version (ground truth):
public Void call() throws Exception {
  APISession api=apiSession.get();
  if (null != api) {
    Logger.debug("String_Node_Str" + openFileHandler.get());
    if (openFileHandler.get() >= CHECKOUT_TRESHOLD) {
      Logger.debug("String_Node_Str" + api.toString() + "String_Node_Str");
      api.refreshAPISession();
      openFileHandler.set(1);
    }
    Logger.debug("String_Node_Str" + api.toString());
    try {
      IntegrityCMMember.checkout(api,configPath,memberID,memberRev,targetFile,restoreTimestamp,lineTerminator);
    }
 catch (    APIException aex) {
      Logger.error("String_Node_Str");
      ExceptionHandler eh=new ExceptionHandler(aex);
      Logger.error(eh.getMessage());
      Logger.debug(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
      throw new Exception(eh.getMessage());
    }
    openFileHandler.set(openFileHandler.get() + 1);
    if (calculateChecksum) {
      checksumHash.put(memberName,IntegrityCMMember.getMD5Checksum(targetFile));
    }
  }
 else {
    throw new Exception("String_Node_Str");
  }
  return null;
}
Program: 7243
Project: 7243
Buggy source:
/** 
 * Returns an initial APISession for this thread
 */
@Override protected APISession initialValue(){
  APISession api=APISession.create(integrityConfig);
  sessions.add(api);
  return api;
}

Fixed version (ground truth):
/** 
 * Returns an initial APISession for this thread
 */
@Override protected APISession initialValue(){
  APISession api=APISession.create(integrityConfig);
  if (null != api) {
    sessions.add(api);
    return api;
  }
 else {
    return null;
  }
}
Program: 7245
Project: 7245
Buggy source:
/** 
 * Toggles whether or not this needs to run after build is finalized
 */
@Override public boolean needsToRunAfterFinalized(){
  return true;
}

Fixed version (ground truth):
/** 
 * Toggles whether or not this needs to run after build is finalized Returning false, so that a check-in failure will cause a failed build
 */
@Override public boolean needsToRunAfterFinalized(){
  return false;
}
Program: 7246
Project: 7246
Buggy source:
protected DescriptorImpl(){
  super(IntegritySCM.class,IntegrityRepositoryBrowser.class);
  defaultHostName=Util.getHostName();
  defaultIPHostName="String_Node_Str";
  defaultPort=7001;
  defaultIPPort=0;
  defaultSecure=false;
  defaultUserName="String_Node_Str";
  defaultPassword="String_Node_Str";
  load();
  DerbyUtils.setDerbySystemDir(Hudson.getInstance().getRootDir());
  DerbyUtils.loadDerbyDriver();
  Logger.debug("String_Node_Str");
}

Fixed version (ground truth):
protected DescriptorImpl(){
  super(IntegritySCM.class,IntegrityRepositoryBrowser.class);
  defaultHostName=Util.getHostName();
  defaultIPHostName="String_Node_Str";
  defaultPort=7001;
  defaultIPPort=0;
  defaultSecure=false;
  defaultUserName="String_Node_Str";
  defaultPassword="String_Node_Str";
  defaultTagName="String_Node_Str";
  load();
  DerbyUtils.setDerbySystemDir(Hudson.getInstance().getRootDir());
  DerbyUtils.loadDerbyDriver();
  Logger.debug("String_Node_Str");
}