Program: 155515
Project: 155515
Buggy source:
/** 
 * Build a map of direct javabeans properties of the target object. Only read/write properties (ie: those who have both a getter and a setter) are returned.
 * @param target the target object from which to get properties names.
 * @return a Map of String with properties names as key and their values
 * @throws PropertyException if an error happened while trying to get a property.
 */
public static Map getProperties(Object target) throws PropertyException {
  Map properties=new HashMap();
  Class clazz=target.getClass();
  Method[] methods=clazz.getMethods();
  for (int i=0; i < methods.length; i++) {
    Method method=methods[i];
    String name=method.getName();
    if (method.getModifiers() == Modifier.PUBLIC && method.getParameterTypes().length == 0 && (name.startsWith("String_Node_Str") || name.startsWith("String_Node_Str")) && containsSetterForGetter(clazz,method)) {
      String propertyName=Character.toLowerCase(name.charAt(3)) + name.substring(4);
      try {
        Object propertyValue=method.invoke(target,(Object[])null);
        if (propertyValue != null && propertyValue instanceof Properties) {
          Map propertiesContent=getNestedProperties(propertyName,(Properties)propertyValue);
          properties.putAll(propertiesContent);
        }
 else {
          properties.put(propertyName,propertyValue);
        }
      }
 catch (      IllegalAccessException ex) {
        throw new PropertyException("String_Node_Str" + propertyName + "String_Node_Str"+ name+ "String_Node_Str",ex);
      }
catch (      InvocationTargetException ex) {
        throw new PropertyException("String_Node_Str" + propertyName + "String_Node_Str"+ name+ "String_Node_Str",ex);
      }
    }
  }
  return properties;
}

Fixed version (ground truth):
/** 
 * Build a map of direct javabeans properties of the target object. Only read/write properties (ie: those who have both a getter and a setter) are returned.
 * @param target the target object from which to get properties names.
 * @return a Map of String with properties names as key and their values
 * @throws PropertyException if an error happened while trying to get a property.
 */
public static Map getProperties(Object target) throws PropertyException {
  Map properties=new HashMap();
  Class clazz=target.getClass();
  Method[] methods=clazz.getMethods();
  for (int i=0; i < methods.length; i++) {
    Method method=methods[i];
    String name=method.getName();
    if (method.getModifiers() == Modifier.PUBLIC && method.getParameterTypes().length == 0 && (name.startsWith("String_Node_Str") || name.startsWith("String_Node_Str")) && containsSetterForGetter(clazz,method)) {
      String propertyName;
      if (name.startsWith("String_Node_Str"))       propertyName=Character.toLowerCase(name.charAt(3)) + name.substring(4);
 else       if (name.startsWith("String_Node_Str"))       propertyName=Character.toLowerCase(name.charAt(2)) + name.substring(3);
 else       throw new PropertyException("String_Node_Str" + name + "String_Node_Str");
      try {
        Object propertyValue=method.invoke(target,(Object[])null);
        if (propertyValue != null && propertyValue instanceof Properties) {
          Map propertiesContent=getNestedProperties(propertyName,(Properties)propertyValue);
          properties.putAll(propertiesContent);
        }
 else {
          properties.put(propertyName,propertyValue);
        }
      }
 catch (      IllegalAccessException ex) {
        throw new PropertyException("String_Node_Str" + propertyName + "String_Node_Str"+ name+ "String_Node_Str",ex);
      }
catch (      InvocationTargetException ex) {
        throw new PropertyException("String_Node_Str" + propertyName + "String_Node_Str"+ name+ "String_Node_Str",ex);
      }
    }
  }
  return properties;
}