Program: 20494
Project: 20494
Buggy source:
/** 
 * Parse a properties sub-packet. If any errors occur while de-serializing Java object properties, an exception will be printed and not thrown since a thrown exception will shut down the entire connection. ClassCastExceptions will occur when both the sender and receiver of the packet don't have identical versions of the same class.
 * @param parser the XML parser, positioned at the start of a properties sub-packet.
 * @return a map of the properties.
 * @throws Exception if an error occurs while parsing the properties.
 */
private Map parseProperties(XmlPullParser parser) throws Exception {
  Map properties=new HashMap();
  while (true) {
    int eventType=parser.next();
    if (eventType == XmlPullParser.START_TAG && parser.getName().equals("String_Node_Str")) {
      parser.next();
      parser.next();
      String name=parser.nextText();
      parser.next();
      parser.next();
      String type=parser.getAttributeValue("String_Node_Str","String_Node_Str");
      String valueText=parser.nextText();
      Object value=null;
      if ("String_Node_Str".equals(type)) {
        value=new Integer(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Long(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Float(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Double(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Boolean(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=valueText;
      }
 else       if ("String_Node_Str".equals(type)) {
        try {
          byte[] bytes=StringUtils.decodeBase64(valueText);
          ObjectInputStream in=new ObjectInputStream(new ByteArrayInputStream(bytes));
          value=in.readObject();
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
      if (name != null && value != null) {
        properties.put(name,value);
      }
    }
 else     if (eventType == XmlPullParser.END_TAG) {
      if (parser.getName().equals("String_Node_Str")) {
        break;
      }
    }
  }
  return properties;
}

Fixed version (ground truth):
/** 
 * Parse a properties sub-packet. If any errors occur while de-serializing Java object properties, an exception will be printed and not thrown since a thrown exception will shut down the entire connection. ClassCastExceptions will occur when both the sender and receiver of the packet don't have identical versions of the same class.
 * @param parser the XML parser, positioned at the start of a properties sub-packet.
 * @return a map of the properties.
 * @throws Exception if an error occurs while parsing the properties.
 */
private Map parseProperties(XmlPullParser parser) throws Exception {
  Map properties=new HashMap();
  while (true) {
    int eventType=parser.next();
    if (eventType == XmlPullParser.START_TAG && parser.getName().equals("String_Node_Str")) {
      parser.next();
      eventType=parser.next();
      String name;
      if (eventType == XmlPullParser.TEXT) {
        name=parser.getText();
      }
 else {
        name=parser.nextText();
      }
      parser.next();
      parser.next();
      String type=parser.getAttributeValue("String_Node_Str","String_Node_Str");
      String valueText=parser.nextText();
      Object value=null;
      if ("String_Node_Str".equals(type)) {
        value=new Integer(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Long(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Float(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Double(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=new Boolean(valueText);
      }
 else       if ("String_Node_Str".equals(type)) {
        value=valueText;
      }
 else       if ("String_Node_Str".equals(type)) {
        try {
          byte[] bytes=StringUtils.decodeBase64(valueText);
          ObjectInputStream in=new ObjectInputStream(new ByteArrayInputStream(bytes));
          value=in.readObject();
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
      if (name != null && value != null) {
        properties.put(name,value);
      }
    }
 else     if (eventType == XmlPullParser.END_TAG) {
      if (parser.getName().equals("String_Node_Str")) {
        break;
      }
    }
  }
  return properties;
}