Program: 168086
Project: 168086
Buggy source:
private void addButtonsToToolBar(){
  IToolBarManager mgr=form.getToolBarManager();
  mgr.add(new Action(){
    @Override public ImageDescriptor getImageDescriptor(){
      return (TurboTopicsModelViewImageRegistry.getImageIconFactory().getImageDescriptor(IMAGE_LRUN_OBJ));
    }
    @Override public String getToolTipText(){
      return "String_Node_Str";
    }
    @Override public void run(){
      if (!canProceedCluster()) {
        return;
      }
      final int noOfTopics=Integer.valueOf(numberOfTopics.getText()).intValue();
      final int minCount=Integer.parseInt(minCountTxt.getText());
      final double pValue=Double.parseDouble(pValueTxt.getText());
      final boolean usePermBool=usePerm.getSelection();
      final boolean isPreprocess=preprocessEnabled.getSelection();
      final String outputPath=layoutData.getOutputLabel().getText();
      TacitUtil tacitHelper=new TacitUtil();
      final List<Object> selectedFiles=inputLayoutData.getSelectedFiles();
      tacitHelper.writeSummaryFile(outputPath);
      TacitFormComposite.writeConsoleHeaderBegining("String_Node_Str");
      job=new Job("String_Node_Str"){
        @Override protected IStatus run(        IProgressMonitor monitor){
          TacitFormComposite.setConsoleViewInFocus();
          TacitFormComposite.updateStatusMessage(getViewSite(),null,null,form);
          monitor.beginTask("String_Node_Str",100);
          String topicModelDirPath=System.getProperty("String_Node_Str") + File.separator + "String_Node_Str"+ "String_Node_Str"+ String.valueOf(System.currentTimeMillis());
          Preprocessor ppObj=null;
          List<String> inFiles;
          try {
            ppObj=new Preprocessor("String_Node_Str",isPreprocess);
            inFiles=ppObj.processData("String_Node_Str",selectedFiles);
            for (            String filename : inFiles) {
              File srcFile=new File(filename);
              File destDir=new File(topicModelDirPath);
              try {
                FileUtils.copyFileToDirectory(srcFile,destDir,false);
              }
 catch (              IOException e) {
                e.printStackTrace();
                return Status.CANCEL_STATUS;
              }
            }
          }
 catch (          IOException e1) {
            e1.printStackTrace();
            return Status.CANCEL_STATUS;
          }
catch (          Exception e1) {
            e1.printStackTrace();
            return Status.CANCEL_STATUS;
          }
          lda.initialize(topicModelDirPath,noOfTopics,topicModelDirPath,true);
          long startTime=System.currentTimeMillis();
          Date dateObj=new Date();
          monitor.subTask("String_Node_Str");
          try {
            lda.doLDA(monitor,dateObj);
          }
 catch (          FileNotFoundException e) {
            e.printStackTrace();
            monitor.done();
            return Status.CANCEL_STATUS;
          }
catch (          IOException e) {
            e.printStackTrace();
            monitor.done();
            return Status.CANCEL_STATUS;
          }
          monitor.worked(20);
          if (monitor.isCanceled()) {
            return Status.CANCEL_STATUS;
          }
          ConsoleView.printlInConsoleln("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
          FileWriter fw=null;
          String corpusFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          try {
            fw=new FileWriter(corpusFile);
            for (            String file : inFiles) {
              String text=new String(Files.readAllBytes(Paths.get(file)),StandardCharsets.UTF_8);
              fw.write(text.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
            }
            fw.close();
          }
 catch (          IOException e3) {
          }
          String wordWeightsFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          String vocabFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          HashMap<String,Integer> vocab=new HashMap<String,Integer>();
          BufferedReader br=null;
          try {
            br=new BufferedReader(new FileReader(wordWeightsFile));
            fw=new FileWriter(vocabFile);
            String line="String_Node_Str";
            while ((line=br.readLine()) != null) {
              vocab.put(line.split("String_Node_Str")[1],1);
            }
            br.close();
            String vocabKeys[]=vocab.keySet().toArray(new String[1]);
            Arrays.sort(vocabKeys);
            for (            String word : vocabKeys) {
              fw.write(word + "String_Node_Str");
            }
            ;
            fw.close();
          }
 catch (          IOException e3) {
          }
          String wordTopicFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          try {
            HashMap<String,Double> currAssign=null;
            HashMap<String,Integer> vocabMap=new HashMap<String,Integer>();
            int count=0;
            HashMap<String,HashMap<String,Double>> wordTopic=new HashMap<String,HashMap<String,Double>>();
            br=new BufferedReader(new FileReader(wordWeightsFile));
            String line="String_Node_Str";
            while ((line=br.readLine()) != null) {
              String components[]=line.split("String_Node_Str");
              int topic=Integer.parseInt(components[0]);
              String word=components[1];
              double weight=Double.parseDouble(components[2]);
              currAssign=wordTopic.get(word) != null ? wordTopic.get(word) : new HashMap<String,Double>();
              double currWeight=currAssign.get("String_Node_Str") != null ? currAssign.get("String_Node_Str") : 0.0;
              if (currWeight < weight) {
                HashMap<String,Double> map=new HashMap<String,Double>();
                map.put("String_Node_Str",topic + 0.0);
                map.put("String_Node_Str",weight);
                wordTopic.put(word,map);
              }
            }
            br.close();
            String topicKeys[]=wordTopic.keySet().toArray(new String[1]);
            Arrays.sort(topicKeys);
            for (            String word : topicKeys) {
              vocabMap.put(word,count);
              count=count + 1;
            }
            fw=new FileWriter(wordTopicFile);
            br=new BufferedReader(new FileReader(corpusFile));
            int i=0;
            while ((line=br.readLine()) != null) {
              String outputStr=i + "String_Node_Str";
              for (              String word : line.split("String_Node_Str")) {
                if (vocabMap.containsKey(word) && wordTopic.containsKey(word))                 outputStr=outputStr + "String_Node_Str" + vocabMap.get(word)+ "String_Node_Str"+ (int)Double.parseDouble(wordTopic.get(word).get("String_Node_Str") + "String_Node_Str");
              }
              ;
              i+=1;
              fw.write(outputStr + "String_Node_Str");
            }
            fw.close();
            br.close();
          }
 catch (          IOException e3) {
            e3.printStackTrace();
          }
          LDAtopics lda=new LDAtopics(corpusFile,wordTopicFile,vocabFile,outputPath,noOfTopics,minCount,pValue,usePermBool);
          try {
            lda.generateTurboTopics();
          }
 catch (          Exception e1) {
            e1.printStackTrace();
          }
          ppObj.clean();
          try {
            FileUtils.deleteDirectory(new File(topicModelDirPath));
          }
 catch (          IOException e) {
            e.printStackTrace();
          }
          monitor.worked(10);
          monitor.done();
          return Status.OK_STATUS;
        }
      }
;
      job.setUser(true);
      if (canProceedCluster()) {
        job.schedule();
        job.addJobChangeListener(new JobChangeAdapter(){
          @Override public void done(          IJobChangeEvent event){
            if (!event.getResult().isOK()) {
              TacitFormComposite.writeConsoleHeaderBegining("String_Node_Str");
              ConsoleView.printlInConsoleln("String_Node_Str");
            }
 else {
              TacitFormComposite.updateStatusMessage(getViewSite(),"String_Node_Str",IStatus.OK,form);
              TacitFormComposite.writeConsoleHeaderBegining("String_Node_Str");
            }
          }
        }
);
      }
 else {
        TacitFormComposite.updateStatusMessage(getViewSite(),"String_Node_Str",IStatus.ERROR,form);
      }
    }
  }
);
  Action helpAction=new Action(){
    @Override public ImageDescriptor getImageDescriptor(){
      return (TurboTopicsModelViewImageRegistry.getImageIconFactory().getImageDescriptor(IMAGE_HELP_CO));
    }
    @Override public String getToolTipText(){
      return "String_Node_Str";
    }
    @Override public void run(){
      PlatformUI.getWorkbench().getHelpSystem().displayHelp("String_Node_Str");
    }
  }
;
  mgr.add(helpAction);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(helpAction,"String_Node_Str");
  PlatformUI.getWorkbench().getHelpSystem().setHelp(form,"String_Node_Str");
  form.getToolBarManager().update(true);
}

Fixed version (ground truth):
private void addButtonsToToolBar(){
  IToolBarManager mgr=form.getToolBarManager();
  mgr.add(new Action(){
    @Override public ImageDescriptor getImageDescriptor(){
      return (TurboTopicsModelViewImageRegistry.getImageIconFactory().getImageDescriptor(IMAGE_LRUN_OBJ));
    }
    @Override public String getToolTipText(){
      return "String_Node_Str";
    }
    @Override public void run(){
      if (!canProceedCluster()) {
        return;
      }
      final int noOfTopics=Integer.valueOf(numberOfTopics.getText()).intValue();
      final int minCount=Integer.parseInt(minCountTxt.getText());
      final double pValue=Double.parseDouble(pValueTxt.getText());
      final boolean usePermBool=usePerm.getSelection();
      final boolean isPreprocess=preprocessEnabled.getSelection();
      final String outputPath=layoutData.getOutputLabel().getText();
      TacitUtil tacitHelper=new TacitUtil();
      final List<Object> selectedFiles=inputLayoutData.getSelectedFiles();
      lda=new LdaAnalysis(){
        @Override protected void createRunReport(        Date date){
        }
      }
;
      tacitHelper.writeSummaryFile(outputPath);
      TacitFormComposite.writeConsoleHeaderBegining("String_Node_Str");
      job=new Job("String_Node_Str"){
        @Override protected IStatus run(        IProgressMonitor monitor){
          TacitFormComposite.setConsoleViewInFocus();
          TacitFormComposite.updateStatusMessage(getViewSite(),null,null,form);
          monitor.beginTask("String_Node_Str",100);
          String topicModelDirPath=System.getProperty("String_Node_Str") + File.separator + "String_Node_Str"+ "String_Node_Str"+ String.valueOf(System.currentTimeMillis());
          Preprocessor ppObj=null;
          List<String> inFiles;
          try {
            ppObj=new Preprocessor("String_Node_Str",isPreprocess);
            inFiles=ppObj.processData("String_Node_Str",selectedFiles);
            for (            String filename : inFiles) {
              File srcFile=new File(filename);
              File destDir=new File(topicModelDirPath);
              try {
                FileUtils.copyFileToDirectory(srcFile,destDir,false);
              }
 catch (              IOException e) {
                e.printStackTrace();
                return Status.CANCEL_STATUS;
              }
            }
          }
 catch (          IOException e1) {
            e1.printStackTrace();
            return Status.CANCEL_STATUS;
          }
catch (          Exception e1) {
            e1.printStackTrace();
            return Status.CANCEL_STATUS;
          }
          lda.initialize(topicModelDirPath,noOfTopics,topicModelDirPath,true);
          long startTime=System.currentTimeMillis();
          Date dateObj=new Date();
          monitor.subTask("String_Node_Str");
          try {
            lda.doLDA(monitor,dateObj);
          }
 catch (          FileNotFoundException e) {
            e.printStackTrace();
            monitor.done();
            return Status.CANCEL_STATUS;
          }
catch (          IOException e) {
            e.printStackTrace();
            monitor.done();
            return Status.CANCEL_STATUS;
          }
          monitor.worked(20);
          if (monitor.isCanceled()) {
            return Status.CANCEL_STATUS;
          }
          FileWriter fw=null;
          String corpusFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          try {
            fw=new FileWriter(corpusFile);
            for (            String file : inFiles) {
              String text=new String(Files.readAllBytes(Paths.get(file)),StandardCharsets.UTF_8);
              fw.write(text.replace("String_Node_Str","String_Node_Str") + "String_Node_Str");
            }
            fw.close();
          }
 catch (          IOException e3) {
          }
          String wordWeightsFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          String vocabFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          HashMap<String,Integer> vocab=new HashMap<String,Integer>();
          BufferedReader br=null;
          try {
            br=new BufferedReader(new FileReader(wordWeightsFile));
            fw=new FileWriter(vocabFile);
            String line="String_Node_Str";
            while ((line=br.readLine()) != null) {
              vocab.put(line.split("String_Node_Str")[1],1);
            }
            br.close();
            String vocabKeys[]=vocab.keySet().toArray(new String[1]);
            Arrays.sort(vocabKeys);
            for (            String word : vocabKeys) {
              fw.write(word + "String_Node_Str");
            }
            ;
            fw.close();
          }
 catch (          IOException e3) {
          }
          String wordTopicFile=topicModelDirPath + System.getProperty("String_Node_Str") + "String_Node_Str";
          try {
            HashMap<String,Double> currAssign=null;
            HashMap<String,Integer> vocabMap=new HashMap<String,Integer>();
            int count=0;
            HashMap<String,HashMap<String,Double>> wordTopic=new HashMap<String,HashMap<String,Double>>();
            br=new BufferedReader(new FileReader(wordWeightsFile));
            String line="String_Node_Str";
            while ((line=br.readLine()) != null) {
              String components[]=line.split("String_Node_Str");
              int topic=Integer.parseInt(components[0]);
              String word=components[1];
              double weight=Double.parseDouble(components[2]);
              currAssign=wordTopic.get(word) != null ? wordTopic.get(word) : new HashMap<String,Double>();
              double currWeight=currAssign.get("String_Node_Str") != null ? currAssign.get("String_Node_Str") : 0.0;
              if (currWeight < weight) {
                HashMap<String,Double> map=new HashMap<String,Double>();
                map.put("String_Node_Str",topic + 0.0);
                map.put("String_Node_Str",weight);
                wordTopic.put(word,map);
              }
            }
            br.close();
            String topicKeys[]=wordTopic.keySet().toArray(new String[1]);
            Arrays.sort(topicKeys);
            for (            String word : topicKeys) {
              vocabMap.put(word,count);
              count=count + 1;
            }
            fw=new FileWriter(wordTopicFile);
            br=new BufferedReader(new FileReader(corpusFile));
            int i=0;
            while ((line=br.readLine()) != null) {
              String outputStr=i + "String_Node_Str";
              for (              String word : line.split("String_Node_Str")) {
                if (vocabMap.containsKey(word) && wordTopic.containsKey(word))                 outputStr=outputStr + "String_Node_Str" + vocabMap.get(word)+ "String_Node_Str"+ (int)Double.parseDouble(wordTopic.get(word).get("String_Node_Str") + "String_Node_Str");
              }
              ;
              i+=1;
              fw.write(outputStr + "String_Node_Str");
            }
            fw.close();
            br.close();
          }
 catch (          IOException e3) {
            e3.printStackTrace();
          }
          LDAtopics lda=new LDAtopics(corpusFile,wordTopicFile,vocabFile,outputPath,noOfTopics,minCount,pValue,usePermBool);
          try {
            lda.generateTurboTopics();
          }
 catch (          Exception e1) {
            e1.printStackTrace();
          }
          ppObj.clean();
          try {
            FileUtils.deleteDirectory(new File(topicModelDirPath));
          }
 catch (          IOException e) {
            e.printStackTrace();
          }
          monitor.worked(10);
          monitor.done();
          ConsoleView.printlInConsoleln("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
          return Status.OK_STATUS;
        }
      }
;
      job.setUser(true);
      if (canProceedCluster()) {
        job.schedule();
        job.addJobChangeListener(new JobChangeAdapter(){
          @Override public void done(          IJobChangeEvent event){
            if (!event.getResult().isOK()) {
              TacitFormComposite.writeConsoleHeaderBegining("String_Node_Str");
              ConsoleView.printlInConsoleln("String_Node_Str");
            }
 else {
              TacitFormComposite.updateStatusMessage(getViewSite(),"String_Node_Str",IStatus.OK,form);
              TacitFormComposite.writeConsoleHeaderBegining("String_Node_Str");
            }
          }
        }
);
      }
 else {
        TacitFormComposite.updateStatusMessage(getViewSite(),"String_Node_Str",IStatus.ERROR,form);
      }
    }
  }
);
  Action helpAction=new Action(){
    @Override public ImageDescriptor getImageDescriptor(){
      return (TurboTopicsModelViewImageRegistry.getImageIconFactory().getImageDescriptor(IMAGE_HELP_CO));
    }
    @Override public String getToolTipText(){
      return "String_Node_Str";
    }
    @Override public void run(){
      PlatformUI.getWorkbench().getHelpSystem().displayHelp("String_Node_Str");
    }
  }
;
  mgr.add(helpAction);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(helpAction,"String_Node_Str");
  PlatformUI.getWorkbench().getHelpSystem().setHelp(form,"String_Node_Str");
  form.getToolBarManager().update(true);
}