Buggy code:
public class VolumeManager { private static final int VOL_CREATE_RETRIES = 10 ; private static Logger LOG = Logger . getLogger ( VolumeManager . class ) ; public CreateVolumeResponseType CreateVolume ( final CreateVolumeType request ) throws AuthException , EucalyptusCloudException { } public DeleteVolumeResponseType DeleteVolume ( final DeleteVolumeType request ) throws EucalyptusCloudException { DeleteVolumeResponseType reply = ( ( DeleteVolumeResponseType ) ( request . getReply ( ) ) ) ; final Context ctx = Contexts . lookup ( ) ; reply . set_return ( false ) ; final Function < String , Volume > deleteVolume = new Function < String , Volume > ( ) { @ Override public Volume apply ( final String input ) { try { Volume vol = null ; try { vol = Entities . uniqueResult ( Volume . named ( ctx . getUserFullName ( ) . asAccountFullName ( ) , input ) ) ; } catch ( NoSuchElementException e ) { try { vol = Entities . uniqueResult ( Volume . named ( null , input ) ) ; } catch ( NoSuchElementException e2 ) { throw Exceptions . toUndeclared ( new ClientComputeException ( "InvalidVolume.NotFound" , ( ( "The<seq2seq4repair_space>volume<seq2seq4repair_space>'" + input ) + "'<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) ) ) ; } } if ( ! ( com . eucalyptus . util . RestrictedTypes . filterPrivileged ( ) . apply ( vol ) ) ) { throw Exceptions . toUndeclared ( ( "Not<seq2seq4repair_space>authorized<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>volume<seq2seq4repair_space>by<seq2seq4repair_space>" + ( ctx . getUser ( ) . getName ( ) ) ) ) ; } try { VmVolumeAttachment attachment = VmInstances . lookupVolumeAttachment ( input ) ; <START_BUG> throw new IllegalStateException ( ( "Volume<seq2seq4repair_space>is<seq2seq4repair_space>currently<seq2seq4repair_space>attached:<seq2seq4repair_space>" + attachment ) ) ; <END_BUG> } catch ( NoSuchElementException ex ) { } if ( ( FAIL . equals ( vol . getState ( ) ) ) || ( ANNIHILATED . equals ( vol . getState ( ) ) ) ) { Entities . delete ( vol ) ; return vol ; } else { try { ServiceConfiguration sc = Topology . lookup ( Storage . class , Partitions . lookupByName ( vol . getPartition ( ) ) ) ; DeleteStorageVolumeResponseType scReply = AsyncRequests . sendSync ( sc , new com . eucalyptus . blockstorage . msgs . DeleteStorageVolumeType ( vol . getDisplayName ( ) ) ) ; if ( scReply . get_return ( ) ) { Volumes . annihilateStorageVolume ( vol ) ; return vol ; } else { throw Exceptions . toUndeclared ( "Storage<seq2seq4repair_space>Controller<seq2seq4repair_space>returned<seq2seq4repair_space>false:<seq2seq4repair_space>Contact<seq2seq4repair_space>the<seq2seq4repair_space>administrator<seq2seq4repair_space>to<seq2seq4repair_space>report<seq2seq4repair_space>the<seq2seq4repair_space>problem." ) ; } } catch ( Exception ex ) { throw Exceptions . toUndeclared ( ( "Delete<seq2seq4repair_space>volume<seq2seq4repair_space>request<seq2seq4repair_space>failed<seq2seq4repair_space>because<seq2seq4repair_space>of:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) , ex ) ; } } } catch ( NoSuchElementException ex ) { throw ex ; } catch ( TransactionException ex ) { throw Exceptions . toUndeclared ( "Deleting<seq2seq4repair_space>volume<seq2seq4repair_space>failed:<seq2seq4repair_space>Contact<seq2seq4repair_space>the<seq2seq4repair_space>administrator<seq2seq4repair_space>to<seq2seq4repair_space>report<seq2seq4repair_space>the<seq2seq4repair_space>problem." , ex ) ; } } } ; try { Entities . asTransaction ( Volume . class , deleteVolume ) . apply ( VolumeManager . normalizeVolumeIdentifier ( request . getVolumeId ( ) ) ) ; reply . set_return ( true ) ; return reply ; } catch ( NoSuchElementException ex ) { return reply ; } catch ( RuntimeException ex ) { Exceptions . rethrow ( ex , ComputeException . class ) ; throw ex ; } } public DescribeVolumeAttributeResponseType DescribeVolumeAttribute ( DescribeVolumeAttributeType request ) { } public DescribeVolumeStatusResponseType DescribeVolumeStatus ( DescribeVolumeStatusType request ) { } public DescribeVolumesResponseType DescribeVolumes ( DescribeVolumesType request ) throws Exception { } public EnableVolumeIOResponseType EnableVolumeIO ( EnableVolumeIOType request ) { } public AttachVolumeResponseType AttachVolume ( AttachVolumeType request ) throws EucalyptusCloudException { } public DetachVolumeResponseType detach ( DetachVolumeType request ) throws EucalyptusCloudException { } public ModifyVolumeAttributeResponseType modifyVolumeAttribute ( ModifyVolumeAttributeType request ) { } private boolean validateDeviceName ( String DeviceName ) { } private static String normalizeIdentifier ( final String identifier , final String prefix , final boolean required , final String message ) throws ClientComputeException { } @ Nullable private static String normalizeOptionalSnapshotIdentifier ( final String identifier ) throws EucalyptusCloudException { } @ Nullable private static String normalizeOptionalInstanceIdentifier ( final String identifier ) throws EucalyptusCloudException { } private static String normalizeInstanceIdentifier ( final String identifier ) throws EucalyptusCloudException { } private static String normalizeVolumeIdentifier ( final String identifier ) throws EucalyptusCloudException { } private static List < String > normalizeVolumeIdentifiers ( final List < String > identifiers ) throws EucalyptusCloudException { } }

Fix:
throw Exceptions . toUndeclared ( new ClientComputeException ( "VolumeInUse" , ( "Volume<seq2seq4repair_space>is<seq2seq4repair_space>currently<seq2seq4repair_space>attached<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( attachment . getVmInstance ( ) . getDisplayName ( ) ) ) ) ) ;