Buggy code:
public class DBObjectToVariantAnnotationConverter implements ComplexTypeConverter < VariantAnnotation , DBObject > { public static final String ANNOT_ID_FIELD = "id" ; public static final String CONSEQUENCE_TYPE_FIELD = "ct" ; public static final String GENE_NAME_FIELD = "gn" ; public static final String ENSEMBL_GENE_ID_FIELD = "ensg" ; public static final String ENSEMBL_TRANSCRIPT_ID_FIELD = "enst" ; public static final String RELATIVE_POS_FIELD = "relPos" ; public static final String CODON_FIELD = "codon" ; public static final String STRAND_FIELD = "strand" ; public static final String BIOTYPE_FIELD = "bt" ; public static final String C_DNA_POSITION_FIELD = "cDnaPos" ; public static final String CDS_POSITION_FIELD = "cdsPos" ; public static final String AA_POSITION_FIELD = "aaPos" ; public static final String AA_REFERENCE_FIELD = "aaRef" ; public static final String AA_ALTERNATE_FIELD = "aaAlt" ; public static final String SO_ACCESSION_FIELD = "so" ; public static final String PROTEIN_SUBSTITUTION_SCORE_FIELD = "ps_score" ; public static final String POLYPHEN_FIELD = "polyphen" ; public static final String SIFT_FIELD = "sift" ; public static final String XREFS_FIELD = "xrefs" ; public static final String XREF_ID_FIELD = "id" ; public static final String XREF_SOURCE_FIELD = "src" ; public static final String POPULATION_FREQUENCIES_FIELD = "popFq" ; public static final String POPULATION_FREQUENCY_STUDY_FIELD = "study" ; public static final String POPULATION_FREQUENCY_POP_FIELD = "pop" ; public static final String POPULATION_FREQUENCY_SUPERPOP_FIELD = "superPop" ; public static final String POPULATION_FREQUENCY_REFERENCE_ALLELE_FIELD = "ref" ; public static final String POPULATION_FREQUENCY_ALTERNATE_ALLELE_FIELD = "alt" ; public static final String POPULATION_FREQUENCY_REFERENCE_FREQUENCY_FIELD = "refFq" ; public static final String POPULATION_FREQUENCY_ALTERNATE_FREQUENCY_FIELD = "altFq" ; public static final String CONSERVED_REGION_SCORE_FIELD = "cr_score" ; public static final String DRUG_FIELD = "drug" ; public static final String DRUG_NAME_FIELD = "dn" ; public static final String DRUG_SOURCE_FIELD = "src" ; public static final String SCORE_SCORE_FIELD = "sc" ; public static final String SCORE_SOURCE_FIELD = "src" ; public static final String SCORE_DESCRIPTION_FIELD = "desc" ; public static final String CLINICAL_DATA_FIELD = "clinical" ; public static final String COSMIC_FIELD = "cosmic" ; public static final String GWAS_FIELD = "gwas" ; public static final String CLINVAR_FIELD = "clinvar" ; public static final String DEFAULT_STRAND_VALUE = "+" ; private final ObjectMapper jsonObjectMapper ; private final ObjectWriter writer ; protected static Logger logger = LoggerFactory . getLogger ( DBObjectToVariantAnnotationConverter . class ) ; public DBObjectToVariantAnnotationConverter ( ) { } @ Override public VariantAnnotation convertToDataModelType ( DBObject object ) { } private ConsequenceType buildConsequenceType ( String geneName , String ensemblGeneId , String ensemblTranscriptId , String strand , String biotype , Integer cDnaPosition , Integer cdsPosition , String codon , Integer aaPosition , String aaReference , String aaAlternate , List < Score > proteinSubstitutionScores , List < String > soNameList ) { List < SequenceOntologyTerm > soTerms = new ArrayList < > ( soNameList . size ( ) ) ; for ( String soName : soNameList ) { soTerms . add ( new SequenceOntologyTerm ( ConsequenceTypeMappings . getSoAccessionString ( soName ) , soName ) ) ; } ProteinVariantAnnotation proteinVariantAnnotation = new ProteinVariantAnnotation ( null , null , aaPosition , aaReference , aaAlternate , null , null , proteinSubstitutionScores , null , null ) ; <START_BUG> return new ConsequenceType ( geneName , ensemblGeneId , ensemblTranscriptId , strand , biotype , cDnaPosition , cdsPosition , codon , proteinVariantAnnotation , soTerms ) ; <END_BUG> } private VariantTraitAssociation parseClinicalData ( DBObject clinicalData ) { } @ Override public DBObject convertToStorageType ( VariantAnnotation variantAnnotation ) { } private < T > BasicDBList generateClinicalDBList ( List < T > objectList ) { } private DBObject convertScoreToStorage ( Score score ) { } private DBObject convertScoreToStorage ( double score , String source , String description ) { } private DBObject convertPopulationFrequencyToStorage ( PopulationFrequency populationFrequency ) { } private DBObject convertXrefToStorage ( String id , String source ) { } private void putNotNull ( DBObject dbObject , String key , Object obj ) { } private void putNotNull ( DBObject dbObject , String key , Collection obj ) { } private void putNotNull ( DBObject dbObject , String key , String obj ) { } private void putNotNull ( DBObject dbObject , String key , Integer obj ) { } private void putNotDefault ( DBObject dbObject , String key , String obj , Object defaultValue ) { } private String getDefault ( DBObject object , String key , String defaultValue ) { } private int getDefault ( DBObject object , String key , int defaultValue ) { } private double getDefault ( DBObject object , String key , double defaultValue ) { } }

Fix:
return new ConsequenceType ( geneName , ensemblGeneId , ensemblTranscriptId , strand , biotype , Arrays . asList ( ) , cDnaPosition , cdsPosition , codon , proteinVariantAnnotation , soTerms ) ;