nus-yam/ex-repair huggingface dataset:
Program: 147233
Project: 147233
Buggy source:
@Test public void testEquals() throws JSlateException, IOException, ParserError, TemplateLoadingError {
  Map<String,Object> vars=new HashMap<>();
  IrepBuilder builder=new IrepBuilder();
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.add(OP.EQAULS);
  builder.add(OP.APPEND);
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.add(OP.EQAULS);
  builder.add(OP.APPEND);
  builder.add(OP.RETURN);
  Irep irep=builder.build();
  String got=vm.run(irep,vars);
  assertEquals("String_Node_Str",got);
}

Fixed version (ground truth):
@Test public void testEquals() throws JSlateException, IOException, ParserError, TemplateLoadingError {
  Map<String,Object> vars=new HashMap<>();
  IrepBuilder builder=new IrepBuilder();
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.add(OP.EQUALS);
  builder.add(OP.APPEND);
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.addPool(OP.LOAD_CONST,"String_Node_Str");
  builder.add(OP.EQUALS);
  builder.add(OP.APPEND);
  builder.add(OP.RETURN);
  Irep irep=builder.build();
  String got=vm.run(irep,vars);
  assertEquals("String_Node_Str",got);
}
Program: 147234
Project: 147234
Buggy source:
@Override public boolean onTouchEvent(MotionEvent event){
  if (lockScrollWhileRefreshing && (state == State.REFRESHING || getAnimation() != null && !getAnimation().hasEnded())) {
    return true;
  }
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
    if (getFirstVisiblePosition() == 0) {
      previousY=event.getY();
    }
 else {
      previousY=-1;
    }
  mScrollStartY=event.getY();
break;
case MotionEvent.ACTION_UP:
if (previousY != -1 && (state == State.RELEASE_TO_REFRESH || getFirstVisiblePosition() == 0)) {
switch (state) {
case RELEASE_TO_REFRESH:
  setState(State.REFRESHING);
bounceBackHeader();
break;
case PULL_TO_REFRESH:
resetHeader();
break;
}
}
break;
case MotionEvent.ACTION_MOVE:
if (previousY != -1 && getFirstVisiblePosition() == 0 && Math.abs(mScrollStartY - event.getY()) > IDLE_DISTANCE) {
float y=event.getY();
float diff=y - previousY;
if (diff > 0) diff/=PULL_RESISTANCE;
previousY=y;
int newHeaderPadding=Math.max(Math.round(headerPadding + diff),-header.getHeight());
if (newHeaderPadding != headerPadding && state != State.REFRESHING) {
setHeaderPadding(newHeaderPadding);
if (state == State.PULL_TO_REFRESH && headerPadding > 0) {
setState(State.RELEASE_TO_REFRESH);
image.clearAnimation();
image.startAnimation(flipAnimation);
}
 else if (state == State.RELEASE_TO_REFRESH && headerPadding < 0) {
setState(State.PULL_TO_REFRESH);
image.clearAnimation();
image.startAnimation(reverseFlipAnimation);
}
}
}
break;
}
return super.onTouchEvent(event);
}

Fixed version (ground truth):
@Override public boolean onTouchEvent(MotionEvent event){
  if (lockScrollWhileRefreshing && (state == State.REFRESHING || getAnimation() != null && !getAnimation().hasEnded())) {
    return true;
  }
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
    if (getFirstVisiblePosition() == 0) {
      previousY=event.getY();
    }
 else {
      previousY=-1;
    }
  mScrollStartY=event.getY();
break;
case MotionEvent.ACTION_UP:
if (previousY != -1 && (state == State.RELEASE_TO_REFRESH || getFirstVisiblePosition() == 0)) {
switch (state) {
case RELEASE_TO_REFRESH:
  setState(State.REFRESHING);
bounceBackHeader();
break;
case PULL_TO_REFRESH:
resetHeader();
break;
}
}
previousY=event.getY();
break;
case MotionEvent.ACTION_MOVE:
if (previousY != -1 && getFirstVisiblePosition() == 0 && Math.abs(mScrollStartY - event.getY()) > IDLE_DISTANCE) {
float y=event.getY();
float diff=y - previousY;
if (diff > 0) diff/=PULL_RESISTANCE;
previousY=y;
int newHeaderPadding=Math.max(Math.round(headerPadding + diff),-header.getHeight());
if (newHeaderPadding != headerPadding && state != State.REFRESHING) {
setHeaderPadding(newHeaderPadding);
if (state == State.PULL_TO_REFRESH && headerPadding > 0) {
setState(State.RELEASE_TO_REFRESH);
image.clearAnimation();
image.startAnimation(flipAnimation);
}
 else if (state == State.RELEASE_TO_REFRESH && headerPadding < 0) {
setState(State.PULL_TO_REFRESH);
image.clearAnimation();
image.startAnimation(reverseFlipAnimation);
}
}
}
break;
}
return super.onTouchEvent(event);
}
Program: 147235
Project: 147235
Buggy source:
@Override public View getItemView(final NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    viewHolder=new ViewHolder();
    convertView=buildViewHolder(newsItem.getItemType());
  }
 else {
    viewHolder=(ViewHolder)convertView.getTag();
    viewHolder.profileImage.setImageResource(R.drawable.default_feed_icon);
    viewHolder.patient=null;
    viewHolder.itemType=newsItem.getItemType();
  }
switch (newsItem.getItemType()) {
case CAMPAIGN_CONTENT:
    convertView=getCampaignContentItemView(newsItem,convertView,parent);
  break;
case ON_BOARDED:
convertView=getOnBoardedItemView(newsItem,convertView,parent);
break;
case FULLY_FUNDED:
convertView=getFullyFundedItemView(newsItem,convertView,parent);
break;
case DONATION_RAISED:
convertView=getDonationRaisedItemView(newsItem,convertView,parent);
break;
}
return convertView;
}

Fixed version (ground truth):
@Override public View getItemView(final NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    viewHolder=new ViewHolder();
    convertView=buildViewHolder(newsItem.getItemType());
  }
 else {
    viewHolder=(ViewHolder)convertView.getTag();
    viewHolder.profileImage.setImageResource(R.drawable.default_feed_icon);
    viewHolder.patient=null;
    viewHolder.itemType=newsItem.getItemType();
  }
switch (newsItem.getItemType()) {
case CAMPAIGN_CONTENT:
    convertView=getCampaignContentItemView(newsItem,convertView,parent);
  viewHolder.donationProgress.setVisibility(View.INVISIBLE);
break;
case ON_BOARDED:
convertView=getOnBoardedItemView(newsItem,convertView,parent);
viewHolder.donationProgress.setVisibility(View.VISIBLE);
break;
case FULLY_FUNDED:
convertView=getFullyFundedItemView(newsItem,convertView,parent);
viewHolder.donationProgress.setVisibility(View.VISIBLE);
break;
case DONATION_RAISED:
convertView=getDonationRaisedItemView(newsItem,convertView,parent);
viewHolder.donationProgress.setVisibility(View.VISIBLE);
break;
}
return convertView;
}
Program: 147236
Project: 147236
Buggy source:
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  viewHolder.shortDescription.setText(R.string.makeDifference);
  viewHolder.message.setText(newsItem.getCampaignContent());
  viewHolder.shareableItem=Util.getUniversalShareableItem();
  viewHolder.donationProgress.setVisibility(View.INVISIBLE);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.VISIBLE);
  convertView.setTag(viewHolder);
  setShareListeners(viewHolder);
  setPatientFundButton(viewHolder.donateView,viewHolder.shareableItem);
  return convertView;
}

Fixed version (ground truth):
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  viewHolder.shortDescription.setText(R.string.makeDifference);
  viewHolder.message.setText(newsItem.getCampaignContent());
  viewHolder.shareableItem=Util.getUniversalShareableItem();
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.VISIBLE);
  convertView.setTag(viewHolder);
  setShareListeners(viewHolder);
  setPatientFundButton(viewHolder.donateView,viewHolder.shareableItem);
  return convertView;
}
Program: 147237
Project: 147237
Buggy source:
public void setEmail(){
  Request.newMeRequest(ParseFacebookUtils.getSession(),new Request.GraphUserCallback(){
    @Override public void onCompleted(    GraphUser user,    Response response){
      ImageLoader imgImageLoader=ImageLoader.getInstance();
      imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
      donarFullName.setText(user.getName());
    }
  }
).executeAsync();
}

Fixed version (ground truth):
public void setEmail(){
  Request.newMeRequest(ParseFacebookUtils.getSession(),new Request.GraphUserCallback(){
    @Override public void onCompleted(    GraphUser user,    Response response){
      ImageLoader imgImageLoader=ImageLoader.getInstance();
      imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
      String email=user.asMap().get("String_Node_Str").toString();
      showDonorInformaiton(user.getName(),email,true);
    }
  }
).executeAsync();
}
Program: 147238
Project: 147238
Buggy source:
@Override public void onCompleted(GraphUser user,Response response){
  ImageLoader imgImageLoader=ImageLoader.getInstance();
  imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
  donarFullName.setText(user.getName());
}

Fixed version (ground truth):
@Override public void onCompleted(GraphUser user,Response response){
  ImageLoader imgImageLoader=ImageLoader.getInstance();
  imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
  String email=user.asMap().get("String_Node_Str").toString();
  showDonorInformaiton(user.getName(),email,true);
}
Program: 147239
Project: 147239
Buggy source:
/** 
 * Shows the profile of the given user.
 * @param user
 */
private void showProfile(ParseUser user){
  if (user != null) {
    String fullName=user.getString("String_Node_Str");
    String email=user.getString("String_Node_Str");
    getActionBar().setTitle("String_Node_Str");
    ParseHelper parseHelper=new ParseHelper(getApplicationContext());
    ParseQuery<Donor> query=parseHelper.findDonorByEmail(email);
    try {
      donor=query.getFirst();
    }
 catch (    ParseException exp) {
      exp.printStackTrace();
    }
    boolean isFacebookLinkedUser=ParseFacebookUtils.isLinked(user);
    email=user.getString("String_Node_Str");
    if (isFacebookLinkedUser) {
      setEmail();
    }
 else {
      donarFullName.setText(fullName);
      memberSinceDate.setText(Util.getFormatedDate(user.getCreatedAt()));
    }
    if (donor != null) {
      showDetailsForDonor(isFacebookLinkedUser);
    }
 else {
      showDetailsForNonDonor();
    }
  }
}

Fixed version (ground truth):
/** 
 * Shows the profile of the given user.
 * @param user
 */
private void showProfile(ParseUser user){
  if (user != null) {
    String fullName=user.getString("String_Node_Str");
    String email=user.getString("String_Node_Str");
    getActionBar().setTitle("String_Node_Str");
    boolean isFacebookLinkedUser=ParseFacebookUtils.isLinked(user);
    email=user.getString("String_Node_Str");
    if (isFacebookLinkedUser) {
      setEmail();
    }
 else {
      showDonorInformaiton(fullName,email,false);
    }
  }
}
Program: 147240
Project: 147240
Buggy source:
@Override public View getItemView(final NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    viewHolder=new ViewHolder();
    convertView=buildViewHolder(newsItem.getItemType());
  }
 else {
    viewHolder=(ViewHolder)convertView.getTag();
    viewHolder.profileImage.setImageResource(R.drawable.default_feed_icon);
    viewHolder.patient=null;
    viewHolder.itemType=newsItem.getItemType();
  }
switch (newsItem.getItemType()) {
case CAMPAIGN_CONTENT:
    convertView=getCampaignContentItemView(newsItem,convertView,parent);
  break;
case ON_BOARDED:
convertView=getOnBoardedItemView(newsItem,convertView,parent);
break;
case FULLY_FUNDED:
convertView=getFullyFundedItemView(newsItem,convertView,parent);
break;
case DONATION_RAISED:
convertView=getDonationRaisedItemView(newsItem,convertView,parent);
break;
}
return convertView;
}

Fixed version (ground truth):
@Override public View getItemView(final NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    viewHolder=new ViewHolder();
    convertView=buildViewHolder(newsItem.getItemType());
  }
 else {
    viewHolder=(ViewHolder)convertView.getTag();
    viewHolder.profileImage.setImageResource(R.drawable.default_feed_icon);
    viewHolder.patient=null;
    viewHolder.itemType=newsItem.getItemType();
  }
switch (newsItem.getItemType()) {
case CAMPAIGN_CONTENT:
    convertView=getCampaignContentItemView(newsItem,convertView,parent);
  viewHolder.donationProgress.setVisibility(View.INVISIBLE);
break;
case ON_BOARDED:
convertView=getOnBoardedItemView(newsItem,convertView,parent);
viewHolder.donationProgress.setVisibility(View.VISIBLE);
break;
case FULLY_FUNDED:
convertView=getFullyFundedItemView(newsItem,convertView,parent);
viewHolder.donationProgress.setVisibility(View.VISIBLE);
break;
case DONATION_RAISED:
convertView=getDonationRaisedItemView(newsItem,convertView,parent);
viewHolder.donationProgress.setVisibility(View.VISIBLE);
break;
}
return convertView;
}
Program: 147241
Project: 147241
Buggy source:
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  viewHolder.shortDescription.setText(R.string.makeDifference);
  viewHolder.message.setText(newsItem.getCampaignContent());
  viewHolder.shareableItem=Util.getUniversalShareableItem();
  viewHolder.donationProgress.setVisibility(View.INVISIBLE);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.VISIBLE);
  viewHolder.donateView.setOnClickListener(null);
  convertView.setTag(viewHolder);
  setShareListeners(viewHolder);
  setPatientFundButton(viewHolder.donateView,viewHolder.shareableItem);
  return convertView;
}

Fixed version (ground truth):
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  viewHolder.shortDescription.setText(R.string.makeDifference);
  viewHolder.message.setText(newsItem.getCampaignContent());
  viewHolder.shareableItem=Util.getUniversalShareableItem();
  viewHolder.donationProgress.setVisibility(View.INVISIBLE);
  viewHolder.donateView.setVisibility(View.VISIBLE);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.VISIBLE);
  viewHolder.donateView.setOnClickListener(null);
  convertView.setTag(viewHolder);
  setShareListeners(viewHolder);
  setPatientFundButton(viewHolder.donateView,viewHolder.shareableItem);
  viewHolder.message.setMaxLines(20);
  viewHolder.message.setEllipsize(TextUtils.TruncateAt.END);
  return convertView;
}
Program: 147242
Project: 147242
Buggy source:
private void setupUI(View convertView,ViewHolder viewHolder,String photoUrl,String shortDescription,String message){
  viewHolder.profileImage.setImageResource(android.R.color.transparent);
  ImageLoader imageLoader=ImageLoader.getInstance();
  imageLoader.displayImage(photoUrl,viewHolder.profileImage);
  viewHolder.shortDescription.setText(shortDescription);
  viewHolder.message.setText(message);
  int donationProgressPecentage=viewHolder.patient.getDonationProgressPecentage();
  viewHolder.donationProgress.setProgress(donationProgressPecentage);
  Drawable progressDrawable=null;
  if (viewHolder.patient.isFullyFunded()) {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.fully_funded_progressbar);
    viewHolder.donateView.setVisibility(View.GONE);
  }
 else {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.progressbar);
    viewHolder.donationProgress.setVisibility(View.VISIBLE);
    viewHolder.donateView.setVisibility(View.VISIBLE);
  }
  viewHolder.donationProgress.setProgressDrawable(progressDrawable);
  setPatientNavigation(convertView,viewHolder.patient,viewHolder.itemType);
  setPatientFundButton(viewHolder.donateView,viewHolder.patient);
  setShareListeners(viewHolder);
}

Fixed version (ground truth):
private void setupUI(View convertView,ViewHolder viewHolder,String photoUrl,String shortDescription,String message){
  viewHolder.profileImage.setImageResource(android.R.color.transparent);
  ImageLoader imageLoader=ImageLoader.getInstance();
  imageLoader.displayImage(photoUrl,viewHolder.profileImage);
  viewHolder.shortDescription.setText(shortDescription);
  if (viewHolder.itemType != ItemType.CAMPAIGN_CONTENT) {
    viewHolder.message.setMaxLines(3);
    viewHolder.message.setEllipsize(TextUtils.TruncateAt.END);
  }
  viewHolder.message.setText(message);
  int donationProgressPecentage=viewHolder.patient.getDonationProgressPecentage();
  viewHolder.donationProgress.setProgress(donationProgressPecentage);
  Drawable progressDrawable=null;
  if (viewHolder.patient.isFullyFunded()) {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.fully_funded_progressbar);
    viewHolder.donateView.setVisibility(View.INVISIBLE);
  }
 else {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.progressbar);
    viewHolder.donationProgress.setVisibility(View.VISIBLE);
    viewHolder.donateView.setVisibility(View.VISIBLE);
  }
  viewHolder.donationProgress.setProgressDrawable(progressDrawable);
  setPatientNavigation(convertView,viewHolder.patient,viewHolder.itemType);
  setPatientFundButton(viewHolder.donateView,viewHolder.patient);
  setShareListeners(viewHolder);
}
Program: 147243
Project: 147243
Buggy source:
@Override public void onClick(View v){
  Intent intent=Util.getFundTreatmentIntent(getActivity(),patientObj,new BigDecimal("String_Node_Str"));
  startActivityForResult(intent,0);
}

Fixed version (ground truth):
@Override public void onClick(View v){
  Intent intent=Util.getFundTreatmentIntent((BaseFragmentActivity)getActivity(),patientObj,new BigDecimal("String_Node_Str"),"String_Node_Str","String_Node_Str");
  startActivityForResult(intent,0);
}
Program: 147245
Project: 147245
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  final int menuItemId=item.getItemId();
  if (menuItemId == R.id.action_profileView) {
    Util.showMyProfileActivity(this);
  }
  if (menuItemId == R.id.action_logout) {
    ParseUser.logOut();
    logout.setVisible(false);
  }
  return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  final int menuItemId=item.getItemId();
  if (menuItemId == R.id.action_profileView) {
    Util.showMyProfileActivity(this);
  }
  if (menuItemId == R.id.action_logout) {
    logout();
    logout.setVisible(false);
  }
  return super.onOptionsItemSelected(item);
}
Program: 147246
Project: 147246
Buggy source:
public void setEmail(){
  Request.newMeRequest(ParseFacebookUtils.getSession(),new Request.GraphUserCallback(){
    @Override public void onCompleted(    GraphUser user,    Response response){
      ImageLoader imgImageLoader=ImageLoader.getInstance();
      imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
      String email=user.asMap().get("String_Node_Str").toString();
      ParseHelper parseHelper=new ParseHelper(getApplicationContext());
      ParseQuery<Donor> query=parseHelper.findDonorByEmail(email);
      try {
        Donor donor=query.getFirst();
        if (donor == null) {
          showDetailsForNonDonor();
        }
 else {
          showDetailsForDonor(donor);
        }
      }
 catch (      ParseException e) {
        e.printStackTrace();
      }
    }
  }
).executeAsync();
}

Fixed version (ground truth):
public void setEmail(){
  Request.newMeRequest(ParseFacebookUtils.getSession(),new Request.GraphUserCallback(){
    @Override public void onCompleted(    GraphUser user,    Response response){
      ImageLoader imgImageLoader=ImageLoader.getInstance();
      imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
      String email=user.asMap().get("String_Node_Str").toString();
      donarFullName.setText(user.getName());
      ParseHelper parseHelper=new ParseHelper(getApplicationContext());
      ParseQuery<Donor> query=parseHelper.findDonorByEmail(email);
      try {
        Donor donor=query.getFirst();
        if (donor == null) {
          showDetailsForNonDonor();
        }
 else {
          showDetailsForDonor(donor);
        }
      }
 catch (      ParseException e) {
        e.printStackTrace();
      }
    }
  }
).executeAsync();
}
Program: 147247
Project: 147247
Buggy source:
@Override public void onCompleted(GraphUser user,Response response){
  ImageLoader imgImageLoader=ImageLoader.getInstance();
  imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
  String email=user.asMap().get("String_Node_Str").toString();
  ParseHelper parseHelper=new ParseHelper(getApplicationContext());
  ParseQuery<Donor> query=parseHelper.findDonorByEmail(email);
  try {
    Donor donor=query.getFirst();
    if (donor == null) {
      showDetailsForNonDonor();
    }
 else {
      showDetailsForDonor(donor);
    }
  }
 catch (  ParseException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onCompleted(GraphUser user,Response response){
  ImageLoader imgImageLoader=ImageLoader.getInstance();
  imgImageLoader.displayImage("String_Node_Str" + user.getId() + "String_Node_Str",profilePicture);
  String email=user.asMap().get("String_Node_Str").toString();
  donarFullName.setText(user.getName());
  ParseHelper parseHelper=new ParseHelper(getApplicationContext());
  ParseQuery<Donor> query=parseHelper.findDonorByEmail(email);
  try {
    Donor donor=query.getFirst();
    if (donor == null) {
      showDetailsForNonDonor();
    }
 else {
      showDetailsForDonor(donor);
    }
  }
 catch (  ParseException e) {
    e.printStackTrace();
  }
}
Program: 147248
Project: 147248
Buggy source:
/** 
 * Shows the profile of the given user.
 * @param user
 */
private void showProfile(ParseUser user){
  if (user != null) {
    String fullName=user.getString("String_Node_Str");
    String email=null;
    if (fullName != null) {
      donarFullName.setText(fullName);
      getActionBar().setTitle("String_Node_Str");
      donorId=user.getString("String_Node_Str");
      email=user.getString("String_Node_Str");
      donarFullName.setText(fullName);
      if (ParseFacebookUtils.isLinked(user)) {
        setEmail();
      }
 else {
        user.getUsername();
        memberSinceDate.setText(Util.getFormatedDate(user.getCreatedAt()));
        showDetailsForNonDonor();
      }
      if (donorId != null) {
        setDonationsFragment(donorId);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Shows the profile of the given user.
 * @param user
 */
private void showProfile(ParseUser user){
  if (user != null) {
    String fullName=user.getString("String_Node_Str");
    String email=null;
    getActionBar().setTitle("String_Node_Str");
    donorId=user.getString("String_Node_Str");
    email=user.getString("String_Node_Str");
    if (ParseFacebookUtils.isLinked(user)) {
      setEmail();
    }
 else {
      donarFullName.setText(fullName);
      memberSinceDate.setText(Util.getFormatedDate(user.getCreatedAt()));
      showDetailsForNonDonor();
    }
    if (donorId != null) {
      setDonationsFragment(donorId);
    }
  }
}
Program: 147249
Project: 147249
Buggy source:
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  viewHolder.shortDescription.setText(R.string.makeDifference);
  viewHolder.message.setText(newsItem.getCampaignContent());
  viewHolder.donationProgress.setVisibility(View.INVISIBLE);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.INVISIBLE);
  convertView.setTag(viewHolder);
  return convertView;
}

Fixed version (ground truth):
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  viewHolder.shortDescription.setText(R.string.makeDifference);
  viewHolder.message.setText(newsItem.getCampaignContent());
  viewHolder.donationProgress.setVisibility(View.INVISIBLE);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.INVISIBLE);
  convertView.setTag(viewHolder);
  convertView.setClickable(false);
  return convertView;
}
Program: 147250
Project: 147250
Buggy source:
private void setPatientNavigation(View v,Patient p,ItemType type){
  v.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      String patientId=((ViewHolder)v.getTag()).patient.getObjectId();
      PatientDetailActivity.getPatientDetailsIntent(activity,patientId);
    }
  }
);
}

Fixed version (ground truth):
private void setPatientNavigation(View v,Patient p,ItemType type){
  v.setClickable(true);
  v.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      String patientId=((ViewHolder)v.getTag()).patient.getObjectId();
      PatientDetailActivity.getPatientDetailsIntent(activity,patientId);
    }
  }
);
}
Program: 147251
Project: 147251
Buggy source:
@Override public View getItemView(final NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    viewHolder=new ViewHolder();
    convertView=buildViewHolder(newsItem.getItemType());
  }
 else {
    viewHolder=(ViewHolder)convertView.getTag();
  }
switch (newsItem.getItemType()) {
case CAMPAIGN_CONTENT:
    convertView=getCampaignContentItemView(newsItem,convertView,parent);
  break;
case ON_BOARDED:
convertView=getOnBoardedItemView(newsItem,convertView,parent);
break;
case FULLY_FUNDED:
convertView=getFullyFundedItemView(newsItem,convertView,parent);
break;
case DONATION_RAISED:
convertView=getDonationRaisedItemView(newsItem,convertView,parent);
break;
}
return convertView;
}

Fixed version (ground truth):
@Override public View getItemView(final NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    viewHolder=new ViewHolder();
    convertView=buildViewHolder(newsItem.getItemType());
  }
 else {
    viewHolder=(ViewHolder)convertView.getTag();
    viewHolder.profileImage.setImageResource(R.drawable.default_feed_icon);
    viewHolder.patient=null;
    viewHolder.itemType=newsItem.getItemType();
  }
switch (newsItem.getItemType()) {
case CAMPAIGN_CONTENT:
    convertView=getCampaignContentItemView(newsItem,convertView,parent);
  break;
case ON_BOARDED:
convertView=getOnBoardedItemView(newsItem,convertView,parent);
break;
case FULLY_FUNDED:
convertView=getFullyFundedItemView(newsItem,convertView,parent);
break;
case DONATION_RAISED:
convertView=getDonationRaisedItemView(newsItem,convertView,parent);
break;
}
return convertView;
}
Program: 147252
Project: 147252
Buggy source:
private View getFullyFundedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ItemType itemType=ItemType.FULLY_FUNDED;
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  Patient patient;
  try {
    patient=newsItem.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  String shortDescription=patient.getFirstName() + "String_Node_Str";
  String message=patient.getFullName() + "String_Node_Str" + "String_Node_Str"+ patient.getDonationReceived()+ "String_Node_Str";
  viewHolder.patient=patient;
  setupUI(viewHolder,patient.getPhotoUrl(),shortDescription,message);
  setPatientNavigation(convertView,patient,itemType);
  setPatientFundButton(viewHolder.donateView,patient);
  setShareListeners(viewHolder);
  convertView.setTag(viewHolder);
  return convertView;
}

Fixed version (ground truth):
private View getFullyFundedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ItemType itemType=ItemType.FULLY_FUNDED;
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  Patient patient;
  try {
    patient=newsItem.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  String shortDescription=patient.getFirstName() + "String_Node_Str";
  String message=patient.getFullName() + "String_Node_Str" + "String_Node_Str"+ patient.getDonationReceived()+ "String_Node_Str";
  viewHolder.patient=patient;
  setupUI(convertView,viewHolder,patient.getPhotoUrl(),shortDescription,message);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.VISIBLE);
  convertView.setTag(viewHolder);
  return convertView;
}
Program: 147253
Project: 147253
Buggy source:
private void setupUI(ViewHolder viewHolder,String photoUrl,String shortDescription,String message){
  DisplayImageOptions options=new DisplayImageOptions.Builder().displayer(new RoundedBitmapDisplayer((int)(getPixels(activity,80) / 2))).cacheInMemory().cacheOnDisc().imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).build();
  ImageLoader imageLoader=ImageLoader.getInstance();
  imageLoader.displayImage(photoUrl,viewHolder.profileImage,options);
  viewHolder.shortDescription.setText(shortDescription);
  viewHolder.message.setText(message);
  int donationProgressPecentage=viewHolder.patient.getDonationProgressPecentage();
  viewHolder.donationProgress.setProgress(donationProgressPecentage);
  Drawable progressDrawable=null;
  if (viewHolder.patient.isFullyFunded()) {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.fully_funded_progressbar);
  }
 else {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.progressbar);
  }
  viewHolder.donationProgress.setProgressDrawable(progressDrawable);
}

Fixed version (ground truth):
private void setupUI(View convertView,ViewHolder viewHolder,String photoUrl,String shortDescription,String message){
  DisplayImageOptions options=new DisplayImageOptions.Builder().displayer(new RoundedBitmapDisplayer((int)(getPixels(activity,80) / 2))).cacheInMemory().cacheOnDisc().imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).build();
  ImageLoader imageLoader=ImageLoader.getInstance();
  imageLoader.displayImage(photoUrl,viewHolder.profileImage,options);
  viewHolder.shortDescription.setText(shortDescription);
  viewHolder.message.setText(message);
  int donationProgressPecentage=viewHolder.patient.getDonationProgressPecentage();
  viewHolder.donationProgress.setProgress(donationProgressPecentage);
  Drawable progressDrawable=null;
  if (viewHolder.patient.isFullyFunded()) {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.fully_funded_progressbar);
  }
 else {
    progressDrawable=getContext().getResources().getDrawable(R.drawable.progressbar);
  }
  viewHolder.donationProgress.setProgressDrawable(progressDrawable);
  setPatientNavigation(convertView,viewHolder.patient,viewHolder.itemType);
  setPatientFundButton(viewHolder.donateView,viewHolder.patient);
  setShareListeners(viewHolder);
}
Program: 147254
Project: 147254
Buggy source:
private View getOnBoardedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  Patient patient;
  try {
    patient=newsItem.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  String shortDescription=patient.getFirstName() + "String_Node_Str";
  String message=patient.getMedicalNeed() + "String_Node_Str";
  viewHolder.patient=patient;
  setupUI(viewHolder,patient.getPhotoUrl(),shortDescription,message);
  setPatientNavigation(convertView,patient,viewHolder.itemType);
  setPatientFundButton(viewHolder.donateView,patient);
  setShareListeners(viewHolder);
  convertView.setTag(viewHolder);
  return convertView;
}

Fixed version (ground truth):
private View getOnBoardedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  Patient patient;
  try {
    patient=newsItem.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  String shortDescription=patient.getFirstName() + "String_Node_Str";
  String message=patient.getMedicalNeed() + "String_Node_Str";
  viewHolder.patient=patient;
  setupUI(convertView,viewHolder,patient.getPhotoUrl(),shortDescription,message);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.VISIBLE);
  convertView.setTag(viewHolder);
  return convertView;
}
Program: 147255
Project: 147255
Buggy source:
private View getDonationRaisedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  Patient patient;
  Donor donor;
  Donation dn;
  try {
    dn=newsItem.getDonation().fetchIfNeeded();
    donor=dn.getDonor().fetchIfNeeded();
    patient=dn.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  String shortDescription=patient.getFirstName() + "String_Node_Str";
  String message=donor.getFirstName() + "String_Node_Str" + patient.getFullName()+ "String_Node_Str"+ dn.getDonationAmount()+ "String_Node_Str";
  viewHolder.patient=patient;
  setupUI(viewHolder,patient.getPhotoUrl(),shortDescription,message);
  setPatientNavigation(convertView,patient,viewHolder.itemType);
  setPatientFundButton(viewHolder.donateView,patient);
  setShareListeners(viewHolder);
  convertView.setTag(viewHolder);
  return convertView;
}

Fixed version (ground truth):
private View getDonationRaisedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  ViewHolder viewHolder=(ViewHolder)convertView.getTag();
  Patient patient;
  Donor donor;
  Donation dn;
  try {
    dn=newsItem.getDonation().fetchIfNeeded();
    donor=dn.getDonor().fetchIfNeeded();
    patient=dn.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  String shortDescription=patient.getFirstName() + "String_Node_Str";
  String message=donor.getFirstName() + "String_Node_Str" + patient.getFullName()+ "String_Node_Str"+ dn.getDonationAmount()+ "String_Node_Str";
  viewHolder.patient=patient;
  setupUI(convertView,viewHolder,patient.getPhotoUrl(),shortDescription,message);
  convertView.findViewById(R.id.donateAndShare).setVisibility(View.VISIBLE);
  convertView.setTag(viewHolder);
  return convertView;
}
Program: 147256
Project: 147256
Buggy source:
private View getDonationRaisedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=View.inflate(getContext(),R.layout.item_patient_news,null);
  }
  Patient patient;
  Donor donor;
  Donation dn;
  try {
    dn=newsItem.getDonation().fetchIfNeeded();
    donor=dn.getDonor().fetchIfNeeded();
    patient=dn.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  ImageView ivProfileImage=(ImageView)convertView.findViewById(R.id.ivProfileImage);
  ImageLoader imageLoader=ImageLoader.getInstance();
  imageLoader.displayImage(patient.getPhotoUrl(),ivProfileImage);
  TextView tvUserName=(TextView)convertView.findViewById(R.id.tvUserName);
  tvUserName.setText(patient.getFirstName() + "String_Node_Str" + donor.getFirstName());
  TextView tvShortMessage=(TextView)convertView.findViewById(R.id.tvShortMessage);
  String message=donor.getFirstName() + "String_Node_Str" + patient.getFullName()+ "String_Node_Str"+ dn.getDonationAmount()+ "String_Node_Str";
  tvShortMessage.setText(message);
  return convertView;
}

Fixed version (ground truth):
private View getDonationRaisedItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=View.inflate(getContext(),R.layout.item_patient_news,null);
  }
  Patient patient;
  Donor donor;
  Donation dn;
  try {
    dn=newsItem.getDonation().fetchIfNeeded();
    donor=dn.getDonor().fetchIfNeeded();
    patient=dn.getPatient().fetchIfNeeded();
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return convertView;
  }
  ImageView ivProfileImage=(ImageView)convertView.findViewById(R.id.ivProfileImage);
  ImageLoader imageLoader=ImageLoader.getInstance();
  imageLoader.displayImage(patient.getPhotoUrl(),ivProfileImage);
  TextView tvUserName=(TextView)convertView.findViewById(R.id.tvUserName);
  tvUserName.setText(patient.getFirstName() + "String_Node_Str" + donor.getFirstName());
  TextView tvShortMessage=(TextView)convertView.findViewById(R.id.tvShortMessage);
  String message=donor.getFirstName() + "String_Node_Str" + patient.getFullName()+ "String_Node_Str"+ dn.getDonationAmount()+ "String_Node_Str";
  tvShortMessage.setText(message);
  Button bt=(Button)convertView.findViewById(R.id.btNewsAction);
  bt.setText("String_Node_Str");
  return convertView;
}
Program: 147257
Project: 147257
Buggy source:
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=View.inflate(getContext(),R.layout.item_patient_news,null);
  }
  TextView tvUserName=(TextView)convertView.findViewById(R.id.tvUserName);
  tvUserName.setText("String_Node_Str");
  TextView tvShortMessage=(TextView)convertView.findViewById(R.id.tvShortMessage);
  tvShortMessage.setText("String_Node_Str");
  return convertView;
}

Fixed version (ground truth):
private View getCampaignContentItemView(NewsItem newsItem,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=View.inflate(getContext(),R.layout.item_campaign_news,null);
  }
  TextView tvHeading=(TextView)convertView.findViewById(R.id.tvCNHeading);
  tvHeading.setText("String_Node_Str");
  TextView tvShortMessage=(TextView)convertView.findViewById(R.id.tvCNShortMessage);
  tvShortMessage.setText(newsItem.getCampaignContent());
  return convertView;
}
Program: 147258
Project: 147258
Buggy source:
private void setupIintialViews(){
  listView.setOnScrollListener(new EndlessScrollListener(){
    @Override public void onLoadMore(    int page,    int totalItemsCount){
      if (totalItemsCount > 0) {
      }
    }
  }
);
  listView.setOnRefreshListener(new OnRefreshListener(){
    @Override public void onRefresh(){
      patientFeedAdapter.clear();
      patientFeedAdapter.loadObjects();
    }
  }
);
}

Fixed version (ground truth):
private void setupIintialViews(){
  listView.setOnRefreshListener(new OnRefreshListener(){
    @Override public void onRefresh(){
      patientFeedAdapter.clear();
      patientFeedAdapter.loadObjects();
    }
  }
);
}
Program: 147259
Project: 147259
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.fragment_patient_feed,container,false);
  progressBar=(ProgressBar)v.findViewById(R.id.pf_progressBar);
  patientFeedAdapter=new HomeFeedAdapter(getActivity());
  patientFeedAdapter.addOnQueryLoadListener(new OnQueryLoadListener<NewsItem>(){
    @Override public void onLoaded(    List<NewsItem> patients,    Exception exp){
      progressBar.setVisibility(View.INVISIBLE);
      listView.onRefreshComplete();
      if (exp == null) {
        try {
          NewsItem.pinAll(patients);
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
 else {
      }
    }
    @Override public void onLoading(){
      progressBar.setVisibility(View.VISIBLE);
    }
  }
);
  listView=(PullToRefreshListView)v.findViewById(R.id.patient_feed_list);
  listView.setAdapter(patientFeedAdapter);
  setupIintialViews();
  return v;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View v=inflater.inflate(R.layout.fragment_patient_feed,container,false);
  progressBar=(ProgressBar)v.findViewById(R.id.pf_progressBar);
  patientFeedAdapter=new HomeFeedAdapter(getActivity());
  patientFeedAdapter.addOnQueryLoadListener(new OnQueryLoadListener<NewsItem>(){
    @Override public void onLoaded(    List<NewsItem> newsItems,    Exception exp){
      progressBar.setVisibility(View.INVISIBLE);
      listView.onRefreshComplete();
      if (exp == null) {
        try {
          ArrayList<NewsItem> list=new ArrayList<NewsItem>();
          for (          NewsItem newsItem : newsItems) {
            if (newsItem != null) {
              list.add(newsItem);
            }
          }
          NewsItem.pinAll(list);
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
 else {
      }
    }
    @Override public void onLoading(){
      progressBar.setVisibility(View.VISIBLE);
    }
  }
);
  listView=(PullToRefreshListView)v.findViewById(R.id.patient_feed_list);
  listView.setAdapter(patientFeedAdapter);
  setupIintialViews();
  return v;
}
Program: 147260
Project: 147260
Buggy source:
@Override public void onLoaded(List<NewsItem> patients,Exception exp){
  progressBar.setVisibility(View.INVISIBLE);
  listView.onRefreshComplete();
  if (exp == null) {
    try {
      NewsItem.pinAll(patients);
    }
 catch (    ParseException e) {
      e.printStackTrace();
    }
  }
 else {
  }
}

Fixed version (ground truth):
@Override public void onLoaded(List<NewsItem> newsItems,Exception exp){
  progressBar.setVisibility(View.INVISIBLE);
  listView.onRefreshComplete();
  if (exp == null) {
    try {
      ArrayList<NewsItem> list=new ArrayList<NewsItem>();
      for (      NewsItem newsItem : newsItems) {
        if (newsItem != null) {
          list.add(newsItem);
        }
      }
      NewsItem.pinAll(list);
    }
 catch (    ParseException e) {
      e.printStackTrace();
    }
  }
 else {
  }
}
Program: 147262
Project: 147262
Buggy source:
public PatientAdapter(Context context){
  super(context,new ParseQueryAdapter.QueryFactory<Patient>(){
    public ParseQuery create(){
      return new ParseQuery("String_Node_Str").orderByAscending("String_Node_Str");
    }
  }
);
  fullyFundedProgressDrawable=context.getResources().getDrawable(R.drawable.fully_funded_progressbar);
  inProgressDrawable=context.getResources().getDrawable(R.drawable.progressbar);
}

Fixed version (ground truth):
public PatientAdapter(Context context){
  super(context,new ParseQueryAdapter.QueryFactory<Patient>(){
    public ParseQuery create(){
      return new ParseQuery("String_Node_Str").orderByAscending("String_Node_Str");
    }
  }
);
}
Program: 147263
Project: 147263
Buggy source:
public void testChangeText(){
}

Fixed version (ground truth):
public void testChangeText(){
  assertEquals("String_Node_Str","String_Node_Str");
}
Program: 147264
Project: 147264
Buggy source:
public WatsiMainActivityTest(){
  super(MainActivity.class);
}

Fixed version (ground truth):
public WatsiMainActivityTest(){
  super(WatsiMainActivity.class);
}
Program: 147265
Project: 147265
Buggy source:
@Override protected void setUp() throws Exception {
  super.setUp();
}

Fixed version (ground truth):
@Override protected void setUp() throws Exception {
  super.setUp();
  mainActivity=getActivity();
}
Program: 147266
Project: 147266
Buggy source:
@Override protected void setUp() throws Exception {
}

Fixed version (ground truth):
@Override protected void setUp() throws Exception {
  super.setUp();
}
Program: 147269
Project: 147269
Buggy source:
@Override public Conditional<Instruction> apply(FeatureExpr ctx,Integer objref){
  if (objref == MJIEnv.NULL) {
  }
 else {
    boolean isValid=false;
    if (Types.isReferenceSignature(type)) {
      String t;
      if (Types.isArray(type)) {
        t=Types.getComponentTerminal(type);
      }
 else {
        t=type;
      }
      try {
        ti.resolveReferencedClass(t);
      }
 catch (      LoadOnJPFRequired lre) {
        return ti.getPC();
      }
    }
    ElementInfo e=ti.getElementInfo(objref);
    ClassInfo eci=e.getClassInfo();
    if (type.charAt(0) == '[') {
      String arrayType=type;
      ClassInfo cci=eci;
      while (true) {
        if (cci.isArray()) {
          cci=cci.getComponentClassInfo();
          arrayType=arrayType.substring(1);
        }
 else {
          break;
        }
        if (arrayType.charAt(0) != '[') {
          isValid=cci.isInstanceOf(arrayType);
          break;
        }
      }
    }
 else {
      isValid=e.getClassInfo().isInstanceOf(type);
    }
    if (!isValid) {
      return new One<>(new EXCEPTION(ClassCastException.class.getName(),e.getClassInfo().getName() + "String_Node_Str" + type));
    }
  }
  return getNext(ctx,ti);
}

Fixed version (ground truth):
@Override public Conditional<Instruction> apply(FeatureExpr ctx,Integer objref){
  if (objref == MJIEnv.NULL) {
  }
 else {
    boolean isValid=false;
    if (Types.isReferenceSignature(type)) {
      String t;
      if (Types.isArray(type)) {
        t=Types.getComponentTerminal(type);
      }
 else {
        t=type;
      }
      try {
        ti.resolveReferencedClass(t);
      }
 catch (      LoadOnJPFRequired lre) {
        return ti.getPC();
      }
    }
    ElementInfo e=ti.getElementInfo(objref);
    ClassInfo eci=e.getClassInfo();
    if (type.charAt(0) == '[') {
      String arrayType=type;
      ClassInfo cci=eci;
      while (true) {
        if (cci.isArray()) {
          cci=cci.getComponentClassInfo();
          arrayType=arrayType.substring(1);
        }
 else {
          break;
        }
        if (arrayType.charAt(0) != '[') {
          isValid=cci.isInstanceOf(arrayType);
          break;
        }
      }
    }
 else {
      isValid=e.getClassInfo().isInstanceOf(type);
    }
    if (!isValid) {
      return new One<>(new EXCEPTION(CHECKCAST.this,ClassCastException.class.getName(),e.getClassInfo().getName() + "String_Node_Str" + type));
    }
  }
  return getNext(ctx,ti);
}
Program: 147271
Project: 147271
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override protected void pushValue(FeatureExpr ctx,StackFrame frame,Conditional value){
  frame.pushDouble(ctx,value);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override protected void pushValue(FeatureExpr ctx,StackFrame frame,Conditional value){
  frame.pushLong(ctx,value.simplify(ctx));
}
Program: 147272
Project: 147272
Buggy source:
@Override public FeatureExpr getContextOf(Function<T,Boolean> function){
  FeatureExpr result=FeatureExprFactory.False();
  for (  Entry<T,FeatureExpr> element : map.entrySet()) {
    if (function.apply(element.getKey())) {
      return or(result,element.getValue());
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public FeatureExpr getContextOf(Function<T,Boolean> function){
  FeatureExpr result=FeatureExprFactory.False();
  for (  Entry<T,FeatureExpr> element : map.entrySet()) {
    if (function.apply(element.getKey())) {
      result=or(result,element.getValue());
    }
  }
  return result;
}
Program: 147273
Project: 147273
Buggy source:
@Override public FeatureExpr getContextOf(Function<T,Boolean> function){
  if (function.apply(value)) {
    return FeatureExprFactory.True();
  }
 else {
    return FeatureExprFactory.False();
  }
}

Fixed version (ground truth):
@Override public FeatureExpr getContextOf(Function<T,Boolean> function){
  return function.apply(value) ? FeatureExprFactory.True() : FeatureExprFactory.False();
}
Program: 147274
Project: 147274
Buggy source:
@Override public FeatureExpr getContextOf(Function<T,Boolean> function){
  return or(and(featureExpr,thenBranch.getContextOf(function)),and(featureExpr,elseBranch.getContextOf(function)));
}

Fixed version (ground truth):
@Override public FeatureExpr getContextOf(Function<T,Boolean> function){
  return or(and(featureExpr,thenBranch.getContextOf(function)),and(not(featureExpr),elseBranch.getContextOf(function)));
}
Program: 147275
Project: 147275
Buggy source:
@Override public final void accept(InstructionVisitor insVisitor){
  try {
    InstructionVisitor.class.getMethod("String_Node_Str",this.getClass()).invoke(insVisitor,this);
  }
 catch (  ReflectiveOperationException|SecurityException|InvocationTargetException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public final void accept(InstructionVisitor insVisitor){
  try {
    InstructionVisitor.class.getMethod("String_Node_Str",this.getClass()).invoke(insVisitor,this);
  }
 catch (  IllegalAccessException|NoSuchMethodException|SecurityException|InvocationTargetException e) {
    e.printStackTrace();
  }
}