Program: 87637
Project: 87637
Buggy source:
/** 
 * The builder of MoreKeysKeyboard.
 * @param context the context of {@link MoreKeysKeyboardView}.
 * @param parentKey the {@link Key} that invokes more keys keyboard.
 * @param parentKeyboardView the {@link KeyboardView} that contains the parentKey.
 * @param keyPreviewDrawParams the parameter to place key preview.
 */
public Builder(final Context context,final Key parentKey,final MainKeyboardView parentKeyboardView,final KeyPreviewDrawParams keyPreviewDrawParams){
  super(context,new MoreKeysKeyboardParams());
  final Keyboard parentKeyboard=parentKeyboardView.getKeyboard();
  load(parentKeyboard.mMoreKeysTemplate,parentKeyboard.mId);
  mParams.mVerticalGap=parentKeyboard.mVerticalGap / 2;
  mParentKey=parentKey;
  final int width, height;
  final boolean singleMoreKeyWithPreview=parentKeyboardView.isKeyPreviewPopupEnabled() && !parentKey.noKeyPreview() && parentKey.mMoreKeys.length == 1;
  if (singleMoreKeyWithPreview) {
    width=keyPreviewDrawParams.mPreviewVisibleWidth;
    height=keyPreviewDrawParams.mPreviewVisibleHeight + mParams.mVerticalGap;
    if (width == 0) {
      throw new IllegalArgumentException("String_Node_Str" + parentKey + "String_Node_Str"+ parentKeyboard.mId);
    }
  }
 else {
    width=getMaxKeyWidth(parentKeyboardView,parentKey,mParams.mDefaultKeyWidth,context.getResources());
    height=parentKeyboard.mMostCommonKeyHeight;
    if (width == 0) {
      throw new IllegalArgumentException("String_Node_Str" + parentKey + "String_Node_Str"+ java.util.Arrays.toString(parentKey.mMoreKeys)+ "String_Node_Str"+ parentKeyboard.mId);
    }
  }
  final int dividerWidth;
  if (parentKey.needsDividersInMoreKeys()) {
    mDivider=mResources.getDrawable(R.drawable.more_keys_divider);
    dividerWidth=(int)(width * DIVIDER_RATIO);
  }
 else {
    mDivider=null;
    dividerWidth=0;
  }
  mParams.setParameters(parentKey.mMoreKeys.length,parentKey.getMoreKeysColumn(),width,height,parentKey.mX + parentKey.mWidth / 2,parentKeyboardView.getMeasuredWidth(),parentKey.isFixedColumnOrderMoreKeys(),dividerWidth);
}

Fixed version (ground truth):
/** 
 * The builder of MoreKeysKeyboard.
 * @param context the context of {@link MoreKeysKeyboardView}.
 * @param parentKey the {@link Key} that invokes more keys keyboard.
 * @param parentKeyboardView the {@link KeyboardView} that contains the parentKey.
 * @param keyPreviewDrawParams the parameter to place key preview.
 */
public Builder(final Context context,final Key parentKey,final MainKeyboardView parentKeyboardView,final KeyPreviewDrawParams keyPreviewDrawParams){
  super(context,new MoreKeysKeyboardParams());
  final Keyboard parentKeyboard=parentKeyboardView.getKeyboard();
  load(parentKeyboard.mMoreKeysTemplate,parentKeyboard.mId);
  mParams.mVerticalGap=parentKeyboard.mVerticalGap / 2;
  mParentKey=parentKey;
  final int width, height;
  final boolean singleMoreKeyWithPreview=parentKeyboardView.isKeyPreviewPopupEnabled() && !parentKey.noKeyPreview() && parentKey.mMoreKeys.length == 1 && keyPreviewDrawParams.mPreviewVisibleWidth > 0;
  if (singleMoreKeyWithPreview) {
    width=keyPreviewDrawParams.mPreviewVisibleWidth;
    height=keyPreviewDrawParams.mPreviewVisibleHeight + mParams.mVerticalGap;
  }
 else {
    width=getMaxKeyWidth(parentKeyboardView,parentKey,mParams.mDefaultKeyWidth,context.getResources());
    height=parentKeyboard.mMostCommonKeyHeight;
  }
  final int dividerWidth;
  if (parentKey.needsDividersInMoreKeys()) {
    mDivider=mResources.getDrawable(R.drawable.more_keys_divider);
    dividerWidth=(int)(width * DIVIDER_RATIO);
  }
 else {
    mDivider=null;
    dividerWidth=0;
  }
  mParams.setParameters(parentKey.mMoreKeys.length,parentKey.getMoreKeysColumn(),width,height,parentKey.mX + parentKey.mWidth / 2,parentKeyboardView.getMeasuredWidth(),parentKey.isFixedColumnOrderMoreKeys(),dividerWidth);
}