Program: 32497
Project: 32497
Buggy source:
public void testJsonConstructor(){
  JSONObject commandJson=JsonFileReader.readId(getCommandType(),getMessageType());
  assertNotNull("String_Node_Str",commandJson);
  try {
    Hashtable<String,Object> hash=JsonRPCMarshaller.deserializeJSONObject(commandJson);
    Show cmd=new Show(hash);
    JSONObject body=JsonUtils.readJsonObjectFromJsonObject(commandJson,getMessageType());
    assertNotNull("String_Node_Str",body);
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(body,RPCMessage.KEY_FUNCTION_NAME),cmd.getFunctionName());
    assertEquals("String_Node_Str",JsonUtils.readIntegerFromJsonObject(body,RPCMessage.KEY_CORRELATION_ID),cmd.getCorrelationID());
    JSONObject parameters=JsonUtils.readJsonObjectFromJsonObject(body,RPCMessage.KEY_PARAMETERS);
    JSONObject graphic=JsonUtils.readJsonObjectFromJsonObject(parameters,Show.KEY_GRAPHIC);
    Image referenceGraphic=new Image(JsonRPCMarshaller.deserializeJSONObject(graphic));
    assertTrue("String_Node_Str",Validator.validateImage(referenceGraphic,cmd.getGraphic()));
    List<String> customPresetsList=JsonUtils.readStringListFromJsonObject(parameters,Show.KEY_CUSTOM_PRESETS);
    List<String> testPresetsList=cmd.getCustomPresets();
    assertEquals("String_Node_Str",customPresetsList.size(),testPresetsList.size());
    assertTrue("String_Node_Str",Validator.validateStringList(customPresetsList,testPresetsList));
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_1),cmd.getMainField1());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_2),cmd.getMainField2());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_3),cmd.getMainField3());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_4),cmd.getMainField4());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_STATUS_BAR),cmd.getStatusBar());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MEDIA_CLOCK),cmd.getMediaClock());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_ALIGNMENT),cmd.getAlignment().toString());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MEDIA_TRACK),cmd.getMediaTrack());
    JSONObject secondaryGraphic=JsonUtils.readJsonObjectFromJsonObject(parameters,Show.KEY_SECONDARY_GRAPHIC);
    Image referenceSecondaryGraphic=new Image(JsonRPCMarshaller.deserializeJSONObject(secondaryGraphic));
    assertTrue("String_Node_Str",Validator.validateImage(referenceSecondaryGraphic,cmd.getSecondaryGraphic()));
    JSONArray softButtonArray=JsonUtils.readJsonArrayFromJsonObject(parameters,Show.KEY_SOFT_BUTTONS);
    List<SoftButton> softButtonList=new ArrayList<SoftButton>();
    for (int index=0; index < softButtonArray.length(); index++) {
      SoftButton chunk=new SoftButton(JsonRPCMarshaller.deserializeJSONObject((JSONObject)softButtonArray.get(index)));
      softButtonList.add(chunk);
    }
    assertTrue("String_Node_Str",Validator.validateSoftButtons(softButtonList,cmd.getSoftButtons()));
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void testJsonConstructor(){
  JSONObject commandJson=JsonFileReader.readId(getCommandType(),getMessageType());
  assertNotNull("String_Node_Str",commandJson);
  try {
    Hashtable<String,Object> hash=JsonRPCMarshaller.deserializeJSONObject(commandJson);
    Show cmd=new Show(hash);
    JSONObject body=JsonUtils.readJsonObjectFromJsonObject(commandJson,getMessageType());
    assertNotNull("String_Node_Str",body);
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(body,RPCMessage.KEY_FUNCTION_NAME),cmd.getFunctionName());
    assertEquals("String_Node_Str",JsonUtils.readIntegerFromJsonObject(body,RPCMessage.KEY_CORRELATION_ID),cmd.getCorrelationID());
    JSONObject parameters=JsonUtils.readJsonObjectFromJsonObject(body,RPCMessage.KEY_PARAMETERS);
    JSONObject graphic=JsonUtils.readJsonObjectFromJsonObject(parameters,Show.KEY_GRAPHIC);
    Image referenceGraphic=new Image(JsonRPCMarshaller.deserializeJSONObject(graphic));
    assertTrue("String_Node_Str",Validator.validateImage(referenceGraphic,cmd.getGraphic()));
    List<String> customPresetsList=JsonUtils.readStringListFromJsonObject(parameters,Show.KEY_CUSTOM_PRESETS);
    List<String> testPresetsList=cmd.getCustomPresets();
    assertEquals("String_Node_Str",customPresetsList.size(),testPresetsList.size());
    assertTrue("String_Node_Str",Validator.validateStringList(customPresetsList,testPresetsList));
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_1),cmd.getMainField1());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_2),cmd.getMainField2());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_3),cmd.getMainField3());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MAIN_FIELD_4),cmd.getMainField4());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_STATUS_BAR),cmd.getStatusBar());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MEDIA_CLOCK),cmd.getMediaClock());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_ALIGNMENT),cmd.getAlignment().toString());
    assertEquals("String_Node_Str",JsonUtils.readStringFromJsonObject(parameters,Show.KEY_MEDIA_TRACK),cmd.getMediaTrack());
    JSONObject secondaryGraphic=JsonUtils.readJsonObjectFromJsonObject(parameters,Show.KEY_SECONDARY_GRAPHIC);
    Image referenceSecondaryGraphic=new Image(JsonRPCMarshaller.deserializeJSONObject(secondaryGraphic));
    assertTrue("String_Node_Str",Validator.validateImage(referenceSecondaryGraphic,cmd.getSecondaryGraphic()));
    JSONArray softButtonArray=JsonUtils.readJsonArrayFromJsonObject(parameters,Show.KEY_SOFT_BUTTONS);
    List<SoftButton> softButtonList=new ArrayList<SoftButton>();
    for (int index=0; index < softButtonArray.length(); index++) {
      SoftButton chunk=new SoftButton(JsonRPCMarshaller.deserializeJSONObject((JSONObject)softButtonArray.get(index)));
      softButtonList.add(chunk);
    }
    assertTrue("String_Node_Str",Validator.validateSoftButtons(softButtonList,cmd.getSoftButtons()));
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
}