Program: 15214
Project: 15214
Buggy source:
@SuppressWarnings("String_Node_Str") static void serialize(XmlSerializer serializer,Object object,boolean convertToGMT) throws IOException {
  if (object instanceof Integer || object instanceof Short || object instanceof Byte) {
    serializer.startTag(null,TYPE_I4).text(object.toString()).endTag(null,TYPE_I4);
  }
 else   if (object instanceof Long) {
    serializer.startTag(null,TYPE_I8).text(object.toString()).endTag(null,TYPE_I8);
  }
 else   if (object instanceof Double || object instanceof Float) {
    serializer.startTag(null,TYPE_DOUBLE).text(object.toString()).endTag(null,TYPE_DOUBLE);
  }
 else   if (object instanceof Boolean) {
    Boolean bool=(Boolean)object;
    String boolStr=bool.booleanValue() ? "String_Node_Str" : "String_Node_Str";
    serializer.startTag(null,TYPE_BOOLEAN).text(boolStr).endTag(null,TYPE_BOOLEAN);
  }
 else   if (object instanceof String) {
    serializer.startTag(null,TYPE_STRING).text(object.toString()).endTag(null,TYPE_STRING);
  }
 else   if (object instanceof Date || object instanceof Calendar) {
    Date date=(Date)object;
    SimpleDateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
    if (convertToGMT) {
      long pubDate=date.getTime();
      TimeZone tz=TimeZone.getDefault();
      long offset=tz.getOffset(pubDate);
      pubDate+=offset * -1;
      date=new Date(pubDate);
    }
    String sDate=dateFormat.format(date);
    serializer.startTag(null,TYPE_DATE_TIME_ISO8601).text(sDate).endTag(null,TYPE_DATE_TIME_ISO8601);
  }
 else   if (object instanceof byte[]) {
    String value=new String(Base64Coder.encode((byte[])object));
    serializer.startTag(null,TYPE_BASE64).text(value).endTag(null,TYPE_BASE64);
  }
 else   if (object instanceof MediaFile) {
    serializer.startTag(null,"String_Node_Str");
    MediaFile videoFile=(MediaFile)object;
    InputStream inStream=new DataInputStream(new FileInputStream(videoFile.getFilePath()));
    byte[] buffer=new byte[3600];
    int length=-1;
    String chunk=null;
    while ((length=inStream.read(buffer)) > 0) {
      chunk=Base64.encodeBytes(buffer,0,length);
      serializer.text(chunk);
    }
    inStream.close();
    serializer.endTag(null,"String_Node_Str");
  }
 else   if (object instanceof List<?>) {
    serializer.startTag(null,TYPE_ARRAY).startTag(null,TAG_DATA);
    List<Object> list=(List<Object>)object;
    Iterator<Object> iter=list.iterator();
    while (iter.hasNext()) {
      Object o=iter.next();
      serializer.startTag(null,TAG_VALUE);
      serialize(serializer,o,convertToGMT);
      serializer.endTag(null,TAG_VALUE);
    }
    serializer.endTag(null,TAG_DATA).endTag(null,TYPE_ARRAY);
  }
 else   if (object instanceof Object[]) {
    serializer.startTag(null,TYPE_ARRAY).startTag(null,TAG_DATA);
    Object[] objects=(Object[])object;
    for (int i=0; i < objects.length; i++) {
      Object o=objects[i];
      serializer.startTag(null,TAG_VALUE);
      serialize(serializer,o,convertToGMT);
      serializer.endTag(null,TAG_VALUE);
    }
    serializer.endTag(null,TAG_DATA).endTag(null,TYPE_ARRAY);
  }
 else   if (object instanceof Map) {
    serializer.startTag(null,TYPE_STRUCT);
    Map<String,Object> map=(Map<String,Object>)object;
    Iterator<Entry<String,Object>> iter=map.entrySet().iterator();
    while (iter.hasNext()) {
      Entry<String,Object> entry=iter.next();
      String key=entry.getKey();
      Object value=entry.getValue();
      serializer.startTag(null,TAG_MEMBER);
      serializer.startTag(null,TAG_NAME).text(key).endTag(null,TAG_NAME);
      serializer.startTag(null,TAG_VALUE);
      serialize(serializer,value,convertToGMT);
      serializer.endTag(null,TAG_VALUE);
      serializer.endTag(null,TAG_MEMBER);
    }
    serializer.endTag(null,TYPE_STRUCT);
  }
 else {
    throw new IOException("String_Node_Str" + object);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") static void serialize(XmlSerializer serializer,Object object) throws IOException {
  if (object instanceof Integer || object instanceof Short || object instanceof Byte) {
    serializer.startTag(null,TYPE_I4).text(object.toString()).endTag(null,TYPE_I4);
  }
 else   if (object instanceof Long) {
    serializer.startTag(null,TYPE_I8).text(object.toString()).endTag(null,TYPE_I8);
  }
 else   if (object instanceof Double || object instanceof Float) {
    serializer.startTag(null,TYPE_DOUBLE).text(object.toString()).endTag(null,TYPE_DOUBLE);
  }
 else   if (object instanceof Boolean) {
    Boolean bool=(Boolean)object;
    String boolStr=bool.booleanValue() ? "String_Node_Str" : "String_Node_Str";
    serializer.startTag(null,TYPE_BOOLEAN).text(boolStr).endTag(null,TYPE_BOOLEAN);
  }
 else   if (object instanceof String) {
    serializer.startTag(null,TYPE_STRING).text(object.toString()).endTag(null,TYPE_STRING);
  }
 else   if (object instanceof Date || object instanceof Calendar) {
    Date date=(Date)object;
    SimpleDateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
    String sDate=dateFormat.format(date);
    serializer.startTag(null,TYPE_DATE_TIME_ISO8601).text(sDate).endTag(null,TYPE_DATE_TIME_ISO8601);
  }
 else   if (object instanceof byte[]) {
    String value=new String(Base64Coder.encode((byte[])object));
    serializer.startTag(null,TYPE_BASE64).text(value).endTag(null,TYPE_BASE64);
  }
 else   if (object instanceof MediaFile) {
    serializer.startTag(null,"String_Node_Str");
    MediaFile videoFile=(MediaFile)object;
    InputStream inStream=new DataInputStream(new FileInputStream(videoFile.getFilePath()));
    byte[] buffer=new byte[3600];
    int length=-1;
    String chunk=null;
    while ((length=inStream.read(buffer)) > 0) {
      chunk=Base64.encodeBytes(buffer,0,length);
      serializer.text(chunk);
    }
    inStream.close();
    serializer.endTag(null,"String_Node_Str");
  }
 else   if (object instanceof List<?>) {
    serializer.startTag(null,TYPE_ARRAY).startTag(null,TAG_DATA);
    List<Object> list=(List<Object>)object;
    Iterator<Object> iter=list.iterator();
    while (iter.hasNext()) {
      Object o=iter.next();
      serializer.startTag(null,TAG_VALUE);
      serialize(serializer,o);
      serializer.endTag(null,TAG_VALUE);
    }
    serializer.endTag(null,TAG_DATA).endTag(null,TYPE_ARRAY);
  }
 else   if (object instanceof Object[]) {
    serializer.startTag(null,TYPE_ARRAY).startTag(null,TAG_DATA);
    Object[] objects=(Object[])object;
    for (int i=0; i < objects.length; i++) {
      Object o=objects[i];
      serializer.startTag(null,TAG_VALUE);
      serialize(serializer,o);
      serializer.endTag(null,TAG_VALUE);
    }
    serializer.endTag(null,TAG_DATA).endTag(null,TYPE_ARRAY);
  }
 else   if (object instanceof Map) {
    serializer.startTag(null,TYPE_STRUCT);
    Map<String,Object> map=(Map<String,Object>)object;
    Iterator<Entry<String,Object>> iter=map.entrySet().iterator();
    while (iter.hasNext()) {
      Entry<String,Object> entry=iter.next();
      String key=entry.getKey();
      Object value=entry.getValue();
      serializer.startTag(null,TAG_MEMBER);
      serializer.startTag(null,TAG_NAME).text(key).endTag(null,TAG_NAME);
      serializer.startTag(null,TAG_VALUE);
      serialize(serializer,value);
      serializer.endTag(null,TAG_VALUE);
      serializer.endTag(null,TAG_MEMBER);
    }
    serializer.endTag(null,TYPE_STRUCT);
  }
 else {
    throw new IOException("String_Node_Str" + object);
  }
}