nus-yam/ex-repair huggingface dataset:
Program: 24742
Project: 24742
Buggy source:
public void loadRequirementForm(){
  this.matrix.getCellFormatter().setWidth(1,0,"String_Node_Str");
  this.matrix.getCellFormatter().setWidth(1,1,"String_Node_Str");
  this.matrix.setWidth("String_Node_Str");
  this.matrix.setCellPadding(10);
  this.matrix.setStyleName("String_Node_Str");
  initializeRequirementFormWidgets();
  if (!CommandTypes.insert.equals(currentCommand)) {
    setRequirementFormValues(currentRequirement);
  }
  this.matrix.getCellFormatter().setAlignment(1,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  if (currentCommand == CommandTypes.read) {
    loadReadOnlyRequirementForm();
  }
 else {
    loadEditableRequirementForm();
  }
  this.matrix.setWidget(1,0,requirementDescriptionLabel);
  this.matrix.setWidget(1,1,getField(requirementDescriptionTextBox));
  this.matrix.setWidget(2,1,createHTMLSubGoalList());
  this.matrix.getCellFormatter().setAlignment(1,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(1,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(2,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(2,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(3,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(3,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
}

Fixed version (ground truth):
public void loadRequirementForm(){
  this.matrix.getCellFormatter().setWidth(1,0,"String_Node_Str");
  this.matrix.getCellFormatter().setWidth(1,1,"String_Node_Str");
  this.matrix.setWidth("String_Node_Str");
  this.matrix.setCellPadding(10);
  this.matrix.setStyleName("String_Node_Str");
  initializeRequirementFormWidgets();
  if (!CommandTypes.insert.equals(currentCommand)) {
    setRequirementFormValues(currentRequirement);
  }
  this.matrix.getCellFormatter().setAlignment(1,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  if (currentCommand == CommandTypes.read) {
    loadReadOnlyRequirementForm();
  }
 else {
    loadEditableRequirementForm();
  }
  this.matrix.setWidget(1,0,requirementDescriptionLabel);
  this.matrix.setWidget(1,1,getField(requirementDescriptionTextBox));
  this.matrix.setWidget(2,1,createHTMLSubGoalList());
  this.matrix.getCellFormatter().setAlignment(1,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(1,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(2,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  this.matrix.getCellFormatter().setAlignment(2,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
}
Program: 24744
Project: 24744
Buggy source:
public ReviewAndFinalizeRequirementsDetailPane(final State stateInfo){
  super(stateInfo);
  currentProject=new GwtProject();
  currentProject.setId(this.getCurrentState().getProjectID());
  currentRequirementId=currentState.getCurrentRisk();
  currentCommand=getCurrentCommand();
  this.showLoadingStatusBar();
  loadSubGoalsFromProject();
}

Fixed version (ground truth):
public ReviewAndFinalizeRequirementsDetailPane(final State stateInfo){
  super(stateInfo);
  currentProject=new GwtProject();
  currentProject.setId(this.getCurrentState().getProjectID());
  currentRequirementId=currentState.getCurrentRisk();
  currentCommand=getCurrentCommand();
  this.showLoadingStatusBar();
  System.out.println("String_Node_Str");
  loadSubGoalsFromProject();
}
Program: 24746
Project: 24746
Buggy source:
public Widget navigateTo(String pageId,State currentStateInformation){
  String step=HistoryManager.ViewId.reviewAndFinalizeRequirements;
  if (currentStateInformation.getSkipTeachSetp() && pageId.equals(PageId.home)) {
    pageId=PageId.start;
  }
  if (pageId.equals(PageId.home)) {
    return new TeachStepPane(step,generateNavigationId(PageId.start));
  }
 else   if (pageId.equals(PageId.start)) {
    return new ReviewAndFinalizeRequirementsPane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.requirementDetail)) {
    return new ReviewAndFinalizeRequirementsDetailPane(currentStateInformation);
  }
  return null;
}

Fixed version (ground truth):
public Widget navigateTo(String pageId,State currentStateInformation){
  String step=HistoryManager.ViewId.reviewAndFinalizeRequirements;
  if (currentStateInformation.getSkipTeachSetp() && pageId.equals(PageId.home)) {
    pageId=PageId.start;
  }
  if (pageId.equals(PageId.home)) {
    return new TeachStepPane(step,generateNavigationId(PageId.start));
  }
 else   if (pageId.equals(PageId.start)) {
    return new ReviewAndFinalizeRequirementsPane(currentStateInformation);
  }
 else   if (pageId.equals(PageId.requirementDetail)) {
    System.out.println("String_Node_Str");
    return new ReviewAndFinalizeRequirementsDetailPane(currentStateInformation);
  }
  return null;
}
Program: 24747
Project: 24747
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.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){
  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);
  }
}
Program: 24748
Project: 24748
Buggy source:
@Override public String getBreadCrumb(){
  final BreadCrumbMessages messages=(BreadCrumbMessages)GWT.create(BreadCrumbMessages.class);
  return messages.reviewAndFinalizeRequirements();
}

Fixed version (ground truth):
@Override public String getBreadCrumb(){
  System.out.println("String_Node_Str");
  final BreadCrumbMessages messages=(BreadCrumbMessages)GWT.create(BreadCrumbMessages.class);
  return messages.reviewAndFinalizeRequirements();
}
Program: 24749
Project: 24749
Buggy source:
public void update(GwtRequirement gwtRequirement){
  this.title=gwtRequirement.getTitle();
  this.description=gwtRequirement.getDescription();
  this.privacy=gwtRequirement.isPrivacy();
  this.security=gwtRequirement.isSecurity();
  this.priority=gwtRequirement.getPriority();
  this.status=gwtRequirement.getStatus();
  for (  GwtRisk r : gwtRequirement.getRisks()) {
    this.getRisks().add(new Risk(r));
  }
  for (  GwtArtifact a : gwtRequirement.getArtifacts()) {
    this.getArtifacts().add(new Artifact(a));
  }
  for (  GwtCategory a : gwtRequirement.getCategories()) {
    this.getCategories().add(new Category(a));
  }
  for (  GwtSubGoal a : gwtRequirement.getSubGoals()) {
    this.getGoals().add(new Goal(a));
  }
  if (gwtRequirement.getProjectID() > 0) {
    this.project=new Project(gwtRequirement.getProjectID());
  }
}

Fixed version (ground truth):
public void update(GwtRequirement gwtRequirement){
  this.title=gwtRequirement.getTitle();
  this.description=gwtRequirement.getDescription();
  this.privacy=gwtRequirement.isPrivacy();
  this.security=gwtRequirement.isSecurity();
  this.priority=gwtRequirement.getPriority();
  gwtRequirement.setStatus(this.status);
  this.status=gwtRequirement.getStatus();
  for (  GwtRisk r : gwtRequirement.getRisks()) {
    this.getRisks().add(new Risk(r));
  }
  for (  GwtArtifact a : gwtRequirement.getArtifacts()) {
    this.getArtifacts().add(new Artifact(a));
  }
  for (  GwtCategory a : gwtRequirement.getCategories()) {
    this.getCategories().add(new Category(a));
  }
  for (  GwtSubGoal a : gwtRequirement.getSubGoals()) {
    this.getGoals().add(new Goal(a));
  }
  if (gwtRequirement.getProjectID() > 0) {
    this.project=new Project(gwtRequirement.getProjectID());
  }
}
Program: 24750
Project: 24750
Buggy source:
private void addDoneButton(){
  FlexTable buttonPanel=new FlexTable();
  Button done=new Button(messages.done());
  done.addStyleName("String_Node_Str");
  done.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      History.newItem(ChooseStepCase3Pilot.generateNavigationId(ChooseStepCase3Pilot.PageId.home));
    }
  }
);
  buttonPanel.setWidget(0,0,new Label("String_Node_Str"));
  buttonPanel.setWidget(0,1,new Label("String_Node_Str"));
  buttonPanel.setWidget(1,1,new Label("String_Node_Str"));
  buttonPanel.setWidget(2,1,new Label("String_Node_Str"));
  buttonPanel.setWidget(2,2,done);
  buttonPanel.setWidth("String_Node_Str");
  done.setWidth("String_Node_Str");
  buttonPanel.getCellFormatter().setHorizontalAlignment(2,2,HasHorizontalAlignment.ALIGN_RIGHT);
  this.vPaneCotsData.add(buttonPanel);
}

Fixed version (ground truth):
private void addDoneButton(){
  FlexTable buttonPanel=new FlexTable();
  Button done=new Button(messages.done());
  done.addStyleName("String_Node_Str");
  done.addClickHandler(new ClickHandler(){
    public void onClick(    ClickEvent event){
      History.newItem(ChooseStepCase3Pilot.generateNavigationId(ChooseStepCase3Pilot.PageId.home));
    }
  }
);
  buttonPanel.setWidget(0,0,new Label("String_Node_Str"));
  buttonPanel.setWidget(1,0,done);
  buttonPanel.setWidth("String_Node_Str");
  buttonPanel.getCellFormatter().setHorizontalAlignment(1,0,HasHorizontalAlignment.ALIGN_RIGHT);
  this.getContent().add(buttonPanel);
}
Program: 24752
Project: 24752
Buggy source:
private void setPackagePriority(final int packageID,final int priority){
  this.performTradeoffService.setPriority(currentProject.getId(),packageID,priority,new AsyncCallback<Void>(){
    public void onFailure(    Throwable caught){
      if (caught instanceof SquareException) {
        SquareException se=(SquareException)caught;
switch (se.getType()) {
case authorization:
          Window.alert(messages.rateAuthorization());
        break;
default :
      Window.alert(messages.error());
    break;
}
}
 else {
Window.alert(messages.error());
}
}
public void onSuccess(Void result){
}
}
);
}

Fixed version (ground truth):
private void setPackagePriority(final int packageID,final int priority){
  System.out.println("String_Node_Str" + currentProject.getId() + "String_Node_Str"+ packageID+ "String_Node_Str"+ priority);
  this.performTradeoffService.setPriority(currentProject.getId(),packageID,priority,new AsyncCallback<Void>(){
    public void onFailure(    Throwable caught){
      if (caught instanceof SquareException) {
        SquareException se=(SquareException)caught;
switch (se.getType()) {
case authorization:
          Window.alert(messages.rateAuthorization());
        break;
default :
      Window.alert(messages.error());
    break;
}
}
 else {
Window.alert(messages.error());
}
}
public void onSuccess(Void result){
}
}
);
}
Program: 24754
Project: 24754
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 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()) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24755
Project: 24755
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.getUserProjectRole() == ProjectRole.Lead_Requirements_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 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.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.None) {
    currentState.setMode(GwtModesType.NoAccess);
  }
 else {
    currentState.setMode(GwtModesType.ReadOnly);
  }
}
Program: 24756
Project: 24756
Buggy source:
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator()) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.NoAccess);
  }
}

Fixed version (ground truth):
public void determineAccessRights(String page,State currentState){
  if (currentState.isSiteAdministrator()) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else   if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {
    currentState.setMode(GwtModesType.ReadWrite);
  }
 else {
    currentState.setMode(GwtModesType.NoAccess);
  }
}
Program: 24758
Project: 24758
Buggy source:
public void onClick(ClickEvent event){
  artifactDialog=new ArtifactDialogBox(riksPane,listOfProjectArtifacts,listOfArtifactsMappedToRequirement,messages.associateArtifacts());
  artifactDialog.setModal(true);
  artifactDialog.center();
  artifactDialog.show();
  currentDialog="String_Node_Str";
}

Fixed version (ground truth):
public void onClick(ClickEvent event){
  subGoalDialog=new SubGoalDialogBox(riksPane,listOfProjectSubGoals,listOfSubGoalsMappedToRequirement);
  subGoalDialog.setModal(true);
  subGoalDialog.center();
  currentDialog="String_Node_Str";
  subGoalDialog.show();
}
Program: 24759
Project: 24759
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();
    }
  }
);
}
Program: 24760
Project: 24760
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();
      }
      loadProjectRisks();
    }
  }
);
}
Program: 24761
Project: 24761
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: 24762
Project: 24762
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;
  }
 else   if (listOfArtifactsMappedToRequirement.size() == 0) {
    disPanel.setOpen(true);
    artifactsEmptyLabel.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())) {
      errorMessage.setText(messages.duplicateTitleError());
      disPanel.setOpen(true);
      return false;
    }
  }
  disPanel.setOpen(false);
  return true;
}
Program: 24765
Project: 24765
Buggy source:
public void execute(){
  if (currentDialog.equalsIgnoreCase("String_Node_Str")) {
    listSubGoalChanged(listOfSubGoalsMappedToRequirement,subGoalDialog.getNewSelectedSubGoals());
    listOfSubGoalsMappedToRequirement=subGoalDialog.getNewSelectedSubGoals();
    listOfRiksMapppedToRequirement.clear();
    listOfProjectFilteredRisks=filterRiskBaseOnGoals(listOfSubGoalsMappedToRequirement,listOfProjectRisks);
    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")) {
    listSubGoalChanged(listOfSubGoalsMappedToRequirement,subGoalDialog.getNewSelectedSubGoals());
    listOfSubGoalsMappedToRequirement=subGoalDialog.getNewSelectedSubGoals();
    listOfRiksMapppedToRequirement.clear();
    listOfProjectFilteredRisks=filterRiskBaseOnGoals(listOfSubGoalsMappedToRequirement,listOfProjectRisks);
    this.matrix.setWidget(2,1,createHTMLSubGoalList());
  }
}
Program: 24766
Project: 24766
Buggy source:
public GwtRequirement getFormRiskValues(){
  GwtRequirement gwtRequirement=new GwtRequirement();
  gwtRequirement.setTitle(this.requirementTitleTextBox.getText());
  gwtRequirement.setDescription(this.requirementDescriptionTextBox.getText());
  gwtRequirement.setSubGoals(this.listOfSubGoalsMappedToRequirement);
  gwtRequirement.setRisks(this.listOfRiksMapppedToRequirement);
  gwtRequirement.setArtifacts(this.listOfArtifactsMappedToRequirement);
  return gwtRequirement;
}

Fixed version (ground truth):
public GwtRequirement getFormRiskValues(){
  GwtRequirement gwtRequirement=new GwtRequirement();
  gwtRequirement.setTitle(this.requirementTitleTextBox.getText());
  gwtRequirement.setDescription(this.requirementDescriptionTextBox.getText());
  gwtRequirement.setSubGoals(this.listOfSubGoalsMappedToRequirement);
  gwtRequirement.setRisks(this.listOfRiksMapppedToRequirement);
  return gwtRequirement;
}
Program: 24767
Project: 24767
Buggy source:
public void loadEditableRequirementForm(){
  this.matrix.setWidget(0,0,requirementTitleLabel);
  this.matrix.setWidget(0,1,getField(requirementTitleTextBox));
  this.matrix.setWidget(2,0,getEditSubGoalsHyperLink(this));
  this.matrix.setWidget(3,0,getEditArtifactsHyperLink(this));
  subGoalLabel.setStyleName("String_Node_Str");
  matrix.getCellFormatter().setAlignment(0,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  matrix.getCellFormatter().setAlignment(0,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
  if (CommandTypes.insert.equals(currentCommand)) {
    this.save.setText(messages.create());
  }
 else   if (CommandTypes.update.equals(currentCommand)) {
    this.save.setText(messages.save());
  }
  FlexTable flexTable=new FlexTable();
  flexTable.setWidget(0,0,save);
  flexTable.setWidget(0,1,cancel);
  flexTable.setCellSpacing(10);
  this.getContent().add(flexTable);
}

Fixed version (ground truth):
public void loadEditableRequirementForm(){
  this.matrix.setWidget(0,0,requirementTitleLabel);
  this.matrix.setWidget(0,1,getField(requirementTitleTextBox));
  this.matrix.setWidget(2,0,getEditSubGoalsHyperLink(this));
  subGoalLabel.setStyleName("String_Node_Str");
  matrix.getCellFormatter().setAlignment(0,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  matrix.getCellFormatter().setAlignment(0,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
  if (CommandTypes.insert.equals(currentCommand)) {
    this.save.setText(messages.create());
  }
 else   if (CommandTypes.update.equals(currentCommand)) {
    this.save.setText(messages.save());
  }
  FlexTable flexTable=new FlexTable();
  flexTable.setWidget(0,0,save);
  flexTable.setWidget(0,1,cancel);
  flexTable.setCellSpacing(10);
  this.getContent().add(flexTable);
}
Program: 24768
Project: 24768
Buggy source:
public void onClick(ClickEvent event){
  artifactDialog=new ArtifactDialogBox(riksPane,listOfProjectArtifacts,listOfArtifactsMappedToRequirement,messages.associateArtifacts());
  artifactDialog.setModal(true);
  artifactDialog.center();
  artifactDialog.show();
  currentDialog="String_Node_Str";
}

Fixed version (ground truth):
public void onClick(ClickEvent event){
  riskDialogBox=new RiskDialogBox(riksPane,listOfProjectFilteredRisks,listOfRiksMapppedToRequirement);
  riskDialogBox.setModal(true);
  riskDialogBox.center();
  currentDialog="String_Node_Str";
  riskDialogBox.show();
}
Program: 24769
Project: 24769
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();
    }
  }
);
}
Program: 24770
Project: 24770
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();
      }
      loadProjectRisks();
    }
  }
);
}
Program: 24771
Project: 24771
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: 24772
Project: 24772
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;
  }
 else   if (listOfArtifactsMappedToRequirement.size() == 0) {
    disPanel.setOpen(true);
    artifactsEmptyLabel.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())) {
      errorMessage.setText(messages.duplicateTitleError());
      disPanel.setOpen(true);
      return false;
    }
  }
  disPanel.setOpen(false);
  return true;
}
Program: 24775
Project: 24775
Buggy source:
public void execute(){
  if (currentDialog.equalsIgnoreCase("String_Node_Str")) {
    listSubGoalChanged(listOfSubGoalsMappedToRequirement,subGoalDialog.getNewSelectedSubGoals());
    listOfSubGoalsMappedToRequirement=subGoalDialog.getNewSelectedSubGoals();
    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")) {
    listSubGoalChanged(listOfSubGoalsMappedToRequirement,subGoalDialog.getNewSelectedSubGoals());
    listOfSubGoalsMappedToRequirement=subGoalDialog.getNewSelectedSubGoals();
    listOfRiksMapppedToRequirement.clear();
    this.matrix.setWidget(2,1,createHTMLSubGoalList());
  }
}
Program: 24776
Project: 24776
Buggy source:
public GwtRequirement getFormRiskValues(){
  GwtRequirement gwtRequirement=new GwtRequirement();
  gwtRequirement.setTitle(this.requirementTitleTextBox.getText());
  gwtRequirement.setDescription(this.requirementDescriptionTextBox.getText());
  gwtRequirement.setSubGoals(this.listOfSubGoalsMappedToRequirement);
  gwtRequirement.setRisks(this.listOfRiksMapppedToRequirement);
  gwtRequirement.setArtifacts(this.listOfArtifactsMappedToRequirement);
  return gwtRequirement;
}

Fixed version (ground truth):
public GwtRequirement getFormRiskValues(){
  GwtRequirement gwtRequirement=new GwtRequirement();
  gwtRequirement.setTitle(this.requirementTitleTextBox.getText());
  gwtRequirement.setDescription(this.requirementDescriptionTextBox.getText());
  gwtRequirement.setSubGoals(this.listOfSubGoalsMappedToRequirement);
  gwtRequirement.setRisks(this.listOfRiksMapppedToRequirement);
  return gwtRequirement;
}
Program: 24777
Project: 24777
Buggy source:
public void loadEditableRequirementForm(){
  this.matrix.setWidget(0,0,requirementTitleLabel);
  this.matrix.setWidget(0,1,getField(requirementTitleTextBox));
  this.matrix.setWidget(2,0,getEditSubGoalsHyperLink(this));
  this.matrix.setWidget(3,0,getEditArtifactsHyperLink(this));
  subGoalLabel.setStyleName("String_Node_Str");
  matrix.getCellFormatter().setAlignment(0,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  matrix.getCellFormatter().setAlignment(0,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
  if (CommandTypes.insert.equals(currentCommand)) {
    this.save.setText(messages.create());
  }
 else   if (CommandTypes.update.equals(currentCommand)) {
    this.save.setText(messages.save());
  }
  FlexTable flexTable=new FlexTable();
  flexTable.setWidget(0,0,save);
  flexTable.setWidget(0,1,cancel);
  flexTable.setCellSpacing(10);
  this.getContent().add(flexTable);
}

Fixed version (ground truth):
public void loadEditableRequirementForm(){
  this.matrix.setWidget(0,0,requirementTitleLabel);
  this.matrix.setWidget(0,1,getField(requirementTitleTextBox));
  this.matrix.setWidget(2,0,getEditSubGoalsHyperLink(this));
  subGoalLabel.setStyleName("String_Node_Str");
  matrix.getCellFormatter().setAlignment(0,0,HasHorizontalAlignment.ALIGN_RIGHT,HasVerticalAlignment.ALIGN_TOP);
  matrix.getCellFormatter().setAlignment(0,1,HasHorizontalAlignment.ALIGN_LEFT,HasVerticalAlignment.ALIGN_TOP);
  if (CommandTypes.insert.equals(currentCommand)) {
    this.save.setText(messages.create());
  }
 else   if (CommandTypes.update.equals(currentCommand)) {
    this.save.setText(messages.save());
  }
  FlexTable flexTable=new FlexTable();
  flexTable.setWidget(0,0,save);
  flexTable.setWidget(0,1,cancel);
  flexTable.setCellSpacing(10);
  this.getContent().add(flexTable);
}
Program: 24778
Project: 24778
Buggy source:
@AllowedRoles(roles={Roles.Contractor,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.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.Contractor,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);
  requirementDao.update(r);
}
Program: 24779
Project: 24779
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);
  requirement.setStatus("String_Node_Str");
  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.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);
  requirement.setStatus("String_Node_Str");
  requirementDao.create(requirement);
  p.getRequirements().add(requirement);
  return requirement.getId();
}
Program: 24780
Project: 24780
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.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);
}

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);
  requirementDao.update(r);
}
Program: 24781
Project: 24781
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) {
    System.out.println("String_Node_Str" + s.getId());
    GwtStep gs=s.createGwtStep(projectId);
    for (    StepBusinessInterface sb : beanMap.values()) {
      if (sb.getStepDescription().getDescription().equals(gs.getDescription())) {
        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()) {
      r=sb.verifyStep(project);
      if (r == null) {
        logger.info("String_Node_Str" + sb);
      }
      break;
    }
    r.setStep(gs);
    result.add(r);
  }
  return result;
}