Buggy code:
public boolean isPrimaryKey ( ) { } public void setPrimaryKey ( boolean primKey ) { } public int getObjectIdFieldTypeCode ( ) { } public Class < ? > getObjectIdFieldType ( ) { } public boolean isVersion ( ) { } public void setVersion ( boolean version ) { } public boolean isInDefaultFetchGroup ( ) { } private boolean isEnum ( ) { } private boolean isSerializable ( ) { } private boolean isLobArray ( ) { } public void setInDefaultFetchGroup ( boolean dfg ) { } public boolean isDefaultFetchGroupExplicit ( ) { } public void setDefaultFetchGroupExplicit ( boolean explicit ) { } public String [ ] getCustomFetchGroups ( ) { } public String getLoadFetchGroup ( ) { } public void setLoadFetchGroup ( String lfg ) { } public boolean isInFetchGroup ( String fg ) { } public void setInFetchGroup ( String fg , boolean in ) { } public int getNullValue ( ) { } public void setNullValue ( int nullValue ) { } public boolean isExplicit ( ) { } public void setExplicit ( boolean explicit ) { } public String getMappedBy ( ) { } public void setMappedBy ( String mapped ) { } public FieldMetaData getMappedByMetaData ( ) { } public FieldMetaData getMappedByField ( ClassMetaData meta , String mappedBy ) { } public String getInverse ( ) { } public void setInverse ( String inverse ) { } public FieldMetaData [ ] getInverseMetaDatas ( ) { } public int getValueStrategy ( ) { } public void setValueStrategy ( int strategy ) { } public String getValueSequenceName ( ) { } public void setValueSequenceName ( String seqName ) { } public SequenceMetaData getValueSequenceMetaData ( ) { } public int getUpdateStrategy ( ) { } public void setUpdateStrategy ( int strategy ) { } public boolean isLRS ( ) { } public void setLRS ( boolean lrs ) { } public boolean isStream ( ) { } public void setStream ( boolean stream ) { } public boolean usesIntermediate ( ) { } public void setUsesIntermediate ( boolean intermediate ) { } public Boolean usesImplData ( ) { } public void setUsesImplData ( Boolean implData ) { } public Order [ ] getOrders ( ) { } public void setOrders ( Order [ ] orders ) { } public String getOrderDeclaration ( ) { } public void setOrderDeclaration ( String dec ) { } public Object order ( Object val ) { } public boolean isExternalized ( ) { } public Object getExternalValue ( Object val , StoreContext ctx ) { } public Object getFieldValue ( Object val , StoreContext ctx ) { } public String getExternalizer ( ) { } public void setExternalizer ( String externalizer ) { } public String getFactory ( ) { } public void setFactory ( String factory ) { } public String getExternalValues ( ) { } public void setExternalValues ( String values ) { } public Map getExternalValueMap ( ) { } public Map getFieldValueMap ( ) { } private void parseExternalValues ( ) { } private Object transform ( String val , int typeCode ) { if ( "null" . equals ( val ) ) return null ; switch ( typeCode ) { case JavaTypes . BOOLEAN : case JavaTypes . BOOLEAN_OBJ : return Boolean . valueOf ( val ) ; case JavaTypes . BYTE : case JavaTypes . BYTE_OBJ : return Byte . valueOf ( val ) ; case JavaTypes . INT : case JavaTypes . INT_OBJ : return Integer . valueOf ( val ) ; case JavaTypes . LONG : case JavaTypes . LONG_OBJ : return Long . valueOf ( val ) ; case JavaTypes . SHORT : case JavaTypes . SHORT_OBJ : return Short . valueOf ( val ) ; case JavaTypes . DOUBLE : case JavaTypes . DOUBLE_OBJ : return Double . valueOf ( val ) ; case JavaTypes . FLOAT : case JavaTypes . FLOAT_OBJ : return Float . valueOf ( val ) ; case JavaTypes . CHAR : case JavaTypes . CHAR_OBJ : <START_BUG> return new Character ( val . charAt ( 0 ) ) ; <END_BUG> case JavaTypes . STRING : return val ; case JavaTypes . ENUM : return Enum . valueOf ( ( ( Class < ? extends Enum > ) ( getDeclaredType ( ) ) ) , val ) ; } throw new org . apache . openjpa . util . MetaDataException ( FieldMetaData . _loc . get ( "bad-external-type" , this ) ) ; } public Method getExternalizerMethod ( ) { } public Member getFactoryMethod ( ) { } private Method findMethod ( String method ) { } private static boolean isStoreContextParameter ( Class < ? > type ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public int compareTo ( Object other ) { } public String toString ( ) { } public int getResolve ( ) { } public void setResolve ( int mode ) { } public void setResolve ( int mode , boolean on ) { } public boolean resolve ( int mode ) { } private void validateLRS ( ) { } private void validateSupportedType ( ) { } private void validateValue ( ) { } public void copy ( FieldMetaData field ) { } protected void addExtensionKeys ( Collection exts ) { } public String [ ] getComments ( ) { } public void setComments ( String [ ] comments ) { } public FieldMetaData getFieldMetaData ( ) { } public Class getType ( ) { } public void setType ( Class type ) { } public int getTypeCode ( ) { } public void setTypeCode ( int code ) { } public boolean isTypePC ( ) { } public ClassMetaData getTypeMetaData ( ) { } public Class getDeclaredType ( ) { } public void setDeclaredType ( Class type ) { } public int getDeclaredTypeCode ( ) { } public void setDeclaredTypeCode ( int type ) { }

Fix:
return Character . valueOf ( val . charAt ( 0 ) ) ;