Program: 10924
Project: 10924
Buggy source:
/** 
 * This class returns the Spring KurentoApplicationContext, which is the parent context for all specific Kurento Servlet contexts. In case a pre-exiting Spring root WebApplicationContext if found, the returned KurentoApplicationContext will be made child of this root context. When necessary, this method creates the KurentoApplicationContext, so it should never return null. This method MUST NOT be called in ServletContextListeners, given that at that stage there might not be information about the presence of a root Spring root WebApplicationConext.
 * @param ctx
 * @return
 */
public static AnnotationConfigApplicationContext createKurentoApplicationContext(ServletContext ctx){
  Assert.notNull(ctx,"String_Node_Str");
  Assert.isNull(kurentoApplicationContextInternalReference,"String_Node_Str");
  kurentoApplicationContextInternalReference=new AnnotationConfigApplicationContext();
  kurentoApplicationContextInternalReference.scan("String_Node_Str");
  WebApplicationContext rootContext=WebApplicationContextUtils.getWebApplicationContext(ctx);
  if (rootContext != null) {
    kurentoApplicationContextInternalReference.setParent(rootContext);
  }
  kurentoApplicationContextInternalReference.refresh();
  return kurentoApplicationContextInternalReference;
}

Fixed version (ground truth):
/** 
 * This class returns the Spring KurentoApplicationContext, which is the parent context for all specific Kurento Servlet contexts. In case a pre-exiting Spring root WebApplicationContext if found, the returned KurentoApplicationContext will be made child of this root context. When necessary, this method creates the KurentoApplicationContext, so it should never return null. This method MUST NOT be called in ServletContextListeners, given that at that stage there might not be information about the presence of a root Spring root WebApplicationConext.
 * @param ctx
 * @return
 */
public static AnnotationConfigApplicationContext createKurentoApplicationContext(ServletContext ctx){
  Assert.notNull(ctx,"String_Node_Str");
  Assert.isNull(kurentoApplicationContextInternalReference,"String_Node_Str");
  kurentoApplicationContextInternalReference=new AnnotationConfigApplicationContext();
  kurentoApplicationContextInternalReference.scan("String_Node_Str");
  WebApplicationContext rootContext=WebApplicationContextUtils.getWebApplicationContext(ctx);
  if (rootContext != null) {
    kurentoApplicationContextInternalReference.setParent(rootContext);
  }
  ServletContextResource servletContextResource=new ServletContextResource(ctx,"String_Node_Str");
  if (servletContextResource.exists()) {
    log.info("String_Node_Str");
    Properties properties=new Properties();
    try {
      properties.load(servletContextResource.getInputStream());
    }
 catch (    IOException e) {
      log.error("String_Node_Str",e);
      throw new RuntimeException(e);
    }
    PropertyOverrideConfigurer propertyOverrideConfigurer=new PropertyOverrideConfigurer();
    propertyOverrideConfigurer.setProperties(properties);
    kurentoApplicationContextInternalReference.addBeanFactoryPostProcessor(propertyOverrideConfigurer);
  }
  kurentoApplicationContextInternalReference.refresh();
  return kurentoApplicationContextInternalReference;
}