Program: 174350
Project: 174350
Buggy source:
@Override public void onResponse(Call call,Response response){
  if (response.body() instanceof RequestGiftOutput) {
    cancelMyRequest();
    Snackbari.showS(bottomBarLayBtn,"String_Node_Str");
  }
 else   if (response.body() instanceof Gift) {
    gift=(Gift)response.body();
    setInfo();
    giftStatus=gift.status;
    if (gift.userId.equals(AppController.getStoredString(Constants.USER_ID))) {
      setDeleteBtn(getResources().getString(R.string.delete_gift));
    }
switch (gift.status) {
case GiftStatus.REJECTED_BY_ADMIN:
      setDeleteBtn("String_Node_Str");
    break;
case GiftStatus.PUBLISHED:
  if (!gift.userId.equals(AppController.getStoredString(Constants.USER_ID))) {
    setRequestBtn();
  }
break;
case GiftStatus.DONATED_TO_ME:
callSmsBottomBarLayBtn.setVisibility(View.VISIBLE);
bottomBarLayBtn.setVisibility(View.GONE);
mCallBtn.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
Toasti.showS("String_Node_Str");
}
}
);
mSmsBtn.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
Toasti.showS("String_Node_Str");
}
}
);
break;
case GiftStatus.DONATED_TO_SOMEONE_ELSE:
callSmsBottomBarLayBtn.setVisibility(View.GONE);
bottomBarLayBtn.setVisibility(View.GONE);
mDetailTitleTv.setText(gift.title + "String_Node_Str");
break;
case GiftStatus.I_SENT_MY_REQUEST_FOR_IT:
cancelMyRequest();
break;
case GiftStatus.MY_REQUEST_REJECTED:
bottomBarLayBtn.setVisibility(View.VISIBLE);
mRequestTv.setText("String_Node_Str");
break;
}
if (gift.bookmark) {
mBookmarkIc.setImageResource(R.mipmap.ic_action_action_bookmark);
mBookmarkIc.setOnClickListener(removeFromWishList);
}
 else {
mBookmarkIc.setImageResource(R.mipmap.ic_action_action_bookmark_outline);
mBookmarkIc.setOnClickListener(addToWishList);
}
mBookmarkIc.setVisibility(View.VISIBLE);
}
 else if (response.body() instanceof ResponseBody) {
if (gift.userId.equals(AppController.getStoredString(Constants.USER_ID))) {
Toasti.showS("String_Node_Str");
finish();
}
 else {
setRequestBtn();
}
}
}

Fixed version (ground truth):
@Override public void onResponse(Call call,Response response){
  if (response.body() instanceof RequestGiftOutput) {
    cancelMyRequest();
    Snackbari.showS(bottomBarLayBtn,"String_Node_Str");
  }
 else   if (response.body() instanceof Gift) {
    gift=(Gift)response.body();
    setInfo();
    giftStatus=gift.status;
    if (gift.userId.equals(AppController.getStoredString(Constants.USER_ID))) {
      setDeleteBtn(getResources().getString(R.string.delete_gift));
    }
switch (gift.status) {
case GiftStatus.REJECTED_BY_ADMIN:
      setDeleteBtn("String_Node_Str");
    break;
case GiftStatus.PUBLISHED:
  if (!gift.userId.equals(AppController.getStoredString(Constants.USER_ID))) {
    setRequestBtn();
  }
break;
case GiftStatus.DONATED_TO_ME:
callSmsBottomBarLayBtn.setVisibility(View.VISIBLE);
bottomBarLayBtn.setVisibility(View.GONE);
mCallBtn.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
String uri="String_Node_Str" + "String_Node_Str";
Intent intent=new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse(uri));
mContext.startActivity(intent);
}
}
);
mSmsBtn.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View view){
mContext.startActivity(new Intent(Intent.ACTION_VIEW,Uri.fromParts("String_Node_Str","String_Node_Str",null)));
}
}
);
break;
case GiftStatus.DONATED_TO_SOMEONE_ELSE:
callSmsBottomBarLayBtn.setVisibility(View.GONE);
bottomBarLayBtn.setVisibility(View.GONE);
mDetailTitleTv.setText(gift.title + "String_Node_Str");
break;
case GiftStatus.I_SENT_MY_REQUEST_FOR_IT:
cancelMyRequest();
break;
case GiftStatus.MY_REQUEST_REJECTED:
bottomBarLayBtn.setVisibility(View.VISIBLE);
mRequestTv.setText("String_Node_Str");
break;
}
if (gift.bookmark) {
mBookmarkIc.setImageResource(R.mipmap.ic_action_action_bookmark);
mBookmarkIc.setOnClickListener(removeFromWishList);
}
 else {
mBookmarkIc.setImageResource(R.mipmap.ic_action_action_bookmark_outline);
mBookmarkIc.setOnClickListener(addToWishList);
}
mBookmarkIc.setVisibility(View.VISIBLE);
}
 else if (response.body() instanceof ResponseBody) {
if (gift.userId.equals(AppController.getStoredString(Constants.USER_ID))) {
Toasti.showS("String_Node_Str");
finish();
}
 else {
setRequestBtn();
}
}
}