├── .gitignore ├── .idea ├── .gitignore ├── code-bot.iml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── modules.xml └── vcs.xml ├── LICENSE ├── README.md ├── baselines ├── .DS_Store ├── __pycache__ │ └── parse_evosuite_xml.cpython-39.pyc ├── bugs.csv ├── generate_ut_for_bugs.py ├── getEvoCoverage.py ├── palrun_evosuite_bug_detection.py ├── palrun_evosuite_coverage.py ├── palrun_evosuite_generate.py ├── parse_evosuite_xml.py ├── run_evosuite_bug_detection.sh ├── run_evosuite_coverage.sh └── run_evosuite_gen.sh ├── data ├── .DS_Store ├── __pycache__ │ ├── analyze_configuration.cpython-39.pyc │ ├── configuration.cpython-311.pyc │ ├── configuration.cpython-312.pyc │ └── configuration.cpython-39.pyc ├── analyze_configuration.py ├── bug_trugger_tests.jsonl ├── build │ └── java.so ├── configuration.py ├── configuration_example.py ├── d4j_assistant.jsonl ├── d4j_assistant_with_shell.jsonl ├── d4j_fixed_project_list ├── import_v2.json ├── test_name.json └── test_src.json ├── index.html ├── requirements.txt ├── rq1 ├── .DS_Store ├── __pycache__ │ └── assistant_methods.cpython-39.pyc ├── analyze │ ├── .DS_Store │ ├── __pycache__ │ │ ├── bug_detection_summary.cpython-39.pyc │ │ ├── compile_and_pass_rates.cpython-39.pyc │ │ └── coverage_rates.cpython-39.pyc │ ├── bug_detection_summary.py │ ├── compile_and_pass_rates.py │ ├── compile_error_summary.py │ ├── coverage_rates.py │ └── execution_error_summary.py ├── assistant_methods.py ├── generate_prompts.py ├── generate_prompts_AutoCoT.py ├── generate_prompts_CoT.py ├── generate_prompts_batch_infer.py ├── generate_prompts_few_shot.py ├── generate_prompts_focal_after_constructor.py ├── generate_prompts_focal_at_end.py ├── generate_prompts_focal_at_end_improve_instruction.py ├── generate_prompts_focal_between_fields_and_other_methods.py ├── generate_prompts_gemma.py ├── generate_prompts_palrun.py ├── generate_prompts_remove_redundant_info.py ├── generate_prompts_shell_within.py ├── generate_prompts_switch_fields_and_other_methods.py ├── generate_prompts_utbench.py ├── post-processing │ └── unresolved-symbol.py ├── rq1.py ├── rq1_evosuite.py ├── rq1_gpt4.py ├── rq1_grammar.py ├── rq1_starter.py └── ssdsd.py ├── rq3 ├── __pycache__ │ └── assistant_methods.cpython-39.pyc ├── analyze │ ├── compile_and_pass_rates.py │ ├── compile_error_summary.py │ ├── coverage_rates.py │ └── execution_error_summary.py ├── assistant_methods.py ├── generate_prompts.py ├── rq3.py ├── rq3_starter.py └── test_shell_in_prompt_preprocessing.py ├── running_examples ├── CoT_example.md ├── Code_Language_Description_example.md ├── Improper_Assertion_example.md ├── Insufficient_Test_Coverage_example.md ├── Missing_Specific_Inputs_example.md ├── Natural_Language_Description_example.md ├── RAG_example.md └── README.md └── utils ├── .DS_Store ├── __pycache__ ├── cal_rate.cpython-312.pyc ├── cal_rate.cpython-39.pyc ├── d4j_utils.cpython-39.pyc ├── dependency_analyzer.cpython-312.pyc ├── dependency_analyzer.cpython-39.pyc ├── exceptions.cpython-39.pyc ├── java_parser.cpython-312.pyc ├── java_parser.cpython-39.pyc ├── output_analyzer.cpython-312.pyc ├── output_analyzer.cpython-39.pyc └── shell_extractor.cpython-39.pyc ├── cal_rate.py ├── d4j_utils.py ├── dependency_analyzer.py ├── exceptions.py ├── jacoco ├── coverage │ ├── index.html │ ├── jacoco-maven-plugin │ │ ├── index.html │ │ └── org.jacoco.maven │ │ │ ├── AbstractAgentMojo.html │ │ │ ├── AbstractAgentMojo.java.html │ │ │ ├── AbstractJacocoMojo.html │ │ │ ├── AbstractJacocoMojo.java.html │ │ │ ├── AbstractReportMojo.html │ │ │ ├── AbstractReportMojo.java.html │ │ │ ├── AgentITMojo.html │ │ │ ├── AgentITMojo.java.html │ │ │ ├── AgentMojo.html │ │ │ ├── AgentMojo.java.html │ │ │ ├── CheckMojo.html │ │ │ ├── CheckMojo.java.html │ │ │ ├── DumpMojo$1.html │ │ │ ├── DumpMojo.html │ │ │ ├── DumpMojo.java.html │ │ │ ├── FileFilter.html │ │ │ ├── FileFilter.java.html │ │ │ ├── InstrumentMojo.html │ │ │ ├── InstrumentMojo.java.html │ │ │ ├── MergeMojo.html │ │ │ ├── MergeMojo.java.html │ │ │ ├── ReportAggregateMojo.html │ │ │ ├── ReportAggregateMojo.java.html │ │ │ ├── ReportFormat$1.html │ │ │ ├── ReportFormat$2.html │ │ │ ├── ReportFormat$3.html │ │ │ ├── ReportFormat.html │ │ │ ├── ReportFormat.java.html │ │ │ ├── ReportITMojo.html │ │ │ ├── ReportITMojo.java.html │ │ │ ├── ReportMojo.html │ │ │ ├── ReportMojo.java.html │ │ │ ├── ReportSupport$NoSourceLocator.html │ │ │ ├── ReportSupport$SourceFileCollection.html │ │ │ ├── ReportSupport.html │ │ │ ├── ReportSupport.java.html │ │ │ ├── RestoreMojo.html │ │ │ ├── RestoreMojo.java.html │ │ │ ├── RuleConfiguration.html │ │ │ ├── RuleConfiguration.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ ├── jacoco-resources │ │ ├── branchfc.gif │ │ ├── branchnc.gif │ │ ├── branchpc.gif │ │ ├── bundle.gif │ │ ├── class.gif │ │ ├── down.gif │ │ ├── greenbar.gif │ │ ├── group.gif │ │ ├── method.gif │ │ ├── package.gif │ │ ├── prettify.css │ │ ├── prettify.js │ │ ├── redbar.gif │ │ ├── report.css │ │ ├── report.gif │ │ ├── session.gif │ │ ├── sort.gif │ │ ├── sort.js │ │ ├── source.gif │ │ └── up.gif │ ├── jacoco-sessions.html │ ├── jacoco.csv │ ├── jacoco.xml │ ├── org.jacoco.agent.rt │ │ ├── com.vladium.emma.rt │ │ │ ├── RT.html │ │ │ ├── RT.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── index.html │ │ ├── org.jacoco.agent.rt.internal.output │ │ │ ├── FileOutput.html │ │ │ ├── FileOutput.java.html │ │ │ ├── NoneOutput.html │ │ │ ├── NoneOutput.java.html │ │ │ ├── TcpClientOutput$1.html │ │ │ ├── TcpClientOutput.html │ │ │ ├── TcpClientOutput.java.html │ │ │ ├── TcpConnection.html │ │ │ ├── TcpConnection.java.html │ │ │ ├── TcpServerOutput$1.html │ │ │ ├── TcpServerOutput.html │ │ │ ├── TcpServerOutput.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.agent.rt.internal │ │ │ ├── Agent$1.html │ │ │ ├── Agent$2.html │ │ │ ├── Agent.html │ │ │ ├── Agent.java.html │ │ │ ├── AgentModule$1.html │ │ │ ├── AgentModule.html │ │ │ ├── AgentModule.java.html │ │ │ ├── ClassFileDumper.html │ │ │ ├── ClassFileDumper.java.html │ │ │ ├── ConfigLoader.html │ │ │ ├── ConfigLoader.java.html │ │ │ ├── CoverageTransformer.html │ │ │ ├── CoverageTransformer.java.html │ │ │ ├── IExceptionLogger$1.html │ │ │ ├── IExceptionLogger.html │ │ │ ├── IExceptionLogger.java.html │ │ │ ├── JmxRegistration.html │ │ │ ├── JmxRegistration.java.html │ │ │ ├── Offline.html │ │ │ ├── Offline.java.html │ │ │ ├── PreMain.html │ │ │ ├── PreMain.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ └── org.jacoco.agent.rt │ │ │ ├── RT.html │ │ │ ├── RT.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ ├── org.jacoco.agent │ │ ├── index.html │ │ └── org.jacoco.agent │ │ │ ├── AgentJar.html │ │ │ ├── AgentJar.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ ├── org.jacoco.ant │ │ ├── index.html │ │ └── org.jacoco.ant │ │ │ ├── AbstractCoverageTask.html │ │ │ ├── AbstractCoverageTask.java.html │ │ │ ├── AgentTask.html │ │ │ ├── AgentTask.java.html │ │ │ ├── AntFilesLocator.html │ │ │ ├── AntFilesLocator.java.html │ │ │ ├── AntResourcesLocator.html │ │ │ ├── AntResourcesLocator.java.html │ │ │ ├── CoverageTask$JavaLikeTaskEnhancer.html │ │ │ ├── CoverageTask$TestNGTaskEnhancer.html │ │ │ ├── CoverageTask.html │ │ │ ├── CoverageTask.java.html │ │ │ ├── DumpTask$1.html │ │ │ ├── DumpTask.html │ │ │ ├── DumpTask.java.html │ │ │ ├── InstrumentTask.html │ │ │ ├── InstrumentTask.java.html │ │ │ ├── MergeTask.html │ │ │ ├── MergeTask.java.html │ │ │ ├── ReportTask$CSVFormatterElement.html │ │ │ ├── ReportTask$CheckFormatterElement.html │ │ │ ├── ReportTask$FormatterElement.html │ │ │ ├── ReportTask$GroupElement.html │ │ │ ├── ReportTask$HTMLFormatterElement.html │ │ │ ├── ReportTask$SourceFilesElement.html │ │ │ ├── ReportTask$XMLFormatterElement.html │ │ │ ├── ReportTask.html │ │ │ ├── ReportTask.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ ├── org.jacoco.cli │ │ ├── index.html │ │ ├── org.jacoco.cli.internal.commands │ │ │ ├── AllCommands.html │ │ │ ├── AllCommands.java.html │ │ │ ├── ClassInfo$Printer.html │ │ │ ├── ClassInfo.html │ │ │ ├── ClassInfo.java.html │ │ │ ├── Dump$1.html │ │ │ ├── Dump.html │ │ │ ├── Dump.java.html │ │ │ ├── ExecInfo$1.html │ │ │ ├── ExecInfo$2.html │ │ │ ├── ExecInfo.html │ │ │ ├── ExecInfo.java.html │ │ │ ├── Instrument.html │ │ │ ├── Instrument.java.html │ │ │ ├── Merge.html │ │ │ ├── Merge.java.html │ │ │ ├── Report.html │ │ │ ├── Report.java.html │ │ │ ├── Version.html │ │ │ ├── Version.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ └── org.jacoco.cli.internal │ │ │ ├── Command.html │ │ │ ├── Command.java.html │ │ │ ├── CommandHandler$1.html │ │ │ ├── CommandHandler$2.html │ │ │ ├── CommandHandler.html │ │ │ ├── CommandHandler.java.html │ │ │ ├── CommandParser.html │ │ │ ├── CommandParser.java.html │ │ │ ├── Main$1.html │ │ │ ├── Main.html │ │ │ ├── Main.java.html │ │ │ ├── XmlDocumentation.html │ │ │ ├── XmlDocumentation.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ ├── org.jacoco.core │ │ ├── index.html │ │ ├── org.jacoco.core.analysis │ │ │ ├── Analyzer$1.html │ │ │ ├── Analyzer.html │ │ │ ├── Analyzer.java.html │ │ │ ├── CounterComparator.html │ │ │ ├── CounterComparator.java.html │ │ │ ├── CoverageBuilder.html │ │ │ ├── CoverageBuilder.java.html │ │ │ ├── CoverageNodeImpl$1.html │ │ │ ├── CoverageNodeImpl.html │ │ │ ├── CoverageNodeImpl.java.html │ │ │ ├── ICounter$CounterValue.html │ │ │ ├── ICounter.java.html │ │ │ ├── ICoverageNode$CounterEntity.html │ │ │ ├── ICoverageNode$ElementType.html │ │ │ ├── ICoverageNode.java.html │ │ │ ├── NodeComparator$1.html │ │ │ ├── NodeComparator.html │ │ │ ├── NodeComparator.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.data │ │ │ ├── ExecutionData.html │ │ │ ├── ExecutionData.java.html │ │ │ ├── ExecutionDataReader.html │ │ │ ├── ExecutionDataReader.java.html │ │ │ ├── ExecutionDataStore.html │ │ │ ├── ExecutionDataStore.java.html │ │ │ ├── ExecutionDataWriter.html │ │ │ ├── ExecutionDataWriter.java.html │ │ │ ├── IncompatibleExecDataVersionException.html │ │ │ ├── IncompatibleExecDataVersionException.java.html │ │ │ ├── SessionInfo.html │ │ │ ├── SessionInfo.java.html │ │ │ ├── SessionInfoStore.html │ │ │ ├── SessionInfoStore.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.instr │ │ │ ├── Instrumenter$1.html │ │ │ ├── Instrumenter.html │ │ │ ├── Instrumenter.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.internal.analysis.filter │ │ │ ├── AbstractMatcher.html │ │ │ ├── AbstractMatcher.java.html │ │ │ ├── AnnotationGeneratedFilter.html │ │ │ ├── AnnotationGeneratedFilter.java.html │ │ │ ├── AssertFilter$Matcher.html │ │ │ ├── AssertFilter.html │ │ │ ├── AssertFilter.java.html │ │ │ ├── BridgeFilter.html │ │ │ ├── BridgeFilter.java.html │ │ │ ├── EnumEmptyConstructorFilter$Matcher.html │ │ │ ├── EnumEmptyConstructorFilter.html │ │ │ ├── EnumEmptyConstructorFilter.java.html │ │ │ ├── EnumFilter.html │ │ │ ├── EnumFilter.java.html │ │ │ ├── ExhaustiveSwitchFilter$Matcher.html │ │ │ ├── ExhaustiveSwitchFilter.html │ │ │ ├── ExhaustiveSwitchFilter.java.html │ │ │ ├── Filters.html │ │ │ ├── Filters.java.html │ │ │ ├── FinallyFilter.html │ │ │ ├── FinallyFilter.java.html │ │ │ ├── KotlinCoroutineFilter$Matcher.html │ │ │ ├── KotlinCoroutineFilter.html │ │ │ ├── KotlinCoroutineFilter.java.html │ │ │ ├── KotlinDefaultArgumentsFilter$Matcher.html │ │ │ ├── KotlinDefaultArgumentsFilter.html │ │ │ ├── KotlinDefaultArgumentsFilter.java.html │ │ │ ├── KotlinDefaultMethodsFilter$Matcher.html │ │ │ ├── KotlinDefaultMethodsFilter.html │ │ │ ├── KotlinDefaultMethodsFilter.java.html │ │ │ ├── KotlinGeneratedFilter.html │ │ │ ├── KotlinGeneratedFilter.java.html │ │ │ ├── KotlinInlineFilter.html │ │ │ ├── KotlinInlineFilter.java.html │ │ │ ├── KotlinLateinitFilter$Matcher.html │ │ │ ├── KotlinLateinitFilter.html │ │ │ ├── KotlinLateinitFilter.java.html │ │ │ ├── KotlinNotNullOperatorFilter$Matcher.html │ │ │ ├── KotlinNotNullOperatorFilter.html │ │ │ ├── KotlinNotNullOperatorFilter.java.html │ │ │ ├── KotlinUnsafeCastOperatorFilter$Matcher.html │ │ │ ├── KotlinUnsafeCastOperatorFilter.html │ │ │ ├── KotlinUnsafeCastOperatorFilter.java.html │ │ │ ├── KotlinWhenFilter$Matcher.html │ │ │ ├── KotlinWhenFilter.html │ │ │ ├── KotlinWhenFilter.java.html │ │ │ ├── KotlinWhenStringFilter$Matcher.html │ │ │ ├── KotlinWhenStringFilter.html │ │ │ ├── KotlinWhenStringFilter.java.html │ │ │ ├── PrivateEmptyNoArgConstructorFilter$Matcher.html │ │ │ ├── PrivateEmptyNoArgConstructorFilter.html │ │ │ ├── PrivateEmptyNoArgConstructorFilter.java.html │ │ │ ├── RecordPatternFilter$Matcher.html │ │ │ ├── RecordPatternFilter.html │ │ │ ├── RecordPatternFilter.java.html │ │ │ ├── RecordsFilter$Matcher.html │ │ │ ├── RecordsFilter.html │ │ │ ├── RecordsFilter.java.html │ │ │ ├── StringSwitchFilter$Matcher.html │ │ │ ├── StringSwitchFilter.html │ │ │ ├── StringSwitchFilter.java.html │ │ │ ├── StringSwitchJavacFilter$Matcher.html │ │ │ ├── StringSwitchJavacFilter.html │ │ │ ├── StringSwitchJavacFilter.java.html │ │ │ ├── SynchronizedFilter$Matcher.html │ │ │ ├── SynchronizedFilter.html │ │ │ ├── SynchronizedFilter.java.html │ │ │ ├── SyntheticFilter.html │ │ │ ├── SyntheticFilter.java.html │ │ │ ├── TryWithResourcesEcjFilter$Matcher.html │ │ │ ├── TryWithResourcesEcjFilter.html │ │ │ ├── TryWithResourcesEcjFilter.java.html │ │ │ ├── TryWithResourcesJavac11Filter$Matcher.html │ │ │ ├── TryWithResourcesJavac11Filter.html │ │ │ ├── TryWithResourcesJavac11Filter.java.html │ │ │ ├── TryWithResourcesJavacFilter$1.html │ │ │ ├── TryWithResourcesJavacFilter$Matcher$JavacPattern.html │ │ │ ├── TryWithResourcesJavacFilter$Matcher.html │ │ │ ├── TryWithResourcesJavacFilter.html │ │ │ ├── TryWithResourcesJavacFilter.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.internal.analysis │ │ │ ├── BundleCoverageImpl.html │ │ │ ├── BundleCoverageImpl.java.html │ │ │ ├── ClassAnalyzer$1.html │ │ │ ├── ClassAnalyzer.html │ │ │ ├── ClassAnalyzer.java.html │ │ │ ├── ClassCoverageImpl.html │ │ │ ├── ClassCoverageImpl.java.html │ │ │ ├── CounterImpl$1.html │ │ │ ├── CounterImpl$Fix.html │ │ │ ├── CounterImpl$Var.html │ │ │ ├── CounterImpl.html │ │ │ ├── CounterImpl.java.html │ │ │ ├── Instruction.html │ │ │ ├── Instruction.java.html │ │ │ ├── InstructionsBuilder$Jump.html │ │ │ ├── InstructionsBuilder.html │ │ │ ├── InstructionsBuilder.java.html │ │ │ ├── LineImpl$Fix.html │ │ │ ├── LineImpl$Var.html │ │ │ ├── LineImpl.html │ │ │ ├── LineImpl.java.html │ │ │ ├── MethodAnalyzer.html │ │ │ ├── MethodAnalyzer.java.html │ │ │ ├── MethodCoverageCalculator.html │ │ │ ├── MethodCoverageCalculator.java.html │ │ │ ├── MethodCoverageImpl.html │ │ │ ├── MethodCoverageImpl.java.html │ │ │ ├── PackageCoverageImpl.html │ │ │ ├── PackageCoverageImpl.java.html │ │ │ ├── SourceFileCoverageImpl.html │ │ │ ├── SourceFileCoverageImpl.java.html │ │ │ ├── SourceNodeImpl.html │ │ │ ├── SourceNodeImpl.java.html │ │ │ ├── StringPool.html │ │ │ ├── StringPool.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.internal.data │ │ │ ├── CRC64.html │ │ │ ├── CRC64.java.html │ │ │ ├── CompactDataInput.html │ │ │ ├── CompactDataInput.java.html │ │ │ ├── CompactDataOutput.html │ │ │ ├── CompactDataOutput.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.internal.flow │ │ │ ├── ClassProbesAdapter$1.html │ │ │ ├── ClassProbesAdapter$2.html │ │ │ ├── ClassProbesAdapter.html │ │ │ ├── ClassProbesAdapter.java.html │ │ │ ├── ClassProbesVisitor.html │ │ │ ├── ClassProbesVisitor.java.html │ │ │ ├── FrameSnapshot.html │ │ │ ├── FrameSnapshot.java.html │ │ │ ├── LabelFlowAnalyzer.html │ │ │ ├── LabelFlowAnalyzer.java.html │ │ │ ├── LabelInfo.html │ │ │ ├── LabelInfo.java.html │ │ │ ├── MethodProbesAdapter.html │ │ │ ├── MethodProbesAdapter.java.html │ │ │ ├── MethodProbesVisitor.html │ │ │ ├── MethodProbesVisitor.java.html │ │ │ ├── MethodSanitizer.html │ │ │ ├── MethodSanitizer.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.internal.instr │ │ │ ├── ClassFieldProbeArrayStrategy.html │ │ │ ├── ClassFieldProbeArrayStrategy.java.html │ │ │ ├── ClassInstrumenter.html │ │ │ ├── ClassInstrumenter.java.html │ │ │ ├── CondyProbeArrayStrategy.html │ │ │ ├── CondyProbeArrayStrategy.java.html │ │ │ ├── DuplicateFrameEliminator.html │ │ │ ├── DuplicateFrameEliminator.java.html │ │ │ ├── InstrSupport.html │ │ │ ├── InstrSupport.java.html │ │ │ ├── InterfaceFieldProbeArrayStrategy.html │ │ │ ├── InterfaceFieldProbeArrayStrategy.java.html │ │ │ ├── LocalProbeArrayStrategy.html │ │ │ ├── LocalProbeArrayStrategy.java.html │ │ │ ├── MethodInstrumenter.html │ │ │ ├── MethodInstrumenter.java.html │ │ │ ├── NoneProbeArrayStrategy.html │ │ │ ├── NoneProbeArrayStrategy.java.html │ │ │ ├── ProbeArrayStrategyFactory.html │ │ │ ├── ProbeArrayStrategyFactory.java.html │ │ │ ├── ProbeCounter.html │ │ │ ├── ProbeCounter.java.html │ │ │ ├── ProbeInserter.html │ │ │ ├── ProbeInserter.java.html │ │ │ ├── SignatureRemover.html │ │ │ ├── SignatureRemover.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.internal │ │ │ ├── ContentTypeDetector.html │ │ │ ├── ContentTypeDetector.java.html │ │ │ ├── InputStreams.html │ │ │ ├── InputStreams.java.html │ │ │ ├── Pack200Streams$NoCloseInput.html │ │ │ ├── Pack200Streams.html │ │ │ ├── Pack200Streams.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.runtime │ │ │ ├── AbstractRuntime.html │ │ │ ├── AbstractRuntime.java.html │ │ │ ├── AgentOptions$OutputMode.html │ │ │ ├── AgentOptions.html │ │ │ ├── AgentOptions.java.html │ │ │ ├── CommandLineSupport.html │ │ │ ├── CommandLineSupport.java.html │ │ │ ├── InjectedClassRuntime$Lookup.html │ │ │ ├── InjectedClassRuntime.html │ │ │ ├── InjectedClassRuntime.java.html │ │ │ ├── LoggerRuntime$RuntimeHandler.html │ │ │ ├── LoggerRuntime.html │ │ │ ├── LoggerRuntime.java.html │ │ │ ├── ModifiedSystemClassRuntime$1.html │ │ │ ├── ModifiedSystemClassRuntime$2.html │ │ │ ├── ModifiedSystemClassRuntime.html │ │ │ ├── ModifiedSystemClassRuntime.java.html │ │ │ ├── OfflineInstrumentationAccessGenerator.html │ │ │ ├── OfflineInstrumentationAccessGenerator.java.html │ │ │ ├── RemoteControlReader.html │ │ │ ├── RemoteControlReader.java.html │ │ │ ├── RemoteControlWriter.html │ │ │ ├── RemoteControlWriter.java.html │ │ │ ├── RuntimeData.html │ │ │ ├── RuntimeData.java.html │ │ │ ├── SystemPropertiesRuntime.html │ │ │ ├── SystemPropertiesRuntime.java.html │ │ │ ├── WildcardMatcher.html │ │ │ ├── WildcardMatcher.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.core.tools │ │ │ ├── ExecDumpClient.html │ │ │ ├── ExecDumpClient.java.html │ │ │ ├── ExecFileLoader.html │ │ │ ├── ExecFileLoader.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ └── org.jacoco.core │ │ │ ├── JaCoCo.html │ │ │ ├── JaCoCo.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ ├── org.jacoco.examples │ │ ├── index.html │ │ └── org.jacoco.examples │ │ │ ├── ClassInfo.html │ │ │ ├── ClassInfo.java.html │ │ │ ├── CoreTutorial$MemoryClassLoader.html │ │ │ ├── CoreTutorial$TestTarget.html │ │ │ ├── CoreTutorial.html │ │ │ ├── CoreTutorial.java.html │ │ │ ├── ExecDump$1.html │ │ │ ├── ExecDump$2.html │ │ │ ├── ExecDump.html │ │ │ ├── ExecDump.java.html │ │ │ ├── ExecutionDataClient.html │ │ │ ├── ExecutionDataClient.java.html │ │ │ ├── ExecutionDataServer$Handler.html │ │ │ ├── ExecutionDataServer.html │ │ │ ├── ExecutionDataServer.java.html │ │ │ ├── MBeanClient.html │ │ │ ├── MBeanClient.java.html │ │ │ ├── ReportGenerator.html │ │ │ ├── ReportGenerator.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ ├── org.jacoco.report │ │ ├── index.html │ │ ├── org.jacoco.report.check │ │ │ ├── BundleChecker$1.html │ │ │ ├── BundleChecker.html │ │ │ ├── BundleChecker.java.html │ │ │ ├── Limit.html │ │ │ ├── Limit.java.html │ │ │ ├── Rule.html │ │ │ ├── Rule.java.html │ │ │ ├── RulesChecker$1.html │ │ │ ├── RulesChecker.html │ │ │ ├── RulesChecker.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.csv │ │ │ ├── CSVFormatter$1Visitor.html │ │ │ ├── CSVFormatter.html │ │ │ ├── CSVFormatter.java.html │ │ │ ├── CSVGroupHandler.html │ │ │ ├── CSVGroupHandler.java.html │ │ │ ├── ClassRowWriter.html │ │ │ ├── ClassRowWriter.java.html │ │ │ ├── DelimitedWriter.html │ │ │ ├── DelimitedWriter.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.html │ │ │ ├── HTMLFormatter$1.html │ │ │ ├── HTMLFormatter.html │ │ │ ├── HTMLFormatter.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.internal.html.index │ │ │ ├── ElementIndex.html │ │ │ ├── ElementIndex.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.internal.html.page │ │ │ ├── BundlePage.html │ │ │ ├── BundlePage.java.html │ │ │ ├── ClassPage.html │ │ │ ├── ClassPage.java.html │ │ │ ├── GroupPage.html │ │ │ ├── GroupPage.java.html │ │ │ ├── MethodItem.html │ │ │ ├── MethodItem.java.html │ │ │ ├── NodePage.html │ │ │ ├── NodePage.java.html │ │ │ ├── PackagePage.html │ │ │ ├── PackagePage.java.html │ │ │ ├── PackageSourcePage.html │ │ │ ├── PackageSourcePage.java.html │ │ │ ├── ReportPage.html │ │ │ ├── ReportPage.java.html │ │ │ ├── SessionsPage$1.html │ │ │ ├── SessionsPage.html │ │ │ ├── SessionsPage.java.html │ │ │ ├── SourceFileItem.html │ │ │ ├── SourceFileItem.java.html │ │ │ ├── SourceFilePage.html │ │ │ ├── SourceFilePage.java.html │ │ │ ├── SourceHighlighter.html │ │ │ ├── SourceHighlighter.java.html │ │ │ ├── TablePage.html │ │ │ ├── TablePage.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.internal.html.resources │ │ │ ├── Resources$1.html │ │ │ ├── Resources.html │ │ │ ├── Resources.java.html │ │ │ ├── Styles.html │ │ │ ├── Styles.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.internal.html.table │ │ │ ├── BarColumn.html │ │ │ ├── BarColumn.java.html │ │ │ ├── CounterColumn$1.html │ │ │ ├── CounterColumn$2.html │ │ │ ├── CounterColumn$3.html │ │ │ ├── CounterColumn.html │ │ │ ├── CounterColumn.java.html │ │ │ ├── LabelColumn$1.html │ │ │ ├── LabelColumn.html │ │ │ ├── LabelColumn.java.html │ │ │ ├── PercentageColumn.html │ │ │ ├── PercentageColumn.java.html │ │ │ ├── SortIndex$Entry.html │ │ │ ├── SortIndex.html │ │ │ ├── SortIndex.java.html │ │ │ ├── Table$Column.html │ │ │ ├── Table.html │ │ │ ├── Table.java.html │ │ │ ├── TableItemComparator.html │ │ │ ├── TableItemComparator.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.internal.html │ │ │ ├── HTMLElement.html │ │ │ ├── HTMLElement.java.html │ │ │ ├── HTMLGroupVisitor.html │ │ │ ├── HTMLGroupVisitor.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.internal.xml │ │ │ ├── ReportElement.html │ │ │ ├── ReportElement.java.html │ │ │ ├── XMLCoverageWriter.html │ │ │ ├── XMLCoverageWriter.java.html │ │ │ ├── XMLElement.html │ │ │ ├── XMLElement.java.html │ │ │ ├── XMLGroupVisitor.html │ │ │ ├── XMLGroupVisitor.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.internal │ │ │ ├── AbstractGroupVisitor.html │ │ │ ├── AbstractGroupVisitor.java.html │ │ │ ├── NormalizedFileNames.html │ │ │ ├── NormalizedFileNames.java.html │ │ │ ├── ReportOutputFolder.html │ │ │ ├── ReportOutputFolder.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ ├── org.jacoco.report.xml │ │ │ ├── XMLFormatter$1RootVisitor.html │ │ │ ├── XMLFormatter.html │ │ │ ├── XMLFormatter.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ │ └── org.jacoco.report │ │ │ ├── DirectorySourceFileLocator.html │ │ │ ├── DirectorySourceFileLocator.java.html │ │ │ ├── FileMultiReportOutput.html │ │ │ ├── FileMultiReportOutput.java.html │ │ │ ├── InputStreamSourceFileLocator.html │ │ │ ├── InputStreamSourceFileLocator.java.html │ │ │ ├── JavaNames.html │ │ │ ├── JavaNames.java.html │ │ │ ├── MultiGroupVisitor.html │ │ │ ├── MultiReportVisitor.html │ │ │ ├── MultiReportVisitor.java.html │ │ │ ├── MultiSourceFileLocator.html │ │ │ ├── MultiSourceFileLocator.java.html │ │ │ ├── ZipMultiReportOutput$EntryOutput.html │ │ │ ├── ZipMultiReportOutput.html │ │ │ ├── ZipMultiReportOutput.java.html │ │ │ ├── index.html │ │ │ └── index.source.html │ └── report.dtd └── lib │ ├── jacocoagent.jar │ ├── jacocoant.jar │ ├── jacococli.jar │ ├── org.jacoco.agent-0.8.11.202310140853.jar │ ├── org.jacoco.ant-0.8.11.202310140853.jar │ ├── org.jacoco.core-0.8.11.202310140853.jar │ └── org.jacoco.report-0.8.11.202310140853.jar ├── java_parser.py ├── output_analyzer.py ├── prompt_formats ├── __pycache__ │ ├── extend_postfix.cpython-312.pyc │ ├── extend_postfix.cpython-39.pyc │ ├── prompt_formatter.cpython-312.pyc │ └── prompt_formatter.cpython-39.pyc ├── extend_postfix.py └── prompt_formatter.py └── shell_extractor.py /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/code-bot.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /baselines/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/baselines/.DS_Store -------------------------------------------------------------------------------- /baselines/__pycache__/parse_evosuite_xml.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/baselines/__pycache__/parse_evosuite_xml.cpython-39.pyc -------------------------------------------------------------------------------- /baselines/bugs.csv: -------------------------------------------------------------------------------- 1 | Cli:1,2,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40 2 | Codec:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 3 | Collections:25,26,27,28 4 | Compress:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47 5 | Csv:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 6 | Gson:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 7 | JacksonCore:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 8 | JacksonDatabind:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112 9 | JacksonXml:1,2,3,4,5,6 10 | Jsoup:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93 11 | JxPath:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 12 | Mockito:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38 13 | Closure:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176 14 | Lang:1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65 15 | Math:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106 16 | Time:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27 17 | Chart:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 18 | -------------------------------------------------------------------------------- /baselines/generate_ut_for_bugs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/baselines/generate_ut_for_bugs.py -------------------------------------------------------------------------------- /baselines/palrun_evosuite_bug_detection.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.extend(['.', '..']) 3 | 4 | import subprocess 5 | import time 6 | from data import configuration 7 | import os 8 | 9 | # projects = configuration.projects 10 | code_base = configuration.code_base 11 | active_bugs = {} 12 | with open(os.path.join(code_base,'baselines/bugs.csv'),'r') as reader: 13 | for line in reader.readlines(): 14 | proj, bugs_str = line.strip().split(':') 15 | bugs = bugs_str.strip().split(',') 16 | active_bugs[proj] = bugs 17 | 18 | lst = [] 19 | for project, bugs in active_bugs.items(): 20 | p = subprocess.Popen([f"/bin/bash run_evosuite_bug_detection.sh {project}"], shell=True) 21 | time.sleep(1) 22 | lst.append(p) 23 | for x in lst: 24 | x.wait() 25 | -------------------------------------------------------------------------------- /baselines/palrun_evosuite_coverage.py: -------------------------------------------------------------------------------- 1 | #gen_tests.pl -g generator -p project_id -v version_id -n test_id -o out_dir -b total_budget 2 | 3 | import sys 4 | sys.path.extend(['.', '..']) 5 | import subprocess 6 | import time 7 | from data import configuration 8 | import os 9 | 10 | # projects = configuration.projects 11 | code_base = configuration.code_base 12 | active_bugs = {} 13 | with open(os.path.join(code_base,'baselines/bugs.csv'),'r') as reader: 14 | for line in reader.readlines(): 15 | proj, bugs_str = line.strip().split(':') 16 | bugs = bugs_str.strip().split(',') 17 | active_bugs[proj] = bugs 18 | 19 | lst = [] 20 | for project, bugs in active_bugs.items(): 21 | p = subprocess.Popen([f"/bin/bash run_evosuite_coverage.sh {project}"], shell=True) 22 | time.sleep(1) 23 | lst.append(p) 24 | for x in lst: 25 | x.wait() 26 | -------------------------------------------------------------------------------- /baselines/palrun_evosuite_generate.py: -------------------------------------------------------------------------------- 1 | #gen_tests.pl -g generator -p project_id -v version_id -n test_id -o out_dir -b total_budget 2 | 3 | import sys 4 | sys.path.extend(['.', '..']) 5 | import subprocess 6 | import time 7 | from data import configuration 8 | import os 9 | 10 | # projects = configuration.projects 11 | code_base = configuration.code_base 12 | active_bugs = {} 13 | with open(os.path.join(code_base,'baselines/bugs.csv'),'r') as reader: 14 | for line in reader.readlines(): 15 | proj, bugs_str = line.strip().split(':') 16 | bugs = bugs_str.strip().split(',') 17 | active_bugs[proj] = bugs 18 | 19 | report_dir = f"{code_base}/baselines/evosuite/generated_tests" 20 | if os.path.exists(report_dir): 21 | os.system(f"rm -rf {report_dir}") 22 | 23 | lst = [] 24 | for project, bugs in active_bugs.items(): 25 | bug_str = ' '.join(bugs) 26 | p = subprocess.Popen([f"/bin/bash run_evosuite_gen.sh {project} {bug_str}"], shell=True) 27 | time.sleep(1) 28 | lst.append(p) 29 | for x in lst: 30 | x.wait() 31 | -------------------------------------------------------------------------------- /baselines/run_evosuite_bug_detection.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | project_name="$1" 3 | run_bug_detection.pl -p "$project_name" -d evosuite/generated_tests/"$project_name"/evosuite/1 -o evosuie_coverages 4 | 5 | -------------------------------------------------------------------------------- /baselines/run_evosuite_coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | project_name="$1" 3 | run_coverage.pl -p "$project_name" -d evosuite/generated_tests/"$project_name"/evosuite/1 -o evosuie_coverages 4 | 5 | -------------------------------------------------------------------------------- /baselines/run_evosuite_gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 第一个参数是项目名称 4 | project_name="$1" 5 | 6 | # 使用 shift 命令移除第一个参数,剩下的参数都是数字 7 | shift 8 | 9 | # 使用 "$@" 获取剩余的所有命令行参数(即数字) 10 | for number in "$@"; do 11 | # echo -g evosuite -p "$project_name" -v "$number"f -n 1 -o evosuite/generated_tests -b 120 12 | # 使用项目名称和数字作为 gen_tests.pl 的参数 13 | gen_tests.pl -g evosuite -p "$project_name" -v "$number"f -n 1 -o evosuite/generated_tests -b 120 14 | done 15 | 16 | -------------------------------------------------------------------------------- /data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/data/.DS_Store -------------------------------------------------------------------------------- /data/__pycache__/analyze_configuration.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/data/__pycache__/analyze_configuration.cpython-39.pyc -------------------------------------------------------------------------------- /data/__pycache__/configuration.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/data/__pycache__/configuration.cpython-311.pyc -------------------------------------------------------------------------------- /data/__pycache__/configuration.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/data/__pycache__/configuration.cpython-312.pyc -------------------------------------------------------------------------------- /data/__pycache__/configuration.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/data/__pycache__/configuration.cpython-39.pyc -------------------------------------------------------------------------------- /data/analyze_configuration.py: -------------------------------------------------------------------------------- 1 | import os 2 | from tree_sitter import Language 3 | 4 | d4j_home = "/Users/yanglin/Documents/Projects/data/defects4j" 5 | d4j_proj_base = f"{d4j_home}/d4j_projects" 6 | # output_dir = "data/rq1/results_debug" 7 | output_dir = "data/baseline/d4j_base" 8 | code_base = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) 9 | output_base_dir = os.path.join(code_base, output_dir) 10 | d4j_command = f"{d4j_home}/framework/bin/defects4j" 11 | python_bin = "~/anaconda3/envs/codebot/bin/python" 12 | 13 | Language.build_library( 14 | os.path.join(code_base, "data/build/java.so"), 15 | [os.path.join(code_base, "data/tree-sitter-java")], 16 | ) 17 | JAVA_LANGUAGE = Language( 18 | os.path.join(code_base, "data/build/java.so"), "java" 19 | ) 20 | 21 | RES_FILE="/Users/yanglin/Documents/Projects/code-bot/data/outputs/deepseek-coder-6.7b-instruct_comment_extend_full.jsonl" 22 | TMP_FOLDER="/Users/yanglin/Documents/Projects/code-bot/data/tmp" 23 | GRANULARITY = 'method' 24 | OUTPUT_FILE = '/Users/yanglin/Documents/Projects/example.jsonl' 25 | 26 | 27 | proxy_host = None 28 | proxy_port = None 29 | proxy_username = None 30 | proxy_password = None 31 | 32 | projects = [ 33 | "JxPath", 34 | "Cli", 35 | "Math", 36 | "Csv", 37 | "Compress", 38 | "JacksonDatabind", 39 | "Time", 40 | "Collections", 41 | "JacksonXml", 42 | "Mockito", 43 | "JacksonCore", 44 | "Lang", 45 | "Jsoup", 46 | "Chart", 47 | "Gson", 48 | "Closure", 49 | "Codec", 50 | ] 51 | 52 | target_models = [ 53 | # "WizardCoder-Python-34B-V1.0", 54 | # "CodeLlama-7b-hf", 55 | # "CodeLlama-7b-Instruct-hf", 56 | # "CodeLlama-13b-hf", 57 | # "CodeLlama-13b-Instruct-hf", 58 | # "CodeLlama-34b-hf", 59 | # "CodeLlama-34b-Instruct", 60 | # "deepseek-coder-6.7b-instruct", 61 | # "deepseek-coder-33b-instruct", 62 | # "Phind-CodeLlama-34B-v2", 63 | # "starchat-beta", 64 | # "WizardCoder-15B-V1.0", 65 | # "gpt4", 66 | "ori" 67 | ] 68 | 69 | formats = [ 70 | "comment", 71 | # 'natural' 72 | ] 73 | 74 | strategies = [ 75 | # 'generation', 76 | "extend" 77 | ] 78 | 79 | ablations = [ 80 | "full", 81 | # 'no_param', 82 | # 'no_param_constructor', 83 | # 'no_class_constructor', 84 | # 'no_class_fields', 85 | # 'no_class_other_methods' 86 | ] 87 | -------------------------------------------------------------------------------- /data/build/java.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/data/build/java.so -------------------------------------------------------------------------------- /data/configuration.py: -------------------------------------------------------------------------------- 1 | import os 2 | from tree_sitter import Language 3 | 4 | d4j_home = "/Users/yanglin/Documents/Projects/data/defects4j" 5 | d4j_proj_base = f"{d4j_home}/d4j_projects" 6 | # output_dir = "data/rq1/results_debug" 7 | output_dir = "data/rq1/results_0128" 8 | code_base = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) 9 | output_base_dir = os.path.join(code_base, output_dir) 10 | d4j_command = f"{d4j_home}/framework/bin/defects4j" 11 | python_bin = "~/anaconda3/envs/codebot/bin/python" 12 | 13 | Language.build_library( 14 | os.path.join(code_base, "data/build/java.so"), 15 | [os.path.join(code_base, "data/tree-sitter-java")], 16 | ) 17 | JAVA_LANGUAGE = Language( 18 | os.path.join(code_base, "data/build/java.so"), "java" 19 | ) 20 | 21 | RES_FILE="/Users/yanglin/Documents/Projects/code-bot/data/outputs/deepseek-coder-6.7b-instruct_comment_extend_full.jsonl" 22 | TMP_FOLDER="/Users/yanglin/Documents/Projects/code-bot/data/tmp" 23 | GRANULARITY = 'method' 24 | OUTPUT_FILE = '/Users/yanglin/Documents/Projects/example.jsonl' 25 | 26 | 27 | proxy_host = None 28 | proxy_port = None 29 | proxy_username = None 30 | proxy_password = None 31 | 32 | projects = [ 33 | "JxPath", 34 | "Cli", 35 | "Math", 36 | "Csv", 37 | "Compress", 38 | "JacksonDatabind", 39 | "Time", 40 | "Collections", 41 | "JacksonXml", 42 | # "Mockito", 43 | "JacksonCore", 44 | "Lang", 45 | "Jsoup", 46 | "Chart", 47 | "Gson", 48 | "Closure", 49 | "Codec", 50 | ] 51 | 52 | target_models = [ 53 | # "WizardCoder-Python-34B-V1.0", 54 | # "CodeLlama-7b-hf", 55 | # "CodeLlama-7b-Instruct-hf", 56 | # "CodeLlama-13b-hf", 57 | # "CodeLlama-13b-Instruct-hf", 58 | # "CodeLlama-34b-hf", 59 | # "CodeLlama-34b-Instruct", 60 | "deepseek-coder-6.7b-instruct", 61 | # "deepseek-coder-33b-instruct", 62 | # "Phind-CodeLlama-34B-v2", 63 | # "starchat-beta", 64 | # "WizardCoder-15B-V1.0", 65 | # "gpt4" 66 | ] 67 | 68 | formats = [ 69 | "comment", 70 | # 'natural' 71 | ] 72 | 73 | strategies = [ 74 | # 'generation', 75 | "extend" 76 | ] 77 | 78 | ablations = [ 79 | "full", 80 | # 'no_param', 81 | # 'no_param_constructor', 82 | # 'no_class_constructor', 83 | # 'no_class_fields', 84 | # 'no_class_other_methods' 85 | ] 86 | -------------------------------------------------------------------------------- /data/configuration_example.py: -------------------------------------------------------------------------------- 1 | import os 2 | from tree_sitter import Language 3 | d4j_home = "/path/to/defects4j" 4 | d4j_proj_base = f"{d4j_home}/d4j_projects" 5 | output_dir = 'data/rq1/results_1220' 6 | code_base = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) 7 | output_base_dir = os.path.join(code_base, output_dir) 8 | python_bin = '/path/to/your/python/enivronment/bin/python' 9 | dej_command = f'{d4j_home}/framework/bin/defects4j' 10 | Language.build_library( 11 | os.path.join(code_base, "data/build/java.so"), 12 | [os.path.join(code_base, "data/tree-sitter-java")], 13 | ) 14 | JAVA_LANGUAGE = Language(os.path.join(code_base,'data/build/java.so'), 'java') 15 | 16 | # proxy_host = "None" 17 | # proxy_port = "None" 18 | # proxy_username = "None" 19 | # proxy_password = "None" 20 | 21 | proxy_host = None 22 | proxy_port = None 23 | proxy_username = None 24 | proxy_password = None 25 | 26 | projects = [ 27 | "JxPath", 28 | "Cli", 29 | "Math", 30 | "Csv", 31 | "Compress", 32 | "JacksonDatabind", 33 | "Time", 34 | "Collections", 35 | "JacksonXml", 36 | "Mockito", 37 | "JacksonCore", 38 | "Lang", 39 | "Jsoup", 40 | "Chart", 41 | "Gson", 42 | "Closure", 43 | "Codec" 44 | ] 45 | 46 | target_models = [ 47 | # "WizardCoder-Python-34B-V1.0", 48 | # "CodeLlama-7b-hf", 49 | "CodeLlama-7b-Instruct-hf", 50 | # "CodeLlama-13b-hf", 51 | "CodeLlama-13b-Instruct-hf", 52 | # "CodeLlama-34b-hf", 53 | # "CodeLlama-34b-Instruct", 54 | "deepseek-coder-6.7b-instruct", 55 | "deepseek-coder-33b-instruct", 56 | "Phind-CodeLlama-34B-v2", 57 | # "starchat-beta", 58 | # "WizardCoder-15B-V1.0", 59 | 60 | ] 61 | 62 | formats = [ 63 | 'comment', 64 | # 'natural' 65 | ] 66 | 67 | strategies = [ 68 | 'generation', 69 | # 'extend' 70 | ] 71 | 72 | ablations = [ 73 | 'full', 74 | 'no_param', 75 | 'no_param_constructor', 76 | 'no_class_constructor', 77 | 'no_class_fields', 78 | 'no_class_other_methods' 79 | ] -------------------------------------------------------------------------------- /data/test_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "cli": "**/*Test.java", 3 | "jacksondatabind": "**/*Test.java", 4 | "codec": "**/*Test.java", 5 | "closure": "**/*Test.java", 6 | "time": "**/Test*.java", 7 | "gson": "**/*Test.java", 8 | "csv": "**/*Test.java", 9 | "compress": "**/*Test.java", 10 | "math": "**/*Test.java", 11 | "lang": "**/*Test.java", 12 | "jacksonxml": "**/*Test.java", 13 | "jsoup": "**/*Test.java", 14 | "chart": "**/*Tests.java", 15 | "collections": "**/*Test.java", 16 | "jacksoncore": "**/*Test.java", 17 | "mockito": "**/*Test.java", 18 | "jxpath": "**/*Test.java" 19 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 百度一下,你就知道

关于百度 About Baidu

©2017 Baidu 使用百度前必读  意见反馈 京ICP证030173号 

3 | -------------------------------------------------------------------------------- /rq1/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/rq1/.DS_Store -------------------------------------------------------------------------------- /rq1/__pycache__/assistant_methods.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/rq1/__pycache__/assistant_methods.cpython-39.pyc -------------------------------------------------------------------------------- /rq1/analyze/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/rq1/analyze/.DS_Store -------------------------------------------------------------------------------- /rq1/analyze/__pycache__/bug_detection_summary.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/rq1/analyze/__pycache__/bug_detection_summary.cpython-39.pyc -------------------------------------------------------------------------------- /rq1/analyze/__pycache__/compile_and_pass_rates.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/rq1/analyze/__pycache__/compile_and_pass_rates.cpython-39.pyc -------------------------------------------------------------------------------- /rq1/analyze/__pycache__/coverage_rates.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/rq1/analyze/__pycache__/coverage_rates.cpython-39.pyc -------------------------------------------------------------------------------- /rq1/generate_prompts_palrun.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | sys.path.extend(['.', '..']) 4 | import subprocess 5 | import time 6 | lst = [] 7 | for idx in range(6): 8 | p = subprocess.Popen(["python3 generate_prompts.py %d" % idx], shell=True) 9 | time.sleep(1) 10 | lst.append(p) 11 | for x in lst: 12 | x.wait() 13 | -------------------------------------------------------------------------------- /rq1/post-processing/unresolved-symbol.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # Extend the system path to include the current and parent directory 4 | sys.path.extend(['.', '..']) 5 | import os 6 | import json 7 | import re 8 | import pickle 9 | from data.configuration import code_base, output_base_dir, target_models, projects 10 | 11 | 12 | def filter_affect_records_by_unresolved_symbol_type(record_file, target_type): 13 | """ 14 | This function filters the records by unresolved symbol type. 15 | 16 | Parameters: 17 | record_file (str): The path to the record file. 18 | target_type (str): The target type of unresolved symbol. 19 | 20 | Returns: 21 | list: A list of records that match the target unresolved symbol type. 22 | """ 23 | ret = [] 24 | with open(record_file, 'r', encoding='utf-8') as reader: 25 | for line in reader.readlines(): 26 | instance = json.loads(line.strip()) 27 | if instance['first_compile_error'] != '': 28 | err_lines = instance['first_compile_error'].split('\n') 29 | total_errors = get_all_compile_errors(instance['first_compile_error']) 30 | matched_unresolved_errors = 0 31 | for index, line in enumerate(err_lines): 32 | res = re.findall(r"symbol:[ ]+(\w+) (\w+)", line) 33 | if res: 34 | for type, identifier in res: 35 | if type == target_type: 36 | matched_unresolved_errors += 1 37 | 38 | if total_errors == matched_unresolved_errors: 39 | ret.append(pickle.loads(pickle.dumps(instance))) 40 | return ret 41 | 42 | 43 | def get_all_compile_errors(err_msg): 44 | """ 45 | This function gets all compile errors from the error message. 46 | 47 | Parameters: 48 | err_msg (str): The error message. 49 | 50 | Returns: 51 | int: The number of compile errors. If no errors are found, the function returns None. 52 | """ 53 | res = re.findall(r'\[javac\] (\d+) errors', err_msg) 54 | if res: 55 | return int(res[0]) 56 | pass 57 | 58 | 59 | if __name__ == '__main__': 60 | # For each model in target models, filter the records by unresolved symbol type 'class' 61 | for model in target_models: 62 | records = [] 63 | for project in projects: 64 | record_file = f"{project}_comment_extend_full.jsonl" 65 | record_file = os.path.join(output_base_dir, f"{model}/{record_file}") 66 | records.extend(filter_affect_records_by_unresolved_symbol_type(record_file, 'variable')) 67 | print() 68 | print(len(records)) 69 | -------------------------------------------------------------------------------- /rq1/rq1_starter.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.extend(['.', '..']) 3 | import subprocess 4 | import time 5 | from data import configuration 6 | import os 7 | 8 | projects = configuration.projects 9 | code_base = configuration.code_base 10 | python_bin = configuration.python_bin 11 | 12 | 13 | report_dir = f"{code_base}/rq1/coverage_reports" 14 | if os.path.exists(report_dir): 15 | os.system(f"rm -rf {report_dir}") 16 | 17 | lst = [] 18 | for project in projects: 19 | p = subprocess.Popen([f"{python_bin} {code_base}/rq1/rq1.py {project}"], shell=True) 20 | time.sleep(1) 21 | lst.append(p) 22 | for x in lst: 23 | x.wait() 24 | -------------------------------------------------------------------------------- /rq1/ssdsd.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | from tqdm import * 4 | for root, _, files in os.walk('../data/rq1/results_0128/deepseek-coder-33b-instruct'): 5 | for file in files: 6 | insts = [] 7 | with open(os.path.join(root, file),'r') as reader: 8 | for line in reader.readlines(): 9 | insts.append(json.loads(line)) 10 | 11 | with open(os.path.join(root, file),'w') as writer: 12 | for inst in tqdm(insts): 13 | inst['prompt_len'] = 0 14 | writer.write(json.dumps(inst)+'\n') 15 | 16 | -------------------------------------------------------------------------------- /rq3/__pycache__/assistant_methods.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/rq3/__pycache__/assistant_methods.cpython-39.pyc -------------------------------------------------------------------------------- /rq3/rq3_starter.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.extend(['.', '..']) 3 | import subprocess 4 | import time 5 | from data import configuration 6 | import os 7 | 8 | projects = configuration.projects 9 | code_base = configuration.code_base 10 | python_bin = configuration.python_bin 11 | 12 | 13 | report_dir = f"{code_base}/rq3/coverage_reports" 14 | if os.path.exists(report_dir): 15 | os.system(f"rm -rf {report_dir}") 16 | 17 | lst = [] 18 | for project in projects: 19 | p = subprocess.Popen([f"{python_bin} {code_base}/rq3/rq3.py {project}"], shell=True) 20 | time.sleep(1) 21 | lst.append(p) 22 | for x in lst: 23 | x.wait() 24 | -------------------------------------------------------------------------------- /rq3/test_shell_in_prompt_preprocessing.py: -------------------------------------------------------------------------------- 1 | import json 2 | import re 3 | input_file = 'data/test_input.jsonl' 4 | instances = [] 5 | with open(input_file,'r',encoding='utf-8') as reader: 6 | for line in reader.readlines(): 7 | instances.append(json.loads(line.strip())) 8 | 9 | prompt_pattern = r'// Given the Following test class:(.*?)```' 10 | completion_pattern = r"Here are some unit tests testing the [\w]+ method in [\w]+ class:[\n](.*?)```" 11 | for instance in instances: 12 | prompt = instance['prompt'] 13 | completion = instance['completion'] 14 | if completion != "": 15 | match = re.search(prompt_pattern, prompt, re.DOTALL) 16 | if match: 17 | print(match.group(1)) 18 | test_shell = match.group(1).strip() 19 | completion_match = re.search(completion_pattern, completion, re.DOTALL) 20 | if completion_match: 21 | new_completion = test_shell + '\n'+completion_match.group(1) 22 | instance['completion'] = new_completion 23 | pass 24 | 25 | with open(input_file,'w',encoding='utf-8') as writer: 26 | for instance in instances: 27 | writer.write(json.dumps(instance)+'\n') 28 | -------------------------------------------------------------------------------- /running_examples/Insufficient_Test_Coverage_example.md: -------------------------------------------------------------------------------- 1 | # Insufficient Test Coverage 2 | 3 | 4 | ## Code diff 5 | 6 | The code diff of bug_id `JacksonDatabind_34` between the buggy and fixed versions: 7 | 8 | ```diff 9 | @Override 10 | public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException 11 | { 12 | if (_isInt) { 13 | visitIntFormat(visitor, typeHint, JsonParser.NumberType.BIG_INTEGER); 14 | 15 | } else { 16 | Class h = handledType(); 17 | if (h == BigDecimal.class) { 18 | - visitFloatFormat(visitor, typeHint, JsonParser.NumberType.BIG_INTEGER); 19 | + visitFloatFormat(visitor, typeHint, JsonParser.NumberType.BIG_DECIMAL); 20 | } else { 21 | // otherwise bit unclear what to call... but let's try: 22 | /*JsonNumberFormatVisitor v2 =*/ visitor.expectNumberFormat(typeHint); 23 | } 24 | } 25 | } 26 | 27 | ``` 28 | 29 | 30 | 31 | 32 | 33 | 34 | ## Unit Test 35 | The test case generated by `CL-7B`(CodeLlama-7B-Instruct): 36 | 37 | ```java 38 | public class LLMGeneratedTests { 39 | 40 | private NumberSerializer numberSerializer; 41 | private JavaType typeHint; 42 | private JsonFormatVisitorWrapper visitor; 43 | 44 | @Test(expected = NullPointerException.class) 45 | public void testAcceptJsonFormatVisitorWithNullTypeHint() throws JsonMappingException { 46 | numberSerializer.acceptJsonFormatVisitor(visitor, null); 47 | } 48 | 49 | @Test 50 | public void testAcceptJsonFormatVisitorForOther() throws JsonMappingException { 51 | numberSerializer = new NumberSerializer(Number.class); 52 | numberSerializer.acceptJsonFormatVisitor(visitor, typeHint); 53 | verify(visitor).expectNumberFormat(typeHint); 54 | } 55 | 56 | @Test(expected = NullPointerException.class) 57 | public void testAcceptJsonFormatVisitorWithNullVisitor() throws JsonMappingException { 58 | numberSerializer.acceptJsonFormatVisitor(null, typeHint); 59 | } 60 | 61 | @Before 62 | public void setUp() { 63 | numberSerializer = new NumberSerializer(Number.class); 64 | visitor = mock(JsonFormatVisitorWrapper.class); 65 | typeHint = mock(JavaType.class); 66 | } 67 | 68 | } 69 | ``` 70 | 71 | 72 | ## Explanation 73 | 74 | The generated unit test does not **cover** the branch under the condition of `h == BigDecimal.class`. 75 | 76 | To detect this bug, the unit test should construct the `NumberSerializer` object using the `BigDecimal.class`, Not the `Number.class`. 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /running_examples/README.md: -------------------------------------------------------------------------------- 1 | # Running Examples of Our Study. 2 | 3 | ## Prompt Design 4 | 5 | Please refer to the following examples to see the prompt designs and corresponding response from LLMs. 6 | ``` 7 | Natural_Language_Description_example.md 8 | 9 | Code_Language_Description_example.md 10 | ``` 11 | 12 | 13 | ## Prompt with In-Context-Learning Techniques. 14 | Please refer to the following examples to see the prompt designs and corresponding response from LLMs. 15 | ``` 16 | CoT_example.md 17 | 18 | RAG_example.md 19 | ``` 20 | 21 | ## Illustration Examples of Reasons of Undetected Defects. 22 | 23 | Please see the following files for examples of each type of failure reasons. 24 | ``` 25 | Insufficient_Test_Coverage_example.md 26 | 27 | Missing_Specific_Inputs_example.md 28 | 29 | Improper_Assertion_example.md 30 | ``` 31 | -------------------------------------------------------------------------------- /utils/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/.DS_Store -------------------------------------------------------------------------------- /utils/__pycache__/cal_rate.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/cal_rate.cpython-312.pyc -------------------------------------------------------------------------------- /utils/__pycache__/cal_rate.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/cal_rate.cpython-39.pyc -------------------------------------------------------------------------------- /utils/__pycache__/d4j_utils.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/d4j_utils.cpython-39.pyc -------------------------------------------------------------------------------- /utils/__pycache__/dependency_analyzer.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/dependency_analyzer.cpython-312.pyc -------------------------------------------------------------------------------- /utils/__pycache__/dependency_analyzer.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/dependency_analyzer.cpython-39.pyc -------------------------------------------------------------------------------- /utils/__pycache__/exceptions.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/exceptions.cpython-39.pyc -------------------------------------------------------------------------------- /utils/__pycache__/java_parser.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/java_parser.cpython-312.pyc -------------------------------------------------------------------------------- /utils/__pycache__/java_parser.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/java_parser.cpython-39.pyc -------------------------------------------------------------------------------- /utils/__pycache__/output_analyzer.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/output_analyzer.cpython-312.pyc -------------------------------------------------------------------------------- /utils/__pycache__/output_analyzer.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/output_analyzer.cpython-39.pyc -------------------------------------------------------------------------------- /utils/__pycache__/shell_extractor.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/__pycache__/shell_extractor.cpython-39.pyc -------------------------------------------------------------------------------- /utils/exceptions.py: -------------------------------------------------------------------------------- 1 | class UncompilableWhileTestException(Exception): 2 | """ 3 | 在执行测试时,没有能够通过编译,这个理应是不会出现的,出现的话就表示有问题,需要检查。 4 | """ 5 | 6 | def __init__(self, msg): 7 | self.msg = msg 8 | 9 | def __str__(self): 10 | return self.msg 11 | 12 | 13 | class TestResultNotFoundException(Exception): 14 | """ 15 | 在执行测试时,没有找到测试结果,这个理应是不会出现的,出现的话就表示有问题,需要检查。 16 | """ 17 | 18 | def __init__(self, msg): 19 | self.msg = msg 20 | 21 | def __str__(self): 22 | return self.msg 23 | 24 | 25 | class JacocoFailedException(Exception): 26 | """ 27 | 在收集覆盖率时,jacoco没有能够成功执行,需要检查 28 | """ 29 | 30 | def __init__(self, msg): 31 | self.msg = msg 32 | 33 | def __str__(self): 34 | return self.msg 35 | 36 | 37 | class FailButTestOKException(Exception): 38 | """ 39 | 在执行测试时,测试失败了,但是测试结果是OK的,这个理应是不会出现的,出现的话就表示有问题,需要检查。 40 | """ 41 | 42 | def __init__(self, msg): 43 | self.msg = msg 44 | 45 | def __str__(self): 46 | return self.msg 47 | 48 | 49 | class PassButFailException(Exception): 50 | """ 51 | 在执行测试时,测试通过了,但是测试结果是Fail的,这个理应是不会出现的,出现的话就表示有问题,需要检查。 52 | """ 53 | 54 | def __init__(self, msg): 55 | self.msg = msg 56 | 57 | def __str__(self): 58 | return self.msg 59 | 60 | class MethodNotFoundInJacocoException(Exception): 61 | """ 62 | 在收集覆盖率时,根据函数名没有找到对应的覆盖率信息 63 | """ 64 | 65 | def __init__(self, msg): 66 | self.msg = msg 67 | 68 | def __str__(self): 69 | return self.msg 70 | 71 | class ParameterNotFoundException(Exception): 72 | """ 73 | 在收集覆盖率时,根据函数名没有找到对应的覆盖率信息 74 | """ 75 | 76 | def __init__(self, msg): 77 | self.msg = msg 78 | 79 | def __str__(self): 80 | return self.msg 81 | 82 | 83 | class EmptyTestClassFailedCompileException(Exception): 84 | """ 85 | 虽然已经指定了空的测试类,但是仍然没能够通过编译 86 | """ 87 | def __init__(self, msg): 88 | self.msg = msg 89 | 90 | def __str__(self): 91 | return self.msg 92 | 93 | def NoneTestClassDefinedException(Exception): 94 | """ 95 | 没有定义测试类 96 | """ 97 | def __init__(self, msg): 98 | self.msg = msg 99 | 100 | def __str__(self): 101 | return self.msg -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-maven-plugin/index.html: -------------------------------------------------------------------------------- 1 | jacoco-maven-plugin

jacoco-maven-plugin

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total175 of 1,90590%27 of 15482%35194494668117023
org.jacoco.maven1751,73090%2712782%35194494668117023
-------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-maven-plugin/org.jacoco.maven/ReportFormat.html: -------------------------------------------------------------------------------- 1 | ReportFormat

ReportFormat

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 21100%0 of 0n/a010401
static {...}21100%n/a010401
-------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/branchfc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/branchfc.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/branchnc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/branchnc.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/branchpc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/branchpc.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/bundle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/bundle.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/class.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/class.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/down.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/greenbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/greenbar.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/group.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/group.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/method.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/method.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/package.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/package.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | .str { color: #2A00FF; } 4 | .kwd { color: #7F0055; font-weight:bold; } 5 | .com { color: #3F5FBF; } 6 | .typ { color: #606; } 7 | .lit { color: #066; } 8 | .pun { color: #660; } 9 | .pln { color: #000; } 10 | .tag { color: #008; } 11 | .atn { color: #606; } 12 | .atv { color: #080; } 13 | .dec { color: #606; } 14 | -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/redbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/redbar.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/report.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/report.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/session.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/session.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/sort.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/sort.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/source.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/source.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/jacoco-resources/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/coverage/jacoco-resources/up.gif -------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/com.vladium.emma.rt/index.html: -------------------------------------------------------------------------------- 1 | com.vladium.emma.rt

com.vladium.emma.rt

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total19 of 190%0 of 0n/a22662211
RT190%n/a22662211
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/com.vladium.emma.rt/index.source.html: -------------------------------------------------------------------------------- 1 | com.vladium.emma.rt

com.vladium.emma.rt

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total19 of 190%0 of 0n/a22662211
RT.java190%n/a22662211
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt.internal.output/NoneOutput.java.html: -------------------------------------------------------------------------------- 1 | NoneOutput.java

NoneOutput.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Mandrikov Evgeny - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.agent.rt.internal.output;
14 | 
15 | import org.jacoco.core.runtime.AgentOptions;
16 | import org.jacoco.core.runtime.RuntimeData;
17 | 
18 | /**
19 |  * Output that does nothing.
20 |  */
21 | public class NoneOutput implements IAgentOutput {
22 | 
23 | 	public final void startup(final AgentOptions options,
24 | 			final RuntimeData data) {
25 | 		// Nothing to do
26 | 	}
27 | 
28 | 	public void writeExecutionData(final boolean reset) {
29 | 		// Nothing to do
30 | 	}
31 | 
32 | 	public void shutdown() {
33 | 		// Nothing to do
34 | 	}
35 | 
36 | }
37 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt.internal/Agent$2.html: -------------------------------------------------------------------------------- 1 | Agent.new Object() {...}

Agent.new Object() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total4 of 3387%0 of 0n/a010101
static {...}42987%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt.internal/IExceptionLogger.html: -------------------------------------------------------------------------------- 1 | IExceptionLogger

IExceptionLogger

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total5 of 50%0 of 0n/a111111
static {...}50%n/a111111
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt.internal/IExceptionLogger.java.html: -------------------------------------------------------------------------------- 1 | IExceptionLogger.java

IExceptionLogger.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.agent.rt.internal;
14 | 
15 | /**
16 |  * At several places exception might occur that should be reported. For
17 |  * testability these exceptions are emitted against this interface.
18 |  */
19 | public interface IExceptionLogger {
20 | 
21 | 	/**
22 | 	 * Default implementation which dumps the stack trace to System.err.
23 | 	 */
24 | 	IExceptionLogger SYSTEM_ERR = new IExceptionLogger() {
25 | 		public void logExeption(final Exception ex) {
26 | 			ex.printStackTrace();
27 | 		}
28 | 	};
29 | 
30 | 	/**
31 | 	 * Logs the given exception.
32 | 	 *
33 | 	 * @param ex
34 | 	 *            exception to log
35 | 	 */
36 | 	void logExeption(Exception ex);
37 | 
38 | }
39 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt/RT.html: -------------------------------------------------------------------------------- 1 | RT

RT

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total2 of 20%0 of 0n/a111111
getAgent()20%n/a111111
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt/RT.java.html: -------------------------------------------------------------------------------- 1 | RT.java

RT.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.agent.rt;
14 | 
15 | import org.jacoco.agent.rt.internal.Agent;
16 | 
17 | /**
18 |  * Entry point to access the JaCoCo agent runtime.
19 |  */
20 | public final class RT {
21 | 
22 | 	private RT() {
23 | 	}
24 | 
25 | 	/**
26 | 	 * Returns the agent instance of the JaCoCo runtime in this JVM.
27 | 	 *
28 | 	 * @return agent instance
29 | 	 * @throws IllegalStateException
30 | 	 *             if no Agent has been started yet
31 | 	 */
32 | 	public static IAgent getAgent() throws IllegalStateException {
33 | 		return Agent.getInstance();
34 | 	}
35 | 
36 | }
37 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt/index.html: -------------------------------------------------------------------------------- 1 | org.jacoco.agent.rt

org.jacoco.agent.rt

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total2 of 20%0 of 0n/a11111111
RT20%n/a11111111
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent.rt/org.jacoco.agent.rt/index.source.html: -------------------------------------------------------------------------------- 1 | org.jacoco.agent.rt

org.jacoco.agent.rt

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total2 of 20%0 of 0n/a11111111
RT.java20%n/a11111111
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.agent/index.html: -------------------------------------------------------------------------------- 1 | org.jacoco.agent

org.jacoco.agent

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total11 of 8386%2 of 875%2103270601
org.jacoco.agent117286%2675%2103270601
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.ant/index.html: -------------------------------------------------------------------------------- 1 | org.jacoco.ant

org.jacoco.ant

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total23 of 1,73798%1 of 10499%416384293111019
org.jacoco.ant231,71498%110399%416384293111019
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.cli/org.jacoco.cli.internal.commands/AllCommands.java.html: -------------------------------------------------------------------------------- 1 | AllCommands.java

AllCommands.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.cli.internal.commands;
14 | 
15 | import java.util.Arrays;
16 | import java.util.List;
17 | 
18 | import org.jacoco.cli.internal.Command;
19 | 
20 | /**
21 |  * List of all available commands.
22 |  */
23 | public final class AllCommands {
24 | 
25 | 	private AllCommands() {
26 | 	}
27 | 
28 | 	/**
29 | 	 * @return list of new instances of all available commands
30 | 	 */
31 | 	public static List<Command> get() {
32 | 		return Arrays.asList(new Dump(), new Instrument(), new Merge(),
33 | 				new Report(), new ClassInfo(), new ExecInfo(), new Version());
34 | 	}
35 | 
36 | 	/**
37 | 	 * @return String containing all available command names
38 | 	 */
39 | 	public static String names() {
40 | 		final StringBuilder sb = new StringBuilder();
41 | 		for (final Command c : get()) {
42 | 			if (sb.length() > 0) {
43 | 				sb.append('|');
44 | 			}
45 | 			sb.append(c.name());
46 | 		}
47 | 		return sb.toString();
48 | 	}
49 | 
50 | }
51 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.cli/org.jacoco.cli.internal.commands/Version.java.html: -------------------------------------------------------------------------------- 1 | Version.java

Version.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.cli.internal.commands;
14 | 
15 | import java.io.IOException;
16 | import java.io.PrintWriter;
17 | 
18 | import org.jacoco.cli.internal.Command;
19 | import org.jacoco.core.JaCoCo;
20 | 
21 | /**
22 |  * The <code>version</code> command.
23 |  */
24 | public class Version extends Command {
25 | 
26 | 	@Override
27 | 	public String description() {
28 | 		return "Print JaCoCo version information.";
29 | 	}
30 | 
31 | 	@Override
32 | 	public int execute(final PrintWriter out, final PrintWriter err)
33 | 			throws IOException {
34 | 		out.println(JaCoCo.VERSION);
35 | 		return 0;
36 | 	}
37 | 
38 | }
39 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.cli/org.jacoco.cli.internal/CommandHandler$1.html: -------------------------------------------------------------------------------- 1 | CommandHandler.new OptionDef() {...}

CommandHandler.new OptionDef() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 10100%0 of 0n/a010101
{...}10100%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.cli/org.jacoco.cli.internal/CommandParser.java.html: -------------------------------------------------------------------------------- 1 | CommandParser.java

CommandParser.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.cli.internal;
14 | 
15 | import org.kohsuke.args4j.CmdLineParser;
16 | 
17 | /**
18 |  * Parser which remembers the parsed command to have additional context
19 |  * information to produce help output.
20 |  */
21 | public class CommandParser extends CmdLineParser {
22 | 
23 | 	private final Command command;
24 | 
25 | 	CommandParser(final Command command) {
26 | 		super(command);
27 | 		this.command = command;
28 | 	}
29 | 
30 | 	Command getCommand() {
31 | 		return command;
32 | 	}
33 | 
34 | }
35 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.analysis/CoverageNodeImpl$1.html: -------------------------------------------------------------------------------- 1 | CoverageNodeImpl.new Object() {...}

CoverageNodeImpl.new Object() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total6 of 4787%0 of 0n/a010101
static {...}64187%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.analysis/ICounter$CounterValue.html: -------------------------------------------------------------------------------- 1 | ICounter.CounterValue

ICounter.CounterValue

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 54100%0 of 0n/a010601
static {...}54100%n/a010601
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.analysis/ICoverageNode$CounterEntity.html: -------------------------------------------------------------------------------- 1 | ICoverageNode.CounterEntity

ICoverageNode.CounterEntity

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 64100%0 of 0n/a010701
static {...}64100%n/a010701
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.analysis/ICoverageNode$ElementType.html: -------------------------------------------------------------------------------- 1 | ICoverageNode.ElementType

ICoverageNode.ElementType

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 64100%0 of 0n/a010701
static {...}64100%n/a010701
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/BridgeFilter.java.html: -------------------------------------------------------------------------------- 1 | BridgeFilter.java

BridgeFilter.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Evgeny Mandrikov - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.core.internal.analysis.filter;
14 | 
15 | import org.objectweb.asm.Opcodes;
16 | import org.objectweb.asm.tree.MethodNode;
17 | 
18 | /**
19 |  * Filters bridge methods.
20 |  */
21 | final class BridgeFilter implements IFilter {
22 | 
23 | 	public void filter(final MethodNode methodNode,
24 | 			final IFilterContext context, final IFilterOutput output) {
25 | 		if ((methodNode.access & Opcodes.ACC_BRIDGE) == 0) {
26 | 			return;
27 | 		}
28 | 		output.ignore(methodNode.instructions.getFirst(),
29 | 				methodNode.instructions.getLast());
30 | 	}
31 | 
32 | }
33 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/EnumEmptyConstructorFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | EnumEmptyConstructorFilter.Matcher

EnumEmptyConstructorFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 25100%0 of 2100%020601
match(MethodNode)25100%2100%020601
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/KotlinDefaultMethodsFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | KotlinDefaultMethodsFilter.Matcher

KotlinDefaultMethodsFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 25100%0 of 4100%030501
match(MethodNode, IFilterOutput)25100%4100%030501
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/KotlinLateinitFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | KotlinLateinitFilter.Matcher

KotlinLateinitFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 44100%0 of 8100%0501101
match(AbstractInsnNode, IFilterOutput)44100%8100%0501101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/KotlinNotNullOperatorFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | KotlinNotNullOperatorFilter.Matcher

KotlinNotNullOperatorFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 24100%0 of 4100%030801
match(AbstractInsnNode, IFilterOutput)24100%4100%030801
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/KotlinWhenFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | KotlinWhenFilter.Matcher

KotlinWhenFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 66100%1 of 1090%1601701
match(AbstractInsnNode, IFilterOutput)66100%1990%1601701
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/KotlinWhenStringFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | KotlinWhenStringFilter.Matcher

KotlinWhenStringFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total2 of 14998%3 of 2085%31124301
match(AbstractInsnNode, IFilterOutput)214798%31785%31124301
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/RecordPatternFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | RecordPatternFilter.Matcher

RecordPatternFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 46100%1 of 250%1201201
match(AbstractInsnNode, IFilterOutput)46100%1150%1201201
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/StringSwitchFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | StringSwitchFilter.Matcher

StringSwitchFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total1 of 13599%1 of 1894%11013701
match(AbstractInsnNode, IFilterOutput)13499%11794%11013701
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/StringSwitchJavacFilter$Matcher.html: -------------------------------------------------------------------------------- 1 | StringSwitchJavacFilter.Matcher

StringSwitchJavacFilter.Matcher

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total5 of 10695%3 of 1883%31022701
match(AbstractInsnNode, AbstractInsnNode)510195%31583%31022701
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/TryWithResourcesJavacFilter$1.html: -------------------------------------------------------------------------------- 1 | TryWithResourcesJavacFilter.new Object() {...}

TryWithResourcesJavacFilter.new Object() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total4 of 3387%0 of 0n/a010101
static {...}42987%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis.filter/TryWithResourcesJavacFilter$Matcher$JavacPattern.html: -------------------------------------------------------------------------------- 1 | TryWithResourcesJavacFilter.Matcher.JavacPattern

TryWithResourcesJavacFilter.Matcher.JavacPattern

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 44100%0 of 0n/a010501
static {...}44100%n/a010501
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis/CounterImpl$1.html: -------------------------------------------------------------------------------- 1 | CounterImpl.new Object() {...}

CounterImpl.new Object() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total5 of 4087%0 of 0n/a010101
static {...}53587%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.analysis/SourceFileCoverageImpl.java.html: -------------------------------------------------------------------------------- 1 | SourceFileCoverageImpl.java

SourceFileCoverageImpl.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.core.internal.analysis;
14 | 
15 | import org.jacoco.core.analysis.ISourceFileCoverage;
16 | 
17 | /**
18 |  * Implementation of {@link ISourceFileCoverage}.
19 |  */
20 | public class SourceFileCoverageImpl extends SourceNodeImpl
21 | 		implements ISourceFileCoverage {
22 | 
23 | 	private final String packagename;
24 | 
25 | 	/**
26 | 	 * Creates a source file data object with the given parameters.
27 | 	 *
28 | 	 * @param name
29 | 	 *            name of the source file
30 | 	 * @param packagename
31 | 	 *            vm name of the package the source file belongs to
32 | 	 */
33 | 	public SourceFileCoverageImpl(final String name, final String packagename) {
34 | 		super(ElementType.SOURCEFILE, name);
35 | 		this.packagename = packagename;
36 | 	}
37 | 
38 | 	// === ISourceFileCoverage implementation ===
39 | 
40 | 	public String getPackageName() {
41 | 		return packagename;
42 | 	}
43 | 
44 | }
45 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.flow/ClassProbesAdapter$1.html: -------------------------------------------------------------------------------- 1 | ClassProbesAdapter.new MethodProbesVisitor() {...}

ClassProbesAdapter.new MethodProbesVisitor() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 3100%0 of 0n/a010101
{...}3100%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal.instr/NoneProbeArrayStrategy.java.html: -------------------------------------------------------------------------------- 1 | NoneProbeArrayStrategy.java

NoneProbeArrayStrategy.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.core.internal.instr;
14 | 
15 | import org.objectweb.asm.ClassVisitor;
16 | import org.objectweb.asm.MethodVisitor;
17 | 
18 | /**
19 |  * The strategy does not emit any code at all. This is used for interface types
20 |  * without any code.
21 |  */
22 | class NoneProbeArrayStrategy implements IProbeArrayStrategy {
23 | 
24 | 	public int storeInstance(final MethodVisitor mv, final boolean clinit,
25 | 			final int variable) {
26 | 		throw new UnsupportedOperationException();
27 | 	}
28 | 
29 | 	public void addMembers(final ClassVisitor delegate, final int probeCount) {
30 | 		// nothing to do
31 | 	}
32 | 
33 | }
34 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.internal/InputStreams.html: -------------------------------------------------------------------------------- 1 | InputStreams

InputStreams

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 24100%0 of 2100%020801
readFully(InputStream)24100%2100%020801
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.runtime/AbstractRuntime.java.html: -------------------------------------------------------------------------------- 1 | AbstractRuntime.java

AbstractRuntime.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.core.runtime;
14 | 
15 | import java.util.Random;
16 | 
17 | /**
18 |  * Base {@link IRuntime} implementation.
19 |  */
20 | public abstract class AbstractRuntime implements IRuntime {
21 | 
22 | 	/** access to the runtime data */
23 | 	protected RuntimeData data;
24 | 
25 | 	/**
26 | 	 * Subclasses must call this method when overwriting it.
27 | 	 */
28 | 	public void startup(final RuntimeData data) throws Exception {
29 | 		this.data = data;
30 | 	}
31 | 
32 | 	private static final Random RANDOM = new Random();
33 | 
34 | 	/**
35 | 	 * Creates a random session identifier.
36 | 	 *
37 | 	 * @return random session identifier
38 | 	 */
39 | 	public static String createRandomId() {
40 | 		return Integer.toHexString(RANDOM.nextInt());
41 | 	}
42 | 
43 | }
44 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core.runtime/AgentOptions$OutputMode.html: -------------------------------------------------------------------------------- 1 | AgentOptions.OutputMode

AgentOptions.OutputMode

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 44100%0 of 0n/a010501
static {...}44100%n/a010501
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core/JaCoCo.html: -------------------------------------------------------------------------------- 1 | JaCoCo

JaCoCo

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 25100%0 of 0n/a010701
static {...}25100%n/a010701
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core/index.html: -------------------------------------------------------------------------------- 1 | org.jacoco.core

org.jacoco.core

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total0 of 25100%0 of 0n/a01070101
JaCoCo25100%n/a01070101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.core/org.jacoco.core/index.source.html: -------------------------------------------------------------------------------- 1 | org.jacoco.core

org.jacoco.core

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total0 of 25100%0 of 0n/a01070101
JaCoCo.java25100%n/a01070101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.examples/index.html: -------------------------------------------------------------------------------- 1 | org.jacoco.examples

org.jacoco.examples

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total411 of 98258%10 of 2864%2453971931938612
org.jacoco.examples41157158%101864%2453971931938612
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.examples/org.jacoco.examples/ExecutionDataClient.html: -------------------------------------------------------------------------------- 1 | ExecutionDataClient

ExecutionDataClient

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total52 of 520%2 of 20%22131311
main(String[])520%20%22131311
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.examples/org.jacoco.examples/ExecutionDataServer.html: -------------------------------------------------------------------------------- 1 | ExecutionDataServer

ExecutionDataServer

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total29 of 290%0 of 0n/a115511
main(String[])290%n/a115511
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.examples/org.jacoco.examples/MBeanClient.html: -------------------------------------------------------------------------------- 1 | MBeanClient

MBeanClient

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total61 of 610%0 of 0n/a11121211
main(String[])610%n/a11121211
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.check/BundleChecker$1.html: -------------------------------------------------------------------------------- 1 | BundleChecker.new Object() {...}

BundleChecker.new Object() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total5 of 4087%0 of 0n/a010101
static {...}53587%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.html/index.source.html: -------------------------------------------------------------------------------- 1 | org.jacoco.report.html

org.jacoco.report.html

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total0 of 277100%0 of 4100%02406102202
HTMLFormatter.java277100%4100%02406102202
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.internal.html.index/index.html: -------------------------------------------------------------------------------- 1 | org.jacoco.report.internal.html.index

org.jacoco.report.internal.html.index

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total0 of 29100%0 of 0n/a03070301
ElementIndex29100%n/a03070301
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.internal.html.index/index.source.html: -------------------------------------------------------------------------------- 1 | org.jacoco.report.internal.html.index

org.jacoco.report.internal.html.index

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total0 of 29100%0 of 0n/a03070301
ElementIndex.java29100%n/a03070301
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.internal.html.page/SourceFileItem.java.html: -------------------------------------------------------------------------------- 1 | SourceFileItem.java

SourceFileItem.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.report.internal.html.page;
14 | 
15 | import org.jacoco.core.analysis.ICoverageNode;
16 | import org.jacoco.core.analysis.ISourceFileCoverage;
17 | import org.jacoco.report.internal.ReportOutputFolder;
18 | import org.jacoco.report.internal.html.resources.Styles;
19 | import org.jacoco.report.internal.html.table.ITableItem;
20 | 
21 | /**
22 |  * Table items representing a source file which cannot be linked.
23 |  *
24 |  */
25 | final class SourceFileItem implements ITableItem {
26 | 
27 | 	private final ICoverageNode node;
28 | 
29 | 	SourceFileItem(final ISourceFileCoverage node) {
30 | 		this.node = node;
31 | 	}
32 | 
33 | 	public String getLinkLabel() {
34 | 		return node.getName();
35 | 	}
36 | 
37 | 	public String getLinkStyle() {
38 | 		return Styles.EL_SOURCE;
39 | 	}
40 | 
41 | 	public String getLink(final ReportOutputFolder base) {
42 | 		return null;
43 | 	}
44 | 
45 | 	public ICoverageNode getNode() {
46 | 		return node;
47 | 	}
48 | 
49 | }
50 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.internal.html.resources/Resources$1.html: -------------------------------------------------------------------------------- 1 | Resources.new Object() {...}

Resources.new Object() {...}

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total6 of 4787%0 of 0n/a010101
static {...}64187%n/a010101
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.internal.html.resources/Styles.html: -------------------------------------------------------------------------------- 1 | Styles

Styles

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 41100%0 of 8100%050701
combine(String[])41100%8100%050701
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.internal.html.table/TableItemComparator.java.html: -------------------------------------------------------------------------------- 1 | TableItemComparator.java

TableItemComparator.java

/*******************************************************************************
 2 |  * Copyright (c) 2009, 2023 Mountainminds GmbH & Co. KG and Contributors
 3 |  * This program and the accompanying materials are made available under
 4 |  * the terms of the Eclipse Public License 2.0 which is available at
 5 |  * http://www.eclipse.org/legal/epl-2.0
 6 |  *
 7 |  * SPDX-License-Identifier: EPL-2.0
 8 |  *
 9 |  * Contributors:
10 |  *    Marc R. Hoffmann - initial API and implementation
11 |  *
12 |  *******************************************************************************/
13 | package org.jacoco.report.internal.html.table;
14 | 
15 | import java.util.Comparator;
16 | 
17 | import org.jacoco.core.analysis.ICoverageNode;
18 | 
19 | /**
20 |  * Adapter to sort table items based on their coverage nodes.
21 |  */
22 | class TableItemComparator implements Comparator<ITableItem> {
23 | 
24 | 	private final Comparator<ICoverageNode> comparator;
25 | 
26 | 	TableItemComparator(final Comparator<ICoverageNode> comparator) {
27 | 		this.comparator = comparator;
28 | 	}
29 | 
30 | 	public int compare(final ITableItem i1, final ITableItem i2) {
31 | 		return comparator.compare(i1.getNode(), i2.getNode());
32 | 	}
33 | 
34 | }
35 | 
-------------------------------------------------------------------------------- /utils/jacoco/coverage/org.jacoco.report/org.jacoco.report.xml/index.source.html: -------------------------------------------------------------------------------- 1 | org.jacoco.report.xml

org.jacoco.report.xml

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total0 of 90100%0 of 4100%0110220902
XMLFormatter.java90100%4100%0110220902
-------------------------------------------------------------------------------- /utils/jacoco/coverage/report.dtd: -------------------------------------------------------------------------------- 1 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /utils/jacoco/lib/jacocoagent.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/lib/jacocoagent.jar -------------------------------------------------------------------------------- /utils/jacoco/lib/jacocoant.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/lib/jacocoant.jar -------------------------------------------------------------------------------- /utils/jacoco/lib/jacococli.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/lib/jacococli.jar -------------------------------------------------------------------------------- /utils/jacoco/lib/org.jacoco.agent-0.8.11.202310140853.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/lib/org.jacoco.agent-0.8.11.202310140853.jar -------------------------------------------------------------------------------- /utils/jacoco/lib/org.jacoco.ant-0.8.11.202310140853.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/lib/org.jacoco.ant-0.8.11.202310140853.jar -------------------------------------------------------------------------------- /utils/jacoco/lib/org.jacoco.core-0.8.11.202310140853.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/lib/org.jacoco.core-0.8.11.202310140853.jar -------------------------------------------------------------------------------- /utils/jacoco/lib/org.jacoco.report-0.8.11.202310140853.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/jacoco/lib/org.jacoco.report-0.8.11.202310140853.jar -------------------------------------------------------------------------------- /utils/prompt_formats/__pycache__/extend_postfix.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/prompt_formats/__pycache__/extend_postfix.cpython-312.pyc -------------------------------------------------------------------------------- /utils/prompt_formats/__pycache__/extend_postfix.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/prompt_formats/__pycache__/extend_postfix.cpython-39.pyc -------------------------------------------------------------------------------- /utils/prompt_formats/__pycache__/prompt_formatter.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/prompt_formats/__pycache__/prompt_formatter.cpython-312.pyc -------------------------------------------------------------------------------- /utils/prompt_formats/__pycache__/prompt_formatter.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeonYang95/LLM4UT/de09a847ceb81fb1b73514f7c8af3b19a307c7f4/utils/prompt_formats/__pycache__/prompt_formatter.cpython-39.pyc -------------------------------------------------------------------------------- /utils/shell_extractor.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | sys.path.extend(['.', '..']) 4 | 5 | from utils.java_parser import ( 6 | parse_methods_from_class_node, 7 | parse_fields_from_class_code, 8 | parse_classes_from_file_node, 9 | parse_superclass_or_interface_from_class_node, 10 | parse_import_stmts_from_file_code 11 | ) 12 | 13 | 14 | def extract_test_shell(class_str, class_name): 15 | imports = parse_import_stmts_from_file_code(class_str) 16 | methods = parse_methods_from_class_node(class_str, need_prefix=False) 17 | fields = parse_fields_from_class_code(class_str, need_prefix=False) 18 | inner_classes = parse_classes_from_file_node(class_str) 19 | extend_classes = parse_superclass_or_interface_from_class_node(class_str) 20 | test_shell = '' 21 | is_junit3 = False 22 | removed_methods = [] 23 | 24 | for imp in imports: 25 | if 'junit.framework' in imp: 26 | is_junit3 = True 27 | test_shell += imp + '\n' 28 | test_shell += f"public class {class_name} " 29 | if len(extend_classes['superclasses']) != 0: 30 | test_shell += ' '.join(extend_classes['superclasses']) 31 | if len(extend_classes['interfaces']) != 0: 32 | test_shell += f" implements {' '.join(extend_classes['interfaces'])}" 33 | test_shell += "{\n" 34 | test_shell += "\t" + "\n\t".join([field['declaration_text'] for field in fields]) 35 | test_shell += "\n" 36 | removed_method_range = [] 37 | for method in methods: 38 | if is_junit3: 39 | if method['method_name'].startswith('test'): 40 | removed_methods.append([method['method_start_line'], method['method_end_line']]) 41 | continue 42 | else: 43 | if any([method['method_start_line'] in range(removed_line[0], removed_line[1]) for removed_line in 44 | removed_methods]): 45 | continue 46 | else: 47 | if '@Test' in method['method_modifiers']: 48 | removed_method_range.append([method['method_start_line'], method['method_end_line']]) 49 | continue 50 | 51 | else: 52 | if any([method['method_start_line'] in range(removed_lines[0], removed_lines[1]) 53 | for removed_lines in removed_method_range]): 54 | continue 55 | 56 | test_shell += "\n\t" + method['method_text'] 57 | test_shell += '}\n' 58 | for inner_class in inner_classes: 59 | test_shell += inner_class + '\n' 60 | 61 | return test_shell 62 | 63 | 64 | if __name__ == '__main__': 65 | class_str = 'import java.utils.String; \n public class SomeTests extends TestCase{ private int testFields = 0; @Test public void test1(){ int i = 1; i+=1; } @Before public void test2(){ int i = 0; i+=1; } } class InnerClass{ SomeType someVariavle;}' 66 | extract_test_shell(class_str, 'SomeTests') 67 | pass 68 | --------------------------------------------------------------------------------