Source:
<code>protected void doWork(IProgressMonitor monitor) throws Exception { requirementData.initialize(monitor); requirementToTestUnitsMap = new HashCollectionSet<>(HashSet::new); Set<ArtifactId> excludedArtifactIdMap = ViewIdUtility.findExcludedArtifactsByView(viewId, branch); List<Artifact> unitsOnBranch = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.TestCase, branch); if (unitsOnBranch != null) { ViewIdUtility.removeExcludedArtifacts(unitsOnBranch.iterator(), excludedArtifactIdMap); } testUnits = new HashMap<>(); <START> if (unitsOnBranch != null) { <END> for (Artifact unit : unitsOnBranch) { testUnits.put(convertToJavaFileName(unit.getName()), unit); } } List<Artifact> reqs = new ArrayList<>(); for (IArtifactType type : types) { if (withInheritance) { reqs.addAll( ArtifactQuery.getArtifactListFromTypeWithInheritence(type, branch, DeletionFlag.EXCLUDE_DELETED)); } else { reqs.addAll(ArtifactQuery.getArtifactListFromType(type, branch)); } } ViewIdUtility.removeExcludedArtifacts(reqs.iterator(), excludedArtifactIdMap); for (Artifact req : reqs) { List<Artifact> verifiers = req.getRelatedArtifacts(CoreRelationTypes.Verification__Verifier); ViewIdUtility.removeExcludedArtifacts(verifiers.iterator(), excludedArtifactIdMap); Set<String> verifierNames = new HashSet<>(); String inspection = getInspectionQual(req); if (Strings.isValid(inspection)) { verifierNames.add(inspection); } for (Artifact verifier : verifiers) { verifierNames.add(convertToJavaFileName(verifier.getName())); } requirementToTestUnitsMap.put(req, verifierNames); } }</code><technical_language>removed higher curly brace, HashMap instantiation moved higher</technical_language>

Target:
protected void doWork(IProgressMonitor monitor) throws Exception { requirementData.initialize(monitor); requirementToTestUnitsMap = new HashCollectionSet<>(HashSet::new); testUnits = new HashMap<>(); Set<ArtifactId> excludedArtifactIdMap = ViewIdUtility.findExcludedArtifactsByView(viewId, branch); List<Artifact> unitsOnBranch = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.TestCase, branch); if (unitsOnBranch != null) { ViewIdUtility.removeExcludedArtifacts(unitsOnBranch.iterator(), excludedArtifactIdMap); for (Artifact unit : unitsOnBranch) { testUnits.put(convertToJavaFileName(unit.getName()), unit); } } List<Artifact> reqs = new ArrayList<>(); for (IArtifactType type : types) { if (withInheritance) { reqs.addAll( ArtifactQuery.getArtifactListFromTypeWithInheritence(type, branch, DeletionFlag.EXCLUDE_DELETED)); } else { reqs.addAll(ArtifactQuery.getArtifactListFromType(type, branch)); } } ViewIdUtility.removeExcludedArtifacts(reqs.iterator(), excludedArtifactIdMap); for (Artifact req : reqs) { List<Artifact> verifiers = req.getRelatedArtifacts(CoreRelationTypes.Verification__Verifier); ViewIdUtility.removeExcludedArtifacts(verifiers.iterator(), excludedArtifactIdMap); Set<String> verifierNames = new HashSet<>(); String inspection = getInspectionQual(req); if (Strings.isValid(inspection)) { verifierNames.add(inspection); } for (Artifact verifier : verifiers) { verifierNames.add(convertToJavaFileName(verifier.getName())); } requirementToTestUnitsMap.put(req, verifierNames); } }