Buggy code:
public class ImpcImagesIndexer extends AbstractIndexer { private static final Logger logger = LoggerFactory . getLogger ( ImpcImagesIndexer . class ) ; @ Autowired @ Qualifier ( "observationIndexing" ) private SolrServer observationService ; @ Autowired @ Qualifier ( "impcImagesIndexing" ) SolrServer server ; @ Autowired @ Qualifier ( "alleleIndexing" ) SolrServer alleleIndexing ; @ Autowired @ Qualifier ( "komp2DataSource" ) DataSource komp2DataSource ; @ Autowired MaOntologyService maService ; @ Resource ( name = "globalConfiguration" ) private Map < String , String > config ; private Map < String , List < AlleleDTO > > alleles ; private Map < String , ImpcImagesIndexer . ImageBean > imageBeans ; String excludeProcedureStableId = "IMPC_PAT_002" ; private Map < String , String > parameterStableIdToMaTermIdMap ; private String impcMediaBaseUrl ; private String impcAnnotationBaseUrl ; public ImpcImagesIndexer ( ) { } @ Override public void validateBuild ( ) throws IndexerException { } public static void main ( String [ ] args ) throws IndexerException { } @ Override public void run ( ) throws IndexerException { int count = 0 ; ImpcImagesIndexer . logger . info ( "running<seq2seq4repair_space>impc_images<seq2seq4repair_space>indexer" ) ; try { parameterStableIdToMaTermIdMap = this . populateParameterStableIdToMaIdMap ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } ImpcImagesIndexer . logger . info ( "populating<seq2seq4repair_space>image<seq2seq4repair_space>urls<seq2seq4repair_space>from<seq2seq4repair_space>db" ) ; imageBeans = populateImageUrls ( ) ; ImpcImagesIndexer . logger . info ( ( "Image<seq2seq4repair_space>beans<seq2seq4repair_space>map<seq2seq4repair_space>size=" + ( imageBeans . size ( ) ) ) ) ; if ( ( imageBeans . size ( ) ) < 100 ) { ImpcImagesIndexer . logger . error ( "Didn't<seq2seq4repair_space>get<seq2seq4repair_space>any<seq2seq4repair_space>image<seq2seq4repair_space>entries<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>db<seq2seq4repair_space>with<seq2seq4repair_space>omero_ids<seq2seq4repair_space>set<seq2seq4repair_space>so<seq2seq4repair_space>exiting<seq2seq4repair_space>the<seq2seq4repair_space>impc_image<seq2seq4repair_space>Indexer!!" ) ; } ImpcImagesIndexer . logger . info ( "populating<seq2seq4repair_space>alleles" ) ; this . alleles = populateAlleles ( ) ; ImpcImagesIndexer . logger . info ( "populated<seq2seq4repair_space>alleles" ) ; String impcMediaBaseUrl = config . get ( "impcMediaBaseUrl" ) ; ImpcImagesIndexer . logger . info ( ( "omeroRootUrl=" + impcMediaBaseUrl ) ) ; impcAnnotationBaseUrl = impcMediaBaseUrl . replace ( "webgateway" , "webclient" ) ; try { server . deleteByQuery ( "*:*" ) ; SolrQuery query = ImageService . allImageRecordSolrQuery ( ) . setRows ( Integer . MAX_VALUE ) ; List < ImageDTO > imageList = observationService . query ( query ) . getBeans ( ImageDTO . class ) ; for ( ImageDTO imageDTO : imageList ) { String downloadFilePath = imageDTO . getDownloadFilePath ( ) ; if ( imageBeans . containsKey ( downloadFilePath ) ) { ImpcImagesIndexer . ImageBean iBean = imageBeans . get ( downloadFilePath ) ; String fullResFilePath = iBean . fullResFilePath ; if ( ( iBean . image_link ) != null ) { imageDTO . setImageLink ( iBean . image_link ) ; } imageDTO . setFullResolutionFilePath ( fullResFilePath ) ; int omeroId = iBean . omeroId ; imageDTO . setOmeroId ( omeroId ) ; <START_BUG> if ( ( ( omeroId == 0 ) || ( imageDTO . getProcedureStableId ( ) . equals ( excludeProcedureStableId ) ) ) || ( downloadFilePath . endsWith ( ".pdf" ) ) ) { <END_BUG> System . out . println ( ( ( ( ( "skipping<seq2seq4repair_space>omeroId=" + omeroId ) + "param<seq2seq4repair_space>and<seq2seq4repair_space>center" ) + ( imageDTO . getParameterStableId ( ) ) ) + ( imageDTO . getPhenotypingCenter ( ) ) ) ) ; continue ; } if ( ( omeroId != 0 ) && ( downloadFilePath != null ) ) { if ( downloadFilePath . endsWith ( ".pdf" ) ) { imageDTO . setDownloadUrl ( ( ( ( impcAnnotationBaseUrl ) + "//webclient//annotation//" ) + omeroId ) ) ; imageDTO . setJpegUrl ( ( ( impcMediaBaseUrl + "//render_image//" ) + 119501 ) ) ; } else { imageDTO . setDownloadUrl ( ( ( impcMediaBaseUrl + "//archived_files//download//" ) + omeroId ) ) ; imageDTO . setJpegUrl ( ( ( impcMediaBaseUrl + "//render_image//" ) + omeroId ) ) ; } } else { ImpcImagesIndexer . logger . info ( ( "omero<seq2seq4repair_space>id<seq2seq4repair_space>is<seq2seq4repair_space>null<seq2seq4repair_space>for<seq2seq4repair_space>" + downloadFilePath ) ) ; } if ( ( ( imageDTO . getGeneAccession ( ) ) != null ) && ( ! ( imageDTO . getGeneAccession ( ) . equals ( "" ) ) ) ) { String geneAccession = imageDTO . getGeneAccession ( ) ; if ( alleles . containsKey ( geneAccession ) ) { populateImageDtoStatuses ( imageDTO , geneAccession ) ; if ( ( imageDTO . getSymbol ( ) ) != null ) { String symbolGene = ( ( imageDTO . getSymbol ( ) ) + "_" ) + ( imageDTO . getGeneAccession ( ) ) ; imageDTO . setSymbolGene ( symbolGene ) ; } } } if ( ( ( imageDTO . getParameterAssociationStableId ( ) ) != null ) && ( ! ( imageDTO . getParameterAssociationStableId ( ) . isEmpty ( ) ) ) ) { ArrayList < String > maIds = new ArrayList < > ( ) ; ArrayList < String > maTerms = new ArrayList < > ( ) ; ArrayList < String > maTermSynonyms = new ArrayList < > ( ) ; ArrayList < String > topLevelMaIds = new ArrayList < > ( ) ; ArrayList < String > topLevelMaTerm = new ArrayList < > ( ) ; ArrayList < String > topLevelMaTermSynonym = new ArrayList < > ( ) ; for ( String paramString : imageDTO . getParameterAssociationStableId ( ) ) { if ( parameterStableIdToMaTermIdMap . containsKey ( paramString ) ) { String maTermId = parameterStableIdToMaTermIdMap . get ( paramString ) ; maIds . add ( maTermId ) ; OntologyTermBean maTermBean = maService . getTerm ( maTermId ) ; if ( maTermBean != null ) { maTerms . add ( maTermBean . getName ( ) ) ; maTermSynonyms . addAll ( maTermBean . getSynonyms ( ) ) ; List < OntologyTermBean > topLevels = maService . getTopLevel ( maTermId ) ; for ( OntologyTermBean topLevel : topLevels ) { topLevelMaIds . add ( topLevel . getId ( ) ) ; topLevelMaTerm . add ( topLevel . getName ( ) ) ; topLevelMaTermSynonym . addAll ( topLevel . getSynonyms ( ) ) ; } } } }

Fix:
if ( ( ( ( omeroId == 0 ) || ( imageDTO . getProcedureStableId ( ) . equals ( excludeProcedureStableId ) ) ) || ( downloadFilePath . endsWith ( ".pdf" ) ) ) || ( ( imageDTO . getParameterStableId ( ) . equals ( "IMPC_ALZ_075_001" ) ) && ( imageDTO . getPhenotypingCenter ( ) . equals ( "JAX" ) ) ) ) {