nus-yam/ex-repair huggingface dataset:
Program: 13879
Project: 13879
Buggy source:
private void onClickAction(View v,int action,Bundle arguments){
  if (!isAdded()) {
    return;
  }
switch (action) {
case ACTION_OPEN_URL:
    String url=arguments.getString(ARG_OPEN_URL_PARAM);
  if (TextUtils.isEmpty(url)) {
    return;
  }
ActivityLauncher.openUrlExternal(getContext(),url);
break;
case ACTION_OPEN_SUPPORT_CHAT:
HelpshiftHelper.getInstance().addMetaData(MetadataKey.USER_ENTERED_URL,arguments.getString(SignInFragment.ENTERED_URL_KEY));
HelpshiftHelper.getInstance().addMetaData(MetadataKey.USER_ENTERED_USERNAME,arguments.getString(SignInFragment.ENTERED_USERNAME_KEY));
Tag origin=(Tag)arguments.getSerializable(HelpshiftHelper.ORIGIN_KEY);
HelpshiftHelper.getInstance().showConversation(getActivity(),mSiteStore,origin,mAccountStore.getAccount().getUserName());
dismissAllowingStateLoss();
break;
case ACTION_OPEN_APPLICATION_LOG:
startActivity(new Intent(v.getContext(),AppLogViewerActivity.class));
dismissAllowingStateLoss();
break;
case ACTION_OPEN_FAQ_PAGE:
String faqid=arguments.getString(ARG_TELL_ME_MORE_BUTTON_PARAM_NAME_FAQ_ID);
String sectionid=arguments.getString(ARG_TELL_ME_MORE_BUTTON_PARAM_NAME_SECTION_ID);
if (faqid != null) {
Support.showSingleFAQ(getActivity(),faqid);
}
 else if (sectionid != null) {
Support.showFAQSection(getActivity(),sectionid);
}
break;
default :
case ACTION_FINISH:
getActivity().finish();
break;
}
}

Fixed version (ground truth):
private void onClickAction(View v,int action,Bundle arguments){
  if (!isAdded()) {
    return;
  }
switch (action) {
case ACTION_OPEN_URL:
    String url=arguments.getString(ARG_OPEN_URL_PARAM);
  if (TextUtils.isEmpty(url)) {
    return;
  }
ActivityLauncher.openUrlExternal(getContext(),url);
break;
case ACTION_OPEN_SUPPORT_CHAT:
HelpshiftHelper.getInstance().addMetaData(MetadataKey.USER_ENTERED_URL,arguments.getString(SignInFragment.ENTERED_URL_KEY));
HelpshiftHelper.getInstance().addMetaData(MetadataKey.USER_ENTERED_USERNAME,arguments.getString(SignInFragment.ENTERED_USERNAME_KEY));
Tag origin=(Tag)arguments.getSerializable(HelpshiftHelper.ORIGIN_KEY);
HelpshiftHelper.getInstance().showConversation(getActivity(),mSiteStore,origin,mAccountStore.getAccount().getUserName());
dismissAllowingStateLoss();
break;
case ACTION_OPEN_APPLICATION_LOG:
startActivity(new Intent(v.getContext(),AppLogViewerActivity.class));
dismissAllowingStateLoss();
break;
case ACTION_OPEN_FAQ_PAGE:
String faqId=arguments.getString(ARG_TELL_ME_MORE_BUTTON_PARAM_NAME_FAQ_ID);
String sectionId=arguments.getString(ARG_TELL_ME_MORE_BUTTON_PARAM_NAME_SECTION_ID);
if (faqId != null) {
Support.showSingleFAQ(getActivity(),faqId);
}
 else if (sectionId != null) {
Support.showFAQSection(getActivity(),sectionId);
}
break;
default :
case ACTION_FINISH:
getActivity().finish();
break;
}
}
Program: 13880
Project: 13880
Buggy source:
private void showGenericErrorDialog(String errorMessage,String faqId,String faqSection){
  FragmentTransaction ft=getFragmentManager().beginTransaction();
  SignInDialogFragment nuxAlert;
  int faqAction=SignInDialogFragment.ACTION_OPEN_SUPPORT_CHAT;
  String thirdButtonLabel=getString(R.string.contact_us);
  if (!TextUtils.isEmpty(faqId) || !TextUtils.isEmpty(faqSection)) {
    faqAction=SignInDialogFragment.ACTION_OPEN_FAQ_PAGE;
    thirdButtonLabel=getString(R.string.tell_me_more);
  }
  nuxAlert=SignInDialogFragment.newInstance(getString(org.wordpress.android.R.string.nux_cannot_log_in),errorMessage,R.drawable.ic_notice_white_64dp,3,getString(R.string.cancel),getString(R.string.reader_title_applog),thirdButtonLabel,SignInDialogFragment.ACTION_OPEN_SUPPORT_CHAT,SignInDialogFragment.ACTION_OPEN_APPLICATION_LOG,faqAction,faqId,faqSection);
  Bundle bundle=nuxAlert.getArguments();
  bundle.putSerializable(HelpshiftHelper.ORIGIN_KEY,HelpshiftHelper.chooseHelpshiftLoginTag(mJetpackCallbacks.isJetpackAuth(),isWPComLogin() && !mSelfHosted));
  nuxAlert.setArguments(bundle);
  ft.add(nuxAlert,"String_Node_Str");
  ft.commitAllowingStateLoss();
}

Fixed version (ground truth):
private void showGenericErrorDialog(String errorMessage,String faqId,String faqSection){
  FragmentTransaction ft=getFragmentManager().beginTransaction();
  SignInDialogFragment nuxAlert;
  int faqAction=SignInDialogFragment.ACTION_OPEN_SUPPORT_CHAT;
  String thirdButtonLabel=getString(R.string.contact_us);
  if (!TextUtils.isEmpty(faqId) || !TextUtils.isEmpty(faqSection)) {
    faqAction=SignInDialogFragment.ACTION_OPEN_FAQ_PAGE;
    thirdButtonLabel=getString(R.string.tell_me_more);
  }
  nuxAlert=SignInDialogFragment.newInstance(getString(org.wordpress.android.R.string.nux_cannot_log_in),errorMessage,R.drawable.ic_notice_white_64dp,3,getString(R.string.cancel),getString(R.string.reader_title_applog),thirdButtonLabel,SignInDialogFragment.ACTION_OPEN_APPLICATION_LOG,faqAction,faqId,faqSection);
  Bundle bundle=nuxAlert.getArguments();
  bundle.putSerializable(HelpshiftHelper.ORIGIN_KEY,HelpshiftHelper.chooseHelpshiftLoginTag(mJetpackCallbacks.isJetpackAuth(),isWPComLogin() && !mSelfHosted));
  nuxAlert.setArguments(bundle);
  ft.add(nuxAlert,"String_Node_Str");
  ft.commitAllowingStateLoss();
}
Program: 13881
Project: 13881
Buggy source:
public static void viewBlogSettingsForResult(Activity activity,Blog blog){
  if (blog == null)   return;
  Intent intent=new Intent(activity,BlogPreferencesActivity.class);
  intent.putExtra(WordPress.SITE,site);
  activity.startActivityForResult(intent,RequestCodes.SITE_SETTINGS);
  AnalyticsUtils.trackWithSiteDetails(AnalyticsTracker.Stat.OPENED_BLOG_SETTINGS,site);
}

Fixed version (ground truth):
public static void viewBlogSettingsForResult(Activity activity,SiteModel site){
  Intent intent=new Intent(activity,BlogPreferencesActivity.class);
  intent.putExtra(WordPress.SITE,site);
  activity.startActivityForResult(intent,RequestCodes.SITE_SETTINGS);
  AnalyticsUtils.trackWithSiteDetails(AnalyticsTracker.Stat.OPENED_BLOG_SETTINGS,site);
}
Program: 13882
Project: 13882
Buggy source:
private void prepareUploadAnalytics(){
  mCurrentUploadingPostAnalyticsProperties=new HashMap<>();
  mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",AnalyticsUtils.getWordCount(mPost.getContent()));
  if (hasGallery()) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (mHasImage) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (mHasVideo) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (mHasCategory) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (!mPost.getTagNameList().isEmpty()) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",AppPrefs.isVisualEditorEnabled());
}

Fixed version (ground truth):
private void prepareUploadAnalytics(String postContent){
  mCurrentUploadingPostAnalyticsProperties=new HashMap<>();
  mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",AnalyticsUtils.getWordCount(mPost.getContent()));
  if (hasGallery()) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (!mHasImage) {
    String imageTagsPattern="String_Node_Str";
    Pattern pattern=Pattern.compile(imageTagsPattern);
    Matcher matcher=pattern.matcher(postContent);
    mHasImage=matcher.find();
  }
  if (mHasImage) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (!mHasVideo) {
    String videoTagsPattern="String_Node_Str";
    Pattern pattern=Pattern.compile(videoTagsPattern);
    Matcher matcher=pattern.matcher(postContent);
    mHasVideo=matcher.find();
  }
  if (mHasVideo) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (mHasCategory) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  if (!mPost.getTagNameList().isEmpty()) {
    mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",true);
  }
  mCurrentUploadingPostAnalyticsProperties.put("String_Node_Str",AppPrefs.isVisualEditorEnabled());
}
Program: 13884
Project: 13884
Buggy source:
private void sendMagicLinkRequest(){
  disableRequestEmailButtonAndShowProgressDialog();
  Map<String,String> params=new HashMap<>();
  params.put(EMAIL_KEY,mEmail);
  params.put(CLIENT_ID_KEY,BuildConfig.OAUTH_APP_ID);
  params.put(CLIENT_SECRET_KEY,BuildConfig.OAUTH_APP_SECRET);
  WordPress.getRestClientUtilsV1_1().sendLoginEmail(params,new RestRequest.Listener(){
    @Override public void onResponse(    JSONObject response){
      if (mListener != null) {
        mProgressDialog.cancel();
        AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_REQUESTED);
        mListener.onMagicLinkSent();
      }
    }
  }
,new RestRequest.ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      HashMap<String,String> errorProperties=new HashMap<>();
      errorProperties.put(ERROR_KEY,error.getMessage());
      AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_FAILED,errorProperties);
      if (getView() != null) {
        Snackbar.make(getView(),R.string.magic_link_unavailable_error_message,Snackbar.LENGTH_SHORT);
      }
      if (mListener != null) {
        mListener.onEnterPasswordRequested();
      }
    }
  }
);
}

Fixed version (ground truth):
private void sendMagicLinkRequest(){
  if (!NetworkUtils.isNetworkAvailable(getActivity())) {
    ToastUtils.showToast(getActivity(),R.string.no_network_message,ToastUtils.Duration.LONG);
    return;
  }
  disableRequestEmailButtonAndShowProgressDialog();
  Map<String,String> params=new HashMap<>();
  params.put(EMAIL_KEY,mEmail);
  params.put(CLIENT_ID_KEY,BuildConfig.OAUTH_APP_ID);
  params.put(CLIENT_SECRET_KEY,BuildConfig.OAUTH_APP_SECRET);
  WordPress.getRestClientUtilsV1_1().sendLoginEmail(params,new RestRequest.Listener(){
    @Override public void onResponse(    JSONObject response){
      mProgressDialog.cancel();
      AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_REQUESTED);
      if (mListener != null) {
        mListener.onMagicLinkSent();
      }
    }
  }
,new RestRequest.ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      HashMap<String,String> errorProperties=new HashMap<>();
      errorProperties.put(ERROR_KEY,error.getMessage());
      AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_FAILED,errorProperties);
      mProgressDialog.cancel();
      if (isAdded()) {
        ToastUtils.showToast(getActivity(),R.string.magic_link_unavailable_error_message,ToastUtils.Duration.LONG);
      }
      if (mListener != null) {
        mListener.onEnterPasswordRequested();
      }
    }
  }
);
}
Program: 13885
Project: 13885
Buggy source:
@Override public void onResponse(JSONObject response){
  if (mListener != null) {
    mProgressDialog.cancel();
    AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_REQUESTED);
    mListener.onMagicLinkSent();
  }
}

Fixed version (ground truth):
@Override public void onResponse(JSONObject response){
  mProgressDialog.cancel();
  AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_REQUESTED);
  if (mListener != null) {
    mListener.onMagicLinkSent();
  }
}
Program: 13886
Project: 13886
Buggy source:
@Override public void onErrorResponse(VolleyError error){
  HashMap<String,String> errorProperties=new HashMap<>();
  errorProperties.put(ERROR_KEY,error.getMessage());
  AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_FAILED,errorProperties);
  if (getView() != null) {
    Snackbar.make(getView(),R.string.magic_link_unavailable_error_message,Snackbar.LENGTH_SHORT);
  }
  if (mListener != null) {
    mListener.onEnterPasswordRequested();
  }
}

Fixed version (ground truth):
@Override public void onErrorResponse(VolleyError error){
  HashMap<String,String> errorProperties=new HashMap<>();
  errorProperties.put(ERROR_KEY,error.getMessage());
  AnalyticsTracker.track(AnalyticsTracker.Stat.LOGIN_MAGIC_LINK_FAILED,errorProperties);
  mProgressDialog.cancel();
  if (isAdded()) {
    ToastUtils.showToast(getActivity(),R.string.magic_link_unavailable_error_message,ToastUtils.Duration.LONG);
  }
  if (mListener != null) {
    mListener.onEnterPasswordRequested();
  }
}
Program: 13887
Project: 13887
Buggy source:
public void showStatsActivityForSite(@NonNull SiteModel site,NoteBlockRangeType rangeType){
  if (isFinishing())   return;
  if (rangeType == NoteBlockRangeType.FOLLOW) {
    Intent intent=new Intent(this,StatsViewAllActivity.class);
    intent.putExtra(StatsAbstractFragment.ARGS_VIEW_TYPE,StatsViewType.FOLLOWERS);
    intent.putExtra(StatsAbstractFragment.ARGS_TIMEFRAME,StatsTimeframe.DAY);
    intent.putExtra(StatsAbstractFragment.ARGS_SELECTED_DATE,"String_Node_Str");
    intent.putExtra(WordPress.SITE,site);
    intent.putExtra(StatsViewAllActivity.ARG_STATS_VIEW_ALL_TITLE,getString(R.string.stats_view_followers));
    startActivity(intent);
  }
 else {
    ActivityLauncher.viewBlogStats(this,site);
  }
}

Fixed version (ground truth):
private void showStatsActivityForSite(@NonNull SiteModel site,NoteBlockRangeType rangeType){
  if (isFinishing())   return;
  if (rangeType == NoteBlockRangeType.FOLLOW) {
    Intent intent=new Intent(this,StatsViewAllActivity.class);
    intent.putExtra(StatsAbstractFragment.ARGS_VIEW_TYPE,StatsViewType.FOLLOWERS);
    intent.putExtra(StatsAbstractFragment.ARGS_TIMEFRAME,StatsTimeframe.DAY);
    intent.putExtra(StatsAbstractFragment.ARGS_SELECTED_DATE,"String_Node_Str");
    intent.putExtra(WordPress.SITE,site);
    intent.putExtra(StatsViewAllActivity.ARG_STATS_VIEW_ALL_TITLE,getString(R.string.stats_view_followers));
    startActivity(intent);
  }
 else {
    ActivityLauncher.viewBlogStats(this,site);
  }
}
Program: 13888
Project: 13888
Buggy source:
private @NonNull String getErrorMessage(PostModel post,String specificMessage){
  String postType=getString(post.isPage() ? R.string.page : R.string.post).toLowerCase();
  return String.format(mContext.getResources().getText(R.string.error_upload).toString(),postType,specificMessage);
}

Fixed version (ground truth):
private @NonNull String getErrorMessage(PostModel post,String specificMessage){
  String postType=getString(post.isPage() ? R.string.page : R.string.post).toLowerCase();
  return String.format(mContext.getResources().getText(R.string.error_upload_params).toString(),postType,specificMessage);
}
Program: 13893
Project: 13893
Buggy source:
private String getNotificationTitleOrAppNameFromBundle(Context context,Bundle data){
  String title=StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_TITLE));
  if (title == null) {
    title=context.getString(R.string.app_name);
  }
  return title;
}

Fixed version (ground truth):
private String getNotificationTitleOrAppNameFromBundle(Context context,Bundle data){
  String title=StringEscapeUtils.unescapeHtml4(data.getString(PUSH_ARG_TITLE));
  if (title == null) {
    title=context.getString(R.string.app_name);
  }
  return title;
}
Program: 13895
Project: 13895
Buggy source:
private void onCommentCreated(OnCommentChanged event){
  mIsSubmittingReply=false;
  mEditReply.setEnabled(true);
  mSubmitReplyBtn.setVisibility(View.VISIBLE);
  getView().findViewById(R.id.progress_submit_comment).setVisibility(View.GONE);
  updateStatusViews();
  if (event.isError()) {
    if (isAdded()) {
      String strUnEscapeHTML=StringEscapeUtils.unescapeHtml(event.error.message);
      ToastUtils.showToast(getActivity(),strUnEscapeHTML,ToastUtils.Duration.LONG);
      EditTextUtils.showSoftInput(mEditReply);
    }
    return;
  }
  if (mOnCommentChangeListener != null) {
    mOnCommentChangeListener.onCommentChanged(ChangeType.REPLIED);
  }
  if (isAdded()) {
    ToastUtils.showToast(getActivity(),getString(R.string.note_reply_successful));
    mEditReply.setText(null);
    mEditReply.getAutoSaveTextHelper().clearSavedText(mEditReply);
  }
  if (mComment != null && !(CommentStatus.fromString(mComment.getStatus()) == CommentStatus.APPROVED)) {
    moderateComment(CommentStatus.APPROVED);
  }
}

Fixed version (ground truth):
private void onCommentCreated(OnCommentChanged event){
  mIsSubmittingReply=false;
  mEditReply.setEnabled(true);
  mSubmitReplyBtn.setVisibility(View.VISIBLE);
  getView().findViewById(R.id.progress_submit_comment).setVisibility(View.GONE);
  updateStatusViews();
  if (event.isError()) {
    if (isAdded()) {
      String strUnEscapeHTML=StringEscapeUtils.unescapeHtml4(event.error.message);
      ToastUtils.showToast(getActivity(),strUnEscapeHTML,ToastUtils.Duration.LONG);
      EditTextUtils.showSoftInput(mEditReply);
    }
    return;
  }
  if (mOnCommentChangeListener != null) {
    mOnCommentChangeListener.onCommentChanged(ChangeType.REPLIED);
  }
  if (isAdded()) {
    ToastUtils.showToast(getActivity(),getString(R.string.note_reply_successful));
    mEditReply.setText(null);
    mEditReply.getAutoSaveTextHelper().clearSavedText(mEditReply);
  }
  if (mComment != null && !(CommentStatus.fromString(mComment.getStatus()) == CommentStatus.APPROVED)) {
    moderateComment(CommentStatus.APPROVED);
  }
}
Program: 13897
Project: 13897
Buggy source:
private static String getCurrentDateTimeTZ(String blogTimeZoneOption,String pattern){
  Date date=new Date();
  SimpleDateFormat gmtDf=new SimpleDateFormat(pattern);
  if (blogTimeZoneOption == null) {
    AppLog.w(T.UTILS,"String_Node_Str");
    return gmtDf.format(date);
  }
  AppLog.v(T.STATS,"String_Node_Str" + blogTimeZoneOption);
  String timezoneNormalized;
  if (TextUtils.isEmpty(blogTimeZoneOption) || blogTimeZoneOption.equals("String_Node_Str") || blogTimeZoneOption.equals("String_Node_Str")) {
    timezoneNormalized="String_Node_Str";
  }
 else {
    String[] timezoneSplitted=org.apache.commons.lang.StringUtils.split(blogTimeZoneOption,"String_Node_Str");
    timezoneNormalized=timezoneSplitted[0];
    if (timezoneSplitted.length > 1 && timezoneSplitted[1].equals("String_Node_Str")) {
      timezoneNormalized+="String_Node_Str";
    }
    if (timezoneNormalized.startsWith("String_Node_Str")) {
      timezoneNormalized="String_Node_Str" + timezoneNormalized;
    }
 else {
      if (timezoneNormalized.startsWith("String_Node_Str")) {
        timezoneNormalized="String_Node_Str" + timezoneNormalized;
      }
 else {
        timezoneNormalized="String_Node_Str" + timezoneNormalized;
      }
    }
  }
  AppLog.v(T.STATS,"String_Node_Str" + timezoneNormalized);
  gmtDf.setTimeZone(TimeZone.getTimeZone(timezoneNormalized));
  return gmtDf.format(date);
}

Fixed version (ground truth):
private static String getCurrentDateTimeTZ(String blogTimeZoneOption,String pattern){
  Date date=new Date();
  SimpleDateFormat gmtDf=new SimpleDateFormat(pattern);
  if (blogTimeZoneOption == null) {
    AppLog.w(T.UTILS,"String_Node_Str");
    return gmtDf.format(date);
  }
  AppLog.v(T.STATS,"String_Node_Str" + blogTimeZoneOption);
  String timezoneNormalized;
  if (TextUtils.isEmpty(blogTimeZoneOption) || blogTimeZoneOption.equals("String_Node_Str") || blogTimeZoneOption.equals("String_Node_Str")) {
    timezoneNormalized="String_Node_Str";
  }
 else {
    String[] timezoneSplitted=org.apache.commons.lang3.StringUtils.split(blogTimeZoneOption,"String_Node_Str");
    timezoneNormalized=timezoneSplitted[0];
    if (timezoneSplitted.length > 1 && timezoneSplitted[1].equals("String_Node_Str")) {
      timezoneNormalized+="String_Node_Str";
    }
    if (timezoneNormalized.startsWith("String_Node_Str")) {
      timezoneNormalized="String_Node_Str" + timezoneNormalized;
    }
 else {
      if (timezoneNormalized.startsWith("String_Node_Str")) {
        timezoneNormalized="String_Node_Str" + timezoneNormalized;
      }
 else {
        timezoneNormalized="String_Node_Str" + timezoneNormalized;
      }
    }
  }
  AppLog.v(T.STATS,"String_Node_Str" + timezoneNormalized);
  gmtDf.setTimeZone(TimeZone.getTimeZone(timezoneNormalized));
  return gmtDf.format(date);
}
Program: 13898
Project: 13898
Buggy source:
public void setEntryTextOpenDetailsPage(final StatsPostModel currentItem){
  if (entryTextView == null) {
    return;
  }
  String name=StringEscapeUtils.unescapeHtml(currentItem.getTitle());
  entryTextView.setText(name);
  rowContent.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      ActivityLauncher.viewStatsSinglePostDetails(view.getContext(),currentItem);
    }
  }
);
  entryTextView.setTextColor(entryTextView.getContext().getResources().getColor(R.color.stats_link_text_color));
}

Fixed version (ground truth):
public void setEntryTextOpenDetailsPage(final StatsPostModel currentItem){
  if (entryTextView == null) {
    return;
  }
  String name=StringEscapeUtils.unescapeHtml4(currentItem.getTitle());
  entryTextView.setText(name);
  rowContent.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      ActivityLauncher.viewStatsSinglePostDetails(view.getContext(),currentItem);
    }
  }
);
  entryTextView.setTextColor(entryTextView.getContext().getResources().getColor(R.color.stats_link_text_color));
}
Program: 13899
Project: 13899
Buggy source:
private static void showMessage(Context context,int[] allWidgets,String message,SiteStore siteStore){
  if (allWidgets.length == 0) {
    return;
  }
  AppWidgetManager appWidgetManager=AppWidgetManager.getInstance(context);
  for (  int widgetId : allWidgets) {
    RemoteViews remoteViews=new RemoteViews(context.getPackageName(),R.layout.stats_widget_layout);
    int remoteBlogID=getRemoteBlogIDFromWidgetID(widgetId);
    SiteModel site=siteStore.getSiteBySiteId(remoteBlogID);
    String name;
    if (site != null) {
      name=context.getString(R.string.stats_widget_name_for_blog);
      name=String.format(name,StringEscapeUtils.unescapeHtml(SiteUtils.getSiteNameOrHomeURL(site)));
    }
 else {
      name=context.getString(R.string.stats_widget_name);
    }
    remoteViews.setTextViewText(R.id.blog_title,name);
    remoteViews.setViewVisibility(R.id.stats_widget_error_container,View.VISIBLE);
    remoteViews.setViewVisibility(R.id.stats_widget_values_container,View.GONE);
    remoteViews.setTextViewText(R.id.stats_widget_error_text,message);
    Intent intent=new Intent(context,WPMainActivity.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    intent.setAction("String_Node_Str");
    intent.addCategory("String_Node_Str");
    PendingIntent pendingIntent=PendingIntent.getActivity(context,0,intent,0);
    remoteViews.setOnClickPendingIntent(R.id.stats_widget_outer_container,pendingIntent);
    appWidgetManager.updateAppWidget(widgetId,remoteViews);
  }
}

Fixed version (ground truth):
private static void showMessage(Context context,int[] allWidgets,String message,SiteStore siteStore){
  if (allWidgets.length == 0) {
    return;
  }
  AppWidgetManager appWidgetManager=AppWidgetManager.getInstance(context);
  for (  int widgetId : allWidgets) {
    RemoteViews remoteViews=new RemoteViews(context.getPackageName(),R.layout.stats_widget_layout);
    int remoteBlogID=getRemoteBlogIDFromWidgetID(widgetId);
    SiteModel site=siteStore.getSiteBySiteId(remoteBlogID);
    String name;
    if (site != null) {
      name=context.getString(R.string.stats_widget_name_for_blog);
      name=String.format(name,StringEscapeUtils.unescapeHtml4(SiteUtils.getSiteNameOrHomeURL(site)));
    }
 else {
      name=context.getString(R.string.stats_widget_name);
    }
    remoteViews.setTextViewText(R.id.blog_title,name);
    remoteViews.setViewVisibility(R.id.stats_widget_error_container,View.VISIBLE);
    remoteViews.setViewVisibility(R.id.stats_widget_values_container,View.GONE);
    remoteViews.setTextViewText(R.id.stats_widget_error_text,message);
    Intent intent=new Intent(context,WPMainActivity.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    intent.setAction("String_Node_Str");
    intent.addCategory("String_Node_Str");
    PendingIntent pendingIntent=PendingIntent.getActivity(context,0,intent,0);
    remoteViews.setOnClickPendingIntent(R.id.stats_widget_outer_container,pendingIntent);
    appWidgetManager.updateAppWidget(widgetId,remoteViews);
  }
}
Program: 13901
Project: 13901
Buggy source:
private void blockBlogForPost(final ReaderPost post){
  if (post == null || !isAdded() || !hasPostAdapter() || !NetworkUtils.checkConnection(getActivity())) {
    return;
  }
  ReaderActions.ActionListener actionListener=new ReaderActions.ActionListener(){
    @Override public void onActionResult(    boolean succeeded){
      if (!succeeded && isAdded()) {
        ToastUtils.showToast(getActivity(),R.string.reader_toast_err_block_blog,ToastUtils.Duration.LONG);
      }
    }
  }
;
  final BlockedBlogResult blockResult=ReaderBlogActions.blockBlogFromReader(post.blogId,actionListener);
  AnalyticsUtils.trackWithSiteId(AnalyticsTracker.Stat.READER_BLOG_BLOCKED,mCurrentBlogId != 0 ? mCurrentBlogId : null);
  getPostAdapter().removePostsInBlog(post.blogId);
  View.OnClickListener undoListener=new View.OnClickListener(){
    @Override public void onClick(    View v){
      ReaderBlogActions.undoBlockBlogFromReader(blockResult);
      refreshPosts();
    }
  }
;
  Snackbar.make(getView(),getString(R.string.reader_toast_blog_blocked),Snackbar.LENGTH_LONG).setAction(R.string.undo,undoListener).show();
}

Fixed version (ground truth):
private void blockBlogForPost(final ReaderPost post){
  if (post == null || !isAdded() || !hasPostAdapter() || !NetworkUtils.checkConnection(getActivity())) {
    return;
  }
  ReaderActions.ActionListener actionListener=new ReaderActions.ActionListener(){
    @Override public void onActionResult(    boolean succeeded){
      if (!succeeded && isAdded()) {
        ToastUtils.showToast(getActivity(),R.string.reader_toast_err_block_blog,ToastUtils.Duration.LONG);
      }
    }
  }
;
  final BlockedBlogResult blockResult=ReaderBlogActions.blockBlogFromReader(post.blogId,actionListener);
  AnalyticsUtils.trackWithSiteId(AnalyticsTracker.Stat.READER_BLOG_BLOCKED,mCurrentBlogId);
  getPostAdapter().removePostsInBlog(post.blogId);
  View.OnClickListener undoListener=new View.OnClickListener(){
    @Override public void onClick(    View v){
      ReaderBlogActions.undoBlockBlogFromReader(blockResult);
      refreshPosts();
    }
  }
;
  Snackbar.make(getView(),getString(R.string.reader_toast_blog_blocked),Snackbar.LENGTH_LONG).setAction(R.string.undo,undoListener).show();
}
Program: 13902
Project: 13902
Buggy source:
private void addMediaToUploadService(@NonNull MediaModel media){
  if (mUploadService == null) {
    startMediaUploadService();
    mPendingUploads.add(media);
  }
 else {
    mUploadService.addMediaToQueue(media);
  }
}

Fixed version (ground truth):
private void addMediaToUploadService(@NonNull MediaModel media){
  if (!NetworkUtils.isNetworkAvailable(this)) {
    AppLog.v(AppLog.T.MEDIA,"String_Node_Str");
    return;
  }
  ArrayList<MediaModel> mediaList=new ArrayList<>();
  mediaList.add(media);
  MediaUploadService.startService(this,mSite,mediaList);
}
Program: 13903
Project: 13903
Buggy source:
@Override protected void onDestroy(){
  super.onDestroy();
  doUnbindDeleteService();
  doUnbindUploadService();
}

Fixed version (ground truth):
@Override protected void onDestroy(){
  super.onDestroy();
  doUnbindDeleteService();
}
Program: 13906
Project: 13906
Buggy source:
void inject(AddCategoryActivity object);

Fixed version (ground truth):
void inject(HtmlToSpannedConverter object);
Program: 13913
Project: 13913
Buggy source:
/** 
 * Request remote site data via the WordPress REST API.
 */
@Override protected void fetchRemoteData(){
  fetchCategories();
  WordPress.getRestClientUtils().getGeneralSettings(mSite.getSiteId(),new RestRequest.Listener(){
    @Override public void onResponse(    JSONObject response){
      AppLog.d(AppLog.T.API,"String_Node_Str");
      credentialsVerified(true);
      mRemoteSettings.localTableId=mSite.getId();
      deserializeDotComRestResponse(mSite,response);
      if (!mRemoteSettings.equals(mSettings)) {
        final Map<String,String> currentPostFormats=mSettings.postFormats;
        mSettings.copyFrom(mRemoteSettings);
        mSettings.postFormats=currentPostFormats;
        SiteSettingsTable.saveSettings(mSettings);
        notifyUpdatedOnUiThread(null);
      }
    }
  }
,new RestRequest.ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      AppLog.w(AppLog.T.API,"String_Node_Str" + error);
      notifyUpdatedOnUiThread(error);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Request remote site data via the WordPress REST API.
 */
@Override protected void fetchRemoteData(){
  fetchCategories();
  WordPress.getRestClientUtils().getGeneralSettings(mSite.getSiteId(),new RestRequest.Listener(){
    @Override public void onResponse(    JSONObject response){
      AppLog.d(AppLog.T.API,"String_Node_Str");
      credentialsVerified(true);
      mRemoteSettings.localTableId=mSite.getId();
      deserializeDotComRestResponse(mSite,response);
      if (!mRemoteSettings.equals(mSettings)) {
        final Map<String,String> currentPostFormats=mSettings.postFormats;
        boolean location=mSettings.location;
        boolean optimizeImage=mSettings.optimizeImage;
        mSettings.copyFrom(mRemoteSettings);
        mSettings.postFormats=currentPostFormats;
        mSettings.location=location;
        mSettings.optimizeImage=optimizeImage;
        SiteSettingsTable.saveSettings(mSettings);
        notifyUpdatedOnUiThread(null);
      }
    }
  }
,new RestRequest.ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      AppLog.w(AppLog.T.API,"String_Node_Str" + error);
      notifyUpdatedOnUiThread(error);
    }
  }
);
}
Program: 13914
Project: 13914
Buggy source:
public void setEditingEnabled(boolean enabled){
  final Preference[] editablePreference={mTitlePref,mTaglinePref,mPrivacyPref,mLanguagePref,mUsernamePref,mPasswordPref,mLocationPref,mCategoryPref,mFormatPref,mAllowCommentsPref,mAllowCommentsNested,mSendPingbacksPref,mSendPingbacksNested,mReceivePingbacksPref,mReceivePingbacksNested,mIdentityRequiredPreference,mUserAccountRequiredPref,mSortByPref,mWhitelistPref,mRelatedPostsPref,mCloseAfterPref,mPagingPref,mThreadingPref,mMultipleLinksPref,mModerationHoldPref,mBlacklistPref,mUploadAndLinkPref,mDeleteSitePref};
  for (  Preference preference : editablePreference) {
    if (preference != null)     preference.setEnabled(enabled);
  }
  mEditingEnabled=enabled;
}

Fixed version (ground truth):
public void setEditingEnabled(boolean enabled){
  final Preference[] editablePreference={mTitlePref,mTaglinePref,mPrivacyPref,mLanguagePref,mUsernamePref,mPasswordPref,mLocationPref,mCategoryPref,mFormatPref,mAllowCommentsPref,mAllowCommentsNested,mSendPingbacksPref,mSendPingbacksNested,mReceivePingbacksPref,mReceivePingbacksNested,mIdentityRequiredPreference,mUserAccountRequiredPref,mSortByPref,mWhitelistPref,mRelatedPostsPref,mCloseAfterPref,mPagingPref,mThreadingPref,mMultipleLinksPref,mModerationHoldPref,mBlacklistPref,mOptimizeImage,mDeleteSitePref};
  for (  Preference preference : editablePreference) {
    if (preference != null)     preference.setEnabled(enabled);
  }
  mEditingEnabled=enabled;
}
Program: 13918
Project: 13918
Buggy source:
/** 
 * Gets the geo-tagging value stored in   {@link SharedPreferences}, false by default.
 */
public static boolean getGeotagging(Context context){
  return siteSettingsPreferences(context).getBoolean(LOCATION_PREF_KEY,false);
}

Fixed version (ground truth):
/** 
 * Gets the geo-tagging value
 */
public boolean getGeotagging(){
  return mSettings.location;
}
Program: 13919
Project: 13919
Buggy source:
/** 
 * Need to defer loading the cached settings to a thread so it completes after initialization.
 */
private void loadCachedSettings(){
  Cursor localSettings=SiteSettingsTable.getSettings(mSite.getSiteId());
  if (localSettings != null) {
    Map<Integer,CategoryModel> cachedModels=SiteSettingsTable.getAllCategories();
    mSettings.deserializeOptionsDatabaseCursor(localSettings,cachedModels);
    mSettings.language=languageIdToLanguageCode(Integer.toString(mSettings.languageId));
    if (mSettings.language == null) {
      setLanguageCode(LanguageUtils.getPatchedCurrentDeviceLanguage(null));
    }
    mRemoteSettings.language=mSettings.language;
    mRemoteSettings.languageId=mSettings.languageId;
    mRemoteSettings.location=mSettings.location;
    localSettings.close();
    notifyUpdatedOnUiThread(null);
  }
 else {
    mSettings.isInLocalTable=false;
    setAddress(mSite.getUrl());
    setUsername(mSite.getUsername());
    setPassword(mSite.getPassword());
    setTitle(mSite.getName());
  }
}

Fixed version (ground truth):
/** 
 * Need to defer loading the cached settings to a thread so it completes after initialization.
 */
private void loadCachedSettings(){
  Cursor localSettings=SiteSettingsTable.getSettings(mSite.getId());
  if (localSettings != null) {
    Map<Integer,CategoryModel> cachedModels=SiteSettingsTable.getAllCategories();
    mSettings.deserializeOptionsDatabaseCursor(localSettings,cachedModels);
    mSettings.language=languageIdToLanguageCode(Integer.toString(mSettings.languageId));
    if (mSettings.language == null) {
      setLanguageCode(LanguageUtils.getPatchedCurrentDeviceLanguage(null));
    }
    mRemoteSettings.language=mSettings.language;
    mRemoteSettings.languageId=mSettings.languageId;
    mRemoteSettings.location=mSettings.location;
    mRemoteSettings.optimizeImage=mSettings.optimizeImage;
    localSettings.close();
    notifyUpdatedOnUiThread(null);
  }
 else {
    mSettings.isInLocalTable=false;
    setAddress(mSite.getUrl());
    setUsername(mSite.getUsername());
    setPassword(mSite.getPassword());
    setTitle(mSite.getName());
  }
}
Program: 13920
Project: 13920
Buggy source:
public void saveSettings(){
  SiteSettingsTable.saveSettings(mSettings);
  siteSettingsPreferences(mActivity).edit().putString(LANGUAGE_PREF_KEY,mSettings.language).apply();
  siteSettingsPreferences(mActivity).edit().putBoolean(LOCATION_PREF_KEY,mSettings.location).apply();
  siteSettingsPreferences(mActivity).edit().putInt(DEF_CATEGORY_PREF_KEY,mSettings.defaultCategory).apply();
  siteSettingsPreferences(mActivity).edit().putString(DEF_FORMAT_PREF_KEY,mSettings.defaultPostFormat).apply();
}

Fixed version (ground truth):
public void saveSettings(){
  SiteSettingsTable.saveSettings(mSettings);
  siteSettingsPreferences(mActivity).edit().putString(LANGUAGE_PREF_KEY,mSettings.language).apply();
  siteSettingsPreferences(mActivity).edit().putInt(DEF_CATEGORY_PREF_KEY,mSettings.defaultCategory).apply();
  siteSettingsPreferences(mActivity).edit().putString(DEF_FORMAT_PREF_KEY,mSettings.defaultPostFormat).apply();
}
Program: 13922
Project: 13922
Buggy source:
@Override public void onMediaUploadSucceeded(final String localMediaId,final MediaFile mediaFile){
  final MediaType mediaType=mUploadingMedia.get(localMediaId);
  if (mediaType != null) {
    String remoteUrl=Utils.escapeQuotes(mediaFile.getFileURL());
    if (mediaType.equals(MediaType.IMAGE)) {
      AttributesImpl attrs=new AttributesImpl();
      attrs.addAttribute("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",remoteUrl);
      content.clearOverlays(ImagePredicate.localMediaIdPredicate(localMediaId),attrs);
      content.refreshText();
      mUploadingMedia.remove(localMediaId);
    }
 else     if (mediaType.equals(MediaType.VIDEO)) {
    }
  }
}

Fixed version (ground truth):
@Override public void onMediaUploadSucceeded(final String localMediaId,final MediaFile mediaFile){
  if (!isAdded()) {
    return;
  }
  final MediaType mediaType=mUploadingMedia.get(localMediaId);
  if (mediaType != null) {
    String remoteUrl=Utils.escapeQuotes(mediaFile.getFileURL());
    if (mediaType.equals(MediaType.IMAGE)) {
      AttributesImpl attrs=new AttributesImpl();
      attrs.addAttribute("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",remoteUrl);
      content.clearOverlays(ImagePredicate.localMediaIdPredicate(localMediaId),attrs);
      content.refreshText();
      mUploadingMedia.remove(localMediaId);
    }
 else     if (mediaType.equals(MediaType.VIDEO)) {
    }
  }
}
Program: 13923
Project: 13923
Buggy source:
@Override public void onMediaUploadProgress(final String localMediaId,final float progress){
  final MediaType mediaType=mUploadingMedia.get(localMediaId);
  if (mediaType != null) {
    AttributesWithClass attributesWithClass=new AttributesWithClass(content.getMediaAttributes(ImagePredicate.localMediaIdPredicate(localMediaId)));
    attributesWithClass.addClass("String_Node_Str");
    content.setOverlayLevel(ImagePredicate.localMediaIdPredicate(localMediaId),1,(int)(progress * 10000),attributesWithClass.getAttributesIml());
    content.refreshText();
  }
}

Fixed version (ground truth):
@Override public void onMediaUploadProgress(final String localMediaId,final float progress){
  if (!isAdded()) {
    return;
  }
  final MediaType mediaType=mUploadingMedia.get(localMediaId);
  if (mediaType != null) {
    AttributesWithClass attributesWithClass=new AttributesWithClass(content.getMediaAttributes(ImagePredicate.localMediaIdPredicate(localMediaId)));
    attributesWithClass.addClass("String_Node_Str");
    content.setOverlayLevel(ImagePredicate.localMediaIdPredicate(localMediaId),1,(int)(progress * 10000),attributesWithClass.getAttributesIml());
    content.refreshText();
  }
}
Program: 13924
Project: 13924
Buggy source:
@Override public void onMediaUploadFailed(final String localMediaId,final String errorMessage){
  MediaType mediaType=mUploadingMedia.get(localMediaId);
  if (mediaType != null) {
switch (mediaType) {
case IMAGE:
      AttributesWithClass attributesWithClass=new AttributesWithClass(content.getMediaAttributes(ImagePredicate.localMediaIdPredicate(localMediaId)));
    attributesWithClass.removeClass("String_Node_Str");
  attributesWithClass.addClass("String_Node_Str");
overlayFailedMedia(localMediaId,attributesWithClass.getAttributesIml());
content.refreshText();
break;
case VIDEO:
}
mFailedMediaIds.add(localMediaId);
mUploadingMedia.remove(localMediaId);
}
}

Fixed version (ground truth):
@Override public void onMediaUploadFailed(final String localMediaId,final String errorMessage){
  if (!isAdded()) {
    return;
  }
  MediaType mediaType=mUploadingMedia.get(localMediaId);
  if (mediaType != null) {
switch (mediaType) {
case IMAGE:
      AttributesWithClass attributesWithClass=new AttributesWithClass(content.getMediaAttributes(ImagePredicate.localMediaIdPredicate(localMediaId)));
    attributesWithClass.removeClass("String_Node_Str");
  attributesWithClass.addClass("String_Node_Str");
overlayFailedMedia(localMediaId,attributesWithClass.getAttributesIml());
content.refreshText();
break;
case VIDEO:
}
mFailedMediaIds.add(localMediaId);
mUploadingMedia.remove(localMediaId);
}
}
Program: 13927
Project: 13927
Buggy source:
@SuppressWarnings("String_Node_Str") @Subscribe(threadMode=ThreadMode.MAIN) public void onNewSiteCreated(OnNewSiteCreated event){
  AppLog.i(T.NUX,event.toString());
  if (event.isError()) {
    endProgress();
    showError(event.error.type,event.error.message);
    return;
  }
  if (event.dryRun) {
    mNewSitePayload.dryRun=false;
    mDispatcher.dispatch(SiteActionBuilder.newCreateNewSiteAction(mNewSitePayload));
    updateProgress(getString(R.string.creating_your_site));
    AppLog.i(T.NUX,"String_Node_Str" + mNewSitePayload.siteTitle + "String_Node_Str"+ mNewSitePayload.siteName);
    return;
  }
  mDispatcher.dispatch(SiteActionBuilder.newFetchSitesAction());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Subscribe(threadMode=ThreadMode.MAIN) public void onNewSiteCreated(OnNewSiteCreated event){
  AppLog.i(T.NUX,event.toString());
  if (event.isError()) {
    endProgress();
    showError(event.error.type,event.error.message);
    return;
  }
  if (event.dryRun) {
    mNewSitePayload.dryRun=false;
    mDispatcher.dispatch(SiteActionBuilder.newCreateNewSiteAction(mNewSitePayload));
    updateProgress(getString(R.string.creating_your_site));
    AppLog.i(T.NUX,"String_Node_Str" + mNewSitePayload.siteTitle + "String_Node_Str"+ mNewSitePayload.siteName);
    return;
  }
  AnalyticsTracker.track(AnalyticsTracker.Stat.CREATED_SITE);
  mDispatcher.dispatch(SiteActionBuilder.newFetchSitesAction());
}
Program: 13928
Project: 13928
Buggy source:
@SuppressWarnings("String_Node_Str") @Subscribe(threadMode=ThreadMode.MAIN) public void onNewSiteCreated(OnNewSiteCreated event){
  AppLog.i(T.NUX,event.toString());
  if (event.isError()) {
    endProgress();
    AnalyticsTracker.track(AnalyticsTracker.Stat.CREATE_ACCOUNT_FAILED);
    showSiteError(event.error.type,event.error.message);
    return;
  }
  if (event.dryRun) {
    updateProgress(getString(R.string.creating_your_account));
    mNewSitePayload.dryRun=false;
    mNewAccountPayload.dryRun=false;
    mDispatcher.dispatch(AccountActionBuilder.newCreateNewAccountAction(mNewAccountPayload));
    return;
  }
  fetchSiteAndAccount();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Subscribe(threadMode=ThreadMode.MAIN) public void onNewSiteCreated(OnNewSiteCreated event){
  AppLog.i(T.NUX,event.toString());
  if (event.isError()) {
    endProgress();
    AnalyticsTracker.track(AnalyticsTracker.Stat.CREATE_ACCOUNT_FAILED);
    showSiteError(event.error.type,event.error.message);
    return;
  }
  if (event.dryRun) {
    updateProgress(getString(R.string.creating_your_account));
    mNewSitePayload.dryRun=false;
    mNewAccountPayload.dryRun=false;
    mDispatcher.dispatch(AccountActionBuilder.newCreateNewAccountAction(mNewAccountPayload));
    return;
  }
  AnalyticsTracker.track(AnalyticsTracker.Stat.CREATED_SITE);
  fetchSiteAndAccount();
}
Program: 13930
Project: 13930
Buggy source:
@Override public void onClick(View v){
  if (mDialog != null)   return;
  AnalyticsTracker.track(AnalyticsTracker.Stat.SITE_SETTINGS_LEARN_MORE_CLICKED);
  showDialog();
}

Fixed version (ground truth):
@Override public void onClick(View v){
  if (mDialog != null)   return;
  AnalyticsTracker.track(Stat.SITE_SETTINGS_LEARN_MORE_CLICKED);
  showDialog();
}
Program: 13931
Project: 13931
Buggy source:
@Override public void onPageFinished(WebView webView,String url){
  super.onPageFinished(webView,url);
  if (mDialog != null) {
    AnalyticsTracker.track(AnalyticsTracker.Stat.SITE_SETTINGS_LEARN_MORE_CLICKED);
    webView.loadUrl(SUPPORT_CONTENT_JS);
    mDialog.setContentView(webView);
    webView.scrollTo(0,0);
  }
}

Fixed version (ground truth):
@Override public void onPageFinished(WebView webView,String url){
  super.onPageFinished(webView,url);
  if (mDialog != null) {
    AnalyticsTracker.track(Stat.SITE_SETTINGS_LEARN_MORE_LOADED);
    webView.loadUrl(SUPPORT_CONTENT_JS);
    mDialog.setContentView(webView);
    webView.scrollTo(0,0);
  }
}
Program: 13932
Project: 13932
Buggy source:
private void validateAndCreateUserAndBlog(){
  if (mSystemService.getActiveNetworkInfo() == null) {
    AlertUtils.showAlert(getActivity(),R.string.no_network_title,R.string.no_network_message);
    return;
  }
  if (!isUserDataValid()) {
    return;
  }
  if (View.VISIBLE == mProgressBarSignIn.getVisibility()) {
    return;
  }
  final String siteUrl=EditTextUtils.getText(mSiteUrlTextField).trim();
  final String siteName=EditTextUtils.getText(mSiteTitleTextField).trim();
  final String language=LanguageUtils.getPatchedCurrentDeviceLanguage(getActivity());
  NewSitePayload newSitePayload=new NewSitePayload(siteName,siteUrl,language,SiteVisibility.PUBLIC,false);
  mDispatcher.dispatch(SiteActionBuilder.newCreateNewSiteAction(newSitePayload));
  updateProgress(getString(R.string.create_new_blog_wpcom));
  AppLog.i(T.NUX,"String_Node_Str" + siteName + "String_Node_Str"+ siteUrl);
}

Fixed version (ground truth):
private void validateAndCreateUserAndBlog(){
  if (mSystemService.getActiveNetworkInfo() == null) {
    AlertUtils.showAlert(getActivity(),R.string.no_network_title,R.string.no_network_message);
    return;
  }
  if (!isUserDataValid()) {
    return;
  }
  if (View.VISIBLE == mProgressBarSignIn.getVisibility()) {
    return;
  }
  startProgress(getString(R.string.creating_your_site));
  final String siteUrl=EditTextUtils.getText(mSiteUrlTextField).trim();
  final String siteTitle=EditTextUtils.getText(mSiteTitleTextField).trim();
  final String language=LanguageUtils.getPatchedCurrentDeviceLanguage(getActivity());
  NewSitePayload newSitePayload=new NewSitePayload(siteUrl,siteTitle,language,SiteVisibility.PUBLIC,false);
  mDispatcher.dispatch(SiteActionBuilder.newCreateNewSiteAction(newSitePayload));
  AppLog.i(T.NUX,"String_Node_Str" + siteTitle + "String_Node_Str"+ siteUrl);
}
Program: 13933
Project: 13933
Buggy source:
private void validateAndCreateUserAndBlog(){
  if (mSystemService.getActiveNetworkInfo() == null) {
    AlertUtils.showAlert(getActivity(),R.string.no_network_title,R.string.no_network_message);
    return;
  }
  if (!isUserDataValid()) {
    return;
  }
  if (View.VISIBLE == mProgressBarSignIn.getVisibility()) {
    return;
  }
  startProgress(getString(R.string.validating_user_data));
  clearErrors();
  mSitesFetched=false;
  mAccountSettingsFetched=false;
  mAccountFetched=false;
  String siteUrl=EditTextUtils.getText(mSiteUrlTextField).trim();
  mEmail=EditTextUtils.getText(mEmailTextField).trim();
  mUsername=EditTextUtils.getText(mUsernameTextField).trim();
  mPassword=EditTextUtils.getText(mPasswordTextField).trim();
  String siteName=siteUrlToSiteName(siteUrl);
  String language=LanguageUtils.getPatchedCurrentDeviceLanguage(getActivity());
  mNewAccountPayload=new NewAccountPayload(mUsername,mPassword,mEmail,true);
  mNewSitePayload=new NewSitePayload(siteName,siteUrl,language,SiteVisibility.PUBLIC,true);
  mDispatcher.dispatch(AccountActionBuilder.newCreateNewAccountAction(mNewAccountPayload));
  updateProgress(getString(R.string.validating_site_data));
  AppLog.i(T.NUX,"String_Node_Str" + mUsername + "String_Node_Str"+ mEmail+ "String_Node_Str"+ siteName+ "String_Node_Str"+ siteUrl);
}

Fixed version (ground truth):
private void validateAndCreateUserAndBlog(){
  if (mSystemService.getActiveNetworkInfo() == null) {
    AlertUtils.showAlert(getActivity(),R.string.no_network_title,R.string.no_network_message);
    return;
  }
  if (!isUserDataValid()) {
    return;
  }
  if (View.VISIBLE == mProgressBarSignIn.getVisibility()) {
    return;
  }
  startProgress(getString(R.string.validating_user_data));
  clearErrors();
  mSitesFetched=false;
  mAccountSettingsFetched=false;
  mAccountFetched=false;
  String siteUrl=EditTextUtils.getText(mSiteUrlTextField).trim();
  mEmail=EditTextUtils.getText(mEmailTextField).trim();
  mUsername=EditTextUtils.getText(mUsernameTextField).trim();
  mPassword=EditTextUtils.getText(mPasswordTextField).trim();
  String siteTitle=siteUrlToSiteName(siteUrl);
  String language=LanguageUtils.getPatchedCurrentDeviceLanguage(getActivity());
  mNewAccountPayload=new NewAccountPayload(mUsername,mPassword,mEmail,true);
  mNewSitePayload=new NewSitePayload(siteUrl,siteTitle,language,SiteVisibility.PUBLIC,true);
  mDispatcher.dispatch(AccountActionBuilder.newCreateNewAccountAction(mNewAccountPayload));
  updateProgress(getString(R.string.validating_site_data));
  AppLog.i(T.NUX,"String_Node_Str" + mUsername + "String_Node_Str"+ mEmail+ "String_Node_Str"+ siteTitle+ "String_Node_Str"+ siteUrl);
}