Program: 142081
Project: 142081
Buggy source:
@Override protected void initText(){
  dayOfWeek=(TextView)findViewById(R.id.gregdayofweek);
  dayTxt=(EditText)findViewById(R.id.daytxtfield);
  yearTxt=(EditText)findViewById(R.id.yeartxtfield);
  MonthAdapter monthAdapter=new MonthAdapter(getContext(),monthList);
  monthTxt=(AutoCompleteTextView)findViewById(R.id.monthtxtfield);
  monthTxt.setAdapter(monthAdapter);
  dayTxt.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      String contents=s.toString();
      if (contents.length() > 1) {
        int num=Integer.parseInt(contents);
        int monthMax=myCal.getActualMaximum(Calendar.DAY_OF_MONTH);
        if (num > monthMax) {
          s.clear();
          s.append(String.valueOf(monthMax));
        }
        if (num < 1) {
          s.clear();
          s.append(String.valueOf(1));
        }
      }
    }
  }
);
  monthTxt.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      String content=s.toString();
      if (monthList.contains(content)) {
        monthArrayPointer=monthList.indexOf(content);
      }
    }
  }
);
  yearTxt.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      String contents=s.toString();
      if (contents.length() > 0) {
        int maxYear=myCal.get(Calendar.YEAR) + 1;
        if (Integer.parseInt(contents) > maxYear) {
          s.clear();
          s.append(String.valueOf(maxYear));
        }
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void initText(){
  dayOfWeek=(TextView)findViewById(R.id.gregdayofweek);
  dayTxt=(EditText)findViewById(R.id.daytxtfield);
  yearTxt=(EditText)findViewById(R.id.yeartxtfield);
  MonthAdapter monthAdapter=new MonthAdapter(getContext(),monthList);
  monthTxt=(AutoCompleteTextView)findViewById(R.id.monthtxtfield);
  monthTxt.setAdapter(monthAdapter);
  dayTxt.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      String contents=s.toString();
      if (contents.length() > 1) {
        int num=Integer.parseInt(contents);
        int monthMax=myCal.getActualMaximum(Calendar.DAY_OF_MONTH);
        if (num > monthMax) {
          s.clear();
          s.append(String.valueOf(monthMax));
        }
        if (num < 1) {
          s.clear();
          s.append(String.valueOf(1));
        }
        myCal.set(Calendar.DAY_OF_MONTH,Integer.parseInt(s.toString()));
      }
    }
  }
);
  monthTxt.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      String content=s.toString();
      if (monthList.contains(content)) {
        monthArrayPointer=monthList.indexOf(content);
        myCal.set(Calendar.MONTH,monthArrayPointer);
      }
    }
  }
);
  yearTxt.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      String contents=s.toString();
      if (contents.length() >= 4) {
        int maxYear=myCal.get(Calendar.YEAR) + 1;
        if (Integer.parseInt(contents) > maxYear) {
          s.clear();
          s.append(String.valueOf(maxYear));
        }
        myCal.set(Calendar.YEAR,Integer.parseInt(contents));
      }
    }
  }
);
}