nus-yam/ex-repair huggingface dataset:
Program: 149298
Project: 149298
Buggy source:
private static void addMenuEntries(HashMap<String,Menu> index,WSRoleSpecificationInstance instance) throws XtentisWebappException {
  org.apache.log4j.Logger.getLogger(Menu.class).debug("String_Node_Str" + instance.getInstanceName());
  try {
    RoleMenuParameters params=RoleMenuParameters.unmarshalMenuParameters(instance.getParameter()[0]);
    WSMenu wsMenu=Util.getPort().getMenu(new WSGetMenu(new WSMenuPK(instance.getInstanceName())));
    WSMenuEntry[] wsEntries=wsMenu.getMenuEntries();
    if (wsEntries != null) {
      for (int i=0; i < wsEntries.length; i++) {
        index.put(wsEntries[i].getId(),wsMenu2Menu(index,wsEntries[i],null,params.getParentID(),params.getPosition()));
      }
    }
  }
 catch (  Exception e) {
    String err;
    try {
      err="String_Node_Str" + instance.getInstanceName() + "String_Node_Str"+ Util.getAjaxSubject().getUsername()+ "String_Node_Str"+ (e.getClass().getName().contains("String_Node_Str") ? "String_Node_Str" : e.getClass().getName() + "String_Node_Str")+ e.getLocalizedMessage();
    }
 catch (    Exception ex) {
      err="String_Node_Str" + "String_Node_Str" + ex.getClass().getName() + "String_Node_Str"+ ex.getLocalizedMessage();
    }
  }
}

Fixed version (ground truth):
private static void addMenuEntries(HashMap<String,Menu> index,WSRoleSpecificationInstance instance) throws XtentisWebappException {
  org.apache.log4j.Logger.getLogger(Menu.class).debug("String_Node_Str" + instance.getInstanceName());
  try {
    WSBoolean menuExist=Util.getPort().existsMenu(new WSExistsMenu(new WSMenuPK(instance.getInstanceName())));
    if (menuExist.is_true()) {
      RoleMenuParameters params=RoleMenuParameters.unmarshalMenuParameters(instance.getParameter()[0]);
      WSMenu wsMenu=Util.getPort().getMenu(new WSGetMenu(new WSMenuPK(instance.getInstanceName())));
      WSMenuEntry[] wsEntries=wsMenu.getMenuEntries();
      if (wsEntries != null) {
        for (int i=0; i < wsEntries.length; i++) {
          index.put(wsEntries[i].getId(),wsMenu2Menu(index,wsEntries[i],null,params.getParentID(),params.getPosition()));
        }
      }
    }
  }
 catch (  XtentisWebappException e) {
    throw (e);
  }
catch (  Exception e) {
    String err;
    try {
      err="String_Node_Str" + instance.getInstanceName() + "String_Node_Str"+ Util.getAjaxSubject().getUsername()+ "String_Node_Str"+ (e.getClass().getName().contains("String_Node_Str") ? "String_Node_Str" : e.getClass().getName() + "String_Node_Str")+ e.getLocalizedMessage();
    }
 catch (    Exception ex) {
      err="String_Node_Str" + "String_Node_Str" + ex.getClass().getName() + "String_Node_Str"+ ex.getLocalizedMessage();
    }
    throw new XtentisWebappException(err);
  }
}
Program: 149299
Project: 149299
Buggy source:
private static void addMenuEntries(HashMap<String,Menu> index,WSRoleSpecificationInstance instance) throws XtentisWebappException {
  org.apache.log4j.Logger.getLogger(Menu.class).debug("String_Node_Str" + instance.getInstanceName());
  try {
    RoleMenuParameters params=RoleMenuParameters.unmarshalMenuParameters(instance.getParameter()[0]);
    WSMenu wsMenu=Util.getPort().getMenu(new WSGetMenu(new WSMenuPK(instance.getInstanceName())));
    WSMenuEntry[] wsEntries=wsMenu.getMenuEntries();
    if (wsEntries != null) {
      for (int i=0; i < wsEntries.length; i++) {
        index.put(wsEntries[i].getId(),wsMenu2Menu(index,wsEntries[i],null,params.getParentID(),params.getPosition()));
      }
    }
  }
 catch (  Exception e) {
    String err;
    try {
      err="String_Node_Str" + instance.getInstanceName() + "String_Node_Str"+ Util.getAjaxSubject().getUsername()+ "String_Node_Str"+ (e.getClass().getName().contains("String_Node_Str") ? "String_Node_Str" : e.getClass().getName() + "String_Node_Str")+ e.getLocalizedMessage();
    }
 catch (    Exception ex) {
      err="String_Node_Str" + "String_Node_Str" + ex.getClass().getName() + "String_Node_Str"+ ex.getLocalizedMessage();
    }
  }
}

Fixed version (ground truth):
private static void addMenuEntries(HashMap<String,Menu> index,WSRoleSpecificationInstance instance) throws XtentisWebappException {
  org.apache.log4j.Logger.getLogger(Menu.class).debug("String_Node_Str" + instance.getInstanceName());
  try {
    WSBoolean menuExist=Util.getPort().existsMenu(new WSExistsMenu(new WSMenuPK(instance.getInstanceName())));
    if (menuExist.is_true()) {
      RoleMenuParameters params=RoleMenuParameters.unmarshalMenuParameters(instance.getParameter()[0]);
      WSMenu wsMenu=Util.getPort().getMenu(new WSGetMenu(new WSMenuPK(instance.getInstanceName())));
      WSMenuEntry[] wsEntries=wsMenu.getMenuEntries();
      if (wsEntries != null) {
        for (int i=0; i < wsEntries.length; i++) {
          index.put(wsEntries[i].getId(),wsMenu2Menu(index,wsEntries[i],null,params.getParentID(),params.getPosition()));
        }
      }
    }
  }
 catch (  XtentisWebappException e) {
    throw (e);
  }
catch (  Exception e) {
    String err;
    try {
      err="String_Node_Str" + instance.getInstanceName() + "String_Node_Str"+ Util.getAjaxSubject().getUsername()+ "String_Node_Str"+ (e.getClass().getName().contains("String_Node_Str") ? "String_Node_Str" : e.getClass().getName() + "String_Node_Str")+ e.getLocalizedMessage();
    }
 catch (    Exception ex) {
      err="String_Node_Str" + "String_Node_Str" + ex.getClass().getName() + "String_Node_Str"+ ex.getLocalizedMessage();
    }
    throw new XtentisWebappException(err);
  }
}
Program: 149300
Project: 149300
Buggy source:
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSRolePK putRole(WSPutRole wsRole) throws RemoteException {
  try {
    RoleCtrlLocal ctrl=RoleCtrlUtil.getLocalHome().create();
    RolePOJOPK pk=ctrl.putRole(WS2POJO(wsRole.getWsRole()));
    return new WSRolePK(pk.getUniqueId());
  }
 catch (  Exception e) {
    String err="String_Node_Str" + e.getMessage();
    org.apache.log4j.Logger.getLogger(this.getClass()).debug(err,e);
    throw new RemoteException(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSRolePK putRole(WSPutRole wsRole) throws RemoteException {
  try {
    RoleCtrlLocal ctrl=RoleCtrlUtil.getLocalHome().create();
    RolePOJOPK pk=ctrl.putRole(WS2POJO(wsRole.getWsRole()));
    LocalUser.resetLocalUsers();
    return new WSRolePK(pk.getUniqueId());
  }
 catch (  Exception e) {
    String err="String_Node_Str" + e.getMessage();
    org.apache.log4j.Logger.getLogger(this.getClass()).debug(err,e);
    throw new RemoteException(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 149301
Project: 149301
Buggy source:
/** 
 * Refresh the content of the menu parameters
 * @param instanceName
 */
private void refreshMenuParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName + "String_Node_Str");
  LinkedHashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParametersRefreshing=true;
  if ((parameters != null) && (parameters.size() > 0)) {
    try {
      menuParameters=RoleMenuParameters.unmarshalMenuParameters(parameters);
    }
 catch (    Exception e) {
    }
    menuParentIDCombo.select(menuParameters.getPosition());
    menuPositionCombo.select(menuParameters.getPosition());
  }
 else {
    menuParentIDCombo.select(0);
    menuPositionCombo.select(0);
    commitMenuParameters();
  }
  menuParametersRefreshing=false;
}

Fixed version (ground truth):
/** 
 * Refresh the content of the menu parameters
 * @param instanceName
 */
private void refreshMenuParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName + "String_Node_Str");
  LinkedHashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParametersRefreshing=true;
  if ((parameters != null) && (parameters.size() > 0)) {
    try {
      menuParameters=RoleMenuParameters.unmarshalMenuParameters(parameters);
    }
 catch (    Exception e) {
    }
    menuParentIDCombo.select(menuParameters.getPosition());
    menuPositionCombo.select(menuParameters.getPosition() - 1);
  }
 else {
    menuParentIDCombo.select(0);
    menuPositionCombo.select(0);
    commitMenuParameters();
  }
  menuParametersRefreshing=false;
}
Program: 149303
Project: 149303
Buggy source:
/** 
 * Commit the content of the menu parameters
 * @param instanceName
 */
protected void commitMenuParameters(){
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParameters.setParentID(menuParentIDCombo.getText());
  menuParameters.setPosition(menuPositionCombo.getSelectionIndex());
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(menuParameters.marshalMenuParameters());
  markDirty();
}

Fixed version (ground truth):
/** 
 * Commit the content of the menu parameters
 * @param instanceName
 */
protected void commitMenuParameters(){
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParameters.setParentID(menuParentIDCombo.getText());
  menuParameters.setPosition(menuPositionCombo.getSelectionIndex() + 1);
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(menuParameters.marshalMenuParameters());
  markDirty();
}
Program: 149305
Project: 149305
Buggy source:
public void keyReleased(KeyEvent e){
  if ((e.stateMask == 0) && (e.character == SWT.CR)) {
    DataClusterBrowserMainPage.this.resultsViewer.setInput(getResults());
  }
}

Fixed version (ground truth):
public void keyReleased(KeyEvent e){
  if (e.keyCode == SWT.DEL) {
    new DeleteItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer).run();
  }
}
Program: 149308
Project: 149308
Buggy source:
/** 
 * Refresh the content of the menu parameters
 * @param instanceName
 */
private void refreshMenuParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName + "String_Node_Str");
  LinkedHashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParametersRefreshing=true;
  if ((parameters != null) && (parameters.size() > 0)) {
    try {
      menuParameters=RoleMenuParameters.unmarshalMenuParameters(parameters);
    }
 catch (    Exception e) {
    }
    menuParentIDCombo.select(menuParameters.getPosition());
    menuPositionCombo.select(menuParameters.getPosition());
  }
 else {
    menuParentIDCombo.select(0);
    menuPositionCombo.select(0);
    commitMenuParameters();
  }
  menuParametersRefreshing=false;
}

Fixed version (ground truth):
/** 
 * Refresh the content of the menu parameters
 * @param instanceName
 */
private void refreshMenuParameters(String instanceName){
  paramsLabel.setText("String_Node_Str" + instanceName + "String_Node_Str");
  LinkedHashSet<String> parameters=role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).getParameters();
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParametersRefreshing=true;
  if ((parameters != null) && (parameters.size() > 0)) {
    try {
      menuParameters=RoleMenuParameters.unmarshalMenuParameters(parameters);
    }
 catch (    Exception e) {
    }
    menuParentIDCombo.select(menuParameters.getPosition());
    menuPositionCombo.select(menuParameters.getPosition() - 1);
  }
 else {
    menuParentIDCombo.select(0);
    menuPositionCombo.select(0);
    commitMenuParameters();
  }
  menuParametersRefreshing=false;
}
Program: 149310
Project: 149310
Buggy source:
/** 
 * Commit the content of the menu parameters
 * @param instanceName
 */
protected void commitMenuParameters(){
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParameters.setParentID(menuParentIDCombo.getText());
  menuParameters.setPosition(menuPositionCombo.getSelectionIndex());
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(menuParameters.marshalMenuParameters());
  markDirty();
}

Fixed version (ground truth):
/** 
 * Commit the content of the menu parameters
 * @param instanceName
 */
protected void commitMenuParameters(){
  RoleMenuParameters menuParameters=new RoleMenuParameters();
  menuParameters.setParentID(menuParentIDCombo.getText());
  menuParameters.setPosition(menuPositionCombo.getSelectionIndex() + 1);
  String instanceName=((InstanceLine)((IStructuredSelection)instancesViewer.getSelection()).getFirstElement()).getInstanceName();
  role.getSpecifications().get(objectTypesCombo.getText()).getInstances().get(instanceName).setParameters(menuParameters.marshalMenuParameters());
  markDirty();
}
Program: 149312
Project: 149312
Buggy source:
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSRolePK putRole(WSPutRole wsRole) throws RemoteException {
  try {
    RoleCtrlLocal ctrl=RoleCtrlUtil.getLocalHome().create();
    RolePOJOPK pk=ctrl.putRole(WS2POJO(wsRole.getWsRole()));
    return new WSRolePK(pk.getUniqueId());
  }
 catch (  Exception e) {
    String err="String_Node_Str" + e.getMessage();
    org.apache.log4j.Logger.getLogger(this.getClass()).debug(err,e);
    throw new RemoteException(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * @ejb.interface-method view-type = "service-endpoint"
 * @ejb.permission role-name = "authenticated" view-type = "service-endpoint"
 */
public WSRolePK putRole(WSPutRole wsRole) throws RemoteException {
  try {
    RoleCtrlLocal ctrl=RoleCtrlUtil.getLocalHome().create();
    RolePOJOPK pk=ctrl.putRole(WS2POJO(wsRole.getWsRole()));
    LocalUser.resetLocalUsers();
    return new WSRolePK(pk.getUniqueId());
  }
 catch (  Exception e) {
    String err="String_Node_Str" + e.getMessage();
    org.apache.log4j.Logger.getLogger(this.getClass()).debug(err,e);
    throw new RemoteException(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 149313
Project: 149313
Buggy source:
public void keyReleased(KeyEvent e){
  if ((e.stateMask == 0) && (e.character == SWT.CR)) {
    DataClusterBrowserMainPage.this.resultsViewer.setInput(getResults());
  }
}

Fixed version (ground truth):
public void keyReleased(KeyEvent e){
  if (e.keyCode == SWT.DEL) {
    new DeleteItemsAction(DataClusterBrowserMainPage.this.getSite().getShell(),DataClusterBrowserMainPage.this.resultsViewer).run();
  }
}
Program: 149319
Project: 149319
Buggy source:
public DescAnnotationComposite(String labelName,String buttonName,FormToolkit toolkit,Composite parent,AMainPageV2 dialog){
  descAntionHolder=toolkit.createComposite(parent);
  descAntionHolder.setLayoutData(new GridData(SWT.FILL,SWT.RIGHT,true,true,2,1));
  descAntionHolder.setLayout(new GridLayout(3,false));
  Label descriptionLabel=toolkit.createLabel(descAntionHolder,labelName,SWT.NULL);
  descriptionLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  annotationButton=toolkit.createButton(descAntionHolder,buttonName,SWT.PUSH);
  annotationButton.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  annotationButton.addSelectionListener(this);
  descriptionText=toolkit.createText(descAntionHolder,"String_Node_Str",SWT.BORDER | SWT.MULTI);
  descriptionText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  descriptionText.setEnabled(false);
  accommodation=dialog;
}

Fixed version (ground truth):
public DescAnnotationComposite(String labelName,String buttonName,FormToolkit toolkit,Composite parent,AMainPageV2 dialog){
  descAntionHolder=toolkit.createComposite(parent);
  descAntionHolder.setLayoutData(new GridData(SWT.FILL,SWT.RIGHT,true,true,2,1));
  descAntionHolder.setLayout(new GridLayout(3,false));
  Label descriptionLabel=toolkit.createLabel(descAntionHolder,labelName,SWT.NULL);
  descriptionLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  annotationButton=toolkit.createButton(descAntionHolder,buttonName,SWT.PUSH);
  annotationButton.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  annotationButton.addSelectionListener(this);
  descriptionText=toolkit.createText(descAntionHolder,"String_Node_Str",SWT.BORDER | SWT.MULTI);
  descriptionText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  descriptionText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (descriptionValue != null && !descriptionValue.equals(descriptionText.getText())) {
        accommodation.markDirty();
      }
      descriptionValue=descriptionText.getText();
      fillDataStore(descriptionText.getText());
    }
  }
);
  accommodation=dialog;
  dlgTitle="String_Node_Str";
}
Program: 149320
Project: 149320
Buggy source:
public void setText(String text){
  dataStore.clear();
  descriptionText.setText(text);
  boolean find=false;
  Matcher match=DESC_PATTERN.matcher(text);
  while (match.find()) {
    find=true;
    String country=match.group(1);
    String desc=match.group(2);
    dataStore.put(country.toLowerCase(),desc.trim());
  }
  if (!find && !text.equals("String_Node_Str")) {
    dataStore.put("String_Node_Str",text);
  }
}

Fixed version (ground truth):
public void setText(String text){
  descriptionText.setText(text);
  descriptionValue=text;
  fillDataStore(text);
}
Program: 149324
Project: 149324
Buggy source:
public DescAnnotationComposite(String labelName,String buttonName,FormToolkit toolkit,Composite parent,AMainPageV2 dialog){
  descAntionHolder=toolkit.createComposite(parent);
  descAntionHolder.setLayoutData(new GridData(SWT.FILL,SWT.RIGHT,true,true,2,1));
  descAntionHolder.setLayout(new GridLayout(3,false));
  Label descriptionLabel=toolkit.createLabel(descAntionHolder,labelName,SWT.NULL);
  descriptionLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  annotationButton=toolkit.createButton(descAntionHolder,buttonName,SWT.PUSH);
  annotationButton.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  annotationButton.addSelectionListener(this);
  descriptionText=toolkit.createText(descAntionHolder,"String_Node_Str",SWT.BORDER | SWT.MULTI);
  descriptionText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  descriptionText.setEnabled(false);
  accommodation=dialog;
}

Fixed version (ground truth):
public DescAnnotationComposite(String labelName,String buttonName,FormToolkit toolkit,Composite parent,AMainPageV2 dialog){
  descAntionHolder=toolkit.createComposite(parent);
  descAntionHolder.setLayoutData(new GridData(SWT.FILL,SWT.RIGHT,true,true,2,1));
  descAntionHolder.setLayout(new GridLayout(3,false));
  Label descriptionLabel=toolkit.createLabel(descAntionHolder,labelName,SWT.NULL);
  descriptionLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  annotationButton=toolkit.createButton(descAntionHolder,buttonName,SWT.PUSH);
  annotationButton.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  annotationButton.addSelectionListener(this);
  descriptionText=toolkit.createText(descAntionHolder,"String_Node_Str",SWT.BORDER | SWT.MULTI);
  descriptionText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  descriptionText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (descriptionValue != null && !descriptionValue.equals(descriptionText.getText())) {
        accommodation.markDirty();
      }
      descriptionValue=descriptionText.getText();
      fillDataStore(descriptionText.getText());
    }
  }
);
  accommodation=dialog;
  dlgTitle="String_Node_Str";
}
Program: 149325
Project: 149325
Buggy source:
public void setText(String text){
  dataStore.clear();
  descriptionText.setText(text);
  boolean find=false;
  Matcher match=DESC_PATTERN.matcher(text);
  while (match.find()) {
    find=true;
    String country=match.group(1);
    String desc=match.group(2);
    dataStore.put(country.toLowerCase(),desc.trim());
  }
  if (!find && !text.equals("String_Node_Str")) {
    dataStore.put("String_Node_Str",text);
  }
}

Fixed version (ground truth):
public void setText(String text){
  descriptionText.setText(text);
  descriptionValue=text;
  fillDataStore(text);
}
Program: 149326
Project: 149326
Buggy source:
public ListRange getUsers(String regex,String language) throws Exception {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + regex + "String_Node_Str"+ language);
  try {
    WSWhereItem wi=new WSWhereItem();
    if ((regex == null) || ("String_Node_Str".equals(regex)) || "String_Node_Str".equals(regex)) {
      wi=null;
    }
 else {
      WSWhereCondition wc=new WSWhereCondition("String_Node_Str",WSWhereOperator.CONTAINS,regex,WSStringPredicate.NONE,true);
      wi.setWhereCondition(wc);
    }
    String[] results=Util.getPort().getItems(new WSGetItems(new WSDataClusterPK(dataclusterPK),"String_Node_Str",wi,0,0,Integer.MAX_VALUE)).getStrings();
    if ((results == null) || (results.length == 0))     return null;
    ArrayList<User> names=new ArrayList<User>();
    for (int i=0; i < results.length; i++) {
      User user=User.parse(results[i]);
      names.add(user);
    }
    ListRange listRange=new ListRange();
    listRange.setData(names.toArray(new User[names.size()]));
    listRange.setTotalSize(names.size());
    return listRange;
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public ListRange getUsers(String regex,String language) throws Exception {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + regex + "String_Node_Str"+ language);
  try {
    WSWhereItem wi=new WSWhereItem();
    if ((regex == null) || ("String_Node_Str".equals(regex)) || "String_Node_Str".equals(regex)) {
      wi=null;
    }
 else {
      WSWhereCondition wc=new WSWhereCondition("String_Node_Str",WSWhereOperator.CONTAINS,regex,WSStringPredicate.NONE,true);
      wi.setWhereCondition(wc);
    }
    String[] results=Util.getPort().getItems(new WSGetItems(new WSDataClusterPK(dataclusterPK),"String_Node_Str",wi,0,0,Integer.MAX_VALUE)).getStrings();
    ArrayList<User> names=new ArrayList<User>();
    for (int i=0; i < results.length; i++) {
      User user=User.parse(results[i]);
      names.add(user);
    }
    ListRange listRange=new ListRange();
    listRange.setData(names.toArray(new User[names.size()]));
    listRange.setTotalSize(names.size());
    return listRange;
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 149327
Project: 149327
Buggy source:
public ListRange getUsers(String regex,String language) throws Exception {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + regex + "String_Node_Str"+ language);
  try {
    WSWhereItem wi=new WSWhereItem();
    if ((regex == null) || ("String_Node_Str".equals(regex)) || "String_Node_Str".equals(regex)) {
      wi=null;
    }
 else {
      WSWhereCondition wc=new WSWhereCondition("String_Node_Str",WSWhereOperator.CONTAINS,regex,WSStringPredicate.NONE,true);
      wi.setWhereCondition(wc);
    }
    String[] results=Util.getPort().getItems(new WSGetItems(new WSDataClusterPK(dataclusterPK),"String_Node_Str",wi,0,0,Integer.MAX_VALUE)).getStrings();
    if ((results == null) || (results.length == 0))     return null;
    ArrayList<User> names=new ArrayList<User>();
    for (int i=0; i < results.length; i++) {
      User user=User.parse(results[i]);
      names.add(user);
    }
    ListRange listRange=new ListRange();
    listRange.setData(names.toArray(new User[names.size()]));
    listRange.setTotalSize(names.size());
    return listRange;
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public ListRange getUsers(String regex,String language) throws Exception {
  org.apache.log4j.Logger.getLogger(this.getClass()).debug("String_Node_Str" + regex + "String_Node_Str"+ language);
  try {
    WSWhereItem wi=new WSWhereItem();
    if ((regex == null) || ("String_Node_Str".equals(regex)) || "String_Node_Str".equals(regex)) {
      wi=null;
    }
 else {
      WSWhereCondition wc=new WSWhereCondition("String_Node_Str",WSWhereOperator.CONTAINS,regex,WSStringPredicate.NONE,true);
      wi.setWhereCondition(wc);
    }
    String[] results=Util.getPort().getItems(new WSGetItems(new WSDataClusterPK(dataclusterPK),"String_Node_Str",wi,0,0,Integer.MAX_VALUE)).getStrings();
    ArrayList<User> names=new ArrayList<User>();
    for (int i=0; i < results.length; i++) {
      User user=User.parse(results[i]);
      names.add(user);
    }
    ListRange listRange=new ListRange();
    listRange.setData(names.toArray(new User[names.size()]));
    listRange.setTotalSize(names.size());
    return listRange;
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new Exception(e.getClass().getName() + "String_Node_Str" + e.getLocalizedMessage());
  }
}
Program: 149329
Project: 149329
Buggy source:
public void addLabel(String label){
  this.labels.add(label);
  this.label=label;
}

Fixed version (ground truth):
public void addLabel(String label){
  if (this.label == null)   this.label=label;
  this.labels.add(label);
}
Program: 149330
Project: 149330
Buggy source:
@Override protected void export() throws Exception {
  StringBuilder output=new StringBuilder();
  output.append(GlobalUtil.toString(Main.class.getResourceAsStream(Constancts.EXPORT_LICENSE_FILE)));
  output.append(System.lineSeparator()).append(System.lineSeparator());
  buildOutput(txaPattern.getText(),output);
  File outputFile=new File(solution.getWorkingFolder(),solution.generateOutputFileName() + "String_Node_Str");
  FileOutputStream fos=new FileOutputStream(outputFile);
  fos.write(output.toString().getBytes(Charset.defaultCharset()));
  fos.close();
  callback.onProcessSuccess(outputFile);
}

Fixed version (ground truth):
@Override protected void export() throws Exception {
  StringBuilder output=new StringBuilder();
  output.append(GlobalUtil.toString(Main.class.getResourceAsStream(Constancts.EXPORT_LICENSE_FILE)));
  output.append(System.lineSeparator()).append(System.lineSeparator());
  buildOutput(txaPattern.getText(),output);
  File outputFile=new File(solution.getWorkingFolder(),solution.generateOutputFileName() + "String_Node_Str");
  FileOutputStream fos=new FileOutputStream(outputFile);
  fos.write(output.toString().getBytes(Constancts.DEFAULT_CHARSET));
  fos.close();
  callback.onProcessSuccess(outputFile);
}
Program: 149331
Project: 149331
Buggy source:
protected void export() throws Exception {
  String content=GlobalUtil.toString(Main.class.getResourceAsStream(Constancts.XML_EXPORT_PATTERN_FILE));
  StringBuilder output=new StringBuilder();
  buildOutput(txaPattern.getText(),output);
  output.deleteCharAt(output.length() - 1).deleteCharAt(output.length() - 1);
  content=content.replace(Constancts.XML_EXPORT_CONTENT_REPLACEMENT,output.toString());
  File outputFile=new File(solution.getWorkingFolder(),solution.generateOutputFileName() + "String_Node_Str");
  FileOutputStream fos=new FileOutputStream(outputFile);
  fos.write(content.getBytes(Charset.defaultCharset()));
  fos.close();
  callback.onProcessSuccess(outputFile);
}

Fixed version (ground truth):
protected void export() throws Exception {
  String content=GlobalUtil.toString(Main.class.getResourceAsStream(Constancts.XML_EXPORT_PATTERN_FILE));
  StringBuilder output=new StringBuilder();
  buildOutput(txaPattern.getText(),output);
  output.deleteCharAt(output.length() - 1).deleteCharAt(output.length() - 1);
  content=content.replace(Constancts.XML_EXPORT_CONTENT_REPLACEMENT,output.toString());
  File outputFile=new File(solution.getWorkingFolder(),solution.generateOutputFileName() + "String_Node_Str");
  FileOutputStream fos=new FileOutputStream(outputFile);
  fos.write(content.getBytes(Constancts.DEFAULT_CHARSET));
  fos.close();
  callback.onProcessSuccess(outputFile);
}
Program: 149332
Project: 149332
Buggy source:
public static String toString(InputStream in) throws IOException {
  return new String(toBytes(in));
}

Fixed version (ground truth):
public static String toString(InputStream in) throws IOException {
  return new String(toBytes(in),Constancts.DEFAULT_CHARSET);
}
Program: 149333
Project: 149333
Buggy source:
private void registerSubmittedRequestHandler(){
  try {
    Method method=GrantingOfLoanSagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(RequestWasSubmitted.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void registerSubmittedRequestHandler(){
  try {
    Method method=SagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(RequestWasSubmitted.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}
Program: 149334
Project: 149334
Buggy source:
private void registerExtendLoanRequestHandler(){
  try {
    Method method=GrantingOfLoanSagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(ExtendTheLoanRequest.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void registerExtendLoanRequestHandler(){
  try {
    Method method=SagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(ExtendTheLoanRequest.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}
Program: 149335
Project: 149335
Buggy source:
private void registerForRiskAnalyzedEvent(){
  try {
    Method method=GrantingOfLoanSagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(RiskAnalyzedResponse.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void registerForRiskAnalyzedEvent(){
  try {
    Method method=SagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(RiskAnalyzedResponse.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}
Program: 149336
Project: 149336
Buggy source:
private void registerForCheckedIpEvent(){
  try {
    Method method=GrantingOfLoanSagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(IpCheckedResponse.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
private void registerForCheckedIpEvent(){
  try {
    Method method=SagaManager.class.getMethod("String_Node_Str",new Class[]{Object.class});
    SpringEventHandler eventHandler=new SpringEventHandler(IpCheckedResponse.class,"String_Node_Str",method,applicationContext);
    eventPublisher.registerEventHandler(eventHandler);
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
}
Program: 149337
Project: 149337
Buggy source:
D createNewSagaData();

Fixed version (ground truth):
public D createNewSagaData(AggregateId id);
Program: 149338
Project: 149338
Buggy source:
@Autowired public void setSagaManager(GrantingOfLoanSagaManager sagaManager){
  this.sagaManager=sagaManager;
}

Fixed version (ground truth):
@Autowired public void setSagaManager(SagaManager sagaManager){
  this.sagaManager=sagaManager;
}
Program: 149339
Project: 149339
Buggy source:
@PersistenceContext(type=PersistenceContextType.EXTENDED) public void setEntityManager(EntityManager entityManager){
  this.entityManager=entityManager;
}

Fixed version (ground truth):
@PersistenceContext public void setEntityManager(EntityManager entityManager){
  this.entityManager=entityManager;
}
Program: 149341
Project: 149341
Buggy source:
@Autowired public void setSagaManager(SagaManager sagaManager){
  this.sagaManager=sagaManager;
}

Fixed version (ground truth):
@Autowired public void setSagaManager(SagaManager<GrantingOfLoanSaga,GrantingOfLoanData> sagaManager){
  this.sagaManager=sagaManager;
}
Program: 149342
Project: 149342
Buggy source:
public void connect() throws IOException {
  if (token != null && username == null) {
    doGet("String_Node_Str",true);
    return;
  }
  HttpPost post=new HttpPost(MessageFormat.format("String_Node_Str",endpointUrl));
  JSONObject json=new JSONObject();
  json.put("String_Node_Str",getUsername());
  json.put("String_Node_Str",getPassword());
  post.setEntity(new StringEntity(json.toString(),ContentType.APPLICATION_JSON));
  HttpResponse response=httpClient.execute(post);
  int status=response.getStatusLine().getStatusCode();
  if (status != HttpStatus.SC_OK) {
    throw new ClientException(MessageFormat.format("String_Node_Str",status,this.endpointUrl,getErrorMessage(getResponseBodyAsString(response))),status);
  }
  token=getResponseBodyAsString(response);
}

Fixed version (ground truth):
public void connect() throws IOException {
  if (token != null && username == null) {
    try {
      doGet("String_Node_Str",true);
    }
 catch (    IOException excep) {
      LOGGER.severe("String_Node_Str" + endpointUrl);
      throw excep;
    }
    return;
  }
  HttpPost post=new HttpPost(MessageFormat.format("String_Node_Str",endpointUrl));
  JSONObject json=new JSONObject();
  json.put("String_Node_Str",getUsername());
  json.put("String_Node_Str",getPassword());
  post.setEntity(new StringEntity(json.toString(),ContentType.APPLICATION_JSON));
  HttpResponse response=httpClient.execute(post);
  int status=response.getStatusLine().getStatusCode();
  if (status != HttpStatus.SC_OK) {
    throw new ClientException(MessageFormat.format("String_Node_Str",status,this.endpointUrl,getErrorMessage(getResponseBodyAsString(response))),status);
  }
  token=getResponseBodyAsString(response);
}
Program: 149344
Project: 149344
Buggy source:
private void deployInstance(InstanceCreationRequest request) throws IOException {
  ElasticBoxCloud cloud=request.slave.getCloud();
  Client ebClient=cloud.getClient();
  AbstractSlaveConfiguration slaveConfig=request.slave.getSlaveConfiguration();
  String workspace=slaveConfig.getWorkspace();
  JSONArray variables=getJenkinsVariables(request.slave);
  LOGGER.info("String_Node_Str" + ebClient.getBoxPageUrl(request.slave.getBoxVersion()));
  List<String> tags=new ArrayList<>();
  tags.add(request.slave.getNodeName());
  String userTags=slaveConfig.getTags();
  if (StringUtils.isNotEmpty(userTags)) {
    String[] userTagList=StringUtils.split(userTags,"String_Node_Str");
    tags.addAll(Arrays.asList(userTagList));
  }
  IProgressMonitor monitor=ebClient.deploy(request.slave.getBoxVersion(),request.slave.getProfileId(),null,workspace,tags,variables,null,null,request.slave.getPolicyVariables(),Constants.AUTOMATIC_UPDATES_OFF);
  request.slave.setInstanceUrl(monitor.getResourceUrl());
  request.slave.setInstanceStatusMessage(MessageFormat.format("String_Node_Str",request.slave.getInstancePageUrl()));
  request.monitor.setMonitor(monitor);
  request.monitor.setLaunched();
  if (LOGGER.isLoggable(Level.FINE)) {
    LOGGER.fine("String_Node_Str" + request.slave);
  }
  submittedQueue.add(request);
}

Fixed version (ground truth):
private void deployInstance(InstanceCreationRequest request) throws IOException {
  final ElasticBoxSlave slave=request.slave;
  final ElasticBoxCloud cloud=slave.getCloud();
  final Client ebClient=cloud.getClient();
  LOGGER.info("String_Node_Str" + ebClient.getBoxPageUrl(slave.getBoxVersion()));
  final AbstractSlaveConfiguration slaveConfig=slave.getSlaveConfiguration();
  final JSONArray variables=getJenkinsVariables(slave);
  final String workspace=slaveConfig.getWorkspace();
  List<String> tags=new ArrayList<>();
  tags.add(slave.getNodeName());
  String userTags=slaveConfig.getTags();
  if (StringUtils.isNotEmpty(userTags)) {
    String[] userTagList=StringUtils.split(userTags,"String_Node_Str");
    tags.addAll(Arrays.asList(userTagList));
  }
  IProgressMonitor monitor=ebClient.deploy(slave.getBoxVersion(),slave.getProfileId(),null,workspace,tags,variables,null,null,slave.getPolicyVariables(),Constants.AUTOMATIC_UPDATES_OFF);
  slave.setInstanceUrl(monitor.getResourceUrl());
  slave.setInstanceStatusMessage(MessageFormat.format("String_Node_Str",slave.getInstancePageUrl()));
  request.monitor.setMonitor(monitor);
  request.monitor.setLaunched();
  if (LOGGER.isLoggable(Level.FINE)) {
    LOGGER.fine("String_Node_Str" + slave);
  }
  submittedQueue.add(request);
}
Program: 149345
Project: 149345
Buggy source:
private int waitForInstanceToBeReady(String instanceId) throws TaskException, RepositoryException {
  final InstanceRepositoryAPIImpl service=new InstanceRepositoryAPIImpl(client);
  final Instance instance=service.getInstance(instanceId);
  final Instance.State state=instance.getState();
  WaitForInstanceToBeReady updateInstanceWhenIsReady=null;
  if (state == Instance.State.PROCESSING) {
    taskLogger.info("String_Node_Str",instanceId);
    updateInstanceWhenIsReady=new WaitForInstanceToBeReady(DELAY,INITIAL_DELAY,TIMEOUT);
    updateInstanceWhenIsReady.execute();
  }
  taskLogger.info("String_Node_Str",instanceId);
  return updateInstanceWhenIsReady.getTotalRoundtrips();
}

Fixed version (ground truth):
private int waitForInstanceToBeReady(String instanceId) throws TaskException, RepositoryException {
  final InstanceRepositoryAPIImpl service=new InstanceRepositoryAPIImpl(client);
  final Instance instance=service.getInstance(instanceId);
  final Instance.State state=instance.getState();
  WaitForInstanceToBeReady updateInstanceWhenIsReady=null;
  if (state == Instance.State.PROCESSING) {
    taskLogger.info("String_Node_Str",instanceId);
    updateInstanceWhenIsReady=new WaitForInstanceToBeReady(DELAY,INITIAL_DELAY,TIMEOUT);
    updateInstanceWhenIsReady.execute();
    return updateInstanceWhenIsReady.getTotalRoundtrips();
  }
  taskLogger.info("String_Node_Str",instanceId);
  return 0;
}
Program: 149346
Project: 149346
Buggy source:
public ListBoxModel doFillProfileItems(@QueryParameter String cloud,@QueryParameter String workspace,@QueryParameter String box){
  LOGGER.log(Level.FINE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box);
  ListBoxModel profiles=new ListBoxModel();
  try {
    if (StringUtils.isEmpty(cloud) || StringUtils.isEmpty(workspace) || StringUtils.isEmpty(box))     return profiles;
    final DeployBoxOrderResult<List<PolicyBox>> result=new DeployBoxOrderServiceImpl(cloud).deploymentOptions(workspace,box);
    final List<PolicyBox> policyBoxList=result.getResult();
    for (    PolicyBox policyBox : policyBoxList) {
      profiles.add(policyBox.getName(),policyBox.getId());
    }
  }
 catch (  ServiceException e) {
    LOGGER.log(Level.SEVERE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box+ "String_Node_Str");
    e.printStackTrace();
  }
  return profiles;
}

Fixed version (ground truth):
public ListBoxModel doFillProfileItems(@QueryParameter String cloud,@QueryParameter String workspace,@QueryParameter String box){
  LOGGER.log(Level.FINE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box);
  ListBoxModel profiles=new ListBoxModel();
  try {
    if (StringUtils.isEmpty(cloud) || StringUtils.isEmpty(workspace) || StringUtils.isEmpty(box))     return profiles;
    final DeployBoxOrderResult<List<PolicyBox>> result=new DeployBoxOrderServiceImpl().deploymentOptions(cloud,workspace,box);
    final List<PolicyBox> policyBoxList=result.getResult();
    for (    PolicyBox policyBox : policyBoxList) {
      profiles.add(policyBox.getName(),policyBox.getId());
    }
  }
 catch (  ServiceException e) {
    LOGGER.log(Level.SEVERE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box+ "String_Node_Str");
    e.printStackTrace();
  }
  return profiles;
}
Program: 149347
Project: 149347
Buggy source:
public ListBoxModel doFillProfileItems(@RelativePath("String_Node_Str") @QueryParameter String endpointUrl,@RelativePath("String_Node_Str") @QueryParameter String token,@QueryParameter String workspace,@QueryParameter String box){
  LOGGER.log(Level.FINE,"String_Node_Str" + endpointUrl + "String_Node_Str"+ workspace+ "String_Node_Str"+ box);
  ListBoxModel profiles=new ListBoxModel();
  try {
    final DeployBoxOrderResult<List<PolicyBox>> result=new DeployBoxOrderServiceImpl(endpointUrl).deploymentOptions(workspace,box);
    final List<PolicyBox> policyBoxList=result.getResult();
    for (    PolicyBox policyBox : policyBoxList) {
      profiles.add(policyBox.getName(),policyBox.getId());
    }
  }
 catch (  ServiceException e) {
    LOGGER.log(Level.SEVERE,"String_Node_Str" + endpointUrl + "String_Node_Str"+ workspace+ "String_Node_Str"+ box+ "String_Node_Str",e);
  }
  return profiles;
}

Fixed version (ground truth):
public ListBoxModel doFillProfileItems(@RelativePath("String_Node_Str") @QueryParameter String endpointUrl,@RelativePath("String_Node_Str") @QueryParameter String token,@QueryParameter String workspace,@QueryParameter String box){
  LOGGER.log(Level.FINE,"String_Node_Str" + endpointUrl + "String_Node_Str"+ workspace+ "String_Node_Str"+ box);
  ListBoxModel profiles=new ListBoxModel();
  try {
    if (StringUtils.isEmpty(endpointUrl) || StringUtils.isEmpty(workspace) || StringUtils.isEmpty(box))     return profiles;
    final DeployBoxOrderResult<List<PolicyBox>> result=new DeployBoxOrderServiceImpl().deploymentOptions(endpointUrl,token,workspace,box);
    final List<PolicyBox> policyBoxList=result.getResult();
    for (    PolicyBox policyBox : policyBoxList) {
      profiles.add(policyBox.getName(),policyBox.getId());
    }
  }
 catch (  ServiceException e) {
    LOGGER.log(Level.SEVERE,"String_Node_Str" + endpointUrl + "String_Node_Str"+ workspace+ "String_Node_Str"+ box+ "String_Node_Str",e);
  }
  return profiles;
}
Program: 149348
Project: 149348
Buggy source:
public ListBoxModel doFillProfileItems(@QueryParameter String cloud,@QueryParameter String workspace,@QueryParameter String box){
  logger.log(Level.FINE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box);
  ListBoxModel profiles=new ListBoxModel();
  try {
    if (StringUtils.isEmpty(cloud) || StringUtils.isEmpty(workspace) || StringUtils.isEmpty(box))     return profiles;
    final DeployBoxOrderResult<List<PolicyBox>> result=new DeployBoxOrderServiceImpl(cloud).deploymentOptions(workspace,box);
    final List<PolicyBox> policyBoxList=result.getResult();
    for (    PolicyBox policyBox : policyBoxList) {
      profiles.add(policyBox.getName(),policyBox.getId());
    }
  }
 catch (  ServiceException e) {
    logger.log(Level.SEVERE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box+ "String_Node_Str");
    e.printStackTrace();
  }
  return profiles;
}

Fixed version (ground truth):
public ListBoxModel doFillProfileItems(@QueryParameter String cloud,@QueryParameter String workspace,@QueryParameter String box){
  logger.log(Level.FINE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box);
  ListBoxModel profiles=new ListBoxModel();
  try {
    if (StringUtils.isEmpty(cloud) || StringUtils.isEmpty(workspace) || StringUtils.isEmpty(box))     return profiles;
    final DeployBoxOrderResult<List<PolicyBox>> result=new DeployBoxOrderServiceImpl().deploymentOptions(cloud,workspace,box);
    final List<PolicyBox> policyBoxList=result.getResult();
    for (    PolicyBox policyBox : policyBoxList) {
      profiles.add(policyBox.getName(),policyBox.getId());
    }
  }
 catch (  ServiceException e) {
    logger.log(Level.SEVERE,"String_Node_Str" + cloud + "String_Node_Str"+ workspace+ "String_Node_Str"+ box+ "String_Node_Str");
    e.printStackTrace();
  }
  return profiles;
}
Program: 149349
Project: 149349
Buggy source:
public DeployBoxOrderResult<List<PolicyBox>> deploymentOptions(String workspace,String boxToDeploy) throws RepositoryException, ServiceException ;

Fixed version (ground truth):
public DeployBoxOrderResult<List<PolicyBox>> deploymentOptions(String endpoint,String token,String workspace,String boxToDeploy) throws ServiceException ;
Program: 149350
Project: 149350
Buggy source:
public DeployBoxOrderResult<List<PolicyBox>> deploymentOptions(String workspace,String boxToDeploy) throws ServiceException {
  try {
    final AbstractBox box=boxRepository.getBox(boxToDeploy);
    final List<PolicyBox> policies=new DeploymentDirector(boxRepository).getPolicies(workspace,box);
    return new DeployBoxOrderResult<List<PolicyBox>>(policies);
  }
 catch (  RepositoryException e) {
    e.printStackTrace();
    throw new ServiceException("String_Node_Str" + workspace + "String_Node_Str"+ boxToDeploy);
  }
}

Fixed version (ground truth):
private DeployBoxOrderResult<List<PolicyBox>> deploymentOptions(BoxRepository boxRepository,String workspace,String boxToDeploy) throws ServiceException {
  try {
    final AbstractBox box=boxRepository.getBox(boxToDeploy);
    final List<PolicyBox> policies=new DeploymentDirector(boxRepository).getPolicies(workspace,box);
    return new DeployBoxOrderResult<List<PolicyBox>>(policies);
  }
 catch (  RepositoryException e) {
    e.printStackTrace();
    throw new ServiceException("String_Node_Str" + workspace + "String_Node_Str"+ boxToDeploy);
  }
}