nus-yam/ex-repair huggingface dataset:
Program: 89397
Project: 89397
Buggy source:
/** 
 * @see org.alfresco.repo.action.ActionServiceImpl#getActionConditionDefinition(java.lang.String)
 */
public ActionConditionDefinition getActionConditionDefinition(String name){
  ActionConditionDefinition definition=null;
  Object bean=extendedApplicationContext.getBean(name);
  if (bean != null && bean instanceof ActionConditionEvaluator) {
    ActionConditionEvaluator evaluator=(ActionConditionEvaluator)bean;
    definition=evaluator.getActionConditionDefintion();
  }
  return definition;
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.action.ActionServiceImpl#getActionConditionDefinition(java.lang.String)
 */
public ActionConditionDefinition getActionConditionDefinition(String name){
  ActionConditionDefinition definition=null;
  Object bean=extendedApplicationContext.getBean(name);
  if (bean instanceof ActionConditionEvaluator) {
    ActionConditionEvaluator evaluator=(ActionConditionEvaluator)bean;
    definition=evaluator.getActionConditionDefintion();
  }
  return definition;
}
Program: 89399
Project: 89399
Buggy source:
/** 
 * Ensure that the content of a ghosted node can not be updated.
 * @see org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy#onContentUpdate(org.alfresco.service.cmr.repository.NodeRef,boolean)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,notificationFrequency=NotificationFrequency.EVERY_EVENT,policy="String_Node_Str",type="String_Node_Str") public void onContentUpdate(NodeRef Content,boolean bNew){
  throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_GHOSTED_PROP_UPDATE));
}

Fixed version (ground truth):
/** 
 * Ensure that the content of a ghosted node can not be updated.
 * @see org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy#onContentUpdate(org.alfresco.service.cmr.repository.NodeRef,boolean)
 */
@Override @Behaviour(kind=BehaviourKind.CLASS,notificationFrequency=NotificationFrequency.EVERY_EVENT,policy="String_Node_Str",type="String_Node_Str") public void onContentUpdate(NodeRef content,boolean bNew){
  throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_GHOSTED_PROP_UPDATE));
}
Program: 89400
Project: 89400
Buggy source:
/** 
 * Returns the number of milliseconds for the "from date".
 * @param date The date for which the number of milliseconds should retrieved.
 * @return Returns null if the given date is null, otherwise the number of milliseconds for the given date.
 */
private Long getFromDateTime(Date date){
  Long fromDateTime=null;
  Date fromDate=getFromDate(date);
  if (fromDate != null) {
    fromDateTime=new Long(fromDate.getTime());
  }
  return fromDateTime;
}

Fixed version (ground truth):
/** 
 * Returns the number of milliseconds for the "from date".
 * @param date The date for which the number of milliseconds should retrieved.
 * @return Returns null if the given date is null, otherwise the number of milliseconds for the given date.
 */
private Long getFromDateTime(Date date){
  Long fromDateTime=null;
  Date fromDate=getFromDate(date);
  if (fromDate != null) {
    fromDateTime=Long.valueOf(fromDate.getTime());
  }
  return fromDateTime;
}
Program: 89401
Project: 89401
Buggy source:
/** 
 * Returns the number of milliseconds for the "to date".
 * @param date The date for which the number of milliseconds should retrieved.
 * @return Returns null if the given date is null, otherwise the number of milliseconds for the given date.
 */
private Long getToDateTime(Date date){
  Long toDateTime=null;
  Date toDate=getToDate(date);
  if (toDate != null) {
    toDateTime=new Long(toDate.getTime());
  }
  return toDateTime;
}

Fixed version (ground truth):
/** 
 * Returns the number of milliseconds for the "to date".
 * @param date The date for which the number of milliseconds should retrieved.
 * @return Returns null if the given date is null, otherwise the number of milliseconds for the given date.
 */
private Long getToDateTime(Date date){
  Long toDateTime=null;
  Date toDate=getToDate(date);
  if (toDate != null) {
    toDateTime=Long.valueOf(toDate.getTime());
  }
  return toDateTime;
}
Program: 89402
Project: 89402
Buggy source:
private void checkSupportedDefinitions(List<ConfigAttributeDefintion> supportedDefinitions,int parentResult,int childResult){
  for (  ConfigAttributeDefintion cad : supportedDefinitions) {
    if (cad.parent == true && parentResult == AccessDecisionVoter.ACCESS_DENIED) {
      throw new AccessDeniedException("String_Node_Str");
    }
 else     if (cad.parent == false && childResult == AccessDecisionVoter.ACCESS_DENIED) {
      throw new AccessDeniedException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void checkSupportedDefinitions(List<ConfigAttributeDefintion> supportedDefinitions,int parentResult,int childResult){
  for (  ConfigAttributeDefintion cad : supportedDefinitions) {
    if (cad.parent && parentResult == AccessDecisionVoter.ACCESS_DENIED) {
      throw new AccessDeniedException("String_Node_Str");
    }
 else     if (cad.parent == false && childResult == AccessDecisionVoter.ACCESS_DENIED) {
      throw new AccessDeniedException("String_Node_Str");
    }
  }
}
Program: 89403
Project: 89403
Buggy source:
public int compare(final NodeRef f1,final NodeRef f2){
  return filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Integer>(){
    public Integer doWork() throws Exception {
      return new Integer(compareImpl(f1,f2));
    }
  }
).intValue();
}

Fixed version (ground truth):
public int compare(final NodeRef f1,final NodeRef f2){
  return filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Integer>(){
    public Integer doWork() throws Exception {
      return Integer.valueOf(compareImpl(f1,f2));
    }
  }
).intValue();
}
Program: 89404
Project: 89404
Buggy source:
private int compareImpl(NodeRef f1,NodeRef f2){
  DispositionAction da1=dispositionService.getNextDispositionAction(f1);
  DispositionAction da2=dispositionService.getNextDispositionAction(f2);
  if (da1 != null && da2 != null) {
    Date asOfDate1=da1.getAsOfDate();
    Date asOfDate2=da2.getAsOfDate();
    if (asOfDate1 != null && asOfDate2 != null) {
      return asOfDate1.compareTo(asOfDate2);
    }
 else     if (asOfDate1 != null || asOfDate2 != null) {
      return asOfDate1 == null ? +1 : -1;
    }
 else {
      DispositionActionDefinition dad1=da1.getDispositionActionDefinition();
      DispositionActionDefinition dad2=da2.getDispositionActionDefinition();
      int eventsCount1=0;
      int eventsCount2=0;
      if (dad1 != null) {
        eventsCount1=dad1.getEvents().size();
      }
      if (dad2 != null) {
        eventsCount2=dad2.getEvents().size();
      }
      return new Integer(eventsCount1).compareTo(eventsCount2);
    }
  }
  return 0;
}

Fixed version (ground truth):
private int compareImpl(NodeRef f1,NodeRef f2){
  DispositionAction da1=dispositionService.getNextDispositionAction(f1);
  DispositionAction da2=dispositionService.getNextDispositionAction(f2);
  if (da1 != null && da2 != null) {
    Date asOfDate1=da1.getAsOfDate();
    Date asOfDate2=da2.getAsOfDate();
    if (asOfDate1 != null && asOfDate2 != null) {
      return asOfDate1.compareTo(asOfDate2);
    }
 else     if (asOfDate1 != null || asOfDate2 != null) {
      return asOfDate1 == null ? +1 : -1;
    }
 else {
      DispositionActionDefinition dad1=da1.getDispositionActionDefinition();
      DispositionActionDefinition dad2=da2.getDispositionActionDefinition();
      int eventsCount1=0;
      int eventsCount2=0;
      if (dad1 != null) {
        eventsCount1=dad1.getEvents().size();
      }
      if (dad2 != null) {
        eventsCount2=dad2.getEvents().size();
      }
      return Integer.valueOf(eventsCount1).compareTo(eventsCount2);
    }
  }
  return 0;
}
Program: 89405
Project: 89405
Buggy source:
public Integer doWork() throws Exception {
  return new Integer(compareImpl(f1,f2));
}

Fixed version (ground truth):
public Integer doWork() throws Exception {
  return Integer.valueOf(compareImpl(f1,f2));
}
Program: 89406
Project: 89406
Buggy source:
/** 
 * Get the currently recorded schema version for the module 
 * @return  int currently recorded schema version
 */
protected int getCurrentSchema(){
  Integer result=START_SCHEMA;
  if (attributeService.exists(KEY_MODULE_SCHEMA,getModuleId()) == true) {
    result=(Integer)attributeService.getAttribute(KEY_MODULE_SCHEMA,getModuleId());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Get the currently recorded schema version for the module
 * @return  int currently recorded schema version
 */
protected int getCurrentSchema(){
  Integer result=START_SCHEMA;
  if (attributeService.exists(KEY_MODULE_SCHEMA,getModuleId()) == true) {
    result=(Integer)attributeService.getAttribute(KEY_MODULE_SCHEMA,getModuleId());
  }
  return result;
}
Program: 89407
Project: 89407
Buggy source:
/** 
 * Update the recorded schema version for the module.
 * @param newSchema new schema version
 */
protected void updateSchema(int newSchema){
  attributeService.setAttribute(new Integer(newSchema),KEY_MODULE_SCHEMA,getModuleId());
}

Fixed version (ground truth):
/** 
 * Update the recorded schema version for the module.
 * @param newSchema new schema version
 */
protected void updateSchema(int newSchema){
  attributeService.setAttribute(Integer.valueOf(newSchema),KEY_MODULE_SCHEMA,getModuleId());
}
Program: 89408
Project: 89408
Buggy source:
public void beforeRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters);

Fixed version (ground truth):
void beforeRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters);
Program: 89409
Project: 89409
Buggy source:
public void beforeCreateReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);

Fixed version (ground truth):
void beforeCreateReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);
Program: 89410
Project: 89410
Buggy source:
/** 
 * @param fromNodeRef   from node reference
 * @param toNodeRef     to node reference
 * @param reference     name of reference
 */
public void onRemoveReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);

Fixed version (ground truth):
/** 
 * @param fromNodeRef   from node reference
 * @param toNodeRef     to node reference
 * @param reference     name of reference
 */
void onRemoveReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);
Program: 89411
Project: 89411
Buggy source:
public void onRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters);

Fixed version (ground truth):
void onRMActionExecution(NodeRef nodeRef,String name,Map<String,Serializable> parameters);
Program: 89412
Project: 89412
Buggy source:
/** 
 * @param nodeRef   node reference
 */
public void onFileRecord(NodeRef nodeRef);

Fixed version (ground truth):
/** 
 * @param nodeRef   node reference
 */
void onFileRecord(NodeRef nodeRef);
Program: 89413
Project: 89413
Buggy source:
public void onCreateReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);

Fixed version (ground truth):
void onCreateReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);
Program: 89414
Project: 89414
Buggy source:
/** 
 * @param nodeRef   node reference
 */
public void beforeFileRecord(NodeRef nodeRef);

Fixed version (ground truth):
/** 
 * @param nodeRef   node reference
 */
void beforeFileRecord(NodeRef nodeRef);
Program: 89415
Project: 89415
Buggy source:
public void beforeRemoveReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);

Fixed version (ground truth):
void beforeRemoveReference(NodeRef fromNodeRef,NodeRef toNodeRef,QName reference);
Program: 89416
Project: 89416
Buggy source:
/** 
 * Some admin-related rmActions execute against a target nodeRef which is not provided by the calling code, but is instead an implementation detail of the action.
 * @return the target nodeRef
 */
public NodeRef getImplicitTargetNodeRef();

Fixed version (ground truth):
/** 
 * Some admin-related rmActions execute against a target nodeRef which is not provided by the calling code, but is instead an implementation detail of the action.
 * @return the target nodeRef
 */
NodeRef getImplicitTargetNodeRef();
Program: 89417
Project: 89417
Buggy source:
/** 
 * Get the name of the action
 * @return  String  action name
 */
public String getName();

Fixed version (ground truth):
/** 
 * Get the name of the action
 * @return  String  action name
 */
String getName();
Program: 89418
Project: 89418
Buggy source:
/** 
 * Get the label of the action
 * @return  String  action label
 */
public String getLabel();

Fixed version (ground truth):
/** 
 * Get the label of the action
 * @return  String  action label
 */
String getLabel();
Program: 89419
Project: 89419
Buggy source:
/** 
 * Get the records management action definition.
 * @return
 * @since 2.1
 */
public RecordsManagementActionDefinition getRecordsManagementActionDefinition();

Fixed version (ground truth):
/** 
 * Get the records management action definition.
 * @return
 * @since 2.1
 */
RecordsManagementActionDefinition getRecordsManagementActionDefinition();
Program: 89420
Project: 89420
Buggy source:
/** 
 * Indicates whether the action is public or not
 * @return
 * @since 2.1
 */
public boolean isPublicAction();

Fixed version (ground truth):
/** 
 * Indicates whether the action is public or not
 * @return
 * @since 2.1
 */
boolean isPublicAction();
Program: 89421
Project: 89421
Buggy source:
/** 
 * Get the description of the action
 * @return  String  action description 
 */
public String getDescription();

Fixed version (ground truth):
/** 
 * Get the description of the action
 * @return  String  action description
 */
String getDescription();
Program: 89422
Project: 89422
Buggy source:
/** 
 * Execution of the action
 * @param filePlanComponent     file plan component the action is executed upon
 * @param parameters            action parameters
 */
public RecordsManagementActionResult execute(NodeRef filePlanComponent,Map<String,Serializable> parameters);

Fixed version (ground truth):
/** 
 * Execution of the action
 * @param filePlanComponent     file plan component the action is executed upon
 * @param parameters            action parameters
 */
RecordsManagementActionResult execute(NodeRef filePlanComponent,Map<String,Serializable> parameters);
Program: 89423
Project: 89423
Buggy source:
/** 
 * @return
 */
public boolean isPublicCondition();

Fixed version (ground truth):
/** 
 * @return
 */
boolean isPublicCondition();
Program: 89424
Project: 89424
Buggy source:
/** 
 * Get the name of the action condition
 * @return  String  action condition name
 */
public String getName();

Fixed version (ground truth):
/** 
 * Get the name of the action condition
 * @return  String  action condition name
 */
String getName();
Program: 89425
Project: 89425
Buggy source:
/** 
 * Get the label of the action condition
 * @return  String  action condition label
 */
public String getLabel();

Fixed version (ground truth):
/** 
 * Get the label of the action condition
 * @return  String  action condition label
 */
String getLabel();
Program: 89426
Project: 89426
Buggy source:
/** 
 * @return
 */
public RecordsManagementActionConditionDefinition getRecordsManagementActionConditionDefinition();

Fixed version (ground truth):
/** 
 * @return
 */
RecordsManagementActionConditionDefinition getRecordsManagementActionConditionDefinition();
Program: 89427
Project: 89427
Buggy source:
/** 
 * Get the description of the action condition
 * @return  String  action condition description 
 */
public String getDescription();

Fixed version (ground truth):
/** 
 * Get the description of the action condition
 * @return  String  action condition description
 */
String getDescription();
Program: 89429
Project: 89429
Buggy source:
/** 
 * @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,org.alfresco.service.cmr.repository.NodeRef)
 */
@Override protected void executeImpl(Action action,NodeRef actionedUponNodeRef){
  if (nodeService.exists(actionedUponNodeRef) == true && freezeService.isFrozen(actionedUponNodeRef) == false) {
    if (recordService.isRecord(actionedUponNodeRef)) {
      ChildAssociationRef assocRef=nodeService.getPrimaryParent(actionedUponNodeRef);
      if (assocRef != null) {
        actionedUponNodeRef=assocRef.getParentRef();
      }
    }
    if (recordFolderService.isRecordFolder(actionedUponNodeRef) == true) {
      Boolean isClosed=(Boolean)nodeService.getProperty(actionedUponNodeRef,PROP_IS_CLOSED);
      if (Boolean.TRUE.equals(isClosed) == true) {
        nodeService.setProperty(actionedUponNodeRef,PROP_IS_CLOSED,false);
      }
    }
 else {
      if (logger.isWarnEnabled())       logger.warn(I18NUtil.getMessage(MSG_NO_OPEN_RECORD_FOLDER,actionedUponNodeRef.toString()));
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,org.alfresco.service.cmr.repository.NodeRef)
 */
@Override protected void executeImpl(Action action,NodeRef actionedUponNodeRef){
  if (nodeService.exists(actionedUponNodeRef) == true && freezeService.isFrozen(actionedUponNodeRef) == false) {
    if (recordService.isRecord(actionedUponNodeRef)) {
      ChildAssociationRef assocRef=nodeService.getPrimaryParent(actionedUponNodeRef);
      if (assocRef != null) {
        actionedUponNodeRef=assocRef.getParentRef();
      }
    }
    if (recordFolderService.isRecordFolder(actionedUponNodeRef) == true) {
      Boolean isClosed=(Boolean)nodeService.getProperty(actionedUponNodeRef,PROP_IS_CLOSED);
      if (Boolean.TRUE.equals(isClosed) == true) {
        nodeService.setProperty(actionedUponNodeRef,PROP_IS_CLOSED,false);
      }
    }
 else {
      if (logger.isWarnEnabled()) {
        logger.warn(I18NUtil.getMessage(MSG_NO_OPEN_RECORD_FOLDER,actionedUponNodeRef.toString()));
      }
    }
  }
}
Program: 89430
Project: 89430
Buggy source:
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService#setCustomPropertyDefinitionLabel(org.alfresco.service.namespace.QName,java.lang.String)
 */
public QName setCustomPropertyDefinitionLabel(QName propQName,String newLabel){
  ParameterCheck.mandatory("String_Node_Str",propQName);
  PropertyDefinition propDefn=dictionaryService.getProperty(propQName);
  if (propDefn == null) {
    throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_PROP_EXIST,propQName));
  }
  if (newLabel == null)   return propQName;
  NodeRef modelRef=getCustomModelRef(propQName.getNamespaceURI());
  M2Model deserializedModel=readCustomContentModel(modelRef);
  M2Property targetProperty=findProperty(propQName,deserializedModel);
  targetProperty.setTitle(newLabel);
  writeCustomContentModel(modelRef,deserializedModel);
  if (logger.isInfoEnabled()) {
    logger.info("String_Node_Str" + propQName + "String_Node_Str"+ newLabel);
  }
  return propQName;
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService#setCustomPropertyDefinitionLabel(org.alfresco.service.namespace.QName,java.lang.String)
 */
public QName setCustomPropertyDefinitionLabel(QName propQName,String newLabel){
  ParameterCheck.mandatory("String_Node_Str",propQName);
  PropertyDefinition propDefn=dictionaryService.getProperty(propQName);
  if (propDefn == null) {
    throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_PROP_EXIST,propQName));
  }
  if (newLabel == null) {
    return propQName;
  }
  NodeRef modelRef=getCustomModelRef(propQName.getNamespaceURI());
  M2Model deserializedModel=readCustomContentModel(modelRef);
  M2Property targetProperty=findProperty(propQName,deserializedModel);
  targetProperty.setTitle(newLabel);
  writeCustomContentModel(modelRef,deserializedModel);
  if (logger.isInfoEnabled()) {
    logger.info("String_Node_Str" + propQName + "String_Node_Str"+ newLabel);
  }
  return propQName;
}
Program: 89432
Project: 89432
Buggy source:
private M2Model readCustomContentModel(NodeRef modelNodeRef){
  ContentReader reader=this.contentService.getReader(modelNodeRef,ContentModel.TYPE_CONTENT);
  if (reader.exists() == false) {
    throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CUSTOM_MODEL_NO_CONTENT,modelNodeRef.toString()));
  }
  InputStream contentIn=null;
  M2Model deserializedModel=null;
  try {
    contentIn=reader.getContentInputStream();
    deserializedModel=M2Model.createModel(contentIn);
  }
  finally {
    try {
      if (contentIn != null)       contentIn.close();
    }
 catch (    IOException ignored) {
    }
  }
  return deserializedModel;
}

Fixed version (ground truth):
private M2Model readCustomContentModel(NodeRef modelNodeRef){
  ContentReader reader=this.contentService.getReader(modelNodeRef,ContentModel.TYPE_CONTENT);
  if (reader.exists() == false) {
    throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CUSTOM_MODEL_NO_CONTENT,modelNodeRef.toString()));
  }
  InputStream contentIn=null;
  M2Model deserializedModel=null;
  try {
    contentIn=reader.getContentInputStream();
    deserializedModel=M2Model.createModel(contentIn);
  }
  finally {
    try {
      if (contentIn != null) {
        contentIn.close();
      }
    }
 catch (    IOException ignored) {
    }
  }
  return deserializedModel;
}
Program: 89433
Project: 89433
Buggy source:
/** 
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  final AbstractCapability other=(AbstractCapability)obj;
  if (getName() == null) {
    if (other.getName() != null)     return false;
  }
 else   if (!getName().equals(other.getName()))   return false;
  return true;
}

Fixed version (ground truth):
/** 
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final AbstractCapability other=(AbstractCapability)obj;
  if (getName() == null) {
    if (other.getName() != null) {
      return false;
    }
  }
 else   if (!getName().equals(other.getName())) {
    return false;
  }
  return true;
}
Program: 89434
Project: 89434
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  final CustomMapping other=(CustomMapping)obj;
  if (!from.equals(other.getFrom())) {
    return false;
  }
  if (!to.equals(other.getTo())) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  final CustomMapping other=(CustomMapping)obj;
  if (!from.equals(other.getFrom())) {
    return false;
  }
  if (!to.equals(other.getTo())) {
    return false;
  }
  return true;
}
Program: 89435
Project: 89435
Buggy source:
/** 
 * Load the events from the persistant storage
 */
private void loadEvents(){
  AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>(){
    public Object doWork() throws Exception {
      if (nodeService.exists(CONFIG_NODE_REF) == false) {
        throw new AlfrescoRuntimeException("String_Node_Str");
      }
      ContentReader reader=contentService.getReader(CONFIG_NODE_REF,ContentModel.PROP_CONTENT);
      String jsonString=reader.getContentString();
      JSONObject configJSON=new JSONObject(jsonString);
      JSONArray eventsJSON=configJSON.getJSONArray("String_Node_Str");
      events=new HashMap<String,RecordsManagementEvent>(eventsJSON.length());
      for (int i=0; i < eventsJSON.length(); i++) {
        JSONObject eventJSON=eventsJSON.getJSONObject(i);
        String eventType=eventJSON.getString("String_Node_Str");
        String eventName=eventJSON.getString("String_Node_Str");
        String eventDisplayLabel=eventJSON.getString("String_Node_Str");
        String translated=I18NUtil.getMessage(eventDisplayLabel);
        if (translated != null)         eventDisplayLabel=translated;
        if (eventTypes.containsKey(eventType) == false) {
          throw new AlfrescoRuntimeException("String_Node_Str" + eventName + "String_Node_Str"+ eventType+ "String_Node_Str");
        }
        RecordsManagementEvent event=new RecordsManagementEvent(eventType,eventName,eventDisplayLabel);
        events.put(event.getName(),event);
      }
      return null;
    }
  }
,AuthenticationUtil.getSystemUserName());
}

Fixed version (ground truth):
/** 
 * Load the events from the persistant storage
 */
private void loadEvents(){
  AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>(){
    public Object doWork() throws Exception {
      if (nodeService.exists(CONFIG_NODE_REF) == false) {
        throw new AlfrescoRuntimeException("String_Node_Str");
      }
      ContentReader reader=contentService.getReader(CONFIG_NODE_REF,ContentModel.PROP_CONTENT);
      String jsonString=reader.getContentString();
      JSONObject configJSON=new JSONObject(jsonString);
      JSONArray eventsJSON=configJSON.getJSONArray("String_Node_Str");
      events=new HashMap<String,RecordsManagementEvent>(eventsJSON.length());
      for (int i=0; i < eventsJSON.length(); i++) {
        JSONObject eventJSON=eventsJSON.getJSONObject(i);
        String eventType=eventJSON.getString("String_Node_Str");
        String eventName=eventJSON.getString("String_Node_Str");
        String eventDisplayLabel=eventJSON.getString("String_Node_Str");
        String translated=I18NUtil.getMessage(eventDisplayLabel);
        if (translated != null) {
          eventDisplayLabel=translated;
        }
        if (eventTypes.containsKey(eventType) == false) {
          throw new AlfrescoRuntimeException("String_Node_Str" + eventName + "String_Node_Str"+ eventType+ "String_Node_Str");
        }
        RecordsManagementEvent event=new RecordsManagementEvent(eventType,eventName,eventDisplayLabel);
        events.put(event.getName(),event);
      }
      return null;
    }
  }
,AuthenticationUtil.getSystemUserName());
}
Program: 89436
Project: 89436
Buggy source:
/** 
 * Marks the recordLevelDisposition property as protected to disable editing
 * @param form The Form instance
 */
protected void protectRecordLevelDispositionPropertyField(Form form){
  List<FieldDefinition> fieldDefs=form.getFieldDefinitions();
  for (  FieldDefinition fieldDef : fieldDefs) {
    if (fieldDef.getName().equals(RecordsManagementModel.PROP_RECORD_LEVEL_DISPOSITION.toPrefixString(this.namespaceService))) {
      fieldDef.setProtectedField(true);
      break;
    }
  }
  if (logger.isDebugEnabled())   logger.debug("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Marks the recordLevelDisposition property as protected to disable editing
 * @param form The Form instance
 */
protected void protectRecordLevelDispositionPropertyField(Form form){
  List<FieldDefinition> fieldDefs=form.getFieldDefinitions();
  for (  FieldDefinition fieldDef : fieldDefs) {
    if (fieldDef.getName().equals(RecordsManagementModel.PROP_RECORD_LEVEL_DISPOSITION.toPrefixString(this.namespaceService))) {
      fieldDef.setProtectedField(true);
      break;
    }
  }
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str");
  }
}
Program: 89437
Project: 89437
Buggy source:
/** 
 * Get the allowed values.  Note that these are <tt>String</tt> instances, but may  represent non-<tt>String</tt> values.  It is up to the caller to distinguish.
 * @return Returns the values allowed
 */
@Override public List<String> getRawAllowedValues(){
  String runAsUser=AuthenticationUtil.getRunAsUser();
  if ((runAsUser != null) && (!runAsUser.equals(AuthenticationUtil.getSystemUserName())) && (caveatConfigService != null)) {
    List<String> allowedForUser=caveatConfigService.getRMAllowedValues(getShortName());
    List<String> filteredList=new ArrayList<String>(allowedForUser.size());
    for (    String allowed : allowedForUser) {
      if (this.allowedValues.contains(allowed)) {
        filteredList.add(allowed);
      }
    }
    return filteredList;
  }
 else {
    return this.allowedValues;
  }
}

Fixed version (ground truth):
/** 
 * Get the allowed values.  Note that these are <tt>String</tt> instances, but may represent non-<tt>String</tt> values.  It is up to the caller to distinguish.
 * @return Returns the values allowed
 */
@Override public List<String> getRawAllowedValues(){
  String runAsUser=AuthenticationUtil.getRunAsUser();
  if ((runAsUser != null) && (!runAsUser.equals(AuthenticationUtil.getSystemUserName())) && (caveatConfigService != null)) {
    List<String> allowedForUser=caveatConfigService.getRMAllowedValues(getShortName());
    List<String> filteredList=new ArrayList<String>(allowedForUser.size());
    for (    String allowed : allowedForUser) {
      if (this.allowedValues.contains(allowed)) {
        filteredList.add(allowed);
      }
    }
    return filteredList;
  }
 else {
    return this.allowedValues;
  }
}
Program: 89438
Project: 89438
Buggy source:
@Override protected void evaluateSingleValue(Object value){
  String valueStr=null;
  try {
    valueStr=DefaultTypeConverter.INSTANCE.convert(String.class,value);
  }
 catch (  TypeConversionException e) {
    throw new ConstraintException(ERR_NON_STRING,value);
  }
  if (isCaseSensitive()) {
    if (!getAllowedValues().contains(valueStr)) {
      throw new ConstraintException(ERR_INVALID_VALUE,value);
    }
  }
 else {
    if (!getAllowedValuesUpper().contains(valueStr.toUpperCase())) {
      throw new ConstraintException(ERR_INVALID_VALUE,value);
    }
  }
}

Fixed version (ground truth):
@Override protected void evaluateSingleValue(Object value){
  String valueStr=null;
  try {
    valueStr=DefaultTypeConverter.INSTANCE.convert(String.class,value);
  }
 catch (  TypeConversionException e) {
    throw new ConstraintException(ERR_NON_STRING,value,e);
  }
  if (isCaseSensitive()) {
    if (!getAllowedValues().contains(valueStr)) {
      throw new ConstraintException(ERR_INVALID_VALUE,value);
    }
  }
 else {
    if (!getAllowedValuesUpper().contains(valueStr.toUpperCase())) {
      throw new ConstraintException(ERR_INVALID_VALUE,value);
    }
  }
}
Program: 89440
Project: 89440
Buggy source:
/** 
 * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest,org.alfresco.web.scripts.Status,org.alfresco.web.scripts.Cache)
 */
@Override protected Map<String,Object> executeImpl(WebScriptRequest req,Status status,Cache cache){
  Map<String,Object> model=new HashMap<String,Object>(1);
  try {
    JSONObject json=new JSONObject(new JSONTokener(req.getContent().getContent()));
    customEmailMappingService.addCustomMapping(json.getString("String_Node_Str"),json.getString("String_Node_Str"));
    model.put("String_Node_Str",customEmailMappingService.getCustomMappings());
  }
 catch (  IOException iox) {
    throw new WebScriptException(Status.STATUS_BAD_REQUEST,"String_Node_Str",iox);
  }
catch (  JSONException je) {
    throw new WebScriptException(Status.STATUS_BAD_REQUEST,"String_Node_Str",je);
  }
catch (  AlfrescoRuntimeException are) {
    throw new WebScriptException(Status.STATUS_INTERNAL_SERVER_ERROR,are.getMessage());
  }
  return model;
}

Fixed version (ground truth):
/** 
 * @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest,org.alfresco.web.scripts.Status,org.alfresco.web.scripts.Cache)
 */
@Override protected Map<String,Object> executeImpl(WebScriptRequest req,Status status,Cache cache){
  Map<String,Object> model=new HashMap<String,Object>(1);
  try {
    JSONObject json=new JSONObject(new JSONTokener(req.getContent().getContent()));
    customEmailMappingService.addCustomMapping(json.getString("String_Node_Str"),json.getString("String_Node_Str"));
    model.put("String_Node_Str",customEmailMappingService.getCustomMappings());
  }
 catch (  IOException iox) {
    throw new WebScriptException(Status.STATUS_BAD_REQUEST,"String_Node_Str",iox);
  }
catch (  JSONException je) {
    throw new WebScriptException(Status.STATUS_BAD_REQUEST,"String_Node_Str",je);
  }
catch (  AlfrescoRuntimeException are) {
    throw new WebScriptException(Status.STATUS_INTERNAL_SERVER_ERROR,are.getMessage(),are);
  }
  return model;
}
Program: 89442
Project: 89442
Buggy source:
/** 
 * Helper method for checking if an event can be edited or not. Throws an error if an event with the same display label already exists.
 * @param eventDisplayLabel The display label of the event
 * @param eventName The name of the event
 * @param eventType The type of the event
 * @return true if the event can be edited, false otherwise
 */
private boolean canEditEvent(String eventDisplayLabel,String eventName,String eventType){
  boolean canEditEvent;
  try {
    canEditEvent=rmEventService.canEditEvent(eventDisplayLabel,eventName,eventType);
  }
 catch (  AlfrescoRuntimeException are) {
    throw new WebScriptException(Status.STATUS_BAD_REQUEST,are.getLocalizedMessage());
  }
  return canEditEvent;
}

Fixed version (ground truth):
/** 
 * Helper method for checking if an event can be edited or not. Throws an error if an event with the same display label already exists.
 * @param eventDisplayLabel The display label of the event
 * @param eventName The name of the event
 * @param eventType The type of the event
 * @return true if the event can be edited, false otherwise
 */
private boolean canEditEvent(String eventDisplayLabel,String eventName,String eventType){
  boolean canEditEvent;
  try {
    canEditEvent=rmEventService.canEditEvent(eventDisplayLabel,eventName,eventType);
  }
 catch (  AlfrescoRuntimeException are) {
    throw new WebScriptException(Status.STATUS_BAD_REQUEST,are.getLocalizedMessage(),are);
  }
  return canEditEvent;
}
Program: 89443
Project: 89443
Buggy source:
@Override public boolean evaluate(JSONObject jsonObject){
  if (action == null) {
    return false;
  }
  try {
    JSONArray actions=getRMActions(jsonObject);
    if (actions == null) {
      return false;
    }
 else {
      if (actions.contains(action)) {
        return true;
      }
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err.getMessage());
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean evaluate(JSONObject jsonObject){
  if (action == null) {
    return false;
  }
  try {
    JSONArray actions=getRMActions(jsonObject);
    if (actions == null) {
      return false;
    }
 else {
      if (actions.contains(action)) {
        return true;
      }
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err);
  }
  return false;
}
Program: 89444
Project: 89444
Buggy source:
/** 
 * Retrieve a JSONObject representing the RM extended properties
 * @param jsonObject JSONObject containing a "node" object as returned from the ApplicationScriptUtils class.
 * @return JSONArray containing aspects on the node
 */
public final JSONObject getRMNode(JSONObject jsonObject){
  JSONObject rmNode=null;
  try {
    JSONObject node=(JSONObject)jsonObject.get("String_Node_Str");
    if (node != null) {
      rmNode=(JSONObject)node.get("String_Node_Str");
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err.getMessage());
  }
  return rmNode;
}

Fixed version (ground truth):
/** 
 * Retrieve a JSONObject representing the RM extended properties
 * @param jsonObject JSONObject containing a "node" object as returned from the ApplicationScriptUtils class.
 * @return JSONArray containing aspects on the node
 */
public final JSONObject getRMNode(JSONObject jsonObject){
  JSONObject rmNode=null;
  try {
    JSONObject node=(JSONObject)jsonObject.get("String_Node_Str");
    if (node != null) {
      rmNode=(JSONObject)node.get("String_Node_Str");
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err);
  }
  return rmNode;
}
Program: 89445
Project: 89445
Buggy source:
/** 
 * Retrieve a JSONArray of applicable indicators
 * @param jsonObject JSONObject containing a "node" object as returned from the ApplicationScriptUtils class.
 * @return JSONArray containing applicable indicators the UI may choose to display
 */
public final JSONArray getRMIndicators(JSONObject jsonObject){
  JSONArray indicators=null;
  try {
    JSONObject rmNode=getRMNode(jsonObject);
    if (rmNode != null) {
      indicators=(JSONArray)rmNode.get("String_Node_Str");
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err.getMessage());
  }
  return indicators;
}

Fixed version (ground truth):
/** 
 * Retrieve a JSONArray of applicable indicators
 * @param jsonObject JSONObject containing a "node" object as returned from the ApplicationScriptUtils class.
 * @return JSONArray containing applicable indicators the UI may choose to display
 */
public final JSONArray getRMIndicators(JSONObject jsonObject){
  JSONArray indicators=null;
  try {
    JSONObject rmNode=getRMNode(jsonObject);
    if (rmNode != null) {
      indicators=(JSONArray)rmNode.get("String_Node_Str");
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err);
  }
  return indicators;
}
Program: 89446
Project: 89446
Buggy source:
/** 
 * Retrieve a JSONArray of applicable actions
 * @param jsonObject JSONObject containing a "node" object as returned from the ApplicationScriptUtils class.
 * @return JSONArray containing applicable actions the UI may choose to display
 */
public final JSONArray getRMActions(JSONObject jsonObject){
  JSONArray actions=null;
  try {
    JSONObject rmNode=getRMNode(jsonObject);
    if (rmNode != null) {
      actions=(JSONArray)rmNode.get("String_Node_Str");
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err.getMessage());
  }
  return actions;
}

Fixed version (ground truth):
/** 
 * Retrieve a JSONArray of applicable actions
 * @param jsonObject JSONObject containing a "node" object as returned from the ApplicationScriptUtils class.
 * @return JSONArray containing applicable actions the UI may choose to display
 */
public final JSONArray getRMActions(JSONObject jsonObject){
  JSONArray actions=null;
  try {
    JSONObject rmNode=getRMNode(jsonObject);
    if (rmNode != null) {
      actions=(JSONArray)rmNode.get("String_Node_Str");
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err);
  }
  return actions;
}
Program: 89447
Project: 89447
Buggy source:
@Override public boolean evaluate(JSONObject jsonObject){
  if (indicator == null) {
    return false;
  }
  boolean result=false;
  try {
    JSONArray indicators=getRMIndicators(jsonObject);
    if (indicators != null) {
      if (indicators.contains(indicator)) {
        result=true;
      }
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err.getMessage());
  }
  return (result == expected);
}

Fixed version (ground truth):
@Override public boolean evaluate(JSONObject jsonObject){
  if (indicator == null) {
    return false;
  }
  boolean result=false;
  try {
    JSONArray indicators=getRMIndicators(jsonObject);
    if (indicators != null) {
      if (indicators.contains(indicator)) {
        result=true;
      }
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err);
  }
  return (result == expected);
}
Program: 89448
Project: 89448
Buggy source:
@Override public boolean evaluate(JSONObject jsonObject){
  if (type == null) {
    return false;
  }
  if (isDocLibRecord(jsonObject) == true) {
    return false;
  }
  try {
    JSONObject rmNode=getRMNode(jsonObject);
    if (rmNode == null) {
      return false;
    }
 else {
      String uiType=(String)rmNode.get("String_Node_Str");
      if (uiType.equalsIgnoreCase(type)) {
        return true;
      }
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err.getMessage());
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean evaluate(JSONObject jsonObject){
  if (type == null) {
    return false;
  }
  if (isDocLibRecord(jsonObject) == true) {
    return false;
  }
  try {
    JSONObject rmNode=getRMNode(jsonObject);
    if (rmNode == null) {
      return false;
    }
 else {
      String uiType=(String)rmNode.get("String_Node_Str");
      if (uiType.equalsIgnoreCase(type)) {
        return true;
      }
    }
  }
 catch (  Exception err) {
    throw new AlfrescoRuntimeException("String_Node_Str" + err);
  }
  return false;
}
Program: 89451
Project: 89451
Buggy source:
public void removeRMConstraintListValue(String listName,String valueName){
  Map<String,List<String>> members=null;
  try {
    readLock.lock();
    members=caveatConfig.get(listName);
    if (members == null) {
    }
 else {
      try {
        readLock.unlock();
        writeLock.lock();
        members=caveatConfig.get(listName);
        if (members == null) {
        }
 else {
          Map<String,List<String>> pivot=PivotUtil.getPivot(members);
          List<String> existingAuthorities=pivot.get(valueName);
          if (existingAuthorities != null) {
            for (            String authority : existingAuthorities) {
              List<String> vals=members.get(authority);
              vals.remove(valueName);
            }
            caveatConfig.put(listName,members);
          }
        }
        updateOrCreateCaveatConfig(convertToJSONString(caveatConfig));
      }
  finally {
        readLock.lock();
        writeLock.unlock();
      }
    }
  }
  finally {
    readLock.unlock();
  }
}

Fixed version (ground truth):
public void removeRMConstraintListValue(String listName,String valueName){
  Map<String,List<String>> members=null;
  try {
    readLock.lock();
    members=caveatConfig.get(listName);
    if (members != null) {
      try {
        readLock.unlock();
        writeLock.lock();
        members=caveatConfig.get(listName);
        if (members != null) {
          Map<String,List<String>> pivot=PivotUtil.getPivot(members);
          List<String> existingAuthorities=pivot.get(valueName);
          if (existingAuthorities != null) {
            for (            String authority : existingAuthorities) {
              List<String> vals=members.get(authority);
              vals.remove(valueName);
            }
            caveatConfig.put(listName,members);
          }
        }
        updateOrCreateCaveatConfig(convertToJSONString(caveatConfig));
      }
  finally {
        readLock.lock();
        writeLock.unlock();
      }
    }
  }
  finally {
    readLock.unlock();
  }
}
Program: 89452
Project: 89452
Buggy source:
/** 
 * Helper method to build a <b>NodeRef</b> path from the node to the RM root
 */
private void getNodeRefPathRecursive(NodeRef nodeRef,LinkedList<NodeRef> nodeRefPath){
  if (isFilePlanComponent(nodeRef) == false) {
    throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_INVALID_RM_NODE,ASPECT_FILE_PLAN_COMPONENT.toString()));
  }
  nodeRefPath.addFirst(nodeRef);
  if (isFilePlan(nodeRef) == true) {
  }
 else {
    ChildAssociationRef assocRef=nodeService.getPrimaryParent(nodeRef);
    if (assocRef == null) {
      throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NO_ROOT));
    }
    nodeRef=assocRef.getParentRef();
    getNodeRefPathRecursive(nodeRef,nodeRefPath);
  }
}

Fixed version (ground truth):
/** 
 * Helper method to build a <b>NodeRef</b> path from the node to the RM root
 */
private void getNodeRefPathRecursive(NodeRef nodeRef,LinkedList<NodeRef> nodeRefPath){
  if (isFilePlanComponent(nodeRef) == false) {
    throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_INVALID_RM_NODE,ASPECT_FILE_PLAN_COMPONENT.toString()));
  }
  nodeRefPath.addFirst(nodeRef);
  if (isFilePlan(nodeRef) == false) {
    ChildAssociationRef assocRef=nodeService.getPrimaryParent(nodeRef);
    if (assocRef == null) {
      throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NO_ROOT));
    }
    nodeRef=assocRef.getParentRef();
    getNodeRefPathRecursive(nodeRef,nodeRefPath);
  }
}
Program: 89453
Project: 89453
Buggy source:
/** 
 * Updates the uniqueness check using the values provided.  If the after value is <tt>null</tt> then this is considered to be a removal.
 * @param nodeRef   node reference
 * @param beforeId  id before
 * @param afterId   id after
 */
private void updateUniqueness(NodeRef nodeRef,String beforeId,String afterId){
  NodeRef contextNodeRef=filePlanService.getFilePlan(nodeRef);
  if (beforeId == null) {
    if (afterId != null) {
      attributeService.createAttribute(null,CONTEXT_VALUE,contextNodeRef,afterId);
    }
  }
 else   if (afterId == null) {
    if (beforeId != null) {
      attributeService.removeAttribute(CONTEXT_VALUE,contextNodeRef,beforeId);
    }
    attributeService.removeAttributes(CONTEXT_VALUE,nodeRef);
  }
 else {
    attributeService.updateOrCreateAttribute(CONTEXT_VALUE,contextNodeRef,beforeId,CONTEXT_VALUE,contextNodeRef,afterId);
  }
}

Fixed version (ground truth):
/** 
 * Updates the uniqueness check using the values provided.  If the after value is <tt>null</tt> then this is considered to be a removal.
 * @param nodeRef   node reference
 * @param beforeId  id before
 * @param afterId   id after
 */
private void updateUniqueness(NodeRef nodeRef,String beforeId,String afterId){
  NodeRef contextNodeRef=filePlanService.getFilePlan(nodeRef);
  if (beforeId == null) {
    if (afterId != null) {
      attributeService.createAttribute(null,CONTEXT_VALUE,contextNodeRef,afterId);
    }
  }
 else   if (afterId == null) {
    attributeService.removeAttribute(CONTEXT_VALUE,contextNodeRef,beforeId);
    attributeService.removeAttributes(CONTEXT_VALUE,nodeRef);
  }
 else {
    attributeService.updateOrCreateAttribute(CONTEXT_VALUE,contextNodeRef,beforeId,CONTEXT_VALUE,contextNodeRef,afterId);
  }
}
Program: 89454
Project: 89454
Buggy source:
@Test(dependsOnMethods="String_Node_Str") public void editUnfiledRecordsFolderMetadata(){
  navigateToUnfiledRecords();
  FileDirectoryInfo folder=filePlanPage.getFileDirectoryInfo(RM_UNFILED_RECORDS_CONTAINER_NAME);
  WebElement actions=folder.findElement(By.cssSelector("String_Node_Str"));
  drone.mouseOverOnElement(actions);
  WebElement editProperties=folder.findElement(By.cssSelector("String_Node_Str"));
  editProperties.click();
  WebElement title=drone.find(INPUT_TITLE_SELECTOR);
  title.clear();
  title.sendKeys("String_Node_Str");
  WebElement description=drone.find(INPUT_DESCRIPTION_SELECTOR);
  description.clear();
  description.sendKeys("String_Node_Str");
  WebElement saveButton=drone.find(By.cssSelector("String_Node_Str"));
  saveButton.click();
}

Fixed version (ground truth):
@Test(dependsOnMethods="String_Node_Str") public void editUnfiledRecordsFolderMetadata(){
  navigateToUnfiledRecords();
  FileDirectoryInfo folder=filePlanPage.getFileDirectoryInfo(RM_UNFILED_RECORDS_CONTAINER_NAME);
  WebElement actions=folder.findElement(By.cssSelector("String_Node_Str"));
  drone.mouseOverOnElement(actions);
  WebElement editProperties=folder.findElement(By.cssSelector("String_Node_Str"));
  editProperties.click();
  drone.waitForElement(INPUT_TITLE_SELECTOR,5);
  WebElement title=drone.find(INPUT_TITLE_SELECTOR);
  title.clear();
  title.sendKeys("String_Node_Str");
  WebElement description=drone.find(INPUT_DESCRIPTION_SELECTOR);
  description.clear();
  description.sendKeys("String_Node_Str");
  WebElement saveButton=drone.find(By.cssSelector("String_Node_Str"));
  saveButton.click();
}
Program: 89456
Project: 89456
Buggy source:
@Override protected boolean evaluateImpl(ActionCondition actionCondition,NodeRef actionedUponNodeRef){
  boolean result=false;
  String kind=((QName)actionCondition.getParameterValue(PARAM_KIND)).getLocalName();
  FilePlanComponentKind filePlanComponentKind=filePlanService.getFilePlanComponentKind(actionedUponNodeRef);
  if (filePlanComponentKind.toString().equals(kind)) {
    result=true;
  }
  return result;
}

Fixed version (ground truth):
@Override protected boolean evaluateImpl(ActionCondition actionCondition,NodeRef actionedUponNodeRef){
  boolean result=false;
  String kind=((QName)actionCondition.getParameterValue(PARAM_KIND)).getLocalName();
  FilePlanComponentKind filePlanComponentKind=filePlanService.getFilePlanComponentKind(actionedUponNodeRef);
  if (filePlanComponentKind != null && filePlanComponentKind.toString().equals(kind)) {
    result=true;
  }
  return result;
}