Program: 154870
Project: 154870
Buggy source:
@Override protected String exec(AppCommandParser parser,Session session,Output out) throws ShellException, RemoteException {
  IndexProvider indexes=indexes();
  boolean doCd=parser.options().containsKey("String_Node_Str");
  boolean doLs=parser.options().containsKey("String_Node_Str");
  boolean query=parser.options().containsKey("String_Node_Str");
  boolean get=parser.options().containsKey("String_Node_Str") || query || doCd|| doLs;
  boolean index=parser.options().containsKey("String_Node_Str");
  boolean remove=parser.options().containsKey("String_Node_Str");
  int count=boolCount(get,index,remove);
  if (count != 1) {
    throw new ShellException("String_Node_Str");
  }
  if (get) {
    String commandToRun=parser.options().get("String_Node_Str");
    Collection<String> commandsToRun=new ArrayList<String>();
    boolean specialCommand=false;
    if (doCd || doLs) {
      specialCommand=true;
      if (doCd) {
        commandsToRun.add("String_Node_Str");
      }
 else       if (doLs) {
        commandsToRun.add("String_Node_Str");
      }
    }
 else     if (commandToRun != null) {
      commandsToRun.addAll(Arrays.asList(commandToRun.split(Pattern.quote("String_Node_Str"))));
    }
    Iterable<Node> result;
    if (query) {
      result=query(indexes,parser,session,out);
    }
 else {
      result=get(indexes,parser,session,out);
    }
    for (    Node node : result) {
      printAndInterpretTemplateLines(commandsToRun,false,!specialCommand,node,getServer(),session,out);
    }
  }
 else   if (index) {
    index(indexes,parser,session,out);
  }
 else   if (remove) {
    remove(indexes,parser,session,out);
  }
  return null;
}

Fixed version (ground truth):
@Override protected String exec(AppCommandParser parser,Session session,Output out) throws ShellException, RemoteException {
  IndexProvider indexes=indexes();
  boolean doCd=parser.options().containsKey("String_Node_Str");
  boolean doLs=parser.options().containsKey("String_Node_Str");
  boolean query=parser.options().containsKey("String_Node_Str");
  boolean get=parser.options().containsKey("String_Node_Str") || query || doCd|| doLs;
  boolean index=parser.options().containsKey("String_Node_Str");
  boolean remove=parser.options().containsKey("String_Node_Str");
  int count=boolCount(get,index,remove);
  if (count != 1) {
    throw new ShellException("String_Node_Str");
  }
  if (get) {
    String commandToRun=parser.options().get("String_Node_Str");
    Collection<String> commandsToRun=new ArrayList<String>();
    boolean specialCommand=false;
    if (doCd || doLs) {
      specialCommand=true;
      if (doCd) {
        commandsToRun.add("String_Node_Str");
      }
 else       if (doLs) {
        commandsToRun.add("String_Node_Str");
      }
    }
 else     if (commandToRun != null) {
      commandsToRun.addAll(Arrays.asList(commandToRun.split(Pattern.quote("String_Node_Str"))));
    }
    Iterable<Node> result;
    if (query) {
      result=query(indexes,parser);
    }
 else {
      result=get(indexes,parser);
    }
    for (    Node node : result) {
      printAndInterpretTemplateLines(commandsToRun,false,!specialCommand,node,getServer(),session,out);
    }
  }
 else   if (index) {
    index(indexes,parser,session);
  }
 else   if (remove) {
    remove(indexes,parser,session);
  }
  return null;
}