Program: 198946
Project: 198946
Buggy source:
/** 
 * @param context Parent.
 * @param theme the theme to apply to this dialog
 * @param callBack How parent is notified.
 * @param hourOfDay The initial hour.
 * @param minute The initial minute.
 * @param is24HourView Whether this is a 24 hour view, or AM/PM.
 */
public TimePickerDialog(Context context,int theme,OnTimeSetListener callBack,int hourOfDay,int minute,boolean is24HourView){
  super(context,resolveDialogTheme(context,theme));
  mTimeSetCallback=callBack;
  mInitialHourOfDay=hourOfDay;
  mInitialMinute=minute;
  mIs24HourView=is24HourView;
  Context themeContext=getContext();
  final int targetSdkVersion=getContext().getApplicationInfo().targetSdkVersion;
  if (targetSdkVersion < L) {
    setIcon(0);
    setTitle(R.string.time_picker_dialog_title);
    setButton(BUTTON_POSITIVE,themeContext.getText(R.string.date_time_done),this);
  }
  LayoutInflater inflater=(LayoutInflater)themeContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  View view=inflater.inflate(R.layout.time_picker_dialog,null);
  setView(view);
  mTimePicker=(TimePicker)view.findViewById(R.id.timePicker);
  mTimePicker.setShowDoneButton(true);
  mTimePicker.setDismissCallback(new TimePicker.TimePickerDismissCallback(){
    @Override public void dismiss(    TimePicker view,    boolean isCancel,    int hourOfDay,    int minute){
      if (!isCancel) {
        mTimeSetCallback.onTimeSet(view,hourOfDay,minute);
      }
      TimePickerDialog.this.dismiss();
    }
  }
);
  mTimePicker.setIs24HourView(mIs24HourView);
  mTimePicker.setCurrentHour(mInitialHourOfDay);
  mTimePicker.setCurrentMinute(mInitialMinute);
  mTimePicker.setOnTimeChangedListener(this);
}

Fixed version (ground truth):
/** 
 * @param context Parent.
 * @param theme the theme to apply to this dialog
 * @param callBack How parent is notified.
 * @param hourOfDay The initial hour.
 * @param minute The initial minute.
 * @param is24HourView Whether this is a 24 hour view, or AM/PM.
 */
public TimePickerDialog(Context context,int theme,OnTimeSetListener callBack,int hourOfDay,int minute,boolean is24HourView){
  super(context,resolveDialogTheme(context,theme));
  mTimeSetCallback=callBack;
  mInitialHourOfDay=hourOfDay;
  mInitialMinute=minute;
  mIs24HourView=is24HourView;
  Context themeContext=getContext();
  final int targetSdkVersion=getContext().getApplicationInfo().targetSdkVersion;
  if (targetSdkVersion < L) {
    setIcon(0);
    setTitle(R.string.time_picker_dialog_title);
    setButton(BUTTON_POSITIVE,themeContext.getText(R.string.date_time_done),this);
  }
  LayoutInflater inflater=(LayoutInflater)themeContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  View view=inflater.inflate(R.layout.time_picker_dialog,null);
  setView(view);
  mTimePicker=(TimePicker)view.findViewById(R.id.timePicker);
  mTimePicker.setShowDoneButton(true);
  mTimePicker.setDismissCallback(new TimePicker.TimePickerDismissCallback(){
    @Override public void dismiss(    TimePicker view,    boolean isCancel,    int hourOfDay,    int minute){
      mIsCanceled=isCancel;
      if (!isCancel) {
        mTimeSetCallback.onTimeSet(view,hourOfDay,minute);
        TimePickerDialog.this.dismiss();
      }
 else {
        TimePickerDialog.this.cancel();
      }
    }
  }
);
  mTimePicker.setIs24HourView(mIs24HourView);
  mTimePicker.setCurrentHour(mInitialHourOfDay);
  mTimePicker.setCurrentMinute(mInitialMinute);
  mTimePicker.setOnTimeChangedListener(this);
}