Buggy code:
protected DateFormats dateFormats ; private ProcessBuilder processBuilder ; private IllegalArgumentException processBuilderCreationFailure ; private PMMLCompiler pmmlCompiler ; private Map < String , TypeDeclaration > builtinTypes ; private Map < String , TypeDeclaration > cacheTypes ; private Map < String , Map < String , AttributeDescr > > packageAttributes = new HashMap < String , Map < String , AttributeDescr > > ( ) ; private Map < String , List < PackageDescr > > packages = new HashMap < String , List < PackageDescr > > ( ) ; private Set < String > generatedTypes = new HashSet < String > ( ) ; public PackageBuilder ( ) { } public PackageBuilder ( final Package pkg ) { } public PackageBuilder ( final RuleBase ruleBase ) { } public PackageBuilder ( final PackageBuilderConfiguration configuration ) { } public PackageBuilder ( Package pkg , PackageBuilderConfiguration configuration ) { } public PackageBuilder ( RuleBase ruleBase , PackageBuilderConfiguration configuration ) { } private void initBuiltinTypeDeclarations ( ) { } private ProcessBuilder createProcessBuilder ( ) { } private PMMLCompiler getPMMLCompiler ( ) { } public void addPackageFromDrl ( final Reader reader ) throws IOException , DroolsParserException { } public void addPackageFromDrl ( final Reader reader , final Resource sourceResource ) throws IOException , DroolsParserException { } public void addPackageFromDecisionTable ( Resource resource , ResourceConfiguration configuration ) throws IOException , DroolsParserException { } public void addPackageFromDrl ( Resource resource ) throws IOException , DroolsParserException { } public void addPackageFromXml ( final Reader reader ) throws IOException , DroolsParserException { } public void addPackageFromXml ( final Resource resource ) throws IOException , DroolsParserException { } public void addPackageFromDrl ( final Reader source , final Reader dsl ) throws IOException , DroolsParserException { } public void addPackageFromDslr ( final Resource resource ) throws IOException , DroolsParserException { } public void addPackageFromBrl ( final Resource resource ) throws DroolsParserException { } public void addDsl ( Resource resource ) throws IOException { } public void addRuleFlow ( Reader processSource ) { } public void addProcessFromXml ( Resource resource ) { } public void addProcessFromXml ( Reader processSource ) { } public void addKnowledgeResource ( Resource resource , ResourceType type , ResourceConfiguration configuration ) { } private Set < Resource > resourceDirectories = new HashSet < Resource > ( ) ; public void addPackage ( final PackageDescr packageDescr ) { } private boolean checkNamespace ( String newName ) { } public boolean isEmpty ( String string ) { } public void updateResults ( ) { } public void compileAll ( ) { } public void reloadAll ( ) { } private List getResults ( List results ) { } public synchronized void addPackage ( final Package newPkg ) { } private void mergePackage ( final Package pkg , final Package newPkg ) { } private void validateUniqueRuleNames ( final PackageDescr packageDescr ) { } private PackageRegistry newPackage ( final PackageDescr packageDescr ) { } private void mergePackage ( final PackageDescr packageDescr ) { } public TypeDeclaration getTypeDeclaration ( Class < ? > cls ) { } public void buildTypeDeclarations ( Class < ? > cls , Set < TypeDeclaration > tdecls ) { } public boolean buildTypeDeclarationInterfaces ( Class cls , Set < TypeDeclaration > tdecls ) { } private String resolveType ( String sup , PackageDescr packageDescr , PackageRegistry pkgRegistry ) { for ( ImportDescr id : packageDescr . getImports ( ) ) { if ( id . getTarget ( ) . endsWith ( ( "." + sup ) ) ) { return id . getTarget ( ) ; } } if ( pkgRegistry != null ) { for ( String declaredName : pkgRegistry . getPackage ( ) . getTypeDeclarations ( ) . keySet ( ) ) { <START_BUG> if ( declaredName . endsWith ( sup ) ) <END_BUG> sup = pkgRegistry . getPackage ( ) . getTypeDeclaration ( declaredName ) . getTypeClass ( ) . getName ( ) ; } } if ( ( ( sup != null ) && ( ! ( sup . contains ( "." ) ) ) ) && ( ( ( packageDescr . getNamespace ( ) ) != null ) && ( ( packageDescr . getNamespace ( ) . length ( ) ) > 0 ) ) ) { for ( AbstractClassTypeDeclarationDescr td : packageDescr . getClassAndEnumDeclarationDescrs ( ) ) { if ( sup . equals ( td . getTypeName ( ) ) ) sup = ( ( packageDescr . getNamespace ( ) ) + "." ) + sup ; } } return sup ; } private void fillSuperType ( TypeDeclarationDescr typeDescr , PackageDescr packageDescr ) { } private void fillFieldTypes ( AbstractClassTypeDeclarationDescr typeDescr , PackageDescr packageDescr ) { } private boolean mergeInheritedFields ( TypeDeclarationDescr typeDescr ) { } private boolean mergeInheritedFields ( String simpleSuperTypeName , String superTypePackageName , String fullSuper , TypeDeclarationDescr typeDescr ) { } private void processEntryPointDeclarations ( final PackageDescr packageDescr ) { } private void processTypeDeclarations ( final PackageDescr packageDescr ) { } private boolean processTypeFields ( PackageRegistry pkgRegistry , AbstractClassTypeDeclarationDescr typeDescr , TypeDeclaration type , boolean firstAttempt ) { } void registerGeneratedType ( AbstractClassTypeDeclarationDescr typeDescr ) { } private void updateTraitDefinition ( TypeDeclaration type , Class concrete ) { } private boolean isNovelClass ( AbstractClassTypeDeclarationDescr typeDescr ) { } private Class resolveAnnotation ( String annotation , TypeResolver resolver ) { } private final void buildFieldAccessors ( final TypeDeclaration type , final PackageRegistry pkgRegistry ) throws IntrospectionException , IOException , ClassNotFoundException , IllegalAccessException , IllegalArgumentException , InstantiationException , NoSuchFieldException , NoSuchMethodException , SecurityException , InvocationTargetException { } private void generateDeclaredBean ( AbstractClassTypeDeclarationDescr typeDescr , TypeDeclaration type , PackageRegistry pkgRegistry ) { } private void generateDeclaredBean ( AbstractClassTypeDeclarationDescr typeDescr , TypeDeclaration type , PackageRegistry pkgRegistry , ClassDefinition def ) { } private PriorityQueue < FieldDefinition > sortFields ( Map < String , TypeFieldDescr > flds , PackageRegistry pkgRegistry ) { } private void addFunction ( final FunctionDescr functionDescr ) { } private void preCompileAddFunction ( final FunctionDescr functionDescr ) { } private void postCompileAddFunction ( final FunctionDescr functionDescr ) { }

Fix:
if ( declaredName . equals ( sup ) )