nus-yam/ex-repair huggingface dataset:
Program: 174400
Project: 174400
Buggy source:
@Override protected void init(){
  super.init();
  extractDataFromBundle();
  adapter=new GiftListAdapter(context,gifts);
  mRecyclerView.setAdapter(adapter);
  linearLayoutManager=new LinearLayoutManager(context);
  mRecyclerView.setLayoutManager(linearLayoutManager);
  Drawable myIcon=getResources().getDrawable(R.mipmap.ic_backspace_black_24dp);
  myIcon.setColorFilter(getResources().getColor(R.color.dark_white),PorterDuff.Mode.SRC_ATOP);
  mSearchBackspaceBtn.setImageDrawable(myIcon);
  getGifts();
}

Fixed version (ground truth):
@Override protected void init(){
  super.init();
  extractDataFromBundle();
  adapter=new GiftListAdapter(context,gifts);
  mRecyclerView.setAdapter(adapter);
  linearLayoutManager=new LinearLayoutManager(context);
  mRecyclerView.setLayoutManager(linearLayoutManager);
  setBackspaceSearchtxtIcon();
  getGifts();
}
Program: 174401
Project: 174401
Buggy source:
@Override public void afterTextChanged(Editable s){
  if (s.length() > 0) {
    mSearchBackspaceBtn.setVisibility(View.VISIBLE);
  }
}

Fixed version (ground truth):
@Override public void afterTextChanged(Editable s){
  if (s.length() > 0) {
    mSearchBackspaceBtn.setVisibility(View.VISIBLE);
  }
 else {
    mSearchBackspaceBtn.setVisibility(View.INVISIBLE);
  }
}
Program: 174402
Project: 174402
Buggy source:
@Override public void onBindViewHolder(ItemHolder myHolder,final int i){
  String image_url;
  if (gifts.get(i).giftImages != null && gifts.get(i).giftImages.size() > 0) {
    image_url=gifts.get(i).giftImages.get(0);
  }
 else {
    image_url="String_Node_Str";
  }
  Glide.with(mContext).load(image_url).centerCrop().placeholder(R.color.background).crossFade().into(myHolder.getmItemIv());
  myHolder.getGiftTitleTv().setText(gifts.get(i).title);
  myHolder.getGiftLocationTv().setText(gifts.get(i).address);
  myHolder.getGiftCreatedTimeTv().setText(gifts.get(i).createDateTime);
  myHolder.itemView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      mContext.startActivity(DetailActivity.createIntent(gifts.get(i)));
    }
  }
);
}

Fixed version (ground truth):
@Override public void onBindViewHolder(ItemHolder myHolder,final int i){
  String image_url;
  if (gifts.get(i).giftImages != null && gifts.get(i).giftImages.size() > 0) {
    image_url=gifts.get(i).giftImages.get(0);
  }
 else {
    image_url="String_Node_Str";
  }
  Glide.with(mContext).load(image_url).centerCrop().placeholder(R.color.background).crossFade().into(myHolder.getmItemIv());
  myHolder.getGiftTitleTv().setText(gifts.get(i).title + gifts.get(i).user);
  myHolder.getGiftLocationTv().setText(gifts.get(i).address);
  myHolder.getGiftCreatedTimeTv().setText(gifts.get(i).createDateTime);
  myHolder.itemView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      mContext.startActivity(DetailActivity.createIntent(gifts.get(i)));
    }
  }
);
}
Program: 174403
Project: 174403
Buggy source:
private void setListeners(){
  mFilterLayBtn.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        filterIc.setAlpha(0.5f);
        filterTxt.setAlpha(0.5f);
      }
      if (event.getAction() == MotionEvent.ACTION_UP) {
        filterIc.setAlpha(1f);
        filterTxt.setAlpha(1f);
      }
      return false;
    }
  }
);
  mFilterLayBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      FragmentManager fm=getActivity().getSupportFragmentManager();
      FilterDialogFragment fragment=new FilterDialogFragment();
      fragment.show(fm,"String_Node_Str");
    }
  }
);
  mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      refreshItems();
    }
  }
);
  mRecyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(new LinearLayoutManager(context)){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      pageNumber++;
    }
  }
);
}

Fixed version (ground truth):
private void setListeners(){
  mFilterLayBtn.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        filterIc.setAlpha(0.5f);
        filterTxt.setAlpha(0.5f);
      }
      if (event.getAction() == MotionEvent.ACTION_UP) {
        filterIc.setAlpha(1f);
        filterTxt.setAlpha(1f);
      }
      return false;
    }
  }
);
  mFilterLayBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      FragmentManager fm=getActivity().getSupportFragmentManager();
      FilterDialogFragment fragment=new FilterDialogFragment();
      fragment.show(fm,"String_Node_Str");
    }
  }
);
  mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      refreshItems();
    }
  }
);
  mRecyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(linearLayoutManager){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      pageNumber++;
      getGifts();
    }
  }
);
}
Program: 174404
Project: 174404
Buggy source:
@Override protected void init(){
  super.init();
  adapter=new GiftListAdapter(context,gifts);
  mRecyclerView.setAdapter(adapter);
  mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
  apiRequest.getGifts(new GetGiftPathQuery("String_Node_Str","String_Node_Str","String_Node_Str",null,null));
}

Fixed version (ground truth):
@Override protected void init(){
  super.init();
  adapter=new GiftListAdapter(context,gifts);
  mRecyclerView.setAdapter(adapter);
  linearLayoutManager=new LinearLayoutManager(context);
  mRecyclerView.setLayoutManager(linearLayoutManager);
  getGifts();
}
Program: 174405
Project: 174405
Buggy source:
@Override public void onLoadMore(int page,int totalItemsCount){
  pageNumber++;
}

Fixed version (ground truth):
@Override public void onLoadMore(int page,int totalItemsCount){
  pageNumber++;
  getGifts();
}
Program: 174406
Project: 174406
Buggy source:
void refreshItems(){
  pageNumber=1;
  gifts.clear();
  apiRequest.getGifts(new GetGiftPathQuery("String_Node_Str","String_Node_Str","String_Node_Str",null,null));
  onItemsLoadComplete();
}

Fixed version (ground truth):
void refreshItems(){
  pageNumber=1;
  gifts.clear();
  startIndex=0;
  getGifts();
  onItemsLoadComplete();
}
Program: 174408
Project: 174408
Buggy source:
private void setListeners(){
  mRecyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(new LinearLayoutManager(context)){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      pageNumber++;
    }
  }
);
  mFilterLayBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      FragmentManager fm=getActivity().getSupportFragmentManager();
      FilteringFragment filteringFragment=new FilteringFragment();
      filteringFragment.show(fm,"String_Node_Str");
    }
  }
);
}

Fixed version (ground truth):
private void setListeners(){
  mRecyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(linearLayoutManager){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      pageNumber++;
    }
  }
);
  mFilterLayBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      FragmentManager fm=getActivity().getSupportFragmentManager();
      FilteringFragment filteringFragment=new FilteringFragment();
      filteringFragment.show(fm,"String_Node_Str");
    }
  }
);
}
Program: 174409
Project: 174409
Buggy source:
@Override protected void init(){
  super.init();
  extractDataFromBundle();
  adapter=new GiftListAdapter(context,galleries);
  mRecyclerView.setAdapter(adapter);
  mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
  apiRequest.getGifts(new GetGiftPathQuery("String_Node_Str","String_Node_Str","String_Node_Str",category.categoryId,null));
}

Fixed version (ground truth):
@Override protected void init(){
  super.init();
  extractDataFromBundle();
  adapter=new GiftListAdapter(context,galleries);
  mRecyclerView.setAdapter(adapter);
  linearLayoutManager=new LinearLayoutManager(context);
  mRecyclerView.setLayoutManager(linearLayoutManager);
  apiRequest.getGifts(new GetGiftPathQuery("String_Node_Str","String_Node_Str","String_Node_Str",category.categoryId,null));
}
Program: 174410
Project: 174410
Buggy source:
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeString(title);
  dest.writeString(address);
  dest.writeString(description);
  dest.writeString(price);
  dest.writeString(status);
  dest.writeString(userId);
  dest.writeString(categoryId);
  dest.writeString(category);
  dest.writeString(locationId);
  dest.writeString(location);
  dest.writeSerializable(giftImages);
  dest.writeString(giftId);
  dest.writeString(createDateTime);
  dest.writeString(createDate);
  dest.writeString(createTime);
}

Fixed version (ground truth):
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeString(title);
  dest.writeString(address);
  dest.writeString(description);
  dest.writeString(price);
  dest.writeString(status);
  dest.writeString(userId);
  dest.writeString(user);
  dest.writeString(categoryId);
  dest.writeString(category);
  dest.writeString(locationId);
  dest.writeString(location);
  dest.writeSerializable(giftImages);
  dest.writeString(giftId);
  dest.writeString(createDateTime);
  dest.writeString(createDate);
  dest.writeString(createTime);
}
Program: 174411
Project: 174411
Buggy source:
private void init(){
  setupViewPager(viewPager);
  LinearLayout mLinearLayout=(LinearLayout)findViewById(R.id.pagesContainer);
  mIndicator=new MyPageIndicator(this,mLinearLayout,viewPager,R.drawable.indicator_circle);
  mIndicator.setPageCount(gift.giftImages.size());
  mIndicator.show();
}

Fixed version (ground truth):
private void init(){
  setupViewPager(viewPager);
  LinearLayout mLinearLayout=(LinearLayout)findViewById(R.id.pagesContainer);
  mIndicator=new MyPageIndicator(this,mLinearLayout,viewPager,R.drawable.indicator_circle);
  mIndicator.setPageCount(gift.giftImages != null ? gift.giftImages.size() : 0);
  mIndicator.show();
}
Program: 174412
Project: 174412
Buggy source:
@Override public int getCount(){
  return gift.giftImages.size();
}

Fixed version (ground truth):
@Override public int getCount(){
  return (gift.giftImages != null ? gift.giftImages.size() : 0);
}
Program: 174413
Project: 174413
Buggy source:
@Override public void onClick(View v){
  ((BottomBarActivity)mContext).setFragment(new GiftCategoryFilterFragment(),GiftCategoryFilterFragment.class.getName());
}

Fixed version (ground truth):
@Override public void onClick(View v){
  ((BottomBarActivity)mContext).setFragment(GiftCategoryFilterFragment.newInstance(categories.get(i)),GiftCategoryFilterFragment.class.getName());
}
Program: 174414
Project: 174414
Buggy source:
@Override public void onBindViewHolder(CategoryGridHolder categoryGridHolder,final int i){
  categoryGridHolder.getmCategoryTv().setText(categories.get(i).title);
  categoryGridHolder.getmCategoryFontIcon().setText(fontIcons[i]);
  categoryGridHolder.mItemView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      ((BottomBarActivity)mContext).setFragment(new GiftCategoryFilterFragment(),GiftCategoryFilterFragment.class.getName());
    }
  }
);
}

Fixed version (ground truth):
@Override public void onBindViewHolder(CategoryGridHolder categoryGridHolder,final int i){
  categoryGridHolder.getmCategoryTv().setText(categories.get(i).title);
  categoryGridHolder.getmCategoryFontIcon().setText(fontIcons[i]);
  categoryGridHolder.mItemView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      ((BottomBarActivity)mContext).setFragment(GiftCategoryFilterFragment.newInstance(categories.get(i)),GiftCategoryFilterFragment.class.getName());
    }
  }
);
}
Program: 174415
Project: 174415
Buggy source:
@GET("String_Node_Str" + Constants.LOCATION_ID + "String_Node_Str"+ Constants.StartIndex+ "String_Node_Str"+ Constants.LastIndex+ "String_Node_Str") Call<List<Gift>> getGifts(@Path(Constants.LOCATION_ID) String locationId,@Path(Constants.StartIndex) String startIndex,@Path(Constants.LastIndex) String lastIndex);

Fixed version (ground truth):
@GET("String_Node_Str" + Constants.LOCATION_ID + "String_Node_Str"+ Constants.StartIndex+ "String_Node_Str"+ Constants.LastIndex+ "String_Node_Str") Call<List<Gift>> getGifts(@Path(Constants.LOCATION_ID) String locationId,@Path(Constants.StartIndex) String startIndex,@Path(Constants.LastIndex) String lastIndex,@Query(Constants.CATEGORY_ID) String categoryId,@Query(Constants.SEARCH_TEXT) String searchText);
Program: 174416
Project: 174416
Buggy source:
@Override public void onResponse(Call call,Response response){
  super.onResponse(call,response);
  Log.d(TAG,"String_Node_Str");
  ArrayList<Category> categories=(ArrayList<Category>)response.body();
  this.categories.addAll(categories);
  adapter.notifyDataSetChanged();
}

Fixed version (ground truth):
@Override public void onResponse(Call call,Response response){
  super.onResponse(call,response);
  Log.d(TAG,"String_Node_Str");
  ArrayList<Category> categories=(ArrayList<Category>)response.body();
  this.categories.clear();
  this.categories.addAll(categories);
  adapter.notifyDataSetChanged();
}
Program: 174417
Project: 174417
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  View rootView=inflater.inflate(R.layout.fragment_category,container,false);
  ButterKnife.bind(this,rootView);
  init();
  adapter=new GiftListAdapter(context,galleries);
  mRecyclerView.setAdapter(adapter);
  mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
  mRecyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(new LinearLayoutManager(context)){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      pageNumber++;
    }
  }
);
  mFilterLayBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      FragmentManager fm=getActivity().getSupportFragmentManager();
      FilteringFragment filteringFragment=new FilteringFragment();
      filteringFragment.show(fm,"String_Node_Str");
    }
  }
);
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  View rootView=inflater.inflate(R.layout.fragment_category,container,false);
  ButterKnife.bind(this,rootView);
  init();
  setListeners();
  return rootView;
}
Program: 174418
Project: 174418
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  View rootView=inflater.inflate(R.layout.fragment_information,container,false);
  ButterKnife.bind(this,rootView);
  init();
  mFilterLayBtn.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        filterIc.setAlpha(0.5f);
        filterTxt.setAlpha(0.5f);
      }
 else       if (event.getAction() == MotionEvent.ACTION_UP) {
        filterIc.setAlpha(1f);
        filterTxt.setAlpha(1f);
      }
      return true;
    }
  }
);
  mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      refreshItems();
    }
  }
);
  adapter=new GiftListAdapter(context,gifts);
  mRecyclerView.setAdapter(adapter);
  mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
  mRecyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(new LinearLayoutManager(context)){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      pageNumber++;
    }
  }
);
  apiRequest.getGifts();
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  View rootView=inflater.inflate(R.layout.fragment_information,container,false);
  ButterKnife.bind(this,rootView);
  init();
  mFilterLayBtn.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        filterIc.setAlpha(0.5f);
        filterTxt.setAlpha(0.5f);
      }
 else       if (event.getAction() == MotionEvent.ACTION_UP) {
        filterIc.setAlpha(1f);
        filterTxt.setAlpha(1f);
      }
      return true;
    }
  }
);
  mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      refreshItems();
    }
  }
);
  adapter=new GiftListAdapter(context,gifts);
  mRecyclerView.setAdapter(adapter);
  mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
  mRecyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(new LinearLayoutManager(context)){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      pageNumber++;
    }
  }
);
  apiRequest.getGifts(new GetGiftPathQuery("String_Node_Str","String_Node_Str","String_Node_Str",null,null));
  return rootView;
}
Program: 174419
Project: 174419
Buggy source:
void refreshItems(){
  pageNumber=1;
  gifts.clear();
  apiRequest.getGifts();
  onItemsLoadComplete();
}

Fixed version (ground truth):
void refreshItems(){
  pageNumber=1;
  gifts.clear();
  apiRequest.getGifts(new GetGiftPathQuery("String_Node_Str","String_Node_Str","String_Node_Str",null,null));
  onItemsLoadComplete();
}
Program: 174420
Project: 174420
Buggy source:
public void getGifts(){
  Call<List<Gift>> call=AppController.service.getGifts("String_Node_Str","String_Node_Str","String_Node_Str");
  call.enqueue(new CallbackWithRetry<List<Gift>>(call,mContext){
    @Override public void onResponse(    Call<List<Gift>> call,    Response<List<Gift>> response){
      handlingOnResponse(new HandlingResponse(call,response,this));
    }
  }
);
}

Fixed version (ground truth):
public void getGifts(GetGiftPathQuery getGiftPathQuery){
  Call<List<Gift>> call=AppController.service.getGifts(getGiftPathQuery.locationId,getGiftPathQuery.startIndex,getGiftPathQuery.lastIndex,getGiftPathQuery.categoryId,getGiftPathQuery.searchText);
  call.enqueue(new CallbackWithRetry<List<Gift>>(call,mContext){
    @Override public void onResponse(    Call<List<Gift>> call,    Response<List<Gift>> response){
      handlingOnResponse(new HandlingResponse(call,response,this));
    }
  }
);
}
Program: 174421
Project: 174421
Buggy source:
@Override public void onBindViewHolder(ItemHolder myHolder,final int i){
  String image_url;
  if (gifts.get(i).giftImages != null && gifts.get(i).giftImages.size() > 0) {
    image_url=gifts.get(i).giftImages.get(0);
  }
 else {
    image_url="String_Node_Str";
  }
  Glide.with(mContext).load(image_url).centerCrop().placeholder(R.color.background).crossFade().into(myHolder.mItemIv);
  myHolder.getmItemTitleTv().setText(gifts.get(i).title);
}

Fixed version (ground truth):
@Override public void onBindViewHolder(ItemHolder myHolder,final int i){
  String image_url;
  if (gifts.get(i).giftImages != null && gifts.get(i).giftImages.size() > 0) {
    image_url=gifts.get(i).giftImages.get(0);
  }
 else {
    image_url="String_Node_Str";
  }
  Glide.with(mContext).load(image_url).centerCrop().placeholder(R.color.background).crossFade().into(myHolder.getmItemIv());
  myHolder.getGiftTitleTv().setText(gifts.get(i).title);
  myHolder.getGiftLocationTv().setText(gifts.get(i).address);
  myHolder.getGiftCreatedTimeTv().setText(gifts.get(i).createDateTime);
}
Program: 174422
Project: 174422
Buggy source:
public ItemHolder(View itemView){
  super(itemView);
  this.itemView=itemView;
  mItemTitleTv=(TextView)itemView.findViewById(R.id.row_title_textview);
  mItemIv=(ImageView)itemView.findViewById(R.id.row_imageview);
  itemView.setOnClickListener(this);
}

Fixed version (ground truth):
public ItemHolder(View itemView){
  super(itemView);
  this.itemView=itemView;
  mItemTitleTv=(TextView)itemView.findViewById(R.id.row_title_textview);
  mGiftLocationTv=(TextView)itemView.findViewById(R.id.row_ad_gift_location_tv);
  mGiftCreatedTimeTv=(TextView)itemView.findViewById(R.id.row_ad_gift_time_tv);
  mItemIv=(ImageView)itemView.findViewById(R.id.row_imageview);
  itemView.setOnClickListener(this);
}
Program: 174423
Project: 174423
Buggy source:
@Override public void onClick(View v){
  ((BottomBarActivity)mContext).setFragment(new GiftCategoryFilterFragment(),GiftCategoryFilterFragment.class.getName());
}

Fixed version (ground truth):
@Override public void onClick(View v){
}
Program: 174424
Project: 174424
Buggy source:
@Override public void onBindViewHolder(CategoryDialogHolder categoryHolder,final int i){
  categoryHolder.getmCategoryTv().setText(categories.get(i).title);
  categoryHolder.mItemView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      ((BottomBarActivity)mContext).setFragment(new GiftCategoryFilterFragment(),GiftCategoryFilterFragment.class.getName());
    }
  }
);
}

Fixed version (ground truth):
@Override public void onBindViewHolder(CategoryDialogHolder categoryHolder,final int i){
  categoryHolder.getmCategoryTv().setText(categories.get(i).title);
  categoryHolder.mItemView.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
    }
  }
);
}
Program: 174425
Project: 174425
Buggy source:
@GET("String_Node_Str") Call<List<Gift>> getGifts();

Fixed version (ground truth):
@GET("String_Node_Str") Call<List<Gift>> getGifts(@Path("String_Node_Str") String locationId,@Path("String_Node_Str") String startIndex,@Path("String_Node_Str") String lastIndex);
Program: 174426
Project: 174426
Buggy source:
void sendRequest(){
  Call<List<Gift>> call=AppController.service.getGifts();
  call.enqueue(new Callback<List<Gift>>(){
    @Override public void onResponse(    Call<List<Gift>> call,    Response<List<Gift>> response){
      progressView.setVisibility(View.INVISIBLE);
      gifts.addAll(response.body());
      adapter.notifyDataSetChanged();
      mRecyclerView.setVisibility(View.VISIBLE);
      mMessageTextView.setVisibility(View.INVISIBLE);
    }
    @Override public void onFailure(    Call<List<Gift>> call,    Throwable t){
      progressView.setVisibility(View.INVISIBLE);
      mRecyclerView.setVisibility(View.INVISIBLE);
      mMessageTextView.setText("String_Node_Str");
    }
  }
);
}

Fixed version (ground truth):
void sendRequest(){
  Call<List<Gift>> call=AppController.service.getGifts("String_Node_Str","String_Node_Str","String_Node_Str");
  call.enqueue(new Callback<List<Gift>>(){
    @Override public void onResponse(    Call<List<Gift>> call,    Response<List<Gift>> response){
      progressView.setVisibility(View.INVISIBLE);
      gifts.addAll(response.body());
      adapter.notifyDataSetChanged();
      mRecyclerView.setVisibility(View.VISIBLE);
      mMessageTextView.setVisibility(View.INVISIBLE);
    }
    @Override public void onFailure(    Call<List<Gift>> call,    Throwable t){
      progressView.setVisibility(View.INVISIBLE);
      mRecyclerView.setVisibility(View.INVISIBLE);
      mMessageTextView.setText("String_Node_Str");
    }
  }
);
}
Program: 174427
Project: 174427
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_register_gift);
  ButterKnife.bind(this);
  context=this;
  retrofitInitialization();
  settingToolbar();
  toolbarNewGiftBtn.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_register_gift);
  ButterKnife.bind(this);
  context=this;
  retrofitInitialization();
  settingToolbar();
  mToolbarSendBtnTv.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
    }
  }
);
}
Program: 174428
Project: 174428
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_detail);
  ButterKnife.bind(this);
  CircleIndicator indicator=(CircleIndicator)findViewById(R.id.indicator);
  indicator.setViewPager(viewPager);
  setupViewPager(viewPager);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_detail);
  ButterKnife.bind(this);
  CircleIndicator indicator=(CircleIndicator)findViewById(R.id.indicator);
  setupViewPager(viewPager);
  indicator.setViewPager(viewPager);
}
Program: 174429
Project: 174429
Buggy source:
protected void init(String title){
  context=getActivity();
  mainActivity=(AppCompatActivity)getActivity();
  toolbarLayout=(RelativeLayout)((AppCompatActivity)context).findViewById(R.id.toolbar);
  mSecondIV=(ImageView)toolbarLayout.findViewById(R.id.toolbar_second_iv);
  mFirstIV=(ImageView)toolbarLayout.findViewById(R.id.toolbar_first_iv);
  mToolbarTitleTextView=(TextView)toolbarLayout.findViewById(R.id.toolbar_title_textView);
  mToolbarTitleTextView.setText(title);
  setHowToBack();
}

Fixed version (ground truth):
protected void init(){
  context=getActivity();
  mainActivity=(AppCompatActivity)getActivity();
  toolbarLayout=(RelativeLayout)((AppCompatActivity)context).findViewById(R.id.toolbar);
  mSecondIV=(ImageView)toolbarLayout.findViewById(R.id.toolbar_second_iv);
  mFirstIV=(ImageView)toolbarLayout.findViewById(R.id.toolbar_first_iv);
  mToolbarTitleTextView=(TextView)toolbarLayout.findViewById(R.id.toolbar_title_textView);
  setHowToBack();
}
Program: 174430
Project: 174430
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  View rootView=inflater.inflate(R.layout.fragment_information,container,false);
  ButterKnife.bind(this,rootView);
  init("String_Node_Str");
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  View rootView=inflater.inflate(R.layout.fragment_information,container,false);
  ButterKnife.bind(this,rootView);
  return rootView;
}
Program: 174431
Project: 174431
Buggy source:
public static void main(String[] args) throws Exception {
  Properties properties=Tools.loadProperties();
  final String consumerId=properties.getProperty("String_Node_Str");
  final String topic=properties.getProperty("String_Node_Str");
  String accessKey=properties.getProperty("String_Node_Str");
  String secretKey=properties.getProperty("String_Node_Str");
  Properties initProperties=new Properties();
  initProperties.put(PropertyKeyConst.ConsumerId,consumerId);
  initProperties.put(PropertyKeyConst.AccessKey,accessKey);
  initProperties.put(PropertyKeyConst.SecretKey,secretKey);
  Consumer consumer=ONSFactory.createConsumer(properties);
  consumer.subscribe(topic,"String_Node_Str",new MessageListener(){
    public Action consume(    Message message,    ConsumeContext consumeContext){
      System.out.println("String_Node_Str" + message);
      return Action.CommitMessage;
    }
  }
);
  consumer.start();
  Thread.sleep(Integer.MAX_VALUE);
  consumer.shutdown();
  System.exit(0);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  Properties properties=Tools.loadProperties();
  final String consumerId=properties.getProperty("String_Node_Str");
  final String topic=properties.getProperty("String_Node_Str");
  String accessKey=properties.getProperty("String_Node_Str");
  String secretKey=properties.getProperty("String_Node_Str");
  Properties initProperties=new Properties();
  initProperties.put(PropertyKeyConst.ConsumerId,consumerId);
  initProperties.put(PropertyKeyConst.AccessKey,accessKey);
  initProperties.put(PropertyKeyConst.SecretKey,secretKey);
  Consumer consumer=ONSFactory.createConsumer(initProperties);
  consumer.subscribe(topic,"String_Node_Str",new MessageListener(){
    public Action consume(    Message message,    ConsumeContext consumeContext){
      System.out.println("String_Node_Str" + message);
      return Action.CommitMessage;
    }
  }
);
  consumer.start();
  Thread.sleep(Integer.MAX_VALUE);
  consumer.shutdown();
  System.exit(0);
}
Program: 174435
Project: 174435
Buggy source:
private ExpressionType determineType(String expression){
  if (expression == null) {
    return ExpressionType.FALSE;
  }
  expression=expression.trim().toLowerCase();
  if (expression.isEmpty() || expression.equals("String_Node_Str")) {
    return ExpressionType.FALSE;
  }
 else   if (expression.equals("String_Node_Str")) {
    return ExpressionType.TRUE;
  }
 else   if (expression.contains("String_Node_Str") || expression.contains("String_Node_Str") || expression.contains("String_Node_Str")|| expression.contains("String_Node_Str")|| expression.equals("String_Node_Str")) {
    return ExpressionType.JEVAL;
  }
 else {
    return ExpressionType.RSQL;
  }
}

Fixed version (ground truth):
private ExpressionType determineType(String expression){
  if (expression == null) {
    return ExpressionType.FALSE;
  }
  expression=expression.trim().toLowerCase();
  if (expression.isEmpty() || expression.equals("String_Node_Str")) {
    return ExpressionType.FALSE;
  }
 else   if (expression.equals("String_Node_Str")) {
    return ExpressionType.TRUE;
  }
 else   if (expression.contains("String_Node_Str") || expression.contains("String_Node_Str") || expression.contains("String_Node_Str")|| (expression.contains("String_Node_Str") && !expression.contains("String_Node_Str"))|| expression.equals("String_Node_Str")) {
    return ExpressionType.JEVAL;
  }
 else {
    return ExpressionType.RSQL;
  }
}
Program: 174437
Project: 174437
Buggy source:
private void handleCustomerCompletedCallEvent(NexmoCallEvent callEvent){
  String tag=callEvent.getUuid();
  if (null != tag) {
    TaskDto task=getTaskByTag(tag);
    if (null != task) {
      if (task.getState() == TaskState.waiting) {
        updateTaskServiceState(task.getRef(),TaskState.canceled);
      }
      if (null != task.getUserContext()) {
        AttributeValueDto uuidDto=task.getUserContext().get("String_Node_Str");
        if (null != uuidDto) {
          String uuid=getStringFromAttributeValueDto(uuidDto);
          if (null != uuid) {
            hangupCall(uuid);
          }
 else {
            LOGGER.error("String_Node_Str");
          }
        }
 else {
          LOGGER.warn("String_Node_Str");
        }
      }
    }
 else {
      LOGGER.warn("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void handleCustomerCompletedCallEvent(NexmoCallEvent callEvent){
  String tag=callEvent.getUuid();
  if (null != tag) {
    TaskDto task=getTaskByTag(tag);
    if (null != task) {
      boolean goodCallbackTask=false;
      AttributeGroupDto userContext=task.getUserContext();
      if (null != userContext) {
        AttributeValueDto kindDto=userContext.get("String_Node_Str");
        AttributeValueDto stateDto=userContext.get("String_Node_Str");
        if (null != kindDto && null != stateDto) {
          String kind=getStringFromAttributeValueDto(kindDto);
          String state=getStringFromAttributeValueDto(stateDto);
          if (kind.equalsIgnoreCase("String_Node_Str") && state.equalsIgnoreCase("String_Node_Str")) {
            goodCallbackTask=true;
          }
        }
      }
      if (!goodCallbackTask && task.getState() == TaskState.waiting) {
        updateTaskServiceState(task.getRef(),TaskState.canceled);
      }
      if (null != task.getUserContext()) {
        AttributeValueDto uuidDto=task.getUserContext().get("String_Node_Str");
        if (null != uuidDto) {
          String uuid=getStringFromAttributeValueDto(uuidDto);
          if (null != uuid) {
            hangupCall(uuid);
          }
 else {
            LOGGER.error("String_Node_Str");
          }
        }
 else {
          LOGGER.warn("String_Node_Str");
        }
      }
    }
 else {
      LOGGER.warn("String_Node_Str");
    }
  }
}
Program: 174438
Project: 174438
Buggy source:
/** 
 * .
 * @param uuid UUID
 * @return JSON
 */
@GET @Path("String_Node_Str") public String getNccoResponse(@PathParam("String_Node_Str") final String conversationId,@QueryParam("String_Node_Str") String uuid){
  LOGGER.debug("String_Node_Str",conversationId);
  NexMoCall call=conversationService.getInboundCallWithConversationId(uuid);
  NexMoConversation conversation=conversationService.getConversation(conversationId);
  if (null == conversation || null == call) {
    TalkNcco talkNcco=new TalkNcco("String_Node_Str");
    talkNcco.setLoop(1);
    NccoResponseBuilder builder=new NccoResponseBuilder();
    builder.appendNcco(talkNcco);
    NccoResponse nccoResponse=builder.getValue();
    LOGGER.debug("String_Node_Str",nccoResponse.toJson());
    return nccoResponse.toJson();
  }
  UpdateNexMoConversationArg updateArg=new UpdateNexMoConversationArg(NexMoConversationStatus.CONNECTED);
  conversationService.updateConversation(conversationId,updateArg);
  TalkNcco talkNcco=new TalkNcco("String_Node_Str");
  talkNcco.setLoop(1);
  ConversationNccoEx convNcco=new ConversationNccoEx(conversationId);
  NccoResponseBuilder builder=new NccoResponseBuilder();
  builder.appendNcco(talkNcco);
  builder.appendNcco(convNcco);
  NccoResponse nccoResponse=builder.getValue();
  LOGGER.debug("String_Node_Str",nccoResponse.toJson());
  return nccoResponse.toJson();
}

Fixed version (ground truth):
/** 
 * .
 * @param uuid UUID
 * @return JSON
 */
@GET @Path("String_Node_Str") public String getNccoResponse(@PathParam("String_Node_Str") final String conversationId,@QueryParam("String_Node_Str") String uuid){
  LOGGER.debug("String_Node_Str",conversationId);
  boolean customerIsWaiting=false;
  NexMoConversation conversation=conversationService.getConversation(conversationId);
  if (null != conversation) {
    NexMoCall caller=conversation.getCaller();
    if (null != caller && caller.getUuid() != null) {
      NexMoCall call=conversationService.getCallWithUuid(caller.getUuid());
      if (null != call) {
        customerIsWaiting=true;
      }
    }
  }
  if (!customerIsWaiting) {
    TalkNcco talkNcco=new TalkNcco("String_Node_Str");
    talkNcco.setLoop(1);
    NccoResponseBuilder builder=new NccoResponseBuilder();
    builder.appendNcco(talkNcco);
    NccoResponse nccoResponse=builder.getValue();
    LOGGER.debug("String_Node_Str",nccoResponse.toJson());
    return nccoResponse.toJson();
  }
  UpdateNexMoConversationArg updateArg=new UpdateNexMoConversationArg(NexMoConversationStatus.CONNECTED);
  conversationService.updateConversation(conversationId,updateArg);
  TalkNcco talkNcco=new TalkNcco("String_Node_Str");
  talkNcco.setLoop(1);
  ConversationNccoEx convNcco=new ConversationNccoEx(conversationId);
  NccoResponseBuilder builder=new NccoResponseBuilder();
  builder.appendNcco(talkNcco);
  builder.appendNcco(convNcco);
  NccoResponse nccoResponse=builder.getValue();
  LOGGER.debug("String_Node_Str",nccoResponse.toJson());
  return nccoResponse.toJson();
}
Program: 174441
Project: 174441
Buggy source:
private void updateTaskServiceState(String taskId,TaskState state){
  UpdateTaskArg updTaskReq=new UpdateTaskArg();
  updTaskReq.setId(taskId);
  updTaskReq.setState(state);
  try {
    LOGGER.trace("String_Node_Str",taskId);
    taskServiceClient.update(updTaskReq);
  }
 catch (  BadValueException|NotFoundException e) {
    LOGGER.error("String_Node_Str",e.getLocalizedMessage());
    e.printStackTrace();
  }
catch (  Exception ex) {
    LOGGER.error("String_Node_Str",ex.getLocalizedMessage());
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void updateTaskServiceState(String taskId,TaskState state){
  UpdateTaskArg updTaskReq=new UpdateTaskArg();
  updTaskReq.setState(state);
  try {
    LOGGER.trace("String_Node_Str",taskId);
    taskServiceClient.update(updTaskReq,new RouterObjectId(taskId,configuration.getCommsRouterId()));
  }
 catch (  BadValueException|NotFoundException e) {
    LOGGER.error("String_Node_Str",e.getLocalizedMessage());
    e.printStackTrace();
  }
catch (  Exception ex) {
    LOGGER.error("String_Node_Str",ex.getLocalizedMessage());
    ex.printStackTrace();
  }
}
Program: 174442
Project: 174442
Buggy source:
@Override public AgentDto create(CreateAgentArg createArg) throws NotFoundException {
  return null;
}

Fixed version (ground truth):
@Override public AgentDto create(CreateAgentArg createArg,RouterObjectId id) throws NotFoundException {
  return null;
}
Program: 174443
Project: 174443
Buggy source:
@Override public void update(UpdateAgentArg updateArg) throws NotFoundException {
}

Fixed version (ground truth):
@Override public void update(UpdateAgentArg updateArg,RouterObjectId id) throws NotFoundException {
}
Program: 174444
Project: 174444
Buggy source:
@Override public PlanDto get(RouterObject routerObject) throws NotFoundException {
  return getItem(routerObject);
}

Fixed version (ground truth):
@Override public PlanDto get(RouterObject routerObject) throws NotFoundException {
  return getItem(new RouterObjectId(routerObject.getId(),routerObject.getRouterId()));
}
Program: 174445
Project: 174445
Buggy source:
@Override public PlanDto create(CreatePlanArg createArg){
  createArg.setRouterId(configuration.getCommsRouterId());
  return post(createArg);
}

Fixed version (ground truth):
@Override public PlanDto create(CreatePlanArg createArg){
  createArg.setRouterId(configuration.getCommsRouterId());
  return post(createArg,configuration.getCommsRouterId());
}
Program: 174446
Project: 174446
Buggy source:
@Override public void update(UpdatePlanArg updateArg) throws NotFoundException {
  updateArg.setRouterId(configuration.getCommsRouterId());
  put(updateArg);
}

Fixed version (ground truth):
@Override public void update(UpdatePlanArg updateArg) throws NotFoundException {
  updateArg.setRouterId(configuration.getCommsRouterId());
  put(updateArg,new RouterObjectId(updateArg.getId(),configuration.getCommsRouterId()));
}
Program: 174447
Project: 174447
Buggy source:
@Override public void delete(RouterObject routerObject){
  routerObject.setRouterId(configuration.getCommsRouterId());
  super.delete(routerObject);
}

Fixed version (ground truth):
@Override public void delete(RouterObject routerObject){
  routerObject.setRouterId(configuration.getCommsRouterId());
  super.delete(new RouterObjectId(routerObject.getId(),routerObject.getRouterId()));
}
Program: 174448
Project: 174448
Buggy source:
@Override public QueueDto get(RouterObject routerObject) throws NotFoundException {
  return getItem(routerObject);
}

Fixed version (ground truth):
@Override public QueueDto get(RouterObject routerObject) throws NotFoundException {
  return getItem(new RouterObjectId(routerObject.getId(),routerObject.getRouterId()));
}
Program: 174449
Project: 174449
Buggy source:
@Override public void update(UpdateQueueArg updateArg) throws NotFoundException {
  updateArg.setRouterId(configuration.getCommsRouterId());
  put(updateArg);
}

Fixed version (ground truth):
@Override public void update(UpdateQueueArg updateArg) throws NotFoundException {
  put(updateArg,new RouterObjectId(updateArg.getId(),configuration.getCommsRouterId()));
}
Program: 174450
Project: 174450
Buggy source:
@Override public void delete(RouterObject routerObject){
  routerObject.setRouterId(configuration.getCommsRouterId());
  super.delete(routerObject);
}

Fixed version (ground truth):
@Override public void delete(RouterObject routerObject){
  routerObject.setRouterId(configuration.getCommsRouterId());
  super.delete(new RouterObjectId(routerObject.getId(),routerObject.getRouterId()));
}
Program: 174451
Project: 174451
Buggy source:
@Override public RouterDto get(String id) throws NotFoundException {
  return getItem(id);
}

Fixed version (ground truth):
@Override public RouterDto get(String id) throws NotFoundException {
  return getItem(new ApiObjectId(id));
}
Program: 174452
Project: 174452
Buggy source:
@Override public void update(UpdateRouterArg updateArg) throws NotFoundException {
  put(updateArg);
}

Fixed version (ground truth):
@Override public void update(UpdateRouterArg updateArg,ApiObjectId id) throws NotFoundException {
  post(updateArg,id);
}
Program: 174453
Project: 174453
Buggy source:
@Override public void delete(String id){
  super.delete(id);
}

Fixed version (ground truth):
@Override public void delete(String id){
  super.delete(new ApiObjectId(id));
}
Program: 174455
Project: 174455
Buggy source:
@DeleteMapping(value="String_Node_Str") @Authorization public Response deleteAccounts(@RequestBody List<Integer> boxIds,@CurrentUser User user){
  return new Response<>(mailService.deleteAccounts(boxIds,user) ? 200 : 500);
}

Fixed version (ground truth):
@PostMapping(value="String_Node_Str") @Authorization public Response deleteAccounts(@RequestBody List<Integer> boxIds,@CurrentUser User user){
  return new Response<>(mailService.deleteAccounts(boxIds,user) ? 200 : 500);
}
Program: 174457
Project: 174457
Buggy source:
@Override public boolean sendMail(Integer boxId,User user,Mail mail){
  Mailbox account=mailboxDAO.findOne(boxId);
  if (account != null && account.getUser().getId().equals(user.getId())) {
    MailFolder sent;
    Optional<MailFolder> first=account.getFolders().stream().filter(f -> f.getFolderType().equals(MailFolder.FolderType.SENT)).findFirst();
    if (first.isPresent()) {
      sent=first.get();
    }
 else {
      sent=new MailFolder();
      sent.setMailbox(account);
      sent.setMailList(new ArrayList<>());
      sent.setFolderType(MailFolder.FolderType.SENT);
      sent.setAlias("String_Node_Str");
    }
    try {
      MailUtils.sendMail(account,mail);
    }
 catch (    MessagingException e) {
      e.printStackTrace();
      return false;
    }
    sent.getMailList().add(mail);
    mailFolderDao.update(sent);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean sendMail(Integer boxId,User user,Mail mail){
  Mailbox account=mailboxDAO.findOne(boxId);
  if (account != null && account.getUser().getId().equals(user.getId())) {
    MailFolder sent;
    Optional<MailFolder> first=account.getFolders().stream().filter(f -> f.getFolderType().equals(MailFolder.FolderType.SENT)).findFirst();
    if (first.isPresent()) {
      sent=first.get();
    }
 else {
      sent=new MailFolder();
      sent.setMailbox(account);
      sent.setMailList(new ArrayList<>());
      sent.setFolderType(MailFolder.FolderType.SENT);
      sent.setAlias("String_Node_Str");
    }
    try {
      MailUtils.sendMail(account,mail);
    }
 catch (    MessagingException e) {
      e.printStackTrace();
      return false;
    }
    mail.setMailFolder(sent);
    sent.getMailList().add(mail);
    mailFolderDao.update(sent);
    return true;
  }
  return false;
}
Program: 174458
Project: 174458
Buggy source:
@GetMapping(value="String_Node_Str") @Authorization public Response listMailsInFolder(@PathVariable("String_Node_Str") Integer boxId,@PathVariable("String_Node_Str") Integer folderId,@CurrentUser User user){
  return new Response<>(200);
}

Fixed version (ground truth):
@GetMapping(value="String_Node_Str") @Authorization public Response listMailsInFolder(@PathVariable("String_Node_Str") Integer boxId,@PathVariable("String_Node_Str") Integer folderId,@CurrentUser User user){
  return new Response<>(200,mailService.readMails(boxId,folderId,user));
}
Program: 174460
Project: 174460
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public Response signUp(@RequestBody SignUpRequest request,HttpSession session){
  if (session.getAttribute("String_Node_Str") != null && session.getAttribute("String_Node_Str").equals(request.getCheckCode())) {
    User user=new User();
    user.setEmail(request.getEmail());
    user.setUserName(request.getUserName());
    user.setPassword(request.getPassword());
    user.setEnabled(true);
    if (userService.signUp(user)) {
      return new Response<>(200,"String_Node_Str");
    }
    return new Response<>(500,"String_Node_Str");
  }
 else {
    return new Response<>(501,"String_Node_Str");
  }
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public Response signUp(@RequestBody SignUpRequest request,HttpSession session){
  if (session.getAttribute("String_Node_Str") != null && session.getAttribute("String_Node_Str").equals(request.getCheckCode())) {
    User user=new User();
    user.setEmail(request.getEmail());
    user.setUserName(request.getUserName());
    user.setPassword(request.getPassword());
    user.setEnabled(true);
    user.setRoot(false);
    if (userService.signUp(user)) {
      return new Response<>(200,"String_Node_Str");
    }
    return new Response<>(500,"String_Node_Str");
  }
 else {
    return new Response<>(501,"String_Node_Str");
  }
}
Program: 174461
Project: 174461
Buggy source:
@Override public void saveOpenid(String openid){
  if (!applicationFormDAO.queryByOpenid(openid).isPresent()) {
    ApplicationForm applicationForm=new ApplicationForm();
    applicationForm.setOpenid(openid);
    applicationFormDAO.addForm(applicationForm);
  }
}

Fixed version (ground truth):
@Override public void saveOpenid(String openid){
  if (!applicationFormDAO.queryByOpenid(openid).isPresent()) {
    ApplicationForm applicationForm=new ApplicationForm();
    applicationForm.setPass(false);
    applicationForm.setBlock(false);
    applicationForm.setOpenid(openid);
    applicationFormDAO.addForm(applicationForm);
  }
}
Program: 174462
Project: 174462
Buggy source:
@PostMapping public String submit(@PathVariable String openid,@RequestParam("String_Node_Str") String name,@RequestParam("String_Node_Str") Long stuId,@RequestParam("String_Node_Str") String gender,@RequestParam("String_Node_Str") String nationality,@RequestParam("String_Node_Str") Long tel,@RequestParam("String_Node_Str") String email,@RequestParam("String_Node_Str") String introduce,@RequestParam("String_Node_Str") String description){
  if (!joinService.submitted(openid)) {
    ApplicationForm applicationForm=new ApplicationForm();
    applicationForm.setOpenid(openid);
    applicationForm.setDescription(description);
    applicationForm.setName(name);
    applicationForm.setIntroduce(introduce);
    applicationForm.setTel(tel);
    applicationForm.setEmail(email);
    applicationForm.setCreateDate(new Date());
    applicationForm.setStuId(stuId);
    applicationForm.setGender(gender);
    applicationForm.setNationality(nationality);
    joinService.submit(applicationForm);
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
@PostMapping public String submit(@PathVariable String openid,@RequestParam("String_Node_Str") String name,@RequestParam("String_Node_Str") Long stuId,@RequestParam("String_Node_Str") String gender,@RequestParam("String_Node_Str") String nationality,@RequestParam("String_Node_Str") Long tel,@RequestParam("String_Node_Str") String email,@RequestParam("String_Node_Str") String introduce,@RequestParam("String_Node_Str") String description){
  Optional<ApplicationForm> optional=joinService.queryForm(openid);
  if (optional.isPresent() && optional.get().getName() == null) {
    ApplicationForm applicationForm=optional.get();
    applicationForm.setOpenid(openid);
    applicationForm.setDescription(description);
    applicationForm.setName(name);
    applicationForm.setIntroduce(introduce);
    applicationForm.setTel(tel);
    applicationForm.setEmail(email);
    applicationForm.setCreateDate(new Date());
    applicationForm.setStuId(stuId);
    applicationForm.setGender(gender);
    applicationForm.setNationality(nationality);
    joinService.submit(applicationForm);
  }
  return "String_Node_Str";
}