He's using it to read the entire files contents into memory, and re-running the lines() method from the now in-memory buffer, presumably to remove any disk I/O from bottle necking the lines() function.
Not the best method to use, probably better to use the Files.readString method.
Not the best method to use, probably better to use the Files.readString method.