Buggy code:
@ Controller @ Transactional ( readOnly = true ) public class DataRetriever { public static final Logger logger = LoggerFactory . getLogger ( DataRetriever . class ) ; @ Autowired PeptideRepository peptideRepository ; @ Autowired ProteinRepository proteinRepository ; @ Autowired ProteinGroupRepository proteinGroupRepository ; @ Autowired PeptideProteinRepository peptideProteinRepository ; @ Autowired PeptideGroupRepository peptideGroupRepository ; @ Autowired CvParamProteomesRepository cvParamRepository ; @ Autowired DataSource proteomesDataSource ; private static boolean checkPeptideMatches ( Peptide peptide , String tissueName , String modName , int species ) { } public boolean isAllOK ( ) { } @ Transactional ( readOnly = true ) public ProteinGroup getProteinGroupById ( String id , boolean addUniquePeptides ) { } @ Transactional ( readOnly = true ) public List < ProteinGroup > getProteinGroups ( int species , int page , int pageSize ) { } @ Transactional ( readOnly = true ) public List < ProteinGroup > getProteinGroupsForProtein ( String acc ) { } @ Transactional ( readOnly = true ) public Protein getProtein ( String accession , boolean includeDetails ) { } @ Transactional ( readOnly = true ) public List < Protein > getProteins ( int species , String tissueName , String modName , boolean includeSequence , int page , int pageSize ) { List < Protein > list = new ArrayList < Protein > ( ) ; PageRequest pageRequest = new PageRequest ( page , pageSize ) ; if ( species < 0 ) { return list ; } List < uk . ac . ebi . pride . proteomes . db . core . api . protein . Protein > dbProteins ; if ( ( tissueName . equals ( defaultValue ) ) && ( modName . equals ( Modification . defaultValue ) ) ) { dbProteins = proteinRepository . findAllByTaxid ( species , pageRequest ) ; } else if ( ( ! ( tissueName . equals ( defaultValue ) ) ) && ( modName . equals ( Modification . defaultValue ) ) ) { String tissueCv = Tissue . getTissue ( tissueName ) . getCvTerm ( ) ; dbProteins = proteinRepository . findAllByTaxidAndTissue ( species , tissueCv , pageRequest ) ; } else if ( ( tissueName . equals ( defaultValue ) ) && ( ! ( modName . equals ( Modification . defaultValue ) ) ) ) { dbProteins = proteinRepository . findAllByTaxidAndModification ( species , modName , pageRequest ) ; } else { String tissueCv = Tissue . getTissue ( tissueName ) . getCvTerm ( ) ; dbProteins = proteinRepository . findAllByTaxidAndTissueAndModification ( species , tissueCv , modName , pageRequest ) ; } <START_BUG> DataRetriever . logger . info ( ( ( "Initial<seq2seq4repair_space>protein<seq2seq4repair_space>list<seq2seq4repair_space>request<seq2seq4repair_space>retrieved<seq2seq4repair_space>" + ( list . size ( ) ) ) + "<seq2seq4repair_space>proteins." ) ) ; <END_BUG> for ( uk . ac . ebi . pride . proteomes . db . core . api . protein . Protein dbProtein : dbProteins ) { Protein tempProtein = ModelConverter . convertProtein ( dbProtein , includeSequence ) ; list . add ( tempProtein ) ; } DataRetriever . logger . info ( ( ( "After<seq2seq4repair_space>filtering<seq2seq4repair_space>" + ( list . size ( ) ) ) + "<seq2seq4repair_space>proteins<seq2seq4repair_space>remain." ) ) ; return list ; } @ Transactional ( readOnly = true ) public List < Protein > getProteinsByPeptideSequence ( String sequence , int species , boolean includeSequence ) { } @ Transactional ( readOnly = true ) public List < Peptide > getPeptides ( int species , String tissueName , String modName , int page , int pageSize ) { } @ Transactional ( readOnly = true ) public List < Peptide > getPeptidesForSequence ( String sequence , int species , String tissueName , String modName , boolean includeDetails ) { } @ Transactional ( readOnly = true ) public List < LocatedPeptide > getProteinPeptides ( String acc , String tissueName , String modName ) { } @ Transactional ( readOnly = true ) public String getProteinCount ( int species , String description ) { } @ Transactional ( readOnly = true ) public Statistics getStatistics ( Collection < Species > species ) { } public List < Species > getSpecies ( ) { } public List < Tissue > getTissues ( ) { } public List < Modification > getModifications ( ) { } }

Fix:
DataRetriever . logger . info ( ( ( "Initial<seq2seq4repair_space>protein<seq2seq4repair_space>list<seq2seq4repair_space>request<seq2seq4repair_space>retrieved<seq2seq4repair_space>" + ( dbProteins . size ( ) ) ) + "<seq2seq4repair_space>proteins." ) ) ;