<commit_before>/*
 * Created on 8 Feb 2007
 */
package org.sakaiproject.evaluation.tool;

import java.util.HashMap;
import java.util.Map;

import org.sakaiproject.evaluation.model.EvalResponse;

import uk.org.ponder.beanutil.BeanLocator;

public class ResponseAnswersBeanLocator implements BeanLocator {
  public static final String NEW_PREFIX = "new";

  private ResponseBeanLocator responseBeanLocator;

  private Map delivered = new HashMap();

  private LocalResponsesLogic localResponsesLogic;

  public void setLocalResponsesLogic(LocalResponsesLogic localResponsesLogic) {
    this.localResponsesLogic = localResponsesLogic;
  }
  
  public void setResponseBeanLocator(ResponseBeanLocator responseBeanLocator) {
    this.responseBeanLocator = responseBeanLocator;
  }

  public Object locateBean(String path) {
    BeanLocator togo = (BeanLocator) delivered.get(path);
    if (togo == null) {
      
      EvalResponse parent = (EvalResponse) responseBeanLocator.locateBean(path);
      togo = new AnswersBeanLocator(parent, localResponsesLogic);
      delivered.put(path, togo);<commit_msg>commented out a line that was causing a compile error<commit_after>/*
 * Created on 8 Feb 2007
 */
package org.sakaiproject.evaluation.tool;

import java.util.HashMap;
import java.util.Map;

import org.sakaiproject.evaluation.model.EvalResponse;

import uk.org.ponder.beanutil.BeanLocator;

public class ResponseAnswersBeanLocator implements BeanLocator {
  public static final String NEW_PREFIX = "new";

  private ResponseBeanLocator responseBeanLocator;

  private Map delivered = new HashMap();

  private LocalResponsesLogic localResponsesLogic;

  public void setLocalResponsesLogic(LocalResponsesLogic localResponsesLogic) {
    this.localResponsesLogic = localResponsesLogic;
  }
  
  public void setResponseBeanLocator(ResponseBeanLocator responseBeanLocator) {
    this.responseBeanLocator = responseBeanLocator;
  }

  public Object locateBean(String path) {
    BeanLocator togo = (BeanLocator) delivered.get(path);
    if (togo == null) {
      
      EvalResponse parent = (EvalResponse) responseBeanLocator.locateBean(path);
      //togo = new AnswersBeanLocator(parent, localResponsesLogic);
      delivered.put(path, togo);
{'fraction_non_alphanumeric': 0.07685433422698838, 'fraction_numerical': 0.004468275245755138, 'mean_word_length': 4.954787234042553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3636574', 'n_tokens_mistral': 704, 'n_tokens_neox': 675, 'n_words': 150}