Program: 58240
Project: 58240
Buggy source:
protected FileInfo excuteOperations(DataObject dataObject,MappedEditorConfig config){
  LOG.log(Level.INFO,"String_Node_Str",filePath);
  LOG.log(Level.INFO,config.toString());
  FileInfo info=new FileInfo(dataObject);
  boolean fileChangeNeeded=false;
  boolean styleFlushNeeded=false;
  FileObject primaryFile=dataObject.getPrimaryFile();
  StringBuilder content;
  try {
    content=new StringBuilder(primaryFile.asText());
  }
 catch (  IOException ex) {
    LOG.log(Level.WARNING,"String_Node_Str");
    content=new StringBuilder("String_Node_Str");
  }
  info.setContent(content);
  if (config.getEndOfLine() != null) {
    info.setEndOfLine(config.getEndOfLine());
  }
  EditorCookie cookie=getEditorCookie(dataObject);
  boolean isOpenedInEditor=(cookie != null) && (cookie.getDocument() != null);
  info.setOpenedInEditor(isOpenedInEditor);
  info.setCookie(cookie);
  MappedCharset mappedCharset=config.getCharset();
  if (mappedCharset != null) {
    logOperation(EditorConfigConstant.CHARSET,mappedCharset.getName());
    boolean changedCharset=new CharsetOperation().run(dataObject,mappedCharset);
    fileChangeNeeded=fileChangeNeeded || changedCharset;
    info.setCharset(mappedCharset.getCharset());
  }
 else {
    info.setCharset(StandardCharsets.UTF_8);
  }
  if (config.getEndOfLine() != null) {
    logOperation(EditorConfigConstant.END_OF_LINE,config.getReadableEndOfLine());
    boolean changedLineEndings=new LineEndingOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || changedLineEndings;
  }
  if (config.getIndentSize() == -2 || config.getIndentSize() > -1) {
    logOperation(EditorConfigConstant.INDENT_SIZE,config.getIndentSize());
    boolean changedIndentSize=new IndentSizeOperation(primaryFile).changeIndentSize(config.getIndentSize());
    styleFlushNeeded=styleFlushNeeded || changedIndentSize;
  }
  if (config.getIndentStyle() != null) {
    logOperation(EditorConfigConstant.INDENT_STYLE,config.getIndentStyle());
    boolean changedIndentStyle=new IndentStyleOperation(primaryFile).changeIndentStyle(config.getIndentStyle());
    styleFlushNeeded=styleFlushNeeded || changedIndentStyle;
  }
  if (config.isInsertFinalNewLine()) {
    logOperation(EditorConfigConstant.INSERT_FINAL_NEWLINE,config.isInsertFinalNewLine());
    boolean changedLineEndings=new FinalNewLineOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || changedLineEndings;
  }
  if ((config.getTabWidth() > -1) && (config.getIndentStyle() != null) && (config.getIndentStyle().equals(EditorConfigConstant.INDENT_STYLE_TAB))) {
    logOperation(EditorConfigConstant.TAB_WIDTH,config.getIndentStyle());
    boolean changedTabWidth=new TabWidthOperation(primaryFile).changeTabWidth(config.getTabWidth());
    fileChangeNeeded=fileChangeNeeded || changedTabWidth;
  }
  if (config.isTrimTrailingWhiteSpace()) {
    logOperation(EditorConfigConstant.TRIM_TRAILING_WHITESPACE,config.isTrimTrailingWhiteSpace());
    boolean trimmedWhiteSpaces=new TrimTrailingWhiteSpaceOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || trimmedWhiteSpaces;
  }
  if (mappedCharset != null) {
  }
 else {
    info.setCharset(StandardCharsets.UTF_8);
  }
  info.setFileChangeNeeded(fileChangeNeeded);
  info.setStyleFlushNeeded(styleFlushNeeded);
  return info;
}

Fixed version (ground truth):
protected FileInfo excuteOperations(DataObject dataObject,MappedEditorConfig config){
  LOG.log(Level.INFO,"String_Node_Str",filePath);
  LOG.log(Level.INFO,config.toString());
  FileInfo info=new FileInfo(dataObject);
  boolean fileChangeNeeded=false;
  boolean styleFlushNeeded=false;
  FileObject primaryFile=dataObject.getPrimaryFile();
  StringBuilder content;
  try {
    MappedCharset mc=config.getCharset();
    String charset=mc != null ? mc.getCharset().name() : StandardCharsets.UTF_8.name();
    content=new StringBuilder(primaryFile.asText(charset));
  }
 catch (  IOException ex) {
    LOG.log(Level.WARNING,"String_Node_Str");
    content=new StringBuilder("String_Node_Str");
  }
  info.setContent(content);
  if (config.getEndOfLine() != null) {
    info.setEndOfLine(config.getEndOfLine());
  }
  EditorCookie cookie=getEditorCookie(dataObject);
  boolean isOpenedInEditor=(cookie != null) && (cookie.getDocument() != null);
  info.setOpenedInEditor(isOpenedInEditor);
  info.setCookie(cookie);
  MappedCharset mappedCharset=config.getCharset();
  if (mappedCharset != null) {
    logOperation(EditorConfigConstant.CHARSET,mappedCharset.getName());
    boolean changedCharset=new CharsetOperation().run(dataObject,mappedCharset);
    fileChangeNeeded=fileChangeNeeded || changedCharset;
    info.setCharset(mappedCharset.getCharset());
  }
 else {
    info.setCharset(StandardCharsets.UTF_8);
  }
  if (config.getEndOfLine() != null) {
    logOperation(EditorConfigConstant.END_OF_LINE,config.getReadableEndOfLine());
    boolean changedLineEndings=new LineEndingOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || changedLineEndings;
  }
  if (config.getIndentSize() == -2 || config.getIndentSize() > -1) {
    logOperation(EditorConfigConstant.INDENT_SIZE,config.getIndentSize());
    boolean changedIndentSize=new IndentSizeOperation(primaryFile).changeIndentSize(config.getIndentSize());
    styleFlushNeeded=styleFlushNeeded || changedIndentSize;
  }
  if (config.getIndentStyle() != null) {
    logOperation(EditorConfigConstant.INDENT_STYLE,config.getIndentStyle());
    boolean changedIndentStyle=new IndentStyleOperation(primaryFile).changeIndentStyle(config.getIndentStyle());
    styleFlushNeeded=styleFlushNeeded || changedIndentStyle;
  }
  if (config.isInsertFinalNewLine()) {
    logOperation(EditorConfigConstant.INSERT_FINAL_NEWLINE,config.isInsertFinalNewLine());
    boolean changedLineEndings=new FinalNewLineOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || changedLineEndings;
  }
  if ((config.getTabWidth() > -1) && (config.getIndentStyle() != null) && (config.getIndentStyle().equals(EditorConfigConstant.INDENT_STYLE_TAB))) {
    logOperation(EditorConfigConstant.TAB_WIDTH,config.getIndentStyle());
    boolean changedTabWidth=new TabWidthOperation(primaryFile).changeTabWidth(config.getTabWidth());
    fileChangeNeeded=fileChangeNeeded || changedTabWidth;
  }
  if (config.isTrimTrailingWhiteSpace()) {
    logOperation(EditorConfigConstant.TRIM_TRAILING_WHITESPACE,config.isTrimTrailingWhiteSpace());
    boolean trimmedWhiteSpaces=new TrimTrailingWhiteSpaceOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || trimmedWhiteSpaces;
  }
  if (mappedCharset != null) {
  }
 else {
    info.setCharset(StandardCharsets.UTF_8);
  }
  info.setFileChangeNeeded(fileChangeNeeded);
  info.setStyleFlushNeeded(styleFlushNeeded);
  return info;
}