Program: 178482
Project: 178482
Buggy source:
/** 
 * {@inheritDoc}
 * @see CommandListener#onBeforeCommand(CommandManager,Command,String)
 */
public boolean onBeforeCommand(CommandManager sender,Command command,String param){
  if (getTextArea().isAttached() && getTextArea().isEnabled() && !IGNORED_COMMANDS.contains(command)) {
    Selection selection=getTextArea().getDocument().getSelection();
    if (selection.getRangeCount() > 0) {
      String styleAttribute="String_Node_Str";
      if (Command.BOLD.equals(command)) {
        styleAttribute="String_Node_Str";
      }
 else       if (Command.ITALIC.equals(command)) {
        styleAttribute="String_Node_Str";
      }
 else       if (Command.UNDERLINE.equals(command)) {
        styleAttribute="String_Node_Str";
      }
 else       if (Command.STRIKE_THROUGH.equals(command)) {
        styleAttribute="String_Node_Str";
      }
      Range range=selection.getRangeAt(0);
      List<OperationTarget> targets=getIntermediaryTargets(range);
      log.info(targets.toString());
      for (      OperationTarget target : targets) {
        boolean addStyle=getTextArea().getCommandManager().isExecuted(command);
        int[] path=treeOperationFactory.toIntArray(target.getStartContainer());
        if (path.length == 2) {
          addStyle=true;
        }
        boolean splitLeft=true;
        int start=target.getStartOffset();
        if (start == 0) {
          splitLeft=false;
        }
        boolean splitRight=true;
        int end=target.getEndOffset();
        if (end == target.getDataLength()) {
          splitRight=false;
        }
        TreeOperation op=new TreeStyle(clientJupiter.getSiteId(),path,start,end,"String_Node_Str",styleAttribute,addStyle,splitLeft,splitRight);
        clientJupiter.generate(op);
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see CommandListener#onBeforeCommand(CommandManager,Command,String)
 */
public boolean onBeforeCommand(CommandManager sender,Command command,String param){
  if (getTextArea().isAttached() && getTextArea().isEnabled() && !IGNORED_COMMANDS.contains(command)) {
    Selection selection=getTextArea().getDocument().getSelection();
    if (selection.getRangeCount() > 0) {
      String styleAttribute="String_Node_Str";
      if (Command.BOLD.equals(command)) {
        styleAttribute="String_Node_Str";
      }
 else       if (Command.ITALIC.equals(command)) {
        styleAttribute="String_Node_Str";
      }
 else       if (Command.UNDERLINE.equals(command)) {
        styleAttribute="String_Node_Str";
      }
 else       if (Command.STRIKE_THROUGH.equals(command)) {
        styleAttribute="String_Node_Str";
      }
      Range range=selection.getRangeAt(0);
      List<OperationTarget> targets=getIntermediaryTargets(range);
      log.info(targets.toString());
      for (      OperationTarget target : targets) {
        boolean addStyle=!getTextArea().getCommandManager().isExecuted(command);
        log.fine("String_Node_Str" + command + "String_Node_Str"+ addStyle);
        int[] path=treeOperationFactory.toIntArray(target.getStartContainer());
        if (path.length == 2) {
          addStyle=true;
        }
        boolean splitLeft=true;
        int start=target.getStartOffset();
        if (start == 0) {
          splitLeft=false;
        }
        boolean splitRight=true;
        int end=target.getEndOffset();
        if (end == target.getDataLength()) {
          splitRight=false;
        }
        TreeOperation op=new TreeStyle(clientJupiter.getSiteId(),path,start,end,"String_Node_Str",styleAttribute,addStyle,splitLeft,splitRight);
        clientJupiter.generate(op);
      }
      return true;
    }
  }
  return false;
}