Program: 137557
Project: 137557
Buggy source:
/** 
 * DOC mzhao feature 11128, If the execute engine and by the same time Java User Defined Indicator is also defined, then compute via Java UDI, here convert common udi to a Java UDI.
 * @param udi
 * @return
 * @throws Exception
 */
public static Indicator adaptToJavaUDI(Indicator indicator) throws Throwable {
  if (JAVAUDIMAP.get(indicator) != null) {
    return JAVAUDIMAP.get(indicator);
  }
  if (JAVAUDIMAP.values().contains(indicator)) {
    return indicator;
  }
  UserDefIndicator adaptedUDI=null;
  if (userDefIndSwitch.doSwitch(indicator) != null) {
    EList<TaggedValue> taggedValues=indicator.getIndicatorDefinition().getTaggedValue();
    String userJavaClassName=null;
    String jarPath=null;
    for (    TaggedValue tv : taggedValues) {
      if (tv.getTag().equals(TaggedValueHelper.CLASS_NAME_TEXT)) {
        userJavaClassName=tv.getValue();
        continue;
      }
      if (tv.getTag().equals(TaggedValueHelper.JAR_FILE_PATH)) {
        jarPath=tv.getValue();
      }
    }
    if (validateJavaUDI(userJavaClassName,jarPath)) {
      List<URL> jarUrls=new ArrayList<URL>();
      for (      File file : getContainJarFile(jarPath)) {
        jarUrls.add(file.toURI().toURL());
      }
      TalendURLClassLoader cl;
      cl=new TalendURLClassLoader(jarUrls.toArray(new URL[jarUrls.size()]));
      Class<?> clazz=null;
      clazz=cl.findClass(userJavaClassName);
      if (clazz != null) {
        UserDefIndicator judi=(UserDefIndicator)clazz.newInstance();
        PropertyUtils.copyProperties(judi,indicator);
        adaptedUDI=judi;
        JAVAUDIMAP.put(indicator,adaptedUDI);
      }
    }
  }
  return adaptedUDI;
}

Fixed version (ground truth):
/** 
 * DOC mzhao feature 11128, If the execute engine and by the same time Java User Defined Indicator is also defined, then compute via Java UDI, here convert common udi to a Java UDI.
 * @param udi
 * @return
 * @throws Exception
 */
public static Indicator adaptToJavaUDI(Indicator indicator) throws Throwable {
  Indicator returnIndicator=getUDIFromMap(indicator);
  if (returnIndicator != null) {
    return returnIndicator;
  }
  UserDefIndicator adaptedUDI=null;
  if (userDefIndSwitch.doSwitch(indicator) != null) {
    EList<TaggedValue> taggedValues=indicator.getIndicatorDefinition().getTaggedValue();
    String userJavaClassName=null;
    String jarPath=null;
    for (    TaggedValue tv : taggedValues) {
      if (tv.getTag().equals(TaggedValueHelper.CLASS_NAME_TEXT)) {
        userJavaClassName=tv.getValue();
        continue;
      }
      if (tv.getTag().equals(TaggedValueHelper.JAR_FILE_PATH)) {
        jarPath=tv.getValue();
      }
    }
    if (validateJavaUDI(userJavaClassName,jarPath)) {
      List<URL> jarUrls=new ArrayList<URL>();
      for (      File file : getContainJarFile(jarPath)) {
        jarUrls.add(file.toURI().toURL());
      }
      TalendURLClassLoader cl;
      cl=new TalendURLClassLoader(jarUrls.toArray(new URL[jarUrls.size()]));
      Class<?> clazz=null;
      clazz=cl.findClass(userJavaClassName);
      if (clazz != null) {
        UserDefIndicator judi=(UserDefIndicator)clazz.newInstance();
        PropertyUtils.copyProperties(judi,indicator);
        adaptedUDI=judi;
        JAVAUDIMAP.put(indicator,adaptedUDI);
      }
    }
  }
  return adaptedUDI;
}