nus-yam/ex-repair huggingface dataset:
Program: 141648
Project: 141648
Buggy source:
protected void exportRouteUsedJobBundle(IRepositoryViewObject object,File filePath,String jobVersion,String bundleName,String bundleSymbolicName,String bundleVersion,String routeName,String routeVersion,String context) throws InvocationTargetException, InterruptedException {
  RouteDedicatedJobManager talendJobManager=new RouteDedicatedJobManager(getExportChoice(),context);
  talendJobManager.setJobVersion(jobVersion);
  talendJobManager.setBundleName(bundleName);
  talendJobManager.setBundleSymbolicName(bundleSymbolicName);
  talendJobManager.setBundleVersion(bundleVersion);
  talendJobManager.setDestinationPath(filePath.getAbsolutePath());
  talendJobManager.setRouteName(routeName);
  talendJobManager.setRouteVersion(routeVersion);
  talendJobManager.setGroupId(getGroupId());
  talendJobManager.setArtifactId(getArtifactId());
  talendJobManager.setArtifactVersion(getArtifactVersion());
  RepositoryNode node=new RepositoryNode(object,null,ENodeType.REPOSITORY_ELEMENT);
  JobExportAction action=new RouteBundleExportAction(Collections.singletonList(node),jobVersion,bundleVersion,talendJobManager,getTempDir(),"String_Node_Str");
  action.run(monitor);
}

Fixed version (ground truth):
protected void exportRouteUsedJobBundle(IRepositoryViewObject object,File filePath,String jobVersion,String bundleName,String bundleSymbolicName,String bundleVersion,String routeName,String routeVersion,String context) throws InvocationTargetException, InterruptedException {
  RouteDedicatedJobManager talendJobManager=new RouteDedicatedJobManager(getExportChoice(),context);
  talendJobManager.setJobVersion(jobVersion);
  talendJobManager.setBundleName(bundleName);
  talendJobManager.setBundleSymbolicName(bundleSymbolicName);
  talendJobManager.setBundleVersion(bundleVersion);
  talendJobManager.setDestinationPath(filePath.getAbsolutePath());
  talendJobManager.setRouteName(routeName);
  talendJobManager.setRouteVersion(routeVersion);
  talendJobManager.setGroupId(getGroupId());
  talendJobManager.setArtifactId(getArtifactId());
  talendJobManager.setArtifactVersion(getArtifactVersion());
  RepositoryNode node=new RepositoryNode(object,null,ENodeType.REPOSITORY_ELEMENT);
  node.getObject().getProperty().setVersion(jobVersion);
  JobExportAction action=new RouteBundleExportAction(Collections.singletonList(node),jobVersion,bundleVersion,talendJobManager,getTempDir(),"String_Node_Str");
  action.run(monitor);
}
Program: 141649
Project: 141649
Buggy source:
public IBuildJobHandler getBuildJobHandler(){
  if (buildJobHandler == null) {
    buildJobHandler=BuildJobFactory.createBuildJobHandler(getProcessItem(),getContextName(),version,getExportChoiceMap(),"String_Node_Str");
  }
  return buildJobHandler;
}

Fixed version (ground truth):
public IBuildJobHandler getBuildJobHandler(){
  if (buildJobHandler == null && getBuildProject()) {
    buildJobHandler=BuildJobFactory.createBuildJobHandler(getProcessItem(),getContextName(),version,getExportChoiceMap(),"String_Node_Str");
  }
  return buildJobHandler;
}
Program: 141650
Project: 141650
Buggy source:
@Override public void generatePom(int option){
  IRepositoryNode repositoryNode=RepositorySeekerManager.getInstance().searchRepoViewNode(getProperty().getId(),false);
  if (option == 1) {
    ProcessItem processItem=(ProcessItem)getProperty().getItem();
    Object bt=processItem.getProperty().getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
    if (processItem instanceof CamelProcessItem) {
      CamelProcessItem camelProcessItem=(CamelProcessItem)processItem;
      if ("String_Node_Str".equals(bt)) {
        camelProcessItem.setExportMicroService(false);
      }
 else {
        camelProcessItem.setExportMicroService(true);
      }
    }
    try {
      ProcessorUtilities.generateCode(processItem,getContext().getName(),true,false);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    super.generatePom(option);
  }
  try {
    IRunnableWithProgress action=new JavaCamelJobScriptsExportWSAction(repositoryNode,getProperty().getVersion(),"String_Node_Str",false);
    action.run(new NullProgressMonitor());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void generatePom(int option){
  IRepositoryNode repositoryNode=RepositorySeekerManager.getInstance().searchRepoViewNode(getProperty().getId(),false);
  if (option == 1) {
    ProcessItem processItem=(ProcessItem)getProperty().getItem();
    Object bt=processItem.getProperty().getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
    if (processItem instanceof CamelProcessItem) {
      CamelProcessItem camelProcessItem=(CamelProcessItem)processItem;
      if (bt == null || "String_Node_Str".equals(bt)) {
        camelProcessItem.setExportMicroService(false);
      }
 else {
        camelProcessItem.setExportMicroService(true);
      }
    }
    try {
      ProcessorUtilities.generateCode(processItem,getContext().getName(),true,false);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    super.generatePom(option);
  }
  try {
    IRunnableWithProgress action=new JavaCamelJobScriptsExportWSAction(repositoryNode,getProperty().getVersion(),"String_Node_Str",false);
    action.run(new NullProgressMonitor());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 141651
Project: 141651
Buggy source:
@Override public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  if (!PluginChecker.isTIS()) {
    return;
  }
  NexusServerBean nexusServerBean=TalendLibsServerManager.getInstance().getCustomNexusServer();
  if (nexusServerBean == null) {
    return;
  }
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibrariesService.class)) {
    List<? extends INode> graphicalNodes=this.getProcess().getGraphicalNodes();
    for (    INode node : graphicalNodes) {
      if (node.getComponent().getName().equals("String_Node_Str")) {
        List<Map<String,String>> jars=(List)node.getElementParameter("String_Node_Str").getValue();
        try {
          if (isAvailable(nexusServerBean)) {
            new ProgressMonitorDialog(getParent().getEditorSite().getShell()).run(true,true,new RunnableWithProgress(jars,null));
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
        Display.getDefault().asyncExec(new Runnable(){
          @Override public void run(){
            getProcess().refreshProcess();
          }
        }
);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor monitor){
  super.doSave(monitor);
  if (!PluginChecker.isTIS()) {
    return;
  }
  NexusServerBean nexusServerBean=TalendLibsServerManager.getInstance().getCustomNexusServer();
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibrariesService.class)) {
    List<? extends INode> graphicalNodes=this.getProcess().getGraphicalNodes();
    for (    INode node : graphicalNodes) {
      if (node.getComponent().getName().equals("String_Node_Str")) {
        List<Map<String,String>> jars=(List)node.getElementParameter("String_Node_Str").getValue();
        if (jars == null || jars.isEmpty()) {
          continue;
        }
        boolean nexusIsAvailable=nexusServerBean != null && isAvailable(nexusServerBean);
        try {
          new ProgressMonitorDialog(getParent().getEditorSite().getShell()).run(true,true,new RunnableWithProgress(jars,null,nexusIsAvailable));
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
        Display.getDefault().asyncExec(new Runnable(){
          @Override public void run(){
            getProcess().refreshProcess();
          }
        }
);
      }
    }
  }
}
Program: 141652
Project: 141652
Buggy source:
public RunnableWithProgress(List jars,List needUpdateJars){
  this.jars=jars;
  this.needUpdateJars=needUpdateJars;
}

Fixed version (ground truth):
public RunnableWithProgress(List jars,List needUpdateJars,boolean updateNexusJars){
  this.jars=jars;
  this.needUpdateJars=needUpdateJars;
  this.updateNexusJars=updateNexusJars;
}
Program: 141655
Project: 141655
Buggy source:
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  BeanItem beanItem=(BeanItem)repositoryNode.getObject().getProperty().getItem();
  try {
    openBeanEditor(beanItem,false);
    refresh(repositoryNode);
    CorePlugin.getDefault().getRunProcessService().updateLibraries(beanItem);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  BeanItem beanItem=(BeanItem)repositoryNode.getObject().getProperty().getItem();
  byte[] ct=beanItem.getContent().getInnerContent();
  String contentString=new String(ct);
  if (contentString.contains("String_Node_Str")) {
    Pattern p=Pattern.compile("String_Node_Str");
    if (beanItem.getImports().size() == 0) {
      addCamelDependency(beanItem);
    }
    for (int i=0; i < beanItem.getImports().size(); i++) {
      Object o=beanItem.getImports().get(i);
      if (o instanceof IMPORTTypeImpl) {
        IMPORTTypeImpl importType=(IMPORTTypeImpl)o;
        if (p.matcher(importType.getMODULE()).matches()) {
          continue;
        }
      }
 else {
        addCamelDependency(beanItem);
      }
    }
  }
  try {
    openBeanEditor(beanItem,false);
    refresh(repositoryNode);
    CorePlugin.getDefault().getRunProcessService().updateLibraries(beanItem);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}
Program: 141656
Project: 141656
Buggy source:
@Override protected void addOsgiDependencies(Analyzer analyzer,ExportFileResource libResource,ProcessItem processItem) throws IOException {
  final DependenciesResolver resolver=new DependenciesResolver(processItem);
  analyzer.setProperty(Analyzer.REQUIRE_BUNDLE,resolver.getManifestRequireBundle(MANIFEST_ITEM_SEPARATOR));
  analyzer.setProperty(Analyzer.IMPORT_PACKAGE,resolver.getManifestImportPackage(MANIFEST_ITEM_SEPARATOR) + "String_Node_Str");
  analyzer.setProperty(Analyzer.EXPORT_PACKAGE,resolver.getManifestExportPackage(MANIFEST_ITEM_SEPARATOR));
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
    IRunProcessService processService=(IRunProcessService)GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
    ITalendProcessJavaProject talendProcessJavaProject=processService.getTalendProcessJavaProject();
    if (talendProcessJavaProject != null) {
      final IPath libPath=talendProcessJavaProject.getLibFolder().getLocation();
      final List<URL> list=new ArrayList<URL>();
      for (      String s : resolver.getManifestBundleClasspath(MANIFEST_ITEM_SEPARATOR).split(Character.toString(MANIFEST_ITEM_SEPARATOR))) {
        if (!s.isEmpty()) {
          list.add(libPath.append(s).toFile().toURI().toURL());
        }
      }
      libResource.addResources(list);
    }
  }
}

Fixed version (ground truth):
@Override protected void addOsgiDependencies(Analyzer analyzer,ExportFileResource libResource,ProcessItem processItem) throws IOException {
  final DependenciesResolver resolver=new DependenciesResolver(processItem);
  analyzer.setProperty(Analyzer.REQUIRE_BUNDLE,resolver.getManifestRequireBundle(MANIFEST_ITEM_SEPARATOR));
  analyzer.setProperty(Analyzer.IMPORT_PACKAGE,resolver.getManifestImportPackage(MANIFEST_ITEM_SEPARATOR) + "String_Node_Str");
  analyzer.setProperty(Analyzer.EXPORT_PACKAGE,resolver.getManifestExportPackage(MANIFEST_ITEM_SEPARATOR));
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
    IRunProcessService processService=(IRunProcessService)GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
    ITalendProcessJavaProject talendProcessJavaProject=processService.getTalendProcessJavaProject();
    if (talendProcessJavaProject != null) {
      final IPath libPath=talendProcessJavaProject.getLibFolder().getLocation();
      final List<URL> list=new ArrayList<URL>();
      for (      String s : resolver.getManifestBundleClasspath(MANIFEST_ITEM_SEPARATOR).split(Character.toString(MANIFEST_ITEM_SEPARATOR))) {
        if (!s.isEmpty()) {
          list.add(libPath.append(s).toFile().toURI().toURL());
        }
      }
      if (resolver.getBundleClasspaths() != null) {
        for (        BundleClasspath bcp : resolver.getBundleClasspaths()) {
          if (bcp.getName() != null && bcp.getName().toLowerCase().contains(CamelFeatureUtil.FEATURE_CAMEL_QUARTZ2_BNDL_NAME)) {
            list.add(libPath.append(bcp.getName()).toFile().toURI().toURL());
          }
        }
      }
      libResource.addResources(list);
    }
  }
}
Program: 141657
Project: 141657
Buggy source:
/** 
 * Add feature and bundle to Feature Model
 * @param node
 * @param featuresModel
 */
public static void addFeatureAndBundles(ProcessItem routeProcess,FeaturesModel featuresModel){
  IDesignerCoreService designerService=RepositoryPlugin.getDefault().getDesignerCoreService();
  IProcess process=designerService.getProcessFromProcessItem(routeProcess,false);
  Collection<FeatureModel> features=new HashSet<FeatureModel>();
  for (  String lib : process.getNeededLibraries(true)) {
    Collection<FeatureModel> featureModel=computeFeature(getNameWithoutVersion(lib));
    if (featureModel != null) {
      features.addAll(featureModel);
    }
  }
  addNodesSpecialFeatures(features,routeProcess.getProcess());
  addConnectionsSpecialFeatures(features,routeProcess.getProcess());
  for (  FeatureModel model : features) {
    featuresModel.addFeature(model);
  }
}

Fixed version (ground truth):
/** 
 * Add feature and bundle to Feature Model
 * @param node
 * @param featuresModel
 */
public static void addFeatureAndBundles(ProcessItem routeProcess,FeaturesModel featuresModel){
  IDesignerCoreService designerService=RepositoryPlugin.getDefault().getDesignerCoreService();
  IProcess process=designerService.getProcessFromProcessItem(routeProcess,false);
  Collection<FeatureModel> features=new HashSet<FeatureModel>();
  for (  String lib : process.getNeededLibraries(true)) {
    if (FEATURE_CAMEL_QUARTZ2_BNDL_NAME.equalsIgnoreCase(getNameWithoutVersion(lib))) {
      continue;
    }
    Collection<FeatureModel> featureModel=computeFeature(getNameWithoutVersion(lib));
    if (featureModel != null) {
      features.addAll(featureModel);
    }
  }
  addNodesSpecialFeatures(features,routeProcess.getProcess());
  addConnectionsSpecialFeatures(features,routeProcess.getProcess());
  for (  FeatureModel model : features) {
    featuresModel.addFeature(model);
  }
}
Program: 141658
Project: 141658
Buggy source:
@Override protected void doRun(){
  RepositoryNode beanNode=getCurrentRepositoryNode();
  if (isToolbar()) {
    if (beanNode != null && beanNode.getContentType() != CamelRepositoryNodeType.repositoryBeansType) {
      beanNode=null;
    }
    if (beanNode == null) {
      beanNode=getRepositoryNodeForDefault(CamelRepositoryNodeType.repositoryBeansType);
    }
  }
  RepositoryNode node=null;
  IPath path=null;
  if (!isToolbar()) {
    ISelection selection=getSelection();
    Object obj=((IStructuredSelection)selection).getFirstElement();
    node=(RepositoryNode)obj;
    path=RepositoryNodeUtilities.getPath(node);
  }
  CamelNewBeanWizard beanWizard=new CamelNewBeanWizard(path);
  WizardDialog dlg=new WizardDialog(Display.getCurrent().getActiveShell(),beanWizard);
  if (dlg.open() == Window.OK) {
    try {
      openBeanEditor(beanWizard.getBean(),false);
    }
 catch (    PartInitException e) {
      MessageBoxExceptionHandler.process(e);
    }
catch (    SystemException e) {
      MessageBoxExceptionHandler.process(e);
    }
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  RepositoryNode beanNode=getCurrentRepositoryNode();
  if (isToolbar()) {
    if (beanNode != null && beanNode.getContentType() != CamelRepositoryNodeType.repositoryBeansType) {
      beanNode=null;
    }
    if (beanNode == null) {
      beanNode=getRepositoryNodeForDefault(CamelRepositoryNodeType.repositoryBeansType);
    }
  }
  RepositoryNode node=null;
  IPath path=null;
  if (!isToolbar()) {
    ISelection selection=getSelection();
    Object obj=((IStructuredSelection)selection).getFirstElement();
    node=(RepositoryNode)obj;
    path=RepositoryNodeUtilities.getPath(node);
  }
  CamelNewBeanWizard beanWizard=new CamelNewBeanWizard(path);
  WizardDialog dlg=new WizardDialog(Display.getCurrent().getActiveShell(),beanWizard);
  if (dlg.open() == Window.OK) {
    try {
      addCamelDependency(beanWizard.getBean());
      openBeanEditor(beanWizard.getBean(),false);
      refresh(repositoryNode);
      CorePlugin.getDefault().getRunProcessService().updateLibraries(beanWizard.getBean());
    }
 catch (    PartInitException e) {
      MessageBoxExceptionHandler.process(e);
    }
catch (    SystemException e) {
      MessageBoxExceptionHandler.process(e);
    }
  }
}
Program: 141659
Project: 141659
Buggy source:
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  BeanItem beanItem=(BeanItem)repositoryNode.getObject().getProperty().getItem();
  byte[] ct=beanItem.getContent().getInnerContent();
  String contentString=new String(ct);
  if (contentString.contains("String_Node_Str")) {
    Pattern p=Pattern.compile("String_Node_Str");
    if (beanItem.getImports().size() == 0) {
      addCamelDependency(beanItem);
    }
    for (int i=0; i < beanItem.getImports().size(); i++) {
      Object o=beanItem.getImports().get(i);
      if (o instanceof IMPORTTypeImpl) {
        IMPORTTypeImpl importType=(IMPORTTypeImpl)o;
        if (p.matcher(importType.getMODULE()).matches()) {
          continue;
        }
      }
 else {
        addCamelDependency(beanItem);
      }
    }
  }
  try {
    openBeanEditor(beanItem,false);
    refresh(repositoryNode);
    CorePlugin.getDefault().getRunProcessService().updateLibraries(beanItem);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  if (repositoryNode == null) {
    repositoryNode=(RepositoryNode)((IStructuredSelection)getSelection()).getFirstElement();
  }
  BeanItem beanItem=(BeanItem)repositoryNode.getObject().getProperty().getItem();
  addCamelDependency(beanItem);
  try {
    openBeanEditor(beanItem,false);
    refresh(repositoryNode);
    CorePlugin.getDefault().getRunProcessService().updateLibraries(beanItem);
  }
 catch (  PartInitException e) {
    MessageBoxExceptionHandler.process(e);
  }
catch (  SystemException e) {
    MessageBoxExceptionHandler.process(e);
  }
}
Program: 141661
Project: 141661
Buggy source:
public static int openError(Shell parentShell,String title,String message,IStatus status,int displayMask){
  ErrorDialog dialog=new RuntimeErrorDialog(parentShell,title,message,status,displayMask);
  return dialog.open();
}

Fixed version (ground truth):
public static int openError(Shell parentShell,String title,String message,IStatus status,int displayMask){
  RuntimeErrorDialog dialog=new RuntimeErrorDialog(parentShell,title,message,status,displayMask);
  return dialog.open();
}
Program: 141663
Project: 141663
Buggy source:
public static void reboot() throws Exception {
  MBeanServerConnection mbsc=createJMXconnection();
  String SYS_MBEAN="String_Node_Str" + instanceName;
  ObjectName objectKar=new ObjectName(SYS_MBEAN);
  mbsc.invoke(objectKar,"String_Node_Str",new Object[]{String.valueOf(0)},new String[]{String.class.getName()});
}

Fixed version (ground truth):
public static void reboot() throws Exception {
  MBeanServerConnection mbsc=createJMXconnection();
  String SYS_MBEAN="String_Node_Str" + instanceName;
  ObjectName objectKar=new ObjectName(SYS_MBEAN);
  mbsc.invoke(objectKar,"String_Node_Str",new Object[]{String.valueOf(0)},new String[]{STRING});
}
Program: 141664
Project: 141664
Buggy source:
public static String getBundleStatus(long bundleID) throws Exception {
  String KARAF_BUNDLE_MBEAN="String_Node_Str";
  ObjectName objectBundle=new ObjectName(KARAF_BUNDLE_MBEAN);
  return mbsc.invoke(objectBundle,"String_Node_Str",new Object[]{String.valueOf(bundleID)},new String[]{String.class.getName()}).toString();
}

Fixed version (ground truth):
public static String getBundleStatus(long bundleID) throws Exception {
  String KARAF_BUNDLE_MBEAN="String_Node_Str";
  ObjectName objectBundle=new ObjectName(KARAF_BUNDLE_MBEAN);
  return mbsc.invoke(objectBundle,"String_Node_Str",new Object[]{String.valueOf(bundleID)},new String[]{STRING}).toString();
}
Program: 141665
Project: 141665
Buggy source:
public static void rebootCleanAll() throws Exception {
  MBeanServerConnection mbsc=createJMXconnection();
  String SYS_MBEAN="String_Node_Str" + instanceName;
  ObjectName objectKar=new ObjectName(SYS_MBEAN);
  mbsc.invoke(objectKar,"String_Node_Str",new Object[]{String.valueOf(0)},new String[]{String.class.getName()});
}

Fixed version (ground truth):
public static void rebootCleanAll() throws Exception {
  MBeanServerConnection mbsc=createJMXconnection();
  String SYS_MBEAN="String_Node_Str" + instanceName;
  ObjectName objectKar=new ObjectName(SYS_MBEAN);
  mbsc.invoke(objectKar,"String_Node_Str",new Object[]{String.valueOf(0)},new String[]{STRING});
}
Program: 141666
Project: 141666
Buggy source:
@Override public void openConsole(){
  if (RuntimeServerController.getInstance().isRunning()) {
    RuntimeConsoleUtil.loadConsole();
  }
 else {
    RuntimeConsoleUtil.findConsole(RuntimeConsoleUtil.KARAF_CONSOLE);
  }
}

Fixed version (ground truth):
@Override public void openConsole(){
  if (RuntimeServerController.getInstance().isRunning()) {
    RuntimeConsoleUtil.loadConsole();
  }
 else {
    Shell shell=PlatformUI.getWorkbench().getDisplay().getActiveShell();
    if (MessageDialog.openConfirm(shell,"String_Node_Str","String_Node_Str")) {
      new StartRuntimeAction(true,shell).run();
      RuntimeConsoleUtil.loadConsole();
    }
 else {
      RuntimeConsoleUtil.findConsole();
    }
  }
}
Program: 141667
Project: 141667
Buggy source:
private static ClientSession connectWithRetries(SshClient client,ClientConfig config) throws Exception, InterruptedException {
  ClientSession session=null;
  int retries=0;
  do {
    try {
      ConnectFuture future=client.connect(config.getUser(),config.getHost(),config.getPort());
      future.await();
      session=future.getSession();
    }
 catch (    RuntimeSshException ex) {
      if (++retries < 30) {
        TimeUnit.SECONDS.sleep(1);
      }
 else {
        throw ex;
      }
    }
  }
 while (session == null);
  return session;
}

Fixed version (ground truth):
private static ClientSession connectWithRetries(SshClient client,ClientConfig config) throws Exception, InterruptedException {
  ClientSession session=null;
  int retries=0;
  do {
    try {
      ConnectFuture future=client.connect(config.getUser(),config.getHost(),config.getPort());
      future.await();
      session=future.getSession();
    }
 catch (    RuntimeSshException ex) {
      if (++retries < 10) {
        TimeUnit.SECONDS.sleep(2);
      }
 else {
        throw ex;
      }
    }
  }
 while (session == null);
  return session;
}
Program: 141669
Project: 141669
Buggy source:
public static IOConsole findConsole(String name){
  ConsolePlugin plugin=ConsolePlugin.getDefault();
  IConsoleManager conMan=plugin.getConsoleManager();
  IConsole[] existing=conMan.getConsoles();
  for (int i=0; i < existing.length; i++) {
    if (name.equals(existing[i].getName()))     return (IOConsole)existing[i];
  }
  IOConsole myConsole=new IOConsole(name,null);
  conMan.addConsoles(new IConsole[]{myConsole});
  return myConsole;
}

Fixed version (ground truth):
public static IOConsole findConsole(){
  ConsolePlugin plugin=ConsolePlugin.getDefault();
  IConsoleManager conMan=plugin.getConsoleManager();
  IConsole[] existing=conMan.getConsoles();
  for (int i=0; i < existing.length; i++) {
    if (KARAF_CONSOLE.equals(existing[i].getName()))     return (IOConsole)existing[i];
  }
  IOConsole myConsole=new IOConsole(KARAF_CONSOLE,null);
  conMan.addConsoles(new IConsole[]{myConsole});
  return myConsole;
}
Program: 141670
Project: 141670
Buggy source:
public static void loadConsole(){
  clearConsole();
  RuntimeClient m=new RuntimeClient();
  PipedInputStream pis=new PipedInputStream();
  PipedOutputStream pos=new PipedOutputStream();
  try {
    pos.connect(pis);
  }
 catch (  IOException e2) {
    e2.printStackTrace();
  }
  m.setInputStream(pis);
  Thread consoleThread=new Thread("String_Node_Str"){
    @Override public void run(){
      InputStream is=findConsole(KARAF_CONSOLE).getInputStream();
      int count=0;
      byte[] bs=new byte[1024];
      try {
        while ((count=is.read(bs)) > 0) {
          pos.write(Arrays.copyOf(bs,count));
        }
      }
 catch (      IOException e1) {
        e1.printStackTrace();
      }
 finally {
        try {
          pos.close();
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
  }
;
  consoleThread.start();
  Thread connectThread=new Thread("String_Node_Str"){
    @Override public void run(){
      String[] karafArgs=new String[]{"String_Node_Str","String_Node_Str"};
      try {
        m.connect(karafArgs);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
;
  connectThread.start();
}

Fixed version (ground truth):
public static void loadConsole(){
  clearConsole();
  RuntimeClient client=new RuntimeClient();
  PipedInputStream pis=new PipedInputStream();
  PipedOutputStream pos=new PipedOutputStream();
  try {
    pos.connect(pis);
  }
 catch (  IOException e) {
    ExceptionHandler.process(e);
  }
  client.setInputStream(pis);
  Thread consoleThread=new Thread("String_Node_Str"){
    @Override public void run(){
      InputStream is=findConsole().getInputStream();
      int count=0;
      byte[] bs=new byte[1024];
      try {
        while ((count=is.read(bs)) > 0) {
          for (; bs[count - 1] == 10; count--) {
          }
          pos.write(Arrays.copyOf(bs,count));
        }
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
 finally {
        try {
          pos.close();
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
  }
;
  consoleThread.start();
  Thread connectThread=new Thread("String_Node_Str"){
    @Override public void run(){
      IPreferenceStore store=ESBRunContainerPlugin.getDefault().getPreferenceStore();
      String etcLocation=store.getString(RunContainerPreferenceInitializer.P_ESB_RUNTIME_LOCATION);
      String host=store.getString(RunContainerPreferenceInitializer.P_ESB_RUNTIME_HOST);
      System.setProperty("String_Node_Str",etcLocation + "String_Node_Str");
      String[] karafArgs=new String[]{"String_Node_Str",host};
      try {
        client.connect(karafArgs);
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
  }
;
  connectThread.start();
}
Program: 141671
Project: 141671
Buggy source:
public static IOConsoleOutputStream getOutputStream(){
  IOConsoleOutputStream outputStream=findConsole(KARAF_CONSOLE).newOutputStream();
  outputStream.setEncoding(System.getProperty("String_Node_Str","String_Node_Str"));
  return outputStream;
}

Fixed version (ground truth):
public static IOConsoleOutputStream getOutputStream(){
  IOConsoleOutputStream outputStream=findConsole().newOutputStream();
  outputStream.setEncoding(System.getProperty("String_Node_Str","String_Node_Str"));
  return outputStream;
}
Program: 141672
Project: 141672
Buggy source:
@Override public void run(){
  String[] karafArgs=new String[]{"String_Node_Str","String_Node_Str"};
  try {
    m.connect(karafArgs);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  IPreferenceStore store=ESBRunContainerPlugin.getDefault().getPreferenceStore();
  String etcLocation=store.getString(RunContainerPreferenceInitializer.P_ESB_RUNTIME_LOCATION);
  String host=store.getString(RunContainerPreferenceInitializer.P_ESB_RUNTIME_HOST);
  System.setProperty("String_Node_Str",etcLocation + "String_Node_Str");
  String[] karafArgs=new String[]{"String_Node_Str",host};
  try {
    client.connect(karafArgs);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 141676
Project: 141676
Buggy source:
@Override public final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  this.monitor=monitor;
  featuresModel=new FeaturesModel(getGroupId(),getArtifactId(),getArtifactVersion());
  try {
    String routeName=routeNode.getObject().getProperty().getDisplayName();
    File routeFile;
    try {
      routeFile=File.createTempFile("String_Node_Str",FileConstants.JAR_FILE_SUFFIX,new File(getTempDir()));
    }
 catch (    IOException e) {
      throw new InvocationTargetException(e);
    }
    BundleModel routeModel=new BundleModel(getGroupId(),routeName + "String_Node_Str",getArtifactVersion(),routeFile);
    if (featuresModel.addBundle(routeModel)) {
      final ProcessItem routeProcess=(ProcessItem)routeNode.getObject().getProperty().getItem();
      CamelFeatureUtil.addFeatureAndBundles(routeProcess,featuresModel);
      featuresModel.setConfigName(routeNode.getObject().getLabel());
      featuresModel.setContexts(JobContextUtils.getContextsMap(routeProcess));
      exportAllReferenceJobs(routeProcess);
      final Collection<String> routelets=new HashSet<>();
      exportAllReferenceRoutelets(routeName,routeProcess,routelets);
      exportRouteBundle(routeNode,routeFile,version,bundleVersion,routelets,null);
    }
    processResults(featuresModel,monitor);
  }
  finally {
    removeTempFiles();
  }
}

Fixed version (ground truth):
@Override public final void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  this.monitor=monitor;
  featuresModel=new FeaturesModel(getGroupId(),getArtifactId(),getArtifactVersion());
  try {
    String routeName=routeNode.getObject().getProperty().getDisplayName();
    File routeFile;
    try {
      routeFile=File.createTempFile("String_Node_Str",FileConstants.JAR_FILE_SUFFIX,new File(getTempDir()));
    }
 catch (    IOException e) {
      throw new InvocationTargetException(e);
    }
    BundleModel routeModel=new BundleModel(getGroupId(),routeName + "String_Node_Str",getArtifactVersion(),routeFile);
    if (featuresModel.addBundle(routeModel)) {
      final ProcessItem routeProcess=(ProcessItem)routeNode.getObject().getProperty().getItem();
      CamelFeatureUtil.addFeatureAndBundles(routeProcess,featuresModel);
      featuresModel.setConfigName(routeNode.getObject().getLabel());
      featuresModel.setContexts(JobContextUtils.getContextsMap(routeProcess));
      exportAllReferenceJobs(routeName,routeProcess);
      final Set<String> routelets=new HashSet<>();
      exportAllReferenceRoutelets(routeName,routeProcess,routelets);
      exportRouteBundle(routeNode,routeFile,version,bundleVersion,routelets,null);
    }
    processResults(featuresModel,monitor);
  }
  finally {
    removeTempFiles();
  }
}
Program: 141679
Project: 141679
Buggy source:
private Collection<String> getReferenceRoutlets(){
  ProcessItem routeProcess=(ProcessItem)routeNode.getObject().getProperty().getItem();
  String routeName=routeNode.getObject().getProperty().getDisplayName();
  Collection<String> routelets=new HashSet<>();
  try {
    exportAllReferenceRoutelets(routeName,routeProcess,routelets);
  }
 catch (  InvocationTargetException e) {
    return new HashSet<>();
  }
catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
  }
  return routelets;
}

Fixed version (ground truth):
private Collection<String> getReferenceRoutlets(){
  ProcessItem routeProcess=(ProcessItem)routeNode.getObject().getProperty().getItem();
  String routeName=routeNode.getObject().getProperty().getDisplayName();
  Set<String> routelets=new HashSet<>();
  try {
    exportAllReferenceRoutelets(routeName,routeProcess,routelets);
  }
 catch (  InvocationTargetException e) {
    return new HashSet<>();
  }
catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
  }
  return routelets;
}
Program: 141681
Project: 141681
Buggy source:
@Override public boolean visit(IResourceDelta delta) throws CoreException {
  IResource resource=delta.getResource();
  if (resource == null) {
    return false;
  }
  if (resource.getType() != IResource.FILE) {
    IPath location=resource.getLocation();
    if (location == null || !filePath.startsWith(location.toPortableString())) {
      return false;
    }
    return true;
  }
  if (resource.equals(editorFile)) {
    RepositoryWorkUnit<Object> repositoryWorkUnit=new RepositoryWorkUnit<Object>(SAVING_RESOURCE,this){
      @Override protected void run() throws LoginException, PersistenceException {
        RouteResourceEditor.saveContentsToItem(editorInput);
      }
    }
;
    repositoryWorkUnit.setAvoidUpdateLocks(false);
    repositoryWorkUnit.setAvoidUnloadResources(false);
    repositoryWorkUnit.setUnloadResourcesAfterRun(false);
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().executeRepositoryWorkUnit(repositoryWorkUnit);
      }
    }
);
    return false;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean visit(IResourceDelta delta) throws CoreException {
  IResource resource=delta.getResource();
  if (resource == null) {
    return false;
  }
  if (resource.getType() != IResource.FILE) {
    IPath location=resource.getLocation();
    if (location == null || !filePath.startsWith(location.toPortableString())) {
      return false;
    }
    return true;
  }
  if (resource.equals(editorFile)) {
    final RepositoryWorkUnit<Object> repositoryWorkUnit=new RepositoryWorkUnit<Object>(SAVING_RESOURCE,this){
      @Override protected void run() throws LoginException, PersistenceException {
        RouteResourceEditor.saveContentsToItem(editorInput);
      }
    }
;
    repositoryWorkUnit.setAvoidUpdateLocks(false);
    repositoryWorkUnit.setAvoidUnloadResources(false);
    repositoryWorkUnit.setUnloadResourcesAfterRun(false);
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().executeRepositoryWorkUnit(repositoryWorkUnit);
      }
    }
);
    return false;
  }
  return false;
}
Program: 141683
Project: 141683
Buggy source:
@Override public boolean visit(IResourceDelta delta) throws CoreException {
  IResource resource=delta.getResource();
  if (resource == null) {
    return false;
  }
  if (resource.getType() != IResource.FILE) {
    IPath location=resource.getLocation();
    if (location == null || !filePath.startsWith(location.toPortableString())) {
      return false;
    }
    return true;
  }
  if (resource.equals(editorFile)) {
    RepositoryWorkUnit<Object> repositoryWorkUnit=new RepositoryWorkUnit<Object>(SAVING_RESOURCE,this){
      @Override protected void run() throws LoginException, PersistenceException {
        RouteResourceEditor.saveContentsToItem(editorInput);
      }
    }
;
    repositoryWorkUnit.setAvoidUpdateLocks(false);
    repositoryWorkUnit.setAvoidUnloadResources(false);
    repositoryWorkUnit.setUnloadResourcesAfterRun(false);
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().executeRepositoryWorkUnit(repositoryWorkUnit);
      }
    }
);
    return false;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean visit(IResourceDelta delta) throws CoreException {
  IResource resource=delta.getResource();
  if (resource == null) {
    return false;
  }
  if (resource.getType() != IResource.FILE) {
    IPath location=resource.getLocation();
    if (location == null || !filePath.startsWith(location.toPortableString())) {
      return false;
    }
    return true;
  }
  if (resource.equals(editorFile)) {
    final RepositoryWorkUnit<Object> repositoryWorkUnit=new RepositoryWorkUnit<Object>(SAVING_RESOURCE,this){
      @Override protected void run() throws LoginException, PersistenceException {
        RouteResourceEditor.saveContentsToItem(editorInput);
      }
    }
;
    repositoryWorkUnit.setAvoidUpdateLocks(false);
    repositoryWorkUnit.setAvoidUnloadResources(false);
    repositoryWorkUnit.setUnloadResourcesAfterRun(false);
    Display.getDefault().asyncExec(new Runnable(){
      @Override public void run(){
        CoreRuntimePlugin.getInstance().getProxyRepositoryFactory().executeRepositoryWorkUnit(repositoryWorkUnit);
      }
    }
);
    return false;
  }
  return false;
}
Program: 141685
Project: 141685
Buggy source:
@Override public CharSequence generatePart(INode node,Object... ignoredParams) throws CodeGeneratorException {
  String part;
  if ("String_Node_Str".equals(node.getComponent().getName())) {
    part="String_Node_Str";
  }
 else   if (NodeUtil.isStartNode(node)) {
    if ("String_Node_Str".equals(node.getComponent().getName())) {
      part="String_Node_Str";
    }
    part="String_Node_Str" + getNodeId(node) + "String_Node_Str";
  }
 else {
    part="String_Node_Str" + getNodeId(node) + "String_Node_Str";
  }
  return part;
}

Fixed version (ground truth):
@Override public CharSequence generatePart(INode node,Object... ignoredParams) throws CodeGeneratorException {
  String part;
  if ("String_Node_Str".equals(node.getComponent().getName())) {
    part="String_Node_Str";
  }
 else   if (NodeUtil.isStartNode(node)) {
    if ("String_Node_Str".equals(node.getComponent().getName())) {
      part="String_Node_Str";
    }
 else {
      part="String_Node_Str" + getNodeId(node) + "String_Node_Str";
    }
  }
 else {
    part="String_Node_Str" + getNodeId(node) + "String_Node_Str";
  }
  return part;
}
Program: 141686
Project: 141686
Buggy source:
public void setSpringContent(String springContent);

Fixed version (ground truth):
void setSpringContent(String springContent);
Program: 141687
Project: 141687
Buggy source:
public String getSpringContent();

Fixed version (ground truth):
String getSpringContent();
Program: 141688
Project: 141688
Buggy source:
@Override public boolean isInstanceofCamelBeans(Item item){
  return item.eClass() == CamelPropertiesPackage.Literals.BEAN_ITEM;
}

Fixed version (ground truth):
@Override public boolean isInstanceofCamelBeans(Item item){
  if (item == null) {
    return false;
  }
  return item.eClass() == CamelPropertiesPackage.Literals.BEAN_ITEM;
}
Program: 141689
Project: 141689
Buggy source:
@Override public boolean isInstanceofCamel(Item item){
  return isInstanceofCamelRoutes(item) || isInstanceofCamelBeans(item) || item.eClass() == CamelPropertiesPackage.Literals.ROUTE_RESOURCE_ITEM;
}

Fixed version (ground truth):
@Override public boolean isInstanceofCamel(Item item){
  if (item == null) {
    return false;
  }
  return isInstanceofCamelRoutes(item) || isInstanceofCamelBeans(item) || item.eClass() == CamelPropertiesPackage.Literals.ROUTE_RESOURCE_ITEM;
}
Program: 141690
Project: 141690
Buggy source:
@Override public boolean isInstanceofCamelRoutes(Item item){
  return item.eClass() == CamelPropertiesPackage.Literals.CAMEL_PROCESS_ITEM || item.eClass() == CamelPropertiesPackage.Literals.ROUTELET_PROCESS_ITEM;
}

Fixed version (ground truth):
@Override public boolean isInstanceofCamelRoutes(Item item){
  if (item == null) {
    return false;
  }
  return item.eClass() == CamelPropertiesPackage.Literals.CAMEL_PROCESS_ITEM || item.eClass() == CamelPropertiesPackage.Literals.ROUTELET_PROCESS_ITEM;
}
Program: 141693
Project: 141693
Buggy source:
@Override public List<? extends INodeReturn> createReturns(){
  return new ArrayList<NodeReturn>();
}

Fixed version (ground truth):
@Override public List<? extends INodeReturn> createReturns(){
  return Collections.emptyList();
}
Program: 141694
Project: 141694
Buggy source:
@Override public List<ECodePart> getAvailableCodeParts(){
  return new ArrayList<ECodePart>();
}

Fixed version (ground truth):
@Override public List<ECodePart> getAvailableCodeParts(){
  return Collections.emptyList();
}
Program: 141695
Project: 141695
Buggy source:
@Override public List<? extends INodeConnector> createConnectors(INode node){
  List<INodeConnector> listConnector=new ArrayList<INodeConnector>();
  INodeConnector nodeConnector;
  int nbInput=0;
  int jobletNbInput=0;
  for (int i=0; i < EConnectionType.values().length; i++) {
    EConnectionType currentType=EConnectionType.values()[i];
    if ((currentType == EConnectionType.FLOW_REF) || (currentType == EConnectionType.FLOW_MERGE)) {
      continue;
    }
    boolean exists=false;
    for (    INodeConnector curNodeConn : listConnector) {
      if (curNodeConn.getDefaultConnectionType().equals(currentType)) {
        exists=true;
      }
    }
    if (!exists) {
      nodeConnector=new NodeConnector(node);
      nodeConnector.setDefaultConnectionType(currentType);
      nodeConnector.setName(currentType.getName());
      nodeConnector.setBaseSchema(currentType.getName());
      nodeConnector.addConnectionProperty(currentType,currentType.getRGB(),currentType.getDefaultLineStyle());
      nodeConnector.setLinkName(currentType.getDefaultLinkName());
      nodeConnector.setMenuName(currentType.getDefaultMenuName());
      int allowLinkNumber=currentType == EConnectionType.ON_SUBJOB_OK || currentType == EConnectionType.ON_SUBJOB_ERROR || currentType == EConnectionType.ON_COMPONENT_OK || currentType == EConnectionType.ON_COMPONENT_ERROR || currentType == EConnectionType.RUN_IF ? 1 : 0;
      nodeConnector.setMaxLinkInput(jobletNbInput > 0 ? 0 : allowLinkNumber);
      nodeConnector.setMinLinkInput(0);
      nodeConnector.setMaxLinkOutput(allowLinkNumber);
      nodeConnector.setMinLinkOutput(0);
      if (currentType == EConnectionType.FLOW_MAIN) {
        nodeConnector.addConnectionProperty(EConnectionType.FLOW_REF,EConnectionType.FLOW_REF.getRGB(),EConnectionType.FLOW_REF.getDefaultLineStyle());
        nodeConnector.addConnectionProperty(EConnectionType.FLOW_MERGE,EConnectionType.FLOW_MERGE.getRGB(),EConnectionType.FLOW_MERGE.getDefaultLineStyle());
      }
      listConnector.add(nodeConnector);
    }
  }
  INodeConnector mainConnector=null;
  for (  INodeConnector connector : listConnector) {
    if (connector.getDefaultConnectionType().equals(EConnectionType.FLOW_MAIN)) {
      mainConnector=connector;
    }
  }
  mainConnector.setMaxLinkInput(nbInput);
  mainConnector.setMinLinkInput(nbInput);
  mainConnector.setMaxLinkOutput(0);
  mainConnector.setMinLinkOutput(0);
  return listConnector;
}

Fixed version (ground truth):
@Override public List<? extends INodeConnector> createConnectors(INode node){
  final List<INodeConnector> listConnector=new ArrayList<INodeConnector>();
  for (  EConnectionType currentType : EConnectionType.values()) {
    final INodeConnector nodeConnector=new NodeConnector(node);
    nodeConnector.setDefaultConnectionType(currentType);
    nodeConnector.setMaxLinkInput(0);
    nodeConnector.setMinLinkInput(0);
    nodeConnector.setMaxLinkOutput(0);
    nodeConnector.setMinLinkOutput(0);
    listConnector.add(nodeConnector);
  }
  return listConnector;
}
Program: 141696
Project: 141696
Buggy source:
@Override public List<ModuleNeeded> getModulesNeeded(){
  return new ArrayList<ModuleNeeded>();
}

Fixed version (ground truth):
@Override public List<ModuleNeeded> getModulesNeeded(){
  return Collections.emptyList();
}
Program: 141697
Project: 141697
Buggy source:
@Override public Item getJobletItem(INode node,String version){
  if (isExtensionComponent(node)) {
    RouteletComponent component=(RouteletComponent)node.getComponent();
    IRepositoryViewObject specificVersion=null;
    if (version == null || version.equals(RelationshipItemBuilder.LATEST_VERSION)) {
      specificVersion=getLastVersion(ProjectManager.getInstance().getCurrentProject(),component.getJobletId());
    }
 else {
      specificVersion=getSpecificVersion(ProjectManager.getInstance().getCurrentProject(),component.getJobletId(),version);
    }
    if (specificVersion != null) {
      return specificVersion.getProperty().getItem();
    }
 else {
      return component.getProperty().getItem();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Item getJobletItem(INode node,String version){
  if (isExtensionComponent(node)) {
    RouteletComponent component=(RouteletComponent)node.getComponent();
    IRepositoryViewObject specificVersion=null;
    if (version == null || version.equals(RelationshipItemBuilder.LATEST_VERSION)) {
      specificVersion=getLastVersion(ProjectManager.getInstance().getCurrentProject(),component.getRouteletId());
    }
 else {
      specificVersion=getSpecificVersion(ProjectManager.getInstance().getCurrentProject(),component.getRouteletId(),version);
    }
    if (specificVersion != null) {
      return specificVersion.getProperty().getItem();
    }
 else {
      return component.getProperty().getItem();
    }
  }
  return null;
}
Program: 141698
Project: 141698
Buggy source:
public List<IComponent> sortComponents(List<IComponent> filteredComponents){
  return filteredComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> sortComponents(List<IComponent> filteredComponents){
  return filteredComponents;
}
Program: 141699
Project: 141699
Buggy source:
public ComponentCategory extractComponentsCategory(){
  return ComponentCategory.CATEGORY_4_CAMEL;
}

Fixed version (ground truth):
@Override public ComponentCategory extractComponentsCategory(){
  return ComponentCategory.CATEGORY_4_CAMEL;
}
Program: 141700
Project: 141700
Buggy source:
public List<IComponent> filterComponents(List<IComponent> allComponents){
  if (allComponents == null || allComponents.isEmpty() || !camelComponents.isEmpty()) {
    return camelComponents;
  }
  String categoryName=extractComponentsCategory().getName();
  for (  IComponent component : allComponents) {
    String compType=component.getPaletteType();
    if (compType != null && categoryName.equals(compType)) {
      camelComponents.add(component);
    }
  }
  return camelComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> filterComponents(List<IComponent> allComponents){
  List<IComponent> camelComponents=new ArrayList<IComponent>();
  if (allComponents == null || allComponents.isEmpty()) {
    return camelComponents;
  }
  String categoryName=extractComponentsCategory().getName();
  for (  IComponent component : allComponents) {
    String compType=component.getPaletteType();
    if (compType != null && categoryName.equals(compType)) {
      camelComponents.add(component);
    }
  }
  return camelComponents;
}
Program: 141701
Project: 141701
Buggy source:
public List<IComponent> sortComponents(List<IComponent> filteredComponents){
  return filteredComponents;
}

Fixed version (ground truth):
@Override public List<IComponent> sortComponents(List<IComponent> filteredComponents){
  return filteredComponents;
}
Program: 141702
Project: 141702
Buggy source:
public ComponentCategory extractComponentsCategory(){
  return ComponentCategory.CATEGORY_4_CAMEL;
}

Fixed version (ground truth):
@Override public ComponentCategory extractComponentsCategory(){
  return ComponentCategory.CATEGORY_4_CAMEL;
}