Program: 15583
Project: 15583
Buggy source:
/** 
 * Called from   {@link #init()} to create the {@link ObjectWrapper}; to customzie this aspect, in most cases you should override   {@link #createDefaultObjectWrapper()} instead. Overriding this method is necessary when you wantto customize how the  {@link ObjectWrapper} is created <em>from the init-param values</em>, or you want to do somepost-processing (like checking) on the created  {@link ObjectWrapper}. To customize init-param interpretation, call   {@link #getInitParameter(String)} with {@link Configurable#OBJECT_WRAPPER_KEY} as argument, and see if itreturns a value that you want to interpret yourself. If was  {@code null} or you don't want to interpret thevalue, fall back to the super method. <p> The default implementation interprets the  {@code object_wrapper} servlet init-param withcalling  {@link Configurable#setSetting(String,String)} (see valid values there), or if there's no such servletinit-param, then it calls  {@link #createDefaultObjectWrapper()}.
 * @return The {@link ObjectWrapper} that will be used for adapting request, session, and servlet context attributesto  {@link TemplateModel}-s, and also as the object wrapper setting of   {@link Configuration}.
 */
protected ObjectWrapper createObjectWrapper(){
  String wrapper=getServletConfig().getInitParameter(DEPR_INITPARAM_OBJECT_WRAPPER);
  if (wrapper != null) {
    if (getInitParameter(Configurable.OBJECT_WRAPPER_KEY) != null) {
      throw new RuntimeException("String_Node_Str" + Configurable.OBJECT_WRAPPER_KEY + "String_Node_Str"+ DEPR_INITPARAM_OBJECT_WRAPPER);
    }
    if (DEPR_INITPARAM_WRAPPER_BEANS.equals(wrapper)) {
      return ObjectWrapper.BEANS_WRAPPER;
    }
    if (DEPR_INITPARAM_WRAPPER_SIMPLE.equals(wrapper)) {
      return ObjectWrapper.SIMPLE_WRAPPER;
    }
    if (DEPR_INITPARAM_WRAPPER_JYTHON.equals(wrapper)) {
      try {
        return (ObjectWrapper)Class.forName("String_Node_Str").newInstance();
      }
 catch (      InstantiationException e) {
        throw new InstantiationError(e.getMessage());
      }
catch (      IllegalAccessException e) {
        throw new IllegalAccessError(e.getMessage());
      }
catch (      ClassNotFoundException e) {
        throw new NoClassDefFoundError(e.getMessage());
      }
    }
    return createDefaultObjectWrapper();
  }
 else {
    wrapper=getInitParameter(Configurable.OBJECT_WRAPPER_KEY);
    if (wrapper == null) {
      return createDefaultObjectWrapper();
    }
 else {
      try {
        config.setSetting(Configurable.OBJECT_WRAPPER_KEY,wrapper);
      }
 catch (      TemplateException e) {
        throw new RuntimeException("String_Node_Str" + Configurable.OBJECT_WRAPPER_KEY,e);
      }
      return config.getObjectWrapper();
    }
  }
}

Fixed version (ground truth):
/** 
 * Called from   {@link #init()} to create the {@link ObjectWrapper}; to customzie this aspect, in most cases you should override   {@link #createDefaultObjectWrapper()} instead. Overriding this method is necessary when you wantto customize how the  {@link ObjectWrapper} is created <em>from the init-param values</em>, or you want to do somepost-processing (like checking) on the created  {@link ObjectWrapper}. To customize init-param interpretation, call   {@link #getInitParameter(String)} with {@link Configurable#OBJECT_WRAPPER_KEY} as argument, and see if itreturns a value that you want to interpret yourself. If was  {@code null} or you don't want to interpret thevalue, fall back to the super method. <p> The default implementation interprets the  {@code object_wrapper} servlet init-param withcalling  {@link Configurable#setSetting(String,String)} (see valid values there), or if there's no such servletinit-param, then it calls  {@link #createDefaultObjectWrapper()}.
 * @return The {@link ObjectWrapper} that will be used for adapting request, session, and servlet context attributesto  {@link TemplateModel}-s, and also as the object wrapper setting of   {@link Configuration}.
 */
protected ObjectWrapper createObjectWrapper(){
  String wrapper=getServletConfig().getInitParameter(DEPR_INITPARAM_OBJECT_WRAPPER);
  if (wrapper != null) {
    if (getInitParameter(Configurable.OBJECT_WRAPPER_KEY) != null) {
      throw new RuntimeException("String_Node_Str" + Configurable.OBJECT_WRAPPER_KEY + "String_Node_Str"+ DEPR_INITPARAM_OBJECT_WRAPPER);
    }
    if (DEPR_INITPARAM_WRAPPER_BEANS.equals(wrapper)) {
      return ObjectWrapper.BEANS_WRAPPER;
    }
    if (DEPR_INITPARAM_WRAPPER_SIMPLE.equals(wrapper)) {
      return ObjectWrapper.SIMPLE_WRAPPER;
    }
    if (DEPR_INITPARAM_WRAPPER_JYTHON.equals(wrapper)) {
      try {
        return (ObjectWrapper)Class.forName("String_Node_Str").newInstance();
      }
 catch (      InstantiationException e) {
        throw new InstantiationError(e.getMessage());
      }
catch (      IllegalAccessException e) {
        throw new IllegalAccessError(e.getMessage());
      }
catch (      ClassNotFoundException e) {
        throw new NoClassDefFoundError(e.getMessage());
      }
    }
    return createDefaultObjectWrapper();
  }
 else {
    wrapper=getInitParameter(Configurable.OBJECT_WRAPPER_KEY);
    if (wrapper == null) {
      if (!config.isObjectWrapperExplicitlySet()) {
        return createDefaultObjectWrapper();
      }
 else {
        return config.getObjectWrapper();
      }
    }
 else {
      try {
        config.setSetting(Configurable.OBJECT_WRAPPER_KEY,wrapper);
      }
 catch (      TemplateException e) {
        throw new RuntimeException("String_Node_Str" + Configurable.OBJECT_WRAPPER_KEY,e);
      }
      return config.getObjectWrapper();
    }
  }
}