#vulnerable code 
                             public static void main(String[] unparsedArgs) {
		
		ProgramMode programMode;
		CLIArguments args = null;
		
		/* parse command line arguments */
		
		if (unparsedArgs.length > 0) {
			
			try {
				args = CliFactory.parseArguments(CLIArguments.class, unparsedArgs);
			} catch (ArgumentValidationException e) {
				System.err.println(e.getMessage());
				System.exit(1);
			}
			
			if (!CLIArgumentsUtil.isValid(args)) {
				System.err.println(CLIArgumentsUtil.getErrorString(args));
				System.exit(1);
			}
			
			programMode = CLIArgumentsUtil.getProgramMode(args);
			
		} else {
		 
			System.out.println("No parameters, running graphical interface.\n"
					+ "If you want to use the command line, use the --help"
					+ " parameter for a list of available parameters.");
			programMode = ProgramMode.GUI;
			
		}
		
		/* load configuration file */

		Configuration config = new BaseConfiguration();
		
		if (args != null && args.isConfig()) {
			try {
				config = new PropertiesConfiguration(args.getConfig());
			} catch (ConfigurationException e) {
				System.err.println("could not read config, ignoring it: ");
				System.err.println(e);
			}
		}
		
		/* run selected mode */
		
		switch (programMode) {
		
		case HELP:
			//parser.printHelp();
			System.out.println(
					CliFactory.createCli(CLIArguments.class).getHelpMessage()
					+ "\n\nFor more information, see " + GlobalValues.WIKI_URI);
			break;
			
		case VERSION:
			System.out.println("OSM2World " + VERSION_STRING);
			break;
		
		case GUI:
			try {
				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			} catch(Exception e) {
				System.out.println("Error setting native look and feel: " + e);
			}
			new ViewerFrame(new Data(), new MessageManager(),
					new RenderOptions(), config).setVisible(true);
			break;
			
		case CONVERT:
			try {
				Output.output(config, args);
			} catch (IOException e) {
				e.printStackTrace();
			}
			break;
			
		}
		
	} 
                            #location 73 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public static void main(String[] unparsedArgs) {
		
		/* assume --gui if no parameters are given */
		
		if (unparsedArgs.length == 0) {
		 
			System.out.println("No parameters, running graphical interface.\n"
					+ "If you want to use the command line, use the --help"
					+ " parameter for a list of available parameters.");
			
			unparsedArgs = new String[]{"--gui"};
			
		}
		
		/* parse command line arguments */
		
		CLIArguments args = null;
		
		try {
			args = parseArguments(unparsedArgs);
		} catch (Exception e) {
			System.err.println(e.getMessage());
			System.exit(1);
		}
		
		/* parse lines from parameter file (if one exists) */
		
		List<CLIArguments> argumentsList = Collections.singletonList(args);
		
		if (args.isParameterFile()) {
			
			argumentsList = new ArrayList<CLIArguments>();
			
			try {
				
				List<String[]> unparsedArgsLines = CLIArgumentsUtil
					.getUnparsedParameterGroups(args.getParameterFile());
				
				for (String[] unparsedArgsLine : unparsedArgsLines) {
					
					try {
						argumentsList.add(parseArguments(unparsedArgsLine));
					} catch (Exception e) {
						System.err.println("Could not parse parameters from file:");
						System.err.println(unparsedArgsLine);
						System.err.println("Ignoring it. Reason:");
						System.err.println(e.getMessage());
					}
					
				}
				
			} catch (IOException e) {
				System.err.println(e.getMessage());
				System.exit(1);
			}
			
		}
		
		/* collect parameter groups into compatible groups
		 * (groups of parameter groups that use the same input and config files) */
		
		List<CLIArgumentsGroup> argumentsGroups = new ArrayList<CLIArgumentsGroup>();
		
		for (CLIArguments arguments : argumentsList) {
			
			boolean added = false;
			
			for (CLIArgumentsGroup compatibleGroup : argumentsGroups) {
				if (compatibleGroup.isCompatible(arguments)) {
					// add to existing compatible group
					compatibleGroup.addCLIArguments(arguments);
					added = true;
					break;
				}
			}
			
			if (!added) {
				// start a new compatible group
				argumentsGroups.add(new CLIArgumentsGroup(arguments));
			}
			
		}
		
		/* execute conversions */
		
		for (CLIArgumentsGroup argumentsGroup : argumentsGroups) {
						
			if (argumentsList.size() > 1) {
				System.out.print("executing conversion for these parameter lines: ");
				for (CLIArguments p : argumentsGroup.getCLIArgumentsList()) {
					System.out.print(argumentsList.indexOf(p) + " ");
				}
				System.out.print("\n");
			}
			
			executeArgumentsGroup(argumentsGroup);
			
		}
		
	}