nus-yam/ex-repair huggingface dataset:
Program: 60899
Project: 60899
Buggy source:
public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null)   return false;
  if (!(o instanceof Reference))   return false;
  Reference r=(Reference)o;
  if (splitkey != null && r.splitkey == null)   return false;
  if (splitkey == null && r.splitkey != null)   return false;
  if (splitkey != null && !Arrays.equals(splitkey,r.splitkey))   return false;
  return region.equals(r.region);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null)   return false;
  if (!(o instanceof Reference))   return false;
  Reference r=(Reference)o;
  if (splitkey != null && r.splitkey == null)   return false;
  if (splitkey == null && r.splitkey != null)   return false;
  if (splitkey != null && !Arrays.equals(splitkey,r.splitkey))   return false;
  return region.equals(r.region);
}
Program: 60900
Project: 60900
Buggy source:
public int getQueueSize(){
  return pool.getQueue().size();
}

Fixed version (ground truth):
@Override public int getQueueSize(){
  return pool.getQueue().size();
}
Program: 60901
Project: 60901
Buggy source:
public Thread newThread(Runnable r){
  Thread t=new Thread(group,r,namePrefix + threadNumber.getAndIncrement(),0);
  if (!t.isDaemon()) {
    t.setDaemon(true);
  }
  if (t.getPriority() != Thread.NORM_PRIORITY) {
    t.setPriority(Thread.NORM_PRIORITY);
  }
  return t;
}

Fixed version (ground truth):
@Override public Thread newThread(Runnable r){
  Thread t=new Thread(group,r,namePrefix + threadNumber.getAndIncrement(),0);
  if (!t.isDaemon()) {
    t.setDaemon(true);
  }
  if (t.getPriority() != Thread.NORM_PRIORITY) {
    t.setPriority(Thread.NORM_PRIORITY);
  }
  return t;
}
Program: 60902
Project: 60902
Buggy source:
public void setMaxQueueSize(int newSize){
  this.maxQueueSize=newSize;
}

Fixed version (ground truth):
@Override public void setMaxQueueSize(int newSize){
  this.maxQueueSize=newSize;
}
Program: 60903
Project: 60903
Buggy source:
public void setMaxPoolSize(int newMaxSize){
  pool.setMaximumPoolSize(newMaxSize);
}

Fixed version (ground truth):
@Override public void setMaxPoolSize(int newMaxSize){
  pool.setMaximumPoolSize(newMaxSize);
}
Program: 60904
Project: 60904
Buggy source:
public long getPoolCompletedTaskCount(){
  return pool.getCompletedTaskCount();
}

Fixed version (ground truth):
@Override public long getPoolCompletedTaskCount(){
  return pool.getCompletedTaskCount();
}
Program: 60905
Project: 60905
Buggy source:
public int getMaxQueueSize(){
  return this.maxQueueSize;
}

Fixed version (ground truth):
@Override public int getMaxQueueSize(){
  return this.maxQueueSize;
}
Program: 60906
Project: 60906
Buggy source:
public int getCorePoolSize(){
  return pool.getCorePoolSize();
}

Fixed version (ground truth):
@Override public int getCorePoolSize(){
  return pool.getCorePoolSize();
}
Program: 60907
Project: 60907
Buggy source:
public long getTotalIncrements(){
  return totalIncrements.sum();
}

Fixed version (ground truth):
@Override public long getTotalIncrements(){
  return totalIncrements.sum();
}
Program: 60908
Project: 60908
Buggy source:
public long getSuccessfulCoalescings(){
  return successfulCoalescings.sum();
}

Fixed version (ground truth):
@Override public long getSuccessfulCoalescings(){
  return successfulCoalescings.sum();
}
Program: 60909
Project: 60909
Buggy source:
public long getPoolTaskCount(){
  return pool.getTaskCount();
}

Fixed version (ground truth):
@Override public long getPoolTaskCount(){
  return pool.getTaskCount();
}
Program: 60910
Project: 60910
Buggy source:
public int getMaxPoolSize(){
  return pool.getMaximumPoolSize();
}

Fixed version (ground truth):
@Override public int getMaxPoolSize(){
  return pool.getMaximumPoolSize();
}
Program: 60911
Project: 60911
Buggy source:
public int getPoolLargestPoolSize(){
  return pool.getLargestPoolSize();
}

Fixed version (ground truth):
@Override public int getPoolLargestPoolSize(){
  return pool.getLargestPoolSize();
}
Program: 60912
Project: 60912
Buggy source:
public long getCountersMapSize(){
  return countersMap.size();
}

Fixed version (ground truth):
@Override public long getCountersMapSize(){
  return countersMap.size();
}
Program: 60913
Project: 60913
Buggy source:
public long getFailedIncrements(){
  return failedIncrements.sum();
}

Fixed version (ground truth):
@Override public long getFailedIncrements(){
  return failedIncrements.sum();
}
Program: 60914
Project: 60914
Buggy source:
public void setCorePoolSize(int newCoreSize){
  pool.setCorePoolSize(newCoreSize);
}

Fixed version (ground truth):
@Override public void setCorePoolSize(int newCoreSize){
  pool.setCorePoolSize(newCoreSize);
}
Program: 60915
Project: 60915
Buggy source:
/** 
 * Loops on processing a client forever
 */
public void run(){
  TProcessor processor=null;
  TTransport inputTransport=null;
  TTransport outputTransport=null;
  TProtocol inputProtocol=null;
  TProtocol outputProtocol=null;
  try {
    processor=processorFactory_.getProcessor(client);
    inputTransport=inputTransportFactory_.getTransport(client);
    outputTransport=outputTransportFactory_.getTransport(client);
    inputProtocol=inputProtocolFactory_.getProtocol(inputTransport);
    outputProtocol=outputProtocolFactory_.getProtocol(outputTransport);
    while (!stopped && processor.process(inputProtocol,outputProtocol)) {
    }
  }
 catch (  TTransportException ttx) {
  }
catch (  TException tx) {
    LOG.error("String_Node_Str",tx);
  }
catch (  Exception x) {
    LOG.error("String_Node_Str",x);
  }
  if (inputTransport != null) {
    inputTransport.close();
  }
  if (outputTransport != null) {
    outputTransport.close();
  }
}

Fixed version (ground truth):
/** 
 * Loops on processing a client forever
 */
@Override public void run(){
  TProcessor processor=null;
  TTransport inputTransport=null;
  TTransport outputTransport=null;
  TProtocol inputProtocol=null;
  TProtocol outputProtocol=null;
  try {
    processor=processorFactory_.getProcessor(client);
    inputTransport=inputTransportFactory_.getTransport(client);
    outputTransport=outputTransportFactory_.getTransport(client);
    inputProtocol=inputProtocolFactory_.getProtocol(inputTransport);
    outputProtocol=outputProtocolFactory_.getProtocol(outputTransport);
    while (!stopped && processor.process(inputProtocol,outputProtocol)) {
    }
  }
 catch (  TTransportException ttx) {
  }
catch (  TException tx) {
    LOG.error("String_Node_Str",tx);
  }
catch (  Exception x) {
    LOG.error("String_Node_Str",x);
  }
  if (inputTransport != null) {
    inputTransport.close();
  }
  if (outputTransport != null) {
    outputTransport.close();
  }
}
Program: 60916
Project: 60916
Buggy source:
public void serve(){
  try {
    serverTransport_.listen();
  }
 catch (  TTransportException ttx) {
    LOG.error("String_Node_Str",ttx);
    return;
  }
  Runtime.getRuntime().addShutdownHook(new Thread(getClass().getSimpleName() + "String_Node_Str"){
    @Override public void run(){
      TBoundedThreadPoolServer.this.stop();
    }
  }
);
  stopped=false;
  while (!stopped && !Thread.interrupted()) {
    TTransport client=null;
    try {
      client=serverTransport_.accept();
    }
 catch (    TTransportException ttx) {
      if (!stopped) {
        LOG.warn("String_Node_Str",ttx);
        continue;
      }
 else {
        break;
      }
    }
    ClientConnnection command=new ClientConnnection(client);
    try {
      executorService.execute(command);
    }
 catch (    RejectedExecutionException rex) {
      if (client.getClass() == TSocket.class) {
        LOG.warn(QUEUE_FULL_MSG + "String_Node_Str" + ((TSocket)client).getSocket().getRemoteSocketAddress());
      }
 else {
        LOG.warn(QUEUE_FULL_MSG,rex);
      }
      client.close();
    }
  }
  shutdownServer();
}

Fixed version (ground truth):
@Override public void serve(){
  try {
    serverTransport_.listen();
  }
 catch (  TTransportException ttx) {
    LOG.error("String_Node_Str",ttx);
    return;
  }
  Runtime.getRuntime().addShutdownHook(new Thread(getClass().getSimpleName() + "String_Node_Str"){
    @Override public void run(){
      TBoundedThreadPoolServer.this.stop();
    }
  }
);
  stopped=false;
  while (!stopped && !Thread.interrupted()) {
    TTransport client=null;
    try {
      client=serverTransport_.accept();
    }
 catch (    TTransportException ttx) {
      if (!stopped) {
        LOG.warn("String_Node_Str",ttx);
        continue;
      }
 else {
        break;
      }
    }
    ClientConnnection command=new ClientConnnection(client);
    try {
      executorService.execute(command);
    }
 catch (    RejectedExecutionException rex) {
      if (client.getClass() == TSocket.class) {
        LOG.warn(QUEUE_FULL_MSG + "String_Node_Str" + ((TSocket)client).getSocket().getRemoteSocketAddress());
      }
 else {
        LOG.warn(QUEUE_FULL_MSG,rex);
      }
      client.close();
    }
  }
  shutdownServer();
}
Program: 60917
Project: 60917
Buggy source:
@Override public Throwable getCause(){
  return cause;
}

Fixed version (ground truth):
@Override public synchronized Throwable getCause(){
  return cause;
}
Program: 60918
Project: 60918
Buggy source:
@Override public Throwable getCause(){
  return cause;
}

Fixed version (ground truth):
@Override public synchronized Throwable getCause(){
  return cause;
}
Program: 60919
Project: 60919
Buggy source:
@Parameters public static Collection<Object[]> getParameters(){
  Collection<Object[]> parameters=new ArrayList<>();
  for (  int elementsAdded : new int[]{100,200,300}) {
    for (    int elementsRemoved : new int[]{0,20,100}) {
      parameters.add(new Object[]{new Integer(elementsAdded),new Integer(elementsRemoved)});
    }
  }
  return parameters;
}

Fixed version (ground truth):
@Parameters public static Collection<Object[]> getParameters(){
  Collection<Object[]> parameters=new ArrayList<>();
  for (  int elementsAdded : new int[]{100,200,300}) {
    for (    int elementsRemoved : new int[]{0,20,100}) {
      parameters.add(new Object[]{elementsAdded,elementsRemoved});
    }
  }
  return parameters;
}
Program: 60920
Project: 60920
Buggy source:
public static void dropTestTables(Hbase.Iface handler) throws Exception {
  handler.disableTable(tableBname);
  assertFalse(handler.isTableEnabled(tableBname));
  handler.deleteTable(tableBname);
  assertEquals(handler.getTableNames().size(),1);
  handler.disableTable(tableAname);
  assertFalse(handler.isTableEnabled(tableAname));
  handler.deleteTable(tableAname);
  assertEquals(handler.getTableNames().size(),0);
}

Fixed version (ground truth):
public static void dropTestTables(Hbase.Iface handler) throws Exception {
  handler.disableTable(tableBname);
  assertFalse(handler.isTableEnabled(tableBname));
  handler.deleteTable(tableBname);
  assertEquals(1,handler.getTableNames().size());
  handler.disableTable(tableAname);
  assertFalse(handler.isTableEnabled(tableAname));
  handler.deleteTable(tableAname);
  assertEquals(0,handler.getTableNames().size());
}
Program: 60921
Project: 60921
Buggy source:
public static void createTestTables(Hbase.Iface handler) throws Exception {
  assertEquals(handler.getTableNames().size(),0);
  handler.createTable(tableAname,getColumnDescriptors());
  assertEquals(handler.getTableNames().size(),1);
  assertEquals(handler.getColumnDescriptors(tableAname).size(),2);
  assertTrue(handler.isTableEnabled(tableAname));
  handler.createTable(tableBname,getColumnDescriptors());
  assertEquals(handler.getTableNames().size(),2);
}

Fixed version (ground truth):
public static void createTestTables(Hbase.Iface handler) throws Exception {
  assertEquals(0,handler.getTableNames().size());
  handler.createTable(tableAname,getColumnDescriptors());
  assertEquals(1,handler.getTableNames().size());
  assertEquals(2,handler.getColumnDescriptors(tableAname).size());
  assertTrue(handler.isTableEnabled(tableAname));
  handler.createTable(tableBname,getColumnDescriptors());
  assertEquals(2,handler.getTableNames().size());
}
Program: 60923
Project: 60923
Buggy source:
public static void doTestGetTableRegions(Hbase.Iface handler) throws Exception {
  assertEquals(handler.getTableNames().size(),0);
  handler.createTable(tableAname,getColumnDescriptors());
  assertEquals(handler.getTableNames().size(),1);
  List<TRegionInfo> regions=handler.getTableRegions(tableAname);
  int regionCount=regions.size();
  assertEquals("String_Node_Str" + "String_Node_Str" + regionCount,regionCount,1);
  LOG.info("String_Node_Str" + regions.get(0));
  handler.disableTable(tableAname);
  handler.deleteTable(tableAname);
  regionCount=handler.getTableRegions(tableAname).size();
  assertEquals("String_Node_Str" + "String_Node_Str" + regionCount,regionCount,0);
}

Fixed version (ground truth):
public static void doTestGetTableRegions(Hbase.Iface handler) throws Exception {
  assertEquals(0,handler.getTableNames().size());
  handler.createTable(tableAname,getColumnDescriptors());
  assertEquals(1,handler.getTableNames().size());
  List<TRegionInfo> regions=handler.getTableRegions(tableAname);
  int regionCount=regions.size();
  assertEquals("String_Node_Str" + "String_Node_Str" + regionCount,1,regionCount);
  LOG.info("String_Node_Str" + regions.get(0));
  handler.disableTable(tableAname);
  handler.deleteTable(tableAname);
  regionCount=handler.getTableRegions(tableAname).size();
  assertEquals("String_Node_Str" + "String_Node_Str" + regionCount,0,regionCount);
}
Program: 60925
Project: 60925
Buggy source:
public Cell next(){
  if (cache != null) {
    Cell kv=cache;
    cache=null;
    return kv;
  }
  if (valuesI == null) {
    return null;
  }
  try {
    return valuesI.next();
  }
 catch (  NoSuchElementException e) {
    return null;
  }
}

Fixed version (ground truth):
@Override public Cell next(){
  if (cache != null) {
    Cell kv=cache;
    cache=null;
    return kv;
  }
  if (valuesI == null) {
    return null;
  }
  try {
    return valuesI.next();
  }
 catch (  NoSuchElementException e) {
    return null;
  }
}
Program: 60926
Project: 60926
Buggy source:
public void putBack(Cell kv){
  this.cache=kv;
}

Fixed version (ground truth):
@Override public void putBack(Cell kv){
  this.cache=kv;
}
Program: 60927
Project: 60927
Buggy source:
public boolean hasNext(){
  if (cache != null) {
    return true;
  }
  if (valuesI == null) {
    return false;
  }
  return valuesI.hasNext();
}

Fixed version (ground truth):
@Override public boolean hasNext(){
  if (cache != null) {
    return true;
  }
  if (valuesI == null) {
    return false;
  }
  return valuesI.hasNext();
}
Program: 60928
Project: 60928
Buggy source:
public void close(){
}

Fixed version (ground truth):
@Override public void close(){
}
Program: 60929
Project: 60929
Buggy source:
public void remove(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void remove(){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 60930
Project: 60930
Buggy source:
public String toString(){
  StringBuilder result=new StringBuilder();
  result.append("String_Node_Str");
  if (row != null) {
    result.append(Bytes.toString(row));
  }
  result.append("String_Node_Str");
  if (endRow != null) {
    result.append(Bytes.toString(endRow));
  }
  result.append("String_Node_Str");
  for (  byte[] col : columns) {
    result.append("String_Node_Str");
    result.append(Bytes.toString(col));
    result.append("String_Node_Str");
  }
  result.append("String_Node_Str");
  result.append(Long.toString(startTime));
  result.append("String_Node_Str");
  result.append(Long.toString(endTime));
  result.append("String_Node_Str");
  result.append(Integer.toString(maxVersions));
  result.append("String_Node_Str");
  result.append(Integer.toString(maxValues));
  result.append("String_Node_Str");
  return result.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder result=new StringBuilder();
  result.append("String_Node_Str");
  if (row != null) {
    result.append(Bytes.toString(row));
  }
  result.append("String_Node_Str");
  if (endRow != null) {
    result.append(Bytes.toString(endRow));
  }
  result.append("String_Node_Str");
  for (  byte[] col : columns) {
    result.append("String_Node_Str");
    result.append(Bytes.toString(col));
    result.append("String_Node_Str");
  }
  result.append("String_Node_Str");
  result.append(Long.toString(startTime));
  result.append("String_Node_Str");
  result.append(Long.toString(endTime));
  result.append("String_Node_Str");
  result.append(Integer.toString(maxVersions));
  result.append("String_Node_Str");
  result.append(Integer.toString(maxValues));
  result.append("String_Node_Str");
  return result.toString();
}
Program: 60931
Project: 60931
Buggy source:
public Cell next(){
  if (cache != null) {
    Cell kv=cache;
    cache=null;
    return kv;
  }
  boolean loop;
  do {
    loop=false;
    if (rowI != null) {
      if (rowI.hasNext()) {
        return rowI.next();
      }
 else {
        rowI=null;
      }
    }
    if (cached != null) {
      rowI=cached.listCells().iterator();
      loop=true;
      cached=null;
    }
 else {
      Result result=null;
      try {
        result=scanner.next();
      }
 catch (      UnknownScannerException e) {
        throw new IllegalArgumentException(e);
      }
catch (      TableNotEnabledException tnee) {
        throw new IllegalStateException(tnee);
      }
catch (      TableNotFoundException tnfe) {
        throw new IllegalArgumentException(tnfe);
      }
catch (      IOException e) {
        LOG.error(StringUtils.stringifyException(e));
      }
      if (result != null && !result.isEmpty()) {
        rowI=result.listCells().iterator();
        loop=true;
      }
    }
  }
 while (loop);
  return null;
}

Fixed version (ground truth):
@Override public Cell next(){
  if (cache != null) {
    Cell kv=cache;
    cache=null;
    return kv;
  }
  boolean loop;
  do {
    loop=false;
    if (rowI != null) {
      if (rowI.hasNext()) {
        return rowI.next();
      }
 else {
        rowI=null;
      }
    }
    if (cached != null) {
      rowI=cached.listCells().iterator();
      loop=true;
      cached=null;
    }
 else {
      Result result=null;
      try {
        result=scanner.next();
      }
 catch (      UnknownScannerException e) {
        throw new IllegalArgumentException(e);
      }
catch (      TableNotEnabledException tnee) {
        throw new IllegalStateException(tnee);
      }
catch (      TableNotFoundException tnfe) {
        throw new IllegalArgumentException(tnfe);
      }
catch (      IOException e) {
        LOG.error(StringUtils.stringifyException(e));
      }
      if (result != null && !result.isEmpty()) {
        rowI=result.listCells().iterator();
        loop=true;
      }
    }
  }
 while (loop);
  return null;
}
Program: 60932
Project: 60932
Buggy source:
public void putBack(Cell kv){
  this.cache=kv;
}

Fixed version (ground truth):
@Override public void putBack(Cell kv){
  this.cache=kv;
}
Program: 60933
Project: 60933
Buggy source:
public boolean hasNext(){
  if (cache != null) {
    return true;
  }
  if (rowI != null && rowI.hasNext()) {
    return true;
  }
  if (cached != null) {
    return true;
  }
  try {
    Result result=scanner.next();
    if (result != null && !result.isEmpty()) {
      cached=result;
    }
  }
 catch (  UnknownScannerException e) {
    throw new IllegalArgumentException(e);
  }
catch (  IOException e) {
    LOG.error(StringUtils.stringifyException(e));
  }
  return cached != null;
}

Fixed version (ground truth):
@Override public boolean hasNext(){
  if (cache != null) {
    return true;
  }
  if (rowI != null && rowI.hasNext()) {
    return true;
  }
  if (cached != null) {
    return true;
  }
  try {
    Result result=scanner.next();
    if (result != null && !result.isEmpty()) {
      cached=result;
    }
  }
 catch (  UnknownScannerException e) {
    throw new IllegalArgumentException(e);
  }
catch (  IOException e) {
    LOG.error(StringUtils.stringifyException(e));
  }
  return cached != null;
}
Program: 60934
Project: 60934
Buggy source:
public void close(){
  if (scanner != null) {
    scanner.close();
    scanner=null;
  }
}

Fixed version (ground truth):
@Override public void close(){
  if (scanner != null) {
    scanner.close();
    scanner=null;
  }
}
Program: 60935
Project: 60935
Buggy source:
public void remove(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void remove(){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 60936
Project: 60936
Buggy source:
@Override public ProtobufMessageHandler readFrom(Class<ProtobufMessageHandler> type,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,String> httpHeaders,InputStream inputStream) throws IOException, WebApplicationException {
  ProtobufMessageHandler obj=null;
  try {
    obj=type.newInstance();
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    byte[] buffer=new byte[4096];
    int read;
    do {
      read=inputStream.read(buffer,0,buffer.length);
      if (read > 0) {
        baos.write(buffer,0,read);
      }
    }
 while (read > 0);
    if (LOG.isTraceEnabled()) {
      LOG.trace(getClass() + "String_Node_Str" + baos.size()+ "String_Node_Str"+ inputStream);
    }
    obj=obj.getObjectFromMessage(baos.toByteArray());
  }
 catch (  InstantiationException e) {
    throw new WebApplicationException(e);
  }
catch (  IllegalAccessException e) {
    throw new WebApplicationException(e);
  }
  return obj;
}

Fixed version (ground truth):
@Override public ProtobufMessageHandler readFrom(Class<ProtobufMessageHandler> type,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,String> httpHeaders,InputStream inputStream) throws IOException, WebApplicationException {
  ProtobufMessageHandler obj=null;
  try {
    obj=type.getDeclaredConstructor().newInstance();
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    byte[] buffer=new byte[4096];
    int read;
    do {
      read=inputStream.read(buffer,0,buffer.length);
      if (read > 0) {
        baos.write(buffer,0,read);
      }
    }
 while (read > 0);
    if (LOG.isTraceEnabled()) {
      LOG.trace(getClass() + "String_Node_Str" + baos.size()+ "String_Node_Str"+ inputStream);
    }
    obj=obj.getObjectFromMessage(baos.toByteArray());
  }
 catch (  InstantiationException|NoSuchMethodException|InvocationTargetException|IllegalAccessException e) {
    throw new WebApplicationException(e);
  }
  return obj;
}
Program: 60937
Project: 60937
Buggy source:
@Override public void writeTo(Object object,Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,Object> httpHeaders,OutputStream outStream) throws IOException, WebApplicationException {
  outStream.write(object.toString().getBytes());
}

Fixed version (ground truth):
@Override public void writeTo(Object object,Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,Object> httpHeaders,OutputStream outStream) throws IOException, WebApplicationException {
  outStream.write(Bytes.toBytes(object.toString()));
}
Program: 60938
Project: 60938
Buggy source:
public void writeTo(ProtobufMessageHandler m,Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,Object> httpHeaders,OutputStream entityStream) throws IOException, WebApplicationException {
  entityStream.write(m.createProtobufOutput());
}

Fixed version (ground truth):
@Override public void writeTo(ProtobufMessageHandler m,Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType,MultivaluedMap<String,Object> httpHeaders,OutputStream entityStream) throws IOException, WebApplicationException {
  entityStream.write(m.createProtobufOutput());
}
Program: 60939
Project: 60939
Buggy source:
protected static void checkIncrementValueJSON(String table,String row,String column,long value) throws IOException, JAXBException {
  Response response=getValueJson(table,row,column);
  assertEquals(response.getCode(),200);
  assertEquals(Constants.MIMETYPE_JSON,response.getHeader("String_Node_Str"));
  ObjectMapper mapper=new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class,MediaType.APPLICATION_JSON_TYPE);
  CellSetModel cellSet=mapper.readValue(response.getBody(),CellSetModel.class);
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toLong(cell.getValue()),value);
}

Fixed version (ground truth):
protected static void checkIncrementValueJSON(String table,String row,String column,long value) throws IOException, JAXBException {
  Response response=getValueJson(table,row,column);
  assertEquals(200,response.getCode());
  assertEquals(Constants.MIMETYPE_JSON,response.getHeader("String_Node_Str"));
  ObjectMapper mapper=new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class,MediaType.APPLICATION_JSON_TYPE);
  CellSetModel cellSet=mapper.readValue(response.getBody(),CellSetModel.class);
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toLong(cell.getValue()),value);
}
Program: 60940
Project: 60940
Buggy source:
protected static void checkValuePB(String table,String row,String column,String value) throws IOException {
  Response response=getValuePB(table,row,column);
  assertEquals(response.getCode(),200);
  assertEquals(Constants.MIMETYPE_PROTOBUF,response.getHeader("String_Node_Str"));
  CellSetModel cellSet=new CellSetModel();
  cellSet.getObjectFromMessage(response.getBody());
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toString(cell.getValue()),value);
}

Fixed version (ground truth):
protected static void checkValuePB(String table,String row,String column,String value) throws IOException {
  Response response=getValuePB(table,row,column);
  assertEquals(200,response.getCode());
  assertEquals(Constants.MIMETYPE_PROTOBUF,response.getHeader("String_Node_Str"));
  CellSetModel cellSet=new CellSetModel();
  cellSet.getObjectFromMessage(response.getBody());
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toString(cell.getValue()),value);
}
Program: 60941
Project: 60941
Buggy source:
protected static void checkValueXML(String table,String row,String column,String value) throws IOException, JAXBException {
  Response response=getValueXML(table,row,column);
  assertEquals(response.getCode(),200);
  assertEquals(Constants.MIMETYPE_XML,response.getHeader("String_Node_Str"));
  CellSetModel cellSet=(CellSetModel)xmlUnmarshaller.unmarshal(new ByteArrayInputStream(response.getBody()));
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toString(cell.getValue()),value);
}

Fixed version (ground truth):
protected static void checkValueXML(String table,String row,String column,String value) throws IOException, JAXBException {
  Response response=getValueXML(table,row,column);
  assertEquals(200,response.getCode());
  assertEquals(Constants.MIMETYPE_XML,response.getHeader("String_Node_Str"));
  CellSetModel cellSet=(CellSetModel)xmlUnmarshaller.unmarshal(new ByteArrayInputStream(response.getBody()));
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toString(cell.getValue()),value);
}
Program: 60942
Project: 60942
Buggy source:
protected static void checkIncrementValuePB(String table,String row,String column,long value) throws IOException {
  Response response=getValuePB(table,row,column);
  assertEquals(response.getCode(),200);
  assertEquals(Constants.MIMETYPE_PROTOBUF,response.getHeader("String_Node_Str"));
  CellSetModel cellSet=new CellSetModel();
  cellSet.getObjectFromMessage(response.getBody());
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toLong(cell.getValue()),value);
}

Fixed version (ground truth):
protected static void checkIncrementValuePB(String table,String row,String column,long value) throws IOException {
  Response response=getValuePB(table,row,column);
  assertEquals(200,response.getCode());
  assertEquals(Constants.MIMETYPE_PROTOBUF,response.getHeader("String_Node_Str"));
  CellSetModel cellSet=new CellSetModel();
  cellSet.getObjectFromMessage(response.getBody());
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toLong(cell.getValue()),value);
}
Program: 60943
Project: 60943
Buggy source:
protected static void checkValueJSON(String table,String row,String column,String value) throws IOException, JAXBException {
  Response response=getValueJson(table,row,column);
  assertEquals(response.getCode(),200);
  assertEquals(Constants.MIMETYPE_JSON,response.getHeader("String_Node_Str"));
  ObjectMapper mapper=new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class,MediaType.APPLICATION_JSON_TYPE);
  CellSetModel cellSet=mapper.readValue(response.getBody(),CellSetModel.class);
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toString(cell.getValue()),value);
}

Fixed version (ground truth):
protected static void checkValueJSON(String table,String row,String column,String value) throws IOException, JAXBException {
  Response response=getValueJson(table,row,column);
  assertEquals(200,response.getCode());
  assertEquals(Constants.MIMETYPE_JSON,response.getHeader("String_Node_Str"));
  ObjectMapper mapper=new JacksonJaxbJsonProvider().locateMapper(CellSetModel.class,MediaType.APPLICATION_JSON_TYPE);
  CellSetModel cellSet=mapper.readValue(response.getBody(),CellSetModel.class);
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toString(cell.getValue()),value);
}
Program: 60944
Project: 60944
Buggy source:
protected static void checkIncrementValueXML(String table,String row,String column,long value) throws IOException, JAXBException {
  Response response1=getValueXML(table,row,column);
  assertEquals(response1.getCode(),200);
  assertEquals(Constants.MIMETYPE_XML,response1.getHeader("String_Node_Str"));
  CellSetModel cellSet=(CellSetModel)xmlUnmarshaller.unmarshal(new ByteArrayInputStream(response1.getBody()));
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toLong(cell.getValue()),value);
}

Fixed version (ground truth):
protected static void checkIncrementValueXML(String table,String row,String column,long value) throws IOException, JAXBException {
  Response response1=getValueXML(table,row,column);
  assertEquals(200,response1.getCode());
  assertEquals(Constants.MIMETYPE_XML,response1.getHeader("String_Node_Str"));
  CellSetModel cellSet=(CellSetModel)xmlUnmarshaller.unmarshal(new ByteArrayInputStream(response1.getBody()));
  RowModel rowModel=cellSet.getRows().get(0);
  CellModel cell=rowModel.getCells().get(0);
  assertEquals(Bytes.toString(cell.getColumn()),column);
  assertEquals(Bytes.toLong(cell.getValue()),value);
}
Program: 60945
Project: 60945
Buggy source:
@Test public void testDeleteXML() throws IOException, JAXBException {
  Response response=putValueXML(TABLE,ROW_1,COLUMN_1,VALUE_1);
  assertEquals(response.getCode(),200);
  response=putValueXML(TABLE,ROW_1,COLUMN_2,VALUE_2);
  assertEquals(response.getCode(),200);
  checkValueXML(TABLE,ROW_1,COLUMN_1,VALUE_1);
  checkValueXML(TABLE,ROW_1,COLUMN_2,VALUE_2);
  response=deleteValue(TABLE,ROW_1,COLUMN_1);
  assertEquals(response.getCode(),200);
  response=getValueXML(TABLE,ROW_1,COLUMN_1);
  assertEquals(response.getCode(),404);
  checkValueXML(TABLE,ROW_1,COLUMN_2,VALUE_2);
  response=putValueXML(TABLE,ROW_1,COLUMN_1,VALUE_1);
  assertEquals(response.getCode(),200);
  response=checkAndDeletePB(TABLE,ROW_1,COLUMN_1,VALUE_1);
  assertEquals(response.getCode(),200);
  response=getValueXML(TABLE,ROW_1,COLUMN_1);
  assertEquals(response.getCode(),404);
  response=deleteRow(TABLE,ROW_1);
  assertEquals(response.getCode(),200);
  response=getValueXML(TABLE,ROW_1,COLUMN_1);
  assertEquals(response.getCode(),404);
  response=getValueXML(TABLE,ROW_1,COLUMN_2);
  assertEquals(response.getCode(),404);
  response=deleteValue("String_Node_Str",ROW_1,COLUMN_1);
  assertEquals(response.getCode(),404);
  response=deleteValue(TABLE,ROW_1,"String_Node_Str");
  assertEquals(response.getCode(),404);
}

Fixed version (ground truth):
@Test public void testDeleteXML() throws IOException, JAXBException {
  Response response=putValueXML(TABLE,ROW_1,COLUMN_1,VALUE_1);
  assertEquals(200,response.getCode());
  response=putValueXML(TABLE,ROW_1,COLUMN_2,VALUE_2);
  assertEquals(200,response.getCode());
  checkValueXML(TABLE,ROW_1,COLUMN_1,VALUE_1);
  checkValueXML(TABLE,ROW_1,COLUMN_2,VALUE_2);
  response=deleteValue(TABLE,ROW_1,COLUMN_1);
  assertEquals(200,response.getCode());
  response=getValueXML(TABLE,ROW_1,COLUMN_1);
  assertEquals(404,response.getCode());
  checkValueXML(TABLE,ROW_1,COLUMN_2,VALUE_2);
  response=putValueXML(TABLE,ROW_1,COLUMN_1,VALUE_1);
  assertEquals(200,response.getCode());
  response=checkAndDeletePB(TABLE,ROW_1,COLUMN_1,VALUE_1);
  assertEquals(200,response.getCode());
  response=getValueXML(TABLE,ROW_1,COLUMN_1);
  assertEquals(404,response.getCode());
  response=deleteRow(TABLE,ROW_1);
  assertEquals(200,response.getCode());
  response=getValueXML(TABLE,ROW_1,COLUMN_1);
  assertEquals(404,response.getCode());
  response=getValueXML(TABLE,ROW_1,COLUMN_2);
  assertEquals(404,response.getCode());
  response=deleteValue("String_Node_Str",ROW_1,COLUMN_1);
  assertEquals(404,response.getCode());
  response=deleteValue(TABLE,ROW_1,"String_Node_Str");
  assertEquals(404,response.getCode());
}
Program: 60946
Project: 60946
Buggy source:
/** 
 * Cancel copy job
 * @param jobHandler backup copy job handler
 * @throws IOException
 */
void cancel(String jobHandler) throws IOException ;

Fixed version (ground truth):
/** 
 * Cancel copy job
 * @param jobHandler backup copy job handler
 * @throws IOException if cancelling the jobs fails
 */
void cancel(String jobHandler) throws IOException ;
Program: 60947
Project: 60947
Buggy source:
private Set<String> getFilenameFromBulkLoad(Map<byte[],List<Path>>[] maps){
  Set<String> filenames=new HashSet<String>();
  for (  Map<byte[],List<Path>> map : maps) {
    if (map == null)     continue;
    for (    List<Path> paths : map.values()) {
      for (      Path p : paths) {
        filenames.add(p.getName());
      }
    }
  }
  return filenames;
}

Fixed version (ground truth):
private Set<String> getFilenameFromBulkLoad(Map<byte[],List<Path>>[] maps){
  Set<String> filenames=new HashSet<>();
  for (  Map<byte[],List<Path>> map : maps) {
    if (map == null) {
      continue;
    }
    for (    List<Path> paths : map.values()) {
      for (      Path p : paths) {
        filenames.add(p.getName());
      }
    }
  }
  return filenames;
}
Program: 60948
Project: 60948
Buggy source:
@Override public Iterable<FileStatus> getDeletableFiles(Iterable<FileStatus> files){
  if (conf == null) {
    return files;
  }
  if (checkForFullyBackedUpTables) {
    if (connection == null)     return files;
    try (BackupSystemTable tbl=new BackupSystemTable(connection)){
      fullyBackedUpTables=tbl.getTablesForBackupType(BackupType.FULL);
    }
 catch (    IOException ioe) {
      LOG.error("String_Node_Str",ioe);
      return Collections.emptyList();
    }
    Collections.sort(fullyBackedUpTables);
  }
  final Set<String> hfileRefs;
  try {
    hfileRefs=loadHFileRefs(fullyBackedUpTables);
  }
 catch (  IOException ioe) {
    LOG.error("String_Node_Str",ioe);
    return Collections.emptyList();
  }
  Iterable<FileStatus> deletables=Iterables.filter(files,new Predicate<FileStatus>(){
    @Override public boolean apply(    FileStatus file){
      if (file.getModificationTime() > secondPrevReadFromBackupTbl) {
        return false;
      }
      String hfile=file.getPath().getName();
      boolean foundHFileRef=hfileRefs.contains(hfile);
      return !foundHFileRef;
    }
  }
);
  return deletables;
}

Fixed version (ground truth):
@Override public Iterable<FileStatus> getDeletableFiles(Iterable<FileStatus> files){
  if (conf == null) {
    return files;
  }
  if (checkForFullyBackedUpTables) {
    if (connection == null) {
      return files;
    }
    try (BackupSystemTable tbl=new BackupSystemTable(connection)){
      fullyBackedUpTables=tbl.getTablesForBackupType(BackupType.FULL);
    }
 catch (    IOException ioe) {
      LOG.error("String_Node_Str",ioe);
      return Collections.emptyList();
    }
    Collections.sort(fullyBackedUpTables);
  }
  final Set<String> hfileRefs;
  try {
    hfileRefs=loadHFileRefs(fullyBackedUpTables);
  }
 catch (  IOException ioe) {
    LOG.error("String_Node_Str",ioe);
    return Collections.emptyList();
  }
  Iterable<FileStatus> deletables=Iterables.filter(files,file -> {
    if (file.getModificationTime() > secondPrevReadFromBackupTbl) {
      return false;
    }
    String hfile=file.getPath().getName();
    boolean foundHFileRef=hfileRefs.contains(hfile);
    return !foundHFileRef;
  }
);
  return deletables;
}
Program: 60949
Project: 60949
Buggy source:
public List<TableName> getTableNames(){
  return new ArrayList<TableName>(backupTableInfoMap.keySet());
}

Fixed version (ground truth):
public List<TableName> getTableNames(){
  return new ArrayList<>(backupTableInfoMap.keySet());
}
Program: 60950
Project: 60950
Buggy source:
/** 
 * Filter interface
 * @param info backup info
 * @return true if info passes filter, false otherwise
 */
public boolean apply(BackupInfo info);

Fixed version (ground truth):
/** 
 * Filter interface
 * @param info backup info
 * @return true if info passes filter, false otherwise
 */
boolean apply(BackupInfo info);
Program: 60951
Project: 60951
Buggy source:
public List<String> getSnapshotNames(){
  List<String> snapshotNames=new ArrayList<String>();
  for (  BackupTableInfo backupStatus : this.backupTableInfoMap.values()) {
    snapshotNames.add(backupStatus.getSnapshotName());
  }
  return snapshotNames;
}

Fixed version (ground truth):
public List<String> getSnapshotNames(){
  List<String> snapshotNames=new ArrayList<>();
  for (  BackupTableInfo backupStatus : this.backupTableInfoMap.values()) {
    snapshotNames.add(backupStatus.getSnapshotName());
  }
  return snapshotNames;
}
Program: 60952
Project: 60952
Buggy source:
/** 
 * Run backup merge operation
 * @param backupIds backup image ids
 * @throws IOException
 */
void run(String[] backupIds) throws IOException ;

Fixed version (ground truth):
/** 
 * Run backup merge operation.
 * @param backupIds backup image ids
 * @throws IOException if the backup merge operation fails
 */
void run(String[] backupIds) throws IOException ;
Program: 60954
Project: 60954
Buggy source:
public synchronized void dispatch(){
  if (operations != null) {
    remoteDispatch(getKey(),operations);
    this.operations=null;
  }
}

Fixed version (ground truth):
@Override public synchronized void dispatch(){
  if (operations != null) {
    remoteDispatch(getKey(),operations);
    this.operations=null;
  }
}
Program: 60955
Project: 60955
Buggy source:
public synchronized void add(final RemoteProcedure operation){
  if (this.operations == null) {
    this.operations=new HashSet<>();
    setTimeout(EnvironmentEdgeManager.currentTime() + operationDelay);
    timeoutExecutor.add(this);
  }
  this.operations.add(operation);
  if (this.operations.size() > queueMaxSize) {
    timeoutExecutor.remove(this);
    dispatch();
  }
}

Fixed version (ground truth):
@Override public synchronized void add(final RemoteProcedure operation){
  if (this.operations == null) {
    this.operations=new HashSet<>();
    setTimeout(EnvironmentEdgeManager.currentTime() + operationDelay);
    timeoutExecutor.add(this);
  }
  this.operations.add(operation);
  if (this.operations.size() > queueMaxSize) {
    timeoutExecutor.remove(this);
    dispatch();
  }
}
Program: 60956
Project: 60956
Buggy source:
public TRemote getKey(){
  return getObject();
}

Fixed version (ground truth):
@Override public TRemote getKey(){
  return getObject();
}
Program: 60957
Project: 60957
Buggy source:
/** 
 * Pass one or more log file names and formatting options and it will dump out a text version of the contents on <code>stdout</code>.
 * @param args Command line arguments
 * @throws IOException Thrown upon file system errors etc.
 */
public int run(final String[] args) throws IOException {
  Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  final List<Path> files=new ArrayList<>();
  try {
    CommandLine cmd=new PosixParser().parse(options,args);
    if (cmd.hasOption("String_Node_Str")) {
      files.add(new Path(cmd.getOptionValue("String_Node_Str")));
    }
    if (files.isEmpty() || cmd.hasOption("String_Node_Str")) {
      HelpFormatter formatter=new HelpFormatter();
      formatter.printHelp("String_Node_Str",options,true);
      return (-1);
    }
  }
 catch (  ParseException e) {
    e.printStackTrace();
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp("String_Node_Str",options,true);
    return (-1);
  }
  for (  Path file : files) {
    processFile(getConf(),file);
  }
  return (0);
}

Fixed version (ground truth):
/** 
 * Pass one or more log file names and formatting options and it will dump out a text version of the contents on <code>stdout</code>.
 * @param args Command line arguments
 * @throws IOException Thrown upon file system errors etc.
 */
@Override public int run(final String[] args) throws IOException {
  Options options=new Options();
  options.addOption("String_Node_Str","String_Node_Str",false,"String_Node_Str");
  options.addOption("String_Node_Str","String_Node_Str",true,"String_Node_Str");
  final List<Path> files=new ArrayList<>();
  try {
    CommandLine cmd=new PosixParser().parse(options,args);
    if (cmd.hasOption("String_Node_Str")) {
      files.add(new Path(cmd.getOptionValue("String_Node_Str")));
    }
    if (files.isEmpty() || cmd.hasOption("String_Node_Str")) {
      HelpFormatter formatter=new HelpFormatter();
      formatter.printHelp("String_Node_Str",options,true);
      return (-1);
    }
  }
 catch (  ParseException e) {
    e.printStackTrace();
    HelpFormatter formatter=new HelpFormatter();
    formatter.printHelp("String_Node_Str",options,true);
    return (-1);
  }
  for (  Path file : files) {
    processFile(getConf(),file);
  }
  return (0);
}
Program: 60958
Project: 60958
Buggy source:
public void write(byte[] b,int off,int len){
  ensureCapacity(size + len);
  System.arraycopy(b,off,buf,size,len);
  size+=len;
}

Fixed version (ground truth):
@Override public void write(byte[] b,int off,int len){
  ensureCapacity(size + len);
  System.arraycopy(b,off,buf,size,len);
  size+=len;
}
Program: 60959
Project: 60959
Buggy source:
@Override protected boolean setTimeoutFailure(final TestProcEnv env){
  int n=ntimeouts.incrementAndGet();
  LOG.info("String_Node_Str" + this + "String_Node_Str"+ n);
  setState(ProcedureState.RUNNABLE);
  event.wake((AbstractProcedureScheduler)env.getProcedureScheduler());
  return false;
}

Fixed version (ground truth):
@Override protected synchronized boolean setTimeoutFailure(final TestProcEnv env){
  int n=ntimeouts.incrementAndGet();
  LOG.info("String_Node_Str" + this + "String_Node_Str"+ n);
  setState(ProcedureState.RUNNABLE);
  event.wake((AbstractProcedureScheduler)env.getProcedureScheduler());
  return false;
}
Program: 60960
Project: 60960
Buggy source:
@Before public void setUp() throws IOException {
  htu=new HBaseCommonTestingUtility();
  procEnv=new TestProcEnv();
  procStore=new NoopProcedureStore();
  procExecutor=new ProcedureExecutor(htu.getConfiguration(),procEnv,procStore);
  procExecutor.testing=new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS,true);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Before public void setUp() throws IOException {
  htu=new HBaseCommonTestingUtility();
  procEnv=new TestProcEnv();
  procStore=new NoopProcedureStore();
  procExecutor=new ProcedureExecutor(htu.getConfiguration(),procEnv,procStore);
  procExecutor.testing=new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS,true);
}
Program: 60961
Project: 60961
Buggy source:
@Override public void run(){
  for (int i=0; i < nprocPerThread; ++i) {
    try {
      procExecutor.submitProcedure((Procedure)procClazz.newInstance());
    }
 catch (    InstantiationException|IllegalAccessException e) {
      LOG.error("String_Node_Str",e);
      fail("String_Node_Str" + e.getMessage());
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  for (int i=0; i < nprocPerThread; ++i) {
    try {
      procExecutor.submitProcedure((Procedure)procClazz.getDeclaredConstructor().newInstance());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      fail("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 60962
Project: 60962
Buggy source:
private void submitProcedures(final int nthreads,final int nprocPerThread,final Class<?> procClazz) throws Exception {
  Thread[] submitThreads=new Thread[nthreads];
  for (int i=0; i < submitThreads.length; ++i) {
    submitThreads[i]=new Thread(){
      @Override public void run(){
        for (int i=0; i < nprocPerThread; ++i) {
          try {
            procExecutor.submitProcedure((Procedure)procClazz.newInstance());
          }
 catch (          InstantiationException|IllegalAccessException e) {
            LOG.error("String_Node_Str",e);
            fail("String_Node_Str" + e.getMessage());
          }
        }
      }
    }
;
  }
  for (int i=0; i < submitThreads.length; ++i) {
    submitThreads[i].start();
  }
  for (int i=0; i < submitThreads.length; ++i) {
    submitThreads[i].join();
  }
}

Fixed version (ground truth):
private void submitProcedures(final int nthreads,final int nprocPerThread,final Class<?> procClazz) throws Exception {
  Thread[] submitThreads=new Thread[nthreads];
  for (int i=0; i < submitThreads.length; ++i) {
    submitThreads[i]=new Thread(){
      @Override public void run(){
        for (int i=0; i < nprocPerThread; ++i) {
          try {
            procExecutor.submitProcedure((Procedure)procClazz.getDeclaredConstructor().newInstance());
          }
 catch (          Exception e) {
            LOG.error("String_Node_Str",e);
            fail("String_Node_Str" + e.getMessage());
          }
        }
      }
    }
;
  }
  for (int i=0; i < submitThreads.length; ++i) {
    submitThreads[i].start();
  }
  for (int i=0; i < submitThreads.length; ++i) {
    submitThreads[i].join();
  }
}
Program: 60963
Project: 60963
Buggy source:
protected TestSMProcedureState getInitialState(){
  return TestSMProcedureState.STEP_1;
}

Fixed version (ground truth):
@Override protected TestSMProcedureState getInitialState(){
  return TestSMProcedureState.STEP_1;
}