Buggy code:
public class AzureDisk extends AbstractVolumeSupport { private static final Logger logger = Azure . getLogger ( AzureDisk . class ) ; private static final String DISK_SERVICES = "//services//disks" ; private static final String HOSTED_SERVICES = "//services//hostedservices" ; public static final String DEPLOYMENT_RESOURCE = "//services//hostedservices//%s//deployments//%s" ; public static final String DATA_DISK_LUN = "//services//hostedservices//%s//deployments//%s//roles//%s//DataDisks//%s" ; public static final String DATA_DISK_RESOURCE = "//services//hostedservices//%s//deployments//%s//roles//%s//DataDisks" ; private Azure provider ; public AzureDisk ( Azure provider ) { } @ Override public void attach ( @ Nonnull String volumeId , @ Nonnull String toServer , @ Nonnull String device ) throws CloudException , InternalException { } @ Override @ Nonnull public String createVolume ( @ Nonnull VolumeCreateOptions options ) throws CloudException , InternalException { } private void waitForOperation ( String requestId ) throws CloudException , InternalException { } private String getDataDiskName ( VirtualMachine virtualMachine , String lun ) throws CloudException , InternalException { } private Integer getDataDisksCount ( VirtualMachine virtualMachine ) throws CloudException , InternalException { } @ Override public void detach ( @ Nonnull String volumeId , boolean force ) throws CloudException , InternalException { } private transient volatile AzureDiskCapabilities capabilities ; @ Override public VolumeCapabilities getCapabilities ( ) throws CloudException , InternalException { } private String getDiskLun ( String providerVolumeId , String providerVirtualMachineId ) throws CloudException , InternalException { } @ Override public int getMaximumVolumeCount ( ) throws CloudException , InternalException { } @ Override @ Nullable public Storage < Gigabyte > getMaximumVolumeSize ( ) throws CloudException , InternalException { } @ Override @ Nonnull public Storage < Gigabyte > getMinimumVolumeSize ( ) throws CloudException , InternalException { } @ Override @ Nonnull public String getProviderTermForVolume ( @ Nonnull Locale locale ) { } @ Override @ Nullable public Volume getVolume ( @ Nonnull String volumeId ) throws CloudException , InternalException { } @ Nonnull @ Override public Requirement getVolumeProductRequirement ( ) throws CloudException , InternalException { } @ Override public boolean isVolumeSizeDeterminedByProduct ( ) throws CloudException , InternalException { } @ Override @ Nonnull public Iterable < String > listPossibleDeviceIds ( @ Nonnull Platform platform ) throws CloudException , InternalException { } @ Nonnull @ Override public Iterable < VolumeFormat > listSupportedFormats ( ) throws CloudException , InternalException { } @ Nonnull @ Override public Iterable < VolumeProduct > listVolumeProducts ( ) throws CloudException , InternalException { } @ Nonnull @ Override public Iterable < ResourceStatus > listVolumeStatus ( ) throws CloudException , InternalException { } @ Override @ Nonnull public Iterable < Volume > listVolumes ( ) throws CloudException , InternalException { } @ Nonnull @ Override public Iterable < Volume > listVolumes ( @ Nullable VolumeFilterOptions volumeFilterOptions ) throws CloudException , InternalException { ProviderContext ctx = provider . getContext ( ) ; if ( ctx == null ) { throw new AzureConfigException ( "No<seq2seq4repair_space>context<seq2seq4repair_space>was<seq2seq4repair_space>specified<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>request" ) ; } AzureMethod method = new AzureMethod ( provider ) ; Document doc = method . getAsXML ( ctx . getAccountNumber ( ) , AzureDisk . DISK_SERVICES ) ; NodeList entries = doc . getElementsByTagName ( "Disk" ) ; ArrayList < Volume > disks = new ArrayList < Volume > ( ) ; for ( int i = 0 ; i < ( entries . getLength ( ) ) ; i ++ ) { Node entry = entries . item ( i ) ; Volume disk = toVolume ( ctx , entry ) ; <START_BUG> if ( disk != null ) { <END_BUG> disks . add ( disk ) ; } } return disks ; } private boolean isWithinDeviceList ( String device ) throws CloudException , InternalException { } @ Override public boolean isSubscribed ( ) throws CloudException , InternalException { } @ Override public void remove ( @ Nonnull String volumeId ) throws CloudException , InternalException { } @ Override public void removeTags ( @ Nonnull String s , @ Nonnull Tag ... tags ) throws CloudException , InternalException { } @ Override public void removeTags ( @ Nonnull String [ ] strings , @ Nonnull Tag ... tags ) throws CloudException , InternalException { } @ Override public void updateTags ( @ Nonnull String s , @ Nonnull Tag ... tags ) throws CloudException , InternalException { } @ Override public void updateTags ( @ Nonnull String [ ] strings , @ Nonnull Tag ... tags ) throws CloudException , InternalException { } @ Override @ Nonnull public String [ ] mapServiceAction ( @ Nonnull ServiceAction action ) { } @ Nullable private Volume toVolume ( @ Nonnull ProviderContext ctx , @ Nullable Node volumeNode ) throws CloudException , InternalException { } @ Nullable private ResourceStatus toStatus ( @ Nonnull ProviderContext ctx , @ Nullable Node volumeNode ) throws CloudException , InternalException { } }

Fix:
if ( ( disk != null ) && ( ( volumeFilterOptions == null ) || ( volumeFilterOptions . matches ( disk ) ) ) ) {