Buggy code:
public class HeritrixSessionImpl implements HeritrixSession { private final HttpClient client ; private final String baseUrl ; private DocumentBuilder documentBuilder ; private static final Logger LOG = LoggerFactory . getLogger ( HeritrixSessionImpl . class ) ; public HeritrixSessionImpl ( final String hostname , final int port , final String userName , final String password ) throws HeritrixSessionInitializationException { } public HeritrixSessionImpl ( final File keystoreFile , final String keyStorePassword , final String hostname , final int port , final String userName , final String password ) throws HeritrixSessionInitializationException { } public HeritrixSessionImpl ( Scheme httpsScheme , final String hostname , final String userName , final String password ) throws HeritrixSessionInitializationException { } private static Scheme buildSelfSignedHTTPSScheme ( final int port ) throws HeritrixSessionInitializationException { } private static Scheme buildKeystoreHttpsScheme ( final File keystoreFile , final String keyStorePassword , final int port ) throws HeritrixSessionInitializationException { } private static HttpClient buildHttpClient ( Scheme httpsScheme , final String hostname , final String userName , final String password ) throws HeritrixSessionInitializationException { } private HttpResponse execute ( final HttpRequestBase request ) throws IOException , ClientProtocolException { } private Document executeXml ( final HttpRequestBase request ) { } private InputStream debugContent ( InputStream content ) throws IOException { } private HttpResponse get ( final String url ) { } private Document getXml ( final String url ) { } private Document postXml ( final String url , final NameValuePair ... nameValuePairs ) { } private HttpResponse put ( final String url , final String data ) { } @ Override public Document getJobStatus ( final String jobName ) { } @ Override public JobStatusReport getJobStatusReport ( String jobName ) { } @ Override public String getJobStatusDescription ( final String jobName ) { } private boolean checkStatusDocument ( Document doc , String ... status ) { final XPath xPath = XPathFactory . newInstance ( ) . newXPath ( ) ; try { final String res = xPath . evaluate ( "////job//statusDescription" , doc ) ; for ( String st : status ) { if ( st . equals ( res ) ) { return true ; } else { <START_BUG> HeritrixSessionImpl . LOG . debug ( ( ( ( "Status<seq2seq4repair_space>was<seq2seq4repair_space>" + st ) + "<seq2seq4repair_space>expecting<seq2seq4repair_space>" ) + status ) ) ; <END_BUG> } } } catch ( XPathExpressionException e ) { HeritrixSessionImpl . LOG . error ( "status<seq2seq4repair_space>document<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>expected<seq2seq4repair_space>format" , e ) ; } return false ; } @ Override public boolean isJobRunning ( final String jobName ) { } private boolean isJobRunningOrPaused ( final String jobName ) { } @ Override public boolean isPaused ( final String jobName ) { } @ Override public void createJob ( final String jobName ) { } @ Override public Document rescanJobDirectory ( ) { } @ Override public void pauseJob ( final String jobName ) { } @ Override public void unpauseJob ( final String jobName ) { } @ Override public boolean buildJob ( final String jobName ) { } @ Override public boolean launchJob ( final String jobName ) { } @ Override public void terminateJob ( final String jobName ) { } @ Override public void tearDownJob ( final String jobName ) { } @ Override public void checkpointJob ( final String jobName ) { } @ Override public void copyJob ( final String original , final String jobName , final boolean asProfile ) { } @ Override public void updateConfig ( final String jobName , final String cXml ) { } @ Override public HttpResponse getCrawlLog ( String jobName ) { } @ Override public boolean jobExists ( String jobName ) { } private boolean jobExistsInDocument ( String jobName , Document doc ) { } @ Override public boolean addJobDirectory ( String jobDirectory ) { } }

Fix:
HeritrixSessionImpl . LOG . debug ( ( ( ( "Status<seq2seq4repair_space>was<seq2seq4repair_space>" + res ) + "<seq2seq4repair_space>expecting<seq2seq4repair_space>" ) + st ) ) ;