Source:
<code>public Result execute(UIExecutionContext context) throws Exception { WindupConfiguration windupConfiguration = new WindupConfiguration(); for (Entry<ConfigurationOption, InputComponent<?, ?>> entry : this.inputOptions.entrySet()) { String key = entry.getKey().getName(); Object value = getValueForInput(entry.getValue()); windupConfiguration.setOptionValue(key, value); } <START> windupConfiguration.addDefaultDirectories(); <END> Boolean overwrite = (Boolean) windupConfiguration.getOptionMap().get(OverwriteOption.NAME); if (overwrite == null) { overwrite = false; } if (!overwrite && pathNotEmpty(windupConfiguration.getOutputDirectory().toFile())) { String promptMsg = "Overwrite all contents of \"" + windupConfiguration.getOutputDirectory().toString() + "\" (anything already in the directory will be deleted)?"; if (!context.getPrompt().promptBoolean(promptMsg, false)) { String outputPath = windupConfiguration.getOutputDirectory().toString(); return Results.fail("Files exist in " + outputPath + ", but --overwrite not specified. Aborting!"); } } context.getUIContext().getAttributeMap().put(WindupConfiguration.class, windupConfiguration); FileUtils.deleteQuietly(windupConfiguration.getOutputDirectory().toFile()); Path graphPath = windupConfiguration.getOutputDirectory().resolve("graph"); try (GraphContext graphContext = graphContextFactory.create(graphPath)) { context.getUIContext().getAttributeMap().put(GraphContext.class, graphContext); UIProgressMonitor uiProgressMonitor = context.getProgressMonitor(); WindupProgressMonitor progressMonitor = new WindupProgressMonitorAdapter(uiProgressMonitor); windupConfiguration .setProgressMonitor(progressMonitor) .setGraphContext(graphContext); processor.execute(windupConfiguration); uiProgressMonitor.done(); Path indexHtmlPath = windupConfiguration.getOutputDirectory().resolve("index.html").normalize().toAbsolutePath(); return Results.success("Windup report created: " + indexHtmlPath + System.getProperty("line.separator") + " Access it at this URL: " + indexHtmlPath.toUri()); } }</code><technical_language>Good. addDefaultDirectories, setDefaultDirectories, useDefaultDirectories</technical_language>

Target:
public Result execute(UIExecutionContext context) throws Exception { WindupConfiguration windupConfiguration = new WindupConfiguration(); for (Entry<ConfigurationOption, InputComponent<?, ?>> entry : this.inputOptions.entrySet()) { String key = entry.getKey().getName(); Object value = getValueForInput(entry.getValue()); windupConfiguration.setOptionValue(key, value); } windupConfiguration.useDefaultDirectories(); Boolean overwrite = (Boolean) windupConfiguration.getOptionMap().get(OverwriteOption.NAME); if (overwrite == null) { overwrite = false; } if (!overwrite && pathNotEmpty(windupConfiguration.getOutputDirectory().toFile())) { String promptMsg = "Overwrite all contents of \"" + windupConfiguration.getOutputDirectory().toString() + "\" (anything already in the directory will be deleted)?"; if (!context.getPrompt().promptBoolean(promptMsg, false)) { String outputPath = windupConfiguration.getOutputDirectory().toString(); return Results.fail("Files exist in " + outputPath + ", but --overwrite not specified. Aborting!"); } } context.getUIContext().getAttributeMap().put(WindupConfiguration.class, windupConfiguration); FileUtils.deleteQuietly(windupConfiguration.getOutputDirectory().toFile()); Path graphPath = windupConfiguration.getOutputDirectory().resolve("graph"); try (GraphContext graphContext = graphContextFactory.create(graphPath)) { context.getUIContext().getAttributeMap().put(GraphContext.class, graphContext); UIProgressMonitor uiProgressMonitor = context.getProgressMonitor(); WindupProgressMonitor progressMonitor = new WindupProgressMonitorAdapter(uiProgressMonitor); windupConfiguration .setProgressMonitor(progressMonitor) .setGraphContext(graphContext); processor.execute(windupConfiguration); uiProgressMonitor.done(); Path indexHtmlPath = windupConfiguration.getOutputDirectory().resolve("index.html").normalize().toAbsolutePath(); return Results.success("Windup report created: " + indexHtmlPath + System.getProperty("line.separator") + " Access it at this URL: " + indexHtmlPath.toUri()); } }