Source:
<code>public void cancelJob(InterpreterContext context) throws InterpreterException { <START> LOGGER.info("Canceling job associated of paragraph: " + context.getParagraphId()); <END> JobClient jobClient = this.jobs.get(context.getParagraphId()); if (jobClient == null) { LOGGER.warn("Unable to remove Job from paragraph as no job associated to this paragraph", context.getParagraphId()); return; } try { String savepointDir = context.getLocalProperties().get("savepointDir"); if (StringUtils.isBlank(savepointDir)) { LOGGER.info("Trying to cancel job of paragraph {}", context.getParagraphId()); jobClient.cancel(); } else { LOGGER.info("Trying to stop job of paragraph with save point dir: {}", context.getParagraphId(), savepointDir); String savePointPath = jobClient.stopWithSavepoint(true, savepointDir).get(); z.angularBind(context.getParagraphId() + "_savepointpath", savePointPath); LOGGER.info("Job of paragraph is stopped with save point path: {}", jobClient.getJobID(), context.getParagraphId(), savePointPath); } } catch (Exception e) { String errorMessage = String.format("Fail to cancel job %s that is associated " + "with paragraph %s", jobClient.getJobID(), context.getParagraphId()); LOGGER.warn(errorMessage, e); throw new InterpreterException(errorMessage, e); } finally { FlinkJobProgressPoller jobProgressPoller = jobProgressPollerMap.remove(jobClient.getJobID()); if (jobProgressPoller != null) { jobProgressPoller.cancel(); jobProgressPoller.interrupt(); } this.jobs.remove(context.getParagraphId()); } }</code><technical_language>sense placeholder instead of concatenation - lead call of context.getParagraphId() if logger is configured for INFO</technical_language>

Target:
public void cancelJob(InterpreterContext context) throws InterpreterException { LOGGER.info("Canceling job associated of paragraph: {}", context.getParagraphId()); JobClient jobClient = this.jobs.get(context.getParagraphId()); if (jobClient == null) { LOGGER.warn("Unable to remove Job from paragraph as no job associated to this paragraph", context.getParagraphId()); return; } try { String savepointDir = context.getLocalProperties().get("savepointDir"); if (StringUtils.isBlank(savepointDir)) { LOGGER.info("Trying to cancel job of paragraph {}", context.getParagraphId()); jobClient.cancel(); } else { LOGGER.info("Trying to stop job of paragraph with save point dir: {}", context.getParagraphId(), savepointDir); String savePointPath = jobClient.stopWithSavepoint(true, savepointDir).get(); z.angularBind(context.getParagraphId() + "_savepointpath", savePointPath); LOGGER.info("Job of paragraph is stopped with save point path: {}", jobClient.getJobID(), context.getParagraphId(), savePointPath); } } catch (Exception e) { String errorMessage = String.format("Fail to cancel job %s that is associated " + "with paragraph %s", jobClient.getJobID(), context.getParagraphId()); LOGGER.warn(errorMessage, e); throw new InterpreterException(errorMessage, e); } finally { FlinkJobProgressPoller jobProgressPoller = jobProgressPollerMap.remove(jobClient.getJobID()); if (jobProgressPoller != null) { jobProgressPoller.cancel(); jobProgressPoller.interrupt(); } this.jobs.remove(context.getParagraphId()); } }