Program: 85516
Project: 85516
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 callAnonymizingFunctionWithoutParameters(final Connection dbConn,final Column column) 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);
    final Method[] methods=clazz.getMethods();
    Method selectedMethod=null;
    Object returnType=null;
    methodLoop:     for (    final Method m : methods) {
      if (m.getName().equals(methodName)) {
        log.debug("String_Node_Str" + m.getName());
        selectedMethod=m;
        returnType=m.getReturnType();
        break;
      }
    }
    if (selectedMethod == null) {
      final StringBuilder s=new StringBuilder("String_Node_Str");
      s.append(methodName).append("String_Node_Str").append(className);
      throw new NoSuchMethodException(s.toString());
    }
    log.debug("String_Node_Str" + methodName);
    final Object anonymizedValue=selectedMethod.invoke(instance);
    if (anonymizedValue == null) {
      return null;
    }
    if (returnType == String.class) {
      return anonymizedValue.toString();
    }
 else     if (returnType == java.sql.Date.class) {
      return anonymizedValue;
    }
  }
 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 callAnonymizingFunctionWithoutParameters(final Connection dbConn,final Column column) 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);
    final Method[] methods=clazz.getMethods();
    Method selectedMethod=null;
    Object returnType=null;
    methodLoop:     for (    final Method m : methods) {
      if (m.getName().equals(methodName)) {
        log.debug("String_Node_Str" + m.getName());
        selectedMethod=m;
        returnType=m.getReturnType();
        break;
      }
    }
    if (selectedMethod == null) {
      final StringBuilder s=new StringBuilder("String_Node_Str");
      s.append(methodName).append("String_Node_Str").append(className);
      throw new NoSuchMethodException(s.toString());
    }
    log.debug("String_Node_Str" + methodName);
    final Object anonymizedValue=selectedMethod.invoke(instance);
    log.info("String_Node_Str" + anonymizedValue);
    if (anonymizedValue == null) {
      return null;
    }
    log.info(returnType.toString());
    if (returnType == String.class) {
      return anonymizedValue.toString();
    }
 else     if (returnType == java.sql.Date.class) {
      return anonymizedValue;
    }
 else     if (returnType.toString().equals("String_Node_Str")) {
      return anonymizedValue;
    }
  }
 catch (  AnonymizerException|InstantiationException|ClassNotFoundException ex) {
    log.error(ex.toString());
  }
  return "String_Node_Str";
}