Program: 142170
Project: 142170
Buggy source:
/** 
 * Update progress bar's max and value, and the various buttons and navigation cues associated with navigation
 * @param view ODKView to update
 */
public void updateNavigationCues(View view){
  updateFloatingLabels(view);
  PreferencesActivity.ProgressBarMode mode=PreferencesActivity.getProgressBarMode(activity);
  if (mode == PreferencesActivity.ProgressBarMode.None) {
    return;
  }
  FormNavigationController.NavigationDetails details;
  try {
    details=FormNavigationController.calculateNavigationStatus(mFormController,mCurrentView);
  }
 catch (  XPathTypeMismatchException e) {
    Logger.exception(e);
    CommCareActivity.createErrorDialog(activity,e.getMessage(),true);
    return;
  }
  if (mode == PreferencesActivity.ProgressBarMode.ProgressOnly && view instanceof ODKView) {
    ((ODKView)view).updateProgressBar(details.completedQuestions,details.totalQuestions);
    return;
  }
  ProgressBar progressBar=(ProgressBar)activity.findViewById(R.id.nav_prog_bar);
  ImageButton nextButton=(ImageButton)activity.findViewById(R.id.nav_btn_next);
  ImageButton prevButton=(ImageButton)activity.findViewById(R.id.nav_btn_prev);
  if (!details.relevantBeforeCurrentScreen) {
    prevButton.setImageResource(R.drawable.icon_close_darkwarm);
    prevButton.setTag("String_Node_Str");
  }
 else {
    prevButton.setImageResource(R.drawable.icon_chevron_left_brand);
    prevButton.setTag("String_Node_Str");
  }
  Rect bounds=progressBar.getProgressDrawable().getBounds();
  Log.i("String_Node_Str","String_Node_Str" + details.totalQuestions + "String_Node_Str"+ details.completedQuestions);
  progressBar.setMax(details.totalQuestions);
  if (details.relevantAfterCurrentScreen == 0 && (details.requiredOnScreen == details.answeredOnScreen || details.requiredOnScreen < 1)) {
    nextButton.setImageResource(R.drawable.icon_chevron_right_attnpos);
    nextButton.setTag("String_Node_Str");
    progressBar.setProgressDrawable(activity.getResources().getDrawable(R.drawable.progressbar_full));
    Log.i("String_Node_Str","String_Node_Str");
    progressBar.setProgress(details.totalQuestions);
  }
 else {
    nextButton.setImageResource(R.drawable.icon_chevron_right_brand);
    nextButton.setTag("String_Node_Str");
    progressBar.setProgressDrawable(activity.getResources().getDrawable(R.drawable.progressbar_modern));
    progressBar.setProgress(details.completedQuestions);
  }
  progressBar.getProgressDrawable().setBounds(bounds);
}

Fixed version (ground truth):
/** 
 * Update progress bar's max and value, and the various buttons and navigation cues associated with navigation
 * @param view ODKView to update
 */
public void updateNavigationCues(View view){
  updateFloatingLabels(view);
  PreferencesActivity.ProgressBarMode mode=PreferencesActivity.getProgressBarMode(activity);
  if (mode == PreferencesActivity.ProgressBarMode.None) {
    return;
  }
  FormNavigationController.NavigationDetails details;
  try {
    details=FormNavigationController.calculateNavigationStatus(mFormController,mCurrentView);
  }
 catch (  XPathTypeMismatchException e) {
    Logger.exception(e);
    CommCareActivity.createErrorDialog(activity,e.getMessage(),true);
    return;
  }
  if (mode == PreferencesActivity.ProgressBarMode.ProgressOnly && view instanceof ODKView) {
    ((ODKView)view).updateProgressBar(details.completedQuestions,details.totalQuestions);
    return;
  }
  ProgressBar progressBar=(ProgressBar)activity.findViewById(R.id.nav_prog_bar);
  ImageButton nextButton=(ImageButton)activity.findViewById(R.id.nav_btn_next);
  ImageButton prevButton=(ImageButton)activity.findViewById(R.id.nav_btn_prev);
  if (!details.relevantBeforeCurrentScreen) {
    prevButton.setImageResource(R.drawable.icon_close_darkwarm);
    prevButton.setTag("String_Node_Str");
  }
 else {
    prevButton.setImageResource(R.drawable.icon_chevron_left_brand);
    prevButton.setTag("String_Node_Str");
  }
  Rect bounds=progressBar.getProgressDrawable().getBounds();
  Log.i("String_Node_Str","String_Node_Str" + details.totalQuestions + "String_Node_Str"+ details.completedQuestions);
  progressBar.setMax(details.totalQuestions);
  if (details.relevantAfterCurrentScreen == 0 && (details.requiredOnScreen == details.answeredOnScreen || details.requiredOnScreen < 1)) {
    nextButton.setImageResource(R.drawable.icon_chevron_right_attnpos);
    nextButton.setTag("String_Node_Str");
    progressBar.setProgressDrawable(activity.getResources().getDrawable(R.drawable.progressbar_full));
    Log.i("String_Node_Str","String_Node_Str");
    progressBar.setProgress(details.totalQuestions);
  }
 else {
    nextButton.setImageResource(R.drawable.icon_chevron_right_brand);
    nextButton.setTag(FormEntryActivity.NAV_STATE_NEXT);
    progressBar.setProgressDrawable(activity.getResources().getDrawable(R.drawable.progressbar_modern));
    progressBar.setProgress(details.completedQuestions);
  }
  progressBar.getProgressDrawable().setBounds(bounds);
}