nus-yam/ex-repair huggingface dataset:
Program: 68980
Project: 68980
Buggy source:
public static void main(String[] args) throws Exception {
  final SpannerRestoreOptions options=PipelineOptionsFactory.fromArgs(args).withValidation().as(SpannerRestoreOptions.class);
  final Util util=new Util();
  final SpannerConfig spannerConfig=SpannerConfig.create().withInstanceId(options.getOutputSpannerInstanceId()).withDatabaseId(options.getOutputSpannerDatabaseId());
  if (options.getShouldCreateDatabaseAndTables()) {
    createDatabaseAndTables(options.getProjectId(),options.getOutputSpannerInstanceId(),options.getOutputSpannerDatabaseId(),options.getInputFolder(),util);
  }
  final LinkedHashMap<String,LinkedList<String>> mapOfParentToAllChildrenTablesInOrderToFetch=queryListOfTablesToRestore(options.getInputFolder(),options.getInputFolder(),options.getTablesToIncludeInRestore(),options.getTablesToExcludeFromRestore(),util);
  ExecutorService threadPool=Executors.newFixedThreadPool(mapOfParentToAllChildrenTablesInOrderToFetch.size());
  for (  String rootTableName : mapOfParentToAllChildrenTablesInOrderToFetch.keySet()) {
    Runnable insertionTask=new PerformRestoreOfRootTableAndItsChildren(rootTableName,mapOfParentToAllChildrenTablesInOrderToFetch.get(rootTableName),args,spannerConfig);
    threadPool.execute(insertionTask);
  }
  threadPool.shutdown();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  final SpannerRestoreOptions options=PipelineOptionsFactory.fromArgs(args).withValidation().as(SpannerRestoreOptions.class);
  final Util util=new Util();
  final SpannerConfig spannerConfig=SpannerConfig.create().withInstanceId(options.getOutputSpannerInstanceId()).withDatabaseId(options.getOutputSpannerDatabaseId());
  if (options.getShouldCreateDatabaseAndTables()) {
    createDatabaseAndTables(options.getProjectId(),options.getOutputSpannerInstanceId(),options.getOutputSpannerDatabaseId(),options.getInputFolder(),util);
  }
  final LinkedHashMap<String,LinkedList<String>> mapOfParentToAllChildrenTablesInOrderToFetch=queryListOfTablesToRestore(options.getInputFolder(),options.getInputFolder(),options.getTablesToIncludeInRestore(),options.getTablesToExcludeFromRestore(),util);
  if (mapOfParentToAllChildrenTablesInOrderToFetch.size() == 0) {
    LOG.info("String_Node_Str" + "String_Node_Str" + options.getInputFolder());
  }
  ExecutorService threadPool=Executors.newFixedThreadPool(mapOfParentToAllChildrenTablesInOrderToFetch.size());
  for (  String rootTableName : mapOfParentToAllChildrenTablesInOrderToFetch.keySet()) {
    Runnable insertionTask=new PerformRestoreOfRootTableAndItsChildren(rootTableName,mapOfParentToAllChildrenTablesInOrderToFetch.get(rootTableName),args,spannerConfig);
    threadPool.execute(insertionTask);
  }
  threadPool.shutdown();
}
Program: 68981
Project: 68981
Buggy source:
/** 
 * Temporary workaround put in until https://github.com/apache/beam/pull/4946 is live. Gets the list of tables to backup.
 */
public static ImmutableList<String> getTableNamesBeingBackedUp(String projectId,String instance,String databaseId,String tableNamesQuery,Util util){
  ImmutableList<Struct> tableNames=util.performSingleSpannerQuery(projectId,instance,databaseId,tableNamesQuery);
  ArrayList<String> tableNamesAsStrings=new ArrayList<String>();
  String parentTableName="String_Node_Str";
  for (  Struct inputRow : tableNames) {
    if (!inputRow.isNull("String_Node_Str")) {
      parentTableName=inputRow.getString("String_Node_Str");
    }
    tableNamesAsStrings.add(inputRow.getString("String_Node_Str") + "String_Node_Str" + parentTableName);
  }
  return ImmutableList.copyOf(tableNamesAsStrings);
}

Fixed version (ground truth):
/** 
 * Temporary workaround put in until https://github.com/apache/beam/pull/4946 is live. Gets the list of tables to backup.
 */
public static ImmutableList<String> getTableNamesBeingBackedUp(String projectId,String instance,String databaseId,String tableNamesQuery,Util util){
  ImmutableList<Struct> tableNames=util.performSingleSpannerQuery(projectId,instance,databaseId,tableNamesQuery);
  ArrayList<String> tableNamesAsStrings=new ArrayList<String>();
  for (  Struct inputRow : tableNames) {
    String parentTableName="String_Node_Str";
    if (!inputRow.isNull("String_Node_Str")) {
      parentTableName=inputRow.getString("String_Node_Str");
    }
    tableNamesAsStrings.add(inputRow.getString("String_Node_Str") + "String_Node_Str" + parentTableName);
  }
  return ImmutableList.copyOf(tableNamesAsStrings);
}
Program: 68982
Project: 68982
Buggy source:
public static void main(String[] args) throws Exception {
  final SpannerRestoreOptions options=PipelineOptionsFactory.fromArgs(args).withValidation().as(SpannerRestoreOptions.class);
  final Util util=new Util();
  final SpannerConfig spannerConfig=SpannerConfig.create().withInstanceId(options.getOutputSpannerInstanceId()).withDatabaseId(options.getOutputSpannerDatabaseId());
  if (options.getShouldCreateDatabaseAndTables()) {
    createDatabaseAndTables(options.getProjectId(),options.getOutputSpannerInstanceId(),options.getOutputSpannerDatabaseId(),options.getInputFolder(),util);
  }
  final LinkedHashMap<String,LinkedList<String>> mapOfParentToAllChildrenTablesInOrderToFetch=queryListOfTablesToRestore(options.getInputFolder(),options.getInputFolder(),options.getTablesToIncludeInRestore(),options.getTablesToExcludeFromRestore(),util);
  ExecutorService threadPool=Executors.newFixedThreadPool(mapOfParentToAllChildrenTablesInOrderToFetch.size());
  for (  String rootTableName : mapOfParentToAllChildrenTablesInOrderToFetch.keySet()) {
    Runnable insertionTask=new PerformRestoreOfRootTableAndItsChildren(rootTableName,mapOfParentToAllChildrenTablesInOrderToFetch.get(rootTableName),args,spannerConfig);
    threadPool.execute(insertionTask);
  }
  threadPool.shutdown();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  final SpannerRestoreOptions options=PipelineOptionsFactory.fromArgs(args).withValidation().as(SpannerRestoreOptions.class);
  final Util util=new Util();
  final SpannerConfig spannerConfig=SpannerConfig.create().withInstanceId(options.getOutputSpannerInstanceId()).withDatabaseId(options.getOutputSpannerDatabaseId());
  if (options.getShouldCreateDatabaseAndTables()) {
    createDatabaseAndTables(options.getProjectId(),options.getOutputSpannerInstanceId(),options.getOutputSpannerDatabaseId(),options.getInputFolder(),util);
  }
  final LinkedHashMap<String,LinkedList<String>> mapOfParentToAllChildrenTablesInOrderToFetch=queryListOfTablesToRestore(options.getInputFolder(),options.getInputFolder(),options.getTablesToIncludeInRestore(),options.getTablesToExcludeFromRestore(),util);
  if (mapOfParentToAllChildrenTablesInOrderToFetch.size() == 0) {
    LOG.info("String_Node_Str" + "String_Node_Str" + options.getInputFolder());
  }
  ExecutorService threadPool=Executors.newFixedThreadPool(mapOfParentToAllChildrenTablesInOrderToFetch.size());
  for (  String rootTableName : mapOfParentToAllChildrenTablesInOrderToFetch.keySet()) {
    Runnable insertionTask=new PerformRestoreOfRootTableAndItsChildren(rootTableName,mapOfParentToAllChildrenTablesInOrderToFetch.get(rootTableName),args,spannerConfig);
    threadPool.execute(insertionTask);
  }
  threadPool.shutdown();
}
Program: 68983
Project: 68983
Buggy source:
private static void deleteGcsBucket(String projectId,String gcsBucketName){
  StorageOptions.Builder optionsBuilder=StorageOptions.newBuilder();
  StorageOptions storageOptions=optionsBuilder.setProjectId(projectId).build();
  Storage storage=storageOptions.getService();
  Bucket bucket=storage.get(gcsBucketName);
  bucket.delete(Bucket.BucketSourceOption.metagenerationMatch());
}

Fixed version (ground truth):
private static void deleteGcsBucket(String projectId,String gcsBucketName){
  StorageOptions.Builder optionsBuilder=StorageOptions.newBuilder();
  StorageOptions storageOptions=optionsBuilder.setProjectId(projectId).build();
  Storage storage=storageOptions.getService();
  Iterable<Blob> blobs=storage.list(gcsBucketName,Storage.BlobListOption.prefix("String_Node_Str")).iterateAll();
  for (  Blob blob : blobs) {
    blob.delete(Blob.BlobSourceOption.generationMatch());
  }
  storage.delete(gcsBucketName,Storage.BucketSourceOption.userProject(projectId));
}
Program: 68984
Project: 68984
Buggy source:
public BigDecimal getLatestUSDPerBTC() throws USDBTCFxException {
  Optional<ExchangeAggregateRate> exchangeAggregateRate=exchangeAggregateRateRepository.findFirstOptionalByOrderByBlockNrBtcDesc();
  return exchangeAggregateRate.flatMap((aggregateRate) -> aggregateRate.getExchangeAggregateCurrencyRates(CurrencyType.BTC)).map((aggCurrencyRate) -> aggCurrencyRate.getAggregateExchangeRate()).orElseThrow(() -> new USDBTCFxException("String_Node_Str"));
}

Fixed version (ground truth):
public BigDecimal getLatestUSDPerBTC() throws USDBTCFxException {
  Optional<ExchangeAggregateRate> exchangeAggregateRate=exchangeAggregateRateRepository.findFirstOptionalByOrderByCreationDateDesc();
  return exchangeAggregateRate.flatMap((aggregateRate) -> aggregateRate.getExchangeAggregateCurrencyRates(CurrencyType.BTC)).map((aggCurrencyRate) -> aggCurrencyRate.getAggregateExchangeRate()).orElseThrow(() -> new USDBTCFxException("String_Node_Str"));
}
Program: 68985
Project: 68985
Buggy source:
public BigDecimal getLatestUSDperETH() throws USDETHFxException {
  Optional<ExchangeAggregateRate> exchangeAggregateRate=exchangeAggregateRateRepository.findFirstOptionalByOrderByBlockNrEthDesc();
  return exchangeAggregateRate.flatMap((aggregateRate) -> aggregateRate.getExchangeAggregateCurrencyRates(CurrencyType.ETH)).map((aggCurrencyRate) -> aggCurrencyRate.getAggregateExchangeRate()).orElseThrow(() -> new USDETHFxException("String_Node_Str"));
}

Fixed version (ground truth):
public BigDecimal getLatestUSDperETH() throws USDETHFxException {
  Optional<ExchangeAggregateRate> exchangeAggregateRate=exchangeAggregateRateRepository.findFirstOptionalByOrderByCreationDateDesc();
  return exchangeAggregateRate.flatMap((aggregateRate) -> aggregateRate.getExchangeAggregateCurrencyRates(CurrencyType.ETH)).map((aggCurrencyRate) -> aggCurrencyRate.getAggregateExchangeRate()).orElseThrow(() -> new USDETHFxException("String_Node_Str"));
}
Program: 68987
Project: 68987
Buggy source:
@Scheduled(initialDelay=10000,fixedRateString="String_Node_Str") public void sendEmail(){
  Optional<Email> oEmail=Optional.empty();
  try {
    oEmail=this.fileQueueService.peekEmail();
    if (oEmail.isPresent()) {
      Email email=oEmail.get();
switch (email.getMailType()) {
case CONFIRMATION_EMAIL:
        this.mailService.sendConfirmationEmail(email.getInvestor(),email.getInvestor().getEmail());
      break;
case SUMMARY_EMAIL:
    this.mailService.sendSummaryEmail(email.getInvestor());
  break;
default :
break;
}
}
}
 catch (BaseEmailException e) {
Email email=oEmail.get();
if (email.getReQueued() < this.maxReQueued) {
LOG.error("String_Node_Str",e);
email.setReQueued(email.getReQueued() + 1);
this.fileQueueService.addEmail(email);
}
}
}

Fixed version (ground truth):
@Scheduled(initialDelay=10000,fixedRateString="String_Node_Str") public void sendEmail(){
  Optional<Email> oEmail=Optional.empty();
  try {
    oEmail=this.fileQueueService.peekEmail();
    if (oEmail.isPresent()) {
      Email email=oEmail.get();
switch (email.getMailType()) {
case CONFIRMATION_EMAIL:
        this.mailService.sendConfirmationEmail(email.getInvestor(),email.getConfirmationEmaiLink().toString());
      break;
case SUMMARY_EMAIL:
    this.mailService.sendSummaryEmail(email.getInvestor());
  break;
default :
break;
}
}
}
 catch (BaseEmailException e) {
Email email=oEmail.get();
if (email.getReQueued() < this.maxReQueued) {
LOG.error("String_Node_Str",e);
email.setReQueued(email.getReQueued() + 1);
this.fileQueueService.addEmail(email);
}
}
}
Program: 68989
Project: 68989
Buggy source:
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> isBTCAddressValid(@PathVariable("String_Node_Str") String btcAddress) throws BaseException {
  if (bitcoinKeyGenerator.isValidAddress(btcAddress)) {
    return ResponseEntity.ok().build();
  }
  throw new BitcoinAddressInvalidException();
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> isBTCAddressValid(@Valid @Size(max=Constants.BTC_ADDRESS_CHAR_MAX_SIZE) @PathVariable("String_Node_Str") String btcAddress) throws BaseException {
  if (bitcoinKeyGenerator.isValidAddress(btcAddress)) {
    return ResponseEntity.ok().build();
  }
  throw new BitcoinAddressInvalidException();
}
Program: 68990
Project: 68990
Buggy source:
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> isETHAddressValid(@PathVariable("String_Node_Str") String ethAddress) throws BaseException {
  if (ethereumKeyGenerator.isValidAddress(ethAddress)) {
    return ResponseEntity.ok().build();
  }
  throw new EthereumAddressInvalidException();
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> isETHAddressValid(@Valid @Size(max=Constants.ETH_ADDRESS_CHAR_MAX_SIZE) @PathVariable("String_Node_Str") String ethAddress) throws BaseException {
  if (ethereumKeyGenerator.isValidAddress(ethAddress)) {
    return ResponseEntity.ok().build();
  }
  throw new EthereumAddressInvalidException();
}
Program: 68991
Project: 68991
Buggy source:
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> isConfirmationTokenValid(@PathVariable("String_Node_Str") String emailConfirmationToken,HttpServletResponse response) throws BaseException {
  Optional<Investor> oInvestor=Optional.empty();
  try {
    oInvestor=investorRepository.findOptionalByEmailConfirmationToken(emailConfirmationToken);
  }
 catch (  Exception e) {
    throw new UnexpectedException();
  }
  if (!oInvestor.isPresent()) {
    throw new ConfirmationTokenNotFoundException();
  }
  return ResponseEntity.ok().build();
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> isConfirmationTokenValid(@Valid @Size(max=Constants.UUID_CHAR_MAX_SIZE) @PathVariable("String_Node_Str") String emailConfirmationToken,HttpServletResponse response) throws BaseException {
  Optional<Investor> oInvestor=Optional.empty();
  try {
    oInvestor=investorRepository.findOptionalByEmailConfirmationToken(emailConfirmationToken);
  }
 catch (  Exception e) {
    throw new UnexpectedException();
  }
  if (!oInvestor.isPresent()) {
    throw new ConfirmationTokenNotFoundException();
  }
  return ResponseEntity.ok().build();
}
Program: 68992
Project: 68992
Buggy source:
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> confirmation(@PathVariable("String_Node_Str") String emailConfirmationToken,HttpServletResponse response) throws BaseException {
  try {
    Optional<Investor> oInvestor=investorRepository.findOptionalByEmailConfirmationToken(emailConfirmationToken);
    if (!oInvestor.isPresent()) {
      throw new ConfirmationTokenNotFoundException();
    }
 else {
      Investor investor=oInvestor.get();
      investor.setEmailConfirmed(true);
      investorRepository.save(investor);
      LOG.debug("String_Node_Str" + investor.getEmail() + "String_Node_Str"+ investor.getEmailConfirmationToken());
    }
  }
 catch (  Exception e) {
    throw e;
  }
  return ResponseEntity.ok().build();
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=GET) public ResponseEntity<?> confirmation(@Valid @Size(max=Constants.UUID_CHAR_MAX_SIZE) @PathVariable("String_Node_Str") String emailConfirmationToken,HttpServletResponse response) throws BaseException {
  try {
    Optional<Investor> oInvestor=investorRepository.findOptionalByEmailConfirmationToken(emailConfirmationToken);
    if (!oInvestor.isPresent()) {
      throw new ConfirmationTokenNotFoundException();
    }
 else {
      Investor investor=oInvestor.get();
      investor.setEmailConfirmed(true);
      investorRepository.save(investor);
      LOG.debug("String_Node_Str" + investor.getEmail() + "String_Node_Str"+ investor.getEmailConfirmationToken());
    }
  }
 catch (  Exception e) {
    throw e;
  }
  return ResponseEntity.ok().build();
}
Program: 68993
Project: 68993
Buggy source:
public Keys getKeys(){
  ECKey key=new ECKey();
  byte[] address=key.getPubKey();
  byte[] privateKey=key.getPrivKeyBytes();
  return new Keys().setAddress(address).setPrivateKey(privateKey);
}

Fixed version (ground truth):
public Keys getKeys(){
  ECKey key=new ECKey();
  byte[] address=key.getPubKey();
  String addressAsString=key.toAddress(MainNetParams.get()).toString();
  byte[] privateKey=key.getPrivKeyBytes();
  String addressAsStringWithPrivate=key.toStringWithPrivate(MainNetParams.get()).toString();
  return new Keys().setAddress(address).setAddressAsString(addressAsString).setPrivateKey(privateKey).setAddressAsStringWithPrivate(addressAsStringWithPrivate);
}
Program: 68994
Project: 68994
Buggy source:
public Keys getKeys(){
  ECKey key=new ECKey();
  byte[] address=key.getAddress();
  byte[] privateKey=key.getPrivKeyBytes();
  return new Keys().setAddress(address).setPrivateKey(privateKey);
}

Fixed version (ground truth):
public Keys getKeys(){
  ECKey key=new ECKey();
  byte[] address=key.getAddress();
  byte[] privateKey=key.getPrivKeyBytes();
  return new Keys().setAddress(address).setAddressAsString("String_Node_Str" + Hex.toHexString(address)).setPrivateKey(privateKey).setAddressAsStringWithPrivate(key.toStringWithPrivate());
}
Program: 68998
Project: 68998
Buggy source:
@Override public void actionPerformed(java.awt.event.ActionEvent e){
  JFileChooser chooser=new JFileChooser();
  String currentDirectory=oldSourceFolderField.getText();
  if ((currentDirectory == null) || (currentDirectory.trim().equals("String_Node_Str")))   currentDirectory=System.getProperty("String_Node_Str");
  chooser.setCurrentDirectory(new java.io.File(currentDirectory));
  chooser.setDialogTitle("String_Node_Str");
  chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
  chooser.setAcceptAllFileFilterUsed(false);
  chooser.addChoosableFileFilter(new FileNameExtensionFilter("String_Node_Str","String_Node_Str"));
  chooser.addChoosableFileFilter(new FileNameExtensionFilter("String_Node_Str","String_Node_Str"));
  chooser.addChoosableFileFilter(new FileFilter(){
    public boolean accept(    File f){
      return f.isDirectory();
    }
    public String getDescription(){
      return "String_Node_Str";
    }
  }
);
  if (chooser.showOpenDialog(sourcePanel) == JFileChooser.APPROVE_OPTION) {
    oldSourceFolderField.setText(chooser.getSelectedFile().getAbsolutePath());
    ;
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(java.awt.event.ActionEvent e){
  JFileChooser chooser2=new JFileChooser();
  String currentDirectory=oldSerializationField.getText();
  if ((currentDirectory == null) || (currentDirectory.trim().equals("String_Node_Str"))) {
    currentDirectory=System.getProperty("String_Node_Str");
  }
  chooser2.setCurrentDirectory(new java.io.File(currentDirectory));
  chooser2.setDialogTitle("String_Node_Str");
  chooser2.setFileSelectionMode(JFileChooser.FILES_ONLY);
  chooser2.setAcceptAllFileFilterUsed(false);
  chooser2.addChoosableFileFilter(new FileNameExtensionFilter("String_Node_Str","String_Node_Str"));
  if (chooser2.showOpenDialog(sourcePanel) == JFileChooser.APPROVE_OPTION) {
    oldSerializationField.setText(chooser2.getSelectedFile().getAbsolutePath());
    BurpPropertiesManager.getBurpPropertiesManager().setOldSerializationFile(oldSerializationField.getText());
  }
}
Program: 69002
Project: 69002
Buggy source:
public LocalEndpointsButton(final Component view,final IBurpExtenderCallbacks callbacks){
  super(view,callbacks);
}

Fixed version (ground truth):
public LocalEndpointsButton(final Component view,final IBurpExtenderCallbacks callbacks){
  super(view,callbacks,0);
}
Program: 69003
Project: 69003
Buggy source:
public SerializedEndpointsButton(final Component view,final IBurpExtenderCallbacks callbacks){
  super(view,callbacks);
}

Fixed version (ground truth):
public SerializedEndpointsButton(final Component view,final IBurpExtenderCallbacks callbacks){
  super(view,callbacks,1);
}
Program: 69004
Project: 69004
Buggy source:
/** 
 * Intent传递大量数据出现TransactionTooLargeException异常的解决方案
 */
@Override public void onItemClick(int position){
  EventBus.getDefault().postSticky(mList);
  Intent intent=new Intent(getActivity(),VerticalVideoActivity.class);
  intent.putExtra("String_Node_Str",position);
  getActivity().startActivity(intent);
}

Fixed version (ground truth):
/** 
 * 加载过程中不让点击
 */
@Override public void onItemClick(int position){
  if (ptrRecyclerViewUIComponent.isLoadingMore()) {
    return;
  }
  Intent intent=new Intent(getActivity(),VerticalVideoActivity.class);
  WeakDataHolder.getInstance().saveData("String_Node_Str",mList);
  intent.putExtra("String_Node_Str",position);
  getActivity().startActivity(intent);
}
Program: 69005
Project: 69005
Buggy source:
@Override protected void onDestroy(){
  super.onDestroy();
  videoPlayer.release();
  videoPlayer.setVideoAllCallBack(null);
  GSYVideoManager.releaseAllVideos();
  EventBus.getDefault().unregister(this);
}

Fixed version (ground truth):
@Override protected void onDestroy(){
  super.onDestroy();
  videoPlayer.release();
  videoPlayer.setVideoAllCallBack(null);
  GSYVideoManager.releaseAllVideos();
}
Program: 69006
Project: 69006
Buggy source:
@Override protected void initView(){
  position=getIntent().getIntExtra("String_Node_Str",-1);
  mFragmentManager=getSupportFragmentManager();
  mCurrentItem=position;
}

Fixed version (ground truth):
@Override protected void initView(){
  mList=(List<LevideoData>)WeakDataHolder.getInstance().getData("String_Node_Str");
  int position=getIntent().getIntExtra("String_Node_Str",-1);
  mFragmentManager=getSupportFragmentManager();
  mCurrentItem=position;
  final MyPageAdapter myAdapter=new MyPageAdapter(mList);
  mVerticalViewpager.setAdapter(myAdapter);
  if (position != -1) {
    mVerticalViewpager.setCurrentItem(position);
  }
  mVerticalViewpager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener(){
    @Override public void onPageSelected(    int position){
      mCurrentItem=position;
    }
  }
);
  mRoomContainer=LayoutInflater.from(this).inflate(R.layout.view_video_container,null);
  mFragmentContainer=mRoomContainer.findViewById(R.id.fragment_container);
  mPlay=mRoomContainer.findViewById(R.id.iv_play);
  videoPlayer=mRoomContainer.findViewById(R.id.video_player);
  mRootView=mRoomContainer.findViewById(R.id.view_play);
  mCover=mRoomContainer.findViewById(R.id.cover_img);
  mTvVideoTitle=mRoomContainer.findViewById(R.id.tv_video_title);
  mVerticalViewpager.setPageTransformer(false,new ViewPager.PageTransformer(){
    @Override public void transformPage(    View page,    float position){
      ViewGroup viewGroup=(ViewGroup)page;
      if ((position < 0 && viewGroup.getId() != mCurrentItem)) {
        View roomContainer=viewGroup.findViewById(R.id.room_container);
        if (roomContainer != null && roomContainer.getParent() != null && roomContainer.getParent() instanceof ViewGroup) {
          ((ViewGroup)(roomContainer.getParent())).removeView(roomContainer);
        }
      }
      if (viewGroup.getId() == mCurrentItem && position == 0 && mCurrentItem != mRoomId) {
        if (mRoomContainer.getParent() != null && mRoomContainer.getParent() instanceof ViewGroup) {
          ((ViewGroup)(mRoomContainer.getParent())).removeView(mRoomContainer);
        }
        loadVideo(viewGroup,mCurrentItem);
      }
    }
  }
);
  mRootView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (isSelected) {
        isStop=false;
        videoPlayer.onClick(videoPlayer.getStartButton());
        mPlay.setVisibility(View.GONE);
      }
 else {
        isStop=true;
        videoPlayer.onClick(videoPlayer.getStartButton());
        mPlay.setVisibility(View.VISIBLE);
        mPlay.setSelected(false);
      }
      isSelected=!isSelected;
    }
  }
);
}
Program: 69007
Project: 69007
Buggy source:
@Override public void onResponse(String response){
  try {
    JSONObject indieAuthResponse=new JSONObject(response);
    String accessToken=indieAuthResponse.getString("String_Node_Str");
    Log.d("String_Node_Str",accessToken);
    SharedPreferences.Editor editor=getSharedPreferences("String_Node_Str",MODE_PRIVATE).edit();
    editor.putString("String_Node_Str",accessToken);
    editor.putString("String_Node_Str",domainInput);
    editor.apply();
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    if (preferences.getString("String_Node_Str","String_Node_Str").length() > 0) {
      Intent Channels=new Intent(getBaseContext(),ChannelActivity.class);
      startActivity(Channels);
    }
 else {
      Intent Micropub=new Intent(getBaseContext(),MicropubActivity.class);
      startActivity(Micropub);
    }
  }
 catch (  JSONException e) {
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
    Log.d("String_Node_Str",e.getMessage());
    info.setVisibility(View.VISIBLE);
    domain.setVisibility(View.VISIBLE);
    signIn.setVisibility(View.VISIBLE);
  }
  Log.d("String_Node_Str",response);
}

Fixed version (ground truth):
@Override public void onResponse(String response){
  try {
    JSONObject indieAuthResponse=new JSONObject(response);
    String accessToken=indieAuthResponse.getString("String_Node_Str");
    Log.d("String_Node_Str",accessToken);
    SharedPreferences.Editor editor=getSharedPreferences("String_Node_Str",MODE_PRIVATE).edit();
    editor.putString("String_Node_Str",accessToken);
    editor.putString("String_Node_Str",domainInput);
    editor.apply();
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    if (preferences.getString("String_Node_Str","String_Node_Str").length() > 0) {
      Intent Channels=new Intent(getBaseContext(),ChannelActivity.class);
      startActivity(Channels);
    }
 else {
      Intent Micropub=new Intent(getBaseContext(),MicropubActivity.class);
      startActivity(Micropub);
    }
  }
 catch (  JSONException e) {
    Toast.makeText(getApplicationContext(),"String_Node_Str" + e.getMessage(),Toast.LENGTH_LONG).show();
    Log.d("String_Node_Str",e.getMessage());
    info.setVisibility(View.VISIBLE);
    domain.setVisibility(View.VISIBLE);
    signIn.setVisibility(View.VISIBLE);
  }
  Log.d("String_Node_Str",response);
}
Program: 69008
Project: 69008
Buggy source:
public void onClick(View v){
  domainInput=domain.getText().toString();
  if (!domainInput.contains("String_Node_Str") && !domainInput.contains("String_Node_Str")) {
    domainInput="String_Node_Str" + domainInput;
  }
  if (validDomain(domainInput)) {
    info.setVisibility(View.INVISIBLE);
    domain.setVisibility(View.INVISIBLE);
    signIn.setVisibility(View.INVISIBLE);
    webview.setVisibility(View.VISIBLE);
    startOauthDance();
  }
 else {
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
  }
}

Fixed version (ground truth):
public void onClick(View v){
  domainInput=domain.getText().toString();
  if (!domainInput.contains("String_Node_Str") && !domainInput.contains("String_Node_Str")) {
    domainInput="String_Node_Str" + domainInput;
  }
  if (validDomain(domainInput)) {
    info.setVisibility(View.GONE);
    domain.setVisibility(View.GONE);
    signIn.setVisibility(View.GONE);
    webview.setVisibility(View.VISIBLE);
    startOauthDance();
  }
 else {
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
  }
}
Program: 69009
Project: 69009
Buggy source:
/** 
 * Authenticates with the IndieAuth endpoint. This method uses a webview to go to the authorization endpoint to start the oauth dance. If we get back to indigenous.abode.pub, we'll intercept and check if we have a code and validate.
 */
@SuppressLint("String_Node_Str") private void startOauthDance(){
  webview.setWebViewClient(new WebViewClient(){
    @Override public boolean shouldOverrideUrlLoading(    WebView view,    String url){
      Uri uri=Uri.parse(url);
      if (uri.getHost().contains("String_Node_Str")) {
        webview.setVisibility(View.INVISIBLE);
        webview.loadUrl("String_Node_Str");
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
        code=uri.getQueryParameter("String_Node_Str");
        if (code != null && code.length() > 0) {
          validateCode(code);
        }
        return true;
      }
      return false;
    }
  }
);
  webview.getSettings().setJavaScriptEnabled(true);
  SharedPreferences preferences=getSharedPreferences("String_Node_Str",MODE_PRIVATE);
  String AuthEndPoint=preferences.getString("String_Node_Str","String_Node_Str");
  webview.loadUrl(AuthEndPoint + "String_Node_Str" + RedirectUri+ "String_Node_Str"+ ClientId+ "String_Node_Str"+ domainInput+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Authenticates with the IndieAuth endpoint. This method uses a webview to go to the authorization endpoint to start the oauth dance. If we get back to indigenous.abode.pub, we'll intercept and check if we have a code and validate.
 */
@SuppressLint("String_Node_Str") private void startOauthDance(){
  webview.setWebViewClient(new WebViewClient(){
    @Override public boolean shouldOverrideUrlLoading(    WebView view,    String url){
      Uri uri=Uri.parse(url);
      if (uri.getHost().contains("String_Node_Str")) {
        webview.setVisibility(View.INVISIBLE);
        webview.loadUrl("String_Node_Str");
        Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
        code=uri.getQueryParameter("String_Node_Str");
        if (code != null && code.length() > 0) {
          validateCode(code);
        }
 else {
          Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
        }
        return true;
      }
      return false;
    }
  }
);
  webview.getSettings().setJavaScriptEnabled(true);
  SharedPreferences preferences=getSharedPreferences("String_Node_Str",MODE_PRIVATE);
  String AuthEndPoint=preferences.getString("String_Node_Str","String_Node_Str");
  webview.loadUrl(AuthEndPoint + "String_Node_Str" + RedirectUri+ "String_Node_Str"+ ClientId+ "String_Node_Str"+ domainInput+ "String_Node_Str");
}
Program: 69010
Project: 69010
Buggy source:
@Override public boolean shouldOverrideUrlLoading(WebView view,String url){
  Uri uri=Uri.parse(url);
  if (uri.getHost().contains("String_Node_Str")) {
    webview.setVisibility(View.INVISIBLE);
    webview.loadUrl("String_Node_Str");
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    code=uri.getQueryParameter("String_Node_Str");
    if (code != null && code.length() > 0) {
      validateCode(code);
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean shouldOverrideUrlLoading(WebView view,String url){
  Uri uri=Uri.parse(url);
  if (uri.getHost().contains("String_Node_Str")) {
    webview.setVisibility(View.INVISIBLE);
    webview.loadUrl("String_Node_Str");
    Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    code=uri.getQueryParameter("String_Node_Str");
    if (code != null && code.length() > 0) {
      validateCode(code);
    }
 else {
      Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
    return true;
  }
  return false;
}
Program: 69012
Project: 69012
Buggy source:
@Override public void onErrorResponse(VolleyError error){
  Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_LONG).show();
  info.setVisibility(View.VISIBLE);
  domain.setVisibility(View.VISIBLE);
  signIn.setVisibility(View.VISIBLE);
  Log.d("String_Node_Str",error.getMessage());
}

Fixed version (ground truth):
@Override public void onErrorResponse(VolleyError error){
  Toast.makeText(getApplicationContext(),"String_Node_Str" + error.getMessage(),Toast.LENGTH_LONG).show();
  info.setVisibility(View.VISIBLE);
  domain.setVisibility(View.VISIBLE);
  signIn.setVisibility(View.VISIBLE);
  Log.d("String_Node_Str",error.getMessage());
}
Program: 69014
Project: 69014
Buggy source:
public void addGridBars(){
  if (Double.isNaN(barsGrid.getWidth()) || Double.isNaN(barsGrid.getHeight()) || RandomBars.barsArray[0] == null) {
    return;
  }
  barsGrid.getChildren().removeAll(barsGrid.getChildren());
  IntStream.range(0,10).forEachOrdered(index -> {
    Bar bar=RandomBars.barsArray[index];
    bar.getStyleClass().add("String_Node_Str");
    double height=calculateHeight(bar.getValue());
    bar.setMaxHeight(height);
    bar.setPrefHeight(height);
    bar.setBackground(new Background(new BackgroundFill(bar.getColor(),CornerRadii.EMPTY,Insets.EMPTY)));
    barsGrid.add(bar,index,0);
  }
);
}

Fixed version (ground truth):
public void addGridBars(){
  if (Double.isNaN(barsGrid.getWidth()) || Double.isNaN(barsGrid.getHeight()) || RandomBars.barsArray == null) {
    return;
  }
  barsGrid.getChildren().removeAll(barsGrid.getChildren());
  IntStream.range(0,10).forEachOrdered(index -> {
    Bar bar=RandomBars.barsArray[index];
    bar.getStyleClass().add("String_Node_Str");
    double height=calculateHeight(bar.getValue());
    bar.setMaxHeight(height);
    bar.setPrefHeight(height);
    bar.setBackground(new Background(new BackgroundFill(bar.getColor(),CornerRadii.EMPTY,Insets.EMPTY)));
    barsGrid.add(bar,index,0);
  }
);
}
Program: 69015
Project: 69015
Buggy source:
/** 
 * Constructor.
 * @param context Context
 */
@Inject FavoriteStore(@ApplicationContext final Context context){
  this.appContext=context;
  favoriteDatabase=Room.databaseBuilder(appContext,FavoriteDatabase.class,Constants.DATABASE_NAME).build();
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param context Context
 */
@Inject FavoriteStore(@ApplicationContext final Context context){
  this.appContext=context;
  buildFavoriteDatabase();
}
Program: 69016
Project: 69016
Buggy source:
@Override public boolean clearData(){
  boolean result=true;
  favoriteDatabase.close();
  final File databaseFile=appContext.getDatabasePath(Constants.DATABASE_NAME);
  if (databaseFile.exists()) {
    result=databaseFile.delete();
  }
  final File databaseJournalFile=appContext.getDatabasePath(Constants.DATABASE_NAME + DATABASE_JOURNAL_SUFFIX);
  if (databaseJournalFile.exists()) {
    result=result && databaseJournalFile.delete();
  }
  return result;
}

Fixed version (ground truth):
@Override public boolean clearData(){
  boolean result=true;
  favoriteDatabase.close();
  final File databaseFile=appContext.getDatabasePath(Constants.DATABASE_NAME);
  if (databaseFile.exists()) {
    result=databaseFile.delete();
  }
  final File databaseJournalFile=appContext.getDatabasePath(Constants.DATABASE_NAME + DATABASE_JOURNAL_SUFFIX);
  if (databaseJournalFile.exists()) {
    result=result && databaseJournalFile.delete();
  }
  buildFavoriteDatabase();
  return result;
}
Program: 69017
Project: 69017
Buggy source:
@Override public Single<List<MovieData>> getAllFavoriteMovies(){
  final FavoriteDao dao=favoriteDatabase.getDao();
  return Single.fromCallable(() -> {
    final List<MovieData> movies=new ArrayList<>();
    for (    final Favorite favorite : dao.loadAllFavorites()) {
      movies.add(favorite.toMovie());
    }
    return movies;
  }
).subscribeOn(Schedulers.io());
}

Fixed version (ground truth):
@Override public Single<List<MovieData>> getAllFavoriteMovies(){
  return Single.fromCallable(() -> {
    final List<MovieData> movies=new ArrayList<>();
    final FavoriteDao dao=favoriteDatabase.getDao();
    for (    final Favorite favorite : dao.loadAllFavorites()) {
      movies.add(favorite.toMovie());
    }
    return movies;
  }
).subscribeOn(Schedulers.io());
}
Program: 69018
Project: 69018
Buggy source:
@ApiOperation("String_Node_Str") @PutMapping("String_Node_Str") @NeedLogin Result approval(@PathVariable BigInteger id,@PathVariable Integer status) throws Exception {
  transactionService.approval(id,status);
  return ResultGenerator.genSuccessResult();
}

Fixed version (ground truth):
@ApiOperation("String_Node_Str") @PutMapping("String_Node_Str") @NeedLogin Result approval(@PathVariable BigInteger id,@PathVariable Integer status,@RequestBody HashDTO hashDTO) throws Exception {
  transactionService.approval(id,status,hashDTO.getHashAddress());
  return ResultGenerator.genSuccessResult();
}
Program: 69019
Project: 69019
Buggy source:
private void addressHandler(org.web3j.protocol.core.methods.response.Transaction tx){
  String to=Web3jUtil.getTo(tx);
  String key=RedisConstants.LISTEN_ETH_ADDR + "String_Node_Str" + to;
  String hash=tx.getHash();
  BigInteger userId=(BigInteger)redisTemplate.opsForValue().get(key);
  if (null == userId) {
    return;
  }
  if (existHash(hash)) {
    return;
  }
  BigInteger tokenId=getTokenId(tx);
  Config config=configService.get(tokenId);
  if (null == config) {
    return;
  }
  Transaction transaction=new Transaction();
  transaction.setHash(hash);
  transaction.setUserId(userId);
  transaction.setTokenId(tokenId);
  transaction.setOrderId(getOrderId(CommonConstants.ORDER_RECHARGE));
  transaction.setType(CommonConstants.RECHARGE);
  transaction.setStatus(CommonConstants.STATUS_SUCCESS);
  transaction.setToAddress(to);
  transaction.setFromAddress(tx.getFrom());
  transaction.setNumber(Web3jUtil.getValue(tx.getValue(),transaction.getTokenId(),redisTemplate));
  transaction.setPoundage(0f);
  transaction.setRealNumber(transaction.getNumber());
  transactionMapper.insertSelective(transaction);
  updateBalance(transaction);
  this.transferBalance(transaction);
}

Fixed version (ground truth):
private void addressHandler(org.web3j.protocol.core.methods.response.Transaction tx){
  String to=Web3jUtil.getTo(tx);
  String key=RedisConstants.LISTEN_ETH_ADDR + "String_Node_Str" + to;
  String hash=tx.getHash();
  BigInteger userId=(BigInteger)redisTemplate.opsForValue().get(key);
  if (null == userId) {
    return;
  }
  if (existHash(hash)) {
    return;
  }
  BigInteger tokenId=getTokenId(tx);
  Config config=configService.get(tokenId);
  if (null == config) {
    return;
  }
  Transaction transaction=new Transaction();
  transaction.setHash(hash);
  transaction.setUserId(userId);
  transaction.setTokenId(tokenId);
  transaction.setOrderId(getOrderId(CommonConstants.ORDER_RECHARGE));
  transaction.setType(CommonConstants.RECHARGE);
  transaction.setStatus(CommonConstants.STATUS_SUCCESS);
  transaction.setToAddress(to);
  transaction.setFromAddress(tx.getFrom());
  transaction.setNumber(Web3jUtil.getValue(tx.getValue(),transaction.getTokenId(),redisTemplate));
  transaction.setPoundage(0f);
  transaction.setRealNumber(transaction.getNumber());
  transactionMapper.insertSelective(transaction);
  updateBalance(transaction);
  this.transferBalance(transaction,coldUser);
}
Program: 69020
Project: 69020
Buggy source:
@Async public void transferBalance(Transaction transaction){
  try {
    EthGetBalance result=web3j.ethGetBalance(transaction.getToAddress(),DefaultBlockParameterName.LATEST).send();
    BigInteger needBalance=TransactionService.DEFAULT_GAS_LIMIT.multiply(TransactionService.DEFAULT_GAS_PRICE);
    BigInteger sendBalance=result.getBalance().subtract(needBalance);
    if (sendGasIfNull(transaction,result,needBalance)) {
      return;
    }
    String contractAddress=getContractAddressByTokenId(transaction);
    if (!transaction.getTokenId().equals(BigInteger.ZERO)) {
      sendBalance=contractService.balanceOf(contractAddress,transaction.getToAddress());
    }
    sendTransaction(transaction.getToAddress(),defaultUser,contractAddress,sendBalance,false);
  }
 catch (  Exception e) {
    e.printStackTrace();
    log.error(e.getMessage());
  }
}

Fixed version (ground truth):
@Async public void transferBalance(Transaction transaction,String address){
  try {
    EthGetBalance result=web3j.ethGetBalance(transaction.getToAddress(),DefaultBlockParameterName.LATEST).send();
    BigInteger needBalance=TransactionService.DEFAULT_GAS_LIMIT.multiply(TransactionService.DEFAULT_GAS_PRICE);
    BigInteger sendBalance=result.getBalance().subtract(needBalance);
    if (sendGasIfNull(transaction,result,needBalance)) {
      return;
    }
    String contractAddress=getContractAddressByTokenId(transaction);
    if (!transaction.getTokenId().equals(BigInteger.ZERO)) {
      sendBalance=contractService.balanceOf(contractAddress,transaction.getToAddress());
    }
    sendTransaction(transaction.getToAddress(),address,contractAddress,sendBalance,false);
  }
 catch (  Exception e) {
    e.printStackTrace();
    log.error(e.getMessage());
  }
}
Program: 69021
Project: 69021
Buggy source:
private boolean sendGasIfNull(Transaction transaction,EthGetBalance result,BigInteger needBalance) throws IOException {
  if (!result.hasError() && result.getBalance().compareTo(BigInteger.ZERO) == 0) {
    org.web3j.protocol.core.methods.request.Transaction trans=new org.web3j.protocol.core.methods.request.Transaction(defaultUser,null,DEFAULT_GAS_PRICE,DEFAULT_GAS_LIMIT,transaction.getToAddress(),needBalance,null);
    admin.personalUnlockAccount(defaultUser,password);
    web3j.ethSendTransaction(trans).send();
    redisTemplate.opsForList().leftPush(RedisConstants.GAS_QUENE,transaction);
    return true;
  }
  ;
  return false;
}

Fixed version (ground truth):
private boolean sendGasIfNull(Transaction transaction,EthGetBalance result,BigInteger needBalance) throws IOException {
  if (!result.hasError() && result.getBalance().compareTo(BigInteger.ZERO) == 0) {
    org.web3j.protocol.core.methods.request.Transaction trans=new org.web3j.protocol.core.methods.request.Transaction(defaultUser,null,DEFAULT_GAS_PRICE,DEFAULT_GAS_LIMIT,transaction.getToAddress(),needBalance,null);
    admin.personalUnlockAccount(defaultUser,password);
    web3j.ethSendTransaction(trans).send();
    redisTemplate.opsForList().leftPush(RedisConstants.GAS_QUENE,transaction);
    return true;
  }
  return false;
}
Program: 69022
Project: 69022
Buggy source:
public void approval(BigInteger id,Integer status) throws Exception {
  Assert.isTrue(status != 2,MessageConstants.getMsg("String_Node_Str"));
  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,String hash) throws Exception {
  Assert.isTrue(status != 2,MessageConstants.getMsg("String_Node_Str"));
  Transaction transaction=new Transaction();
  transaction.setId(id);
  transaction.setStatus(status);
  transactionMapper.updateByPrimaryKeySelective(transaction);
  setBalance(id,status);
  sendValue(id,status,hash);
}
Program: 69023
Project: 69023
Buggy source:
public Integer sendGas(){
  Integer number=0;
  while (redisTemplate.opsForList().size(RedisConstants.GAS_QUENE) > 0) {
    Transaction transaction=(Transaction)redisTemplate.opsForList().rightPop(RedisConstants.GAS_QUENE);
    transferBalance(transaction);
    number++;
  }
  return number;
}

Fixed version (ground truth):
public Integer sendGas(){
  Integer number=0;
  while (redisTemplate.opsForList().size(RedisConstants.GAS_QUENE) > 0) {
    Transaction transaction=(Transaction)redisTemplate.opsForList().rightPop(RedisConstants.GAS_QUENE);
    transferBalance(transaction,defaultUser);
    number++;
  }
  return number;
}
Program: 69024
Project: 69024
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);
    String hash=sendTransaction(defaultUser,transaction.getToAddress(),contractAddress,value,true);
    transaction.setHash(hash);
    transactionMapper.updateByPrimaryKeySelective(transaction);
  }
}

Fixed version (ground truth):
private void sendValue(BigInteger id,Integer status,String hash) throws Exception {
  if (status.equals(1)) {
    Assert.notNull(hash,"String_Node_Str");
    Transaction transaction=new Transaction();
    transaction.setId(id);
    transaction=transactionMapper.selectByPrimaryKey(transaction);
    transaction.setHash(hash);
    EthGetTransactionReceipt result=web3j.ethGetTransactionReceipt(hash).send();
    if (null != result && null != result.getResult() && !result.hasError() && result.getTransactionReceipt().get().getStatus().equalsIgnoreCase("String_Node_Str")) {
      transaction.setStatus(CommonConstants.STATUS_SUCCESS);
    }
 else {
      redisTemplate.opsForValue().set(RedisConstants.LISTEN_HASH + "String_Node_Str" + hash,1);
    }
    transactionMapper.updateByPrimaryKeySelective(transaction);
  }
}
Program: 69025
Project: 69025
Buggy source:
@Insert("String_Node_Str") void sendToken(@Param("String_Node_Str") BigInteger projectId,@Param("String_Node_Str") BigInteger tokenId);

Fixed version (ground truth):
@Select("String_Node_Str") void sendToken(@Param("String_Node_Str") BigInteger projectId,@Param("String_Node_Str") BigInteger tokenId);
Program: 69026
Project: 69026
Buggy source:
private void checkCanWithdraw(WithdrawDTO withdrawDTO,Config config){
  String addressKey=RedisConstants.LISTEN_ETH_ADDR + "String_Node_Str" + withdrawDTO.getAddress();
  Assert.isTrue(!redisTemplate.hasKey(addressKey),MessageConstants.ADDERSS_ERROR);
  String key=RedisConstants.TODAY_USER + "String_Node_Str" + withdrawDTO.getTokenName()+ "String_Node_Str"+ getUserId();
  BigDecimal use=(BigDecimal)redisTemplate.opsForValue().get(key);
  use=null == use ? BigDecimal.ZERO : use;
  Boolean canWithdraw=BigDecimal.valueOf(config.getMax()).subtract(use).compareTo(withdrawDTO.getNumber()) > 0;
  Assert.isTrue(canWithdraw,CommonConstants.NOT_ENOUGH);
}

Fixed version (ground truth):
private void checkCanWithdraw(WithdrawDTO withdrawDTO,Config config){
  String addressKey=RedisConstants.LISTEN_ETH_ADDR + "String_Node_Str" + withdrawDTO.getAddress();
  Assert.isTrue(!redisTemplate.hasKey(addressKey),MessageConstants.ADDERSS_ERROR);
  String key=RedisConstants.TODAY_USER + "String_Node_Str" + withdrawDTO.getTokenName()+ "String_Node_Str"+ getUserId();
  BigDecimal use=(BigDecimal)redisTemplate.opsForValue().get(key);
  use=null == use ? BigDecimal.ZERO : use;
  Boolean canWithdraw=BigDecimal.valueOf(config.getMax()).subtract(use).compareTo(withdrawDTO.getNumber()) >= 0;
  Assert.isTrue(canWithdraw,CommonConstants.NOT_ENOUGH);
}
Program: 69027
Project: 69027
Buggy source:
public static BigDecimal getValue(BigInteger value,BigInteger tokenId,RedisTemplate redisTemplate){
  if (null == tokenId) {
    return null;
  }
  if (tokenId.equals(BigInteger.ZERO)) {
    return Convert.fromWei(new BigDecimal(value),Convert.Unit.ETHER);
  }
  Convert.Unit unit=(Convert.Unit)redisTemplate.opsForValue().get(RedisConstants.UNIT + "String_Node_Str" + tokenId);
  return Convert.fromWei(new BigDecimal(value),unit);
}

Fixed version (ground truth):
public static BigDecimal getValue(BigInteger value,BigInteger tokenId,RedisTemplate redisTemplate){
  if (null == tokenId) {
    return null;
  }
  if (tokenId.equals(BigInteger.ZERO)) {
    return Convert.fromWei(new BigDecimal(value),Convert.Unit.ETHER);
  }
  String name=redisTemplate.opsForValue().get(RedisConstants.UNIT + "String_Node_Str" + tokenId).toString();
  Convert.Unit unit=Convert.Unit.valueOf(name);
  return Convert.fromWei(new BigDecimal(value),unit);
}