cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/util/WorkloadFileReader.java
private Cloudlet createCloudletFromTraceLine(final String[] array, final int lineNumber) {
        Integer obj;

        // get the job number
        int id;
        if (jobNum == IRRELEVANT) {
            id = cloudlets.size() + 1;
        } else {
            obj = Integer.valueOf(array[jobNum].trim());
            id = obj;
        }

        // get the submit time
        final Long l = Long.valueOf(array[submitTime].trim());
        final long submitTime = l.intValue();

        // if the required run time field is ignored, then use the actual run time
        obj = Integer.valueOf(array[runTime].trim());
        int runTime = obj;

        final int userID = Integer.valueOf(array[userId].trim());
        final int groupID = Integer.valueOf(array[groupId].trim());

        // according to the SWF manual, runtime of 0 is possible due
        // to rounding down. E.g. runtime is 0.4 seconds -> runtime = 0
        if (runTime <= 0) {
            runTime = 1; // change to 1 second
        }

        // get the number of allocated processors
        obj = Integer.valueOf(array[reqNumProc].trim());
        int numProc = obj;

        /* if the required num of allocated processors field is ignored
        or zero, then use the actual field
        */
        if (numProc == IRRELEVANT || numProc == 0) {
            obj = Integer.valueOf(array[this.numProc].trim());
            numProc = obj;
        }

        // finally, check if the num of PEs required is valid or not
        if (numProc <= 0) {
            numProc = 1;
        }

        return createCloudlet(id, submitTime, runTime, numProc, userID, groupID);
    }
/**
     * Extracts relevant information from a given array of fields, representing
     * a line from the trace file, and creates a cloudlet using this
     * information.
     *
     * @param array the array of fields generated from a line of the trace file.
     * @param lineNumber the line number
     * @return the created Cloudlet
     * @pre array != null
     * @pre lineNumber > 0
     */
Extracts relevant information from a given array of fields, representing
a line from the trace file, and creates a cloudlet using this
information.

@param array the array of fields generated from a line of the trace file.
@param lineNumber the line number
@return the created Cloudlet
@pre array != null
@pre lineNumber > 0
Extracts relevant information from a given array of fields representing a line from the trace file and creates a cloudlet using this information . @param array the array of fields generated from a line of the trace file . @param lineNumber the line number @return the created Cloudlet @pre array ! = null @pre lineNumber > 0
private Cloudlet createCloudletFromTraceLine(final String[] array, final int lineNumber) {
        Integer obj;
        int id;
        if (jobNum == IRRELEVANT) {
            id = cloudlets.size() + 1;
        } else {
            obj = Integer.valueOf(array[jobNum].trim());
            id = obj;
        }
        final Long l = Long.valueOf(array[submitTime].trim());
        final long submitTime = l.intValue();
        obj = Integer.valueOf(array[runTime].trim());
        int runTime = obj;
        final int userID = Integer.valueOf(array[userId].trim());
        final int groupID = Integer.valueOf(array[groupId].trim());
        if (runTime <= 0) {
            runTime = 1; 
        }
        obj = Integer.valueOf(array[reqNumProc].trim());
        int numProc = obj;
        /* if the required num of allocated processors field is ignored
        or zero, then use the actual field
        */
        if (numProc == IRRELEVANT || numProc == 0) {
            obj = Integer.valueOf(array[this.numProc].trim());
            numProc = obj;
        }
        if (numProc <= 0) {
            numProc = 1;
        }
        return createCloudlet(id, submitTime, runTime, numProc, userID, groupID);
    }
private Cloudlet createCloudletFromTraceLine ( final String [ ] array , final int lineNumber ) { Integer obj ; int id ; if ( jobNum == IRRELEVANT ) { id = cloudlets . size ( ) + 1 ; } else { obj = Integer . valueOf ( array [ jobNum ] . trim ( ) ) ; id = obj ; } final Long l = Long . valueOf ( array [ submitTime ] . trim ( ) ) ; final long submitTime = l . intValue ( ) ; obj = Integer . valueOf ( array [ runTime ] . trim ( ) ) ; int runTime = obj ; final int userID = Integer . valueOf ( array [ userId ] . trim ( ) ) ; final int groupID = Integer . valueOf ( array [ groupId ] . trim ( ) ) ; if ( runTime <= 0 ) { runTime = 1 ; } obj = Integer . valueOf ( array [ reqNumProc ] . trim ( ) ) ; int numProc = obj ; /* if the required num of allocated processors field is ignored
        or zero, then use the actual field
        */ if ( numProc == IRRELEVANT || numProc == 0 ) { obj = Integer . valueOf ( array [ this . numProc ] . trim ( ) ) ; numProc = obj ; } if ( numProc <= 0 ) { numProc = 1 ; } return createCloudlet ( id , submitTime , runTime , numProc , userID , groupID ) ; }
Extracts relevant information from a given array of fields, representing
 a line from the trace file, and creates a cloudlet using this
 information.
Extracts relevant information from a given array of fields representing a line from the trace file and creates a cloudlet using this information .
// get the job number // get the submit time // if the required run time field is ignored, then use the actual run time // according to the SWF manual, runtime of 0 is possible due // to rounding down. E.g. runtime is 0.4 seconds -> runtime = 0 // change to 1 second // get the number of allocated processors // finally, check if the num of PEs required is valid or not