Program: 30335
Project: 30335
Buggy source:
/** 
 * Find a method with the right name If found, call the method ( if param is int or boolean we'll convert value to the right type before) - that means you can have setDebug(1).
 */
public static boolean setProperty(Object o,String name,String value){
  if (debugLevel > 1) {
    debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
  }
  String setter="String_Node_Str" + capitalize(name);
  try {
    Method methods[]=findMethods(o.getClass());
    Method setPropertyMethodVoid=null;
    Method setPropertyMethodBool=null;
    for (    Method method : methods) {
      Class<?> paramTypes[]=method.getParameterTypes();
      if (setter.equals(method.getName()) && paramTypes.length == 1 && "String_Node_Str".equals(paramTypes[0].getName())) {
        method.invoke(o,value);
        return true;
      }
    }
    for (    Method method : methods) {
      boolean ok=true;
      if (setter.equals(method.getName()) && method.getParameterTypes().length == 1) {
        Class<?> paramType=method.getParameterTypes()[0];
        Object params[]=new Object[1];
        if ("String_Node_Str".equals(paramType.getName()) || "String_Node_Str".equals(paramType.getName())) {
          try {
            params[0]=new Integer(value);
          }
 catch (          NumberFormatException ex) {
            ok=false;
          }
        }
 else         if ("String_Node_Str".equals(paramType.getName()) || "String_Node_Str".equals(paramType.getName())) {
          try {
            params[0]=new Long(value);
          }
 catch (          NumberFormatException ex) {
            ok=false;
          }
        }
 else         if ("String_Node_Str".equals(paramType.getName()) || "String_Node_Str".equals(paramType.getName())) {
          params[0]=new Boolean(value);
        }
 else         if ("String_Node_Str".equals(paramType.getName())) {
          try {
            params[0]=InetAddress.getByName(value);
          }
 catch (          UnknownHostException exc) {
            debug("String_Node_Str" + value);
            ok=false;
          }
        }
 else {
          debug("String_Node_Str" + paramType.getName());
        }
        if (ok) {
          method.invoke(o,params);
          return true;
        }
      }
      if ("String_Node_Str".equals(method.getName())) {
        if (method.getReturnType().equals(Boolean.TYPE)) {
          setPropertyMethodBool=method;
        }
 else {
          setPropertyMethodVoid=method;
        }
      }
    }
    if (setPropertyMethodBool != null || setPropertyMethodVoid != null) {
      Object params[]=new Object[2];
      params[0]=name;
      params[1]=value;
      if (setPropertyMethodBool != null) {
        try {
          return (Boolean)setPropertyMethodBool.invoke(o,params);
        }
 catch (        IllegalArgumentException biae) {
          if (setPropertyMethodVoid != null) {
            setPropertyMethodVoid.invoke(o,params);
            return true;
          }
 else {
            throw biae;
          }
        }
      }
 else {
        setPropertyMethodVoid.invoke(o,params);
        return true;
      }
    }
  }
 catch (  IllegalArgumentException ex2) {
    logger.log(Level.INFO,"String_Node_Str" + o + "String_Node_Str"+ name+ "String_Node_Str"+ value,ex2);
  }
catch (  SecurityException ex1) {
    if (debugLevel > 0) {
      debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
    }
    if (debugLevel > 1) {
      ex1.printStackTrace();
    }
  }
catch (  IllegalAccessException iae) {
    if (debugLevel > 0) {
      debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
    }
    if (debugLevel > 1) {
      iae.printStackTrace();
    }
  }
catch (  InvocationTargetException ie) {
    if (debugLevel > 0) {
      debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
    }
    if (debugLevel > 1) {
      ie.printStackTrace();
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Find a method with the right name If found, call the method ( if param is int or boolean we'll convert value to the right type before) - that means you can have setDebug(1).
 */
public static boolean setProperty(Object o,String name,String value){
  if (debugLevel > 1) {
    debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
  }
  String setter="String_Node_Str" + capitalize(name);
  try {
    Method methods[]=findMethods(o.getClass());
    Method setPropertyMethodVoid=null;
    Method setPropertyMethodBool=null;
    for (    Method method : methods) {
      Class<?> paramTypes[]=method.getParameterTypes();
      if (setter.equals(method.getName()) && paramTypes.length == 1 && "String_Node_Str".equals(paramTypes[0].getName())) {
        method.invoke(o,value);
        return true;
      }
    }
    for (    Method method : methods) {
      boolean ok=true;
      if (setter.equals(method.getName()) && method.getParameterTypes().length == 1) {
        Class<?> paramType=method.getParameterTypes()[0];
        Object params[]=new Object[1];
        if ("String_Node_Str".equals(paramType.getName()) || "String_Node_Str".equals(paramType.getName())) {
          try {
            params[0]=new Integer(value);
          }
 catch (          NumberFormatException ex) {
            ok=false;
          }
        }
 else         if ("String_Node_Str".equals(paramType.getName()) || "String_Node_Str".equals(paramType.getName())) {
          try {
            params[0]=new Long(value);
          }
 catch (          NumberFormatException ex) {
            ok=false;
          }
        }
 else         if ("String_Node_Str".equals(paramType.getName()) || "String_Node_Str".equals(paramType.getName())) {
          params[0]=Boolean.valueOf(value);
        }
 else         if ("String_Node_Str".equals(paramType.getName())) {
          try {
            params[0]=InetAddress.getByName(value);
          }
 catch (          UnknownHostException exc) {
            debug("String_Node_Str" + value);
            ok=false;
          }
        }
 else {
          debug("String_Node_Str" + paramType.getName());
        }
        if (ok) {
          method.invoke(o,params);
          return true;
        }
      }
      if ("String_Node_Str".equals(method.getName())) {
        if (method.getReturnType().equals(Boolean.TYPE)) {
          setPropertyMethodBool=method;
        }
 else {
          setPropertyMethodVoid=method;
        }
      }
    }
    if (setPropertyMethodBool != null || setPropertyMethodVoid != null) {
      Object params[]=new Object[2];
      params[0]=name;
      params[1]=value;
      if (setPropertyMethodBool != null) {
        try {
          return (Boolean)setPropertyMethodBool.invoke(o,params);
        }
 catch (        IllegalArgumentException biae) {
          if (setPropertyMethodVoid != null) {
            setPropertyMethodVoid.invoke(o,params);
            return true;
          }
 else {
            throw biae;
          }
        }
      }
 else {
        setPropertyMethodVoid.invoke(o,params);
        return true;
      }
    }
  }
 catch (  IllegalArgumentException ex2) {
    logger.log(Level.INFO,"String_Node_Str" + o + "String_Node_Str"+ name+ "String_Node_Str"+ value,ex2);
  }
catch (  SecurityException ex1) {
    if (debugLevel > 0) {
      debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
    }
    if (debugLevel > 1) {
      ex1.printStackTrace();
    }
  }
catch (  IllegalAccessException iae) {
    if (debugLevel > 0) {
      debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
    }
    if (debugLevel > 1) {
      iae.printStackTrace();
    }
  }
catch (  InvocationTargetException ie) {
    if (debugLevel > 0) {
      debug("String_Node_Str" + o.getClass() + "String_Node_Str"+ name+ "String_Node_Str"+ value+ "String_Node_Str");
    }
    if (debugLevel > 1) {
      ie.printStackTrace();
    }
  }
  return false;
}