Source:
<code>public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException { if (!SonarInstallation.isValid(getInstallationName(), listener)) { <START> throw new AbortException("Invalid Sonar installation"); <END> } ArgumentListBuilder args = new ArgumentListBuilder(); EnvVars env = BuilderUtils.getEnvAndBuildVars(run, listener); SonarRunnerInstallation sri = getSonarRunnerInstallation(); if (sri == null) { args.add(launcher.isUnix() ? "sonar-scanner" : "sonar-scanner.bat"); } else { sri = BuilderUtils.getBuildTool(sri, env, listener, workspace); String exe = sri.getExecutable(launcher); if (exe == null) { Logger.printFailureMessage(listener); String msg = Messages.SonarScanner_ExecutableNotFound(sri.getName()); listener.fatalError(msg); throw new AbortException(msg); } args.add(exe); } SonarInstallation sonarInst = getSonarInstallation(); addTaskArgument(args); addAdditionalArguments(args, sonarInst); ExtendedArgumentListBuilder argsBuilder = new ExtendedArgumentListBuilder(args, launcher.isUnix()); populateConfiguration(argsBuilder, run, workspace, listener, env, sonarInst); computeJdkToUse(run, workspace, listener, env); env.put("SONAR_SCANNER_OPTS", getJavaOpts()); env.put("SONAR_RUNNER_OPTS", getJavaOpts()); long startTime = System.currentTimeMillis(); int exitCode; try { exitCode = executeSonarRunner(run, workspace, launcher, listener, args, env); } catch (IOException e) { handleErrors(run, listener, sri, startTime, e); exitCode = -1; } SonarUtils.addBuildInfoTo(run, getSonarInstallation().getName()); if (exitCode != 0) { throw new AbortException("Sonar runner exited with non-zero code: " + exitCode); } }</code><technical_language>s/Sonar/SonarQube server</technical_language>

Target:
public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException { if (!SonarInstallation.isValid(getInstallationName(), listener)) { throw new AbortException("Invalid SonarQube server installation"); } ArgumentListBuilder args = new ArgumentListBuilder(); EnvVars env = BuilderUtils.getEnvAndBuildVars(run, listener); SonarRunnerInstallation sri = getSonarRunnerInstallation(); if (sri == null) { args.add(launcher.isUnix() ? "sonar-scanner" : "sonar-scanner.bat"); } else { sri = BuilderUtils.getBuildTool(sri, env, listener, workspace); String exe = sri.getExecutable(launcher); if (exe == null) { Logger.printFailureMessage(listener); String msg = Messages.SonarScanner_ExecutableNotFound(sri.getName()); listener.fatalError(msg); throw new AbortException(msg); } args.add(exe); } SonarInstallation sonarInst = getSonarInstallation(); addTaskArgument(args); addAdditionalArguments(args, sonarInst); ExtendedArgumentListBuilder argsBuilder = new ExtendedArgumentListBuilder(args, launcher.isUnix()); populateConfiguration(argsBuilder, run, workspace, listener, env, sonarInst); computeJdkToUse(run, workspace, listener, env); env.put("SONAR_SCANNER_OPTS", getJavaOpts()); env.put("SONAR_RUNNER_OPTS", getJavaOpts()); long startTime = System.currentTimeMillis(); int exitCode; try { exitCode = executeSonarQubeScanner(run, workspace, launcher, listener, args, env); } catch (IOException e) { handleErrors(run, listener, sri, startTime, e); exitCode = -1; } SonarUtils.addBuildInfoTo(run, getSonarInstallation().getName()); if (exitCode != 0) { throw new AbortException("SonarQube scanner exited with non-zero code: " + exitCode); } }