Buggy code:
class ConfigurationClassParser { private static final Comparator < ConfigurationClassParser . DeferredImportSelectorHolder > DEFERRED_IMPORT_COMPARATOR = new Comparator < ConfigurationClassParser . DeferredImportSelectorHolder > ( ) { @ Override public int compare ( ConfigurationClassParser . DeferredImportSelectorHolder o1 , ConfigurationClassParser . DeferredImportSelectorHolder o2 ) { } } ; private final MetadataReaderFactory metadataReaderFactory ; private final ProblemReporter problemReporter ; private final Environment environment ; private final ResourceLoader resourceLoader ; private final BeanDefinitionRegistry registry ; private final ComponentScanAnnotationParser componentScanParser ; private final Set < ConfigurationClass > configurationClasses = new LinkedHashSet < ConfigurationClass > ( ) ; private final Map < String , ConfigurationClass > knownSuperclasses = new HashMap < String , ConfigurationClass > ( ) ; private final MultiValueMap < String , PropertySource < ? > > propertySources = new org . springframework . util . LinkedMultiValueMap < String , PropertySource < ? > > ( ) ; private final ConfigurationClassParser . ImportStack importStack = new ConfigurationClassParser . ImportStack ( ) ; private final List < ConfigurationClassParser . DeferredImportSelectorHolder > deferredImportSelectors = new LinkedList < ConfigurationClassParser . DeferredImportSelectorHolder > ( ) ; private final ConditionEvaluator conditionEvaluator ; public ConfigurationClassParser ( MetadataReaderFactory metadataReaderFactory , ProblemReporter problemReporter , Environment environment , ResourceLoader resourceLoader , BeanNameGenerator componentScanBeanNameGenerator , BeanDefinitionRegistry registry ) { } public void parse ( Set < BeanDefinitionHolder > configCandidates ) { } protected final void parse ( String className , String beanName ) throws IOException { } protected final void parse ( Class < ? > clazz , String beanName ) throws IOException { } protected void processConfigurationClass ( ConfigurationClass configClass ) throws IOException { } protected final ConfigurationClassParser . SourceClass doProcessConfigurationClass ( ConfigurationClass configClass , ConfigurationClassParser . SourceClass sourceClass ) throws IOException { processMemberClasses ( configClass , sourceClass ) ; for ( AnnotationAttributes propertySource : AnnotationConfigUtils . attributesForRepeatable ( sourceClass . getMetadata ( ) , PropertySources . class , PropertySource . class ) ) { processPropertySource ( propertySource ) ; } AnnotationAttributes componentScan = AnnotationConfigUtils . attributesFor ( sourceClass . getMetadata ( ) , ComponentScan . class ) ; if ( componentScan != null ) { if ( ! ( this . conditionEvaluator . shouldSkip ( sourceClass . getMetadata ( ) , REGISTER_BEAN ) ) ) { Set < BeanDefinitionHolder > scannedBeanDefinitions = this . componentScanParser . parse ( componentScan , sourceClass . getMetadata ( ) . getClassName ( ) ) ; for ( BeanDefinitionHolder holder : scannedBeanDefinitions ) { if ( ConfigurationClassUtils . checkConfigurationClassCandidate ( holder . getBeanDefinition ( ) , this . metadataReaderFactory ) ) { parse ( holder . getBeanDefinition ( ) . getBeanClassName ( ) , holder . getBeanName ( ) ) ; } } } } processImports ( configClass , sourceClass , getImports ( sourceClass ) , true ) ; if ( sourceClass . getMetadata ( ) . isAnnotated ( ImportResource . class . getName ( ) ) ) { AnnotationAttributes importResource = AnnotationConfigUtils . attributesFor ( sourceClass . getMetadata ( ) , ImportResource . class ) ; String [ ] resources = importResource . getStringArray ( "value" ) ; Class < ? extends BeanDefinitionReader > readerClass = importResource . getClass ( "reader" ) ; for ( String resource : resources ) { String resolvedResource = this . environment . resolveRequiredPlaceholders ( resource ) ; configClass . addImportedResource ( resolvedResource , readerClass ) ; } } Set < MethodMetadata > beanMethods = sourceClass . getMetadata ( ) . getAnnotatedMethods ( Bean . class . getName ( ) ) ; for ( MethodMetadata methodMetadata : beanMethods ) { configClass . addBeanMethod ( new BeanMethod ( methodMetadata , configClass ) ) ; } if ( sourceClass . getMetadata ( ) . hasSuperClass ( ) ) { String superclass = sourceClass . getMetadata ( ) . getSuperClassName ( ) ; <START_BUG> if ( ! ( this . knownSuperclasses . containsKey ( superclass ) ) ) { <END_BUG> this . knownSuperclasses . put ( superclass , configClass ) ; try { return sourceClass . getSuperClass ( ) ; } catch ( ClassNotFoundException ex ) { throw new IllegalStateException ( ex ) ; } } } return null ; } private void processMemberClasses ( ConfigurationClass configClass , ConfigurationClassParser . SourceClass sourceClass ) throws IOException { } private void processPropertySource ( AnnotationAttributes propertySource ) throws IOException { } private Set < ConfigurationClassParser . SourceClass > getImports ( ConfigurationClassParser . SourceClass sourceClass ) throws IOException { } private void collectImports ( ConfigurationClassParser . SourceClass sourceClass , Set < ConfigurationClassParser . SourceClass > imports , Set < ConfigurationClassParser . SourceClass > visited ) throws IOException { } private void processDeferredImportSelectors ( ) { } private void processImports ( ConfigurationClass configClass , ConfigurationClassParser . SourceClass currentSourceClass , Collection < ConfigurationClassParser . SourceClass > importCandidates , boolean checkForCircularImports ) throws IOException { } private void invokeAwareMethods ( Object importStrategyBean ) { } public void validate ( ) { } public Set < ConfigurationClass > getConfigurationClasses ( ) { } public List < PropertySource < ? > > getPropertySources ( ) { } private PropertySource < ? > collatePropertySources ( String name , List < PropertySource < ? > > propertySources ) { } ConfigurationClassParser . ImportRegistry getImportRegistry ( ) { } public ConfigurationClassParser . SourceClass asSourceClass ( ConfigurationClass configurationClass ) throws IOException { } public ConfigurationClassParser . SourceClass asSourceClass ( Class < ? > classType ) throws IOException , ClassNotFoundException { } public Collection < ConfigurationClassParser . SourceClass > asSourceClasses ( String [ ] classNames ) throws IOException , ClassNotFoundException { } public ConfigurationClassParser . SourceClass asSourceClass ( String className ) throws IOException , ClassNotFoundException { } interface ImportRegistry { AnnotationMetadata getImportingClassFor ( String importedClass ) { } } @ SuppressWarnings ( "serial" ) private static class ImportStack extends Stack < ConfigurationClass > implements ConfigurationClassParser . ImportRegistry { private final Map < String , AnnotationMetadata > imports = new HashMap < String , AnnotationMetadata > ( ) ; public void registerImport ( AnnotationMetadata importingClass , String importedClass ) { } @ Override public AnnotationMetadata getImportingClassFor ( String importedClass ) { }

Fix:
if ( ( ! ( superclass . startsWith ( "java" ) ) ) && ( ! ( this . knownSuperclasses . containsKey ( superclass ) ) ) ) {