nus-yam/ex-repair huggingface dataset:
Program: 69064
Project: 69064
Buggy source:
public void withdraw(WithdrawDTO withdrawDTO){
  checkAccount(withdrawDTO);
  Config config=getConfig(withdrawDTO.getTokenName());
  Assert.notNull(config,CommonConstants.TOKEN_ERR);
  checkCanWithdraw(withdrawDTO,config);
  checkEthBalance(withdrawDTO,config);
  Transaction transaction=new Transaction();
  transaction.setStatus(0);
  transaction.setNumber(withdrawDTO.getNumber());
  transaction.setOrderId(getOrderId(CommonConstants.ORDER_WITHDRAW));
  transaction.setPoundage(config.getPoundage());
  transaction.setRealNumber(withdrawDTO.getNumber().subtract(BigDecimal.valueOf(config.getPoundage())));
  transaction.setToAddress(withdrawDTO.getAddress());
  transaction.setType(CommonConstants.WITHDRAW);
  transaction.setUserId(getUserId());
  transaction.setTokenId(config.getId());
  transaction.setFromAddress(defaultUser);
  transactionMapper.insert(transaction);
  capitalMapper.updateBalance(getUserId(),config.getId(),BigDecimal.ZERO.multiply(withdrawDTO.getNumber()));
}

Fixed version (ground truth):
public void withdraw(WithdrawDTO withdrawDTO){
  checkAccount(withdrawDTO);
  Config config=getConfig(withdrawDTO.getTokenName());
  Assert.notNull(config,CommonConstants.TOKEN_ERR);
  checkCanWithdraw(withdrawDTO,config);
  checkEthBalance(withdrawDTO,config);
  Transaction transaction=new Transaction();
  transaction.setStatus(0);
  transaction.setNumber(withdrawDTO.getNumber());
  transaction.setOrderId(getOrderId(CommonConstants.ORDER_WITHDRAW));
  transaction.setPoundage(config.getPoundage());
  transaction.setRealNumber(withdrawDTO.getNumber().subtract(BigDecimal.valueOf(config.getPoundage())));
  transaction.setToAddress(withdrawDTO.getAddress());
  transaction.setType(CommonConstants.WITHDRAW);
  transaction.setUserId(getUserId());
  transaction.setTokenId(config.getId());
  transaction.setFromAddress(defaultUser);
  transactionMapper.insert(transaction);
  capitalMapper.updateBalance(getUserId(),config.getId(),BigDecimal.ZERO.subtract(withdrawDTO.getNumber()));
}
Program: 69065
Project: 69065
Buggy source:
private void updateSold(BigInteger projectId,BigDecimal ethNumber,BigDecimal balance){
  Orders orders=new Orders();
  orders.setUserId(getUserId());
  Integer orderNum=orderMapper.selectCount(orders);
  Integer buyerNum=orderNum == 1 ? 1 : 0;
  ProjectSold projectSold=new ProjectSold();
  projectSold.setId(projectId);
  projectSold.setSoldEth(ethNumber);
  projectSold.setBuyerNum(buyerNum);
  projectMapper.updateSoldBalance(projectSold);
}

Fixed version (ground truth):
private void updateSold(BigInteger projectId,BigDecimal ethNumber,BigDecimal balance){
  Orders orders=new Orders();
  orders.setUserId(getUserId());
  orders.setProjectId(projectId);
  Integer orderNum=orderMapper.selectCount(orders);
  Integer buyerNum=orderNum == 0 ? 1 : 0;
  ProjectSold projectSold=new ProjectSold();
  projectSold.setId(projectId);
  projectSold.setSoldEth(ethNumber);
  projectSold.setBuyerNum(buyerNum);
  projectMapper.updateSoldBalance(projectSold);
}
Program: 69066
Project: 69066
Buggy source:
private void hashHandler(org.web3j.protocol.core.methods.response.Transaction tx){
  try {
    String key=RedisConstants.LISTEN_HASH + "String_Node_Str" + tx.getHash();
    String hash=tx.getHash();
    if (!redisTemplate.hasKey(key)) {
      return;
    }
    Transaction transaction=new Transaction();
    transaction.setHash(hash);
    transaction=transactionMapper.selectOne(transaction);
    if (null == transaction) {
      return;
    }
    if (web3j.ethGetTransactionByHash(hash).send().hasError()) {
      transaction.setStatus(CommonConstants.ERROR);
    }
 else {
      transaction.setStatus(CommonConstants.STATUS_SUCCESS);
    }
  }
 catch (  Exception e) {
    log.error(e);
  }
}

Fixed version (ground truth):
private void hashHandler(org.web3j.protocol.core.methods.response.Transaction tx){
  try {
    String key=RedisConstants.LISTEN_HASH + "String_Node_Str" + tx.getHash();
    String hash=tx.getHash();
    if (!redisTemplate.hasKey(key)) {
      return;
    }
    Transaction transaction=new Transaction();
    transaction.setHash(hash);
    transaction=transactionMapper.selectOne(transaction);
    if (null == transaction) {
      return;
    }
    if (web3j.ethGetTransactionByHash(hash).send().hasError()) {
      transaction.setStatus(CommonConstants.ERROR);
    }
 else {
      transaction.setStatus(CommonConstants.STATUS_SUCCESS);
    }
    transactionMapper.updateByPrimaryKeySelective(transaction);
    redisTemplate.delete(key);
  }
 catch (  Exception e) {
    log.error(e);
  }
}
Program: 69067
Project: 69067
Buggy source:
public void approval(BigInteger id,Integer status) throws Exception {
  Transaction transaction=new Transaction();
  transaction.setId(id);
  transaction.setStatus(status);
  transactionMapper.updateByPrimaryKeySelective(transaction);
  setBalance(id,status);
  sendValue(id,status);
}

Fixed version (ground truth):
public void approval(BigInteger id,Integer status) throws Exception {
  Assert.isTrue(status != 2,MessageConstants.STATUS_ERROR);
  Transaction transaction=new Transaction();
  transaction.setId(id);
  transaction.setStatus(status);
  transactionMapper.updateByPrimaryKeySelective(transaction);
  setBalance(id,status);
  sendValue(id,status);
}
Program: 69068
Project: 69068
Buggy source:
private String getContractAddressByTokenId(Transaction transaction){
  String contractAddress=null;
  if (!transaction.getTokenId().equals(0)) {
    Project project=projectService.getByTokenId(transaction.getTokenId());
    contractAddress=project.getContractAddress();
  }
  return contractAddress;
}

Fixed version (ground truth):
private String getContractAddressByTokenId(Transaction transaction){
  String contractAddress=null;
  if (!transaction.getTokenId().equals(BigInteger.ZERO)) {
    Project project=projectService.getByTokenId(transaction.getTokenId());
    contractAddress=project.getContractAddress();
  }
  return contractAddress;
}
Program: 69069
Project: 69069
Buggy source:
private void sendValue(BigInteger id,Integer status) throws Exception {
  if (status.equals(1)) {
    Transaction transaction=new Transaction();
    transaction.setId(id);
    transaction=transactionMapper.selectByPrimaryKey(transaction);
    String contractAddress=null;
    BigInteger value=Web3jUtil.getWei(transaction.getRealNumber(),transaction.getTokenId(),redisTemplate);
    contractAddress=getContractAddressByTokenId(transaction);
    sendTransaction(defaultUser,transaction.getToAddress(),contractAddress,value,true);
  }
}

Fixed version (ground truth):
private void sendValue(BigInteger id,Integer status) throws Exception {
  if (status.equals(1)) {
    Transaction transaction=new Transaction();
    transaction.setId(id);
    transaction=transactionMapper.selectByPrimaryKey(transaction);
    String contractAddress=null;
    BigInteger value=Web3jUtil.getWei(transaction.getRealNumber(),transaction.getTokenId(),redisTemplate);
    contractAddress=getContractAddressByTokenId(transaction);
    String hash=sendTransaction(defaultUser,transaction.getToAddress(),contractAddress,value,true);
    transaction.setHash(hash);
    transactionMapper.updateByPrimaryKeySelective(transaction);
  }
}
Program: 69070
Project: 69070
Buggy source:
private void sendTransaction(String fromAddress,String toAddress,String contractAddress,BigInteger realNumber,Boolean listen) throws Exception {
  PersonalUnlockAccount flag=admin.personalUnlockAccount(fromAddress,password).send();
  Assert.isTrue(flag.accountUnlocked(),"String_Node_Str");
  org.web3j.protocol.core.methods.request.Transaction transaction=new org.web3j.protocol.core.methods.request.Transaction(fromAddress,null,DEFAULT_GAS_PRICE,DEFAULT_GAS_LIMIT,toAddress,realNumber,null);
  EthSendTransaction result=null;
  if (null == contractAddress) {
    result=web3j.ethSendTransaction(transaction).send();
  }
 else {
    result=contractService.eth_sendTransaction(transaction,contractAddress);
  }
  Assert.isTrue(result != null && !result.hasError(),null == result ? "String_Node_Str" : result.getError().getMessage());
  if (listen) {
    redisTemplate.opsForValue().set(RedisConstants.LISTEN_HASH + "String_Node_Str" + result.getTransactionHash(),1);
  }
}

Fixed version (ground truth):
private String sendTransaction(String fromAddress,String toAddress,String contractAddress,BigInteger realNumber,Boolean listen) throws Exception {
  PersonalUnlockAccount flag=admin.personalUnlockAccount(fromAddress,password).send();
  Assert.isTrue(flag.accountUnlocked(),"String_Node_Str");
  org.web3j.protocol.core.methods.request.Transaction transaction=new org.web3j.protocol.core.methods.request.Transaction(fromAddress,null,DEFAULT_GAS_PRICE,DEFAULT_GAS_LIMIT,toAddress,realNumber,null);
  EthSendTransaction result=null;
  if (null == contractAddress) {
    result=web3j.ethSendTransaction(transaction).send();
  }
 else {
    result=contractService.eth_sendTransaction(transaction,contractAddress);
  }
  Assert.isTrue(result != null && !result.hasError(),null != result.getError() ? result.getError().getMessage() : "String_Node_Str");
  if (listen) {
    redisTemplate.opsForValue().set(RedisConstants.LISTEN_HASH + "String_Node_Str" + result.getTransactionHash(),1);
  }
  return result.getTransactionHash();
}
Program: 69071
Project: 69071
Buggy source:
@Update("String_Node_Str") void sendToken(@Param("String_Node_Str") BigInteger userId,@Param("String_Node_Str") BigInteger projectId,@Param("String_Node_Str") BigInteger tokenId);

Fixed version (ground truth):
@Insert("String_Node_Str") void sendToken(@Param("String_Node_Str") BigInteger projectId,@Param("String_Node_Str") BigInteger tokenId);
Program: 69072
Project: 69072
Buggy source:
public void sendToken(BigInteger id,Integer sendToken){
  Project project=getNotNullById(id);
  Config config=configService.getConfigByTokenName(project.getTokenName());
  Boolean canSend=project.getStatus().equals(2) && project.getSendToken() == 0;
  Assert.isTrue(canSend,MessageConstants.CANNOT_SEND_TOKEN);
  project.setSendToken(1);
  projectMapper.updateByPrimaryKeySelective(project);
  orderService.updateStatusByProject(id,CommonConstants.ORDER_STATUS_SEND_TOKEN);
  projectMapper.sendToken(getUserId(),id,config.getId());
}

Fixed version (ground truth):
public void sendToken(BigInteger id,Integer sendToken){
  Project project=getNotNullById(id);
  Config config=configService.getConfigByTokenName(project.getTokenName());
  Boolean canSend=project.getStatus().equals(2) && project.getSendToken() == 0;
  Assert.isTrue(canSend,MessageConstants.CANNOT_SEND_TOKEN);
  project.setSendToken(1);
  projectMapper.updateByPrimaryKeySelective(project);
  projectMapper.sendToken(id,config.getId());
  orderService.updateStatusByProject(id,CommonConstants.ORDER_STATUS_SEND_TOKEN);
}
Program: 69073
Project: 69073
Buggy source:
public void insert(Config config){
  configMapper.insertSelective(config);
}

Fixed version (ground truth):
public void insert(Config config){
  String tokenName=config.getTokenName();
  Config configTemp=getConfigByTokenName(tokenName);
  if (null != configTemp) {
    config.setId(configTemp.getId());
    return;
  }
  configMapper.insertSelective(config);
  setUnit(config.getId(),config.getDecimals());
}
Program: 69074
Project: 69074
Buggy source:
public void update(Config config){
  configMapper.updateByPrimaryKeySelective(config);
}

Fixed version (ground truth):
public void update(Config config){
  insert(config);
  configMapper.updateByPrimaryKeySelective(config);
}
Program: 69075
Project: 69075
Buggy source:
public void updateStatus(BigInteger orderId,Integer orderStatus){
  Orders orders=new Orders();
  orders.setId(orderId);
  orders=orderMapper.selectByPrimaryKey(orderId);
  Assert.isTrue(orders.getOrderStatus() == 0,MessageConstants.CANNOT_CANCEL);
  orders.setOrderStatus(orderStatus);
  orderMapper.updateByPrimaryKeySelective(orders);
  Config config=configService.getByPorjectId(orders.getProjectId());
  tokenSoldMapper.updateEth(orders.getProjectId(),orders.getEthNumber());
}

Fixed version (ground truth):
public void updateStatus(BigInteger orderId,Integer orderStatus){
  Orders orders=new Orders();
  orders.setId(orderId);
  orders=orderMapper.selectByPrimaryKey(orderId);
  Assert.isTrue(orders.getOrderStatus() == 0,MessageConstants.CANNOT_CANCEL);
  orders.setOrderStatus(orderStatus);
  orderMapper.updateByPrimaryKeySelective(orders);
  tokenSoldMapper.updateEth(orders.getProjectId(),orders.getEthNumber());
}
Program: 69076
Project: 69076
Buggy source:
public void buy(BuyDTO buyDTO){
  Config config=new Config();
  config.setProjectId(buyDTO.getProjectId());
  config=configMapper.selectOne(config);
  Assert.notNull(config,CommonConstants.PROJECT_NOT_EXIST);
  ProjectVO project=get(buyDTO.getProjectId());
  Assert.notNull(project,CommonConstants.PROJECT_NOT_EXIST);
  BigDecimal sold=getSold(buyDTO.getProjectId()).getSoldEth();
  Assert.isTrue(sold.add(buyDTO.getEthNumber()).compareTo(project.getEthNumber()) < 0,MessageConstants.ETH_OVER);
  Capital capital=new Capital();
  capital.setUserId(getUserId());
  capital.setTokenId(config.getId());
  Capital capitalTemp=capitalMapper.selectOne(capital);
  BigDecimal balance=buyDTO.getEthNumber().multiply(new BigDecimal(project.getRatio()));
  if (null == capitalTemp) {
    capitalTemp=capital;
    capitalTemp.setBalance(balance);
    capitalMapper.insert(capital);
  }
 else {
    capitalMapper.updateBalance(getUserId(),config.getId(),balance);
  }
  Capital ethCapital=new Capital();
  ethCapital.setUserId(getUserId());
  ethCapital.setTokenId(BigInteger.ZERO);
  Integer result=capitalMapper.updateEth(getUserId(),buyDTO.getEthNumber());
  Assert.isTrue(result > 0,CommonConstants.ETH_NOT_ENOUGH);
  addOrder(buyDTO,balance);
  Account account=accountService.getAccount(getUserId());
  Integer orderNum=account.getOrderNum();
  orderNum=null == orderNum ? 1 : ++orderNum;
  account.setOrderNum(orderNum);
  accountService.update(account);
}

Fixed version (ground truth):
public void buy(BuyDTO buyDTO){
  ProjectVO project=get(buyDTO.getProjectId());
  Assert.notNull(project,CommonConstants.PROJECT_NOT_EXIST);
  BigDecimal sold=getSold(buyDTO.getProjectId()).getSoldEth();
  Assert.isTrue(sold.add(buyDTO.getEthNumber()).compareTo(project.getEthNumber()) < 0,MessageConstants.ETH_OVER);
  BigDecimal balance=buyDTO.getEthNumber().multiply(new BigDecimal(project.getRatio()));
  Capital ethCapital=new Capital();
  ethCapital.setUserId(getUserId());
  ethCapital.setTokenId(BigInteger.ZERO);
  Integer result=capitalMapper.updateEth(getUserId(),buyDTO.getEthNumber());
  Assert.isTrue(result > 0,CommonConstants.ETH_NOT_ENOUGH);
  addOrder(buyDTO,balance);
  Account account=accountService.getAccount(getUserId());
  Integer orderNum=account.getOrderNum();
  orderNum=null == orderNum ? 1 : ++orderNum;
  account.setOrderNum(orderNum);
  accountService.update(account);
  String key=RedisConstants.USER_PROJECTS + "String_Node_Str" + getUserId();
  redisTemplate.opsForValue().set(key,orderMapper.getUserProject(getUserId()));
}
Program: 69077
Project: 69077
Buggy source:
public void insert(ProjectDTO projectDTO){
  Project project=(Project)BeanUtil.copyProperties(projectDTO,new Project());
  checkTokenName(projectDTO.getTokenName(),projectDTO.getId());
  projectMapper.insertSelective(project);
  Config config=new Config();
  config.setProjectId(project.getId());
  config.setTokenName(project.getTokenName());
  configService.insert(config);
  setUnit(config.getId(),project.getDecimals());
  ProjectSold projectSold=new ProjectSold();
  projectSold.setId(project.getId());
  projectSold.setBuyerNum(0);
  projectSold.setSendToken(BigDecimal.ZERO);
  projectSold.setSoldEth(BigDecimal.ZERO);
  tokenSoldMapper.insert(projectSold);
}

Fixed version (ground truth):
public void insert(ProjectDTO projectDTO){
  Project project=(Project)BeanUtil.copyProperties(projectDTO,new Project());
  projectMapper.insertSelective(project);
  ProjectSold projectSold=new ProjectSold();
  projectSold.setId(project.getId());
  projectSold.setBuyerNum(0);
  projectSold.setSendToken(BigDecimal.ZERO);
  projectSold.setSoldEth(BigDecimal.ZERO);
  tokenSoldMapper.insert(projectSold);
}
Program: 69078
Project: 69078
Buggy source:
public void update(ProjectDTO projectDTO){
  Project project=(Project)BeanUtil.copyProperties(projectDTO,new Project());
  checkTokenName(projectDTO.getTokenName(),project.getId());
  projectMapper.updateByPrimaryKeySelective(project);
  Config config=new Config();
  config.setProjectId(project.getId());
  config.setTokenName(project.getTokenName());
  configService.update(config);
}

Fixed version (ground truth):
public void update(ProjectDTO projectDTO){
  Project project=(Project)BeanUtil.copyProperties(projectDTO,new Project());
  projectMapper.updateByPrimaryKeySelective(project);
}
Program: 69079
Project: 69079
Buggy source:
public void retire(BigInteger id,Integer retire){
  Project project=getNotNullById(id);
  Config config=configService.getByPorjectId(project.getId());
  Boolean canRetire=project.getStatus().equals(2) && project.getRetire().equals(0) && config.getRechargeStatus().equals(0);
  Assert.isTrue(canRetire,MessageConstants.CANNOT_RETIRE);
  project.setRetire(1);
  projectMapper.updateByPrimaryKeySelective(project);
  orderService.updateStatusByProject(id,CommonConstants.ORDER_STATUS_RETIRE);
}

Fixed version (ground truth):
public void retire(BigInteger id,Integer retire){
  Project project=getNotNullById(id);
  Config config=configService.getConfigByTokenName(project.getTokenName());
  Boolean canRetire=project.getStatus().equals(2) && project.getRetire().equals(0) && config.getRechargeStatus().equals(0);
  Assert.isTrue(canRetire,MessageConstants.CANNOT_RETIRE);
  project.setRetire(1);
  projectMapper.updateByPrimaryKeySelective(project);
  orderService.updateStatusByProject(id,CommonConstants.ORDER_STATUS_RETIRE);
  projectMapper.retireBalance(getUserId(),id);
}
Program: 69080
Project: 69080
Buggy source:
public void sendToken(BigInteger id,Integer sendToken){
  Project project=getNotNullById(id);
  Boolean canSend=project.getStatus().equals(2) && project.getSendToken() == 0;
  Assert.isTrue(canSend,MessageConstants.CANNOT_SEND_TOKEN);
  project.setSendToken(1);
  projectMapper.updateByPrimaryKeySelective(project);
  orderService.updateStatusByProject(id,CommonConstants.ORDER_STATUS_SEND_TOKEN);
}

Fixed version (ground truth):
public void sendToken(BigInteger id,Integer sendToken){
  Project project=getNotNullById(id);
  Config config=configService.getConfigByTokenName(project.getTokenName());
  Boolean canSend=project.getStatus().equals(2) && project.getSendToken() == 0;
  Assert.isTrue(canSend,MessageConstants.CANNOT_SEND_TOKEN);
  project.setSendToken(1);
  projectMapper.updateByPrimaryKeySelective(project);
  orderService.updateStatusByProject(id,CommonConstants.ORDER_STATUS_SEND_TOKEN);
  projectMapper.sendToken(getUserId(),id,config.getId());
}
Program: 69081
Project: 69081
Buggy source:
private BigInteger getTokenId(org.web3j.protocol.core.methods.response.Transaction tx){
  if (Web3jUtil.isContractTx(tx)) {
    BigInteger tokenId=transactionMapper.selectTokenIdByContractAddress(tx.getTo());
    return tokenId;
  }
 else {
    return BigInteger.ZERO;
  }
}

Fixed version (ground truth):
private BigInteger getTokenId(org.web3j.protocol.core.methods.response.Transaction tx){
  if (Web3jUtil.isContractTx(tx)) {
    BigInteger tokenId=configService.getIdByContractAddress(tx.getTo());
    return tokenId;
  }
 else {
    return BigInteger.ZERO;
  }
}
Program: 69082
Project: 69082
Buggy source:
private String getContractAddressByTokenId(Transaction transaction){
  String contractAddress=null;
  if (!transaction.getTokenId().equals(BigInteger.ZERO)) {
    Project project=projectService.getByTokenId(transaction.getTokenId());
    contractAddress=project.getContractAddress();
  }
  return contractAddress;
}

Fixed version (ground truth):
private String getContractAddressByTokenId(Transaction transaction){
  return configService.getByTokenId(transaction.getTokenId()).getContractAddress();
}
Program: 69083
Project: 69083
Buggy source:
public ContainerDefinition findContainerWithExposedPort(EcsPushDefinition definition,boolean isAlb){
  if (!getTaskType(definition).equals(TaskType.WEB)) {
    throw new AwsExecException("String_Node_Str");
  }
  ContainerDefinition container=null;
  for (  ContainerDefinition containerDefinition : definition.getContainerDefinitions()) {
    if (containerDefinition.getPortMappings() != null && !containerDefinition.getPortMappings().isEmpty()) {
      for (      PortMapping p : containerDefinition.getPortMappings()) {
        if (p.getHostPort() == 0) {
          if (container == null) {
            container=containerDefinition;
          }
 else {
            throw new AwsExecException("String_Node_Str");
          }
        }
      }
    }
  }
  if (container != null) {
    if (!isAlb) {
      Random random=new Random();
      int randomPort=(random.nextInt() * (DOCKER_MAX_PORT - DOCKER_MIN_PORT)) + DOCKER_MIN_PORT;
      container.getPortMappings().get(0).setHostPort(randomPort);
    }
  }
 else {
    throw new AwsExecException("String_Node_Str");
  }
  return container;
}

Fixed version (ground truth):
public ContainerDefinition findContainerWithExposedPort(EcsPushDefinition definition,boolean isAlb){
  if (!getTaskType(definition).equals(TaskType.WEB)) {
    throw new AwsExecException("String_Node_Str");
  }
  ContainerDefinition container=null;
  for (  ContainerDefinition containerDefinition : definition.getContainerDefinitions()) {
    if (containerDefinition.getPortMappings() != null && !containerDefinition.getPortMappings().isEmpty()) {
      for (      PortMapping p : containerDefinition.getPortMappings()) {
        if (p.getHostPort() == 0) {
          if (container == null) {
            container=containerDefinition;
          }
 else {
            throw new AwsExecException("String_Node_Str");
          }
        }
      }
    }
  }
  if (container != null) {
    if (!isAlb) {
      int randomPort=(int)((Math.random() * (DOCKER_MAX_PORT - DOCKER_MIN_PORT)) + DOCKER_MIN_PORT);
      container.getPortMappings().get(0).setHostPort(randomPort);
    }
  }
 else {
    throw new AwsExecException("String_Node_Str");
  }
  return container;
}
Program: 69085
Project: 69085
Buggy source:
TableAndFile(File databaseDir,long fileNumber,UserComparator userComparator,boolean verifyChecksums) throws IOException {
  String tableFileName=Filename.tableFileName(fileNumber);
  File tableFile=new File(databaseDir,tableFileName);
  FileInputStream fis=new FileInputStream(tableFile);
  FileChannel fileChannel=fis.getChannel();
  try {
    if (Iq80DBFactory.USE_MMAP) {
      table=new MMapTable(tableFile.getAbsolutePath(),fileChannel,userComparator,verifyChecksums);
    }
 else {
      table=new FileChannelTable(tableFile.getAbsolutePath(),fileChannel,userComparator,verifyChecksums);
    }
  }
  finally {
    Closeables.closeQuietly(fis);
    Closeables.closeQuietly(fileChannel);
  }
}

Fixed version (ground truth):
TableAndFile(File databaseDir,long fileNumber,UserComparator userComparator,boolean verifyChecksums) throws IOException {
  String tableFileName=Filename.tableFileName(fileNumber);
  File tableFile=new File(databaseDir,tableFileName);
  FileInputStream fis=new FileInputStream(tableFile);
  FileChannel fileChannel=fis.getChannel();
  if (Iq80DBFactory.USE_MMAP) {
    table=new MMapTable(tableFile.getAbsolutePath(),fileChannel,userComparator,verifyChecksums);
  }
 else {
    table=new FileChannelTable(tableFile.getAbsolutePath(),fileChannel,userComparator,verifyChecksums);
  }
}
Program: 69086
Project: 69086
Buggy source:
public TableCache(final File databaseDir,final int tableCacheSize,final UserComparator userComparator,final boolean verifyChecksums){
  requireNonNull(databaseDir,"String_Node_Str");
  cache=new LruCache<>(tableCacheSize);
  this.userComparator=userComparator;
  this.verifyChecksums=verifyChecksums;
  this.databaseDir=databaseDir;
}

Fixed version (ground truth):
public TableCache(final File databaseDir,final int tableCacheSize,final UserComparator userComparator,final boolean verifyChecksums){
  requireNonNull(databaseDir,"String_Node_Str");
  cache=new TableLruCache(tableCacheSize);
  this.userComparator=userComparator;
  this.verifyChecksums=verifyChecksums;
  this.databaseDir=databaseDir;
}
Program: 69087
Project: 69087
Buggy source:
@Test public void testBackgroundCompaction() throws Exception {
  Options options=new Options();
  options.maxOpenFiles(100);
  options.createIfMissing(true);
  DbImpl db=new DbImpl(options,this.databaseDir);
  Random random=new Random(301);
  for (int i=0; i < 200000 * STRESS_FACTOR; i++) {
    db.put(randomString(random,64).getBytes(),new byte[]{0x01},new WriteOptions().sync(false));
    db.get(randomString(random,64).getBytes());
    if ((i % 50000) == 0 && i != 0) {
      System.out.println(i + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Test public void testBackgroundCompaction() throws Exception {
  Options options=new Options();
  options.maxOpenFiles(100);
  options.createIfMissing(true);
  DbImpl db=new DbImpl(this.databaseDir,options);
  Random random=new Random(301);
  for (int i=0; i < 200000 * STRESS_FACTOR; i++) {
    db.put(randomString(random,64).getBytes(),new byte[]{0x01},new WriteOptions().sync(false));
    db.get(randomString(random,64).getBytes());
    if ((i % 50000) == 0 && i != 0) {
      System.out.println(i + "String_Node_Str");
    }
  }
}
Program: 69088
Project: 69088
Buggy source:
public void reopen(Options options) throws IOException {
  db.close();
  db=new DbImpl(options.verifyChecksums(true).createIfMissing(false).errorIfExists(false),databaseDir);
}

Fixed version (ground truth):
public void reopen(Options options) throws IOException {
  db.close();
  db=new DbImpl(databaseDir,options.verifyChecksums(true).createIfMissing(false).errorIfExists(false));
}
Program: 69089
Project: 69089
Buggy source:
DbStringWrapper(Options options,File databaseDir) throws IOException {
  this.options=options.verifyChecksums(true).createIfMissing(true).errorIfExists(true);
  this.databaseDir=databaseDir;
  this.db=new DbImpl(options,databaseDir);
  opened.add(this);
}

Fixed version (ground truth):
DbStringWrapper(Options options,File databaseDir) throws IOException {
  this.options=options.verifyChecksums(true).createIfMissing(true).errorIfExists(true);
  this.databaseDir=databaseDir;
  this.db=new DbImpl(databaseDir,options);
  opened.add(this);
}
Program: 69090
Project: 69090
Buggy source:
@Test public void testCompactionsOnBigDataSet() throws Exception {
  Options options=new Options();
  options.createIfMissing(true);
  DbImpl db=new DbImpl(options,databaseDir);
  for (int index=0; index < 5000000; index++) {
    String key="String_Node_Str" + index;
    String value="String_Node_Str" + index + "String_Node_Str";
    db.put(key.getBytes(UTF_8),value.getBytes(UTF_8));
  }
}

Fixed version (ground truth):
@Test public void testCompactionsOnBigDataSet() throws Exception {
  Options options=new Options();
  options.createIfMissing(true);
  DbImpl db=new DbImpl(databaseDir,options);
  for (int index=0; index < 5000000; index++) {
    String key="String_Node_Str" + index;
    String value="String_Node_Str" + index + "String_Node_Str";
    db.put(key.getBytes(UTF_8),value.getBytes(UTF_8));
  }
}
Program: 69091
Project: 69091
Buggy source:
/** 
 * Unmarshall byte[] to string set
 */
public static Set<String> unMarshallStringSet(byte[] bytes){
  Parcel parcel=null;
  try {
    parcel=Parcel.obtain();
    parcel.unmarshall(bytes,0,bytes.length);
    return new HashSet<>(parcel.createStringArrayList());
  }
  finally {
    if (parcel != null) {
      parcel.recycle();
    }
  }
}

Fixed version (ground truth):
/** 
 * Unmarshall byte[] to string set
 */
public static Set<String> unMarshallStringSet(byte[] bytes){
  Parcel parcel=null;
  try {
    parcel=Parcel.obtain();
    parcel.unmarshall(bytes,0,bytes.length);
    parcel.setDataPosition(0);
    return new HashSet<>(parcel.createStringArrayList());
  }
  finally {
    if (parcel != null) {
      parcel.recycle();
    }
  }
}
Program: 69092
Project: 69092
Buggy source:
@Override public void use(AbstractPlayer p,AbstractMonster m){
  if (this.upgraded) {
    this.scaling=.5;
  }
 else {
    this.scaling=.33;
  }
  AbstractDungeon.actionManager.addToBottom(new DamageAction((AbstractCreature)m,new DamageInfo(p,this.damage,this.damageTypeForTurn),AbstractGameAction.AttackEffect.SLASH_VERTICAL));
  AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p,p,(this.block + (int)(scaling * this.damage))));
}

Fixed version (ground truth):
@Override public void use(AbstractPlayer p,AbstractMonster m){
  int dexCount=GetPowerCount(p,"String_Node_Str");
  if (this.upgraded) {
    this.scaling=.5;
  }
 else {
    this.scaling=.33;
  }
  AbstractDungeon.actionManager.addToBottom(new DamageAction((AbstractCreature)m,new DamageInfo(p,this.damage,this.damageTypeForTurn),AbstractGameAction.AttackEffect.SLASH_VERTICAL));
  AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p,p,(dexCount + (int)(scaling * this.damage))));
}
Program: 69093
Project: 69093
Buggy source:
@Override public void receiveEditCharacters(){
  logger.info("String_Node_Str");
  logger.info("String_Node_Str" + TheJuggernautEnum.THE_JUGGERNAUT.toString());
  BaseMod.addCharacter(TheJuggernaut.class,"String_Node_Str","String_Node_Str",AbstractCardEnum.COPPER.toString(),"String_Node_Str",makePath(SEEKER_BUTTON),makePath(SEEKER_PORTRAIT),TheJuggernautEnum.THE_JUGGERNAUT.toString());
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public void receiveEditCharacters(){
  logger.info("String_Node_Str");
  logger.info("String_Node_Str" + TheJuggernautEnum.THE_JUGGERNAUT.toString());
  BaseMod.addCharacter(TheJuggernaut.class,"String_Node_Str","String_Node_Str",AbstractCardEnum.COPPER.toString(),"String_Node_Str",makePath(JUGGERNAUT_BUTTON),makePath(JUGGERNAUT_PORTRAIT),TheJuggernautEnum.THE_JUGGERNAUT.toString());
  logger.info("String_Node_Str");
}
Program: 69095
Project: 69095
Buggy source:
@Override public void use(AbstractPlayer p,AbstractMonster m){
  if (AbstractDungeon.player.drawPile.isEmpty()) {
    AbstractDungeon.actionManager.addToBottom(new EmptyDeckShuffleAction());
  }
  AbstractDungeon.actionManager.addToBottom(new DrawCardAction(p,this.magicNumber));
  AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p,p,this.block));
  AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p,p,new DexterityPower(p,DEX_GAIN_AMT),DEX_GAIN_AMT));
}

Fixed version (ground truth):
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new DrawCardAction(p,this.magicNumber));
  AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p,p,this.block));
  AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p,p,new DexterityPower(p,DEX_GAIN_AMT),DEX_GAIN_AMT));
}
Program: 69096
Project: 69096
Buggy source:
@Override public void use(AbstractPlayer p,AbstractMonster m){
  int strengthCount=GetPowerCount(p,"String_Node_Str") * this.magicNumber;
  this.block=this.baseBlock + strengthCount;
  AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p,p,this.block));
}

Fixed version (ground truth):
@Override public void use(AbstractPlayer p,AbstractMonster m){
  int strengthCount=GetPowerCount(p,"String_Node_Str") * this.magicNumber;
  AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p,p,this.block + strengthCount));
}
Program: 69097
Project: 69097
Buggy source:
public Inertia(){
  super(ID,NAME,JuggerMod.makePath(JuggerMod.INERTIA),COST,DESCRIPTION,CardType.POWER,AbstractCardEnum.COPPER,CardRarity.UNCOMMON,CardTarget.SELF,POOL);
}

Fixed version (ground truth):
public Inertia(){
  super(ID,NAME,JuggerMod.makePath(JuggerMod.INERTIA),COST,DESCRIPTION,CardType.POWER,AbstractCardEnum.COPPER,CardRarity.RARE,CardTarget.SELF,POOL);
}
Program: 69098
Project: 69098
Buggy source:
@Override public void use(AbstractPlayer p,AbstractMonster m){
  if (AbstractDungeon.player.drawPile.isEmpty()) {
    AbstractDungeon.actionManager.addToBottom(new EmptyDeckShuffleAction());
  }
  AbstractDungeon.actionManager.addToBottom(new DrawCardAction(p,this.magicNumber));
  AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p,p,new DexterityPower(p,DEX_LOSS),DEX_LOSS));
}

Fixed version (ground truth):
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new DrawCardAction(p,this.magicNumber));
  AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p,p,new DexterityPower(p,DEX_LOSS),DEX_LOSS));
}
Program: 69099
Project: 69099
Buggy source:
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p,p,new ConfusionPower(p)));
}

Fixed version (ground truth):
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p,p,new ConfusionPower(p)));
  if (AbstractDungeon.player.drawPile.isEmpty()) {
    AbstractDungeon.actionManager.addToBottom(new EmptyDeckShuffleAction());
  }
  AbstractDungeon.actionManager.addToBottom(new DrawCardAction(p,DRAW));
}
Program: 69100
Project: 69100
Buggy source:
public void upgrade(){
  if (!this.upgraded) {
    upgradeName();
    upgradeDamage(UPGRADE_PLUS_DMG);
  }
}

Fixed version (ground truth):
public void upgrade(){
  if (!this.upgraded) {
    upgradeName();
    upgradeBaseCost(UPGRADED_COST);
  }
}
Program: 69101
Project: 69101
Buggy source:
public void use(com.megacrit.cardcrawl.characters.AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.common.DamageAction(m,new DamageInfo(p,this.damage,this.damageTypeForTurn),AbstractGameAction.AttackEffect.SLASH_DIAGONAL));
}

Fixed version (ground truth):
public void use(com.megacrit.cardcrawl.characters.AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.common.DamageAction(m,new DamageInfo(p,this.damage,this.damageTypeForTurn),AbstractGameAction.AttackEffect.SLASH_DIAGONAL));
  AbstractDungeon.actionManager.addToBottom(new GainEnergyAction(ENERGY_GAIN));
}
Program: 69102
Project: 69102
Buggy source:
private int getHandCount(){
  int count=0;
  for (  AbstractCard c : AbstractDungeon.player.hand.group) {
    if (c == null)     continue;
    ++count;
  }
  return count - 1;
}

Fixed version (ground truth):
private int getHandCount(){
  int count=0;
  for (  AbstractCard c : AbstractDungeon.player.hand.group) {
    if (c == null)     continue;
    ++count;
  }
  return count;
}
Program: 69103
Project: 69103
Buggy source:
public TheJuggernaut(String name,PlayerClass setClass){
  super(name,setClass,orbTextures,"String_Node_Str","String_Node_Str","String_Node_Str");
  initializeClass(null,JuggerMod.makePath(JuggerMod.SEEKER_SHOULDER_2),JuggerMod.makePath(JuggerMod.SEEKER_SHOULDER_1),JuggerMod.makePath(JuggerMod.SEEKER_CORPSE),getLoadout(),20.0F,-10.0F,220.0F,290.0F,new EnergyManager(ENERGY_PER_TURN));
}

Fixed version (ground truth):
public TheJuggernaut(String name,PlayerClass setClass){
  super(name,setClass,orbTextures,"String_Node_Str","String_Node_Str","String_Node_Str");
  initializeClass(null,JuggerMod.makePath(JuggerMod.JUGGERNAUT_SHOULDER_2),JuggerMod.makePath(JuggerMod.JUGGERNAUT_SHOULDER_1),JuggerMod.makePath(JuggerMod.JUGGERNAUT_CORPSE),getLoadout(),20.0F,-10.0F,220.0F,290.0F,new EnergyManager(ENERGY_PER_TURN));
}
Program: 69104
Project: 69104
Buggy source:
public GigaImpactPower(int Amt){
  this.name=NAME;
  this.ID="String_Node_Str";
  this.owner=AbstractDungeon.player;
  this.amount=Amt;
  this.updateDescription();
  this.img=JuggerMod.getGigaImpactPowerTexture();
  this.type=AbstractPower.PowerType.DEBUFF;
  this.isTurnBased=true;
}

Fixed version (ground truth):
public GigaImpactPower(int Amt){
  this.name=NAME;
  this.ID="String_Node_Str";
  this.owner=AbstractDungeon.player;
  this.amount=Amt;
  this.updateDescription();
  this.img=JuggerMod.getGigaImpactPowerTexture();
  this.isTurnBased=true;
}
Program: 69106
Project: 69106
Buggy source:
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new SwordBoomerangAction(AbstractDungeon.getMonsters().getRandomMonster(true),new DamageInfo(p,this.damage),this.magicNumber));
}

Fixed version (ground truth):
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom(new SwordBoomerangAction(AbstractDungeon.getMonsters().getRandomMonster(true),new DamageInfo(p,ATTACK_DMG),this.magicNumber));
}
Program: 69108
Project: 69108
Buggy source:
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom((new DamageAction((AbstractCreature)m,new DamageInfo(p,this.damage,this.damageTypeForTurn),AbstractGameAction.AttackEffect.SLASH_HEAVY)));
  DestructiveFinish that=this;
  AbstractDungeon.actionManager.addToBottom(new DiscardWithCallbackAction(p,p,this.magicNumber,false,true,true,false,new IDiscardCallback(){
    @Override public void processCard(    AbstractCard c){
      AbstractDungeon.actionManager.addToBottom(new DamageAction((AbstractCreature)m,new DamageInfo(p,that.damage,that.damageTypeForTurn),AbstractGameAction.AttackEffect.SLASH_HEAVY));
    }
  }
));
}

Fixed version (ground truth):
@Override public void use(AbstractPlayer p,AbstractMonster m){
  AbstractDungeon.actionManager.addToBottom((new DamageAction((AbstractCreature)m,new DamageInfo(p,this.damage,this.damageTypeForTurn),AbstractGameAction.AttackEffect.SLASH_HEAVY)));
  AbstractDungeon.actionManager.addToBottom(new DestructiveFinishAction(m,new DamageInfo(p,this.damage,this.damageTypeForTurn),this.magicNumber));
}
Program: 69109
Project: 69109
Buggy source:
/** 
 * Creates a new item.
 * @param model the instance of the {@code MODEL} class.
 * @param adapterViewTypeDelegate the {@link AdapterViewTypeDelegate} associated with this item.
 */
public ViewItem(MODEL model,AdapterViewTypeDelegate adapterViewTypeDelegate){
  this.model=model;
  this.viewType=adapterViewTypeDelegate.getViewType();
}

Fixed version (ground truth):
/** 
 * Creates a new item.
 * @param model the instance of the {@code MODEL} class.
 * @param adapterViewTypeDelegate the {@link AdapterViewTypeDelegate} associated with this item.
 */
public ViewItem(MODEL model,AdapterViewTypeDelegate adapterViewTypeDelegate){
  this.model=model;
  this.viewType=adapterViewTypeDelegate.getViewType();
  if (viewType == RecyclerView.INVALID_TYPE) {
    throw new RuntimeException("String_Node_Str" + adapterViewTypeDelegate);
  }
}
Program: 69110
Project: 69110
Buggy source:
private CompletableFuture<Optional<Conversation>> searchNextConversationPage(String conversationName,Iterator<CompletableFuture<Result<List<Conversation>,SlackError>>> pageIterator){
  if (!pageIterator.hasNext()) {
    return CompletableFuture.completedFuture(Optional.empty());
  }
  CompletableFuture<Result<List<Conversation>,SlackError>> nextPage=pageIterator.next();
  return nextPage.thenApply(Result::unwrapOrElseThrow).thenCompose(conversations -> {
    Optional<Conversation> matchInPage=conversations.stream().filter(conversation -> conversation.getName().isPresent() && conversation.getName().get().equals(conversationName)).findFirst();
    if (matchInPage.isPresent()) {
      return CompletableFuture.completedFuture(matchInPage);
    }
    return searchNextConversationPage(conversationName,pageIterator);
  }
);
}

Fixed version (ground truth):
private CompletableFuture<Optional<Conversation>> searchNextConversationPage(String conversationName,Iterator<CompletableFuture<Result<List<Conversation>,SlackError>>> pageIterator){
  if (!pageIterator.hasNext()) {
    return CompletableFuture.completedFuture(Optional.empty());
  }
  CompletableFuture<Result<List<Conversation>,SlackError>> nextPage=pageIterator.next();
  return nextPage.thenApply(Result::unwrapOrElseThrow).thenComposeAsync(conversations -> {
    Optional<Conversation> matchInPage=conversations.stream().filter(conversation -> conversation.getName().isPresent() && conversation.getName().get().equals(conversationName)).findFirst();
    if (matchInPage.isPresent()) {
      return CompletableFuture.completedFuture(matchInPage);
    }
    return searchNextConversationPage(conversationName,pageIterator);
  }
,recursingExecutor);
}
Program: 69111
Project: 69111
Buggy source:
private CompletableFuture<Optional<SlackChannel>> searchNextPage(String channelName,Iterator<CompletableFuture<Result<List<SlackChannel>,SlackError>>> pageIterator){
  if (!pageIterator.hasNext()) {
    return CompletableFuture.completedFuture(Optional.empty());
  }
  CompletableFuture<Result<List<SlackChannel>,SlackError>> nextPage=pageIterator.next();
  return nextPage.thenApply(Result::unwrapOrElseThrow).thenCompose(channels -> {
    Optional<SlackChannel> matchInPage=channels.stream().filter(channel -> channel.getName().equals(channelName)).findFirst();
    if (matchInPage.isPresent()) {
      return CompletableFuture.completedFuture(matchInPage);
    }
    return searchNextPage(channelName,pageIterator);
  }
);
}

Fixed version (ground truth):
private CompletableFuture<Optional<SlackChannel>> searchNextPage(String channelName,Iterator<CompletableFuture<Result<List<SlackChannel>,SlackError>>> pageIterator){
  if (!pageIterator.hasNext()) {
    return CompletableFuture.completedFuture(Optional.empty());
  }
  CompletableFuture<Result<List<SlackChannel>,SlackError>> nextPage=pageIterator.next();
  return nextPage.thenApply(Result::unwrapOrElseThrow).thenComposeAsync(channels -> {
    Optional<SlackChannel> matchInPage=channels.stream().filter(channel -> channel.getName().equals(channelName)).findFirst();
    if (matchInPage.isPresent()) {
      return CompletableFuture.completedFuture(matchInPage);
    }
    return searchNextPage(channelName,pageIterator);
  }
,recursingExecutor);
}
Program: 69112
Project: 69112
Buggy source:
@AssistedInject public SlackWebClient(DefaultHttpRequestDebugger defaultHttpRequestDebugger,DefaultHttpResponseDebugger defaultHttpResponseDebugger,NioHttpClient.Factory nioHttpClientFactory,@Assisted SlackClientRuntimeConfig config){
  this.nioHttpClient=nioHttpClientFactory.wrap(new NingAsyncHttpClient(config.getHttpConfig().orElse(DEFAULT_CONFIG)));
  this.config=config;
  this.methodAcceptor=config.getMethodFilter().orElse(new SlackMethodAcceptor(){
    @Override public String getFailureExplanation(    SlackMethod method,    Object params){
      throw new IllegalStateException("String_Node_Str");
    }
    @Override public boolean test(    SlackMethod slackMethod,    Object o){
      return true;
    }
  }
);
  this.requestDebugger=config.getRequestDebugger().orElse(defaultHttpRequestDebugger);
  this.responseDebugger=config.getResponseDebugger().orElse(defaultHttpResponseDebugger);
}

Fixed version (ground truth):
@AssistedInject public SlackWebClient(DefaultHttpRequestDebugger defaultHttpRequestDebugger,DefaultHttpResponseDebugger defaultHttpResponseDebugger,NioHttpClient.Factory nioHttpClientFactory,@Assisted SlackClientRuntimeConfig config){
  this.nioHttpClient=nioHttpClientFactory.wrap(new NingAsyncHttpClient(config.getHttpConfig().orElse(DEFAULT_CONFIG)));
  this.config=config;
  this.methodAcceptor=config.getMethodFilter().orElse(new SlackMethodAcceptor(){
    @Override public String getFailureExplanation(    SlackMethod method,    Object params){
      throw new IllegalStateException("String_Node_Str");
    }
    @Override public boolean test(    SlackMethod slackMethod,    Object o){
      return true;
    }
  }
);
  this.requestDebugger=config.getRequestDebugger().orElse(defaultHttpRequestDebugger);
  this.responseDebugger=config.getResponseDebugger().orElse(defaultHttpResponseDebugger);
  this.recursingExecutor=MoreExecutors.threadPoolDaemonExecutorBuilder("String_Node_Str").setFollowThreadLocals(true).setUnbounded(true).build();
}
Program: 69113
Project: 69113
Buggy source:
@Override protected final CompletableFuture<T> computeNext(){
  try {
    if (page == null || page.hasMore().join()) {
      page=getPage(getInitialOffset());
      return page.getResults();
    }
    return endOfData();
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
@Override protected final CompletableFuture<T> computeNext(){
  try {
    if (page == null) {
      page=getPage(getInitialOffset());
      if (page == null) {
        return endOfData();
      }
      return page.getResults();
    }
    if (page.hasMore().join()) {
      page=getPage(page.getOffset().join());
      return page.getResults();
    }
    return endOfData();
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}
Program: 69114
Project: 69114
Buggy source:
@Override public void debugProcessingFailure(long requestId,SlackMethod method,HttpRequest request,HttpResponse response,Throwable ex){
  LOG.error("String_Node_Str",request,method,HttpFormatter.formatRequest(request),HttpFormatter.formatResponse(response),ex);
}

Fixed version (ground truth):
@Override public void debugProcessingFailure(long requestId,SlackMethod method,HttpRequest request,HttpResponse response,Throwable ex){
  LOG.error("String_Node_Str",requestId,method,HttpFormatter.formatRequest(request),HttpFormatter.formatResponse(response),ex);
}
Program: 69115
Project: 69115
Buggy source:
@Override public void debugSlackApiError(long requestId,SlackMethod method,HttpRequest request,HttpResponse failure){
  LOG.error("String_Node_Str",request,method,HttpFormatter.formatRequest(request),HttpFormatter.formatResponse(failure));
}

Fixed version (ground truth):
@Override public void debugSlackApiError(long requestId,SlackMethod method,HttpRequest request,HttpResponse failure){
  LOG.error("String_Node_Str",requestId,method,HttpFormatter.formatRequest(request),HttpFormatter.formatResponse(failure));
}