nus-yam/ex-repair huggingface dataset:
Program: 33655
Project: 33655
Buggy source:
@Override public void setFragmentVisibleAtPosition(int position,boolean visible){
  Fragment f=mFragments.get(getItemId(position)).get();
  if (f != null && f instanceof DatafeedFragment) {
    ((DatafeedFragment)f).setIsCurrentlyVisible(visible);
  }
}

Fixed version (ground truth):
@Override public void setFragmentVisibleAtPosition(int position,boolean visible){
  WeakReference<Fragment> ref=mFragments.get(getItemId(position));
  if (ref == null) {
    return;
  }
  Fragment f=ref.get();
  if (f != null && f instanceof DatafeedFragment) {
    ((DatafeedFragment)f).setIsCurrentlyVisible(visible);
  }
}
Program: 33656
Project: 33656
Buggy source:
@Override public boolean isFragmentAtPositionBound(int position){
  Fragment f=mFragments.get(getItemId(position)).get();
  return f != null && f instanceof DatafeedFragment && ((DatafeedFragment)f).isBound();
}

Fixed version (ground truth):
@Override public boolean isFragmentAtPositionBound(int position){
  WeakReference<Fragment> ref=mFragments.get(getItemId(position));
  if (ref == null) {
    return false;
  }
  Fragment f=mFragments.get(getItemId(position)).get();
  return f != null && f instanceof DatafeedFragment && ((DatafeedFragment)f).isBound();
}
Program: 33657
Project: 33657
Buggy source:
@Override public void bindFragmentAtPosition(int position){
  Fragment f=mFragments.get(getItemId(position)).get();
  if (f != null && f instanceof DatafeedFragment) {
    ((DatafeedFragment)f).bind();
  }
}

Fixed version (ground truth):
@Override public void bindFragmentAtPosition(int position){
  WeakReference<Fragment> ref=mFragments.get(getItemId(position));
  if (ref == null) {
    return;
  }
  Fragment f=mFragments.get(getItemId(position)).get();
  if (f != null && f instanceof DatafeedFragment) {
    ((DatafeedFragment)f).bind();
  }
}
Program: 33659
Project: 33659
Buggy source:
/** 
 * Finds the index in the adapter of the given week. If the week is skipped over, return the next week (assumes sorted adapter items)
 * @return Adapter index containing the week, -1 if not found
 */
private int getIndexForWeek(int week){
  Preconditions.checkState(mViewPager.getAdapter() instanceof EventsByWeekFragmentPagerAdapter,"String_Node_Str");
  List<EventWeekTab> tabs=((EventsByWeekFragmentPagerAdapter)mViewPager.getAdapter()).getTabs();
  for (int i=0; i < tabs.size(); i++) {
    if (tabs.get(i).getWeek() >= week) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * Finds the index in the adapter of the given week. If the week is skipped over, return the next week (assumes sorted adapter items)
 * @return Adapter index containing the week, -1 if not found
 */
private int getIndexForWeek(int week){
  Preconditions.checkState(mViewPager.getAdapter() instanceof EventsByWeekFragmentPagerAdapter,"String_Node_Str");
  List<EventWeekTab> tabs=((EventsByWeekFragmentPagerAdapter)mViewPager.getAdapter()).getTabs();
  for (int i=0; i < tabs.size(); i++) {
    if (tabs.get(i).getWeek() > week) {
      return i - 1;
    }
  }
  return -1;
}
Program: 33661
Project: 33661
Buggy source:
@Override protected void onPreExecute(){
  super.onPreExecute();
  startTime=System.currentTimeMillis();
  showRanks=showStats=false;
  View view=mFragment.getView();
  if (view == null) {
    cancel(true);
    return;
  }
  eventName=(TextView)view.findViewById(R.id.event_name);
  eventDate=(TextView)view.findViewById(R.id.event_date);
  eventLoc=(TextView)view.findViewById(R.id.event_location);
  eventVenue=(TextView)view.findViewById(R.id.event_venue);
  topTeamsContainer=view.findViewById(R.id.event_top_teams_container);
  topOprsContainer=view.findViewById(R.id.event_top_oprs_container);
  topTeams=(TextView)view.findViewById(R.id.event_top_teams);
  topOprs=(TextView)view.findViewById(R.id.event_top_oprs);
}

Fixed version (ground truth):
@Override protected void onPreExecute(){
  super.onPreExecute();
  startTime=System.currentTimeMillis();
  showRanks=showStats=false;
  View view=mFragment.getView();
  if (view == null) {
    cancel(true);
    return;
  }
  eventName=(TextView)view.findViewById(R.id.event_name);
  eventDate=(TextView)view.findViewById(R.id.event_date);
  eventLoc=(TextView)view.findViewById(R.id.event_location);
  eventVenue=(TextView)view.findViewById(R.id.event_venue);
  topTeamsContainer=view.findViewById(R.id.top_teams_container);
  topOprsContainer=view.findViewById(R.id.top_oprs_container);
  topTeams=(TextView)view.findViewById(R.id.top_teams);
  topOprs=(TextView)view.findViewById(R.id.top_oprs);
}
Program: 33664
Project: 33664
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (getArguments() != null) {
    eventKey=getArguments().getString(KEY,"String_Node_Str");
  }
  parent=getActivity();
  if (parent instanceof RefreshableHostActivity) {
    ((RefreshableHostActivity)parent).registerRefreshListener(this);
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (getArguments() != null) {
    mEventKey=getArguments().getString(KEY,"String_Node_Str");
  }
  mActivity=getActivity();
  if (mActivity instanceof RefreshableHostActivity) {
    ((RefreshableHostActivity)mActivity).registerRefreshListener(this);
  }
}
Program: 33665
Project: 33665
Buggy source:
@Override public void onClick(View v){
  int id=v.getId();
  if (id == R.id.event_top_teams_container) {
    ((ViewEventActivity)getActivity()).scrollToTab(ViewEventFragmentPagerAdapter.TAB_RANKINGS);
    return;
  }
 else   if (id == R.id.event_top_oprs_container) {
    ((ViewEventActivity)getActivity()).scrollToTab(ViewEventFragmentPagerAdapter.TAB_STATS);
    return;
  }
 else   if (id == R.id.event_date_container) {
    if (event == null) {
      return;
    }
    return;
  }
  if (v.getTag() != null || !v.getTag().toString().isEmpty()) {
    String uri=v.getTag().toString();
    AnalyticsHelper.sendSocialUpdate(getActivity(),uri,eventKey);
    PackageManager manager=getActivity().getPackageManager();
    Intent i=new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(uri));
    List<ResolveInfo> handlers=manager.queryIntentActivities(i,0);
    if (!handlers.isEmpty()) {
      startActivity(i);
    }
 else {
      Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
  }
}

Fixed version (ground truth):
@Override public void onClick(View v){
  int id=v.getId();
  if (id == R.id.top_teams_container) {
    ((ViewEventActivity)getActivity()).scrollToTab(ViewEventFragmentPagerAdapter.TAB_RANKINGS);
    return;
  }
 else   if (id == R.id.top_oprs_container) {
    ((ViewEventActivity)getActivity()).scrollToTab(ViewEventFragmentPagerAdapter.TAB_STATS);
    return;
  }
  if (v.getTag() != null || !v.getTag().toString().isEmpty()) {
    String uri=v.getTag().toString();
    AnalyticsHelper.sendSocialUpdate(getActivity(),uri,mEventKey);
    PackageManager manager=getActivity().getPackageManager();
    Intent i=new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(uri));
    List<ResolveInfo> handlers=manager.queryIntentActivities(i,0);
    if (!handlers.isEmpty()) {
      startActivity(i);
    }
 else {
      Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
  }
}
Program: 33666
Project: 33666
Buggy source:
@Override public void onDestroy(){
  super.onDestroy();
  ((RefreshableHostActivity)parent).unregisterRefreshListener(this);
}

Fixed version (ground truth):
@Override public void onDestroy(){
  super.onDestroy();
  ((RefreshableHostActivity)mActivity).unregisterRefreshListener(this);
}
Program: 33667
Project: 33667
Buggy source:
@Override public void onRefreshStop(){
  if (task != null) {
    task.cancel(false);
  }
}

Fixed version (ground truth):
@Override public void onRefreshStop(){
  if (mTask != null) {
    mTask.cancel(false);
  }
}
Program: 33668
Project: 33668
Buggy source:
public void updateTask(PopulateEventInfo newTask){
  task=newTask;
}

Fixed version (ground truth):
public void updateTask(PopulateEventInfo newTask){
  mTask=newTask;
}
Program: 33669
Project: 33669
Buggy source:
protected void showLastMatch(MatchListElement match){
  LinearLayout lastLayout=(LinearLayout)getView().findViewById(R.id.event_last_match_container);
  lastLayout.setVisibility(View.VISIBLE);
  if (lastLayout.getChildCount() > 1) {
    lastLayout.removeViewAt(1);
  }
  lastLayout.addView(match.getView(getActivity(),getActivity().getLayoutInflater(),null));
}

Fixed version (ground truth):
protected void showLastMatch(MatchListElement match){
  ViewGroup lastMatchContainer=(ViewGroup)getView().findViewById(R.id.last_match_container);
  FrameLayout lastMatchView=(FrameLayout)getView().findViewById(R.id.last_match_view);
  lastMatchContainer.setVisibility(View.VISIBLE);
  lastMatchView.removeAllViews();
  lastMatchView.addView(match.getView(getActivity(),getActivity().getLayoutInflater(),null));
}
Program: 33670
Project: 33670
Buggy source:
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  if (parent instanceof RefreshableHostActivity) {
    ((RefreshableHostActivity)parent).startRefresh(this);
  }
}

Fixed version (ground truth):
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  if (mActivity instanceof RefreshableHostActivity) {
    ((RefreshableHostActivity)mActivity).startRefresh(this);
  }
}
Program: 33671
Project: 33671
Buggy source:
public void onEvent(EventInfoLoadedEvent eventEvent){
  this.event=eventEvent.getEvent();
}

Fixed version (ground truth):
public void onEvent(EventInfoLoadedEvent eventEvent){
  this.mEvent=eventEvent.getEvent();
}
Program: 33672
Project: 33672
Buggy source:
protected void showNextMatch(MatchListElement match){
  LinearLayout nextLayout=(LinearLayout)getView().findViewById(R.id.event_next_match_container);
  nextLayout.setVisibility(View.VISIBLE);
  if (nextLayout.getChildCount() > 1) {
    nextLayout.removeViewAt(1);
  }
  nextLayout.addView(match.getView(getActivity(),getActivity().getLayoutInflater(),null));
}

Fixed version (ground truth):
protected void showNextMatch(MatchListElement match){
  ViewGroup nextMatchContainer=(ViewGroup)getView().findViewById(R.id.next_match_container);
  FrameLayout nextMatchView=(FrameLayout)getView().findViewById(R.id.next_match_view);
  nextMatchContainer.setVisibility(View.VISIBLE);
  nextMatchView.removeAllViews();
  nextMatchView.addView(match.getView(getActivity(),getActivity().getLayoutInflater(),null));
}
Program: 33673
Project: 33673
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View info=inflater.inflate(R.layout.fragment_event_info,null);
  info.findViewById(R.id.event_venue_container).setOnClickListener(this);
  info.findViewById(R.id.event_website_button).setOnClickListener(this);
  info.findViewById(R.id.event_twitter_button).setOnClickListener(this);
  info.findViewById(R.id.event_youtube_button).setOnClickListener(this);
  info.findViewById(R.id.event_cd_button).setOnClickListener(this);
  info.findViewById(R.id.event_top_teams_container).setOnClickListener(this);
  info.findViewById(R.id.event_top_oprs_container).setOnClickListener(this);
  info.findViewById(R.id.event_date_container).setOnClickListener(this);
  return info;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.fragment_event_info,null);
  view.findViewById(R.id.event_venue_container).setOnClickListener(this);
  view.findViewById(R.id.event_website_container).setOnClickListener(this);
  view.findViewById(R.id.event_twitter_container).setOnClickListener(this);
  view.findViewById(R.id.event_youtube_container).setOnClickListener(this);
  view.findViewById(R.id.event_cd_container).setOnClickListener(this);
  view.findViewById(R.id.top_teams_container).setOnClickListener(this);
  view.findViewById(R.id.top_oprs_container).setOnClickListener(this);
  return view;
}
Program: 33674
Project: 33674
Buggy source:
@Override public void onRefreshStart(boolean actionIconPressed){
  Log.i(Constants.REFRESH_LOG,"String_Node_Str" + eventKey + "String_Node_Str");
  task=new PopulateEventInfo(this,new RequestParams(true,actionIconPressed));
  task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,eventKey);
}

Fixed version (ground truth):
@Override public void onRefreshStart(boolean actionIconPressed){
  Log.i(Constants.REFRESH_LOG,"String_Node_Str" + mEventKey + "String_Node_Str");
  mTask=new PopulateEventInfo(this,new RequestParams(true,actionIconPressed));
  mTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,mEventKey);
}
Program: 33675
Project: 33675
Buggy source:
public void showCurrentEvent(final EventListElement event){
  final ViewGroup eventLayout=(ViewGroup)getView().findViewById(R.id.team_current_event);
  final View container=getView().findViewById(R.id.team_current_event_container);
  getActivity().runOnUiThread(new Runnable(){
    @Override public void run(){
      eventLayout.removeAllViews();
      eventLayout.addView(event.getView(getActivity(),getActivity().getLayoutInflater(),null));
      container.setVisibility(View.VISIBLE);
      container.setTag(mTeamKey + "String_Node_Str" + event.getEventKey());
      container.setOnClickListener(new TeamAtEventClickListener(getActivity()));
    }
  }
);
}

Fixed version (ground truth):
public void showCurrentEvent(final EventListElement event){
  final ViewGroup eventLayout=(ViewGroup)getView().findViewById(R.id.team_current_event);
  final View container=getView().findViewById(R.id.team_current_event_container);
  getActivity().runOnUiThread(() -> {
    eventLayout.removeAllViews();
    eventLayout.addView(event.getView(getActivity(),getActivity().getLayoutInflater(),null));
    eventLayout.setOnClickListener(new TeamAtEventClickListener(getActivity()));
    eventLayout.setTag(mTeamKey + "String_Node_Str" + event.getEventKey());
    container.setVisibility(View.VISIBLE);
  }
);
}
Program: 33676
Project: 33676
Buggy source:
private List<Object> getModules(){
  return Arrays.asList(new TBAAndroidModule(this),new DatafeedModule());
}

Fixed version (ground truth):
private List<Object> getModules(){
  return Arrays.asList(new TBAAndroidModule(this));
}
Program: 33678
Project: 33678
Buggy source:
@Provides @Singleton public APICache provideAPICache(){
  return new APICache();
}

Fixed version (ground truth):
@Provides @Singleton @Named("String_Node_Str") public APICache provideAPICache(){
  return new APICache();
}
Program: 33679
Project: 33679
Buggy source:
@Provides @Singleton public APIv2 provideRetrofitAPI(){
  return mRestAdapter.create(APIv2.class);
}

Fixed version (ground truth):
@Provides @Singleton @Named("String_Node_Str") public APIv2 provideRetrofitAPI(){
  return mRestAdapter.create(APIv2.class);
}
Program: 33680
Project: 33680
Buggy source:
@Override public void onClick(View v){
  int id=v.getId();
  if (id == R.id.event_top_teams_container) {
    ((ViewEventActivity)getActivity()).getPager().setCurrentItem(2);
    return;
  }
 else   if (id == R.id.event_top_oprs_container) {
    ((ViewEventActivity)getActivity()).getPager().setCurrentItem(5);
    return;
  }
 else   if (id == R.id.event_date_container) {
    if (event == null) {
      return;
    }
    return;
  }
  if (v.getTag() != null || !v.getTag().toString().isEmpty()) {
    String uri=v.getTag().toString();
    AnalyticsHelper.sendSocialUpdate(getActivity(),uri,eventKey);
    PackageManager manager=getActivity().getPackageManager();
    Intent i=new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(uri));
    List<ResolveInfo> handlers=manager.queryIntentActivities(i,0);
    if (!handlers.isEmpty()) {
      startActivity(i);
    }
 else {
      Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
  }
}

Fixed version (ground truth):
@Override public void onClick(View v){
  int id=v.getId();
  if (id == R.id.event_top_teams_container) {
    ((ViewEventActivity)getActivity()).scrollToTab(ViewEventFragmentPagerAdapter.TAB_RANKINGS);
    return;
  }
 else   if (id == R.id.event_top_oprs_container) {
    ((ViewEventActivity)getActivity()).scrollToTab(ViewEventFragmentPagerAdapter.TAB_STATS);
    return;
  }
 else   if (id == R.id.event_date_container) {
    if (event == null) {
      return;
    }
    return;
  }
  if (v.getTag() != null || !v.getTag().toString().isEmpty()) {
    String uri=v.getTag().toString();
    AnalyticsHelper.sendSocialUpdate(getActivity(),uri,eventKey);
    PackageManager manager=getActivity().getPackageManager();
    Intent i=new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(uri));
    List<ResolveInfo> handlers=manager.queryIntentActivities(i,0);
    if (!handlers.isEmpty()) {
      startActivity(i);
    }
 else {
      Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
  }
}
Program: 33681
Project: 33681
Buggy source:
@Override public View getView(Context c,LayoutInflater inflater,View convertView){
  ViewHolder holder;
  if (convertView == null || !(convertView.getTag() instanceof ViewHolder)) {
    convertView=inflater.inflate(R.layout.list_item_notification_upcoming_match,null,false);
    holder=new ViewHolder();
    holder.header=(TextView)convertView.findViewById(R.id.card_header);
    holder.title=(TextView)convertView.findViewById(R.id.title);
    holder.matchView=(MatchView)convertView.findViewById(R.id.match_details);
    holder.time=(TextView)convertView.findViewById(R.id.notification_time);
    holder.summaryContainer=convertView.findViewById(R.id.summary_container);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  holder.header.setText(c.getString(R.string.gameday_ticker_event_title_format,EventHelper.shortName(eventName),EventHelper.getShortCodeForEventKey(eventKey).toUpperCase()));
  holder.title.setText(c.getString(R.string.notification_upcoming_match_gameday_title,MatchHelper.getMatchTitleFromMatchKey(c,matchKey)));
  if (!JSONManager.isNull(matchTime)) {
    holder.time.setText(getNotificationTimeString(c));
    holder.time.setVisibility(View.VISIBLE);
  }
 else {
    holder.time.setVisibility(View.GONE);
  }
  holder.summaryContainer.setOnClickListener(new GamedayTickerClickListener(c,this));
  new MatchListElement(redTeams,blueTeams,matchKey,JSONManager.isNull(matchTime) ? -1 : matchTime.getAsLong(),"String_Node_Str").getView(c,inflater,holder.matchView);
  return convertView;
}

Fixed version (ground truth):
@Override public View getView(Context c,LayoutInflater inflater,View convertView){
  ViewHolder holder;
  if (convertView == null || !(convertView.getTag() instanceof ViewHolder)) {
    convertView=inflater.inflate(R.layout.list_item_notification_upcoming_match,null,false);
    holder=new ViewHolder();
    holder.header=(TextView)convertView.findViewById(R.id.card_header);
    holder.title=(TextView)convertView.findViewById(R.id.title);
    holder.matchView=(MatchView)convertView.findViewById(R.id.match_details);
    holder.time=(TextView)convertView.findViewById(R.id.notification_time);
    holder.summaryContainer=convertView.findViewById(R.id.summary_container);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  holder.header.setText(c.getString(R.string.gameday_ticker_event_title_format,EventHelper.shortName(eventName),EventHelper.getShortCodeForEventKey(eventKey).toUpperCase()));
  holder.title.setText(c.getString(R.string.notification_upcoming_match_gameday_title,MatchHelper.getMatchTitleFromMatchKey(c,matchKey)));
  holder.time.setText(getNotificationTimeString(c));
  holder.summaryContainer.setOnClickListener(new GamedayTickerClickListener(c,this));
  new MatchListElement(redTeams,blueTeams,matchKey,JSONManager.isNull(matchTime) ? -1 : matchTime.getAsLong(),"String_Node_Str").getView(c,inflater,holder.matchView);
  return convertView;
}
Program: 33682
Project: 33682
Buggy source:
@Override public View getView(Context c,LayoutInflater inflater,View convertView){
  if (convertView == null) {
    convertView=inflater.inflate(layout,null);
  }
  if (icon != -1) {
    ((SelectableImage)convertView.findViewById(R.id.icon)).setImageResource(icon);
  }
  if (titleId != -1) {
    ((TextView)convertView.findViewById(R.id.title)).setText(titleId);
  }
 else {
    ((TextView)convertView.findViewById(R.id.title)).setText(title != null ? title : "String_Node_Str");
  }
  return convertView;
}

Fixed version (ground truth):
@Override public View getView(Context c,LayoutInflater inflater,View convertView){
  ViewHolder holder;
  if (convertView == null || !(convertView.getTag() instanceof ViewHolder)) {
    convertView=inflater.inflate(layout,null);
    holder=new ViewHolder();
    holder.image=(SelectableImageView)convertView.findViewById(R.id.icon);
    holder.title=(TextView)convertView.findViewById(R.id.title);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  if (icon != -1) {
    holder.image.setImageResource(icon);
  }
  if (titleId != -1) {
    holder.title.setText(titleId);
  }
 else {
    holder.title.setText(title != null ? title : "String_Node_Str");
  }
  return convertView;
}
Program: 33684
Project: 33684
Buggy source:
@Override public View getView(final Context c,LayoutInflater inflater,View convertView){
  ViewHolder holder;
  if (convertView == null || !(convertView.getTag() instanceof ViewHolder)) {
    convertView=inflater.inflate(R.layout.list_item_carded_summary,null);
    holder=new ViewHolder();
    holder.label=(TextView)convertView.findViewById(R.id.label);
    holder.value=(TextView)convertView.findViewById(R.id.value);
    holder.container=(LinearLayout)convertView.findViewById(R.id.summary_container);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  holder.label.setText(String.format(c.getString(R.string.webcast_event_format),eventName,number));
  final String service=webcast.get("String_Node_Str").getAsString();
  final WebcastHelper.TYPE type=WebcastHelper.getType(service);
  if (holder.container.getChildCount() > 2) {
    holder.container.removeViewAt(2);
  }
  if (service != null) {
    holder.value.setVisibility(View.VISIBLE);
    holder.value.setText(String.format(c.getString(R.string.webcast_watch_on),type.render(c)));
    holder.value.setTypeface(null,Typeface.NORMAL);
    holder.container.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        String url=WebcastHelper.getUrlForWebcast(c,type,webcast);
        Intent intent=new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url));
        c.startActivity(intent);
      }
    }
);
  }
 else {
    holder.value.setVisibility(View.GONE);
  }
  return convertView;
}

Fixed version (ground truth):
@Override public View getView(final Context c,LayoutInflater inflater,View convertView){
  ViewHolder holder;
  if (convertView == null || !(convertView.getTag() instanceof ViewHolder)) {
    convertView=inflater.inflate(R.layout.list_item_carded_webcast,null);
    holder=new ViewHolder();
    holder.label=(TextView)convertView.findViewById(R.id.label);
    holder.value=(TextView)convertView.findViewById(R.id.value);
    holder.container=(LinearLayout)convertView.findViewById(R.id.summary_container);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  holder.label.setText(String.format(c.getString(R.string.webcast_event_format),eventName,number));
  final String service=webcast.get("String_Node_Str").getAsString();
  final WebcastHelper.TYPE type=WebcastHelper.getType(service);
  if (holder.container.getChildCount() > 2) {
    holder.container.removeViewAt(2);
  }
  if (service != null) {
    holder.value.setVisibility(View.VISIBLE);
    holder.value.setText(String.format(c.getString(R.string.webcast_watch_on),type.render(c)));
    holder.value.setTypeface(null,Typeface.NORMAL);
    holder.container.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        String url=WebcastHelper.getUrlForWebcast(c,type,webcast);
        Intent intent=new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url));
        c.startActivity(intent);
      }
    }
);
  }
 else {
    holder.value.setVisibility(View.GONE);
  }
  return convertView;
}
Program: 33689
Project: 33689
Buggy source:
public PopulateEventMatches(EventMatchesFragment f,RequestParams requestParams){
  mFragment=f;
  activity=(RefreshableHostActivity)mFragment.getActivity();
  this.requestParams=requestParams;
}

Fixed version (ground truth):
public PopulateEventMatches(EventMatchesFragment f,RequestParams requestParams){
  mFragment=f;
  activity=(RefreshableHostActivity)mFragment.getActivity();
  this.requestParams=requestParams;
  this.matchCount=0;
}
Program: 33693
Project: 33693
Buggy source:
@Override public void parseMessageData() throws JsonParseException {
  JsonObject jsonData=JSONManager.getasJsonObject(messageData);
  if (!jsonData.has("String_Node_Str")) {
    throw new JsonParseException("String_Node_Str");
  }
  eventKey=jsonData.get("String_Node_Str").getAsString();
  if (!jsonData.has("String_Node_Str")) {
    throw new JsonParseException("String_Node_Str");
  }
  eventName=jsonData.get("String_Node_Str").getAsString();
  if (!jsonData.has("String_Node_Str") || jsonData.get("String_Node_Str").isJsonArray()) {
    throw new JsonParseException("String_Node_Str");
  }
  JsonArray awardArray=jsonData.get("String_Node_Str").getAsJsonArray();
  for (  JsonElement element : awardArray) {
    awards.add(gson.fromJson(element,Award.class));
  }
}

Fixed version (ground truth):
@Override public void parseMessageData() throws JsonParseException {
  JsonObject jsonData=JSONManager.getasJsonObject(messageData);
  if (!jsonData.has("String_Node_Str")) {
    throw new JsonParseException("String_Node_Str");
  }
  eventKey=jsonData.get("String_Node_Str").getAsString();
  if (!jsonData.has("String_Node_Str")) {
    throw new JsonParseException("String_Node_Str");
  }
  eventName=jsonData.get("String_Node_Str").getAsString();
  if (!jsonData.has("String_Node_Str") || !jsonData.get("String_Node_Str").isJsonArray()) {
    throw new JsonParseException("String_Node_Str");
  }
  JsonArray awardArray=jsonData.get("String_Node_Str").getAsJsonArray();
  for (  JsonElement element : awardArray) {
    awards.add(gson.fromJson(element,Award.class));
  }
}
Program: 33694
Project: 33694
Buggy source:
@Override protected void onPostExecute(APIResponse.CODE code){
  super.onPostExecute(code);
  if (activity != null && fragment != null && fragment.getView() != null) {
    View view=fragment.getView();
    TextView noDataText=(TextView)view.findViewById(R.id.no_data);
    if (code == APIResponse.CODE.NODATA || favorites == null || favorites.isEmpty()) {
      noDataText.setText(activity.getString(R.string.no_favorite_data));
      noDataText.setVisibility(View.VISIBLE);
    }
 else {
      noDataText.setVisibility(View.GONE);
      ListViewAdapter adapter=new ListViewAdapter(activity,favorites);
      ListView listView=(ListView)fragment.getView().findViewById(R.id.list);
      listView.setAdapter(adapter);
    }
    if (code == APIResponse.CODE.OFFLINECACHE) {
      activity.showWarningMessage(activity.getString(R.string.warning_using_cached_data));
    }
    view.findViewById(R.id.progress).setVisibility(View.GONE);
    view.findViewById(R.id.list).setVisibility(View.VISIBLE);
    if (code == APIResponse.CODE.LOCAL && !isCancelled()) {
      requestParams.forceFromCache=false;
      PopulateUserFavorites secondLoad=new PopulateUserFavorites(fragment,requestParams);
      fragment.updateTask(secondLoad);
      secondLoad.execute();
    }
 else {
      if (fragment instanceof RefreshListener) {
        Log.d(Constants.REFRESH_LOG,"String_Node_Str");
        activity.notifyRefreshComplete(fragment);
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(APIResponse.CODE code){
  super.onPostExecute(code);
  if (activity != null && fragment != null && fragment.getView() != null) {
    View view=fragment.getView();
    TextView noDataText=(TextView)view.findViewById(R.id.no_data);
    ListView listView=(ListView)fragment.getView().findViewById(R.id.list);
    if (code == APIResponse.CODE.NODATA || favorites == null || favorites.isEmpty()) {
      noDataText.setText(activity.getString(R.string.no_favorite_data));
      noDataText.setVisibility(View.VISIBLE);
      listView.setVisibility(View.GONE);
    }
 else {
      noDataText.setVisibility(View.GONE);
      listView.setVisibility(View.VISIBLE);
      ListViewAdapter adapter=new ListViewAdapter(activity,favorites);
      listView.setAdapter(adapter);
    }
    if (code == APIResponse.CODE.OFFLINECACHE) {
      activity.showWarningMessage(activity.getString(R.string.warning_using_cached_data));
    }
    view.findViewById(R.id.progress).setVisibility(View.GONE);
    if (code == APIResponse.CODE.LOCAL && !isCancelled()) {
      requestParams.forceFromCache=false;
      PopulateUserFavorites secondLoad=new PopulateUserFavorites(fragment,requestParams);
      fragment.updateTask(secondLoad);
      secondLoad.execute();
    }
 else {
      if (fragment instanceof RefreshListener) {
        Log.d(Constants.REFRESH_LOG,"String_Node_Str");
        activity.notifyRefreshComplete(fragment);
      }
    }
  }
}
Program: 33695
Project: 33695
Buggy source:
@Override protected void onPostExecute(APIResponse.CODE code){
  super.onPostExecute(code);
  if (activity != null && fragment != null && fragment.getView() != null) {
    View view=fragment.getView();
    TextView noDataText=(TextView)view.findViewById(R.id.no_data);
    if (code == APIResponse.CODE.NODATA || subscriptions == null || subscriptions.isEmpty()) {
      noDataText.setText(activity.getString(R.string.no_subscription_data));
      noDataText.setVisibility(View.VISIBLE);
    }
 else {
      noDataText.setVisibility(View.GONE);
      ListViewAdapter adapter=new ListViewAdapter(activity,subscriptions);
      ListView listView=(ListView)fragment.getView().findViewById(R.id.list);
      listView.setAdapter(adapter);
    }
    if (code == APIResponse.CODE.OFFLINECACHE) {
      activity.showWarningMessage(activity.getString(R.string.warning_using_cached_data));
    }
    view.findViewById(R.id.progress).setVisibility(View.GONE);
    view.findViewById(R.id.list).setVisibility(View.VISIBLE);
    if (code == APIResponse.CODE.LOCAL && !isCancelled()) {
      requestParams.forceFromCache=false;
      PopulateUserSubscriptions secondLoad=new PopulateUserSubscriptions(fragment,requestParams);
      fragment.updateTask(secondLoad);
      secondLoad.execute();
    }
 else {
      if (fragment instanceof RefreshListener) {
        Log.d(Constants.REFRESH_LOG,"String_Node_Str");
        activity.notifyRefreshComplete(fragment);
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(APIResponse.CODE code){
  super.onPostExecute(code);
  if (activity != null && fragment != null && fragment.getView() != null) {
    View view=fragment.getView();
    TextView noDataText=(TextView)view.findViewById(R.id.no_data);
    ListView listView=(ListView)fragment.getView().findViewById(R.id.list);
    if (code == APIResponse.CODE.NODATA || subscriptions == null || subscriptions.isEmpty()) {
      noDataText.setText(activity.getString(R.string.no_subscription_data));
      noDataText.setVisibility(View.VISIBLE);
      listView.setVisibility(View.GONE);
    }
 else {
      noDataText.setVisibility(View.GONE);
      listView.setVisibility(View.VISIBLE);
      ListViewAdapter adapter=new ListViewAdapter(activity,subscriptions);
      listView.setAdapter(adapter);
    }
    if (code == APIResponse.CODE.OFFLINECACHE) {
      activity.showWarningMessage(activity.getString(R.string.warning_using_cached_data));
    }
    view.findViewById(R.id.progress).setVisibility(View.GONE);
    if (code == APIResponse.CODE.LOCAL && !isCancelled()) {
      requestParams.forceFromCache=false;
      PopulateUserSubscriptions secondLoad=new PopulateUserSubscriptions(fragment,requestParams);
      fragment.updateTask(secondLoad);
      secondLoad.execute();
    }
 else {
      if (fragment instanceof RefreshListener) {
        Log.d(Constants.REFRESH_LOG,"String_Node_Str");
        activity.notifyRefreshComplete(fragment);
      }
    }
  }
}
Program: 33696
Project: 33696
Buggy source:
@Override protected Void doInBackground(String... params){
  String user=params[0];
  Database.Favorites favorites=Database.getInstance(context).getFavoritesTable();
  favorites.recreate(user);
  Database.Subscriptions subscriptions=Database.getInstance(context).getSubscriptionsTable();
  subscriptions.recreate(user);
  ModelsMobileApiMessagesRegistrationRequest request=new ModelsMobileApiMessagesRegistrationRequest();
  request.setMobileId(GCMAuthHelper.getRegistrationId(context));
  request.setOperatingSystem(GCMAuthHelper.OS_ANDROID);
  TbaMobile service=AccountHelper.getAuthedTbaMobile(context);
  if (service == null) {
    Log.e(Constants.LOG_TAG,"String_Node_Str");
    return null;
  }
  try {
    ModelsMobileApiMessagesBaseResponse response=service.unregister(request).execute();
    if (response.getCode() == 200) {
      Log.i(Constants.LOG_TAG,"String_Node_Str");
    }
 else {
      Log.e(Constants.LOG_TAG,"String_Node_Str" + response.getMessage());
    }
  }
 catch (  IOException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str");
    e.printStackTrace();
  }
  AccountHelper.setSelectedAccount(context,"String_Node_Str");
  GCMAuthHelper.storeRegistrationId(context,"String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground(String... params){
  String user=params[0];
  Database.Favorites favorites=Database.getInstance(context).getFavoritesTable();
  favorites.recreate(user);
  Database.Subscriptions subscriptions=Database.getInstance(context).getSubscriptionsTable();
  subscriptions.recreate(user);
  ModelsMobileApiMessagesRegistrationRequest request=new ModelsMobileApiMessagesRegistrationRequest();
  request.setMobileId(GCMAuthHelper.getRegistrationId(context));
  request.setOperatingSystem(GCMAuthHelper.OS_ANDROID);
  request.setDeviceUuid(Utilities.getDeviceUUID(context));
  TbaMobile service=AccountHelper.getAuthedTbaMobile(context);
  if (service == null) {
    Log.e(Constants.LOG_TAG,"String_Node_Str");
    return null;
  }
  try {
    ModelsMobileApiMessagesBaseResponse response=service.unregister(request).execute();
    if (response.getCode() == 200) {
      Log.i(Constants.LOG_TAG,"String_Node_Str");
      PreferenceManager.getDefaultSharedPreferences(context).edit().putString(GCMAuthHelper.PROPERTY_GCM_REG_ID,"String_Node_Str").apply();
    }
 else {
      Log.e(Constants.LOG_TAG,"String_Node_Str" + response.getMessage());
    }
  }
 catch (  IOException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str");
    e.printStackTrace();
  }
  AccountHelper.setSelectedAccount(context,"String_Node_Str");
  GCMAuthHelper.storeRegistrationId(context,"String_Node_Str");
  return null;
}
Program: 33697
Project: 33697
Buggy source:
public static void storeRegistrationId(Context context,String id){
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  prefs.edit().putString(PROPERTY_GCM_REG_ID,id).commit();
}

Fixed version (ground truth):
public static void storeRegistrationId(Context context,String id){
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  prefs.edit().putString(PROPERTY_GCM_REG_ID,id).apply();
}
Program: 33698
Project: 33698
Buggy source:
public static boolean sendRegistrationToBackend(Activity activity,String gcmId){
  Log.i(Constants.LOG_TAG,"String_Node_Str" + gcmId);
  GoogleAccountCredential currentCredential=AccountHelper.getSelectedAccountCredential(activity);
  try {
    String token=currentCredential.getToken();
  }
 catch (  IOException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str" + currentCredential.getSelectedAccountName());
    e.printStackTrace();
  }
catch (  GoogleAuthException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str" + currentCredential.getSelectedAccountName());
    e.printStackTrace();
  }
  TbaMobile service=AccountHelper.getTbaMobile(currentCredential);
  ModelsMobileApiMessagesRegistrationRequest request=new ModelsMobileApiMessagesRegistrationRequest();
  request.setMobileId(gcmId);
  request.setOperatingSystem(OS_ANDROID);
  request.setName(Build.MANUFACTURER + "String_Node_Str" + Build.MODEL);
  request.setDeviceUuid(Settings.Secure.getString(activity.getApplicationContext().getContentResolver(),Settings.Secure.ANDROID_ID));
  try {
    ModelsMobileApiMessagesBaseResponse response=service.register(request).execute();
    if (response.getCode() == 200 || response.getCode() == 304) {
      return true;
    }
 else {
      Log.e(Constants.LOG_TAG,response.getCode() + "String_Node_Str" + response.getMessage());
      return false;
    }
  }
 catch (  IOException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str");
    e.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
public static boolean sendRegistrationToBackend(Activity activity,String gcmId){
  Log.i(Constants.LOG_TAG,"String_Node_Str" + gcmId);
  GoogleAccountCredential currentCredential=AccountHelper.getSelectedAccountCredential(activity);
  try {
    String token=currentCredential.getToken();
  }
 catch (  IOException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str" + currentCredential.getSelectedAccountName());
    e.printStackTrace();
  }
catch (  GoogleAuthException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str" + currentCredential.getSelectedAccountName());
    e.printStackTrace();
  }
  TbaMobile service=AccountHelper.getTbaMobile(currentCredential);
  ModelsMobileApiMessagesRegistrationRequest request=new ModelsMobileApiMessagesRegistrationRequest();
  request.setMobileId(gcmId);
  request.setOperatingSystem(OS_ANDROID);
  request.setName(Build.MANUFACTURER + "String_Node_Str" + Build.MODEL);
  request.setDeviceUuid(Utilities.getDeviceUUID(activity));
  try {
    ModelsMobileApiMessagesBaseResponse response=service.register(request).execute();
    if (response.getCode() == 200 || response.getCode() == 304) {
      return true;
    }
 else {
      Log.e(Constants.LOG_TAG,response.getCode() + "String_Node_Str" + response.getMessage());
      return false;
    }
  }
 catch (  IOException e) {
    Log.e(Constants.LOG_TAG,"String_Node_Str");
    e.printStackTrace();
  }
  return false;
}
Program: 33699
Project: 33699
Buggy source:
public static void registerInBackground(final Activity activity){
  new AsyncTask<Void,Void,Void>(){
    @Override protected Void doInBackground(    Void... params){
      try {
        GoogleCloudMessaging gcm=GCMHelper.getGcm(activity);
        String senderId=GCMHelper.getSenderId(activity);
        String regid=gcm.register(senderId);
        Log.d(Constants.LOG_TAG,"String_Node_Str" + regid);
        boolean storeOnServer=GCMAuthHelper.sendRegistrationToBackend(activity,regid);
        if (storeOnServer) {
          Log.d(Constants.LOG_TAG,"String_Node_Str");
          GCMAuthHelper.storeRegistrationId(activity,regid);
        }
      }
 catch (      IOException ex) {
        Log.e(Constants.LOG_TAG,"String_Node_Str" + ex.getMessage());
      }
      return null;
    }
  }
.execute();
}

Fixed version (ground truth):
public static void registerInBackground(Activity activity){
  new RegisterGCM(activity).execute();
}
Program: 33700
Project: 33700
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.list_view_with_spinner,null);
  mListView=(ListView)view.findViewById(R.id.list);
  ProgressBar progressBar=(ProgressBar)view.findViewById(R.id.progress);
  if (mAdapter != null) {
    mListView.setAdapter(mAdapter);
    mListView.onRestoreInstanceState(mListState);
    progressBar.setVisibility(View.GONE);
  }
  mListView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> adapterView,    View view,    int position,    long id){
      String teamKey=((ListElement)((ListViewAdapter)adapterView.getAdapter()).getItem(position)).getKey();
      startActivity(TeamAtEventActivity.newInstance(getActivity(),mEventKey,teamKey));
    }
  }
);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View view=inflater.inflate(R.layout.list_view_with_spinner,null);
  mListView=(ListView)view.findViewById(R.id.list);
  ProgressBar progressBar=(ProgressBar)view.findViewById(R.id.progress);
  if (mAdapter != null) {
    mListView.setAdapter(mAdapter);
    mListView.onRestoreInstanceState(mListState);
    progressBar.setVisibility(View.GONE);
  }
  mListView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> adapterView,    View view,    int position,    long id){
      Log.d(Constants.LOG_TAG,"String_Node_Str");
      String teamKey=((ListElement)((ListViewAdapter)adapterView.getAdapter()).getItem(position)).getKey();
      startActivity(TeamAtEventActivity.newInstance(getActivity(),mEventKey,teamKey));
    }
  }
);
  return view;
}
Program: 33701
Project: 33701
Buggy source:
@Override public void onItemClick(AdapterView<?> adapterView,View view,int position,long id){
  String teamKey=((ListElement)((ListViewAdapter)adapterView.getAdapter()).getItem(position)).getKey();
  startActivity(TeamAtEventActivity.newInstance(getActivity(),mEventKey,teamKey));
}

Fixed version (ground truth):
@Override public void onItemClick(AdapterView<?> adapterView,View view,int position,long id){
  Log.d(Constants.LOG_TAG,"String_Node_Str");
  String teamKey=((ListElement)((ListViewAdapter)adapterView.getAdapter()).getItem(position)).getKey();
  startActivity(TeamAtEventActivity.newInstance(getActivity(),mEventKey,teamKey));
}
Program: 33703
Project: 33703
Buggy source:
@Override public void onClick(View v){
  if (v.getId() == R.id.open_notification_settings_button) {
    openNotificationSettingsView();
  }
 else   if (v.getId() == R.id.close_notification_settings_button) {
    closeNotificationSettingsWindow();
    if (saveSettingsTaskFragment == null) {
      saveSettingsTaskFragment=new UpdateUserModelSettingsTaskFragment(settings.getSettings());
      getSupportFragmentManager().beginTransaction().add(saveSettingsTaskFragment,SAVE_SETTINGS_TASK_FRAGMENT_TAG).commit();
    }
  }
 else {
    Log.d(Constants.LOG_TAG,"String_Node_Str" + v.getId() + "String_Node_Str"+ v.getTag()+ "String_Node_Str"+ v.toString());
  }
}

Fixed version (ground truth):
@Override public void onClick(View v){
  if (v.getId() == R.id.open_notification_settings_button) {
    if (!saveInProgress) {
      openNotificationSettingsView();
    }
  }
 else   if (v.getId() == R.id.close_notification_settings_button) {
    closeNotificationSettingsWindow();
    if (saveSettingsTaskFragment == null) {
      saveSettingsTaskFragment=new UpdateUserModelSettingsTaskFragment(settings.getSettings());
      getSupportFragmentManager().beginTransaction().add(saveSettingsTaskFragment,SAVE_SETTINGS_TASK_FRAGMENT_TAG).commit();
      saveInProgress=true;
    }
  }
 else {
    Log.d(Constants.LOG_TAG,"String_Node_Str" + v.getId() + "String_Node_Str"+ v.getTag()+ "String_Node_Str"+ v.toString());
  }
}
Program: 33704
Project: 33704
Buggy source:
@Override public void onError(){
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  android.support.v4.app.FragmentManager fm=getSupportFragmentManager();
  fm.beginTransaction().remove(fm.findFragmentByTag(SAVE_SETTINGS_TASK_FRAGMENT_TAG)).commit();
  saveSettingsTaskFragment=null;
}

Fixed version (ground truth):
@Override public void onError(){
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  android.support.v4.app.FragmentManager fm=getSupportFragmentManager();
  fm.beginTransaction().remove(fm.findFragmentByTag(SAVE_SETTINGS_TASK_FRAGMENT_TAG)).commit();
  saveSettingsTaskFragment=null;
  settings.restoreInitialState();
  saveInProgress=false;
}
Program: 33705
Project: 33705
Buggy source:
@Override public void onNoOp(){
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  android.support.v4.app.FragmentManager fm=getSupportFragmentManager();
  fm.beginTransaction().remove(fm.findFragmentByTag(SAVE_SETTINGS_TASK_FRAGMENT_TAG)).commit();
  saveSettingsTaskFragment=null;
}

Fixed version (ground truth):
@Override public void onNoOp(){
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  android.support.v4.app.FragmentManager fm=getSupportFragmentManager();
  fm.beginTransaction().remove(fm.findFragmentByTag(SAVE_SETTINGS_TASK_FRAGMENT_TAG)).commit();
  saveSettingsTaskFragment=null;
  saveInProgress=false;
}
Program: 33706
Project: 33706
Buggy source:
@Override public void onSuccess(){
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  android.support.v4.app.FragmentManager fm=getSupportFragmentManager();
  fm.beginTransaction().remove(fm.findFragmentByTag(SAVE_SETTINGS_TASK_FRAGMENT_TAG)).commit();
  saveSettingsTaskFragment=null;
}

Fixed version (ground truth):
@Override public void onSuccess(){
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  android.support.v4.app.FragmentManager fm=getSupportFragmentManager();
  fm.beginTransaction().remove(fm.findFragmentByTag(SAVE_SETTINGS_TASK_FRAGMENT_TAG)).commit();
  saveSettingsTaskFragment=null;
  settings.refreshSettingsFromDatabase();
  saveInProgress=false;
}
Program: 33708
Project: 33708
Buggy source:
public void setDrawerProfileInfo(){
  Person person=PlusHelper.getCurrentPerson();
  if (person != null) {
    profileName.setText(person.getDisplayName());
    Picasso picasso=Picasso.with(getActivity());
    if (person.hasImage()) {
      picasso.load(person.getImage().getUrl()).into(profilePicture);
    }
    if (person.hasCover()) {
      picasso.load(person.getCover().getCoverPhoto().getUrl()).transform(new LinearGradientTransformation()).into(coverPhoto);
    }
 else {
      picasso.load(R.drawable.default_cover).transform(new LinearGradientTransformation()).into(coverPhoto);
    }
  }
}

Fixed version (ground truth):
public void setDrawerProfileInfo(){
  Person person=PlusHelper.getCurrentPerson();
  if (person != null) {
    profileName.setText(person.getDisplayName());
    String personPhotoUrl=person.getImage().getUrl();
    personPhotoUrl=personPhotoUrl.substring(0,personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;
    Log.d(Constants.LOG_TAG,"String_Node_Str" + personPhotoUrl);
    Picasso picasso=Picasso.with(getActivity());
    if (person.hasImage()) {
      picasso.load(personPhotoUrl).into(profilePicture);
    }
    if (person.hasCover()) {
      picasso.load(person.getCover().getCoverPhoto().getUrl()).transform(new LinearGradientTransformation()).into(coverPhoto);
    }
 else {
      picasso.load(R.drawable.default_cover).transform(new LinearGradientTransformation()).into(coverPhoto);
    }
  }
}
Program: 33710
Project: 33710
Buggy source:
public static ArrayList<District> getDistrictList(String json,String url){
  ArrayList<District> districts=new ArrayList<>();
  JsonArray data=JSONManager.getasJsonArray(json);
  for (  JsonElement d : data) {
    if (!d.isJsonNull())     districts.add(DistrictHelper.buildDistrictFromUrl(d.getAsString(),url));
  }
  return districts;
}

Fixed version (ground truth):
public static ArrayList<District> getDistrictList(String json,String url,int version){
  JsonArray data=JSONManager.getasJsonArray(json);
  return DistrictHelper.buildVersionedDistrictList(data,url,version);
}