Buggy code:
public class WSDeploymentAspectParser { private static final String NS = "urn:jboss:ws:deployment:aspects:1.0" ; private static final String DEPLOYMENT_ASPECTS = "deploymentAspects" ; private static final String DEPLOYMENT_ASPECT = "deploymentAspect" ; private static final String CLASS = "class" ; private static final String PRIORITY = "priority" ; private static final String PROPERTY = "property" ; private static final String NAME = "name" ; private static final String MAP = "map" ; private static final String KEY_CLASS = "keyClass" ; private static final String VALUE_CLASS = "valueClass" ; private static final String ENTRY = "entry" ; private static final String KEY = "key" ; private static final String VALUE = "value" ; private static final String LIST = "list" ; private static final String ELEMENT_CLASS = "elementClass" ; public static List < DeploymentAspect > parse ( InputStream is ) { } public static List < DeploymentAspect > parse ( XMLStreamReader reader ) throws XMLStreamException { } private static List < DeploymentAspect > parseDeploymentAspects ( XMLStreamReader reader ) throws XMLStreamException { } private static DeploymentAspect parseDeploymentAspect ( XMLStreamReader reader ) throws XMLStreamException { String deploymentAspectClass = reader . getAttributeValue ( null , WSDeploymentAspectParser . CLASS ) ; if ( deploymentAspectClass == null ) { throw new IllegalStateException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>class<seq2seq4repair_space>attribute<seq2seq4repair_space>for<seq2seq4repair_space>deployment<seq2seq4repair_space>aspect!" ) ; } DeploymentAspect deploymentAspect = null ; try { @ SuppressWarnings ( "unchecked" ) Class < ? extends DeploymentAspect > clazz = ( ( Class < ? extends DeploymentAspect > ) ( Class . forName ( deploymentAspectClass ) ) ) ; deploymentAspect = clazz . newInstance ( ) ; } catch ( Exception e ) { throw new IllegalStateException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>deploymeny<seq2seq4repair_space>aspect<seq2seq4repair_space>of<seq2seq4repair_space>class:<seq2seq4repair_space>" + deploymentAspectClass ) , e ) ; } <START_BUG> String priority = reader . getAttributeValue ( "" , WSDeploymentAspectParser . PRIORITY ) ; <END_BUG> if ( priority != null ) { deploymentAspect . setRelativeOrder ( Integer . parseInt ( priority . trim ( ) ) ) ; } while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case XMLStreamConstants . END_ELEMENT : { if ( match ( reader , WSDeploymentAspectParser . NS , WSDeploymentAspectParser . DEPLOYMENT_ASPECT ) ) { return deploymentAspect ; } else { throw new IllegalStateException ( ( "Unexpected<seq2seq4repair_space>end<seq2seq4repair_space>tag:<seq2seq4repair_space>" + ( reader . getLocalName ( ) ) ) ) ; } } case XMLStreamConstants . START_ELEMENT : { if ( match ( reader , WSDeploymentAspectParser . NS , WSDeploymentAspectParser . PROPERTY ) ) { WSDeploymentAspectParser . parseProperty ( reader , deploymentAspect ) ; } else { throw new IllegalStateException ( ( "Unexpected<seq2seq4repair_space>element:<seq2seq4repair_space>" + ( reader . getLocalName ( ) ) ) ) ; } } } } throw new IllegalStateException ( "Reached<seq2seq4repair_space>end<seq2seq4repair_space>of<seq2seq4repair_space>xml<seq2seq4repair_space>document<seq2seq4repair_space>unexpectedly" ) ; } @ SuppressWarnings ( "rawtypes" ) private static void parseProperty ( XMLStreamReader reader , DeploymentAspect deploymentAspect ) throws XMLStreamException { } private static Method selectMethod ( Class < ? > deploymentAspectClass , String propName , String propClass ) throws ClassNotFoundException { } private static boolean isSupportedPropertyClass ( String propClass ) { } private static Object parseSimpleValue ( XMLStreamReader reader , String propClass ) throws XMLStreamException { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private static List parseListProperty ( XMLStreamReader reader , String propClass , String elementClass ) throws XMLStreamException { } @ SuppressWarnings ( "rawtypes" ) private static Map parseMapProperty ( XMLStreamReader reader , String propClass , String keyClass , String valueClass ) throws XMLStreamException { } @ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private static void parseMapEntry ( XMLStreamReader reader , Map map , String keyClass , String valueClass ) throws XMLStreamException { } }

Fix:
String priority = reader . getAttributeValue ( null , WSDeploymentAspectParser . PRIORITY ) ;