Buggy code:
@ Service public class PalgaSampleImporter { private static final Logger logger = Logger . getLogger ( PalgaSampleImporter . class ) ; public static final String ENTITY_NAME_PALGA_SAMPLE = "PalgaSample" ; public static final String ENTITY_NAME_AGE_GROUP = "AgeGroup" ; public static final String ENTITY_NAME_RETRIEVAL_TERM = "RetrievalTerm" ; public static final String ENTITY_NAME_GENDER = "Gender" ; public static final String ENTITY_NAME_DIAGNOSIS = "Diagnosis" ; public static final String ENTITY_NAME_MATERIAL = "Material" ; private static final String ATTR_ID = "id" ; public static final String ATTR_EXCERPT_NR = "excerptNr" ; private static final String ATTR_DIAGNOSE = "diagnose" ; private static final String ATTR_RETRIEVAL_TERM = "retrievalTerm" ; private static final String ATTR_MATERIAAL = "materiaal" ; private static final String ATTR_GESLACHT = "geslacht" ; private static final String ATTR_LEEFTIJD = "leeftijd" ; private static final String ATTR_JAAR = "jaar" ; private static final int EXCERPT_NUM = 0 ; private static final int DIAGNOSE_COLUMN = 2 ; private static final int RETRIEVAL_TERM_COLUMN = 3 ; private static final int MATERIAAL_COLUMN = 4 ; private static final int JAAR_COLUMN = 5 ; private static final int GESLACHT_COLUMN = 6 ; private static final int LEEFTIJD_COLUMN = 7 ; private static final char SEPARATOR = '|' ; private static final String IN_COLUMN_SEPARATOR = "\\*" ; private final Map < String , String > materialMapping = Maps . newHashMap ( ) ; private final Map < String , String > geslachtMapping = Maps . newHashMap ( ) ; private final Map < String , String > ageGroupMapping = Maps . newHashMap ( ) ; @ Autowired private DataService dataService ; @ Autowired private SearchService elasticSearchService ; public PalgaSampleImporter ( ) { } @ Async @ RunAsSystem public void importFile ( final File file ) throws IOException , InvalidFormatException { } private Map < String , Entity > getRetrievalTerms ( ) { } private Map < String , Entity > getDiagnosis ( ) { } private Map < String , Entity > getMaterials ( ) { } private Map < String , Entity > getGenders ( ) { } private Map < String , Entity > getAgeGroups ( ) { } private static class PalgaSampleIterator implements Iterator < Entity > { private final Map < String , Entity > diagnosis ; private final Map < String , Entity > retrievalTerms ; private final Map < String , Entity > materials ; private final Map < String , String > materialMapping ; private final Map < String , Entity > agegroups ; private final Map < String , String > ageGroupMapping ; private final Map < String , Entity > genders ; private final Map < String , String > geslachtMapping ; private final CSVReader reader ; private String [ ] tokens ; private int row ; private int id = 0 ; public PalgaSampleIterator ( File file , Map < String , Entity > diagnosis , Map < String , Entity > retrievalTerms , Map < String , Entity > materials , Map < String , String > materialMapping , Map < String , Entity > agegroups , Map < String , String > ageGroupMapping , Map < String , Entity > genders , Map < String , String > geslachtMapping ) throws IOException { } @ Override public boolean hasNext ( ) { } @ Override public Entity next ( ) { } @ Override public void remove ( ) { } private List < Entity > toDiagnosis ( String token , Map < String , Entity > diagnosis , int row ) { } private List < Entity > toRetrievalTerm ( String token , Map < String , Entity > retrievalTerms , int row ) { } private Entity toMateriaal ( String token , Map < String , String > materialMapping , Map < String , Entity > materials , int row ) { } private Entity toGender ( String token , Map < String , String > geslachtMapping , Map < String , Entity > genders , int row ) { } private Entity toAgeGroup ( String token , Map < String , String > ageGroupMapping , Map < String , Entity > agegroups , int row ) { if ( StringUtils . isBlank ( token ) ) { PalgaSampleImporter . logger . warn ( ( ( "Leeftijdscategorie<seq2seq4repair_space>column<seq2seq4repair_space>of<seq2seq4repair_space>row<seq2seq4repair_space>[" + row ) + "]<seq2seq4repair_space>is<seq2seq4repair_space>empty" ) ) ; return null ; } String mappedToken = ageGroupMapping . get ( token ) ; if ( mappedToken == null ) { PalgaSampleImporter . logger . warn ( ( ( ( ( "Unknown<seq2seq4repair_space>gender<seq2seq4repair_space>[" + token ) + "]<seq2seq4repair_space>on<seq2seq4repair_space>row<seq2seq4repair_space>[" ) + row ) + "]" ) ) ; return null ; } Entity agegroup = agegroups . get ( mappedToken ) ; if ( agegroup == null ) { <START_BUG> PalgaSampleImporter . logger . warn ( ( ( ( ( "Unknown<seq2seq4repair_space>agegroup<seq2seq4repair_space>[" + agegroup ) + "]<seq2seq4repair_space>on<seq2seq4repair_space>row<seq2seq4repair_space>[" ) + row ) + "]" ) ) ; <END_BUG> return null ; } return agegroup ; } private Integer toYear ( String token , int row ) { } } }

Fix:
PalgaSampleImporter . logger . warn ( ( ( ( ( "Unknown<seq2seq4repair_space>agegroup<seq2seq4repair_space>[" + mappedToken ) + "]<seq2seq4repair_space>on<seq2seq4repair_space>row<seq2seq4repair_space>[" ) + row ) + "]" ) ) ;