nus-yam/ex-repair huggingface dataset:
Program: 115038
Project: 115038
Buggy source:
@Override public void afterPropertiesSet() throws LiquibaseException {
  processSchemaLiquibase();
}

Fixed version (ground truth):
@Override public void afterPropertiesSet() throws LiquibaseException {
  processSchemaLiquibase(null);
}
Program: 115040
Project: 115040
Buggy source:
public ItemData findByEventCrfGroupOrdinal(Integer crfId,Integer itemGroupId,Integer ordinal){
  Query q=getCurrentSession().createQuery(findByEventCrfGroupOrdinalQuery);
  q.setParameter("String_Node_Str",crfId);
  q.setParameter("String_Node_Str",itemGroupId);
  q.setParameter("String_Node_Str",ordinal);
  return (ItemData)q.uniqueResult();
}

Fixed version (ground truth):
public ItemData findByEventCrfGroupOrdinal(EventCrf eventCrf,Integer itemGroupId,Integer ordinal){
  Query q=getCurrentSession().createQuery(findByEventCrfGroupOrdinalQuery);
  q.setParameter("String_Node_Str",eventCrf.getCrfVersion().getCrf().getCrfId());
  q.setParameter("String_Node_Str",eventCrf.getEventCrfId());
  q.setParameter("String_Node_Str",itemGroupId);
  q.setParameter("String_Node_Str",ordinal);
  return (ItemData)q.uniqueResult();
}
Program: 115042
Project: 115042
Buggy source:
private ItemData lookupFieldItemData(CrfVersion crfVersion,ItemGroup itemGroup,Integer ordinal){
  return itemDataDao.findByEventCrfGroupOrdinal(crfVersion.getCrf().getCrfId(),itemGroup.getItemGroupId(),ordinal);
}

Fixed version (ground truth):
private ItemData lookupFieldItemData(ItemGroup itemGroup,Integer ordinal){
  return itemDataDao.findByEventCrfGroupOrdinal(eventCrf,itemGroup.getItemGroupId(),ordinal);
}
Program: 115043
Project: 115043
Buggy source:
/** 
 * Can be overridden to customize the creation of the final UserDetailsObject returnd from <tt>loadUserByUsername</tt>.
 * @param username the name originally passed to loadUserByUsername
 * @param userFromUserQuery the object returned from the execution of the
 * @param combinedAuthorities the combined array of authorities from all the authority loading queries.
 * @return the final UserDetails which should be used in the system.
 */
protected UserDetails createUserDetails(String username,UserDetails userFromUserQuery,List<GrantedAuthority> combinedAuthorities){
  String returnUsername=userFromUserQuery.getUsername();
  if (!isUsernameBasedPrimaryKey()) {
    returnUsername=username;
  }
  return new User(returnUsername,userFromUserQuery.getPassword(),userFromUserQuery.isEnabled(),true,true,userFromUserQuery.isAccountNonLocked(),combinedAuthorities);
}

Fixed version (ground truth):
/** 
 * Can be overridden to customize the creation of the final UserDetailsObject returnd from <tt>loadUserByUsername</tt>.
 * @param username the name originally passed to loadUserByUsername
 * @param userFromUserQuery the object returned from the execution of the
 * @param combinedAuthorities the combined array of authorities from all the authority loading queries.
 * @return the final UserDetails which should be used in the system.
 */
protected UserDetails createUserDetails(String username,UserDetails userFromUserQuery,List<GrantedAuthority> combinedAuthorities){
  String returnUsername=userFromUserQuery.getUsername();
  if (!isUsernameBasedPrimaryKey()) {
    returnUsername=username;
  }
  return new User(returnUsername,userFromUserQuery.getPassword(),userFromUserQuery.isEnabled(),true,true,true,combinedAuthorities);
}
Program: 115044
Project: 115044
Buggy source:
public StudySubjectBean findByLabelAndStudy(String label,StudyBean study){
  StudySubjectBean answer=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),label);
  variables.put(new Integer(2),new Integer(study.getId()));
  variables.put(new Integer(3),new Integer(study.getId()));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    answer=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return answer;
}

Fixed version (ground truth):
public StudySubjectBean findByLabelAndStudy(String label,StudyBean study){
  StudySubjectBean answer=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),ESAPI.encoder().encodeForHTML(label));
  variables.put(new Integer(2),new Integer(study.getId()));
  variables.put(new Integer(3),new Integer(study.getId()));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    answer=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return answer;
}
Program: 115045
Project: 115045
Buggy source:
/** 
 * Finds a study subject which has the same label provided in the same study
 * @param label
 * @param studyId
 * @param id
 * @return
 */
public StudySubjectBean findSameByLabelAndStudy(String label,int studyId,int id){
  StudySubjectBean answer=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),label);
  variables.put(new Integer(2),new Integer(studyId));
  variables.put(new Integer(3),new Integer(studyId));
  variables.put(new Integer(4),new Integer(id));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    answer=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return answer;
}

Fixed version (ground truth):
/** 
 * Finds a study subject which has the same label provided in the same study
 * @param label
 * @param studyId
 * @param id
 * @return
 */
public StudySubjectBean findSameByLabelAndStudy(String label,int studyId,int id){
  StudySubjectBean answer=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),ESAPI.encoder().encodeForHTML(label));
  variables.put(new Integer(2),new Integer(studyId));
  variables.put(new Integer(3),new Integer(studyId));
  variables.put(new Integer(4),new Integer(id));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    answer=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return answer;
}
Program: 115046
Project: 115046
Buggy source:
public EntityBean findAnotherBySameLabel(String label,int studyId,int studySubjectId){
  StudySubjectBean eb=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),label);
  variables.put(new Integer(2),new Integer(studyId));
  variables.put(new Integer(3),new Integer(studySubjectId));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    eb=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return eb;
}

Fixed version (ground truth):
public EntityBean findAnotherBySameLabel(String label,int studyId,int studySubjectId){
  StudySubjectBean eb=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),ESAPI.encoder().encodeForHTML(label));
  variables.put(new Integer(2),new Integer(studyId));
  variables.put(new Integer(3),new Integer(studySubjectId));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    eb=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return eb;
}
Program: 115047
Project: 115047
Buggy source:
public EntityBean findAnotherBySameLabelInSites(String label,int studyId,int studySubjectId){
  StudySubjectBean eb=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),label);
  variables.put(new Integer(2),new Integer(studyId));
  variables.put(new Integer(3),new Integer(studySubjectId));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    eb=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return eb;
}

Fixed version (ground truth):
public EntityBean findAnotherBySameLabelInSites(String label,int studyId,int studySubjectId){
  StudySubjectBean eb=new StudySubjectBean();
  this.setTypesExpected();
  HashMap variables=new HashMap();
  variables.put(new Integer(1),ESAPI.encoder().encodeForHTML(label));
  variables.put(new Integer(2),new Integer(studyId));
  variables.put(new Integer(3),new Integer(studySubjectId));
  String sql=digester.getQuery("String_Node_Str");
  ArrayList alist=this.select(sql,variables);
  Iterator it=alist.iterator();
  if (it.hasNext()) {
    eb=(StudySubjectBean)this.getEntityFromHashMap((HashMap)it.next());
  }
  return eb;
}
Program: 115048
Project: 115048
Buggy source:
/** 
 * Generates all the delete queries for deleting a version
 * @param versionId
 * @param items
 */
public ArrayList generateDeleteQueries(int versionId,ArrayList items){
  ArrayList sqls=new ArrayList();
  String sql=digester.getQuery("String_Node_Str") + versionId + "String_Node_Str";
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  for (int i=0; i < items.size(); i++) {
    ItemBean item=(ItemBean)items.get(i);
    sql=digester.getQuery("String_Node_Str") + item.getId();
    sqls.add(sql);
  }
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  return sqls;
}

Fixed version (ground truth):
/** 
 * Generates all the delete queries for deleting a version
 * @param versionId
 * @param items
 */
public ArrayList generateDeleteQueries(int versionId,ArrayList items){
  ArrayList sqls=new ArrayList();
  String sql=digester.getQuery("String_Node_Str") + versionId + "String_Node_Str";
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  for (int i=0; i < items.size(); i++) {
    ItemBean item=(ItemBean)items.get(i);
    sql=digester.getQuery("String_Node_Str") + item.getId();
    sqls.add(sql);
  }
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  sql=digester.getQuery("String_Node_Str") + versionId;
  sqls.add(sql);
  return sqls;
}
Program: 115050
Project: 115050
Buggy source:
public void sendEmail(JavaMailSenderImpl mailSender,UserAccountBean user,String emailSubject,String message) throws OpenClinicaSystemException {
  logger.info("String_Node_Str");
  try {
    MimeMessage mimeMessage=mailSender.createMimeMessage();
    MimeMessageHelper helper=new MimeMessageHelper(mimeMessage);
    helper.setFrom(EmailEngine.getAdminEmail());
    helper.setTo(user.getEmail());
    helper.setSubject(emailSubject);
    helper.setText(message);
    mailSender.send(mimeMessage);
    logger.debug("String_Node_Str",new Date());
  }
 catch (  MailException me) {
    logger.error("String_Node_Str");
    throw new OpenClinicaSystemException(me.getMessage());
  }
catch (  MessagingException me) {
    logger.error("String_Node_Str");
    throw new OpenClinicaSystemException(me.getMessage());
  }
}

Fixed version (ground truth):
public void sendEmail(JavaMailSenderImpl mailSender,UserAccountBean user,String emailSubject,String message) throws OpenClinicaSystemException {
  logger.info("String_Node_Str");
  try {
    MimeMessage mimeMessage=mailSender.createMimeMessage();
    MimeMessageHelper helper=new MimeMessageHelper(mimeMessage);
    helper.setFrom(EmailEngine.getAdminEmail());
    helper.setTo(user.getEmail());
    helper.setSubject(emailSubject);
    helper.setText(message);
    mailSender.send(mimeMessage);
    logger.debug("String_Node_Str",new Date());
  }
 catch (  MailException me) {
    logger.error("String_Node_Str");
  }
catch (  MessagingException me) {
    logger.error("String_Node_Str");
  }
}
Program: 115051
Project: 115051
Buggy source:
void auditLogout(String username){
  ResourceBundleProvider.updateLocale(new Locale("String_Node_Str"));
  UserAccountBean userAccount=(UserAccountBean)getUserAccountDao().findByUserName(username);
  AuditUserLoginBean auditUserLogin=new AuditUserLoginBean();
  auditUserLogin.setUserName(username);
  auditUserLogin.setLoginStatus(LoginStatus.SUCCESSFUL_LOGOUT);
  auditUserLogin.setLoginAttemptDate(new Date());
  auditUserLogin.setUserAccountId(userAccount != null ? userAccount.getId() : null);
  getAuditUserLoginDao().saveOrUpdate(auditUserLogin);
}

Fixed version (ground truth):
void auditLogout(String username){
  ResourceBundleProvider.updateLocale(new Locale("String_Node_Str"));
  UserAccountBean userAccount=(UserAccountBean)getUserAccountDao().findByUserName(username);
  crfLocker.unlockAllForUser(userAccount.getId());
  AuditUserLoginBean auditUserLogin=new AuditUserLoginBean();
  auditUserLogin.setUserName(username);
  auditUserLogin.setLoginStatus(LoginStatus.SUCCESSFUL_LOGOUT);
  auditUserLogin.setLoginAttemptDate(new Date());
  auditUserLogin.setUserAccountId(userAccount != null ? userAccount.getId() : null);
  getAuditUserLoginDao().saveOrUpdate(auditUserLogin);
}
Program: 115052
Project: 115052
Buggy source:
public ViewRuleAssignmentFilter(){
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public ViewRuleAssignmentFilter(){
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
  columnMapping.put("String_Node_Str","String_Node_Str");
}
Program: 115053
Project: 115053
Buggy source:
private String buildCriteria(String criteria,String property,Object value){
  value=StringEscapeUtils.escapeSql(value.toString());
  if (value != null) {
    if (property.equals("String_Node_Str") || property.equals("String_Node_Str") || property.equals("String_Node_Str")|| property.equals("String_Node_Str")) {
      criteria=criteria + "String_Node_Str" + columnMapping.get(property)+ "String_Node_Str"+ value.toString()+ "String_Node_Str";
    }
 else {
      criteria+="String_Node_Str" + columnMapping.get(property) + "String_Node_Str"+ value.toString()+ "String_Node_Str"+ "String_Node_Str";
    }
  }
  return criteria;
}

Fixed version (ground truth):
private String buildCriteria(String criteria,String property,Object value){
  value=StringEscapeUtils.escapeSql(value.toString());
  if (value != null) {
    if (property.equals("String_Node_Str") || property.equals("String_Node_Str") || property.equals("String_Node_Str")|| property.equals("String_Node_Str")|| property.equals("String_Node_Str")) {
      criteria=criteria + "String_Node_Str" + columnMapping.get(property)+ "String_Node_Str"+ value.toString()+ "String_Node_Str";
    }
    if (property.equals("String_Node_Str")) {
      criteria=criteria + "String_Node_Str" + columnMapping.get(property)+ "String_Node_Str"+ value.toString()+ "String_Node_Str";
    }
 else {
      criteria+="String_Node_Str" + columnMapping.get(property) + "String_Node_Str"+ value.toString()+ "String_Node_Str"+ "String_Node_Str";
    }
  }
  return criteria;
}
Program: 115055
Project: 115055
Buggy source:
public File rename(File f);

Fixed version (ground truth):
public File rename(File f,InputStream content);
Program: 115056
Project: 115056
Buggy source:
private File processUploadedFile(FileItem item,String dirToSaveUploadedFileIn){
  dirToSaveUploadedFileIn=dirToSaveUploadedFileIn == null ? System.getProperty("String_Node_Str") : dirToSaveUploadedFileIn;
  String fileName=item.getName();
  int startIndex=fileName.lastIndexOf('\\');
  if (startIndex != -1) {
    fileName=fileName.substring(startIndex + 1,fileName.length());
  }
  File uploadedFile=new File(dirToSaveUploadedFileIn + File.separator + fileName);
  if (fileRenamePolicy != null) {
    uploadedFile=fileRenamePolicy.rename(uploadedFile);
  }
  try {
    item.write(uploadedFile);
  }
 catch (  Exception e) {
    throw new OpenClinicaSystemException(e.getMessage());
  }
  return uploadedFile;
}

Fixed version (ground truth):
private File processUploadedFile(FileItem item,String dirToSaveUploadedFileIn){
  dirToSaveUploadedFileIn=dirToSaveUploadedFileIn == null ? System.getProperty("String_Node_Str") : dirToSaveUploadedFileIn;
  String fileName=item.getName();
  int startIndex=fileName.lastIndexOf('\\');
  if (startIndex != -1) {
    fileName=fileName.substring(startIndex + 1,fileName.length());
  }
  File uploadedFile=new File(dirToSaveUploadedFileIn + File.separator + fileName);
  if (fileRenamePolicy != null) {
    try {
      uploadedFile=fileRenamePolicy.rename(uploadedFile,item.getInputStream());
    }
 catch (    IOException e) {
      throw new OpenClinicaSystemException(e.getMessage());
    }
  }
  try {
    item.write(uploadedFile);
  }
 catch (  Exception e) {
    throw new OpenClinicaSystemException(e.getMessage());
  }
  return uploadedFile;
}
Program: 115057
Project: 115057
Buggy source:
/** 
 * Creates a new discrepancy note map
 */
public void createMapping(DiscrepancyNoteBean eb){
  HashMap variables=new HashMap();
  variables.put(Integer.valueOf(1),Integer.valueOf(eb.getEntityId()));
  variables.put(Integer.valueOf(2),Integer.valueOf(eb.getId()));
  variables.put(Integer.valueOf(3),eb.getColumn());
  variables.put(Integer.valueOf(4),eb.isActivated());
  String entityType=eb.getEntityType();
  if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new discrepancy note map
 */
public void createMapping(DiscrepancyNoteBean eb){
  HashMap variables=new HashMap();
  variables.put(Integer.valueOf(1),Integer.valueOf(eb.getEntityId()));
  variables.put(Integer.valueOf(2),Integer.valueOf(eb.getId()));
  variables.put(Integer.valueOf(3),eb.getColumn());
  String entityType=eb.getEntityType();
  if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(entityType)) {
    variables.put(Integer.valueOf(4),eb.isActivated());
    this.execute(digester.getQuery("String_Node_Str"),variables);
  }
}
Program: 115058
Project: 115058
Buggy source:
private String testCalculateVariable(){
  if (number.equals("String_Node_Str")) {
    String ssTimeZone=getExpressionBeanService().getSSTimeZone();
    if (ssTimeZone == "String_Node_Str" || ssTimeZone == null)     ssTimeZone=TimeZone.getDefault().getID();
    DateTimeZone ssZone=DateTimeZone.forID(ssTimeZone);
    DateMidnight dm=new DateMidnight(ssZone);
    DateTimeFormatter fmt=ISODateTimeFormat.date();
    return fmt.print(dm);
  }
  return null;
}

Fixed version (ground truth):
private String testCalculateVariable(){
  if (number.equals("String_Node_Str")) {
    String ssTimeZone=getExpressionBeanService().getSSTimeZone();
    if (ssTimeZone.equals("String_Node_Str") || ssTimeZone == null)     ssTimeZone=TimeZone.getDefault().getID();
    DateTimeZone ssZone=DateTimeZone.forID(ssTimeZone);
    DateMidnight dm=new DateMidnight(ssZone);
    DateTimeFormatter fmt=ISODateTimeFormat.date();
    return fmt.print(dm);
  }
  return null;
}
Program: 115059
Project: 115059
Buggy source:
private Object calculateVariable(){
  if (number.equals("String_Node_Str")) {
    String ssTimeZone=getExpressionBeanService().getSSTimeZone();
    if (ssTimeZone == "String_Node_Str" || ssTimeZone == null)     ssTimeZone=TimeZone.getDefault().getID();
    DateTimeZone ssZone=DateTimeZone.forID(ssTimeZone);
    DateMidnight dm=new DateMidnight(ssZone);
    DateTimeFormatter fmt=ISODateTimeFormat.date();
    return fmt.print(dm);
  }
  return null;
}

Fixed version (ground truth):
private Object calculateVariable(){
  if (number.equals("String_Node_Str")) {
    String ssTimeZone=getExpressionBeanService().getSSTimeZone();
    if (ssTimeZone.equals("String_Node_Str") || ssTimeZone == null)     ssTimeZone=TimeZone.getDefault().getID();
    DateTimeZone ssZone=DateTimeZone.forID(ssTimeZone);
    DateMidnight dm=new DateMidnight(ssZone);
    DateTimeFormatter fmt=ISODateTimeFormat.date();
    return fmt.print(dm);
  }
  return null;
}
Program: 115061
Project: 115061
Buggy source:
private boolean isRunTimeValid(AuditableBeanWrapper<RuleSetBean> ruleSetBeanWrapper,String runTime){
  boolean isValid=true;
  SimpleDateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  dateFormat.setLenient(false);
  try {
    dateFormat.parse(runTime);
  }
 catch (  Exception e) {
    ruleSetBeanWrapper.error(createError("String_Node_Str"));
    isValid=false;
  }
  return isValid;
}

Fixed version (ground truth):
private boolean isRunTimeValid(AuditableBeanWrapper<RuleSetBean> ruleSetBeanWrapper,String runTime){
  boolean isValid=true;
  DateTimeFormatter formatter=DateTimeFormat.forPattern("String_Node_Str");
  try {
    formatter.parseDateTime(runTime);
    if (!runTime.matches("String_Node_Str")) {
      ruleSetBeanWrapper.error(createError("String_Node_Str"));
      isValid=false;
    }
  }
 catch (  Exception e) {
    ruleSetBeanWrapper.error(createError("String_Node_Str"));
    isValid=false;
  }
  return isValid;
}
Program: 115063
Project: 115063
Buggy source:
public HashMap<String,String> getSSDate(String ssZoneId,String serverZoneId){
  HashMap<String,String> map=new HashMap<String,String>();
  if (ssZoneId == "String_Node_Str")   ssZoneId=TimeZone.getDefault().getID();
  DateTimeZone ssZone=DateTimeZone.forID(ssZoneId);
  DateMidnight dm=new DateMidnight(ssZone);
  DateTimeFormatter fmt=ISODateTimeFormat.date();
  map.put("String_Node_Str",fmt.print(dm));
  map.put("String_Node_Str",serverZoneId);
  DateTimeZone serverZone=DateTimeZone.forID(serverZoneId);
  DateMidnight serverDate=new DateMidnight(serverZone);
  map.put("String_Node_Str",fmt.print(serverDate));
  return map;
}

Fixed version (ground truth):
public HashMap<String,String> getSSDate(String ssZoneId,String serverZoneId){
  HashMap<String,String> map=new HashMap<String,String>();
  if (ssZoneId == "String_Node_Str" || ssZoneId.equals("String_Node_Str"))   ssZoneId=TimeZone.getDefault().getID();
  DateTimeZone ssZone=DateTimeZone.forID(ssZoneId);
  DateMidnight dm=new DateMidnight(ssZone);
  DateTimeFormatter fmt=ISODateTimeFormat.date();
  map.put("String_Node_Str",fmt.print(dm));
  map.put("String_Node_Str",serverZoneId);
  DateTimeZone serverZone=DateTimeZone.forID(serverZoneId);
  DateMidnight serverDate=new DateMidnight(serverZone);
  map.put("String_Node_Str",fmt.print(serverDate));
  return map;
}
Program: 115064
Project: 115064
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String deactivateParticipate(@PathVariable("String_Node_Str") String studyOid,HttpServletRequest request) throws Exception {
  studyDao=new StudyDAO(dataSource);
  StudyBean study=studyDao.findByOid(studyOid);
  StudyParameterValueDAO spvdao=new StudyParameterValueDAO(dataSource);
  StudyParameterValueBean spv=spvdao.findByHandleAndStudy(study.getId(),"String_Node_Str");
  spv.setValue("String_Node_Str");
  if (spv.getId() > 0)   spvdao.update(spv);
 else   spvdao.create(spv);
  StudyBean currentStudy=(StudyBean)request.getSession().getAttribute("String_Node_Str");
  currentStudy.getStudyParameterConfig().setParticipantPortal("String_Node_Str");
  return "String_Node_Str";
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String deactivateParticipate(@PathVariable("String_Node_Str") String studyOid,HttpServletRequest request) throws Exception {
  studyDao=new StudyDAO(dataSource);
  StudyBean study=studyDao.findByOid(studyOid);
  StudyParameterValueDAO spvdao=new StudyParameterValueDAO(dataSource);
  StudyParameterValueBean spv=spvdao.findByHandleAndStudy(study.getId(),"String_Node_Str");
  spv.setStudyId(study.getId());
  spv.setParameter("String_Node_Str");
  spv.setValue("String_Node_Str");
  if (spv.getId() > 0)   spvdao.update(spv);
 else   spvdao.create(spv);
  StudyBean currentStudy=(StudyBean)request.getSession().getAttribute("String_Node_Str");
  currentStudy.getStudyParameterConfig().setParticipantPortal("String_Node_Str");
  return "String_Node_Str";
}
Program: 115066
Project: 115066
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String reactivateParticipate(@PathVariable("String_Node_Str") String studyOid,HttpServletRequest request) throws Exception {
  studyDao=new StudyDAO(dataSource);
  StudyBean study=studyDao.findByOid(studyOid);
  StudyParameterValueDAO spvdao=new StudyParameterValueDAO(dataSource);
  StudyParameterValueBean spv=spvdao.findByHandleAndStudy(study.getId(),"String_Node_Str");
  spv.setValue("String_Node_Str");
  if (spv.getId() > 0)   spvdao.update(spv);
 else   spvdao.create(spv);
  StudyBean currentStudy=(StudyBean)request.getSession().getAttribute("String_Node_Str");
  currentStudy.getStudyParameterConfig().setParticipantPortal("String_Node_Str");
  return "String_Node_Str";
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String reactivateParticipate(@PathVariable("String_Node_Str") String studyOid,HttpServletRequest request) throws Exception {
  studyDao=new StudyDAO(dataSource);
  StudyBean study=studyDao.findByOid(studyOid);
  StudyParameterValueDAO spvdao=new StudyParameterValueDAO(dataSource);
  StudyParameterValueBean spv=spvdao.findByHandleAndStudy(study.getId(),"String_Node_Str");
  spv.setStudyId(study.getId());
  spv.setParameter("String_Node_Str");
  spv.setValue("String_Node_Str");
  if (spv.getId() > 0)   spvdao.update(spv);
 else   spvdao.create(spv);
  StudyBean currentStudy=(StudyBean)request.getSession().getAttribute("String_Node_Str");
  currentStudy.getStudyParameterConfig().setParticipantPortal("String_Node_Str");
  return "String_Node_Str";
}
Program: 115069
Project: 115069
Buggy source:
public String getHostNameAvailability(String hostName){
  String pManageUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + hostName;
  CommonsClientHttpRequestFactory requestFactory=new CommonsClientHttpRequestFactory();
  requestFactory.setReadTimeout(PARTICIPATE_READ_TIMEOUT);
  RestTemplate rest=new RestTemplate(requestFactory);
  try {
    ResponseEntity response=rest.getForEntity(pManageUrl,null);
    if (response.getStatusCode().equals(HttpStatus.OK))     return AVAILABLE;
 else     if (response.getStatusCode().equals(HttpStatus.CONFLICT))     return UNAVAILABLE;
  }
 catch (  Exception e) {
    logger.error(e.getMessage());
    logger.error(ExceptionUtils.getStackTrace(e));
  }
  return UNKNOWN;
}

Fixed version (ground truth):
public String getHostNameAvailability(String hostName){
  String pManageUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + hostName;
  CommonsClientHttpRequestFactory requestFactory=new CommonsClientHttpRequestFactory();
  requestFactory.setReadTimeout(PARTICIPATE_READ_TIMEOUT);
  RestTemplate rest=new RestTemplate(requestFactory);
  String response=null;
  try {
    response=rest.getForObject(pManageUrl,String.class);
    if (response.equals("String_Node_Str"))     return UNAVAILABLE;
 else     if (response.equals("String_Node_Str"))     return INVALID;
 else     if (response.equals("String_Node_Str"))     return AVAILABLE;
  }
 catch (  Exception e) {
    logger.error(e.getMessage());
    logger.error(ExceptionUtils.getStackTrace(e));
  }
  return UNKNOWN;
}
Program: 115070
Project: 115070
Buggy source:
@Override protected void processRequest() throws Exception {
  String crf_oid=request.getParameter(CRF_ID);
  String formURL=null;
  if (currentStudy.getStudyParameterConfig().getParticipantPortal().equals("String_Node_Str")) {
    EnketoCredentials credentials=getCredentials();
    EnketoAPI enketo=new EnketoAPI(credentials);
    formURL=enketo.getFormPreviewURL(crf_oid);
    if (!formURL.equals("String_Node_Str"))     response.sendRedirect(formURL);
 else {
      addPageMessage(respage.getString("String_Node_Str"));
      forwardPage(Page.MENU_SERVLET);
    }
  }
}

Fixed version (ground truth):
@Override protected void processRequest() throws Exception {
  String crf_oid=request.getParameter(CRF_ID);
  String formURL=null;
  if (currentStudy.getStudyParameterConfig().getParticipantPortal().equals("String_Node_Str")) {
    EnketoCredentials credentials=getCredentials();
    EnketoAPI enketo=new EnketoAPI(credentials);
    formURL=enketo.getFormPreviewURL(crf_oid);
    if (!formURL.equals("String_Node_Str")) {
      response.sendRedirect(formURL);
    }
 else {
      if (credentials.getServerUrl() == null) {
        addPageMessage(respage.getString("String_Node_Str"));
      }
 else {
        if ((credentials.getApiKey() != null) && (credentials.getOcInstanceUrl() != null)) {
          addPageMessage(respage.getString("String_Node_Str"));
        }
 else {
          addPageMessage(respage.getString("String_Node_Str"));
        }
      }
      forwardPage(Page.MENU_SERVLET);
    }
  }
}
Program: 115071
Project: 115071
Buggy source:
public String getFormURL(String crfOID) throws Exception {
  URL eURL=new URL(enketoURL + "String_Node_Str");
  EnketoURLResponse response=getURL(eURL,crfOID);
  if (response != null)   return response.getUrl();
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public String getFormURL(String crfOID) throws Exception {
  if (enketoURL == null)   return "String_Node_Str";
  URL eURL=new URL(enketoURL + "String_Node_Str");
  EnketoURLResponse response=getURL(eURL,crfOID);
  if (response != null)   return response.getUrl();
 else   return "String_Node_Str";
}
Program: 115072
Project: 115072
Buggy source:
public String getFormPreviewURL(String crfOID) throws Exception {
  URL eURL=new URL(enketoURL + "String_Node_Str");
  EnketoURLResponse response=getURL(eURL,crfOID);
  if (response != null)   return response.getPreview_url();
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public String getFormPreviewURL(String crfOID) throws Exception {
  if (enketoURL == null)   return "String_Node_Str";
  URL eURL=new URL(enketoURL + "String_Node_Str");
  EnketoURLResponse response=getURL(eURL,crfOID);
  if (response != null)   return response.getPreview_url();
 else   return "String_Node_Str";
}
Program: 115074
Project: 115074
Buggy source:
private Boolean isStudySubjecAndCRCRolesMatch(String studySubjectId,String crcUserName,String studyOid){
  StudyBean parentStudy=getParentStudy(studyOid);
  Integer studyIdFromStudyOid=parentStudy.getId();
  StudySubjectBean studySubjectBean=getStudySubject(studySubjectId,parentStudy);
  Integer studyIdFromStudySubjectId=studySubjectBean.getStudyId();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + studyIdFromStudyOid);
  System.out.println("String_Node_Str" + studySubjectId);
  System.out.println("String_Node_Str" + studyIdFromStudySubjectId);
  return doesCRCNotHaveStudySubjectAccessRole(crcUserName,studyIdFromStudySubjectId);
}

Fixed version (ground truth):
private Boolean isStudySubjecAndCRCRolesMatch(String studySubjectId,String crcUserName,String studyOid){
  StudyBean parentStudy=getParentStudy(studyOid);
  Integer studyIdFromStudyOid=parentStudy.getId();
  StudySubjectBean studySubjectBean=getStudySubject(studySubjectId,parentStudy);
  Integer studyIdFromStudySubjectId=studySubjectBean.getStudyId();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + studyIdFromStudyOid);
  System.out.println("String_Node_Str" + studySubjectId);
  System.out.println("String_Node_Str" + studyIdFromStudySubjectId);
  return doesStudySubjecAndCRCRolesMatch(crcUserName,studyIdFromStudySubjectId);
}
Program: 115075
Project: 115075
Buggy source:
private ODM getODM(String studyOID,String studySubjectLabel){
  StudyDAO studyDAO=new StudyDAO(dataSource);
  StudySubjectDAO studySubjectDAO=new StudySubjectDAO(dataSource);
  StudyBean studyBean=null;
  StudySubjectBean studySubjectBean=null;
  try {
    studyBean=studyDAO.findByOid(studyOID);
    if (studyBean != null) {
      studySubjectBean=(StudySubjectBean)studySubjectDAO.findByLabelAndStudy(studySubjectLabel,studyBean);
      if (!mayProceed(studyOID,studySubjectBean))       return null;
      if (studySubjectBean.getId() != 0) {
        return createOdm(studyBean,studySubjectBean);
      }
 else {
        return createOdm(studyBean,null);
      }
    }
 else {
      return createOdm(null,null);
    }
  }
 catch (  Exception e) {
    logger.debug(e.getMessage());
    logger.debug(ExceptionUtils.getStackTrace(e));
  }
  return null;
}

Fixed version (ground truth):
private ODM getODM(String studyOID,String studySubjectLabel,String crcUserName){
  StudyDAO studyDAO=new StudyDAO(dataSource);
  StudySubjectDAO studySubjectDAO=new StudySubjectDAO(dataSource);
  StudyBean studyBean=null;
  StudySubjectBean studySubjectBean=null;
  try {
    studyBean=studyDAO.findByOid(studyOID);
    if (studyBean != null) {
      studySubjectBean=(StudySubjectBean)studySubjectDAO.findByLabelAndStudy(studySubjectLabel,studyBean);
      if (!mayProceed(studyOID,studySubjectBean))       return null;
      if (studySubjectBean.getId() != 0 && !accountController.isCRCHasAccessToStudySubject(studyOID,crcUserName,studySubjectLabel)) {
        return createOdm(studyBean,studySubjectBean);
      }
 else       if (studySubjectBean.getId() != 0 && accountController.isCRCHasAccessToStudySubject(studyOID,crcUserName,studySubjectLabel)) {
        return null;
      }
 else {
        return createOdm(studyBean,null);
      }
    }
 else {
      return createOdm(null,null);
    }
  }
 catch (  Exception e) {
    logger.debug(e.getMessage());
    logger.debug(ExceptionUtils.getStackTrace(e));
  }
  return null;
}
Program: 115076
Project: 115076
Buggy source:
/** 
 * This URL needs to change ... Right now security disabled on this ... You can call this with http://localhost:8080/OpenClinica-web-MAINLINE-SNAPSHOT /pages/odmk/studies/S_DEFAULTS1/events
 * @param studyOid
 * @return
 * @throws Exception
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public @ResponseBody ODM getSubjectODM(@PathVariable("String_Node_Str") String studyOid,@PathVariable("String_Node_Str") String studySubjectLabel) throws Exception {
  ResourceBundleProvider.updateLocale(new Locale("String_Node_Str"));
  return getODM(studyOid,studySubjectLabel);
}

Fixed version (ground truth):
/** 
 * This URL needs to change ... Right now security disabled on this ... You can call this with http://localhost:8080/OpenClinica-web-MAINLINE-SNAPSHOT /pages/odmk/studies/S_DEFAULTS1/events
 * @param studyOid
 * @return
 * @throws Exception
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public @ResponseBody ODM getSubjectODM(@PathVariable("String_Node_Str") String studyOid,@PathVariable("String_Node_Str") String crcUserName,@PathVariable("String_Node_Str") String studySubjectLabel) throws Exception {
  ResourceBundleProvider.updateLocale(new Locale("String_Node_Str"));
  return getODM(studyOid,studySubjectLabel,crcUserName);
}
Program: 115077
Project: 115077
Buggy source:
@Override protected void processRequest() throws Exception {
  String crf_oid=request.getParameter(CRF_ID);
  String formURL=null;
  if (currentStudy.getStudyParameterConfig().getParticipantPortal().equals("String_Node_Str")) {
    EnketoCredentials credentials=getCredentials();
    EnketoAPI enketo=new EnketoAPI(credentials);
    formURL=enketo.getFormPreviewURL(crf_oid);
    response.sendRedirect(formURL);
  }
  forwardPage(Page.PARTICIPANT_FORM_SERVLET);
}

Fixed version (ground truth):
@Override protected void processRequest() throws Exception {
  String crf_oid=request.getParameter(CRF_ID);
  String formURL=null;
  if (currentStudy.getStudyParameterConfig().getParticipantPortal().equals("String_Node_Str")) {
    EnketoCredentials credentials=getCredentials();
    EnketoAPI enketo=new EnketoAPI(credentials);
    formURL=enketo.getFormPreviewURL(crf_oid);
    if (!formURL.equals("String_Node_Str"))     response.sendRedirect(formURL);
 else {
      addPageMessage(respage.getString("String_Node_Str"));
      forwardPage(Page.MENU_SERVLET);
    }
  }
}
Program: 115078
Project: 115078
Buggy source:
public String getRegistrationStatus(String studyOid){
  String ocUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid;
  String pManageUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid+ "String_Node_Str"+ ocUrl;
  RestTemplate rest=new RestTemplate();
  Authorization[] response=rest.getForObject(pManageUrl,Authorization[].class);
  if (response.length > 0 && response[0].getAuthorizationStatus() != null)   return response[0].getAuthorizationStatus().getStatus();
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public String getRegistrationStatus(String studyOid){
  String ocUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid;
  String pManageUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid+ "String_Node_Str"+ ocUrl;
  RestTemplate rest=new RestTemplate();
  try {
    Authorization[] response=rest.getForObject(pManageUrl,Authorization[].class);
    if (response.length > 0 && response[0].getAuthorizationStatus() != null)     return response[0].getAuthorizationStatus().getStatus();
  }
 catch (  Exception e) {
    logger.error(e.getMessage());
    logger.error(ExceptionUtils.getStackTrace(e));
  }
  return "String_Node_Str";
}
Program: 115079
Project: 115079
Buggy source:
public String getStudyHost(String studyOid) throws Exception {
  String ocUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid;
  String pManageUrl=CoreResources.getField("String_Node_Str");
  String pManageUrlFull=pManageUrl + "String_Node_Str" + studyOid+ "String_Node_Str"+ ocUrl;
  RestTemplate rest=new RestTemplate();
  Authorization[] response=rest.getForObject(pManageUrlFull,Authorization[].class);
  if (response.length > 0 && response[0].getStudy() != null && response[0].getStudy().getHost() != null && !response[0].getStudy().getHost().equals("String_Node_Str")) {
    URL url=new URL(pManageUrl);
    String port="String_Node_Str";
    if (url.getPort() > 0)     port="String_Node_Str" + String.valueOf(url.getPort());
    return url.getProtocol() + "String_Node_Str" + response[0].getStudy().getHost()+ "String_Node_Str"+ url.getHost()+ port+ "String_Node_Str";
  }
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public String getStudyHost(String studyOid) throws Exception {
  String ocUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid;
  String pManageUrl=CoreResources.getField("String_Node_Str");
  String pManageUrlFull=pManageUrl + "String_Node_Str" + studyOid+ "String_Node_Str"+ ocUrl;
  RestTemplate rest=new RestTemplate();
  try {
    Authorization[] response=rest.getForObject(pManageUrlFull,Authorization[].class);
    if (response.length > 0 && response[0].getStudy() != null && response[0].getStudy().getHost() != null && !response[0].getStudy().getHost().equals("String_Node_Str")) {
      URL url=new URL(pManageUrl);
      String port="String_Node_Str";
      if (url.getPort() > 0)       port="String_Node_Str" + String.valueOf(url.getPort());
      return url.getProtocol() + "String_Node_Str" + response[0].getStudy().getHost()+ "String_Node_Str"+ url.getHost()+ port+ "String_Node_Str";
    }
  }
 catch (  Exception e) {
    logger.error(e.getMessage());
    logger.error(ExceptionUtils.getStackTrace(e));
  }
  return "String_Node_Str";
}
Program: 115080
Project: 115080
Buggy source:
public String registerStudy(String studyOid){
  String ocUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid;
  String pManageUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid+ "String_Node_Str"+ ocUrl;
  Authorization authRequest=new Authorization();
  Study authStudy=new Study();
  authStudy.setStudyOid(studyOid);
  authStudy.setInstanceUrl(ocUrl);
  authRequest.setStudy(authStudy);
  RestTemplate rest=new RestTemplate();
  Authorization response=rest.postForObject(pManageUrl,authRequest,Authorization.class);
  if (response != null && response.getAuthorizationStatus() != null)   return response.getAuthorizationStatus().getStatus();
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public String registerStudy(String studyOid){
  String ocUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid;
  String pManageUrl=CoreResources.getField("String_Node_Str") + "String_Node_Str" + studyOid+ "String_Node_Str"+ ocUrl;
  Authorization authRequest=new Authorization();
  Study authStudy=new Study();
  authStudy.setStudyOid(studyOid);
  authStudy.setInstanceUrl(ocUrl);
  authRequest.setStudy(authStudy);
  RestTemplate rest=new RestTemplate();
  try {
    Authorization response=rest.postForObject(pManageUrl,authRequest,Authorization.class);
    if (response != null && response.getAuthorizationStatus() != null)     return response.getAuthorizationStatus().getStatus();
  }
 catch (  Exception e) {
    logger.error(e.getMessage());
    logger.error(ExceptionUtils.getStackTrace(e));
  }
  return "String_Node_Str";
}
Program: 115082
Project: 115082
Buggy source:
public void subValidator(Integer itemDataTypeId,String value,Errors e){
  if (value != null && value != "String_Node_Str") {
switch (itemDataTypeId) {
case 6:
{
        try {
          Integer.valueOf(value);
        }
 catch (        NumberFormatException nfe) {
          e.reject("String_Node_Str");
        }
        break;
      }
case 7:
{
      try {
        Float.valueOf(value);
      }
 catch (      NumberFormatException nfe) {
        e.reject("String_Node_Str");
      }
      break;
    }
case 9:
{
    if (!ExpressionTreeHelper.isDateyyyyMMddDashes(value)) {
      System.out.print("String_Node_Str");
      e.reject("String_Node_Str");
    }
    break;
  }
case 10:
{
  if (!ExpressionTreeHelper.isDateyyyyMMddDashes(value) && !ExpressionTreeHelper.isDateyyyyMMDashes(value) && !ExpressionTreeHelper.isDateyyyyDashes(value)) {
    e.reject("String_Node_Str");
  }
  break;
}
case 11:
{
e.reject("String_Node_Str");
break;
}
default :
break;
}
}
}

Fixed version (ground truth):
public void subValidator(Integer itemDataTypeId,String value,Errors e){
  if (value != null && value != "String_Node_Str") {
switch (itemDataTypeId) {
case 6:
{
        try {
          Integer.valueOf(value);
        }
 catch (        NumberFormatException nfe) {
          e.reject("String_Node_Str");
          logger.info(value + "String_Node_Str");
        }
        break;
      }
case 7:
{
      try {
        Float.valueOf(value);
      }
 catch (      NumberFormatException nfe) {
        e.reject("String_Node_Str");
        logger.info(value + "String_Node_Str");
      }
      break;
    }
case 9:
{
    if (!ExpressionTreeHelper.isDateyyyyMMddDashes(value)) {
      System.out.print("String_Node_Str");
      e.reject("String_Node_Str");
      logger.info(value + "String_Node_Str");
    }
    break;
  }
case 10:
{
  if (!ExpressionTreeHelper.isDateyyyyMMddDashes(value) && !ExpressionTreeHelper.isDateyyyyMMDashes(value) && !ExpressionTreeHelper.isDateyyyyDashes(value)) {
    e.reject("String_Node_Str");
    logger.info(value + "String_Node_Str");
  }
  break;
}
case 11:
{
e.reject("String_Node_Str");
break;
}
default :
break;
}
}
}
Program: 115083
Project: 115083
Buggy source:
/** 
 * This URL needs to change ... Right now security disabled on this ... You can call this with http://localhost:8080/OpenClinica-web-MAINLINE-SNAPSHOT /pages/odmk/studies/S_DEFAULTS1/events
 * @param studyOid
 * @return
 * @throws Exception
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public @ResponseBody ODM getEvent(@PathVariable("String_Node_Str") String studyOid,@PathVariable("String_Node_Str") String studySubjectOid) throws Exception {
  ResourceBundleProvider.updateLocale(new Locale("String_Node_Str"));
  return getODM(studyOid,studySubjectOid);
}

Fixed version (ground truth):
/** 
 * This URL needs to change ... Right now security disabled on this ... You can call this with http://localhost:8080/OpenClinica-web-MAINLINE-SNAPSHOT /pages/odmk/studies/S_DEFAULTS1/events
 * @param studyOid
 * @return
 * @throws Exception
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public @ResponseBody ODM getEvent(@PathVariable("String_Node_Str") String studyOid,@PathVariable("String_Node_Str") String studySubjectId) throws Exception {
  ResourceBundleProvider.updateLocale(new Locale("String_Node_Str"));
  return getODM(studyOid,studySubjectId);
}