Buggy code:
public class PluginDescriptionFile { private static final Yaml yaml = new Yaml ( new SafeConstructor ( ) ) ; private String name ; private String version ; private String description ; private String author ; private List < String > authors ; private String website ; private boolean reload ; private Platform platform ; private LoadOrder load ; private String main ; private List < String > depends ; private List < String > softdepends ; private String fullname ; public PluginDescriptionFile ( String name , String version , String main , Platform platform ) { } @ SuppressWarnings ( "unchecked" ) public PluginDescriptionFile ( InputStream stream ) throws InvalidDescriptionFileException { } @ SuppressWarnings ( "unchecked" ) public PluginDescriptionFile ( Reader reader ) throws InvalidDescriptionFileException { } @ SuppressWarnings ( "unchecked" ) public PluginDescriptionFile ( String raw ) throws InvalidDescriptionFileException { } @ SuppressWarnings ( "unchecked" ) private void load ( Map < String , Object > map ) throws InvalidDescriptionFileException { try { this . name = ( ( String ) ( map . get ( "name" ) ) ) ; if ( ! ( this . name . matches ( "^[A-Za-z0-9<seq2seq4repair_space>_.-]+$" ) ) ) { throw new InvalidDescriptionFileException ( "The<seq2seq4repair_space>field<seq2seq4repair_space>'name'<seq2seq4repair_space>in<seq2seq4repair_space>plugin.yml<seq2seq4repair_space>contains<seq2seq4repair_space>invalid<seq2seq4repair_space>characters." ) ; } if ( this . name . toLowerCase ( ) . contains ( "spout" ) ) { throw new InvalidDescriptionFileException ( new StringBuilder ( ) . append ( "The<seq2seq4repair_space>plugin<seq2seq4repair_space>'" ) . append ( name ) . append ( "'<seq2seq4repair_space>has<seq2seq4repair_space>Spout<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>name.<seq2seq4repair_space>This<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>allowed." ) . toString ( ) ) ; } } catch ( NullPointerException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'name'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>defined<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'name'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } try { this . main = ( ( String ) ( map . get ( "main" ) ) ) ; if ( main . toLowerCase ( ) . startsWith ( "org.spout" ) ) { if ( ! ( isOfficialPlugin ( main ) ) ) throw new InvalidDescriptionFileException ( "The<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>namespace<seq2seq4repair_space>'org.spout'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>permitted." ) ; } else <START_BUG> if ( main . toLowerCase ( ) . startsWith ( "org.spout" ) ) { <END_BUG> if ( ! ( isOfficialPlugin ( main ) ) ) throw new InvalidDescriptionFileException ( "The<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>namespace<seq2seq4repair_space>'org.getspout'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>permitted." ) ; } else if ( main . toLowerCase ( ) . startsWith ( "org.spoutcraft" ) ) { if ( ! ( isOfficialPlugin ( main ) ) ) throw new InvalidDescriptionFileException ( "The<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>namespace<seq2seq4repair_space>'org.spoutcraft'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>permitted." ) ; } else if ( main . toLowerCase ( ) . startsWith ( "in.spout" ) ) { if ( ! ( isOfficialPlugin ( main ) ) ) throw new InvalidDescriptionFileException ( "The<seq2seq4repair_space>use<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>namespace<seq2seq4repair_space>'in.spout'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>permitted." ) ; } } catch ( NullPointerException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'main'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>defined<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'main'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } try { this . version = map . get ( "version" ) . toString ( ) ; } catch ( NullPointerException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'version'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>defined<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'version'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } try { this . platform = Platform . valueOf ( map . get ( "platform" ) . toString ( ) . toUpperCase ( ) ) ; } catch ( NullPointerException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'platform'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>defined<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'platform'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } this . fullname = new StringBuilder ( ) . append ( name ) . append ( "<seq2seq4repair_space>v" ) . append ( version ) . toString ( ) ; if ( map . containsKey ( "author" ) ) { try { this . author = ( ( String ) ( map . get ( "author" ) ) ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'author'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } } if ( map . containsKey ( "authors" ) ) { try { this . authors = ( ( List < String > ) ( map . get ( "authors" ) ) ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'authors'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } } if ( map . containsKey ( "depends" ) ) { try { this . depends = ( ( List < String > ) ( map . get ( "depends" ) ) ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'depends'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } } if ( map . containsKey ( "softdepends" ) ) { try { this . softdepends = ( ( List < String > ) ( map . get ( "softdepends" ) ) ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'softdepends'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } } if ( map . containsKey ( "description" ) ) { try { this . description = ( ( String ) ( map . get ( "description" ) ) ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'description'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } } if ( map . containsKey ( "load" ) ) { try { this . load = LoadOrder . valueOf ( map . get ( "load" ) . toString ( ) . toUpperCase ( ) ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'load'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } } if ( map . containsKey ( "reload" ) ) { try { this . reload = ( ( Boolean ) ( map . get ( "reload" ) ) ) ; } catch ( ClassCastException ex ) { throw new InvalidDescriptionFileException ( ex , "The<seq2seq4repair_space>field<seq2seq4repair_space>'reload'<seq2seq4repair_space>is<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plugin.yml!" ) ; } } if ( map . containsKey ( "website" ) ) { try { this . website = ( ( String ) ( map . get ( "website" ) ) ) ; }

Fix:
if ( main . toLowerCase ( ) . startsWith ( "org.getspout" ) ) {