Program: 96171
Project: 96171
Buggy source:
/** 
 * It is required to call   {@code initialize} after instantiating this class. 
 */
public ASBPieceContainer(Context context,AttributeSet attrs){
  super(context,attrs);
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  inflater.inflate(R.layout.view_armor_set_builder_piece_container,this);
  icon=(ImageView)findViewById(R.id.armor_builder_item_icon);
  text=(TextView)findViewById(R.id.armor_builder_item_name);
  decorationStates=new ImageView[3];
  decorationStates[0]=(ImageView)findViewById(R.id.decoration_1_state);
  decorationStates[1]=(ImageView)findViewById(R.id.decoration_2_state);
  decorationStates[2]=(ImageView)findViewById(R.id.decoration_3_state);
  text.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      if (session.isEquipmentSelected(pieceIndex)) {
        requestPieceInfo();
      }
    }
  }
);
  equipmentButton=(ImageView)findViewById(R.id.add_equipment_button);
  equipmentButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (!session.isEquipmentSelected(pieceIndex)) {
        onAddEquipment();
      }
 else {
        onRemoveEquipment();
      }
    }
  }
);
  decorationView=new DecorationView();
  dropDownArrow=(ImageView)findViewById(R.id.drop_down_arrow);
  dropDownArrow.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      if (decorationView.container.getVisibility() == GONE) {
        showDecorations();
      }
 else {
        hideDecorations();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * It is required to call   {@code initialize} after instantiating this class.
 */
public ASBPieceContainer(Context context,AttributeSet attrs){
  super(context,attrs);
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  inflater.inflate(R.layout.view_armor_set_builder_piece_container,this);
  icon=(ImageView)findViewById(R.id.armor_builder_item_icon);
  text=(TextView)findViewById(R.id.armor_builder_item_name);
  decorationStates=new ImageView[3];
  decorationStates[0]=(ImageView)findViewById(R.id.decoration_1_state);
  decorationStates[1]=(ImageView)findViewById(R.id.decoration_2_state);
  decorationStates[2]=(ImageView)findViewById(R.id.decoration_3_state);
  text.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      if (session.isEquipmentSelected(pieceIndex)) {
        requestPieceInfo();
      }
    }
  }
);
  equipmentButton=(ImageView)findViewById(R.id.add_equipment_button);
  equipmentButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (!session.isEquipmentSelected(pieceIndex)) {
        onAddEquipment();
      }
 else {
        onRemoveEquipment();
      }
    }
  }
);
  decorationView=new DecorationView();
  dropDownArrow=(ImageView)findViewById(R.id.drop_down_arrow);
  dropDownArrow.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      if (decorationView.container.getVisibility() == GONE) {
        showDecorations();
      }
 else {
        hideDecorations();
      }
    }
  }
);
}