Buggy code:
ServerConnectionThread . logger . info ( ( ( ( "The<seq2seq4repair_space>client<seq2seq4repair_space><" + ( socket . getInetAddress ( ) ) ) + "><seq2seq4repair_space>has<seq2seq4repair_space>requested<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>file:<seq2seq4repair_space>" ) + filename ) ) ; request = new DeleteRequest ( filename , credentials ) ; } else if ( ( line != null ) && ( line . startsWith ( REMOTE_DOWNLOAD_REQUEST ) ) ) { String stringArguments = line . substring ( REMOTE_DOWNLOAD_REQUEST . length ( ) ) . trim ( ) ; String [ ] arguments = stringArguments . split ( "<seq2seq4repair_space>" ) ; if ( ( arguments . length ) != 3 ) { pw . write ( ( ( ConnectionSettings . REMOTE_DOWNLOAD_DECLINE ) + "\n" ) ) ; pw . flush ( ) ; throw new InvalidRequestException ( "The<seq2seq4repair_space>user<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>provide<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>their<seq2seq4repair_space>remote<seq2seq4repair_space>download<seq2seq4repair_space>request" , line ) ; } String url = arguments [ 0 ] ; String serverLocation = arguments [ 1 ] ; boolean isShared = FileWrapper . charToBoolean ( arguments [ 2 ] ) ; ServerConnectionThread . logger . info ( ( ( ( ( ( "The<seq2seq4repair_space>client<seq2seq4repair_space><" + ( socket . getInetAddress ( ) ) ) + "><seq2seq4repair_space>has<seq2seq4repair_space>requested<seq2seq4repair_space>to<seq2seq4repair_space>remotely<seq2seq4repair_space>download<seq2seq4repair_space>the<seq2seq4repair_space>file:<seq2seq4repair_space>" ) + url ) + "<seq2seq4repair_space>and<seq2seq4repair_space>store<seq2seq4repair_space>it<seq2seq4repair_space>here:<seq2seq4repair_space>" ) + serverLocation ) ) ; request = new RemoteFileDownloadRequest ( url , serverLocation , isShared , credentials ) ; } else if ( ( line != null ) && ( line . startsWith ( PASSWORD_CHANGE_REQUEST ) ) ) { String stringArguments = line . substring ( PASSWORD_CHANGE_REQUEST . length ( ) ) . trim ( ) ; String [ ] arguments = stringArguments . split ( "<seq2seq4repair_space>" ) ; if ( ( arguments . length ) != 2 ) { pw . write ( ( ( ConnectionSettings . PASSWORD_CHANGE_FAILED ) + "\n" ) ) ; pw . flush ( ) ; throw new InvalidRequestException ( "The<seq2seq4repair_space>user<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>provide<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>their<seq2seq4repair_space>password<seq2seq4repair_space>change<seq2seq4repair_space>request" , line ) ; } String oldPassword = arguments [ 0 ] ; String newPassword = arguments [ 1 ] ; ServerConnectionThread . logger . info ( ( ( ( ( ( "The<seq2seq4repair_space>client<seq2seq4repair_space><" + ( socket . getInetAddress ( ) ) ) + "><seq2seq4repair_space>has<seq2seq4repair_space>requested<seq2seq4repair_space>to<seq2seq4repair_space>change<seq2seq4repair_space>their<seq2seq4repair_space>password<seq2seq4repair_space>from:<seq2seq4repair_space>" ) + oldPassword ) + "<seq2seq4repair_space>to:<seq2seq4repair_space>" ) + newPassword ) ) ; request = new PasswordChangeRequest ( oldPassword , newPassword , credentials ) ; } else if ( ( line != null ) && ( line . startsWith ( FILE_EXISTS_REQUEST ) ) ) { String stringArguments = line . substring ( FILE_EXISTS_REQUEST . length ( ) ) . trim ( ) ; String [ ] arguments = stringArguments . split ( "<seq2seq4repair_space>" ) ; if ( ( arguments . length ) != 2 ) { pw . write ( ( ( ConnectionSettings . FILE_EXISTS_REJECT ) + "\n" ) ) ; pw . flush ( ) ; throw new InvalidRequestException ( "The<seq2seq4repair_space>user<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>provide<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>their<seq2seq4repair_space>file<seq2seq4repair_space>existance<seq2seq4repair_space>request" , line ) ; } String file = arguments [ 0 ] ; String owner = arguments [ 1 ] ; ServerConnectionThread . logger . info ( ( ( ( ( "The<seq2seq4repair_space>client<seq2seq4repair_space><" + ( socket . getInetAddress ( ) ) ) + "><seq2seq4repair_space>has<seq2seq4repair_space>asked<seq2seq4repair_space>whether<seq2seq4repair_space>the<seq2seq4repair_space>file:<seq2seq4repair_space>" ) + file ) + "<seq2seq4repair_space>exists<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>server" ) ) ; request = new FileExistanceRequest ( file , owner , credentials ) ; } else if ( ( line != null ) && ( line . startsWith ( PERMISSION_CHANGE_REQUEST ) ) ) { String stringArguments = line . substring ( PERMISSION_CHANGE_REQUEST . length ( ) ) . trim ( ) ; String [ ] arguments = stringArguments . split ( "<seq2seq4repair_space>" ) ; if ( ( arguments . length ) != 2 ) { pw . write ( ( ( ConnectionSettings . PERMISSION_CHANGE_FAIL ) + "\n" ) ) ; pw . flush ( ) ; throw new InvalidRequestException ( "The<seq2seq4repair_space>user<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>provide<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>their<seq2seq4repair_space>file<seq2seq4repair_space>existance<seq2seq4repair_space>permission<seq2seq4repair_space>change" , line ) ; } String file = arguments [ 0 ] ; boolean newPermissions = FileWrapper . charToBoolean ( arguments [ 1 ] ) ; ServerConnectionThread . logger . info ( ( ( ( ( ( "The<seq2seq4repair_space>client<seq2seq4repair_space><" + ( socket . getInetAddress ( ) ) ) + "><seq2seq4repair_space>has<seq2seq4repair_space>requested<seq2seq4repair_space>to<seq2seq4repair_space>thange<seq2seq4repair_space>the<seq2seq4repair_space>file's:<seq2seq4repair_space>" ) + file ) + "<seq2seq4repair_space>permission<seq2seq4repair_space>to:<seq2seq4repair_space>" ) + ( arguments [ 1 ] ) ) ) ; request = new PermissionChangeRequest ( file , newPermissions , credentials ) ; } else if ( ( line != null ) && ( line . startsWith ( FILE_LIST_REQUEST ) ) ) { String stringArguments = line . substring ( FILE_LIST_REQUEST . length ( ) ) . trim ( ) ; String [ ] arguments = stringArguments . split ( "<seq2seq4repair_space>" ) ; if ( ( arguments . length ) != 1 ) { pw . write ( ( ( ConnectionSettings . FILE_LIST_FAIL ) + "\n" ) ) ; pw . flush ( ) ; throw new InvalidRequestException ( "The<seq2seq4repair_space>user<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>provide<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>their<seq2seq4repair_space>file<seq2seq4repair_space>list<seq2seq4repair_space>request" , line ) ; } String rootPath = arguments [ 0 ] ; <START_BUG> if ( ! ( rootPath . endsWith ( "\\" ) ) ) { <END_BUG> rootPath += "\\" ; } ServerConnectionThread . logger . info ( ( ( ( "The<seq2seq4repair_space>client<seq2seq4repair_space><" + ( socket . getInetAddress ( ) ) ) + "><seq2seq4repair_space>has<seq2seq4repair_space>requested<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>file<seq2seq4repair_space>list<seq2seq4repair_space>from<seq2seq4repair_space>root<seq2seq4repair_space>path:<seq2seq4repair_space>" ) + rootPath ) ) ; request = new FileListRequest ( rootPath , credentials ) ; } else { ServerConnectionThread . logger . info ( ( ( ( ( "The<seq2seq4repair_space>client<seq2seq4repair_space><" + ( socket . getInetAddress ( ) ) ) + "><seq2seq4repair_space>has<seq2seq4repair_space>sent<seq2seq4repair_space>an<seq2seq4repair_space>invalid<seq2seq4repair_space>request:<seq2seq4repair_space><" ) + line ) + ">" ) ) ; throw new InvalidRequestException ( "An<seq2seq4repair_space>invalid<seq2seq4repair_space>client<seq2seq4repair_space>request<seq2seq4repair_space>occurred" , line ) ; } return request ; } private boolean deleteFile ( DeleteRequest request ) { } private boolean sendFile ( DownloadRequest request ) { } private boolean receiveFile ( UploadRequest request ) { } private boolean remoteFileDownload ( RemoteFileDownloadRequest request ) { } private void registerUser ( String line ) throws InvalidRequestException , RegistrationException { } private boolean passwordChange ( PasswordChangeRequest request ) { } private void fileExistance ( FileExistanceRequest request ) { } private void permissionChange ( PermissionChangeRequest request ) { } private void fileList ( FileListRequest request ) { } private boolean purgeDeleted ( String filePath ) { } private String readLine ( Socket socket ) throws IOException { } private void closeClientConnection ( ) { } }

Fix:
if ( ( ! ( rootPath . endsWith ( "\\" ) ) ) && ( ! ( rootPath . equals ( "" ) ) ) ) {