Program: 195653
Project: 195653
Buggy source:
/** 
 * <p> Measure the view and its content to determine the measured width and the measured height. This method is invoked by   {@link #measure(int,int)} andshould be overriden by subclasses to provide accurate and efficient measurement of their contents. </p> <p> <strong>CONTRACT:</strong> When overriding this method, you <em>must</em> call  {@link #setMeasuredDimension(int,int)} to store themeasured width and height of this view. Failure to do so will trigger an <code>IllegalStateException</code>, thrown by {@link #measure(int,int)}. Calling the superclass'  {@link #onMeasure(int,int)} is a valid use.</p> <p> The base class implementation of measure defaults to the background size, unless a larger size is allowed by the MeasureSpec. Subclasses should override  {@link #onMeasure(int,int)} to provide better measurements oftheir content. </p> <p> If this method is overridden, it is the subclass's responsibility to make sure the measured height and width are at least the view's minimum height and width ( {@link #getSuggestedMinimumHeight()} and{@link #getSuggestedMinimumWidth()}). </p>
 * @param widthMeasureSpec horizontal space requirements as imposed by the parent.The requirements are encoded with {@link android.view.View.MeasureSpec}.
 * @param heightMeasureSpec vertical space requirements as imposed by the parent.The requirements are encoded with {@link android.view.View.MeasureSpec}.
 * @see #getMeasuredWidth()
 * @see #getMeasuredHeight()
 * @see #setMeasuredDimension(int,int)
 * @see #getSuggestedMinimumHeight()
 * @see #getSuggestedMinimumWidth()
 * @see android.view.View.MeasureSpec#getMode(int)
 * @see android.view.View.MeasureSpec#getSize(int)
 */
protected void onMeasure(int widthMeasureSpec,int heightMeasureSpec){
  setMeasuredDimension(getDefaultSize(getSuggestedMinimumWidth(),widthMeasureSpec),getDefaultSize(getSuggestedMinimumHeight(),heightMeasureSpec));
}

Fixed version (ground truth):
/** 
 * <p> Measure the view and its content to determine the measured width and the measured height. This method is invoked by   {@link #measure(int,int)} andshould be overridden by subclasses to provide accurate and efficient measurement of their contents. </p> <p> <strong>CONTRACT:</strong> When overriding this method, you <em>must</em> call  {@link #setMeasuredDimension(int,int)} to store themeasured width and height of this view. Failure to do so will trigger an <code>IllegalStateException</code>, thrown by {@link #measure(int,int)}. Calling the superclass'  {@link #onMeasure(int,int)} is a valid use.</p> <p> The base class implementation of measure defaults to the background size, unless a larger size is allowed by the MeasureSpec. Subclasses should override  {@link #onMeasure(int,int)} to provide better measurements oftheir content. </p> <p> If this method is overridden, it is the subclass's responsibility to make sure the measured height and width are at least the view's minimum height and width ( {@link #getSuggestedMinimumHeight()} and{@link #getSuggestedMinimumWidth()}). </p>
 * @param widthMeasureSpec horizontal space requirements as imposed by the parent.The requirements are encoded with {@link android.view.View.MeasureSpec}.
 * @param heightMeasureSpec vertical space requirements as imposed by the parent.The requirements are encoded with {@link android.view.View.MeasureSpec}.
 * @see #getMeasuredWidth()
 * @see #getMeasuredHeight()
 * @see #setMeasuredDimension(int,int)
 * @see #getSuggestedMinimumHeight()
 * @see #getSuggestedMinimumWidth()
 * @see android.view.View.MeasureSpec#getMode(int)
 * @see android.view.View.MeasureSpec#getSize(int)
 */
protected void onMeasure(int widthMeasureSpec,int heightMeasureSpec){
  setMeasuredDimension(getDefaultSize(getSuggestedMinimumWidth(),widthMeasureSpec),getDefaultSize(getSuggestedMinimumHeight(),heightMeasureSpec));
}