Source:
<code>public void execute() { if (this.outputFile == null) { throw new BuildException("outputFile attribute must be set"); } Compiler.setLoggingLevel(Level.OFF); CompilerOptions options = createCompilerOptions(); Compiler compiler = createCompiler(options); List<SourceFile> externs = findExternFiles(options); List<SourceFile> sources = findSourceFiles(); if (isStale() || forceRecompile) { log("Compiling " + sources.size() + " file(s) with " + externs.size() + " extern(s)"); Result result = compiler.compile(externs, sources, options); if (result.success) { StringBuilder source = new StringBuilder(compiler.toSource()); if (this.outputWrapperFile != null) { try { this.outputWrapper = Files.toString(this.outputWrapperFile, UTF_8); } catch (Exception e) { throw new BuildException("Invalid output_wrapper_file specified."); } } if (this.outputWrapper != null) { int pos = -1; pos = this.outputWrapper.indexOf(CommandLineRunner.OUTPUT_MARKER); if (pos > -1) { String prefix = this.outputWrapper.substring(0, pos); source.insert(0, prefix); int suffixStart = pos + CommandLineRunner.OUTPUT_MARKER.length(); String suffix = this.outputWrapper.substring(suffixStart); source.append(suffix); } else { throw new BuildException("Invalid output_wrapper specified. " + "Missing '" + CommandLineRunner.OUTPUT_MARKER + "'."); } <START> } else { <END> source.append(System.getProperty("line.separator")); source.append(" } if (result.sourceMap != null) { flushSourceMap(result.sourceMap); } writeResult(source.toString()); } else { throw new BuildException("Compilation failed."); } } else { log("None of the files changed. Compilation skipped."); } }</code><technical_language>Do need check result.sourceMap != null</technical_language>

Target:
public void execute() { if (this.outputFile == null) { throw new BuildException("outputFile attribute must be set"); } Compiler.setLoggingLevel(Level.OFF); CompilerOptions options = createCompilerOptions(); Compiler compiler = createCompiler(options); List<SourceFile> externs = findExternFiles(options); List<SourceFile> sources = findSourceFiles(); if (isStale() || forceRecompile) { log("Compiling " + sources.size() + " file(s) with " + externs.size() + " extern(s)"); Result result = compiler.compile(externs, sources, options); if (result.success) { StringBuilder source = new StringBuilder(compiler.toSource()); if (this.outputWrapperFile != null) { try { this.outputWrapper = Files.toString(this.outputWrapperFile, UTF_8); } catch (Exception e) { throw new BuildException("Invalid output_wrapper_file specified."); } } if (this.outputWrapper != null) { int pos = -1; pos = this.outputWrapper.indexOf(CommandLineRunner.OUTPUT_MARKER); if (pos > -1) { String prefix = this.outputWrapper.substring(0, pos); source.insert(0, prefix); int suffixStart = pos + CommandLineRunner.OUTPUT_MARKER.length(); String suffix = this.outputWrapper.substring(suffixStart); source.append(suffix); } else { throw new BuildException("Invalid output_wrapper specified. " + "Missing '" + CommandLineRunner.OUTPUT_MARKER + "'."); } } if (result.sourceMap != null) { flushSourceMap(result.sourceMap); } writeResult(source.toString()); } else { throw new BuildException("Compilation failed."); } } else { log("None of the files changed. Compilation skipped."); } }