Buggy code:
public class ServerConnectionHandler implements Runnable { private ServerSocket serverSocket = null ; private static int numConnectedClients = 0 ; private Database database ; private Person p ; private Person p2 ; private Person p3 ; public ServerConnectionHandler ( ServerSocket ss ) throws IOException { } public void run ( ) { } private void newListener ( ) { } public static void init ( String [ ] args ) { } private static ServerSocketFactory getServerSocketFactory ( String type ) { } private String handleInput ( String clientMsg , Person p ) { int id ; database = new Database ( ) ; database . openConnection ( "db03" , "db03" , "joel" ) ; String patientName = new ClientGUI ( ) . getText ( "Enter<seq2seq4repair_space>Patient's<seq2seq4repair_space>Name<seq2seq4repair_space>:" ) ; String msg = "" ; switch ( clientMsg . toLowerCase ( ) ) { case "add" : String associatedNurse = new ClientGUI ( ) . getText ( "Enter<seq2seq4repair_space>Nurse's<seq2seq4repair_space>Name<seq2seq4repair_space>:" ) ; String data = new ClientGUI ( ) . getText ( "Enter<seq2seq4repair_space>Additional<seq2seq4repair_space>Data:" ) ; System . out . println ( database . createRecord ( p , patientName , associatedNurse , data ) ) ; msg = "ADDED_ENTRY:" + patientName ; break ; case "remove" : TableFromDatabase frame = new TableFromDatabase ( patientName ) ; frame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; frame . pack ( ) ; frame . setVisible ( true ) ; try { id = Integer . valueOf ( new ClientGUI ( ) . getText ( "Enter<seq2seq4repair_space>the<seq2seq4repair_space>ID<seq2seq4repair_space>you<seq2seq4repair_space>wish<seq2seq4repair_space>to<seq2seq4repair_space>delete:<seq2seq4repair_space>" ) ) ; } catch ( NumberFormatException e ) { return "Not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>number" ; } frame . dispose ( ) ; database . deleteRecord ( p , id ) ; msg = "REMOVED_ENTRY:" + id ; break ; case "read" : <START_BUG> System . out . println ( database . recordsToString ( database . getRecords ( p , patientName ) ) ) ; <END_BUG> msg = "READ_ENTRY:" + patientName ; break ; case "edit" : TableFromDatabase frame2 = new TableFromDatabase ( patientName ) ; frame2 . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; frame2 . pack ( ) ; frame2 . setVisible ( true ) ; try { id = Integer . valueOf ( new ClientGUI ( ) . getText ( "Enter<seq2seq4repair_space>the<seq2seq4repair_space>ID<seq2seq4repair_space>you<seq2seq4repair_space>wish<seq2seq4repair_space>to<seq2seq4repair_space>edit:<seq2seq4repair_space>" ) ) ; } catch ( NumberFormatException e ) { return "Not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>number" ; } frame2 . dispose ( ) ; String editData = new ClientGUI ( ) . getText ( "Enter<seq2seq4repair_space>the<seq2seq4repair_space>new<seq2seq4repair_space>data:<seq2seq4repair_space>" ) ; database . editRecord ( p , patientName , id , editData ) ; msg = ( ( "EDITED_ENTRY:" + patientName ) + "WITH_NEW_DATA:" ) + editData ; break ; default : return msg = "Invalid<seq2seq4repair_space>Command" ; } AuditLog . saveToFile ( p , patientName ) ; return msg ; } }

Fix:
System . out . println ( database . recordsToString ( database . getRecords ( p , patientName ) , patientName ) ) ;