nus-yam/ex-repair huggingface dataset:
Program: 126224
Project: 126224
Buggy source:
/** 
 * DOC sgandon Comment method "createUnavailableModuleToInstall".
 * @param unavailableModuleName
 * @param contextMap, may be null
 * @return
 */
private ModuleToInstall createUnavailableModuleToInstall(String unavailableModuleName,Map<String,List<ModuleNeeded>> contextMap){
  ModuleToInstall m=new ModuleToInstall();
  m.setName(unavailableModuleName);
  setContext(m,contextMap);
  if (contextMap != null) {
    m.setDescription(getFirstDescription(contextMap.get(unavailableModuleName)));
  }
  return m;
}

Fixed version (ground truth):
/** 
 * DOC sgandon Comment method "createUnavailableModuleToInstall".
 * @param unavailableModuleName
 * @param contextMap, may be null
 * @return
 */
private ModuleToInstall createUnavailableModuleToInstall(String unavailableModuleName,Map<String,List<ModuleNeeded>> contextMap){
  ModuleToInstall m=new ModuleToInstall();
  m.setName(unavailableModuleName);
  m.setDistribution(MavenConstants.DOWNLOAD_MANUAL);
  setContext(m,contextMap);
  if (contextMap != null) {
    m.setDescription(getFirstDescription(contextMap.get(unavailableModuleName)));
  }
  return m;
}
Program: 126225
Project: 126225
Buggy source:
public static String getJobTypeFromFramework(Item item){
  Object frameworkObj=ConvertJobsUtil.getFramework(item);
  if (JobBatchFramework.MAPREDUCEFRAMEWORK.getDisplayName().equals(frameworkObj) || JobBatchFramework.SPARKFRAMEWORK.getDisplayName().equals(frameworkObj)) {
    return JobType.BIGDATABATCH.getDisplayName();
  }
 else   if (JobStreamingFramework.STORMFRAMEWORK.getDisplayName().equals(frameworkObj) || JobStreamingFramework.SPARKSTREAMINGFRAMEWORK.getDisplayName().equals(frameworkObj)) {
    return JobType.BIGDATASTREAMING.getDisplayName();
  }
 else {
    return JobType.STANDARD.getDisplayName();
  }
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "getJobTypeFromFramework".
 * @param frameworkObj
 * @return
 */
public static String getJobTypeFromFramework(String frameworkObj){
  if (JobBatchFramework.MAPREDUCEFRAMEWORK.getDisplayName().equals(frameworkObj) || JobBatchFramework.SPARKFRAMEWORK.getDisplayName().equals(frameworkObj)) {
    return JobType.BIGDATABATCH.getDisplayName();
  }
 else   if (JobStreamingFramework.STORMFRAMEWORK.getDisplayName().equals(frameworkObj) || JobStreamingFramework.SPARKSTREAMINGFRAMEWORK.getDisplayName().equals(frameworkObj)) {
    return JobType.BIGDATASTREAMING.getDisplayName();
  }
 else {
    return JobType.STANDARD.getDisplayName();
  }
}
Program: 126226
Project: 126226
Buggy source:
/** 
 * get the target execution framework from the field in Job properties
 * @param item
 * @return
 */
public static Object getFramework(Item item){
  if (item != null) {
    Property property=item.getProperty();
    if (property != null && property.getAdditionalProperties() != null && property.getAdditionalProperties().containsKey(FRAMEWORK)) {
      return property.getAdditionalProperties().get(FRAMEWORK);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * get the target execution framework from the field in Job properties
 * @param item
 * @return
 */
public static String getFramework(Item item){
  if (item != null) {
    Property property=item.getProperty();
    if (property != null && property.getAdditionalProperties() != null && property.getAdditionalProperties().containsKey(FRAMEWORK)) {
      return (String)property.getAdditionalProperties().get(FRAMEWORK);
    }
  }
  return null;
}
Program: 126227
Project: 126227
Buggy source:
public static String[] getFrameworkItemsByJobType(Item item){
  String jobType=getJobTypeFromFramework(item);
  if (JobType.BIGDATABATCH.getDisplayName().equals(jobType)) {
    return JobBatchFramework.getFrameworkToDispaly();
  }
 else   if (JobType.BIGDATASTREAMING.getDisplayName().equals(jobType)) {
    return JobStreamingFramework.getFrameworkToDispaly();
  }
 else {
    return new String[0];
  }
}

Fixed version (ground truth):
/** 
 * DOC nrousseau Comment method "getFrameworkItemsByJobType".
 * @param repositoryObjectType
 * @return
 */
public static String[] getFrameworkItemsByJobType(ERepositoryObjectType repositoryObjectType){
  if (ERepositoryObjectType.PROCESS_MR.equals(repositoryObjectType)) {
    return JobBatchFramework.getFrameworkToDispaly();
  }
 else   if (ERepositoryObjectType.PROCESS_STORM.equals(repositoryObjectType)) {
    return JobStreamingFramework.getFrameworkToDispaly();
  }
 else {
    return new String[0];
  }
}
Program: 126229
Project: 126229
Buggy source:
public void build(String destinationPath) throws Exception ;

Fixed version (ground truth):
public void build(String destinationPath,IProgressMonitor monitor) throws Exception ;
Program: 126230
Project: 126230
Buggy source:
void buildModules(String goals,String[] childrenModules,String programArgs);

Fixed version (ground truth):
void buildModules(String goals,String[] childrenModules,String programArgs,IProgressMonitor monitor) throws Exception ;
Program: 126231
Project: 126231
Buggy source:
/** 
 * build current job or whole project.
 */
void build();

Fixed version (ground truth):
/** 
 * build current job or whole project.
 */
void build(IProgressMonitor monitor) throws Exception ;
Program: 126232
Project: 126232
Buggy source:
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName,IProcessor processor,int option) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
    CorePlugin.getDefault().getRunProcessService().updateLibraries(neededModules,currentProcess);
    if (codeModified && !BitwiseOptionUtils.containOption(option,GENERATE_WITHOUT_COMPILING)) {
      processor.build();
      processor.syntaxCheck();
    }
    needContextInCurrentGeneration=true;
    codeModified=false;
  }
}

Fixed version (ground truth):
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName,IProcessor processor,int option) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
    CorePlugin.getDefault().getRunProcessService().updateLibraries(neededModules,currentProcess);
    if (codeModified && !BitwiseOptionUtils.containOption(option,GENERATE_WITHOUT_COMPILING)) {
      try {
        processor.build(progressMonitor);
      }
 catch (      Exception e) {
        throw new ProcessorException(e);
      }
      processor.syntaxCheck();
    }
    needContextInCurrentGeneration=true;
    codeModified=false;
  }
}
Program: 126233
Project: 126233
Buggy source:
public void execute(){
  try {
    ILaunchConfiguration launchConfiguration=createLaunchConfiguration();
    if (launchConfiguration == null) {
      throw new Exception("String_Node_Str");
    }
    TalendLauncherWaiter talendWaiter=new TalendLauncherWaiter(launchConfiguration);
    final ILaunch launch=buildAndLaunch(launchConfiguration,launcherMode,new NullProgressMonitor());
    talendWaiter.waitFinish(launch);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
public void execute(IProgressMonitor monitor) throws Exception {
  ILaunchConfiguration launchConfiguration=createLaunchConfiguration();
  if (launchConfiguration == null) {
    throw new Exception("String_Node_Str");
  }
  TalendLauncherWaiter talendWaiter=new TalendLauncherWaiter(launchConfiguration);
  final ILaunch launch=buildAndLaunch(launchConfiguration,launcherMode,monitor);
  talendWaiter.waitFinish(launch);
  StringBuffer errors=new StringBuffer();
  for (  IProcess process : launch.getProcesses()) {
    String log=process.getStreamsProxy().getOutputStreamMonitor().getContents();
    for (    String line : log.split("String_Node_Str")) {
      if (line.startsWith("String_Node_Str")) {
        errors.append(line + "String_Node_Str");
      }
    }
  }
  if (errors.length() != 0) {
    throw new Exception(errors.toString());
  }
}
Program: 126234
Project: 126234
Buggy source:
@Override public void execute(){
  if (!launcherPomFile.exists()) {
    return;
  }
  if (getGoals().contains(TalendMavenConstants.GOAL_PACKAGE)) {
    try {
      MavenModelManager mavenModelManager=MavenPlugin.getMavenModelManager();
      Model model;
      model=mavenModelManager.readMavenModel(launcherPomFile);
      model.getDependencies().clear();
      if (launcherPomFile.exists()) {
        launcherPomFile.delete(true,null);
      }
      MavenPlugin.getMavenModelManager().createMavenModel(launcherPomFile,model);
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
  }
  if (!TalendMavenConstants.POM_FILE_NAME.equals(launcherPomFile.getName())) {
    return;
  }
  super.execute();
}

Fixed version (ground truth):
@Override public void execute(IProgressMonitor monitor) throws Exception {
  if (!launcherPomFile.exists()) {
    return;
  }
  if (getGoals().contains(TalendMavenConstants.GOAL_PACKAGE)) {
    try {
      MavenModelManager mavenModelManager=MavenPlugin.getMavenModelManager();
      Model model;
      model=mavenModelManager.readMavenModel(launcherPomFile);
      model.getDependencies().clear();
      if (launcherPomFile.exists()) {
        launcherPomFile.delete(true,null);
      }
      MavenPlugin.getMavenModelManager().createMavenModel(launcherPomFile,model);
    }
 catch (    CoreException e) {
      ExceptionHandler.process(e);
    }
  }
  if (!TalendMavenConstants.POM_FILE_NAME.equals(launcherPomFile.getName())) {
    return;
  }
  super.execute(monitor);
}
Program: 126236
Project: 126236
Buggy source:
public void launch() throws Exception {
  MavenArtifact artifact=createArtifact();
  final List<String> properties=createProperties(artifact);
  MavenCommandLauncher launcher=new MavenCommandLauncher(goal){
    @Override protected void setProjectConfiguration(    ILaunchConfigurationWorkingCopy workingCopy,    IContainer basedir){
      super.setProjectConfiguration(workingCopy,basedir);
      workingCopy.setAttribute(MavenLaunchConstants.ATTR_PROPERTIES,properties);
    }
  }
;
  launcher.execute();
}

Fixed version (ground truth):
public void launch() throws Exception {
  MavenArtifact artifact=createArtifact();
  final List<String> properties=createProperties(artifact);
  MavenCommandLauncher launcher=new MavenCommandLauncher(goal){
    @Override protected void setProjectConfiguration(    ILaunchConfigurationWorkingCopy workingCopy,    IContainer basedir){
      super.setProjectConfiguration(workingCopy,basedir);
      workingCopy.setAttribute(MavenLaunchConstants.ATTR_PROPERTIES,properties);
    }
  }
;
  launcher.execute(new NullProgressMonitor());
}
Program: 126239
Project: 126239
Buggy source:
public static String[] getJobTypeToDispaly(){
  String[] dispalyNames=new String[values().length];
  for (int i=0; i < values().length; i++) {
    dispalyNames[i]=values()[i].getDisplayName();
  }
  return dispalyNames;
}

Fixed version (ground truth):
public static String[] getJobTypeToDispaly(){
  String[] dispalyNames=new String[values().length];
  List<String> dispalyNamesList=new ArrayList<String>();
  for (int i=0; i < values().length; i++) {
    dispalyNamesList.add(i,values()[i].getDisplayName());
  }
  if (!PluginChecker.isStormPluginLoader()) {
    dispalyNamesList.remove(JobType.BIGDATASTREAMING.getDisplayName());
  }
  if (!PluginChecker.isMapReducePluginLoader()) {
    dispalyNamesList.remove(JobType.BIGDATABATCH.getDisplayName());
  }
  dispalyNames=new String[dispalyNamesList.size()];
  for (int j=0; j < dispalyNamesList.size(); j++) {
    if (dispalyNamesList.get(j) != null) {
      dispalyNames[j]=dispalyNamesList.get(j);
    }
  }
  return dispalyNames;
}
Program: 126240
Project: 126240
Buggy source:
public static void updateJobFrameworkPart(String jobTypeValue,CCombo frameworkCombo){
  if (JobType.STANDARD.getDisplayName().equals(jobTypeValue)) {
    frameworkCombo.setItems(new String[0]);
  }
 else   if (JobType.BIGDATABATCH.getDisplayName().equals(jobTypeValue)) {
    String[] items=JobBatchFramework.getFrameworkToDispaly();
    frameworkCombo.setItems(items);
    if (items.length > 0) {
      frameworkCombo.select(0);
    }
  }
 else   if (JobType.BIGDATASTREAMING.getDisplayName().equals(jobTypeValue)) {
    String[] items=JobStreamingFramework.getFrameworkToDispaly();
    frameworkCombo.setItems(items);
    if (items.length > 0) {
      frameworkCombo.select(0);
    }
  }
}

Fixed version (ground truth):
public static void updateJobFrameworkPart(String jobTypeValue,CCombo frameworkCombo){
  frameworkCombo.setEditable(true);
  if (JobType.STANDARD.getDisplayName().equals(jobTypeValue)) {
    frameworkCombo.setItems(new String[0]);
    frameworkCombo.setEditable(false);
  }
 else   if (JobType.BIGDATABATCH.getDisplayName().equals(jobTypeValue)) {
    String[] items=JobBatchFramework.getFrameworkToDispaly();
    frameworkCombo.setItems(items);
    if (items.length > 0) {
      frameworkCombo.select(0);
    }
  }
 else   if (JobType.BIGDATASTREAMING.getDisplayName().equals(jobTypeValue)) {
    String[] items=JobStreamingFramework.getFrameworkToDispaly();
    frameworkCombo.setItems(items);
    if (items.length > 0) {
      frameworkCombo.select(0);
    }
  }
}
Program: 126241
Project: 126241
Buggy source:
public ProjectPreferenceManager getProjectPreferenceManager(){
  return projectPreferenceManager;
}

Fixed version (ground truth):
public ProjectPreferenceManager getProjectPreferenceManager(){
  if (projectPreferenceManager == null) {
    projectPreferenceManager=new ProjectPreferenceManager(PLUGIN_ID);
  }
  return projectPreferenceManager;
}
Program: 126242
Project: 126242
Buggy source:
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
  projectPreferenceManager=new ProjectPreferenceManager(PLUGIN_ID);
}

Fixed version (ground truth):
public void start(BundleContext context) throws Exception {
  super.start(context);
  plugin=this;
}
Program: 126243
Project: 126243
Buggy source:
public void init(String viewId){
  if (viewId == null) {
    return;
  }
  Composite parent=null;
  try {
    parent=new Shell();
    RepositoryContextTypesFilter filter=new RepositoryContextTypesFilter(Arrays.asList(RepositoryMavenSettingManager.REGISTRY.getSupportTypes()));
    RepoCommonViewerProvider provider=new RepoCommonViewerProvider(){
      protected void doPerspecitiveFilterForCommonViewer(      TreeViewer treeViewer,      String specifiedPerspectiveId){
        boolean oldValue=PerspectiveFilterHelper.isActivedPerspectiveFilter();
        PerspectiveFilterHelper.setActivedPerspectiveFilter(false);
        try {
          super.doPerspecitiveFilterForCommonViewer(treeViewer,specifiedPerspectiveId);
        }
  finally {
          PerspectiveFilterHelper.setActivedPerspectiveFilter(oldValue);
        }
      }
    }
;
    provider.setViewId(viewId);
    TreeViewer fakeTreeViewer=provider.createViewer(parent);
    fakeTreeViewer.addFilter(filter);
    fakeTreeViewer.expandAll();
    init(fakeTreeViewer);
  }
  finally {
    if (parent != null) {
      parent.dispose();
    }
  }
}

Fixed version (ground truth):
public void init(String viewId){
  if (viewId == null) {
    return;
  }
  Composite parent=null;
  try {
    parent=new Shell();
    RepositoryContextTypesFilter filter=new RepositoryContextTypesFilter(Arrays.asList(RepositoryMavenSettingManager.REGISTRY.getSupportTypes()));
    RepoCommonViewerProvider provider=new RepoCommonViewerProvider(){
      protected void doPerspecitiveFilterForCommonViewer(      TreeViewer treeViewer,      String specifiedPerspectiveId){
        boolean oldValue=PerspectiveFilterHelper.isActivedPerspectiveFilter();
        PerspectiveFilterHelper.setActivedPerspectiveFilter(false);
        try {
          super.doPerspecitiveFilterForCommonViewer(treeViewer,specifiedPerspectiveId);
        }
  finally {
          PerspectiveFilterHelper.setActivedPerspectiveFilter(oldValue);
        }
      }
    }
;
    provider.setViewId(viewId);
    TreeViewer fakeTreeViewer=provider.createViewer(parent);
    fakeTreeViewer.addFilter(filter);
    fakeTreeViewer.expandAll();
    init(fakeTreeViewer);
  }
  finally {
    if (parent != null) {
      parent.dispose();
    }
    IRepositoryView repoView=RepositoryManagerHelper.findRepositoryView();
    if (repoView != null && repoView instanceof RepoViewCommonNavigator) {
      CommonViewer commonViewer=((RepoViewCommonNavigator)repoView).getCommonViewer();
      RepositoryNodeFilterHelper.filter(commonViewer,RepositoryNodeFilterHelper.isActivedFilter(),PerspectiveFilterHelper.isActivedPerspectiveFilter());
    }
  }
}
Program: 126245
Project: 126245
Buggy source:
public static void filter(final CommonViewer commonViewer,boolean activedFilter,boolean activedPerspectiveFilter){
  processContentExtensions(commonViewer,activedFilter,activedPerspectiveFilter);
  processCommonFilters(commonViewer,activedFilter);
}

Fixed version (ground truth):
public static void filter(final CommonViewer commonViewer,boolean activedFilter,boolean activedPerspectiveFilter){
  processContentExtensions(commonViewer,activedFilter,activedPerspectiveFilter);
  processCommonFilters(commonViewer,activedFilter);
  if (commonViewer instanceof RepoViewCommonViewer) {
    ((RepoViewCommonViewer)commonViewer).fireRefreshNodePerspectiveLisenter();
  }
}
Program: 126246
Project: 126246
Buggy source:
@Override public void perspectiveActivated(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  final CommonViewer commonViewer2=getCommonViewer();
  if (commonViewer2 instanceof RepoViewCommonViewer) {
    RepositoryNodeFilterHelper.filter(commonViewer2,RepositoryNodeFilterHelper.isActivedFilter(),PerspectiveFilterHelper.isActivedPerspectiveFilter());
    ((RepoViewCommonViewer)commonViewer2).fireRefreshNodePerspectiveLisenter();
  }
}

Fixed version (ground truth):
@Override public void perspectiveActivated(IWorkbenchPage page,IPerspectiveDescriptor perspective){
  final CommonViewer commonViewer2=getCommonViewer();
  if (commonViewer2 instanceof RepoViewCommonViewer) {
    RepositoryNodeFilterHelper.filter(commonViewer2,RepositoryNodeFilterHelper.isActivedFilter(),PerspectiveFilterHelper.isActivedPerspectiveFilter());
  }
}
Program: 126248
Project: 126248
Buggy source:
public static Set<JobInfo> getChildrenJobInfo(ProcessItem processItem){
  JobInfo parentJobInfo=new JobInfo(processItem,processItem.getProcess().getDefaultContext());
  return getAllJobInfo(processItem.getProcess(),parentJobInfo,new HashSet<JobInfo>());
}

Fixed version (ground truth):
public static Set<JobInfo> getChildrenJobInfo(ProcessItem processItem){
  JobInfo parentJobInfo=new JobInfo(processItem,processItem.getProcess().getDefaultContext());
  if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
    ITestContainerProviderService testContainerService=(ITestContainerProviderService)GlobalServiceRegister.getDefault().getService(ITestContainerProviderService.class);
    if (testContainerService.isTestContainerItem(processItem)) {
      parentJobInfo.setTestContainer(true);
    }
  }
  return getAllJobInfo(processItem.getProcess(),parentJobInfo,new HashSet<JobInfo>());
}
Program: 126250
Project: 126250
Buggy source:
public void updateLibraries(Set<String> jobModuleList,IProcess process);

Fixed version (ground truth):
public void updateLibraries(Set<ModuleNeeded> jobModuleList,IProcess process);
Program: 126251
Project: 126251
Buggy source:
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName,IProcessor processor) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    Set<String> jarList=new HashSet<String>();
    Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
    for (    ModuleNeeded module : neededModules) {
      jarList.add(module.getModuleName());
    }
    CorePlugin.getDefault().getRunProcessService().updateLibraries(jarList,currentProcess);
    if (codeModified) {
      processor.build();
      processor.syntaxCheck();
    }
    needContextInCurrentGeneration=true;
    codeModified=false;
  }
}

Fixed version (ground truth):
private static void generateBuildInfo(JobInfo jobInfo,IProgressMonitor progressMonitor,boolean isMainJob,IProcess currentProcess,String currentJobName,IProcessor processor) throws ProcessorException {
  if (isMainJob) {
    progressMonitor.subTask(Messages.getString("String_Node_Str") + currentJobName);
    Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
    CorePlugin.getDefault().getRunProcessService().updateLibraries(neededModules,currentProcess);
    if (codeModified) {
      processor.build();
      processor.syntaxCheck();
    }
    needContextInCurrentGeneration=true;
    codeModified=false;
  }
}
Program: 126252
Project: 126252
Buggy source:
private static void generatePigudfInfor(JobInfo jobInfo,ProcessItem selectedProcessItem,IProcess currentProcess,IProcessor processor,Set<ModuleNeeded> neededLibraries) throws ProcessorException {
  Set<String> jarList=new HashSet<String>();
  Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  for (  ModuleNeeded module : neededModules) {
    jarList.add(module.getModuleName());
  }
  Set<String> pigudfNeededWithSubjobPerJob=LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  String pigModuleName=null;
  if (selectedProcessItem != null && !pigudfNeededWithSubjobPerJob.isEmpty()) {
    CorePlugin.getDefault().getRunProcessService().updateLibraries(jarList,currentProcess);
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    pigModuleName=service.exportPigudf(processor,selectedProcessItem.getProperty(),exportConfig);
  }
  Set<ModuleNeeded> test=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  if (test != null && pigModuleName != null) {
    test.add(new ModuleNeeded(null,pigModuleName,null,true));
  }
}

Fixed version (ground truth):
private static void generatePigudfInfor(JobInfo jobInfo,ProcessItem selectedProcessItem,IProcess currentProcess,IProcessor processor,Set<ModuleNeeded> neededLibraries) throws ProcessorException {
  Set<ModuleNeeded> neededModules=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  Set<String> pigudfNeededWithSubjobPerJob=LastGenerationInfo.getInstance().getPigudfNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  String pigModuleName=null;
  if (selectedProcessItem != null && !pigudfNeededWithSubjobPerJob.isEmpty()) {
    CorePlugin.getDefault().getRunProcessService().updateLibraries(neededModules,currentProcess);
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    pigModuleName=service.exportPigudf(processor,selectedProcessItem.getProperty(),exportConfig);
  }
  Set<ModuleNeeded> test=LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),jobInfo.getJobVersion());
  if (test != null && pigModuleName != null) {
    test.add(new ModuleNeeded(null,pigModuleName,null,true));
  }
}
Program: 126254
Project: 126254
Buggy source:
public void generateTestReports(ProcessItem processItem,IProgressMonitor monitor) throws Exception ;

Fixed version (ground truth):
public void generateTestReports(IProgressMonitor monitor) throws Exception ;
Program: 126255
Project: 126255
Buggy source:
public void generateItemFiles(ProcessItem processItem,boolean withDependencies,IProgressMonitor monitor) throws Exception ;

Fixed version (ground truth):
public void generateItemFiles(boolean withDependencies,IProgressMonitor monitor) throws Exception ;
Program: 126256
Project: 126256
Buggy source:
public void generateJobFiles(ProcessItem process,String contextName,String version,IProgressMonitor monitor) throws Exception ;

Fixed version (ground truth):
public void generateJobFiles(IProgressMonitor monitor) throws Exception ;
Program: 126257
Project: 126257
Buggy source:
public void build() throws Exception ;

Fixed version (ground truth):
public void build(String destinationPath) throws Exception ;
Program: 126258
Project: 126258
Buggy source:
/** 
 * build the modules jobs with goals(like compile, package, install, etc). if null, will build whole project. if empty (String[0]), willn't build any thing. if goals is not null, will use maven to build. and if childrenModules is null, will try to build project pom. else will build each modules.
 */
void buildModules(String goals,String[] childrenModules);

Fixed version (ground truth):
void buildModules(String goals,String[] childrenModules,String programArgs);
Program: 126259
Project: 126259
Buggy source:
/** 
 * tests
 */
public IFolder getTestsFolder();

Fixed version (ground truth):
/** 
 * tests
 */
IFolder getTestsFolder();
Program: 126261
Project: 126261
Buggy source:
public static String trimParameter(String value){
  if (value == null) {
    return null;
  }
  int length=value.length();
  String result=removeQuotes(value);
  if (length > 1 && ((value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str"))) || (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str"))) {
    result=value.substring(1,length - 1);
    if (result.contains("String_Node_Str")) {
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
    }
  }
  return result;
}

Fixed version (ground truth):
public static String trimParameter(String value){
  if (value == null) {
    return null;
  }
  int length=value.length();
  String result=removeQuotes(value);
  if (length > 1 && (((value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str"))) || (value.startsWith("String_Node_Str") && value.endsWith("String_Node_Str")))) {
    result=value.substring(1,length - 1);
    if (result.contains("String_Node_Str")) {
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
      result=result.replaceAll("String_Node_Str","String_Node_Str");
    }
  }
  return result;
}
Program: 126262
Project: 126262
Buggy source:
private static boolean isSupportStandalone(HiveConnVersionInfo hiveVersionObj,int hiveServerIndex){
  boolean isHiveServer1="String_Node_Str".equals(HiveServerVersionUtils.extractKey(hiveServerIndex));
  if (isHiveServer1 && HiveConnVersionInfo.Cloudera_CDH5_4.equals(hiveVersionObj)) {
    return false;
  }
  return !(HiveConnVersionInfo.HDP_1_0.equals(hiveVersionObj) || isHiveServer1 && (HiveConnVersionInfo.HDP_1_2.equals(hiveVersionObj) || HiveConnVersionInfo.HDP_1_3.equals(hiveVersionObj) || HiveConnVersionInfo.HDP_2_0.equals(hiveVersionObj)));
}

Fixed version (ground truth):
private static boolean isSupportStandalone(HiveConnVersionInfo hiveVersionObj,int hiveServerIndex){
  boolean isHiveServer1="String_Node_Str".equals(HiveServerVersionUtils.extractKey(hiveServerIndex));
  return !(HiveConnVersionInfo.HDP_1_0.equals(hiveVersionObj) || isHiveServer1 && (HiveConnVersionInfo.HDP_1_2.equals(hiveVersionObj) || HiveConnVersionInfo.HDP_1_3.equals(hiveVersionObj) || HiveConnVersionInfo.HDP_2_0.equals(hiveVersionObj)));
}
Program: 126263
Project: 126263
Buggy source:
/** 
 * Makes sure if the hive server2 UI displays. If displaying it, then check the selection. Added by Marvin Wang on Mar 25, 2013.
 * @param distributionIndex
 * @param hiveVersionIndex
 */
protected void updateHiveServerAndMakeSelection(int distributionIndex,int hiveVersionIndex){
  boolean isSupportHiveServer2=HiveConnUtils.isSupportHiveServer2(distributionIndex,hiveVersionIndex);
  if (isSupportHiveServer2) {
    DatabaseConnection conn=getConnection();
    String hiveServerKey=conn.getParameters().get(ConnParameterKeys.HIVE_SERVER_VERSION);
    hiveServerVersionCombo.select(HiveServerVersionUtils.getIndexofHiveServerByKey(hiveServerKey));
  }
  int hiveServerIndex=hiveServerVersionCombo.getSelectionIndex();
  int hiveModeIndex=hiveModeCombo.getSelectionIndex();
  updateHiveModeAndMakeSelection(distributionIndex,hiveVersionIndex,hiveModeIndex,hiveServerIndex);
}

Fixed version (ground truth):
/** 
 * Makes sure if the hive server2 UI displays. If displaying it, then check the selection. Added by Marvin Wang on Mar 25, 2013.
 * @param distributionIndex
 * @param hiveVersionIndex
 */
protected void updateHiveServerAndMakeSelection(int distributionIndex,int hiveVersionIndex){
  boolean isSupportHiveServer2=HiveConnUtils.isSupportHiveServer2(distributionIndex,hiveVersionIndex);
  if (isSupportHiveServer2) {
    DatabaseConnection conn=getConnection();
    String hiveServerDisplayNames[]=HiveServerVersionUtils.extractAvailableArrayDisplayNames(HiveConnUtils.getHiveVersionObj(distributionIndex,hiveVersionIndex));
    hiveServerVersionCombo.getCombo().setItems(hiveServerDisplayNames);
    String hiveServerKey=conn.getParameters().get(ConnParameterKeys.HIVE_SERVER_VERSION);
    hiveServerVersionCombo.select(HiveServerVersionUtils.getIndexofHiveServerByKey(hiveServerKey));
  }
  int hiveServerIndex=hiveServerVersionCombo.getSelectionIndex();
  int hiveModeIndex=hiveModeCombo.getSelectionIndex();
  updateHiveModeAndMakeSelection(distributionIndex,hiveVersionIndex,hiveModeIndex,hiveServerIndex);
}
Program: 126265
Project: 126265
Buggy source:
@Override public String getLabel(){
  if ("String_Node_Str".equals(function.getCategory())) {
    return function.getName();
  }
  return function.getCategory() + "String_Node_Str" + function.getName();
}

Fixed version (ground truth):
@Override public String getLabel(){
  return function.getFunctionString();
}
Program: 126267
Project: 126267
Buggy source:
/** 
 * after create operation, can do something, like add some natures.
 */
protected void afterCreate(IProgressMonitor monitor,IResource res) throws Exception {
  IProject p=res.getProject();
  if (!p.isOpen()) {
    p.open(monitor);
  }
  covertJavaProjectToPom(monitor,p);
  changeClasspath(monitor,p);
}

Fixed version (ground truth):
/** 
 * after create operation, can do something, like add some natures.
 */
protected void afterCreate(IProgressMonitor monitor,IResource res) throws Exception {
  IProject p=res.getProject();
  if (!p.isOpen()) {
    p.open(monitor);
  }
  convertJavaProjectToPom(monitor,p);
  changeClasspath(monitor,p);
}
Program: 126268
Project: 126268
Buggy source:
public static String[] getCommandLine(String targetPlatform,boolean externalUse,IProcess currentProcess,Property property,String contextName,boolean needContext,int statisticPort,int tracePort,String... codeOptions) throws ProcessorException {
  if (currentProcess == null) {
    return new String[]{};
  }
  IContext currentContext=getContext(currentProcess,contextName);
  IProcessor processor=getProcessor(currentProcess,property,currentContext);
  processor.setTargetPlatform(targetPlatform);
  return processor.getCommandLine(needContext,externalUse,statisticPort,tracePort,codeOptions);
}

Fixed version (ground truth):
public static String[] getCommandLine(boolean oldBuildJob,String targetPlatform,boolean externalUse,IProcess currentProcess,Property property,String contextName,boolean needContext,int statisticPort,int tracePort,String... codeOptions) throws ProcessorException {
  if (currentProcess == null) {
    return new String[]{};
  }
  Property curProperty=property;
  if (curProperty == null && currentProcess instanceof IProcess2) {
    curProperty=((IProcess2)currentProcess).getProperty();
  }
  IContext currentContext=getContext(currentProcess,contextName);
  IProcessor processor=getProcessor(currentProcess,curProperty,currentContext);
  processor.setTargetPlatform(targetPlatform);
  processor.setOldBuildJob(oldBuildJob);
  return processor.getCommandLine(needContext,externalUse,statisticPort,tracePort,codeOptions);
}
Program: 126270
Project: 126270
Buggy source:
private void decompress(ResourcesManager srcManager,File destRootFolder,boolean interrupable) throws IOException {
  Set<IPath> paths=srcManager.getPaths();
  Thread currentThread=Thread.currentThread();
  try {
    for (    IPath path : paths) {
      if (interrupable && currentThread.isInterrupted()) {
        throw new InterruptedException();
      }
      InputStream bis=srcManager.getStream(path);
      File destFile=new File(destRootFolder,path.toPortableString());
      File parentFile=destFile.getParentFile();
      if (!parentFile.exists()) {
        parentFile.mkdirs();
      }
      BufferedOutputStream bos=null;
      try {
        bos=new BufferedOutputStream(new FileOutputStream(destFile),BUFFER_SIZE);
        int count;
        byte data[]=new byte[BUFFER_SIZE];
        while ((count=bis.read(data,0,BUFFER_SIZE)) != -1) {
          if (interrupable && currentThread.isInterrupted()) {
            break;
          }
          bos.write(data,0,count);
        }
      }
  finally {
        if (bos != null) {
          bos.flush();
          bos.close();
        }
        bis.close();
      }
    }
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
private void decompress(ResourcesManager srcManager,File destRootFolder,boolean interrupable) throws IOException {
  Set<IPath> paths=srcManager.getPaths();
  Thread currentThread=Thread.currentThread();
  try {
    for (    IPath path : paths) {
      if (interrupable && currentThread.isInterrupted()) {
        throw new InterruptedException();
      }
      InputStream bis=srcManager.getStream(path);
      File destFile=new File(destRootFolder,path.toPortableString());
      File parentFile=destFile.getParentFile();
      if (!parentFile.exists()) {
        parentFile.mkdirs();
      }
      BufferedOutputStream bos=null;
      try {
        bos=new BufferedOutputStream(new FileOutputStream(destFile),BUFFER_SIZE);
        int count;
        byte data[]=new byte[BUFFER_SIZE];
        while ((count=bis.read(data,0,BUFFER_SIZE)) != -1) {
          if (interrupable && currentThread.isInterrupted()) {
            break;
          }
          bos.write(data,0,count);
        }
      }
  finally {
        if (bos != null) {
          bos.flush();
          bos.close();
        }
        bis.close();
      }
    }
  }
 catch (  Throwable e) {
    if (e instanceof InterruptedException && interrupable) {
    }
 else {
      ExceptionHandler.process(e);
    }
  }
}
Program: 126272
Project: 126272
Buggy source:
public static void savePom(IProgressMonitor monitor,Model model,IFile pomFile) throws Exception {
  pomFile.delete(true,monitor);
  MavenPlugin.getMavenModelManager().createMavenModel(pomFile,model);
}

Fixed version (ground truth):
public static void savePom(IProgressMonitor monitor,Model model,IFile pomFile) throws Exception {
  if (monitor == null) {
    monitor=new NullProgressMonitor();
  }
  pomFile.delete(true,monitor);
  MavenPlugin.getMavenModelManager().createMavenModel(pomFile,model);
}
Program: 126274
Project: 126274
Buggy source:
@Override public boolean isDirty(){
  ISaveablePart currentEditorSavablePart=getCurrentEditorSavablePart();
  return currentEditorSavablePart != null ? currentEditorSavablePart.isDirty() : false;
}

Fixed version (ground truth):
@Override public boolean isDirty(){
  if (!isShouldCheckRepositoryDirty()) {
    return false;
  }
  ISaveablePart currentEditorSavablePart=getCurrentEditorSavablePart();
  return currentEditorSavablePart != null ? currentEditorSavablePart.isDirty() : false;
}
Program: 126275
Project: 126275
Buggy source:
/** 
 * Generate the avro file associated to the current MetadataTable.
 * @param connectionName The name of the current connection. This parameter will be use to generate the file name.
 */
public void generateAvroFile(String connectionName){
  this.connectionTypeName=connectionName + "String_Node_Str";
  schema=generateAvroSchema(connectionName,connectionTypeName);
  try {
    SpecificCompiler compiler=new SpecificCompiler(schema);
    compiler.setTemplateDir(AVRO_TEMPLATE_DIR);
    compiler.setFieldVisibility(FieldVisibility.PUBLIC);
    compiler.setStringType(StringType.String);
    compiler.compileToDestination(null,new File(filePath));
    schema=generateAvroSchema(connectionName,connectionTypeName + "String_Node_Str");
    compiler=new SpecificCompiler(schema);
    compiler.setTemplateDir(AVRO_TEMPLATE_BEAN_DIR);
    compiler.setFieldVisibility(FieldVisibility.PUBLIC);
    compiler.setStringType(StringType.String);
    compiler.compileToDestination(null,new File(filePath));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Generate the avro file associated to the current MetadataTable.
 * @param connectionName The name of the current connection. This parameter will be use to generate the file name.
 */
public void generateAvroFile(String connectionName){
  this.connectionTypeName=connectionName + "String_Node_Str";
  schema=generateAvroSchema(connectionName,connectionTypeName);
  ClassLoader oldClassLoader=Thread.currentThread().getContextClassLoader();
  Thread.currentThread().setContextClassLoader(CoreRuntimePlugin.class.getClassLoader());
  try {
    SpecificCompiler compiler=new SpecificCompiler(schema);
    compiler.setTemplateDir(AVRO_TEMPLATE_DIR);
    compiler.setFieldVisibility(FieldVisibility.PUBLIC);
    compiler.setStringType(StringType.String);
    compiler.compileToDestination(null,new File(filePath));
    schema=generateAvroSchema(connectionName,connectionTypeName + "String_Node_Str");
    compiler=new SpecificCompiler(schema);
    compiler.setTemplateDir(AVRO_TEMPLATE_BEAN_DIR);
    compiler.setFieldVisibility(FieldVisibility.PUBLIC);
    compiler.setStringType(StringType.String);
    compiler.compileToDestination(null,new File(filePath));
  }
 catch (  Throwable e) {
    ExceptionHandler.process(e);
  }
 finally {
    Thread.currentThread().setContextClassLoader(oldClassLoader);
  }
}
Program: 126277
Project: 126277
Buggy source:
@Override public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (!(item instanceof SalesforceSchemaConnectionItem)) {
    return false;
  }
  if (ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA == type) {
    String componentName=component.getName();
    if (componentName != null) {
switch (component.getName()) {
case COMPONENT_T_SALSEFORCE_CONNECTION:
case COMPONENT_T_SALSEFORCE_WAVE_BULK_EXEC:
case COMPONENT_T_SALSEFORCE_WAVE_OUTPUT_BULK_EXEC:
        return true;
    }
  }
}
 else if (ERepositoryObjectType.METADATA_SALESFORCE_MODULE == type || ERepositoryObjectType.METADATA_CON_TABLE == type || ERepositoryObjectType.METADATA_CON_COLUMN == type) {
  String componentName=component.getName();
  if (componentName != null) {
switch (component.getName()) {
case COMPONENT_T_SALSEFORCE_INPUT:
case COMPONENT_T_SALSEFORCE_OUTPUT:
      return true;
  }
}
}
return false;
}

Fixed version (ground truth):
@Override public boolean valid(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (!(item instanceof SalesforceSchemaConnectionItem)) {
    return false;
  }
  if (ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA == type) {
    String componentName=component.getName();
    if (COMPONENT_T_SALSEFORCE_CONNECTION.equals(componentName) || COMPONENT_T_SALSEFORCE_WAVE_BULK_EXEC.equals(componentName) || COMPONENT_T_SALSEFORCE_WAVE_OUTPUT_BULK_EXEC.equals(componentName)) {
      return true;
    }
  }
 else   if (ERepositoryObjectType.METADATA_SALESFORCE_MODULE == type || ERepositoryObjectType.METADATA_CON_TABLE == type || ERepositoryObjectType.METADATA_CON_COLUMN == type) {
    String componentName=component.getName();
    if (COMPONENT_T_SALSEFORCE_INPUT.equals(componentName) || COMPONENT_T_SALSEFORCE_OUTPUT.equals(componentName)) {
      return true;
    }
  }
  return false;
}
Program: 126278
Project: 126278
Buggy source:
@Override public boolean except(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (!(item instanceof SalesforceSchemaConnectionItem)) {
    return false;
  }
  if (ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA == type) {
    String componentName=component.getName();
    if (componentName != null) {
switch (component.getName()) {
case COMPONENT_T_SALSEFORCE_INPUT:
case COMPONENT_T_SALSEFORCE_OUTPUT:
        return true;
    }
  }
}
 else if (ERepositoryObjectType.METADATA_SALESFORCE_MODULE == type || ERepositoryObjectType.METADATA_CON_TABLE == type || ERepositoryObjectType.METADATA_CON_COLUMN == type) {
  String componentName=component.getName();
  if (componentName != null) {
switch (component.getName()) {
case COMPONENT_T_SALSEFORCE_CONNECTION:
case COMPONENT_T_SALSEFORCE_WAVE_BULK_EXEC:
case COMPONENT_T_SALSEFORCE_WAVE_OUTPUT_BULK_EXEC:
      return true;
  }
}
}
return false;
}

Fixed version (ground truth):
@Override public boolean except(Item item,ERepositoryObjectType type,RepositoryNode seletetedNode,IComponent component,String repositoryType){
  if (!(item instanceof SalesforceSchemaConnectionItem)) {
    return false;
  }
  if (ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA == type) {
    String componentName=component.getName();
    if (COMPONENT_T_SALSEFORCE_INPUT.equals(componentName) || COMPONENT_T_SALSEFORCE_OUTPUT.equals(componentName)) {
      return true;
    }
  }
 else   if (ERepositoryObjectType.METADATA_SALESFORCE_MODULE == type || ERepositoryObjectType.METADATA_CON_TABLE == type || ERepositoryObjectType.METADATA_CON_COLUMN == type) {
    String componentName=component.getName();
    if (COMPONENT_T_SALSEFORCE_CONNECTION.equals(componentName) || COMPONENT_T_SALSEFORCE_WAVE_BULK_EXEC.equals(componentName) || COMPONENT_T_SALSEFORCE_WAVE_OUTPUT_BULK_EXEC.equals(componentName)) {
      return true;
    }
  }
  return false;
}
Program: 126279
Project: 126279
Buggy source:
protected void editItem(ISelection sel){
  IStructuredSelection selection=(IStructuredSelection)sel;
  String existing=(String)selection.getFirstElement();
  String value=getExistingInputObject(existing.replace("String_Node_Str","String_Node_Str"));
  if (value != null) {
    int indexOf=list.indexOf(existing);
    list.remove(existing);
    list.add(indexOf,value);
    viewer.refresh();
  }
}

Fixed version (ground truth):
protected void editItem(ISelection sel){
  IStructuredSelection selection=(IStructuredSelection)sel;
  String existing=(String)selection.getFirstElement();
  String value=getExistingInputObject(existing);
  if (value != null) {
    int indexOf=list.indexOf(existing);
    list.remove(existing);
    list.add(indexOf,value);
    viewer.refresh();
  }
}
Program: 126280
Project: 126280
Buggy source:
protected void doLoadDefault(){
  if (viewer != null) {
    list.clear();
    String s=getPreferenceStore().getDefaultString(getPreferenceName());
    if (s != null && !"String_Node_Str".equals(s)) {
      for (      String tmp : readString(s)) {
        list.add(tmp);
      }
    }
    viewer.setInput(list);
  }
}

Fixed version (ground truth):
@Override protected void doLoadDefault(){
  if (viewer != null) {
    list.clear();
    String s=getPreferenceStore().getDefaultString(getPreferenceName());
    if (s != null && !"String_Node_Str".equals(s)) {
      for (      String tmp : readString(s)) {
        list.add(tmp);
      }
    }
    viewer.setInput(list);
  }
}
Program: 126281
Project: 126281
Buggy source:
protected void doFillIntoGrid(Composite parent,int numColumns){
  Control control=getLabelControl(parent);
  GridData gd=new GridData();
  gd.horizontalSpan=numColumns;
  control.setLayoutData(gd);
  viewer=getTableControl(parent);
  gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.verticalAlignment=GridData.FILL;
  gd.horizontalSpan=numColumns - 1;
  gd.grabExcessHorizontalSpace=true;
  viewer.getTable().setLayoutData(gd);
  buttonBox=getButtonBoxControl(parent);
  gd=new GridData();
  gd.verticalAlignment=GridData.BEGINNING;
  buttonBox.setLayoutData(gd);
}

Fixed version (ground truth):
@Override protected void doFillIntoGrid(Composite parent,int numColumns){
  Control control=getLabelControl(parent);
  GridData gd=new GridData();
  gd.horizontalSpan=numColumns;
  control.setLayoutData(gd);
  viewer=getTableControl(parent);
  gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.verticalAlignment=GridData.FILL;
  gd.horizontalSpan=numColumns - 1;
  gd.grabExcessHorizontalSpace=true;
  viewer.getTable().setLayoutData(gd);
  buttonBox=getButtonBoxControl(parent);
  gd=new GridData();
  gd.verticalAlignment=GridData.BEGINNING;
  buttonBox.setLayoutData(gd);
}
Program: 126282
Project: 126282
Buggy source:
public int getNumberOfControls(){
  return 2;
}

Fixed version (ground truth):
@Override public int getNumberOfControls(){
  return 2;
}
Program: 126283
Project: 126283
Buggy source:
public void widgetSelected(SelectionEvent event){
  Widget widget=event.widget;
  if (widget == addButton) {
    addPressed();
  }
 else   if (widget == removeButton) {
    removePressed();
  }
 else   if (widget == upButton) {
    upPressed();
  }
 else   if (widget == downButton) {
    downPressed();
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent event){
  Widget widget=event.widget;
  if (widget == addButton) {
    addPressed();
  }
 else   if (widget == removeButton) {
    removePressed();
  }
 else   if (widget == upButton) {
    upPressed();
  }
 else   if (widget == downButton) {
    downPressed();
  }
}
Program: 126284
Project: 126284
Buggy source:
public void setFocus(){
  if (viewer != null) {
    viewer.getTable().setFocus();
  }
}

Fixed version (ground truth):
@Override public void setFocus(){
  if (viewer != null) {
    viewer.getTable().setFocus();
  }
}
Program: 126285
Project: 126285
Buggy source:
/** 
 * Creates a selection listener.
 */
public void createSelectionListener(){
  selectionListener=new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      Widget widget=event.widget;
      if (widget == addButton) {
        addPressed();
      }
 else       if (widget == removeButton) {
        removePressed();
      }
 else       if (widget == upButton) {
        upPressed();
      }
 else       if (widget == downButton) {
        downPressed();
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a selection listener.
 */
public void createSelectionListener(){
  selectionListener=new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      Widget widget=event.widget;
      if (widget == addButton) {
        addPressed();
      }
 else       if (widget == removeButton) {
        removePressed();
      }
 else       if (widget == upButton) {
        upPressed();
      }
 else       if (widget == downButton) {
        downPressed();
      }
    }
  }
;
}