Source:
public void checkReferencesAndUniqueness(String keyValue, int lineNumber, Field field, String string, JdbcGtfsLoader.ReferenceTracker referenceTracker) { String keyField = getKeyFieldName(); String orderField = getOrderFieldName(); String uniqueKeyField = orderField != null ? orderField : keyField; String transitId = String.join(":", keyField, keyValue); if (!field.isRequired() && "".equals(string)) return; boolean isOrderField = field.name.equals(orderField); if (field.isForeignReference()) { String referenceField = field.referenceTable.getKeyFieldName(); String referenceTransitId = String.join(":", referenceField, string); if (!referenceTracker.transitIds.contains(referenceTransitId)) { NewGTFSError referentialIntegrityError = NewGTFSError.forLine(this, lineNumber, REFERENTIAL_INTEGRITY, referenceTransitId) .setEntityId(keyValue); if (isOrderField) { referentialIntegrityError.setSequence(string); } referenceTracker.errorStorage.storeError(referentialIntegrityError); } } Set<String> listOfUniqueIds = referenceTracker.transitIds; String uniqueId = transitId; if (field.isForeignReference()) return; if (field.name.equals(uniqueKeyField)) { if (isOrderField) { listOfUniqueIds = referenceTracker.transitIdsWithSequence; uniqueId = String.join(":", field.name, keyValue, string); } boolean valueAlreadyExists = !listOfUniqueIds.add(uniqueId); if (!this.name.equals("calendar_dates") && valueAlreadyExists) { NewGTFSError duplicateIdError = NewGTFSError.forLine(this, lineNumber, DUPLICATE_ID, uniqueId) .setEntityId(keyValue); if (isOrderField) { duplicateIdError.setSequence(string); } referenceTracker.errorStorage.storeError(duplicateIdError); } } else { listOfUniqueIds.add(uniqueId); } }

Target:
public void checkReferencesAndUniqueness(String keyValue, int lineNumber, Field field, String string, JdbcGtfsLoader.ReferenceTracker referenceTracker) { String keyField = getKeyFieldName(); String orderField = getOrderFieldName(); String uniqueKeyField = !hasUniqueKeyField ? null : orderField != null ? orderField : keyField; String transitId = String.join(":", keyField, keyValue); if (!field.isRequired() && "".equals(string)) return; boolean isOrderField = field.name.equals(orderField); if (field.isForeignReference()) { String referenceField = field.referenceTable.getKeyFieldName(); String referenceTransitId = String.join(":", referenceField, string); if (!referenceTracker.transitIds.contains(referenceTransitId)) { NewGTFSError referentialIntegrityError = NewGTFSError.forLine( this, lineNumber, REFERENTIAL_INTEGRITY, referenceTransitId) .setEntityId(keyValue); if (isOrderField) { referentialIntegrityError.setSequence(string); } referenceTracker.errorStorage.storeError(referentialIntegrityError); } } Set<String> listOfUniqueIds = referenceTracker.transitIds; String uniqueId = transitId; if (field.isForeignReference()) return; if (field.name.equals(uniqueKeyField)) { if (isOrderField) { listOfUniqueIds = referenceTracker.transitIdsWithSequence; uniqueId = String.join(":", field.name, keyValue, string); } boolean valueAlreadyExists = !listOfUniqueIds.add(uniqueId); if (valueAlreadyExists) { NewGTFSError duplicateIdError = NewGTFSError.forLine(this, lineNumber, DUPLICATE_ID, uniqueId) .setEntityId(keyValue); if (isOrderField) { duplicateIdError.setSequence(string); } referenceTracker.errorStorage.storeError(duplicateIdError); } } else { listOfUniqueIds.add(uniqueId); } }