nus-yam/ex-repair huggingface dataset:
Program: 71026
Project: 71026
Buggy source:
private List<TopicsOffsetInfo> getTopicOffsetsFor(List<String> consumerGroupIds,Set<TopicPartition> topicPartitions){
  List<TopicsOffsetInfo> result=new ArrayList<>();
  consumerGroupIds.forEach(consumerGroupId -> {
    final KafkaConsumer<String,String> consumer=createOffsetInfoConsumerFor(consumerGroupId);
    final Map<TopicPartition,Long> beggingOffsets=consumer.beginningOffsets(topicPartitions);
    final Map<TopicPartition,Long> endOffsets=consumer.endOffsets(topicPartitions);
    if (!beggingOffsets.keySet().equals(endOffsets.keySet())) {
      Logger.error(String.format("String_Node_Str" + "String_Node_Str",topicPartitions,endOffsets.keySet(),beggingOffsets.keySet()));
    }
    for (    Map.Entry<TopicPartition,Long> entry : beggingOffsets.entrySet()) {
      if (!endOffsets.containsKey(entry.getKey())) {
        continue;
      }
      final String topicName=entry.getKey().topic();
      final int partition=entry.getKey().partition();
      final String beggingOffset=String.valueOf(entry.getValue());
      final String endOffset=String.valueOf(endOffsets.get(entry.getKey()));
      final TopicsOffsetInfo topicsOffsetInfo=new TopicsOffsetInfo(topicName,beggingOffset,endOffset,consumerGroupId,partition);
      result.add(topicsOffsetInfo);
    }
  }
);
  return result;
}

Fixed version (ground truth):
private List<TopicsOffsetInfo> getTopicOffsetsFor(List<String> consumerGroupIds,Set<TopicPartition> topicPartitions){
  List<TopicsOffsetInfo> result=new ArrayList<>();
  consumerGroupIds.forEach(consumerGroupId -> {
    final KafkaConsumer<String,String> consumer=createOffsetInfoConsumerFor(consumerGroupId);
    final Map<TopicPartition,Long> beggingOffsets=consumer.beginningOffsets(topicPartitions);
    final Map<TopicPartition,Long> endOffsets=consumer.endOffsets(topicPartitions);
    if (!beggingOffsets.keySet().equals(endOffsets.keySet())) {
      Logger.error(String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",topicPartitions,endOffsets.keySet(),beggingOffsets.keySet()));
    }
    for (    Map.Entry<TopicPartition,Long> entry : beggingOffsets.entrySet()) {
      if (!endOffsets.containsKey(entry.getKey())) {
        continue;
      }
      final String topicName=entry.getKey().topic();
      final int partition=entry.getKey().partition();
      final String beggingOffset=String.valueOf(entry.getValue());
      final String endOffset=String.valueOf(endOffsets.get(entry.getKey()));
      final TopicsOffsetInfo topicsOffsetInfo=new TopicsOffsetInfo(topicName,beggingOffset,endOffset,consumerGroupId,partition);
      result.add(topicsOffsetInfo);
    }
  }
);
  return result;
}
Program: 71027
Project: 71027
Buggy source:
private void consume(Consumer<String,String> consumer,long pollTimeout){
  startWakeUpTask(pollTimeout);
  final ConsumerRecords<String,String> records=consumer.poll(pollTimeout);
  cancelWakeupTask();
  final ArrayList<ConsumerRecord<String,String>> consumerRecords=Lists.newArrayList(records);
  final String topicName=listenerConfig.getRelatedConfig().getTopicName();
  for (  ConsumerRecord<String,String> record : consumerRecords) {
    receivedMessagesCount++;
    logConsumerRecord(record);
    final TopicPartition topicPartition=new TopicPartition(topicName,record.partition());
    final OffsetAndMetadata offsetAndMetadata=new OffsetAndMetadata(record.offset() + 1);
    consumer.commitSync(Collections.singletonMap(topicPartition,offsetAndMetadata));
    if (wasReceivedMsgLimitReached(receivedMessagesCount)) {
      shouldBeRunning.set(false);
      return;
    }
  }
}

Fixed version (ground truth):
private void consume(Consumer<String,String> consumer,long pollTimeout){
  startWakeUpTask(pollTimeout);
  final ConsumerRecords<String,String> records=consumer.poll(pollTimeout);
  cancelWakeupTask();
  final ArrayList<ConsumerRecord<String,String>> consumerRecords=Lists.newArrayList(records);
  final String topicName=listenerConfig.getRelatedConfig().getTopicName();
  for (  ConsumerRecord<String,String> record : consumerRecords) {
    if (wasReceivedMsgLimitReached(receivedMessagesCount)) {
      shouldBeRunning.set(false);
      return;
    }
    receivedMessagesCount++;
    logConsumerRecord(record);
    final TopicPartition topicPartition=new TopicPartition(topicName,record.partition());
    final OffsetAndMetadata offsetAndMetadata=new OffsetAndMetadata(record.offset() + 1);
    consumer.commitSync(Collections.singletonMap(topicPartition,offsetAndMetadata));
  }
}
Program: 71028
Project: 71028
Buggy source:
public ListenerConfigGuiController(KafkaListenerConfig config,AnchorPane parentPane,ModelConfigObjectsGuiInformer guiInformer,Listeners activeConsumers,Runnable refreshCallback,ObservableList<KafkaTopicConfig> topicConfigs,ToFileSaver toFileSaver) throws IOException {
  this.toFileSaver=toFileSaver;
  CustomFxWidgetsLoader.loadAnchorPane(this,FXML_FILE);
  this.config=config;
  this.activeConsumers=activeConsumers;
  this.refreshCallback=refreshCallback;
  this.topicConfigs=topicConfigs;
  final StringExpression windowTitle=new ReadOnlyStringWrapper("String_Node_Str");
  displayBehaviour=new DetachableDisplayBehaviour(parentPane,windowTitle,this,detachPaneButton.selectedProperty(),config,guiInformer);
  configureTopicConfigComboBox();
  configureOffsetResetComboBox();
  configureMessageNameTextField();
  configureConsumerGroupField();
  configureFetchTimeoutField();
  configureReceiveMsgLimitControls();
  resetKafkaListenerBinding();
  configureGuiControlDisableStateBasedOnStartButtonState();
  GuiUtils.configureComboBoxToClearSelectedValueIfItsPreviousValueWasRemoved(topicConfigComboBox);
  comboBoxConfigurator=new TopicConfigComboBoxConfigurator<>(topicConfigComboBox,config);
  comboBoxConfigurator.configure();
}

Fixed version (ground truth):
public ListenerConfigGuiController(KafkaListenerConfig config,AnchorPane parentPane,ModelConfigObjectsGuiInformer guiInformer,Listeners activeConsumers,Runnable refreshCallback,ObservableList<KafkaTopicConfig> topicConfigs,ToFileSaver toFileSaver) throws IOException {
  this.parentPane=parentPane;
  this.guiInformer=guiInformer;
  this.toFileSaver=toFileSaver;
  CustomFxWidgetsLoader.loadAnchorPane(this,FXML_FILE);
  this.config=config;
  this.activeConsumers=activeConsumers;
  this.refreshCallback=refreshCallback;
  this.topicConfigs=topicConfigs;
  final StringExpression windowTitle=new ReadOnlyStringWrapper("String_Node_Str");
  displayBehaviour=new DetachableDisplayBehaviour(parentPane,windowTitle,this,detachPaneButton.selectedProperty(),config,guiInformer);
  configureTopicConfigComboBox();
  configureOffsetResetComboBox();
  configureMessageNameTextField();
  configureConsumerGroupField();
  configureFetchTimeoutField();
  configureReceiveMsgLimitControls();
  resetKafkaListenerBinding();
  configureGuiControlDisableStateBasedOnStartButtonState();
  GuiUtils.configureComboBoxToClearSelectedValueIfItsPreviousValueWasRemoved(topicConfigComboBox);
  comboBoxConfigurator=new TopicConfigComboBoxConfigurator<>(topicConfigComboBox,config);
  comboBoxConfigurator.configure();
}
Program: 71029
Project: 71029
Buggy source:
@FXML private void initialize(){
  configureToFileSaver();
  addAdditionalOptionsToTextAreaPopupMenu();
}

Fixed version (ground truth):
@FXML private void initialize(){
  configureDisplayBehaviour();
  configureToFileSaver();
  addAdditionalOptionsToTextAreaPopupMenu();
}
Program: 71030
Project: 71030
Buggy source:
private void saveFile(String content,File file){
  try (FileWriter fileWriter=new FileWriter(file)){
    fileWriter.write(content);
    interactor.showInfo("String_Node_Str",String.format("String_Node_Str",file.getName()));
  }
 catch (  IOException ex) {
    interactor.showError("String_Node_Str",String.format("String_Node_Str",file.getName()));
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void saveFile(String content,File file){
  try (Writer fileWriter=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file),CHARSET_UTF8))){
    fileWriter.write(content);
    interactor.showInfo("String_Node_Str",String.format("String_Node_Str",file.getName()));
  }
 catch (  IOException ex) {
    interactor.showError("String_Node_Str",String.format("String_Node_Str",file.getName()));
    ex.printStackTrace();
  }
}
Program: 71031
Project: 71031
Buggy source:
private void showError(String content){
  showErrorDialog("String_Node_Str",content);
}

Fixed version (ground truth):
@Override public void showError(String headerText,Throwable e){
  showError(headerText,ThrowableUtils.getMessage(e));
}
Program: 71032
Project: 71032
Buggy source:
private void setTopicSuggestions(List<String> possibleSuggestions){
  if (null != stringAutoCompletionBinding) {
    stringAutoCompletionBinding.dispose();
  }
  stringAutoCompletionBinding=TextFields.bindAutoCompletion(topicNameField,possibleSuggestions);
}

Fixed version (ground truth):
private void setTopicSuggestions(List<String> possibleSuggestions){
  if (possibleSuggestions.isEmpty()) {
    suggestionProvider.clearSuggestions();
    return;
  }
  suggestionProvider.addPossibleSuggestions(possibleSuggestions);
}
Program: 71033
Project: 71033
Buggy source:
@Override public void sendMessages(MessageOnTopicDto msgsToTopic){
  try {
    sendMsgQueue.put(msgsToTopic);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void sendMessages(MessageOnTopicDto msgsToTopic){
  trySendMessages(msgsToTopic);
}
Program: 71034
Project: 71034
Buggy source:
private void trySendMessages(MessageOnTopicDto msgsOnTopicToBeSent){
  try {
    sendMessagesToTopic(msgsOnTopicToBeSent);
    Logger.info("String_Node_Str");
  }
 catch (  Exception e) {
    printMostAppropriateDebugBasedOnExcepionType(e);
  }
}

Fixed version (ground truth):
private void trySendMessages(MessageOnTopicDto msgsOnTopicToBeSent){
  try {
    sendMessagesToTopic(msgsOnTopicToBeSent);
    Logger.info("String_Node_Str");
  }
 catch (  Exception e) {
    printMostAppropriateDebugBasedOnExcepionType(e);
  }
catch (  Throwable e) {
    Logger.error("String_Node_Str",e);
  }
}
Program: 71035
Project: 71035
Buggy source:
@Override public void stop(){
  sender.stop();
  listeners.stopAll();
}

Fixed version (ground truth):
@Override public void stop(){
  listeners.stopAll();
}
Program: 71036
Project: 71036
Buggy source:
@Override public void start(){
  sender.start();
}

Fixed version (ground truth):
@Override public void start(){
}
Program: 71037
Project: 71037
Buggy source:
private Alert getConfigEntriesViewDialog(String header){
  if (configEntriesViewAlert == null) {
    configEntriesViewAlert=new Alert(AlertType.INFORMATION);
    configEntriesViewAlert.setHeaderText(header);
    configEntriesViewAlert.initOwner(owner);
    decorateWithCss(configEntriesViewAlert);
  }
  return configEntriesViewAlert;
}

Fixed version (ground truth):
private Alert getConfigEntriesViewDialog(String header){
  if (configEntriesViewAlert == null) {
    configEntriesViewAlert=new Alert(AlertType.INFORMATION);
    configEntriesViewAlert.initOwner(owner);
    decorateWithCss(configEntriesViewAlert);
  }
  configEntriesViewAlert.setHeaderText(header);
  return configEntriesViewAlert;
}
Program: 71038
Project: 71038
Buggy source:
@Provides @Singleton HttpLoggingInterceptor provideHttpLoggingInterceptor(){
  return new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BASIC);
}

Fixed version (ground truth):
@Provides @Singleton HttpLoggingInterceptor provideHttpLoggingInterceptor(){
  return new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY);
}
Program: 71039
Project: 71039
Buggy source:
@Override public ObservableSource<Recipes> apply(TextViewAfterTextChangeEvent textViewAfterTextChangeEvent) throws Exception {
  return getDataManager().searchRecipes(textViewAfterTextChangeEvent.editable().toString(),"String_Node_Str");
}

Fixed version (ground truth):
@Override public ObservableSource<Recipes> apply(TextViewAfterTextChangeEvent textViewAfterTextChangeEvent) throws Exception {
  return getDataManager().searchRecipes(textViewAfterTextChangeEvent.editable().toString(),"String_Node_Str").onErrorResumeNext(Observable.<Recipes>empty());
}
Program: 71040
Project: 71040
Buggy source:
@Override public void instantSearch(AppCompatEditText appCompatEditText){
  getCompositeDisposable().add(RxTextView.afterTextChangeEvents(appCompatEditText).debounce(QUERY_UPDATE_DELAY_MILLIS,TimeUnit.MILLISECONDS).filter(new Predicate<TextViewAfterTextChangeEvent>(){
    @Override public boolean test(    TextViewAfterTextChangeEvent textViewAfterTextChangeEvent) throws Exception {
      return textViewAfterTextChangeEvent.editable() != null && textViewAfterTextChangeEvent.editable().toString().length() > 3;
    }
  }
).flatMap(new Function<TextViewAfterTextChangeEvent,ObservableSource<Recipes>>(){
    @Override public ObservableSource<Recipes> apply(    TextViewAfterTextChangeEvent textViewAfterTextChangeEvent) throws Exception {
      return getDataManager().searchRecipes(textViewAfterTextChangeEvent.editable().toString(),"String_Node_Str");
    }
  }
).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<Recipes>(){
    @Override public void accept(    Recipes recipes) throws Exception {
      if (recipes != null && recipes.getRecipes() != null) {
        Timber.d(recipes.getCount().toString());
        getMvpView().reFreshRecipeList(recipes.getRecipes());
      }
    }
  }
,new Consumer<Throwable>(){
    @Override public void accept(    Throwable throwable) throws Exception {
      getMvpView().showError(throwable.getMessage());
      Timber.e(throwable);
    }
  }
));
}

Fixed version (ground truth):
@Override public void instantSearch(AppCompatEditText appCompatEditText){
  getCompositeDisposable().add(RxTextView.afterTextChangeEvents(appCompatEditText).debounce(QUERY_UPDATE_DELAY_MILLIS,TimeUnit.MILLISECONDS).filter(new Predicate<TextViewAfterTextChangeEvent>(){
    @Override public boolean test(    TextViewAfterTextChangeEvent textViewAfterTextChangeEvent) throws Exception {
      return textViewAfterTextChangeEvent.editable() != null && textViewAfterTextChangeEvent.editable().toString().length() > 3;
    }
  }
).switchMap(new Function<TextViewAfterTextChangeEvent,ObservableSource<Recipes>>(){
    @Override public ObservableSource<Recipes> apply(    TextViewAfterTextChangeEvent textViewAfterTextChangeEvent) throws Exception {
      return getDataManager().searchRecipes(textViewAfterTextChangeEvent.editable().toString(),"String_Node_Str").onErrorResumeNext(Observable.<Recipes>empty());
    }
  }
).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<Recipes>(){
    @Override public void accept(    Recipes recipes) throws Exception {
      if (recipes != null && recipes.getRecipes() != null) {
        if (!Thread.currentThread().isInterrupted()) {
          Timber.d(recipes.getCount().toString());
          getMvpView().reFreshRecipeList(recipes.getRecipes());
        }
      }
    }
  }
,new Consumer<Throwable>(){
    @Override public void accept(    Throwable throwable) throws Exception {
      getMvpView().showError(throwable.getMessage());
      Timber.e(throwable);
    }
  }
));
}
Program: 71041
Project: 71041
Buggy source:
public List<T> compact(){
  sort(KllQuantileEstimator.this._config.getComparator());
  List<T> result=new ArrayList<>();
  if (Math.random() < 0.5) {
    while (size() >= 2) {
      int index=size() - 1;
      remove(index);
      result.add(remove(index - 1));
    }
  }
 else {
    while (size() >= 2) {
      int index=size() - 1;
      result.add(remove(index));
      remove(index - 1);
    }
  }
  return this;
}

Fixed version (ground truth):
public List<T> compact(){
  sort(KllQuantileEstimator.this._config.getComparator());
  List<T> result=new ArrayList<>();
  if (Math.random() < 0.5) {
    while (size() >= 2) {
      int index=size() - 1;
      remove(index);
      result.add(remove(index - 1));
    }
  }
 else {
    while (size() >= 2) {
      int index=size() - 1;
      result.add(remove(index));
      remove(index - 1);
    }
  }
  return result;
}
Program: 71042
Project: 71042
Buggy source:
@Test public void test5_2(){
  int count=1000;
  int upperBound=10000;
  double errorRate=0.01;
  QuantileEstimator<Integer> quantileEstimator=getQuantileEstimator(Integer.class);
  test5(quantileEstimator,count,upperBound,errorRate);
}

Fixed version (ground truth):
@Test public void test5_2(){
  int count=1000;
  int upperBound=1000;
  double errorRate=0.01;
  test5(count,upperBound,errorRate);
}
Program: 71043
Project: 71043
Buggy source:
protected void test5(QuantileEstimator<Integer> quantileEstimator,int count,int upperBound,double errorRate){
  int maxError=(int)(upperBound * errorRate);
  List<Integer> items=Lists.newArrayList();
  Random random=new Random();
  for (int i=0; i < count; i++) {
    Integer item=random.nextInt(upperBound);
    items.add(item);
    quantileEstimator.add(item);
  }
  System.out.println("String_Node_Str" + items);
  System.out.println();
  Collections.sort(items);
  System.out.println("String_Node_Str" + items);
  System.out.println();
  List<Double> quantiles=Lists.newArrayList(0.0,0.001,0.25,0.50,0.75,0.90,0.999,1.0);
  HashMap<Double,Integer> quantileResults=new HashMap<>();
  for (  Double quantile : quantiles) {
    int pos=(int)(count * quantile) - 1;
    if (pos < 0)     pos=0;
    int item=items.get(pos);
    quantileEstimator.add(item);
    quantileResults.put(quantile,item);
  }
  Map<Double,Integer> results=quantileEstimator.get(quantiles);
  for (int i=0; i < quantiles.size(); i++) {
    Double quantile=quantiles.get(i);
    Integer expected=quantileResults.get(quantile);
    Integer actual=results.get(quantile);
    Integer actualError=Math.abs(actual - expected);
    System.out.println("String_Node_Str" + quantile + "String_Node_Str"+ expected+ "String_Node_Str"+ actual+ "String_Node_Str"+ actualError);
    System.out.println();
    Assert.assertTrue("String_Node_Str" + maxError,actualError <= maxError);
  }
}

Fixed version (ground truth):
protected void test5(int count,int upperBound,double errorRate){
  QuantileEstimator<Integer> quantileEstimator=getQuantileEstimator(Integer.class);
  List<Double> quantiles=Lists.newArrayList(0.0,0.001,0.25,0.50,0.75,0.90,0.999,1.0);
  BiFunction<Integer,Integer,List<Integer>> balanceddataProvider=(c,b) -> {
    HashMap<Integer,Integer> itemsAndCounts=new HashMap<>();
    int distinctItemCount=c < b ? c : b;
    int singleItemCount=c / b;
    if (singleItemCount == 0)     singleItemCount=1;
    List<Integer> data=new ArrayList<>();
    Random random=new Random();
    while (data.size() < c) {
      int item=random.nextInt(b);
      Integer itemCount=itemsAndCounts.get(item);
      if (itemCount != null && itemCount < singleItemCount) {
        itemsAndCounts.put(item,itemCount++);
        data.add(item);
      }
 else       if (itemCount == null && itemsAndCounts.keySet().size() < distinctItemCount) {
        itemsAndCounts.put(item,1);
        data.add(item);
      }
    }
    return data;
  }
;
  test(quantileEstimator,quantiles,count,upperBound,errorRate,balanceddataProvider);
}
Program: 71044
Project: 71044
Buggy source:
@Test public void test5_3(){
  int count=10000;
  int upperBound=100000;
  double errorRate=0.001;
  QuantileEstimator<Integer> quantileEstimator=getQuantileEstimator(Integer.class);
  test5(quantileEstimator,count,upperBound,errorRate);
}

Fixed version (ground truth):
@Test public void test5_3(){
  int count=10000;
  int upperBound=1000;
  double errorRate=0.001;
  test5(count,upperBound,errorRate);
}
Program: 71045
Project: 71045
Buggy source:
@Override public void add(T value){
  update(value);
}

Fixed version (ground truth):
@Override public synchronized void add(T value){
  _compactors.get(0).add(value);
  _size++;
  if (_size >= _maxSize)   compress();
}
Program: 71046
Project: 71046
Buggy source:
protected void compress(){
  for (int i=0; i < _compactors.size(); i++) {
    if (_compactors.get(i).size() >= capacity(i)) {
      if (i + 1 >= _h) {
        grow();
        _compactors.get(i + 1).addAll(_compactors.get(i).compact());
        int size=0;
        for (int j=0; j < _compactors.size(); j++)         size+=_compactors.get(j).size();
        _size=size;
        break;
      }
    }
  }
}

Fixed version (ground truth):
protected void compress(){
  for (int i=0; i < _compactors.size(); i++) {
    if (_compactors.get(i).size() >= capacity(i)) {
      if (i + 1 >= _h)       grow();
      _compactors.get(i + 1).addAll(_compactors.get(i).compact());
      int size=0;
      for (int j=0; j < _compactors.size(); j++)       size+=_compactors.get(j).size();
      _size=size;
      break;
    }
  }
}
Program: 71047
Project: 71047
Buggy source:
@Override public T get(double quantile){
  List<ItemAndQuantile> itemsAndQuantiles=cdf();
  for (int i=0; i < itemsAndQuantiles.size(); i++) {
    if (itemsAndQuantiles.get(i).quantile >= quantile)     return itemsAndQuantiles.get(i).item;
  }
  return itemsAndQuantiles.get(itemsAndQuantiles.size() - 1).item;
}

Fixed version (ground truth):
@Override public synchronized T get(double quantile){
  List<ItemAndQuantile> itemsAndQuantiles=cdf();
  for (int i=0; i < itemsAndQuantiles.size(); i++) {
    if (itemsAndQuantiles.get(i).quantile >= quantile)     return itemsAndQuantiles.get(i).item;
  }
  return itemsAndQuantiles.get(itemsAndQuantiles.size() - 1).item;
}
Program: 71049
Project: 71049
Buggy source:
private void generateDeployment(DeploymentModel deploymentModel,String balxFilePath,String outputDir) throws KubernetesPluginException {
  String balxFileName=KubernetesUtils.extractBalxName(balxFilePath);
  if (deploymentModel.getName() == null) {
    deploymentModel.setName(getValidName(balxFileName) + DEPLOYMENT_POSTFIX);
  }
  if (deploymentModel.getImage() == null) {
    deploymentModel.setImage(balxFileName + DOCKER_LATEST_TAG);
  }
  deploymentModel.addLabel(KubernetesConstants.KUBERNETES_SELECTOR_KEY,balxFileName);
  if ("String_Node_Str".equals(deploymentModel.getEnableLiveness()) && deploymentModel.getLivenessPort() == 0) {
    deploymentModel.setLivenessPort(deploymentModel.getPorts().get(0));
  }
  String deploymentContent=new DeploymentHandler(deploymentModel).generate();
  try {
    KubernetesUtils.writeToFile(deploymentContent,outputDir + File.separator + KubernetesUtils.extractBalxName(balxFilePath)+ DEPLOYMENT_POSTFIX+ YAML);
    genereateDocker(deploymentModel,balxFilePath,outputDir + File.separator + DOCKER);
    generatePodAutoscaler(deploymentModel,balxFilePath,outputDir);
  }
 catch (  IOException e) {
    throw new KubernetesPluginException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void generateDeployment(DeploymentModel deploymentModel,String balxFilePath,String outputDir) throws KubernetesPluginException {
  String balxFileName=KubernetesUtils.extractBalxName(balxFilePath);
  if (deploymentModel.getName() == null) {
    deploymentModel.setName(getValidName(balxFileName) + DEPLOYMENT_POSTFIX);
  }
  if (deploymentModel.getImage() == null) {
    deploymentModel.setImage(balxFileName + DOCKER_LATEST_TAG);
  }
  deploymentModel.addLabel(KubernetesConstants.KUBERNETES_SELECTOR_KEY,balxFileName);
  if ("String_Node_Str".equals(deploymentModel.getEnableLiveness()) && deploymentModel.getLivenessPort() == 0) {
    deploymentModel.setLivenessPort(deploymentModel.getPorts().get(0));
  }
  String deploymentContent=new DeploymentHandler(deploymentModel).generate();
  try {
    KubernetesUtils.writeToFile(deploymentContent,outputDir + File.separator + getValidName(balxFileName)+ DEPLOYMENT_POSTFIX+ YAML);
    genereateDocker(deploymentModel,balxFilePath,outputDir + File.separator + DOCKER);
    generatePodAutoscaler(deploymentModel,balxFilePath,outputDir);
  }
 catch (  IOException e) {
    throw new KubernetesPluginException("String_Node_Str",e);
  }
}
Program: 71050
Project: 71050
Buggy source:
@Tips(description="String_Node_Str") public boolean isTargetToast(String targetToast){
  try {
    final WebDriverWait wait=new WebDriverWait(driver,3);
    Assert.assertNotNull(wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("String_Node_Str" + targetToast + "String_Node_Str"))));
    LogUtil.w("String_Node_Str",targetToast);
    return true;
  }
 catch (  Exception e) {
    return false;
  }
}

Fixed version (ground truth):
@Tips(description="String_Node_Str") public boolean isTargetToast(String targetToast){
  try {
    final WebDriverWait wait=new WebDriverWait(driver,2);
    Assert.assertNotNull(wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("String_Node_Str" + targetToast + "String_Node_Str"))));
    LogUtil.w("String_Node_Str",targetToast);
    return true;
  }
 catch (  Exception e) {
    return false;
  }
}
Program: 71051
Project: 71051
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str") public void checkBottomDownload() throws InterruptedException {
  LogUtil.printCurrentMethodNameInLog4J();
  assertEquals(detailPage.btnInstall,"String_Node_Str");
  Connection temp=detailAction.go2GetNetWorkStatus();
  LogUtil.w("String_Node_Str",temp.name());
  boolean isDataStatu=(temp == Connection.DATA);
  detailAction.go2Click(detailPage.btnInstall);
  if (!isDataStatu) {
    detailAction.go2ClickAndWait(detailPage.btnInstall,0.5);
  }
 else {
    LogUtil.w("String_Node_Str");
    detailAction.go2ClickAndWait(detailPage.btnInstall,0.5);
    detailAction.go2ClickAndWait(detailPage.btnInstall,0.5);
  }
  assertEquals(detailPage.getRandomTargetText().contains("String_Node_Str"),true);
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str") public void checkBottomDownload() throws InterruptedException {
  LogUtil.printCurrentMethodNameInLog4J();
  assertTrue(detailAction.go2GetText(detailPage.btnInstall).contains("String_Node_Str"));
  Connection temp=detailAction.go2GetNetWorkStatus();
  LogUtil.w("String_Node_Str",temp.name());
  boolean isDataStatu=(temp == Connection.DATA);
  detailAction.go2Click(detailPage.btnInstall);
  if (!isDataStatu) {
    detailAction.go2ClickAndWait(detailPage.btnInstall,0.5);
  }
 else {
    LogUtil.w("String_Node_Str");
    detailAction.go2ClickAndWait(detailPage.btnInstall,0.5);
    detailAction.go2ClickAndWait(detailPage.btnInstall,0.5);
  }
  assertEquals(detailAction.go2GetText(detailPage.btnInstall).contains("String_Node_Str"),true);
}
Program: 71052
Project: 71052
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"},retryAnalyzer=FailRetry.class) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checkPostTipOffReport() throws InterruptedException {
  LogUtil.printCurrentMethodNameInLog4J();
  detailAction.go2ClickAndWait(detailPage.btnPost,2);
  assertEquals(getCurrentPageName(),"String_Node_Str");
  postAction.go2Click(postPage.btnSubmit);
  String reportPostErrorToast="String_Node_Str";
  Assert.assertEquals(postPage.isTargetToast(reportPostErrorToast),true);
  postAction.go2ClickAndWait(postPage.btnReportTypeSelect,1.5);
  postAction.go2ClickAndWait(postPage.targetTypeItem,0.5);
  postAction.go2SendWord(postPage.etReportInfo,"String_Node_Str");
  postAction.go2SendWord(postPage.etPhoneNum,"String_Node_Str");
  postAction.go2SendWord(postPage.etEMailInfo,"String_Node_Str");
  postAction.go2Click(postPage.btnSubmit);
  Assert.assertEquals(postPage.isTargetToast(reportPostErrorToast),false);
  postPage.forceWait(0.5);
  if (!getCurrentPageName().equals("String_Node_Str")) {
    postAction.go2Backforward();
    assertEquals(getCurrentPageName(),"String_Node_Str");
  }
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"},retryAnalyzer=FailRetry.class) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checkPostTipOffReport(){
  LogUtil.printCurrentMethodNameInLog4J();
  detailAction.go2ClickAndWait(detailPage.btnPost,2);
  assertEquals(getCurrentPageName(),"String_Node_Str");
  postAction.go2Click(postPage.btnSubmit);
  String reportPostErrorToast="String_Node_Str";
  Assert.assertEquals(postPage.isTargetToast(reportPostErrorToast),true);
  postAction.go2ClickAndWait(postPage.btnReportTypeSelect,1.5);
  postAction.go2ClickAndWait(postPage.targetTypeItem,0.5);
  postAction.go2SendWord(postPage.etReportInfo,"String_Node_Str");
  postAction.go2SendWord(postPage.etPhoneNum,"String_Node_Str");
  postAction.go2SendWord(postPage.etEMailInfo,"String_Node_Str");
  postAction.go2Click(postPage.btnSubmit);
  Assert.assertEquals(postPage.isTargetToast(reportPostErrorToast),false);
  LogUtil.w("String_Node_Str");
  while (!getCurrentPackageName().equals("String_Node_Str")) {
    go2Backforward();
  }
  LogUtil.w("String_Node_Str");
}
Program: 71053
Project: 71053
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) public void checkTheImageScrollView() throws InterruptedException {
  LogUtil.printCurrentMethodNameInLog4J();
  detailAction.go2ClickAndWait(detailPage.imageAdScorll,1.5);
  detailAction.go2SwipeInElement(detailPage.imageAdScorll,Heading.LEFT);
  ScreenUtil.screenShot("String_Node_Str");
  detailAction.go2SwipeInElement(detailPage.imageAdScorll,Heading.RIGHT);
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"}) public void checkTheImageScrollView() throws InterruptedException {
  LogUtil.printCurrentMethodNameInLog4J();
  detailAction.go2ClickAndWait(detailPage.imageAdScorll,1.5);
  assertEquals(getCurrentPageName(),"String_Node_Str");
  detailAction.go2Backforward();
  detailAction.go2SwipeInElement(detailPage.imageAdScorll,Heading.LEFT);
  ScreenUtil.screenShot("String_Node_Str");
  detailAction.go2SwipeInElement(detailPage.imageAdScorll,Heading.RIGHT);
}
Program: 71054
Project: 71054
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str") public void checkRightTopNumTip(){
  LogUtil.printCurrentMethodNameInLog4J();
  WaitUtil.implicitlyWait(5);
  assertEquals(detailPage.tvPointNum,"String_Node_Str");
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str") public void checkRightTopNumTip(){
  LogUtil.printCurrentMethodNameInLog4J();
  String updateNum=detailAction.go2GetText(detailPage.tvPointNum);
  if (updateNum.equals("String_Node_Str")) {
    LogUtil.e("String_Node_Str");
  }
 else {
    LogUtil.w("String_Node_Str",updateNum);
  }
}
Program: 71055
Project: 71055
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str",riskPoint="String_Node_Str",triggerTime="String_Node_Str") public void checkGreatGame() throws InterruptedException {
  WaitUtil.implicitlyWait(5);
  LogUtil.printCurrentMethodName();
  ScrollUtil.scrollToPrecent(Direction.LEFT,80);
  WaitUtil.implicitlyWait(App.WAIT_TIME_IMPLICITLY);
  String greatGameUiSelector="String_Node_Str";
  AndroidElement greatGameTv=mDriver.findElementByAndroidUIAutomator(greatGameUiSelector);
  if (AppUtil.isInstall(App.MM_PACKAGE_NAME)) {
    greatGameTv.click();
    WaitUtil.forceWait(2);
    AppUtil.killApp(App.MM_PACKAGE_NAME);
  }
 else {
    greatGameTv.click();
    PageRouteUtil.pressBack();
    if (ContextUtil.getCurrentActivity().equals("String_Node_Str")) {
      AppUtil.handleInfoSwitch2Native();
      WaitUtil.implicitlyWait(App.WAIT_TIME_IMPLICITLY);
      mDriver.findElement(By.id("String_Node_Str")).click();
      System.out.println(ContextUtil.getCurrentActivity());
    }
 else {
      System.out.println(ContextUtil.getCurrentActivity());
    }
  }
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str",riskPoint="String_Node_Str",triggerTime="String_Node_Str") public void checkGreatGame() throws InterruptedException {
  WaitUtil.implicitlyWait(5);
  LogUtil.printCurrentMethodName();
  ScrollUtil.scrollToPrecent(Direction.LEFT,80);
  String gameUiSelector="String_Node_Str" + "String_Node_Str";
  AndroidElement e=mDriver.findElementByAndroidUIAutomator(gameUiSelector);
  if (!e.isSelected()) {
    System.err.println("String_Node_Str");
    return;
  }
  WaitUtil.implicitlyWait(App.WAIT_TIME_IMPLICITLY);
  String greatGameUiSelector="String_Node_Str";
  AndroidElement greatGameTv=mDriver.findElementByAndroidUIAutomator(greatGameUiSelector);
  if (AppUtil.isInstall(App.MM_PACKAGE_NAME)) {
    greatGameTv.click();
    WaitUtil.forceWait(2);
    AppUtil.killApp(App.MM_PACKAGE_NAME);
  }
 else {
    greatGameTv.click();
    PageRouteUtil.pressBack();
    if (ContextUtil.getCurrentActivity().equals("String_Node_Str")) {
      AppUtil.handleInfoSwitch2Native();
      WaitUtil.implicitlyWait(App.WAIT_TIME_IMPLICITLY);
      mDriver.findElement(By.id("String_Node_Str")).click();
      System.out.println(ContextUtil.getCurrentActivity());
    }
 else {
      System.out.println(ContextUtil.getCurrentActivity());
    }
  }
}
Program: 71056
Project: 71056
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void randomCheckOne() throws InterruptedException {
  LogUtil.printCurrentMethodName();
  Random random=new Random();
  List<AndroidElement> list=mDriver.findElementsByClassName("String_Node_Str");
  int randomIndex=0;
  if (list.size() > 3) {
    randomIndex=random.nextInt(list.size() - 3);
  }
 else {
    System.err.println("String_Node_Str");
    return;
  }
  AndroidElement hotkeyItem=list.get(randomIndex);
  searchBeforePerform=hotkeyItem.getText();
  if (searchBeforePerform.equals("String_Node_Str") || searchBeforePerform.equals("String_Node_Str") || searchBeforePerform.equals("String_Node_Str")) {
    searchBeforePerform=list.get(randomIndex + 1).getText();
  }
  hotkeyItem.click();
  WaitUtil.forceWait(2);
  PageRouteUtil.pressBack();
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void randomCheckOne() throws InterruptedException {
  LogUtil.printCurrentMethodName();
  Random random=new Random();
  List<AndroidElement> list=mDriver.findElementsByClassName("String_Node_Str");
  int randomIndex=0;
  if (list.size() > 3) {
    randomIndex=random.nextInt(list.size() - 3);
  }
 else {
    System.err.println("String_Node_Str");
    ScreenUtil.screenShotForce("String_Node_Str");
    return;
  }
  AndroidElement hotkeyItem=list.get(randomIndex);
  searchBeforePerform=hotkeyItem.getText();
  if (searchBeforePerform.equals("String_Node_Str") || searchBeforePerform.equals("String_Node_Str") || searchBeforePerform.equals("String_Node_Str")) {
    searchBeforePerform=list.get(randomIndex + 1).getText();
  }
  hotkeyItem.click();
  WaitUtil.forceWait(2);
  PageRouteUtil.pressBack();
}
Program: 71057
Project: 71057
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str") public void checkBack() throws InterruptedException {
  LogUtil.printCurrentMethodName();
  AndroidElement backIv=mDriver.findElement(By.id("String_Node_Str"));
  backIv.click();
  WaitUtil.forceWait(2);
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
  String rollHotKeyWordUiSelector="String_Node_Str" + "String_Node_Str";
  AndroidElement rollHotKeyWordTv=mDriver.findElementByAndroidUIAutomator(rollHotKeyWordUiSelector);
  rollHotKeyInMainAct=rollHotKeyWordTv.getText();
  System.err.println("String_Node_Str" + rollHotKeyInMainAct);
  WaitUtil.implicitlyWait(3);
  AndroidElement searchLayout=mDriver.findElement(By.id("String_Node_Str"));
  searchLayout.click();
  WaitUtil.forceWait(2);
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str") public void checkBack() throws InterruptedException {
  if (!ContextUtil.getCurrentActivity().equals("String_Node_Str")) {
    System.err.println("String_Node_Str");
    return;
  }
  WaitUtil.implicitlyWait(5);
  AndroidElement backIv=mDriver.findElement(By.id("String_Node_Str"));
  LogUtil.printCurrentMethodName();
  backIv.click();
  WaitUtil.forceWait(2);
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
  String rollHotKeyWordUiSelector="String_Node_Str" + "String_Node_Str";
  AndroidElement rollHotKeyWordTv=mDriver.findElementByAndroidUIAutomator(rollHotKeyWordUiSelector);
  rollHotKeyInMainAct=rollHotKeyWordTv.getText();
  if (rollHotKeyInMainAct == null) {
    ScreenUtil.screenShotForce("String_Node_Str");
    WaitUtil.forceWait(1);
    rollHotKeyInMainAct=rollHotKeyWordTv.getText();
  }
  System.err.println("String_Node_Str" + rollHotKeyInMainAct);
  WaitUtil.implicitlyWait(3);
  AndroidElement searchLayout=mDriver.findElement(By.id("String_Node_Str"));
  searchLayout.click();
  WaitUtil.forceWait(2);
}
Program: 71058
Project: 71058
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"},retryAnalyzer=FailRetry.class) @Tips(description="String_Node_Str") public void checkWordFromOutside(){
  WaitUtil.implicitlyWait(5);
  LogUtil.printCurrentMethodName();
  AndroidElement searchEt=mDriver.findElement(By.id("String_Node_Str"));
  System.err.println("String_Node_Str" + searchEt.getText());
  assertEquals(searchEt.getText(),rollHotKeyInMainAct);
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"},retryAnalyzer=FailRetry.class) @Tips(description="String_Node_Str") public void checkWordFromOutside(){
  if (!ContextUtil.getCurrentActivity().equals("String_Node_Str")) {
    System.err.println("String_Node_Str");
    ScreenUtil.screenShotForce("String_Node_Str");
  }
  LogUtil.printCurrentMethodName();
  try {
    WaitUtil.implicitlyWait(10);
    AndroidElement searchEt=mDriver.findElement(By.id("String_Node_Str"));
    System.err.println("String_Node_Str" + searchEt.getText());
    assertEquals(searchEt.getText(),rollHotKeyInMainAct);
  }
 catch (  Exception e) {
    ScreenUtil.screenShotForce("String_Node_Str");
  }
}
Program: 71059
Project: 71059
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checMainGameAdShow() throws InterruptedException {
  ScrollUtil.scrollToPrecent(Direction.LEFT,80);
  LogUtil.printCurrentMethodName();
  String gameAdClass="String_Node_Str";
  List<AndroidElement> elementList=mDriver.findElementsByClassName(gameAdClass);
  WaitUtil.implicitlyWait(10);
  mDriver.findElement(By.id("String_Node_Str"));
  ScrollUtil.scrollToBase();
  WaitUtil.forceWait(2);
  List<AndroidElement> elementListAfterScroll=mDriver.findElementsByClassName(gameAdClass);
  assertEquals(elementList.size() != elementListAfterScroll.size(),true);
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"},retryAnalyzer=FailRetry.class) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checMainGameAdShow() throws InterruptedException {
  ScrollUtil.scrollToPrecent(Direction.LEFT,80);
  LogUtil.printCurrentMethodName();
  String gameAdClass="String_Node_Str";
  List<AndroidElement> elementList=mDriver.findElementsByClassName(gameAdClass);
  WaitUtil.implicitlyWait(10);
  mDriver.findElement(By.id("String_Node_Str"));
  ScrollUtil.scrollToBase();
  WaitUtil.forceWait(2);
  List<AndroidElement> elementListAfterScroll=mDriver.findElementsByClassName(gameAdClass);
  assertEquals(elementList.size() != elementListAfterScroll.size(),true);
}
Program: 71060
Project: 71060
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"},retryAnalyzer=FailRetry.class) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checkMainSoftAdContent() throws InterruptedException {
  WaitUtil.implicitlyWait(5);
  List<AndroidElement> elementList=mDriver.findElements(By.id("String_Node_Str"));
  LogUtil.printCurrentMethodName();
  elementList.get(elementList.size() - 1).click();
  WaitUtil.forceWait(3);
  ScreenUtil.screenShot("String_Node_Str");
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
  WaitUtil.implicitlyWait(5);
  AndroidElement e=mDriver.findElement(By.id("String_Node_Str"));
  e.click();
  WaitUtil.forceWait(2);
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"},retryAnalyzer=FailRetry.class) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checkMainSoftAdContent() throws InterruptedException {
  WaitUtil.implicitlyWait(5);
  List<AndroidElement> elementList=mDriver.findElements(By.id("String_Node_Str"));
  LogUtil.printCurrentMethodName();
  if (elementList.isEmpty()) {
    System.out.println("String_Node_Str");
    ScreenUtil.screenShotForce("String_Node_Str");
    return;
  }
  elementList.get(elementList.size() - 1).click();
  WaitUtil.forceWait(3);
  ScreenUtil.screenShot("String_Node_Str");
  String curAct=ContextUtil.getCurrentActivity();
  boolean isTargetAct1=curAct.equals("String_Node_Str") || curAct.equals("String_Node_Str") || curAct.equals("String_Node_Str");
  assertEquals(isTargetAct1,true);
  if (curAct.equals("String_Node_Str")) {
    PageRouteUtil.pressBack();
    WaitUtil.forceWait(2);
  }
  WaitUtil.implicitlyWait(5);
  AndroidElement e=mDriver.findElement(By.id("String_Node_Str"));
  e.click();
  WaitUtil.forceWait(2);
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
}
Program: 71061
Project: 71061
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checkMainGameAdContent() throws InterruptedException {
  String curAct1=ContextUtil.getCurrentActivity();
  boolean isTargetAct1=curAct1.equals("String_Node_Str") || curAct1.equals("String_Node_Str");
  if (isTargetAct1) {
    while (ContextUtil.getCurrentActivity().equals("String_Node_Str")) {
      PageRouteUtil.pressBack();
      WaitUtil.forceWait(3);
    }
  }
 else {
    System.out.println("String_Node_Str");
  }
  WaitUtil.implicitlyWait(10);
  List<AndroidElement> elementList=mDriver.findElements(By.id("String_Node_Str"));
  LogUtil.printCurrentMethodName();
  elementList.get(elementList.size() - 1).click();
  WaitUtil.forceWait(5);
  ScreenUtil.screenShot("String_Node_Str");
  String curAct=ContextUtil.getCurrentActivity();
  boolean isTargetAct=curAct.equals("String_Node_Str") || curAct.equals("String_Node_Str");
  assertEquals(isTargetAct,true);
  if (curAct.equals("String_Node_Str")) {
    AndroidElement e=mDriver.findElement(By.id("String_Node_Str"));
    e.click();
    WaitUtil.forceWait(3);
  }
  AndroidElement e=mDriver.findElement(By.id("String_Node_Str"));
  e.click();
  WaitUtil.forceWait(3);
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"}) @Tips(description="String_Node_Str",riskPoint="String_Node_Str") public void checkMainGameAdContent() throws InterruptedException {
  String curAct1=ContextUtil.getCurrentActivity();
  boolean isTargetAct1=curAct1.equals("String_Node_Str") || curAct1.equals("String_Node_Str");
  if (isTargetAct1) {
    while (ContextUtil.getCurrentActivity().equals("String_Node_Str")) {
      PageRouteUtil.pressBack();
      WaitUtil.forceWait(3);
    }
  }
 else {
    System.out.println("String_Node_Str");
  }
  WaitUtil.implicitlyWait(10);
  List<AndroidElement> elementList=mDriver.findElements(By.id("String_Node_Str"));
  LogUtil.printCurrentMethodName();
  elementList.get(elementList.size() - 1).click();
  WaitUtil.forceWait(5);
  ScreenUtil.screenShot("String_Node_Str");
  String curAct=ContextUtil.getCurrentActivity();
  boolean isTargetAct=curAct.equals("String_Node_Str") || curAct.equals("String_Node_Str");
  assertEquals(isTargetAct,true);
  if (curAct.equals("String_Node_Str")) {
    PageRouteUtil.pressBack();
    WaitUtil.forceWait(3);
  }
  AndroidElement e=mDriver.findElement(By.id("String_Node_Str"));
  e.click();
  WaitUtil.forceWait(3);
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
}
Program: 71062
Project: 71062
Buggy source:
/** 
 * 重定向到RequestiteActivity
 */
public static void redirect2RequestiteActivity(){
  redirect2RequestPermissionActivity();
  WaitUtil.implicitlyWait(2);
  AndroidElement buttonAllow=driver.findElement(By.id("String_Node_Str"));
  for (int i=0; i < 4; i++) {
    buttonAllow.click();
    WaitUtil.implicitlyWait(1);
  }
}

Fixed version (ground truth):
/** 
 * 重定向到RequestiteActivity
 */
public static void redirect2RequestiteActivity(){
  redirect2RequestPermissionActivity();
  WaitUtil.implicitlyWait(5);
  AndroidElement buttonAllow=driver.findElement(By.id("String_Node_Str"));
  for (int i=0; i < 4; i++) {
    buttonAllow.click();
    WaitUtil.implicitlyWait(1);
  }
}
Program: 71063
Project: 71063
Buggy source:
/** 
 * 重定向到SettingActivity
 * @throws InterruptedException
 */
public static void redirect2SettingActivity() throws InterruptedException {
  redirect2DownloadManagerActivity();
  WaitUtil.implicitlyWait(2);
  AndroidElement settingRly=driver.findElement(By.id("String_Node_Str"));
  settingRly.click();
  WaitUtil.forceWait(2);
}

Fixed version (ground truth):
/** 
 * 重定向到SettingActivity
 * @throws InterruptedException
 */
public static void redirect2SettingActivity() throws InterruptedException {
  redirect2DownloadManagerActivity();
  WaitUtil.implicitlyWait(5);
  AndroidElement settingRly=driver.findElement(By.id("String_Node_Str"));
  settingRly.click();
  WaitUtil.forceWait(2);
}
Program: 71064
Project: 71064
Buggy source:
/** 
 * 重定向到RequestPermissionActivity
 */
public static void redirect2RequestPermissionActivity(){
  redirect2SplashActivity();
  WaitUtil.implicitlyWait(3);
  AndroidElement element=driver.findElement(By.id("String_Node_Str"));
  element.click();
}

Fixed version (ground truth):
/** 
 * 重定向到RequestPermissionActivity
 */
public static void redirect2RequestPermissionActivity(){
  redirect2SplashActivity();
  WaitUtil.implicitlyWait(5);
  AndroidElement element=driver.findElement(By.id("String_Node_Str"));
  element.click();
}
Program: 71065
Project: 71065
Buggy source:
public static void redirect2SearchActivity() throws InterruptedException {
  redirect2MainActivity();
  WaitUtil.implicitlyWait(2);
  AndroidElement searchLayout=driver.findElement(By.id("String_Node_Str"));
  searchLayout.click();
  WaitUtil.forceWait(2);
}

Fixed version (ground truth):
public static void redirect2SearchActivity() throws InterruptedException {
  redirect2MainActivity();
  WaitUtil.implicitlyWait(5);
  AndroidElement searchLayout=driver.findElement(By.id("String_Node_Str"));
  searchLayout.click();
  WaitUtil.forceWait(2);
}
Program: 71066
Project: 71066
Buggy source:
/** 
 * 重定向到MainActivity
 */
public static void redirect2MainActivity(){
  redirect2RequestiteActivity();
  WaitUtil.implicitlyWait(2);
  AndroidElement mainButton=driver.findElement(By.id("String_Node_Str"));
  mainButton.click();
}

Fixed version (ground truth):
/** 
 * 重定向到MainActivity
 */
public static void redirect2MainActivity(){
  redirect2RequestiteActivity();
  WaitUtil.implicitlyWait(5);
  AndroidElement mainButton=driver.findElement(By.id("String_Node_Str"));
  mainButton.click();
}
Program: 71067
Project: 71067
Buggy source:
/** 
 * 重定向到DownloadManagerActivity
 * @throws InterruptedException
 */
public static void redirect2DownloadManagerActivity() throws InterruptedException {
  redirect2MainActivity();
  WaitUtil.implicitlyWait(2);
  AndroidElement managerRly=driver.findElement(By.id("String_Node_Str"));
  managerRly.click();
  WaitUtil.forceWait(2);
}

Fixed version (ground truth):
/** 
 * 重定向到DownloadManagerActivity
 * @throws InterruptedException
 */
public static void redirect2DownloadManagerActivity() throws InterruptedException {
  redirect2MainActivity();
  WaitUtil.implicitlyWait(5);
  AndroidElement managerRly=driver.findElement(By.id("String_Node_Str"));
  managerRly.click();
  WaitUtil.forceWait(2);
}
Program: 71068
Project: 71068
Buggy source:
@Test public void initCheck(){
  System.err.println("String_Node_Str" + getClass().getSimpleName() + "String_Node_Str");
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
  ScreenUtil.screenShot("String_Node_Str");
  WaitUtil.implicitlyWait(2);
}

Fixed version (ground truth):
@Test(retryAnalyzer=FailRetry.class) public void initCheck(){
  System.err.println("String_Node_Str" + getClass().getSimpleName() + "String_Node_Str");
  assertEquals(ContextUtil.getCurrentActivity(),"String_Node_Str");
  ScreenUtil.screenShot("String_Node_Str");
  WaitUtil.implicitlyWait(2);
}