Program: 89247
Project: 89247
Buggy source:
/** 
 * @see org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy#onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef,java.util.Map,java.util.Map)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,type="String_Node_Str",notificationFrequency=NotificationFrequency.TRANSACTION_COMMIT) public void onUpdateProperties(final NodeRef nodeRef,final Map<QName,Serializable> before,final Map<QName,Serializable> after){
  if (nodeService.exists(nodeRef)) {
    if (isPropertyUpdated(before,after)) {
      AuthenticationUtil.runAs(new RunAsWork<Void>(){
        @Override public Void doWork() throws Exception {
          Date updatedDateValue=(Date)after.get(propertyName);
          if (updatedDateValue != null) {
            DispositionAction dispositionAction=dispositionService.getNextDispositionAction(nodeRef);
            if (dispositionAction != null) {
              DispositionActionDefinition daDefinition=dispositionAction.getDispositionActionDefinition();
              if (daDefinition != null) {
                if (propertyName.equals(daDefinition.getPeriodProperty())) {
                  Period period=daDefinition.getPeriod();
                  Date updatedAsOf=period.getNextDate(updatedDateValue);
                  NodeRef daNodeRef=dispositionAction.getNodeRef();
                  nodeService.setProperty(daNodeRef,PROP_DISPOSITION_AS_OF,updatedAsOf);
                }
              }
            }
          }
 else {
            if (before.get(propertyName) != null) {
              throw new AlfrescoRuntimeException("String_Node_Str" + propertyName.toPrefixString(namespaceService) + "String_Node_Str");
            }
          }
          return null;
        }
      }
,AuthenticationUtil.getSystemUserName());
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy#onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef,java.util.Map,java.util.Map)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,type="String_Node_Str",notificationFrequency=NotificationFrequency.TRANSACTION_COMMIT) public void onUpdateProperties(final NodeRef nodeRef,final Map<QName,Serializable> before,final Map<QName,Serializable> after){
  if (nodeService.exists(nodeRef)) {
    if (isPropertyUpdated(before,after)) {
      AuthenticationUtil.runAs(new RunAsWork<Void>(){
        @Override public Void doWork() throws Exception {
          Date updatedDateValue=(Date)after.get(propertyName);
          if (updatedDateValue != null) {
            DispositionAction dispositionAction=dispositionService.getNextDispositionAction(nodeRef);
            if (dispositionAction != null) {
              DispositionActionDefinition daDefinition=dispositionAction.getDispositionActionDefinition();
              if (daDefinition != null && propertyName.equals(daDefinition.getPeriodProperty())) {
                Period period=daDefinition.getPeriod();
                Date updatedAsOf=period.getNextDate(updatedDateValue);
                NodeRef daNodeRef=dispositionAction.getNodeRef();
                nodeService.setProperty(daNodeRef,PROP_DISPOSITION_AS_OF,updatedAsOf);
              }
            }
          }
 else {
            if (before.get(propertyName) != null) {
              throw new AlfrescoRuntimeException("String_Node_Str" + propertyName.toPrefixString(namespaceService) + "String_Node_Str");
            }
          }
          return null;
        }
      }
,AuthenticationUtil.getSystemUserName());
    }
  }
}