nus-yam/ex-repair huggingface dataset:
Program: 47457
Project: 47457
Buggy source:
public void deleteUsers(){
  String selectedUsers="String_Node_Str";
  for (int i=0; i < usersListBox.getItemCount(); i++) {
    if (usersListBox.isItemSelected(i)) {
      selectedUsers=selectedUsers + usersListBox.getValue(i) + "String_Node_Str";
    }
  }
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + selectedUsers;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        checkForError(Messages.getString("String_Node_Str"),response);
        userPasswordTextBox.setText("String_Node_Str");
        availableRolesListBox.clear();
        selectedRolesListBox.clear();
        editPasswordButton.setEnabled(false);
        initializeAvailableUsers(null);
        initializeAvailableRoles(rolesListBox.getValue(rolesListBox.getSelectedIndex()));
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void deleteUsers(){
  String selectedUsers="String_Node_Str";
  for (int i=0; i < usersListBox.getItemCount(); i++) {
    if (usersListBox.isItemSelected(i)) {
      selectedUsers=selectedUsers + usersListBox.getValue(i) + "String_Node_Str";
    }
  }
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + selectedUsers;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        checkForError(Messages.getString("String_Node_Str"),response);
        userPasswordTextBox.setText("String_Node_Str");
        availableRolesListBox.clear();
        selectedRolesListBox.clear();
        editPasswordButton.setEnabled(false);
        initializeAvailableUsers(null);
        initializeRoles(rolesListBox.getValue(rolesListBox.getSelectedIndex()),"String_Node_Str",rolesListBox);
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}
Program: 47458
Project: 47458
Buggy source:
public void saveUser(final String name,final String password){
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + name+ "String_Node_Str"+ password;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        initializeAvailableUsers(name);
        initializeAvailableRoles(rolesListBox.getValue(rolesListBox.getSelectedIndex()));
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void saveUser(final String name,final String password){
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + name+ "String_Node_Str"+ password;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        initializeAvailableUsers(name);
        initializeRoles(rolesListBox.getValue(rolesListBox.getSelectedIndex()),"String_Node_Str",rolesListBox);
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}
Program: 47459
Project: 47459
Buggy source:
public void saveRole(final String name){
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + name;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        initializeAvailableRoles(name);
        initializeAvailableUsers(usersListBox.getValue(usersListBox.getSelectedIndex()));
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void saveRole(final String name){
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + name;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        initializeRoles(name,"String_Node_Str",rolesListBox);
        initializeAvailableUsers(usersListBox.getValue(usersListBox.getSelectedIndex()));
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}
Program: 47460
Project: 47460
Buggy source:
private void modifyUserRoles(final String userName,String serviceUrl){
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        checkForError(Messages.getString("String_Node_Str"),response);
        getRolesForUser(userName);
        initializeAvailableRoles(rolesListBox.getValue(rolesListBox.getSelectedIndex()));
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
private void modifyUserRoles(final String userName,String serviceUrl){
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        checkForError(Messages.getString("String_Node_Str"),response);
        getRolesForUser(userName);
        initializeRoles(rolesListBox.getValue(rolesListBox.getSelectedIndex()),"String_Node_Str",rolesListBox);
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}
Program: 47461
Project: 47461
Buggy source:
public void activate(){
  initializeAvailableRoles(null);
  initializeAvailableUsers(null);
  initializeAvailableSystemRoles(null);
}

Fixed version (ground truth):
public void activate(){
  initializeActionBaseSecurityElements();
  initializeAvailableUsers(null);
  initializeRoles(null,"String_Node_Str",rolesListBox);
  initializeRoles(null,"String_Node_Str",systemRolesListBox);
}
Program: 47462
Project: 47462
Buggy source:
public void deleteRoles(){
  String selectedRoles="String_Node_Str";
  for (int i=0; i < rolesListBox.getItemCount(); i++) {
    if (rolesListBox.isItemSelected(i)) {
      selectedRoles=selectedRoles + rolesListBox.getValue(i) + "String_Node_Str";
    }
  }
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + selectedRoles;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        checkForError(Messages.getString("String_Node_Str"),response);
        availableMembersListBox.clear();
        selectedMembersListBox.clear();
        initializeAvailableRoles(null);
        initializeAvailableUsers(usersListBox.getValue(usersListBox.getSelectedIndex()));
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void deleteRoles(){
  String selectedRoles="String_Node_Str";
  for (int i=0; i < rolesListBox.getItemCount(); i++) {
    if (rolesListBox.isItemSelected(i)) {
      selectedRoles=selectedRoles + rolesListBox.getValue(i) + "String_Node_Str";
    }
  }
  String serviceUrl=GWT.getHostPageBaseURL() + "String_Node_Str" + selectedRoles;
  RequestBuilder executableTypesRequestBuilder=new RequestBuilder(RequestBuilder.PUT,serviceUrl);
  try {
    executableTypesRequestBuilder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        displayErrorInMessageBox(Messages.getString("String_Node_Str"),exception.getLocalizedMessage());
      }
      public void onResponseReceived(      Request request,      Response response){
        checkForError(Messages.getString("String_Node_Str"),response);
        availableMembersListBox.clear();
        selectedMembersListBox.clear();
        initializeRoles(null,"String_Node_Str",rolesListBox);
        initializeAvailableUsers(usersListBox.getValue(usersListBox.getSelectedIndex()));
      }
    }
);
  }
 catch (  RequestException e) {
    displayErrorInMessageBox(Messages.getString("String_Node_Str"),e.getLocalizedMessage());
  }
}
Program: 47463
Project: 47463
Buggy source:
@Override public void setVarArgs(Map<String,Object> args){
  this.duration=(Long)args.get(IBlockoutManager.DURATION_PARAM);
}

Fixed version (ground truth):
@Override public void setVarArgs(Map<String,Object> args){
  if (args.containsKey(IBlockoutManager.DURATION_PARAM)) {
    Number num=(Number)args.get(IBlockoutManager.DURATION_PARAM);
    this.duration=num.longValue();
  }
}
Program: 47464
Project: 47464
Buggy source:
@Override public void execute() throws Exception {
  logger.warn("String_Node_Str" + new Date() + "String_Node_Str"+ this.duration+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void execute() throws Exception {
  logger.warn("String_Node_Str" + new Date() + "String_Node_Str"+ this.duration+ "String_Node_Str");
  Thread.sleep(duration);
}
Program: 47465
Project: 47465
Buggy source:
public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {
  try {
    if (getBlockoutManager().shouldFireNow() || jobExecutionContext.getJobDetail().getJobClass().equals(BlockoutAction.class.getCanonicalName())) {
      createUnderlyingJob().execute(jobExecutionContext);
    }
 else {
      getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str");
    }
  }
 catch (  SchedulerException e) {
    getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str",e);
    createUnderlyingJob().execute(jobExecutionContext);
  }
}

Fixed version (ground truth):
public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {
  try {
    if (getBlockoutManager().shouldFireNow() || jobExecutionContext.getJobDetail().getName().contains("String_Node_Str")) {
      createUnderlyingJob().execute(jobExecutionContext);
    }
 else {
      getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str");
    }
  }
 catch (  SchedulerException e) {
    getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str",e);
    createUnderlyingJob().execute(jobExecutionContext);
  }
}
Program: 47467
Project: 47467
Buggy source:
@Override public void execute(){
  Set<JsJob> selectedSet=((MultiSelectionModel<JsJob>)table.getSelectionModel()).getSelectedSet();
  for (  JsJob jsJob : selectedSet) {
    removeBlockout(jsJob);
  }
}

Fixed version (ground truth):
@Override public void execute(){
  Set<JsJob> selectedSet=((MultiSelectionModel<JsJob>)table.getSelectionModel()).getSelectedSet();
  for (  JsJob jsJob : selectedSet) {
    removeBlockout(jsJob);
    table.getSelectionModel().setSelected(jsJob,false);
  }
}
Program: 47468
Project: 47468
Buggy source:
private void createTableControls(final ClickHandler newBlockoutHandler){
  tableControls.addSpacer(10);
  tableControls.add(Toolbar.GLUE);
  ToolbarButton addButton=new ToolbarButton(new Image(MantleImages.images.add_icon()));
  addButton.setCommand(new Command(){
    @Override public void execute(){
      newBlockoutHandler.onClick(null);
    }
  }
);
  tableControls.add(addButton);
  ToolbarButton editButton=new ToolbarButton(new Image(MantleImages.images.edit16()));
  editButton.setCommand(new Command(){
    @Override public void execute(){
      Set<JsJob> jobs=((MultiSelectionModel<JsJob>)table.getSelectionModel()).getSelectedSet();
      JsJob jsJob=jobs.iterator().next();
      NewBlockoutScheduleDialog blockoutDialog=new NewBlockoutScheduleDialog(jsJob,refreshCallBack,false,true,false);
      blockoutDialog.setUpdateMode();
      blockoutDialog.center();
    }
  }
);
  tableControls.add(editButton);
  ToolbarButton removeButton=new ToolbarButton(new Image(MantleImages.images.remove16()));
  removeButton.setCommand(new Command(){
    @Override public void execute(){
      Set<JsJob> selectedSet=((MultiSelectionModel<JsJob>)table.getSelectionModel()).getSelectedSet();
      for (      JsJob jsJob : selectedSet) {
        removeBlockout(jsJob);
      }
    }
  }
);
  tableControls.add(removeButton);
  tablePanel.add(tableControls);
}

Fixed version (ground truth):
private void createTableControls(final ClickHandler newBlockoutHandler){
  tableControls.addSpacer(10);
  tableControls.add(Toolbar.GLUE);
  ToolbarButton addButton=new ToolbarButton(new Image(MantleImages.images.add_icon()));
  addButton.setCommand(new Command(){
    @Override public void execute(){
      newBlockoutHandler.onClick(null);
    }
  }
);
  tableControls.add(addButton);
  ToolbarButton editButton=new ToolbarButton(new Image(MantleImages.images.edit16()));
  editButton.setCommand(new Command(){
    @Override public void execute(){
      Set<JsJob> jobs=((MultiSelectionModel<JsJob>)table.getSelectionModel()).getSelectedSet();
      JsJob jsJob=jobs.iterator().next();
      NewBlockoutScheduleDialog blockoutDialog=new NewBlockoutScheduleDialog(jsJob,refreshCallBack,false,true,false);
      table.getSelectionModel().setSelected(jsJob,false);
      blockoutDialog.setUpdateMode();
      blockoutDialog.center();
    }
  }
);
  tableControls.add(editButton);
  ToolbarButton removeButton=new ToolbarButton(new Image(MantleImages.images.remove16()));
  removeButton.setCommand(new Command(){
    @Override public void execute(){
      Set<JsJob> selectedSet=((MultiSelectionModel<JsJob>)table.getSelectionModel()).getSelectedSet();
      for (      JsJob jsJob : selectedSet) {
        removeBlockout(jsJob);
        table.getSelectionModel().setSelected(jsJob,false);
      }
    }
  }
);
  tableControls.add(removeButton);
  tablePanel.add(tableControls);
}
Program: 47469
Project: 47469
Buggy source:
public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {
  try {
    if (getBlockoutManager().shouldFireNow()) {
      createUnderlyingJob().execute(jobExecutionContext);
    }
 else {
      getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str");
    }
  }
 catch (  SchedulerException e) {
    getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str",e);
    createUnderlyingJob().execute(jobExecutionContext);
  }
}

Fixed version (ground truth):
public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {
  try {
    if (getBlockoutManager().shouldFireNow() || jobExecutionContext.getJobDetail().getJobClass().equals(BlockoutAction.class.getCanonicalName())) {
      createUnderlyingJob().execute(jobExecutionContext);
    }
 else {
      getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str");
    }
  }
 catch (  SchedulerException e) {
    getLogger().warn("String_Node_Str" + jobExecutionContext.getJobDetail().getName() + "String_Node_Str",e);
    createUnderlyingJob().execute(jobExecutionContext);
  }
}
Program: 47470
Project: 47470
Buggy source:
@Override public <T>List<T> getAll(Class<T> interfaceClass,IPentahoSession curSession,Map<String,String> properties) throws ObjectFactoryException {
  List<IPentahoObjectReference<T>> referenceList=new ArrayList<IPentahoObjectReference<T>>();
  for (  IPentahoObjectFactory fact : factories) {
    List<IPentahoObjectReference<T>> refs=fact.getObjectReferences(interfaceClass,curSession,properties);
    if (refs != null) {
      referenceList.addAll(refs);
    }
  }
  Collections.sort(referenceList,referencePriorityComparitor);
  List<T> entryList=new ArrayList<T>();
  for (  IPentahoObjectReference<T> ref : referenceList) {
    entryList.add(ref.getObject());
  }
  return entryList;
}

Fixed version (ground truth):
@Override public <T>List<T> getAll(Class<T> interfaceClass,IPentahoSession curSession,Map<String,String> properties) throws ObjectFactoryException {
  List<IPentahoObjectReference<T>> referenceList=new ArrayList<IPentahoObjectReference<T>>();
  for (  IPentahoObjectFactory fact : factories) {
    if (fact.objectDefined(interfaceClass)) {
      List<IPentahoObjectReference<T>> refs=fact.getObjectReferences(interfaceClass,curSession,properties);
      if (refs != null) {
        referenceList.addAll(refs);
      }
    }
  }
  Collections.sort(referenceList,referencePriorityComparitor);
  List<T> entryList=new ArrayList<T>();
  for (  IPentahoObjectReference<T> ref : referenceList) {
    entryList.add(ref.getObject());
  }
  return entryList;
}
Program: 47471
Project: 47471
Buggy source:
@Override public <T>List<IPentahoObjectReference<T>> getObjectReferences(Class<T> interfaceClass,IPentahoSession curSession,Map<String,String> properties) throws ObjectFactoryException {
  Set<IPentahoObjectReference<T>> referenceSet=new TreeSet<IPentahoObjectReference<T>>();
  for (  IPentahoObjectFactory fact : factories) {
    IPentahoObjectReference<T> found=fact.getObjectReference(interfaceClass,curSession,properties);
    if (found != null) {
      referenceSet.add(found);
    }
  }
  List<IPentahoObjectReference<T>> referenceList=new ArrayList<IPentahoObjectReference<T>>();
  referenceList.addAll(referenceSet);
  Collections.sort(referenceList,referencePriorityComparitor);
  return referenceList;
}

Fixed version (ground truth):
@Override public <T>List<IPentahoObjectReference<T>> getObjectReferences(Class<T> interfaceClass,IPentahoSession curSession,Map<String,String> properties) throws ObjectFactoryException {
  Set<IPentahoObjectReference<T>> referenceSet=new TreeSet<IPentahoObjectReference<T>>();
  for (  IPentahoObjectFactory fact : factories) {
    if (fact.objectDefined(interfaceClass)) {
      IPentahoObjectReference<T> found=fact.getObjectReference(interfaceClass,curSession,properties);
      if (found != null) {
        referenceSet.add(found);
      }
    }
  }
  List<IPentahoObjectReference<T>> referenceList=new ArrayList<IPentahoObjectReference<T>>();
  referenceList.addAll(referenceSet);
  Collections.sort(referenceList,referencePriorityComparitor);
  return referenceList;
}
Program: 47472
Project: 47472
Buggy source:
@Override public <T>T get(Class<T> clazz,IPentahoSession session,Map<String,String> properties) throws ObjectFactoryException {
  IPentahoObjectReference<T> highestRef=this.getObjectReference(clazz,session,properties);
  if (highestRef == null) {
    String msg=Messages.getInstance().getString("String_Node_Str",clazz.getSimpleName());
    throw new ObjectFactoryException(msg);
  }
  return highestRef.getObject();
}

Fixed version (ground truth):
@Override public <T>T get(Class<T> clazz,IPentahoSession session,Map<String,String> properties) throws ObjectFactoryException {
  IPentahoObjectReference<T> highestRef=this.getObjectReference(clazz,session,properties);
  if (highestRef != null) {
    return highestRef.getObject();
  }
  for (  IPentahoObjectFactory fact : factories) {
    if (fact.objectDefined(clazz.getSimpleName())) {
      T object=fact.get(clazz,clazz.getSimpleName(),session);
      return object;
    }
  }
  String msg=Messages.getInstance().getString("String_Node_Str",clazz.getSimpleName());
  throw new ObjectFactoryException(msg);
}
Program: 47473
Project: 47473
Buggy source:
@Override public <T>IPentahoObjectReference<T> getObjectReference(Class<T> interfaceClass,IPentahoSession curSession,Map<String,String> properties) throws ObjectFactoryException {
  Set<IPentahoObjectReference<T>> references=new HashSet<IPentahoObjectReference<T>>();
  for (  IPentahoObjectFactory fact : factories) {
    IPentahoObjectReference<T> found=fact.getObjectReference(interfaceClass,curSession,properties);
    if (found != null) {
      references.add(found);
    }
  }
  IPentahoObjectReference<T> highestRef=null;
  int highestRefPriority=-1;
  for (  IPentahoObjectReference<T> ref : references) {
    int pri=computePriority(ref);
    if (pri > highestRefPriority) {
      highestRef=ref;
      highestRefPriority=pri;
    }
  }
  return highestRef;
}

Fixed version (ground truth):
@Override public <T>IPentahoObjectReference<T> getObjectReference(Class<T> interfaceClass,IPentahoSession curSession,Map<String,String> properties) throws ObjectFactoryException {
  Set<IPentahoObjectReference<T>> references=new HashSet<IPentahoObjectReference<T>>();
  for (  IPentahoObjectFactory fact : factories) {
    if (fact.objectDefined(interfaceClass)) {
      IPentahoObjectReference<T> found=fact.getObjectReference(interfaceClass,curSession,properties);
      if (found != null) {
        references.add(found);
      }
    }
  }
  IPentahoObjectReference<T> highestRef=null;
  int highestRefPriority=-1;
  for (  IPentahoObjectReference<T> ref : references) {
    int pri=computePriority(ref);
    if (pri > highestRefPriority) {
      highestRef=ref;
      highestRefPriority=pri;
    }
  }
  return highestRef;
}
Program: 47475
Project: 47475
Buggy source:
@Override public IBlockoutTrigger[] getBlockouts() throws SchedulerException {
  String[] blockedTriggerName=scheduler.getTriggerNames(BLOCK_GROUP);
  IBlockoutTrigger[] blockTriggers=new IBlockoutTrigger[blockedTriggerName.length];
  for (int i=0; i < blockedTriggerName.length; i++) {
    blockTriggers[i]=(IBlockoutTrigger)scheduler.getTrigger(blockedTriggerName[i],BLOCK_GROUP);
  }
  return blockTriggers;
}

Fixed version (ground truth):
@Override public IBlockoutTrigger[] getBlockouts() throws SchedulerException {
  String[] blockedTriggerName=scheduler.getTriggerNames(BLOCK_GROUP);
  IBlockoutTrigger[] blockTriggers=new IBlockoutTrigger[blockedTriggerName.length];
  for (int i=0; i < blockedTriggerName.length; i++) {
    blockTriggers[i]=getSimpleBlockoutTrigger(scheduler.getTrigger(blockedTriggerName[i],BLOCK_GROUP));
  }
  return blockTriggers;
}
Program: 47476
Project: 47476
Buggy source:
@Override public void addBlockout(IBlockoutTrigger blockout) throws SchedulerException {
  if (!(blockout instanceof Trigger)) {
    throw new SchedulerException(Messages.getInstance().getString(ERR_WRONG_BLOCKER_TYPE));
  }
  Trigger blockoutTrigger=(Trigger)blockout;
  JobDetail jd=new JobDetail(blockoutTrigger.getName(),BLOCK_GROUP,BlockoutJob.class);
  blockoutTrigger.setJobName(jd.getName());
  blockoutTrigger.setJobGroup(jd.getGroup());
  scheduler.scheduleJob(jd,blockoutTrigger);
}

Fixed version (ground truth):
@Override public void addBlockout(IBlockoutTrigger blockout) throws SchedulerException {
  if (!(blockout instanceof Trigger)) {
    throw new SchedulerException(Messages.getInstance().getString(ERR_WRONG_BLOCKER_TYPE));
  }
  Trigger blockoutTrigger=(Trigger)blockout;
  blockoutTrigger.setGroup(BLOCK_GROUP);
  JobDetail jd=new JobDetail(blockoutTrigger.getName(),BLOCK_GROUP,BlockoutJob.class);
  blockoutTrigger.setJobName(jd.getName());
  blockoutTrigger.setJobGroup(jd.getGroup());
  scheduler.scheduleJob(jd,blockoutTrigger);
}
Program: 47477
Project: 47477
Buggy source:
public void testConstruction() throws Exception {
  String adminRole="String_Node_Str";
  ArrayList<String> systemRoles=new ArrayList<String>();
  systemRoles.add(adminRole);
  systemRoles.add("String_Node_Str");
  systemRoles.add("String_Node_Str");
  new UserRoleResource(new MockRoleAuthorizationPolicyRoleBindingDao(),new MockTenantManager(),systemRoles,"String_Node_Str");
}

Fixed version (ground truth):
public void testConstruction() throws Exception {
  String adminRole="String_Node_Str";
  ArrayList<String> systemRoles=new ArrayList<String>();
  systemRoles.add(adminRole);
  systemRoles.add("String_Node_Str");
  systemRoles.add("String_Node_Str");
  new UserRoleResource(new MockRoleAuthorizationPolicyRoleBindingDao(),new MockTenantManager(),systemRoles,"String_Node_Str",new ArrayList<String>());
}
Program: 47478
Project: 47478
Buggy source:
@Test public void testImportLocaleFiles() throws Exception {
  StringBuffer localeContent=new StringBuffer();
  localeContent.append("String_Node_Str");
  localeContent.append("String_Node_Str");
  localeContent.append("String_Node_Str");
  ByteArrayInputStream inputStream=new ByteArrayInputStream(localeContent.toString().getBytes());
  RepositoryFile file=new RepositoryFile.Builder("String_Node_Str").build();
  RepositoryFileBundle repoFileBundle=new RepositoryFileBundle(file,null,"String_Node_Str",null,"String_Node_Str",null);
  LocaleFilesProcessor localeFilesProcessor=new LocaleFilesProcessor();
  localeFilesProcessor.isLocaleFile(repoFileBundle,"String_Node_Str",inputStream);
  localeFilesProcessor.processLocaleFiles(importer);
}

Fixed version (ground truth):
@Test public void testImportLocaleFiles() throws Exception {
  StringBuffer localeContent=new StringBuffer();
  localeContent.append("String_Node_Str");
  localeContent.append("String_Node_Str");
  localeContent.append("String_Node_Str");
  RepositoryFile file=new RepositoryFile.Builder("String_Node_Str").build();
  RepositoryFileBundle repoFileBundle=new RepositoryFileBundle(file,null,"String_Node_Str",null,"String_Node_Str",null);
  LocaleFilesProcessor localeFilesProcessor=new LocaleFilesProcessor();
  localeFilesProcessor.isLocaleFile(repoFileBundle,"String_Node_Str",localeContent.toString().getBytes());
  localeFilesProcessor.processLocaleFiles(importer);
}
Program: 47479
Project: 47479
Buggy source:
private void showDefaultPerspective(){
  DeckPanel contentDeck=MantleApplication.getInstance().getContentDeck();
  if (MantleApplication.getInstance().getContentDeck().getWidgetIndex(SolutionBrowserPanel.getInstance()) == -1) {
    contentDeck.add(SolutionBrowserPanel.getInstance());
  }
  contentDeck.showWidget(contentDeck.getWidgetIndex(SolutionBrowserPanel.getInstance()));
  this.browserMenuItem.setChecked(true);
  this.workspaceMenuItem.setChecked(false);
  MantleApplication.getInstance().pucToolBarVisibility(true);
}

Fixed version (ground truth):
private void showDefaultPerspective(boolean browserChecked,boolean workspaceChecked){
  DeckPanel contentDeck=MantleApplication.getInstance().getContentDeck();
  if (MantleApplication.getInstance().getContentDeck().getWidgetIndex(SolutionBrowserPanel.getInstance()) == -1) {
    contentDeck.add(SolutionBrowserPanel.getInstance());
  }
  contentDeck.showWidget(contentDeck.getWidgetIndex(SolutionBrowserPanel.getInstance()));
  setCheckMMenuItem(browserChecked,workspaceChecked);
  MantleApplication.getInstance().pucToolBarVisibility(true);
}
Program: 47480
Project: 47480
Buggy source:
private void showWorkspacePerspective(){
  GWT.runAsync(new RunAsyncCallback(){
    public void onSuccess(){
      DeckPanel contentDeck=MantleApplication.getInstance().getContentDeck();
      if (MantleApplication.getInstance().getContentDeck().getWidgetIndex(WorkspacePanel.getInstance()) == -1) {
        contentDeck.add(WorkspacePanel.getInstance());
      }
 else {
        WorkspacePanel.getInstance().refresh();
      }
      contentDeck.showWidget(contentDeck.getWidgetIndex(WorkspacePanel.getInstance()));
      MantleApplication.getInstance().pucToolBarVisibility(false);
    }
    public void onFailure(    Throwable reason){
    }
  }
);
  this.browserMenuItem.setChecked(false);
  this.workspaceMenuItem.setChecked(true);
}

Fixed version (ground truth):
private void showWorkspacePerspective(boolean browserChecked,boolean workspaceChecked){
  GWT.runAsync(new RunAsyncCallback(){
    public void onSuccess(){
      DeckPanel contentDeck=MantleApplication.getInstance().getContentDeck();
      if (MantleApplication.getInstance().getContentDeck().getWidgetIndex(WorkspacePanel.getInstance()) == -1) {
        contentDeck.add(WorkspacePanel.getInstance());
      }
 else {
        WorkspacePanel.getInstance().refresh();
      }
      contentDeck.showWidget(contentDeck.getWidgetIndex(WorkspacePanel.getInstance()));
      MantleApplication.getInstance().pucToolBarVisibility(false);
    }
    public void onFailure(    Throwable reason){
    }
  }
);
  setCheckMMenuItem(browserChecked,workspaceChecked);
}
Program: 47482
Project: 47482
Buggy source:
private void showAdminPerspective(){
  DeckPanel contentDeck=MantleApplication.getInstance().getContentDeck();
  if (MantleApplication.getInstance().getContentDeck().getWidgetIndex(MantleXul.getInstance().getAdminPerspective()) == -1) {
    contentDeck.add(MantleXul.getInstance().getAdminPerspective());
  }
  contentDeck.showWidget(contentDeck.getWidgetIndex(MantleXul.getInstance().getAdminPerspective()));
  MantleXul.getInstance().customizeAdminStyle();
  MantleXul.getInstance().configureAdminCatTree();
  this.browserMenuItem.setChecked(false);
  this.workspaceMenuItem.setChecked(false);
  MantleApplication.getInstance().pucToolBarVisibility(false);
}

Fixed version (ground truth):
private void showAdminPerspective(boolean browserChecked,boolean workspaceChecked){
  DeckPanel contentDeck=MantleApplication.getInstance().getContentDeck();
  if (MantleApplication.getInstance().getContentDeck().getWidgetIndex(MantleXul.getInstance().getAdminPerspective()) == -1) {
    contentDeck.add(MantleXul.getInstance().getAdminPerspective());
  }
  contentDeck.showWidget(contentDeck.getWidgetIndex(MantleXul.getInstance().getAdminPerspective()));
  MantleXul.getInstance().customizeAdminStyle();
  MantleXul.getInstance().configureAdminCatTree();
  setCheckMMenuItem(browserChecked,workspaceChecked);
  MantleApplication.getInstance().pucToolBarVisibility(false);
}
Program: 47484
Project: 47484
Buggy source:
@Override public void onFetchUserSettings(JsArray<JsSetting> settings){
  if (settings == null) {
    return;
  }
  for (int i=0; i < settings.length(); i++) {
    JsSetting setting=settings.get(i);
    try {
      if (IMantleUserSettingsConstants.MANTLE_SHOW_NAVIGATOR.equals(setting.getName())) {
        boolean showNavigator="String_Node_Str".equals(setting.getValue());
        model.setShowNavigatorSelected(showNavigator);
        for (        Binding b : bindingsToUpdate) {
          try {
            b.fireSourceChanged();
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
 else       if (IMantleUserSettingsConstants.MANTLE_SHOW_DESCRIPTIONS_FOR_TOOLTIPS.equals(setting.getName())) {
        boolean checked="String_Node_Str".equals(setting.getValue());
        ((PentahoMenuItem)useDescriptionsMenuItem.getManagedObject()).setChecked(checked);
      }
 else       if (IMantleUserSettingsConstants.MANTLE_SHOW_HIDDEN_FILES.equals(setting.getName())) {
        boolean checked="String_Node_Str".equals(setting.getValue());
        ((PentahoMenuItem)showHiddenFilesMenuItem.getManagedObject()).setChecked(checked);
      }
    }
 catch (    Exception e) {
      MessageDialogBox dialogBox=new MessageDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),false,false,true);
      dialogBox.center();
    }
  }
}

Fixed version (ground truth):
@Override public void onFetchUserSettings(JsArray<JsSetting> settings){
  if (settings == null) {
    return;
  }
  for (int i=0; i < settings.length(); i++) {
    JsSetting setting=settings.get(i);
    try {
      if (IMantleUserSettingsConstants.MANTLE_SHOW_NAVIGATOR.equals(setting.getName())) {
        boolean showNavigator="String_Node_Str".equals(setting.getValue());
        model.setShowNavigatorSelected(showNavigator);
        try {
          ShowBrowserCommand showBrowserCommand=new ShowBrowserCommand(showNavigator);
          showBrowserCommand.execute();
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
 else       if (IMantleUserSettingsConstants.MANTLE_SHOW_DESCRIPTIONS_FOR_TOOLTIPS.equals(setting.getName())) {
        boolean checked="String_Node_Str".equals(setting.getValue());
        ((PentahoMenuItem)useDescriptionsMenuItem.getManagedObject()).setChecked(checked);
      }
 else       if (IMantleUserSettingsConstants.MANTLE_SHOW_HIDDEN_FILES.equals(setting.getName())) {
        boolean checked="String_Node_Str".equals(setting.getValue());
        ((PentahoMenuItem)showHiddenFilesMenuItem.getManagedObject()).setChecked(checked);
      }
    }
 catch (    Exception e) {
      MessageDialogBox dialogBox=new MessageDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),false,false,true);
      dialogBox.center();
    }
  }
}
Program: 47485
Project: 47485
Buggy source:
@Bindable public void showNavigatorClicked(){
  model.setShowNavigatorSelected(!model.isShowNavigatorSelected());
  ShowBrowserCommand showBrowserCommand=new ShowBrowserCommand(model.isShowNavigatorSelected());
  showBrowserCommand.execute();
}

Fixed version (ground truth):
@Bindable public void showNavigatorClicked(){
  boolean show=!model.isShowNavigatorSelected();
  model.setShowNavigatorSelected(show);
  ShowBrowserCommand showBrowserCommand=new ShowBrowserCommand(show);
  showBrowserCommand.execute();
}
Program: 47487
Project: 47487
Buggy source:
/** 
 * Sends Kettle's logs to the platform log as well.
 */
@SuppressWarnings("String_Node_Str") protected void initLogging(){
}

Fixed version (ground truth):
/** 
 * Sends Kettle's logs to the platform log as well.
 */
@SuppressWarnings("String_Node_Str") protected void initLogging(){
  Enumeration<org.apache.log4j.Appender> appenders=org.apache.log4j.Logger.getRootLogger().getAllAppenders();
  while (appenders.hasMoreElements()) {
    org.apache.log4j.Appender appender=appenders.nextElement();
    if (appender instanceof org.apache.log4j.FileAppender) {
      Log4jForwardingKettleLoggingEventListener listener=new Log4jForwardingKettleLoggingEventListener(appender);
      CentralLogStore.getAppender().addLoggingEventListener(listener);
    }
  }
}
Program: 47492
Project: 47492
Buggy source:
/** 
 * Returns a stream for reading the data in this file.
 * @return stream (may be {@code null})
 */
public InputStream getStream(){
  return stream;
}

Fixed version (ground truth):
/** 
 * Returns a stream for reading the data in this file.
 * @return stream (may be {@code null})
 * @deprecated Use  {@link #getInputStream()} instead. Proguard likes to obfuscate any method named getStream that returns an InputStream,even if you tell it not to via keep rules.
 */
@Deprecated public InputStream getStream(){
  return stream;
}
Program: 47494
Project: 47494
Buggy source:
public boolean setup(){
  try {
    final IEmailService service=PentahoSystem.get(IEmailService.class,"String_Node_Str",PentahoSessionHolder.getSession());
    props.put("String_Node_Str",service.getEmailConfig().getSmtpHost());
    props.put("String_Node_Str",service.getEmailConfig().getSmtpPort());
    props.put("String_Node_Str",service.getEmailConfig().getSmtpProtocol());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isUseStartTls());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isAuthenticate());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isUseSsl());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isSmtpQuitWait());
    props.put("String_Node_Str",service.getEmailConfig().getDefaultFrom());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isDebug());
    if (service.getEmailConfig().isAuthenticate()) {
      props.put("String_Node_Str",service.getEmailConfig().getUserId());
      props.put("String_Node_Str",service.getEmailConfig().getPassword());
      setAuthenticator(new Authenticator(){
        protected PasswordAuthentication getPasswordAuthentication(){
          return new PasswordAuthentication(service.getEmailConfig().getUserId(),service.getEmailConfig().getPassword());
        }
      }
);
    }
    return true;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
public boolean setup(){
  try {
    final IEmailService service=PentahoSystem.get(IEmailService.class,"String_Node_Str",PentahoSessionHolder.getSession());
    props.put("String_Node_Str",service.getEmailConfig().getSmtpHost());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().getSmtpPort());
    props.put("String_Node_Str",service.getEmailConfig().getSmtpProtocol());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isUseStartTls());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isAuthenticate());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isUseSsl());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isSmtpQuitWait());
    props.put("String_Node_Str",service.getEmailConfig().getDefaultFrom());
    props.put("String_Node_Str","String_Node_Str" + service.getEmailConfig().isDebug());
    if (service.getEmailConfig().isAuthenticate()) {
      props.put("String_Node_Str",service.getEmailConfig().getUserId());
      props.put("String_Node_Str",service.getEmailConfig().getPassword());
      setAuthenticator(new Authenticator(){
        protected PasswordAuthentication getPasswordAuthentication(){
          return new PasswordAuthentication(service.getEmailConfig().getUserId(),service.getEmailConfig().getPassword());
        }
      }
);
    }
    return true;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  return false;
}
Program: 47495
Project: 47495
Buggy source:
private void init(){
  logName="String_Node_Str" + getThreadName();
  logger=Logger.getLogger(logName);
  RepositoryImportHTMLLayout htmlLayout=new RepositoryImportHTMLLayout();
  htmlLayout.setTitle("String_Node_Str");
  htmlLayout.setLocationInfo(true);
  WriterAppender writeAppender=new WriterAppender(htmlLayout,outputStream);
  logger.addAppender(writeAppender);
}

Fixed version (ground truth):
private void init(){
  logName="String_Node_Str" + getThreadName();
  logger=Logger.getLogger(logName);
  RepositoryImportHTMLLayout htmlLayout=new RepositoryImportHTMLLayout();
  htmlLayout.setTitle("String_Node_Str");
  htmlLayout.setLocationInfo(true);
  writeAppender=new WriterAppender(htmlLayout,outputStream);
  logger.addAppender(writeAppender);
}
Program: 47496
Project: 47496
Buggy source:
protected void EndJob(){
}

Fixed version (ground truth):
protected void EndJob(){
  try {
    outputStream.write(writeAppender.getLayout().getFooter().getBytes());
  }
 catch (  Exception e) {
    System.out.println(e);
  }
  logger.removeAppender(logName);
}
Program: 47499
Project: 47499
Buggy source:
public void onResponseReceived(Request delRequest,Response delResponse){
  if (delResponse.getStatusCode() == Response.SC_OK) {
    trashItems=JsonToRepositoryFileTreeConverter.getTrashFiles(delResponse.getText());
    fireRepositoryFileTreeFetched();
  }
 else {
    fireRepositoryFileTreeFetched();
  }
}

Fixed version (ground truth):
public void onResponseReceived(Request delRequest,Response delResponse){
  if (delResponse.getStatusCode() == Response.SC_OK) {
    try {
      trashItems=JsonToRepositoryFileTreeConverter.getTrashFiles(delResponse.getText());
    }
 catch (    Throwable t) {
    }
    fireRepositoryFileTreeFetched();
  }
 else {
    fireRepositoryFileTreeFetched();
  }
}
Program: 47503
Project: 47503
Buggy source:
public void fetchUserSettings(final AsyncCallback<JsArray<JsSetting>> callback){
  final String url=GWT.getHostPageBaseURL() + "String_Node_Str";
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,url);
  builder.setHeader("String_Node_Str","String_Node_Str");
  try {
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        MessageDialogBox dialog=new MessageDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,false,true);
        dialog.center();
      }
      public void onResponseReceived(      Request request,      Response response){
        JsArray<JsSetting> jsSettings=JsSetting.parseSettingsJson(JsonUtils.escapeJsonForEval(response.getText()));
        getInstance().settings=jsSettings;
        if (callback != null) {
          callback.onSuccess(settings);
        }
        fireUserSettingsFetched();
      }
    }
);
  }
 catch (  RequestException e) {
  }
}

Fixed version (ground truth):
public void fetchUserSettings(final AsyncCallback<JsArray<JsSetting>> callback){
  final String url=GWT.getHostPageBaseURL() + "String_Node_Str";
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,url);
  builder.setHeader("String_Node_Str","String_Node_Str");
  try {
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable exception){
        MessageDialogBox dialog=new MessageDialogBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),true,false,true);
        dialog.center();
      }
      public void onResponseReceived(      Request request,      Response response){
        JsArray<JsSetting> jsSettings=null;
        try {
          jsSettings=JsSetting.parseSettingsJson(response.getText());
        }
 catch (        Throwable t) {
        }
        getInstance().settings=jsSettings;
        if (callback != null) {
          callback.onSuccess(settings);
        }
        fireUserSettingsFetched();
      }
    }
);
  }
 catch (  RequestException e) {
  }
}
Program: 47504
Project: 47504
Buggy source:
public void onResponseReceived(Request request,Response response){
  JsArray<JsSetting> jsSettings=JsSetting.parseSettingsJson(JsonUtils.escapeJsonForEval(response.getText()));
  getInstance().settings=jsSettings;
  if (callback != null) {
    callback.onSuccess(settings);
  }
  fireUserSettingsFetched();
}

Fixed version (ground truth):
public void onResponseReceived(Request request,Response response){
  JsArray<JsSetting> jsSettings=null;
  try {
    jsSettings=JsSetting.parseSettingsJson(response.getText());
  }
 catch (  Throwable t) {
  }
  getInstance().settings=jsSettings;
  if (callback != null) {
    callback.onSuccess(settings);
  }
  fireUserSettingsFetched();
}
Program: 47507
Project: 47507
Buggy source:
public void onResponseReceived(Request request,Response response){
  toolsMenu.setVisible("String_Node_Str".equalsIgnoreCase(response.getText()));
}

Fixed version (ground truth):
public void onResponseReceived(Request request,Response response){
  log("String_Node_Str");
  toolsMenu.setVisible("String_Node_Str".equalsIgnoreCase(response.getText()));
  log("String_Node_Str" + response.getText());
}
Program: 47509
Project: 47509
Buggy source:
public void onResponseReceived(Request request,Response response){
  log("String_Node_Str");
  toolsMenu.setVisible("String_Node_Str".equalsIgnoreCase(response.getText()));
  log("String_Node_Str" + response.getText());
}

Fixed version (ground truth):
public void onResponseReceived(Request request,Response response){
  toolsMenu.setVisible("String_Node_Str".equalsIgnoreCase(response.getText()));
}
Program: 47511
Project: 47511
Buggy source:
public EmailAdminPanelController(){
  super();
  saveButton.addClickHandler(new SaveButtonChangeListener());
  authenticationCheckBox.addValueChangeHandler(new AuthenticateChangeHandler());
  editPasswordButton.addClickHandler(new EditPasswordListener());
  smtpHostTextBox.addKeyUpHandler(new AuthenticationHandler());
  portTextBox.addKeyUpHandler(new AuthenticationHandler());
  fromAddressTextBox.addKeyUpHandler(new AuthenticationHandler());
  userNameTextBox.addKeyUpHandler(new AuthenticationHandler());
  authenticationCheckBox.addValueChangeHandler(new AuthenticationHandler());
  activate();
}

Fixed version (ground truth):
public EmailAdminPanelController(){
  super();
  saveButton.addClickHandler(new SaveButtonChangeListener());
  authenticationCheckBox.addValueChangeHandler(new AuthenticateChangeHandler());
  editPasswordButton.addClickHandler(new EditPasswordListener());
  smtpHostTextBox.addKeyUpHandler(new AuthenticationHandler());
  portTextBox.addKeyUpHandler(new AuthenticationHandler());
  fromAddressTextBox.addKeyUpHandler(new AuthenticationHandler());
  userNameTextBox.addKeyUpHandler(new AuthenticationHandler());
  authenticationCheckBox.addValueChangeHandler(new AuthenticationHandler());
  debuggingCheckBox.addValueChangeHandler(new AuthenticationHandler());
  useSSLCheckBox.addValueChangeHandler(new AuthenticationHandler());
  useStartTLSCheckBox.addValueChangeHandler(new AuthenticationHandler());
  activate();
}
Program: 47512
Project: 47512
Buggy source:
@GET @Path("String_Node_Str") @Produces({WILDCARD}) public Response doGetFileOrDir(@PathParam("String_Node_Str") String pathId) throws FileNotFoundException {
  String path=idToPath(pathId);
  RepositoryFile repoFile=repository.getFile(path);
  if (repoFile == null) {
    return Response.status(NOT_FOUND).build();
  }
  final RepositoryFileInputStream is=new RepositoryFileInputStream(repoFile);
  StreamingOutput streamingOutput=new StreamingOutput(){
    public void write(    OutputStream output) throws IOException {
      IOUtils.copy(is,output);
    }
  }
;
  return Response.ok(streamingOutput,is.getMimeType()).build();
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @Produces({WILDCARD}) public Response doGetFileOrDir(@PathParam("String_Node_Str") String pathId) throws FileNotFoundException {
  String path=idToPath(pathId);
  if (path.startsWith("String_Node_Str")) {
    return Response.status(Status.FORBIDDEN).build();
  }
  RepositoryFile repoFile=repository.getFile(path);
  if (repoFile == null) {
    return Response.status(NOT_FOUND).build();
  }
  final RepositoryFileInputStream is=new RepositoryFileInputStream(repoFile);
  StreamingOutput streamingOutput=new StreamingOutput(){
    public void write(    OutputStream output) throws IOException {
      IOUtils.copy(is,output);
    }
  }
;
  return Response.ok(streamingOutput,is.getMimeType()).build();
}