nus-yam/ex-repair huggingface dataset:
Program: 33598
Project: 33598
Buggy source:
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  RenderableModel child=mGroups.get(groupPosition).children.get(childPosition);
  if (child instanceof Match) {
    ((Match)child).setSelectedTeam(mTeamKey);
  }
  ListItem renderedChild=child.render(mRendererSupplier);
  if (renderedChild != null) {
    return renderedChild.getView(mActivity,mInflater,convertView);
  }
 else {
    return new LabelValueListItem("String_Node_Str","String_Node_Str").getView(mActivity,mInflater,convertView);
  }
}

Fixed version (ground truth):
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  if (groupPosition >= mGroups.size() || childPosition >= mGroups.get(groupPosition).children.size()) {
    return new LabelValueListItem("String_Node_Str","String_Node_Str").getView(mActivity,mInflater,convertView);
  }
  RenderableModel child=mGroups.get(groupPosition).children.get(childPosition);
  if (child instanceof Match) {
    ((Match)child).setSelectedTeam(mTeamKey);
  }
  ListItem renderedChild=child.render(mRendererSupplier);
  if (renderedChild != null) {
    return renderedChild.getView(mActivity,mInflater,convertView);
  }
 else {
    return new LabelValueListItem("String_Node_Str","String_Node_Str").getView(mActivity,mInflater,convertView);
  }
}
Program: 33600
Project: 33600
Buggy source:
public void hideFab(boolean animate){
  if (!mFabVisible) {
    return;
  }
  mFabVisible=false;
  if (mRunningFabAnimation != null) {
    mRunningFabAnimation.cancel();
  }
  if (!animate) {
    mToggleSettingsPanelButton.setVisibility(View.GONE);
    return;
  }
  ValueAnimator fabScaleDown=ValueAnimator.ofFloat(1,0);
  fabScaleDown.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationStart(    Animator animation){
      mToggleSettingsPanelButton.setVisibility(View.VISIBLE);
    }
    @Override public void onAnimationEnd(    Animator animation){
      mToggleSettingsPanelButton.setVisibility(View.GONE);
    }
  }
);
  fabScaleDown.addUpdateListener(animation -> {
    ViewCompat.setScaleX(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
    ViewCompat.setScaleY(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
  }
);
  fabScaleDown.setDuration(FAB_ANIMATION_DURATION);
  fabScaleDown.setInterpolator(new AccelerateInterpolator());
  fabScaleDown.start();
  mRunningFabAnimation=fabScaleDown;
}

Fixed version (ground truth):
protected void hideFab(boolean animate){
  if (!mFabVisible) {
    return;
  }
  mFabVisible=false;
  if (mRunningFabAnimation != null) {
    mRunningFabAnimation.cancel();
  }
  if (!animate) {
    mToggleSettingsPanelButton.setVisibility(View.GONE);
    return;
  }
  ValueAnimator fabScaleDown=ValueAnimator.ofFloat(1,0);
  fabScaleDown.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationStart(    Animator animation){
      mToggleSettingsPanelButton.setVisibility(View.VISIBLE);
    }
    @Override public void onAnimationEnd(    Animator animation){
      mToggleSettingsPanelButton.setVisibility(View.GONE);
    }
  }
);
  fabScaleDown.addUpdateListener(animation -> {
    ViewCompat.setScaleX(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
    ViewCompat.setScaleY(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
  }
);
  fabScaleDown.setDuration(FAB_ANIMATION_DURATION);
  fabScaleDown.setInterpolator(new AccelerateInterpolator());
  fabScaleDown.start();
  mRunningFabAnimation=fabScaleDown;
}
Program: 33602
Project: 33602
Buggy source:
public void showFab(boolean animate,boolean overrideMyTbaCheck){
  if (mFabVisible) {
    return;
  }
  if (!mIsMyTBAEnabled && !overrideMyTbaCheck) {
    hideFab(false);
    return;
  }
  mFabVisible=true;
  if (mRunningFabAnimation != null) {
    mRunningFabAnimation.cancel();
  }
  if (!animate) {
    mToggleSettingsPanelButton.setVisibility(View.GONE);
    return;
  }
  ValueAnimator fabScaleUp=ValueAnimator.ofFloat(0,1);
  fabScaleUp.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationStart(    Animator animation){
      mToggleSettingsPanelButton.setVisibility(View.VISIBLE);
    }
  }
);
  fabScaleUp.addUpdateListener(animation -> {
    ViewCompat.setScaleX(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
    ViewCompat.setScaleY(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
  }
);
  fabScaleUp.setDuration(FAB_ANIMATION_DURATION);
  fabScaleUp.setInterpolator(new DecelerateInterpolator());
  fabScaleUp.start();
  mRunningFabAnimation=fabScaleUp;
}

Fixed version (ground truth):
/** 
 * Will
 * @param animate
 */
protected void showFab(boolean animate){
  if (mFabVisible) {
    return;
  }
  mFabVisible=true;
  if (mRunningFabAnimation != null) {
    mRunningFabAnimation.cancel();
  }
  if (!animate) {
    mToggleSettingsPanelButton.setVisibility(View.VISIBLE);
    mToggleSettingsPanelButton.setScaleX(1.0f);
    mToggleSettingsPanelButton.setScaleY(1.0f);
    return;
  }
  ValueAnimator fabScaleUp=ValueAnimator.ofFloat(0,1);
  fabScaleUp.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationStart(    Animator animation){
      mToggleSettingsPanelButton.setVisibility(View.VISIBLE);
    }
  }
);
  fabScaleUp.addUpdateListener(animation -> {
    ViewCompat.setScaleX(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
    ViewCompat.setScaleY(mToggleSettingsPanelButton,(float)animation.getAnimatedValue());
  }
);
  fabScaleUp.setDuration(FAB_ANIMATION_DURATION);
  fabScaleUp.setInterpolator(new DecelerateInterpolator());
  fabScaleUp.start();
  mRunningFabAnimation=fabScaleUp;
}
Program: 33603
Project: 33603
Buggy source:
@Override public void onPageSelected(int position){
  if (mOptionsMenu != null) {
    if (position == Arrays.binarySearch(mAdapter.TITLES,"String_Node_Str")) {
      mOptionsMenu.findItem(R.id.stats_help).setVisible(true);
    }
 else {
      mOptionsMenu.findItem(R.id.stats_help).setVisible(false);
    }
  }
  if (position != 0) {
    hideFab(true);
  }
 else {
    showFab(true,false);
  }
}

Fixed version (ground truth):
@Override public void onPageSelected(int position){
  if (mOptionsMenu != null) {
    if (position == Arrays.binarySearch(mAdapter.TITLES,"String_Node_Str")) {
      mOptionsMenu.findItem(R.id.stats_help).setVisible(true);
    }
 else {
      mOptionsMenu.findItem(R.id.stats_help).setVisible(false);
    }
  }
  if (position != 0) {
    hideFab(true);
  }
 else {
    syncFabVisibilityWithMyTbaEnabled(true);
  }
}
Program: 33604
Project: 33604
Buggy source:
@Override public void onPageSelected(int position){
  if (mOptionsMenu != null) {
    MenuItem pointsHelp=mOptionsMenu.findItem(R.id.points_help);
    if (position == 1) {
      pointsHelp.setVisible(true);
    }
 else {
      pointsHelp.setVisible(false);
    }
  }
  if (position != 0) {
    hideFab(true);
  }
 else {
    showFab(true,false);
  }
}

Fixed version (ground truth):
@Override public void onPageSelected(int position){
  if (mOptionsMenu != null) {
    MenuItem pointsHelp=mOptionsMenu.findItem(R.id.points_help);
    if (position == 1) {
      pointsHelp.setVisible(true);
    }
 else {
      pointsHelp.setVisible(false);
    }
  }
  if (position != 0) {
    hideFab(true);
  }
 else {
    syncFabVisibilityWithMyTbaEnabled(true);
  }
}
Program: 33605
Project: 33605
Buggy source:
@Override public void onPageSelected(int position){
  mSelectedTab=position;
  if (position != ViewEventFragmentPagerAdapter.TAB_INFO) {
    hideFab(true);
  }
 else {
    showFab(true,false);
  }
}

Fixed version (ground truth):
@Override public void onPageSelected(int position){
  mSelectedTab=position;
  if (position != ViewEventFragmentPagerAdapter.TAB_INFO) {
    hideFab(true);
  }
 else {
    syncFabVisibilityWithMyTbaEnabled(true);
  }
}
Program: 33606
Project: 33606
Buggy source:
@Override public void onPageSelected(int position){
  mSelectedTab=position;
switch (position) {
case ViewTeamFragmentPagerAdapter.TAB_INFO:
    setupFabForMyTbaSettingsTab();
  showFab(true,false);
break;
case ViewTeamFragmentPagerAdapter.TAB_MEDIA:
showFab(true,true);
setFabColor(R.color.accent);
setFabDrawable(R.drawable.ic_add_a_photo_white_24dp);
break;
default :
hideFab(true);
break;
}
}

Fixed version (ground truth):
@Override public void onPageSelected(int position){
  mSelectedTab=position;
switch (position) {
case ViewTeamFragmentPagerAdapter.TAB_INFO:
    syncFabVisibilityWithMyTbaEnabled(true);
  setupFabForMyTbaSettingsTab();
break;
case ViewTeamFragmentPagerAdapter.TAB_MEDIA:
syncFabVisibilityWithMyTbaEnabled(true);
setFabColor(R.color.accent);
setFabDrawable(R.drawable.ic_add_a_photo_white_24dp);
break;
default :
hideFab(true);
break;
}
}
Program: 33607
Project: 33607
Buggy source:
protected void showLastMatch(MatchListElement match){
  lastMatchView.setVisibility(View.VISIBLE);
  lastMatchContainer.setVisibility(View.VISIBLE);
  lastMatchView.removeAllViews();
  lastMatchView.addView(match.getView(mActivity,mInflater,null));
}

Fixed version (ground truth):
protected void showLastMatch(MatchListElement match){
  if (!mAreViewsBound) {
    bindViews();
  }
  lastMatchView.setVisibility(View.VISIBLE);
  lastMatchContainer.setVisibility(View.VISIBLE);
  lastMatchView.removeAllViews();
  lastMatchView.addView(match.getView(mActivity,mInflater,null));
}
Program: 33608
Project: 33608
Buggy source:
@Override public void unbind(boolean unbindViews){
  super.unbind(unbindViews);
  if (unbindViews) {
    ButterKnife.unbind(this);
  }
}

Fixed version (ground truth):
@Override public void unbind(boolean unbindViews){
  super.unbind(unbindViews);
  if (unbindViews) {
    ButterKnife.unbind(this);
    mAreViewsBound=false;
  }
}
Program: 33609
Project: 33609
Buggy source:
@Inject public EventInfoBinder(MatchRenderer renderer,SocialClickListener socialClickListener,EventInfoContainerClickListener eventInfoContainerClickListener){
  mSocialClickListener=socialClickListener;
  mInfoClickListener=eventInfoContainerClickListener;
  mMatchRenderer=renderer;
}

Fixed version (ground truth):
@Inject public EventInfoBinder(MatchRenderer renderer,SocialClickListener socialClickListener,EventInfoContainerClickListener eventInfoContainerClickListener){
  mSocialClickListener=socialClickListener;
  mInfoClickListener=eventInfoContainerClickListener;
  mMatchRenderer=renderer;
  mIsLive=false;
  mAreViewsBound=false;
}
Program: 33610
Project: 33610
Buggy source:
protected void showNextMatch(MatchListElement match){
  nextMatchView.setVisibility(View.VISIBLE);
  nextMatchContainer.setVisibility(View.VISIBLE);
  nextMatchView.removeAllViews();
  nextMatchView.addView(match.getView(mActivity,mInflater,null));
}

Fixed version (ground truth):
protected void showNextMatch(MatchListElement match){
  if (!mAreViewsBound) {
    bindViews();
  }
  nextMatchView.setVisibility(View.VISIBLE);
  nextMatchContainer.setVisibility(View.VISIBLE);
  nextMatchView.removeAllViews();
  nextMatchView.addView(match.getView(mActivity,mInflater,null));
}
Program: 33611
Project: 33611
Buggy source:
@Override public void bindViews(){
  ButterKnife.bind(this,mRootView);
}

Fixed version (ground truth):
@Override public void bindViews(){
  if (!mAreViewsBound) {
    ButterKnife.bind(this,mRootView);
    mAreViewsBound=true;
  }
}
Program: 33612
Project: 33612
Buggy source:
@Override public void updateData(@Nullable Integer data){
  viewPager.post(() -> {
    viewPager.setAdapter(new TeamListFragmentPagerAdapter(fragmentManager,data == null ? 0 : data));
    tabs.setViewPager(viewPager);
    viewPager.setCurrentItem(mInitialTab);
  }
);
}

Fixed version (ground truth):
@Override public void updateData(@Nullable Integer data){
  if (data != null && oldData != null && data.equals(oldData)) {
    return;
  }
  viewPager.post(() -> {
    viewPager.setAdapter(new TeamListFragmentPagerAdapter(fragmentManager,data == null ? 0 : data));
    tabs.setViewPager(viewPager);
    viewPager.setCurrentItem(mInitialTab);
  }
);
  oldData=data;
}
Program: 33613
Project: 33613
Buggy source:
@Override public int getGroupCount(){
  return groups.size();
}

Fixed version (ground truth):
@Override public int getGroupCount(){
  return mGroups.size();
}
Program: 33614
Project: 33614
Buggy source:
@Override public Object getChild(int groupPosition,int childPosition){
  return groups.get(groupPosition).children.get(childPosition);
}

Fixed version (ground truth):
@Override public Object getChild(int groupPosition,int childPosition){
  return mGroups.get(groupPosition).children.get(childPosition);
}
Program: 33615
Project: 33615
Buggy source:
@Override public View getGroupView(int groupPosition,boolean isExpanded,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=inflater.inflate(R.layout.expandable_list_group,null);
  }
  ListGroup group=(ListGroup)getGroup(groupPosition);
  ((TextView)convertView.findViewById(R.id.group_name)).setText(group.string);
  return convertView;
}

Fixed version (ground truth):
@Override public View getGroupView(int groupPosition,boolean isExpanded,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=mInflater.inflate(R.layout.expandable_list_group,null);
  }
  ListGroup group=(ListGroup)getGroup(groupPosition);
  ((TextView)convertView.findViewById(R.id.group_name)).setText(group.string);
  return convertView;
}
Program: 33616
Project: 33616
Buggy source:
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  return groups.get(groupPosition).children.get(childPosition).render(mRendererSupplier).getView(mActivity,inflater,convertView);
}

Fixed version (ground truth):
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  return mGroups.get(groupPosition).children.get(childPosition).render(mRendererSupplier).getView(mActivity,mInflater,convertView);
}
Program: 33617
Project: 33617
Buggy source:
@Override public int getChildrenCount(int groupPosition){
  if (groups == null || groups.get(groupPosition) == null)   return 0;
  return groups.get(groupPosition).children.size();
}

Fixed version (ground truth):
@Override public int getChildrenCount(int groupPosition){
  if (mGroups == null || mGroups.get(groupPosition) == null)   return 0;
  return mGroups.get(groupPosition).children.size();
}
Program: 33618
Project: 33618
Buggy source:
@Override public Object getGroup(int groupPosition){
  return groups.get(groupPosition);
}

Fixed version (ground truth):
@Override public Object getGroup(int groupPosition){
  return mGroups.get(groupPosition);
}
Program: 33619
Project: 33619
Buggy source:
public void addGroup(ListGroup group){
  groups.add(group);
}

Fixed version (ground truth):
public void addGroup(ListGroup group){
  mGroups.add(group);
}
Program: 33620
Project: 33620
Buggy source:
public ExpandableListViewAdapter(Activity activity,ModelRendererSupplier supplier,List<ListGroup> groups){
  mActivity=activity;
  mRendererSupplier=supplier;
  this.groups=groups;
  inflater=activity.getLayoutInflater();
}

Fixed version (ground truth):
public ExpandableListViewAdapter(Activity activity,ModelRendererSupplier supplier,List<ListGroup> groups){
  mActivity=activity;
  mRendererSupplier=supplier;
  mGroups=groups;
  mInflater=activity.getLayoutInflater();
}
Program: 33621
Project: 33621
Buggy source:
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  RenderableModel child=groups.get(groupPosition).children.get(childPosition);
  if (child instanceof Match) {
    ((Match)child).setSelectedTeam(mTeamKey);
  }
  ListItem renderedChild=child.render(mRendererSupplier);
  if (renderedChild != null) {
    return renderedChild.getView(mActivity,inflater,convertView);
  }
 else {
    return new LabelValueListItem("String_Node_Str","String_Node_Str").getView(mActivity,inflater,convertView);
  }
}

Fixed version (ground truth):
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  RenderableModel child=mGroups.get(groupPosition).children.get(childPosition);
  if (child instanceof Match) {
    ((Match)child).setSelectedTeam(mTeamKey);
  }
  ListItem renderedChild=child.render(mRendererSupplier);
  if (renderedChild != null) {
    return renderedChild.getView(mActivity,mInflater,convertView);
  }
 else {
    return new LabelValueListItem("String_Node_Str","String_Node_Str").getView(mActivity,mInflater,convertView);
  }
}
Program: 33622
Project: 33622
Buggy source:
@Override public void updateData(@Nullable List<ListGroup> data){
  if (data == null || expandableListView == null) {
    setDataBound(false);
    return;
  }
  if (data.isEmpty()) {
    Log.d(Constants.LOG_TAG,"String_Node_Str");
    setDataBound(false);
    return;
  }
  ExpandableListViewAdapter adapter=newAdapter(ImmutableList.copyOf(data));
  expandableListView.setAdapter(adapter);
  adapter.notifyDataSetChanged();
  expandableListView.setVisibility(View.VISIBLE);
  expandForMode(data);
  if (progressBar != null) {
    progressBar.setVisibility(View.GONE);
  }
  expandableListView.setVisibility(View.VISIBLE);
  mNoDataBinder.unbindData();
  setDataBound(true);
}

Fixed version (ground truth):
@Override public void updateData(@Nullable List<ListGroup> data){
  if (data == null || expandableListView == null) {
    setDataBound(false);
    return;
  }
  if (data.isEmpty()) {
    Log.d(Constants.LOG_TAG,"String_Node_Str");
    setDataBound(false);
    return;
  }
  if (mAdapter == null) {
    mAdapter=newAdapter(new ArrayList<>(data));
    expandableListView.setAdapter(mAdapter);
  }
 else {
    mAdapter.removeAllGroups();
    mAdapter.addAllGroups(new ArrayList<>(data));
    mAdapter.notifyDataSetChanged();
  }
  expandableListView.setVisibility(View.VISIBLE);
  expandForMode(data);
  if (progressBar != null) {
    progressBar.setVisibility(View.GONE);
  }
  mNoDataBinder.unbindData();
  setDataBound(true);
}
Program: 33623
Project: 33623
Buggy source:
@Override public void updateData(@Nullable List<ListItem> data){
  if (data == null || listView == null) {
    setDataBound(false);
    return;
  }
  if (data.isEmpty()) {
    setDataBound(false);
    return;
  }
  long startTime=System.currentTimeMillis();
  Log.d(Constants.LOG_TAG,"String_Node_Str");
  if (mAdapter == null) {
    mAdapter=newAdapter(data);
    listView.setAdapter(mAdapter);
  }
 else {
    mAdapter.clear();
    mAdapter.addAll(data);
    mAdapter.notifyDataSetChanged();
  }
  if (progressBar != null) {
    progressBar.setVisibility(View.GONE);
  }
  listView.setVisibility(View.VISIBLE);
  mNoDataBinder.unbindData();
  Log.d(Constants.LOG_TAG,"String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  setDataBound(true);
}

Fixed version (ground truth):
@Override public void updateData(@Nullable List<ListItem> data){
  if (data == null || listView == null) {
    setDataBound(false);
    return;
  }
  if (data.isEmpty()) {
    setDataBound(false);
    return;
  }
  long startTime=System.currentTimeMillis();
  Log.d(Constants.LOG_TAG,"String_Node_Str");
  if (mAdapter == null) {
    mAdapter=newAdapter(new ArrayList<>(data));
    listView.setAdapter(mAdapter);
  }
 else {
    mAdapter.clear();
    mAdapter.addAll(new ArrayList<>(data));
    mAdapter.notifyDataSetChanged();
  }
  if (progressBar != null) {
    progressBar.setVisibility(View.GONE);
  }
  listView.setVisibility(View.VISIBLE);
  mNoDataBinder.unbindData();
  Log.d(Constants.LOG_TAG,"String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  setDataBound(true);
}
Program: 33626
Project: 33626
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
  mRenderer.renderAlliances(mAPIData,mDataToBind);
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  mRenderer.renderAlliances(mAPIData,mDataToBind);
}
Program: 33627
Project: 33627
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null || mAPIData.isEmpty()) {
    return;
  }
  Map<String,Team> teams=Utilities.getMapForPlatform(String.class,Team.class);
  for (int i=0; i < mAPIData.size(); i++) {
    Award award=mAPIData.get(i);
    for (    JsonElement winner : award.getWinners()) {
      if (winner.isJsonObject() && !winner.getAsJsonObject().get("String_Node_Str").isJsonNull()) {
        String teamKey="String_Node_Str" + winner.getAsJsonObject().get("String_Node_Str");
        Team team=mDb.getTeamsTable().get(teamKey);
        teams.put(teamKey,team);
      }
    }
    AwardRenderer.RenderArgs args=new AwardRenderer.RenderArgs(teams,mTeamKey);
    mDataToBind.add(mRenderer.renderFromModel(award,args));
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null || mAPIData.isEmpty()) {
    return;
  }
  mDataToBind.clear();
  Map<String,Team> teams=Utilities.getMapForPlatform(String.class,Team.class);
  for (int i=0; i < mAPIData.size(); i++) {
    Award award=mAPIData.get(i);
    for (    JsonElement winner : award.getWinners()) {
      if (winner.isJsonObject() && !winner.getAsJsonObject().get("String_Node_Str").isJsonNull()) {
        String teamKey="String_Node_Str" + winner.getAsJsonObject().get("String_Node_Str");
        Team team=mDb.getTeamsTable().get(teamKey);
        teams.put(teamKey,team);
      }
    }
    AwardRenderer.RenderArgs args=new AwardRenderer.RenderArgs(teams,mTeamKey);
    mDataToBind.add(mRenderer.renderFromModel(award,args));
  }
}
Program: 33628
Project: 33628
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null || !mAPIData.isJsonArray()) {
    return;
  }
  JsonArray data=mAPIData.getAsJsonArray();
  for (  JsonElement e : data) {
    JsonObject user=e.getAsJsonObject();
    String username=user.get("String_Node_Str").getAsString();
    int contributionCount=user.get("String_Node_Str").getAsInt();
    String avatarUrl=user.get("String_Node_Str").getAsString();
    mDataToBind.add(new ContributorListElement(username,contributionCount,avatarUrl));
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null || !mAPIData.isJsonArray()) {
    return;
  }
  mDataToBind.clear();
  JsonArray data=mAPIData.getAsJsonArray();
  for (  JsonElement e : data) {
    JsonObject user=e.getAsJsonObject();
    String username=user.get("String_Node_Str").getAsString();
    int contributionCount=user.get("String_Node_Str").getAsInt();
    String avatarUrl=user.get("String_Node_Str").getAsString();
    mDataToBind.add(new ContributorListElement(username,contributionCount,avatarUrl));
  }
}
Program: 33629
Project: 33629
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
  for (int i=0; i < mAPIData.size(); i++) {
    District district=mAPIData.get(i);
    int numEvents=getNumEventsForDistrict(district.getKey());
    district.setNumEvents(numEvents);
    DistrictRenderer.RenderArgs args=new DistrictRenderer.RenderArgs(numEvents,false);
    mDataToBind.add(mRenderer.renderFromModel(district,args));
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  for (int i=0; i < mAPIData.size(); i++) {
    District district=mAPIData.get(i);
    int numEvents=getNumEventsForDistrict(district.getKey());
    district.setNumEvents(numEvents);
    DistrictRenderer.RenderArgs args=new DistrictRenderer.RenderArgs(numEvents,false);
    mDataToBind.add(mRenderer.renderFromModel(district,args));
  }
}
Program: 33630
Project: 33630
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null || !mAPIData.isJsonObject()) {
    return;
  }
  JsonObject rankingsData=mAPIData.getAsJsonObject();
  if (!rankingsData.has("String_Node_Str")) {
    return;
  }
  JsonObject points=rankingsData.get("String_Node_Str").getAsJsonObject();
  String districtKey="String_Node_Str";
  Event event=mDb.getEventsTable().get(mEventKey);
  if (event != null) {
    DistrictType type=DistrictType.fromEnum(event.getDistrictEnum());
    boolean isDistrict=type != DistrictType.NO_DISTRICT;
    ((Type)mDataToBind).isDistrict=isDistrict;
    if (isDistrict) {
      districtKey=mEventKey.substring(0,4) + type.getAbbreviation();
    }
  }
  ArrayList<DistrictPointBreakdown> pointBreakdowns=new ArrayList<>();
  for (  Map.Entry<String,JsonElement> teamPoints : points.entrySet()) {
    Team team=mDb.getTeamsTable().get(teamPoints.getKey());
    DistrictPointBreakdown b=mGson.fromJson(teamPoints.getValue(),DistrictPointBreakdown.class);
    b.setTeamKey(teamPoints.getKey());
    b.setTeamName(team != null ? team.getNickname() : "String_Node_Str" + teamPoints.getKey().substring(3));
    b.setDistrictKey(districtKey);
    pointBreakdowns.add(b);
  }
  Collections.sort(pointBreakdowns,new PointBreakdownComparater());
  for (int i=0; i < pointBreakdowns.size(); i++) {
    pointBreakdowns.get(i).setRank(i + 1);
    mDataToBind.add(mRenderer.renderFromModel(pointBreakdowns.get(i),null));
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null || !mAPIData.isJsonObject()) {
    return;
  }
  mDataToBind.clear();
  JsonObject rankingsData=mAPIData.getAsJsonObject();
  if (!rankingsData.has("String_Node_Str")) {
    return;
  }
  JsonObject points=rankingsData.get("String_Node_Str").getAsJsonObject();
  String districtKey="String_Node_Str";
  Event event=mDb.getEventsTable().get(mEventKey);
  if (event != null) {
    DistrictType type=DistrictType.fromEnum(event.getDistrictEnum());
    boolean isDistrict=type != DistrictType.NO_DISTRICT;
    ((Type)mDataToBind).isDistrict=isDistrict;
    if (isDistrict) {
      districtKey=mEventKey.substring(0,4) + type.getAbbreviation();
    }
  }
  ArrayList<DistrictPointBreakdown> pointBreakdowns=new ArrayList<>();
  for (  Map.Entry<String,JsonElement> teamPoints : points.entrySet()) {
    Team team=mDb.getTeamsTable().get(teamPoints.getKey());
    DistrictPointBreakdown b=mGson.fromJson(teamPoints.getValue(),DistrictPointBreakdown.class);
    b.setTeamKey(teamPoints.getKey());
    b.setTeamName(team != null ? team.getNickname() : "String_Node_Str" + teamPoints.getKey().substring(3));
    b.setDistrictKey(districtKey);
    pointBreakdowns.add(b);
  }
  Collections.sort(pointBreakdowns,new PointBreakdownComparater());
  for (int i=0; i < pointBreakdowns.size(); i++) {
    pointBreakdowns.get(i).setRank(i + 1);
    mDataToBind.add(mRenderer.renderFromModel(pointBreakdowns.get(i),null));
  }
}
Program: 33631
Project: 33631
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
  for (int i=0; i < mAPIData.size(); i++) {
    DistrictTeam districtTeam=mAPIData.get(i);
    Team teamData=mDb.getTeamsTable().get(districtTeam.getTeamKey());
    String nickname;
    if (teamData != null) {
      nickname=teamData.getNickname();
    }
 else {
      Log.w(Constants.LOG_TAG,"String_Node_Str" + districtTeam.getTeamKey() + "String_Node_Str");
      nickname="String_Node_Str" + districtTeam.getTeamKey().substring(3);
    }
    mDataToBind.add(new DistrictTeamListElement(districtTeam.getTeamKey(),districtTeam.getDistrictKey(),nickname,districtTeam.getRank(),districtTeam.getTotalPoints()));
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  for (int i=0; i < mAPIData.size(); i++) {
    DistrictTeam districtTeam=mAPIData.get(i);
    Team teamData=mDb.getTeamsTable().get(districtTeam.getTeamKey());
    String nickname;
    if (teamData != null) {
      nickname=teamData.getNickname();
    }
 else {
      Log.w(Constants.LOG_TAG,"String_Node_Str" + districtTeam.getTeamKey() + "String_Node_Str");
      nickname="String_Node_Str" + districtTeam.getTeamKey().substring(3);
    }
    mDataToBind.add(new DistrictTeamListElement(districtTeam.getTeamKey(),districtTeam.getDistrictKey(),nickname,districtTeam.getRank(),districtTeam.getTotalPoints()));
  }
}
Program: 33632
Project: 33632
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind=new Model();
  if (mAPIData == null) {
    return;
  }
  mDataToBind.eventKey=mAPIData.getKey();
  mDataToBind.nameString=mAPIData.getEventName();
  mDataToBind.actionBarTitle=mAPIData.getEventYear() + "String_Node_Str" + mAPIData.getEventShortName();
  mDataToBind.venueString=mAPIData.getVenue();
  mDataToBind.locationString=mAPIData.getLocation();
  mDataToBind.eventWebsite=mAPIData.getWebsite();
  mDataToBind.dateString=mAPIData.getDateString();
  mDataToBind.isLive=mAPIData.isHappeningNow();
  mDataToBind.titleString=mAPIData.getEventYear() + "String_Node_Str" + mAPIData.getEventShortName();
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind=new Model();
  mDataToBind.eventKey=mAPIData.getKey();
  mDataToBind.nameString=mAPIData.getEventName();
  mDataToBind.actionBarTitle=mAPIData.getEventYear() + "String_Node_Str" + mAPIData.getEventShortName();
  mDataToBind.venueString=mAPIData.getVenue();
  mDataToBind.locationString=mAPIData.getLocation();
  mDataToBind.eventWebsite=mAPIData.getWebsite();
  mDataToBind.dateString=mAPIData.getDateString();
  mDataToBind.isLive=mAPIData.isHappeningNow();
  mDataToBind.titleString=mAPIData.getEventYear() + "String_Node_Str" + mAPIData.getEventShortName();
}
Program: 33633
Project: 33633
Buggy source:
@Override public void parseData(){
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
switch (mRenderMode) {
case MODE_WEEK:
default :
    EventHelper.renderEventListForWeek(mAPIData,mDataToBind,mRenderer);
  break;
case MODE_TEAM:
EventHelper.renderEventListForTeam(mAPIData,mDataToBind,mRenderer);
break;
case MODE_DISTRICT:
EventHelper.renderEventListForDistrict(mAPIData,mDataToBind,mRenderer);
break;
}
}

Fixed version (ground truth):
@Override public void parseData(){
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
switch (mRenderMode) {
case MODE_WEEK:
default :
    EventHelper.renderEventListForWeek(mAPIData,mDataToBind,mRenderer);
  break;
case MODE_TEAM:
EventHelper.renderEventListForTeam(mAPIData,mDataToBind,mRenderer);
break;
case MODE_DISTRICT:
EventHelper.renderEventListForDistrict(mAPIData,mDataToBind,mRenderer);
break;
}
}
Program: 33634
Project: 33634
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null || mAPIData.isEmpty()) {
    return;
  }
  Collections.sort(mAPIData,mEventComparator);
  Calendar cal=Calendar.getInstance();
  int lastEventWeek=-1;
  int lastEventMonth=-1;
  for (int i=0; i < mAPIData.size(); i++) {
    Event event=mAPIData.get(i);
    cal.setTime(event.getStartDate());
    int competitionWeek=event.getCompetitionWeek();
    int month=cal.get(Calendar.MONTH);
    boolean isOffseason=event.getEventType() == EventType.OFFSEASON;
    if (isOffseason ? lastEventMonth != month : lastEventWeek != competitionWeek) {
      mDataToBind.add(new EventWeekTab(competitionWeek,isOffseason ? month : -1,EventHelper.generateLabelForEvent(event)));
      lastEventMonth=month;
      lastEventWeek=competitionWeek;
    }
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null || mAPIData.isEmpty()) {
    return;
  }
  mDataToBind.clear();
  Collections.sort(mAPIData,mEventComparator);
  Calendar cal=Calendar.getInstance();
  int lastEventWeek=-1;
  int lastEventMonth=-1;
  for (int i=0; i < mAPIData.size(); i++) {
    Event event=mAPIData.get(i);
    cal.setTime(event.getStartDate());
    int competitionWeek=event.getCompetitionWeek();
    int month=cal.get(Calendar.MONTH);
    boolean isOffseason=event.getEventType() == EventType.OFFSEASON;
    if (isOffseason ? lastEventMonth != month : lastEventWeek != competitionWeek) {
      mDataToBind.add(new EventWeekTab(competitionWeek,isOffseason ? month : -1,EventHelper.generateLabelForEvent(event)));
      lastEventMonth=month;
      lastEventWeek=competitionWeek;
    }
  }
}
Program: 33635
Project: 33635
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
  int lastModel=-1;
  Collections.sort(mAPIData,mComparator);
  for (int i=0; i < mAPIData.size(); i++) {
    Favorite favorite=mAPIData.get(i);
    ListItem item=mRenderer.renderFromKey(favorite.getModelKey(),favorite.getModelType(),null);
    if (item != null) {
      if (lastModel != favorite.getModelEnum()) {
        mDataToBind.add(new EventTypeHeader(favorite.getModelType().getTitle()));
      }
      mDataToBind.add(item);
    }
    lastModel=favorite.getModelEnum();
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  int lastModel=-1;
  Collections.sort(mAPIData,mComparator);
  for (int i=0; i < mAPIData.size(); i++) {
    Favorite favorite=mAPIData.get(i);
    ListItem item=mRenderer.renderFromKey(favorite.getModelKey(),favorite.getModelType(),null);
    if (item != null) {
      if (lastModel != favorite.getModelEnum()) {
        mDataToBind.add(new EventTypeHeader(favorite.getModelType().getTitle()));
      }
      mDataToBind.add(item);
    }
    lastModel=favorite.getModelEnum();
  }
}
Program: 33636
Project: 33636
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null || mAPIData.event == null || mAPIData.match == null) {
    return;
  }
  mDataToBind.add(mRenderer.renderFromModel(mAPIData.match,MatchRenderer.RENDER_MATCH_INFO));
  mMatchTitle=mAPIData.match.getTitle();
  mMatchKey=mAPIData.match.getKey();
  JsonArray matchVideos=mAPIData.match.getVideos();
  for (int i=0; i < matchVideos.size(); i++) {
    JsonElement video=matchVideos.get(i);
    if (MediaType.fromString(video.getAsJsonObject().get("String_Node_Str").getAsString()) != MediaType.NONE) {
      Media media=mGson.fromJson(video,Media.class);
      mDataToBind.add(mMediaRenderer.renderFromModel(media,null));
    }
  }
  updateActionBarTitle(mAPIData.event.getEventShortName());
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null || mAPIData.event == null || mAPIData.match == null) {
    return;
  }
  mDataToBind.clear();
  mDataToBind.add(mRenderer.renderFromModel(mAPIData.match,MatchRenderer.RENDER_MATCH_INFO));
  mMatchTitle=mAPIData.match.getTitle();
  mMatchKey=mAPIData.match.getKey();
  JsonArray matchVideos=mAPIData.match.getVideos();
  for (int i=0; i < matchVideos.size(); i++) {
    JsonElement video=matchVideos.get(i);
    if (MediaType.fromString(video.getAsJsonObject().get("String_Node_Str").getAsString()) != MediaType.NONE) {
      Media media=mGson.fromJson(video,Media.class);
      mDataToBind.add(mMediaRenderer.renderFromModel(media,null));
    }
  }
  updateActionBarTitle(mAPIData.event.getEventShortName());
}
Program: 33638
Project: 33638
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  mCdPhotos.clear();
  mYtVideos.clear();
  if (mAPIData == null) {
    return;
  }
  for (int i=0; i < mAPIData.size(); i++) {
    Media media=mAPIData.get(i);
switch (media.getMediaType()) {
case CD_PHOTO_THREAD:
      mCdPhotos.children.add(media);
    break;
case YOUTUBE:
  mYtVideos.children.add(media);
break;
}
}
if (!mCdPhotos.children.isEmpty()) {
mDataToBind.add(mCdPhotos);
}
if (!mYtVideos.children.isEmpty()) {
mDataToBind.add(mYtVideos);
}
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  mCdPhotos.clear();
  mYtVideos.clear();
  for (int i=0; i < mAPIData.size(); i++) {
    Media media=mAPIData.get(i);
switch (media.getMediaType()) {
case CD_PHOTO_THREAD:
      mCdPhotos.children.add(media);
    break;
case YOUTUBE:
  mYtVideos.children.add(media);
break;
}
}
if (!mCdPhotos.children.isEmpty()) {
mDataToBind.add(mCdPhotos);
}
if (!mYtVideos.children.isEmpty()) {
mDataToBind.add(mYtVideos);
}
}
Program: 33640
Project: 33640
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null || mAPIData.isEmpty()) {
    return;
  }
  for (int i=0; i < mAPIData.size(); i++) {
    StoredNotification notification=mAPIData.get(i);
    BaseNotification renderable=notification.getNotification(mWriter);
    if (renderable != null) {
      renderable.parseMessageData();
      mDataToBind.add(renderable);
    }
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null || mAPIData.isEmpty()) {
    return;
  }
  mDataToBind.clear();
  for (int i=0; i < mAPIData.size(); i++) {
    StoredNotification notification=mAPIData.get(i);
    BaseNotification renderable=notification.getNotification(mWriter);
    if (renderable != null) {
      renderable.parseMessageData();
      mDataToBind.add(renderable);
    }
  }
}
Program: 33642
Project: 33642
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
  Collections.sort(mAPIData,mComparator);
  int lastModel=-1;
  for (int i=0; i < mAPIData.size(); i++) {
    Subscription subscription=mAPIData.get(i);
    ListItem item=mRenderer.renderFromKey(subscription.getModelKey(),subscription.getModelType(),null);
    if (item != null) {
      if (lastModel != subscription.getModelEnum()) {
        mDataToBind.add(new EventTypeHeader(subscription.getModelType().getTitle()));
      }
      mDataToBind.add(item);
    }
    lastModel=subscription.getModelEnum();
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  Collections.sort(mAPIData,mComparator);
  int lastModel=-1;
  for (int i=0; i < mAPIData.size(); i++) {
    Subscription subscription=mAPIData.get(i);
    ListItem item=mRenderer.renderFromKey(subscription.getModelKey(),subscription.getModelType(),null);
    if (item != null) {
      if (lastModel != subscription.getModelEnum()) {
        mDataToBind.add(new EventTypeHeader(subscription.getModelType().getTitle()));
      }
      mDataToBind.add(item);
    }
    lastModel=subscription.getModelEnum();
  }
}
Program: 33646
Project: 33646
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind=new TeamInfoBinder.Model();
  if (mAPIData == null) {
    return;
  }
  mDataToBind.teamKey=mAPIData.getKey();
  mDataToBind.fullName=mAPIData.getFullName();
  mDataToBind.nickname=mAPIData.getNickname();
  mDataToBind.teamNumber=mAPIData.getTeamNumber();
  mDataToBind.location=mAPIData.getLocation();
  if (mAPIData.getParams().containsKey(TeamsTable.WEBSITE)) {
    mDataToBind.website=mAPIData.getWebsite();
  }
 else {
    mDataToBind.website="String_Node_Str";
  }
  if (mAPIData.getParams().containsKey(TeamsTable.MOTTO)) {
    mDataToBind.motto=mAPIData.getMotto();
  }
 else {
    mDataToBind.motto="String_Node_Str";
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind=new TeamInfoBinder.Model();
  mDataToBind.teamKey=mAPIData.getKey();
  mDataToBind.fullName=mAPIData.getFullName();
  mDataToBind.nickname=mAPIData.getNickname();
  mDataToBind.teamNumber=mAPIData.getTeamNumber();
  mDataToBind.location=mAPIData.getLocation();
  if (mAPIData.getParams().containsKey(TeamsTable.WEBSITE)) {
    mDataToBind.website=mAPIData.getWebsite();
  }
 else {
    mDataToBind.website="String_Node_Str";
  }
  if (mAPIData.getParams().containsKey(TeamsTable.MOTTO)) {
    mDataToBind.motto=mAPIData.getMotto();
  }
 else {
    mDataToBind.motto="String_Node_Str";
  }
}
Program: 33647
Project: 33647
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
  Collections.sort(mAPIData,mComparator);
  for (int i=0; i < mAPIData.size(); i++) {
    Team team=mAPIData.get(i);
    if (team == null) {
      continue;
    }
    ListItem item=mRenderer.renderFromModel(team,mRenderMode);
    if (item == null) {
      continue;
    }
    mDataToBind.add(item);
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  Collections.sort(mAPIData,mComparator);
  for (int i=0; i < mAPIData.size(); i++) {
    Team team=mAPIData.get(i);
    if (team == null) {
      continue;
    }
    ListItem item=mRenderer.renderFromModel(team,mRenderMode);
    if (item == null) {
      continue;
    }
    mDataToBind.add(item);
  }
}
Program: 33648
Project: 33648
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null || !mAPIData.isJsonObject()) {
    return;
  }
  JsonObject statsData=mAPIData.getAsJsonObject();
  if (statsData.has("String_Node_Str")) {
    mDataToBind.add(new LabelValueListItem(mResources.getString(R.string.opr_no_colon),Stat.displayFormat.format(statsData.get("String_Node_Str").getAsDouble())));
  }
  if (statsData.has("String_Node_Str")) {
    mDataToBind.add(new LabelValueListItem(mResources.getString(R.string.dpr_no_colon),Stat.displayFormat.format(statsData.get("String_Node_Str").getAsDouble())));
  }
  if (statsData.has("String_Node_Str")) {
    mDataToBind.add(new LabelValueListItem(mResources.getString(R.string.ccwm_no_colon),Stat.displayFormat.format(statsData.get("String_Node_Str").getAsDouble())));
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null || !mAPIData.isJsonObject()) {
    return;
  }
  mDataToBind.clear();
  JsonObject statsData=mAPIData.getAsJsonObject();
  if (statsData.has("String_Node_Str")) {
    mDataToBind.add(new LabelValueListItem(mResources.getString(R.string.opr_no_colon),Stat.displayFormat.format(statsData.get("String_Node_Str").getAsDouble())));
  }
  if (statsData.has("String_Node_Str")) {
    mDataToBind.add(new LabelValueListItem(mResources.getString(R.string.dpr_no_colon),Stat.displayFormat.format(statsData.get("String_Node_Str").getAsDouble())));
  }
  if (statsData.has("String_Node_Str")) {
    mDataToBind.add(new LabelValueListItem(mResources.getString(R.string.ccwm_no_colon),Stat.displayFormat.format(statsData.get("String_Node_Str").getAsDouble())));
  }
}
Program: 33649
Project: 33649
Buggy source:
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  mDataToBind.clear();
  if (mAPIData == null) {
    return;
  }
  Collections.sort(mAPIData,mComparator);
  for (int i=0; i < mAPIData.size(); i++) {
    mDataToBind.addAll(mRenderer.renderWebcasts(mAPIData.get(i)));
  }
}

Fixed version (ground truth):
@Override public void parseData() throws BasicModel.FieldNotDefinedException {
  if (mAPIData == null) {
    return;
  }
  mDataToBind.clear();
  Collections.sort(mAPIData,mComparator);
  for (int i=0; i < mAPIData.size(); i++) {
    mDataToBind.addAll(mRenderer.renderWebcasts(mAPIData.get(i)));
  }
}
Program: 33650
Project: 33650
Buggy source:
@Override public boolean onPrepareOptionsMenu(Menu menu){
  resetActionBar();
switch (mCurrentSelectedNavigationItemId) {
case R.id.nav_item_events:
    setupActionBarForEvents();
  break;
case R.id.nav_item_districts:
setupActionBarForDistricts();
break;
case R.id.nav_item_teams:
getSupportActionBar().setTitle("String_Node_Str");
mToolbar.setContentInsetsAbsolute(Utilities.getPixelsFromDp(this,72),0);
break;
case R.id.nav_item_my_tba:
getSupportActionBar().setTitle("String_Node_Str");
mToolbar.setContentInsetsAbsolute(Utilities.getPixelsFromDp(this,72),0);
break;
}
return super.onPrepareOptionsMenu(menu);
}

Fixed version (ground truth):
@Override public boolean onPrepareOptionsMenu(Menu menu){
  resetActionBar();
switch (mCurrentSelectedNavigationItemId) {
case R.id.nav_item_events:
    setupActionBarForEvents();
  mToolbar.setContentInsetsAbsolute(0,0);
break;
case R.id.nav_item_districts:
setupActionBarForDistricts();
mToolbar.setContentInsetsAbsolute(0,0);
break;
case R.id.nav_item_teams:
getSupportActionBar().setTitle("String_Node_Str");
mToolbar.setContentInsetsAbsolute(Utilities.getPixelsFromDp(this,72),0);
break;
case R.id.nav_item_my_tba:
getSupportActionBar().setTitle("String_Node_Str");
mToolbar.setContentInsetsAbsolute(Utilities.getPixelsFromDp(this,72),0);
break;
}
return super.onPrepareOptionsMenu(menu);
}
Program: 33653
Project: 33653
Buggy source:
public static Retrofit getRetrofit(Gson gson,OkHttpClient okHttpClient,SharedPreferences prefs){
  String baseUrl=Utilities.isDebuggable() ? prefs.getString(APIv2.DEV_TBA_PREF_KEY,APIv2.TBA_URL) : APIv2.TBA_URL;
  Log.d(Constants.LOG_TAG,"String_Node_Str" + baseUrl);
  return new Retrofit.Builder().baseUrl(baseUrl).client(okHttpClient).addConverterFactory(LenientGsonConverterFactory.create(gson)).addCallAdapterFactory(RxJavaCallAdapterFactory.create()).build();
}

Fixed version (ground truth):
public static Retrofit getRetrofit(Gson gson,OkHttpClient okHttpClient,SharedPreferences prefs){
  String baseUrl=Utilities.isDebuggable() ? prefs.getString(APIv2.DEV_TBA_PREF_KEY,APIv2.TBA_URL) : APIv2.TBA_URL;
  baseUrl=baseUrl.isEmpty() ? APIv2.TBA_URL : baseUrl;
  Log.d(Constants.LOG_TAG,"String_Node_Str" + baseUrl);
  return new Retrofit.Builder().baseUrl(baseUrl).client(okHttpClient).addConverterFactory(LenientGsonConverterFactory.create(gson)).addCallAdapterFactory(RxJavaCallAdapterFactory.create()).build();
}
Program: 33654
Project: 33654
Buggy source:
@WorkerThread private void updateTbaStatus(){
  Response<APIStatus> response=mRetrofitAPI.status().toBlocking().first();
  if (!response.isSuccess()) {
    Log.w(Constants.LOG_TAG,"String_Node_Str" + response.code() + "String_Node_Str"+ response.message());
    return;
  }
  APIStatus status=response.body();
  mPrefs.edit().putString(TBAStatusController.STATUS_PREF_KEY,status.getJsonBlob()).apply();
  mEventBus.post(status);
  if (BuildConfig.VERSION_CODE < status.getMinAppVersion()) {
    startActivity(new Intent(this,UpdateRequiredActivity.class));
  }
}

Fixed version (ground truth):
@WorkerThread private void updateTbaStatus(){
  Response<APIStatus> response=null;
  try {
    response=mRetrofitAPI.status().toBlocking().first();
  }
 catch (  Exception ex) {
    Log.w(Constants.LOG_TAG,"String_Node_Str");
    ex.printStackTrace();
    return;
  }
  if (!response.isSuccess()) {
    Log.w(Constants.LOG_TAG,"String_Node_Str" + response.code() + "String_Node_Str"+ response.message());
    return;
  }
  APIStatus status=response.body();
  mPrefs.edit().putString(TBAStatusController.STATUS_PREF_KEY,status.getJsonBlob()).apply();
  mEventBus.post(status);
  if (BuildConfig.VERSION_CODE < status.getMinAppVersion()) {
    startActivity(new Intent(this,UpdateRequiredActivity.class));
  }
}