nus-yam/ex-repair huggingface dataset:
Program: 168117
Project: 168117
Buggy source:
/** 
 * Recursive function to loop over directory structure and take the appropriate action
 * @param dirpath
 */
private void processDirectory(String dirpath){
  File[] files=new File(dirpath).listFiles();
  if (doPreprocessing) {
    for (    File file : files) {
      if (file.getName().contains("String_Node_Str"))       continue;
      if (file.isDirectory()) {
        processDirectory(file.getAbsolutePath());
      }
 else {
        String ppFile=processFile(file.getAbsolutePath(),"String_Node_Str");
        if (ppFile != "String_Node_Str")         outputFiles.add(ppFile);
      }
    }
  }
 else {
    for (    File file : files) {
      if (file.getName().contains("String_Node_Str"))       continue;
      if (file.isDirectory())       processDirectory(file.getAbsolutePath());
 else {
        File file2=new File(checkfiletype(file.getAbsolutePath()));
        outputFiles.add(file2.getAbsolutePath());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Recursive function to loop over directory structure and take the appropriate action
 * @param dirpath
 * @throws TikaException 
 */
private void processDirectory(String dirpath) throws TikaException {
  File[] files=new File(dirpath).listFiles();
  if (doPreprocessing) {
    for (    File file : files) {
      if (file.getName().contains("String_Node_Str"))       continue;
      if (file.isDirectory()) {
        processDirectory(file.getAbsolutePath());
      }
 else {
        String ppFile=processFile(file.getAbsolutePath(),"String_Node_Str");
        if (ppFile != "String_Node_Str")         outputFiles.add(ppFile);
      }
    }
  }
 else {
    for (    File file : files) {
      if (file.getName().contains("String_Node_Str"))       continue;
      if (file.isDirectory())       processDirectory(file.getAbsolutePath());
 else {
        File file2=new File(checkfiletype(file.getAbsolutePath()));
        outputFiles.add(file2.getAbsolutePath());
      }
    }
  }
}
Program: 168122
Project: 168122
Buggy source:
public List<String> processJson(List<Filter> corpusFilters,String jsonFilepath,String keyFields) throws JsonSyntaxException, JsonIOException, IOException, ParseException {
  if (null == corpusFilters)   corpusFilters=new ArrayList<Filter>();
  List<String> parentKeys=JsonParser.getParentKeys(jsonFilepath);
  createParentFilters(corpusFilters,parentKeys);
  return applySmartFilters(corpusFilters,jsonFilepath,"String_Node_Str",keyFields);
}

Fixed version (ground truth):
public List<String> processJson(CorpusClass corpusClass,String jsonFilepath,String keyFields) throws JsonSyntaxException, JsonIOException, IOException, ParseException {
  List<Filter> corpusFilters=corpusClass.getFilters();
  if (null == corpusFilters)   corpusFilters=new ArrayList<Filter>();
  List<String> parentKeys=JsonParser.getParentKeys(jsonFilepath);
  createParentFilters(corpusFilters,parentKeys);
  return applySmartFilters(corpusFilters,jsonFilepath,"String_Node_Str",keyFields,corpusClass.getParent().getDatatype());
}
Program: 168123
Project: 168123
Buggy source:
/** 
 * Create the directory to store all temporary preprocessed files
 * @param caller
 */
private void createppDir(String caller){
  ppOutputPath=CommonUiActivator.getDefault().getPreferenceStore().getString("String_Node_Str");
  if (ppOutputPath == null || ppOutputPath.trim().length() == 0) {
    String tempOutputPath=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str";
    if (!(new File(tempOutputPath).exists())) {
      new File(tempOutputPath).mkdir();
    }
 else {
      ppDir=tempOutputPath + System.getProperty("String_Node_Str") + caller+ "String_Node_Str"+ currTime;
    }
  }
 else {
    ppDir=ppOutputPath + System.getProperty("String_Node_Str") + caller+ "String_Node_Str"+ currTime;
    new File(ppDir).mkdir();
  }
}

Fixed version (ground truth):
/** 
 * Create the directory to store all temporary preprocessed files
 * @param caller
 */
private void createppDir(String caller){
  ppOutputPath=CommonUiActivator.getDefault().getPreferenceStore().getString("String_Node_Str");
  if (ppOutputPath == null || ppOutputPath.trim().length() == 0) {
    String tempOutputPath=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str";
    if (!(new File(tempOutputPath).exists())) {
      new File(tempOutputPath).mkdir();
    }
 else {
      ppDir=tempOutputPath + System.getProperty("String_Node_Str") + caller+ "String_Node_Str"+ currTime;
      new File(ppDir).mkdir();
    }
  }
 else {
    ppDir=ppOutputPath + System.getProperty("String_Node_Str") + caller+ "String_Node_Str"+ currTime;
    new File(ppDir).mkdir();
  }
}
Program: 168124
Project: 168124
Buggy source:
/** 
 * Handle query processing, pre-processing and data extraction for input corpus class
 * @param corpusClass Input CorpusClass for processing
 * @throws Exception
 */
private void processGenericJSON(CorpusClass corpusClass) throws Exception {
  String corpusClassPath=corpusClass.getTacitLocation();
  String tempDir="String_Node_Str";
  String tempFile="String_Node_Str";
  Date dateobj=new Date();
  if (doPreprocessing)   tempFile=tempPPFileLoc + "String_Node_Str" + System.currentTimeMillis()+ "String_Node_Str";
 else {
    tempDir=ppFilesLoc + System.getProperty("String_Node_Str") + "String_Node_Str"+ dateobj.getTime();
    new File(tempDir).mkdir();
  }
  File[] fileList=new File(corpusClassPath).listFiles();
  int k=0;
  for (  File f : fileList) {
    QueryProcesser qp=new QueryProcesser();
    List<String> outputs=qp.processJson(corpusClass.getFilters(),f.getAbsolutePath(),"String_Node_Str");
    for (    String str : outputs) {
      if (doPreprocessing) {
        FileWriter fw=new FileWriter(tempFile);
        fw.write(str);
        fw.close();
        outputFiles.add(processFile(tempFile,"String_Node_Str" + k + "String_Node_Str"));
        k++;
        new File(tempFile).delete();
      }
 else {
        String outFile=tempDir + System.getProperty("String_Node_Str") + "String_Node_Str"+ k+ "String_Node_Str";
        FileWriter fw=new FileWriter(outFile);
        fw.write(str);
        fw.close();
        outputFiles.add(outFile);
        k++;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Handle query processing, pre-processing and data extraction for input corpus class
 * @param corpusClass Input CorpusClass for processing
 * @throws Exception
 */
private void processGenericJSON(CorpusClass corpusClass) throws Exception {
  String corpusClassPath=corpusClass.getTacitLocation();
  String tempDir="String_Node_Str";
  String tempFile="String_Node_Str";
  Date dateobj=new Date();
  if (doPreprocessing)   tempFile=tempPPFileLoc + "String_Node_Str" + System.currentTimeMillis()+ "String_Node_Str";
 else {
    tempDir=ppFilesLoc + System.getProperty("String_Node_Str") + "String_Node_Str"+ dateobj.getTime();
    new File(tempDir).mkdir();
  }
  File[] fileList=new File(corpusClassPath).listFiles();
  int k=0;
  for (  File f : fileList) {
    QueryProcesser qp=new QueryProcesser();
    List<String> outputs=qp.processJson(corpusClass,f.getAbsolutePath(),"String_Node_Str");
    for (    String str : outputs) {
      if (doPreprocessing) {
        FileWriter fw=new FileWriter(tempFile);
        fw.write(str);
        fw.close();
        outputFiles.add(processFile(tempFile,"String_Node_Str" + k + "String_Node_Str"));
        k++;
        new File(tempFile).delete();
      }
 else {
        String outFile=tempDir + System.getProperty("String_Node_Str") + "String_Node_Str"+ k+ "String_Node_Str";
        FileWriter fw=new FileWriter(outFile);
        fw.write(str);
        fw.close();
        outputFiles.add(outFile);
        k++;
      }
    }
  }
}
Program: 168125
Project: 168125
Buggy source:
private static String createSmartFilters(String parentFilters,HashMap<String,List<Filter>> groupedFilters,String condition){
  StringBuilder query=new StringBuilder();
  query.append("String_Node_Str");
  query.append(parentFilters);
  List<String> predicates=new ArrayList<String>();
  for (  Filter f : groupedFilters.get(parentFilters))   predicates.add(constructSmartQuery(f));
  if (predicates.size() > 1) {
    query.append("String_Node_Str");
    query.append(StringUtil.join(predicates,"String_Node_Str" + condition + "String_Node_Str"));
    query.append("String_Node_Str");
  }
  return new String(query);
}

Fixed version (ground truth):
private static String createSmartFilters(String parentFilters,HashMap<String,List<Filter>> groupedFilters,String condition){
  StringBuilder query=new StringBuilder();
  query.append("String_Node_Str");
  query.append(parentFilters);
  List<String> predicates=new ArrayList<String>();
  for (  Filter f : groupedFilters.get(parentFilters)) {
    if (f.getFilterValue() != null)     predicates.add(constructSmartQuery(f));
  }
  if (predicates.size() > 0) {
    query.append("String_Node_Str");
    query.append(StringUtil.join(predicates,"String_Node_Str" + condition + "String_Node_Str"));
    query.append("String_Node_Str");
  }
  return new String(query);
}
Program: 168126
Project: 168126
Buggy source:
private static void createParentFilters(List<Filter> filters,List<String> parentKeys){
  if (null == filters)   return;
  List<String> parentFilters=new ArrayList<String>();
  for (  Filter f : filters)   parentFilters.add(f.getTargetName().split("String_Node_Str")[0]);
  parentKeys.removeAll(parentFilters);
  for (  String key : parentKeys) {
    filters.add(new Filter(key,null,null,null));
  }
}

Fixed version (ground truth):
private static void createParentFilters(List<Filter> filters,List<String> parentKeys){
  List<String> parentFilters=new ArrayList<String>();
  for (  Filter f : filters)   parentFilters.add(f.getTargetName().split("String_Node_Str")[0]);
  parentKeys.removeAll(parentFilters);
  for (  String key : parentKeys) {
    filters.add(new Filter(key,null,null,null));
  }
}
Program: 168127
Project: 168127
Buggy source:
public List<String> processJson(List<Filter> corpusFilters,String jsonFilepath,String keyFields) throws JsonSyntaxException, JsonIOException, IOException, ParseException {
  List<String> parentKeys=JsonParser.getParentKeys(jsonFilepath);
  createParentFilters(corpusFilters,parentKeys);
  return applySmartFilters(corpusFilters,jsonFilepath,"String_Node_Str",keyFields);
}

Fixed version (ground truth):
public List<String> processJson(List<Filter> corpusFilters,String jsonFilepath,String keyFields) throws JsonSyntaxException, JsonIOException, IOException, ParseException {
  if (null == corpusFilters)   corpusFilters=new ArrayList<Filter>();
  List<String> parentKeys=JsonParser.getParentKeys(jsonFilepath);
  createParentFilters(corpusFilters,parentKeys);
  return applySmartFilters(corpusFilters,jsonFilepath,"String_Node_Str",keyFields);
}
Program: 168130
Project: 168130
Buggy source:
public void setClassName(String className){
  this.id=parent.getCorpusId() + "String_Node_Str" + this.className;
  this.className=className;
}

Fixed version (ground truth):
public void setClassName(String className){
  this.className=className;
}
Program: 168131
Project: 168131
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  IStructuredSelection selection=(IStructuredSelection)corpuses.getSelection();
  try {
    Object selectedObj=selection.getFirstElement();
    if (selectedObj instanceof ICorpus) {
      ICorpus selectedCorpus=(ICorpus)selection.getFirstElement();
      corpusList.remove(selectedCorpus);
      ManageCorpora.removeCorpus((Corpus)selectedCorpus,true);
    }
 else     if (selectedObj instanceof ICorpusClass) {
      ITreeSelection classSelection=(ITreeSelection)selection;
      ICorpusClass selectedClass=(ICorpusClass)selection.getFirstElement();
      Corpus parentCorpus=(Corpus)classSelection.getPaths()[0].getParentPath().getLastSegment();
      parentCorpus.removeClass(selectedClass);
      ManageCorpora.removeCorpus(parentCorpus,false);
    }
    corpuses.refresh();
  }
 catch (  Exception exp) {
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  IStructuredSelection selection=(IStructuredSelection)corpusViewer.getSelection();
  try {
    Object selectedObj=selection.getFirstElement();
    if (selectedObj instanceof ICorpus) {
      ICorpus selectedCorpus=(ICorpus)selection.getFirstElement();
      corpusList.remove(selectedCorpus);
      ManageCorpora.removeCorpus((Corpus)selectedCorpus,true);
    }
 else     if (selectedObj instanceof ICorpusClass) {
      ITreeSelection classSelection=(ITreeSelection)selection;
      ICorpusClass selectedClass=(ICorpusClass)selection.getFirstElement();
      Corpus parentCorpus=(Corpus)classSelection.getPaths()[0].getParentPath().getLastSegment();
      parentCorpus.removeClass(selectedClass);
      ManageCorpora.removeCorpus(parentCorpus,false);
    }
    corpusViewer.refresh();
  }
 catch (  Exception exp) {
  }
}
Program: 168133
Project: 168133
Buggy source:
public static List<String> refineInput(List<String> selectedInputs){
  List<String> refinedInputList=new ArrayList<String>();
  Pattern corpusDetector=Pattern.compile("String_Node_Str");
  for (  String input : selectedInputs) {
    Matcher m=corpusDetector.matcher(input);
    if (m.find()) {
      String corpusClassPath=m.group(1);
      CMDataType corpusType=new ManageCorpora().getCorpusDataType(corpusClassPath);
      if (corpusType == null)       continue;
      if (corpusType.equals(CMDataType.TWITTER_JSON))       input=new TwitterReadJsonData().retrieveTwitterData(corpusClassPath);
 else       if (corpusType.equals(CMDataType.REDDIT_JSON))       input=new RedditJsonHandler().retrieveRedditData(corpusClassPath);
 else       input=corpusClassPath;
    }
    File inputFile=new File(input);
    if (!inputFile.exists())     continue;
    if (!inputFile.isDirectory())     refinedInputList.add(inputFile.getAbsolutePath());
 else     refinedInputList.addAll(getFilesFromFolder(inputFile.getAbsolutePath()));
  }
  return refinedInputList;
}

Fixed version (ground truth):
public static List<String> refineInput(List<String> selectedInputs){
  Set<String> refinedInputList=new HashSet<String>();
  Pattern corpusDetector=Pattern.compile("String_Node_Str");
  for (  String input : selectedInputs) {
    Matcher m=corpusDetector.matcher(input);
    if (m.find()) {
      String corpusClassPath=m.group(1);
      CMDataType corpusType=new ManageCorpora().getCorpusDataType(corpusClassPath);
      if (corpusType == null)       continue;
      if (corpusType.equals(CMDataType.TWITTER_JSON))       input=new TwitterReadJsonData().retrieveTwitterData(corpusClassPath);
 else       if (corpusType.equals(CMDataType.REDDIT_JSON))       input=new RedditJsonHandler().retrieveRedditData(corpusClassPath);
 else       input=corpusClassPath;
    }
    File inputFile=new File(input);
    if (!inputFile.exists())     continue;
    if (!inputFile.isDirectory())     refinedInputList.add(inputFile.getAbsolutePath());
 else     refinedInputList.addAll(getFilesFromFolder(inputFile.getAbsolutePath()));
  }
  return new ArrayList<String>(refinedInputList);
}
Program: 168134
Project: 168134
Buggy source:
public String retrieveTwitterData(String location){
  String path=null;
  JSONParser jParser;
  try {
    jParser=new JSONParser();
    dateobj=new Date();
    path=new File(System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str"+ df.format(dateobj);
    new File(path).mkdir();
    File[] fileList=new File(location).listFiles();
    for (int i=0; i < fileList.length; i++) {
      String fileName=fileList[i].getAbsolutePath();
      if (!fileList[i].getAbsolutePath().endsWith("String_Node_Str"))       continue;
      JSONArray objects=(JSONArray)jParser.parse(new FileReader(fileName));
      for (      Object obj : objects) {
        JSONObject twitterStream=(JSONObject)obj;
        dateobj=new Date();
        File file=new File(path + File.separator + "String_Node_Str"+ df.format(dateobj));
        if (file.exists()) {
          file.delete();
        }
        FileWriter fw=new FileWriter(file.getAbsoluteFile());
        BufferedWriter bw=new BufferedWriter(fw);
        bw.write(twitterStream.get("String_Node_Str").toString());
        bw.close();
      }
    }
  }
 catch (  JsonParseException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
catch (  ParseException e) {
    e.printStackTrace();
  }
  return path;
}

Fixed version (ground truth):
public String retrieveTwitterData(String location){
  String path=null;
  JSONParser jParser;
  try {
    jParser=new JSONParser();
    dateobj=new Date();
    path=new File(System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str"+ UUID.randomUUID().toString()+ "String_Node_Str"+ df.format(dateobj);
    new File(path).mkdir();
    File[] fileList=new File(location).listFiles();
    for (int i=0; i < fileList.length; i++) {
      String fileName=fileList[i].getAbsolutePath();
      if (!fileList[i].getAbsolutePath().endsWith("String_Node_Str"))       continue;
      JSONArray objects=(JSONArray)jParser.parse(new FileReader(fileName));
      int j=0;
      for (      Object obj : objects) {
        JSONObject twitterStream=(JSONObject)obj;
        dateobj=new Date();
        File file=new File(path + File.separator + "String_Node_Str"+ j+ "String_Node_Str"+ df.format(dateobj));
        j++;
        if (file.exists()) {
          file.delete();
        }
        FileWriter fw=new FileWriter(file.getAbsoluteFile());
        BufferedWriter bw=new BufferedWriter(fw);
        bw.write(twitterStream.get("String_Node_Str").toString());
        bw.close();
      }
    }
  }
 catch (  JsonParseException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
catch (  ParseException e) {
    e.printStackTrace();
  }
  return path;
}
Program: 168137
Project: 168137
Buggy source:
public void linkExited(HyperlinkEvent e){
}

Fixed version (ground truth):
@Override public void linkExited(HyperlinkEvent e){
}
Program: 168138
Project: 168138
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  ICorpus selectedCorpus=manageCorpora.readCorpusById(corpuraList[cmbSortType.getSelectionIndex()]);
  if (inputList == null) {
    inputList=new ArrayList<String>();
  }
  if (selectedCorpus.getDatatype().equals(DataType.TWITTER_JSON)) {
    TwitterReadJsonData twitterReadJsonData=new TwitterReadJsonData();
    for (    ICorpusClass cls : selectedCorpus.getClasses()) {
      inputList.addAll(twitterReadJsonData.retrieveTwitterData(cls.getClassPath()));
    }
  }
 else   if (selectedCorpus.getDatatype().equals(DataType.REDDIT_JSON)) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.PLAIN_TEXT))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.MICROSOFT_WORD))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.XML))) {
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  ICorpus selectedCorpus=manageCorpora.readCorpusById(corpuraList[cmbSortType.getSelectionIndex()]);
  if (inputList == null) {
    inputList=new ArrayList<String>();
  }
  if (selectedCorpus.getDatatype().equals(DataType.TWITTER_JSON)) {
    TwitterReadJsonData twitterReadJsonData=new TwitterReadJsonData();
    for (    ICorpusClass cls : selectedCorpus.getClasses()) {
      inputList.add(twitterReadJsonData.retrieveTwitterData(cls.getClassPath()));
    }
  }
 else   if (selectedCorpus.getDatatype().equals(DataType.REDDIT_JSON)) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.PLAIN_TEXT))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.MICROSOFT_WORD))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.XML))) {
  }
}
Program: 168139
Project: 168139
Buggy source:
public void linkEntered(HyperlinkEvent e){
}

Fixed version (ground truth):
@Override public void linkEntered(HyperlinkEvent e){
}
Program: 168141
Project: 168141
Buggy source:
public void linkActivated(HyperlinkEvent e){
  String id="String_Node_Str";
  PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
}

Fixed version (ground truth):
@Override public void linkActivated(HyperlinkEvent e){
  String id="String_Node_Str";
  PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
}
Program: 168143
Project: 168143
Buggy source:
private void createPreprocessLink(Composite client){
  Composite clientLink=toolkit.createComposite(client);
  GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(2).applyTo(clientLink);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(clientLink);
  preprocessEnabled=toolkit.createButton(clientLink,"String_Node_Str",SWT.CHECK);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(preprocessEnabled);
  final Hyperlink link=toolkit.createHyperlink(clientLink,"String_Node_Str",SWT.NONE);
  link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
  link.addHyperlinkListener(new IHyperlinkListener(){
    public void linkEntered(    HyperlinkEvent e){
    }
    public void linkExited(    HyperlinkEvent e){
    }
    public void linkActivated(    HyperlinkEvent e){
      String id="String_Node_Str";
      PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
    }
  }
);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).applyTo(link);
}

Fixed version (ground truth):
private void createPreprocessLink(Composite client){
  Composite clientLink=toolkit.createComposite(client);
  GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(2).applyTo(clientLink);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(clientLink);
  preprocessEnabled=toolkit.createButton(clientLink,"String_Node_Str",SWT.CHECK);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(preprocessEnabled);
  final Hyperlink link=toolkit.createHyperlink(clientLink,"String_Node_Str",SWT.NONE);
  link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
  link.addHyperlinkListener(new IHyperlinkListener(){
    @Override public void linkEntered(    HyperlinkEvent e){
    }
    @Override public void linkExited(    HyperlinkEvent e){
    }
    @Override public void linkActivated(    HyperlinkEvent e){
      String id="String_Node_Str";
      PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
    }
  }
);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).applyTo(link);
}
Program: 168144
Project: 168144
Buggy source:
public void linkExited(HyperlinkEvent e){
}

Fixed version (ground truth):
@Override public void linkExited(HyperlinkEvent e){
}
Program: 168145
Project: 168145
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  ICorpus selectedCorpus=manageCorpora.readCorpusById(corpuraList[cmbSortType.getSelectionIndex()]);
  if (inputList == null) {
    inputList=new ArrayList<String>();
  }
  if (selectedCorpus.getDatatype().equals(DataType.TWITTER_JSON)) {
    TwitterReadJsonData twitterReadJsonData=new TwitterReadJsonData();
    for (    ICorpusClass cls : selectedCorpus.getClasses()) {
      inputList.addAll(twitterReadJsonData.retrieveTwitterData(cls.getClassPath()));
    }
  }
 else   if (selectedCorpus.getDatatype().equals(DataType.REDDIT_JSON)) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.PLAIN_TEXT))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.MICROSOFT_WORD))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.XML))) {
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  ICorpus selectedCorpus=manageCorpora.readCorpusById(corpuraList[cmbSortType.getSelectionIndex()]);
  if (inputList == null) {
    inputList=new ArrayList<String>();
  }
  if (selectedCorpus.getDatatype().equals(DataType.TWITTER_JSON)) {
    TwitterReadJsonData twitterReadJsonData=new TwitterReadJsonData();
    for (    ICorpusClass cls : selectedCorpus.getClasses()) {
      inputList.add(twitterReadJsonData.retrieveTwitterData(cls.getClassPath()));
    }
  }
 else   if (selectedCorpus.getDatatype().equals(DataType.REDDIT_JSON)) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.PLAIN_TEXT))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.MICROSOFT_WORD))) {
  }
 else   if (selectedCorpus.getDatatype().equals((DataType.XML))) {
  }
}
Program: 168146
Project: 168146
Buggy source:
public void linkEntered(HyperlinkEvent e){
}

Fixed version (ground truth):
@Override public void linkEntered(HyperlinkEvent e){
}
Program: 168148
Project: 168148
Buggy source:
public void linkActivated(HyperlinkEvent e){
  String id="String_Node_Str";
  PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
}

Fixed version (ground truth):
@Override public void linkActivated(HyperlinkEvent e){
  String id="String_Node_Str";
  PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
}
Program: 168150
Project: 168150
Buggy source:
private void createPreprocessLink(Composite client){
  Composite clientLink=toolkit.createComposite(client);
  GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(2).applyTo(clientLink);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(clientLink);
  preprocessEnabled=toolkit.createButton(clientLink,"String_Node_Str",SWT.CHECK);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(preprocessEnabled);
  final Hyperlink link=toolkit.createHyperlink(clientLink,"String_Node_Str",SWT.NONE);
  link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
  link.addHyperlinkListener(new IHyperlinkListener(){
    public void linkEntered(    HyperlinkEvent e){
    }
    public void linkExited(    HyperlinkEvent e){
    }
    public void linkActivated(    HyperlinkEvent e){
      String id="String_Node_Str";
      PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
    }
  }
);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).applyTo(link);
}

Fixed version (ground truth):
private void createPreprocessLink(Composite client){
  Composite clientLink=toolkit.createComposite(client);
  GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(2).applyTo(clientLink);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(clientLink);
  preprocessEnabled=toolkit.createButton(clientLink,"String_Node_Str",SWT.CHECK);
  GridDataFactory.fillDefaults().grab(false,false).span(1,1).applyTo(preprocessEnabled);
  final Hyperlink link=toolkit.createHyperlink(clientLink,"String_Node_Str",SWT.NONE);
  link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
  link.addHyperlinkListener(new IHyperlinkListener(){
    @Override public void linkEntered(    HyperlinkEvent e){
    }
    @Override public void linkExited(    HyperlinkEvent e){
    }
    @Override public void linkActivated(    HyperlinkEvent e){
      String id="String_Node_Str";
      PreferencesUtil.createPreferenceDialogOn(link.getShell(),id,new String[]{id},null).open();
    }
  }
);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).applyTo(link);
}
Program: 168152
Project: 168152
Buggy source:
private boolean isClassnameValid(String className){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  String parentCorpusId=selectedCorpusClass.getParentId();
  ICorpus parentCorpus=corpusManagement.readCorpusById(parentCorpusId);
  for (  ICorpusClass cc : parentCorpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ parentCorpusId,null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}

Fixed version (ground truth):
private boolean isClassnameValid(String className){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  ICorpus parentCorpus=selectedCorpusClass.getParent();
  if (null == parentCorpus)   return true;
  for (  ICorpusClass cc : parentCorpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ parentCorpus.getCorpusId(),null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}
Program: 168153
Project: 168153
Buggy source:
public ClassDetailsPage(ScrolledForm corpusMgmtViewform){
  this.corpusMgmtViewform=corpusMgmtViewform;
}

Fixed version (ground truth):
public ClassDetailsPage(ScrolledForm corpusMgmtViewform){
  corpusManagement=new ManageCorpora();
  this.corpusMgmtViewform=corpusMgmtViewform;
}
Program: 168155
Project: 168155
Buggy source:
private boolean isClassnameValid(String className,ICorpusClass selectedCorpusClass){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  String parentCorpusId=selectedCorpusClass.getParentId();
  ICorpus parentCorpus=corpusManagement.readCorpusById(parentCorpusId);
  for (  ICorpusClass cc : parentCorpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ parentCorpusId,null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}

Fixed version (ground truth):
private boolean isClassnameValid(String className,ICorpusClass selectedCorpusClass){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  ICorpus parentCorpus=selectedCorpusClass.getParent();
  if (null == parentCorpus)   return true;
  for (  ICorpusClass cc : parentCorpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ parentCorpus.getCorpusId(),null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}
Program: 168156
Project: 168156
Buggy source:
public void addClass(ICorpusClass c){
  if (null == c)   return;
  ((CorpusClass)c).setParentId(this.corpusId);
  this.classes.add(c);
}

Fixed version (ground truth):
public void addClass(ICorpusClass c){
  if (null == c)   return;
  ((CorpusClass)c).setParent(this);
  this.classes.add(c);
}
Program: 168157
Project: 168157
Buggy source:
private boolean isClassnameValid(String className){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  ICorpus corpus=selectedCorpusClass.getParent();
  String corpusId=corpus.getCorpusId();
  for (  ICorpusClass cc : corpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ corpusId,null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}

Fixed version (ground truth):
private boolean isClassnameValid(String className){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  String parentCorpusId=selectedCorpusClass.getParentId();
  ICorpus parentCorpus=corpusManagement.readCorpusById(parentCorpusId);
  for (  ICorpusClass cc : parentCorpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ parentCorpusId,null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}
Program: 168158
Project: 168158
Buggy source:
private boolean corpusIdExists(String corpusId){
  List<ICorpus> corpuses=corpusManagement.getAllCorpusDetails();
  for (  ICorpus corpus : corpuses) {
    if (corpus.getCorpusId().equals(corpusId))     return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean corpusIdExists(String corpusId){
  List<ICorpus> corpuses=corpusManagement.getAllCorpusDetails();
  for (  ICorpus corpus : corpuses) {
    if (!corpus.equals(selectedCorpus) && corpus.getCorpusId().equals(corpusId))     return true;
  }
  return false;
}
Program: 168159
Project: 168159
Buggy source:
private boolean isClassnameValid(String className,ICorpusClass selectedCorpusClass){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  ICorpus corpus=selectedCorpusClass.getParent();
  String corpusId=corpus.getCorpusId();
  for (  ICorpusClass cc : corpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ corpusId,null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}

Fixed version (ground truth):
private boolean isClassnameValid(String className,ICorpusClass selectedCorpusClass){
  if (className.isEmpty()) {
    corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str",null,IMessageProvider.ERROR);
    return false;
  }
 else {
    corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  }
  String parentCorpusId=selectedCorpusClass.getParentId();
  ICorpus parentCorpus=corpusManagement.readCorpusById(parentCorpusId);
  for (  ICorpusClass cc : parentCorpus.getClasses()) {
    if ((CorpusClass)cc != selectedCorpusClass) {
      if (cc.getClassName().equals(className)) {
        corpusMgmtViewform.getMessageManager().addMessage("String_Node_Str","String_Node_Str" + className + "String_Node_Str"+ parentCorpusId,null,IMessageProvider.ERROR);
        return false;
      }
    }
  }
  corpusMgmtViewform.getMessageManager().removeMessage("String_Node_Str");
  return true;
}
Program: 168160
Project: 168160
Buggy source:
public boolean validateData(String corpusId){
  if (isCorpusIdValid(corpusId)) {
    List<ICorpusClass> classes=selectedCorpus.getClasses();
    int count=1;
    for (    ICorpusClass cc : classes) {
      if (!validateClassData(cc))       return false;
      count++;
    }
  }
 else   return false;
  return true;
}

Fixed version (ground truth):
public boolean validateData(String corpusId){
  if (isCorpusIdValid(corpusId)) {
    List<ICorpusClass> classes=selectedCorpus.getClasses();
    for (    ICorpusClass cc : classes) {
      if (!validateClassData(cc))       return false;
    }
  }
 else   return false;
  return true;
}
Program: 168161
Project: 168161
Buggy source:
public void addClass(ICorpusClass c){
  if (null == c)   return;
  ((CorpusClass)c).setParent(this);
  this.classes.add(c);
}

Fixed version (ground truth):
public void addClass(ICorpusClass c){
  if (null == c)   return;
  ((CorpusClass)c).setParentId(this.corpusId);
  this.classes.add(c);
}
Program: 168162
Project: 168162
Buggy source:
public List<String> retrieveRedditData(String location){
  List<String> result=new ArrayList<String>();
  JSONParser jParser;
  try {
    jParser=new JSONParser();
    String path=new File(location) + File.separator + "String_Node_Str";
    File[] fileList=new File(location).listFiles();
    for (    File tempFile : fileList) {
      String fileName=tempFile.getAbsolutePath();
      if (!fileName.endsWith("String_Node_Str"))       continue;
      JSONObject redditStream=(JSONObject)jParser.parse(new FileReader(fileName));
      dateobj=new Date();
      File file=new File(path + UUID.randomUUID().toString() + "String_Node_Str"+ df.format(dateobj)+ "String_Node_Str");
      System.out.println(file.getAbsolutePath());
      if (file.exists())       file.delete();
      file.createNewFile();
      FileWriter fw=new FileWriter(file.getAbsoluteFile());
      BufferedWriter bw=new BufferedWriter(fw);
      String postTitle=getPostTitle(redditStream);
      String[] postComments=getPostComments(redditStream);
      if (null != postTitle) {
        bw.write(postTitle);
        bw.write("String_Node_Str");
      }
      for (      String commentBody : postComments) {
        if (null == commentBody)         continue;
        bw.write(commentBody);
        bw.write("String_Node_Str");
      }
      bw.close();
      result.add(file.getAbsolutePath());
    }
  }
 catch (  ClassCastException e) {
  }
catch (  Exception e) {
    e.printStackTrace();
  }
  return result;
}

Fixed version (ground truth):
public String retrieveRedditData(String location){
  JSONParser jParser;
  dateObj=new Date();
  String path=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str"+ File.separator+ "String_Node_Str"+ dateObj.getTime();
  try {
    jParser=new JSONParser();
    new File(path).mkdir();
    File[] fileList=new File(location).listFiles();
    for (    File tempFile : fileList) {
      String fileName=tempFile.getAbsolutePath();
      if (!fileName.endsWith("String_Node_Str"))       continue;
      JSONObject redditStream=(JSONObject)jParser.parse(new FileReader(fileName));
      String postTitle=getPostTitle(redditStream);
      String[] postComments=getPostComments(redditStream);
      dateObj=new Date();
      File file=new File(path + System.getProperty("String_Node_Str") + postTitle.substring(0,20)+ "String_Node_Str"+ dateObj.getTime()+ "String_Node_Str");
      FileWriter fw=new FileWriter(file.getAbsoluteFile());
      BufferedWriter bw=new BufferedWriter(fw);
      if (null != postTitle) {
        bw.write(postTitle);
        bw.write("String_Node_Str");
      }
      for (      String commentBody : postComments) {
        if (null == commentBody)         continue;
        bw.write(commentBody);
        bw.write("String_Node_Str");
      }
      bw.close();
    }
  }
 catch (  ClassCastException e) {
  }
catch (  Exception e) {
    e.printStackTrace();
  }
  return path;
}
Program: 168164
Project: 168164
Buggy source:
public void preWindowOpen(){
  IWorkbenchWindowConfigurer configurer=getWindowConfigurer();
  configurer.setShowCoolBar(true);
  configurer.setShowStatusLine(true);
  configurer.setShowProgressIndicator(true);
  configurer.setTitle("String_Node_Str");
  String tempDir=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str";
  if (!(new File(tempDir).exists())) {
    new File(tempDir).mkdir();
  }
}

Fixed version (ground truth):
@Override public void preWindowOpen(){
  IWorkbenchWindowConfigurer configurer=getWindowConfigurer();
  configurer.setShowCoolBar(true);
  configurer.setShowStatusLine(true);
  configurer.setShowProgressIndicator(true);
  configurer.setTitle("String_Node_Str");
  String tempDir=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str";
  if (!(new File(tempDir).exists())) {
    new File(tempDir).mkdir();
  }
  tempDir=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str";
  if (!(new File(tempDir).exists())) {
    new File(tempDir).mkdir();
  }
}
Program: 168165
Project: 168165
Buggy source:
public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer){
  return new ApplicationActionBarAdvisor(configurer);
}

Fixed version (ground truth):
@Override public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer){
  return new ApplicationActionBarAdvisor(configurer);
}
Program: 168168
Project: 168168
Buggy source:
@Override protected void createMasterPart(final IManagedForm managedForm,Composite parent){
  FormToolkit toolkit=managedForm.getToolkit();
  Section section=toolkit.createSection(parent,Section.DESCRIPTION | Section.TITLE_BAR);
  section.setText("String_Node_Str");
  section.setDescription("String_Node_Str");
  section.marginWidth=10;
  section.marginHeight=5;
  Composite client=toolkit.createComposite(section,SWT.WRAP);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  layout.marginWidth=2;
  layout.marginHeight=2;
  client.setLayout(layout);
  Table t=toolkit.createTable(client,SWT.NULL);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=400;
  gd.widthHint=100;
  t.setLayoutData(gd);
  toolkit.paintBordersFor(client);
  Button addDir=toolkit.createButton(client,"String_Node_Str",SWT.PUSH);
  gd=new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
  addDir.setLayoutData(gd);
  section.setClient(client);
  final SectionPart spart=new SectionPart(section);
  managedForm.addPart(spart);
  TableViewer viewer=new TableViewer(t);
  viewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      managedForm.fireSelectionChanged(spart,event.getSelection());
    }
  }
);
  viewer.setContentProvider(new MasterContentProvider());
  viewer.setLabelProvider(new MasterLabelProvider());
  viewer.setInput(new Object[]{new TypeOne(),new TypeTwo()});
}

Fixed version (ground truth):
@Override protected void createMasterPart(final IManagedForm managedForm,Composite parent){
  GridLayoutFactory.fillDefaults().numColumns(1).equalWidth(false).applyTo(parent);
  FormToolkit toolkit=managedForm.getToolkit();
  Section section=toolkit.createSection(parent,Section.DESCRIPTION | Section.TITLE_BAR | Section.EXPANDED);
  GridDataFactory.fillDefaults().grab(true,false).span(1,1).applyTo(section);
  GridLayoutFactory.fillDefaults().numColumns(3).applyTo(section);
  section.setText("String_Node_Str");
  section.setDescription("String_Node_Str");
  Composite client=toolkit.createComposite(section,SWT.WRAP);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  layout.marginWidth=2;
  layout.marginHeight=2;
  client.setLayout(layout);
  Table t=toolkit.createTable(client,SWT.NULL);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=400;
  gd.widthHint=100;
  t.setLayoutData(gd);
  toolkit.paintBordersFor(client);
  Button addDir=toolkit.createButton(client,"String_Node_Str",SWT.PUSH);
  gd=new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
  addDir.setLayoutData(gd);
  section.setClient(client);
  final SectionPart spart=new SectionPart(section);
  managedForm.addPart(spart);
  TableViewer viewer=new TableViewer(t);
  viewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      managedForm.fireSelectionChanged(spart,event.getSelection());
    }
  }
);
  viewer.setContentProvider(new MasterContentProvider());
  viewer.setLabelProvider(new MasterLabelProvider());
  viewer.setInput(new Object[]{new TypeOne(),new TypeTwo()});
}
Program: 168170
Project: 168170
Buggy source:
public void linkActivated(HyperlinkEvent e){
  Program.launch("String_Node_Str");
}

Fixed version (ground truth):
@Override public void linkActivated(HyperlinkEvent e){
  Program.launch("String_Node_Str");
}
Program: 168171
Project: 168171
Buggy source:
private Text createHyperLink(Composite sectionClient,String lbl){
  FormToolkit toolkit=new FormToolkit(sectionClient.getDisplay());
  Hyperlink link=toolkit.createHyperlink(sectionClient,"String_Node_Str",SWT.WRAP);
  link.setBackground(sectionClient.getBackground());
  link.addHyperlinkListener(new HyperlinkAdapter(){
    public void linkActivated(    HyperlinkEvent e){
      Program.launch("String_Node_Str");
    }
  }
);
  link.setText("String_Node_Str");
  GridDataFactory.fillDefaults().grab(false,false).span(1,0).applyTo(link);
  final Text outputLocationTxt=new Text(sectionClient,SWT.BORDER);
  GridDataFactory.fillDefaults().grab(true,false).span(2,0).applyTo(outputLocationTxt);
  outputLocationTxt.setEditable(false);
  outputLocationTxt.setEnabled(false);
  outputLocationTxt.setMessage("String_Node_Str");
  return outputLocationTxt;
}

Fixed version (ground truth):
private Label createHyperLink(Composite sectionClient,String lbl){
  FormToolkit toolkit=new FormToolkit(sectionClient.getDisplay());
  Hyperlink link=toolkit.createHyperlink(sectionClient,"String_Node_Str",SWT.WRAP);
  link.setBackground(sectionClient.getBackground());
  link.addHyperlinkListener(new HyperlinkAdapter(){
    @Override public void linkActivated(    HyperlinkEvent e){
      Program.launch("String_Node_Str");
    }
  }
);
  link.setText("String_Node_Str");
  GridDataFactory.fillDefaults().grab(false,false).span(1,0).applyTo(link);
  final Label outputLocationTxt=new Label(sectionClient,SWT.NONE);
  GridDataFactory.fillDefaults().grab(true,false).span(2,0).applyTo(outputLocationTxt);
  outputLocationTxt.setText("String_Node_Str");
  return outputLocationTxt;
}
Program: 168172
Project: 168172
Buggy source:
@Override protected Control createContents(Composite parent){
  Composite sectionClient=new Composite(parent,SWT.NONE);
  GridLayoutFactory.fillDefaults().numColumns(3).equalWidth(false).applyTo(sectionClient);
  Label dummy=new Label(sectionClient,SWT.NONE);
  GridDataFactory.fillDefaults().grab(false,false).span(3,0).applyTo(dummy);
  userName=createHyperLink(sectionClient,"String_Node_Str");
  userName.setEnabled(false);
  userName.setEditable(false);
  consumerKey=createTextFields(sectionClient,true,"String_Node_Str");
  consumerSecret=createTextFields(sectionClient,true,"String_Node_Str");
  accessToken=createTextFields(sectionClient,true,"String_Node_Str");
  accessTokenSecret=createTextFields(sectionClient,true,"String_Node_Str");
  loadValues();
  return sectionClient;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite parent){
  Composite sectionClient=new Composite(parent,SWT.NONE);
  GridLayoutFactory.fillDefaults().numColumns(3).equalWidth(false).applyTo(sectionClient);
  Label dummy=new Label(sectionClient,SWT.NONE);
  GridDataFactory.fillDefaults().grab(false,false).span(3,0).applyTo(dummy);
  userName=createHyperLink(sectionClient,"String_Node_Str");
  consumerKey=createTextFields(sectionClient,true,"String_Node_Str");
  consumerSecret=createTextFields(sectionClient,true,"String_Node_Str");
  accessToken=createTextFields(sectionClient,true,"String_Node_Str");
  accessTokenSecret=createTextFields(sectionClient,true,"String_Node_Str");
  return sectionClient;
}