Program: 113319
Project: 113319
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
  View view=inflater.inflate(R.layout.date_picker_dialog,null);
  mDayOfWeekView=(TextView)view.findViewById(R.id.date_picker_header);
  mMonthAndDayView=(LinearLayout)view.findViewById(R.id.date_picker_month_and_day);
  mMonthAndDayView.setOnClickListener(this);
  mSelectedMonthTextView=(TextView)view.findViewById(R.id.date_picker_month);
  mSelectedDayTextView=(TextView)view.findViewById(R.id.date_picker_day);
  mYearView=(TextView)view.findViewById(R.id.date_picker_year);
  mYearView.setOnClickListener(this);
  int listPosition=-1;
  int listPositionOffset=0;
  int currentView=MONTH_AND_DAY_VIEW;
  if (savedInstanceState != null) {
    mWeekStart=savedInstanceState.getInt(KEY_WEEK_START);
    mMinYear=savedInstanceState.getInt(KEY_YEAR_START);
    mMaxYear=savedInstanceState.getInt(KEY_YEAR_END);
    currentView=savedInstanceState.getInt(KEY_CURRENT_VIEW);
    listPosition=savedInstanceState.getInt(KEY_LIST_POSITION);
    listPositionOffset=savedInstanceState.getInt(KEY_LIST_POSITION_OFFSET);
  }
  final Activity activity=getActivity();
  mDayPickerView=new DayPickerView(activity,this);
  mYearPickerView=new YearPickerView(activity,this);
  Resources res=getResources();
  mDayPickerDescription=res.getString(R.string.day_picker_description);
  mSelectDay=res.getString(R.string.select_day);
  mYearPickerDescription=res.getString(R.string.year_picker_description);
  mSelectYear=res.getString(R.string.select_year);
  mAnimator=(AccessibleDateAnimator)view.findViewById(R.id.animator);
  mAnimator.addView(mDayPickerView);
  mAnimator.addView(mYearPickerView);
  mAnimator.setDateMillis(mCalendar.getTimeInMillis());
  Animation animation=new AlphaAnimation(0.0f,1.0f);
  animation.setDuration(ANIMATION_DURATION);
  mAnimator.setInAnimation(animation);
  Animation animation2=new AlphaAnimation(1.0f,0.0f);
  animation2.setDuration(ANIMATION_DURATION);
  mAnimator.setOutAnimation(animation2);
  mDoneButton=(Button)view.findViewById(R.id.done);
  mDoneButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      tryVibrate();
      if (mCallBack != null) {
        mCallBack.onDateSet(DatePickerDialog.this,mCalendar.get(Calendar.YEAR),mCalendar.get(Calendar.MONTH),mCalendar.get(Calendar.DAY_OF_MONTH));
      }
      dismiss();
    }
  }
);
  updateDisplay(false);
  setCurrentView(currentView);
  if (listPosition != -1) {
    if (currentView == MONTH_AND_DAY_VIEW) {
      mDayPickerView.postSetSelection(listPosition);
    }
 else     if (currentView == YEAR_VIEW) {
      mYearPickerView.postSetSelectionFromTop(listPosition,listPositionOffset);
    }
  }
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
  View view=inflater.inflate(R.layout.date_picker_dialog,null);
  mDayOfWeekView=(TextView)view.findViewById(R.id.date_picker_header);
  mMonthAndDayView=(LinearLayout)view.findViewById(R.id.date_picker_month_and_day);
  mMonthAndDayView.setOnClickListener(this);
  mSelectedMonthTextView=(TextView)view.findViewById(R.id.date_picker_month);
  mSelectedDayTextView=(TextView)view.findViewById(R.id.date_picker_day);
  mYearView=(TextView)view.findViewById(R.id.date_picker_year);
  mYearView.setOnClickListener(this);
  int listPosition=-1;
  int listPositionOffset=0;
  int currentView=MONTH_AND_DAY_VIEW;
  if (savedInstanceState != null) {
    mWeekStart=savedInstanceState.getInt(KEY_WEEK_START);
    mMinYear=savedInstanceState.getInt(KEY_YEAR_START);
    mMaxYear=savedInstanceState.getInt(KEY_YEAR_END);
    currentView=savedInstanceState.getInt(KEY_CURRENT_VIEW);
    listPosition=savedInstanceState.getInt(KEY_LIST_POSITION);
    listPositionOffset=savedInstanceState.getInt(KEY_LIST_POSITION_OFFSET);
  }
  final Activity activity=getActivity();
  mDayPickerView=new DayPickerView(activity,this);
  mYearPickerView=new YearPickerView(activity,this);
  Resources res=getResources();
  mDayPickerDescription=res.getString(R.string.day_picker_description);
  mSelectDay=res.getString(R.string.select_day);
  mYearPickerDescription=res.getString(R.string.year_picker_description);
  mSelectYear=res.getString(R.string.select_year);
  mAnimator=(AccessibleDateAnimator)view.findViewById(R.id.animator);
  mAnimator.addView(mDayPickerView);
  mAnimator.addView(mYearPickerView);
  mAnimator.setDateMillis(mCalendar.getTimeInMillis());
  Animation animation=new AlphaAnimation(0.0f,1.0f);
  animation.setDuration(ANIMATION_DURATION);
  mAnimator.setInAnimation(animation);
  Animation animation2=new AlphaAnimation(1.0f,0.0f);
  animation2.setDuration(ANIMATION_DURATION);
  mAnimator.setOutAnimation(animation2);
  mDoneButton=(Button)view.findViewById(R.id.done);
  mDoneButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      tryVibrate();
      if (mCallBack != null) {
        mCallBack.onDateSet(DatePickerDialog.this,mCalendar.get(Calendar.YEAR),mCalendar.get(Calendar.MONTH),mCalendar.get(Calendar.DAY_OF_MONTH));
      }
      dismiss();
    }
  }
);
  updateDisplay(false);
  setCurrentView(currentView);
  if (listPosition != -1) {
    if (currentView == MONTH_AND_DAY_VIEW) {
      mDayPickerView.postSetSelection(listPosition);
    }
 else     if (currentView == YEAR_VIEW) {
      mYearPickerView.postSetSelectionFromTop(listPosition,listPositionOffset);
    }
  }
  mHapticFeedbackController=new HapticFeedbackController(activity);
  return view;
}