Program: 114734
Project: 114734
Buggy source:
private void construct(){
  com.espertech.esper.client.Configuration config=new com.espertech.esper.client.Configuration();
  config.addEventType(Event.class);
  Set<Class<? extends Event>> eventTypes=ReflectionUtil.getSubtypesOf(Event.class);
  for (  Class<? extends Event> eventType : eventTypes)   config.addEventType(eventType);
  config.addImport(IntoMethod.class);
  if (timeProvider != null) {
    config.getEngineDefaults().getThreading().setInternalTimerEnabled(false);
  }
  epService=EPServiceProviderManager.getDefaultProvider(config);
  if (timeProvider != null) {
    lastTime=timeProvider.getInitialTime();
    final EPServiceProviderImpl epService1=(EPServiceProviderImpl)epService;
    epService1.initialize(lastTime.getMillis());
  }
  epRuntime=epService.getEPRuntime();
  epAdministrator=epService.getEPAdministrator();
  injector=Guice.createInjector(new Module(){
    public void configure(    Binder binder){
      binder.bind(Context.class).toInstance(Context.this);
      binder.bindListener(Matchers.any(),new ProvisionListener(){
        public <T>void onProvision(        ProvisionInvocation<T> tProvisionInvocation){
          T provision=tProvisionInvocation.provision();
          subscribe(provision);
        }
      }
);
      binder.bindListener(Matchers.any(),new TypeListener(){
        public <I>void hear(        TypeLiteral<I> typeLiteral,        TypeEncounter<I> typeEncounter){
          for (Class<?> c=typeLiteral.getRawType(); c != Object.class; c=c.getSuperclass()) {
            for (            final Field field : c.getDeclaredFields()) {
              if (field.getType().isAssignableFrom(Logger.class)) {
                typeEncounter.register(new MembersInjector<I>(){
                  public void injectMembers(                  I i){
                    try {
                      boolean wasAccessible=field.isAccessible();
                      field.setAccessible(true);
                      if (field.get(i) == null) {
                        field.set(i,LoggerFactory.getLogger(field.getDeclaringClass()));
                      }
                      field.setAccessible(wasAccessible);
                    }
 catch (                    IllegalAccessException e) {
                      e.printStackTrace();
                    }
                  }
                }
);
              }
            }
          }
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
private void construct(){
  final com.espertech.esper.client.Configuration esperConfig=new com.espertech.esper.client.Configuration();
  esperConfig.addEventType(Event.class);
  Set<Class<? extends Event>> eventTypes=ReflectionUtil.getSubtypesOf(Event.class);
  for (  Class<? extends Event> eventType : eventTypes)   esperConfig.addEventType(eventType);
  esperConfig.addImport(IntoMethod.class);
  if (timeProvider != null) {
    esperConfig.getEngineDefaults().getThreading().setInternalTimerEnabled(false);
  }
  epService=EPServiceProviderManager.getDefaultProvider(esperConfig);
  if (timeProvider != null) {
    lastTime=timeProvider.getInitialTime();
    final EPServiceProviderImpl epService1=(EPServiceProviderImpl)epService;
    epService1.initialize(lastTime.getMillis());
  }
  epRuntime=epService.getEPRuntime();
  epAdministrator=epService.getEPAdministrator();
  config=Config.combined();
  injector=Guice.createInjector(new Module(){
    public void configure(    Binder binder){
      binder.bind(Context.class).toInstance(Context.this);
      binder.bind(Configuration.class).toInstance(Context.this.config);
      binder.bindListener(Matchers.any(),new ProvisionListener(){
        public <T>void onProvision(        ProvisionInvocation<T> tProvisionInvocation){
          T provision=tProvisionInvocation.provision();
          subscribe(provision);
        }
      }
);
      binder.bindListener(Matchers.any(),new TypeListener(){
        public <I>void hear(        TypeLiteral<I> typeLiteral,        TypeEncounter<I> typeEncounter){
          for (Class<?> c=typeLiteral.getRawType(); c != Object.class; c=c.getSuperclass()) {
            for (            final Field field : c.getDeclaredFields()) {
              if (field.getType().isAssignableFrom(Logger.class)) {
                typeEncounter.register(new MembersInjector<I>(){
                  public void injectMembers(                  I i){
                    try {
                      boolean wasAccessible=field.isAccessible();
                      field.setAccessible(true);
                      if (field.get(i) == null) {
                        field.set(i,LoggerFactory.getLogger(field.getDeclaringClass()));
                      }
                      field.setAccessible(wasAccessible);
                    }
 catch (                    IllegalAccessException e) {
                      e.printStackTrace();
                    }
                  }
                }
);
              }
            }
          }
        }
      }
);
    }
  }
);
}