Program: 111726
Project: 111726
Buggy source:
private ConfigurableApplicationContext bootstrapServiceContext(ConfigurableEnvironment environment,final SpringApplication application){
  StandardEnvironment bootstrapEnvironment=new StandardEnvironment();
  MutablePropertySources bootstrapProperties=bootstrapEnvironment.getPropertySources();
  for (  PropertySource<?> source : bootstrapProperties) {
    bootstrapProperties.remove(source.getName());
  }
  String configName=environment.resolvePlaceholders("String_Node_Str");
  String configLocation=environment.resolvePlaceholders("String_Node_Str");
  Map<String,Object> bootstrapMap=new HashMap<>();
  bootstrapMap.put("String_Node_Str",configName);
  if (StringUtils.hasText(configLocation)) {
    bootstrapMap.put("String_Node_Str",configName);
  }
  bootstrapProperties.addFirst(new MapPropertySource(BOOTSTRAP_PROPERTY_SOURCE_NAME,bootstrapMap));
  bootstrapProperties.addFirst(new MapPropertySource("String_Node_Str",Collections.<String,Object>emptyMap()));
  for (  PropertySource<?> source : environment.getPropertySources()) {
    bootstrapProperties.addLast(source);
  }
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  List<String> names=SpringFactoriesLoader.loadFactoryNames(BootstrapConfiguration.class,classLoader);
  SpringApplicationBuilder builder=new SpringApplicationBuilder().profiles(environment.getActiveProfiles()).showBanner(false).environment(bootstrapEnvironment).properties("String_Node_Str" + configName).web(false);
  List<Class<?>> sources=new ArrayList<>();
  for (  String name : names) {
    Class<?> cls=ClassUtils.resolveClassName(name,null);
    try {
      cls.getDeclaredAnnotations();
    }
 catch (    Exception e) {
      continue;
    }
    sources.add(cls);
  }
  builder.sources(sources.toArray(new Class[sources.size()]));
  final ConfigurableApplicationContext context=builder.run();
  addAncestorInitializer(application,context);
  bootstrapProperties.remove("String_Node_Str");
  return context;
}

Fixed version (ground truth):
private ConfigurableApplicationContext bootstrapServiceContext(ConfigurableEnvironment environment,final SpringApplication application){
  StandardEnvironment bootstrapEnvironment=new StandardEnvironment();
  MutablePropertySources bootstrapProperties=bootstrapEnvironment.getPropertySources();
  for (  PropertySource<?> source : bootstrapProperties) {
    bootstrapProperties.remove(source.getName());
  }
  String configName=environment.resolvePlaceholders("String_Node_Str");
  String configLocation=environment.resolvePlaceholders("String_Node_Str");
  Map<String,Object> bootstrapMap=new HashMap<>();
  bootstrapMap.put("String_Node_Str",configName);
  if (StringUtils.hasText(configLocation)) {
    bootstrapMap.put("String_Node_Str",configLocation);
  }
  bootstrapProperties.addFirst(new MapPropertySource(BOOTSTRAP_PROPERTY_SOURCE_NAME,bootstrapMap));
  bootstrapProperties.addFirst(new MapPropertySource("String_Node_Str",Collections.<String,Object>emptyMap()));
  for (  PropertySource<?> source : environment.getPropertySources()) {
    bootstrapProperties.addLast(source);
  }
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  List<String> names=SpringFactoriesLoader.loadFactoryNames(BootstrapConfiguration.class,classLoader);
  SpringApplicationBuilder builder=new SpringApplicationBuilder().profiles(environment.getActiveProfiles()).showBanner(false).environment(bootstrapEnvironment).properties("String_Node_Str" + configName).web(false);
  List<Class<?>> sources=new ArrayList<>();
  for (  String name : names) {
    Class<?> cls=ClassUtils.resolveClassName(name,null);
    try {
      cls.getDeclaredAnnotations();
    }
 catch (    Exception e) {
      continue;
    }
    sources.add(cls);
  }
  builder.sources(sources.toArray(new Class[sources.size()]));
  final ConfigurableApplicationContext context=builder.run();
  addAncestorInitializer(application,context);
  bootstrapProperties.remove("String_Node_Str");
  return context;
}