Buggy code:
public SnapPuller ( final NamedList initArgs , final ReplicationHandler . ReplicationHandler handler , final SolrCore sc ) { } private void startExecutorService ( ) { } @ SuppressWarnings ( "unchecked" ) NamedList getLatestVersion ( ) throws IOException { } private void fetchFileList ( long gen ) throws IOException { } private boolean successfulInstall = false ; boolean fetchLatestIndex ( SolrCore core , boolean forceReplication ) throws IOException , InterruptedException { } private volatile Exception fsyncException ; private void terminateAndWaitFsyncService ( ) throws Exception { } private void logReplicationTimeAndConfFiles ( Collection < Map < String , Object > > modifiedConfFiles , boolean successfulInstall ) { } static long getTotalBytesDownloaded ( SnapPuller snappuller ) { } private StringBuffer readToStringBuffer ( long replicationTime , String str ) { } private void doCommit ( boolean isFullCopyNeeded ) throws IOException { } private File createTempindexDir ( SolrCore core ) { } private void reloadCore ( ) { } private void downloadConfFiles ( List < Map < String , Object > > confFilesToDownload , long latestGeneration ) throws Exception { } private void downloadIndexFiles ( boolean downloadCompleteIndex , File tmpIdxDir , long latestGeneration ) throws Exception { } private boolean isIndexStale ( ) { } private boolean copyAFile ( File tmpIdxDir , File indexDir , String fname , List < String > copiedfiles ) { } private boolean copyIndexFiles ( File tmpIdxDir , File indexDir ) { } private void copyTmpConfFiles2Conf ( File tmpconfDir ) { } private String getDateAsStr ( Date d ) { } private boolean modifyIndexProps ( String tmpIdxDirName ) { } private final Map < String , FileInfo > confFileInfoCache = new HashMap < String , FileInfo > ( ) ; private Collection < Map < String , Object > > getModifiedConfFiles ( List < Map < String , Object > > confFilesToDownload ) { } static boolean delTree ( File dir ) { } void disablePoll ( ) { } void enablePoll ( ) { } void abortPull ( ) { } long getReplicationStartTime ( ) { } List < Map < String , Object > > getConfFilesToDownload ( ) { } List < Map < String , Object > > getConfFilesDownloaded ( ) { } List < Map < String , Object > > getFilesToDownload ( ) { } List < Map < String , Object > > getFilesDownloaded ( ) { } Map < String , Object > getCurrentFile ( ) { } boolean isPollingDisabled ( ) { } Long getNextScheduledExecTime ( ) { } private static class ReplicationHandlerException extends InterruptedException { public ReplicationHandlerException ( String message ) { } } private class FileFetcher { boolean includeChecksum = true ; private File copy2Dir ; String fileName ; String saveAs ; long size ; long lastmodified ; long bytesDownloaded = 0 ; FileChannel fileChannel ; private FileOutputStream fileOutputStream ; byte [ ] buf = new byte [ 1024 * 1024 ] ; Checksum checksum ; File file ; int errorCount = 0 ; private boolean isConf ; private boolean aborted = false ; private Long indexGen ; FileFetcher ( File dir , Map < String , Object > fileDetails , String saveAs , boolean isConf , long latestGen ) throws IOException { } void fetchFile ( ) throws Exception { } private int fetchPackets ( FastInputStream fis ) throws Exception { } private int readInt ( byte [ ] b ) { } private long readLong ( byte [ ] b ) { } private void cleanup ( ) { } FastInputStream getStream ( ) throws IOException { SolrServer s = new org . apache . solr . client . solrj . impl . HttpSolrServer ( masterUrl , myHttpClient , null ) ; ModifiableSolrParams params = new ModifiableSolrParams ( ) ; params . set ( COMMAND , CMD_GET_FILE ) ; params . set ( GENERATION , Long . toString ( indexGen ) ) ; params . set ( QT , "//replication" ) ; if ( isConf ) { params . set ( CONF_FILE_SHORT , fileName ) ; } else { params . set ( FILE , fileName ) ; } if ( useInternal ) { <START_BUG> params . set ( COMPRESSION , "internal" ) ; <END_BUG> } if ( this . includeChecksum ) { params . set ( CHECKSUM , true ) ; } params . set ( WT , FILE_STREAM ) ; if ( ( bytesDownloaded ) > 0 ) { params . set ( OFFSET , Long . toString ( bytesDownloaded ) ) ; } NamedList response ; InputStream is = null ; try { QueryRequest req = new QueryRequest ( params ) ; response = s . request ( req ) ; is = ( ( InputStream ) ( response . get ( "stream" ) ) ) ; if ( useInternal ) { is = new InflaterInputStream ( is ) ; } return new FastInputStream ( is ) ; } catch ( Throwable t ) { IOUtils . closeQuietly ( is ) ; throw new IOException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>download<seq2seq4repair_space>file<seq2seq4repair_space>'" + ( fileName ) ) + "'" ) , t ) ; } } } NamedList getDetails ( ) throws IOException , SolrServerException { } static Integer readInterval ( String interval ) { } public void destroy ( ) { } String getMasterUrl ( ) { } String getPollInterval ( ) { } private static final int MAX_RETRIES = 5 ; private static final int NO_CONTENT = 1 ; private static final int ERR = 2 ; public static final String REPLICATION_PROPERTIES = "replication.properties" ; public static final String POLL_INTERVAL = "pollInterval" ; public static final String INTERVAL_ERR_MSG = ( "The<seq2seq4repair_space>" + ( SnapPuller . POLL_INTERVAL ) ) + "<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>format<seq2seq4repair_space>'HH:mm:ss'" ; private static final Pattern INTERVAL_PATTERN = Pattern . compile ( "(\\d*?):(\\d*?):(\\d*)" ) ; static final String INDEX_REPLICATED_AT = "indexReplicatedAt" ; static final String TIMES_INDEX_REPLICATED = "timesIndexReplicated" ; static final String CONF_FILES_REPLICATED = "confFilesReplicated" ;

Fix:
params . set ( COMPRESSION , "true" ) ;