Program: 129752
Project: 129752
Buggy source:
/** 
 * checkFileFieldsValue active fileViewer if file exist.
 */
private void checkFilePathAndManageIt(boolean isNewFile){
  filePathIsDone=false;
  String fileStr=getConnection().getFilePath();
  if (isContextMode() && getContextModeManager() != null) {
    fileStr=getContextModeManager().getOriginalValue(fileStr);
    fileStr=TalendQuoteUtils.removeQuotes(fileStr);
  }
  if (fileStr == null || fileStr == "String_Node_Str") {
    filePositionalViewer.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  }
 else {
    filePositionalViewer.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    StringBuffer previewRows=new StringBuffer("String_Node_Str");
    BufferedReader in=null;
    try {
      File file=new File(fileStr);
      String str;
      int numberLine=0;
      String encoding=getConnection().getEncoding();
      if (encoding == null || encoding.equals("String_Node_Str")) {
        Charset guessedCharset=CharsetToolkit.guessEncoding(file,4096);
        encoding=guessedCharset.displayName();
        getConnection().setEncoding(encoding);
      }
      in=new BufferedReader(new InputStreamReader(new FileInputStream(fileStr),encoding));
      previewRows.append("String_Node_Str");
      while (((str=in.readLine()) != null) && (numberLine <= maximumRowsToPreview)) {
        numberLine++;
        previewRows.append(str.replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str");
      }
      filePositionalViewer.setText(new String(previewRows));
      filePathIsDone=true;
      if (isNewFile && !isContextMode()) {
        fieldSeparatorText.setText("String_Node_Str");
        filePositionalViewer.setSeparatorValue("String_Node_Str",true);
        getConnection().setFieldSeparatorValue(TalendQuoteUtils.addQuotes("String_Node_Str"));
      }
    }
 catch (    Exception e) {
      String msgError=Messages.getString("String_Node_Str") + "String_Node_Str" + fileStr.replace("String_Node_Str","String_Node_Str")+ "String_Node_Str";
      if (e instanceof FileNotFoundException) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
 else       if (e instanceof EOFException) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
 else       if (e instanceof IOException) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
 else {
        msgError=Messages.getString("String_Node_Str") + "String_Node_Str" + fileStr.replace("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ Messages.getString("String_Node_Str");
      }
      filePositionalViewer.setText("String_Node_Str" + msgError);
      updateStatus(IStatus.ERROR,msgError);
    }
 finally {
      String msgError=Messages.getString("String_Node_Str") + "String_Node_Str" + fileStr.replace("String_Node_Str","String_Node_Str")+ "String_Node_Str";
      try {
        if (in != null) {
          in.close();
        }
      }
 catch (      IOException e) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
    }
    filePositionalViewer.layout();
    scrolledCompositeFileViewer.setMinSize(filePositionalViewer.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  }
  checkFieldsValue();
}

Fixed version (ground truth):
/** 
 * checkFileFieldsValue active fileViewer if file exist.
 */
private void checkFilePathAndManageIt(boolean isNewFile){
  filePathIsDone=false;
  String fileStr=getConnection().getFilePath();
  String encoding=getConnection().getEncoding();
  if (isContextMode() && getContextModeManager() != null) {
    fileStr=getContextModeManager().getOriginalValue(fileStr);
    fileStr=TalendQuoteUtils.removeQuotes(fileStr);
    encoding=getContextModeManager().getOriginalValue(encoding);
    encoding=TalendQuoteUtils.removeQuotes(encoding);
  }
  if (fileStr == null || fileStr == "String_Node_Str") {
    filePositionalViewer.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
  }
 else {
    filePositionalViewer.setText("String_Node_Str" + Messages.getString("String_Node_Str"));
    StringBuffer previewRows=new StringBuffer("String_Node_Str");
    BufferedReader in=null;
    try {
      File file=new File(fileStr);
      String str;
      int numberLine=0;
      if (encoding == null || encoding.equals("String_Node_Str")) {
        Charset guessedCharset=CharsetToolkit.guessEncoding(file,4096);
        encoding=guessedCharset.displayName();
        getConnection().setEncoding(encoding);
      }
      in=new BufferedReader(new InputStreamReader(new FileInputStream(fileStr),encoding));
      previewRows.append("String_Node_Str");
      while (((str=in.readLine()) != null) && (numberLine <= maximumRowsToPreview)) {
        numberLine++;
        previewRows.append(str.replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str");
      }
      filePositionalViewer.setText(new String(previewRows));
      filePathIsDone=true;
      if (isNewFile && !isContextMode()) {
        fieldSeparatorText.setText("String_Node_Str");
        filePositionalViewer.setSeparatorValue("String_Node_Str",true);
        getConnection().setFieldSeparatorValue(TalendQuoteUtils.addQuotes("String_Node_Str"));
      }
    }
 catch (    Exception e) {
      String msgError=Messages.getString("String_Node_Str") + "String_Node_Str" + fileStr.replace("String_Node_Str","String_Node_Str")+ "String_Node_Str";
      if (e instanceof FileNotFoundException) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
 else       if (e instanceof EOFException) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
 else       if (e instanceof IOException) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
 else {
        msgError=Messages.getString("String_Node_Str") + "String_Node_Str" + fileStr.replace("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ Messages.getString("String_Node_Str");
      }
      filePositionalViewer.setText("String_Node_Str" + msgError);
      updateStatus(IStatus.ERROR,msgError);
    }
 finally {
      String msgError=Messages.getString("String_Node_Str") + "String_Node_Str" + fileStr.replace("String_Node_Str","String_Node_Str")+ "String_Node_Str";
      try {
        if (in != null) {
          in.close();
        }
      }
 catch (      IOException e) {
        msgError=msgError + Messages.getString("String_Node_Str");
      }
    }
    filePositionalViewer.layout();
    scrolledCompositeFileViewer.setMinSize(filePositionalViewer.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  }
  checkFieldsValue();
}