Refactor code to find four co-linear points
The easiest way to flatten this kind of a structure is to reverse the sense of the if.  That is, where you have

if (first.equals(next)) {
    // do stuff
}


Instead write

if (!first.equals(next)) {
    continue;
}
// do stuff


This only works where you don't have an else clause (so unfortunately I chose a bad example), but it can work wonders in bringing your code closer to the left margin.

From there I would start seeing where I could extract methods, especially but not exclusively where there is duplication in the code.  The block of code beginning with 

SortedSet&lt;Point&gt; line = new TreeSet&lt;Point&gt;();


looks like a good candidate for this.