Buggy code:
if ( extension . equals ( "bz2" ) ) { inputStream = new BZip2CompressorInputStream ( httpConn . getInputStream ( ) , true ) ; fileName = fileName . replace ( ".bz2" , "" ) ; } if ( extension . equals ( "zip" ) ) { DownloadUtils d = new DownloadUtils ( ) ; d . checkZip ( url ) ; ZipInputStream zip = new ZipInputStream ( httpConn . getInputStream ( ) ) ; ZipEntry entry = zip . getNextEntry ( ) ; fileName = entry . getName ( ) ; inputStream = zip ; } dataIDFilePath = ( DataIDGeneralProperties . BASE_PATH ) + ( fileName ) ; objectFilePath = ( DataIDGeneralProperties . OBJECT_FILE_DISTRIBUTION_PATH ) + ( fileName ) ; final byte [ ] buffer = new byte [ DownloadAndSave . BUFFER_SIZE ] ; int n = 0 ; int aux = 0 ; checkExtensionFormat ( format ) ; if ( Formats . getEquivalentFormat ( extension ) . equals ( DEFAULT_NTRIPLES ) ) { SplitAndStoreThread splitThread = new SplitAndStoreThread ( bufferQueue , subjectQueue , objectQueue , fileName , bean ) ; splitThread . start ( ) ; GetDomainsFromTriplesThread getDomainFromObjectsThread = new GetDomainsFromTriplesThread ( objectQueue , countObjectDomainsHashMap ) ; getDomainFromObjectsThread . start ( ) ; GetDomainsFromTriplesThread getDomainFromSubjectsThread = new GetDomainsFromTriplesThread ( subjectQueue , countSubjectDomainsHashMap ) ; getDomainFromSubjectsThread . start ( ) ; String str = "" ; BufferedInputStream b = new BufferedInputStream ( inputStream ) ; while ( ( - 1 ) != ( n = b . read ( buffer ) ) ) { str = new String ( buffer , 0 , n ) ; bufferQueue . add ( str ) ; str = "" ; contentLengthAfterDownloaded = ( contentLengthAfterDownloaded ) + n ; countBytesReaded = ( countBytesReaded ) + n ; if ( ( aux % 1000 ) == 0 ) { bean . setDownloadedMB ( ( ( ( countBytesReaded ) // 1024 ) // 1024 ) ) ; bean . pushDownloadInfo ( ) ; aux = 0 ; } aux ++ ; while ( ( bufferQueue . size ( ) ) > 900 ) { Thread . sleep ( 1 ) ; } } doneReadingFile = true ; splitThread . setDoneReadingFile ( true ) ; splitThread . join ( ) ; fileName = splitThread . getFileName ( ) ; objectLines = splitThread . getObjectLines ( ) ; subjectLines = splitThread . getSubjectLines ( ) ; totalTriples = splitThread . getTotalTriples ( ) ; getDomainFromObjectsThread . setDoneSplittingString ( true ) ; getDomainFromObjectsThread . join ( ) ; getDomainFromSubjectsThread . setDoneSplittingString ( true ) ; getDomainFromSubjectsThread . join ( ) ; Iterator it = countObjectDomainsHashMap . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry pair = ( ( Map . Entry ) ( it . next ( ) ) ) ; if ( ( ( Integer ) ( pair . getValue ( ) ) ) > 50 ) { if ( ( ( ( String ) ( pair . getKey ( ) ) ) . length ( ) ) < 100 ) { objectDomains . put ( ( ( String ) ( pair . getKey ( ) ) ) , ( ( Integer ) ( pair . getValue ( ) ) ) ) ; } } it . remove ( ) ; } it = countSubjectDomainsHashMap . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry pair = ( ( Map . Entry ) ( it . next ( ) ) ) ; if ( ( ( Integer ) ( pair . getValue ( ) ) ) > 50 ) { if ( ( ( ( String ) ( pair . getKey ( ) ) ) . length ( ) ) < 100 ) { subjectDomains . put ( ( ( String ) ( pair . getKey ( ) ) ) , ( ( Integer ) ( pair . getValue ( ) ) ) ) ; } } it . remove ( ) ; } } else if ( ( Formats . getEquivalentFormat ( extension ) . equals ( DEFAULT_TURTLE ) ) || ( Formats . getEquivalentFormat ( extension ) . equals ( DEFAULT_RDFXML ) ) ) { int bytesRead = - 1 ; FileOutputStream outputStream = new FileOutputStream ( dataIDFilePath ) ; while ( ( - 1 ) != ( bytesRead = inputStream . read ( buffer ) ) ) { outputStream . write ( buffer , 0 , bytesRead ) ; contentLengthAfterDownloaded = ( contentLengthAfterDownloaded ) + bytesRead ; countBytesReaded = ( countBytesReaded ) + bytesRead ; if ( ( aux % 1000 ) == 0 ) { bean . setDownloadedMB ( ( ( ( countBytesReaded ) // 1024 ) // 1024 ) ) ; bean . pushDownloadInfo ( ) ; } aux ++ ; } bean . setDownloadedMB ( ( ( ( countBytesReaded ) // 1024 ) // 1024 ) ) ; bean . pushDownloadInfo ( ) ; outputStream . close ( ) ; } else { httpConn . disconnect ( ) ; <START_BUG> throw new DataIDException ( ( "RDF<seq2seq4repair_space>format<seq2seq4repair_space>not<seq2seq4repair_space>supported:<seq2seq4repair_space>" + ( extension ) ) ) ; <END_BUG> } doneReadingFile = true ; if ( ( httpContentLength ) < 1 ) { File f = new File ( dataIDFilePath ) ; httpContentLength = f . length ( ) ; } bean . addDisplayMessage ( MESSAGE_LOG , ( "File<seq2seq4repair_space>downloaded:<seq2seq4repair_space>" + ( fileName ) ) ) ; httpConn . disconnect ( ) ; } else { httpConn . disconnect ( ) ; throw new Exception ( ( "No<seq2seq4repair_space>file<seq2seq4repair_space>to<seq2seq4repair_space>download.<seq2seq4repair_space>Server<seq2seq4repair_space>replied<seq2seq4repair_space>HTTP<seq2seq4repair_space>code:<seq2seq4repair_space>" + responseCode ) ) ; } } private boolean checkWhetherDownload ( String uri , String httpContentLength , String httpLastModified ) { } private void getMetadataFromHTTPHeaders ( HttpURLConnection httpConn ) { } private void createFileName ( String accessURL ) { } private void printHeaders ( ) { } private void checkExtensionFormat ( String format ) { } No newline ; at end ; of file ; }

Fix:
throw new Exception ( ( "RDF<seq2seq4repair_space>format<seq2seq4repair_space>not<seq2seq4repair_space>supported:<seq2seq4repair_space>" + ( extension ) ) ) ;