There is an indexing issue that causes the serial connection to fail in most operating systems. The issue appears to be connected to the indexing at these lines.
The issue produces the following error on startup:
All available ports: ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
It appears that the issue might be fixable by changing line 136 to read: SerialPortNum = i-1;
Not sure if this is a robust change, or whether this makes the code fragile.