Step to reproduce: 1. To set up, run network = Network.getInstance(); network.initializationStations(); network.initializationLines(); 2. To get the list of all stations, run: List<Station> allStations = network.getStations(); 3. To get the name of the first station, run: String result = allStations.get(0).getName(); Expected value: Central Actual value: Admiralty I am not sure if this is the caused by the order of the station list or the list itself has some problem. Please check both to make sure.
Fixed. This is because the data file we use stores stations with ID starting from 1 instead of 0. The handling of the data file is a little bit messy and caused this problem. Now we have decided to change the data file's index such that it starts with 0 to match the loop and everything.
*** Bug 283 has been marked as a duplicate of this bug. ***