nus-yam/ex-repair huggingface dataset:
Program: 24699
Project: 24699
Buggy source:
public Widget navigateTo(String pageId,State currentStateInformation){
  final BreadCrumbMessages messages=(BreadCrumbMessages)GWT.create(BreadCrumbMessages.class);
  if (pageId.equals(PageId.login)) {
    if (!currentStateInformation.isAuthenticated()) {
      this.breadcrumb="String_Node_Str";
      return new LoginPane(currentStateInformation);
    }
 else {
      this.breadcrumb=messages.welcome(currentStateInformation.getFullName());
      return new ChooseCasePane(currentStateInformation);
    }
  }
 else   if (pageId.equals(PageId.home)) {
    this.breadcrumb=messages.welcome(currentStateInformation.getFullName());
    System.out.println("String_Node_Str" + currentStateInformation);
    return new ChooseCasePane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.logout)) {
    this.breadcrumb="String_Node_Str";
    return new SignOutPane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.preferences)) {
    this.breadcrumb=messages.preferences();
    return new EditUserProfilePane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.help)) {
    this.breadcrumb="String_Node_Str";
    return new Label("String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
public Widget navigateTo(String pageId,State currentStateInformation){
  final BreadCrumbMessages messages=(BreadCrumbMessages)GWT.create(BreadCrumbMessages.class);
  if (pageId.equals(PageId.login)) {
    if (!currentStateInformation.isAuthenticated()) {
      this.breadcrumb="String_Node_Str";
      return new LoginPane(currentStateInformation);
    }
 else {
      this.breadcrumb=messages.welcome(currentStateInformation.getFullName());
      return new ChooseCasePane(currentStateInformation);
    }
  }
 else   if (pageId.equals(PageId.home)) {
    this.breadcrumb=messages.welcome(currentStateInformation.getFullName());
    return new ChooseCasePane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.logout)) {
    this.breadcrumb="String_Node_Str";
    return new SignOutPane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.preferences)) {
    this.breadcrumb=messages.preferences();
    return new EditUserProfilePane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.help)) {
    this.breadcrumb="String_Node_Str";
    return new Label("String_Node_Str");
  }
  return null;
}
Program: 24700
Project: 24700
Buggy source:
public void determineAccessRights(String page,State currentState){
  currentState.setMode(GwtModesType.ReadWrite);
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  currentState.setMode(GwtModesType.ReadOnly);
}
Program: 24702
Project: 24702
Buggy source:
private GwtProject CreateProject(){
  Project testProject=new Project();
  testProject.setName("String_Node_Str");
  testProject.setLite(false);
  testProject.setPrivacy(false);
  testProject.setSecurity(true);
  testProject.setPrivacyTechniqueRationale("String_Node_Str");
  testProject.setSecurityTechniqueRationale("String_Node_Str");
  testProject.setAcquisitionOrganizationEngineer(this.testUser);
  testProject.setCases(new AsquareCase(new GwtAsquareCase(1)));
  projectDao.create(testProject);
  return testProject.createGwtProject();
}

Fixed version (ground truth):
private GwtProject CreateProject(){
  Project testProject=new Project();
  testProject.setName("String_Node_Str");
  testProject.setLite(false);
  testProject.setPrivacy(false);
  testProject.setSecurity(true);
  testProject.setAcquisitionOrganizationEngineer(this.testUser);
  testProject.setCases(new AsquareCase(new GwtAsquareCase(1)));
  projectDao.create(testProject);
  return testProject.createGwtProject();
}
Program: 24703
Project: 24703
Buggy source:
public SoftwarePackage(String description,Project project,Date dateCreated,Date dateModified){
  this.description=description;
  this.project=project;
  this.dateCreated=dateCreated;
  this.dateModified=dateModified;
}

Fixed version (ground truth):
public SoftwarePackage(GwtSoftwarePackage gwtPackage){
  if (gwtPackage == null) {
    return;
  }
  this.id=gwtPackage.getId();
  this.name=gwtPackage.getName();
  this.description=gwtPackage.getDescription();
}
Program: 24704
Project: 24704
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24705
Project: 24705
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24706
Project: 24706
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24710
Project: 24710
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24711
Project: 24711
Buggy source:
public void determineAccessRights(String page,State currentState){
  System.out.println("String_Node_Str");
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24712
Project: 24712
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator() == true) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.ReadOnly);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24713
Project: 24713
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Contractor) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Administrator) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24716
Project: 24716
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public List<GwtStepVerficationResult> verifyAllSteps(Integer projectId,WebApplicationContext ctx) throws SquareException {
  Map<String,StepBusinessInterface> beanMap=ctx.getBeansOfType(StepBusinessInterface.class);
  List<GwtStepVerficationResult> result=new ArrayList<GwtStepVerficationResult>();
  Project project=projectDao.fetch(projectId);
  Set<Step> steps=project.getSteps();
  GwtStepVerficationResult r=null;
  if (steps.isEmpty()) {
    throw new SquareException("String_Node_Str");
  }
  for (  Step s : steps) {
    GwtStep gs=s.createGwtStep(projectId);
    for (    StepBusinessInterface sb : beanMap.values()) {
      r=sb.verifyStep(project);
      if (r == null) {
        logger.info("String_Node_Str" + sb);
      }
      break;
    }
    r.setStep(gs);
    result.add(r);
  }
  return result;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public List<GwtStepVerficationResult> verifyAllSteps(Integer projectId,WebApplicationContext ctx) throws SquareException {
  Map<String,StepBusinessInterface> beanMap=ctx.getBeansOfType(StepBusinessInterface.class);
  List<GwtStepVerficationResult> result=new ArrayList<GwtStepVerficationResult>();
  Project project=projectDao.fetch(projectId);
  Set<Step> steps=project.getSteps();
  GwtStepVerficationResult r=null;
  if (steps.isEmpty()) {
    throw new SquareException("String_Node_Str");
  }
  for (  Step s : steps) {
    GwtStep gs=s.createGwtStep(projectId);
    for (    StepBusinessInterface sb : beanMap.values()) {
      System.out.println("String_Node_Str" + sb.getStepDescription().getDescription() + "String_Node_Str"+ gs.getDescription());
      r=sb.verifyStep(project);
      if (r == null) {
        System.out.println("String_Node_Str");
        logger.info("String_Node_Str" + sb);
      }
      break;
    }
    r.setStep(gs);
    result.add(r);
  }
  return result;
}
Program: 24717
Project: 24717
Buggy source:
@Override public GwtStepVerficationResult verifyStep(Project projectId) throws SquareException {
  return null;
}

Fixed version (ground truth):
@Override public GwtStepVerficationResult verifyStep(Project projectId) throws SquareException {
  GwtStepVerficationResult result=new GwtStepVerficationResult();
  result.setHasWarning(false);
  return result;
}
Program: 24718
Project: 24718
Buggy source:
@Override public GwtStepVerficationResult verifyStep(Project projectId) throws SquareException {
  return null;
}

Fixed version (ground truth):
@Override public GwtStepVerficationResult verifyStep(Project projectId) throws SquareException {
  GwtStepVerficationResult result=new GwtStepVerficationResult();
  result.setHasWarning(false);
  return result;
}
Program: 24719
Project: 24719
Buggy source:
@Override public GwtStepVerficationResult verifyStep(Project projectId) throws SquareException {
  return null;
}

Fixed version (ground truth):
@Override public GwtStepVerficationResult verifyStep(Project projectId) throws SquareException {
  GwtStepVerficationResult result=new GwtStepVerficationResult();
  result.setHasWarning(false);
  return result;
}
Program: 24720
Project: 24720
Buggy source:
public void loadSubGoalsFromProject(){
  IdentifyGoalsAssetsServiceAsync service=GWT.create(IdentifyGoalsAssetsService.class);
  ServiceDefTarget endpoint=(ServiceDefTarget)service;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  service.loadBusinessGoalInfo(getCurrentState().getProjectID(),new AsyncCallback<GwtBusinessGoal>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
    public void onSuccess(    GwtBusinessGoal result){
      businessGoalInfo=result;
      listOfProjectSubGoals=businessGoalInfo.getSubGoals();
      loadArtifactsFromProject();
    }
  }
);
}

Fixed version (ground truth):
public void loadSubGoalsFromProject(){
  IdentifyGoalsAssetsServiceAsync service=GWT.create(IdentifyGoalsAssetsService.class);
  ServiceDefTarget endpoint=(ServiceDefTarget)service;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  service.loadBusinessGoalInfo(getCurrentState().getProjectID(),new AsyncCallback<GwtBusinessGoal>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
    public void onSuccess(    GwtBusinessGoal result){
      businessGoalInfo=result;
      listOfProjectSubGoals=businessGoalInfo.getSubGoals();
      loadProjectRequirements();
    }
  }
);
}
Program: 24721
Project: 24721
Buggy source:
public void loadProjectRequirements(){
  ServiceDefTarget endpoint=(ServiceDefTarget)requirementService;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  this.requirementService.getRequirementsFromProject(this.currentProject.getId(),new AsyncCallback<List<GwtRequirement>>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,messages.errorGettingRequirements());
    }
    public void onSuccess(    List<GwtRequirement> result){
      lisOfRequirements=result;
      currentRequirement=getRequirementFromListByID(currentRequirementId);
      if (currentRequirement != null) {
        listOfSubGoalsMappedToRequirement=currentRequirement.getSubGoals();
        listOfRiksMapppedToRequirement=currentRequirement.getRisks();
        listOfArtifactsMappedToRequirement=currentRequirement.getArtifacts();
      }
      loadProjectRisks();
    }
  }
);
}

Fixed version (ground truth):
public void loadProjectRequirements(){
  ServiceDefTarget endpoint=(ServiceDefTarget)requirementService;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  this.requirementService.getRequirementsFromProject(this.currentProject.getId(),new AsyncCallback<List<GwtRequirement>>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,messages.errorGettingRequirements());
    }
    public void onSuccess(    List<GwtRequirement> result){
      lisOfRequirements=result;
      currentRequirement=getRequirementFromListByID(currentRequirementId);
      if (currentRequirement != null) {
        listOfSubGoalsMappedToRequirement=currentRequirement.getSubGoals();
        listOfRiksMapppedToRequirement=currentRequirement.getRisks();
        listOfArtifactsMappedToRequirement=currentRequirement.getArtifacts();
      }
      PaneInitialization();
    }
  }
);
}
Program: 24722
Project: 24722
Buggy source:
public void initializeRequirementFormWidgets(){
  this.editRequirement=new SquareHyperlink(messages.linkEditRequirement());
  this.deleteRequirement=new SquareHyperlink(messages.linkDeleteRequirement());
  this.gotToSummary=new SquareHyperlink(messages.linkBackRequirementSummary());
  this.requirementTitleLabel.setStyleName("String_Node_Str");
  this.requirementDescriptionLabel.setStyleName("String_Node_Str");
  this.subGoalLabel.setStyleName("String_Node_Str");
  this.artifactLabel.setStyleName("String_Node_Str");
  this.requirementTitleTextBox.setStyleName("String_Node_Str");
  this.requirementDescriptionTextBox.setStyleName("String_Node_Str");
  this.requirementDescriptionTextBox.setHeight("String_Node_Str");
  subGoalsListBox=new ListBox();
  subGoalsListBox.clear();
  subGoalsListBox.setWidth("String_Node_Str");
  subGoalsListBox.addItem("String_Node_Str","String_Node_Str");
  for (  GwtSubGoal subGoals : listOfProjectSubGoals) {
    subGoalsListBox.addItem(subGoals.getDescription(),subGoals.getId() + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void initializeRequirementFormWidgets(){
  this.editRequirement=new SquareHyperlink(messages.linkEditRequirement());
  this.deleteRequirement=new SquareHyperlink(messages.linkDeleteRequirement());
  this.gotToSummary=new SquareHyperlink(messages.linkBackRequirementSummary());
  this.requirementTitleLabel.setStyleName("String_Node_Str");
  this.requirementDescriptionLabel.setStyleName("String_Node_Str");
  this.subGoalLabel.setStyleName("String_Node_Str");
  this.requirementTitleTextBox.setStyleName("String_Node_Str");
  this.requirementDescriptionTextBox.setStyleName("String_Node_Str");
  this.requirementDescriptionTextBox.setHeight("String_Node_Str");
  subGoalsListBox=new ListBox();
  subGoalsListBox.clear();
  subGoalsListBox.setWidth("String_Node_Str");
  subGoalsListBox.addItem("String_Node_Str","String_Node_Str");
  for (  GwtSubGoal subGoals : listOfProjectSubGoals) {
    subGoalsListBox.addItem(subGoals.getDescription(),subGoals.getId() + "String_Node_Str");
  }
}
Program: 24725
Project: 24725
Buggy source:
public void execute(){
  if (currentDialog.equalsIgnoreCase("String_Node_Str")) {
    listOfRiksMapppedToRequirement.clear();
    this.matrix.setWidget(2,1,createHTMLSubGoalList());
  }
 else   if (currentDialog.equalsIgnoreCase("String_Node_Str")) {
    listArtifactChanged(listOfArtifactsMappedToRequirement,artifactDialog.getNewSelectedArtifacts());
    listOfArtifactsMappedToRequirement=artifactDialog.getNewSelectedArtifacts();
    this.matrix.setWidget(3,1,createHTMLArtifactsList());
  }
}

Fixed version (ground truth):
public void execute(){
  if (currentDialog.equalsIgnoreCase("String_Node_Str")) {
    listOfRiksMapppedToRequirement.clear();
    this.matrix.setWidget(2,1,createHTMLSubGoalList());
  }
}
Program: 24726
Project: 24726
Buggy source:
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist}) public void associateSubGoalAndAsset(GwtSubGoal gwtSubgoal,GwtAsset gwtAsset) throws SquareException {
  Goal subGoal=this.goalDataAccess.fetch(gwtSubgoal.getId());
  Asset asset=this.assetDataAccess.fetch(gwtAsset.getId());
  subGoal.getAssets().add(asset);
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist,Roles.COTS_Vendor}) public void associateSubGoalAndAsset(GwtSubGoal gwtSubgoal,GwtAsset gwtAsset) throws SquareException {
  Goal subGoal=this.goalDataAccess.fetch(gwtSubgoal.getId());
  Asset asset=this.assetDataAccess.fetch(gwtAsset.getId());
  subGoal.getAssets().add(asset);
}
Program: 24727
Project: 24727
Buggy source:
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist}) public void setBusinessGoal(int projectId,GwtBusinessGoal businessGoal) throws SquareException {
  Project project=new Project();
  project.setId(projectId);
  List<Goal> existingBusinessGoalList=this.goalDataAccess.getBusinessGoalByProject(project);
  GoalType goalType=new GoalType();
  Goal goal=new Goal();
  goalType.setId(1);
  if (existingBusinessGoalList.size() == 0) {
    goal.setGoalType(goalType);
    goal.setProject(project);
    goal.setDescription(businessGoal.getDescription());
    goal.setPriority(1);
    this.goalDataAccess.create(goal);
  }
 else {
    goal=existingBusinessGoalList.get(0);
    goal.setGoalType(goalType);
    goal.setProject(project);
    goal.setDescription(businessGoal.getDescription());
    goal.setPriority(1);
    goal.setId(businessGoal.getId());
    this.goalDataAccess.update(goal);
  }
  businessGoal.setId(goal.getId());
  businessGoal.setDescription(goal.getDescription());
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist,Roles.COTS_Vendor}) public void setBusinessGoal(int projectId,GwtBusinessGoal businessGoal) throws SquareException {
  Project project=new Project();
  project.setId(projectId);
  List<Goal> existingBusinessGoalList=this.goalDataAccess.getBusinessGoalByProject(project);
  GoalType goalType=new GoalType();
  Goal goal=new Goal();
  goalType.setId(1);
  if (existingBusinessGoalList.size() == 0) {
    goal.setGoalType(goalType);
    goal.setProject(project);
    goal.setDescription(businessGoal.getDescription());
    goal.setPriority(1);
    this.goalDataAccess.create(goal);
  }
 else {
    goal=existingBusinessGoalList.get(0);
    goal.setGoalType(goalType);
    goal.setProject(project);
    goal.setDescription(businessGoal.getDescription());
    goal.setPriority(1);
    goal.setId(businessGoal.getId());
    this.goalDataAccess.update(goal);
  }
  businessGoal.setId(goal.getId());
  businessGoal.setDescription(goal.getDescription());
}
Program: 24728
Project: 24728
Buggy source:
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist}) public void updateSubGoal(int projectId,GwtSubGoal subgoal) throws SquareException {
  Project project=new Project();
  project.setId(projectId);
  GoalType goalType=new GoalType();
  goalType.setId(2);
  Goal goal=goalDataAccess.fetch(subgoal.getId());
  goal.setProject(project);
  goal.setId(subgoal.getId());
  goal.setGoalType(goalType);
  goal.setDescription(subgoal.getDescription());
  goal.setPriority(subgoal.getPriority());
  goalDataAccess.update(goal);
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist,Roles.COTS_Vendor}) public void updateSubGoal(int projectId,GwtSubGoal subgoal) throws SquareException {
  Project project=new Project();
  project.setId(projectId);
  GoalType goalType=new GoalType();
  goalType.setId(2);
  Goal goal=goalDataAccess.fetch(subgoal.getId());
  goal.setProject(project);
  goal.setId(subgoal.getId());
  goal.setGoalType(goalType);
  goal.setDescription(subgoal.getDescription());
  goal.setPriority(subgoal.getPriority());
  goalDataAccess.update(goal);
}
Program: 24729
Project: 24729
Buggy source:
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist}) public GwtBusinessGoal getBusinessGoalInformation(int projectId){
  Project project=new Project();
  project.setId(projectId);
  List<Goal> businessGoalRetrived=this.goalDataAccess.getBusinessGoalByProject(project);
  GwtBusinessGoal businessGoal=new GwtBusinessGoal();
  if (businessGoalRetrived.size() == 1) {
    businessGoal.setId(businessGoalRetrived.get(0).getId());
    businessGoal.setDescription(businessGoalRetrived.get(0).getDescription());
  }
  List<Goal> subGoals=this.goalDataAccess.getSubGoalByProject(project);
  for (  Goal goal : subGoals) {
    GwtSubGoal gwtSubGoal=new GwtSubGoal();
    gwtSubGoal.setId(goal.getId());
    gwtSubGoal.setDescription(goal.getDescription());
    gwtSubGoal.setPriority(goal.getPriority());
    businessGoal.getSubGoals().add(gwtSubGoal);
    Set<Asset> listAssets=goal.getAssets();
    for (    Asset a : listAssets) {
      GwtAsset gwtAsset=new GwtAsset();
      gwtAsset.setId(a.getId());
      gwtAsset.setDescription(a.getDescription());
      gwtSubGoal.getAssets().add(gwtAsset);
    }
  }
  List<Asset> assets=this.assetDataAccess.getAssetByProject(project);
  for (  Asset asset : assets) {
    GwtAsset gwtAsset=new GwtAsset();
    gwtAsset.setId(asset.getId());
    gwtAsset.setDescription(asset.getDescription());
    businessGoal.getAssets().add(gwtAsset);
  }
  return businessGoal;
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist,Roles.COTS_Vendor}) public GwtBusinessGoal getBusinessGoalInformation(int projectId){
  Project project=new Project();
  project.setId(projectId);
  List<Goal> businessGoalRetrived=this.goalDataAccess.getBusinessGoalByProject(project);
  GwtBusinessGoal businessGoal=new GwtBusinessGoal();
  if (businessGoalRetrived.size() == 1) {
    businessGoal.setId(businessGoalRetrived.get(0).getId());
    businessGoal.setDescription(businessGoalRetrived.get(0).getDescription());
  }
  List<Goal> subGoals=this.goalDataAccess.getSubGoalByProject(project);
  for (  Goal goal : subGoals) {
    GwtSubGoal gwtSubGoal=new GwtSubGoal();
    gwtSubGoal.setId(goal.getId());
    gwtSubGoal.setDescription(goal.getDescription());
    gwtSubGoal.setPriority(goal.getPriority());
    businessGoal.getSubGoals().add(gwtSubGoal);
    Set<Asset> listAssets=goal.getAssets();
    for (    Asset a : listAssets) {
      GwtAsset gwtAsset=new GwtAsset();
      gwtAsset.setId(a.getId());
      gwtAsset.setDescription(a.getDescription());
      gwtSubGoal.getAssets().add(gwtAsset);
    }
  }
  List<Asset> assets=this.assetDataAccess.getAssetByProject(project);
  for (  Asset asset : assets) {
    GwtAsset gwtAsset=new GwtAsset();
    gwtAsset.setId(asset.getId());
    gwtAsset.setDescription(asset.getDescription());
    businessGoal.getAssets().add(gwtAsset);
  }
  return businessGoal;
}
Program: 24730
Project: 24730
Buggy source:
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist}) public void updateAsset(int projectId,GwtAsset gwtAsset) throws SquareException {
  Project project=new Project();
  project.setId(projectId);
  Asset asset=assetDataAccess.fetch(gwtAsset.getId());
  asset.setProject(project);
  asset.setId(gwtAsset.getId());
  asset.setDescription(gwtAsset.getDescription());
  assetDataAccess.update(asset);
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Administrator,Roles.Contractor,Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist,Roles.COTS_Vendor}) public void updateAsset(int projectId,GwtAsset gwtAsset) throws SquareException {
  Project project=new Project();
  project.setId(projectId);
  Asset asset=assetDataAccess.fetch(gwtAsset.getId());
  asset.setProject(project);
  asset.setId(gwtAsset.getId());
  asset.setDescription(gwtAsset.getDescription());
  assetDataAccess.update(asset);
}
Program: 24732
Project: 24732
Buggy source:
@AllowedRoles(roles={Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist,Roles.Administrator}) public void updateRequirement(GwtRequirement gwtRequirement) throws SquareException {
  Requirement r=requirementDao.fetch(gwtRequirement.getId());
  r.getRisks().clear();
  r.getArtifacts().clear();
  r.getGoals().clear();
  r.update(gwtRequirement);
  if (gwtRequirement.getRisks().isEmpty()) {
    SquareException se=new SquareException("String_Node_Str");
    se.setType(ExceptionType.missingLink);
    throw se;
  }
  if (gwtRequirement.getArtifacts().isEmpty()) {
    SquareException se=new SquareException("String_Node_Str");
    se.setType(ExceptionType.missingLink);
    throw se;
  }
  requirementDao.update(r);
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Acquisition_Organization_Engineer,Roles.Security_Specialist,Roles.Administrator}) public void updateRequirement(GwtRequirement gwtRequirement) throws SquareException {
  Requirement r=requirementDao.fetch(gwtRequirement.getId());
  r.getRisks().clear();
  r.getGoals().clear();
  r.update(gwtRequirement);
  if (gwtRequirement.getRisks().isEmpty()) {
    SquareException se=new SquareException("String_Node_Str");
    se.setType(ExceptionType.missingLink);
    throw se;
  }
  requirementDao.update(r);
}
Program: 24733
Project: 24733
Buggy source:
@AllowedRoles(roles={Roles.Contractor,Roles.Security_Specialist,Roles.Administrator}) public int addRequirementToProject(Integer projectId,GwtRequirement gwtRequirement) throws SquareException {
  Project p=projectDao.fetch(projectId);
  Requirement requirement=new Requirement(gwtRequirement);
  requirement.setProject(p);
  if (gwtRequirement.getArtifacts().isEmpty()) {
    SquareException se=new SquareException("String_Node_Str");
    se.setType(ExceptionType.missingLink);
    throw se;
  }
  requirementDao.create(requirement);
  p.getRequirements().add(requirement);
  return requirement.getId();
}

Fixed version (ground truth):
@AllowedRoles(roles={Roles.Security_Specialist,Roles.Administrator}) public int addRequirementToProject(Integer projectId,GwtRequirement gwtRequirement) throws SquareException {
  Project p=projectDao.fetch(projectId);
  Requirement requirement=new Requirement(gwtRequirement);
  requirement.setProject(p);
  requirementDao.create(requirement);
  p.getRequirements().add(requirement);
  return requirement.getId();
}
Program: 24734
Project: 24734
Buggy source:
public void loadSubGoalsFromProject(){
  IdentifyGoalsAssetsServiceAsync service=GWT.create(IdentifyGoalsAssetsService.class);
  ServiceDefTarget endpoint=(ServiceDefTarget)service;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  service.loadBusinessGoalInfo(getCurrentState().getProjectID(),new AsyncCallback<GwtBusinessGoal>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
    public void onSuccess(    GwtBusinessGoal result){
      businessGoalInfo=result;
      listOfProjectSubGoals=businessGoalInfo.getSubGoals();
    }
  }
);
}

Fixed version (ground truth):
public void loadSubGoalsFromProject(){
  IdentifyGoalsAssetsServiceAsync service=GWT.create(IdentifyGoalsAssetsService.class);
  ServiceDefTarget endpoint=(ServiceDefTarget)service;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  service.loadBusinessGoalInfo(getCurrentState().getProjectID(),new AsyncCallback<GwtBusinessGoal>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
    public void onSuccess(    GwtBusinessGoal result){
      businessGoalInfo=result;
      listOfProjectSubGoals=businessGoalInfo.getSubGoals();
      loadArtifactsFromProject();
    }
  }
);
}
Program: 24735
Project: 24735
Buggy source:
public void updateRequirement(int requirementId,GwtRequirement gwtRequirement){
  gwtRequirement.setId(requirementId);
  System.out.println("String_Node_Str");
  this.requirementService.updateRequirement(gwtRequirement,new AsyncCallback<Void>(){
    public void onFailure(    Throwable caught){
      System.out.println("String_Node_Str" + caught);
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,messages.errorUpdatingRequirements());
    }
    public void onSuccess(    Void result){
      currentCommand=CommandTypes.read;
      loadProjectRequirements();
    }
  }
);
}

Fixed version (ground truth):
public void updateRequirement(int requirementId,GwtRequirement gwtRequirement){
  gwtRequirement.setId(requirementId);
  System.out.println("String_Node_Str" + gwtRequirement.getStatus());
  this.requirementService.updateRequirement(gwtRequirement,new AsyncCallback<Void>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,messages.errorUpdatingRequirements());
    }
    public void onSuccess(    Void result){
      currentCommand=CommandTypes.read;
      loadProjectRequirements();
    }
  }
);
}
Program: 24738
Project: 24738
Buggy source:
private void loadTradeoffReasons(){
  finalProductSelectionService.getTradeoffReasons(currentProject.getId(),new AsyncCallback<List<GwtTradeoffReason>>(){
    @Override public void onSuccess(    List<GwtTradeoffReason> result){
      tradeoffReasons=result;
      loadRequirementRatings();
    }
    @Override public void onFailure(    Throwable caught){
      Window.alert(messages.ratingsRetrievalError());
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
  }
);
}

Fixed version (ground truth):
private void loadTradeoffReasons(){
  finalProductSelectionService.getTradeoffReasons(currentProject.getId(),new AsyncCallback<List<GwtTradeoffReason>>(){
    @Override public void onSuccess(    List<GwtTradeoffReason> result){
      tradeoffReasons=result;
      final List<GwtSoftwarePackage> temp=softwarePackages.subList(1,softwarePackages.size());
      for (int i=0; i < temp.size(); ++i)       System.out.println(temp.get(i).getName());
      System.out.println("String_Node_Str");
      for (int i=0; i < softwarePackages.size(); ++i)       System.out.println(softwarePackages.get(i).getName());
      System.out.println("String_Node_Str");
      for (int i=0; i < tradeoffReasons.size(); ++i)       System.out.println(tradeoffReasons.get(i).getTradeoffreason());
      System.out.println("String_Node_Str");
      Collections.sort(temp,new Comparator<GwtSoftwarePackage>(){
        public int compare(        GwtSoftwarePackage o1,        GwtSoftwarePackage o2){
          int a, b;
          System.out.println(temp.get(temp.indexOf(o1)).getName() + "String_Node_Str");
          System.out.println(tradeoffReasons.get(temp.indexOf(o1)).getPriority());
          a=tradeoffReasons.get(temp.indexOf(o1)).getPriority();
          b=tradeoffReasons.get(temp.indexOf(o2)).getPriority();
          if (a > b)           return -1;
 else           if (a < b)           return 1;
 else           return 0;
        }
      }
);
      softwarePackages=softwarePackages.subList(0,1);
      softwarePackages.addAll(temp);
      loadRequirementRatings();
    }
    @Override public void onFailure(    Throwable caught){
      Window.alert(messages.ratingsRetrievalError());
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
  }
);
}
Program: 24739
Project: 24739
Buggy source:
public void drawRateMatrix(){
  matrix.clear();
  matrix.setWidth("String_Node_Str");
  matrix.setStyleName("String_Node_Str");
  matrix.setCellSpacing(0);
  drawRateMatrixHeaderTechniques();
  drawRateMatrixEvaluationCriteriaColum();
  drawRateMatrixValues();
}

Fixed version (ground truth):
public void drawRateMatrix(){
  matrix.clear();
  matrix.setWidth("String_Node_Str");
  matrix.setStyleName("String_Node_Str");
  matrix.setCellSpacing(0);
  drawAttributesRequirements();
  drawSoftwarePackages();
  drawRateMatrixValues();
}
Program: 24740
Project: 24740
Buggy source:
public boolean validateRequiredFields(){
  disPanel.setOpen(false);
  errorMessage.setText(messages.labelFieldsRequired());
  for (int j=0; j < matrix.getRowCount(); j++) {
    Widget w=matrix.getWidget(j,1);
    String textValue="String_Node_Str";
    if (w instanceof TextBox) {
      TextBox field=(TextBox)w;
      textValue=field.getText().trim();
      setValidationStyle(field,textValue);
    }
 else     if (w instanceof TextArea) {
      TextArea field=(TextArea)w;
      textValue=field.getText().trim();
      setValidationStyle(field,textValue);
    }
 else     if (w instanceof ListBox) {
      ListBox field=(ListBox)w;
      textValue=field.getItemText(field.getSelectedIndex()).trim();
      setValidationStyle(field,textValue);
    }
    if (textValue.trim().length() == 0) {
      disPanel.setOpen(true);
      return false;
    }
  }
  if (listOfSubGoalsMappedToRequirement.size() == 0) {
    disPanel.setOpen(true);
    subGoalEmptyLabel.setStyleName("String_Node_Str");
    return false;
  }
  for (  GwtRequirement requirement : lisOfRequirements) {
    if (requirement.getTitle().equals(requirementTitleTextBox.getText().trim())) {
      errorMessage.setText(messages.duplicateTitleError());
      disPanel.setOpen(true);
      return false;
    }
  }
  disPanel.setOpen(false);
  return true;
}

Fixed version (ground truth):
public boolean validateRequiredFields(){
  disPanel.setOpen(false);
  errorMessage.setText(messages.labelFieldsRequired());
  for (int j=0; j < matrix.getRowCount(); j++) {
    Widget w=matrix.getWidget(j,1);
    String textValue="String_Node_Str";
    if (w instanceof TextBox) {
      TextBox field=(TextBox)w;
      textValue=field.getText().trim();
      setValidationStyle(field,textValue);
    }
 else     if (w instanceof TextArea) {
      TextArea field=(TextArea)w;
      textValue=field.getText().trim();
      setValidationStyle(field,textValue);
    }
 else     if (w instanceof ListBox) {
      ListBox field=(ListBox)w;
      textValue=field.getItemText(field.getSelectedIndex()).trim();
      setValidationStyle(field,textValue);
    }
    if (textValue.trim().length() == 0) {
      disPanel.setOpen(true);
      return false;
    }
  }
  if (listOfSubGoalsMappedToRequirement.size() == 0) {
    disPanel.setOpen(true);
    subGoalEmptyLabel.setStyleName("String_Node_Str");
    return false;
  }
  for (  GwtRequirement requirement : lisOfRequirements) {
    if (requirement.getTitle().equals(requirementTitleTextBox.getText().trim()) && (requirement.getId() != currentRequirementId)) {
      errorMessage.setText(messages.duplicateTitleError());
      disPanel.setOpen(true);
      return false;
    }
  }
  disPanel.setOpen(false);
  return true;
}
Program: 24741
Project: 24741
Buggy source:
public void loadSubGoalsFromProject(){
  IdentifyGoalsAssetsServiceAsync service=GWT.create(IdentifyGoalsAssetsService.class);
  ServiceDefTarget endpoint=(ServiceDefTarget)service;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  service.loadBusinessGoalInfo(getCurrentState().getProjectID(),new AsyncCallback<GwtBusinessGoal>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
    public void onSuccess(    GwtBusinessGoal result){
      businessGoalInfo=result;
      listOfProjectSubGoals=businessGoalInfo.getSubGoals();
    }
  }
);
}

Fixed version (ground truth):
public void loadSubGoalsFromProject(){
  IdentifyGoalsAssetsServiceAsync service=GWT.create(IdentifyGoalsAssetsService.class);
  ServiceDefTarget endpoint=(ServiceDefTarget)service;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "String_Node_Str");
  service.loadBusinessGoalInfo(getCurrentState().getProjectID(),new AsyncCallback<GwtBusinessGoal>(){
    public void onFailure(    Throwable caught){
      ExceptionHelper.SquareRootRPCExceptionHandler(caught,"String_Node_Str");
    }
    public void onSuccess(    GwtBusinessGoal result){
      businessGoalInfo=result;
      listOfProjectSubGoals=businessGoalInfo.getSubGoals();
      loadArtifactsFromProject();
      System.out.println("String_Node_Str");
    }
  }
);
}