Program: 27253
Project: 27253
Buggy source:
private void init(){
  mGestureDetector=new GestureDetectorCompat(mContext,mGestureListener);
  mScroller=new OverScroller(mContext);
  mTimeTextPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  mTimeTextPaint.setTextAlign(Paint.Align.RIGHT);
  mTimeTextPaint.setTextSize(mTextSize);
  mTimeTextPaint.setColor(mHeaderColumnTextColor);
  Rect rect=new Rect();
  mTimeTextPaint.getTextBounds("String_Node_Str",0,"String_Node_Str".length(),rect);
  mTimeTextHeight=rect.height();
  mHeaderMarginBottom=mTimeTextHeight / 2;
  initTextTimeWidth();
  mHeaderTextPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  mHeaderTextPaint.setColor(mHeaderColumnTextColor);
  mHeaderTextPaint.setTextAlign(Paint.Align.CENTER);
  mHeaderTextPaint.setTextSize(mTextSize);
  mHeaderTextPaint.getTextBounds("String_Node_Str",0,"String_Node_Str".length(),rect);
  mHeaderTextHeight=rect.height();
  mHeaderTextPaint.setTypeface(Typeface.DEFAULT_BOLD);
  mHeaderBackgroundPaint=new Paint();
  mHeaderBackgroundPaint.setColor(mHeaderRowBackgroundColor);
  mDayBackgroundPaint=new Paint();
  mDayBackgroundPaint.setColor(mDayBackgroundColor);
  mFutureBackgroundPaint=new Paint();
  mFutureBackgroundPaint.setColor(mFutureBackgroundColor);
  mPastBackgroundPaint=new Paint();
  mPastBackgroundPaint.setColor(mPastBackgroundColor);
  mFutureWeekendBackgroundPaint=new Paint();
  mFutureWeekendBackgroundPaint.setColor(mFutureWeekendBackgroundColor);
  mPastWeekendBackgroundPaint=new Paint();
  mPastWeekendBackgroundPaint.setColor(mPastWeekendBackgroundColor);
  mHourSeparatorPaint=new Paint();
  mHourSeparatorPaint.setStyle(Paint.Style.STROKE);
  mHourSeparatorPaint.setStrokeWidth(mHourSeparatorHeight);
  mHourSeparatorPaint.setColor(mHourSeparatorColor);
  mNowLinePaint=new Paint();
  mNowLinePaint.setStrokeWidth(mNowLineThickness);
  mNowLinePaint.setColor(mNowLineColor);
  mTodayBackgroundPaint=new Paint();
  mTodayBackgroundPaint.setColor(mTodayBackgroundColor);
  mTodayHeaderTextPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  mTodayHeaderTextPaint.setTextAlign(Paint.Align.CENTER);
  mTodayHeaderTextPaint.setTextSize(mTextSize);
  mTodayHeaderTextPaint.setTypeface(Typeface.DEFAULT_BOLD);
  mTodayHeaderTextPaint.setColor(mTodayHeaderTextColor);
  mEventBackgroundPaint=new Paint();
  mEventBackgroundPaint.setColor(Color.rgb(174,208,238));
  mHeaderColumnBackgroundPaint=new Paint();
  mHeaderColumnBackgroundPaint.setColor(mHeaderColumnBackgroundColor);
  mEventTextPaint=new TextPaint(Paint.ANTI_ALIAS_FLAG | Paint.LINEAR_TEXT_FLAG);
  mEventTextPaint.setStyle(Paint.Style.FILL);
  mEventTextPaint.setColor(mEventTextColor);
  mEventTextPaint.setTextSize(mEventTextSize);
  mDefaultEventColor=Color.parseColor("String_Node_Str");
  mScaleDetector=new ScaleGestureDetector(mContext,new ScaleGestureDetector.OnScaleGestureListener(){
    @Override public void onScaleEnd(    ScaleGestureDetector detector){
      mIsZooming=false;
    }
    @Override public boolean onScaleBegin(    ScaleGestureDetector detector){
      mIsZooming=true;
      goToNearestOrigin();
      return true;
    }
    @Override public boolean onScale(    ScaleGestureDetector detector){
      mNewHourHeight=Math.round(mHourHeight * detector.getScaleFactor());
      invalidate();
      return true;
    }
  }
);
}

Fixed version (ground truth):
private void init(){
  mGestureDetector=new GestureDetectorCompat(mContext,mGestureListener);
  mScroller=new OverScroller(mContext,new FastOutLinearInInterpolator());
  mMinimumFlingVelocity=ViewConfiguration.get(mContext).getScaledMinimumFlingVelocity();
  mScaledTouchSlop=ViewConfiguration.get(mContext).getScaledTouchSlop();
  mTimeTextPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  mTimeTextPaint.setTextAlign(Paint.Align.RIGHT);
  mTimeTextPaint.setTextSize(mTextSize);
  mTimeTextPaint.setColor(mHeaderColumnTextColor);
  Rect rect=new Rect();
  mTimeTextPaint.getTextBounds("String_Node_Str",0,"String_Node_Str".length(),rect);
  mTimeTextHeight=rect.height();
  mHeaderMarginBottom=mTimeTextHeight / 2;
  initTextTimeWidth();
  mHeaderTextPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  mHeaderTextPaint.setColor(mHeaderColumnTextColor);
  mHeaderTextPaint.setTextAlign(Paint.Align.CENTER);
  mHeaderTextPaint.setTextSize(mTextSize);
  mHeaderTextPaint.getTextBounds("String_Node_Str",0,"String_Node_Str".length(),rect);
  mHeaderTextHeight=rect.height();
  mHeaderTextPaint.setTypeface(Typeface.DEFAULT_BOLD);
  mHeaderBackgroundPaint=new Paint();
  mHeaderBackgroundPaint.setColor(mHeaderRowBackgroundColor);
  mDayBackgroundPaint=new Paint();
  mDayBackgroundPaint.setColor(mDayBackgroundColor);
  mFutureBackgroundPaint=new Paint();
  mFutureBackgroundPaint.setColor(mFutureBackgroundColor);
  mPastBackgroundPaint=new Paint();
  mPastBackgroundPaint.setColor(mPastBackgroundColor);
  mFutureWeekendBackgroundPaint=new Paint();
  mFutureWeekendBackgroundPaint.setColor(mFutureWeekendBackgroundColor);
  mPastWeekendBackgroundPaint=new Paint();
  mPastWeekendBackgroundPaint.setColor(mPastWeekendBackgroundColor);
  mHourSeparatorPaint=new Paint();
  mHourSeparatorPaint.setStyle(Paint.Style.STROKE);
  mHourSeparatorPaint.setStrokeWidth(mHourSeparatorHeight);
  mHourSeparatorPaint.setColor(mHourSeparatorColor);
  mNowLinePaint=new Paint();
  mNowLinePaint.setStrokeWidth(mNowLineThickness);
  mNowLinePaint.setColor(mNowLineColor);
  mTodayBackgroundPaint=new Paint();
  mTodayBackgroundPaint.setColor(mTodayBackgroundColor);
  mTodayHeaderTextPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  mTodayHeaderTextPaint.setTextAlign(Paint.Align.CENTER);
  mTodayHeaderTextPaint.setTextSize(mTextSize);
  mTodayHeaderTextPaint.setTypeface(Typeface.DEFAULT_BOLD);
  mTodayHeaderTextPaint.setColor(mTodayHeaderTextColor);
  mEventBackgroundPaint=new Paint();
  mEventBackgroundPaint.setColor(Color.rgb(174,208,238));
  mHeaderColumnBackgroundPaint=new Paint();
  mHeaderColumnBackgroundPaint.setColor(mHeaderColumnBackgroundColor);
  mEventTextPaint=new TextPaint(Paint.ANTI_ALIAS_FLAG | Paint.LINEAR_TEXT_FLAG);
  mEventTextPaint.setStyle(Paint.Style.FILL);
  mEventTextPaint.setColor(mEventTextColor);
  mEventTextPaint.setTextSize(mEventTextSize);
  mDefaultEventColor=Color.parseColor("String_Node_Str");
  mScaleDetector=new ScaleGestureDetector(mContext,new ScaleGestureDetector.OnScaleGestureListener(){
    @Override public void onScaleEnd(    ScaleGestureDetector detector){
      mIsZooming=false;
    }
    @Override public boolean onScaleBegin(    ScaleGestureDetector detector){
      mIsZooming=true;
      goToNearestOrigin();
      return true;
    }
    @Override public boolean onScale(    ScaleGestureDetector detector){
      mNewHourHeight=Math.round(mHourHeight * detector.getScaleFactor());
      invalidate();
      return true;
    }
  }
);
}