nus-yam/ex-repair huggingface dataset:
Program: 69179
Project: 69179
Buggy source:
@Override public void onRequestEnd(InstantReadBean data){
  if (data == null) {
    return;
  }
  mProgressBarWrapper.setVisibility(View.GONE);
  mTxtTopicTitle.setText(data.getTitle());
  mTxtSource.setText(getString(R.string.source_format,data.getSiteName()));
  String htmlHead="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String htmlContent="String_Node_Str" + htmlHead + "String_Node_Str"+ data.getContent()+ "String_Node_Str";
  mWebView.loadUrl("String_Node_Str");
}

Fixed version (ground truth):
@Override public void onRequestEnd(InstantReadBean data){
  mTxtTopicTitle.setText(data.getTitle());
  mTxtSource.setText(getString(R.string.source_format,data.getSiteName()));
  mTxtJump2Source.setOnClickListener(v -> {
    dismiss();
    ((SupportActivity)getContext()).findFragment(MainFragment.class).start(CommonWebViewFragment.newInstance(data.getUrl()));
  }
);
  String htmlHead="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String htmlContent="String_Node_Str" + htmlHead + "String_Node_Str"+ data.getContent()+ "String_Node_Str";
  mWebView.loadData(htmlContent,"String_Node_Str",null);
}
Program: 69180
Project: 69180
Buggy source:
public static void openInBrowser(@NonNull Activity context,@NonNull String url){
  String useableUrl=RegularUtil.matchWebSite(url);
  if (!TextUtils.isEmpty(useableUrl)) {
    new CustomTabsIntent.Builder().setToolbarColor(ResourceUtil.getThemeAttrColor(context,R.attr.readhubStatus)).build().launchUrl(context,Uri.parse(useableUrl));
  }
}

Fixed version (ground truth):
public static void openInBrowser(@NonNull Activity context,@NonNull String url){
  String validedUrl=RegularUtil.matchWebSite(url);
  if (!TextUtils.isEmpty(validedUrl)) {
    new CustomTabsIntent.Builder().setToolbarColor(ResourceUtil.getThemeAttrColor(context,R.attr.readhubStatus)).build().launchUrl(context,Uri.parse(validedUrl));
  }
}
Program: 69181
Project: 69181
Buggy source:
@Override public Observable<RelevantTopicBean> getRelateTopic(String topicId,int eventType,long order,long timeStamp){
  return mNetHelper.getRelateTopic(topicId,eventType,order,timeStamp);
}

Fixed version (ground truth):
@Override public Observable<List<RelevantTopicBean>> getRelateTopic(String topicId,int eventType,long order,long timeStamp){
  return mNetHelper.getRelateTopic(topicId,eventType,order,timeStamp);
}
Program: 69182
Project: 69182
Buggy source:
Observable<RelevantTopicBean> getRelateTopic(String topicId,int eventType,long order,long timeStamp);

Fixed version (ground truth):
Observable<List<RelevantTopicBean>> getRelateTopic(String topicId,int eventType,long order,long timeStamp);
Program: 69183
Project: 69183
Buggy source:
@Override public Observable<RelevantTopicBean> getRelateTopic(String topicId,int eventType,long order,long timeStamp){
  return readhubApi.getRelateTopic(topicId,eventType,order,timeStamp);
}

Fixed version (ground truth):
@Override public Observable<List<RelevantTopicBean>> getRelateTopic(String topicId,int eventType,long order,long timeStamp){
  return readhubApi.getRelateTopic(topicId,eventType,order,timeStamp);
}
Program: 69184
Project: 69184
Buggy source:
@GET("String_Node_Str") Observable<RelevantTopicBean> getRelateTopic(@Query("String_Node_Str") String topicId,@Query("String_Node_Str") int eventType,@Query("String_Node_Str") long order,@Query("String_Node_Str") long timeStamp);

Fixed version (ground truth):
@GET("String_Node_Str") Observable<List<RelevantTopicBean>> getRelateTopic(@Query("String_Node_Str") String topicId,@Query("String_Node_Str") int eventType,@Query("String_Node_Str") long order,@Query("String_Node_Str") long timeStamp);
Program: 69185
Project: 69185
Buggy source:
void inject(RelativePopupWindow relativePopupWindow);

Fixed version (ground truth):
void inject(RelevantTopicWindow relevantTopicWindow);
Program: 69186
Project: 69186
Buggy source:
@Override public int getItemViewType(int position){
  if (position == 0) {
    return VIEW_TYPE_TOP;
  }
  if (position == getItemCount() - 1) {
    return VIEW_TYPE_BOTTOM;
  }
  return super.getItemViewType(position);
}

Fixed version (ground truth):
@Override public int getItemViewType(int position){
  if (getItemCount() == 1) {
    return VIEW_TYPE_ONLY_ONE;
  }
  if (position == 0) {
    return VIEW_TYPE_TOP;
  }
  if (position == getItemCount() - 1) {
    return VIEW_TYPE_BOTTOM;
  }
  return super.getItemViewType(position);
}
Program: 69187
Project: 69187
Buggy source:
@Override public void bindData(RelevantTopicBean value,int position){
  mTopicTrace=value;
  LocalDate date=value.getCreatedAt().toLocalDate();
  int year=date.getYear();
  int month=date.getMonthValue();
  int day=date.getDayOfMonth();
  if (year == OffsetDateTime.now().getYear()) {
    mTxtDate.setText(mContext.getString(R.string.month__day,month,day));
  }
 else {
    SpannableString spannableTitle=SpannableString.valueOf(mContext.getString(R.string.month__day__year,month,day,year));
    spannableTitle.setSpan(new ForegroundColorSpan(Color.parseColor("String_Node_Str")),spannableTitle.toString().indexOf("String_Node_Str") + 1,spannableTitle.toString().indexOf("String_Node_Str") + 5,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    mTxtDate.setText(spannableTitle);
  }
  mTxtContent.setText(value.getTitle());
  mDividerTop.setVisibility(getItemViewType() == VIEW_TYPE_TOP ? View.INVISIBLE : View.VISIBLE);
  mDividerBottom.setVisibility(getItemViewType() == VIEW_TYPE_BOTTOM ? View.INVISIBLE : View.VISIBLE);
}

Fixed version (ground truth):
@Override public void bindData(RelevantTopicBean value,int position){
  mTopicTrace=value;
  LocalDate date=value.getCreatedAt().toLocalDate();
  int year=date.getYear();
  int month=date.getMonthValue();
  int day=date.getDayOfMonth();
  if (year == OffsetDateTime.now().getYear()) {
    mTxtDate.setText(mContext.getString(R.string.month__day,month,day));
  }
 else {
    SpannableString spannableTitle=SpannableString.valueOf(mContext.getString(R.string.month__day__year,month,day,year));
    spannableTitle.setSpan(new ForegroundColorSpan(Color.parseColor("String_Node_Str")),spannableTitle.toString().indexOf("String_Node_Str") + 1,spannableTitle.toString().indexOf("String_Node_Str") + 5,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    mTxtDate.setText(spannableTitle);
  }
  mTxtContent.setText(value.getTitle());
  mDividerTop.setVisibility(getItemViewType() == VIEW_TYPE_TOP || getItemViewType() == VIEW_TYPE_ONLY_ONE ? View.INVISIBLE : View.VISIBLE);
  mDividerBottom.setVisibility(getItemViewType() == VIEW_TYPE_BOTTOM || getItemViewType() == VIEW_TYPE_ONLY_ONE ? View.INVISIBLE : View.VISIBLE);
}
Program: 69188
Project: 69188
Buggy source:
@Override public boolean onTagClick(View view,int position,FlowLayout parent){
  String topicId=String.valueOf(entityEventTopics.get(position).getEntityId());
  long order=mTopic.getOrder();
  RelevantTopicWindow window=new RelevantTopicWindow(getActivity(),topicId,order);
  window.showOnAnchor(view,RelativePopupWindow.VerticalPosition.ABOVE,RelativePopupWindow.HorizontalPosition.CENTER,false);
  return true;
}

Fixed version (ground truth):
@Override public boolean onTagClick(View view,int position,FlowLayout parent){
  String topicId=String.valueOf(entityEventTopics.get(position).getEntityId());
  long order=mTopic.getOrder();
  RelevantTopicWindow window=new RelevantTopicWindow(getActivity(),topicId,order);
  window.showOnAnchor(view,RelativePopupWindow.VerticalPosition.ABOVE,RelativePopupWindow.HorizontalPosition.CENTER,true);
  return true;
}
Program: 69190
Project: 69190
Buggy source:
void onRequestTopicEnd(RelevantTopicBean bean);

Fixed version (ground truth):
void onRequestTopicEnd(List<RelevantTopicBean> bean);
Program: 69191
Project: 69191
Buggy source:
@Override public void getRelateTopic(String topicId,int eventType,long order,long timeStamp){
  addSubscribe(mDataManager.getRelateTopic(topicId,eventType,order,timeStamp).compose(RxSchedulers.io2Main()).doOnSubscribe(disposable -> getView().onRequestStart()).subscribeWith(new DisposableObserver<RelevantTopicBean>(){
    @Override public void onNext(    RelevantTopicBean bean){
      getView().onRequestTopicEnd(bean);
    }
    @Override public void onError(    Throwable e){
      getView().onRequestError();
    }
    @Override public void onComplete(){
    }
  }
));
}

Fixed version (ground truth):
@Override public void getRelateTopic(String topicId,int eventType,long order,long timeStamp){
  addSubscribe(mDataManager.getRelateTopic(topicId,eventType,order,timeStamp).compose(RxSchedulers.io2Main()).doOnSubscribe(disposable -> getView().onRequestStart()).subscribeWith(new DisposableObserver<List<RelevantTopicBean>>(){
    @Override public void onNext(    List<RelevantTopicBean> list){
      getView().onRequestTopicEnd(list);
    }
    @Override public void onError(    Throwable e){
      getView().onRequestError();
    }
    @Override public void onComplete(){
    }
  }
));
}
Program: 69192
Project: 69192
Buggy source:
@Override public void onNext(RelevantTopicBean bean){
  getView().onRequestTopicEnd(bean);
}

Fixed version (ground truth):
@Override public void onNext(List<RelevantTopicBean> list){
  getView().onRequestTopicEnd(list);
}
Program: 69193
Project: 69193
Buggy source:
private void initData(){
  try {
    mPresenter.getRelateTopic(mTopicId,1,mOrder,System.currentTimeMillis());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void initData(){
  mPresenter.getRelateTopic(mTopicId,1,mOrder,System.currentTimeMillis());
}
Program: 69194
Project: 69194
Buggy source:
@Override public void onRequestTopicEnd(RelevantTopicBean bean){
}

Fixed version (ground truth):
@Override public void onRequestTopicEnd(List<RelevantTopicBean> bean){
  mAdapter.addItems(bean);
}
Program: 69195
Project: 69195
Buggy source:
public RelevantTopicWindow(Context context,String topicId,long order){
  this.mTopicId=topicId;
  this.mOrder=order;
  View view=LayoutInflater.from(context).inflate(R.layout.layout_topic_trace,null);
  mRecyclerView=view.findViewById(R.id.recycler_topic_trace);
  setContentView(view);
  setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
  setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
  setFocusable(true);
  setOutsideTouchable(true);
  setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    setAnimationStyle(0);
  }
  performInject();
  initData();
}

Fixed version (ground truth):
public RelevantTopicWindow(Context context,String topicId,long order){
  mContext=context;
  this.mTopicId=topicId;
  this.mOrder=order;
  performInject();
  if (null != mPresenter) {
    mPresenter.onAttatch(this);
  }
  View view1=LayoutInflater.from(context).inflate(R.layout.test,null);
  setContentView(view1);
  setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
  setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
  setFocusable(true);
  setOutsideTouchable(true);
  setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    setAnimationStyle(0);
  }
}
Program: 69196
Project: 69196
Buggy source:
private void performInject(){
  DaggerPopupWindowComponent.builder().appComponent(ReadhubApplication.getAppComponent()).popupWindowModule(new PopupWindowModule(this)).build().inject(this);
}

Fixed version (ground truth):
private void performInject(){
  DaggerPopupWindowComponent.builder().appComponent(ReadhubApplication.getAppComponent()).build().inject(this);
}
Program: 69198
Project: 69198
Buggy source:
public ArrayList<TopicRelativeBean> getTopics(){
  return topics;
}

Fixed version (ground truth):
public ArrayList<RelateTopicBean> getTopics(){
  return topics;
}
Program: 69199
Project: 69199
Buggy source:
public void setTopics(ArrayList<TopicRelativeBean> topics){
  this.topics=topics;
}

Fixed version (ground truth):
public void setTopics(ArrayList<RelateTopicBean> topics){
  this.topics=topics;
}
Program: 69200
Project: 69200
Buggy source:
@Override public BaseViewHolder<TopicRelativeBean> onCreateViewHolder(ViewGroup parent,int viewType){
  return new TopicTraceViewHolder(getContext(),parent);
}

Fixed version (ground truth):
@Override public BaseViewHolder<RelateTopicBean> onCreateViewHolder(ViewGroup parent,int viewType){
  return new TopicTraceViewHolder(getContext(),parent);
}
Program: 69202
Project: 69202
Buggy source:
@Override public View getView(FlowLayout parent,int position,EntityEventTopicBean entityEventTopicBean){
  TextView item=(TextView)getLayoutInflater().inflate(R.layout.item_relative_topic,mRelativeTopic,false);
  item.setText(entityEventTopicBean.getEntityName() + entityEventTopicBean.getEventTypeLabel());
  return item;
}

Fixed version (ground truth):
@Override public View getView(FlowLayout parent,int position,EntityEventTopicBean entityEventTopicBean){
  TextView item=(TextView)getLayoutInflater().inflate(R.layout.item_relate_topic,mRelativeTopic,false);
  item.setText(entityEventTopicBean.getEntityName() + entityEventTopicBean.getEventTypeLabel());
  return item;
}
Program: 69203
Project: 69203
Buggy source:
@Override public void bindData(TopicRelativeBean value,int position){
  mTopicTrace=value;
  LocalDate date=value.getCreatedAt().toLocalDate();
  int year=date.getYear();
  int month=date.getMonthValue();
  int day=date.getDayOfMonth();
  if (year == OffsetDateTime.now().getYear()) {
    mTxtDate.setText(mContext.getString(R.string.month__day,month,day));
  }
 else {
    SpannableString spannableTitle=SpannableString.valueOf(mContext.getString(R.string.month__day__year,month,day,year));
    spannableTitle.setSpan(new ForegroundColorSpan(Color.parseColor("String_Node_Str")),5,9,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    mTxtDate.setText(spannableTitle);
  }
  mTxtContent.setText(value.getTitle());
  mDividerTop.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_TOP ? View.INVISIBLE : View.VISIBLE);
  mDividerBottom.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_BOTTOM ? View.INVISIBLE : View.VISIBLE);
}

Fixed version (ground truth):
@Override public void bindData(RelateTopicBean value,int position){
  mTopicTrace=value;
  LocalDate date=value.getCreatedAt().toLocalDate();
  int year=date.getYear();
  int month=date.getMonthValue();
  int day=date.getDayOfMonth();
  if (year == OffsetDateTime.now().getYear()) {
    mTxtDate.setText(mContext.getString(R.string.month__day,month,day));
  }
 else {
    SpannableString spannableTitle=SpannableString.valueOf(mContext.getString(R.string.month__day__year,month,day,year));
    spannableTitle.setSpan(new ForegroundColorSpan(Color.parseColor("String_Node_Str")),5,9,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    mTxtDate.setText(spannableTitle);
  }
  mTxtContent.setText(value.getTitle());
  mDividerTop.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_TOP ? View.INVISIBLE : View.VISIBLE);
  mDividerBottom.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_BOTTOM ? View.INVISIBLE : View.VISIBLE);
}
Program: 69204
Project: 69204
Buggy source:
public ViewHolder(Context context,ViewGroup parent){
  super(context,parent,R.layout.item_topic_trace);
  this.mContext=context;
}

Fixed version (ground truth):
public ViewHolder(Context context,ViewGroup parent){
  super(context,parent,R.layout.item_topic_timeline);
  this.mContext=context;
}
Program: 69205
Project: 69205
Buggy source:
@NonNull @Override public TopicViewHolder onCreateViewHolder(@NonNull ViewGroup parent,int viewType){
  return new TopicViewHolder(inflater.inflate(R.layout.item_topic,parent,false));
}

Fixed version (ground truth):
@NonNull @Override public BaseViewHolder<TopicBean> onCreateViewHolder(@NonNull ViewGroup parent,int viewType){
  return new TopicViewHolder(activity,parent);
}
Program: 69206
Project: 69206
Buggy source:
TopicViewHolder(@NonNull View itemView){
  super(itemView);
  ButterKnife.bind(this,itemView);
}

Fixed version (ground truth):
TopicViewHolder(Context context,ViewGroup parent){
  super(context,parent,R.layout.item_topic_trace);
}
Program: 69207
Project: 69207
Buggy source:
NewsViewHolder(@NonNull View itemView){
  ButterKnife.bind(this,itemView);
}

Fixed version (ground truth):
NewsViewHolder(Context context,ViewGroup parent){
  super(context,parent,R.layout.item_topic_news);
}
Program: 69208
Project: 69208
Buggy source:
public TopicTraceViewHolder(Context context,ViewGroup parent){
  super(context,parent,R.layout.item_topic_trace);
}

Fixed version (ground truth):
public TopicTraceViewHolder(Context context,ViewGroup parent){
  super(context,parent,R.layout.item_topic_trace);
  this.mContext=context;
}
Program: 69209
Project: 69209
Buggy source:
@Override public void bindData(TopicRelativeBean value){
  mTopicTrace=value;
  mTxtDate.setText(value.getCreatedAt().toLocalDate().toString());
  mTxtContent.setText(value.getTitle());
  mDividerTop.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_TOP ? View.INVISIBLE : View.VISIBLE);
  mDividerBottom.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_BOTTOM ? View.INVISIBLE : View.VISIBLE);
}

Fixed version (ground truth):
@Override public void bindData(TopicRelativeBean value){
  mTopicTrace=value;
  LocalDate date=value.getCreatedAt().toLocalDate();
  int year=date.getYear();
  int month=date.getMonthValue();
  int day=date.getDayOfMonth();
  if (year == OffsetDateTime.now().getYear()) {
    mTxtDate.setText(mContext.getString(R.string.month__day,month,day));
  }
 else {
    SpannableString spannableTitle=SpannableString.valueOf(mContext.getString(R.string.month__day__year,month,day,year));
    spannableTitle.setSpan(new ForegroundColorSpan(Color.parseColor("String_Node_Str")),5,9,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    mTxtDate.setText(spannableTitle);
  }
  mTxtContent.setText(value.getTitle());
  mDividerTop.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_TOP ? View.INVISIBLE : View.VISIBLE);
  mDividerBottom.setVisibility(getItemViewType() == TopicDetailFragment.VIEW_TYPE_BOTTOM ? View.INVISIBLE : View.VISIBLE);
}
Program: 69212
Project: 69212
Buggy source:
public abstract String getFullName();

Fixed version (ground truth):
public abstract String getFullName(String filename);
Program: 69213
Project: 69213
Buggy source:
public abstract boolean isClone();

Fixed version (ground truth):
public boolean isClone(){
  return (parent != null && !getParent().isBios());
}
Program: 69214
Project: 69214
Buggy source:
@Override public String getFullName(){
  return name;
}

Fixed version (ground truth):
@Override public String getFullName(String filename){
  return filename;
}
Program: 69215
Project: 69215
Buggy source:
@Override public String getName(){
  if (Machine.merge_mode.isMerge()) {
    if (merge == null) {
      if (isCollisionMode() && parent.isClone())       return parent.name + "String_Node_Str" + name;
    }
 else     return merge;
  }
  return name;
}

Fixed version (ground truth):
@Override public String getName(){
  if (Machine.merge_mode.isMerge()) {
    if (merge == null) {
      if (isCollisionMode() && parent.isClone()) {
        return parent.name + "String_Node_Str" + name;
      }
    }
 else     return merge;
  }
  return name;
}
Program: 69216
Project: 69216
Buggy source:
@Override public String getFullName(){
  return list.name + "String_Node_Str" + name;
}

Fixed version (ground truth):
@Override public String getFullName(String filename){
  return list.name + File.separator + filename;
}
Program: 69219
Project: 69219
Buggy source:
@Override public int add_stdin(InputStream src,String entry) throws IOException {
  if (readonly)   return -1;
  FileUtils.copyInputStreamToFile(src,new File(getTempDir(),entry));
  to_add.add(entry);
  return 0;
}

Fixed version (ground truth):
@Override public int add_stdin(InputStream src,String entry) throws IOException {
  if (readonly)   return -1;
  System.out.println("String_Node_Str" + new File(getTempDir(),entry));
  FileUtils.copyInputStreamToFile(src,new File(getTempDir(),entry));
  to_add.add(entry);
  return 0;
}
Program: 69222
Project: 69222
Buggy source:
public static Profile load(File file,ProgressHandler handler){
  File cachefile=getCacheFile(file);
  if (cachefile.lastModified() >= file.lastModified()) {
    handler.setProgress("String_Node_Str",-1);
    try (ObjectInputStream ois=new ObjectInputStream(new BufferedInputStream(new FileInputStream(cachefile)))){
      Profile profile=(Profile)ois.readObject();
      profile.loadSettings();
      return profile;
    }
 catch (    Throwable e) {
    }
  }
  Profile profile=new Profile();
  if (profile._load(file,handler)) {
    profile.loadSettings();
    return profile;
  }
  return null;
}

Fixed version (ground truth):
public static Profile load(File file,ProgressHandler handler){
  File cachefile=getCacheFile(file);
  if (cachefile.lastModified() >= file.lastModified() && !Settings.getProperty("String_Node_Str",false)) {
    handler.setProgress("String_Node_Str",-1);
    try (ObjectInputStream ois=new ObjectInputStream(new BufferedInputStream(new FileInputStream(cachefile)))){
      Profile profile=(Profile)ois.readObject();
      profile.loadSettings();
      return profile;
    }
 catch (    Throwable e) {
    }
  }
  Profile profile=new Profile();
  if (profile._load(file,handler)) {
    profile.loadSettings();
    return profile;
  }
  return null;
}
Program: 69223
Project: 69223
Buggy source:
private CanalConnector processInstanceEntry(Map.Entry<String,CanalConfig.Instance> instanceEntry){
  CanalConfig.Instance instance=instanceEntry.getValue();
  CanalConnector connector=CanalConnectors.newSingleConnector(new InetSocketAddress(instance.getHost(),instance.getPort()),instanceEntry.getKey(),instance.getUserName(),instance.getPassword());
  connector.connect();
  if (!StringUtils.isEmpty(instance.getFilter())) {
    connector.subscribe(instance.getFilter());
  }
  connector.rollback();
  return connector;
}

Fixed version (ground truth):
private CanalConnector processInstanceEntry(Map.Entry<String,CanalConfig.Instance> instanceEntry){
  CanalConfig.Instance instance=instanceEntry.getValue();
  CanalConnector connector=CanalConnectors.newSingleConnector(new InetSocketAddress(instance.getHost(),instance.getPort()),instanceEntry.getKey(),instance.getUserName(),instance.getPassword());
  connector.connect();
  if (!StringUtils.isEmpty(instance.getFilter())) {
    connector.subscribe(instance.getFilter());
  }
 else {
    connector.subscribe();
  }
  connector.rollback();
  return connector;
}
Program: 69224
Project: 69224
Buggy source:
@Override public void onError(Throwable e){
  e.printStackTrace();
  Toast.makeText(getContext(),R.string.error_mnemonics,Toast.LENGTH_LONG).show();
  customProgressDialog.cancel();
  etMnemonic.requestFocus();
  btnImportAccount.setEnabled(true);
}

Fixed version (ground truth):
@Override public void onError(Throwable e){
  e.printStackTrace();
  AlertDialog dialogTip=new AlertDialog.Builder(getContext()).setMessage(R.string.error_mnemonics).setNegativeButton(R.string.cancel,(dialog,which) -> dialog.cancel()).create();
  dialogTip.show();
  customProgressDialog.cancel();
  etMnemonic.requestFocus();
  btnImportAccount.setEnabled(true);
}
Program: 69227
Project: 69227
Buggy source:
public Flux<ResolvedTarget> resolveSingleTarget(Target configTarget){
  if (configTarget.getApplicationName() != null) {
    ResolvedTarget rt=new ResolvedTarget(configTarget);
    return Flux.just(rt);
  }
  Mono<String> orgIdMono=this.cfAccessor.retrieveOrgId(configTarget.getOrgName()).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Mono<String> spaceIdMono=orgIdMono.flatMap(orgId -> {
    return this.cfAccessor.retrieveSpaceId(orgId,configTarget.getSpaceName());
  }
).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Flux<String> applicationNamesFlux=selectApplications(configTarget,orgIdMono,spaceIdMono);
  Flux<ResolvedTarget> result=applicationNamesFlux.map(appName -> {
    ResolvedTarget newTarget=new ResolvedTarget(configTarget);
    newTarget.setApplicationName(appName);
    return newTarget;
  }
);
  return result;
}

Fixed version (ground truth):
public Flux<ResolvedTarget> resolveSingleTarget(Target configTarget){
  if (configTarget.getApplicationName() != null) {
    ResolvedTarget rt=new ResolvedTarget(configTarget);
    return Flux.just(rt);
  }
  Mono<String> orgIdMono=this.cfAccessor.retrieveOrgId(configTarget.getOrgName()).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Mono<String> spaceIdMono=orgIdMono.flatMap(orgId -> {
    return this.cfAccessor.retrieveSpaceId(orgId,configTarget.getSpaceName());
  }
).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Flux<String> applicationNamesFlux=selectApplications(configTarget,orgIdMono,spaceIdMono).doOnError(e -> {
    log.warn(String.format("String_Node_Str",configTarget.getOrgName(),configTarget.getSpaceName()),e);
  }
).onErrorResume(__ -> Flux.empty());
  Flux<ResolvedTarget> result=applicationNamesFlux.map(appName -> {
    ResolvedTarget newTarget=new ResolvedTarget(configTarget);
    newTarget.setApplicationName(appName);
    return newTarget;
  }
);
  return result;
}
Program: 69229
Project: 69229
Buggy source:
@Override public Mono<GetRouteResponse> retrieveRoute(String routeId){
  RouteEntity entity=null;
  if (routeId.startsWith(APP_ROUTE_UUID_PREFIX)) {
    String appNumber=routeId.substring(APP_ROUTE_UUID_PREFIX.length());
    entity=RouteEntity.builder().domainId(SHARED_DOMAIN_UUID).host(APP_HOST_PREFIX + appNumber).build();
  }
  if (entity == null) {
    log.error("String_Node_Str");
    return null;
  }
  GetRouteResponse resp=GetRouteResponse.builder().entity(entity).build();
  return Mono.just(resp);
}

Fixed version (ground truth):
@Override public Mono<GetRouteResponse> retrieveRoute(String routeId){
  RouteEntity entity=null;
  if (routeId.startsWith(APP_ROUTE_UUID_PREFIX)) {
    String appNumber=routeId.substring(APP_ROUTE_UUID_PREFIX.length());
    entity=RouteEntity.builder().domainId(SHARED_DOMAIN_UUID).host(APP_HOST_PREFIX + appNumber).build();
  }
  if (entity == null) {
    log.error("String_Node_Str");
    return null;
  }
  GetRouteResponse resp=GetRouteResponse.builder().entity(entity).build();
  return Mono.just(resp).delayElement(this.getSleepRandomDuration());
}
Program: 69230
Project: 69230
Buggy source:
@Override public Mono<ListApplicationsResponse> retrieveAllApplicationIdsInSpace(String orgId,String spaceId){
  if (orgId.equals(ORG_UUID) && spaceId.equals(SPACE_UUID)) {
    List<ApplicationResource> list=new LinkedList<>();
    for (int i=0; i < 100; i++) {
      ApplicationResource ar=null;
      ar=ApplicationResource.builder().entity(ApplicationEntity.builder().name("String_Node_Str" + i).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(APP_UUID_PREFIX + i).build()).build();
      list.add(ar);
    }
    ListApplicationsResponse resp=ListApplicationsResponse.builder().addAllResources(list).build();
    return Mono.just(resp);
  }
  log.error("String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override public Mono<ListApplicationsResponse> retrieveAllApplicationIdsInSpace(String orgId,String spaceId){
  if (orgId.equals(ORG_UUID) && spaceId.equals(SPACE_UUID)) {
    List<ApplicationResource> list=new LinkedList<>();
    for (int i=0; i < 100; i++) {
      ApplicationResource ar=null;
      ar=ApplicationResource.builder().entity(ApplicationEntity.builder().name("String_Node_Str" + i).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(APP_UUID_PREFIX + i).build()).build();
      list.add(ar);
    }
    ListApplicationsResponse resp=ListApplicationsResponse.builder().addAllResources(list).build();
    return Mono.just(resp).delayElement(this.getSleepRandomDuration());
  }
  log.error("String_Node_Str");
  return null;
}
Program: 69231
Project: 69231
Buggy source:
@Override public Mono<GetSharedDomainResponse> retrieveSharedDomain(String domainId){
  if (domainId.equals(SHARED_DOMAIN_UUID)) {
    SharedDomainEntity entity=SharedDomainEntity.builder().name(SHARED_DOMAIN).build();
    GetSharedDomainResponse resp=GetSharedDomainResponse.builder().entity(entity).build();
    return Mono.just(resp);
  }
  log.error("String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override public Mono<GetSharedDomainResponse> retrieveSharedDomain(String domainId){
  if (domainId.equals(SHARED_DOMAIN_UUID)) {
    SharedDomainEntity entity=SharedDomainEntity.builder().name(SHARED_DOMAIN).build();
    GetSharedDomainResponse resp=GetSharedDomainResponse.builder().entity(entity).build();
    return Mono.just(resp).delayElement(this.getSleepRandomDuration());
  }
  log.error("String_Node_Str");
  return null;
}
Program: 69232
Project: 69232
Buggy source:
@Override public Mono<ListOrganizationsResponse> retrieveOrgId(String orgName){
  if ("String_Node_Str".equals(orgName)) {
    OrganizationResource or=OrganizationResource.builder().entity(OrganizationEntity.builder().name(orgName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(ORG_UUID).build()).build();
    List<OrganizationResource> list=new LinkedList<>();
    list.add(or);
    ListOrganizationsResponse resp=ListOrganizationsResponse.builder().addAllResources(list).build();
    return Mono.just(resp);
  }
  log.error("String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override public Mono<ListOrganizationsResponse> retrieveOrgId(String orgName){
  if ("String_Node_Str".equals(orgName)) {
    OrganizationResource or=OrganizationResource.builder().entity(OrganizationEntity.builder().name(orgName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(ORG_UUID).build()).build();
    List<OrganizationResource> list=new LinkedList<>();
    list.add(or);
    ListOrganizationsResponse resp=ListOrganizationsResponse.builder().addAllResources(list).build();
    return Mono.just(resp).delayElement(this.getSleepRandomDuration());
  }
  log.error("String_Node_Str");
  return null;
}
Program: 69233
Project: 69233
Buggy source:
@Override public Mono<ListSpacesResponse> retrieveSpaceId(String orgId,String spaceName){
  if ("String_Node_Str".equals(spaceName) && orgId.equals(ORG_UUID)) {
    SpaceResource sr=SpaceResource.builder().entity(SpaceEntity.builder().name(spaceName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(SPACE_UUID).build()).build();
    List<SpaceResource> list=new LinkedList<>();
    list.add(sr);
    ListSpacesResponse resp=ListSpacesResponse.builder().addAllResources(list).build();
    return Mono.just(resp);
  }
  log.error("String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override public Mono<ListSpacesResponse> retrieveSpaceId(String orgId,String spaceName){
  if ("String_Node_Str".equals(spaceName) && orgId.equals(ORG_UUID)) {
    SpaceResource sr=SpaceResource.builder().entity(SpaceEntity.builder().name(spaceName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(SPACE_UUID).build()).build();
    List<SpaceResource> list=new LinkedList<>();
    list.add(sr);
    ListSpacesResponse resp=ListSpacesResponse.builder().addAllResources(list).build();
    return Mono.just(resp).delayElement(this.getSleepRandomDuration());
  }
  log.error("String_Node_Str");
  return null;
}
Program: 69234
Project: 69234
Buggy source:
@Override public Mono<ListRouteMappingsResponse> retrieveRouteMapping(String appId){
  RouteMappingEntity entity=null;
  if (appId.startsWith(APP_UUID_PREFIX)) {
    String appNumber=appId.substring(APP_UUID_PREFIX.length());
    entity=RouteMappingEntity.builder().applicationId(appId).routeId(APP_ROUTE_UUID_PREFIX + appNumber).build();
  }
  if (entity == null) {
    log.error("String_Node_Str");
    return null;
  }
  RouteMappingResource rmr=null;
  rmr=RouteMappingResource.builder().entity(entity).build();
  List<RouteMappingResource> list=new LinkedList<>();
  list.add(rmr);
  ListRouteMappingsResponse resp=ListRouteMappingsResponse.builder().addAllResources(list).build();
  return Mono.just(resp);
}

Fixed version (ground truth):
@Override public Mono<ListRouteMappingsResponse> retrieveRouteMapping(String appId){
  RouteMappingEntity entity=null;
  if (appId.startsWith(APP_UUID_PREFIX)) {
    String appNumber=appId.substring(APP_UUID_PREFIX.length());
    entity=RouteMappingEntity.builder().applicationId(appId).routeId(APP_ROUTE_UUID_PREFIX + appNumber).build();
  }
  if (entity == null) {
    log.error("String_Node_Str");
    return null;
  }
  RouteMappingResource rmr=null;
  rmr=RouteMappingResource.builder().entity(entity).build();
  List<RouteMappingResource> list=new LinkedList<>();
  list.add(rmr);
  ListRouteMappingsResponse resp=ListRouteMappingsResponse.builder().addAllResources(list).build();
  return Mono.just(resp).delayElement(this.getSleepRandomDuration());
}
Program: 69235
Project: 69235
Buggy source:
@Override public Mono<ListApplicationsResponse> retrieveApplicationId(String orgId,String spaceId,String applicationName){
  if (orgId.equals(ORG_UUID) && spaceId.equals(SPACE_UUID)) {
    ApplicationResource ar=null;
    if (applicationName.startsWith("String_Node_Str")) {
      String appNumber=applicationName.substring(7);
      ar=ApplicationResource.builder().entity(ApplicationEntity.builder().name(applicationName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(APP_UUID_PREFIX + appNumber).build()).build();
    }
 else {
      log.error("String_Node_Str");
    }
    List<ApplicationResource> list=new LinkedList<>();
    list.add(ar);
    ListApplicationsResponse resp=ListApplicationsResponse.builder().addAllResources(list).build();
    return Mono.just(resp);
  }
  log.error("String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override public Mono<ListApplicationsResponse> retrieveApplicationId(String orgId,String spaceId,String applicationName){
  if (orgId.equals(ORG_UUID) && spaceId.equals(SPACE_UUID)) {
    ApplicationResource ar=null;
    if (applicationName.startsWith("String_Node_Str")) {
      String appNumber=applicationName.substring(7);
      ar=ApplicationResource.builder().entity(ApplicationEntity.builder().name(applicationName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(APP_UUID_PREFIX + appNumber).build()).build();
    }
 else {
      log.error("String_Node_Str");
    }
    List<ApplicationResource> list=new LinkedList<>();
    list.add(ar);
    ListApplicationsResponse resp=ListApplicationsResponse.builder().addAllResources(list).build();
    return Mono.just(resp).delayElement(this.getSleepRandomDuration());
  }
  log.error("String_Node_Str");
  return null;
}
Program: 69236
Project: 69236
Buggy source:
@Override public Mono<ListProcessesResponse> retrieveProcesses(String orgId,String spaceId,String appId){
  if (orgId.equals(ORG_UUID) && spaceId.equals(SPACE_UUID)) {
    List<ProcessResource> list=new LinkedList<>();
    Data data=Data.builder().timeout(100).build();
    HealthCheck hc=HealthCheck.builder().type(HealthCheckType.HTTP).data(data).build();
    Builder builder=ProcessResource.builder().type("String_Node_Str").command("String_Node_Str").memoryInMb(1024).diskInMb(1024).healthCheck(hc).createdAt(CREATED_AT_TIMESTAMP).updatedAt(UPDATED_AT_TIMESTAMP);
    ProcessResource ar=null;
    if (appId.startsWith(APP_UUID_PREFIX)) {
      ar=builder.instances(this.amountInstances).id(appId).build();
    }
    if (ar == null) {
      log.error("String_Node_Str");
      return null;
    }
    list.add(ar);
    ListProcessesResponse resp=ListProcessesResponse.builder().addAllResources(list).build();
    return Mono.just(resp);
  }
  log.error("String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override public Mono<ListProcessesResponse> retrieveProcesses(String orgId,String spaceId,String appId){
  if (orgId.equals(ORG_UUID) && spaceId.equals(SPACE_UUID)) {
    List<ProcessResource> list=new LinkedList<>();
    Data data=Data.builder().timeout(100).build();
    HealthCheck hc=HealthCheck.builder().type(HealthCheckType.HTTP).data(data).build();
    Builder builder=ProcessResource.builder().type("String_Node_Str").command("String_Node_Str").memoryInMb(1024).diskInMb(1024).healthCheck(hc).createdAt(CREATED_AT_TIMESTAMP).updatedAt(UPDATED_AT_TIMESTAMP);
    ProcessResource ar=null;
    if (appId.startsWith(APP_UUID_PREFIX)) {
      ar=builder.instances(this.amountInstances).id(appId).build();
    }
    if (ar == null) {
      log.error("String_Node_Str");
      return null;
    }
    list.add(ar);
    ListProcessesResponse resp=ListProcessesResponse.builder().addAllResources(list).build();
    return Mono.just(resp).delayElement(this.getSleepRandomDuration());
  }
  log.error("String_Node_Str");
  return null;
}
Program: 69237
Project: 69237
Buggy source:
@Override public HashMap<String,MetricFamilySamples> call() throws Exception {
  Timer timer=null;
  if (this.mfm.getLatencyRequest() != null) {
    timer=this.mfm.getLatencyRequest().startTimer();
  }
  HttpGet httpget=new HttpGet(this.accessURL);
  this.ae.enrichWithAuthentication(httpget);
  String result=SIM_TEXT004;
  TextFormat004Parser parser=new TextFormat004Parser(result);
  HashMap<String,MetricFamilySamples> emfs=parser.parse();
  emfs=this.mfse.determineEnumerationOfMetricFamilySamples(emfs);
  int latency=this.randomLatency.nextInt(300);
  Thread.sleep(latency);
  this.up.set(1);
  if (timer != null) {
    timer.observeDuration();
  }
  return emfs;
}

Fixed version (ground truth):
@Override public HashMap<String,MetricFamilySamples> call() throws Exception {
  Timer timer=null;
  if (this.mfm.getLatencyRequest() != null) {
    timer=this.mfm.getLatencyRequest().startTimer();
  }
  HttpGet httpget=new HttpGet(this.accessURL);
  this.ae.enrichWithAuthentication(httpget);
  String result=SIM_TEXT004;
  TextFormat004Parser parser=new TextFormat004Parser(result);
  HashMap<String,MetricFamilySamples> emfs=parser.parse();
  emfs=this.mfse.determineEnumerationOfMetricFamilySamples(emfs);
  int latency=this.randomLatency.nextInt(300);
  log.info(String.format("String_Node_Str",this.accessURL,latency));
  Thread.sleep(latency);
  this.up.set(1);
  if (timer != null) {
    timer.observeDuration();
  }
  return emfs;
}
Program: 69239
Project: 69239
Buggy source:
@Override public List<ResolvedTarget> resolveTargets(List<Target> configTargets){
  Flux<ResolvedTarget> resultFlux=Flux.fromIterable(configTargets).flatMap(configTarget -> this.resolveSingleTarget(configTarget));
  return resultFlux.collectList().block();
}

Fixed version (ground truth):
@Override public List<ResolvedTarget> resolveTargets(List<Target> configTargets){
  Flux<ResolvedTarget> resultFlux=Flux.fromIterable(configTargets).flatMapSequential(configTarget -> this.resolveSingleTarget(configTarget));
  return resultFlux.collectList().block();
}
Program: 69241
Project: 69241
Buggy source:
public Flux<ResolvedTarget> resolveSingleTarget(Target configTarget){
  if (configTarget.getApplicationName() != null) {
    ResolvedTarget rt=new ResolvedTarget(configTarget);
    return Flux.just(rt);
  }
  Mono<String> orgIdMono=this.cfAccessor.retrieveOrgId(configTarget.getOrgName()).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Mono<String> spaceIdMono=orgIdMono.flatMap(orgId -> {
    return this.cfAccessor.retrieveSpaceId(orgId,configTarget.getSpaceName());
  }
).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Mono<ListApplicationsResponse> responseMono=Mono.zip(orgIdMono,spaceIdMono).flatMap(tuple -> this.cfAccessor.retrieveAllApplicationIdsInSpace(tuple.getT1(),tuple.getT2()));
  Flux<String> applicationsInSpace=responseMono.map(r -> r.getResources()).flatMapMany(resources -> {
    List<String> appNames=new LinkedList<>();
    for (    ApplicationResource ar : resources) {
      if (!isApplicationInScrapableState(ar.getEntity().getState())) {
        continue;
      }
      appNames.add(ar.getEntity().getName());
    }
    return Flux.fromIterable(appNames);
  }
);
  Flux<String> filteredApplicationsInSpace=applicationsInSpace;
  if (configTarget.getApplicationRegex() != null) {
    final Pattern filterPattern=Pattern.compile(configTarget.getApplicationRegex());
    filteredApplicationsInSpace=applicationsInSpace.filter(appName -> {
      Matcher m=filterPattern.matcher(appName);
      return m.matches();
    }
);
  }
  Flux<ResolvedTarget> result=filteredApplicationsInSpace.map(appName -> {
    ResolvedTarget newTarget=new ResolvedTarget(configTarget);
    newTarget.setApplicationName(appName);
    return newTarget;
  }
);
  return result;
}

Fixed version (ground truth):
public Flux<ResolvedTarget> resolveSingleTarget(Target configTarget){
  if (configTarget.getApplicationName() != null) {
    ResolvedTarget rt=new ResolvedTarget(configTarget);
    return Flux.just(rt);
  }
  Mono<String> orgIdMono=this.cfAccessor.retrieveOrgId(configTarget.getOrgName()).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Mono<String> spaceIdMono=orgIdMono.flatMap(orgId -> {
    return this.cfAccessor.retrieveSpaceId(orgId,configTarget.getSpaceName());
  }
).map(r -> r.getResources()).map(l -> l.get(0)).map(e -> e.getMetadata()).map(entry -> entry.getId());
  Flux<String> applicationNamesFlux=selectApplications(configTarget,orgIdMono,spaceIdMono);
  Flux<ResolvedTarget> result=applicationNamesFlux.map(appName -> {
    ResolvedTarget newTarget=new ResolvedTarget(configTarget);
    newTarget.setApplicationName(appName);
    return newTarget;
  }
);
  return result;
}
Program: 69242
Project: 69242
Buggy source:
@Bean public CFAccessor cfAccessor(){
  return new CFAccessorMock();
}

Fixed version (ground truth):
@Bean public CFAccessor cfAccessor(){
  return Mockito.spy(new CFAccessorMock());
}
Program: 69243
Project: 69243
Buggy source:
@Test public void testFullyResolvedAlready(){
  List<Target> list=new LinkedList<>();
  Target t=new Target();
  t.setOrgName("String_Node_Str");
  t.setSpaceName("String_Node_Str");
  t.setApplicationName("String_Node_Str");
  t.setPath("String_Node_Str");
  t.setProtocol("String_Node_Str");
  list.add(t);
  List<ResolvedTarget> actualList=this.targetResolver.resolveTargets(list);
  Assert.assertEquals(1,actualList.size());
  ResolvedTarget rt=actualList.get(0);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals(t.getApplicationName(),rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
}

Fixed version (ground truth):
@Test public void testFullyResolvedAlready(){
  List<Target> list=new LinkedList<>();
  Target t=new Target();
  t.setOrgName("String_Node_Str");
  t.setSpaceName("String_Node_Str");
  t.setApplicationName("String_Node_Str");
  t.setPath("String_Node_Str");
  t.setProtocol("String_Node_Str");
  list.add(t);
  List<ResolvedTarget> actualList=this.targetResolver.resolveTargets(list);
  Assert.assertEquals(1,actualList.size());
  ResolvedTarget rt=actualList.get(0);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals(t.getApplicationName(),rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
  Mockito.verify(this.cfAccessor,Mockito.times(0)).retrieveAllApplicationIdsInSpace(CFAccessorMock.UNITTEST_ORG_UUID,CFAccessorMock.UNITTEST_SPACE_UUID);
  Mockito.verify(this.cfAccessor,Mockito.times(0)).retrieveApplicationId(CFAccessorMock.UNITTEST_ORG_UUID,CFAccessorMock.UNITTEST_SPACE_UUID,"String_Node_Str");
}
Program: 69244
Project: 69244
Buggy source:
@Test public void testMissingApplicationName(){
  List<Target> list=new LinkedList<>();
  Target t=new Target();
  t.setOrgName("String_Node_Str");
  t.setSpaceName("String_Node_Str");
  t.setPath("String_Node_Str");
  t.setProtocol("String_Node_Str");
  list.add(t);
  List<ResolvedTarget> actualList=this.targetResolver.resolveTargets(list);
  Assert.assertEquals(2,actualList.size());
  ResolvedTarget rt=actualList.get(0);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals("String_Node_Str",rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
  rt=actualList.get(1);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals("String_Node_Str",rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
}

Fixed version (ground truth):
@Test public void testMissingApplicationName(){
  List<Target> list=new LinkedList<>();
  Target t=new Target();
  t.setOrgName("String_Node_Str");
  t.setSpaceName("String_Node_Str");
  t.setPath("String_Node_Str");
  t.setProtocol("String_Node_Str");
  list.add(t);
  List<ResolvedTarget> actualList=this.targetResolver.resolveTargets(list);
  Assert.assertEquals(2,actualList.size());
  ResolvedTarget rt=actualList.get(0);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals("String_Node_Str",rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
  rt=actualList.get(1);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals("String_Node_Str",rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
  Mockito.verify(this.cfAccessor,Mockito.times(1)).retrieveAllApplicationIdsInSpace(CFAccessorMock.UNITTEST_ORG_UUID,CFAccessorMock.UNITTEST_SPACE_UUID);
}
Program: 69245
Project: 69245
Buggy source:
@Test public void testWithApplicationRegex(){
  List<Target> list=new LinkedList<>();
  Target t=new Target();
  t.setOrgName("String_Node_Str");
  t.setSpaceName("String_Node_Str");
  t.setApplicationRegex("String_Node_Str");
  t.setPath("String_Node_Str");
  t.setProtocol("String_Node_Str");
  list.add(t);
  List<ResolvedTarget> actualList=this.targetResolver.resolveTargets(list);
  Assert.assertEquals(1,actualList.size());
  ResolvedTarget rt=actualList.get(0);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals("String_Node_Str",rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
}

Fixed version (ground truth):
@Test public void testWithApplicationRegex(){
  List<Target> list=new LinkedList<>();
  Target t=new Target();
  t.setOrgName("String_Node_Str");
  t.setSpaceName("String_Node_Str");
  t.setApplicationRegex("String_Node_Str");
  t.setPath("String_Node_Str");
  t.setProtocol("String_Node_Str");
  list.add(t);
  List<ResolvedTarget> actualList=this.targetResolver.resolveTargets(list);
  Assert.assertEquals(1,actualList.size());
  ResolvedTarget rt=actualList.get(0);
  Assert.assertEquals(t,rt.getOriginalTarget());
  Assert.assertEquals(t.getOrgName(),rt.getOrgName());
  Assert.assertEquals(t.getSpaceName(),rt.getSpaceName());
  Assert.assertEquals("String_Node_Str",rt.getApplicationName());
  Assert.assertEquals(t.getPath(),rt.getPath());
  Assert.assertEquals(t.getProtocol(),rt.getProtocol());
  Mockito.verify(this.cfAccessor,Mockito.times(1)).retrieveAllApplicationIdsInSpace(CFAccessorMock.UNITTEST_ORG_UUID,CFAccessorMock.UNITTEST_SPACE_UUID);
}