Buggy code:
public class CompareModelVersionsUtil { private final boolean compareDifferentVersions ; private final String targetVersion ; private final ModelNode legacyModelVersions ; private final ModelNode legacyResourceDefinitions ; private final ModelNode currentModelVersions ; private final ModelNode currentResourceDefinitions ; private CompareModelVersionsUtil ( boolean compareDifferentVersions , String targetVersion , ModelNode legacyModelVersions , ModelNode legacyResourceDefinitions , ModelNode currentModelVersions , ModelNode currentResourceDefinitions ) throws Exception { } public static void main ( String [ ] args ) throws Exception { String version = System . getProperty ( "jboss.as.compare.version" , null ) ; String diff = System . getProperty ( "jboss.as.compare.different.versions" , null ) ; <START_BUG> String type = System . getProperty ( "jboss.as.comare.type" , null ) ; <END_BUG> if ( version == null ) { System . out . print ( "Enter<seq2seq4repair_space>legacy<seq2seq4repair_space>AS<seq2seq4repair_space>version:<seq2seq4repair_space>" ) ; version = CompareModelVersionsUtil . readInput ( null ) ; } System . out . println ( ( "Using<seq2seq4repair_space>target<seq2seq4repair_space>model:<seq2seq4repair_space>" + version ) ) ; if ( type == null ) { System . out . print ( "Enter<seq2seq4repair_space>type<seq2seq4repair_space>[S](standalone)//H(host)//D(domain):" ) ; type = CompareModelVersionsUtil . readInput ( "S" ) ; } final ResourceType resourceType ; if ( STANDALONE . toString ( ) . startsWith ( type . toUpperCase ( ) ) ) { resourceType = ResourceType . STANDALONE ; } else if ( HOST . toString ( ) . startsWith ( type . toUpperCase ( ) ) ) { resourceType = ResourceType . HOST ; } else if ( DOMAIN . toString ( ) . startsWith ( type . toUpperCase ( ) ) ) { resourceType = ResourceType . DOMAIN ; } else { throw new IllegalArgumentException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>determine<seq2seq4repair_space>type<seq2seq4repair_space>for:<seq2seq4repair_space>'" + type ) + "'" ) ) ; } if ( diff == null ) { System . out . print ( "Report<seq2seq4repair_space>on<seq2seq4repair_space>differences<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>model<seq2seq4repair_space>when<seq2seq4repair_space>the<seq2seq4repair_space>management<seq2seq4repair_space>versions<seq2seq4repair_space>are<seq2seq4repair_space>different?<seq2seq4repair_space>y//[n]:<seq2seq4repair_space>" ) ; diff = CompareModelVersionsUtil . readInput ( "n" ) . toLowerCase ( ) ; } boolean compareDifferentVersions ; if ( diff . equals ( "n" ) ) { System . out . println ( "Reporting<seq2seq4repair_space>on<seq2seq4repair_space>differences<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>model<seq2seq4repair_space>when<seq2seq4repair_space>the<seq2seq4repair_space>management<seq2seq4repair_space>versions<seq2seq4repair_space>are<seq2seq4repair_space>different" ) ; compareDifferentVersions = false ; } else if ( diff . equals ( "y" ) ) { System . out . println ( "Not<seq2seq4repair_space>reporting<seq2seq4repair_space>on<seq2seq4repair_space>differences<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>model<seq2seq4repair_space>when<seq2seq4repair_space>the<seq2seq4repair_space>management<seq2seq4repair_space>versions<seq2seq4repair_space>are<seq2seq4repair_space>different" ) ; compareDifferentVersions = true ; } else { throw new IllegalArgumentException ( "Please<seq2seq4repair_space>enter<seq2seq4repair_space>'y'<seq2seq4repair_space>or<seq2seq4repair_space>'n'" ) ; } System . out . println ( ( ( "Loading<seq2seq4repair_space>legacy<seq2seq4repair_space>model<seq2seq4repair_space>versions<seq2seq4repair_space>for<seq2seq4repair_space>" + version ) + "...." ) ) ; ModelNode legacyModelVersions = Tools . loadModelNodeFromFile ( new File ( ( ( "target//test-classes//legacy-models//standalone-model-versions-" + version ) + ".dmr" ) ) ) ; System . out . println ( "Loaded<seq2seq4repair_space>legacy<seq2seq4repair_space>model<seq2seq4repair_space>versions" ) ; System . out . println ( ( ( "Loading<seq2seq4repair_space>legacy<seq2seq4repair_space>resource<seq2seq4repair_space>descriptions<seq2seq4repair_space>for<seq2seq4repair_space>" + version ) + "...." ) ) ; ModelNode legacyResourceDefinitions = Tools . loadModelNodeFromFile ( new File ( ( ( ( ( "target//test-classes//legacy-models//" + ( resourceType . toString ( ) . toLowerCase ( ) ) ) + "-resource-definition-" ) + version ) + ".dmr" ) ) ) ; System . out . println ( "Loaded<seq2seq4repair_space>legacy<seq2seq4repair_space>resource<seq2seq4repair_space>descriptions" ) ; System . out . println ( "Loading<seq2seq4repair_space>model<seq2seq4repair_space>versions<seq2seq4repair_space>for<seq2seq4repair_space>currently<seq2seq4repair_space>running<seq2seq4repair_space>server..." ) ; ModelNode currentModelVersions = Tools . getCurrentModelVersions ( ) ; System . out . println ( "Loaded<seq2seq4repair_space>current<seq2seq4repair_space>model<seq2seq4repair_space>versions" ) ; System . out . println ( "Loading<seq2seq4repair_space>resource<seq2seq4repair_space>descriptions<seq2seq4repair_space>for<seq2seq4repair_space>currently<seq2seq4repair_space>running<seq2seq4repair_space>server..." ) ; final ModelNode currentResourceDefinitions ; if ( resourceType == ( ResourceType . STANDALONE ) ) { currentResourceDefinitions = Tools . getCurrentRunningResourceDefinition ( EMPTY_ADDRESS ) ; } else if ( resourceType == ( ResourceType . DOMAIN ) ) { currentResourceDefinitions = Tools . getCurrentRunningDomainResourceDefinition ( ) ; } else { currentResourceDefinitions = Tools . getCurrentRunningResourceDefinition ( PathAddress . pathAddress ( PathElement . pathElement ( HOST , "master" ) ) ) ; } System . out . println ( "Loaded<seq2seq4repair_space>current<seq2seq4repair_space>resource<seq2seq4repair_space>descriptions" ) ; CompareModelVersionsUtil compareModelVersionsUtil = new CompareModelVersionsUtil ( compareDifferentVersions , version , legacyModelVersions , legacyResourceDefinitions , currentModelVersions , currentResourceDefinitions ) ; System . out . println ( "Starting<seq2seq4repair_space>comparison<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>current....\n" ) ; compareModelVersionsUtil . compareModels ( ) ; System . out . println ( "\nDone<seq2seq4repair_space>comparison!" ) ; } private static String readInput ( String defaultAnswer ) throws IOException { } private void compareModels ( ) { } private void compareCoreModels ( ) { } private void compareSubsystemModels ( ) { } private ModelNode trimSubsystem ( ModelNode definition ) { } private ModelNode trimNonSubsystem ( ModelNode definition ) { } private void compareModel ( CompareModelVersionsUtil . CompareContext context ) { } private void compareAttributes ( CompareModelVersionsUtil . CompareContext context ) { } private void compareOperations ( CompareModelVersionsUtil . CompareContext context ) { } private void compareAttributeOrOperationParameter ( CompareModelVersionsUtil . CompareContext context , String id , ModelNode current , ModelNode legacy ) { } private void compareType ( CompareModelVersionsUtil . CompareContext context , String id , ModelNode current , ModelNode legacy ) { } private void compareValueType ( CompareModelVersionsUtil . CompareContext context , String id , ModelNode current , ModelNode legacy ) { } private void compareNillable ( CompareModelVersionsUtil . CompareContext context , String id , ModelNode current , ModelNode legacy ) { } private void compareExpressionsAllowed ( CompareModelVersionsUtil . CompareContext context , String id , ModelNode current , ModelNode legacy ) { } private void compareAccessType ( CompareModelVersionsUtil . CompareContext context , String id , ModelNode current , ModelNode legacy ) { } private void compareStorage ( CompareModelVersionsUtil . CompareContext context , String id , ModelNode current , ModelNode legacy ) { } private boolean isType ( ModelNode node ) { } private Map < String , ModelNode > createMapIndexedByKey ( ModelNode node ) { } private void compareChildren ( CompareModelVersionsUtil . CompareContext context ) { } private void compareKeySetsAndRemoveMissing ( CompareModelVersionsUtil . CompareContext context , String type , Map < String , ModelNode > currentMap , Map < String , ModelNode > legacyMap ) { } private void compareSetsAndRemoveMissing ( CompareModelVersionsUtil . CompareContext context , String type , Set < String > currentSet , Set < String > legacySet ) { } private Set < String > getMissingNames ( CompareModelVersionsUtil . CompareContext context , Set < String > possiblyMissing , Set < String > names ) { } private class CompareContext { final PathAddress rootAddress ; final PathAddress pathAddress ; final boolean core ;

Fix:
String type = System . getProperty ( "jboss.as.compare.type" , null ) ;