Buggy code:
public class Annotations { private static CommonBundle bundle = Messages . getBundle ( CommonBundle . class ) ; private static CommonLogger log = Logger . getMessageLogger ( CommonLogger . class , Annotations . class . getName ( ) ) ; private static boolean trace = Annotations . log . isTraceEnabled ( ) ; private enum Metadatas { RA , ACTIVATION_SPEC , MANAGED_CONN_FACTORY , ADMIN_OBJECT , PLAIN ; } public Annotations ( ) { } public Connector merge ( Connector connector , AnnotationRepository annotationRepository , ClassLoader classLoader ) throws Exception { } public Connector process ( AnnotationRepository annotationRepository , String xmlResourceAdapterClass , ClassLoader classLoader ) throws Exception { } private Connector processConnector ( AnnotationRepository annotationRepository , ClassLoader classLoader , String xmlResourceAdapterClass , ArrayList < ConnectionDefinition > connectionDefinitions , ArrayList < ConfigProperty16 > configProperties , ArrayList < ConfigProperty16 > plainConfigProperties , InboundResourceAdapter inboundResourceadapter , ArrayList < AdminObject > adminObjs ) throws Exception { } private Connector attachConnector ( String raClass , ClassLoader classLoader , javax . resource . spi . Connector conAnnotation , ArrayList < ConnectionDefinition > connectionDefinitions , ArrayList < ConfigProperty16 > configProperties , ArrayList < ConfigProperty16 > plainConfigProperties , InboundResourceAdapter inboundResourceadapter , ArrayList < AdminObject > adminObjs ) throws Exception { XsdString vendorName = null ; if ( conAnnotation != null ) vendorName = new XsdString ( conAnnotation . vendorName ( ) , null ) ; ArrayList < LocalizedXsdString > descriptions = null ; if ( ( ( conAnnotation != null ) && ( ( conAnnotation . description ( ) ) != null ) ) && ( ( conAnnotation . description ( ) . length ) != 0 ) ) { descriptions = new ArrayList < LocalizedXsdString > ( conAnnotation . description ( ) . length ) ; for ( String descriptionAnnoptation : conAnnotation . description ( ) ) { descriptions . add ( new LocalizedXsdString ( descriptionAnnoptation , null ) ) ; } } ArrayList < LocalizedXsdString > displayNames = null ; <START_BUG> if ( ( ( conAnnotation != null ) && ( ( conAnnotation . description ( ) ) != null ) ) && ( ( conAnnotation . displayName ( ) . length ) != 0 ) ) { <END_BUG> displayNames = new ArrayList < LocalizedXsdString > ( conAnnotation . displayName ( ) . length ) ; for ( String displayNameAnnotation : conAnnotation . displayName ( ) ) { displayNames . add ( new LocalizedXsdString ( displayNameAnnotation , null ) ) ; } } XsdString eisType = null ; if ( conAnnotation != null ) eisType = new XsdString ( conAnnotation . eisType ( ) , null ) ; ArrayList < LocalizedXsdString > licenseDescriptions = null ; if ( ( ( conAnnotation != null ) && ( ( conAnnotation . licenseDescription ( ) ) != null ) ) && ( ( conAnnotation . licenseDescription ( ) . length ) != 0 ) ) { licenseDescriptions = new ArrayList < LocalizedXsdString > ( conAnnotation . licenseDescription ( ) . length ) ; for ( String licenseDescriptionAnnotation : conAnnotation . licenseDescription ( ) ) { licenseDescriptions . add ( new LocalizedXsdString ( licenseDescriptionAnnotation , null ) ) ; } } LicenseType license = null ; if ( conAnnotation != null ) license = new LicenseType ( licenseDescriptions , conAnnotation . licenseRequired ( ) , null ) ; ArrayList < String > requiredWorkContexts = null ; Class < ? extends WorkContext > [ ] requiredWorkContextAnnotations = null ; if ( conAnnotation != null ) requiredWorkContextAnnotations = conAnnotation . requiredWorkContexts ( ) ; if ( requiredWorkContextAnnotations != null ) { requiredWorkContexts = new ArrayList < String > ( requiredWorkContextAnnotations . length ) ; for ( Class < ? extends WorkContext > requiredWorkContext : requiredWorkContextAnnotations ) { if ( ! ( requiredWorkContexts . contains ( requiredWorkContext . getName ( ) ) ) ) { if ( Annotations . trace ) Annotations . log . trace ( ( "RequiredWorkContext=" + ( requiredWorkContext . getName ( ) ) ) ) ; requiredWorkContexts . add ( requiredWorkContext . getName ( ) ) ; } } } ArrayList < Icon > icons = null ; if ( ( conAnnotation != null ) && ( ( ( ( conAnnotation . smallIcon ( ) ) != null ) && ( ( conAnnotation . smallIcon ( ) . length ) != 0 ) ) || ( ( ( conAnnotation . largeIcon ( ) ) != null ) && ( ( conAnnotation . largeIcon ( ) . length ) != 0 ) ) ) ) { icons = new ArrayList < Icon > ( ( ( ( conAnnotation . smallIcon ( ) ) == null ? 0 : conAnnotation . smallIcon ( ) . length ) + ( ( conAnnotation . largeIcon ( ) ) == null ? 0 : conAnnotation . largeIcon ( ) . length ) ) ) ; if ( ( ( conAnnotation . smallIcon ( ) ) != null ) && ( ( conAnnotation . smallIcon ( ) . length ) > 0 ) ) { for ( String smallIconAnnotation : conAnnotation . smallIcon ( ) ) { if ( ( smallIconAnnotation != null ) && ( ! ( smallIconAnnotation . trim ( ) . equals ( "" ) ) ) ) icons . add ( new Icon ( new XsdString ( smallIconAnnotation , null ) , null , null ) ) ; } } if ( ( ( conAnnotation . largeIcon ( ) ) != null ) && ( ( conAnnotation . largeIcon ( ) . length ) > 0 ) ) { for ( String largeIconAnnotation : conAnnotation . largeIcon ( ) ) { if ( ( largeIconAnnotation != null ) && ( ! ( largeIconAnnotation . trim ( ) . equals ( "" ) ) ) ) icons . add ( new Icon ( null , new XsdString ( largeIconAnnotation , null ) , null ) ) ; } } } TransactionSupport . TransactionSupportLevel transactionSupportAnnotation = null ; TransactionSupportEnum transactionSupport = null ;

Fix:
if ( ( ( conAnnotation != null ) && ( ( conAnnotation . displayName ( ) ) != null ) ) && ( ( conAnnotation . displayName ( ) . length ) != 0 ) ) {