cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudsimplus/faultinjection/HostFaultInjection.java
private int generateHostPesFaults() {
        return (int) lastFailedHost.getWorkingPeList()
                .stream()
                .limit(randomNumberOfFailedPes())
                .peek(pe -> pe.setStatus(Pe.Status.FAILED))
                .count();
    }
/**
     * Generates random failures for the PEs from the
     * {@link #getLastFailedHost() last failed Host}.
     * The minimum number of PEs to fail is 1.
     *
     * @return the number of failed PEs for the Host
     */
Generates random failures for the PEs from the
#getLastFailedHost() last failed Host.
The minimum number of PEs to fail is 1.

@return the number of failed PEs for the Host
Generates random failures for the PEs from the #getLastFailedHost () last failed Host . The minimum number of PEs to fail is 1 . @return the number of failed PEs for the Host
private int generateHostPesFaults() {
        return (int) lastFailedHost.getWorkingPeList()
                .stream()
                .limit(randomNumberOfFailedPes())
                .peek(pe -> pe.setStatus(Pe.Status.FAILED))
                .count();
    }
private int generateHostPesFaults ( ) { return ( int ) lastFailedHost . getWorkingPeList ( ) . stream ( ) . limit ( randomNumberOfFailedPes ( ) ) . peek ( pe -> pe . setStatus ( Pe . Status . FAILED ) ) . count ( ) ; }
Generates random failures for the PEs from the
 {@link #getLastFailedHost() last failed Host}.
Generates random failures for the PEs from the { @link #getLastFailedHost () last failed Host } .