Program: 85502
Project: 85502
Buggy source:
/** 
 * Calls the anonymization function for the given Column, and returns its anonymized value.
 * @param dbConn
 * @param row
 * @param column
 * @return
 * @throws NoSuchMethodException
 * @throws SecurityException
 * @throws IllegalAccessException
 * @throws IllegalArgumentException
 * @throws InvocationTargetException 
 */
private Object callAnonymizingFunctionWithParameters(final Connection dbConn,final ResultSet row,final Column column,String vendor) throws SQLException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
  final String function=column.getFunction();
  if (function == null || function.equals("String_Node_Str")) {
    log.warn("String_Node_Str" + column + "String_Node_Str");
    return "String_Node_Str";
  }
  try {
    final String className=Utils.getClassName(function);
    final String methodName=Utils.getMethodName(function);
    final Class<?> clazz=Class.forName(className);
    final CoreFunctions instance=(CoreFunctions)Class.forName(className).newInstance();
    instance.setDatabaseConnection(dbConn);
    instance.setVendor(vendor);
    final List<Parameter> parms=column.getParameters();
    final Map<String,Object> paramValues=new HashMap<>(parms.size());
    final String columnValue=row.getString(column.getName());
    for (    final Parameter param : parms) {
      if (param.getValue().equals("String_Node_Str")) {
        paramValues.put(param.getName(),columnValue);
      }
 else       if (param.getValue().equals("String_Node_Str") && param.getType().equals("String_Node_Str")) {
        paramValues.put(param.getName(),row);
      }
 else {
        paramValues.put(param.getName(),param.getTypeValue());
      }
    }
    final List<Object> fnArguments=new ArrayList<>(parms.size());
    final Method[] methods=clazz.getMethods();
    Method selectedMethod=null;
    methodLoop:     for (    final Method m : methods) {
      if (m.getName().equals(methodName) && m.getReturnType() == String.class) {
        log.debug("String_Node_Str" + m.getName());
        log.debug("String_Node_Str" + paramValues);
        final java.lang.reflect.Parameter[] mParams=m.getParameters();
        fnArguments.clear();
        for (        final java.lang.reflect.Parameter par : mParams) {
          log.debug("String_Node_Str" + par.getName());
          if (!paramValues.containsKey(par.getName())) {
            continue methodLoop;
          }
          final Object value=paramValues.get(par.getName());
          Class<?> fnParamType=par.getType();
          final Class<?> confParamType=(value == null) ? fnParamType : value.getClass();
          if (fnParamType.isPrimitive() && value == null) {
            continue methodLoop;
          }
          if (ClassUtils.isPrimitiveWrapper(confParamType)) {
            if (!ClassUtils.isPrimitiveOrWrapper(fnParamType)) {
              continue methodLoop;
            }
            fnParamType=ClassUtils.primitiveToWrapper(fnParamType);
          }
          if (!fnParamType.equals(confParamType)) {
            continue methodLoop;
          }
          fnArguments.add(value);
        }
        if (fnArguments.size() != mParams.length || fnArguments.size() < paramValues.size()) {
          continue;
        }
        selectedMethod=m;
        break;
      }
    }
    if (selectedMethod == null) {
      final StringBuilder s=new StringBuilder("String_Node_Str");
      s.append(methodName).append("String_Node_Str");
      String comma="String_Node_Str";
      for (      final Parameter p : parms) {
        s.append(comma).append(p.getType()).append(' ').append(p.getName());
        comma="String_Node_Str";
      }
      s.append("String_Node_Str").append(className);
      throw new NoSuchMethodException(s.toString());
    }
    log.debug("String_Node_Str" + methodName + "String_Node_Str"+ Arrays.toString(fnArguments.toArray()));
    final Object anonymizedValue=selectedMethod.invoke(instance,fnArguments.toArray());
    if (anonymizedValue == null) {
      return null;
    }
    return anonymizedValue.toString();
  }
 catch (  AnonymizerException|InstantiationException|ClassNotFoundException ex) {
    log.error(ex.toString());
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Calls the anonymization function for the given Column, and returns its anonymized value.
 * @param dbConn
 * @param row
 * @param column
 * @return
 * @throws NoSuchMethodException
 * @throws SecurityException
 * @throws IllegalAccessException
 * @throws IllegalArgumentException
 * @throws InvocationTargetException 
 */
private Object callAnonymizingFunctionWithParameters(final Connection dbConn,final ResultSet row,final Column column,String vendor) throws SQLException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
  final String function=column.getFunction();
  if (function == null || function.equals("String_Node_Str")) {
    log.warn("String_Node_Str" + column + "String_Node_Str");
    return "String_Node_Str";
  }
  try {
    final String className=Utils.getClassName(function);
    final String methodName=Utils.getMethodName(function);
    final Class<?> clazz=Class.forName(className);
    final CoreFunctions instance=(CoreFunctions)Class.forName(className).newInstance();
    instance.setDatabaseConnection(dbConn);
    instance.setVendor(vendor);
    final List<Parameter> parms=column.getParameters();
    final Map<String,Object> paramValues=new HashMap<>(parms.size());
    final String columnValue=row.getString(column.getName());
    for (    final Parameter param : parms) {
      if (param.getValue().equals("String_Node_Str")) {
        paramValues.put(param.getName(),columnValue);
      }
 else       if (param.getValue().equals("String_Node_Str") && param.getType().equals("String_Node_Str")) {
        paramValues.put(param.getName(),row);
      }
 else {
        paramValues.put(param.getName(),param.getTypeValue());
      }
    }
    final List<Object> fnArguments=new ArrayList<>(parms.size());
    final Method[] methods=clazz.getMethods();
    Method selectedMethod=null;
    methodLoop:     for (    final Method m : methods) {
      if (m.getName().equals(methodName) && m.getReturnType() == String.class) {
        log.info("String_Node_Str" + m.getName());
        log.info("String_Node_Str" + paramValues);
        final java.lang.reflect.Parameter[] mParams=m.getParameters();
        fnArguments.clear();
        for (        final java.lang.reflect.Parameter par : mParams) {
          log.debug("String_Node_Str" + par.getName());
          if (!paramValues.containsKey(par.getName())) {
            continue methodLoop;
          }
          final Object value=paramValues.get(par.getName());
          Class<?> fnParamType=par.getType();
          final Class<?> confParamType=(value == null) ? fnParamType : value.getClass();
          if (fnParamType.isPrimitive() && value == null) {
            continue methodLoop;
          }
          if (ClassUtils.isPrimitiveWrapper(confParamType)) {
            if (!ClassUtils.isPrimitiveOrWrapper(fnParamType)) {
              continue methodLoop;
            }
            fnParamType=ClassUtils.primitiveToWrapper(fnParamType);
          }
          if (!fnParamType.equals(confParamType)) {
            continue methodLoop;
          }
          fnArguments.add(value);
        }
        if (fnArguments.size() != mParams.length || fnArguments.size() < paramValues.size()) {
          continue;
        }
        selectedMethod=m;
        break;
      }
    }
    if (selectedMethod == null) {
      final StringBuilder s=new StringBuilder("String_Node_Str");
      s.append(methodName).append("String_Node_Str");
      String comma="String_Node_Str";
      for (      final Parameter p : parms) {
        s.append(comma).append(p.getType()).append(' ').append(p.getName());
        comma="String_Node_Str";
      }
      s.append("String_Node_Str").append(className);
      throw new NoSuchMethodException(s.toString());
    }
    log.info("String_Node_Str" + methodName + "String_Node_Str"+ Arrays.toString(fnArguments.toArray()));
    final Object anonymizedValue=selectedMethod.invoke(instance,fnArguments.toArray());
    if (anonymizedValue == null) {
      return null;
    }
    return anonymizedValue.toString();
  }
 catch (  AnonymizerException|InstantiationException|ClassNotFoundException ex) {
    log.error(ex.toString());
  }
  return "String_Node_Str";
}