Program: 89148
Project: 89148
Buggy source:
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  Pair<Long,QName> aspectPair=qnameDAO.getQName(RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);
  if (aspectPair != null) {
    List<Long> filePlanComponents=patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(),0L,patchDAO.getMaxAdmNodeID());
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + filePlanComponents.size() + "String_Node_Str");
    }
    for (    Long filePlanComponent : filePlanComponents) {
      Pair<Long,NodeRef> recordPair=nodeDAO.getNodePair(filePlanComponent);
      NodeRef filePlanComponentNodeRef=recordPair.getSecond();
      NodeRef filePlan=filePlanService.getFilePlan(filePlanComponentNodeRef);
      if (nodeService.getProperty(filePlanComponentNodeRef,PROP_ROOT_NODEREF) == null) {
        nodeService.setProperty(filePlanComponentNodeRef,PROP_ROOT_NODEREF,filePlan);
      }
      FilePlanComponentKind kind=filePlanService.getFilePlanComponentKind(filePlanComponentNodeRef);
      if (FilePlanComponentKind.RECORD_CATEGORY.equals(kind) || FilePlanComponentKind.RECORD_FOLDER.equals(kind) || FilePlanComponentKind.RECORD.equals(kind)) {
        Role adminRole=filePlanRoleService.getRole(filePlan,"String_Node_Str");
        if (adminRole != null) {
          permissionService.setPermission(filePlanComponentNodeRef,adminRole.getRoleGroupName(),RMPermissionModel.FILING,true);
        }
        Serializable vitalRecordIndicator=nodeService.getProperty(filePlanComponentNodeRef,PROP_VITAL_RECORD_INDICATOR);
        if (vitalRecordIndicator == null) {
          nodeService.setProperty(filePlanComponentNodeRef,PROP_VITAL_RECORD_INDICATOR,false);
        }
        Serializable reviewPeriod=nodeService.getProperty(filePlanComponentNodeRef,PROP_REVIEW_PERIOD);
        if (reviewPeriod == null) {
          nodeService.setProperty(filePlanComponentNodeRef,PROP_REVIEW_PERIOD,new Period("String_Node_Str"));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
 */
@Override protected void executePatch(){
  Pair<Long,QName> aspectPair=qnameDAO.getQName(RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);
  if (aspectPair != null) {
    List<Long> filePlanComponents=patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(),0L,patchDAO.getMaxAdmNodeID());
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("String_Node_Str" + filePlanComponents.size() + "String_Node_Str");
    }
    for (    Long filePlanComponent : filePlanComponents) {
      Pair<Long,NodeRef> recordPair=nodeDAO.getNodePair(filePlanComponent);
      NodeRef filePlanComponentNodeRef=recordPair.getSecond();
      NodeRef filePlan=filePlanService.getFilePlan(filePlanComponentNodeRef);
      if (nodeService.getProperty(filePlanComponentNodeRef,PROP_ROOT_NODEREF) == null) {
        nodeService.setProperty(filePlanComponentNodeRef,PROP_ROOT_NODEREF,filePlan);
      }
      FilePlanComponentKind kind=filePlanService.getFilePlanComponentKind(filePlanComponentNodeRef);
      if (FilePlanComponentKind.RECORD_CATEGORY.equals(kind) || FilePlanComponentKind.RECORD_FOLDER.equals(kind) || FilePlanComponentKind.RECORD.equals(kind)) {
        Role adminRole=filePlanRoleService.getRole(filePlan,"String_Node_Str");
        if (adminRole != null) {
          permissionService.setPermission(filePlanComponentNodeRef,adminRole.getRoleGroupName(),RMPermissionModel.FILING,true);
        }
        Serializable vitalRecordIndicator=nodeService.getProperty(filePlanComponentNodeRef,PROP_VITAL_RECORD_INDICATOR);
        if (vitalRecordIndicator == null) {
          nodeService.setProperty(filePlanComponentNodeRef,PROP_VITAL_RECORD_INDICATOR,false);
        }
        Serializable reviewPeriod=nodeService.getProperty(filePlanComponentNodeRef,PROP_REVIEW_PERIOD);
        if (reviewPeriod == null) {
          nodeService.setProperty(filePlanComponentNodeRef,PROP_REVIEW_PERIOD,new Period("String_Node_Str"));
        }
      }
    }
  }
}