Program: 58266
Project: 58266
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) {
    content=new StringBuilder();
  }
  info.setContent(content);
  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.getEndOfLine());
    boolean endOfLine=new LineEndingOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || endOfLine;
  }
  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 {
    content=new StringBuilder(primaryFile.asText());
  }
 catch (  IOException ex) {
    content=new StringBuilder();
  }
  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.getEndOfLine());
    boolean endOfLine=new LineEndingOperation().operate(info);
    fileChangeNeeded=fileChangeNeeded || endOfLine;
  }
  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;
}