from interface ReportManager.Reporter
491137
public void appendReport (StringBuilder report, long now, long sinceLast, boolean reset)
    {
        PresentsConMgrStats stats = getStats();
        long eventCount = stats.eventCount - _lastStats.eventCount;
        int connects = stats.connects - _lastStats.connects;
        int disconnects = stats.disconnects - _lastStats.disconnects;
        int closes = stats.closes - _lastStats.closes;
        long bytesIn = stats.bytesIn - _lastStats.bytesIn;
        long bytesOut = stats.bytesOut - _lastStats.bytesOut;
        long msgsIn = stats.msgsIn - _lastStats.msgsIn;
        long msgsOut = stats.msgsOut - _lastStats.msgsOut;
        if (reset) {
            _lastStats = stats;
        }

        // make sure we don't div0 if this method somehow gets called twice in
        // the same millisecond
        sinceLast = Math.max(sinceLast, 1L);

        report.append("* presents.net.ConnectionManager:\n");
        report.append("- Network connections: ");
        report.append(stats.connectionCount).append(" connections, ");
        report.append(stats.handlerCount).append(" handlers\n");
        report.append("- Network activity: ");
        report.append(eventCount).append(" events, ");
        report.append(connects).append(" connects, ");
        report.append(disconnects).append(" disconnects, ");
        report.append(closes).append(" closes\n");
        report.append("- Network input: ");
        report.append(bytesIn).append(" bytes, ");
        report.append(msgsIn).append(" msgs, ");
        report.append(msgsIn*1000/sinceLast).append(" mps, ");
        long avgIn = (msgsIn == 0) ? 0 : (bytesIn/msgsIn);
        report.append(avgIn).append(" avg size, ");
        report.append(bytesIn*1000/sinceLast).append(" bps\n");
        report.append("- Network output: ");
        report.append(bytesOut).append(" bytes, ");
        report.append(msgsOut).append(" msgs, ");
        report.append(msgsOut*1000/sinceLast).append(" mps, ");
        long avgOut = (msgsOut == 0) ? 0 : (bytesOut/msgsOut);
        report.append(avgOut).append(" avg size, ");
        report.append(bytesOut*1000/sinceLast).append(" bps\n");
    }
1269886
@Inject
    public void setReporterConfiguration(@Nullable Configuration.ReporterConfiguration reporterConfiguration) {
        if (reporterConfiguration != null) {
            configuration.withReporter(reporterConfiguration);
        }
    }
937869
@Requires("r != null")
  public void report(Report r) {
    if (r.getKind() == Kind.ERROR) {
      ++errorCount;
    }
    reports.add(r);
  }
369991
public void startReporting() {
    this.reportingStarted = true;
    for (ContextAwareReporter reporter : this.reporters) {
      try {
        reporter.start();
      } catch (Throwable throwable) {
        log.error(String.format("Failed to start reporter with class %s", reporter.getClass().getCanonicalName()),
            throwable);
      }
    }
  }
1117022
protected <R extends Closeable> R registerReporter(final R reporter) {
		if (this.reporters == null) {
			this.reporters = new HashSet<Closeable>();
		}
		this.reporters.add(reporter);
		return reporter;
	}
678864
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String sOpDirectory) {
        logger.entering(new Object[] { xmlSuites, suites, sOpDirectory });
        if (ListenerManager.isCurrentMethodSkipped(this)) {
            logger.exiting(ListenerManager.THREAD_EXCLUSION_MSG);
            return;
        }

        if (logger.isLoggable(Level.INFO)) {
            logger.log(Level.INFO, "Generating ExcelReport");
        }

        TestCaseResult.setOutputDirectory(sOpDirectory);

        // Generate data to suit excel report.
        this.generateSummaryData(suites);
        this.generateTCBasedData(allTestsResults);

        // Create the Excel Report
        this.createExcelReport();

        // Render the report
        Path p = Paths.get(sOpDirectory, reportFileName);

        try {
            Path opDirectory = Paths.get(sOpDirectory);
            if (!Files.exists(opDirectory)) {
                Files.createDirectories(Paths.get(sOpDirectory));
            }

            FileOutputStream fOut = new FileOutputStream(p.toFile());
            wb.write(fOut);
            fOut.flush();
        } catch (IOException e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }

        if (logger.isLoggable(Level.INFO)) {
            logger.log(Level.INFO, "Excel File Created @ " + p.toAbsolutePath().toString());
        }
    }
287996
@SuppressWarnings({ "rawtypes" })
    static void report(Progressable progressable, Stats stats) {
        progressable = (Progressable) CompatHandler.unwrap(progressable);

        if (progressable == null || progressable == Reporter.NULL) {
            return;
        }

        if (progressable instanceof Reporter) {
            Reporter reporter = (Reporter) progressable;
            for (Counter count : Counter.ALL) {
                oldApiCounter(reporter, count, count.get(stats));
            }
        }

        if (progressable instanceof org.apache.hadoop.mapreduce.TaskInputOutputContext) {
            TaskInputOutputContext compatTioc = CompatHandler.taskInputOutputContext((org.apache.hadoop.mapreduce.TaskInputOutputContext) progressable);
            for (Counter count : Counter.ALL) {
                newApiCounter(compatTioc, count, count.get(stats));
            }
        }
    }
1286735
public void generateReport(ViewDelegate view, Model model, ReportType reportType){
        // ZAP: Allow scan report file name to be specified
    	
    	final ReportType localReportType;
    	
    	if(reportType == null) {
    		localReportType=ReportType.HTML;
    	} else {
    		localReportType=reportType;	
    	}
    	
        try {
            JFileChooser chooser = new WritableFileChooser(Model.getSingleton().getOptionsParam().getUserDirectory());
	        
            chooser.setFileFilter(new FileFilter() {

            	@Override
                public boolean accept(File file) {
                    if (file.isDirectory()) {
                        return true;
                    } else if (file.isFile()) {
                    	String lcFileName=file.getName().toLowerCase(Locale.ROOT);
                    	switch (localReportType) {
                        case XML:
                            return lcFileName.endsWith(XML_FILE_EXTENSION);
                        case MD:
                            return lcFileName.endsWith(MD_FILE_EXTENSION);
                        case JSON:
                            return lcFileName.endsWith(JSON_FILE_EXTENSION);
                        case HTML:
                        default:
                            return (lcFileName.endsWith(HTM_FILE_EXTENSION) || lcFileName.endsWith(HTML_FILE_EXTENSION));
                        }
                    }
                    return false;
                }

                @Override
                public String getDescription() {
                	switch(localReportType) {
                	case XML:
                		return Constant.messages.getString("file.format.xml");
                	case MD:
                		return Constant.messages.getString("file.format.md");
                	case JSON:
                		return Constant.messages.getString("file.format.json");
                	case HTML:
                	default:
                		return Constant.messages.getString("file.format.html"); 
                	}
                }
            });

            String fileExtension="";
        	switch(localReportType) {
        	case XML:
        		fileExtension=XML_FILE_EXTENSION;
        		break;
        	case JSON:
        		fileExtension=JSON_FILE_EXTENSION;
        		break;
        	case MD:
        		fileExtension=MD_FILE_EXTENSION;
        		break;
        	case HTML:
        	default: 
        		fileExtension=HTML_FILE_EXTENSION;
        		break;
        	}
        	chooser.setSelectedFile(new File(fileExtension)); //Default the filename to a reasonable extension;
        	
            int rc = chooser.showSaveDialog(View.getSingleton().getMainFrame());
            File file = null;
            if (rc == JFileChooser.APPROVE_OPTION) {
                file = chooser.getSelectedFile();

                File report = generate(file.getAbsolutePath(), model, localReportType);
                if (report == null) {
                    view.showMessageDialog(Constant.messages.getString("report.unknown.error", file.getAbsolutePath()));
                    return;
                }

                if (Files.notExists(report.toPath())) {
                    logger.info("Not opening report, does not exist: " + report);
                    return;
                }

                try {
                	DesktopUtils.openUrlInBrowser(report.toURI());
                } catch (Exception e) {
                    logger.error(e.getMessage(), e);
                    view.showMessageDialog(Constant.messages.getString("report.complete.warning", report.getAbsolutePath()));
                }
            }

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            view.showWarningDialog(Constant.messages.getString("report.unexpected.error"));
        }
    }
887732
function Reporter(options) {
    options = options || {};

    this._options = options;
    this._results = options.results || [];
    this._rule = options.rule || null;
    this._cfg = options.cfg || null;
}
857406
public void createRuntimeReport(PrintStream out) {
        // This function may be running in its own thread.

        out.print("MIME-Version: 1.0\n");
        out.print("Content-type: multipart/mixed; boundary=\"reportsection\"");

        out.print("\n\n--reportsection\nContent-Type: text/plain\n\nClientInterface Report\n");
        if (m_clientInterface != null) {
            out.print(m_clientInterface.toString() + "\n");
        }
    }
1040668
protected void collect(Object key, TaggedMapOutput aRecord,
                         OutputCollector output, Reporter reporter) throws IOException {
    this.collected += 1;
    addLongValue("collectedCount", 1);
    if (aRecord != null) {
      output.collect(key, aRecord.getData());
      reporter.setStatus("key: " + key.toString() + " collected: " + collected);
      addLongValue("actuallyCollectedCount", 1);
    }
  }
362381
public Report executeReport(String reportName) throws FMSException {

		IntuitMessage intuitMessage = prepareReport(reportName);

		// execute interceptors
		executeInterceptors(intuitMessage);

		Report report = null;

		// Iterate the IntuitObjects list in QueryResponse and convert to <T> entity 
		IntuitResponse intuitResponse = (IntuitResponse) intuitMessage.getResponseElements().getResponse();
		if (intuitResponse != null) {
			report = intuitResponse.getReport();
		}
		return report;
	}
677029
public void setReport(Report report) {
		this.report = report;
		if (this.report.getQuery() != null) {
			this.report.getQuery().setDialect(dialect);
		}
	}
249800
private JsonObject buildJSONReport() {
        logger.entering();

        Gson gson = new GsonBuilder().setPrettyPrinting().create();

        JsonArray testObjects = loadJSONArray(jsonCompletedTest);

        for (TestMethodInfo temp : completedTest) {
            testObjects.add(gson.fromJson(temp.toJson(), JsonElement.class));
        }

        for (TestMethodInfo temp : runningTest) {
            testObjects.add(gson.fromJson(temp.toJson(), JsonElement.class));
        }

        JsonArray configObjects = loadJSONArray(jsonCompletedConfig);
        for (ConfigMethodInfo temp : runningConfig) {
            configObjects.add(gson.fromJson(temp.toJson(), JsonElement.class));
        }

        JsonObject summary = new JsonObject();
        summary.add("testMethodsSummary", getReportSummaryCounts(testObjects));
        summary.add("configurationMethodsSummary", getReportSummaryCounts(configObjects));

        JsonElement reportMetadata = gson.fromJson(ReporterConfigMetadata.toJsonAsString(), JsonElement.class);

        JsonObject reporter = new JsonObject();
        reporter.add("reportSummary", summary);
        reporter.add("testMethods", testObjects);
        reporter.add("configurationMethods", configObjects);
        reporter.add("configSummary", generateConfigSummary());
        reporter.add("localConfigSummary", testJsonLocalConfigSummary);
        reporter.add("reporterMetadata", reportMetadata);

        logger.exiting(reporter);

        return reporter;
    }
711137
protected void updateReporting(Reporting value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         findAndReplaceSimpleElement(innerCount, root, "excludeDefaults",
                  (value.isExcludeDefaults() == false) ? null : String.valueOf(value.isExcludeDefaults()), "false");
         findAndReplaceSimpleElement(innerCount, root, "outputDirectory", value.getOutputDirectory(), null);
         iterateReportPlugin(innerCount, root, value.getPlugins(), "plugins", "plugin");
      }
   }
254761
@Override
    public void report() {
        for (Map.Entry<KeyType, Map<String, Map<String, List<SourceInfo>>>> entry : parmInfo.entrySet()) {
            KeyType type = entry.getKey();
            Map<String, Map<String, List<SourceInfo>>> typeMap = entry.getValue();

            for (Map<String, List<SourceInfo>> parmCaseInfo : typeMap.values()) {
                if (parmCaseInfo.size() > 1) {
                    BugInstance bi = new BugInstance(this, type.getDescription(), NORMAL_PRIORITY);

                    for (Map.Entry<String, List<SourceInfo>> sourceInfos : parmCaseInfo.entrySet()) {
                        for (SourceInfo sourceInfo : sourceInfos.getValue()) {
                            bi.addClass(sourceInfo.clsName);
                            bi.addMethod(sourceInfo.clsName, sourceInfo.methodName, sourceInfo.signature, sourceInfo.isStatic);
                            bi.addSourceLine(sourceInfo.srcLine);
                            bi.addString(sourceInfos.getKey());
                        }
                    }

                    bugReporter.reportBug(bi);
                }
            }
        }
        parmInfo.clear();
    }
1206193
@SuppressWarnings({"unchecked"})
  public OutputCollector getCollector(String namedOutput, Reporter reporter)
    throws IOException {
    return getCollector(namedOutput, null, reporter);
  }