nus-yam/ex-repair huggingface dataset:
Program: 126286
Project: 126286
Buggy source:
public void setEnabled(boolean enabled,Composite parent){
  super.setEnabled(enabled,parent);
  setControlEnable(getTableControl(parent).getTable(),enabled);
  setControlEnable(addButton,enabled);
  setControlEnable(removeButton,enabled);
  setControlEnable(upButton,enabled);
  setControlEnable(downButton,enabled);
}

Fixed version (ground truth):
@Override public void setEnabled(boolean enabled,Composite parent){
  super.setEnabled(enabled,parent);
  setControlEnable(getTableControl(parent).getTable(),enabled);
  setControlEnable(addButton,enabled);
  setControlEnable(removeButton,enabled);
  setControlEnable(upButton,enabled);
  setControlEnable(downButton,enabled);
}
Program: 126287
Project: 126287
Buggy source:
protected void doLoad(){
  if (viewer != null) {
    String s=getPreferenceStore().getString(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 doLoad(){
  if (viewer != null) {
    String s=getPreferenceStore().getString(getPreferenceName());
    if (s != null && !"String_Node_Str".equals(s)) {
      for (      String tmp : readString(s)) {
        list.add(tmp);
      }
    }
    viewer.setInput(list);
  }
}
Program: 126288
Project: 126288
Buggy source:
protected void doStore(){
  String s=writeString(list);
  if (s != null) {
    getPreferenceStore().setValue(getPreferenceName(),s);
  }
}

Fixed version (ground truth):
@Override protected void doStore(){
  String s=writeString(list);
  if (s != null) {
    getPreferenceStore().setValue(getPreferenceName(),s);
  }
}
Program: 126289
Project: 126289
Buggy source:
protected void adjustForNumColumns(int numColumns){
  Control control=getLabelControl();
  ((GridData)control.getLayoutData()).horizontalSpan=numColumns;
  ((GridData)viewer.getTable().getLayoutData()).horizontalSpan=numColumns - 1;
}

Fixed version (ground truth):
@Override protected void adjustForNumColumns(int numColumns){
  Control control=getLabelControl();
  ((GridData)control.getLayoutData()).horizontalSpan=numColumns;
  ((GridData)viewer.getTable().getLayoutData()).horizontalSpan=numColumns - 1;
}
Program: 126290
Project: 126290
Buggy source:
private void parseUrl(String url){
  if (url == null)   return;
  urlInst=null;
  try {
    urlInst=new URL(url);
  }
 catch (  MalformedURLException e) {
    return;
  }
  if (urlInst.getProtocol() != null) {
    hasProtocol=true;
    isIntroUrl=isIntroUrl(urlInst);
    return;
  }
  return;
}

Fixed version (ground truth):
private void parseUrl(String url){
  if (url == null) {
    return;
  }
  urlInst=null;
  try {
    urlInst=new URL(url);
  }
 catch (  MalformedURLException e) {
    return;
  }
  if (urlInst.getProtocol() != null) {
    hasProtocol=true;
    isIntroUrl=isIntroUrl(urlInst);
    return;
  }
  return;
}
Program: 126291
Project: 126291
Buggy source:
/** 
 * Checks to see if tha passed URL is an Intro URL. An intro URL is an http URL that has the intro plugin id as a host. eg: "http://org.eclipse.ui.intro/test".
 * @param url
 * @return true if url is an intro URL.
 */
private boolean isIntroUrl(URL url){
  if (!url.getProtocol().equalsIgnoreCase(IntroURL.INTRO_PROTOCOL))   return false;
  if (url.getHost().equalsIgnoreCase(IntroURL.INTRO_HOST_ID))   return true;
  return false;
}

Fixed version (ground truth):
/** 
 * Checks to see if tha passed URL is an Intro URL. An intro URL is an http URL that has the intro plugin id as a host. eg: "http://org.eclipse.ui.intro/test".
 * @param url
 * @return true if url is an intro URL.
 */
private boolean isIntroUrl(URL url){
  if (!url.getProtocol().equalsIgnoreCase(IntroURL.INTRO_PROTOCOL)) {
    return false;
  }
  if (url.getHost().equalsIgnoreCase(IntroURL.INTRO_HOST_ID)) {
    return true;
  }
  return false;
}
Program: 126292
Project: 126292
Buggy source:
/** 
 * Retruns the Query part of the URL as an instance of a Properties class.
 * @param url
 * @return
 */
public Properties getQueryParameters(URL url){
  Properties properties=new Properties();
  String query=url.getQuery();
  if (query == null)   return properties;
  String[] params=StringUtil.split(query,"String_Node_Str");
  for (int i=0; i < params.length; i++) {
    String[] keyValuePair=StringUtil.split(params[i],"String_Node_Str");
    if (keyValuePair.length != 2) {
      Log.warning("String_Node_Str" + params[i]);
      continue;
    }
    String key=urlDecode(keyValuePair[0]);
    if (key == null) {
      Log.warning("String_Node_Str" + keyValuePair[0]);
      continue;
    }
    String value=urlDecode(keyValuePair[1]);
    if (value == null) {
      Log.warning("String_Node_Str" + keyValuePair[1]);
      continue;
    }
    properties.setProperty(key,value);
  }
  return properties;
}

Fixed version (ground truth):
/** 
 * Retruns the Query part of the URL as an instance of a Properties class.
 * @param url
 * @return
 */
public Properties getQueryParameters(URL url){
  Properties properties=new Properties();
  String query=url.getQuery();
  if (query == null) {
    return properties;
  }
  String[] params;
  if (EnvironmentUtils.isWindowsSystem()) {
    params=StringUtil.split(query,"String_Node_Str");
  }
 else {
    params=StringUtil.split(query,"String_Node_Str");
  }
  for (  String param : params) {
    String[] keyValuePair=StringUtil.split(param,"String_Node_Str");
    if (keyValuePair.length != 2) {
      Log.warning("String_Node_Str" + param);
      continue;
    }
    String key=urlDecode(keyValuePair[0]);
    if (key == null) {
      Log.warning("String_Node_Str" + keyValuePair[0]);
      continue;
    }
    String value=urlDecode(keyValuePair[1]);
    if (value == null) {
      Log.warning("String_Node_Str" + keyValuePair[1]);
      continue;
    }
    properties.setProperty(key,value);
  }
  return properties;
}
Program: 126293
Project: 126293
Buggy source:
/** 
 * Retruns the path attribute of the passed URL, stripped out of the leading "/". Returns null if the url does not have a path.
 * @param url
 * @return
 */
private String getPathAsAction(URL url){
  String action=url.getPath();
  if (action != null)   action=action.substring(1);
  return action;
}

Fixed version (ground truth):
/** 
 * Retruns the path attribute of the passed URL, stripped out of the leading "/". Returns null if the url does not have a path.
 * @param url
 * @return
 */
private String getPathAsAction(URL url){
  String action=url.getPath();
  if (action != null) {
    action=action.substring(1);
  }
  return action;
}
Program: 126295
Project: 126295
Buggy source:
public static List<String> getRunningJobFolders(IProcessor processor){
  List<String> jobFolders=new ArrayList<String>();
  IProcess process=processor.getProcess();
  String mainJobFolder=JavaResourcesHelper.getJobFolderName(process.getName(),process.getVersion());
  jobFolders.add(mainJobFolder);
  Set<JobInfo> childrenJobInfos=getClonedChildrenJobInfos(processor);
  for (  JobInfo jobInfo : childrenJobInfos) {
    String jobFolder=JavaResourcesHelper.getJobFolderName(jobInfo.getJobName(),jobInfo.getJobVersion());
    jobFolders.add(jobFolder);
  }
  return jobFolders;
}

Fixed version (ground truth):
public static List<String> getRunningJobFolders(IProcessor processor){
  List<String> jobFolders=new ArrayList<String>();
  IProcess process=processor.getProcess();
  String mainJobFolder=JavaResourcesHelper.getJobFolderName(process.getName(),process.getVersion());
  jobFolders.add(mainJobFolder);
  Set<JobInfo> childrenJobInfos=getClonedChildrenJobInfos(processor);
  for (  JobInfo jobInfo : childrenJobInfos) {
    String jobFolder=JavaResourcesHelper.getJobFolderName(jobInfo.getJobName(),jobInfo.getJobVersion());
    jobFolders.add(jobFolder);
  }
  IProcess baseProcess=ProcessUtils.getTestContainerBaseProcess(process);
  if (baseProcess != null) {
    String parentJobFolder=JavaResourcesHelper.getJobFolderName(baseProcess.getName(),baseProcess.getVersion());
    jobFolders.add(parentJobFolder);
  }
  return jobFolders;
}
Program: 126296
Project: 126296
Buggy source:
private int getCurrentActiveLinksNbInput(int connectionCategory){
  int nb=0;
  for (  IConnection connection : getIncomingConnections()) {
    if (connection.isActivate() && connection.getLineStyle().hasConnectionCategory(connectionCategory)) {
      nb++;
    }
  }
  return nb;
}

Fixed version (ground truth):
protected int getCurrentActiveLinksNbInput(int connectionCategory){
  int nb=0;
  for (  IConnection connection : getIncomingConnections()) {
    if (connection.isActivate() && connection.getLineStyle().hasConnectionCategory(connectionCategory)) {
      nb++;
    }
  }
  return nb;
}
Program: 126297
Project: 126297
Buggy source:
private void installJarFromPlatformIfExists(String moduleName,String uriPath){
  if (jarsFromExtensions.containsValue(uriPath)) {
    return;
  }
  String jarName=null;
  try {
    if (checkJarInstalledFromPlatform(uriPath)) {
      File file=new File(uriJarInstalled.get(uriPath));
      if (file.exists()) {
        jarName=file.getName();
      }
    }
 else {
      URI uri=new URI(uriPath);
      URL url=FileLocator.toFileURL(uri.toURL());
      File file=new File(url.getFile());
      if (file.exists()) {
        jarName=file.getName();
      }
    }
  }
 catch (  Exception e) {
  }
  if (jarName != null) {
    jarsFromExtensions.put(jarName,uriPath);
    jarsFromExtensions.put(moduleName,uriPath);
  }
}

Fixed version (ground truth):
private void installJarFromPlatformIfExists(String moduleName,String uriPath){
  if (jarsFromExtensions.containsValue(uriPath)) {
    return;
  }
  String jarName=null;
  try {
    if (checkJarInstalledFromPlatform(uriPath)) {
      File file=new File(uriJarInstalled.get(uriPath));
      if (file.exists()) {
        jarName=file.getName();
      }
    }
  }
 catch (  Exception e) {
  }
  if (jarName != null) {
    jarsFromExtensions.put(jarName,uriPath);
    jarsFromExtensions.put(moduleName,uriPath);
  }
}
Program: 126298
Project: 126298
Buggy source:
@Override public BundleEntry getEntry(String path){
  BundleEntry be=super.getEntry(path);
  if (be == null && path.endsWith("String_Node_Str")) {
    File file=getFile(path,false);
    if (file == null) {
      URL resourcePathInFragment=findInFragments(generation.getRevision().getBundle(),path);
      if (resourcePathInFragment != null) {
        return null;
      }
      getMissingJars().add(path + '/');
      be=new FileBundleEntry(new File(generation.getBundleFile().getBaseFile(),path),path);
      MissingJarServices.logDebugInfo("String_Node_Str" + generation.getRevision().getSymbolicName() + "String_Node_Str"+ path);
    }
 else {
      be=new FileBundleEntry(file,path);
    }
  }
 else {
    if (getMissingJars().contains(path)) {
      be=new MissingJarBundleEntry(path);
      MissingJarServices.logDebugInfo("String_Node_Str" + generation.getRevision().getSymbolicName() + "String_Node_Str"+ path);
    }
  }
  return be;
}

Fixed version (ground truth):
@Override public BundleEntry getEntry(String path){
  BundleEntry be=super.getEntry(path);
  if (be == null && !generation.getRevision().getSymbolicName().endsWith("String_Node_Str")) {
    if (path.endsWith("String_Node_Str")) {
      if (path.startsWith("String_Node_Str")) {
        path=path.substring(1);
      }
      File file=getFile(path,false);
      if (file == null) {
        URL resourcePathInFragment=findInFragments(generation.getRevision().getBundle(),path);
        if (resourcePathInFragment != null) {
          return null;
        }
        getMissingJars().add(path + '/');
        be=new FileBundleEntry(new File(generation.getBundleFile().getBaseFile(),path),path);
        MissingJarServices.logDebugInfo("String_Node_Str" + generation.getRevision().getSymbolicName() + "String_Node_Str"+ path);
      }
 else {
        be=new FileBundleEntry(file,path);
        getMissingJars().remove(path + '/');
      }
    }
 else     if (path.endsWith("String_Node_Str") && !getMissingJars().isEmpty()) {
      for (      String jarPath : getMissingJars()) {
        getEntry(jarPath.substring(0,jarPath.length() - 1));
      }
    }
  }
  return be;
}
Program: 126299
Project: 126299
Buggy source:
/** 
 * DOC ycbai HadoopCustomVersionDefineDialog constructor comment. <p> Create a instance of this dialog and initialise it use   {@code currentLibMap} which form is:<ul> <li>Key: one enumeration name of  {@link ECustomVersionGroup}<li>Value: set of libraries correspond to the key.</li> </ul> </p>
 * @param parentShell
 * @param currentLibMap
 */
public HadoopCustomVersionDefineDialog(Shell parentShell,Map<String,Set<String>> currentLibMap){
  super(parentShell);
  this.currentLibMap=currentLibMap;
  customLibUtil=new HadoopCustomLibrariesUtil();
}

Fixed version (ground truth):
/** 
 * DOC ycbai HadoopCustomVersionDefineDialog constructor comment. <p> Create a instance of this dialog and initialise it use   {@code currentLibMap} which form is:<ul> <li>Key: one enumeration name of  {@link ECustomVersionGroup}<li>Value: set of libraries correspond to the key.</li> </ul> </p>
 * @param parentShell
 * @param currentLibMap
 */
public HadoopCustomVersionDefineDialog(Shell parentShell,Map<String,Set<String>> currentLibMap){
  super(parentShell);
  this.currentLibMap=currentLibMap;
  customLibUtil=new HadoopCustomLibrariesUtil();
  initLibMap();
}
Program: 126300
Project: 126300
Buggy source:
private void init(){
  libsManager=CustomVersionLibsManager.getInstance();
  if (currentLibMap != null) {
    ECustomVersionGroup[] groups=ECustomVersionGroup.values();
    for (    ECustomVersionGroup group : groups) {
      Set<String> set=currentLibMap.get(group.getName());
      if (set == null) {
        set=new HashSet<String>();
      }
      libMap.put(group.getName(),customLibUtil.convertToLibraryFile(set));
    }
  }
  ECustomVersionGroup selectedType=getSelectedType();
  if (selectedType != null) {
    selectLibFileSet=libMap.get(selectedType.getName());
    viewer.setInput(selectLibFileSet);
  }
}

Fixed version (ground truth):
private void init(){
  libsManager=CustomVersionLibsManager.getInstance();
  ECustomVersionGroup selectedType=getSelectedType();
  if (selectedType != null) {
    selectLibFileSet=libMap.get(selectedType.getName());
    viewer.setInput(selectLibFileSet);
  }
}
Program: 126301
Project: 126301
Buggy source:
@Override public void updateTopMessages(String messages,int status){
  super.updateTopMessages(messages,status);
  if (actionBtn != null && !actionBtn.isDisposed()) {
    actionBtn.setBackground(backgroundColor);
  }
  setActionButtonVisible(!hidden);
}

Fixed version (ground truth):
@Override public void updateTopMessages(String messages,int status){
  super.updateTopMessages(messages,status);
  if (actionBtn != null && !actionBtn.isDisposed()) {
    actionBtn.setBackground(backgroundColor);
  }
  setActionButtonVisible(!hidden);
  changeBackgroundColor(status);
}
Program: 126302
Project: 126302
Buggy source:
private MessagesWithActionComposite createMessagesComposite(Composite parent){
  return new MessagesWithActionComposite(parent,SWT.TOP);
}

Fixed version (ground truth):
private MessagesWithActionComposite createMessagesComposite(Composite parent){
  MessagesWithActionComposite messagesComposite=new MessagesWithActionComposite(parent,SWT.TOP){
    @Override protected void changeBackgroundColor(    int status){
switch (status) {
case IStatus.WARNING:
        CoreUIPlugin.setCSSId(this,CSS_MESSAGES_WITH_ACTION_COMPOSITE_WARN);
      break;
case IStatus.ERROR:
    CoreUIPlugin.setCSSId(this,CSS_MESSAGES_WITH_ACTION_COMPOSITE_ERROR);
  break;
default :
}
}
}
;
return messagesComposite;
}
Program: 126305
Project: 126305
Buggy source:
@SuppressWarnings("String_Node_Str") public static boolean isEclipseDebug(){
  boolean debuggerEnabled=false;
  BundleContext bundleContext=FrameworkUtil.getBundle(TalendDebugHandler.class).getBundleContext();
  ServiceReference<DebugOptions> debugOptSR=bundleContext.getServiceReference(DebugOptions.class);
  if (debugOptSR != null) {
    DebugOptions debugOpt=bundleContext.getService(debugOptSR);
    debuggerEnabled=debugOpt.isDebugEnabled();
  }
  return debuggerEnabled;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static boolean isEclipseDebug(){
  boolean debuggerEnabled=false;
  BundleContext bundleContext=FrameworkUtil.getBundle(TalendDebugHandler.class).getBundleContext();
  if (bundleContext == null) {
    return false;
  }
  ServiceReference<DebugOptions> debugOptSR=bundleContext.getServiceReference(DebugOptions.class);
  if (debugOptSR != null) {
    DebugOptions debugOpt=bundleContext.getService(debugOptSR);
    debuggerEnabled=debugOpt.isDebugEnabled();
  }
  return debuggerEnabled;
}
Program: 126307
Project: 126307
Buggy source:
@Override public List<Problem> getProblems(INode node,IElement element){
  List<Problem> toReturn=new ArrayList<Problem>();
  List<ModuleNeeded> list=node.getComponent().getModulesNeeded();
  List<ModuleNeeded> modulesNeeded=ModulesNeededProvider.getModulesNeeded();
  for (  ModuleNeeded module : modulesNeeded) {
    for (    ModuleNeeded current : list) {
      if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
        if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired(node.getElementParameters())) {
          Problem problem=new Problem(element,"String_Node_Str" + current.getModuleName() + "String_Node_Str",ProblemStatus.ERROR);
          problem.setKey("String_Node_Str" + current.getModuleName());
          toReturn.add(problem);
        }
      }
    }
  }
  return toReturn;
}

Fixed version (ground truth):
@Override public List<Problem> getProblems(INode node,IElement element){
  List<Problem> toReturn=new ArrayList<Problem>();
  List<ModuleNeeded> list=LibrariesManagerUtils.getNotInstalledModules(node);
  for (  ModuleNeeded current : list) {
    Problem problem=new Problem(element,"String_Node_Str" + current.getModuleName() + "String_Node_Str",ProblemStatus.ERROR);
    problem.setKey("String_Node_Str" + current.getModuleName());
    toReturn.add(problem);
  }
  return toReturn;
}
Program: 126308
Project: 126308
Buggy source:
public static List<ModuleNeeded> getNotInstalledModules(List<ModuleNeeded> modules){
  List<ModuleNeeded> updatedModules=new ArrayList<ModuleNeeded>();
  List<ModuleNeeded> modulesNeeded=ModulesNeededProvider.getModulesNeeded();
  if (modules != null) {
    for (    ModuleNeeded module : modules) {
      for (      ModuleNeeded fromProvider : modulesNeeded) {
        if (fromProvider.getModuleName().equals(module.getModuleName()) && fromProvider.getContext().equals(module.getContext()) && ELibraryInstallStatus.NOT_INSTALLED == fromProvider.getStatus() && (fromProvider.getRequiredIf() != null && fromProvider.getRequiredIf().equals(module.getRequiredIf()))) {
          updatedModules.add(fromProvider);
          break;
        }
      }
    }
  }
  return updatedModules;
}

Fixed version (ground truth):
public static List<ModuleNeeded> getNotInstalledModules(INode node){
  List<ModuleNeeded> updatedModules=new ArrayList<ModuleNeeded>();
  List<ModuleNeeded> nodeModulesList=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
    IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
    Set<ModuleNeeded> neededLibraries=service.getNeededModules(node,false);
    nodeModulesList=new ArrayList<ModuleNeeded>(neededLibraries);
  }
 else {
    nodeModulesList=node.getModulesNeeded();
  }
  List<ModuleNeeded> modulesNeeded=ModulesNeededProvider.getModulesNeeded();
  for (  ModuleNeeded module : modulesNeeded) {
    for (    ModuleNeeded current : nodeModulesList) {
      if (current.getContext().equals(module.getContext()) && current.getModuleName().equals(module.getModuleName())) {
        if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired(node.getElementParameters())) {
          updatedModules.add(current);
          break;
        }
      }
    }
  }
  return updatedModules;
}
Program: 126309
Project: 126309
Buggy source:
public static List<ModuleNeeded> getNotInstalledModules(INode node){
  List<ModuleNeeded> updatedModules=new ArrayList<ModuleNeeded>();
  List<ModuleNeeded> nodeModulesList=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
    IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
    Set<ModuleNeeded> neededLibraries=service.getNeededModules(node,false);
    nodeModulesList=new ArrayList<ModuleNeeded>(neededLibraries);
  }
 else {
    nodeModulesList=node.getModulesNeeded();
  }
  List<ModuleNeeded> modulesNeeded=ModulesNeededProvider.getModulesNeeded();
  for (  ModuleNeeded module : modulesNeeded) {
    for (    ModuleNeeded current : nodeModulesList) {
      if (module.getContext().equals(current.getContext()) && current.getModuleName().equals(module.getModuleName())) {
        if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired(node.getElementParameters())) {
          updatedModules.add(current);
          break;
        }
      }
    }
  }
  return updatedModules;
}

Fixed version (ground truth):
public static List<ModuleNeeded> getNotInstalledModules(INode node){
  List<ModuleNeeded> updatedModules=new ArrayList<ModuleNeeded>();
  List<ModuleNeeded> nodeModulesList=null;
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
    IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
    Set<ModuleNeeded> neededLibraries=service.getNeededModules(node,false);
    nodeModulesList=new ArrayList<ModuleNeeded>(neededLibraries);
  }
 else {
    nodeModulesList=node.getModulesNeeded();
  }
  List<ModuleNeeded> modulesNeeded=ModulesNeededProvider.getModulesNeeded();
  for (  ModuleNeeded module : modulesNeeded) {
    for (    ModuleNeeded current : nodeModulesList) {
      if (current.getContext() != null && current.getContext().equals(module.getContext()) && current.getModuleName() != null && current.getModuleName().equals(module.getModuleName())) {
        if (module.getStatus() == ELibraryInstallStatus.NOT_INSTALLED && current.isRequired(node.getElementParameters())) {
          updatedModules.add(current);
          break;
        }
      }
    }
  }
  return updatedModules;
}
Program: 126310
Project: 126310
Buggy source:
/** 
 * Get Current type name for launching. yzhang Comment method "getTypeName".
 */
public String getTypeName();

Fixed version (ground truth):
/** 
 * Get Current type name for launching. yzhang Comment method "getTypeName".
 * @deprecated getMainClass instead
 */
@Deprecated public String getTypeName();
Program: 126311
Project: 126311
Buggy source:
public static String[] getMainCommand(String processName,String processVersion,String contextName,int statisticPort,int tracePort,String... codeOptions) throws ProcessorException {
  IProcess currentProcess=null;
  ProcessItem selectedProcessItem=null;
  selectedProcessItem=ItemCacheManager.getProcessItem(processName,processVersion);
  if (selectedProcessItem != null) {
    IDesignerCoreService service=CorePlugin.getDefault().getDesignerCoreService();
    currentProcess=service.getProcessFromProcessItem(selectedProcessItem);
  }
  if (currentProcess == null) {
    return new String[]{};
  }
  IContext currentContext=getContext(currentProcess,contextName);
  IProcessor processor=getProcessor(currentProcess,selectedProcessItem.getProperty(),currentContext);
  String[] cmd=new String[]{processor.getCodePath().removeFirstSegments(1).toString().replace("String_Node_Str","String_Node_Str")};
  if (codeOptions != null) {
    for (    String string : codeOptions) {
      if (string != null) {
        cmd=(String[])ArrayUtils.add(cmd,string);
      }
    }
  }
  if (needContextInCurrentGeneration && contextName != null && !contextName.equals("String_Node_Str")) {
    cmd=(String[])ArrayUtils.add(cmd,"String_Node_Str" + contextName);
  }
  if (statisticPort != -1) {
    cmd=(String[])ArrayUtils.add(cmd,"String_Node_Str" + statisticPort);
  }
  if (tracePort != -1) {
    cmd=(String[])ArrayUtils.add(cmd,"String_Node_Str" + tracePort);
  }
  return cmd;
}

Fixed version (ground truth):
public static String[] getMainCommand(String processName,String processVersion,String contextName,int statisticPort,int tracePort,String... codeOptions) throws ProcessorException {
  IProcess currentProcess=null;
  ProcessItem selectedProcessItem=null;
  selectedProcessItem=ItemCacheManager.getProcessItem(processName,processVersion);
  if (selectedProcessItem != null) {
    IDesignerCoreService service=CorePlugin.getDefault().getDesignerCoreService();
    currentProcess=service.getProcessFromProcessItem(selectedProcessItem);
  }
  if (currentProcess == null) {
    return new String[]{};
  }
  IContext currentContext=getContext(currentProcess,contextName);
  IProcessor processor=getProcessor(currentProcess,selectedProcessItem.getProperty(),currentContext);
  String[] cmd=new String[]{processor.getMainClass()};
  if (codeOptions != null) {
    for (    String string : codeOptions) {
      if (string != null) {
        cmd=(String[])ArrayUtils.add(cmd,string);
      }
    }
  }
  if (needContextInCurrentGeneration && contextName != null && !contextName.equals("String_Node_Str")) {
    cmd=(String[])ArrayUtils.add(cmd,"String_Node_Str" + contextName);
  }
  if (statisticPort != -1) {
    cmd=(String[])ArrayUtils.add(cmd,"String_Node_Str" + statisticPort);
  }
  if (tracePort != -1) {
    cmd=(String[])ArrayUtils.add(cmd,"String_Node_Str" + tracePort);
  }
  return cmd;
}
Program: 126313
Project: 126313
Buggy source:
public AvroMetadataTable(String filePath,String technicalProjectName,String jobName,String jobVersion){
  super();
  this.filePath=filePath.substring(1,filePath.length() - 1);
  this.filePath=this.filePath.substring(0,filePath.lastIndexOf("String_Node_Str")) + "String_Node_Str";
  this.technicalProjectName=technicalProjectName.toLowerCase();
  this.jobName=jobName + "String_Node_Str" + jobVersion.replace("String_Node_Str","String_Node_Str");
  this.jobName=this.jobName.toLowerCase();
}

Fixed version (ground truth):
/** 
 * This constructor use already extracted variable of the current metadata. It will be used by the clone() method.
 * @param filePath the path to the generated sources of the project
 * @param technicalProjectName the name of the project
 * @param jobName the name of the job with version
 */
public AvroMetadataTable(String filePath,String technicalProjectName,String jobName){
  super();
  this.filePath=filePath;
  this.technicalProjectName=technicalProjectName;
  this.jobName=jobName;
}
Program: 126314
Project: 126314
Buggy source:
@Override public IMetadataTable clone(boolean withCustoms){
  AvroMetadataTable clonedMetadata=null;
  try {
    clonedMetadata=new AvroMetadataTable(filePath,technicalProjectName,jobName,filePath);
    List<IMetadataColumn> clonedMetaColumns=new ArrayList<IMetadataColumn>();
    clonedMetadata.setListColumns(clonedMetaColumns);
    for (int i=0; i < super.getListColumns().size(); i++) {
      clonedMetaColumns.add(super.getListColumns().get(i).clone(withCustoms));
    }
    List<IMetadataColumn> clonedMetaUnusedColumns=new ArrayList<IMetadataColumn>();
    clonedMetadata.setUnusedColumns(clonedMetaUnusedColumns);
    for (int i=0; i < super.getListUnusedColumns().size(); i++) {
      clonedMetaColumns.add(super.getListUnusedColumns().get(i).clone(withCustoms));
    }
    clonedMetadata.setTableName(this.getTableName());
    clonedMetadata.setLabel(this.getLabel());
    clonedMetadata.setAdditionalProperties(new HashMap<String,String>(super.getAdditionalProperties()));
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return clonedMetadata;
}

Fixed version (ground truth):
@Override public IMetadataTable clone(boolean withCustoms){
  AvroMetadataTable clonedMetadata=null;
  try {
    clonedMetadata=new AvroMetadataTable(filePath,technicalProjectName,jobName);
    List<IMetadataColumn> clonedMetaColumns=new ArrayList<IMetadataColumn>();
    clonedMetadata.setListColumns(clonedMetaColumns);
    for (int i=0; i < super.getListColumns().size(); i++) {
      clonedMetaColumns.add(super.getListColumns().get(i).clone(withCustoms));
    }
    List<IMetadataColumn> clonedMetaUnusedColumns=new ArrayList<IMetadataColumn>();
    clonedMetadata.setUnusedColumns(clonedMetaUnusedColumns);
    for (int i=0; i < super.getListUnusedColumns().size(); i++) {
      clonedMetaColumns.add(super.getListUnusedColumns().get(i).clone(withCustoms));
    }
    clonedMetadata.setTableName(this.getTableName());
    clonedMetadata.setLabel(this.getLabel());
    clonedMetadata.setAdditionalProperties(new HashMap<String,String>(super.getAdditionalProperties()));
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  return clonedMetadata;
}
Program: 126315
Project: 126315
Buggy source:
/** 
 * return the folder where to find the missing libraries
 * @param theContext
 */
protected File getLibJavaFolderFile(BundleContext theContext) throws URISyntaxException {
  String libFolderSysProp=System.getProperty(ORG_TALEND_EXTERNAL_LIB_FOLDER_SYS_PROP);
  if (libFolderSysProp != null) {
    return new File(libFolderSysProp);
  }
 else {
    Location installLocation=getInstallLocation(theContext);
    File installFolder=URIUtil.toFile(URIUtil.toURI(installLocation.getURL()));
    return new File(installFolder,System.getProperty("String_Node_Str",LIB_JAVA_SUB_FOLDER));
  }
}

Fixed version (ground truth):
/** 
 * return the folder where to find the missing libraries
 * @param theContext
 */
protected File getLibJavaFolderFile(BundleContext theContext) throws URISyntaxException {
  String libFolderSysProp=System.getProperty(ORG_TALEND_EXTERNAL_LIB_FOLDER_SYS_PROP);
  if (libFolderSysProp != null) {
    return new File(libFolderSysProp);
  }
 else {
    Location installLocation=getConfigurationLocation(theContext);
    File installFolder=URIUtil.toFile(URIUtil.toURI(installLocation.getURL()));
    return new File(installFolder,System.getProperty("String_Node_Str",LIB_JAVA_SUB_FOLDER));
  }
}
Program: 126316
Project: 126316
Buggy source:
/** 
 * Export the resources that were previously specified for export (or if a single resource was specified then export. it recursively)
 */
@Override public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
  this.monitor=progressMonitor;
  try {
    initialize();
  }
 catch (  IOException e) {
    throw new InvocationTargetException(e,NLS.bind("String_Node_Str",e.getMessage()));
  }
  try {
    int totalWork=IProgressMonitor.UNKNOWN;
    try {
      if (resourcesListToExport == null) {
      }
 else {
        totalWork=countSelectedResources();
      }
    }
 catch (    CoreException e) {
    }
    monitor.beginTask("String_Node_Str",totalWork);
    if (resourcesListToExport == null) {
    }
 else {
      exportSpecifiedResources();
    }
    try {
      exporter.finished();
    }
 catch (    IOException e) {
      throw new InvocationTargetException(e,NLS.bind("String_Node_Str",e.getMessage()));
    }
  }
  finally {
    monitor.done();
  }
}

Fixed version (ground truth):
/** 
 * Export the resources that were previously specified for export (or if a single resource was specified then export. it recursively)
 */
@Override public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
  this.monitor=progressMonitor;
  try {
    initialize();
  }
 catch (  IOException e) {
    MessageBoxExceptionHandler.process(e);
    throw new InvocationTargetException(e,NLS.bind("String_Node_Str",e.getMessage()));
  }
  try {
    int totalWork=IProgressMonitor.UNKNOWN;
    try {
      if (resourcesListToExport == null) {
      }
 else {
        totalWork=countSelectedResources();
      }
    }
 catch (    CoreException e) {
    }
    monitor.beginTask("String_Node_Str",totalWork);
    if (resourcesListToExport == null) {
    }
 else {
      exportSpecifiedResources();
    }
    try {
      exporter.finished();
    }
 catch (    IOException e) {
      throw new InvocationTargetException(e,NLS.bind("String_Node_Str",e.getMessage()));
    }
  }
  finally {
    monitor.done();
  }
}
Program: 126319
Project: 126319
Buggy source:
@Override protected void createColumns(TableViewerCreator<B> tableViewerCreator,Table table){
  tableViewerCreator.setReadOnly(false);
  TableViewerCreatorColumn column=new TableViewerCreatorColumn(tableViewerCreator);
  column.setTitle("String_Node_Str");
  column.setDefaultInternalValue("String_Node_Str");
  column.setWidth(15);
  if (isRepository) {
    configureUsefulColumn(tableViewerCreator);
  }
  configureNameColumn(tableViewerCreator);
  if (showDbColumnName) {
    configureDbColumnName(tableViewerCreator);
  }
  if (showKeyColumn) {
    configureKeyColumn(tableViewerCreator);
  }
  configureTypeColumns(tableViewerCreator);
  if (showNullableColumn) {
    configureNullableColumn(tableViewerCreator);
  }
  configurePatternColumn(tableViewerCreator);
  if (showLengthColumn) {
    configureLengthColumn(tableViewerCreator);
  }
  if (showOriginalLength) {
    configureOriginalLengthColumn(tableViewerCreator);
  }
  if (showAdditionalFieldColumn) {
    configureAdditionalFieldColumns(tableViewerCreator);
  }
  if (showPrecisionColumn) {
    configurePrecisionColumn(tableViewerCreator);
  }
  if (showDefaultColumn) {
    configureDefaultColumn(tableViewerCreator);
  }
  if (showCommentColumn) {
    configureCommentColumn(tableViewerCreator);
  }
  if (PluginChecker.isDatacertPluginLoaded()) {
    configureRelationshipType(tableViewerCreator);
    configureRelatedEntity(tableViewerCreator);
  }
}

Fixed version (ground truth):
@Override protected void createColumns(TableViewerCreator<B> tableViewerCreator,Table table){
  tableViewerCreator.setReadOnly(false);
  TableViewerCreatorColumn column=new TableViewerCreatorColumn(tableViewerCreator);
  column.setTitle("String_Node_Str");
  column.setDefaultInternalValue("String_Node_Str");
  column.setWidth(15);
  if (isRepository) {
    configureUsefulColumn(tableViewerCreator);
  }
  configureNameColumn(tableViewerCreator);
  if (showDbColumnName) {
    configureDbColumnName(tableViewerCreator);
  }
  if (showKeyColumn) {
    configureKeyColumn(tableViewerCreator);
  }
  configureTypeColumns(tableViewerCreator);
  if (showNullableColumn) {
    configureNullableColumn(tableViewerCreator);
  }
  configurePatternColumn(tableViewerCreator);
  if (showLengthColumn) {
    configureLengthColumn(tableViewerCreator);
  }
  if (showOriginalLength) {
    configureOriginalLengthColumn(tableViewerCreator);
  }
  if (showAdditionalFieldColumn) {
    configureAdditionalFieldColumns(tableViewerCreator);
  }
  if (showPrecisionColumn) {
    configurePrecisionColumn(tableViewerCreator);
  }
  configureDefaultColumn(tableViewerCreator);
  if (showCommentColumn) {
    configureCommentColumn(tableViewerCreator);
  }
  if (PluginChecker.isDatacertPluginLoaded()) {
    configureRelationshipType(tableViewerCreator);
    configureRelatedEntity(tableViewerCreator);
  }
}
Program: 126320
Project: 126320
Buggy source:
@Override protected void createColumns(TableViewerCreator<B> tableViewerCreator,Table table){
  tableViewerCreator.setReadOnly(false);
  TableViewerCreatorColumn column=new TableViewerCreatorColumn(tableViewerCreator);
  column.setTitle("String_Node_Str");
  column.setDefaultInternalValue("String_Node_Str");
  column.setWidth(15);
  if (isRepository) {
    configureUsefulColumn(tableViewerCreator);
  }
  configureNameColumn(tableViewerCreator);
  if (showDbColumnName) {
    configureDbColumnName(tableViewerCreator);
  }
  if (showKeyColumn) {
    configureKeyColumn(tableViewerCreator);
  }
  configureTypeColumns(tableViewerCreator);
  if (showNullableColumn) {
    configureNullableColumn(tableViewerCreator);
  }
  configurePatternColumn(tableViewerCreator);
  if (showLengthColumn) {
    configureLengthColumn(tableViewerCreator);
  }
  if (showOriginalLength) {
    configureOriginalLengthColumn(tableViewerCreator);
  }
  if (showAdditionalFieldColumn) {
    configureAdditionalFieldColumns(tableViewerCreator);
  }
  if (showPrecisionColumn) {
    configurePrecisionColumn(tableViewerCreator);
  }
  configureDefaultColumn(tableViewerCreator);
  if (showCommentColumn) {
    configureCommentColumn(tableViewerCreator);
  }
  if (PluginChecker.isDatacertPluginLoaded()) {
    configureRelationshipType(tableViewerCreator);
    configureRelatedEntity(tableViewerCreator);
  }
}

Fixed version (ground truth):
@Override protected void createColumns(TableViewerCreator<B> tableViewerCreator,Table table){
  tableViewerCreator.setReadOnly(false);
  TableViewerCreatorColumn column=new TableViewerCreatorColumn(tableViewerCreator);
  column.setTitle("String_Node_Str");
  column.setDefaultInternalValue("String_Node_Str");
  column.setWidth(15);
  if (isRepository) {
    configureUsefulColumn(tableViewerCreator);
  }
  configureNameColumn(tableViewerCreator);
  if (showDbColumnName) {
    configureDbColumnName(tableViewerCreator);
  }
  if (showKeyColumn) {
    configureKeyColumn(tableViewerCreator);
  }
  configureTypeColumns(tableViewerCreator);
  if (showNullableColumn) {
    configureNullableColumn(tableViewerCreator);
  }
  configurePatternColumn(tableViewerCreator);
  if (showLengthColumn) {
    configureLengthColumn(tableViewerCreator);
  }
  if (showOriginalLength) {
    configureOriginalLengthColumn(tableViewerCreator);
  }
  if (showAdditionalFieldColumn) {
    configureAdditionalFieldColumns(tableViewerCreator);
  }
  if (showPrecisionColumn) {
    configurePrecisionColumn(tableViewerCreator);
  }
  if (showDefaultColumn) {
    configureDefaultColumn(tableViewerCreator);
  }
  if (showCommentColumn) {
    configureCommentColumn(tableViewerCreator);
  }
  if (PluginChecker.isDatacertPluginLoaded()) {
    configureRelationshipType(tableViewerCreator);
    configureRelatedEntity(tableViewerCreator);
  }
}
Program: 126322
Project: 126322
Buggy source:
public void run(){
  handleErrorOutput(outputComposite,tabFolder,outputTabItem);
}

Fixed version (ground truth):
@Override public void run(){
  handleErrorOutput(outputComposite,tabFolder,outputTabItem);
}
Program: 126323
Project: 126323
Buggy source:
public void widgetDefaultSelected(SelectionEvent e){
}

Fixed version (ground truth):
@Override public void widgetDefaultSelected(SelectionEvent e){
}
Program: 126325
Project: 126325
Buggy source:
/** 
 * fieldSeparator : Adapt Custom Label and set the field Text.
 */
protected void fieldSeparatorManager(){
  if (isContextMode()) {
    return;
  }
  FieldSeparator seperator=FieldSeparator.getByName(fieldSeparatorCombo.getText());
  getConnection().setFieldSeparatorType(seperator);
  if (fieldSeparatorCombo.getSelectionIndex() >= 5) {
    fieldSeparatorText.setLabelText(fieldSeparatorCombo.getText());
    fieldSeparatorText.setEditable(true);
    fieldSeparatorText.setText(getConnection().getFieldSeparatorValue());
    fieldSeparatorText.forceFocus();
    fieldSeparatorText.setReadOnly(false);
  }
 else {
switch (fieldSeparatorCombo.getSelectionIndex()) {
case 0:
      fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
    break;
case 1:
  fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
case 2:
fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
case 3:
fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
case 4:
fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
default :
break;
}
getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
fieldSeparatorText.setLabelText(Messages.getString("String_Node_Str"));
fieldSeparatorText.setReadOnly(true);
}
}

Fixed version (ground truth):
/** 
 * fieldSeparator : Adapt Custom Label and set the field Text.
 */
protected void fieldSeparatorManager(){
  if (isContextMode()) {
    return;
  }
  FieldSeparator seperator=FieldSeparator.getByName(fieldSeparatorCombo.getText());
  getConnection().setFieldSeparatorType(seperator);
  if (fieldSeparatorCombo.getSelectionIndex() >= 5) {
    fieldSeparatorText.setLabelText(fieldSeparatorCombo.getText());
    fieldSeparatorText.setEditable(true);
    fieldSeparatorText.setText(getConnection().getFieldSeparatorValue());
    fieldSeparatorText.forceFocus();
    fieldSeparatorText.setReadOnly(false);
  }
 else {
switch (fieldSeparatorCombo.getSelectionIndex()) {
case 0:
      fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
    break;
case 1:
  fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
case 2:
fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
case 3:
fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
case 4:
fieldSeparatorText.setText(TalendQuoteUtils.addQuotes("String_Node_Str"));
break;
default :
break;
}
getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
fieldSeparatorText.setLabelText(Messages.getString("String_Node_Str"));
fieldSeparatorText.setReadOnly(true);
fieldSeparatorText.getTextControl().getParent().layout();
}
}
Program: 126326
Project: 126326
Buggy source:
/** 
 * rowSeparator : Adapt Custom Label and set the field Text.
 */
protected void rowSeparatorManager(){
  if (isContextMode()) {
    return;
  }
  RowSeparator separator=RowSeparator.getByName(rowSeparatorCombo.getText());
  getConnection().setRowSeparatorType(separator);
  if (rowSeparatorCombo.getSelectionIndex() == 1) {
    rowSeparatorText.setLabelText(rowSeparatorCombo.getText());
    rowSeparatorText.setEditable(true);
    rowSeparatorText.forceFocus();
    rowSeparatorText.setReadOnly(false);
  }
 else {
    if (rowSeparatorCombo.getSelectionIndex() == 0) {
      if (getConnection().getFormat().toString().equals(FileFormat.MAC_LITERAL.getName())) {
        rowSeparatorText.setText(TalendQuoteUtils.QUOTATION_MARK + "String_Node_Str" + TalendQuoteUtils.QUOTATION_MARK);
      }
 else {
        rowSeparatorText.setText(TalendQuoteUtils.QUOTATION_MARK + "String_Node_Str" + TalendQuoteUtils.QUOTATION_MARK);
      }
    }
    rowSeparatorText.setLabelText(Messages.getString("String_Node_Str"));
    getConnection().setRowSeparatorValue(rowSeparatorText.getText());
    rowSeparatorText.setEditable(true);
    rowSeparatorText.setReadOnly(true);
  }
}

Fixed version (ground truth):
/** 
 * rowSeparator : Adapt Custom Label and set the field Text.
 */
protected void rowSeparatorManager(){
  if (isContextMode()) {
    return;
  }
  RowSeparator separator=RowSeparator.getByName(rowSeparatorCombo.getText());
  getConnection().setRowSeparatorType(separator);
  if (rowSeparatorCombo.getSelectionIndex() == 1) {
    rowSeparatorText.setLabelText(rowSeparatorCombo.getText());
    rowSeparatorText.setEditable(true);
    rowSeparatorText.forceFocus();
    rowSeparatorText.setReadOnly(false);
  }
 else {
    if (rowSeparatorCombo.getSelectionIndex() == 0) {
      if (getConnection().getFormat().toString().equals(FileFormat.MAC_LITERAL.getName())) {
        rowSeparatorText.setText(TalendQuoteUtils.QUOTATION_MARK + "String_Node_Str" + TalendQuoteUtils.QUOTATION_MARK);
      }
 else {
        rowSeparatorText.setText(TalendQuoteUtils.QUOTATION_MARK + "String_Node_Str" + TalendQuoteUtils.QUOTATION_MARK);
      }
    }
    rowSeparatorText.setLabelText(Messages.getString("String_Node_Str"));
    getConnection().setRowSeparatorValue(rowSeparatorText.getText());
    rowSeparatorText.setEditable(true);
    rowSeparatorText.setReadOnly(true);
    rowSeparatorText.getTextControl().getParent().layout();
  }
}
Program: 126328
Project: 126328
Buggy source:
public void refresh(){
  refreshPreview();
}

Fixed version (ground truth):
@Override public void refresh(){
  refreshPreview();
}
Program: 126329
Project: 126329
Buggy source:
/** 
 * add Controls of Group Delimited File Settings.
 */
private void addFieldsListenersGroupDelimitedFileSettings(){
  encodingCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      getConnection().setEncoding(encodingCombo.getText());
      checkFieldsValue();
    }
  }
);
  fieldSeparatorCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      fieldSeparatorManager();
    }
  }
);
  rowSeparatorCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      rowSeparatorManager();
    }
  }
);
  fieldSeparatorText.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
      checkFieldsValue();
    }
  }
);
  fieldSeparatorText.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
    }
  }
);
  rowSeparatorText.addModifyListener(new ModifyListener(){
    public void modifyText(    final ModifyEvent e){
      getConnection().setRowSeparatorValue(rowSeparatorText.getText());
      checkFieldsValue();
    }
  }
);
  rowSeparatorText.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
    }
  }
);
}

Fixed version (ground truth):
/** 
 * add Controls of Group Delimited File Settings.
 */
private void addFieldsListenersGroupDelimitedFileSettings(){
  encodingCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setEncoding(encodingCombo.getText());
      checkFieldsValue();
    }
  }
);
  fieldSeparatorCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      fieldSeparatorManager();
    }
  }
);
  rowSeparatorCombo.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      rowSeparatorManager();
    }
  }
);
  fieldSeparatorText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
      checkFieldsValue();
    }
  }
);
  fieldSeparatorText.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
    }
  }
);
  rowSeparatorText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      getConnection().setRowSeparatorValue(rowSeparatorText.getText());
      checkFieldsValue();
    }
  }
);
  rowSeparatorText.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
    }
  }
);
}
Program: 126330
Project: 126330
Buggy source:
public void modifyText(final ModifyEvent e){
  getConnection().setRowSeparatorValue(rowSeparatorText.getText());
  checkFieldsValue();
}

Fixed version (ground truth):
@Override public void modifyText(final ModifyEvent e){
  getConnection().setRowSeparatorValue(rowSeparatorText.getText());
  checkFieldsValue();
}
Program: 126331
Project: 126331
Buggy source:
@Override public void updateUIInThreadIfThreadIsNotCanceled(){
  if (previewInformationLabel.isDisposed()) {
    return;
  }
  previewInformationLabel.setText(previewInformationLabelMsg);
  if (getException() != null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    Display.getDefault().syncExec(new Runnable(){
      public void run(){
        handleErrorOutput(outputComposite,tabFolder,outputTabItem);
      }
    }
);
    return;
  }
  if (csvArray != null) {
    delimitedFilePreview.refreshTablePreview(csvArray,firstRowIsCatption);
  }
}

Fixed version (ground truth):
@Override public void updateUIInThreadIfThreadIsNotCanceled(){
  if (previewInformationLabel.isDisposed()) {
    return;
  }
  previewInformationLabel.setText(previewInformationLabelMsg);
  if (getException() != null) {
    previewInformationLabel.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    Display.getDefault().syncExec(new Runnable(){
      @Override public void run(){
        handleErrorOutput(outputComposite,tabFolder,outputTabItem);
      }
    }
);
    return;
  }
  if (csvArray != null) {
    delimitedFilePreview.refreshTablePreview(csvArray,firstRowIsCatption);
  }
}