Buggy code:
public VirtualMachine . Builder rootDeviceId ( long rootDeviceId ) { } public VirtualMachine . Builder rootDeviceType ( String rootDeviceType ) { } public VirtualMachine . Builder serviceOfferingId ( long serviceOfferingId ) { } public VirtualMachine . Builder serviceOfferingName ( String serviceOfferingName ) { } public VirtualMachine . Builder state ( VirtualMachine . State state ) { } public VirtualMachine . Builder templateDisplayText ( String templateDisplayText ) { } public VirtualMachine . Builder templateId ( long templateId ) { } public VirtualMachine . Builder templateName ( String templateName ) { } public VirtualMachine . Builder zoneId ( long zoneId ) { } public VirtualMachine . Builder zoneName ( String zoneName ) { } public VirtualMachine . Builder nics ( Iterable < NIC > nics ) { } public VirtualMachine . Builder hypervisor ( String hypervisor ) { } public VirtualMachine . Builder securityGroups ( Set < SecurityGroup > securityGroups ) { } public VirtualMachine build ( ) { } } public static enum State { STARTING , RUNNING , STOPPING , STOPPED , DESTROYED , EXPUNGING , MIGRATING , ERROR , UNKNOWN , SHUTDOWNED , UNRECOGNIZED ; @ Override public String toString ( ) { } public static VirtualMachine . State fromValue ( String state ) { } } private long id ; private String account ; @ SerializedName ( "cpunumber" ) private long cpuCount ; @ SerializedName ( "cpuspeed" ) private long cpuSpeed ; @ SerializedName ( "cpuused" ) private String cpuUsed ; @ SerializedName ( "displayname" ) private String displayName ; private Date created ; private String domain ; @ SerializedName ( "domainid" ) private long domainId ; @ SerializedName ( "forvirtualnetwork" ) private boolean usesVirtualNetwork ; private String group ; @ SerializedName ( "groupid" ) private long groupId ; @ SerializedName ( "guestosid" ) private long guestOSId ; @ SerializedName ( "haenable" ) private boolean HAEnabled ; @ SerializedName ( "hostid" ) private long hostId ; private String hostname ; @ SerializedName ( "ipaddress" ) private String IPAddress ; @ SerializedName ( "isodisplaytext" ) private String ISODisplayText ; @ SerializedName ( "isoid" ) private long ISOId ; @ SerializedName ( "isoname" ) private String ISOName ; @ SerializedName ( "jobid" ) @ Nullable private Long jobId ; @ SerializedName ( "jobstatus" ) @ Nullable private Integer jobStatus ; private long memory ; private String name ; @ SerializedName ( "networkkbsread" ) private Long networkKbsRead ; @ SerializedName ( "networkkbswrite" ) private Long networkKbsWrite ; @ Nullable private String password ; @ SerializedName ( "passwordenabled" ) private boolean passwordEnabled ; @ SerializedName ( "rootdeviceid" ) private long rootDeviceId ; @ SerializedName ( "rootdevicetype" ) private String rootDeviceType ; @ SerializedName ( "serviceofferingid" ) private long serviceOfferingId ; @ SerializedName ( "serviceofferingname" ) private String serviceOfferingName ; private VirtualMachine . State state ; @ SerializedName ( "templatedisplaytext" ) private String templateDisplayText ; @ SerializedName ( "templateid" ) private long templateId ; @ SerializedName ( "templatename" ) private String templateName ; @ SerializedName ( "zoneid" ) private long zoneId ; @ SerializedName ( "zonename" ) private String zoneName ; @ SerializedName ( "nic" ) private Set < NIC > nics = ImmutableSet . < NIC > of ( ) ; private String hypervisor ; @ SerializedName ( "securitygroup" ) private Set < SecurityGroup > securityGroups = ImmutableSet . < SecurityGroup > of ( ) ; public VirtualMachine ( long id , String account , long cpuCount , long cpuSpeed , Long cpuUsed , String displayName , Date created , String domain , long domainId , boolean usesVirtualNetwork , String group , long groupId , long guestOSId , boolean hAEnabled , long hostId , String hostname , String iPAddress , String iSODisplayText , long iSOId , String iSOName , Long jobId , Integer jobStatus , long memory , String name , Long networkKbsRead , Long networkKbsWrite , String password , boolean passwordEnabled , long rootDeviceId , String rootDeviceType , Set < SecurityGroup > securityGroups , long serviceOfferingId , String serviceOfferingName , VirtualMachine . State state , String templateDisplayText , long templateId , String templateName , long zoneId , String zoneName , Set < NIC > nics , String hypervisor ) { } VirtualMachine ( ) { } public long getId ( ) { } public String getAccount ( ) { } public long getCpuCount ( ) { } public long getCpuSpeed ( ) { } public float getCpuUsed ( ) { <START_BUG> return ( cpuUsed ) != null ? Float . parseFloat ( cpuUsed . substring ( 9 , ( ( cpuUsed . length ( ) ) - 1 ) ) ) : 0.0F ; <END_BUG> } public String getDisplayName ( ) { } public Date getCreated ( ) { } public String getDomain ( ) { } public long getDomainId ( ) { } public boolean usesVirtualNetwork ( ) { } public String getGroup ( ) { } public long getGroupId ( ) { } public long getGuestOSId ( ) { } public boolean isHAEnabled ( ) { } public long getHostId ( ) { } public String getHostname ( ) { } public String getIPAddress ( ) { } public String getISODisplayText ( ) { } public long getISOId ( ) { } public String getISOName ( ) { } @ Nullable public Long getJobId ( ) { } @ Nullable public Integer getJobStatus ( ) { } public long getMemory ( ) { } public String getName ( ) { } public Long getNetworkKbsRead ( ) { } public Long getNetworkKbsWrite ( ) { } @ Nullable public String getPassword ( ) { } public boolean isPasswordEnabled ( ) { } public long getRootDeviceId ( ) { } public String getRootDeviceType ( ) { } public Set < SecurityGroup > getSecurityGroups ( ) { } public long getServiceOfferingId ( ) { } public String getServiceOfferingName ( ) { } public VirtualMachine . State getState ( ) { } public String getTemplateDisplayText ( ) { } public long getTemplateId ( ) { } public String getTemplateName ( ) { }

Fix:
return ( cpuUsed ) != null ? Float . parseFloat ( cpuUsed . substring ( 0 , ( ( cpuUsed . length ( ) ) - 1 ) ) ) : 0.0F ;