Buggy code:
public final class ASHelper { public static final String CONTAINER_NAME = "org.jboss.wsf.spi.invocation.ContainerName" ; private static final Logger LOGGER = Logger . getLogger ( ASHelper . class ) ; private ASHelper ( ) { } public static boolean isWebServiceDeployment ( final DeploymentUnit unit ) { } public static List < ServletMetaData > getJaxwsServlets ( final DeploymentUnit unit ) { } public static List < ServletMetaData > getJaxrpcServlets ( final DeploymentUnit unit ) { } public static List < WebServiceDeclaration > getJaxwsEjbs ( final DeploymentUnit unit ) { } public static String getEndpointName ( final ServletMetaData servletMD ) { } public static String getEndpointClassName ( final ServletMetaData servletMD ) { } public static ServletMetaData getServletForName ( final JBossWebMetaData jbossWebMD , final String servletName ) { } public static < A > A getRequiredAttachment ( final DeploymentUnit unit , final AttachmentKey < A > key ) { } public static < A > A getOptionalAttachment ( final DeploymentUnit unit , final AttachmentKey < A > key ) { } public static WebserviceDescriptionMetaData getWebserviceDescriptionMetaData ( final WebserviceDescriptionsMetaData wsDescriptionsMD ) { } private static List < ServletMetaData > getWebServiceServlets ( final DeploymentUnit unit , final boolean jaxws ) { final JBossWebMetaData jbossWebMD = ASHelper . getJBossWebMetaData ( unit ) ; <START_BUG> return ASHelper . selectWebServiceServlets ( unit , jbossWebMD . getServlets ( ) , jaxws ) ; <END_BUG> } private static < T extends ServletMetaData > List < ServletMetaData > selectWebServiceServlets ( final DeploymentUnit unit , final Collection < T > smd , final boolean jaxws ) { } private static boolean isWebserviceEndpoint ( final ServletMetaData servletMD , final CompositeIndex index , boolean jaxws ) { } private static boolean isWebserviceEndpoint ( final ServletMetaData servletMD , final ClassLoader loader , boolean jaxws ) { } private static Class < ? > getEndpointClass ( final String endpointClassName , final ClassLoader loader ) { } private static boolean isJSP ( final String endpointClassName ) { } public static boolean isServlet ( final ClassInfo info , CompositeIndex index ) { } private static boolean isServlet ( final ClassInfo info , CompositeIndex index , Set < DotName > interfaces ) { } private static boolean extendsServlet ( DotName current , CompositeIndex index , Set < DotName > interfacesToProcess , Set < DotName > processedInterfaces ) { } public static boolean isJaxwsService ( final ClassInfo current , final CompositeIndex index ) { } public static boolean isJaxwsService ( final ClassInfo current , final Index index ) { } public static JBossWebMetaData getJBossWebMetaData ( final DeploymentUnit unit ) { } public static List < AnnotationInstance > getAnnotations ( final DeploymentUnit unit , final DotName annotation ) { } public static boolean isJaxrpcEjbDeployment ( final DeploymentUnit unit ) { } public static boolean isJaxrpcJseDeployment ( final DeploymentUnit unit ) { } public static boolean isJaxwsEjbDeployment ( final DeploymentUnit unit ) { } public static boolean isJaxwsJseDeployment ( final DeploymentUnit unit ) { } public static WSReferences getWSRefRegistry ( final DeploymentUnit unit ) { } }

Fix:
return ASHelper . selectWebServiceServlets ( unit , ( jbossWebMD != null ? jbossWebMD . getServlets ( ) : null ) , jaxws ) ;