After adding a background() call to the draw() the problem now appears to be with the SQUARE strokeCap as I initially thought and not the noLoop(). REM out strokeCap(SQUARE) and it runs ok. UN-REM it and the lines come back with or without noLoop(); PROJECT caps and no caps are still without lines, with or without noLoop(). I don't think the float values make a difference. Note that I removed the decimal values for strokeCap(SQUARE) to rule this out as a possibility. I'm unable to tell you why the lines occur with strokeCap(SQUARE), but the only way that I see to get rid of the lines is to use the PROJECT option, no caps at all, or keep them, but overlap the ends by 1 point. For whatever it's worth, Processing Reference states that all parameters for line() are floats.
void setup() {
size(500, 500);
noLoop();
}
void draw() {
background(209); // Added and it makes a difference
stroke(0);
strokeWeight(50);
// NO cap
line(60, 80, 180.3, 80);
line(180.3, 80, 280.8, 80);
line(280.8, 80, 380.5, 80);
// (SQUARE) cap
strokeCap(SQUARE); // REM this out to get rid of lines
line(60, 160, 160, 160);
line(160, 160, 260, 160);
line(260, 160, 360, 160);
// (PROJECT) cap
strokeCap(PROJECT);
line(60, 260, 160.5, 260);
line(160.5, 260, 260.5, 260);
line(260.5, 260, 360.5, 260);
// (SQUARE) cap with 1 point of overlap
strokeCap(SQUARE); // No lines with overlap
line(60, 360, 160.8, 360);
line(159.8, 360, 260.3, 360);
line(259.3, 360, 360.5, 360);
}