#vulnerable code 
                              public CodeGenerator newCodeGenerator(final AviatorClassLoader classLoader) {
    switch (getOptimizeLevel()) {
      case AviatorEvaluator.COMPILE:
        ASMCodeGenerator asmCodeGenerator = new ASMCodeGenerator(this, classLoader,
            this.traceOutputStream, getOptionValue(Options.TRACE).bool);
        asmCodeGenerator.start();
        return asmCodeGenerator;
      case AviatorEvaluator.EVAL:
        return new OptimizeCodeGenerator(this, classLoader, this.traceOutputStream,
            getOptionValue(Options.TRACE).bool);
      default:
        throw new IllegalArgumentException("Unknow option " + getOptimizeLevel());
    }
  } 
                            #location 5 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                              public CodeGenerator newCodeGenerator(final AviatorClassLoader classLoader) {
    switch (getOptimizeLevel()) {
      case AviatorEvaluator.COMPILE:
        ASMCodeGenerator asmCodeGenerator =
            new ASMCodeGenerator(this, classLoader, this.traceOutputStream);
        asmCodeGenerator.start();
        return asmCodeGenerator;
      case AviatorEvaluator.EVAL:
        return new OptimizeCodeGenerator(this, classLoader, this.traceOutputStream);
      default:
        throw new IllegalArgumentException("Unknow option " + getOptimizeLevel());
    }
  }