Step to reproduce: 1. To set up, run network = Network.getInstance(); network.initializationStations(); network.initializationLines(); 2. To get the Tuen Mun station, run: Station tuenmun = network.searchStationByName("Tuen Mun"); 3. To get the name of the searched station, run: String result = tuenmun.getName(); Expected result: Tuen Mun Actual result: NullPointerException From the NullPointerException, I made a safe assumption that the search returned null. I have made some experiments to search other station names and yet none of them seemed to have this problem. Please check what is causing this problem.
This is also caused by the index in the data file. The problem is already fixed. I will mark this as a duplicate to bug 282. *** This bug has been marked as a duplicate of bug 282 ***