Source:
<code>public CollectorBatch buildCollectorBatchFromStandardAccountingExtract(int nextBatchSequenceNumber, <START> ConcurStandardAccountingExtractFile saeFileContents, ConcurStandardAccountingExtractBatchReportData newReportData) { <END> if (saeFileContents == null) { throw new IllegalArgumentException("saeFileContents cannot be null"); } else if (newReportData == null) { throw new IllegalArgumentException("newReportData cannot be null"); } this.batchSequenceNumber = nextBatchSequenceNumber; this.reportData = newReportData; CollectorBatch result; try { LOG.info("Generating Collector data from SAE file: " + saeFileContents.getOriginalFileName()); if (batchSequenceNumber < MIN_BATCH_SEQUENCE_NUMBER || batchSequenceNumber > MAX_BATCH_SEQUENCE_NUMBER) { throw new IllegalArgumentException("Batch Sequence Number should have been an integer between 0 and 9"); } else if (reportData == null) { throw new IllegalArgumentException("Batch Report Data POJO cannot be null"); } updateCollectorBatchHeaderFields(saeFileContents); groupLines(saeFileContents.getConcurStandardAccountingExtractDetailLines()); updateCollectorBatchWithOriginEntries(); LOG.info("Finished generating Collector data from SAE file: " + saeFileContents.getOriginalFileName()); LOG.info("Total GL Entry Count: " + collectorBatch.getTotalRecords()); LOG.info("Total Amount: " + collectorBatch.getTotalAmount()); result = collectorBatch; } catch (Exception e) { LOG.error("Error encountered while generating Collector data from SAE file", e); reportData.addHeaderValidationError("Error processing SAE-to-Collector feed: " + e.getMessage()); result = null; } finally { reset(); } return result; }</code><technical_language>This method is throwing IllegalArgumentException in a number of places. a throws clause for caller needs dealt with</technical_language>

Target:
public CollectorBatch buildCollectorBatchFromStandardAccountingExtract(int nextBatchSequenceNumber, ConcurStandardAccountingExtractFile saeFileContents, ConcurStandardAccountingExtractBatchReportData newReportData) { if (saeFileContents == null) { throw new IllegalArgumentException("saeFileContents cannot be null"); } else if (newReportData == null) { throw new IllegalArgumentException("newReportData cannot be null"); } this.batchSequenceNumber = nextBatchSequenceNumber; this.reportData = newReportData; CollectorBatch result; try { LOG.info("Generating Collector data from SAE file: " + saeFileContents.getOriginalFileName()); if (batchSequenceNumber < MIN_BATCH_SEQUENCE_NUMBER || batchSequenceNumber > MAX_BATCH_SEQUENCE_NUMBER) { throw new IllegalArgumentException("Batch Sequence Number should have been an integer between " + MIN_BATCH_SEQUENCE_NUMBER + " and " + MAX_BATCH_SEQUENCE_NUMBER); } updateCollectorBatchHeaderFields(saeFileContents); groupLines(saeFileContents.getConcurStandardAccountingExtractDetailLines()); updateCollectorBatchWithOriginEntries(); LOG.info("buildCollectorBatchFromStandardAccountingExtract(): Finished generating Collector data from SAE file: " + saeFileContents.getOriginalFileName()); LOG.info("buildCollectorBatchFromStandardAccountingExtract(): Total GL Entry Count: " + collectorBatch.getTotalRecords()); LOG.info("buildCollectorBatchFromStandardAccountingExtract(): Total Amount: " + collectorBatch.getTotalAmount()); result = collectorBatch; } catch (Exception e) { LOG.error("buildCollectorBatchFromStandardAccountingExtract(): Error encountered while generating Collector data from SAE file", e); reportData.addHeaderValidationError("Error processing SAE-to-Collector feed: " + e.getMessage()); result = null; } finally { resetBuilderForNextRun(); } return result; }