Source:
<code>public void calculateTiffHeader() { String tifDefinition; ConfigProjects cp; try { cp = new ConfigProjects(this.template.getProject().getTitle()); } catch (IOException e) { <START> logger.error(e.getMessage(), e); <END> Helper.setFehlerMeldung("IOException", e.getMessage()); return; } tifDefinition = cp.getParamString("tifheader." + this.docType.toLowerCase(), "blabla"); tifDefinition = tifDefinition.replaceAll("\\[\\[", "<"); tifDefinition = tifDefinition.replaceAll("\\]\\]", ">"); this.tifHeaderDocumentName = this.prozessKopie.getTitle(); this.tifHeaderImageDescription = new StringBuilder(""); StringTokenizer tokenizer = new StringTokenizer(tifDefinition, "+"); while (tokenizer.hasMoreTokens()) { String string = tokenizer.nextToken(); if (string.startsWith("'") && string.endsWith("'") && string.length() > 2) { this.tifHeaderImageDescription.append(string.substring(1, string.length() - 1)); } else if (string.equals("$Doctype")) { this.tifHeaderImageDescription.append(this.docType); } else { for (AdditionalField additionalField : this.additionalFields) { if ((additionalField.getTitle().equals("ATS") || additionalField.getTitle().equals("TSL")) && additionalField.getShowDependingOnDoctype() && (additionalField.getValue() == null || additionalField.getValue().equals(""))) { additionalField.setValue(this.atstsl); } if (additionalField.getTitle().equals(string) && additionalField.getShowDependingOnDoctype() && additionalField.getValue() != null) { this.tifHeaderImageDescription .append(calcProcessTitleCheck(additionalField.getTitle(), additionalField.getValue())); } } } } }</code><technical_language>setErrorMessage</technical_language>

Target:
public void calculateTiffHeader() { String tifDefinition; ConfigProjects cp; try { cp = new ConfigProjects(this.template.getProject().getTitle()); } catch (IOException e) { Helper.setErrorMessage("IOException", logger, e); return; } tifDefinition = cp.getParamString("tifheader." + this.docType.toLowerCase(), "blabla"); tifDefinition = tifDefinition.replaceAll("\\[\\[", "<"); tifDefinition = tifDefinition.replaceAll("\\]\\]", ">"); this.tifHeaderDocumentName = this.prozessKopie.getTitle(); this.tifHeaderImageDescription = new StringBuilder(); StringTokenizer tokenizer = new StringTokenizer(tifDefinition, "+"); while (tokenizer.hasMoreTokens()) { String string = tokenizer.nextToken(); if (string.startsWith("'") && string.endsWith("'") && string.length() > 2) { this.tifHeaderImageDescription.append(string.substring(1, string.length() - 1)); } else if (string.equals("$Doctype")) { this.tifHeaderImageDescription.append(this.docType); } else { for (AdditionalField additionalField : this.additionalFields) { if ((additionalField.getTitle().equals("ATS") || additionalField.getTitle().equals("TSL")) && additionalField.getShowDependingOnDoctype() && (additionalField.getValue() == null || additionalField.getValue().equals(""))) { additionalField.setValue(CopyProcess.atstsl); } if (additionalField.getTitle().equals(string) && additionalField.getShowDependingOnDoctype() && additionalField.getValue() != null) { this.tifHeaderImageDescription .append(calcProcessTitleCheck(additionalField.getTitle(), additionalField.getValue())); } } } } }