Date reproductionDateBeginning = inspector.getJobStatus().getProperties().getReproductionBuggyBuild().getReproductionDateBeginning(); reproductionDateBeginning = reproductionDateBeginning == null ? new Date() : reproductionDateBeginning; this.addDate(element, "reproductionDate", reproductionDateBeginning); element.addProperty("buildStatus", inspector.getBuildToBeInspected().getStatus().name()); element.addProperty("buggyBuildId", inspector.getBuggyBuild().getId()); element.addProperty("patchedBuildId", inspector.getPatchedBuild().getId()); element.addProperty("status",this.getPrettyPrintState(inspector)); for (SerializerEngine engine : this.getEngines()) { engine.serialize(dataList, this.getType());
private void mainProcess() { LOGGER.info("Start by getting the build (buildId: "+this.getConfig().getBuildId()+") with the following config: "+this.getConfig()); this.getBuildToBeInspected(); HardwareInfoSerializer hardwareInfoSerializer = new HardwareInfoSerializer(this.engines, this.getConfig().getRunId(), this.getConfig().getBuildId()+""); hardwareInfoSerializer.serialize(); List<AbstractDataSerializer> serializers = new ArrayList<>(); if (this.getConfig().getLauncherMode() == LauncherMode.BEARS) { serializers.add(new InspectorSerializer4Bears(this.engines)); } else { serializers.add(new InspectorSerializer(this.engines)); } serializers.add(new PropertiesSerializer(this.engines)); serializers.add(new InspectorTimeSerializer(this.engines)); serializers.add(new PipelineErrorSerializer(this.engines)); serializers.add(new PatchesSerializer(this.engines)); serializers.add(new ToolDiagnosticSerializer(this.engines)); ProjectInspector inspector; if (this.getConfig().getLauncherMode() == LauncherMode.BEARS) { inspector = new ProjectInspector4Bears(buildToBeInspected, this.getConfig().getWorkspacePath(), serializers, this.notifiers); } else if (this.getConfig().getLauncherMode() == LauncherMode.CHECKSTYLE) { inspector = new ProjectInspector4Checkstyle(buildToBeInspected, this.getConfig().getWorkspacePath(), serializers, this.notifiers); } else { inspector = new ProjectInspector(buildToBeInspected, this.getConfig().getWorkspacePath(), serializers, this.notifiers); } inspector.setPatchNotifier(this.patchNotifier); inspector.run(); LOGGER.info("Inspector is finished. The process will exit now."); System.exit(0); }