Program: 184419
Project: 184419
Buggy source:
private void updateRecordingTime(){
  if (!mMediaRecorderRecording) {
    return;
  }
  long now=SystemClock.uptimeMillis();
  long delta=now - mRecordingStartTime;
  boolean countdownRemainingTime=(mMaxVideoDurationInMs != 0 && delta >= mMaxVideoDurationInMs - 60000);
  long next_update_delay=1000 - (delta % 1000);
  long seconds;
  if (countdownRemainingTime) {
    delta=Math.max(0,mMaxVideoDurationInMs - delta);
    seconds=(delta + 999) / 1000;
  }
 else {
    seconds=delta / 1000;
  }
  long minutes=seconds / 60;
  long hours=minutes / 60;
  long remainderMinutes=minutes - (hours * 60);
  long remainderSeconds=seconds - (minutes * 60);
  String secondsString=Long.toString(remainderSeconds);
  if (secondsString.length() < 2) {
    secondsString="String_Node_Str" + secondsString;
  }
  String minutesString=Long.toString(remainderMinutes);
  if (minutesString.length() < 2) {
    minutesString="String_Node_Str" + minutesString;
  }
  String text=minutesString + "String_Node_Str" + secondsString;
  if (hours > 0) {
    String hoursString=Long.toString(hours);
    if (hoursString.length() < 2) {
      hoursString="String_Node_Str" + hoursString;
    }
    text=hoursString + "String_Node_Str" + text;
  }
  mRecordingTimeView.setText(text);
  if (mRecordingTimeCountsDown != countdownRemainingTime) {
    mRecordingTimeCountsDown=countdownRemainingTime;
    int color=getResources().getColor(countdownRemainingTime ? R.color.recording_time_remaining_text : R.color.recording_time_elapsed_text);
    mRecordingTimeView.setTextColor(color);
  }
  mVideoPreview.invalidate();
  if (delta > 0) {
    mHandler.sendEmptyMessageDelayed(UPDATE_RECORD_TIME,next_update_delay);
  }
}

Fixed version (ground truth):
private void updateRecordingTime(){
  if (!mMediaRecorderRecording) {
    return;
  }
  long now=SystemClock.uptimeMillis();
  long delta=now - mRecordingStartTime;
  boolean countdownRemainingTime=(mMaxVideoDurationInMs != 0 && delta >= mMaxVideoDurationInMs - 60000);
  long next_update_delay=1000 - (delta % 1000);
  long seconds;
  if (countdownRemainingTime) {
    delta=Math.max(0,mMaxVideoDurationInMs - delta);
    seconds=(delta + 999) / 1000;
  }
 else {
    seconds=delta / 1000;
  }
  long minutes=seconds / 60;
  long hours=minutes / 60;
  long remainderMinutes=minutes - (hours * 60);
  long remainderSeconds=seconds - (minutes * 60);
  String secondsString=Long.toString(remainderSeconds);
  if (secondsString.length() < 2) {
    secondsString="String_Node_Str" + secondsString;
  }
  String minutesString=Long.toString(remainderMinutes);
  if (minutesString.length() < 2) {
    minutesString="String_Node_Str" + minutesString;
  }
  String text=minutesString + "String_Node_Str" + secondsString;
  if (hours > 0) {
    String hoursString=Long.toString(hours);
    if (hoursString.length() < 2) {
      hoursString="String_Node_Str" + hoursString;
    }
    text=hoursString + "String_Node_Str" + text;
  }
  mRecordingTimeView.setText(text);
  if (mRecordingTimeCountsDown != countdownRemainingTime) {
    mRecordingTimeCountsDown=countdownRemainingTime;
    int color=getResources().getColor(countdownRemainingTime ? R.color.recording_time_remaining_text : R.color.recording_time_elapsed_text);
    mRecordingTimeView.setTextColor(color);
  }
  mVideoPreview.invalidate();
  mHandler.sendEmptyMessageDelayed(UPDATE_RECORD_TIME,next_update_delay);
}