Program: 117665
Project: 117665
Buggy source:
public Title(Context context){
  mDefaultIcon=BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_webpage);
  mFavicon=mDefaultIcon;
  mTitle=mActivity.getString(R.string.action_new_tab);
  mContext=context;
  LayoutInflater inflater=LayoutInflater.from(context);
  mFaviconSize=context.getResources().getDrawable(R.drawable.ic_webpage).getMinimumWidth() / 2;
  mCloseIcon=context.getResources().getDrawable(R.drawable.ic_action_delete);
  mCloseIcon.setBounds(0,0,mFaviconSize * 4 / 3,mFaviconSize * 4 / 3);
  mTitleView=(TextView)inflater.inflate(R.layout.title,null);
  mTitleView.setPadding(Utils.convertToDensityPixels(mContext,20),0,Utils.convertToDensityPixels(mContext,15),0);
  mTitleView.setText(mContext.getResources().getString(R.string.action_new_tab));
  mTitleView.setText(mTitle);
  Drawable icon=new BitmapDrawable(null,mFavicon);
  icon.setBounds(0,0,mFaviconSize,mFaviconSize);
  mTitleView.setCompoundDrawables(icon,null,mCloseIcon,null);
  mTitleView.setOnTouchListener(new OnTouchListener(){
    @Override public boolean onTouch(    View view,    MotionEvent event){
      if (mTitleView.getCompoundDrawables()[2] != null) {
        boolean tappedX=event.getX() > (mTitleView.getWidth() - mTitleView.getPaddingRight() - mCloseIcon.getIntrinsicWidth());
        if (tappedX) {
          if (event.getAction() == MotionEvent.ACTION_UP) {
            mBrowserController.deleteTab(mId);
          }
          return true;
        }
 else {
          if (event.getAction() == MotionEvent.ACTION_UP) {
            Log.i("String_Node_Str","String_Node_Str");
            if (!isShown())             mBrowserController.showSelectedTab(mId);
          }
          return true;
        }
      }
      return false;
    }
  }
);
}

Fixed version (ground truth):
public Title(Context context){
  mDefaultIcon=BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_webpage);
  mFavicon=mDefaultIcon;
  mTitle=mActivity.getString(R.string.action_new_tab);
  mContext=context;
  LayoutInflater inflater=LayoutInflater.from(context);
  mFaviconSize=context.getResources().getDrawable(R.drawable.ic_webpage).getMinimumWidth() / 2;
  mCloseIcon=context.getResources().getDrawable(R.drawable.ic_action_delete);
  mCloseIcon.setBounds(0,0,mFaviconSize * 4 / 3,mFaviconSize * 4 / 3);
  mTitleView=(TextView)inflater.inflate(R.layout.title,null);
  mTitleView.setPadding(Utils.convertToDensityPixels(mContext,20),0,Utils.convertToDensityPixels(mContext,15),0);
  mTitleView.setText(mContext.getResources().getString(R.string.action_new_tab));
  mTitleView.setText(mTitle);
  Drawable icon=new BitmapDrawable(null,mFavicon);
  icon.setBounds(0,0,mFaviconSize,mFaviconSize);
  mTitleView.setCompoundDrawables(icon,null,mCloseIcon,null);
  mTitleView.setOnTouchListener(new OnTouchListener(){
    @Override public boolean onTouch(    View view,    MotionEvent event){
      if (mTitleView.getCompoundDrawables()[2] != null) {
        boolean tappedX=event.getX() > (mTitleView.getWidth() - mTitleView.getPaddingRight() - mCloseIcon.getIntrinsicWidth());
        if (tappedX) {
          if (event.getAction() == MotionEvent.ACTION_UP) {
            mBrowserController.deleteTab(mId);
          }
          return true;
        }
 else {
          if (event.getAction() == MotionEvent.ACTION_UP) {
            Log.i("String_Node_Str","String_Node_Str");
            view.performClick();
          }
          return true;
        }
      }
      return false;
    }
  }
);
  mTitleView.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      if (!isShown() && !isDestroyed())       mBrowserController.showSelectedTab(mId);
    }
  }
);
}