Source:
<code>private void processSystemFunctions(ArtifactReadable functionsFolder, ISheetWriter writer) throws IOException { writer.startSheet("report", columnHeadings.length); writer.writeRow((Object[]) columnHeadings); for (ArtifactReadable systemFunction : functionsFolder.getDescendants()) { if (systemFunction.isOfType(CoreArtifactTypes.SystemFunction)) { writer.writeCell(systemFunction.getName()); accumulator.reset(systemFunction); accumulator.buildSubsystemsRequirementsMap(systemFunction); String sevCat; if (systemFunction.getAttributes(CoreAttributeTypes.SeverityCategory).size() != 1) { logger.debug("found too many attributes on %s", systemFunction.toString()); sevCat = systemFunction.getAttributes( CoreAttributeTypes.SeverityCategory).iterator().next().getDisplayableString(); } else { sevCat = systemFunction.getSoleAttributeAsString(CoreAttributeTypes.SeverityCategory); } writer.writeCell(sevCat); writeSFHAInfo(systemFunction, sevCat, writer); writer.writeCell(systemFunction.getSoleAttributeAsString(CoreAttributeTypes.SoftwareSafetyImpact, "")); writer.writeCell(systemFunction.getSoleAttributeAsString(CoreAttributeTypes.FunctionalDAL, "")); writer.writeCell(systemFunction.getSoleAttributeAsString(CoreAttributeTypes.FunctionalDALRationale, "")); StringBuilder paraNums = new StringBuilder(); StringBuilder reqNames = new StringBuilder(); boolean firstTime = true; for (ArtifactReadable systemRequirement : systemFunction.getRelated( CoreRelationTypes.Design__Requirement)) { if (!firstTime) { paraNums.append(", "); reqNames.append(", "); <START> } <END> firstTime = false; paraNums.append(systemRequirement.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, "")); reqNames.append(systemRequirement.getName()); } writer.writeCell(paraNums); writer.writeCell(reqNames, SYSTEM_REQUIREMENT_INDEX); accumulator.output(); writer.endRow(); } } writer.endSheet(); }</code><technical_language>nit: need set this loop, move "if (!firstTime)" bracket</technical_language>

Target:
private void processSystemFunctions(ArtifactReadable functionsFolder, ISheetWriter writer) throws IOException { writer.startSheet("report", columnHeadings.length); writer.writeRow((Object[]) columnHeadings); for (ArtifactReadable systemFunction : functionsFolder.getDescendants()) { if (systemFunction.isOfType(CoreArtifactTypes.SystemFunction)) { writer.writeCell(systemFunction.getName()); accumulator.reset(systemFunction); accumulator.buildSubsystemsRequirementsMap(systemFunction); String sevCat; if (systemFunction.getAttributes(CoreAttributeTypes.SeverityCategory).size() != 1) { logger.debug("found too many attributes on %s", systemFunction.toString()); sevCat = systemFunction.getAttributes( CoreAttributeTypes.SeverityCategory).iterator().next().getDisplayableString(); } else { sevCat = systemFunction.getSoleAttributeAsString(CoreAttributeTypes.SeverityCategory); } writer.writeCell(sevCat); writeSFHAInfo(systemFunction, sevCat, writer); writer.writeCell(systemFunction.getSoleAttributeAsString(CoreAttributeTypes.SoftwareSafetyImpact, "")); writer.writeCell(systemFunction.getSoleAttributeAsString(CoreAttributeTypes.FunctionalDAL, "")); writer.writeCell(systemFunction.getSoleAttributeAsString(CoreAttributeTypes.FunctionalDALRationale, "")); StringBuilder paraNums = new StringBuilder(); StringBuilder reqNames = new StringBuilder(); boolean firstTime = true; for (ArtifactReadable systemRequirement : systemFunction.getRelated( CoreRelationTypes.Design__Requirement)) { if (!firstTime) { paraNums.append(", "); reqNames.append(", "); } else { firstTime = false; } paraNums.append(systemRequirement.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, "")); reqNames.append(systemRequirement.getName()); } writer.writeCell(paraNums); writer.writeCell(reqNames, SYSTEM_REQUIREMENT_INDEX); accumulator.output(); writer.endRow(); } } writer.endSheet(); }