Buggy code:
private static byte [ ] StringToBytes ( String str ) { } private static String BytesToString ( byte [ ] bytes ) { } public static final Model TRANSMISSION_MANAGEMENT_MODEL = new Model ( TransmissionClient . TRANSMISSION_MANAGEMENT_MODEL_ID , "TransmissionManagement" ) ; public static final Schema CORRESPONDENT_SCHEMA = new Schema ( TransmissionStore . TRANSMISSION_MANAGEMENT_MODEL , "Correspondent" ) ; public static final IntegerColumn CORRESPONDENT_COLUMN_ID = new IntegerColumn ( "ID" , false , false ) ; public static final StringColumn CORRESPONDENT_COLUMN_NAME = StringColumn . ForCharacterCount ( "Name" , false , CORRESPONDENT_NAME_MAX_LENGTH_CHARS ) ; public static final IntegerColumn CORRESPONDENT_COLUMN_TRANSMISSION_TYPE = new IntegerColumn ( "TransmissionType" , false ) ; public static final StringColumn CORRESPONDENT_COLUMN_ADDRESS = StringColumn . ForCharacterCount ( "Address" , true , CORRESPONDENT_ADDRESS_MAX_LENGTH_CHARS ) ; public static final Schema SENT_TRANSMISSION_SCHEMA = new Schema ( TransmissionStore . TRANSMISSION_MANAGEMENT_MODEL , "SentTransmission" ) ; public static final Schema RECEIVED_TRANSMISSION_SCHEMA = new Schema ( TransmissionStore . TRANSMISSION_MANAGEMENT_MODEL , "ReceivedTransmission" ) ; public static final IntegerColumn TRANSMISSION_COLUMN_ID = new IntegerColumn ( "ID" , false , Transmission . TRANSMISSION_ID_FIELD ) ; public static final IntegerColumn TRANSMISSION_COLUMN_REMOTE_ID = new IntegerColumn ( "RemoteID" , true , Transmission . TRANSMISSION_ID_FIELD ) ; public static final IntegerColumn TRANSMISSION_COLUMN_TYPE = new IntegerColumn ( "Type" , false ) ; public static final IntegerColumn TRANSMISSION_COLUMN_PAYLOAD_HASH = new IntegerColumn ( "PayloadHash" , false , Transmission . PAYLOAD_HASH_FIELD ) ; public static final IntegerColumn TRANSMISSION_COLUMN_PAYLOAD_TYPE = new IntegerColumn ( "PayloadType" , true , Payload . PAYLOAD_TYPE_FIELD ) ; public static final ForeignKeyColumn TRANSMISSION_COLUMN_CORRESPONDENT = new ForeignKeyColumn ( TransmissionStore . CORRESPONDENT_SCHEMA , false ) ; public static final IntegerColumn TRANSMISSION_COLUMN_NUMBER_OF_PARTS = new IntegerColumn ( "NumberOfParts" , false , false , Integer . SIZE ) ; public static final IntegerColumn TRANSMISSION_COLUMN_NUMBER_OF_RESEND_REQS_SENT = new IntegerColumn ( "SentResendRequests" , false , Integer . SIZE ) ; public static final TimeStampColumn TRANSMISSION_COLUMN_LAST_RESEND_REQS_SENT_AT = TimeStampColumn . JavaMSTime ( "LastResendReqSentAt" , true , false ) ; public static final TimeStampColumn COLUMN_SENT_AT = TimeStampColumn . JavaMSTime ( "SentAt" , true , false ) ; public static final TimeStampColumn COLUMN_RECEIVED_AT = TimeStampColumn . JavaMSTime ( "ReceivedAt" , true , false ) ; public static final Schema SENT_TRANSMISSION_PART_SCHEMA = new Schema ( TransmissionStore . TRANSMISSION_MANAGEMENT_MODEL , "SentTransmissionPart" ) ; public static final Schema RECEIVED_TRANSMISSION_PART_SCHEMA = new Schema ( TransmissionStore . TRANSMISSION_MANAGEMENT_MODEL , "RecieverTransmissionPart" ) ; public static final ForeignKeyColumn TRANSMISSION_PART_COLUMN_SENT_TRANSMISSION = new ForeignKeyColumn ( TransmissionStore . SENT_TRANSMISSION_SCHEMA , false ) ; public static final ForeignKeyColumn TRANSMISSION_PART_COLUMN_RECEIVED_TRANSMISSION = new ForeignKeyColumn ( TransmissionStore . RECEIVED_TRANSMISSION_SCHEMA , false ) ; public static final IntegerColumn TRANSMISSION_PART_COLUMN_NUMBER = new IntegerColumn ( "PartNumber" , false , false , Integer . SIZE ) ; public static final TimeStampColumn TRANSMISSION_PART_COLUMN_DELIVERED_AT = TimeStampColumn . JavaMSTime ( "DeliveredAt" , true , false ) ; public static final ByteArrayColumn TRANSMISSION_PART_COLUMN_BODY = new ByteArrayColumn ( "Body" , false ) ; public static final IntegerColumn TRANSMISSION_PART_COLUMN_BODY_BIT_LENGTH = new IntegerColumn ( "BodyBitLength" , false , false , Integer . SIZE ) ; private final TransmissionClient client ; private final RecordStore recordStore ; public TransmissionStore ( TransmissionClient client ) throws DBException { } public void store ( Correspondent correspondent ) throws Exception { } public Record getCorrespondentRecord ( Correspondent correspondent ) { } private RecordReference doStoreCorrespondent ( Correspondent correspondent ) throws Exception { } private Correspondent correspondentFromRecord ( Record cRec ) { } public Correspondent retrieveCorrespondentByQuery ( SingleRecordQuery recordQuery ) { } public SMSCorrespondent retrieveSMSCorrespondent ( String phoneNumber , boolean binarySMS ) { } public void deleteCorrespondent ( Correspondent correspondent ) { } private Schema getTransmissionSchema ( boolean received ) { } private Schema getTransmissionPartSchema ( boolean received ) { } private void doStoreTransmission ( Transmission < ? > transmission , Record transmissionRecord ) throws Exception { } public void store ( Transmission < ? > transmission ) throws Exception { } private RecordsQuery getTransmissionsQuery ( boolean received , Transmission . Type type , Integer localID , Integer remoteID , Correspondent correspondent , Integer payloadHash , Integer numberOfParts ) throws IllegalStateException { } protected Transmission < ? > retrieveTransmissionByQuery ( SingleRecordQuery recordQuery ) { } protected Transmission < ? > retrieveTransmissionByQuery ( RecordsQuery multiRecordQuery ) throws IllegalStateException { List < Transmission < ? > > results = retrieveTransmissions ( multiRecordQuery ) ; <START_BUG> if ( ( results . size ( ) ) > 0 ) <END_BUG> throw new IllegalStateException ( "Found<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>1<seq2seq4repair_space>matching<seq2seq4repair_space>transmission<seq2seq4repair_space>for<seq2seq4repair_space>query" ) ; if ( results . isEmpty ( ) ) return null ; else return results . get ( 0 ) ; } protected List < Transmission < ? > > retrieveTransmissions ( RecordsQuery multiRecordQuery ) { } private Transmission < ? > transmissionFromRecord ( Record tRec ) { } public Transmission < ? > retrieveTransmission ( boolean received , int localID ) throws Exception { } public Transmission < ? > retrieveTransmission ( boolean received , int localID , int payloadHash ) throws IllegalStateException { } public Transmission < ? > retrieveTransmission ( boolean received , int localID , int payloadHash , Integer numberOfParts ) throws IllegalStateException { } public Transmission < ? > retrieveTransmission ( boolean received , Transmission . Type type , Correspondent correspondent , int remoteID , int payloadHash , int numberOfParts ) throws IllegalStateException { } public List < SMSTransmission < ? > > getIncompleteSMSTransmissions ( ) { } public void deleteTransmission ( Transmission < ? > transmission ) { } @ Override protected void doClose ( ) throws DBException { } @ Override public void backup ( StoreBackupper backuper , File destinationFolder ) throws DBException { } private class CorrespondentRecordGenerator implements Correspondent . Handler { public final Record rec ; public CorrespondentRecordGenerator ( Correspondent correspondent ) { } @ Override public void handle ( SMSCorrespondent smsCorrespondent ) { } } private class TransmissionRecordGenerator implements Transmission . Handler , Message . Handler { public final Record tRec ; public final List < Record > tPartRecs = new ArrayList < Record > ( ) ; public TransmissionRecordGenerator ( Transmission < ? > transmission ) { } private Record newPartRecord ( Transmission < ? > transmission ) { } private void handleSMS ( SMSTransmission < ? > smsT ) { }

Fix:
if ( ( results . size ( ) ) > 1 )