Program: 62226
Project: 62226
Buggy source:
@Override public void process(final NodeTemplate instance){
  referencePostProcessor.process(new ReferencePostProcessor.TypeReference(instance.getType(),NodeType.class));
  final NodeType nodeType=ToscaContext.get(NodeType.class,instance.getType());
  if (nodeType == null) {
    return;
  }
  safe(instance.getArtifacts()).values().forEach(artifactPostProcessor);
  safe(instance.getInterfaces()).values().stream().flatMap(anInterface -> safe(anInterface.getOperations()).values().stream()).map(Operation::getImplementationArtifact).filter(Objects::nonNull).forEach(artifactPostProcessor);
  NodeTemplate tempObject=NodeTemplateBuilder.buildNodeTemplate(nodeType,instance,false);
  safe(instance.getCapabilities()).keySet().forEach(s -> {
    if (!safe(tempObject.getCapabilities()).containsKey(s)) {
      Node node=ParsingContextExecution.getObjectToNodeMap().get(s);
      ParsingContextExecution.getParsingErrors().add(new ParsingError(ParsingErrorLevel.WARNING,ErrorCode.UNKNOWN_CAPABILITY,null,node.getStartMark(),null,node.getEndMark(),s));
    }
  }
);
  instance.setAttributes(tempObject.getAttributes());
  instance.setCapabilities(tempObject.getCapabilities());
  instance.setProperties(tempObject.getProperties());
  instance.setRequirements(tempObject.getRequirements());
  instance.setArtifacts(tempObject.getArtifacts());
  instance.setInterfaces(tempObject.getInterfaces());
  safe(instance.getCapabilities()).entrySet().forEach(capabilityPostProcessor);
  safe(instance.getRequirements()).entrySet().forEach(requirementPostProcessor);
  propertyValueChecker.checkProperties(nodeType,instance.getProperties(),instance.getName());
}

Fixed version (ground truth):
@Override public void process(final NodeTemplate instance){
  referencePostProcessor.process(new ReferencePostProcessor.TypeReference(instance,instance.getType(),NodeType.class));
  final NodeType nodeType=ToscaContext.get(NodeType.class,instance.getType());
  if (nodeType == null) {
    return;
  }
  safe(instance.getArtifacts()).values().forEach(artifactPostProcessor);
  safe(instance.getInterfaces()).values().stream().flatMap(anInterface -> safe(anInterface.getOperations()).values().stream()).map(Operation::getImplementationArtifact).filter(Objects::nonNull).forEach(artifactPostProcessor);
  NodeTemplate tempObject=NodeTemplateBuilder.buildNodeTemplate(nodeType,instance,false);
  safe(instance.getCapabilities()).keySet().forEach(s -> {
    if (!safe(tempObject.getCapabilities()).containsKey(s)) {
      Node node=ParsingContextExecution.getObjectToNodeMap().get(s);
      ParsingContextExecution.getParsingErrors().add(new ParsingError(ParsingErrorLevel.WARNING,ErrorCode.UNKNOWN_CAPABILITY,null,node.getStartMark(),null,node.getEndMark(),s));
    }
  }
);
  instance.setAttributes(tempObject.getAttributes());
  instance.setCapabilities(tempObject.getCapabilities());
  instance.setProperties(tempObject.getProperties());
  instance.setRequirements(tempObject.getRequirements());
  instance.setArtifacts(tempObject.getArtifacts());
  instance.setInterfaces(tempObject.getInterfaces());
  safe(instance.getCapabilities()).entrySet().forEach(capabilityPostProcessor);
  safe(instance.getRequirements()).entrySet().forEach(requirementPostProcessor);
  propertyValueChecker.checkProperties(nodeType,instance.getProperties(),instance.getName());
}