Program: 69894
Project: 69894
Buggy source:
/** 
 * ConditionInterpreter interpretes course conditions.
 * @param userCourseEnv
 */
public ConditionInterpreter(UserCourseEnvironment userCourseEnv){
  uce=userCourseEnv;
  CourseEditorEnv cev=uce.getCourseEditorEnv();
  if (cev != null) {
    translator=new PackageTranslator(PACKAGE,cev.getEditorEnvLocale());
  }
  env=new Environment();
  env.addConstant("String_Node_Str",1);
  env.addConstant("String_Node_Str",0);
  env.addVariable(NowVariable.name,new NowVariable(userCourseEnv));
  env.addVariable(NeverVariable.name,new NeverVariable(userCourseEnv));
  env.addFunction(DateFunction.name,new DateFunction(userCourseEnv));
  env.addFunction("String_Node_Str",new InLearningGroupFunction(userCourseEnv,"String_Node_Str"));
  env.addFunction("String_Node_Str",new InLearningGroupFunction(userCourseEnv,"String_Node_Str"));
  env.addFunction("String_Node_Str",new IsLearningGroupFullFunction(userCourseEnv,"String_Node_Str"));
  env.addFunction(InRightGroupFunction.name,new InRightGroupFunction(userCourseEnv));
  env.addFunction(InLearningAreaFunction.name,new InLearningAreaFunction(userCourseEnv));
  env.addFunction(IsUserFunction.name,new IsUserFunction(userCourseEnv));
  env.addFunction(IsGuestFunction.name,new IsGuestFunction(userCourseEnv));
  env.addFunction(IsGlobalAuthorFunction.name,new IsGlobalAuthorFunction(userCourseEnv));
  EvalAttributeFunction eaf;
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_HAS_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_IS_IN_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_HAS_NOT_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_IS_NOT_IN_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_ATTRIBUTE_ENDS_WITH);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_ATTRIBUTE_STARTS_WITH);
  env.addFunction(eaf.name,eaf);
  env.addFunction(GetUserPropertyFunction.name,new GetUserPropertyFunction(userCourseEnv));
  env.addFunction(GetUserCourseDBFunction.name,new GetUserCourseDBFunction(userCourseEnv));
  env.addFunction(HasLanguageFunction.name,new HasLanguageFunction(userCourseEnv));
  env.addFunction(InInstitutionFunction.name,new InInstitutionFunction(userCourseEnv));
  env.addFunction(IsCourseCoachFunction.name,new IsCourseCoachFunction(userCourseEnv));
  env.addFunction(IsCourseParticipantFunction.name,new IsCourseParticipantFunction(userCourseEnv));
  env.addFunction(IsCourseAdministratorFunction.name,new IsCourseAdministratorFunction(userCourseEnv));
  env.addFunction(GetInitialCourseLaunchDateFunction.name,new GetInitialCourseLaunchDateFunction(userCourseEnv));
  env.addFunction(GetRecentCourseLaunchDateFunction.name,new GetRecentCourseLaunchDateFunction(userCourseEnv));
  env.addFunction(GetAttemptsFunction.name,new GetAttemptsFunction(userCourseEnv));
  env.addFunction(GetInitialEnrollmentDateFunction.name,new GetInitialEnrollmentDateFunction(userCourseEnv));
  env.addFunction(GetRecentEnrollmentDateFunction.name,new GetRecentEnrollmentDateFunction(userCourseEnv));
  env.addFunction(GetPassedFunction.name,new GetPassedFunction(userCourseEnv));
  env.addFunction(GetScoreFunction.name,new GetScoreFunction(userCourseEnv));
  env.addFunction(GetPassedWithCourseIdFunction.name,new GetPassedWithCourseIdFunction(userCourseEnv));
  env.addFunction(GetScoreWithCourseIdFunction.name,new GetScoreWithCourseIdFunction(userCourseEnv));
  env.addFunction(GetOnyxTestOutcomeNumFunction.name,new GetOnyxTestOutcomeNumFunction(userCourseEnv));
  env.addFunction(GetOnyxTestOutcomeAnumFunction.name,new GetOnyxTestOutcomeAnumFunction(userCourseEnv));
  env.addUnit("String_Node_Str",new MinuteUnit());
  env.addUnit("String_Node_Str",new HourUnit());
  env.addUnit("String_Node_Str",new DayUnit());
  env.addUnit("String_Node_Str",new WeekUnit());
  env.addUnit("String_Node_Str",new MonthUnit());
}

Fixed version (ground truth):
/** 
 * ConditionInterpreter interpretes course conditions.
 * @param userCourseEnv
 */
public ConditionInterpreter(UserCourseEnvironment userCourseEnv){
  uce=userCourseEnv;
  CourseEditorEnv cev=uce.getCourseEditorEnv();
  if (cev != null) {
    translator=new PackageTranslator(PACKAGE,cev.getEditorEnvLocale());
  }
  env=new Environment();
  env.addConstant("String_Node_Str",1);
  env.addConstant("String_Node_Str",0);
  env.addVariable(NowVariable.name,new NowVariable(userCourseEnv));
  env.addVariable(NeverVariable.name,new NeverVariable(userCourseEnv));
  env.addFunction(DateFunction.name,new DateFunction(userCourseEnv));
  env.addFunction("String_Node_Str",new InLearningGroupFunction(userCourseEnv,"String_Node_Str"));
  env.addFunction("String_Node_Str",new InLearningGroupFunction(userCourseEnv,"String_Node_Str"));
  env.addFunction("String_Node_Str",new IsLearningGroupFullFunction(userCourseEnv,"String_Node_Str"));
  env.addFunction(InRightGroupFunction.name,new InRightGroupFunction(userCourseEnv));
  env.addFunction(InLearningAreaFunction.name,new InLearningAreaFunction(userCourseEnv));
  env.addFunction(IsUserFunction.name,new IsUserFunction(userCourseEnv));
  env.addFunction(IsGuestFunction.name,new IsGuestFunction(userCourseEnv));
  env.addFunction(IsGlobalAuthorFunction.name,new IsGlobalAuthorFunction(userCourseEnv));
  env.addFunction(Sleep.name,new Sleep(userCourseEnv));
  EvalAttributeFunction eaf;
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_HAS_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_IS_IN_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_HAS_NOT_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_IS_NOT_IN_ATTRIBUTE);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_ATTRIBUTE_ENDS_WITH);
  env.addFunction(eaf.name,eaf);
  eaf=new EvalAttributeFunction(userCourseEnv,EvalAttributeFunction.FUNCTION_TYPE_ATTRIBUTE_STARTS_WITH);
  env.addFunction(eaf.name,eaf);
  env.addFunction(GetUserPropertyFunction.name,new GetUserPropertyFunction(userCourseEnv));
  env.addFunction(GetUserCourseDBFunction.name,new GetUserCourseDBFunction(userCourseEnv));
  env.addFunction(HasLanguageFunction.name,new HasLanguageFunction(userCourseEnv));
  env.addFunction(InInstitutionFunction.name,new InInstitutionFunction(userCourseEnv));
  env.addFunction(IsCourseCoachFunction.name,new IsCourseCoachFunction(userCourseEnv));
  env.addFunction(IsCourseParticipantFunction.name,new IsCourseParticipantFunction(userCourseEnv));
  env.addFunction(IsCourseAdministratorFunction.name,new IsCourseAdministratorFunction(userCourseEnv));
  env.addFunction(GetInitialCourseLaunchDateFunction.name,new GetInitialCourseLaunchDateFunction(userCourseEnv));
  env.addFunction(GetRecentCourseLaunchDateFunction.name,new GetRecentCourseLaunchDateFunction(userCourseEnv));
  env.addFunction(GetAttemptsFunction.name,new GetAttemptsFunction(userCourseEnv));
  env.addFunction(GetInitialEnrollmentDateFunction.name,new GetInitialEnrollmentDateFunction(userCourseEnv));
  env.addFunction(GetRecentEnrollmentDateFunction.name,new GetRecentEnrollmentDateFunction(userCourseEnv));
  env.addFunction(GetPassedFunction.name,new GetPassedFunction(userCourseEnv));
  env.addFunction(GetScoreFunction.name,new GetScoreFunction(userCourseEnv));
  env.addFunction(GetPassedWithCourseIdFunction.name,new GetPassedWithCourseIdFunction(userCourseEnv));
  env.addFunction(GetScoreWithCourseIdFunction.name,new GetScoreWithCourseIdFunction(userCourseEnv));
  env.addFunction(GetOnyxTestOutcomeNumFunction.name,new GetOnyxTestOutcomeNumFunction(userCourseEnv));
  env.addFunction(GetOnyxTestOutcomeAnumFunction.name,new GetOnyxTestOutcomeAnumFunction(userCourseEnv));
  env.addUnit("String_Node_Str",new MinuteUnit());
  env.addUnit("String_Node_Str",new HourUnit());
  env.addUnit("String_Node_Str",new DayUnit());
  env.addUnit("String_Node_Str",new WeekUnit());
  env.addUnit("String_Node_Str",new MonthUnit());
}