Program: 96193
Project: 96193
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  if (resultCode == RESULT_OK) {
    if (requestCode == BUILDER_REQUEST_CODE) {
      long armorId=data.getLongExtra(ArmorDetailActivity.EXTRA_ARMOR_ID,-1);
      if (armorId != -1) {
        String armorType=DataManager.get(getApplicationContext()).getArmor(armorId).getSlot();
switch (armorType) {
case "String_Node_Str":
          Log.d("String_Node_Str","String_Node_Str");
        session.setArmor(ArmorSetBuilderSession.HEAD,DataManager.get(getApplicationContext()).getArmor(armorId));
      break;
case "String_Node_Str":
    Log.d("String_Node_Str","String_Node_Str");
  session.setArmor(ArmorSetBuilderSession.BODY,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
case "String_Node_Str":
Log.d("String_Node_Str","String_Node_Str");
session.setArmor(ArmorSetBuilderSession.ARMS,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
case "String_Node_Str":
Log.d("String_Node_Str","String_Node_Str");
session.setArmor(ArmorSetBuilderSession.WAIST,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
case "String_Node_Str":
Log.d("String_Node_Str","String_Node_Str");
session.setArmor(ArmorSetBuilderSession.LEGS,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
}
}
long decorationId=data.getLongExtra(DecorationDetailActivity.EXTRA_DECORATION_ID,-1);
int pieceIndex=data.getIntExtra(EXTRA_PIECE_INDEX,-1);
Log.d("String_Node_Str","String_Node_Str" + decorationId);
Log.d("String_Node_Str","String_Node_Str" + pieceIndex);
if (decorationId != -1 && pieceIndex != -1) {
Log.d("String_Node_Str","String_Node_Str" + DataManager.get(this).getDecoration(decorationId).getName());
Decoration decoration=DataManager.get(this).getDecoration(decorationId);
if (!session.addDecoration(pieceIndex,decoration)) {
Log.i("String_Node_Str","String_Node_Str");
}
}
}
 else if (requestCode == REMOVE_DECORATION_REQUEST_CODE) {
int pieceIndex=data.getIntExtra(EXTRA_PIECE_INDEX,-1);
int decorationIndex=data.getIntExtra(EXTRA_DECORATION_INDEX,-1);
Log.d("String_Node_Str","String_Node_Str" + pieceIndex + "String_Node_Str"+ decorationIndex);
session.removeDecoration(pieceIndex,decorationIndex);
}
for (ArmorSetChangedListener a : armorSetChangedListeners) {
a.updateContents(session);
}
}
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  if (resultCode == RESULT_OK) {
    if (requestCode == BUILDER_REQUEST_CODE) {
      long armorId=data.getLongExtra(ArmorDetailActivity.EXTRA_ARMOR_ID,-1);
      if (armorId != -1) {
        String armorType=DataManager.get(getApplicationContext()).getArmor(armorId).getSlot();
switch (armorType) {
case "String_Node_Str":
          Log.d("String_Node_Str","String_Node_Str");
        session.setArmor(ArmorSetBuilderSession.HEAD,DataManager.get(getApplicationContext()).getArmor(armorId));
      break;
case "String_Node_Str":
    Log.d("String_Node_Str","String_Node_Str");
  session.setArmor(ArmorSetBuilderSession.BODY,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
case "String_Node_Str":
Log.d("String_Node_Str","String_Node_Str");
session.setArmor(ArmorSetBuilderSession.ARMS,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
case "String_Node_Str":
Log.d("String_Node_Str","String_Node_Str");
session.setArmor(ArmorSetBuilderSession.WAIST,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
case "String_Node_Str":
Log.d("String_Node_Str","String_Node_Str");
session.setArmor(ArmorSetBuilderSession.LEGS,DataManager.get(getApplicationContext()).getArmor(armorId));
break;
}
}
long decorationId=data.getLongExtra(DecorationDetailActivity.EXTRA_DECORATION_ID,-1);
int pieceIndex=data.getIntExtra(EXTRA_PIECE_INDEX,-1);
if (decorationId != -1 && pieceIndex != -1) {
Decoration decoration=DataManager.get(this).getDecoration(decorationId);
if (!session.addDecoration(pieceIndex,decoration)) {
}
}
}
 else if (requestCode == REMOVE_DECORATION_REQUEST_CODE) {
int pieceIndex=data.getIntExtra(EXTRA_PIECE_INDEX,-1);
int decorationIndex=data.getIntExtra(EXTRA_DECORATION_INDEX,-1);
Log.d("String_Node_Str","String_Node_Str" + pieceIndex + "String_Node_Str"+ decorationIndex);
session.removeDecoration(pieceIndex,decorationIndex);
}
}
}