Program: 38448
Project: 38448
Buggy source:
private void showPopupMenu(LinearLayout accessoryViewList){
  final FramedTextButton button=(FramedTextButton)accessoryViewList.findViewById(R.id.drawUtilityButton);
  if (button == null) {
    return;
  }
  final PopupMenu popupMenu=new PopupMenu(mImageShow.getActivity(),button);
  popupMenu.getMenuInflater().inflate(R.menu.filtershow_menu_draw,popupMenu.getMenu());
  popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
    @Override public boolean onMenuItemClick(    MenuItem item){
      ImageFilterDraw filter=(ImageFilterDraw)mImageShow.getCurrentFilter();
      if (item.getItemId() == R.id.draw_menu_color) {
        showColorGrid(item);
      }
 else       if (item.getItemId() == R.id.draw_menu_size) {
        showSizeDialog(item);
      }
 else       if (item.getItemId() == R.id.draw_menu_style_brush_marker) {
        ImageDraw idraw=(ImageDraw)mImageShow;
        idraw.setStyle(ImageFilterDraw.BRUSH_STYLE_MARKER);
      }
 else       if (item.getItemId() == R.id.draw_menu_style_brush_spatter) {
        ImageDraw idraw=(ImageDraw)mImageShow;
        idraw.setStyle(ImageFilterDraw.BRUSH_STYLE_SPATTER);
      }
 else       if (item.getItemId() == R.id.draw_menu_style_line) {
        ImageDraw idraw=(ImageDraw)mImageShow;
        idraw.setStyle(ImageFilterDraw.SIMPLE_STYLE);
      }
 else       if (item.getItemId() == R.id.draw_menu_clear) {
        FilterDrawRepresentation drawRep=(FilterDrawRepresentation)getLocalRepresentation();
        drawRep.clear();
        commitLocalRepresentation();
      }
      mView.invalidate();
      return true;
    }
  }
);
  popupMenu.show();
}

Fixed version (ground truth):
private void showPopupMenu(LinearLayout accessoryViewList){
  final FramedTextButton button=(FramedTextButton)accessoryViewList.findViewById(R.id.drawUtilityButton);
  if (button == null) {
    return;
  }
  final PopupMenu popupMenu=new PopupMenu(mImageShow.getActivity(),button);
  popupMenu.getMenuInflater().inflate(R.menu.filtershow_menu_draw,popupMenu.getMenu());
  popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener(){
    @Override public boolean onMenuItemClick(    MenuItem item){
      ImageFilterDraw filter=(ImageFilterDraw)mImageShow.getCurrentFilter();
      if (item.getItemId() == R.id.draw_menu_color) {
        showColorGrid(item);
      }
 else       if (item.getItemId() == R.id.draw_menu_size) {
        showSizeDialog(item);
      }
 else       if (item.getItemId() == R.id.draw_menu_style_brush_marker) {
        ImageDraw idraw=(ImageDraw)mImageShow;
        idraw.setStyle(ImageFilterDraw.BRUSH_STYLE_MARKER);
      }
 else       if (item.getItemId() == R.id.draw_menu_style_brush_spatter) {
        ImageDraw idraw=(ImageDraw)mImageShow;
        idraw.setStyle(ImageFilterDraw.BRUSH_STYLE_SPATTER);
      }
 else       if (item.getItemId() == R.id.draw_menu_style_line) {
        ImageDraw idraw=(ImageDraw)mImageShow;
        idraw.setStyle(ImageFilterDraw.SIMPLE_STYLE);
      }
 else       if (item.getItemId() == R.id.draw_menu_clear) {
        ImageDraw idraw=(ImageDraw)mImageShow;
        idraw.resetParameter();
        commitLocalRepresentation();
      }
      mView.invalidate();
      return true;
    }
  }
);
  popupMenu.show();
}