Program: 32638
Project: 32638
Buggy source:
@Override public boolean onTouch(View v,MotionEvent event){
  if (event.getAction() == MotionEvent.ACTION_DOWN) {
    if (listView.getId() == R.id.month_listview || listView.getId() == R.id.year_listview) {
      mMonthOrYearTouched=true;
    }
 else {
      mDummyView.setVisibility(View.INVISIBLE);
    }
    mItemMovedToMiddle=false;
    if (ACTION_MOVED == 1) {
      if (state.getScrollState() == OnScrollListener.SCROLL_STATE_TOUCH_SCROLL || state.getScrollState() == OnScrollListener.SCROLL_STATE_FLING)       ACTION_MOVED=1;
 else       if (state.getScrollState() == OnScrollListener.SCROLL_STATE_IDLE)       ACTION_MOVED=0;
    }
    disableOtherListViews(listView);
    setOtherListViewsInvisible(listView);
    stopOtherScrolls(listView);
    listBeingTouched.set(true);
    if (!adapter.getAllItemsVisible()) {
      adapter.setAllItemsVisible(true);
      adapter.notifyDataSetChanged();
    }
    if (state.getScrollState() == OnScrollListener.SCROLL_STATE_IDLE && mMonthOrYearTouched) {
      if (listView.getId() == R.id.date_listview) {
        addDatesInDateView();
      }
    }
 else     if (state.getScrollState() == OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
    }
  }
  if (event.getAction() == MotionEvent.ACTION_UP) {
    enableAllListViews();
    listBeingTouched.compareAndSet(true,false);
    if (ACTION_MOVED != 1) {
      if (completeListVisible.isCompleteListViewVisible()) {
        putThisViewInMiddle(event.getY(),listView,adapter);
      }
    }
    if (state.getScrollState() == OnScrollListener.SCROLL_STATE_IDLE) {
      completeListVisible.setCompleteListViewVisible(true);
    }
  }
 else   if (event.getAction() == MotionEvent.ACTION_MOVE) {
    ACTION_MOVED=1;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onTouch(View v,MotionEvent event){
  if (event.getAction() == MotionEvent.ACTION_DOWN) {
    if (listView.getId() == R.id.month_listview || listView.getId() == R.id.year_listview) {
      mMonthOrYearTouched=true;
    }
 else {
      mDummyView.setVisibility(View.INVISIBLE);
    }
    itemScrolledToMiddle.set(false);
    if (ACTION_MOVED == 1) {
      if (state.getScrollState() == OnScrollListener.SCROLL_STATE_TOUCH_SCROLL || state.getScrollState() == OnScrollListener.SCROLL_STATE_FLING)       ACTION_MOVED=1;
 else       if (state.getScrollState() == OnScrollListener.SCROLL_STATE_IDLE)       ACTION_MOVED=0;
    }
    disableOtherListViews(listView);
    setOtherListViewsInvisible(listView);
    stopOtherScrolls(listView);
    listBeingTouched.set(true);
    if (!adapter.getAllItemsVisible()) {
      adapter.setAllItemsVisible(true);
      adapter.notifyDataSetChanged();
    }
    if (state.getScrollState() == OnScrollListener.SCROLL_STATE_IDLE && mMonthOrYearTouched) {
      if (listView.getId() == R.id.date_listview) {
        addDatesInDateView();
      }
    }
 else     if (state.getScrollState() == OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
    }
  }
  if (event.getAction() == MotionEvent.ACTION_UP) {
    enableAllListViews();
    listBeingTouched.compareAndSet(true,false);
    if (ACTION_MOVED != 1) {
      if (completeListVisible.isCompleteListViewVisible()) {
        putThisViewInMiddle(event.getY(),listView,adapter);
      }
    }
    if (state.getScrollState() == OnScrollListener.SCROLL_STATE_IDLE) {
      completeListVisible.setCompleteListViewVisible(true);
    }
  }
 else   if (event.getAction() == MotionEvent.ACTION_MOVE) {
    ACTION_MOVED=1;
  }
  return false;
}