nus-yam/ex-repair huggingface dataset:
Program: 13979
Project: 13979
Buggy source:
public static void browsePostOrPage(Context context,Blog blog,Post post){
  if (blog == null || post == null || TextUtils.isEmpty(post.getPermaLink()))   return;
  String url=UrlUtils.appendUrlParameter(post.getPermaLink(),"String_Node_Str","String_Node_Str");
  WPWebViewActivity.openUrlByUsingBlogCredentials(context,blog,post,url);
}

Fixed version (ground truth):
public static void browsePostOrPage(Context context,Blog blog,Post post){
  if (blog == null || post == null || TextUtils.isEmpty(post.getPermaLink()))   return;
  String url=UrlUtils.appendUrlParameter(post.getPermaLink(),"String_Node_Str","String_Node_Str");
  WPWebViewActivity.openPostOrPage(context,blog,post,url);
}
Program: 13980
Project: 13980
Buggy source:
private static void openWPCOMURL(Context context,String url,String user){
  if (context == null) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(url)) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    Toast.makeText(context,context.getResources().getText(R.string.invalid_site_url_message),Toast.LENGTH_SHORT).show();
    return;
  }
  if (TextUtils.isEmpty(user)) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    return;
  }
  Intent intent=new Intent(context,WPWebViewActivity.class);
  intent.putExtra(WPWebViewActivity.AUTHENTICATION_USER,user);
  intent.putExtra(WPWebViewActivity.URL_TO_LOAD,url);
  intent.putExtra(WPWebViewActivity.AUTHENTICATION_URL,WPCOM_LOGIN_URL);
  context.startActivity(intent);
}

Fixed version (ground truth):
private static void openWPCOMURL(Context context,String url){
  if (context == null) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(url)) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    Toast.makeText(context,context.getResources().getText(R.string.invalid_site_url_message),Toast.LENGTH_SHORT).show();
    return;
  }
  Intent intent=new Intent(context,WPWebViewActivity.class);
  intent.putExtra(WPWebViewActivity.USE_GLOBAL_WPCOM_USER,true);
  intent.putExtra(WPWebViewActivity.URL_TO_LOAD,url);
  intent.putExtra(WPWebViewActivity.AUTHENTICATION_URL,WPCOM_LOGIN_URL);
  context.startActivity(intent);
}
Program: 13982
Project: 13982
Buggy source:
public static void openUrlByUsingWPCOMCredentials(Context context,String url,String user){
  openWPCOMURL(context,url,user);
}

Fixed version (ground truth):
public static void openUrlByUsingWPCOMCredentials(Context context,String url){
  openWPCOMURL(context,url);
}
Program: 13983
Project: 13983
Buggy source:
public void showWebViewActivityForUrl(String url){
  if (isFinishing() || url == null)   return;
  if (url.contains(DOMAIN_WPCOM)) {
    WPWebViewActivity.openUrlByUsingWPCOMCredentials(this,url,AccountHelper.getDefaultAccount().getUserName());
  }
 else {
    WPWebViewActivity.openURL(this,url);
  }
}

Fixed version (ground truth):
public void showWebViewActivityForUrl(String url){
  if (isFinishing() || url == null)   return;
  if (url.contains(DOMAIN_WPCOM)) {
    WPWebViewActivity.openUrlByUsingWPCOMCredentials(this,url);
  }
 else {
    WPWebViewActivity.openURL(this,url);
  }
}
Program: 13984
Project: 13984
Buggy source:
private void showPurchasesDialog(final Blog currentBlog){
  AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
  builder.setTitle(R.string.premium_upgrades_title);
  builder.setMessage(R.string.premium_upgrades_message);
  builder.setPositiveButton(R.string.show_purchases,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SITE_SETTINGS_DELETE_SITE_PURCHASES_SHOW_CLICKED);
      WPWebViewActivity.openUrlByUsingWPCOMCredentials(getActivity(),WORDPRESS_PURCHASES_URL,AccountHelper.getCurrentUsernameForBlog(currentBlog));
    }
  }
);
  builder.setNegativeButton(getString(R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.dismiss();
    }
  }
);
  builder.show();
  AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SITE_SETTINGS_DELETE_SITE_PURCHASES_SHOWN);
}

Fixed version (ground truth):
private void showPurchasesDialog(final Blog currentBlog){
  AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
  builder.setTitle(R.string.premium_upgrades_title);
  builder.setMessage(R.string.premium_upgrades_message);
  builder.setPositiveButton(R.string.show_purchases,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SITE_SETTINGS_DELETE_SITE_PURCHASES_SHOW_CLICKED);
      WPWebViewActivity.openUrlByUsingWPCOMCredentials(getActivity(),WORDPRESS_PURCHASES_URL);
    }
  }
);
  builder.setNegativeButton(getString(R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.dismiss();
    }
  }
);
  builder.show();
  AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.SITE_SETTINGS_DELETE_SITE_PURCHASES_SHOWN);
}
Program: 13985
Project: 13985
Buggy source:
private static void openUrlInternal(Context context,@NonNull String url){
  if (WPUrlUtils.isWordPressCom(url)) {
    WPWebViewActivity.openUrlByUsingWPCOMCredentials(context,url,AccountHelper.getDefaultAccount().getUserName());
  }
 else {
    WPWebViewActivity.openURL(context,url,ReaderConstants.HTTP_REFERER_URL);
  }
}

Fixed version (ground truth):
private static void openUrlInternal(Context context,@NonNull String url){
  if (WPUrlUtils.isWordPressCom(url)) {
    WPWebViewActivity.openUrlByUsingWPCOMCredentials(context,url);
  }
 else {
    WPWebViewActivity.openURL(context,url,ReaderConstants.HTTP_REFERER_URL);
  }
}
Program: 13988
Project: 13988
Buggy source:
private static void openWPCOMURL(Activity activity,String url,Theme currentTheme,Blog blog,Boolean isCurrentTheme){
  if (activity == null) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(url)) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    Toast.makeText(activity,activity.getResources().getText(R.string.invalid_site_url_message),Toast.LENGTH_SHORT).show();
    return;
  }
  String authURL=ThemeWebActivity.getBlogLoginUrl(blog);
  Intent intent=new Intent(activity,ThemeWebActivity.class);
  intent.putExtra(ThemeWebActivity.AUTHENTICATION_USER,blog.getUsername());
  intent.putExtra(ThemeWebActivity.AUTHENTICATION_PASSWD,blog.getPassword());
  intent.putExtra(ThemeWebActivity.URL_TO_LOAD,url);
  intent.putExtra(ThemeWebActivity.AUTHENTICATION_URL,authURL);
  intent.putExtra(ThemeWebActivity.LOCAL_BLOG_ID,blog.getLocalTableBlogId());
  intent.putExtra(IS_PREMIUM_THEME,currentTheme.isPremium());
  intent.putExtra(IS_CURRENT_THEME,isCurrentTheme);
  intent.putExtra(THEME_NAME,currentTheme.getName());
  intent.putExtra(ThemeBrowserActivity.THEME_ID,currentTheme.getId());
  activity.startActivityForResult(intent,ThemeBrowserActivity.ACTIVATE_THEME);
}

Fixed version (ground truth):
private static void openWPCOMURL(Activity activity,String url,Theme currentTheme,Blog blog,boolean isCurrentTheme){
  if (activity == null) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(url)) {
    AppLog.e(AppLog.T.UTILS,"String_Node_Str");
    Toast.makeText(activity,activity.getResources().getText(R.string.invalid_site_url_message),Toast.LENGTH_SHORT).show();
    return;
  }
  String authURL=ThemeWebActivity.getBlogLoginUrl(blog);
  Intent intent=new Intent(activity,ThemeWebActivity.class);
  intent.putExtra(ThemeWebActivity.URL_TO_LOAD,url);
  intent.putExtra(ThemeWebActivity.AUTHENTICATION_URL,authURL);
  intent.putExtra(ThemeWebActivity.LOCAL_BLOG_ID,blog.getLocalTableBlogId());
  intent.putExtra(WPWebViewActivity.USE_GLOBAL_WPCOM_USER,true);
  intent.putExtra(IS_PREMIUM_THEME,currentTheme.isPremium());
  intent.putExtra(IS_CURRENT_THEME,isCurrentTheme);
  intent.putExtra(THEME_NAME,currentTheme.getName());
  intent.putExtra(ThemeBrowserActivity.THEME_ID,currentTheme.getId());
  activity.startActivityForResult(intent,ThemeBrowserActivity.ACTIVATE_THEME);
}
Program: 13989
Project: 13989
Buggy source:
private void onWPComEmailCheckError(boolean forceWordPressComDisplay){
  if (!isAdded()) {
    return;
  }
  if (forceWordPressComDisplay) {
    showSelfHostedSignInForm();
    return;
  }
  if (isUsernameEmail()) {
    showSelfHostedSignInForm();
  }
 else {
    showPasswordFieldAndFocus();
  }
}

Fixed version (ground truth):
private void onWPComEmailCheckError(boolean forceWordPressComDisplay){
  if (!isAdded()) {
    return;
  }
  if (forceWordPressComDisplay) {
    showPasswordFieldAndFocus();
    return;
  }
  if (isUsernameEmail()) {
    showSelfHostedSignInForm();
  }
 else {
    showPasswordFieldAndFocus();
  }
}
Program: 13990
Project: 13990
Buggy source:
private void handleBadgeResetPN(Context context,Bundle data){
  if (data == null || !data.containsKey(PUSH_ARG_NOTE_ID)) {
    return;
  }
  removeNotificationWithNoteIdFromSystemBar(context,data.getString(PUSH_ARG_NOTE_ID,"String_Node_Str"));
  if (sActiveNotificationsMap.size() > 0) {
    rebuildAndUpdateNotificationsOnSystemBar(context,data);
  }
  EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
}

Fixed version (ground truth):
private void handleBadgeResetPN(Context context,Bundle data){
  if (data == null || !data.containsKey(PUSH_ARG_NOTE_ID)) {
    return;
  }
  removeNotificationWithNoteIdFromSystemBar(context,data.getString(PUSH_ARG_NOTE_ID,"String_Node_Str"));
  if (sActiveNotificationsMap.size() > 0) {
    rebuildAndUpdateNotificationsOnSystemBar(context,data);
  }
  EventBus.getDefault().post(new NotificationEvents.NotificationsChanged(sActiveNotificationsMap.size() > 0));
}
Program: 13992
Project: 13992
Buggy source:
@Override public void onPageSelected(int position){
  AppPrefs.setMainTabIndex(position);
switch (position) {
case WPMainTabAdapter.TAB_MY_SITE:
    setTabLayoutElevation(mAppBarElevation);
  break;
case WPMainTabAdapter.TAB_READER:
setTabLayoutElevation(0);
break;
case WPMainTabAdapter.TAB_ME:
setTabLayoutElevation(mAppBarElevation);
break;
case WPMainTabAdapter.TAB_NOTIFS:
setTabLayoutElevation(mAppBarElevation);
Fragment fragment=mTabAdapter.getFragment(position);
if (fragment instanceof NotificationsListFragment) {
((NotificationsListFragment)fragment).clearPendingNotificationsItemsOnUI();
}
break;
}
trackLastVisibleTab(position,true);
}

Fixed version (ground truth):
@Override public void onPageSelected(int position){
  AppPrefs.setMainTabIndex(position);
switch (position) {
case WPMainTabAdapter.TAB_MY_SITE:
    setTabLayoutElevation(mAppBarElevation);
  break;
case WPMainTabAdapter.TAB_READER:
setTabLayoutElevation(0);
break;
case WPMainTabAdapter.TAB_ME:
setTabLayoutElevation(mAppBarElevation);
break;
case WPMainTabAdapter.TAB_NOTIFS:
setTabLayoutElevation(mAppBarElevation);
Fragment fragment=mTabAdapter.getFragment(position);
if (fragment instanceof OnScrollToTopListener) {
((OnScrollToTopListener)fragment).onScrollToTop();
}
break;
}
trackLastVisibleTab(position,true);
}
Program: 13995
Project: 13995
Buggy source:
@Override public boolean onKeyPreIme(int keyCode,KeyEvent event){
  if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {
    setFocusableInTouchMode(false);
    clearFocus();
    if (mBackListener != null) {
      mBackListener.onEditTextBack();
    }
  }
  return super.dispatchKeyEvent(event);
}

Fixed version (ground truth):
@Override public boolean onKeyPreIme(int keyCode,KeyEvent event){
  if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {
    setFocusableInTouchMode(false);
    clearFocus();
    if (mBackListener != null) {
      mBackListener.onEditTextBack();
    }
  }
  return super.onKeyPreIme(keyCode,event);
}
Program: 13997
Project: 13997
Buggy source:
/** 
 * Converts the entire log to plain text
 * @param context
 * @return The log as plain text
 */
public static String toPlainText(Context context){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str" + PackageUtils.getVersionName(context)).append("String_Node_Str").append("String_Node_Str" + DeviceUtils.getInstance().getDeviceName(context)).append("String_Node_Str");
  Iterator<LogEntry> it=mLogEntries.iterator();
  int lineNum=1;
  while (it.hasNext()) {
    sb.append(String.format("String_Node_Str",lineNum)).append(it.next().mLogText).append("String_Node_Str");
    lineNum++;
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Converts the entire log to plain text
 * @param context
 * @return The log as plain text
 */
public static String toPlainText(Context context){
  StringBuilder sb=new StringBuilder();
  sb.append(getAppInfoHeaderText(context)).append("String_Node_Str").append(getDeviceInfoHeaderText(context)).append("String_Node_Str");
  Iterator<LogEntry> it=mLogEntries.iterator();
  int lineNum=1;
  while (it.hasNext()) {
    sb.append(String.format("String_Node_Str",lineNum)).append(it.next().mLogText).append("String_Node_Str");
    lineNum++;
  }
  return sb.toString();
}
Program: 13998
Project: 13998
Buggy source:
/** 
 * Returns entire log as html for display (see AppLogViewerActivity)
 * @param context
 * @return Arraylist of Strings containing log messages
 */
public static ArrayList<String> toHtmlList(Context context){
  ArrayList<String> items=new ArrayList<String>();
  items.add("String_Node_Str" + PackageUtils.getVersionName(context) + "String_Node_Str");
  items.add("String_Node_Str" + DeviceUtils.getInstance().getDeviceName(context) + "String_Node_Str");
  Iterator<LogEntry> it=mLogEntries.iterator();
  while (it.hasNext()) {
    items.add(it.next().toHtml());
  }
  return items;
}

Fixed version (ground truth):
/** 
 * Returns entire log as html for display (see AppLogViewerActivity)
 * @param context
 * @return Arraylist of Strings containing log messages
 */
public static ArrayList<String> toHtmlList(Context context){
  ArrayList<String> items=new ArrayList<String>();
  items.add("String_Node_Str" + getAppInfoHeaderText(context) + "String_Node_Str");
  items.add("String_Node_Str" + getDeviceInfoHeaderText(context) + "String_Node_Str");
  Iterator<LogEntry> it=mLogEntries.iterator();
  while (it.hasNext()) {
    items.add(it.next().toHtml());
  }
  return items;
}
Program: 13999
Project: 13999
Buggy source:
public String getDeviceName(Context context){
  String manufacturer=Build.MANUFACTURER;
  String undecodedModel=Build.MODEL;
  String model=null;
  try {
    Properties prop=new Properties();
    InputStream fileStream;
    fileStream=context.getAssets().open("String_Node_Str");
    prop.load(fileStream);
    fileStream.close();
    String decodedModel=prop.getProperty(undecodedModel.replaceAll("String_Node_Str","String_Node_Str"));
    if (decodedModel != null && !decodedModel.trim().equals("String_Node_Str")) {
      model=decodedModel;
    }
  }
 catch (  IOException e) {
    AppLog.e(T.UTILS,e.getMessage());
  }
  if (model == null) {
    if (undecodedModel.startsWith(manufacturer)) {
      model=capitalize(undecodedModel);
    }
 else {
      model=capitalize(manufacturer) + "String_Node_Str" + undecodedModel;
    }
  }
  return model;
}

Fixed version (ground truth):
public String getDeviceName(Context context){
  String manufacturer=Build.MANUFACTURER;
  String undecodedModel=Build.MODEL;
  String model=null;
  try {
    Properties prop=new Properties();
    InputStream fileStream;
    fileStream=context.getAssets().open("String_Node_Str");
    prop.load(fileStream);
    fileStream.close();
    String decodedModel=prop.getProperty(undecodedModel.replaceAll("String_Node_Str","String_Node_Str"));
    if (decodedModel != null && !decodedModel.trim().equals("String_Node_Str")) {
      model=decodedModel;
    }
  }
 catch (  IOException e) {
    AppLog.e(T.UTILS,"String_Node_Str",e);
    AppLog.d(T.UTILS,"String_Node_Str" + "String_Node_Str");
  }
  if (model == null) {
    if (undecodedModel.startsWith(manufacturer)) {
      model=capitalize(undecodedModel);
    }
 else {
      model=capitalize(manufacturer) + "String_Node_Str" + undecodedModel;
    }
  }
  return model;
}
Program: 14001
Project: 14001
Buggy source:
public static void markNoteAsRead(final Note note){
  if (note == null) {
    return;
  }
  if (note.isUnread()) {
    WordPress.getRestClientUtilsV1_1().markNoteAsRead(note.getId(),note.getUnreadCount(),new RestRequest.Listener(){
      @Override public void onResponse(      JSONObject response){
        note.setUnreadCount("String_Node_Str");
        NotificationsTable.putNote(note);
      }
    }
,new RestRequest.ErrorListener(){
      @Override public void onErrorResponse(      VolleyError error){
        AppLog.e(AppLog.T.NOTIFS,"String_Node_Str");
      }
    }
);
    EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
  }
}

Fixed version (ground truth):
public static void markNoteAsRead(final Note note){
  if (note == null) {
    return;
  }
  if (note.isUnread()) {
    WordPress.getRestClientUtilsV1_1().decrementUnreadCount(note.getId(),"String_Node_Str",new RestRequest.Listener(){
      @Override public void onResponse(      JSONObject response){
        note.setRead();
        NotificationsTable.putNote(note);
        EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
      }
    }
,new RestRequest.ErrorListener(){
      @Override public void onErrorResponse(      VolleyError error){
        AppLog.e(AppLog.T.NOTIFS,"String_Node_Str");
      }
    }
);
  }
}
Program: 14002
Project: 14002
Buggy source:
@Override public void onResponse(JSONObject response){
  note.setUnreadCount("String_Node_Str");
  NotificationsTable.putNote(note);
}

Fixed version (ground truth):
@Override public void onResponse(JSONObject response){
  note.setRead();
  NotificationsTable.putNote(note);
  EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
}
Program: 14003
Project: 14003
Buggy source:
@Override public void onSaveInstanceState(Bundle outState){
  outState.putBoolean(ReaderConstants.ARG_IS_FEED,mIsFeed);
  outState.putLong(ReaderConstants.ARG_BLOG_ID,mBlogId);
  outState.putLong(ReaderConstants.ARG_POST_ID,mPostId);
  outState.putString(ReaderConstants.ARG_BLOG_ID,mBlogSlug);
  outState.putString(ReaderConstants.ARG_POST_ID,mPostSlug);
  outState.putBoolean(ReaderConstants.ARG_IS_RELATED_POST,mIsRelatedPost);
  outState.putBoolean(ReaderConstants.KEY_ALREADY_UPDATED,mHasAlreadyUpdatedPost);
  outState.putBoolean(ReaderConstants.KEY_ALREADY_REQUESTED,mHasAlreadyRequestedPost);
  outState.putSerializable(ReaderConstants.ARG_POST_LIST_TYPE,getPostListType());
  mPostHistory.saveInstance(outState);
  if (!TextUtils.isEmpty(mErrorMessage)) {
    outState.putString(ReaderConstants.KEY_ERROR_MESSAGE,mErrorMessage);
  }
  super.onSaveInstanceState(outState);
}

Fixed version (ground truth):
@Override public void onSaveInstanceState(Bundle outState){
  outState.putBoolean(ReaderConstants.ARG_IS_FEED,mIsFeed);
  outState.putLong(ReaderConstants.ARG_BLOG_ID,mBlogId);
  outState.putLong(ReaderConstants.ARG_POST_ID,mPostId);
  outState.putString(ReaderConstants.ARG_BLOG_SLUG,mBlogSlug);
  outState.putString(ReaderConstants.ARG_POST_SLUG,mPostSlug);
  outState.putBoolean(ReaderConstants.ARG_IS_RELATED_POST,mIsRelatedPost);
  outState.putBoolean(ReaderConstants.KEY_ALREADY_UPDATED,mHasAlreadyUpdatedPost);
  outState.putBoolean(ReaderConstants.KEY_ALREADY_REQUESTED,mHasAlreadyRequestedPost);
  outState.putSerializable(ReaderConstants.ARG_POST_LIST_TYPE,getPostListType());
  mPostHistory.saveInstance(outState);
  if (!TextUtils.isEmpty(mErrorMessage)) {
    outState.putString(ReaderConstants.KEY_ERROR_MESSAGE,mErrorMessage);
  }
  super.onSaveInstanceState(outState);
}
Program: 14004
Project: 14004
Buggy source:
private void addActionsForCommentNotification(NotificationCompat.Builder builder,String noteId){
  boolean areActionsSet=false;
  Note note=NotificationsTable.getNoteById(noteId);
  if (note != null) {
    if (note.canReply()) {
      addCommentReplyActionForCommentNotification(builder,noteId);
    }
    if (note.getCommentStatus().equals(CommentStatus.UNAPPROVED)) {
      if (note.canModerate()) {
        addCommentApproveActionForCommentNotification(builder,noteId);
      }
    }
 else {
      if (note.canLike()) {
        addCommentLikeActionForCommentNotification(builder,noteId);
      }
      if (note != null) {
        if (note.canReply()) {
          addCommentReplyActionForCommentNotification(builder,noteId);
        }
        if (note.getCommentStatus().equals(CommentStatus.UNAPPROVED)) {
          if (note.canModerate()) {
            addCommentApproveActionForCommentNotification(builder,noteId);
          }
        }
 else {
          Blog blog=WordPress.wpDB.instantiateBlogByRemoteId(note.getSiteId());
          boolean isJetPackSite=blog != null ? blog.isJetpackPowered() : false;
          if (note.canLike() && !isJetPackSite) {
            addCommentLikeActionForCommentNotification(builder,noteId);
          }
        }
      }
      areActionsSet=true;
    }
  }
  if (!areActionsSet) {
    addCommentReplyActionForCommentNotification(builder,noteId);
  }
}

Fixed version (ground truth):
private void addActionsForCommentNotification(NotificationCompat.Builder builder,String noteId){
  boolean areActionsSet=false;
  Note note=NotificationsTable.getNoteById(noteId);
  if (note != null) {
    if (note.canReply()) {
      addCommentReplyActionForCommentNotification(builder,noteId);
    }
    if (note.getCommentStatus().equals(CommentStatus.UNAPPROVED)) {
      if (note.canModerate()) {
        addCommentApproveActionForCommentNotification(builder,noteId);
      }
    }
 else {
      if (note.canLike()) {
        Blog blog=WordPress.wpDB.instantiateBlogByRemoteId(note.getSiteId());
        boolean isJetPackSite=(blog != null) && blog.isJetpackPowered();
        if (note.canLike() && !isJetPackSite) {
          addCommentLikeActionForCommentNotification(builder,noteId);
        }
      }
    }
    areActionsSet=true;
  }
  if (!areActionsSet) {
    addCommentReplyActionForCommentNotification(builder,noteId);
  }
}
Program: 14005
Project: 14005
Buggy source:
private void showPost(){
  if (!TextUtils.isEmpty(mBlogId) && !TextUtils.isEmpty(mPostId)) {
    try {
      final long blogId=Long.parseLong(mBlogId);
      final long postId=Long.parseLong(mPostId);
      if (mIsFeed) {
        AnalyticsUtils.trackWithFeedPostDetails(AnalyticsTracker.Stat.READER_FEED_POST_INTERCEPTED,blogId,postId);
      }
 else {
        AnalyticsUtils.trackWithBlogPostDetails(AnalyticsTracker.Stat.READER_FEED_POST_INTERCEPTED,blogId,postId);
      }
      ReaderActivityLauncher.showReaderPostDetail(this,mIsFeed,blogId,postId,false);
    }
 catch (    NumberFormatException e) {
      AppLog.e(T.READER,e);
    }
  }
 else {
    ToastUtils.showToast(this,R.string.error_generic);
  }
  finish();
}

Fixed version (ground truth):
private void showPost(){
  if (!TextUtils.isEmpty(mBlogId) && !TextUtils.isEmpty(mPostId)) {
    try {
      final long blogId=Long.parseLong(mBlogId);
      final long postId=Long.parseLong(mPostId);
      if (mIsFeed) {
        AnalyticsUtils.trackWithFeedPostDetails(AnalyticsTracker.Stat.READER_FEED_POST_INTERCEPTED,blogId,postId);
      }
 else {
        AnalyticsUtils.trackWithBlogPostDetails(AnalyticsTracker.Stat.READER_BLOG_POST_INTERCEPTED,blogId,postId);
      }
      ReaderActivityLauncher.showReaderPostDetail(this,mIsFeed,blogId,postId,false);
    }
 catch (    NumberFormatException e) {
      AppLog.e(T.READER,e);
    }
  }
 else {
    ToastUtils.showToast(this,R.string.error_generic);
  }
  finish();
}
Program: 14007
Project: 14007
Buggy source:
private ActionBar getActionBar(){
  if (!isAdded()) {
    return null;
  }
  if (getActivity() instanceof AppCompatActivity) {
    return ((AppCompatActivity)getActivity()).getSupportActionBar();
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
private ActionBar getActionBar(){
  if (getActivity() instanceof AppCompatActivity) {
    return ((AppCompatActivity)getActivity()).getSupportActionBar();
  }
 else {
    return null;
  }
}
Program: 14008
Project: 14008
Buggy source:
private void toggleFollowStatus(){
  if (!NetworkUtils.checkConnection(getContext())) {
    return;
  }
  final boolean isAskingToFollow=!mPost.isFollowedByCurrentUser;
  ReaderActions.ActionListener listener=new ReaderActions.ActionListener(){
    @Override public void onActionResult(    boolean succeeded){
      if (getContext() == null) {
        return;
      }
      mFollowButton.setEnabled(true);
      if (!succeeded) {
        int errResId=isAskingToFollow ? R.string.reader_toast_err_follow_blog : R.string.reader_toast_err_unfollow_blog;
        ToastUtils.showToast(getContext(),errResId);
        mFollowButton.setIsFollowed(!isAskingToFollow);
      }
    }
  }
;
  mFollowButton.setEnabled(false);
  boolean result;
  if (mPost.feedId != 0) {
    result=ReaderBlogActions.followFeedById(mPost.feedId,isAskingToFollow,listener);
  }
 else {
    result=ReaderBlogActions.followBlogById(mPost.blogId,isAskingToFollow,listener);
  }
  if (result) {
    mFollowButton.setIsFollowedAnimated(isAskingToFollow);
  }
}

Fixed version (ground truth):
private void toggleFollowStatus(){
  if (!NetworkUtils.checkConnection(getContext())) {
    return;
  }
  final boolean isAskingToFollow=!mPost.isFollowedByCurrentUser;
  ReaderActions.ActionListener listener=new ReaderActions.ActionListener(){
    @Override public void onActionResult(    boolean succeeded){
      if (getContext() == null)       return;
      mFollowButton.setEnabled(true);
      if (succeeded) {
        mPost.isFollowedByCurrentUser=isAskingToFollow;
        showFollowerCount();
      }
 else {
        int errResId=isAskingToFollow ? R.string.reader_toast_err_follow_blog : R.string.reader_toast_err_unfollow_blog;
        ToastUtils.showToast(getContext(),errResId);
        mFollowButton.setIsFollowed(!isAskingToFollow);
      }
    }
  }
;
  mFollowButton.setEnabled(false);
  boolean result;
  if (mPost.feedId != 0) {
    result=ReaderBlogActions.followFeedById(mPost.feedId,isAskingToFollow,listener);
  }
 else {
    result=ReaderBlogActions.followBlogById(mPost.blogId,isAskingToFollow,listener);
  }
  if (result) {
    mFollowButton.setIsFollowedAnimated(isAskingToFollow);
  }
}
Program: 14009
Project: 14009
Buggy source:
@Override public void onActionResult(boolean succeeded){
  if (getContext() == null) {
    return;
  }
  mFollowButton.setEnabled(true);
  if (!succeeded) {
    int errResId=isAskingToFollow ? R.string.reader_toast_err_follow_blog : R.string.reader_toast_err_unfollow_blog;
    ToastUtils.showToast(getContext(),errResId);
    mFollowButton.setIsFollowed(!isAskingToFollow);
  }
}

Fixed version (ground truth):
@Override public void onActionResult(boolean succeeded){
  if (getContext() == null)   return;
  mFollowButton.setEnabled(true);
  if (succeeded) {
    mPost.isFollowedByCurrentUser=isAskingToFollow;
    showFollowerCount();
  }
 else {
    int errResId=isAskingToFollow ? R.string.reader_toast_err_follow_blog : R.string.reader_toast_err_unfollow_blog;
    ToastUtils.showToast(getContext(),errResId);
    mFollowButton.setIsFollowed(!isAskingToFollow);
  }
}
Program: 14010
Project: 14010
Buggy source:
private static void assignTagsFromJson(ReaderPost post,JSONObject jsonTags){
  if (jsonTags == null) {
    return;
  }
  Iterator<String> it=jsonTags.keys();
  if (!it.hasNext()) {
    return;
  }
  String mostPopularTag=null;
  String nextMostPopularTag=null;
  int popularCount=0;
  while (it.hasNext()) {
    JSONObject jsonThisTag=jsonTags.optJSONObject(it.next());
    int postCount=jsonThisTag.optInt("String_Node_Str");
    if (postCount > popularCount) {
      nextMostPopularTag=mostPopularTag;
      mostPopularTag=JSONUtils.getStringDecoded(jsonThisTag,"String_Node_Str");
      popularCount=postCount;
    }
  }
  if (!post.hasPrimaryTag()) {
    post.setPrimaryTag(mostPopularTag);
  }
  post.setSecondaryTag(nextMostPopularTag);
}

Fixed version (ground truth):
private static void assignTagsFromJson(ReaderPost post,JSONObject jsonTags){
  if (jsonTags == null) {
    return;
  }
  Iterator<String> it=jsonTags.keys();
  if (!it.hasNext()) {
    return;
  }
  String mostPopularTag=null;
  String nextMostPopularTag=null;
  int popularCount=0;
  while (it.hasNext()) {
    JSONObject jsonThisTag=jsonTags.optJSONObject(it.next());
    String thisTagName=JSONUtils.getStringDecoded(jsonThisTag,"String_Node_Str");
    int postCount=jsonThisTag.optInt("String_Node_Str");
    if (postCount > popularCount) {
      nextMostPopularTag=mostPopularTag;
      mostPopularTag=thisTagName;
      popularCount=postCount;
    }
 else     if (nextMostPopularTag == null) {
      nextMostPopularTag=thisTagName;
    }
  }
  if (!post.hasPrimaryTag()) {
    post.setPrimaryTag(mostPopularTag);
  }
  post.setSecondaryTag(nextMostPopularTag);
}
Program: 14011
Project: 14011
Buggy source:
private void addTag(final String tagName){
  LayoutInflater inflater=LayoutInflater.from(getContext());
  View view=inflater.inflate(R.layout.reader_tag_strip_label,mContainer,false);
  TextView txtTag=(TextView)view.findViewById(R.id.text_tag);
  txtTag.setText(mNumTags > 0 ? "String_Node_Str" + tagName : tagName);
  txtTag.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      ReaderTag tag=ReaderUtils.createTagFromTagName(tagName,ReaderTagType.FOLLOWED);
      ReaderActivityLauncher.showReaderTagPreview(v.getContext(),tag);
    }
  }
);
  mContainer.addView(view);
  mNumTags++;
}

Fixed version (ground truth):
private void addTag(final String tagName){
  LayoutInflater inflater=LayoutInflater.from(getContext());
  View view=inflater.inflate(R.layout.reader_tag_strip_label,mContainer,false);
  TextView txtTag=(TextView)view.findViewById(R.id.text_tag);
  txtTag.setText(mNumTags > 0 ? "String_Node_Str" + tagName : tagName);
  txtTag.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      ReaderTag tag=ReaderUtils.createTagFromTagName(tagName,ReaderTagType.FOLLOWED);
      ReaderActivityLauncher.showReaderTagPreview(v.getContext(),tag);
    }
  }
);
  mContainer.addView(view);
  mNumTags++;
  AppLog.w(AppLog.T.READER,"String_Node_Str" + tagName);
}
Program: 14012
Project: 14012
Buggy source:
void onValidationEnd();

Fixed version (ground truth):
@Override public void onValidationEnd(){
  if (!checkAndSend()) {
    enableSendButton(true);
  }
}
Program: 14013
Project: 14013
Buggy source:
@Override public void onValidationEnd(){
  if (!checkAndSend()) {
    enableSendButton(true);
  }
}

Fixed version (ground truth):
void onValidationEnd();
Program: 14014
Project: 14014
Buggy source:
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder,int position){
  PeopleViewHolder peopleViewHolder=(PeopleViewHolder)holder;
  final Person person=getPerson(position);
  if (person != null) {
    String avatarUrl=GravatarUtils.fixGravatarUrl(person.getAvatarUrl(),mAvatarSz);
    peopleViewHolder.imgAvatar.setImageUrl(avatarUrl,WPNetworkImageView.ImageType.AVATAR);
    peopleViewHolder.txtDisplayName.setText(StringUtils.unescapeHTML(person.getDisplayName()));
    if (person.getRole() != null) {
      peopleViewHolder.txtRole.setText(StringUtils.capitalize(person.getRole().toDisplayString()));
    }
    if (!person.getUsername().isEmpty()) {
      peopleViewHolder.txtUsername.setVisibility(View.VISIBLE);
      peopleViewHolder.txtUsername.setText(String.format("String_Node_Str",person.getUsername()));
    }
 else {
      peopleViewHolder.txtUsername.setVisibility(View.GONE);
    }
    if (person.getPersonType() == Person.PersonType.USER || person.getPersonType() == Person.PersonType.VIEWER) {
      peopleViewHolder.txtSubscribed.setVisibility(View.GONE);
    }
 else {
      peopleViewHolder.txtSubscribed.setVisibility(View.VISIBLE);
      String dateSubscribed=SimpleDateFormat.getDateInstance().format(person.getDateSubscribed());
      String dateText=getString(R.string.follower_subscribed_since,dateSubscribed);
      peopleViewHolder.txtSubscribed.setText(dateText);
    }
  }
  if (position == getItemCount() - 1) {
    updatePeople(true);
  }
}

Fixed version (ground truth):
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder,int position){
  PeopleViewHolder peopleViewHolder=(PeopleViewHolder)holder;
  final Person person=getPerson(position);
  if (person != null) {
    String avatarUrl=GravatarUtils.fixGravatarUrl(person.getAvatarUrl(),mAvatarSz);
    peopleViewHolder.imgAvatar.setImageUrl(avatarUrl,WPNetworkImageView.ImageType.AVATAR);
    peopleViewHolder.txtDisplayName.setText(StringUtils.unescapeHTML(person.getDisplayName()));
    if (person.getRole() != null) {
      peopleViewHolder.txtRole.setVisibility(View.VISIBLE);
      peopleViewHolder.txtRole.setText(StringUtils.capitalize(person.getRole().toDisplayString()));
    }
 else {
      peopleViewHolder.txtRole.setVisibility(View.GONE);
    }
    if (!person.getUsername().isEmpty()) {
      peopleViewHolder.txtUsername.setVisibility(View.VISIBLE);
      peopleViewHolder.txtUsername.setText(String.format("String_Node_Str",person.getUsername()));
    }
 else {
      peopleViewHolder.txtUsername.setVisibility(View.GONE);
    }
    if (person.getPersonType() == Person.PersonType.USER || person.getPersonType() == Person.PersonType.VIEWER) {
      peopleViewHolder.txtSubscribed.setVisibility(View.GONE);
    }
 else {
      peopleViewHolder.txtSubscribed.setVisibility(View.VISIBLE);
      String dateSubscribed=SimpleDateFormat.getDateInstance().format(person.getDateSubscribed());
      String dateText=getString(R.string.follower_subscribed_since,dateSubscribed);
      peopleViewHolder.txtSubscribed.setText(dateText);
    }
  }
  if (position == getItemCount() - 1) {
    updatePeople(true);
  }
}
Program: 14016
Project: 14016
Buggy source:
@Override public void onActionResult(CommentActionResult result){
  mIsSubmittingReply=false;
  if (result.isSuccess() && mOnCommentChangeListener != null)   mOnCommentChangeListener.onCommentChanged(ChangeType.REPLIED);
  if (isAdded()) {
    mEditReply.setEnabled(true);
    mSubmitReplyBtn.setVisibility(View.VISIBLE);
    progress.setVisibility(View.GONE);
    updateStatusViews();
    if (result.isSuccess()) {
      ToastUtils.showToast(getActivity(),getString(R.string.note_reply_successful));
      mEditReply.setText(null);
      mEditReply.getAutoSaveTextHelper().clearSavedText(mEditReply);
      if (mComment != null && mComment.getStatusEnum() != CommentStatus.APPROVED) {
        moderateComment(CommentStatus.APPROVED);
      }
    }
 else {
      String errorMessage=TextUtils.isEmpty(result.getMessage()) ? getString(R.string.reply_failed) : result.getMessage();
      ToastUtils.showToast(getActivity(),errorMessage,ToastUtils.Duration.LONG);
      EditTextUtils.showSoftInput(mEditReply);
    }
  }
}

Fixed version (ground truth):
@Override public void onActionResult(CommentActionResult result){
  mIsSubmittingReply=false;
  if (result.isSuccess() && mOnCommentChangeListener != null)   mOnCommentChangeListener.onCommentChanged(ChangeType.REPLIED);
  if (isAdded()) {
    mEditReply.setEnabled(true);
    mSubmitReplyBtn.setVisibility(View.VISIBLE);
    progress.setVisibility(View.GONE);
    updateStatusViews();
    if (result.isSuccess()) {
      ToastUtils.showToast(getActivity(),getString(R.string.note_reply_successful));
      mEditReply.setText(null);
      mEditReply.getAutoSaveTextHelper().clearSavedText(mEditReply);
      if (mComment != null && mComment.getStatusEnum() != CommentStatus.APPROVED) {
        moderateComment(CommentStatus.APPROVED);
      }
    }
 else {
      String errorMessage=TextUtils.isEmpty(result.getMessage()) ? getString(R.string.reply_failed) : result.getMessage();
      String strUnEscapeHTML=StringEscapeUtils.unescapeHtml(errorMessage);
      ToastUtils.showToast(getActivity(),strUnEscapeHTML,ToastUtils.Duration.LONG);
      EditTextUtils.showSoftInput(mEditReply);
    }
  }
}
Program: 14017
Project: 14017
Buggy source:
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder,int position){
  PeopleViewHolder peopleViewHolder=(PeopleViewHolder)holder;
  final Person person=getPerson(position);
  if (person != null) {
    String avatarUrl=GravatarUtils.fixGravatarUrl(person.getAvatarUrl(),mAvatarSz);
    peopleViewHolder.imgAvatar.setImageUrl(avatarUrl,WPNetworkImageView.ImageType.AVATAR);
    peopleViewHolder.txtDisplayName.setText(StringUtils.unescapeHTML(person.getDisplayName()));
    if (person.getRole() != null) {
      peopleViewHolder.txtRole.setText(StringUtils.capitalize(person.getRole().toDisplayString()));
    }
    if (!person.getUsername().isEmpty()) {
      peopleViewHolder.txtUsername.setVisibility(View.VISIBLE);
      peopleViewHolder.txtUsername.setText(String.format("String_Node_Str",person.getUsername()));
    }
 else {
      peopleViewHolder.txtUsername.setVisibility(View.GONE);
    }
    if (person.getPersonType() == Person.PersonType.USER || person.getPersonType() == Person.PersonType.VIEWER) {
      peopleViewHolder.txtSubscribed.setVisibility(View.GONE);
    }
 else {
      peopleViewHolder.txtSubscribed.setVisibility(View.VISIBLE);
      String dateSubscribed=SimpleDateFormat.getDateInstance().format(person.getDateSubscribed());
      String dateText=getString(R.string.follower_subscribed_since,dateSubscribed);
      peopleViewHolder.txtSubscribed.setText(dateText);
    }
  }
  if (position == getItemCount() - 1) {
    updatePeople(true);
  }
}

Fixed version (ground truth):
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder,int position){
  PeopleViewHolder peopleViewHolder=(PeopleViewHolder)holder;
  final Person person=getPerson(position);
  if (person != null) {
    String avatarUrl=GravatarUtils.fixGravatarUrl(person.getAvatarUrl(),mAvatarSz);
    peopleViewHolder.imgAvatar.setImageUrl(avatarUrl,WPNetworkImageView.ImageType.AVATAR);
    peopleViewHolder.txtDisplayName.setText(StringUtils.unescapeHTML(person.getDisplayName()));
    if (person.getRole() != null) {
      peopleViewHolder.txtRole.setText(StringUtils.capitalize(person.getRole().toDisplayString()));
    }
 else {
      peopleViewHolder.txtRole.setText("String_Node_Str");
    }
    if (!person.getUsername().isEmpty()) {
      peopleViewHolder.txtUsername.setVisibility(View.VISIBLE);
      peopleViewHolder.txtUsername.setText(String.format("String_Node_Str",person.getUsername()));
    }
 else {
      peopleViewHolder.txtUsername.setVisibility(View.GONE);
    }
    if (person.getPersonType() == Person.PersonType.USER || person.getPersonType() == Person.PersonType.VIEWER) {
      peopleViewHolder.txtSubscribed.setVisibility(View.GONE);
    }
 else {
      peopleViewHolder.txtSubscribed.setVisibility(View.VISIBLE);
      String dateSubscribed=SimpleDateFormat.getDateInstance().format(person.getDateSubscribed());
      String dateText=getString(R.string.follower_subscribed_since,dateSubscribed);
      peopleViewHolder.txtSubscribed.setText(dateText);
    }
  }
  if (position == getItemCount() - 1) {
    updatePeople(true);
  }
}
Program: 14018
Project: 14018
Buggy source:
public void onCredentialRetrieved(Credential credential){
  AppLog.d(T.NUX,"String_Node_Str" + credential.getId());
  if (canAutofillUsernameAndPassword()) {
    track(Stat.LOGIN_AUTOFILL_CREDENTIALS_FILLED,null);
    mUsernameEditText.setText(credential.getId());
    mPasswordEditText.setText(credential.getPassword());
  }
}

Fixed version (ground truth):
public void onCredentialRetrieved(Credential credential){
  AppLog.d(T.NUX,"String_Node_Str" + credential.getId());
  if (isAdded() && canAutofillUsernameAndPassword()) {
    track(Stat.LOGIN_AUTOFILL_CREDENTIALS_FILLED,null);
    mUsernameEditText.setText(credential.getId());
    mPasswordEditText.setText(credential.getPassword());
  }
}
Program: 14019
Project: 14019
Buggy source:
public boolean canAutofillUsernameAndPassword(){
  return EditTextUtils.getText(mUsernameEditText).isEmpty() && EditTextUtils.getText(mPasswordEditText).isEmpty();
}

Fixed version (ground truth):
public boolean canAutofillUsernameAndPassword(){
  return EditTextUtils.getText(mUsernameEditText).isEmpty() && EditTextUtils.getText(mPasswordEditText).isEmpty() && mUsernameEditText != null && mPasswordEditText != null;
}
Program: 14020
Project: 14020
Buggy source:
public void setPubDate(String dateStr){
  this.pubDate=StringUtils.notNullStr(pubDate);
}

Fixed version (ground truth):
public void setPubDate(String published){
  this.pubDate=StringUtils.notNullStr(published);
}
Program: 14022
Project: 14022
Buggy source:
public static void clearApplicationState(Context context){
  WordPress.currentBlog=null;
  if (WordPress.getContext() != null) {
    try {
      WordPress app=(WordPress)context.getApplicationContext();
      app.wordPressComSignOut();
    }
 catch (    Exception e) {
    }
  }
  TestUtils.clearDefaultSharedPreferences(context);
  TestUtils.dropDB(context);
}

Fixed version (ground truth):
public static void clearApplicationState(Context context){
  if (WordPress.getContext() != null) {
    try {
      WordPress app=(WordPress)context.getApplicationContext();
      app.wordPressComSignOut();
    }
 catch (    Exception e) {
    }
  }
  TestUtils.clearDefaultSharedPreferences(context);
  TestUtils.dropDB(context);
}
Program: 14023
Project: 14023
Buggy source:
public void testFollowersWPCOM() throws Exception {
  StatsRestRequestAbstractListener listener=new StatsRestRequestAbstractListener(){
    @Override void parseResponse(    JSONObject response) throws JSONException {
      FollowersModel model=new FollowersModel("String_Node_Str",response);
      assertEquals(model.getTotalEmail(),2930);
      assertEquals(model.getTotalWPCom(),7925800);
      assertEquals(model.getTotal(),7925800);
      assertEquals(model.getPage(),1);
      assertEquals(model.getPages(),1132258);
      assertNotNull(model.getFollowers());
      assertEquals(model.getFollowers().size(),7);
      FollowerModel first=model.getFollowers().get(0);
      assertEquals(first.getAvatar(),"String_Node_Str" + "String_Node_Str");
      assertEquals(first.getLabel(),"String_Node_Str");
      assertEquals(first.getURL(),"String_Node_Str");
      assertEquals(first.getDateSubscribed(),"String_Node_Str");
      assertNotNull(first.getFollowData());
      FollowDataModel followDatamodel=first.getFollowData();
      assertFalse(followDatamodel.isFollowing());
      assertEquals(followDatamodel.getType(),"String_Node_Str");
    }
  }
;
  mRestClient.makeRequest(Request.Method.POST,"String_Node_Str",null,listener,errListener);
}

Fixed version (ground truth):
public void testFollowersWPCOM() throws Exception {
  StatsRestRequestAbstractListener listener=new StatsRestRequestAbstractListener(){
    @Override void parseResponse(    JSONObject response) throws JSONException {
      FollowersModel model=new FollowersModel(1234567890,response);
      assertEquals(model.getTotalEmail(),2930);
      assertEquals(model.getTotalWPCom(),7925800);
      assertEquals(model.getTotal(),7925800);
      assertEquals(model.getPage(),1);
      assertEquals(model.getPages(),1132258);
      assertNotNull(model.getFollowers());
      assertEquals(model.getFollowers().size(),7);
      FollowerModel first=model.getFollowers().get(0);
      assertEquals(first.getAvatar(),"String_Node_Str" + "String_Node_Str");
      assertEquals(first.getLabel(),"String_Node_Str");
      assertEquals(first.getURL(),"String_Node_Str");
      assertEquals(first.getDateSubscribed(),"String_Node_Str");
      assertNotNull(first.getFollowData());
      FollowDataModel followDatamodel=first.getFollowData();
      assertFalse(followDatamodel.isFollowing());
      assertEquals(followDatamodel.getType(),"String_Node_Str");
    }
  }
;
  mRestClient.makeRequest(Request.Method.POST,"String_Node_Str",null,listener,errListener);
}
Program: 14024
Project: 14024
Buggy source:
public void testTopPostEmptyURL() throws Exception {
  StatsRestRequestAbstractListener listener=new StatsRestRequestAbstractListener(){
    @Override void parseResponse(    JSONObject response) throws JSONException {
      TopPostsAndPagesModel model=new TopPostsAndPagesModel("String_Node_Str",response);
      assertNotNull(model.getTopPostsAndPages());
      assertEquals(model.getTopPostsAndPages().size(),10);
      PostModel postModel=model.getTopPostsAndPages().get(0);
      assertEquals(postModel.getItemID(),"String_Node_Str");
      assertEquals(postModel.getTotals(),7);
      assertEquals(postModel.getTitle(),"String_Node_Str");
      assertEquals(postModel.getUrl(),"String_Node_Str");
      assertEquals(postModel.getDate(),StatsUtils.toMs("String_Node_Str"));
      assertEquals(postModel.getPostType(),"String_Node_Str");
    }
  }
;
  mRestClient.makeRequest(Request.Method.POST,"String_Node_Str",null,listener,errListener);
}

Fixed version (ground truth):
public void testTopPostEmptyURL() throws Exception {
  StatsRestRequestAbstractListener listener=new StatsRestRequestAbstractListener(){
    @Override void parseResponse(    JSONObject response) throws JSONException {
      TopPostsAndPagesModel model=new TopPostsAndPagesModel(1234567890,response);
      assertNotNull(model.getTopPostsAndPages());
      assertEquals(model.getTopPostsAndPages().size(),10);
      PostModel postModel=model.getTopPostsAndPages().get(0);
      assertEquals(postModel.getItemID(),"String_Node_Str");
      assertEquals(postModel.getTotals(),7);
      assertEquals(postModel.getTitle(),"String_Node_Str");
      assertEquals(postModel.getUrl(),"String_Node_Str");
      assertEquals(postModel.getDate(),StatsUtils.toMs("String_Node_Str"));
      assertEquals(postModel.getPostType(),"String_Node_Str");
    }
  }
;
  mRestClient.makeRequest(Request.Method.POST,"String_Node_Str",null,listener,errListener);
}
Program: 14025
Project: 14025
Buggy source:
public void testClicks() throws Exception {
  StatsRestRequestAbstractListener listener=new StatsRestRequestAbstractListener(){
    @Override void parseResponse(    JSONObject response) throws JSONException {
      ClicksModel model=new ClicksModel("String_Node_Str",response);
      assertEquals(model.getTotalClicks(),2);
      assertEquals(model.getOtherClicks(),0);
      assertNotNull(model.getClickGroups());
      assertEquals(model.getClickGroups().size(),2);
      ClickGroupModel first=model.getClickGroups().get(0);
      assertEquals(first.getIcon(),"String_Node_Str");
      assertEquals(first.getUrl(),"String_Node_Str");
      assertEquals(first.getName(),"String_Node_Str");
      assertEquals(first.getViews(),1);
      assertNull(first.getClicks());
      ClickGroupModel second=model.getClickGroups().get(1);
      assertEquals(second.getIcon(),"String_Node_Str");
      assertEquals(second.getUrl(),"String_Node_Str");
      assertEquals(second.getName(),"String_Node_Str");
      assertEquals(second.getViews(),1);
      assertNull(second.getClicks());
    }
  }
;
  mRestClient.makeRequest(Request.Method.POST,"String_Node_Str",null,listener,errListener);
}

Fixed version (ground truth):
public void testClicks() throws Exception {
  StatsRestRequestAbstractListener listener=new StatsRestRequestAbstractListener(){
    @Override void parseResponse(    JSONObject response) throws JSONException {
      ClicksModel model=new ClicksModel(123456,response);
      assertEquals(model.getTotalClicks(),2);
      assertEquals(model.getOtherClicks(),0);
      assertNotNull(model.getClickGroups());
      assertEquals(model.getClickGroups().size(),2);
      ClickGroupModel first=model.getClickGroups().get(0);
      assertEquals(first.getIcon(),"String_Node_Str");
      assertEquals(first.getUrl(),"String_Node_Str");
      assertEquals(first.getName(),"String_Node_Str");
      assertEquals(first.getViews(),1);
      assertNull(first.getClicks());
      ClickGroupModel second=model.getClickGroups().get(1);
      assertEquals(second.getIcon(),"String_Node_Str");
      assertEquals(second.getUrl(),"String_Node_Str");
      assertEquals(second.getName(),"String_Node_Str");
      assertEquals(second.getViews(),1);
      assertNull(second.getClicks());
    }
  }
;
  mRestClient.makeRequest(Request.Method.POST,"String_Node_Str",null,listener,errListener);
}