nus-yam/ex-repair huggingface dataset:
Program: 91774
Project: 91774
Buggy source:
private File performInit(String vmName,String boxName,IVagrantConnection connection){
  String stateLoc=Activator.getDefault().getStateLocation().toOSString();
  File vagrantDir=Paths.get(stateLoc,vmName).toFile();
  vagrantDir.mkdir();
  connection.init(vagrantDir);
  Path vagrantFilePath=Paths.get(stateLoc,vmName,"String_Node_Str");
  String defaultContent;
  StringBuffer bcontent=new StringBuffer();
  try {
    defaultContent=new String(Files.readAllBytes(vagrantFilePath),StandardCharsets.UTF_8);
    for (    String line : defaultContent.split("String_Node_Str")) {
      if (line.contains("String_Node_Str")) {
        String defLine=line.replaceAll("String_Node_Str","String_Node_Str" + vmName);
        String boxLine=line.replaceAll("String_Node_Str","String_Node_Str" + boxName + "String_Node_Str");
        bcontent.append(defLine + '\n');
        bcontent.append(boxLine + '\n');
      }
 else {
        bcontent.append(line + '\n');
      }
    }
    Files.write(vagrantFilePath,bcontent.toString().getBytes(StandardCharsets.UTF_8));
  }
 catch (  IOException e) {
  }
  return vagrantDir;
}

Fixed version (ground truth):
private File performInit(String vmName,String boxName,IVagrantConnection connection){
  String stateLoc=Activator.getDefault().getStateLocation().toOSString();
  File vagrantDir=Paths.get(stateLoc,vmName).toFile();
  if (!vagrantDir.mkdir()) {
    CommandUtils.delete(vagrantDir);
    vagrantDir.mkdir();
  }
  connection.init(vagrantDir);
  Path vagrantFilePath=Paths.get(stateLoc,vmName,"String_Node_Str");
  String defaultContent;
  StringBuffer bcontent=new StringBuffer();
  try {
    defaultContent=new String(Files.readAllBytes(vagrantFilePath),StandardCharsets.UTF_8);
    for (    String line : defaultContent.split("String_Node_Str")) {
      if (line.contains("String_Node_Str")) {
        String defLine=line.replaceAll("String_Node_Str","String_Node_Str" + vmName + "String_Node_Str");
        String boxLine=line.replaceAll("String_Node_Str","String_Node_Str" + boxName + "String_Node_Str");
        bcontent.append(defLine + '\n');
        bcontent.append(boxLine + '\n');
      }
 else {
        bcontent.append(line + '\n');
      }
    }
    Files.write(vagrantFilePath,bcontent.toString().getBytes(StandardCharsets.UTF_8));
  }
 catch (  IOException e) {
  }
  return vagrantDir;
}
Program: 91776
Project: 91776
Buggy source:
@Override public void widgetSelected(final SelectionEvent e){
  FileDialog fd=new FileDialog(getShell());
  String location=fd.open();
  if (location != null && !location.isEmpty()) {
    if (location.endsWith("String_Node_Str")) {
      model.setBoxRef(location);
    }
 else {
      model.setVMFile(location);
      vmFileChanged(location);
    }
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(final SelectionEvent e){
  FileDialog fd=new FileDialog(getShell());
  String location=fd.open();
  if (location != null && !location.isEmpty()) {
    model.setVMFile(location);
    vmFileChanged(location);
  }
}
Program: 91777
Project: 91777
Buggy source:
/** 
 * Opens the   {@link ImageSearch} dialog with current image name pre-filled.
 * @return
 */
private SelectionListener onSearchImage(){
  return new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      FileDialog fd=new FileDialog(getShell());
      String location=fd.open();
      if (location != null && !location.isEmpty()) {
        if (location.endsWith("String_Node_Str")) {
          model.setBoxRef(location);
        }
 else {
          model.setVMFile(location);
          vmFileChanged(location);
        }
      }
    }
  }
;
}

Fixed version (ground truth):
private SelectionListener onSearchImage(){
  return new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      FileDialog fd=new FileDialog(getShell());
      String location=fd.open();
      if (location != null && !location.isEmpty()) {
        model.setBoxRef(location);
      }
    }
  }
;
}
Program: 91779
Project: 91779
Buggy source:
@Override public Object execute(final ExecutionEvent event){
  final IWorkbenchPart activePart=HandlerUtil.getActivePart(event);
  final List<IDockerPortMapping> portMappings=getSelectedPortMappings(activePart);
  if (portMappings == null || portMappings.isEmpty()) {
    return null;
  }
  final Job job=new Job(CommandMessages.getString("String_Node_Str")){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      try {
        final IDockerConnection currentConnection=getCurrentConnection(activePart);
        final IDockerPortMapping selectedPort=portMappings.get(0);
        final URI connectionURI=new URI(currentConnection.getUri());
        if ("String_Node_Str".equalsIgnoreCase(connectionURI.getScheme()) || "String_Node_Str".equalsIgnoreCase(connectionURI.getScheme()) || "String_Node_Str".equalsIgnoreCase(connectionURI.getScheme())|| "String_Node_Str".equalsIgnoreCase(connectionURI.getScheme())) {
          final String host=connectionURI.getHost();
          final URL location=new URL("String_Node_Str",host,selectedPort.getPublicPort(),"String_Node_Str");
          openLocationInWebBrowser(location);
        }
      }
 catch (      URISyntaxException|MalformedURLException e) {
        Activator.logErrorMessage(CommandMessages.getString("String_Node_Str"),e);
      }
      monitor.done();
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(true);
  job.schedule();
  return null;
}

Fixed version (ground truth):
@Override public Object execute(final ExecutionEvent event){
  final IWorkbenchPart activePart=HandlerUtil.getActivePart(event);
  final List<IDockerPortMapping> portMappings=getSelectedPortMappings(activePart);
  if (portMappings == null || portMappings.isEmpty()) {
    return null;
  }
  final Job job=new Job(CommandMessages.getString("String_Node_Str")){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      try {
        final IDockerConnection currentConnection=getCurrentConnection(activePart);
        final IDockerPortMapping selectedPort=portMappings.get(0);
        final URI connectionURI=new URI(currentConnection.getUri());
        if ("String_Node_Str".equalsIgnoreCase(connectionURI.getScheme()) || "String_Node_Str".equalsIgnoreCase(connectionURI.getScheme()) || "String_Node_Str".equalsIgnoreCase(connectionURI.getScheme())|| "String_Node_Str".equalsIgnoreCase(connectionURI.getScheme())) {
          final String host="String_Node_Str".equalsIgnoreCase(connectionURI.getScheme()) ? "String_Node_Str" : connectionURI.getHost();
          final URL location=new URL("String_Node_Str",host,selectedPort.getPublicPort(),"String_Node_Str");
          openLocationInWebBrowser(location);
        }
      }
 catch (      URISyntaxException|MalformedURLException e) {
        Activator.logErrorMessage(CommandMessages.getString("String_Node_Str"),e);
      }
      monitor.done();
      return Status.OK_STATUS;
    }
  }
;
  job.setUser(true);
  job.schedule();
  return null;
}
Program: 91780
Project: 91780
Buggy source:
/** 
 * Find the location of 'vagrant' on the system by looking under the environment PATH.
 * @return The location of 'vagrant' as a string if it exists underthe PATH, or null if it could not be found.
 */
public static String findVagrantPath(){
  final String envPath=System.getenv("String_Node_Str");
  if (envPath != null) {
    for (    String dir : envPath.split(File.pathSeparator)) {
      Path vgPath=Paths.get(dir,VG);
      if (vgPath.toFile().exists()) {
        return vgPath.toString();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Find the location of 'vagrant' on the system by looking under the environment PATH.
 * @return The location of 'vagrant' as a string if it exists underthe PATH, or null if it could not be found.
 */
public static String findVagrantPath(){
  final String envPath=System.getenv("String_Node_Str");
  if (envPath != null) {
    for (    String dir : envPath.split(File.pathSeparator)) {
      final String vgName=Platform.OS_WIN32.equals(Platform.getOS()) ? VG + "String_Node_Str" : VG;
      Path vgPath=Paths.get(dir,vgName);
      if (vgPath.toFile().exists()) {
        return vgPath.toString();
      }
    }
  }
  return null;
}
Program: 91781
Project: 91781
Buggy source:
@Override public void run(){
  final ISelection currentSelection=DockerContainersView.this.viewer.getSelection();
  DockerContainersView.this.viewer.refresh();
  if (currentSelection != null) {
    DockerContainersView.this.viewer.setSelection(currentSelection);
  }
  refreshViewTitle();
}

Fixed version (ground truth):
@Override public void run(){
  DockerContainersView.this.viewer.refresh();
  refreshViewTitle();
}
Program: 91782
Project: 91782
Buggy source:
@Override public void listChanged(final IDockerConnection connection,final List<IDockerContainer> containers){
  if (connection.getName().equals(connection.getName())) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        final ISelection currentSelection=DockerContainersView.this.viewer.getSelection();
        DockerContainersView.this.viewer.refresh();
        if (currentSelection != null) {
          DockerContainersView.this.viewer.setSelection(currentSelection);
        }
        refreshViewTitle();
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void listChanged(final IDockerConnection connection,final List<IDockerContainer> containers){
  if (connection.getName().equals(connection.getName())) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        DockerContainersView.this.viewer.refresh();
        refreshViewTitle();
      }
    }
);
  }
}
Program: 91783
Project: 91783
Buggy source:
private void refresh(final IDockerConnection connection){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      final ISelection selection=getCommonViewer().getSelection();
      getCommonViewer().refresh(connection,true);
      if (selection != null) {
        getCommonViewer().setSelection(selection,false);
      }
    }
  }
);
}

Fixed version (ground truth):
private void refresh(final IDockerConnection connection){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      getCommonViewer().refresh(connection,true);
    }
  }
);
}
Program: 91784
Project: 91784
Buggy source:
@Override public void run(){
  final ISelection selection=getCommonViewer().getSelection();
  getCommonViewer().refresh(connection,true);
  if (selection != null) {
    getCommonViewer().setSelection(selection,false);
  }
}

Fixed version (ground truth):
@Override public void run(){
  getCommonViewer().refresh(connection,true);
}
Program: 91785
Project: 91785
Buggy source:
@Override public void run(){
  final ISelection currentSelection=DockerImagesView.this.viewer.getSelection();
  DockerImagesView.this.viewer.refresh();
  if (currentSelection != null) {
    DockerImagesView.this.viewer.setSelection(currentSelection);
  }
  refreshViewTitle();
}

Fixed version (ground truth):
@Override public void run(){
  DockerImagesView.this.viewer.refresh();
  refreshViewTitle();
}
Program: 91786
Project: 91786
Buggy source:
@Override public void listChanged(final IDockerConnection connection,final List<IDockerImage> images){
  if (connection.getName().equals(connection.getName())) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        final ISelection currentSelection=DockerImagesView.this.viewer.getSelection();
        DockerImagesView.this.viewer.refresh();
        if (currentSelection != null) {
          DockerImagesView.this.viewer.setSelection(currentSelection);
        }
        refreshViewTitle();
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void listChanged(final IDockerConnection connection,final List<IDockerImage> images){
  if (connection.getName().equals(connection.getName())) {
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        DockerImagesView.this.viewer.refresh();
        refreshViewTitle();
      }
    }
);
  }
}
Program: 91788
Project: 91788
Buggy source:
@Override public void run(){
  ISelection selection=viewer.getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  try {
    if (obj instanceof PMLineRef) {
      PMLineRef line=(PMLineRef)obj;
      PMFile file=(PMFile)((PMSymbol)line.getParent()).getParent();
      ProfileUIUtils.openEditorAndSelect(file.getPath(),Integer.parseInt(line.getName()));
    }
 else     if (obj instanceof PMFile) {
      PMFile file=(PMFile)obj;
      ProfileUIUtils.openEditorAndSelect(file.getName(),1);
    }
 else     if (obj instanceof PMSymbol) {
      PMSymbol sym=(PMSymbol)obj;
      PMFile file=(PMFile)sym.getParent();
      PMDso dso=(PMDso)file.getParent();
      if (file.getName().equals(PerfPlugin.STRINGS_UnfiledSymbols))       return;
      String binaryPath=dso.getPath();
      ICProject project;
      project=ProfileUIUtils.findCProjectWithAbsolutePath(binaryPath);
      Map<String,int[]> map=ProfileUIUtils.findFunctionsInProject(project,sym.getFunctionName(),-1,file.getPath(),true);
      boolean bFound=false;
      for (      Map.Entry<String,int[]> entry : map.entrySet()) {
        ProfileUIUtils.openEditorAndSelect(entry.getKey(),entry.getValue()[0],entry.getValue()[1]);
        bFound=true;
      }
      if (!bFound) {
        ProfileUIUtils.openEditorAndSelect(file.getPath(),1,ResourcesPlugin.getWorkspace().getRoot().getProject(dso.getName()));
      }
    }
  }
 catch (  NumberFormatException|BadLocationException|CoreException e) {
  }
}

Fixed version (ground truth):
@Override public void run(){
  ISelection selection=viewer.getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  try {
    if (obj instanceof PMLineRef) {
      PMLineRef line=(PMLineRef)obj;
      PMFile file=(PMFile)((PMSymbol)line.getParent()).getParent();
      ProfileUIUtils.openEditorAndSelect(file.getPath(),Integer.parseInt(line.getName()),PerfPlugin.getDefault().getProfiledProject());
    }
 else     if (obj instanceof PMFile) {
      PMFile file=(PMFile)obj;
      ProfileUIUtils.openEditorAndSelect(file.getName(),1);
    }
 else     if (obj instanceof PMSymbol) {
      PMSymbol sym=(PMSymbol)obj;
      PMFile file=(PMFile)sym.getParent();
      PMDso dso=(PMDso)file.getParent();
      if (file.getName().equals(PerfPlugin.STRINGS_UnfiledSymbols))       return;
      String binaryPath=dso.getPath();
      ICProject project;
      project=ProfileUIUtils.findCProjectWithAbsolutePath(binaryPath);
      Map<String,int[]> map=ProfileUIUtils.findFunctionsInProject(project,sym.getFunctionName(),-1,file.getPath(),true);
      boolean bFound=false;
      for (      Map.Entry<String,int[]> entry : map.entrySet()) {
        ProfileUIUtils.openEditorAndSelect(entry.getKey(),entry.getValue()[0],entry.getValue()[1]);
        bFound=true;
      }
      if (!bFound) {
        ProfileUIUtils.openEditorAndSelect(file.getPath(),1,ResourcesPlugin.getWorkspace().getRoot().getProject(dso.getName()));
      }
    }
  }
 catch (  NumberFormatException|BadLocationException|CoreException e) {
  }
}
Program: 91790
Project: 91790
Buggy source:
protected String[] getCommand(String workingDir){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str",workingDir + "String_Node_Str"};
}

Fixed version (ground truth):
protected String[] getCommand(String workingDir){
  return new String[]{"String_Node_Str","String_Node_Str","String_Node_Str" + workingDir + "String_Node_Str"+ "String_Node_Str"};
}
Program: 91791
Project: 91791
Buggy source:
/** 
 * If a key stored in preferences comes from a non-running VM or came from a Vagrant VM (tracked) but is not longer associated with one, then it is safe to remove it.
 */
private void removeKeysFromInnactiveVMs(){
  final String JSCH_ID="String_Node_Str";
  final String KEY="String_Node_Str";
  String newKeys="String_Node_Str";
  String keys=InstanceScope.INSTANCE.getNode(JSCH_ID).get(KEY,"String_Node_Str");
  if (keys.isEmpty()) {
    keys=DefaultScope.INSTANCE.getNode(JSCH_ID).get(KEY,"String_Node_Str");
  }
  for (  String key : keys.split("String_Node_Str")) {
    for (    IVagrantVM vm : vms) {
      if (key.equals(vm.identityFile()) && !vm.state().equals(EnumVMStatus.RUNNING)) {
        newKeys=keys.replaceAll("String_Node_Str" + key + "String_Node_Str","String_Node_Str");
        removeFromTrackedKeys(key);
        break;
      }
    }
    if (isTrackedKey(key)) {
      newKeys=keys.replaceAll("String_Node_Str" + key + "String_Node_Str","String_Node_Str");
      removeFromTrackedKeys(key);
    }
  }
  if (!newKeys.isEmpty() && !newKeys.equals(keys)) {
    InstanceScope.INSTANCE.getNode(JSCH_ID).put(KEY,newKeys);
  }
}

Fixed version (ground truth):
/** 
 * If a key stored in preferences comes from a non-running VM or came from a Vagrant VM (tracked) but is not longer associated with one, then it is safe to remove it.
 */
private void removeKeysFromInnactiveVMs(){
  final String JSCH_ID="String_Node_Str";
  final String KEY="String_Node_Str";
  String newKeys="String_Node_Str";
  String keys=InstanceScope.INSTANCE.getNode(JSCH_ID).get(KEY,"String_Node_Str");
  if (keys.isEmpty()) {
    keys=DefaultScope.INSTANCE.getNode(JSCH_ID).get(KEY,"String_Node_Str");
  }
  boolean vmFound=false;
  for (  String key : keys.split("String_Node_Str")) {
    for (    IVagrantVM vm : vms) {
      if (key.equals(vm.identityFile())) {
        vmFound=true;
        if (!EnumVMStatus.RUNNING.equals(EnumVMStatus.fromStatusMessage(vm.state()))) {
          newKeys=keys.replaceAll("String_Node_Str" + key + "String_Node_Str","String_Node_Str");
          removeFromTrackedKeys(key);
          break;
        }
      }
    }
    if (!vmFound && isTrackedKey(key)) {
      newKeys=keys.replaceAll("String_Node_Str" + key + "String_Node_Str","String_Node_Str");
      removeFromTrackedKeys(key);
    }
  }
  if (!newKeys.isEmpty() && !newKeys.equals(keys)) {
    InstanceScope.INSTANCE.getNode(JSCH_ID).put(KEY,newKeys);
  }
}
Program: 91792
Project: 91792
Buggy source:
public VagrantVM(String id,String name,String provider,String state,String state_desc,File directory,String ip,String user,String identityFile){
  this.id=id;
  this.name=name;
  this.provider=provider;
  this.state=state;
  this.state_desc=state_desc;
  this.directory=directory;
  this.ip=ip;
  this.user=user;
  this.identityFile=identityFile;
}

Fixed version (ground truth):
public VagrantVM(String id,String name,String provider,String state,String state_desc,File directory,String ip,String user,int port,String identityFile){
  this.id=id;
  this.name=name;
  this.provider=provider;
  this.state=state;
  this.state_desc=state_desc;
  this.directory=directory;
  this.ip=ip;
  this.user=user;
  this.port=port;
  this.identityFile=identityFile;
}
Program: 91793
Project: 91793
Buggy source:
@Override void executeInJob(final IVagrantVM vm,IProgressMonitor monitor){
  Map<String,Object> properties=new HashMap<>();
  properties.put("String_Node_Str",300);
  properties.put("String_Node_Str",22);
  properties.put("String_Node_Str","String_Node_Str");
  properties.put("String_Node_Str",null);
  properties.put("String_Node_Str","String_Node_Str");
  if (!vm.identityFile().isEmpty()) {
    setupKeyPreferences(vm.identityFile());
  }
  properties.put("String_Node_Str","String_Node_Str");
  properties.put("String_Node_Str",vm.ip());
  properties.put("String_Node_Str",vm.user());
  properties.put("String_Node_Str",null);
  properties.put("String_Node_Str",0);
  SshLauncherDelegate delegate=new SshLauncherDelegate();
  delegate.execute(properties,null);
}

Fixed version (ground truth):
@Override void executeInJob(final IVagrantVM vm,IProgressMonitor monitor){
  Map<String,Object> properties=new HashMap<>();
  properties.put("String_Node_Str",300);
  properties.put("String_Node_Str",vm.port());
  properties.put("String_Node_Str","String_Node_Str");
  properties.put("String_Node_Str",null);
  properties.put("String_Node_Str","String_Node_Str");
  if (!vm.identityFile().isEmpty()) {
    setupKeyPreferences(vm.identityFile());
  }
  properties.put("String_Node_Str","String_Node_Str");
  properties.put("String_Node_Str",vm.ip());
  properties.put("String_Node_Str",vm.user());
  properties.put("String_Node_Str",null);
  properties.put("String_Node_Str",0);
  SshLauncherDelegate delegate=new SshLauncherDelegate();
  delegate.execute(properties,null);
}
Program: 91797
Project: 91797
Buggy source:
@Test public void testAnnotateString() throws CoreException {
  ILaunchConfigurationWorkingCopy tempConfig=config.copy("String_Node_Str");
  tempConfig.setAttribute(PerfPlugin.ATTR_Kernel_Location,"String_Node_Str");
  tempConfig.setAttribute(PerfPlugin.ATTR_ModuleSymbols,true);
  String[] annotateString=PerfCore.getAnnotateString(tempConfig,"String_Node_Str","String_Node_Str","String_Node_Str",false);
  String[] expectedString=new String[]{PerfPlugin.PERF_COMMAND,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  assertArrayEquals(expectedString,annotateString);
}

Fixed version (ground truth):
@Test public void testAnnotateString() throws CoreException {
  ILaunchConfigurationWorkingCopy tempConfig=config.copy("String_Node_Str");
  tempConfig.setAttribute(PerfPlugin.ATTR_Kernel_Location,"String_Node_Str");
  tempConfig.setAttribute(PerfPlugin.ATTR_ModuleSymbols,true);
  String[] annotateString=PerfCore.getAnnotateString(tempConfig,"String_Node_Str","String_Node_Str","String_Node_Str",false);
  String[] expectedString=new String[]{PerfPlugin.PERF_COMMAND,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  assertArrayEquals(expectedString,annotateString);
}
Program: 91798
Project: 91798
Buggy source:
public static String[] getAnnotateString(ILaunchConfiguration config,String dso,String symbol,String perfDataLoc,boolean oldPerfVersion){
  ArrayList<String> base=new ArrayList<>();
  if (oldPerfVersion) {
    base.addAll(Arrays.asList(new String[]{PerfPlugin.PERF_COMMAND,"String_Node_Str","String_Node_Str",symbol,"String_Node_Str","String_Node_Str"}));
  }
 else {
    base.addAll(Arrays.asList(new String[]{PerfPlugin.PERF_COMMAND,"String_Node_Str","String_Node_Str",dso,"String_Node_Str",symbol,"String_Node_Str","String_Node_Str"}));
  }
  if (config != null) {
    try {
      String kernelLoc=config.getAttribute(PerfPlugin.ATTR_Kernel_Location,PerfPlugin.ATTR_Kernel_Location_default);
      if (!kernelLoc.equals(PerfPlugin.ATTR_Kernel_Location_default)) {
        base.add("String_Node_Str");
        base.add(kernelLoc);
      }
      if (config.getAttribute(PerfPlugin.ATTR_ModuleSymbols,PerfPlugin.ATTR_ModuleSymbols_default)) {
        base.add("String_Node_Str");
      }
      if (perfDataLoc != null) {
        base.add("String_Node_Str");
        base.add(perfDataLoc);
      }
    }
 catch (    CoreException e) {
    }
  }
  return base.toArray(new String[base.size()]);
}

Fixed version (ground truth):
public static String[] getAnnotateString(ILaunchConfiguration config,String dso,String symbol,String perfDataLoc,boolean oldPerfVersion){
  ArrayList<String> base=new ArrayList<>();
  if (oldPerfVersion) {
    base.addAll(Arrays.asList(new String[]{PerfPlugin.PERF_COMMAND,"String_Node_Str","String_Node_Str",symbol,"String_Node_Str","String_Node_Str"}));
  }
 else {
    base.addAll(Arrays.asList(new String[]{PerfPlugin.PERF_COMMAND,"String_Node_Str","String_Node_Str","String_Node_Str",dso,"String_Node_Str",symbol,"String_Node_Str","String_Node_Str"}));
  }
  if (config != null) {
    try {
      String kernelLoc=config.getAttribute(PerfPlugin.ATTR_Kernel_Location,PerfPlugin.ATTR_Kernel_Location_default);
      if (!kernelLoc.equals(PerfPlugin.ATTR_Kernel_Location_default)) {
        base.add("String_Node_Str");
        base.add(kernelLoc);
      }
      if (config.getAttribute(PerfPlugin.ATTR_ModuleSymbols,PerfPlugin.ATTR_ModuleSymbols_default)) {
        base.add("String_Node_Str");
      }
      if (perfDataLoc != null) {
        base.add("String_Node_Str");
        base.add(perfDataLoc);
      }
    }
 catch (    CoreException e) {
    }
  }
  base.add("String_Node_Str");
  base.add("String_Node_Str");
  return base.toArray(new String[base.size()]);
}
Program: 91800
Project: 91800
Buggy source:
public ContainerCommitPage(String container){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getFormattedString(DESC,container.substring(0,8)));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
}

Fixed version (ground truth):
public ContainerCommitPage(String container){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getFormattedString(DESC,container.substring(0,8)));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
}
Program: 91801
Project: 91801
Buggy source:
public ContainerCreatePage(IDockerConnection connection,String image){
  super(WizardMessages.getString(NAME));
  this.connection=connection;
  this.image=image;
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
}

Fixed version (ground truth):
public ContainerCreatePage(IDockerConnection connection,String image){
  super(WizardMessages.getString(NAME));
  this.connection=connection;
  this.image=image;
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
}
Program: 91802
Project: 91802
Buggy source:
public ImageBuildPage(){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
}

Fixed version (ground truth):
public ImageBuildPage(){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
}
Program: 91803
Project: 91803
Buggy source:
public ImagePullPage(){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
}

Fixed version (ground truth):
public ImagePullPage(){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
}
Program: 91804
Project: 91804
Buggy source:
public ImagePushPage(IDockerImage image){
  super(WizardMessages.getString(NAME));
  this.image=image;
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
}

Fixed version (ground truth):
public ImagePushPage(IDockerImage image){
  super(WizardMessages.getString(NAME));
  this.image=image;
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
}
Program: 91805
Project: 91805
Buggy source:
public ImageRemovePage(){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
}

Fixed version (ground truth):
public ImageRemovePage(){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
}
Program: 91806
Project: 91806
Buggy source:
public ImageRemoveTagPage(IDockerImage image){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
  this.image=image;
}

Fixed version (ground truth):
public ImageRemoveTagPage(IDockerImage image){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
  this.image=image;
}
Program: 91807
Project: 91807
Buggy source:
public ImageTagPage(String image){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_DOCKER_LARGE);
}

Fixed version (ground truth):
public ImageTagPage(String image){
  super(WizardMessages.getString(NAME));
  setDescription(WizardMessages.getString(DESC));
  setTitle(WizardMessages.getString(TITLE));
  setImageDescriptor(SWTImagesFactory.DESC_WIZARD);
}
Program: 91808
Project: 91808
Buggy source:
private void performTagImage(final ImageTag wizard){
  final Job tagImageJob=new Job(DVMessages.getString(TAG_IMAGE_JOB_TITLE)){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      final String tag=wizard.getTag();
      monitor.beginTask(DVMessages.getString(TAG_IMAGE_MSG),2);
      try {
        ((DockerConnection)connection).tagImage(image.id(),tag);
        monitor.worked(1);
        ((DockerConnection)connection).getImages(true);
        monitor.worked(1);
      }
 catch (      final DockerException e) {
        Display.getDefault().syncExec(new Runnable(){
          @Override public void run(){
            MessageDialog.openError(Display.getCurrent().getActiveShell(),DVMessages.getFormattedString(ERROR_TAGGING_IMAGE,tag),e.getMessage());
          }
        }
);
      }
catch (      InterruptedException e) {
      }
 finally {
        monitor.done();
      }
      return Status.OK_STATUS;
    }
  }
;
  tagImageJob.schedule();
}

Fixed version (ground truth):
private void performTagImage(final ImageTag wizard){
  final Job tagImageJob=new Job(DVMessages.getString(TAG_IMAGE_JOB_TITLE)){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      final String tag=wizard.getTag();
      monitor.beginTask(DVMessages.getFormattedString(TAG_IMAGE_MSG,tag),2);
      try {
        ((DockerConnection)connection).tagImage(image.id(),tag);
        monitor.worked(1);
        ((DockerConnection)connection).getImages(true);
        monitor.worked(1);
      }
 catch (      final DockerException e) {
        Display.getDefault().syncExec(new Runnable(){
          @Override public void run(){
            MessageDialog.openError(Display.getCurrent().getActiveShell(),DVMessages.getFormattedString(ERROR_TAGGING_IMAGE,tag),e.getMessage());
          }
        }
);
      }
catch (      InterruptedException e) {
      }
 finally {
        monitor.done();
      }
      return Status.OK_STATUS;
    }
  }
;
  tagImageJob.schedule();
}
Program: 91809
Project: 91809
Buggy source:
private void performPullImage(final ImagePull wizard){
  final Job pullImageJob=new Job(DVMessages.getString(PULL_IMAGE_JOB_TITLE)){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      final String id=wizard.getImageId();
      monitor.beginTask(DVMessages.getString(PULL_IMAGE_JOB_TITLE),1);
      try {
        ((DockerConnection)connection).pullImage(id,new ImagePullProgressHandler(connection,id));
        monitor.worked(1);
      }
 catch (      final DockerException e) {
        Display.getDefault().syncExec(new Runnable(){
          @Override public void run(){
            MessageDialog.openError(Display.getCurrent().getActiveShell(),DVMessages.getFormattedString(ERROR_PULLING_IMAGE,id),e.getMessage());
          }
        }
);
      }
catch (      InterruptedException e) {
      }
 finally {
        monitor.done();
      }
      return Status.OK_STATUS;
    }
  }
;
  pullImageJob.schedule();
}

Fixed version (ground truth):
private void performPullImage(final ImagePull wizard){
  final Job pullImageJob=new Job(DVMessages.getFormattedString(PULL_IMAGE_JOB_TITLE,wizard.getImageId())){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      final String id=wizard.getImageId();
      monitor.beginTask(DVMessages.getString(PULL_IMAGE_JOB_TASK),IProgressMonitor.UNKNOWN);
      try {
        ((DockerConnection)connection).pullImage(id,new ImagePullProgressHandler(connection,id));
      }
 catch (      final DockerException e) {
        Display.getDefault().syncExec(new Runnable(){
          @Override public void run(){
            MessageDialog.openError(Display.getCurrent().getActiveShell(),DVMessages.getFormattedString(ERROR_PULLING_IMAGE,id),e.getMessage());
          }
        }
);
      }
catch (      InterruptedException e) {
      }
 finally {
        monitor.done();
      }
      return Status.OK_STATUS;
    }
  }
;
  pullImageJob.schedule();
}
Program: 91810
Project: 91810
Buggy source:
private void performPushImage(final ImagePush wizard){
  final Job pushImageJob=new Job(DVMessages.getString(PUSH_IMAGE_JOB_TITLE)){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      final String tag=wizard.getImageTag();
      monitor.beginTask(DVMessages.getString(PUSH_IMAGE_JOB_TITLE),1);
      try {
        ((DockerConnection)connection).pushImage(tag,new ImagePushProgressHandler(connection,tag));
        monitor.worked(1);
      }
 catch (      final DockerException e) {
        Display.getDefault().syncExec(new Runnable(){
          @Override public void run(){
            MessageDialog.openError(Display.getCurrent().getActiveShell(),DVMessages.getFormattedString(ERROR_PUSHING_IMAGE,tag),e.getMessage());
          }
        }
);
      }
catch (      InterruptedException e) {
      }
 finally {
        monitor.done();
      }
      return Status.OK_STATUS;
    }
  }
;
  pushImageJob.schedule();
}

Fixed version (ground truth):
private void performPushImage(final ImagePush wizard){
  final Job pushImageJob=new Job(DVMessages.getFormattedString(PUSH_IMAGE_JOB_TITLE,wizard.getImageTag())){
    @Override protected IStatus run(    final IProgressMonitor monitor){
      final String tag=wizard.getImageTag();
      monitor.beginTask(DVMessages.getString(PUSH_IMAGE_JOB_TASK),IProgressMonitor.UNKNOWN);
      try {
        ((DockerConnection)connection).pushImage(tag,new ImagePushProgressHandler(connection,tag));
      }
 catch (      final DockerException e) {
        Display.getDefault().syncExec(new Runnable(){
          @Override public void run(){
            MessageDialog.openError(Display.getCurrent().getActiveShell(),DVMessages.getFormattedString(ERROR_PUSHING_IMAGE,tag),e.getMessage());
          }
        }
);
      }
catch (      InterruptedException e) {
      }
 finally {
        monitor.done();
      }
      return Status.OK_STATUS;
    }
  }
;
  pushImageJob.schedule();
}
Program: 91813
Project: 91813
Buggy source:
@Override public boolean isEnabled(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return false;
  }
  IWorkbenchPage page=window.getActivePage();
  IWorkbenchPart part=page.getActivePart();
  if (part instanceof FilterView) {
    FilterView tcv=(FilterView)part;
    ISelection selection=tcv.getSite().getSelectionProvider().getSelection();
    if (!selection.isEmpty()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isEnabled(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return false;
  }
  IWorkbenchPage page=window.getActivePage();
  IWorkbenchPart part=page.getActivePart();
  if (part instanceof FilterView) {
    FilterView tcv=(FilterView)part;
    ISelection selection=tcv.getSite().getSelectionProvider().getSelection();
    if (!selection.isEmpty() && tcv.isTreeInFocus()) {
      return true;
    }
  }
  return false;
}
Program: 91814
Project: 91814
Buggy source:
@Override public boolean isEnabled(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return false;
  }
  IWorkbenchPage page=window.getActivePage();
  IWorkbenchPart part=page.getActivePart();
  if (part instanceof FilterView) {
    FilterView tcv=(FilterView)part;
    ISelection selection=tcv.getSite().getSelectionProvider().getSelection();
    if (!selection.isEmpty()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isEnabled(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return false;
  }
  IWorkbenchPage page=window.getActivePage();
  IWorkbenchPart part=page.getActivePart();
  if (part instanceof FilterView) {
    FilterView tcv=(FilterView)part;
    ISelection selection=tcv.getSite().getSelectionProvider().getSelection();
    if (!selection.isEmpty() && tcv.isTreeInFocus()) {
      return true;
    }
  }
  return false;
}
Program: 91815
Project: 91815
Buggy source:
@Override public boolean isEnabled(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return false;
  }
  IWorkbenchPage page=window.getActivePage();
  IWorkbenchPart part=page.getActivePart();
  if (!(part instanceof FilterView)) {
    return false;
  }
  FilterView v=(FilterView)part;
  ITmfFilterTreeNode sel=v.getSelection();
  if (sel == null) {
    sel=v.getFilterRoot();
  }
  ITmfFilterTreeNode objectToPaste=FilterEditUtils.getTransferredTreeNode();
  if (objectToPaste != null && (sel.getValidChildren().contains(objectToPaste.getNodeName()) || TmfFilterNode.NODE_NAME.equals(objectToPaste.getNodeName()))) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isEnabled(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return false;
  }
  IWorkbenchPage page=window.getActivePage();
  IWorkbenchPart part=page.getActivePart();
  if (!(part instanceof FilterView)) {
    return false;
  }
  FilterView v=(FilterView)part;
  ITmfFilterTreeNode sel=v.getSelection();
  if (sel == null) {
    sel=v.getFilterRoot();
  }
  ITmfFilterTreeNode objectToPaste=FilterEditUtils.getTransferredTreeNode();
  if (v.isTreeInFocus() && objectToPaste != null && (sel.getValidChildren().contains(objectToPaste.getNodeName()) || TmfFilterNode.NODE_NAME.equals(objectToPaste.getNodeName()))) {
    return true;
  }
  return false;
}
Program: 91818
Project: 91818
Buggy source:
@Override public Process execute(IPath commandPath,String[] args,String[] env,IPath changeToDirectory,IProgressMonitor monitor){
  return execute(commandPath,args,env,changeToDirectory,monitor);
}

Fixed version (ground truth):
@Override public Process execute(IPath commandPath,String[] args,String[] env,IPath changeToDirectory,IProgressMonitor monitor){
  return execute(commandPath,args,env,changeToDirectory,monitor,null);
}
Program: 91819
Project: 91819
Buggy source:
@Override public Process execute(IPath commandPath,String[] args,String[] env,IPath changeToDirectory,IProgressMonitor monitor) throws CoreException {
  return execute(commandPath,args,env,changeToDirectory,monitor);
}

Fixed version (ground truth):
@Override public Process execute(IPath commandPath,String[] args,String[] env,IPath changeToDirectory,IProgressMonitor monitor) throws CoreException {
  return execute(commandPath,args,env,changeToDirectory,monitor,null);
}
Program: 91820
Project: 91820
Buggy source:
/** 
 * Executes an Eclipse command with command ID
 * @param commandId
 * @throws ExecutionException
 * @throws NotDefinedException
 * @throws NotEnabledException
 * @throws NotHandledException
 */
public void executeCommand(String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
  IHandlerService handlerService=(IHandlerService)fControlView.getSite().getService(IHandlerService.class);
  handlerService.executeCommand(COMMAND_CATEGORY_PREFIX + commandId,null);
  waitForJobs();
}

Fixed version (ground truth):
/** 
 * Executes an Eclipse command with command ID
 * @param commandId
 * @throws ExecutionException
 * @throws NotDefinedException
 * @throws NotEnabledException
 * @throws NotHandledException
 */
public void executeCommand(String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
  Object handlerServiceObject=fControlView.getSite().getService(IHandlerService.class);
  IHandlerService handlerService=(IHandlerService)handlerServiceObject;
  handlerService.executeCommand(COMMAND_CATEGORY_PREFIX + commandId,null);
  waitForJobs();
}
Program: 91821
Project: 91821
Buggy source:
@Override public void run(){
  try {
    IHandlerService handlerService=(IHandlerService)page.getActivePart().getSite().getService(IHandlerService.class);
    boolean executeCommand=((element instanceof TmfTraceElement) || (element instanceof TmfAnalysisOutputElement));
    if (!executeCommand && element instanceof TmfExperimentElement) {
      TmfExperimentElement experiment=(TmfExperimentElement)element;
      executeCommand=(experiment.getTraces().size() > 0);
    }
    if (executeCommand) {
      handlerService.executeCommand(OPEN_COMMAND_ID,null);
    }
  }
 catch (  ExecutionException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
catch (  NotDefinedException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
catch (  NotEnabledException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
catch (  NotHandledException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    Object service=page.getActivePart().getSite().getService(IHandlerService.class);
    IHandlerService handlerService=(IHandlerService)service;
    boolean executeCommand=((element instanceof TmfTraceElement) || (element instanceof TmfAnalysisOutputElement));
    if (!executeCommand && element instanceof TmfExperimentElement) {
      TmfExperimentElement experiment=(TmfExperimentElement)element;
      executeCommand=(experiment.getTraces().size() > 0);
    }
    if (executeCommand) {
      handlerService.executeCommand(OPEN_COMMAND_ID,null);
    }
  }
 catch (  ExecutionException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
catch (  NotDefinedException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
catch (  NotEnabledException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
catch (  NotHandledException e) {
    Activator.getDefault().logError("String_Node_Str" + element.getName(),e);
  }
}
Program: 91823
Project: 91823
Buggy source:
/** 
 * Sets view part.
 * @param viewSite The view part to set
 */
public void setSite(ViewPart viewSite){
  fSite=viewSite;
  fSite.getSite().setSelectionProvider(fSelProvider);
  IContextService service=(IContextService)fSite.getSite().getWorkbenchWindow().getService(IContextService.class);
  service.activateContext("String_Node_Str");
  service.activateContext(IContextIds.CONTEXT_ID_WINDOW);
}

Fixed version (ground truth):
/** 
 * Sets view part.
 * @param viewSite The view part to set
 */
public void setSite(ViewPart viewSite){
  fSite=viewSite;
  fSite.getSite().setSelectionProvider(fSelProvider);
  Object serviceObject=fSite.getSite().getWorkbenchWindow().getService(IContextService.class);
  IContextService service=(IContextService)serviceObject;
  service.activateContext("String_Node_Str");
  service.activateContext(IContextIds.CONTEXT_ID_WINDOW);
}
Program: 91824
Project: 91824
Buggy source:
private void dispose(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return;
  }
  IHandlerService service=(IHandlerService)window.getService(IHandlerService.class);
  for (  IHandlerActivation activation : fHandlerActivations) {
    service.deactivateHandler(activation);
  }
  fGoToMessageForKeyBinding=null;
  fFindForKeyBinding=null;
  fMoveUpForKeyBinding=null;
  fMoveDownForKeyBinding=null;
  fMoveLeftForKeyBinding=null;
  fMoveRightForKeyBinding=null;
  fShowNodeStartForKeyBinding=null;
  fShowNodeEndForKeyBinding=null;
}

Fixed version (ground truth):
private void dispose(){
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window == null) {
    return;
  }
  Object serviceObject=window.getService(IHandlerService.class);
  IHandlerService service=(IHandlerService)serviceObject;
  for (  IHandlerActivation activation : fHandlerActivations) {
    service.deactivateHandler(activation);
  }
  fGoToMessageForKeyBinding=null;
  fFindForKeyBinding=null;
  fMoveUpForKeyBinding=null;
  fMoveDownForKeyBinding=null;
  fMoveLeftForKeyBinding=null;
  fMoveRightForKeyBinding=null;
  fShowNodeStartForKeyBinding=null;
  fShowNodeEndForKeyBinding=null;
}
Program: 91826
Project: 91826
Buggy source:
/** 
 * @since 3.2
 */
@Override public void partDeactivated(IWorkbenchPart part){
  if (part == this && fPrintHandlerActivation != null) {
    final IHandlerService hs=(IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
    hs.deactivateHandler(fPrintHandlerActivation);
  }
}

Fixed version (ground truth):
/** 
 * @since 3.2
 */
@Override public void partDeactivated(IWorkbenchPart part){
  if (part == this && fPrintHandlerActivation != null) {
    final Object service=PlatformUI.getWorkbench().getService(IHandlerService.class);
    ((IHandlerService)service).deactivateHandler(fPrintHandlerActivation);
  }
}
Program: 91827
Project: 91827
Buggy source:
/** 
 * @since 3.2
 */
@Override public void partActivated(IWorkbenchPart part){
  if (part == this) {
    final IHandlerService hs=(IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
    fPrintHandlerActivation=hs.activateHandler(ActionFactory.PRINT.getCommandId(),fPrintActionHandler);
  }
}

Fixed version (ground truth):
/** 
 * @since 3.2
 */
@Override public void partActivated(IWorkbenchPart part){
  if (part == this) {
    final Object service=PlatformUI.getWorkbench().getService(IHandlerService.class);
    fPrintHandlerActivation=((IHandlerService)service).activateHandler(ActionFactory.PRINT.getCommandId(),fPrintActionHandler);
  }
}
Program: 91831
Project: 91831
Buggy source:
@Override public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
  if (trace == null) {
    throw new TmfAnalysisException(Messages.TmfAbstractAnalysisModule_NullTrace);
  }
  if (fTrace != null) {
    throw new TmfAnalysisException(NLS.bind(Messages.TmfAbstractAnalysisModule_TraceSetMoreThanOnce,getName()));
  }
  if (!canExecute(trace)) {
    throw new TmfAnalysisException(NLS.bind(Messages.TmfAbstractAnalysisModule_AnalysisCannotExecute,getName()));
  }
  fTrace=trace;
  fParameterProviders=TmfAnalysisManager.getParameterProviders(this,fTrace);
  for (  IAnalysisParameterProvider provider : fParameterProviders) {
    provider.registerModule(this);
  }
  resetAnalysis();
  fStarted=false;
}

Fixed version (ground truth):
@Override public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
  if (trace == null) {
    throw new TmfAnalysisException(Messages.TmfAbstractAnalysisModule_NullTrace);
  }
  if (fTrace != null) {
    throw new TmfAnalysisException(NLS.bind(Messages.TmfAbstractAnalysisModule_TraceSetMoreThanOnce,getName()));
  }
  if (!canExecute(trace)) {
    throw new TmfAnalysisException(NLS.bind(Messages.TmfAbstractAnalysisModule_AnalysisCannotExecute,getName()));
  }
  fTrace=trace;
  fParameterProviders=TmfAnalysisManager.getParameterProviders(this,trace);
  for (  IAnalysisParameterProvider provider : fParameterProviders) {
    provider.registerModule(this);
  }
  resetAnalysis();
  fStarted=false;
}