[#16] Reduced duplication in CommandAnalysis.cc