"A formal description?" This isn't exactly a theoretical problem You do have to realize that every time you call readLine(), you get the next line of the file; that line won't be returned again.
In the second version of this program, in the condition of the while loop, you read a line from the file, but don't use it for anything. In the body of the loop, you read another line and append it to a StringBuffer. So the first, third, fifth... and all odd-numbered lines of the file will be discarded.
In the first version, the line you read in the while condition is the one you append to the StringBuffer.