Buggy code:
@ WebService ( endpointInterface = "eu.wisebed.api.rs.RS" , portName = "RSPort" , serviceName = "RSService" , targetNamespace = "urn:RSService" ) public class SingleUrnPrefixRS implements RS { private static final Logger log = LoggerFactory . getLogger ( SingleUrnPrefixRS . class ) ; @ Inject @ Named ( "SingleUrnPrefixRS.urnPrefix" ) private String urnPrefix ; @ Inject private SNAA snaa ; @ Inject private RSPersistence persistence ; @ Inject @ Nullable @ Named ( "SingleUrnPrefixRS.servedNodeUrns" ) private Provider < String [ ] > servedNodeUrns ; @ WebResult ( name = "secretReservationKey" ) @ Override public List < SecretReservationKey > makeReservation ( @ WebParam ( name = "authenticationData" , targetNamespace = "" ) List < SecretAuthenticationKey > authenticationData , @ WebParam ( name = "reservation" ) ConfidentialReservationData reservation ) throws AuthorizationExceptionException , RSExceptionException , ReservervationConflictExceptionException { } private List < SecretReservationKey > makeReservationInternal ( final ConfidentialReservationData reservation , final SecretAuthenticationKey secretAuthenticationKey ) throws RSExceptionException { } @ Override public List < ConfidentialReservationData > getReservation ( @ WebParam ( name = "secretReservationKey" ) List < SecretReservationKey > secretReservationKeys ) throws RSExceptionException , ReservervationNotFoundExceptionException { } @ Override public void deleteReservation ( @ WebParam ( name = "authenticationData" , targetNamespace = "" ) List < SecretAuthenticationKey > authenticationData , @ WebParam ( name = "secretReservationKey" , targetNamespace = "" ) List < SecretReservationKey > secretReservationKeys ) throws RSExceptionException , ReservervationNotFoundExceptionException { } private void checkNotAlreadyStarted ( final ConfidentialReservationData reservation ) throws RSExceptionException { } @ Override public List < PublicReservationData > getReservations ( @ WebParam ( name = "from" , targetNamespace = "" ) XMLGregorianCalendar from , @ WebParam ( name = "to" , targetNamespace = "" ) XMLGregorianCalendar to ) throws RSExceptionException { } @ Override public List < ConfidentialReservationData > getConfidentialReservations ( @ WebParam ( name = "secretAuthenticationKey" , targetNamespace = "" ) List < SecretAuthenticationKey > secretAuthenticationKeys , @ WebParam ( name = "period" , targetNamespace = "" ) GetReservations period ) throws RSExceptionException { } public void checkArgumentValidAuthentication ( List < SecretAuthenticationKey > authenticationData ) throws RSExceptionException { } private boolean checkAuthentication ( SecretAuthenticationKey key , Action action ) throws AuthenticationExceptionException , AuthorizationExceptionException , RSExceptionException { } private void checkAuthorization ( final SecretAuthenticationKey secretAuthenticationKey , final Action action ) throws AuthorizationExceptionException , RSExceptionException { } private RSExceptionException createRSExceptionException ( String message ) { } private AuthorizationExceptionException createAuthorizationExceptionException ( AuthenticationExceptionException e ) { } private PublicReservationData convertToPublic ( ConfidentialReservationData confidentialReservationData ) { } private void checkNodesServed ( List < String > nodeUrns ) throws RSExceptionException { for ( String nodeUrn : nodeUrns ) { if ( ! ( nodeUrn . startsWith ( urnPrefix ) ) ) { throw createRSExceptionException ( ( ( ( "Not<seq2seq4repair_space>responsible<seq2seq4repair_space>for<seq2seq4repair_space>node<seq2seq4repair_space>URN<seq2seq4repair_space>" + nodeUrn ) + ",<seq2seq4repair_space>only<seq2seq4repair_space>serving<seq2seq4repair_space>prefix:<seq2seq4repair_space>" ) + ( urnPrefix ) ) ) ; } } <START_BUG> if ( ( servedNodeUrns . get ( ) ) != null ) { <END_BUG> String [ ] networkNodes ; try { networkNodes = servedNodeUrns . get ( ) ; } catch ( Exception e ) { throw createRSExceptionException ( e . getMessage ( ) ) ; } List < String > unservedNodes = new LinkedList < String > ( ) ; boolean contained ; for ( String nodeUrn : nodeUrns ) { contained = false ; for ( String networkNode : networkNodes ) { if ( networkNode . equalsIgnoreCase ( nodeUrn ) ) { contained = true ; } } if ( ! contained ) { unservedNodes . add ( nodeUrn ) ; } } if ( ( unservedNodes . size ( ) ) > 0 ) { throw createRSExceptionException ( ( ( "The<seq2seq4repair_space>node<seq2seq4repair_space>URNs<seq2seq4repair_space>" + ( Arrays . toString ( unservedNodes . toArray ( ) ) ) ) + "<seq2seq4repair_space>are<seq2seq4repair_space>unknown<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>reservation<seq2seq4repair_space>system!" ) ) ; } } else { SingleUrnPrefixRS . log . debug ( "Not<seq2seq4repair_space>checking<seq2seq4repair_space>session<seq2seq4repair_space>management<seq2seq4repair_space>endpoint<seq2seq4repair_space>for<seq2seq4repair_space>node<seq2seq4repair_space>URN<seq2seq4repair_space>validity<seq2seq4repair_space>as<seq2seq4repair_space>no<seq2seq4repair_space>endpoint<seq2seq4repair_space>is<seq2seq4repair_space>configured." ) ; } } private void checkArgumentValid ( PublicReservationData reservation ) throws RSExceptionException { } private void checkArgumentValidReservation ( List < SecretReservationKey > secretReservationKeys ) throws RSExceptionException { } private void checkNodesAvailable ( PublicReservationData reservation ) throws RSExceptionException , ReservervationConflictExceptionException { } private List < ConfidentialReservationData > throwRSExceptionException ( final Exception cause ) throws RSExceptionException { } private void checkArgumentValid ( final GetReservations period ) throws RSExceptionException { } private List < PublicReservationData > convertToPublic ( List < ConfidentialReservationData > confidentialReservationDataList ) { } }

Fix:
if ( ( ( servedNodeUrns ) != null ) && ( ( servedNodeUrns . get ( ) ) != null ) ) {