nus-yam/ex-repair huggingface dataset:
Program: 91726
Project: 91726
Buggy source:
public void run(){
  if (Config.movedPlayers.isEmpty())   return;
  for (Iterator<String> p=Config.movedPlayers.iterator(); p.hasNext(); ) {
    String playerName=p.next();
    Player player=server.getPlayer(playerName);
    p.remove();
    if (player == null || !player.isOnline())     continue;
    Location loc=player.getLocation();
    if (loc == null)     continue;
    World world=loc.getWorld();
    if (world == null)     continue;
    BorderData border=Config.Border(world.getName());
    if (border == null)     continue;
    if (border.insideBorder(loc.getX(),loc.getZ(),Config.ShapeRound()))     continue;
    Location newLoc=newLocation(player,loc,border);
    if (!player.isInsideVehicle())     player.teleport(newLoc);
 else {
      double vertOffset=player.getVehicle().getLocation().getY() - loc.getY();
      newLoc.setY(newLoc.getY() + vertOffset);
      player.getVehicle().setVelocity(new Vector(0,0,0));
      player.getVehicle().teleport(newLoc);
    }
  }
}

Fixed version (ground truth):
public void run(){
  if (Config.movedPlayers.isEmpty() || server == null)   return;
  for (Iterator<String> p=Config.movedPlayers.iterator(); p.hasNext(); ) {
    Player player=null;
    try {
      String playerName=p.next();
      player=server.getPlayer(playerName);
      p.remove();
    }
 catch (    ConcurrentModificationException ex) {
      continue;
    }
    if (player == null || !player.isOnline())     continue;
    Location loc=player.getLocation();
    if (loc == null)     continue;
    World world=loc.getWorld();
    if (world == null)     continue;
    BorderData border=Config.Border(world.getName());
    if (border == null)     continue;
    if (border.insideBorder(loc.getX(),loc.getZ(),Config.ShapeRound()))     continue;
    Location newLoc=newLocation(player,loc,border);
    if (!player.isInsideVehicle())     player.teleport(newLoc);
 else {
      double vertOffset=player.getVehicle().getLocation().getY() - loc.getY();
      newLoc.setY(newLoc.getY() + vertOffset);
      player.getVehicle().setVelocity(new Vector(0,0,0));
      player.getVehicle().teleport(newLoc);
    }
  }
}
Program: 91727
Project: 91727
Buggy source:
/** 
 * Retrieves the   {@link IResource} associated with the first element in thegiven  {@code selection}.
 * @param selection the  {@link ISelection} to process
 * @return the corresponding {@link IResource} or <code>null</code> if nonewas found
 */
private static IResource getResourceFromSelection(final ISelection selection){
  final Object selectedElement=((IStructuredSelection)selection).toArray()[0];
  if (selectedElement instanceof IResource) {
    return (IResource)selectedElement;
  }
 else   if (selectedElement instanceof IAdaptable) {
    return ((IAdaptable)selection).getAdapter(IResource.class);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieves the   {@link IResource} associated with the first element in thegiven  {@code selection}.
 * @param selection the  {@link ISelection} to process
 * @return the corresponding {@link IResource} or <code>null</code> if nonewas found
 */
private static IResource getResourceFromSelection(final ISelection selection){
  final Object selectedElement=((IStructuredSelection)selection).toArray()[0];
  if (selectedElement instanceof IResource) {
    return (IResource)selectedElement;
  }
 else   if (selectedElement instanceof IAdaptable) {
    return ((IAdaptable)selectedElement).getAdapter(IResource.class);
  }
  return null;
}
Program: 91729
Project: 91729
Buggy source:
@Override public void initializeFrom(ILaunchConfiguration configuration){
  if (model == null)   return;
  try {
    model.removeEnvironmentVariables();
    final List<String> environmentVariables=configuration.getAttribute(IRunDockerImageLaunchConfigurationConstants.ENV_VARIABLES,new ArrayList<String>());
    for (    String environmenVariable : environmentVariables) {
      model.addEnvironmentVariable(EnvironmentVariableModel.createEnvironmentVariableModel(environmenVariable));
    }
  }
 catch (  CoreException e) {
    Activator.logErrorMessage(LaunchMessages.getString("String_Node_Str"),e);
  }
  model.addPropertyChangeListener(new LaunchConfigurationChangeListener());
}

Fixed version (ground truth):
@Override public void initializeFrom(ILaunchConfiguration configuration){
  if (model == null)   return;
  try {
    final List<String> environmentVariables=configuration.getAttribute(IRunDockerImageLaunchConfigurationConstants.ENV_VARIABLES,new ArrayList<String>());
    model.setEnvironmentVariables(environmentVariables);
  }
 catch (  CoreException e) {
    Activator.logErrorMessage(LaunchMessages.getString("String_Node_Str"),e);
  }
  model.addPropertyChangeListener(new LaunchConfigurationChangeListener());
}
Program: 91735
Project: 91735
Buggy source:
@Override public void dispose(){
  Collection<Job> jobs=Collections.emptyList();
synchronized (openRetryJobs) {
    jobs=openRetryJobs.values();
  }
  for (  Job job : jobs) {
    LoadingJob loadingJob=(LoadingJob)job;
    IProgressMonitor monitor=loadingJob.getMonitor();
    monitor.setCanceled(true);
    job.cancel();
    try {
      job.join();
    }
 catch (    InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
@Override public void dispose(){
  Collection<Job> jobs=Collections.emptyList();
synchronized (openRetryJobs) {
    jobs=new ArrayList<>(openRetryJobs.values());
  }
  for (  Job job : jobs) {
    LoadingJob loadingJob=(LoadingJob)job;
    IProgressMonitor monitor=loadingJob.getMonitor();
    monitor.setCanceled(true);
    job.cancel();
    try {
      job.join();
    }
 catch (    InterruptedException e) {
    }
  }
}
Program: 91739
Project: 91739
Buggy source:
public Map<String,String> getSpaceLinkTypes(String spaceId,TaskRepository taskRepository){
  Space s=null;
  OSIORestConfiguration config;
  Map<String,String> linkMap=new LinkedHashMap<>();
  try {
    config=connector.getRepositoryConfiguration(taskRepository);
  }
 catch (  CoreException e1) {
    StatusHandler.log(new Status(IStatus.ERROR,OSIORestCore.ID_PLUGIN,NLS.bind("String_Node_Str",taskRepository.getRepositoryUrl()),e1));
    return linkMap;
  }
  try {
    Map<String,Space> spaces=getCachedSpaces(new NullOperationMonitor());
    if (spaces != null) {
      for (      Space space : spaces.values()) {
        if (space.getId().equals(spaceId)) {
          s=space;
          break;
        }
      }
      if (s == null && (spaces=config.getExternalSpaces()) != null) {
        for (        Space space : spaces.values()) {
          if (space.getId().equals(spaceId)) {
            s=space;
            break;
          }
        }
      }
      if (s != null) {
        Map<String,WorkItemLinkTypeData> linkTypes=s.getWorkItemLinkTypes();
        for (        WorkItemLinkTypeData linkType : linkTypes.values()) {
          linkMap.put(linkType.getAttributes().getForwardName(),linkType.getId());
          linkMap.put(linkType.getAttributes().getReverseName(),linkType.getId());
        }
      }
    }
  }
 catch (  OSIORestException e) {
    StatusHandler.log(new Status(IStatus.ERROR,OSIORestCore.ID_PLUGIN,NLS.bind("String_Node_Str",spaceId),e));
  }
  return linkMap;
}

Fixed version (ground truth):
public Map<String,String> getSpaceLinkTypes(String spaceId,TaskRepository taskRepository){
  Space s=null;
  Map<String,String> linkMap=new LinkedHashMap<>();
  try {
    s=getSpaceById(spaceId,taskRepository);
  }
 catch (  CoreException e1) {
    StatusHandler.log(new Status(IStatus.ERROR,OSIORestCore.ID_PLUGIN,NLS.bind("String_Node_Str",taskRepository.getRepositoryUrl()),e1));
    return linkMap;
  }
  if (s != null) {
    Map<String,WorkItemLinkTypeData> linkTypes=s.getWorkItemLinkTypes();
    for (    WorkItemLinkTypeData linkType : linkTypes.values()) {
      linkMap.put(linkType.getAttributes().getForwardName(),linkType.getId());
      linkMap.put(linkType.getAttributes().getReverseName(),linkType.getId());
    }
  }
  return linkMap;
}
Program: 91741
Project: 91741
Buggy source:
private void populateFromAttribute(){
  OSIORestClient client;
  String spaceId=getTaskAttribute().getOption("String_Node_Str");
  try {
    client=((OSIORestConnector)connector).getClient(repository);
    linkTypes=client.getSpaceLinkTypes(spaceId,repository);
    workitems=client.getSpaceWorkItems(spaceId);
  }
 catch (  CoreException e) {
  }
  typeCombo.setItems(linkTypes.keySet().toArray(new String[0]));
  typeCombo.add("String_Node_Str",0);
  String link=getTaskAttribute().getValue();
  int index=0;
  if (link != null && !link.isEmpty()) {
    int i=1;
    for (    String linkType : linkTypes.keySet()) {
      if (link.startsWith(linkType)) {
        index=i;
      }
      ++i;
    }
  }
  if (index >= 0) {
    typeCombo.select(index);
  }
  workitemCombo.setItems(workitems.keySet().toArray(new String[0]));
  index=-1;
  if (link != null && !link.isEmpty()) {
    int i=0;
    for (    String workitem : workitems.keySet()) {
      if (link.endsWith(workitem)) {
        index=i;
      }
      ++i;
    }
  }
  if (index >= 0) {
    workitemCombo.select(index);
  }
}

Fixed version (ground truth):
private void populateFromAttribute(){
  OSIORestClient client;
  String spaceId=getTaskAttribute().getOption("String_Node_Str");
  try {
    client=((OSIORestConnector)connector).getClient(repository);
    linkTypes=client.getSpaceLinkTypes(spaceId,repository);
    workitems=client.getSpaceWorkItems(spaceId);
  }
 catch (  CoreException e) {
  }
  typeCombo.setItems(linkTypes.keySet().toArray(new String[0]));
  typeCombo.add("String_Node_Str",0);
  String link=getTaskAttribute().getValue();
  int index=0;
  if (link != null && !link.isEmpty()) {
    int i=1;
    for (    String linkType : linkTypes.keySet()) {
      if (link.startsWith(linkType)) {
        index=i;
      }
      ++i;
    }
  }
  if (index >= 0) {
    typeCombo.select(index);
  }
  ArrayList<String> workitemsList=new ArrayList<>();
  String sourceName=getModel().getTaskData().getRoot().getMappedAttribute(OSIORestTaskSchema.getDefault().SUMMARY.getKey()).getValue();
  for (  String workitemName : workitems.keySet()) {
    if (!workitemName.equals(sourceName)) {
      workitemsList.add(workitemName);
    }
  }
  workitemCombo.setItems(workitemsList.toArray(new String[0]));
  index=-1;
  if (link != null && !link.isEmpty()) {
    int i=0;
    for (    String workitem : workitems.keySet()) {
      if (link.endsWith(workitem)) {
        index=i;
      }
      ++i;
    }
  }
  if (index >= 0) {
    workitemCombo.select(index);
  }
}
Program: 91742
Project: 91742
Buggy source:
public OSIORestConfiguration getConfiguration(TaskRepository repository,IOperationMonitor monitor){
  try {
    OSIORestConfiguration config=new OSIORestConfiguration(repository.getUrl());
    Map<String,Space> spaces=getSpaces(monitor);
    for (    Space space : spaces.values()) {
      Map<String,WorkItemTypeData> workItemTypes=getSpaceWorkItemTypes(new NullOperationMonitor(),space);
      space.setWorkItemTypes(workItemTypes);
      Map<String,WorkItemLinkTypeData> workItemLinkTypes=getSpaceWorkItemLinkTypes(new NullOperationMonitor(),space);
      space.setWorkItemLinkTypes(workItemLinkTypes);
      Map<String,Area> areas=getSpaceAreas(new NullOperationMonitor(),space);
      space.setAreas(areas);
      Map<String,Iteration> iterations=getSpaceIterations(new NullOperationMonitor(),space);
      space.setIterations(iterations);
      Map<String,Label> labels=getSpaceLabels(new NullOperationMonitor(),space);
      space.setLabels(labels);
      Map<String,User> users=getUsers(new NullOperationMonitor(),space);
      space.setUsers(users);
    }
    config.setSpaces(spaces);
    return config;
  }
 catch (  Exception e) {
    StatusHandler.log(new Status(IStatus.ERROR,OSIORestCore.ID_PLUGIN,"String_Node_Str",e));
    return null;
  }
}

Fixed version (ground truth):
public OSIORestConfiguration getConfiguration(TaskRepository repository,IOperationMonitor monitor){
  try {
    OSIORestConfiguration config=new OSIORestConfiguration(repository.getUrl(),userName);
    Map<String,Space> spaces=getSpaces(monitor);
    for (    Space space : spaces.values()) {
      Map<String,WorkItemTypeData> workItemTypes=getSpaceWorkItemTypes(new NullOperationMonitor(),space);
      space.setWorkItemTypes(workItemTypes);
      Map<String,WorkItemLinkTypeData> workItemLinkTypes=getSpaceWorkItemLinkTypes(new NullOperationMonitor(),space);
      space.setWorkItemLinkTypes(workItemLinkTypes);
      Map<String,Area> areas=getSpaceAreas(new NullOperationMonitor(),space);
      space.setAreas(areas);
      Map<String,Iteration> iterations=getSpaceIterations(new NullOperationMonitor(),space);
      space.setIterations(iterations);
      Map<String,Label> labels=getSpaceLabels(new NullOperationMonitor(),space);
      space.setLabels(labels);
      Map<String,User> users=getUsers(new NullOperationMonitor(),space);
      space.setUsers(users);
    }
    config.setSpaces(spaces);
    return config;
  }
 catch (  Exception e) {
    StatusHandler.log(new Status(IStatus.ERROR,OSIORestCore.ID_PLUGIN,"String_Node_Str",e));
    return null;
  }
}
Program: 91743
Project: 91743
Buggy source:
public void updateInitialTaskData(TaskData data) throws CoreException {
  setSpaceOptions(data,getSpaces());
  updateSpaceOptions(data);
  for (  String key : data.getRoot().getAttributes().keySet()) {
    if (key.equals(OSIORestTaskSchema.getDefault().NEW_COMMENT.getKey()) || key.equals(TaskAttribute.OPERATION) || key.equals(OSIORestTaskSchema.getDefault().DATE_MODIFICATION.getKey())) {
      continue;
    }
    TaskAttribute attribute=data.getRoot().getAttribute(key);
    if (key.equals(OSIORestTaskSchema.getDefault().STATUS.getKey())) {
      if (attribute.getOptions().isEmpty()) {
        for (        String status : statusValues) {
          attribute.putOption(status,status);
        }
      }
    }
    if (!key.equals(SCHEMA.SPACE.getKey())) {
      String configName=mapTaskAttributeKey2ConfigurationFields(key);
      if (configName.equals("String_Node_Str")) {
        if (attribute.getOptions().size() == 1 && attribute.getValue().isEmpty()) {
          attribute.setValue((String)attribute.getOptions().values().toArray()[0]);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void updateInitialTaskData(TaskData data) throws CoreException {
  setSpaceOptions(data,getSpaces());
  updateSpaceOptions(data);
  for (  String key : data.getRoot().getAttributes().keySet()) {
    if (key.equals(OSIORestTaskSchema.getDefault().NEW_COMMENT.getKey()) || key.equals(TaskAttribute.OPERATION) || key.equals(OSIORestTaskSchema.getDefault().DATE_MODIFICATION.getKey())) {
      continue;
    }
    TaskAttribute attribute=data.getRoot().getAttribute(key);
    if (key.equals(OSIORestTaskSchema.getDefault().STATUS.getKey())) {
      if (attribute.getOptions().isEmpty()) {
        for (        String status : statusValues) {
          attribute.putOption(status,status);
        }
      }
    }
    if (key.equals(OSIORestTaskSchema.getDefault().ASSIGNEES.getKey())) {
      if (attribute.getOptions().isEmpty()) {
        attribute.putOption(userName,userName);
      }
      continue;
    }
    if (!key.equals(SCHEMA.SPACE.getKey())) {
      String configName=mapTaskAttributeKey2ConfigurationFields(key);
      if (configName.equals("String_Node_Str")) {
        if (attribute.getOptions().size() == 1 && attribute.getValue().isEmpty()) {
          attribute.setValue((String)attribute.getOptions().values().toArray()[0]);
        }
      }
    }
  }
}
Program: 91744
Project: 91744
Buggy source:
public OSIORestConfiguration(String repositoryId){
  this.repositoryId=repositoryId;
  statusTransitions.put("String_Node_Str",statusValues);
  statusTransitions.put(NEW,newStatusTransitions);
  statusTransitions.put(OPEN,openStatusTransitions);
  statusTransitions.put(IN_PROGRESS,inProgressStatusTransitions);
  statusTransitions.put(RESOLVED,resolvedStatusTransitions);
  statusTransitions.put(CLOSED,closedStatusTransitions);
}

Fixed version (ground truth):
public OSIORestConfiguration(String repositoryId,String userName){
  this.repositoryId=repositoryId;
  this.userName=userName;
  statusTransitions.put("String_Node_Str",statusValues);
  statusTransitions.put(NEW,newStatusTransitions);
  statusTransitions.put(OPEN,openStatusTransitions);
  statusTransitions.put(IN_PROGRESS,inProgressStatusTransitions);
  statusTransitions.put(RESOLVED,resolvedStatusTransitions);
  statusTransitions.put(CLOSED,closedStatusTransitions);
}
Program: 91748
Project: 91748
Buggy source:
public Map<String,IdNamed> getMapFor(String member){
  if ("String_Node_Str".equals(member)) {
    return areasIdNamed;
  }
 else   if ("String_Node_Str".equals(member)) {
    return workItemTypesIdNamed;
  }
 else   if ("String_Node_Str".equals(member)) {
    return iterationsIdNamed;
  }
 else   if ("String_Node_Str".equals(member)) {
    return usersIdNamed;
  }
  return null;
}

Fixed version (ground truth):
public Map<String,IdNamed> getMapFor(String member){
  if ("String_Node_Str".equals(member)) {
    return areasIdNamed;
  }
 else   if ("String_Node_Str".equals(member)) {
    return workItemTypesIdNamed;
  }
 else   if ("String_Node_Str".equals(member)) {
    return iterationsIdNamed;
  }
 else   if ("String_Node_Str".equals(member)) {
    return usersIdNamed;
  }
 else   if ("String_Node_Str".equals(member)) {
    if (statusNamed == null) {
      statusNamed=new LinkedHashMap<>();
      statusNamed.put("String_Node_Str",new Status("String_Node_Str"));
      statusNamed.put("String_Node_Str",new Status("String_Node_Str"));
      statusNamed.put("String_Node_Str",new Status("String_Node_Str"));
      statusNamed.put("String_Node_Str",new Status("String_Node_Str"));
      statusNamed.put("String_Node_Str",new Status("String_Node_Str"));
    }
    return statusNamed;
  }
  return null;
}
Program: 91749
Project: 91749
Buggy source:
@Override public boolean isPageComplete(){
  setMessage(pageDetails.getPageDescription());
  boolean result=super.isPageComplete();
  if (!result) {
    return result;
  }
  setErrorMessage(null);
  setMessage("String_Node_Str");
  boolean oneFieldHasValue=false;
  for (  Field field : schema.getFields()) {
    oneFieldHasValue|=(targetTaskData.getRoot().getAttribute(field.getKey()).hasValue() && !targetTaskData.getRoot().getAttribute(field.getKey()).getValue().equals("String_Node_Str"));
    if (field.isQueryRequired()) {
      String text=targetTaskData.getRoot().getAttribute(field.getKey()).getValue();
      if (text == null || text.length() == 0) {
        setMessage("String_Node_Str" + field.getLabel());
        return false;
      }
    }
    if (field.getType().equals("String_Node_Str")) {
      String text=targetTaskData.getRoot().getAttribute(field.getKey()).getValue();
      if (text != null && text.length() > 0) {
        Matcher m=URL_PATTERN.matcher(text);
        if (m.find()) {
          setErrorMessage(null);
          return true;
        }
 else {
          setErrorMessage("String_Node_Str" + field.getLabel());
          return false;
        }
      }
    }
  }
  if (!oneFieldHasValue) {
    setErrorMessage("String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isPageComplete(){
  setMessage(pageDetails.getPageDescription());
  boolean result=super.isPageComplete();
  if (!result) {
    return result;
  }
  setErrorMessage(null);
  setMessage("String_Node_Str");
  boolean oneFieldHasValue=false;
  for (  Field field : schema.getFields()) {
    oneFieldHasValue|=(targetTaskData.getRoot().getAttribute(field.getKey()).hasValue() && !targetTaskData.getRoot().getAttribute(field.getKey()).getValue().equals("String_Node_Str"));
    if (field.isQueryRequired()) {
      String text=targetTaskData.getRoot().getAttribute(field.getKey()).getValue();
      if (text == null || text.length() == 0) {
        setMessage(NLS.bind(Messages.OSIORestQuery_EnterValue,field.getLabel()));
        return false;
      }
    }
    if (field.getType().equals("String_Node_Str")) {
      String text=targetTaskData.getRoot().getAttribute(field.getKey()).getValue();
      if (text != null && text.length() > 0) {
        Matcher m=URL_PATTERN.matcher(text);
        if (m.find()) {
          setErrorMessage(null);
          return true;
        }
 else {
          setErrorMessage(NLS.bind(Messages.OSIORestQuery_EnterValidURL,field.getLabel()));
          return false;
        }
      }
    }
  }
  if (!oneFieldHasValue) {
    setErrorMessage(Messages.OSIORestQuery_SpecifyOneField);
  }
  return true;
}
Program: 91750
Project: 91750
Buggy source:
@Override protected Process exec(String[] cmdLine,File workingDirectory,String[] envp) throws CoreException {
  String connectionUri=DockerConnectionManager.getInstance().getFirstConnection().getUri();
  String command=String.join("String_Node_Str",cmdLine);
  String newWD=workingDirectory.getAbsolutePath();
  String[] classPath=extractClassPathFromCommand(cmdLine);
  List<String> additionalDirs=new ArrayList<>();
  additionalDirs.addAll(Arrays.asList(classPath));
  additionalDirs.addAll(getAdditionalDirectories());
  if (Platform.OS_WIN32.equals(Platform.getOS())) {
    newWD=UnixFile.convertDOSPathToUnixPath(workingDirectory.getAbsolutePath());
  }
  ContainerLauncher launch=new ContainerLauncher();
  int port=((ContainerVMInstall)fVMInstance).getPort();
  String[] portMap=port != -1 ? new String[]{String.valueOf(port) + ':' + String.valueOf(port)} : new String[0];
  launch.launch("String_Node_Str",new JavaAppInContainerLaunchListener(),connectionUri,fVMInstance.getId(),command,null,newWD,additionalDirs,System.getenv(),null,Arrays.asList(portMap),false,true,true);
  return null;
}

Fixed version (ground truth):
@Override protected Process exec(String[] cmdLine,File workingDirectory,String[] envp) throws CoreException {
  String connectionUri=DockerConnectionManager.getInstance().getFirstConnection().getUri();
  String command=String.join("String_Node_Str",cmdLine);
  String newWD=workingDirectory.getAbsolutePath();
  String[] classPath=extractClassPathFromCommand(cmdLine);
  List<String> additionalDirs=new ArrayList<>();
  additionalDirs.addAll(Arrays.asList(classPath));
  additionalDirs.addAll(getAdditionalDirectories());
  if (Platform.OS_WIN32.equals(Platform.getOS())) {
    newWD=UnixFile.convertDOSPathToUnixPath(workingDirectory.getAbsolutePath());
  }
  if (!newWD.endsWith("String_Node_Str")) {
    newWD=newWD + "String_Node_Str";
  }
  List<String> modAdditionalDirs=new ArrayList<>();
  for (  String addDir : additionalDirs) {
    if (!addDir.endsWith("String_Node_Str")) {
      modAdditionalDirs.add(addDir + "String_Node_Str");
    }
 else {
      modAdditionalDirs.add(addDir);
    }
  }
  ContainerLauncher launch=new ContainerLauncher();
  int port=((ContainerVMInstall)fVMInstance).getPort();
  String[] portMap=port != -1 ? new String[]{String.valueOf(port) + ':' + String.valueOf(port)} : new String[0];
  launch.launch("String_Node_Str",new JavaAppInContainerLaunchListener(),connectionUri,fVMInstance.getId(),command,null,newWD,modAdditionalDirs,System.getenv(),null,Arrays.asList(portMap),false,true,true);
  return null;
}
Program: 91752
Project: 91752
Buggy source:
@Override public void dispose(){
  for (  Job job : openRetryJobs.values()) {
    LoadingJob loadingJob=(LoadingJob)job;
    IProgressMonitor monitor=loadingJob.getMonitor();
    monitor.setCanceled(true);
    job.cancel();
    try {
      job.join();
    }
 catch (    InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
@Override public void dispose(){
  Collection<Job> jobs=Collections.emptyList();
synchronized (openRetryJobs) {
    jobs=openRetryJobs.values();
  }
  for (  Job job : jobs) {
    LoadingJob loadingJob=(LoadingJob)job;
    IProgressMonitor monitor=loadingJob.getMonitor();
    monitor.setCanceled(true);
    job.cancel();
    try {
      job.join();
    }
 catch (    InterruptedException e) {
    }
  }
}
Program: 91753
Project: 91753
Buggy source:
@Before public void setUp() throws Exception {
  if (project == null) {
    project=createProjectAndBuild(FrameworkUtil.getBundle(this.getClass()),getTestProjectName()).getProject();
    isCppProject=project.getNature(CCProjectNature.CC_NATURE_ID) != null;
    gcovFiles=new TreeSet<>();
    for (    IResource r : project.members()) {
      if (r.getType() == IResource.FILE && r.exists()) {
        String fileName=r.getName();
        if (fileName.endsWith("String_Node_Str") || fileName.endsWith("String_Node_Str")) {
          gcovFiles.add(fileName);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  if (project == null) {
    ICProject cproject=createProjectAndBuild(FrameworkUtil.getBundle(this.getClass()),getTestProjectName());
    project=cproject.getProject();
    isCppProject=project.getNature(CCProjectNature.CC_NATURE_ID) != null;
    gcovFiles=new TreeSet<>();
    do {
      for (      IResource r : project.members()) {
        if (r.getType() == IResource.FILE && r.exists()) {
          String fileName=r.getName();
          if (fileName.endsWith("String_Node_Str") || fileName.endsWith("String_Node_Str")) {
            gcovFiles.add(fileName);
          }
        }
      }
    }
 while (gcovFiles.size() < 1);
  }
}
Program: 91754
Project: 91754
Buggy source:
protected ICProject createProjectAndBuild(Bundle bundle,String projname) throws CoreException, URISyntaxException, InvocationTargetException, InterruptedException, IOException {
  ICProject proj=createProject(bundle,projname);
  buildProject(proj);
  return proj;
}

Fixed version (ground truth):
protected ICProject createProjectAndBuild(Bundle bundle,String projname) throws CoreException, URISyntaxException, InvocationTargetException, InterruptedException, IOException {
  ICProject proj=createProject(bundle,projname);
  buildProject(proj);
  IBinary[] binaries=null;
  do {
    Thread.sleep(500);
    binaries=proj.getBinaryContainer().getBinaries();
  }
 while (binaries == null || binaries.length < 1);
  return proj;
}
Program: 91756
Project: 91756
Buggy source:
@Override public Object[] getElements(final Object inputElement){
  if (inputElement instanceof IDockerImage) {
    final IDockerImage image=(IDockerImage)inputElement;
    return new Object[]{new Object[]{"String_Node_Str",image.id().substring(0,12)},new Object[]{"String_Node_Str",image.parentId()},new Object[]{"String_Node_Str",image.createdDate() != null ? image.createdDate() : "String_Node_Str"},new Object[]{"String_Node_Str",LabelUtils.reduce(image.repoTags())},new Object[]{"String_Node_Str",LabelUtils.toString(image.size())},new Object[]{"String_Node_Str",LabelUtils.toString(image.virtualSize())},new Object[]{"String_Node_Str",LabelUtils.toString(image.isIntermediateImage())},new Object[]{"String_Node_Str",LabelUtils.toString(image.isDangling())}};
  }
  return EMPTY;
}

Fixed version (ground truth):
@Override public Object[] getElements(final Object inputElement){
  if (inputElement instanceof IDockerImage) {
    final IDockerImage image=(IDockerImage)inputElement;
    return new Object[]{new Object[]{"String_Node_Str",image.id()},new Object[]{"String_Node_Str",image.parentId()},new Object[]{"String_Node_Str",image.createdDate() != null ? image.createdDate() : "String_Node_Str"},new Object[]{"String_Node_Str",LabelUtils.reduce(image.repoTags())},new Object[]{"String_Node_Str",LabelUtils.toString(image.size())},new Object[]{"String_Node_Str",LabelUtils.toString(image.virtualSize())},new Object[]{"String_Node_Str",LabelUtils.toString(image.isIntermediateImage())},new Object[]{"String_Node_Str",LabelUtils.toString(image.isDangling())}};
  }
  return EMPTY;
}
Program: 91757
Project: 91757
Buggy source:
@Override public Object[] getElements(Object inputElement){
  if (inputElement instanceof IDockerImageInfo) {
    final IDockerImageInfo info=(IDockerImageInfo)inputElement;
    return new Object[]{new Object[]{"String_Node_Str",info.id().substring(0,12)},new Object[]{"String_Node_Str",info.parent()},new Object[]{"String_Node_Str",info.comment()},new Object[]{"String_Node_Str",LabelUtils.toCreatedDate(info.created())},new Object[]{"String_Node_Str",info.container()},new Object[]{"String_Node_Str",info.containerConfig()},new Object[]{"String_Node_Str",info.dockerVersion()},new Object[]{"String_Node_Str",info.author()},new Object[]{"String_Node_Str",info.config()},new Object[]{"String_Node_Str",info.architecture()},new Object[]{"String_Node_Str",info.os()},new Object[]{"String_Node_Str",LabelUtils.toString(info.size())}};
  }
  return EMPTY;
}

Fixed version (ground truth):
@Override public Object[] getElements(Object inputElement){
  if (inputElement instanceof IDockerImageInfo) {
    final IDockerImageInfo info=(IDockerImageInfo)inputElement;
    return new Object[]{new Object[]{"String_Node_Str",info.id()},new Object[]{"String_Node_Str",info.parent()},new Object[]{"String_Node_Str",info.comment()},new Object[]{"String_Node_Str",LabelUtils.toCreatedDate(info.created())},new Object[]{"String_Node_Str",info.container()},new Object[]{"String_Node_Str",info.containerConfig()},new Object[]{"String_Node_Str",info.dockerVersion()},new Object[]{"String_Node_Str",info.author()},new Object[]{"String_Node_Str",info.config()},new Object[]{"String_Node_Str",info.architecture()},new Object[]{"String_Node_Str",info.os()},new Object[]{"String_Node_Str",LabelUtils.toString(info.size())}};
  }
  return EMPTY;
}
Program: 91759
Project: 91759
Buggy source:
/** 
 * Source file
 * @return a source file string
 */
public String getFile(){
  return file;
}

Fixed version (ground truth):
/** 
 * Source file Note: new Valgrind versions (e.g. 3.10) prints the full path of file, not just the source file name.
 * @return a source file string
 */
public String getFile(){
  return file;
}
Program: 91760
Project: 91760
Buggy source:
/** 
 * Returns the   {@link IValgrindMessage} element from the Valgrind View that representsa given Marker
 * @param marker the marker to which the ValgrindMessage relates
 * @return {@link IValgrindMessage} that represents the {@link IMarker}
 */
private IValgrindMessage getMessage(IMarker marker){
  IValgrindMessage message=null;
  String file=marker.getResource().getName();
  int line=marker.getAttribute(IMarker.LINE_NUMBER,0);
  IValgrindMessage[] wrongDeallocMessages=getMessagesByText(Messages.getString("String_Node_Str"));
  for (  IValgrindMessage wrongDeallocMessage : wrongDeallocMessages) {
    ValgrindStackFrame stackBottom=getStackBottom(wrongDeallocMessage);
    int stackBottomLine=stackBottom.getLine();
    String stackBottomFile=stackBottom.getFile();
    if (stackBottomLine == line && file != null && file.equals(stackBottomFile)) {
      message=stackBottom;
    }
  }
  return message;
}

Fixed version (ground truth):
/** 
 * Returns the   {@link IValgrindMessage} element from the Valgrind View that representsa given Marker
 * @param marker the marker to which the ValgrindMessage relates
 * @return {@link IValgrindMessage} that represents the {@link IMarker}
 */
private IValgrindMessage getMessage(IMarker marker){
  IValgrindMessage message=null;
  String file=marker.getResource().getName();
  int line=marker.getAttribute(IMarker.LINE_NUMBER,0);
  IValgrindMessage[] wrongDeallocMessages=getMessagesByText(Messages.getString("String_Node_Str"));
  for (  IValgrindMessage wrongDeallocMessage : wrongDeallocMessages) {
    ValgrindStackFrame stackBottom=getStackBottom(wrongDeallocMessage);
    int stackBottomLine=stackBottom.getLine();
    String stackBottomFile=stackBottom.getFile();
    if (stackBottomLine == line && file != null && stackBottomFile.endsWith(file)) {
      message=stackBottom;
    }
  }
  return message;
}
Program: 91761
Project: 91761
Buggy source:
/** 
 * Returns the allocation function that relates to the given marker
 * @param marker {@link IMarker} object that points to where the wrong de-allocation function is
 * @return {@link String} object containing the allocation function
 * @throws BadLocationException
 */
private String getAllocFunction(IMarker marker,IDocument document) throws BadLocationException {
  IValgrindMessage allocMessage=null;
  String file=marker.getResource().getName();
  int line=marker.getAttribute(IMarker.LINE_NUMBER,0);
  IValgrindMessage[] wrongDeallocMessages=getMessagesByText(Messages.getString("String_Node_Str"));
  for (  IValgrindMessage wrongDeallocMessage : wrongDeallocMessages) {
    ValgrindStackFrame stackBottom=getStackBottom(wrongDeallocMessage);
    int stackBottomLine=stackBottom.getLine();
    String stackBottomFile=stackBottom.getFile();
    if (stackBottomLine == line && file != null && file.equals(stackBottomFile)) {
      allocMessage=getStackBottom(getNestedStack(wrongDeallocMessage));
    }
  }
  if (allocMessage instanceof ValgrindStackFrame) {
    int allocLine=((ValgrindStackFrame)allocMessage).getLine() - 1;
    int allocOffset=document.getLineOffset(allocLine);
    int allocLength=document.getLineLength(allocLine);
    return document.get(allocOffset,allocLength);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the allocation function that relates to the given marker
 * @param marker {@link IMarker} object that points to where the wrong de-allocation function is
 * @return {@link String} object containing the allocation function
 * @throws BadLocationException
 */
private String getAllocFunction(IMarker marker,IDocument document) throws BadLocationException {
  IValgrindMessage allocMessage=null;
  String file=marker.getResource().getName();
  int line=marker.getAttribute(IMarker.LINE_NUMBER,0);
  IValgrindMessage[] wrongDeallocMessages=getMessagesByText(Messages.getString("String_Node_Str"));
  for (  IValgrindMessage wrongDeallocMessage : wrongDeallocMessages) {
    ValgrindStackFrame stackBottom=getStackBottom(wrongDeallocMessage);
    int stackBottomLine=stackBottom.getLine();
    String stackBottomFile=stackBottom.getFile();
    if (stackBottomLine == line && file != null && stackBottomFile.endsWith(file)) {
      allocMessage=getStackBottom(getNestedStack(wrongDeallocMessage));
    }
  }
  if (allocMessage instanceof ValgrindStackFrame) {
    int allocLine=((ValgrindStackFrame)allocMessage).getLine() - 1;
    int allocOffset=document.getLineOffset(allocLine);
    int allocLength=document.getLineLength(allocLine);
    return document.get(allocOffset,allocLength);
  }
  return null;
}
Program: 91764
Project: 91764
Buggy source:
/** 
 * Create a DataVolumeModel from a toString() output.
 * @param fromString
 * @return DataVolumeModel
 */
public static DataVolumeModel parseString(final String fromString){
  final DataVolumeModel model=new DataVolumeModel();
  final String[] items=fromString.split(SEPARATOR);
  model.containerPath=items[0];
  model.mountType=MountType.valueOf(items[1]);
switch (model.mountType) {
case CONTAINER:
    model.setContainerMount(items[2]);
  model.setSelected(Boolean.valueOf(items[3]));
break;
case HOST_FILE_SYSTEM:
model.setHostPathMount(items[2]);
model.setReadOnly(Boolean.valueOf(items[3]));
model.setSelected(Boolean.valueOf(items[4]));
break;
case NONE:
model.setSelected(Boolean.valueOf(items[2]));
break;
}
return model;
}

Fixed version (ground truth):
/** 
 * Create a DataVolumeModel from a toString() output.
 * @param fromString
 * @return DataVolumeModel
 */
public static DataVolumeModel parseString(final String fromString){
  final DataVolumeModel model=new DataVolumeModel();
  final String[] items=fromString.split(SEPARATOR);
  model.containerPath=items[0];
  model.mountType=MountType.valueOf(items[1]);
switch (model.mountType) {
case CONTAINER:
    model.setContainerMount(items[2]);
  model.setSelected(Boolean.valueOf(items[3]));
break;
case HOST_FILE_SYSTEM:
if (Platform.OS_WIN32.equals(Platform.getOS())) {
model.setHostPathMount(items[2] + SEPARATOR + items[3]);
model.setReadOnly(Boolean.valueOf(items[4]));
model.setSelected(Boolean.valueOf(items[5]));
}
 else {
model.setHostPathMount(items[2]);
model.setReadOnly(Boolean.valueOf(items[3]));
model.setSelected(Boolean.valueOf(items[4]));
}
break;
case NONE:
model.setSelected(Boolean.valueOf(items[2]));
break;
}
return model;
}
Program: 91766
Project: 91766
Buggy source:
/** 
 * Some ToolBar items are depend on each other's state as enablement criteria. They must be created programmatically so the state of other buttons may be changed.
 */
private void hookToolBarItems(){
  IToolBarManager mgr=getViewSite().getActionBars().getToolBarManager();
  pauseAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_PAUSE);
  unpauseAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_RESUME);
  startAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_START);
  stopAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_STOP);
  killAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_KILL);
  removeAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_REMOVE);
  mgr.add(startAction);
  mgr.add(stopAction);
  mgr.add(killAction);
  mgr.add(pauseAction);
  mgr.add(unpauseAction);
  mgr.add(removeAction);
}

Fixed version (ground truth):
/** 
 * Some ToolBar items are depend on each other's state as enablement criteria. They must be created programmatically so the state of other buttons may be changed.
 */
private void hookToolBarItems(){
  IToolBarManager mgr=getViewSite().getActionBars().getToolBarManager();
  pauseAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_PAUSE);
  unpauseAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_RESUME);
  startAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_START);
  stopAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_STOP);
  killAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_KILL);
  removeAction=createAction(DVMessages.getString("String_Node_Str"),"String_Node_Str",SWTImagesFactory.DESC_REMOVE);
  mgr.add(startAction);
  mgr.add(pauseAction);
  mgr.add(unpauseAction);
  mgr.add(stopAction);
  mgr.add(killAction);
  mgr.add(removeAction);
}
Program: 91767
Project: 91767
Buggy source:
/** 
 * Opens a dialog to browse the workspace
 * @return
 */
private SelectionListener onBrowseWorkspace(final Text pathText,final AtomicBoolean workspaceRelativePath,final Class<?> expectedType){
  return new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      final ElementTreeSelectionDialog dialog=new ElementTreeSelectionDialog(getShell(),new WorkbenchLabelProvider(),new WorkbenchContentProvider());
      dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
      dialog.setTitle(LaunchMessages.getString(BROWSE_WORKSPACE_DIALOG_TITLE));
      dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
      dialog.setAllowMultiple(false);
      dialog.setValidator(new ISelectionStatusValidator(){
        @Override public IStatus validate(        Object[] selection){
          if (selection.length == 1 && expectedType.isAssignableFrom(selection[0].getClass())) {
            return new Status(IStatus.OK,Activator.PLUGIN_ID,null);
          }
          return new Status(IStatus.ERROR,Activator.PLUGIN_ID,null);
        }
      }
);
      if (dialog.open() == IDialogConstants.OK_ID) {
        final IResource selection=(IResource)dialog.getFirstResult();
        pathText.setText(selection.getFullPath().toOSString());
        workspaceRelativePath.set(true);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Opens a dialog to browse the workspace
 * @return
 */
private SelectionListener onBrowseWorkspace(final Text pathText,final Class<?> expectedType){
  return new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      final ElementTreeSelectionDialog dialog=new ElementTreeSelectionDialog(getShell(),new WorkbenchLabelProvider(),new WorkbenchContentProvider());
      dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
      dialog.setTitle(LaunchMessages.getString(BROWSE_WORKSPACE_DIALOG_TITLE));
      dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
      dialog.setAllowMultiple(false);
      dialog.setValidator(new ISelectionStatusValidator(){
        @Override public IStatus validate(        Object[] selection){
          if (selection.length == 1 && expectedType.isAssignableFrom(selection[0].getClass())) {
            return new Status(IStatus.OK,Activator.PLUGIN_ID,null);
          }
          return new Status(IStatus.ERROR,Activator.PLUGIN_ID,null);
        }
      }
);
      if (dialog.open() == IDialogConstants.OK_ID) {
        final IResource selection=(IResource)dialog.getFirstResult();
        pathText.setText(selection.getFullPath().toOSString());
        buildContextPathWorkspaceRelative=true;
      }
    }
  }
;
}
Program: 91769
Project: 91769
Buggy source:
@Override public void initializeFrom(final ILaunchConfiguration configuration){
  try {
    this.connectionSelectionComboViewer.setSelection(new StructuredSelection(configuration.getAttribute(DOCKER_CONNECTION,"String_Node_Str")));
    this.buildContextPathText.setText(configuration.getAttribute(SOURCE_PATH_LOCATION,"String_Node_Str"));
    this.buildContextPathWorkspaceRelative=new AtomicBoolean(configuration.getAttribute(SOURCE_PATH_WORKSPACE_RELATIVE_LOCATION,false));
    this.repoNameText.setText(configuration.getAttribute(REPO_NAME,"String_Node_Str"));
    this.quietBuildButton.setSelection(configuration.getAttribute(QUIET_BUILD,false));
    this.noCacheButton.setSelection(configuration.getAttribute(NO_CACHE,false));
    this.removeIntermediateContainersButton.setSelection(configuration.getAttribute(RM_INTERMEDIATE_CONTAINERS,false));
    this.alwaysRemoveIntermediateContainersButton.setSelection(configuration.getAttribute(FORCE_RM_INTERMEDIATE_CONTAINERS,false));
    toggleRemoveIntermediateContainersButtonState();
  }
 catch (  CoreException e) {
    Activator.log(e);
  }
}

Fixed version (ground truth):
@Override public void initializeFrom(final ILaunchConfiguration configuration){
  try {
    this.connectionSelectionComboViewer.setSelection(new StructuredSelection(configuration.getAttribute(DOCKER_CONNECTION,"String_Node_Str")));
    this.buildContextPathText.setText(configuration.getAttribute(SOURCE_PATH_LOCATION,"String_Node_Str"));
    this.buildContextPathWorkspaceRelative=configuration.getAttribute(SOURCE_PATH_WORKSPACE_RELATIVE_LOCATION,false);
    this.repoNameText.setText(configuration.getAttribute(REPO_NAME,"String_Node_Str"));
    this.quietBuildButton.setSelection(configuration.getAttribute(QUIET_BUILD,false));
    this.noCacheButton.setSelection(configuration.getAttribute(NO_CACHE,false));
    this.removeIntermediateContainersButton.setSelection(configuration.getAttribute(RM_INTERMEDIATE_CONTAINERS,false));
    this.alwaysRemoveIntermediateContainersButton.setSelection(configuration.getAttribute(FORCE_RM_INTERMEDIATE_CONTAINERS,false));
    toggleRemoveIntermediateContainersButtonState();
  }
 catch (  CoreException e) {
    Activator.log(e);
  }
}
Program: 91770
Project: 91770
Buggy source:
@Override public void performApply(final ILaunchConfigurationWorkingCopy configuration){
  final IStructuredSelection connectionSelection=(IStructuredSelection)this.connectionSelectionComboViewer.getSelection();
  if (connectionSelection.getFirstElement() != null) {
    configuration.setAttribute(DOCKER_CONNECTION,connectionSelection.getFirstElement().toString());
  }
  configuration.setAttribute(SOURCE_PATH_LOCATION,this.buildContextPathText.getText());
  configuration.setAttribute(SOURCE_PATH_WORKSPACE_RELATIVE_LOCATION,this.buildContextPathWorkspaceRelative.get());
  if (!this.repoNameText.getText().isEmpty()) {
    configuration.setAttribute(REPO_NAME,this.repoNameText.getText());
  }
  configuration.setAttribute(QUIET_BUILD,this.quietBuildButton.getSelection());
  configuration.setAttribute(NO_CACHE,this.noCacheButton.getSelection());
  configuration.setAttribute(RM_INTERMEDIATE_CONTAINERS,this.removeIntermediateContainersButton.getSelection());
  configuration.setAttribute(FORCE_RM_INTERMEDIATE_CONTAINERS,this.alwaysRemoveIntermediateContainersButton.getSelection());
}

Fixed version (ground truth):
@Override public void performApply(final ILaunchConfigurationWorkingCopy configuration){
  final IStructuredSelection connectionSelection=(IStructuredSelection)this.connectionSelectionComboViewer.getSelection();
  if (connectionSelection.getFirstElement() != null) {
    configuration.setAttribute(DOCKER_CONNECTION,connectionSelection.getFirstElement().toString());
  }
  configuration.setAttribute(SOURCE_PATH_LOCATION,this.buildContextPathText.getText());
  configuration.setAttribute(SOURCE_PATH_WORKSPACE_RELATIVE_LOCATION,this.buildContextPathWorkspaceRelative);
  if (!this.repoNameText.getText().isEmpty()) {
    configuration.setAttribute(REPO_NAME,this.repoNameText.getText());
  }
  configuration.setAttribute(QUIET_BUILD,this.quietBuildButton.getSelection());
  configuration.setAttribute(NO_CACHE,this.noCacheButton.getSelection());
  configuration.setAttribute(RM_INTERMEDIATE_CONTAINERS,this.removeIntermediateContainersButton.getSelection());
  configuration.setAttribute(FORCE_RM_INTERMEDIATE_CONTAINERS,this.alwaysRemoveIntermediateContainersButton.getSelection());
}
Program: 91771
Project: 91771
Buggy source:
/** 
 * Opens a dialog to browse the file system and select a directory
 * @return
 */
private SelectionListener onBrowseFileSystemForDirectory(final Text pathText,final AtomicBoolean workspaceRelativePath){
  return new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      final DirectoryDialog dialog=new DirectoryDialog(getShell());
      final String selection=dialog.open();
      if (selection != null) {
        pathText.setText(selection);
        workspaceRelativePath.set(false);
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Opens a dialog to browse the file system and select a directory
 * @return
 */
private SelectionListener onBrowseFileSystemForDirectory(final Text pathText){
  return new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      final DirectoryDialog dialog=new DirectoryDialog(getShell());
      final String selection=dialog.open();
      if (selection != null) {
        pathText.setText(selection);
        buildContextPathWorkspaceRelative=false;
      }
    }
  }
;
}
Program: 91772
Project: 91772
Buggy source:
@Override public boolean equals(Object o){
  if (o instanceof VagrantVM) {
    VagrantVM other=(VagrantVM)o;
    return id.equals(other.id()) && name.equals(other.name()) && provider.equals(other.provider())&& state.equals(other.state())&& state_desc.equals(other.state_desc())&& directory.equals(other.directory());
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (o instanceof VagrantVM) {
    VagrantVM other=(VagrantVM)o;
    return id.equals(other.id()) && name.equals(other.name()) && provider.equals(other.provider())&& directory.equals(other.directory());
  }
  return false;
}