Buggy code:
public class XmlDescriptorParser implements DescriptorParser { private static final Logger log = LoggerFactory . getLogger ( XmlDescriptorParser . class ) ; private final Document document ; private final Set < String > applicationKeys ; public XmlDescriptorParser ( final Document source , final String ... applicationKeys ) throws PluginParseException { } public XmlDescriptorParser ( final InputStream source , final String ... applicationKeys ) throws PluginParseException { } protected Document createDocument ( final InputStream source ) throws PluginParseException { } protected Document getDocument ( ) { } public Plugin configurePlugin ( final ModuleDescriptorFactory moduleDescriptorFactory , final Plugin plugin ) throws PluginParseException { } private Element getPluginElement ( ) { } protected ModuleDescriptor < ? > createModuleDescriptor ( final Plugin plugin , final Element element , final ModuleDescriptorFactory moduleDescriptorFactory ) throws PluginParseException { final String name = element . getName ( ) ; if ( ! ( PluginUtils . doesModuleElementApplyToApplication ( element , applicationKeys ) ) ) { XmlDescriptorParser . log . debug ( ( "Ignoring<seq2seq4repair_space>module<seq2seq4repair_space>descriptor<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>application:<seq2seq4repair_space>" + ( element . attributeValue ( "key" ) ) ) ) ; return null ; } ModuleDescriptor < ? > moduleDescriptorDescriptor ; try { final Class < ? extends ModuleDescriptor > moduleDescriptorClazz = moduleDescriptorFactory . getModuleDescriptorClass ( name ) ; <START_BUG> if ( ( AbstractMarshalledDescriptor . class . isAssignableFrom ( moduleDescriptorClazz ) ) && ( moduleDescriptorClazz . isAnnotationPresent ( XmlRootElement . class ) ) ) { <END_BUG> String elementXml = element . asXML ( ) ; ByteArrayInputStream input = new ByteArrayInputStream ( elementXml . getBytes ( "UTF-8" ) ) ; moduleDescriptorDescriptor = JAXB . unmarshal ( input , moduleDescriptorClazz ) ; } else { moduleDescriptorDescriptor = moduleDescriptorFactory . getModuleDescriptor ( name ) ; } } catch ( final Throwable e ) { e . printStackTrace ( ) ; final UnrecognisedModuleDescriptor descriptor = UnrecognisedModuleDescriptorFactory . createUnrecognisedModuleDescriptor ( plugin , element , e , moduleDescriptorFactory ) ; XmlDescriptorParser . log . error ( ( ( ( ( "There<seq2seq4repair_space>were<seq2seq4repair_space>problems<seq2seq4repair_space>loading<seq2seq4repair_space>the<seq2seq4repair_space>module<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>plugin<seq2seq4repair_space>'" ) + ( plugin . getName ( ) ) ) + "'.<seq2seq4repair_space>The<seq2seq4repair_space>module<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>disabled." ) ) ; XmlDescriptorParser . log . error ( descriptor . getErrorText ( ) , e ) ; return descriptor ; } if ( moduleDescriptorDescriptor == null ) { XmlDescriptorParser . log . info ( ( ( ( ( "The<seq2seq4repair_space>module<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>plugin<seq2seq4repair_space>'" ) + ( plugin . getName ( ) ) ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>excluded<seq2seq4repair_space>module<seq2seq4repair_space>descriptors,<seq2seq4repair_space>so<seq2seq4repair_space>not<seq2seq4repair_space>enabling." ) ) ; return null ; } try { moduleDescriptorDescriptor . init ( plugin , element ) ; } catch ( final Exception e ) { final UnloadableModuleDescriptor descriptor = UnloadableModuleDescriptorFactory . createUnloadableModuleDescriptor ( plugin , element , e , moduleDescriptorFactory ) ; XmlDescriptorParser . log . error ( ( ( "There<seq2seq4repair_space>were<seq2seq4repair_space>problems<seq2seq4repair_space>loading<seq2seq4repair_space>the<seq2seq4repair_space>module<seq2seq4repair_space>'" + name ) + "'.<seq2seq4repair_space>The<seq2seq4repair_space>module<seq2seq4repair_space>and<seq2seq4repair_space>its<seq2seq4repair_space>plugin<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>disabled." ) ) ; XmlDescriptorParser . log . error ( descriptor . getErrorText ( ) , e ) ; return descriptor ; } return moduleDescriptorDescriptor ; } protected PluginInformation createPluginInformation ( final Element element ) { } public String getKey ( ) { } public int getPluginsVersion ( ) { } public PluginInformation getPluginInformation ( ) { } public boolean isSystemPlugin ( ) { } }

Fix:
if ( ( ( moduleDescriptorClazz != null ) && ( AbstractMarshalledDescriptor . class . isAssignableFrom ( moduleDescriptorClazz ) ) ) && ( moduleDescriptorClazz . isAnnotationPresent ( XmlRootElement . class ) ) ) {