Program: 107341
Project: 107341
Buggy source:
private static void serializeResponseObjFieldsXML(StringBuilder sb,ResponseObject obj){
  boolean isAsync=false;
  if (obj instanceof AsyncJobResponse)   isAsync=true;
  Field[] fields=obj.getClass().getDeclaredFields();
  for (  Field field : fields) {
    if ((field.getModifiers() & Modifier.TRANSIENT) != 0) {
      continue;
    }
    SerializedName serializedName=field.getAnnotation(SerializedName.class);
    if (serializedName == null) {
      continue;
    }
    String propName=field.getName();
    Method method=getGetMethod(obj,propName);
    if (method != null) {
      try {
        Object fieldValue=method.invoke(obj);
        if (fieldValue != null) {
          if (fieldValue instanceof ResponseObject) {
            ResponseObject subObj=(ResponseObject)fieldValue;
            if (isAsync) {
              sb.append("String_Node_Str");
            }
            serializeResponseObjXML(sb,subObj);
            if (isAsync) {
              sb.append("String_Node_Str");
            }
          }
 else           if (fieldValue instanceof ArrayList<?>) {
            ArrayList<?> subResponseList=(ArrayList<Object>)fieldValue;
            for (            Object value : subResponseList) {
              if (value instanceof ResponseObject) {
                ResponseObject subObj=(ResponseObject)value;
                serializeResponseObjXML(sb,subObj);
              }
            }
          }
 else           if (fieldValue instanceof Date) {
            sb.append("String_Node_Str" + serializedName.value() + "String_Node_Str"+ BaseCmd.getDateString((Date)fieldValue)+ "String_Node_Str"+ serializedName.value()+ "String_Node_Str");
          }
 else {
            sb.append("String_Node_Str" + serializedName.value() + "String_Node_Str"+ fieldValue.toString()+ "String_Node_Str"+ serializedName.value()+ "String_Node_Str");
          }
        }
      }
 catch (      IllegalArgumentException e) {
        s_logger.error("String_Node_Str" + obj.getClass().getName() + "String_Node_Str"+ propName);
      }
catch (      IllegalAccessException e) {
        s_logger.error("String_Node_Str" + obj.getClass().getName() + "String_Node_Str"+ propName);
      }
catch (      InvocationTargetException e) {
        s_logger.error("String_Node_Str" + obj.getClass().getName() + "String_Node_Str"+ propName);
      }
    }
  }
}

Fixed version (ground truth):
private static void serializeResponseObjFieldsXML(StringBuilder sb,ResponseObject obj){
  boolean isAsync=false;
  if (obj instanceof AsyncJobResponse)   isAsync=true;
  Field[] fields=obj.getClass().getDeclaredFields();
  for (  Field field : fields) {
    if ((field.getModifiers() & Modifier.TRANSIENT) != 0) {
      continue;
    }
    SerializedName serializedName=field.getAnnotation(SerializedName.class);
    if (serializedName == null) {
      continue;
    }
    String propName=field.getName();
    Method method=getGetMethod(obj,propName);
    if (method != null) {
      try {
        Object fieldValue=method.invoke(obj);
        if (fieldValue != null) {
          if (fieldValue instanceof ResponseObject) {
            ResponseObject subObj=(ResponseObject)fieldValue;
            if (isAsync) {
              sb.append("String_Node_Str");
            }
            serializeResponseObjXML(sb,subObj);
            if (isAsync) {
              sb.append("String_Node_Str");
            }
          }
 else           if (fieldValue instanceof List<?>) {
            List<?> subResponseList=(List<Object>)fieldValue;
            for (            Object value : subResponseList) {
              if (value instanceof ResponseObject) {
                ResponseObject subObj=(ResponseObject)value;
                if (serializedName != null) {
                  subObj.setObjectName(serializedName.value());
                }
                serializeResponseObjXML(sb,subObj);
              }
            }
          }
 else           if (fieldValue instanceof Date) {
            sb.append("String_Node_Str" + serializedName.value() + "String_Node_Str"+ BaseCmd.getDateString((Date)fieldValue)+ "String_Node_Str"+ serializedName.value()+ "String_Node_Str");
          }
 else {
            sb.append("String_Node_Str" + serializedName.value() + "String_Node_Str"+ fieldValue.toString()+ "String_Node_Str"+ serializedName.value()+ "String_Node_Str");
          }
        }
      }
 catch (      IllegalArgumentException e) {
        s_logger.error("String_Node_Str" + obj.getClass().getName() + "String_Node_Str"+ propName);
      }
catch (      IllegalAccessException e) {
        s_logger.error("String_Node_Str" + obj.getClass().getName() + "String_Node_Str"+ propName);
      }
catch (      InvocationTargetException e) {
        s_logger.error("String_Node_Str" + obj.getClass().getName() + "String_Node_Str"+ propName);
      }
    }
  }
}