nus-yam/ex-repair huggingface dataset:
Program: 15171
Project: 15171
Buggy source:
@Override public void onChangeTopic(final String topicID,final String topicName){
  try {
    final ReaderImplFragment readerPageFragment=(ReaderImplFragment)readerPage;
    readerPageFragment.topicsID=topicID;
    runOnUiThread(new Runnable(){
      public void run(){
        String methodCall="String_Node_Str" + topicID + "String_Node_Str";
        readerPageFragment.wv.loadUrl("String_Node_Str" + methodCall);
        if (topicName != null) {
          topicText.setText(topicName);
        }
        readerPager.setCurrentItem(1,true);
        supportInvalidateOptionsMenu();
      }
    }
);
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
@Override public void onChangeTopic(final String topicID,final String topicName){
  try {
    final ReaderImplFragment readerPageFragment=(ReaderImplFragment)readerPage;
    readerPageFragment.topicsID=topicID;
    runOnUiThread(new Runnable(){
      public void run(){
        String methodCall="String_Node_Str" + topicID + "String_Node_Str";
        readerPageFragment.wv.loadUrl("String_Node_Str" + methodCall);
        if (topicName != null) {
          topicText.setText(topicName);
        }
        if (readerPager.getCurrentItem() != 1) {
          readerPager.setCurrentItem(1,true);
          supportInvalidateOptionsMenu();
        }
      }
    }
);
  }
 catch (  Exception e) {
  }
}
Program: 15173
Project: 15173
Buggy source:
protected void onPostExecute(List<?> result){
  CookieManager cookieManager=CookieManager.getInstance();
  final String cookie=cookieManager.getCookie("String_Node_Str");
  new Thread(new Runnable(){
    public void run(){
      try {
        HttpClient httpclient=new DefaultHttpClient();
        HttpProtocolParams.setUserAgent(httpclient.getParams(),"String_Node_Str");
        String readerURL=Constants.readerURL + "String_Node_Str";
        HttpGet httpGet=new HttpGet(readerURL);
        httpGet.setHeader("String_Node_Str",cookie);
        httpclient.execute(httpGet);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
).start();
}

Fixed version (ground truth):
protected void onPostExecute(List<?> result){
  ((ReaderActivity)getActivity()).stopAnimatingButton();
  CookieManager cookieManager=CookieManager.getInstance();
  final String cookie=cookieManager.getCookie("String_Node_Str");
  new Thread(new Runnable(){
    public void run(){
      try {
        HttpClient httpclient=new DefaultHttpClient();
        HttpProtocolParams.setUserAgent(httpclient.getParams(),"String_Node_Str");
        String readerURL=Constants.readerURL + "String_Node_Str";
        HttpGet httpGet=new HttpGet(readerURL);
        httpGet.setHeader("String_Node_Str",cookie);
        httpclient.execute(httpGet);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
).start();
}
Program: 15178
Project: 15178
Buggy source:
private void initStats(){
  titleBar.startRotatingRefreshIcon();
  Blog blog=WordPress.currentBlog;
  int blogid=blog.getBlogId();
  if (blogid == 1 && blog.getApi_blogid() == null) {
    this.checkAPIBlogInfo();
  }
 else   if (!blog.isDotcomFlag() && blog.getDotcom_username() == null) {
    this.showLoginForm();
  }
 else {
    this.loadStats();
  }
}

Fixed version (ground truth):
private void initStats(){
  titleBar.startRotatingRefreshIcon();
  Blog blog=WordPress.currentBlog;
  if (!blog.isDotcomFlag() && blog.getApi_blogid() == null) {
    this.checkAPIBlogInfo();
  }
 else   if (!blog.isDotcomFlag() && blog.getDotcom_username() == null) {
    this.showLoginForm();
  }
 else {
    this.loadStats();
  }
}
Program: 15184
Project: 15184
Buggy source:
@Override public boolean onOptionsItemSelected(final MenuItem item){
switch (item.getItemId()) {
case 0:
    Intent i=new Intent(this,EditPost.class);
  i.putExtra("String_Node_Str",WordPress.currentBlog.getId());
i.putExtra("String_Node_Str",true);
if (isPage) i.putExtra("String_Node_Str",true);
startActivity(i);
return true;
}
return false;
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(final MenuItem item){
switch (item.getItemId()) {
case 0:
    WordPress.richPostContent=null;
  Intent i=new Intent(this,EditPost.class);
i.putExtra("String_Node_Str",WordPress.currentBlog.getId());
i.putExtra("String_Node_Str",true);
if (isPage) i.putExtra("String_Node_Str",true);
startActivity(i);
return true;
}
return false;
}
Program: 15186
Project: 15186
Buggy source:
public void onClick(View v){
  PackageManager pm=context.getPackageManager();
  if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
    Intent i=new Intent(context,EditPost.class);
    i.putExtra("String_Node_Str","String_Node_Str");
    i.putExtra("String_Node_Str",true);
    context.startActivity(i);
    hideOverlay();
  }
 else {
    Toast.makeText(context,getResources().getText(R.string.no_camera_found),Toast.LENGTH_LONG).show();
  }
}

Fixed version (ground truth):
public void onClick(View v){
  PackageManager pm=context.getPackageManager();
  if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
    WordPress.richPostContent=null;
    Intent i=new Intent(context,EditPost.class);
    i.putExtra("String_Node_Str","String_Node_Str");
    i.putExtra("String_Node_Str",true);
    context.startActivity(i);
    hideOverlay();
  }
 else {
    Toast.makeText(context,getResources().getText(R.string.no_camera_found),Toast.LENGTH_LONG).show();
  }
}
Program: 15195
Project: 15195
Buggy source:
@Override protected void onResume(){
  super.onResume();
  attemptToSelectPost();
  postList.loadPosts(false);
  if (WordPress.postsShouldRefresh) {
    postList.refreshPosts(false);
    WordPress.postsShouldRefresh=false;
  }
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  if (WordPress.wpDB == null)   WordPress.wpDB=new WordPressDB(this);
  attemptToSelectPost();
  postList.loadPosts(false);
  if (WordPress.postsShouldRefresh) {
    postList.refreshPosts(false);
    WordPress.postsShouldRefresh=false;
  }
}
Program: 15196
Project: 15196
Buggy source:
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  Bundle extras=intent.getExtras();
  if (extras != null) {
    isPage=extras.getBoolean("String_Node_Str");
    postList.isPage=isPage;
  }
 else {
    isPage=false;
    postList.isPage=isPage;
  }
  titleBar.refreshBlog();
  attemptToSelectPost();
  postList.loadPosts(false);
}

Fixed version (ground truth):
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  Bundle extras=intent.getExtras();
  if (extras != null) {
    isPage=extras.getBoolean("String_Node_Str");
    postList.isPage=isPage;
    String errorMessage=extras.getString("String_Node_Str");
    if (errorMessage != null) {
      AlertDialog.Builder dialogBuilder=new AlertDialog.Builder(Posts.this);
      dialogBuilder.setTitle(getResources().getText(R.string.error));
      dialogBuilder.setMessage(errorMessage);
      dialogBuilder.setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      dialogBuilder.setCancelable(true);
      if (!isFinishing()) {
        dialogBuilder.create().show();
      }
    }
  }
 else {
    isPage=false;
    postList.isPage=isPage;
  }
  titleBar.refreshBlog();
  attemptToSelectPost();
  postList.loadPosts(false);
}
Program: 15198
Project: 15198
Buggy source:
@Override public void onCommentStatusChanged(final String status){
  if (WordPress.currentComment != null) {
    String comment_id=WordPress.currentComment.commentID;
    if (status.equals("String_Node_Str") || status.equals("String_Node_Str") || status.equals("String_Node_Str")) {
      final int commentID=Integer.parseInt(comment_id);
      showDialog(ID_DIALOG_MODERATING);
      new Thread(){
        public void run(){
          Looper.prepare();
          changeCommentStatus(status,commentID);
        }
      }
.start();
    }
 else     if (status.equals("String_Node_Str")) {
      final int commentID_del=Integer.parseInt(comment_id);
      showDialog(ID_DIALOG_DELETING);
      FragmentManager fm=getSupportFragmentManager();
      ViewCommentFragment f=(ViewCommentFragment)fm.findFragmentById(R.id.commentDetail);
      if (f == null) {
        fm.popBackStack();
      }
      new Thread(){
        public void run(){
          deleteComment(commentID_del);
        }
      }
.start();
    }
 else     if (status.equals("String_Node_Str")) {
      Intent i=new Intent(Comments.this,ReplyToComment.class);
      i.putExtra("String_Node_Str",Integer.parseInt(comment_id));
      i.putExtra("String_Node_Str",WordPress.currentComment.postID);
      startActivityForResult(i,0);
    }
 else     if (status.equals("String_Node_Str")) {
      FragmentManager fm=getSupportFragmentManager();
      ViewCommentFragment f=(ViewCommentFragment)fm.findFragmentById(R.id.commentDetail);
      if (f != null) {
        f.clearContent();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onCommentStatusChanged(final String status){
  if (WordPress.currentComment != null) {
    final int commentID=WordPress.currentComment.commentID;
    if (status.equals("String_Node_Str") || status.equals("String_Node_Str") || status.equals("String_Node_Str")) {
      showDialog(ID_DIALOG_MODERATING);
      new Thread(){
        public void run(){
          Looper.prepare();
          changeCommentStatus(status,commentID);
        }
      }
.start();
    }
 else     if (status.equals("String_Node_Str")) {
      showDialog(ID_DIALOG_DELETING);
      FragmentManager fm=getSupportFragmentManager();
      ViewCommentFragment f=(ViewCommentFragment)fm.findFragmentById(R.id.commentDetail);
      if (f == null) {
        fm.popBackStack();
      }
      new Thread(){
        public void run(){
          deleteComment(commentID);
        }
      }
.start();
    }
 else     if (status.equals("String_Node_Str")) {
      Intent i=new Intent(Comments.this,ReplyToComment.class);
      i.putExtra("String_Node_Str",commentID);
      i.putExtra("String_Node_Str",WordPress.currentComment.postID);
      startActivityForResult(i,0);
    }
 else     if (status.equals("String_Node_Str")) {
      FragmentManager fm=getSupportFragmentManager();
      ViewCommentFragment f=(ViewCommentFragment)fm.findFragmentById(R.id.commentDetail);
      if (f != null) {
        f.clearContent();
      }
    }
  }
}
Program: 15201
Project: 15201
Buggy source:
@Override protected HashMap<String,HashMap<?,?>> doInBackground(Void... args){
  HashMap<String,HashMap<?,?>> commentsResult;
  try {
    commentsResult=ApiHelper.refreshComments(getActivity().getApplicationContext(),commentParams);
  }
 catch (  XMLRPCException e) {
    if (!getActivity().isFinishing())     moderateErrorMsg=e.getLocalizedMessage();
    return null;
  }
  return commentsResult;
}

Fixed version (ground truth):
@Override protected HashMap<Integer,HashMap<?,?>> doInBackground(Void... args){
  HashMap<Integer,HashMap<?,?>> commentsResult;
  try {
    commentsResult=ApiHelper.refreshComments(getActivity().getApplicationContext(),commentParams);
  }
 catch (  XMLRPCException e) {
    if (!getActivity().isFinishing())     moderateErrorMsg=e.getLocalizedMessage();
    return null;
  }
  return commentsResult;
}
Program: 15203
Project: 15203
Buggy source:
protected void onPostExecute(HashMap<String,HashMap<?,?>> commentsResult){
  if (isCancelled())   return;
  if (commentsResult == null) {
    if (thumbs != null) {
      if (model.size() == 1) {
        WordPress.wpDB.clearComments(WordPress.currentBlog.getId());
        model.clear();
        allComments.clear();
        thumbs.notifyDataSetChanged();
        onCommentStatusChangeListener.onCommentStatusChanged("String_Node_Str");
        WordPress.currentComment=null;
        loadComments(false,false);
      }
    }
    onAnimateRefreshButton.onAnimateRefreshButton(false);
    if (!moderateErrorMsg.equals("String_Node_Str")) {
      FragmentTransaction ft=getFragmentManager().beginTransaction();
      WPAlertDialogFragment alert=WPAlertDialogFragment.newInstance(moderateErrorMsg);
      alert.show(ft,"String_Node_Str");
    }
    return;
  }
  if (commentsResult.size() == 0) {
    if (pd.isShowing()) {
      pd.dismiss();
    }
    onAnimateRefreshButton.onAnimateRefreshButton(false);
  }
 else {
    allComments.putAll(commentsResult);
    if (!doInBackground) {
      loadComments(refreshOnly,loadMore);
    }
    onAnimateRefreshButton.onAnimateRefreshButton(false);
  }
  if (!loadMore && !doInBackground) {
    onAnimateRefreshButton.onAnimateRefreshButton(false);
  }
 else   if (loadMore) {
    switcher.showPrevious();
  }
}

Fixed version (ground truth):
protected void onPostExecute(HashMap<Integer,HashMap<?,?>> commentsResult){
  if (isCancelled())   return;
  if (commentsResult == null) {
    if (thumbs != null) {
      if (model.size() == 1) {
        WordPress.wpDB.clearComments(WordPress.currentBlog.getId());
        model.clear();
        allComments.clear();
        thumbs.notifyDataSetChanged();
        onCommentStatusChangeListener.onCommentStatusChanged("String_Node_Str");
        WordPress.currentComment=null;
        loadComments(false,false);
      }
    }
    onAnimateRefreshButton.onAnimateRefreshButton(false);
    if (!moderateErrorMsg.equals("String_Node_Str")) {
      FragmentTransaction ft=getFragmentManager().beginTransaction();
      WPAlertDialogFragment alert=WPAlertDialogFragment.newInstance(moderateErrorMsg);
      alert.show(ft,"String_Node_Str");
    }
    return;
  }
  if (commentsResult.size() == 0) {
    if (pd.isShowing()) {
      pd.dismiss();
    }
    onAnimateRefreshButton.onAnimateRefreshButton(false);
  }
 else {
    allComments.putAll(commentsResult);
    if (!doInBackground) {
      loadComments(refreshOnly,loadMore);
    }
    onAnimateRefreshButton.onAnimateRefreshButton(false);
  }
  if (!loadMore && !doInBackground) {
    onAnimateRefreshButton.onAnimateRefreshButton(false);
  }
 else   if (loadMore) {
    switcher.showPrevious();
  }
}
Program: 15205
Project: 15205
Buggy source:
public void updateCommentStatus(int blogID,String id,String newStatus){
  ContentValues values=new ContentValues();
  values.put("String_Node_Str",newStatus);
synchronized (this) {
    db.update(COMMENTS_TABLE,values,"String_Node_Str" + blogID + "String_Node_Str"+ id,null);
  }
}

Fixed version (ground truth):
public void updateCommentStatus(int blogID,int id,String newStatus){
  ContentValues values=new ContentValues();
  values.put("String_Node_Str",newStatus);
synchronized (this) {
    db.update(COMMENTS_TABLE,values,"String_Node_Str" + blogID + "String_Node_Str"+ id,null);
  }
}
Program: 15206
Project: 15206
Buggy source:
public Comment(String postID,String commentID,int position,String name,String dateCreatedFormatted,String comment,String status,String postTitle,String authorURL,String authorEmail,URI profileImageUrl){
  this.postID=postID;
  this.commentID=commentID;
  this.position=position;
  this.name=name;
  this.emailURL=authorEmail;
  this.status=status;
  this.comment=comment;
  this.postTitle=postTitle;
  this.authorURL=authorURL;
  this.authorEmail=authorEmail;
  this.profileImageUrl=profileImageUrl;
  this.dateCreatedFormatted=dateCreatedFormatted;
}

Fixed version (ground truth):
public Comment(String postID,int commentID,int position,String name,String dateCreatedFormatted,String comment,String status,String postTitle,String authorURL,String authorEmail,URI profileImageUrl){
  this.postID=postID;
  this.commentID=commentID;
  this.position=position;
  this.name=name;
  this.emailURL=authorEmail;
  this.status=status;
  this.comment=comment;
  this.postTitle=postTitle;
  this.authorURL=authorURL;
  this.authorEmail=authorEmail;
  this.profileImageUrl=profileImageUrl;
  this.dateCreatedFormatted=dateCreatedFormatted;
}
Program: 15209
Project: 15209
Buggy source:
public void onTimeSet(TimePicker view,int hour,int minute){
  mHour=hour;
  mMinute=minute;
  Date d=new Date(mYear - 1900,mMonth,mDay,mHour,mMinute);
  long timestamp=d.getTime();
  try {
    int flags=0;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_DATE;
    flags|=android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_YEAR;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_TIME;
    customPubDate=timestamp + TimeZone.getDefault().getOffset(timestamp);
    String formattedDate=DateUtils.formatDateTime(EditPost.this,customPubDate,flags);
    TextView tvPubDate=(TextView)findViewById(R.id.pubDate);
    tvPubDate.setText(formattedDate);
    isCustomPubDate=true;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void onTimeSet(TimePicker view,int hour,int minute){
  mHour=hour;
  mMinute=minute;
  Date d=new Date(mYear - 1900,mMonth,mDay,mHour,mMinute);
  long timestamp=d.getTime();
  try {
    int flags=0;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_DATE;
    flags|=android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_YEAR;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_TIME;
    String formattedDate=DateUtils.formatDateTime(EditPost.this,timestamp,flags);
    customPubDate=timestamp;
    TextView tvPubDate=(TextView)findViewById(R.id.pubDate);
    tvPubDate.setText(formattedDate);
    isCustomPubDate=true;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 15218
Project: 15218
Buggy source:
public void onTimeSet(TimePicker view,int hour,int minute){
  mHour=hour;
  mMinute=minute;
  String AMPM="String_Node_Str";
  if (mHour >= 12) {
    AMPM="String_Node_Str";
    if (mHour > 12) {
      mHour-=12;
    }
  }
  TextView pubDate=(TextView)findViewById(R.id.pubDate);
  String[] shortMonths=new DateFormatSymbols().getShortMonths();
  pubDate.setText(shortMonths[mMonth] + "String_Node_Str" + String.format("String_Node_Str",mDay)+ "String_Node_Str"+ mYear+ "String_Node_Str"+ String.format("String_Node_Str",mHour)+ "String_Node_Str"+ String.format("String_Node_Str",mMinute)+ "String_Node_Str"+ AMPM);
  isCustomPubDate=true;
}

Fixed version (ground truth):
public void onTimeSet(TimePicker view,int hour,int minute){
  mHour=hour;
  mMinute=minute;
  Date d=new Date(mYear - 1900,mMonth,mDay,mHour,mMinute);
  long timestamp=d.getTime();
  try {
    int flags=0;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_DATE;
    flags|=android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_YEAR;
    flags|=android.text.format.DateUtils.FORMAT_SHOW_TIME;
    customPubDate=timestamp + TimeZone.getDefault().getOffset(timestamp);
    String formattedDate=DateUtils.formatDateTime(EditPost.this,customPubDate,flags);
    TextView tvPubDate=(TextView)findViewById(R.id.pubDate);
    tvPubDate.setText(formattedDate);
    isCustomPubDate=true;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 15219
Project: 15219
Buggy source:
public void handleMessage(Message msg){
  super.handleMessage(msg);
  final ImageView ivGravatar=(ImageView)getActivity().findViewById(R.id.gravatar);
  ivGravatar.setImageDrawable(d);
}

Fixed version (ground truth):
public void handleMessage(Message msg){
  super.handleMessage(msg);
  try {
    final ImageView ivGravatar=(ImageView)getActivity().findViewById(R.id.gravatar);
    ivGravatar.setImageDrawable(d);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 15222
Project: 15222
Buggy source:
@Override public void onActivityCreated(Bundle bundle){
  super.onActivityCreated(bundle);
  if (WordPress.currentPost != null) {
    loadPost(WordPress.currentPost);
  }
}

Fixed version (ground truth):
@Override public void onActivityCreated(Bundle bundle){
  super.onActivityCreated(bundle);
}
Program: 15225
Project: 15225
Buggy source:
protected void loadPostPreview(){
  if (!WordPress.currentPost.getPermaLink().equals("String_Node_Str")) {
    Intent i=new Intent(getActivity(),Read.class);
    startActivity(i);
  }
}

Fixed version (ground truth):
protected void loadPostPreview(){
  if (WordPress.currentPost != null) {
    if (!WordPress.currentPost.getPermaLink().equals("String_Node_Str")) {
      Intent i=new Intent(getActivity(),Read.class);
      startActivity(i);
    }
  }
}
Program: 15227
Project: 15227
Buggy source:
public void showDashboard(final long delay){
  final ImageButton showDashboard=(ImageButton)findViewById(R.id.home_small);
  showDashboard.postDelayed(new Runnable(){
    public void run(){
      if (dashboard.getVisibility() == View.GONE) {
        showDashboardOverlay(delay);
      }
    }
  }
,0);
}

Fixed version (ground truth):
public void showDashboard(final long delay){
  final ImageButton showDashboard=(ImageButton)findViewById(R.id.home_small);
  if (dashboard == null)   initViews();
  showDashboard.postDelayed(new Runnable(){
    public void run(){
      if (dashboard.getVisibility() == View.GONE) {
        showDashboardOverlay(delay);
      }
    }
  }
,0);
}
Program: 15229
Project: 15229
Buggy source:
@Override protected Boolean doInBackground(Void... params){
  Blog blog=WordPress.currentBlog;
  XMLRPCClient client=new XMLRPCClient(blog.getUrl(),blog.getHttpuser(),blog.getHttppassword());
  if (!blog.isDotcomFlag()) {
    HashMap<String,String> hPost=new HashMap<String,String>();
    hPost.put("String_Node_Str","String_Node_Str");
    Object[] vParams={blog.getBlogId(),blog.getUsername(),blog.getPassword(),hPost};
    Object versionResult=new Object();
    try {
      versionResult=(Object)client.call("String_Node_Str",vParams);
    }
 catch (    XMLRPCException e) {
    }
    if (versionResult != null) {
      try {
        HashMap<?,?> contentHash=(HashMap<?,?>)versionResult;
        HashMap<?,?> sv=(HashMap<?,?>)contentHash.get("String_Node_Str");
        String wpVersion=sv.get("String_Node_Str").toString();
        if (wpVersion.length() > 0) {
          blog.setWpVersion(wpVersion);
        }
      }
 catch (      Exception e) {
      }
    }
  }
  Vector<Object> args=new Vector<Object>();
  args.add(blog);
  args.add(Dashboard.this);
  new ApiHelper.getPostFormatsTask().execute(args);
  HashMap<String,Object> hPost=new HashMap<String,Object>();
  hPost.put("String_Node_Str","String_Node_Str");
  hPost.put("String_Node_Str","String_Node_Str");
  hPost.put("String_Node_Str",30);
  Object[] commentParams={blog.getBlogId(),blog.getUsername(),blog.getPassword(),hPost};
  args.add(commentParams);
  try {
    ApiHelper.refreshComments(Dashboard.this,commentParams,false);
  }
 catch (  XMLRPCException e) {
    e.printStackTrace();
  }
  return true;
}

Fixed version (ground truth):
@Override protected Boolean doInBackground(Void... params){
  Blog blog=WordPress.currentBlog;
  XMLRPCClient client=new XMLRPCClient(blog.getUrl(),blog.getHttpuser(),blog.getHttppassword());
  if (!blog.isDotcomFlag()) {
    HashMap<String,String> hPost=new HashMap<String,String>();
    hPost.put("String_Node_Str","String_Node_Str");
    Object[] vParams={blog.getBlogId(),blog.getUsername(),blog.getPassword(),hPost};
    Object versionResult=new Object();
    try {
      versionResult=(Object)client.call("String_Node_Str",vParams);
    }
 catch (    XMLRPCException e) {
    }
    if (versionResult != null) {
      try {
        HashMap<?,?> contentHash=(HashMap<?,?>)versionResult;
        HashMap<?,?> sv=(HashMap<?,?>)contentHash.get("String_Node_Str");
        String wpVersion=sv.get("String_Node_Str").toString();
        if (wpVersion.length() > 0) {
          blog.setWpVersion(wpVersion);
        }
      }
 catch (      Exception e) {
      }
    }
  }
  Vector<Object> args=new Vector<Object>();
  args.add(blog);
  args.add(Dashboard.this);
  new ApiHelper.getPostFormatsTask().execute(args);
  HashMap<String,Object> hPost=new HashMap<String,Object>();
  hPost.put("String_Node_Str",30);
  Object[] commentParams={blog.getBlogId(),blog.getUsername(),blog.getPassword(),hPost};
  args.add(commentParams);
  try {
    ApiHelper.refreshComments(Dashboard.this,commentParams);
  }
 catch (  XMLRPCException e) {
    e.printStackTrace();
  }
  return true;
}
Program: 15232
Project: 15232
Buggy source:
@Override protected void onResume(){
  super.onResume();
  if (WordPress.wpDB == null)   WordPress.wpDB=new WordPressDB(this);
  commentList.loadComments(false,false);
  attemptToSelectComment();
  commentList.refreshComments(false,false,false);
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  if (WordPress.wpDB == null)   WordPress.wpDB=new WordPressDB(this);
  boolean commentsLoaded=commentList.loadComments(false,false);
  if (!commentsLoaded)   commentList.refreshComments(false,false,false);
}
Program: 15233
Project: 15233
Buggy source:
protected void setContent(){
  Intent intent=getIntent();
  String text=intent.getStringExtra(Intent.EXTRA_TEXT);
  String title=intent.getStringExtra(Intent.EXTRA_SUBJECT);
  if (text != null) {
    EditText titleET=(EditText)findViewById(R.id.title);
    if (title != null) {
      titleET.setText(title);
    }
    WPEditText contentET=(WPEditText)findViewById(R.id.postContent);
    if (text.contains("String_Node_Str")) {
      text=text.replace("String_Node_Str","String_Node_Str");
      text=text.replace("String_Node_Str","String_Node_Str");
      text=text.replace("String_Node_Str","String_Node_Str");
      text=text.replace("String_Node_Str","String_Node_Str");
      text="String_Node_Str" + text + "String_Node_Str"+ text+ "String_Node_Str";
      contentET.setText(text);
    }
 else {
      text=text.replaceAll("String_Node_Str","String_Node_Str");
      contentET.setText(WPHtml.fromHtml(text,EditPost.this,post));
    }
  }
 else {
    String action=intent.getAction();
    final String type=intent.getType();
    final ArrayList<Uri> multi_stream;
    if (Intent.ACTION_SEND_MULTIPLE.equals(action)) {
      multi_stream=intent.getParcelableArrayListExtra((Intent.EXTRA_STREAM));
    }
 else {
      multi_stream=new ArrayList<Uri>();
      multi_stream.add((Uri)intent.getParcelableExtra(Intent.EXTRA_STREAM));
    }
    Vector<Serializable> params=new Vector<Serializable>();
    params.add(multi_stream);
    params.add(type);
    new processAttachmentsTask().execute(params);
  }
}

Fixed version (ground truth):
protected void setContent(){
  Intent intent=getIntent();
  String text=intent.getStringExtra(Intent.EXTRA_TEXT);
  String title=intent.getStringExtra(Intent.EXTRA_SUBJECT);
  if (text != null) {
    EditText titleET=(EditText)findViewById(R.id.title);
    if (title != null) {
      titleET.setText(title);
    }
    WPEditText contentET=(WPEditText)findViewById(R.id.postContent);
    if (text.contains("String_Node_Str")) {
      text=text.replace("String_Node_Str","String_Node_Str");
      text=text.replace("String_Node_Str","String_Node_Str");
      text=text.replace("String_Node_Str","String_Node_Str");
      text=text.replace("String_Node_Str","String_Node_Str");
      text="String_Node_Str" + text + "String_Node_Str"+ text+ "String_Node_Str";
      contentET.setText(text);
    }
 else {
      text=text.replaceAll("String_Node_Str","String_Node_Str");
      contentET.setText(WPHtml.fromHtml(StringHelper.addPTags(text),EditPost.this,post));
    }
  }
 else {
    String action=intent.getAction();
    final String type=intent.getType();
    final ArrayList<Uri> multi_stream;
    if (Intent.ACTION_SEND_MULTIPLE.equals(action)) {
      multi_stream=intent.getParcelableArrayListExtra((Intent.EXTRA_STREAM));
    }
 else {
      multi_stream=new ArrayList<Uri>();
      multi_stream.add((Uri)intent.getParcelableExtra(Intent.EXTRA_STREAM));
    }
    Vector<Serializable> params=new Vector<Serializable>();
    params.add(multi_stream);
    params.add(type);
    new processAttachmentsTask().execute(params);
  }
}
Program: 15235
Project: 15235
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.posts);
  FragmentManager fm=getSupportFragmentManager();
  postList=(ViewPosts)fm.findFragmentById(R.id.postList);
  Bundle extras=getIntent().getExtras();
  if (extras != null) {
    isPage=extras.getBoolean("String_Node_Str");
  }
  WordPress.currentPost=null;
  titleBar=(WPTitleBar)findViewById(R.id.postsActionBar);
  titleBar.refreshButton.setOnClickListener(new ImageButton.OnClickListener(){
    public void onClick(    View v){
      postList.refreshPosts(false);
    }
  }
);
  titleBar.setOnBlogChangedListener(new OnBlogChangedListener(){
    @Override public void OnBlogChanged(){
      postList.shouldSelectAfterLoad=true;
      boolean loadedPosts=postList.loadPosts(false);
      if (!loadedPosts)       postList.refreshPosts(false);
    }
  }
);
  attemptToSelectPost();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.posts);
  FragmentManager fm=getSupportFragmentManager();
  postList=(ViewPosts)fm.findFragmentById(R.id.postList);
  Bundle extras=getIntent().getExtras();
  if (extras != null) {
    isPage=extras.getBoolean("String_Node_Str");
  }
  WordPress.currentPost=null;
  titleBar=(WPTitleBar)findViewById(R.id.postsActionBar);
  titleBar.refreshButton.setOnClickListener(new ImageButton.OnClickListener(){
    public void onClick(    View v){
      postList.refreshPosts(false);
    }
  }
);
  titleBar.setOnBlogChangedListener(new OnBlogChangedListener(){
    @Override public void OnBlogChanged(){
      attemptToSelectPost();
      boolean loadedPosts=postList.loadPosts(false);
      if (!loadedPosts)       postList.refreshPosts(false);
    }
  }
);
  attemptToSelectPost();
}
Program: 15236
Project: 15236
Buggy source:
@Override public void OnBlogChanged(){
  postList.shouldSelectAfterLoad=true;
  boolean loadedPosts=postList.loadPosts(false);
  if (!loadedPosts)   postList.refreshPosts(false);
}

Fixed version (ground truth):
@Override public void OnBlogChanged(){
  attemptToSelectPost();
  boolean loadedPosts=postList.loadPosts(false);
  if (!loadedPosts)   postList.refreshPosts(false);
}
Program: 15237
Project: 15237
Buggy source:
@Override protected void onResume(){
  super.onResume();
  postList.refreshPosts(false);
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  attemptToSelectPost();
  boolean loadedPosts=postList.loadPosts(false);
  if (!loadedPosts)   postList.refreshPosts(false);
}
Program: 15238
Project: 15238
Buggy source:
public void loadPost(Post post){
  TextView title=(TextView)getActivity().findViewById(R.id.postTitle);
  if (post.getTitle().equals("String_Node_Str"))   title.setText("String_Node_Str" + getResources().getText(R.string.untitled) + "String_Node_Str");
 else   title.setText(post.getTitle());
  WebView webView=(WebView)getActivity().findViewById(R.id.viewPostWebView);
  TextView tv=(TextView)getActivity().findViewById(R.id.viewPostTextView);
  if (post.isLocalDraft()) {
    tv.setVisibility(View.VISIBLE);
    webView.setVisibility(View.GONE);
    tv.setText(WPHtml.fromHtml(post.getDescription() + post.getMt_text_more(),getActivity().getApplicationContext(),post));
  }
 else {
    tv.setVisibility(View.GONE);
    webView.setVisibility(View.VISIBLE);
    String htmlText="String_Node_Str" + post.getDescription() + post.getMt_text_more()+ "String_Node_Str";
    webView.loadDataWithBaseURL("String_Node_Str",htmlText,"String_Node_Str","String_Node_Str",null);
  }
}

Fixed version (ground truth):
public void loadPost(Post post){
  TextView title=(TextView)getActivity().findViewById(R.id.postTitle);
  if (post.getTitle().equals("String_Node_Str"))   title.setText("String_Node_Str" + getResources().getText(R.string.untitled) + "String_Node_Str");
 else   title.setText(post.getTitle());
  WebView webView=(WebView)getActivity().findViewById(R.id.viewPostWebView);
  TextView tv=(TextView)getActivity().findViewById(R.id.viewPostTextView);
  if (post.isLocalDraft()) {
    tv.setVisibility(View.VISIBLE);
    webView.setVisibility(View.GONE);
    tv.setText(WPHtml.fromHtml(post.getDescription() + post.getMt_text_more(),getActivity().getApplicationContext(),post));
  }
 else {
    tv.setVisibility(View.GONE);
    webView.setVisibility(View.VISIBLE);
    String html=StringHelper.addPTags(post.getDescription() + post.getMt_text_more());
    String htmlText="String_Node_Str" + html + "String_Node_Str";
    webView.loadDataWithBaseURL("String_Node_Str",htmlText,"String_Node_Str","String_Node_Str",null);
  }
}
Program: 15241
Project: 15241
Buggy source:
private void initStats(){
  String sUsername, sPassword;
  if (WordPress.currentBlog.getApi_key() == null) {
    if (WordPress.currentBlog.getDotcom_username() != null) {
      sUsername=WordPress.currentBlog.getDotcom_username();
      sPassword=WordPress.currentBlog.getDotcom_password();
    }
 else {
      sUsername=WordPress.currentBlog.getUsername();
      sPassword=WordPress.currentBlog.getPassword();
    }
    showProgressBar();
    new statsUserDataTask().execute(sUsername,sPassword,WordPress.currentBlog.getUrl(),String.valueOf(WordPress.currentBlog.getBlogId()));
  }
 else {
    showDialog(ID_DIALOG_GET_STATS);
    Thread action=new Thread(){
      public void run(){
        getStatsData(WordPress.currentBlog.getApi_key(),WordPress.currentBlog.getApi_blogid(),"String_Node_Str",7);
      }
    }
;
    action.start();
  }
}

Fixed version (ground truth):
private void initStats(){
  String sUsername, sPassword;
  if (WordPress.currentBlog.getApi_key() == null) {
    if (WordPress.currentBlog.getDotcom_username() != null) {
      sUsername=WordPress.currentBlog.getDotcom_username();
      sPassword=WordPress.currentBlog.getDotcom_password();
    }
 else {
      sUsername=WordPress.currentBlog.getUsername();
      sPassword=WordPress.currentBlog.getPassword();
    }
    new statsUserDataTask().execute(sUsername,sPassword,WordPress.currentBlog.getUrl(),String.valueOf(WordPress.currentBlog.getBlogId()));
  }
 else {
    titleBar.startRotatingRefreshIcon();
    Thread action=new Thread(){
      public void run(){
        getStatsData(WordPress.currentBlog.getApi_key(),WordPress.currentBlog.getApi_blogid(),"String_Node_Str",7);
      }
    }
;
    action.start();
  }
}
Program: 15242
Project: 15242
Buggy source:
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  Bundle extras=intent.getExtras();
  if (extras != null) {
    isPage=extras.getBoolean("String_Node_Str");
    postList.isPage=isPage;
  }
  titleBar.refreshBlog();
  attemptToSelectPost();
  postList.loadPosts(false);
}

Fixed version (ground truth):
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  Bundle extras=intent.getExtras();
  if (extras != null) {
    isPage=extras.getBoolean("String_Node_Str");
    postList.isPage=isPage;
  }
 else {
    isPage=false;
    postList.isPage=isPage;
  }
  titleBar.refreshBlog();
  attemptToSelectPost();
  postList.loadPosts(false);
}
Program: 15243
Project: 15243
Buggy source:
private void createSwitcher(){
  if (!isPage) {
    switcher=new ViewSwitcher(getActivity().getApplicationContext());
    Button footer=(Button)View.inflate(getActivity().getApplicationContext(),R.layout.list_footer_btn,null);
    footer.setText(getResources().getText(R.string.load_more) + "String_Node_Str" + getResources().getText(R.string.tab_posts));
    footer.setOnClickListener(new Button.OnClickListener(){
      public void onClick(      View v){
        switcher.showNext();
        numRecords+=30;
        refreshPosts(true);
      }
    }
);
    View progress=View.inflate(getActivity().getApplicationContext(),R.layout.list_footer_progress,null);
    switcher.addView(footer);
    switcher.addView(progress);
  }
}

Fixed version (ground truth):
public void createSwitcher(){
  switcher=new ViewSwitcher(getActivity().getApplicationContext());
  Button footer=(Button)View.inflate(getActivity().getApplicationContext(),R.layout.list_footer_btn,null);
  footer.setText(getResources().getText(R.string.load_more) + "String_Node_Str" + getResources().getText(R.string.tab_posts));
  footer.setOnClickListener(new Button.OnClickListener(){
    public void onClick(    View v){
      switcher.showNext();
      numRecords+=30;
      refreshPosts(true);
    }
  }
);
  View progress=View.inflate(getActivity().getApplicationContext(),R.layout.list_footer_progress,null);
  switcher.addView(footer);
  switcher.addView(progress);
}
Program: 15245
Project: 15245
Buggy source:
public long savePost(Context ctx,Post post,String blogID){
  long returnValue=-1;
  if (post != null) {
    db=ctx.openOrCreateDatabase(DATABASE_NAME,0,null);
    ContentValues values=new ContentValues();
    values.put("String_Node_Str",blogID);
    values.put("String_Node_Str",post.getTitle());
    values.put("String_Node_Str",post.getDate_created_gmt());
    values.put("String_Node_Str",post.getDescription());
    if (post.getCategories() != null) {
      JSONArray jsonArray=null;
      try {
        jsonArray=new JSONArray(post.getCategories().toString());
        values.put("String_Node_Str",jsonArray.toString());
      }
 catch (      JSONException e) {
        e.printStackTrace();
      }
    }
    values.put("String_Node_Str",post.isLocalDraft());
    values.put("String_Node_Str",post.getMediaPaths());
    values.put("String_Node_Str",post.getMt_keywords());
    values.put("String_Node_Str",post.getWP_password());
    values.put("String_Node_Str",post.getPost_status());
    values.put("String_Node_Str",post.isUploaded());
    values.put("String_Node_Str",post.isPage());
    if (post.isUploaded()) {
      returnValue=db.update(POSTS_TABLE,values,"String_Node_Str" + blogID + "String_Node_Str"+ post.getPostid(),null);
    }
 else {
      returnValue=db.insert(POSTS_TABLE,null,values);
    }
    db.close();
  }
  return (returnValue);
}

Fixed version (ground truth):
public long savePost(Context ctx,Post post,String blogID){
  long returnValue=-1;
  if (post != null) {
    db=ctx.openOrCreateDatabase(DATABASE_NAME,0,null);
    ContentValues values=new ContentValues();
    values.put("String_Node_Str",blogID);
    values.put("String_Node_Str",post.getTitle());
    values.put("String_Node_Str",post.getDate_created_gmt());
    values.put("String_Node_Str",post.getDescription());
    if (post.getCategories() != null) {
      JSONArray jsonArray=null;
      try {
        jsonArray=new JSONArray(post.getCategories().toString());
        values.put("String_Node_Str",jsonArray.toString());
      }
 catch (      JSONException e) {
        e.printStackTrace();
      }
    }
    values.put("String_Node_Str",post.isLocalDraft());
    values.put("String_Node_Str",post.getMediaPaths());
    values.put("String_Node_Str",post.getMt_keywords());
    values.put("String_Node_Str",post.getWP_password());
    values.put("String_Node_Str",post.getPost_status());
    values.put("String_Node_Str",post.isUploaded());
    values.put("String_Node_Str",post.isPage());
    values.put("String_Node_Str",post.getLatitude());
    values.put("String_Node_Str",post.getLongitude());
    if (post.isUploaded() || post.getId() > 0) {
      returnValue=db.update(POSTS_TABLE,values,"String_Node_Str" + blogID + "String_Node_Str"+ post.getId(),null);
    }
 else {
      returnValue=db.insert(POSTS_TABLE,null,values);
    }
    db.close();
  }
  return (returnValue);
}
Program: 15246
Project: 15246
Buggy source:
/** 
 * Sets the progress and max of a ProgressBar.
 * @param viewId The view id.
 * @param progress The progress.
 * @param max The max value of a ProgressBar.
 * @return The BaseAdapterHelper for chaining.
 */
public BaseAdapterHelper setProgress(int viewId,int progress,int max){
  ProgressBar view=retrieveView(viewId);
  view.setProgress(progress);
  view.setMax(max);
  return this;
}

Fixed version (ground truth):
/** 
 * Sets the progress and max of a ProgressBar.
 * @param viewId The view id.
 * @param progress The progress.
 * @param max The max value of a ProgressBar.
 * @return The BaseAdapterHelper for chaining.
 */
public BaseAdapterHelper setProgress(int viewId,int progress,int max){
  ProgressBar view=retrieveView(viewId);
  view.setMax(max);
  view.setProgress(progress);
  return this;
}
Program: 15247
Project: 15247
Buggy source:
/** 
 * Sets the rating (the number of stars filled) and max of a RatingBar.
 * @param viewId The view id.
 * @param rating The rating.
 * @param max The range of the RatingBar to 0...max.
 * @return The BaseAdapterHelper for chaining.
 */
public BaseAdapterHelper setRating(int viewId,float rating,int max){
  RatingBar view=retrieveView(viewId);
  view.setRating(rating);
  view.setMax(max);
  return this;
}

Fixed version (ground truth):
/** 
 * Sets the rating (the number of stars filled) and max of a RatingBar.
 * @param viewId The view id.
 * @param rating The rating.
 * @param max The range of the RatingBar to 0...max.
 * @return The BaseAdapterHelper for chaining.
 */
public BaseAdapterHelper setRating(int viewId,float rating,int max){
  RatingBar view=retrieveView(viewId);
  view.setMax(max);
  view.setRating(rating);
  return this;
}
Program: 15248
Project: 15248
Buggy source:
protected void tearDown() throws Exception {
  Thread.sleep(100L);
  this.agilePmRabbitMQExchangeListener.close();
  this.collaborationRabbitMQExchangeListener.close();
  this.identityAccessRabbitMQExchangeListener.close();
  super.tearDown();
}

Fixed version (ground truth):
@Override protected void tearDown() throws Exception {
  this.agilePmRabbitMQExchangeListener.close();
  this.collaborationRabbitMQExchangeListener.close();
  this.identityAccessRabbitMQExchangeListener.close();
  super.tearDown();
}
Program: 15249
Project: 15249
Buggy source:
protected void expectedNotifications(int anNotificationCount){
  try {
    Thread.sleep(500L);
  }
 catch (  InterruptedException e) {
  }
  if (this.handledNotifications.size() != anNotificationCount) {
    throw new IllegalStateException("String_Node_Str" + anNotificationCount + "String_Node_Str"+ this.handledNotifications.size()+ "String_Node_Str"+ this.handledNotifications.values());
  }
}

Fixed version (ground truth):
protected void expectedNotifications(int anNotificationCount){
  try {
    Thread.sleep(200L);
  }
 catch (  InterruptedException e) {
  }
  if (this.handledNotifications.size() != anNotificationCount) {
    throw new IllegalStateException("String_Node_Str" + anNotificationCount + "String_Node_Str"+ this.handledNotifications.size()+ "String_Node_Str"+ this.handledNotifications.values());
  }
}
Program: 15250
Project: 15250
Buggy source:
protected void setUp() throws Exception {
  Thread.sleep(100L);
  SlothServer.executeInProcessDetachedServer();
  Thread.sleep(100L);
  DomainEventPublisher.instance().reset();
  DomainEventPublisher.instance().subscribe(new DomainEventSubscriber<DomainEvent>(){
    @Override public void handleEvent(    DomainEvent aDomainEvent){
      handledEvents.add(aDomainEvent.getClass());
    }
    @Override public Class<DomainEvent> subscribedToEventType(){
      return DomainEvent.class;
    }
  }
);
  this.handledEvents=new ArrayList<Class<? extends DomainEvent>>();
  this.handledNotifications=new HashMap<String,String>();
  this.agilePmRabbitMQExchangeListener=new TestAgilePMRabbitMQExchangeListener();
  this.collaborationRabbitMQExchangeListener=new TestCollaborationRabbitMQExchangeListener();
  this.identityAccessRabbitMQExchangeListener=new TestIdentityAccessRabbitMQExchangeListener();
  Thread.sleep(200L);
}

Fixed version (ground truth):
@Override protected void setUp() throws Exception {
  Thread.sleep(100L);
  SlothServer.executeInProcessDetachedServer();
  Thread.sleep(100L);
  DomainEventPublisher.instance().reset();
  DomainEventPublisher.instance().subscribe(new DomainEventSubscriber<DomainEvent>(){
    @Override public void handleEvent(    DomainEvent aDomainEvent){
      handledEvents.add(aDomainEvent.getClass());
    }
    @Override public Class<DomainEvent> subscribedToEventType(){
      return DomainEvent.class;
    }
  }
);
  this.handledEvents=new ArrayList<Class<? extends DomainEvent>>();
  this.handledNotifications=new HashMap<String,String>();
  this.agilePmRabbitMQExchangeListener=new TestAgilePMRabbitMQExchangeListener();
  this.collaborationRabbitMQExchangeListener=new TestCollaborationRabbitMQExchangeListener();
  this.identityAccessRabbitMQExchangeListener=new TestIdentityAccessRabbitMQExchangeListener();
  clearExchangeListeners();
  Thread.sleep(200L);
}
Program: 15251
Project: 15251
Buggy source:
protected void expectedNotification(Class<? extends DomainEvent> aNotificationType,int aTotal){
  try {
    Thread.sleep(500L);
  }
 catch (  InterruptedException e) {
  }
  int count=0;
  String notificationTypeName=aNotificationType.getName();
  for (  String type : this.handledNotifications.values()) {
    if (type.equals(notificationTypeName)) {
      System.out.println("String_Node_Str" + type);
      System.out.println("String_Node_Str" + notificationTypeName);
      ++count;
    }
  }
  if (count != aTotal) {
    throw new IllegalStateException("String_Node_Str" + aTotal + "String_Node_Str"+ aNotificationType.getSimpleName()+ "String_Node_Str"+ this.handledNotifications.size()+ "String_Node_Str"+ this.handledNotifications.values());
  }
}

Fixed version (ground truth):
protected void expectedNotification(Class<? extends DomainEvent> aNotificationType,int aTotal){
  try {
    Thread.sleep(200L);
  }
 catch (  InterruptedException e) {
  }
  int count=0;
  String notificationTypeName=aNotificationType.getName();
  for (  String type : this.handledNotifications.values()) {
    if (type.equals(notificationTypeName)) {
      ++count;
    }
  }
  if (count != aTotal) {
    throw new IllegalStateException("String_Node_Str" + aTotal + "String_Node_Str"+ aNotificationType.getSimpleName()+ "String_Node_Str"+ this.handledNotifications.size()+ "String_Node_Str"+ this.handledNotifications.values());
  }
}
Program: 15252
Project: 15252
Buggy source:
@Override public boolean onContextItemSelected(MenuItem item){
  if (item.getItemId() != R.id.DeleteListItem && item.getItemId() != R.id.AddListItem) {
    return false;
  }
  ContextMenuInfo menuInfo=item.getMenuInfo();
  AdapterContextMenuInfo adapterInfo=(AdapterContextMenuInfo)menuInfo;
  int position=adapterInfo.position;
  Book book=(Book)mListView.getItemAtPosition(position);
  BookArrayAdapter adapter=(BookArrayAdapter)mListView.getAdapter();
  if (item.getItemId() == R.id.DeleteListItem) {
  }
 else   if (item.getItemId() == R.id.AddListItem) {
  }
  adapter.notifyDataSetChanged();
  return true;
}

Fixed version (ground truth):
@Override public boolean onContextItemSelected(MenuItem item){
  if (item.getItemId() != R.id.DeleteListItem && item.getItemId() != R.id.AddListItem) {
    return false;
  }
  ContextMenuInfo menuInfo=item.getMenuInfo();
  AdapterContextMenuInfo adapterInfo=(AdapterContextMenuInfo)menuInfo;
  int position=adapterInfo.position;
  Book book=(Book)mListView.getItemAtPosition(position);
  if (item.getItemId() == R.id.DeleteListItem) {
  }
 else   if (item.getItemId() == R.id.AddListItem) {
  }
  return true;
}
Program: 15253
Project: 15253
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  mActivity=this;
  ArrayList<Book> list=new ArrayList<Book>();
  for (int i=0; i < 20; i++) {
    list.add(new Book("String_Node_Str" + i,"String_Node_Str" + i,i * 10));
  }
  mListView=(ListView)findViewById(R.id.BookList);
}
Program: 15254
Project: 15254
Buggy source:
TracingFilter(HttpTracing httpTracing){
  tracer=httpTracing.tracing().tracer();
  handler=HttpServerHandler.create(httpTracing,ADAPTER);
  extractor=httpTracing.tracing().propagation().extractor(GETTER);
}

Fixed version (ground truth):
TracingFilter(HttpTracing httpTracing){
  tracer=httpTracing.tracing().tracer();
  currentTraceContext=httpTracing.tracing().currentTraceContext();
  handler=HttpServerHandler.create(httpTracing,ADAPTER);
  extractor=httpTracing.tracing().propagation().extractor(GETTER);
}