nus-yam/ex-repair huggingface dataset:
Program: 113937
Project: 113937
Buggy source:
public List<DialogNotification> getDialogNotificationsByDialogIdAndDate(String dialogId,long createdDate,boolean moreDate){
  List<DialogNotification> dialogNotificationsList=new ArrayList<>();
  try {
    QueryBuilder<DialogNotification,Long> messageQueryBuilder=dao.queryBuilder();
    if (moreDate) {
      messageQueryBuilder.where().gt(DialogNotification.Column.CREATED_DATE,createdDate);
    }
 else {
      messageQueryBuilder.where().lt(DialogNotification.Column.CREATED_DATE,createdDate);
    }
    Where<DialogNotification,Long> where=messageQueryBuilder.where();
    where.and(where.ne(DialogNotification.Column.STATE,State.TEMP_LOCAL),where.ne(DialogNotification.Column.STATE,State.TEMP_LOCAL_UNREAD));
    QueryBuilder<DialogOccupant,Long> dialogOccupantQueryBuilder=dialogOccupantDao.queryBuilder();
    QueryBuilder<Dialog,Long> dialogQueryBuilder=dialogDao.queryBuilder();
    dialogQueryBuilder.where().eq(Dialog.Column.ID,dialogId);
    dialogOccupantQueryBuilder.join(dialogQueryBuilder);
    messageQueryBuilder.join(dialogOccupantQueryBuilder);
    PreparedQuery<DialogNotification> preparedQuery=messageQueryBuilder.prepare();
    dialogNotificationsList=dao.query(preparedQuery);
  }
 catch (  SQLException e) {
    ErrorUtils.logError(e);
  }
  return dialogNotificationsList;
}

Fixed version (ground truth):
public List<DialogNotification> getDialogNotificationsByDialogIdAndDate(String dialogId,long createdDate,boolean moreDate){
  List<DialogNotification> dialogNotificationsList=new ArrayList<>();
  try {
    QueryBuilder<DialogNotification,Long> messageQueryBuilder=dao.queryBuilder();
    Where<DialogNotification,Long> where=messageQueryBuilder.where();
    where.and(where.ne(DialogNotification.Column.STATE,State.TEMP_LOCAL),where.ne(DialogNotification.Column.STATE,State.TEMP_LOCAL_UNREAD),moreDate ? where.gt(DialogNotification.Column.CREATED_DATE,createdDate) : where.lt(DialogNotification.Column.CREATED_DATE,createdDate));
    QueryBuilder<DialogOccupant,Long> dialogOccupantQueryBuilder=dialogOccupantDao.queryBuilder();
    QueryBuilder<Dialog,Long> dialogQueryBuilder=dialogDao.queryBuilder();
    dialogQueryBuilder.where().eq(Dialog.Column.ID,dialogId);
    dialogOccupantQueryBuilder.join(dialogQueryBuilder);
    messageQueryBuilder.join(dialogOccupantQueryBuilder);
    PreparedQuery<DialogNotification> preparedQuery=messageQueryBuilder.prepare();
    dialogNotificationsList=dao.query(preparedQuery);
  }
 catch (  SQLException e) {
    ErrorUtils.logError(e);
  }
  return dialogNotificationsList;
}
Program: 113938
Project: 113938
Buggy source:
public List<Message> getMessagesByDialogIdAndDate(String dialogId,long createdDate,boolean moreDate){
  List<Message> messagesList=new ArrayList<>();
  try {
    QueryBuilder<Message,Long> messageQueryBuilder=dao.queryBuilder();
    if (moreDate) {
      messageQueryBuilder.where().gt(Message.Column.CREATED_DATE,createdDate);
    }
 else {
      messageQueryBuilder.where().lt(Message.Column.CREATED_DATE,createdDate);
    }
    Where<Message,Long> where=messageQueryBuilder.where();
    where.and(where.ne(Message.Column.STATE,State.TEMP_LOCAL),where.ne(Message.Column.STATE,State.TEMP_LOCAL_UNREAD));
    QueryBuilder<DialogOccupant,Long> dialogOccupantQueryBuilder=dialogOccupantDao.queryBuilder();
    QueryBuilder<Dialog,Long> dialogQueryBuilder=dialogDao.queryBuilder();
    dialogQueryBuilder.where().eq(Dialog.Column.ID,dialogId);
    dialogOccupantQueryBuilder.join(dialogQueryBuilder);
    messageQueryBuilder.join(dialogOccupantQueryBuilder);
    PreparedQuery<Message> preparedQuery=messageQueryBuilder.prepare();
    messagesList=dao.query(preparedQuery);
  }
 catch (  SQLException e) {
    ErrorUtils.logError(e);
  }
  return messagesList;
}

Fixed version (ground truth):
public List<Message> getMessagesByDialogIdAndDate(String dialogId,long createdDate,boolean moreDate){
  List<Message> messagesList=new ArrayList<>();
  try {
    QueryBuilder<Message,Long> messageQueryBuilder=dao.queryBuilder();
    Where<Message,Long> where=messageQueryBuilder.where();
    where.and(where.ne(Message.Column.STATE,State.TEMP_LOCAL),where.ne(Message.Column.STATE,State.TEMP_LOCAL_UNREAD),moreDate ? where.gt(Message.Column.CREATED_DATE,createdDate) : where.lt(Message.Column.CREATED_DATE,createdDate));
    QueryBuilder<DialogOccupant,Long> dialogOccupantQueryBuilder=dialogOccupantDao.queryBuilder();
    QueryBuilder<Dialog,Long> dialogQueryBuilder=dialogDao.queryBuilder();
    dialogQueryBuilder.where().eq(Dialog.Column.ID,dialogId);
    dialogOccupantQueryBuilder.join(dialogQueryBuilder);
    messageQueryBuilder.join(dialogOccupantQueryBuilder);
    PreparedQuery<Message> preparedQuery=messageQueryBuilder.prepare();
    messagesList=dao.query(preparedQuery);
  }
 catch (  SQLException e) {
    ErrorUtils.logError(e);
  }
  return messagesList;
}
Program: 113939
Project: 113939
Buggy source:
private boolean loadAllDialogsByType(QBDialogType dialogsType,Bundle returnedBundle,QBRequestGetBuilder qbRequestGetBuilder,List<QBChatDialog> allDialogsList,int pageNumber) throws QBResponseException {
  boolean needToLoadMore=false;
  qbRequestGetBuilder.setSkip(allDialogsList.size());
  qbRequestGetBuilder.eq(FIELD_DIALOG_TYPE,dialogsType.getCode());
  List<QBChatDialog> newDialogsList=getDialogs(qbRequestGetBuilder,returnedBundle);
  allDialogsList.addAll(newDialogsList);
  needToLoadMore=newDialogsList.size() == ConstsCore.CHATS_DIALOGS_PER_PAGE;
  Log.d("String_Node_Str","String_Node_Str" + needToLoadMore + "String_Node_Str"+ newDialogsList.size());
  if (dialogsType == QBDialogType.GROUP) {
    boolean needClean=(pageNumber == 0);
    tryJoinRoomChatsPage(newDialogsList,needClean);
  }
  return needToLoadMore;
}

Fixed version (ground truth):
private boolean loadAllDialogsByType(QBDialogType dialogsType,Bundle returnedBundle,QBRequestGetBuilder qbRequestGetBuilder,List<QBChatDialog> allDialogsList,int pageNumber) throws QBResponseException {
  boolean needToLoadMore=false;
  qbRequestGetBuilder.setSkip(allDialogsList.size());
  qbRequestGetBuilder.eq(FIELD_DIALOG_TYPE,dialogsType.getCode());
  List<QBChatDialog> newDialogsList=getDialogs(qbRequestGetBuilder,returnedBundle);
  if (dialogsType == QBDialogType.GROUP) {
    dialogsListGroup=newDialogsList;
  }
 else {
    dialogsListPrivate=newDialogsList;
  }
  allDialogsList.addAll(newDialogsList);
  needToLoadMore=newDialogsList.size() == ConstsCore.CHATS_DIALOGS_PER_PAGE;
  Log.d("String_Node_Str","String_Node_Str" + needToLoadMore + "String_Node_Str"+ newDialogsList.size());
  if (dialogsType == QBDialogType.GROUP) {
    boolean needClean=(pageNumber == 0);
    tryJoinRoomChatsPage(newDialogsList,needClean);
  }
  return needToLoadMore;
}
Program: 113941
Project: 113941
Buggy source:
public List<QBChatDialog> getDialogs(QBRequestGetBuilder qbRequestGetBuilder,Bundle returnedBundle) throws QBResponseException {
  List<QBChatDialog> qbDialogsList=QBRestChatService.getChatDialogs(null,qbRequestGetBuilder).perform();
  if (qbDialogsList != null && !qbDialogsList.isEmpty()) {
    FinderUnknownUsers finderUnknownUsers=new FinderUnknownUsers(context,AppSession.getSession().getUser(),qbDialogsList);
    finderUnknownUsers.find();
    DbUtils.saveDialogsToCache(dataManager,qbDialogsList,currentDialog);
    DbUtils.updateDialogsOccupantsStatusesIfNeeded(dataManager,qbDialogsList);
  }
  return qbDialogsList;
}

Fixed version (ground truth):
public List<QBChatDialog> getDialogs(QBRequestGetBuilder qbRequestGetBuilder,Bundle returnedBundle) throws QBResponseException {
  List<QBChatDialog> qbDialogsList=QBRestChatService.getChatDialogs(null,qbRequestGetBuilder).perform();
  return qbDialogsList;
}
Program: 113942
Project: 113942
Buggy source:
private void setCurrentFragment(Fragment fragment,String tag){
  currentFragment=fragment;
  getSupportFragmentManager().popBackStack(null,FragmentManager.POP_BACK_STACK_INCLUSIVE);
  FragmentTransaction transaction=buildTransaction();
  transaction.replace(R.id.container_fragment,fragment,tag);
  transaction.commit();
}

Fixed version (ground truth):
private void setCurrentFragment(Fragment fragment,String tag,boolean needAddToBackStack){
  currentFragment=fragment;
  FragmentTransaction transaction=buildTransaction();
  if (needAddToBackStack) {
    transaction.addToBackStack(null);
  }
  transaction.replace(R.id.container_fragment,fragment,tag);
  transaction.commit();
}
Program: 113943
Project: 113943
Buggy source:
private void launchDialogsListFragment(){
  Log.d("String_Node_Str","String_Node_Str");
  setCurrentFragment(DialogsListFragment.newInstance());
}

Fixed version (ground truth):
private void launchDialogsListFragment(){
  Log.d("String_Node_Str","String_Node_Str");
  setCurrentFragment(DialogsListFragment.newInstance(),true);
}
Program: 113944
Project: 113944
Buggy source:
private void launchContactsFragment(){
  baseActivity.setCurrentFragment(SearchFragment.newInstance());
}

Fixed version (ground truth):
private void launchContactsFragment(){
  baseActivity.setCurrentFragment(SearchFragment.newInstance(),true);
}
Program: 113945
Project: 113945
Buggy source:
@Override public boolean onMenuItemActionCollapse(MenuItem item){
  cancelSearch();
  launchDialogsListFragment();
  return true;
}

Fixed version (ground truth):
@Override public boolean onMenuItemActionCollapse(MenuItem item){
  cancelSearch();
  baseActivity.getSupportFragmentManager().popBackStack();
  return true;
}
Program: 113946
Project: 113946
Buggy source:
protected void loginChat(){
  QBLoginChatCompositeCommand.start(this);
}

Fixed version (ground truth):
protected void loginChat(){
  isDialogLoading=true;
  showSnackbar(R.string.dialog_loading_dialogs,Snackbar.LENGTH_INDEFINITE);
  QBLoginChatCompositeCommand.start(this);
}
Program: 113947
Project: 113947
Buggy source:
private void showSnackbarUpdatingDialogs(){
  showSnackbar(R.string.dialog_loading_dialogs,Snackbar.LENGTH_INDEFINITE);
  loadDialogs();
}

Fixed version (ground truth):
private void showSnackbarUpdatingDialogs(){
  loadDialogs();
}
Program: 113948
Project: 113948
Buggy source:
private void performLoadChatsSuccessAction(Bundle bundle){
  hideSnackBar();
}

Fixed version (ground truth):
private void performLoadChatsSuccessAction(Bundle bundle){
  hideSnackBar();
  isDialogLoading=false;
}
Program: 113949
Project: 113949
Buggy source:
@Override public void onLoadFinished(Loader<List<DialogWrapper>> loader,List<DialogWrapper> dialogsList){
  dialogsListAdapter.setNewData(dialogsList);
  checkEmptyList(dialogsList.size());
}

Fixed version (ground truth):
@Override public void onLoadFinished(Loader<List<DialogWrapper>> loader,List<DialogWrapper> dialogsList){
  dialogsListAdapter.setNewData(dialogsList);
  checkEmptyList(dialogsList.size());
  if (!baseActivity.isDialogLoading()) {
    baseActivity.hideSnackBar();
  }
}
Program: 113950
Project: 113950
Buggy source:
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  Log.d(TAG,"String_Node_Str");
  initDataLoader(LOADER_ID);
}

Fixed version (ground truth):
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  Log.d(TAG,"String_Node_Str");
  baseActivity.showSnackbar(R.string.dialog_loading_dialogs,Snackbar.LENGTH_INDEFINITE);
  initDataLoader(LOADER_ID);
}
Program: 113951
Project: 113951
Buggy source:
public static QBChatDialog parseDialogFromQBMessage(Context context,QBChatMessage qbChatMessage,String lastMessage,QBDialogType qbDialogType){
  QBChatDialog qbDialog=parseDialogFromQBMessage(context,qbChatMessage,qbDialogType);
  if (!qbChatMessage.getAttachments().isEmpty()) {
    qbDialog.setLastMessage(context.getString(R.string.dlg_attached_last_message));
  }
 else   if (!TextUtils.isEmpty(lastMessage)) {
    qbDialog.setLastMessage(lastMessage);
  }
  return qbDialog;
}

Fixed version (ground truth):
public static QBChatDialog parseDialogFromQBMessage(Context context,QBChatMessage qbChatMessage,String lastMessage,QBDialogType qbDialogType){
  QBChatDialog qbDialog=parseDialogFromQBMessage(context,qbChatMessage,qbDialogType);
  if (!CollectionUtils.isEmpty(qbChatMessage.getAttachments())) {
    qbDialog.setLastMessage(context.getString(R.string.dlg_attached_last_message));
  }
 else   if (!TextUtils.isEmpty(lastMessage)) {
    qbDialog.setLastMessage(lastMessage);
  }
  return qbDialog;
}
Program: 113952
Project: 113952
Buggy source:
private void updateFriends(Collection<Integer> friendIdsList) throws QBResponseException {
  List<QMUser> qmUsers=QMUserService.getInstance().getUsersByIDsSync(friendIdsList,new QBPagedRequestBuilder());
  saveUsersAndFriends(qmUsers);
}

Fixed version (ground truth):
private void updateFriends(Collection<Integer> friendIdsList) throws QBResponseException {
  QBPagedRequestBuilder requestBuilder=new QBPagedRequestBuilder();
  requestBuilder.setPage(ConstsCore.USERS_PAGE_NUM);
  requestBuilder.setPerPage(ConstsCore.USERS_PER_PAGE);
  List<QMUser> qmUsers=QMUserService.getInstance().getUsersByIDsSync(friendIdsList,requestBuilder);
  saveUsersAndFriends(qmUsers);
}
Program: 113953
Project: 113953
Buggy source:
@Override public boolean onKey(DialogInterface dialog,int keyCode,KeyEvent event){
  if ((keyCode == android.view.KeyEvent.KEYCODE_BACK)) {
    getFragmentManager().popBackStack();
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onKey(DialogInterface dialog,int keyCode,KeyEvent event){
  if ((keyCode == android.view.KeyEvent.KEYCODE_BACK)) {
    if (getFragmentManager() != null) {
      getFragmentManager().popBackStack();
    }
  }
  return false;
}
Program: 113955
Project: 113955
Buggy source:
public static String getFullNameById(DataManager dataManager,int userId){
  QMUser user=null;
  try {
    user=QMUserService.getInstance().getUserSync(userId,false);
  }
 catch (  QBResponseException e) {
    user=null;
  }
  return user != null ? user.getFullName() : "String_Node_Str";
}

Fixed version (ground truth):
public static String getFullNameById(DataManager dataManager,int userId){
  QMUser user=QMUserService.getInstance().getUserCache().get((long)userId);
  return user != null ? user.getFullName() : "String_Node_Str";
}
Program: 113956
Project: 113956
Buggy source:
private void setOnlineStatus(ViewHolder viewHolder,QMUser user){
  boolean online=qbFriendListHelper != null && qbFriendListHelper.isUserOnline(user.getId());
  if (online) {
    viewHolder.labelTextView.setText(OnlineStatusUtils.getOnlineStatus(online));
    viewHolder.labelTextView.setTextColor(resources.getColor(R.color.green));
  }
 else {
    viewHolder.labelTextView.setText(resources.getString(R.string.last_seen,DateUtils.toTodayYesterdayShortDateWithoutYear2(user.getLastRequestAt().getTime()),DateUtils.formatDateSimpleTime(user.getLastRequestAt().getTime())));
    viewHolder.labelTextView.setTextColor(resources.getColor(R.color.dark_gray));
  }
}

Fixed version (ground truth):
private void setOnlineStatus(ViewHolder viewHolder,QMUser user){
  boolean online=qbFriendListHelper != null && user.getId() != null && qbFriendListHelper.isUserOnline(user.getId());
  if (online) {
    viewHolder.labelTextView.setText(OnlineStatusUtils.getOnlineStatus(online));
    viewHolder.labelTextView.setTextColor(resources.getColor(R.color.green));
  }
 else {
    viewHolder.labelTextView.setText(resources.getString(R.string.last_seen,DateUtils.toTodayYesterdayShortDateWithoutYear2(user.getLastRequestAt().getTime()),DateUtils.formatDateSimpleTime(user.getLastRequestAt().getTime())));
    viewHolder.labelTextView.setTextColor(resources.getColor(R.color.dark_gray));
  }
}
Program: 113957
Project: 113957
Buggy source:
public static String getFullNameById(DataManager dataManager,int userId){
  QMUser user=null;
  try {
    user=QMUserService.getInstance().getUserSync(userId,true);
  }
 catch (  QBResponseException e) {
    user=null;
  }
  return user != null ? user.getFullName() : "String_Node_Str";
}

Fixed version (ground truth):
public static String getFullNameById(DataManager dataManager,int userId){
  QMUser user=null;
  try {
    user=QMUserService.getInstance().getUserSync(userId,false);
  }
 catch (  QBResponseException e) {
    user=null;
  }
  return user != null ? user.getFullName() : "String_Node_Str";
}
Program: 113958
Project: 113958
Buggy source:
@Override public Observable<QBUser> call(final QBUser user){
  UserCustomData userCustomData=Utils.customDataToObject(user.getCustomData());
  CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
  getTDUserWithFullName(user);
  return updateUserObservable(user);
}

Fixed version (ground truth):
@Override public Observable<QBUser> call(final QBUser user){
  if (TextUtils.isEmpty(user.getFullName())) {
    CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
    getTDUserWithFullName(user);
  }
  return updateUserObservable(user);
}
Program: 113959
Project: 113959
Buggy source:
@Override public void success(DigitsSession session,String phoneNumber){
  Log.d(TAG,"String_Node_Str" + phoneNumber);
  showProgress();
  TwitterAuthConfig authConfig=TwitterCore.getInstance().getAuthConfig();
  TwitterAuthToken authToken=session.getAuthToken();
  DigitsOAuthSigning authSigning=new DigitsOAuthSigning(authConfig,authToken);
  Map<String,String> authHeaders=authSigning.getOAuthEchoHeadersForVerifyCredentials();
  authService.login(QBProvider.TWITTER_DIGITS,authHeaders.get(TwitterDigitsHelper.PROVIDER),authHeaders.get(TwitterDigitsHelper.CREDENTIALS)).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      UserCustomData userCustomData=Utils.customDataToObject(user.getCustomData());
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getTDUserWithFullName(user);
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
      parseExceptionMessage(e);
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}

Fixed version (ground truth):
@Override public void success(DigitsSession session,String phoneNumber){
  Log.d(TAG,"String_Node_Str" + phoneNumber);
  showProgress();
  TwitterAuthConfig authConfig=TwitterCore.getInstance().getAuthConfig();
  TwitterAuthToken authToken=session.getAuthToken();
  DigitsOAuthSigning authSigning=new DigitsOAuthSigning(authConfig,authToken);
  Map<String,String> authHeaders=authSigning.getOAuthEchoHeadersForVerifyCredentials();
  authService.login(QBProvider.TWITTER_DIGITS,authHeaders.get(TwitterDigitsHelper.PROVIDER),authHeaders.get(TwitterDigitsHelper.CREDENTIALS)).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      if (TextUtils.isEmpty(user.getFullName())) {
        CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
        getTDUserWithFullName(user);
      }
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
      parseExceptionMessage(e);
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}
Program: 113960
Project: 113960
Buggy source:
@Override public void onSuccess(LoginResult loginResult){
  Log.d(TAG,"String_Node_Str");
  showProgress();
  authService.login(QBProvider.FACEBOOK,loginResult.getAccessToken().getToken(),null).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getFBUserWithAvatar(user);
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
      parseExceptionMessage(e);
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onSuccess(LoginResult loginResult){
  Log.d(TAG,"String_Node_Str");
  showProgress();
  authService.login(QBProvider.FACEBOOK,loginResult.getAccessToken().getToken(),null).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      UserCustomData userCustomData=Utils.customDataToObject(user.getCustomData());
      if (TextUtils.isEmpty(userCustomData.getAvatarUrl())) {
        CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
        getFBUserWithAvatar(user);
      }
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
      parseExceptionMessage(e);
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}
Program: 113961
Project: 113961
Buggy source:
@Override public void onError(Throwable e){
  Log.d(TAG,"String_Node_Str" + e.getMessage());
}

Fixed version (ground truth):
@Override public void onError(Throwable e){
  Log.d(TAG,"String_Node_Str" + e.getMessage());
  authActivity.hideProgress();
  parseExceptionMessage(e.getMessage());
}
Program: 113962
Project: 113962
Buggy source:
public void login(QBUser user){
  final String userPassword=user.getPassword();
  authService.login(user).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).map(new Func1<QBUser,QMUser>(){
    @Override public QMUser call(    QBUser qbUser){
      QMUser result=QMUser.convert(qbUser);
      userCache.createOrUpdate(result);
      return result;
    }
  }
).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      String password=userPassword;
      if (!hasUserCustomData(qbUser)) {
        qbUser.setOldPassword(password);
        try {
          updateUser(qbUser);
        }
 catch (        QBResponseException e) {
          e.printStackTrace();
        }
      }
      String token=QBSessionManager.getInstance().getToken();
      qbUser.setPassword(password);
      saveOwnerUser(qbUser);
      AppSession.startSession(qbUser);
      authActivity.startMainActivity(qbUser);
      GoogleAnalyticsHelper.pushAnalyticsData(authActivity,qbUser,"String_Node_Str");
      FlurryAnalyticsHelper.pushAnalyticsData(authActivity);
    }
  }
);
}

Fixed version (ground truth):
public void login(QBUser user){
  final String userPassword=user.getPassword();
  authService.login(user).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).map(new Func1<QBUser,QMUser>(){
    @Override public QMUser call(    QBUser qbUser){
      QMUser result=QMUser.convert(qbUser);
      userCache.createOrUpdate(result);
      return result;
    }
  }
).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
      authActivity.hideProgress();
      parseExceptionMessage(e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      String password=userPassword;
      if (!hasUserCustomData(qbUser)) {
        qbUser.setOldPassword(password);
        try {
          updateUser(qbUser);
        }
 catch (        QBResponseException e) {
          e.printStackTrace();
        }
      }
      String token=QBSessionManager.getInstance().getToken();
      qbUser.setPassword(password);
      saveOwnerUser(qbUser);
      AppSession.startSession(qbUser);
      authActivity.startMainActivity(qbUser);
      GoogleAnalyticsHelper.pushAnalyticsData(authActivity,qbUser,"String_Node_Str");
      FlurryAnalyticsHelper.pushAnalyticsData(authActivity);
    }
  }
);
}
Program: 113963
Project: 113963
Buggy source:
public List<QMUser> getUsersForGroupChat(String dialogId,List<Integer> idsList){
  List<QMUser> usersList=Collections.emptyList();
  List<QMUser> qmUsers=QMUserService.getInstance().getUserCache().getUsersByIDs(idsList);
  List<DialogOccupant> dialogOccupants=dataManager.getDialogOccupantDataManager().getActualDialogOccupantsByDialog(dialogId);
  Set<Integer> dialogOccupantIdsSet=new HashSet<>();
  for (  DialogOccupant dialogOccupant : dialogOccupants) {
    dialogOccupantIdsSet.add(dialogOccupant.getUser().getId());
  }
  for (  QMUser qmUser : qmUsers) {
    if (dialogOccupantIdsSet.contains(qmUser.getId())) {
      usersList.add(qmUser);
    }
  }
  return usersList;
}

Fixed version (ground truth):
public List<QMUser> getUsersForGroupChat(String dialogId,List<Integer> idsList){
  List<QMUser> usersList=new ArrayList<>();
  List<QMUser> qmUsers=QMUserService.getInstance().getUserCache().getUsersByIDs(idsList);
  List<DialogOccupant> dialogOccupants=dataManager.getDialogOccupantDataManager().getActualDialogOccupantsByDialog(dialogId);
  Set<Integer> dialogOccupantIdsSet=new HashSet<>();
  for (  DialogOccupant dialogOccupant : dialogOccupants) {
    dialogOccupantIdsSet.add(dialogOccupant.getUser().getId());
  }
  for (  QMUser qmUser : qmUsers) {
    if (dialogOccupantIdsSet.contains(qmUser.getId())) {
      usersList.add(qmUser);
    }
  }
  return usersList;
}
Program: 113964
Project: 113964
Buggy source:
private void updateDialog(){
  QBChatDialog qbDialog=ChatUtils.createQBDialogFromLocalDialog(dataManager,dataManager.getDialogDataManager().getByDialogId(dialogId));
  occupantsList=getUsersForGroupChat(qbDialog.getDialogId(),qbDialog.getOccupants());
  qbDialog.setOccupantsIds(ChatUtils.createOccupantsIdsFromUsersList(occupantsList));
  groupDialogOccupantsAdapter.setNewData(occupantsList);
}

Fixed version (ground truth):
private void updateDialog(){
  qbDialog=ChatUtils.createQBDialogFromLocalDialog(dataManager,dataManager.getDialogDataManager().getByDialogId(dialogId));
  occupantsList=getUsersForGroupChat(qbDialog.getDialogId(),qbDialog.getOccupants());
  qbDialog.setOccupantsIds(ChatUtils.createOccupantsIdsFromUsersList(occupantsList));
  groupDialogOccupantsAdapter.setNewData(occupantsList);
}
Program: 113965
Project: 113965
Buggy source:
@Override public void execute(Bundle bundle){
  Exception exception=(Exception)bundle.getSerializable(QBServiceConsts.EXTRA_ERROR);
  if (exception != null) {
    emailEditText.setError(exception.getMessage());
  }
  hideProgress();
}

Fixed version (ground truth):
@Override public void execute(Bundle bundle){
  QBResponseException exception=(QBResponseException)bundle.getSerializable(QBServiceConsts.EXTRA_ERROR);
  if (exception != null) {
    String errorMesasge=exception.getHttpStatusCode() == HttpStatus.SC_NOT_FOUND ? getString(R.string.forgot_password_email_not_found_error) : exception.getMessage();
    emailEditText.setError(errorMesasge);
  }
  hideProgress();
}
Program: 113966
Project: 113966
Buggy source:
private void startFriendProfile(QMUser selectedFriend){
  QBUser currentUser=AppSession.getSession().getUser();
  if (currentUser.getId() == selectedFriend.getId()) {
    MyProfileActivity.start(GroupDialogDetailsActivity.this);
  }
 else {
    UserProfileActivity.start(GroupDialogDetailsActivity.this,selectedFriend.getId());
  }
}

Fixed version (ground truth):
private void startFriendProfile(QMUser selectedFriend){
  QBUser currentUser=AppSession.getSession().getUser();
  if (currentUser.getId().intValue() == selectedFriend.getId().intValue()) {
    MyProfileActivity.start(GroupDialogDetailsActivity.this);
  }
 else {
    UserProfileActivity.start(GroupDialogDetailsActivity.this,selectedFriend.getId());
  }
}
Program: 113967
Project: 113967
Buggy source:
private boolean isMe(QMUser inputUser){
  QBUser currentUser=AppSession.getSession().getUser();
  return currentUser.getId() == inputUser.getId();
}

Fixed version (ground truth):
private boolean isMe(QMUser inputUser){
  QBUser currentUser=AppSession.getSession().getUser();
  return currentUser.getId().intValue() == inputUser.getId().intValue();
}
Program: 113968
Project: 113968
Buggy source:
private boolean isMe(QMUser inputUser){
  QBUser currentUser=AppSession.getSession().getUser();
  return currentUser.getId() == inputUser.getId();
}

Fixed version (ground truth):
private boolean isMe(QMUser inputUser){
  QBUser currentUser=AppSession.getSession().getUser();
  return currentUser.getId().intValue() == inputUser.getId().intValue();
}
Program: 113969
Project: 113969
Buggy source:
public boolean isIncoming(int currentUserId){
  return dialogOccupant != null && dialogOccupant.getUser() != null && currentUserId != dialogOccupant.getUser().getId();
}

Fixed version (ground truth):
public boolean isIncoming(int currentUserId){
  return dialogOccupant != null && dialogOccupant.getUser() != null && currentUserId != dialogOccupant.getUser().getId().intValue();
}
Program: 113970
Project: 113970
Buggy source:
private void findUserInDialog(QBChatDialog dialog){
  List<Integer> occupantsList=dialog.getOccupants();
  for (  int occupantId : occupantsList) {
    boolean isUserInBase=QMUserService.getInstance().getUserCache().exists((long)occupantId);
    if (!isUserInBase && currentUser.getId() != occupantId) {
      loadIdsSet.add(occupantId);
    }
  }
}

Fixed version (ground truth):
private void findUserInDialog(QBChatDialog dialog){
  List<Integer> occupantsList=dialog.getOccupants();
  for (  int occupantId : occupantsList) {
    boolean isUserInBase=QMUserService.getInstance().getUserCache().exists((long)occupantId);
    if (!isUserInBase && currentUser.getId().intValue() != occupantId) {
      loadIdsSet.add(occupantId);
    }
  }
}
Program: 113971
Project: 113971
Buggy source:
protected List<CombinationMessage> buildCombinationMessagesListByDate(long createDate,boolean moreDate){
  if (dialog == null) {
    Log.d("String_Node_Str","String_Node_Str" + dialog);
    return null;
  }
  List<Message> messagesList=dataManager.getMessageDataManager().getMessagesByDialogIdAndDate(dialog.getDialogId(),createDate,moreDate);
  List<DialogNotification> dialogNotificationsList=dataManager.getDialogNotificationDataManager().getDialogNotificationsByDialogIdAndDate(dialog.getDialogId(),createDate,moreDate);
  return ChatUtils.createCombinationMessagesList(messagesList,dialogNotificationsList);
}

Fixed version (ground truth):
protected List<CombinationMessage> buildCombinationMessagesListByDate(long createDate,boolean moreDate){
  if (dialog == null) {
    Log.d("String_Node_Str","String_Node_Str" + dialog);
    return new ArrayList<>();
  }
  List<Message> messagesList=dataManager.getMessageDataManager().getMessagesByDialogIdAndDate(dialog.getDialogId(),createDate,moreDate);
  List<DialogNotification> dialogNotificationsList=dataManager.getDialogNotificationDataManager().getDialogNotificationsByDialogIdAndDate(dialog.getDialogId(),createDate,moreDate);
  return ChatUtils.createCombinationMessagesList(messagesList,dialogNotificationsList);
}
Program: 113972
Project: 113972
Buggy source:
private void processCombinationMessages(){
  QBUser currentUser=AppSession.getSession().getUser();
  for (  CombinationMessage cm : combinationMessagesList) {
    boolean ownMessage=!cm.isIncoming(currentUser.getId());
    if (!State.READ.equals(cm.getState()) && !ownMessage && isNetworkAvailable()) {
      cm.setState(State.READ);
      QBUpdateStatusMessageCommand.start(this,ChatUtils.createQBDialogFromLocalDialog(dataManager,dialog),cm,false);
    }
 else     if (ownMessage) {
      cm.setState(State.READ);
      dataManager.getMessageDataManager().update(cm.toMessage(),false);
    }
  }
}

Fixed version (ground truth):
private void processCombinationMessages(){
  if (combinationMessagesList == null) {
    return;
  }
  QBUser currentUser=AppSession.getSession().getUser();
  for (  CombinationMessage cm : combinationMessagesList) {
    boolean ownMessage=!cm.isIncoming(currentUser.getId());
    if (!State.READ.equals(cm.getState()) && !ownMessage && isNetworkAvailable()) {
      cm.setState(State.READ);
      QBUpdateStatusMessageCommand.start(this,ChatUtils.createQBDialogFromLocalDialog(dataManager,dialog),cm,false);
    }
 else     if (ownMessage) {
      cm.setState(State.READ);
      dataManager.getMessageDataManager().update(cm.toMessage(),false);
    }
  }
}
Program: 113973
Project: 113973
Buggy source:
private UserCustomData getUserCustomData(QBUser user){
  if (TextUtils.isEmpty(user.getCustomData())) {
    return new UserCustomData();
  }
  UserCustomData userCustomData=Utils.customDataToObject(user.getCustomData());
  if (userCustomData != null) {
    return userCustomData;
  }
 else {
    return new UserCustomData();
  }
}

Fixed version (ground truth):
private UserCustomData getUserCustomData(String avatarUrl){
  String isImport="String_Node_Str";
  return new UserCustomData(avatarUrl,ConstsCore.EMPTY_STRING,isImport);
}
Program: 113974
Project: 113974
Buggy source:
@Override public void onNext(QBUser qbUser){
  QBUpdateUserCommand.start(BaseAuthActivity.this,qbUser,null);
  performLoginSuccessAction(qbUser);
}

Fixed version (ground truth):
@Override public void onNext(QBUser qbUser){
  UserCustomData userCustomData=Utils.customDataToObject(qbUser.getCustomData());
  CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
  getTDUserWithFullName(qbUser);
  QBUpdateUserCommand.start(BaseAuthActivity.this,qbUser,null);
  performLoginSuccessAction(qbUser);
}
Program: 113975
Project: 113975
Buggy source:
@Override public void success(DigitsSession session,String phoneNumber){
  Log.d(TAG,"String_Node_Str" + phoneNumber);
  showProgress();
  TwitterAuthConfig authConfig=TwitterCore.getInstance().getAuthConfig();
  TwitterAuthToken authToken=session.getAuthToken();
  DigitsOAuthSigning authSigning=new DigitsOAuthSigning(authConfig,authToken);
  Map<String,String> authHeaders=authSigning.getOAuthEchoHeadersForVerifyCredentials();
  authService.login(QBProvider.TWITTER_DIGITS,authHeaders.get(TwitterDigitsHelper.PROVIDER),authHeaders.get(TwitterDigitsHelper.CREDENTIALS)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      QBUpdateUserCommand.start(BaseAuthActivity.this,qbUser,null);
      performLoginSuccessAction(qbUser);
    }
  }
);
}

Fixed version (ground truth):
@Override public void success(DigitsSession session,String phoneNumber){
  Log.d(TAG,"String_Node_Str" + phoneNumber);
  showProgress();
  TwitterAuthConfig authConfig=TwitterCore.getInstance().getAuthConfig();
  TwitterAuthToken authToken=session.getAuthToken();
  DigitsOAuthSigning authSigning=new DigitsOAuthSigning(authConfig,authToken);
  Map<String,String> authHeaders=authSigning.getOAuthEchoHeadersForVerifyCredentials();
  authService.login(QBProvider.TWITTER_DIGITS,authHeaders.get(TwitterDigitsHelper.PROVIDER),authHeaders.get(TwitterDigitsHelper.CREDENTIALS)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      UserCustomData userCustomData=Utils.customDataToObject(qbUser.getCustomData());
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getTDUserWithFullName(qbUser);
      QBUpdateUserCommand.start(BaseAuthActivity.this,qbUser,null);
      performLoginSuccessAction(qbUser);
    }
  }
);
}
Program: 113976
Project: 113976
Buggy source:
@Override public void onSuccess(LoginResult loginResult){
  Log.d(TAG,"String_Node_Str");
  showProgress();
  authService.login(QBProvider.FACEBOOK,loginResult.getAccessToken().getToken(),null).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      QBUpdateUserCommand.start(BaseAuthActivity.this,qbUser,null);
      performLoginSuccessAction(qbUser);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onSuccess(LoginResult loginResult){
  Log.d(TAG,"String_Node_Str");
  showProgress();
  authService.login(QBProvider.FACEBOOK,loginResult.getAccessToken().getToken(),null).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getFBUserWithAvatar(qbUser);
      QBUpdateUserCommand.start(BaseAuthActivity.this,qbUser,null);
      performLoginSuccessAction(qbUser);
    }
  }
);
}
Program: 113977
Project: 113977
Buggy source:
@Override public Observable<Void> call(Void qbVoid){
  authorized=true;
  notifyLogout(QMAuthService.this);
  return observable;
}

Fixed version (ground truth):
@Override public Observable<Void> call(Void qbVoid){
  authorized=false;
  notifyLogout(QMAuthService.this);
  return observable;
}
Program: 113978
Project: 113978
Buggy source:
private void saveChanges(){
  if (new ValidationUtils(this).isFullNameValid(fullNameTextInputLayout,oldFullName,currentFullName)) {
    showProgress();
    if (isNeedUpdateImage && imageUri != null) {
      QBUser newUser=createUserForUpdating();
      QBUpdateUserCommand.start(this,newUser,ImageUtils.getCreatedFileFromUri(imageUri));
    }
 else {
      QBUser newUser=createUserForUpdating();
      QBUpdateUserCommand.start(this,newUser,null);
    }
  }
}

Fixed version (ground truth):
private void saveChanges(){
  if (new ValidationUtils(this).isFullNameValid(fullNameTextInputLayout,oldFullName.trim(),currentFullName.trim())) {
    showProgress();
    if (isNeedUpdateImage && imageUri != null) {
      QBUser newUser=createUserForUpdating();
      QBUpdateUserCommand.start(this,newUser,ImageUtils.getCreatedFileFromUri(imageUri));
    }
 else {
      QBUser newUser=createUserForUpdating();
      QBUpdateUserCommand.start(this,newUser,null);
    }
  }
}
Program: 113979
Project: 113979
Buggy source:
protected void parseExceptionMessage(Exception exception){
  hideProgress();
  String errorMessage=exception.getMessage();
  if (errorMessage != null) {
    if (errorMessage.equals(getString(R.string.error_bad_timestamp))) {
      errorMessage=getString(R.string.error_bad_timestamp_from_app);
    }
 else     if (errorMessage.equals(getString(R.string.error_login_or_email_required))) {
      errorMessage=getString(R.string.error_login_or_email_required_from_app);
    }
 else     if (errorMessage.equals(getString(R.string.error_email_already_taken)) && loginType.equals(LoginType.FACEBOOK)) {
      errorMessage=getString(R.string.error_email_already_taken_from_app);
    }
 else     if (errorMessage.equals(getString(R.string.error_unauthorized))) {
      errorMessage=getString(R.string.error_unauthorized_from_app);
    }
    ErrorUtils.showError(this,errorMessage);
  }
}

Fixed version (ground truth):
protected void parseExceptionMessage(Throwable exception){
  hideProgress();
  String errorMessage=exception.getMessage();
  if (errorMessage != null) {
    if (errorMessage.equals(getString(R.string.error_bad_timestamp))) {
      errorMessage=getString(R.string.error_bad_timestamp_from_app);
    }
 else     if (errorMessage.equals(getString(R.string.error_login_or_email_required))) {
      errorMessage=getString(R.string.error_login_or_email_required_from_app);
    }
 else     if (errorMessage.equals(getString(R.string.error_email_already_taken)) && loginType.equals(LoginType.FACEBOOK)) {
      errorMessage=getString(R.string.error_email_already_taken_from_app);
    }
 else     if (errorMessage.equals(getString(R.string.error_unauthorized))) {
      errorMessage=getString(R.string.error_unauthorized_from_app);
    }
    ErrorUtils.showError(this,errorMessage);
  }
}
Program: 113980
Project: 113980
Buggy source:
@Override public void onError(Throwable e){
  Log.d(TAG,"String_Node_Str" + e.getMessage());
}

Fixed version (ground truth):
@Override public void onError(Throwable e){
  Log.d(TAG,"String_Node_Str" + e.getMessage());
  parseExceptionMessage(e);
}
Program: 113981
Project: 113981
Buggy source:
@Override public void success(DigitsSession session,String phoneNumber){
  Log.d(TAG,"String_Node_Str" + phoneNumber);
  showProgress();
  TwitterAuthConfig authConfig=TwitterCore.getInstance().getAuthConfig();
  TwitterAuthToken authToken=session.getAuthToken();
  DigitsOAuthSigning authSigning=new DigitsOAuthSigning(authConfig,authToken);
  Map<String,String> authHeaders=authSigning.getOAuthEchoHeadersForVerifyCredentials();
  authService.login(QBProvider.TWITTER_DIGITS,authHeaders.get(TwitterDigitsHelper.PROVIDER),authHeaders.get(TwitterDigitsHelper.CREDENTIALS)).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      UserCustomData userCustomData=Utils.customDataToObject(user.getCustomData());
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getTDUserWithFullName(user);
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}

Fixed version (ground truth):
@Override public void success(DigitsSession session,String phoneNumber){
  Log.d(TAG,"String_Node_Str" + phoneNumber);
  showProgress();
  TwitterAuthConfig authConfig=TwitterCore.getInstance().getAuthConfig();
  TwitterAuthToken authToken=session.getAuthToken();
  DigitsOAuthSigning authSigning=new DigitsOAuthSigning(authConfig,authToken);
  Map<String,String> authHeaders=authSigning.getOAuthEchoHeadersForVerifyCredentials();
  authService.login(QBProvider.TWITTER_DIGITS,authHeaders.get(TwitterDigitsHelper.PROVIDER),authHeaders.get(TwitterDigitsHelper.CREDENTIALS)).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      UserCustomData userCustomData=Utils.customDataToObject(user.getCustomData());
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getTDUserWithFullName(user);
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
      parseExceptionMessage(e);
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}
Program: 113982
Project: 113982
Buggy source:
@Override public void onSuccess(LoginResult loginResult){
  Log.d(TAG,"String_Node_Str");
  showProgress();
  authService.login(QBProvider.FACEBOOK,loginResult.getAccessToken().getToken(),null).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getFBUserWithAvatar(user);
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onSuccess(LoginResult loginResult){
  Log.d(TAG,"String_Node_Str");
  showProgress();
  authService.login(QBProvider.FACEBOOK,loginResult.getAccessToken().getToken(),null).flatMap(new Func1<QBUser,Observable<QBUser>>(){
    @Override public Observable<QBUser> call(    final QBUser user){
      CoreSharedHelper.getInstance().saveUsersImportInitialized(false);
      getFBUserWithAvatar(user);
      return updateUserObservable(user);
    }
  }
).subscribeOn(Schedulers.io()).subscribe(new Observer<QBUser>(){
    @Override public void onCompleted(){
    }
    @Override public void onError(    Throwable e){
      Log.d(TAG,"String_Node_Str" + e.getMessage());
      parseExceptionMessage(e);
    }
    @Override public void onNext(    QBUser qbUser){
      performLoginSuccessAction(qbUser);
    }
  }
);
}
Program: 113983
Project: 113983
Buggy source:
@Override public void onResult(Boolean aBoolean){
  if (isLoadedOldMessages) {
    messagesAdapter.addAllInBegin(sortedLoadedCombinationMessagesList);
  }
 else {
    messagesAdapter.addList(combinationMessagesList);
    scrollMessagesToBottom();
  }
  messageSwipeRefreshLayout.setRefreshing(false);
  hideActionBarProgress();
  isLoadingMessages=false;
}

Fixed version (ground truth):
@Override public void onResult(Boolean aBoolean){
  if (isLoadedOldMessages) {
    messagesAdapter.setList(combinationMessagesList,false);
    messagesAdapter.notifyItemRangeInserted(0,totalEntries);
  }
 else {
    messagesAdapter.setList(combinationMessagesList,true);
    scrollMessagesToBottom();
  }
  messageSwipeRefreshLayout.setRefreshing(false);
  hideActionBarProgress();
  isLoadingMessages=false;
}
Program: 113984
Project: 113984
Buggy source:
@Override public Boolean performInBackground(Void... params) throws Exception {
  boolean isFirstLoadingMessages=lastMessageDate == ConstsCore.ZERO_INT_VALUE;
  if (isFirstLoadingMessages) {
    combinationMessagesList=createCombinationMessagesList();
  }
 else   if (isLoadedOldMessages) {
    combinationMessagesList.addAll(0,sortedLoadedCombinationMessagesList);
  }
 else {
    combinationMessagesList.addAll(sortedLoadedCombinationMessagesList);
  }
  additionalActionsAfterLoadMessages();
  return isFirstLoadingMessages;
}

Fixed version (ground truth):
@Override public Boolean performInBackground(Void... params) throws Exception {
  combinationMessagesList=createCombinationMessagesList();
  additionalActionsAfterLoadMessages();
  return true;
}
Program: 113986
Project: 113986
Buggy source:
@Override protected void updateMessagesList(){
  initActualExtras();
  checkForCorrectChat();
  int oldMessagesCount=messagesAdapter.getAllItems().size();
  this.combinationMessagesList=createCombinationMessagesList();
  Log.d(TAG,"String_Node_Str" + combinationMessagesList);
  messagesAdapter.setList(combinationMessagesList);
  findLastFriendsRequest();
  checkForScrolling(oldMessagesCount);
}

Fixed version (ground truth):
@Override protected void updateMessagesList(){
  initActualExtras();
  checkForCorrectChat();
  final int oldMessagesCount=messagesAdapter.getAllItems().size();
  (new BaseAsyncTask<Void,Void,Boolean>(){
    @Override public Boolean performInBackground(    Void... params) throws Exception {
      combinationMessagesList=createCombinationMessagesList();
      return true;
    }
    @Override public void onResult(    Boolean aBoolean){
      messagesAdapter.setList(combinationMessagesList);
      findLastFriendsRequest();
      checkForScrolling(oldMessagesCount);
    }
    @Override public void onException(    Exception e){
      ErrorUtils.showError(PrivateDialogActivity.this,e);
    }
  }
).execute();
}