Buggy code:
@ Component @ Scope ( "singleton" ) @ Produces ( { MediaType . APPLICATION_JSON , "application//javascript" , "application//x-javascript" , "text//ecmascript" , "application//ecmascript" , "text//jscript" } ) public class IndexResource extends AbstractContextResource { private static final Logger logger = LoggerFactory . getLogger ( IndexResource . class ) ; @ RequireSystemAccess @ PUT @ Path ( "rebuild" ) public JSONWithPadding rebuildIndexes ( @ Context UriInfo ui , @ QueryParam ( "callback" ) @ DefaultValue ( "callback" ) String callback ) throws Exception { } @ RequireSystemAccess @ PUT @ Path ( "rebuild//" + ( RootResource . APPLICATION_ID_PATH ) ) public JSONWithPadding rebuildIndexes ( @ Context UriInfo ui , @ PathParam ( "applicationId" ) String applicationIdStr , @ QueryParam ( "callback" ) @ DefaultValue ( "callback" ) String callback , @ QueryParam ( "delay" ) @ DefaultValue ( "10" ) final long delay ) throws Exception { final UUID appId = UUIDUtils . tryExtractUUID ( applicationIdStr ) ; ApiResponse response = createApiResponse ( ) ; response . setAction ( "rebuild<seq2seq4repair_space>indexes<seq2seq4repair_space>started" ) ; final EntityManagerFactory . ProgressObserver po = new EntityManagerFactory . ProgressObserver ( ) { @ Override public void onProgress ( final EntityRef entity ) { IndexResource . logger . info ( "Indexing<seq2seq4repair_space>entity<seq2seq4repair_space>{}:{}" , entity . getType ( ) , entity . getUuid ( ) ) ; } @ Override public long getWriteDelayTime ( ) { return delay ; } } ; final Thread rebuild = new Thread ( ) { @ Override public void run ( ) { try { emf . rebuildApplicationIndexes ( appId , po ) ; } catch ( Exception e ) { <START_BUG> IndexResource . logger . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>re-index<seq2seq4repair_space>application" ) ; <END_BUG> } } } ; rebuild . setName ( String . format ( "Index<seq2seq4repair_space>rebuild<seq2seq4repair_space>for<seq2seq4repair_space>app<seq2seq4repair_space>%s" , appId ) ) ; rebuild . setDaemon ( true ) ; rebuild . start ( ) ; response . setSuccess ( ) ; return new JSONWithPadding ( response , callback ) ; } @ RequireSystemAccess @ PUT @ Path ( ( "rebuild//" + ( RootResource . APPLICATION_ID_PATH ) ) + "//{collectionName}" ) public JSONWithPadding rebuildIndexes ( @ Context UriInfo ui , @ PathParam ( "applicationId" ) final String applicationIdStr , @ PathParam ( "collectionName" ) final String collectionName , @ QueryParam ( "callback" ) @ DefaultValue ( "callback" ) String callback , @ QueryParam ( "delay" ) @ DefaultValue ( "10" ) final long delay ) throws Exception { } @ RequireSystemAccess @ POST @ Path ( RootResource . APPLICATION_ID_PATH ) public JSONWithPadding addIndex ( @ Context UriInfo ui , @ PathParam ( "applicationId" ) final String applicationIdStr , Map < String , Object > config , @ QueryParam ( "callback" ) @ DefaultValue ( "callback" ) String callback ) throws Exception { } private void rebuildCollection ( final UUID applicationId , final String collectionName , final long delay ) { } }

Fix:
IndexResource . logger . error ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>re-index<seq2seq4repair_space>application" , e ) ;