Buggy code:
public class WarAnnotationDeploymentProcessor implements DeploymentUnitProcessor { private static final DotName webFilter = DotName . createSimple ( WebFilter . class . getName ( ) ) ; private static final DotName webListener = DotName . createSimple ( WebListener . class . getName ( ) ) ; private static final DotName webServlet = DotName . createSimple ( WebServlet . class . getName ( ) ) ; private static final DotName runAs = DotName . createSimple ( RunAs . class . getName ( ) ) ; private static final DotName declareRoles = DotName . createSimple ( DeclareRoles . class . getName ( ) ) ; private static final DotName multipartConfig = DotName . createSimple ( MultipartConfig . class . getName ( ) ) ; private static final DotName servletSecurity = DotName . createSimple ( ServletSecurity . class . getName ( ) ) ; public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } public void undeploy ( final DeploymentUnit context ) { } protected WebMetaData processAnnotations ( Index index , ClassLoader classLoader ) throws DeploymentUnitProcessingException { Web30MetaData metaData = new Web30MetaData ( ) ; AnnotationFinder < AnnotatedElement > finder = new org . jboss . metadata . annotation . finder . DefaultAnnotationFinder < AnnotatedElement > ( ) ; final List < AnnotationInstance > webServletAnnotations = index . getAnnotations ( WarAnnotationDeploymentProcessor . webServlet ) ; if ( ( webServletAnnotations != null ) && ( ( webServletAnnotations . size ( ) ) > 0 ) ) { WebServletProcessor processor = new WebServletProcessor ( finder ) ; for ( final AnnotationInstance annotation : webServletAnnotations ) { AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( ( "@WebServlet<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>allowed<seq2seq4repair_space>at<seq2seq4repair_space>class<seq2seq4repair_space>level<seq2seq4repair_space>" + target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; Class < ? > type = null ; try { type = classLoader . loadClass ( classInfo . name ( ) . toString ( ) ) ; } catch ( Exception e ) { <START_BUG> throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>process<seq2seq4repair_space>@WebServlet<seq2seq4repair_space>on<seq2seq4repair_space>" + target ) ) ; <END_BUG> } if ( type != null ) { processor . process ( metaData , type ) ; } } } final List < AnnotationInstance > webFilterAnnotations = index . getAnnotations ( WarAnnotationDeploymentProcessor . webFilter ) ; if ( ( webFilterAnnotations != null ) && ( ( webFilterAnnotations . size ( ) ) > 0 ) ) { WebFilterProcessor processor = new WebFilterProcessor ( finder ) ; for ( final AnnotationInstance annotation : webFilterAnnotations ) { AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( ( "@WebFilter<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>allowed<seq2seq4repair_space>at<seq2seq4repair_space>class<seq2seq4repair_space>level<seq2seq4repair_space>" + target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; Class < ? > type = null ; try { type = classLoader . loadClass ( classInfo . name ( ) . toString ( ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>process<seq2seq4repair_space>@WebFilter<seq2seq4repair_space>on<seq2seq4repair_space>" + target ) ) ; } if ( type != null ) { processor . process ( metaData , type ) ; } } } final List < AnnotationInstance > webListenerAnnotations = index . getAnnotations ( WarAnnotationDeploymentProcessor . webListener ) ; if ( ( webListenerAnnotations != null ) && ( ( webListenerAnnotations . size ( ) ) > 0 ) ) { WebListenerProcessor processor = new WebListenerProcessor ( finder ) ; for ( final AnnotationInstance annotation : webListenerAnnotations ) { AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( ( "@WebListener<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>allowed<seq2seq4repair_space>at<seq2seq4repair_space>class<seq2seq4repair_space>level<seq2seq4repair_space>" + target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; Class < ? > type = null ; try { type = classLoader . loadClass ( classInfo . name ( ) . toString ( ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>process<seq2seq4repair_space>@WebListener<seq2seq4repair_space>on<seq2seq4repair_space>" + target ) ) ; } if ( type != null ) { processor . process ( metaData , type ) ; } } } final List < AnnotationInstance > runAsAnnotations = index . getAnnotations ( WarAnnotationDeploymentProcessor . runAs ) ; if ( ( runAsAnnotations != null ) && ( ( runAsAnnotations . size ( ) ) > 0 ) ) { RunAsProcessor processor = new RunAsProcessor ( finder ) ; AnnotationsMetaData annotations = metaData . getAnnotations ( ) ; if ( annotations == null ) { annotations = new AnnotationsMetaData ( ) ; metaData . setAnnotations ( annotations ) ; } for ( final AnnotationInstance annotation : runAsAnnotations ) { AnnotationTarget target = annotation . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( ( "@RunAs<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>allowed<seq2seq4repair_space>at<seq2seq4repair_space>class<seq2seq4repair_space>level<seq2seq4repair_space>" + target ) ) ; } ClassInfo classInfo = ClassInfo . class . cast ( target ) ; Class < ? > type = null ; try { type = classLoader . loadClass ( classInfo . name ( ) . toString ( ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>process<seq2seq4repair_space>@RunAs<seq2seq4repair_space>on<seq2seq4repair_space>" + target ) ) ; } if ( type != null ) { processor . process ( annotations , type ) ; } } } final List < AnnotationInstance > declareRolesAnnotations = index . getAnnotations ( WarAnnotationDeploymentProcessor . declareRoles ) ; if ( ( declareRolesAnnotations != null ) && ( ( declareRolesAnnotations . size ( ) ) > 0 ) ) { DeclareRolesProcessor processor = new DeclareRolesProcessor ( finder ) ; SecurityRolesMetaData securityRoles = metaData . getSecurityRoles ( ) ; if ( securityRoles == null ) { securityRoles = new SecurityRolesMetaData ( ) ; metaData . setSecurityRoles ( securityRoles ) ; } for ( final AnnotationInstance annotation : declareRolesAnnotations ) { AnnotationTarget target = annotation . target ( ) ;

Fix:
throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>process<seq2seq4repair_space>@WebServlet<seq2seq4repair_space>on<seq2seq4repair_space>" + target ) , e ) ;