nus-yam/ex-repair huggingface dataset:
Program: 60849
Project: 60849
Buggy source:
/** 
 * Prepare to Split region.
 * @param env MasterProcedureEnv
 * @throws IOException
 */
@VisibleForTesting public boolean prepareSplitRegion(final MasterProcedureEnv env) throws IOException {
  RegionStateNode node=env.getAssignmentManager().getRegionStates().getRegionStateNode(getParentRegion());
  if (node == null) {
    throw new UnknownRegionException(getParentRegion().getRegionNameAsString());
  }
  RegionInfo parentHRI=node.getRegionInfo();
  if (node.isInState(State.SPLIT)) {
    LOG.info("String_Node_Str" + parentHRI + "String_Node_Str");
    return false;
  }
  if (parentHRI.isSplit() || parentHRI.isOffline()) {
    LOG.info("String_Node_Str" + parentHRI + "String_Node_Str");
    return false;
  }
  if (!node.isInState(EXPECTED_SPLIT_STATES)) {
    setFailure(new IOException("String_Node_Str" + parentHRI.getRegionNameAsString() + "String_Node_Str"+ node.getState()+ "String_Node_Str"+ Arrays.toString(EXPECTED_SPLIT_STATES)));
    return false;
  }
  if (!env.getMasterServices().isSplitOrMergeEnabled(MasterSwitchType.SPLIT)) {
    LOG.warn("String_Node_Str" + getProcId() + "String_Node_Str"+ parentHRI);
    setFailure(new IOException("String_Node_Str" + (parentHRI == null ? "String_Node_Str" : parentHRI.getRegionNameAsString()) + "String_Node_Str"));
    return false;
  }
  node.setState(State.SPLITTING);
  return true;
}

Fixed version (ground truth):
/** 
 * Prepare to Split region.
 * @param env MasterProcedureEnv
 * @throws IOException
 */
@VisibleForTesting public boolean prepareSplitRegion(final MasterProcedureEnv env) throws IOException {
  RegionStateNode node=env.getAssignmentManager().getRegionStates().getRegionStateNode(getParentRegion());
  if (node == null) {
    throw new UnknownRegionException(getParentRegion().getRegionNameAsString());
  }
  RegionInfo parentHRI=node.getRegionInfo();
  if (parentHRI == null) {
    LOG.info("String_Node_Str",node);
    return false;
  }
  if (node.isInState(State.SPLIT)) {
    LOG.info("String_Node_Str" + parentHRI + "String_Node_Str");
    return false;
  }
  if (parentHRI.isSplit() || parentHRI.isOffline()) {
    LOG.info("String_Node_Str" + parentHRI + "String_Node_Str");
    return false;
  }
  if (!node.isInState(EXPECTED_SPLIT_STATES)) {
    setFailure(new IOException("String_Node_Str" + parentHRI.getRegionNameAsString() + "String_Node_Str"+ node.getState()+ "String_Node_Str"+ Arrays.toString(EXPECTED_SPLIT_STATES)));
    return false;
  }
  if (!env.getMasterServices().isSplitOrMergeEnabled(MasterSwitchType.SPLIT)) {
    LOG.warn("String_Node_Str" + getProcId() + "String_Node_Str"+ parentHRI);
    setFailure(new IOException("String_Node_Str" + parentHRI.getRegionNameAsString() + "String_Node_Str"));
    return false;
  }
  node.setState(State.SPLITTING);
  return true;
}
Program: 60850
Project: 60850
Buggy source:
/** 
 * Calculate size for cleaner pool.
 * @param poolSize size from configuration
 * @return size of pool after calculation
 */
int calculatePoolSize(String poolSize){
  if (poolSize.matches("String_Node_Str")) {
    int size=Math.min(Integer.valueOf(poolSize),AVAIL_PROCESSORS);
    if (size == AVAIL_PROCESSORS) {
      LOG.warn("String_Node_Str",size);
    }
    return size;
  }
 else   if (poolSize.matches("String_Node_Str")) {
    int computedThreads=(int)(AVAIL_PROCESSORS * Double.valueOf(poolSize));
    if (computedThreads < 1) {
      LOG.debug("String_Node_Str",computedThreads);
      return 1;
    }
    return computedThreads;
  }
 else {
    LOG.error("String_Node_Str" + poolSize + "String_Node_Str"+ CHORE_POOL_SIZE+ "String_Node_Str"+ DEFAULT_CHORE_POOL_SIZE+ "String_Node_Str");
    return calculatePoolSize(DEFAULT_CHORE_POOL_SIZE);
  }
}

Fixed version (ground truth):
/** 
 * Calculate size for cleaner pool.
 * @param poolSize size from configuration
 * @return size of pool after calculation
 */
static int calculatePoolSize(String poolSize){
  if (poolSize.matches("String_Node_Str")) {
    int size=Math.min(Integer.parseInt(poolSize),AVAIL_PROCESSORS);
    if (size == AVAIL_PROCESSORS) {
      LOG.warn("String_Node_Str",size);
    }
    return size;
  }
 else   if (poolSize.matches("String_Node_Str")) {
    int computedThreads=(int)(AVAIL_PROCESSORS * Double.valueOf(poolSize));
    if (computedThreads < 1) {
      LOG.debug("String_Node_Str",computedThreads);
      return 1;
    }
    return computedThreads;
  }
 else {
    LOG.error("String_Node_Str" + poolSize + "String_Node_Str"+ CHORE_POOL_SIZE+ "String_Node_Str"+ DEFAULT_CHORE_POOL_SIZE+ "String_Node_Str");
    return calculatePoolSize(DEFAULT_CHORE_POOL_SIZE);
  }
}
Program: 60851
Project: 60851
Buggy source:
/** 
 * @param name name of the chore being run
 * @param sleepPeriod the period of time to sleep between each run
 * @param s the stopper
 * @param conf configuration to use
 * @param fs handle to the FS
 * @param oldFileDir the path to the archived files
 * @param confKey configuration key for the classes to instantiate
 * @param params members could be used in cleaner
 */
public CleanerChore(String name,final int sleepPeriod,final Stoppable s,Configuration conf,FileSystem fs,Path oldFileDir,String confKey,Map<String,Object> params){
  super(name,s,sleepPeriod);
  this.fs=fs;
  this.oldFileDir=oldFileDir;
  this.conf=conf;
  this.params=params;
  initCleanerChain(confKey);
  if (chorePool == null) {
    String poolSize=conf.get(CHORE_POOL_SIZE,DEFAULT_CHORE_POOL_SIZE);
    chorePoolSize=calculatePoolSize(poolSize);
    chorePoolSize=chorePoolSize == 0 ? calculatePoolSize(DEFAULT_CHORE_POOL_SIZE) : chorePoolSize;
    this.chorePool=new ForkJoinPool(chorePoolSize);
    LOG.info("String_Node_Str",chorePoolSize);
  }
}

Fixed version (ground truth):
/** 
 * @param name name of the chore being run
 * @param sleepPeriod the period of time to sleep between each run
 * @param s the stopper
 * @param conf configuration to use
 * @param fs handle to the FS
 * @param oldFileDir the path to the archived files
 * @param confKey configuration key for the classes to instantiate
 * @param params members could be used in cleaner
 */
public CleanerChore(String name,final int sleepPeriod,final Stoppable s,Configuration conf,FileSystem fs,Path oldFileDir,String confKey,Map<String,Object> params){
  super(name,s,sleepPeriod);
  this.fs=fs;
  this.oldFileDir=oldFileDir;
  this.conf=conf;
  this.params=params;
  initCleanerChain(confKey);
  if (CHOREPOOL == null) {
    String poolSize=conf.get(CHORE_POOL_SIZE,DEFAULT_CHORE_POOL_SIZE);
    CHOREPOOLSIZE=calculatePoolSize(poolSize);
    CHOREPOOLSIZE=CHOREPOOLSIZE == 0 ? calculatePoolSize(DEFAULT_CHORE_POOL_SIZE) : CHOREPOOLSIZE;
    this.CHOREPOOL=new ForkJoinPool(CHOREPOOLSIZE);
    LOG.info("String_Node_Str",CHOREPOOLSIZE);
  }
}
Program: 60852
Project: 60852
Buggy source:
@VisibleForTesting int getChorePoolSize(){
  return chorePoolSize;
}

Fixed version (ground truth):
@VisibleForTesting int getChorePoolSize(){
  return CHOREPOOLSIZE;
}
Program: 60853
Project: 60853
Buggy source:
public Boolean runCleaner(){
  preRunCleaner();
  CleanerTask task=new CleanerTask(this.oldFileDir,true);
  chorePool.submit(task);
  return task.join();
}

Fixed version (ground truth):
public Boolean runCleaner(){
  preRunCleaner();
  CleanerTask task=new CleanerTask(this.oldFileDir,true);
  CHOREPOOL.submit(task);
  return task.join();
}
Program: 60854
Project: 60854
Buggy source:
@Override public void onConfigurationChange(Configuration conf){
  int updatedSize=calculatePoolSize(conf.get(CHORE_POOL_SIZE,DEFAULT_CHORE_POOL_SIZE));
  if (updatedSize == chorePoolSize) {
    LOG.trace("String_Node_Str",updatedSize);
    return;
  }
  chorePoolSize=updatedSize;
  if (chorePool.getPoolSize() == 0) {
    updateChorePoolSize(updatedSize);
    return;
  }
  reconfig.set(true);
}

Fixed version (ground truth):
@Override public void onConfigurationChange(Configuration conf){
  int updatedSize=calculatePoolSize(conf.get(CHORE_POOL_SIZE,DEFAULT_CHORE_POOL_SIZE));
  if (updatedSize == CHOREPOOLSIZE) {
    LOG.trace("String_Node_Str",updatedSize);
    return;
  }
  CHOREPOOLSIZE=updatedSize;
  if (CHOREPOOL.getPoolSize() == 0) {
    updateChorePoolSize(updatedSize);
    return;
  }
  reconfig.set(true);
}
Program: 60855
Project: 60855
Buggy source:
private void updateChorePoolSize(int updatedSize){
  chorePool.shutdownNow();
  LOG.info("String_Node_Str",chorePool.getParallelism(),updatedSize);
  chorePool=new ForkJoinPool(updatedSize);
}

Fixed version (ground truth):
private void updateChorePoolSize(int updatedSize){
  CHOREPOOL.shutdownNow();
  LOG.info("String_Node_Str",CHOREPOOL.getParallelism(),updatedSize);
  CHOREPOOL=new ForkJoinPool(updatedSize);
}
Program: 60856
Project: 60856
Buggy source:
@Override protected void chore(){
  if (getEnabled()) {
    if (runCleaner()) {
      LOG.debug("String_Node_Str",oldFileDir);
    }
 else {
      LOG.warn("String_Node_Str",oldFileDir);
    }
    if (reconfig.compareAndSet(true,false)) {
      updateChorePoolSize(chorePoolSize);
    }
  }
 else {
    LOG.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override protected void chore(){
  if (getEnabled()) {
    if (runCleaner()) {
      LOG.debug("String_Node_Str",oldFileDir);
    }
 else {
      LOG.warn("String_Node_Str",oldFileDir);
    }
    if (reconfig.compareAndSet(true,false)) {
      updateChorePoolSize(CHOREPOOLSIZE);
    }
  }
 else {
    LOG.debug("String_Node_Str");
  }
}
Program: 60857
Project: 60857
Buggy source:
@Override @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="String_Node_Str",justification="String_Node_Str") public void startRegionOperation(Operation op) throws IOException {
switch (op) {
case GET:
case SCAN:
    checkReadsEnabled();
default :
  break;
}
if (op == Operation.MERGE_REGION || op == Operation.SPLIT_REGION || op == Operation.COMPACT_REGION) {
return;
}
if (this.closing.get()) {
throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + "String_Node_Str");
}
lock(lock.readLock());
if (this.closed.get()) {
lock.readLock().unlock();
throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + "String_Node_Str");
}
if (op == Operation.SNAPSHOT) {
stores.values().forEach(HStore::preSnapshotOperation);
}
try {
if (coprocessorHost != null) {
  coprocessorHost.postStartRegionOperation(op);
}
}
 catch (Exception e) {
lock.readLock().unlock();
throw new IOException(e);
}
}

Fixed version (ground truth):
@Override public void startRegionOperation(Operation op) throws IOException {
switch (op) {
case GET:
case SCAN:
    checkReadsEnabled();
  break;
default :
break;
}
if (op == Operation.MERGE_REGION || op == Operation.SPLIT_REGION || op == Operation.COMPACT_REGION) {
return;
}
if (this.closing.get()) {
throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + "String_Node_Str");
}
lock(lock.readLock());
if (this.closed.get()) {
lock.readLock().unlock();
throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + "String_Node_Str");
}
if (op == Operation.SNAPSHOT) {
stores.values().forEach(HStore::preSnapshotOperation);
}
try {
if (coprocessorHost != null) {
coprocessorHost.postStartRegionOperation(op);
}
}
 catch (Exception e) {
lock.readLock().unlock();
throw new IOException(e);
}
}
Program: 60858
Project: 60858
Buggy source:
@Override protected void chore(){
  if (!connected) {
    return;
  }
  List<ServerName> sns=generateDeadServersListToSend();
  if (sns.isEmpty()) {
    return;
  }
  final long curTime=EnvironmentEdgeManager.currentTime();
  if (lastMessageTime > curTime - messagePeriod) {
    return;
  }
  lastMessageTime=curTime;
  publisher.publish(ClusterMetricsBuilder.newBuilder().setHBaseVersion(VersionInfo.getVersion()).setClusterId(master.getMasterFileSystem().getClusterId().toString()).setMasterName(master.getServerName()).setDeadServerNames(sns).build());
}

Fixed version (ground truth):
@Override protected void chore(){
  if (!isConnected()) {
    return;
  }
  List<ServerName> sns=generateDeadServersListToSend();
  if (sns.isEmpty()) {
    return;
  }
  final long curTime=EnvironmentEdgeManager.currentTime();
  if (lastMessageTime > curTime - messagePeriod) {
    return;
  }
  lastMessageTime=curTime;
  publisher.publish(ClusterMetricsBuilder.newBuilder().setHBaseVersion(VersionInfo.getVersion()).setClusterId(master.getMasterFileSystem().getClusterId().toString()).setMasterName(master.getServerName()).setDeadServerNames(sns).build());
}
Program: 60859
Project: 60859
Buggy source:
/** 
 * Supports Coprocessor 'bypass'.
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param op the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @return true or false to return to client if default processing should be bypassed, or nullotherwise
 */
public Boolean preCheckAndPutAfterRowLock(final byte[] row,final byte[] family,final byte[] qualifier,final CompareOperator op,final ByteArrayComparable comparator,final Put put) throws IOException {
  boolean bypassable=true;
  boolean defaultResult=false;
  if (coprocEnvironments.isEmpty()) {
    return null;
  }
  return execOperationWithResult(new ObserverOperationWithResult<RegionObserver,Boolean>(regionObserverGetter,defaultResult,bypassable){
    @Override public Boolean call(    RegionObserver observer) throws IOException {
      return observer.preCheckAndPutAfterRowLock(this,row,family,qualifier,op,comparator,put,getResult());
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Supports Coprocessor 'bypass'.
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param op the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @return true or false to return to client if default processing should be bypassed, or nullotherwise
 */
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="String_Node_Str",justification="String_Node_Str") public Boolean preCheckAndPutAfterRowLock(final byte[] row,final byte[] family,final byte[] qualifier,final CompareOperator op,final ByteArrayComparable comparator,final Put put) throws IOException {
  boolean bypassable=true;
  boolean defaultResult=false;
  if (coprocEnvironments.isEmpty()) {
    return null;
  }
  return execOperationWithResult(new ObserverOperationWithResult<RegionObserver,Boolean>(regionObserverGetter,defaultResult,bypassable){
    @Override public Boolean call(    RegionObserver observer) throws IOException {
      return observer.preCheckAndPutAfterRowLock(this,row,family,qualifier,op,comparator,put,getResult());
    }
  }
);
}
Program: 60860
Project: 60860
Buggy source:
/** 
 * Main program
 * @param args
 * @throws Exception
 */
public static void main(String[] args) throws Exception {
  if (conf == null)   conf=HBaseConfiguration.create();
  int ret=ToolRunner.run(conf,new ReplicationSyncUp(),args);
  System.exit(ret);
}

Fixed version (ground truth):
/** 
 * Main program
 */
public static void main(String[] args) throws Exception {
  int ret=ToolRunner.run(HBaseConfiguration.create(),new ReplicationSyncUp(),args);
  System.exit(ret);
}
Program: 60861
Project: 60861
Buggy source:
@Override public int run(String[] args) throws Exception {
  Replication replication;
  ReplicationSourceManager manager;
  FileSystem fs;
  Path oldLogDir, logDir, walRootDir;
  ZKWatcher zkw;
  Abortable abortable=new Abortable(){
    @Override public void abort(    String why,    Throwable e){
    }
    @Override public boolean isAborted(){
      return false;
    }
  }
;
  zkw=new ZKWatcher(conf,"String_Node_Str" + System.currentTimeMillis(),abortable,true);
  walRootDir=FSUtils.getWALRootDir(conf);
  fs=FSUtils.getWALFileSystem(conf);
  oldLogDir=new Path(walRootDir,HConstants.HREGION_OLDLOGDIR_NAME);
  logDir=new Path(walRootDir,HConstants.HREGION_LOGDIR_NAME);
  System.out.println("String_Node_Str");
  replication=new Replication();
  replication.initialize(new DummyServer(zkw),fs,logDir,oldLogDir,null);
  manager=replication.getReplicationManager();
  manager.init().get();
  try {
    while (manager.activeFailoverTaskCount() > 0) {
      Thread.sleep(SLEEP_TIME);
    }
    while (manager.getOldSources().size() > 0) {
      Thread.sleep(SLEEP_TIME);
    }
    manager.join();
  }
 catch (  InterruptedException e) {
    System.err.println("String_Node_Str" + e);
    return (-1);
  }
 finally {
    zkw.close();
  }
  return 0;
}

Fixed version (ground truth):
@Override public int run(String[] args) throws Exception {
  Abortable abortable=new Abortable(){
    @Override public void abort(    String why,    Throwable e){
    }
    @Override public boolean isAborted(){
      return false;
    }
  }
;
  Configuration conf=getConf();
  try (ZKWatcher zkw=new ZKWatcher(conf,"String_Node_Str" + System.currentTimeMillis(),abortable,true)){
    Path walRootDir=FSUtils.getWALRootDir(conf);
    FileSystem fs=FSUtils.getWALFileSystem(conf);
    Path oldLogDir=new Path(walRootDir,HConstants.HREGION_OLDLOGDIR_NAME);
    Path logDir=new Path(walRootDir,HConstants.HREGION_LOGDIR_NAME);
    System.out.println("String_Node_Str");
    Replication replication=new Replication();
    replication.initialize(new DummyServer(zkw),fs,logDir,oldLogDir,null);
    ReplicationSourceManager manager=replication.getReplicationManager();
    manager.init().get();
    while (manager.activeFailoverTaskCount() > 0) {
      Thread.sleep(SLEEP_TIME);
    }
    while (manager.getOldSources().size() > 0) {
      Thread.sleep(SLEEP_TIME);
    }
    manager.join();
  }
 catch (  InterruptedException e) {
    System.err.println("String_Node_Str" + e);
    return -1;
  }
  return 0;
}
Program: 60862
Project: 60862
Buggy source:
@Override public Configuration getConfiguration(){
  return conf;
}

Fixed version (ground truth):
@Override public Configuration getConfiguration(){
  return getConf();
}
Program: 60863
Project: 60863
Buggy source:
protected void syncUp(HBaseTestingUtility ut) throws Exception {
  ReplicationSyncUp.setConfigure(ut.getConfiguration());
  String[] arguments=new String[]{null};
  new ReplicationSyncUp().run(arguments);
}

Fixed version (ground truth):
protected void syncUp(HBaseTestingUtility ut) throws Exception {
  ToolRunner.run(ut.getConfiguration(),new ReplicationSyncUp(),new String[0]);
}
Program: 60865
Project: 60865
Buggy source:
@Override public Cell forceCopyOfBigCellInto(Cell cell){
  throw new IllegalStateException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * The process of merging assumes all cells are allocated on mslab. There is a rare case in which the first immutable segment, participating in a merge, is a CSLM. Since the CSLM hasn't been flattened yet, and there is no point in flattening it (since it is going to be merged), its big cells (for whom size > maxAlloc) must be copied into mslab. This method copies the passed cell into the first mslab in the mslabs list, returning either a new cell instance over the copied data, or null when this cell cannt be copied.
 */
@Override public Cell forceCopyOfBigCellInto(Cell cell){
  MemStoreLAB mslab=this.mslabs.get(0);
  return mslab.forceCopyOfBigCellInto(cell);
}
Program: 60867
Project: 60867
Buggy source:
@Test public void testDelete_CheckFamily() throws IOException {
  byte[] row1=Bytes.toBytes("String_Node_Str");
  byte[] fam1=Bytes.toBytes("String_Node_Str");
  byte[] fam2=Bytes.toBytes("String_Node_Str");
  byte[] fam3=Bytes.toBytes("String_Node_Str");
  byte[] fam4=Bytes.toBytes("String_Node_Str");
  this.region=initHRegion(tableName,method,CONF,fam1,fam2,fam3);
  try {
    List<Cell> kvs=new ArrayList<>();
    kvs.add(new KeyValue(row1,fam4,null,null));
    byte[] family=fam2;
    try {
      NavigableMap<byte[],List<Cell>> deleteMap=new TreeMap<>(Bytes.BYTES_COMPARATOR);
      deleteMap.put(family,kvs);
      region.delete(deleteMap,Durability.SYNC_WAL);
    }
 catch (    Exception e) {
      fail("String_Node_Str" + new String(family,StandardCharsets.UTF_8) + "String_Node_Str");
    }
    boolean ok=false;
    family=fam4;
    try {
      NavigableMap<byte[],List<Cell>> deleteMap=new TreeMap<>(Bytes.BYTES_COMPARATOR);
      deleteMap.put(family,kvs);
      region.delete(deleteMap,Durability.SYNC_WAL);
    }
 catch (    Exception e) {
      ok=true;
    }
    assertEquals("String_Node_Str" + new String(family,StandardCharsets.UTF_8) + "String_Node_Str",true,ok);
  }
  finally {
    HBaseTestingUtility.closeRegionAndWAL(this.region);
    this.region=null;
  }
}

Fixed version (ground truth):
@Test public void testDelete_CheckFamily() throws IOException {
  byte[] row1=Bytes.toBytes("String_Node_Str");
  byte[] fam1=Bytes.toBytes("String_Node_Str");
  byte[] fam2=Bytes.toBytes("String_Node_Str");
  byte[] fam3=Bytes.toBytes("String_Node_Str");
  byte[] fam4=Bytes.toBytes("String_Node_Str");
  this.region=initHRegion(tableName,method,CONF,fam1,fam2,fam3);
  try {
    List<Cell> kvs=new ArrayList<>();
    kvs.add(new KeyValue(row1,fam4,null,null));
    byte[] family=fam2;
    try {
      NavigableMap<byte[],List<Cell>> deleteMap=new TreeMap<>(Bytes.BYTES_COMPARATOR);
      deleteMap.put(family,kvs);
      region.delete(deleteMap,Durability.SYNC_WAL);
    }
 catch (    Exception e) {
      fail("String_Node_Str" + new String(family,StandardCharsets.UTF_8) + "String_Node_Str");
    }
    boolean ok=false;
    family=fam4;
    try {
      NavigableMap<byte[],List<Cell>> deleteMap=new TreeMap<>(Bytes.BYTES_COMPARATOR);
      deleteMap.put(family,kvs);
      region.delete(deleteMap,Durability.SYNC_WAL);
    }
 catch (    Exception e) {
      ok=true;
    }
    assertTrue("String_Node_Str" + new String(family,StandardCharsets.UTF_8) + "String_Node_Str",ok);
  }
  finally {
    HBaseTestingUtility.closeRegionAndWAL(this.region);
    this.region=null;
  }
}
Program: 60868
Project: 60868
Buggy source:
/** 
 * Check if ZooKeeper JaasConfiguration is valid.
 */
@Test public void testIsZooKeeperSecure() throws Exception {
  boolean testJaasConfig=ZKUtil.isSecureZooKeeper(new Configuration(TEST_UTIL.getConfiguration()));
  assertEquals(testJaasConfig,secureZKAvailable);
  File saslConfFile=File.createTempFile("String_Node_Str","String_Node_Str");
  FileWriter fwriter=new FileWriter(saslConfFile);
  fwriter.write("String_Node_Str");
  fwriter.close();
  System.setProperty("String_Node_Str",saslConfFile.getAbsolutePath());
  testJaasConfig=ZKUtil.isSecureZooKeeper(new Configuration(TEST_UTIL.getConfiguration()));
  assertEquals(false,testJaasConfig);
  saslConfFile.delete();
}

Fixed version (ground truth):
/** 
 * Check if ZooKeeper JaasConfiguration is valid.
 */
@Test public void testIsZooKeeperSecure() throws Exception {
  boolean testJaasConfig=ZKUtil.isSecureZooKeeper(new Configuration(TEST_UTIL.getConfiguration()));
  assertEquals(testJaasConfig,secureZKAvailable);
  File saslConfFile=File.createTempFile("String_Node_Str","String_Node_Str");
  FileWriter fwriter=new FileWriter(saslConfFile);
  fwriter.write("String_Node_Str");
  fwriter.close();
  System.setProperty("String_Node_Str",saslConfFile.getAbsolutePath());
  testJaasConfig=ZKUtil.isSecureZooKeeper(new Configuration(TEST_UTIL.getConfiguration()));
  assertFalse(testJaasConfig);
  saslConfFile.delete();
}
Program: 60869
Project: 60869
Buggy source:
/** 
 * Check if Programmatic way of setting zookeeper security settings is valid.
 */
@Test public void testIsZooKeeperSecureWithProgrammaticConfig() throws Exception {
  javax.security.auth.login.Configuration.setConfiguration(new DummySecurityConfiguration());
  Configuration config=new Configuration(HBaseConfiguration.create());
  boolean testJaasConfig=ZKUtil.isSecureZooKeeper(config);
  assertEquals(false,testJaasConfig);
  config.set("String_Node_Str","String_Node_Str");
  testJaasConfig=ZKUtil.isSecureZooKeeper(config);
  assertEquals(false,testJaasConfig);
  config.set(HConstants.ZK_CLIENT_KEYTAB_FILE,"String_Node_Str");
  config.set(HConstants.ZK_CLIENT_KERBEROS_PRINCIPAL,"String_Node_Str");
  config.set(HConstants.ZK_SERVER_KEYTAB_FILE,"String_Node_Str");
  config.set(HConstants.ZK_SERVER_KERBEROS_PRINCIPAL,"String_Node_Str");
  testJaasConfig=ZKUtil.isSecureZooKeeper(config);
  assertEquals(true,testJaasConfig);
}

Fixed version (ground truth):
/** 
 * Check if Programmatic way of setting zookeeper security settings is valid.
 */
@Test public void testIsZooKeeperSecureWithProgrammaticConfig() throws Exception {
  javax.security.auth.login.Configuration.setConfiguration(new DummySecurityConfiguration());
  Configuration config=new Configuration(HBaseConfiguration.create());
  boolean testJaasConfig=ZKUtil.isSecureZooKeeper(config);
  assertFalse(testJaasConfig);
  config.set("String_Node_Str","String_Node_Str");
  testJaasConfig=ZKUtil.isSecureZooKeeper(config);
  assertFalse(testJaasConfig);
  config.set(HConstants.ZK_CLIENT_KEYTAB_FILE,"String_Node_Str");
  config.set(HConstants.ZK_CLIENT_KERBEROS_PRINCIPAL,"String_Node_Str");
  config.set(HConstants.ZK_SERVER_KEYTAB_FILE,"String_Node_Str");
  config.set(HConstants.ZK_SERVER_KERBEROS_PRINCIPAL,"String_Node_Str");
  testJaasConfig=ZKUtil.isSecureZooKeeper(config);
  assertTrue(testJaasConfig);
}
Program: 60870
Project: 60870
Buggy source:
@Override public ServerSocket createServerSocket(int port) throws IOException {
  return new ServerSocket(port){
    public Socket accept() throws IOException {
      Socket socket=super.accept();
      SSLSocketFactory sslSocketFactory=(SSLSocketFactory)SSLSocketFactory.getDefault();
      SSLSocket sslSocket=(SSLSocket)sslSocketFactory.createSocket(socket,socket.getInetAddress().getHostName(),socket.getPort(),true);
      sslSocket.setUseClientMode(false);
      sslSocket.setNeedClientAuth(false);
      ArrayList<String> secureProtocols=new ArrayList<>();
      for (      String p : sslSocket.getEnabledProtocols()) {
        if (!p.contains("String_Node_Str")) {
          secureProtocols.add(p);
        }
      }
      sslSocket.setEnabledProtocols(secureProtocols.toArray(new String[secureProtocols.size()]));
      return sslSocket;
    }
  }
;
}

Fixed version (ground truth):
@Override public ServerSocket createServerSocket(int port) throws IOException {
  return new ServerSocket(port){
    @Override public Socket accept() throws IOException {
      Socket socket=super.accept();
      SSLSocketFactory sslSocketFactory=(SSLSocketFactory)SSLSocketFactory.getDefault();
      SSLSocket sslSocket=(SSLSocket)sslSocketFactory.createSocket(socket,socket.getInetAddress().getHostName(),socket.getPort(),true);
      sslSocket.setUseClientMode(false);
      sslSocket.setNeedClientAuth(false);
      ArrayList<String> secureProtocols=new ArrayList<>();
      for (      String p : sslSocket.getEnabledProtocols()) {
        if (!p.contains("String_Node_Str")) {
          secureProtocols.add(p);
        }
      }
      sslSocket.setEnabledProtocols(secureProtocols.toArray(new String[secureProtocols.size()]));
      return sslSocket;
    }
  }
;
}
Program: 60871
Project: 60871
Buggy source:
public Socket accept() throws IOException {
  Socket socket=super.accept();
  SSLSocketFactory sslSocketFactory=(SSLSocketFactory)SSLSocketFactory.getDefault();
  SSLSocket sslSocket=(SSLSocket)sslSocketFactory.createSocket(socket,socket.getInetAddress().getHostName(),socket.getPort(),true);
  sslSocket.setUseClientMode(false);
  sslSocket.setNeedClientAuth(false);
  ArrayList<String> secureProtocols=new ArrayList<>();
  for (  String p : sslSocket.getEnabledProtocols()) {
    if (!p.contains("String_Node_Str")) {
      secureProtocols.add(p);
    }
  }
  sslSocket.setEnabledProtocols(secureProtocols.toArray(new String[secureProtocols.size()]));
  return sslSocket;
}

Fixed version (ground truth):
@Override public Socket accept() throws IOException {
  Socket socket=super.accept();
  SSLSocketFactory sslSocketFactory=(SSLSocketFactory)SSLSocketFactory.getDefault();
  SSLSocket sslSocket=(SSLSocket)sslSocketFactory.createSocket(socket,socket.getInetAddress().getHostName(),socket.getPort(),true);
  sslSocket.setUseClientMode(false);
  sslSocket.setNeedClientAuth(false);
  ArrayList<String> secureProtocols=new ArrayList<>();
  for (  String p : sslSocket.getEnabledProtocols()) {
    if (!p.contains("String_Node_Str")) {
      secureProtocols.add(p);
    }
  }
  sslSocket.setEnabledProtocols(secureProtocols.toArray(new String[secureProtocols.size()]));
  return sslSocket;
}
Program: 60872
Project: 60872
Buggy source:
public void run(){
  final LockHeartbeatRequest lockHeartbeatRequest=LockHeartbeatRequest.newBuilder().setProcId(procId).build();
  LockHeartbeatResponse response;
  while (true) {
    try {
      response=stub.lockHeartbeat(null,lockHeartbeatRequest);
    }
 catch (    Exception e) {
      e=ProtobufUtil.handleRemoteException(e);
      locked.set(false);
      LOG.error("String_Node_Str" + EntityLock.this,e);
      abort.abort("String_Node_Str",e);
      return;
    }
    if (!isLocked() && response.getLockStatus() == LockHeartbeatResponse.LockStatus.LOCKED) {
      locked.set(true);
      latch.countDown();
    }
 else     if (isLocked() && response.getLockStatus() == LockHeartbeatResponse.LockStatus.UNLOCKED) {
      locked.set(false);
      abort.abort("String_Node_Str",null);
      return;
    }
    try {
      long sleepTime=1000;
      if (isLocked()) {
        sleepTime=Math.max(response.getTimeoutMs() - heartbeatTimeBuffer,1);
      }
      if (testingSleepTime != 0) {
        sleepTime=testingSleepTime;
      }
      Thread.sleep(sleepTime);
    }
 catch (    InterruptedException e) {
      locked.set(false);
      if (!this.shutdown) {
        LOG.error("String_Node_Str" + this,e);
        abort.abort("String_Node_Str",e);
      }
      return;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  final LockHeartbeatRequest lockHeartbeatRequest=LockHeartbeatRequest.newBuilder().setProcId(procId).build();
  LockHeartbeatResponse response;
  while (true) {
    try {
      response=stub.lockHeartbeat(null,lockHeartbeatRequest);
    }
 catch (    Exception e) {
      e=ProtobufUtil.handleRemoteException(e);
      locked.set(false);
      LOG.error("String_Node_Str" + EntityLock.this,e);
      abort.abort("String_Node_Str",e);
      return;
    }
    if (!isLocked() && response.getLockStatus() == LockHeartbeatResponse.LockStatus.LOCKED) {
      locked.set(true);
      latch.countDown();
    }
 else     if (isLocked() && response.getLockStatus() == LockHeartbeatResponse.LockStatus.UNLOCKED) {
      locked.set(false);
      abort.abort("String_Node_Str",null);
      return;
    }
    try {
      long sleepTime=1000;
      if (isLocked()) {
        sleepTime=Math.max(response.getTimeoutMs() - heartbeatTimeBuffer,1);
      }
      if (testingSleepTime != 0) {
        sleepTime=testingSleepTime;
      }
      Thread.sleep(sleepTime);
    }
 catch (    InterruptedException e) {
      locked.set(false);
      if (!this.shutdown) {
        LOG.error("String_Node_Str" + this,e);
        abort.abort("String_Node_Str",e);
      }
      return;
    }
  }
}
Program: 60873
Project: 60873
Buggy source:
@SuppressWarnings("String_Node_Str") RowProcessor<S,T> constructRowProcessorFromRequest(ProcessRequest request) throws IOException {
  String className=request.getRowProcessorClassName();
  Class<?> cls;
  try {
    cls=Class.forName(className);
    RowProcessor<S,T> ci=(RowProcessor<S,T>)cls.newInstance();
    if (request.hasRowProcessorInitializerMessageName()) {
      Class<?> imn=Class.forName(request.getRowProcessorInitializerMessageName()).asSubclass(Message.class);
      Method m;
      try {
        m=imn.getMethod("String_Node_Str",ByteString.class);
      }
 catch (      SecurityException e) {
        throw new IOException(e);
      }
catch (      NoSuchMethodException e) {
        throw new IOException(e);
      }
      S s;
      try {
        s=(S)m.invoke(null,request.getRowProcessorInitializerMessage());
      }
 catch (      IllegalArgumentException e) {
        throw new IOException(e);
      }
catch (      InvocationTargetException e) {
        throw new IOException(e);
      }
      ci.initialize(s);
    }
    return ci;
  }
 catch (  ClassNotFoundException e) {
    throw new IOException(e);
  }
catch (  InstantiationException e) {
    throw new IOException(e);
  }
catch (  IllegalAccessException e) {
    throw new IOException(e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") RowProcessor<S,T> constructRowProcessorFromRequest(ProcessRequest request) throws IOException {
  String className=request.getRowProcessorClassName();
  Class<?> cls;
  try {
    cls=Class.forName(className);
    RowProcessor<S,T> ci=(RowProcessor<S,T>)cls.getDeclaredConstructor().newInstance();
    if (request.hasRowProcessorInitializerMessageName()) {
      Class<?> imn=Class.forName(request.getRowProcessorInitializerMessageName()).asSubclass(Message.class);
      Method m;
      try {
        m=imn.getMethod("String_Node_Str",ByteString.class);
      }
 catch (      SecurityException e) {
        throw new IOException(e);
      }
catch (      NoSuchMethodException e) {
        throw new IOException(e);
      }
      S s;
      try {
        s=(S)m.invoke(null,request.getRowProcessorInitializerMessage());
      }
 catch (      IllegalArgumentException e) {
        throw new IOException(e);
      }
catch (      InvocationTargetException e) {
        throw new IOException(e);
      }
      ci.initialize(s);
    }
    return ci;
  }
 catch (  Exception e) {
    throw new IOException(e);
  }
}
Program: 60874
Project: 60874
Buggy source:
void callObserver() throws IOException {
  Optional<O> observer=observerGetter.apply(getEnvironment().getInstance());
  if (observer.isPresent()) {
    result=call(observer.get());
  }
}

Fixed version (ground truth):
@Override void callObserver() throws IOException {
  Optional<O> observer=observerGetter.apply(getEnvironment().getInstance());
  if (observer.isPresent()) {
    result=call(observer.get());
  }
}
Program: 60875
Project: 60875
Buggy source:
public void bypass(){
  if (!this.bypassable) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  bypass=true;
}

Fixed version (ground truth):
@Override public void bypass(){
  if (!this.bypassable) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  bypass=true;
}
Program: 60876
Project: 60876
Buggy source:
public Optional<User> getCaller(){
  return Optional.ofNullable(caller);
}

Fixed version (ground truth):
@Override public Optional<User> getCaller(){
  return Optional.ofNullable(caller);
}
Program: 60877
Project: 60877
Buggy source:
public E getEnvironment(){
  return env;
}

Fixed version (ground truth):
@Override public E getEnvironment(){
  return env;
}
Program: 60878
Project: 60878
Buggy source:
@Override public void unset(String name){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void unset(String name){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 60879
Project: 60879
Buggy source:
@Override public void setQuietMode(boolean quietmode){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void setQuietMode(boolean quietmode){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 60880
Project: 60880
Buggy source:
@Override public String[] getPropertySources(String name){
  return conf.getPropertySources(name);
}

Fixed version (ground truth):
@Override public synchronized String[] getPropertySources(String name){
  return conf.getPropertySources(name);
}
Program: 60881
Project: 60881
Buggy source:
@Override public void reloadConfiguration(){
  this.conf.reloadConfiguration();
}

Fixed version (ground truth):
@Override public synchronized void reloadConfiguration(){
  this.conf.reloadConfiguration();
}
Program: 60882
Project: 60882
Buggy source:
@Override public void setIfUnset(String name,String value){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void setIfUnset(String name,String value){
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 60883
Project: 60883
Buggy source:
@Override public Class<?>[] getClasses(String name,Class<?>[] defaultValue){
  return conf.getClasses(name,defaultValue);
}

Fixed version (ground truth):
@Override public Class<?>[] getClasses(String name,Class<?>... defaultValue){
  return conf.getClasses(name,defaultValue);
}
Program: 60884
Project: 60884
Buggy source:
public ReturnCode filterCell(final Cell c) throws IOException {
  return this.filter.filterCell(c);
}

Fixed version (ground truth):
@Override public ReturnCode filterCell(final Cell c) throws IOException {
  return this.filter.filterCell(c);
}
Program: 60885
Project: 60885
Buggy source:
private static ClientProtocol createReorderingProxy(final ClientProtocol cp,final ReorderBlocks lrb,final Configuration conf){
  return (ClientProtocol)Proxy.newProxyInstance(cp.getClass().getClassLoader(),new Class[]{ClientProtocol.class,Closeable.class},new InvocationHandler(){
    public Object invoke(    Object proxy,    Method method,    Object[] args) throws Throwable {
      try {
        if ((args == null || args.length == 0) && "String_Node_Str".equals(method.getName())) {
          RPC.stopProxy(cp);
          return null;
        }
 else {
          Object res=method.invoke(cp,args);
          if (res != null && args != null && args.length == 3 && "String_Node_Str".equals(method.getName()) && res instanceof LocatedBlocks && args[0] instanceof String && args[0] != null) {
            lrb.reorderBlocks(conf,(LocatedBlocks)res,(String)args[0]);
          }
          return res;
        }
      }
 catch (      InvocationTargetException ite) {
        Throwable cause=ite.getCause();
        if (cause == null) {
          throw new RuntimeException("String_Node_Str",ite);
        }
        if (cause instanceof UndeclaredThrowableException) {
          Throwable causeCause=cause.getCause();
          if (causeCause == null) {
            throw new RuntimeException("String_Node_Str");
          }
          cause=cause.getCause();
        }
        throw cause;
      }
    }
  }
);
}

Fixed version (ground truth):
private static ClientProtocol createReorderingProxy(final ClientProtocol cp,final ReorderBlocks lrb,final Configuration conf){
  return (ClientProtocol)Proxy.newProxyInstance(cp.getClass().getClassLoader(),new Class[]{ClientProtocol.class,Closeable.class},new InvocationHandler(){
    @Override public Object invoke(    Object proxy,    Method method,    Object[] args) throws Throwable {
      try {
        if ((args == null || args.length == 0) && "String_Node_Str".equals(method.getName())) {
          RPC.stopProxy(cp);
          return null;
        }
 else {
          Object res=method.invoke(cp,args);
          if (res != null && args != null && args.length == 3 && "String_Node_Str".equals(method.getName()) && res instanceof LocatedBlocks && args[0] instanceof String && args[0] != null) {
            lrb.reorderBlocks(conf,(LocatedBlocks)res,(String)args[0]);
          }
          return res;
        }
      }
 catch (      InvocationTargetException ite) {
        Throwable cause=ite.getCause();
        if (cause == null) {
          throw new RuntimeException("String_Node_Str",ite);
        }
        if (cause instanceof UndeclaredThrowableException) {
          Throwable causeCause=cause.getCause();
          if (causeCause == null) {
            throw new RuntimeException("String_Node_Str");
          }
          cause=cause.getCause();
        }
        throw cause;
      }
    }
  }
);
}
Program: 60886
Project: 60886
Buggy source:
public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  try {
    if ((args == null || args.length == 0) && "String_Node_Str".equals(method.getName())) {
      RPC.stopProxy(cp);
      return null;
    }
 else {
      Object res=method.invoke(cp,args);
      if (res != null && args != null && args.length == 3 && "String_Node_Str".equals(method.getName()) && res instanceof LocatedBlocks && args[0] instanceof String && args[0] != null) {
        lrb.reorderBlocks(conf,(LocatedBlocks)res,(String)args[0]);
      }
      return res;
    }
  }
 catch (  InvocationTargetException ite) {
    Throwable cause=ite.getCause();
    if (cause == null) {
      throw new RuntimeException("String_Node_Str",ite);
    }
    if (cause instanceof UndeclaredThrowableException) {
      Throwable causeCause=cause.getCause();
      if (causeCause == null) {
        throw new RuntimeException("String_Node_Str");
      }
      cause=cause.getCause();
    }
    throw cause;
  }
}

Fixed version (ground truth):
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  try {
    if ((args == null || args.length == 0) && "String_Node_Str".equals(method.getName())) {
      RPC.stopProxy(cp);
      return null;
    }
 else {
      Object res=method.invoke(cp,args);
      if (res != null && args != null && args.length == 3 && "String_Node_Str".equals(method.getName()) && res instanceof LocatedBlocks && args[0] instanceof String && args[0] != null) {
        lrb.reorderBlocks(conf,(LocatedBlocks)res,(String)args[0]);
      }
      return res;
    }
  }
 catch (  InvocationTargetException ite) {
    Throwable cause=ite.getCause();
    if (cause == null) {
      throw new RuntimeException("String_Node_Str",ite);
    }
    if (cause instanceof UndeclaredThrowableException) {
      Throwable causeCause=cause.getCause();
      if (causeCause == null) {
        throw new RuntimeException("String_Node_Str");
      }
      cause=cause.getCause();
    }
    throw cause;
  }
}
Program: 60887
Project: 60887
Buggy source:
public void reorderBlocks(Configuration conf,LocatedBlocks lbs,String src) throws IOException {
  ServerName sn=AbstractFSWALProvider.getServerNameFromWALDirectoryName(conf,src);
  if (sn == null) {
    return;
  }
  String hostName=sn.getHostname();
  if (LOG.isTraceEnabled()) {
    LOG.trace(src + "String_Node_Str" + hostName);
  }
  for (  LocatedBlock lb : lbs.getLocatedBlocks()) {
    DatanodeInfo[] dnis=lb.getLocations();
    if (dnis != null && dnis.length > 1) {
      boolean found=false;
      for (int i=0; i < dnis.length - 1 && !found; i++) {
        if (hostName.equals(dnis[i].getHostName())) {
          DatanodeInfo toLast=dnis[i];
          System.arraycopy(dnis,i + 1,dnis,i,dnis.length - i - 1);
          dnis[dnis.length - 1]=toLast;
          found=true;
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void reorderBlocks(Configuration conf,LocatedBlocks lbs,String src) throws IOException {
  ServerName sn=AbstractFSWALProvider.getServerNameFromWALDirectoryName(conf,src);
  if (sn == null) {
    return;
  }
  String hostName=sn.getHostname();
  if (LOG.isTraceEnabled()) {
    LOG.trace(src + "String_Node_Str" + hostName);
  }
  for (  LocatedBlock lb : lbs.getLocatedBlocks()) {
    DatanodeInfo[] dnis=lb.getLocations();
    if (dnis != null && dnis.length > 1) {
      boolean found=false;
      for (int i=0; i < dnis.length - 1 && !found; i++) {
        if (hostName.equals(dnis[i].getHostName())) {
          DatanodeInfo toLast=dnis[i];
          System.arraycopy(dnis,i + 1,dnis,i,dnis.length - i - 1);
          dnis[dnis.length - 1]=toLast;
          found=true;
        }
      }
    }
  }
}
Program: 60888
Project: 60888
Buggy source:
/** 
 * The org.apache.hadoop.fs.FilterFileSystem does not yet support  createNonRecursive. This is a hadoop bug and when it is fixed in Hadoop, this definition will go away.
 */
@SuppressWarnings("String_Node_Str") public FSDataOutputStream createNonRecursive(Path f,boolean overwrite,int bufferSize,short replication,long blockSize,Progressable progress) throws IOException {
  return fs.createNonRecursive(f,overwrite,bufferSize,replication,blockSize,progress);
}

Fixed version (ground truth):
/** 
 * The org.apache.hadoop.fs.FilterFileSystem does not yet support  createNonRecursive. This is a hadoop bug and when it is fixed in Hadoop, this definition will go away.
 */
@Override @SuppressWarnings("String_Node_Str") public FSDataOutputStream createNonRecursive(Path f,boolean overwrite,int bufferSize,short replication,long blockSize,Progressable progress) throws IOException {
  return fs.createNonRecursive(f,overwrite,bufferSize,replication,blockSize,progress);
}
Program: 60889
Project: 60889
Buggy source:
/** 
 * Read from non-checksum stream failed, fall back to FS checksum. Thread-safe.
 * @param offCount For how many checksumOk calls to turn off the HBase checksum.
 */
public FSDataInputStream fallbackToFsChecksum(int offCount) throws IOException {
  boolean partOfConvoy=false;
  if (this.stream == null) {
synchronized (streamNoFsChecksumFirstCreateLock) {
      partOfConvoy=(this.stream != null);
      if (!partOfConvoy) {
        this.stream=(link != null) ? link.open(hfs) : hfs.open(path);
      }
    }
  }
  if (!partOfConvoy) {
    this.useHBaseChecksum=false;
    this.hbaseChecksumOffCount=offCount;
  }
  return this.stream;
}

Fixed version (ground truth):
/** 
 * Read from non-checksum stream failed, fall back to FS checksum. Thread-safe.
 * @param offCount For how many checksumOk calls to turn off the HBase checksum.
 */
public FSDataInputStream fallbackToFsChecksum(int offCount) throws IOException {
  boolean partOfConvoy=false;
  if (this.stream == null) {
synchronized (streamNoFsChecksumFirstCreateLock) {
      partOfConvoy=(this.stream != null);
      if (!partOfConvoy) {
        this.stream=(link != null) ? link.open(hfs) : hfs.open(path);
      }
    }
  }
  if (!partOfConvoy) {
    this.useHBaseChecksum=false;
    this.hbaseChecksumOffCount.set(offCount);
  }
  return this.stream;
}
Program: 60890
Project: 60890
Buggy source:
public String getValueString(){
  if (atEnd)   return null;
  return delegate.getValueString();
}

Fixed version (ground truth):
@Override public String getValueString(){
  if (atEnd)   return null;
  return delegate.getValueString();
}
Program: 60891
Project: 60891
Buggy source:
public boolean next() throws IOException {
  if (atEnd)   return false;
  boolean b=delegate.next();
  if (!b) {
    return b;
  }
  if (!top) {
    if (getComparator().compare(splitCell,getKey()) <= 0) {
      atEnd=true;
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean next() throws IOException {
  if (atEnd)   return false;
  boolean b=delegate.next();
  if (!b) {
    return b;
  }
  if (!top) {
    if (getComparator().compare(splitCell,getKey()) <= 0) {
      atEnd=true;
      return false;
    }
  }
  return true;
}
Program: 60892
Project: 60892
Buggy source:
public Cell getKey(){
  if (atEnd)   return null;
  return delegate.getKey();
}

Fixed version (ground truth):
@Override public Cell getKey(){
  if (atEnd)   return null;
  return delegate.getKey();
}
Program: 60893
Project: 60893
Buggy source:
public Cell getCell(){
  if (atEnd)   return null;
  return delegate.getCell();
}

Fixed version (ground truth):
@Override public Cell getCell(){
  if (atEnd)   return null;
  return delegate.getCell();
}
Program: 60894
Project: 60894
Buggy source:
public org.apache.hadoop.hbase.io.hfile.HFile.Reader getReader(){
  return this.delegate.getReader();
}

Fixed version (ground truth):
@Override public org.apache.hadoop.hbase.io.hfile.HFile.Reader getReader(){
  return this.delegate.getReader();
}
Program: 60895
Project: 60895
Buggy source:
public boolean isSeeked(){
  return this.delegate.isSeeked();
}

Fixed version (ground truth):
@Override public boolean isSeeked(){
  return this.delegate.isSeeked();
}
Program: 60896
Project: 60896
Buggy source:
public String getKeyString(){
  if (atEnd)   return null;
  return delegate.getKeyString();
}

Fixed version (ground truth):
@Override public String getKeyString(){
  if (atEnd)   return null;
  return delegate.getKeyString();
}
Program: 60897
Project: 60897
Buggy source:
public ByteBuffer getValue(){
  if (atEnd)   return null;
  return delegate.getValue();
}

Fixed version (ground truth):
@Override public ByteBuffer getValue(){
  if (atEnd)   return null;
  return delegate.getValue();
}