public void Analyze(AnalysisConfig analysisConfig, IDexterPluginManager pluginManager, IDexterClient client)
        {
            try
            {
                DexterAnalyzer analyzer = DexterAnalyzer.Instance;
                CheckAnalysisConfig(analysisConfig);
                //analysisConfig.AddHeaderAndSourceConfiguration(analyzer.ProjectAnalysisConfigurationList);

                analyzer.PreSendSourceCode(analysisConfig);

                analyzer.PreRunStaticAnalysis(analysisConfig);
                List <AnalysisResult> resultList = RunStaticAnalysis(analysisConfig, pluginManager, client);
                analyzer.PostRunStaticAnalysis(analysisConfig, resultList);
            }
            catch (Exception e)
            {
                CliLog.Error(e.StackTrace);
            }
        }
        public void HandleAnalysisResult(List <AnalysisResult> resultList, IDexterClient client)
        {
            if (resultList.Count == 0)
            {
                cliLog.Warn("No defect result");
                return;
            }

            List <Defect>  allDefectList       = DexterAnalyzer.AllDefectList(resultList);
            AnalysisResult firstAnalysisResult = resultList[0];
            string         sourceFileFullPath  = firstAnalysisResult.SourceFileFullPath;

            try
            {
                WriteResultFile(allDefectList, sourceFileFullPath);
                string resultFilePrefixName = AnalysisResultFileManager.Instance.
                                              GetResultFilePrefixName(firstAnalysisResult.ModulePath, firstAnalysisResult.FileName);
                SendResultJob.SendResultFileThenDelete(client, resultFilePrefixName);
            }
            catch (IOException e)
            {
                cliLog.Error(e.StackTrace);
            }

            cliLog.Info(" - " + sourceFileFullPath);
            if (allDefectList.Count == 0)
            {
                cliLog.Info("    > No Defect");
                return;
            }
            else
            {
                cliLog.Info("    > Total Defects: " + allDefectList.Count);
            }
            PrintDefect(allDefectList);
        }