Buggy code:
) public AdditionalInformation getAdditionalInformation ( ) { } public void setAdditionalInformation ( AdditionalInformation additionalInformation ) { } @ OneToOne ( fetch = FetchType . LAZY , mappedBy = "report" , orphanRemoval = true ) @ Cascade ( { CascadeType . ALL } ) public AdverseEventResponseDescription getResponseDescription ( ) { } public void setResponseDescription ( AdverseEventResponseDescription responseDescription ) { } @ OneToOne ( mappedBy = "expeditedReport" , fetch = FetchType . LAZY ) @ Cascade ( { CascadeType . DELETE , CascadeType . DETACH , CascadeType . LOCK , CascadeType . REMOVE } ) public Reporter getReporter ( ) { } public void setReporter ( Reporter reporter ) { } @ OneToOne ( mappedBy = "expeditedReport" , fetch = FetchType . LAZY ) @ Cascade ( { CascadeType . DELETE , CascadeType . DETACH , CascadeType . LOCK , CascadeType . REMOVE , CascadeType . MERGE } ) public Physician getPhysician ( ) { } public void setPhysician ( Physician physician ) { } @ OneToOne ( mappedBy = "report" , fetch = FetchType . LAZY ) @ Cascade ( { CascadeType . ALL } ) public DiseaseHistory getDiseaseHistory ( ) { } public void setDiseaseHistory ( DiseaseHistory diseaseHistory ) { } @ OneToOne ( mappedBy = "report" , fetch = FetchType . LAZY , orphanRemoval = true ) @ Cascade ( { CascadeType . ALL } ) public ParticipantHistory getParticipantHistory ( ) { } public void setParticipantHistory ( ParticipantHistory participantHistory ) { } @ OneToMany ( fetch = FetchType . LAZY , mappedBy = "aeReport" ) @ Cascade ( { CascadeType . DELETE , CascadeType . DETACH , CascadeType . LOCK , CascadeType . REMOVE } ) @ Fetch ( FetchMode . SUBSELECT ) public List < Report > getReports ( ) { } @ Transient public boolean isActive ( ) { } @ Transient public List < Report > getActiveReports ( ) { } @ Transient public List < Report > getPendingReports ( ) { } @ Transient public boolean isAnActiveReportPresent ( ReportDefinition reportType ) { } public List < Report > findCompletedAmendableReports ( ) { } public void setReports ( List < Report > reports ) { } public void addReport ( Report report ) { } public Timestamp getCreatedAt ( ) { } public void setCreatedAt ( Timestamp createdAt ) { } @ ManyToOne ( fetch = FetchType . LAZY ) @ JoinColumn ( name = "reporting_period_id" ) @ Cascade ( { CascadeType . LOCK } ) public AdverseEventReportingPeriod getReportingPeriod ( ) { } public void setReportingPeriod ( AdverseEventReportingPeriod reportingPeriod ) { } public String getExternalId ( ) { } public void setExternalId ( String externalId ) { } @ Transient public String getPublicIdentifier ( ) { } @ Transient public void setPublicIdentifier ( String strId ) { } @ Transient List < String > findPhoneNumbers ( String role ) { } @ Transient List < String > findFaxNumbers ( String role ) { } @ Transient public int getNumberOfAes ( ) { } @ Transient public Report getPrimaryReport ( ) { } public void synchronizeMedicalHistoryFromAssignmentToReport ( ) { } private void syncrhonizePriorTherapies ( ) { } private void syncrhonizePreExistingConditions ( ) { } private void syncrhonizeConcomitantMedications ( ) { } private void syncrhonizeDiseaseHistories ( ) { } @ Transient public Boolean getHasSubmittedAmendableReport ( ) { } @ Transient public Boolean getHasAmendableReport ( ) { } @ Transient public boolean isAttributionRequired ( ) { } public void updateSignatureOfAdverseEvents ( ) { } @ Transient public Date getEarliestAdverseEventGradedDate ( ) { } public void updateReportedFlagOnAdverseEvents ( ) { } public void clearPostSubmissionUpdatedDate ( ) { } @ Transient public boolean isPhysicianSignOffRequired ( ) { } @ Transient public Boolean getPhysicianSignOff ( ) { } @ Transient public void setPhysicianSignOff ( Boolean physicianSignOff ) { } @ Transient public List < Report > getManuallySelectedReports ( ) { } public List < Report > findReportsToAmmend ( ReportDefinition rd ) { } public List < Report > findReportsToWithdraw ( ReportDefinition rd ) { } public List < Report > findReportsToEdit ( ReportDefinition rd ) { } public Report findLastAmendedReport ( ReportDefinition rd ) { } public Report findLastSubmittedReport ( ReportDefinition rd ) { } public List < Report > listReportsHavingStatus ( ReportStatus ... statuses ) { } public boolean hasExistingReportsOfSameOrganizationAndType ( ReportDefinition rd ) { } public AdverseEvent findAdverseEventById ( Integer id ) { } public Lab findLabsByTerm ( Lab thatLab ) { } public AdverseEvent findAdverseEventByIdTermAndDates ( AdverseEvent thatAe ) { } public Report findReportById ( Integer id ) { } public boolean hasWorkflowOnActiveReports ( ) { } public void autoGenerateOtherCauses ( ) { } public OtherCause findOtherCauseByCause ( String cause ) { } public boolean removeOtherCause ( String cause ) { } @ Transient public List < StudyTherapyType > getInterventionTypes ( ) { } @ Transient public List < AdverseEventAttribution > getAdverseEventAttributions ( ) { } @ Transient public boolean getHasNciIndAgent ( ) { } @ Transient public boolean getHasNciIdeDevice ( ) { } public boolean cascaeDeleteToAttributions ( DomainObject o ) { } public boolean addAttributionsToAEs ( DomainObject o ) { } public CourseAgent findReportCourseAgentByNscNumber ( String nscNumber ) { } public ConcomitantMedication findReportConcomitantMedication ( ConcomitantMedication inputConcomitantMedication ) { } public SurgeryIntervention findReportSurgeryInterventionBySiteAndDate ( SurgeryIntervention surgeryIntervention ) { } public RadiationIntervention findReportRadiationInterventionByAdministrationAndLastTreatmentDate ( RadiationIntervention radiationIntervention ) { } public MedicalDevice findReportMedicalDevice ( MedicalDevice medicalDevice ) { } public void updateAESignatures ( ) { } public Report findReportByCaseNumber ( String caseNumber ) { } public AdverseEvent doesAnotherAeWithSameTermExist ( AdverseEvent sae ) { } @ Transient public List < AdverseEvent > getUnReportedAdverseEvents ( ) { List < AdverseEvent > aes = new ArrayList < AdverseEvent > ( ) ; for ( AdverseEvent ae : getActiveAdverseEvents ( ) ) { <START_BUG> if ( BooleanUtils . isFalse ( ae . getReported ( ) ) ) <END_BUG> aes . add ( ae ) ; } return aes ; } }

Fix:
if ( ! ( BooleanUtils . isTrue ( ae . getReported ( ) ) ) )