diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..444f9f0 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,117 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ master] + pull_request: + branches: [ master] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.11 + uses: actions/setup-java@v1 + with: + java-version: 1.11 + #Build of the project, 'Creation of the README' is done + - name: Creation of the realization file + run: + echo -e "\nCreation of the README" >> realization.txt; + #Build of the project, 'Build Maven passed' is done + - name: + Build with Maven; + run: + mvn -B package --file pom.xml; + echo -e "Build Maven passed" >> realization.txt; + #Test of the project, 'Test Maven passed' is done + - name: Test with Maven + if: always() + run: + mvn test; + echo -e "Test Maven passed" >> realization.txt; + + #Scanning the project with SonarCloud + - name: SonarCloud Scan + run: + mvn -B verify sonar:sonar; + echo -e "Scanning the project with SonarCloud" >> realization.txt; + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + #I archive the diagrams generated during the test + - name: Archive images of examples + uses: actions/upload-artifact@v2 + with: + name: images + path: justification/examples/output/images + + #I archive the Jacoco report + - name: Archive Jacoco report + uses: actions/upload-artifact@v2 + with: + name: jacoco + path: target/site/jacoco + + #I archive the generated codes + - name: Archive generated codes + uses: actions/upload-artifact@v2 + with: + name: generatedCode + path: src/main/java/models + + #'Jacoco Report' and 'Jacoco report Archivate' are done + - name: Realization part1 + run: echo -e "Jacoco Report\nJacoco report Archivate" >> realization.txt + + #'images Archivate' and 'code Archivate' are done + - name: Realization part2 + run: + echo -e "images Archivate" >> realization.txt; + echo -e "code Archivate" >> realization.txt; + + #---------JustificationDiagram for my project----------- + + #I generate the two diagrams and the TODO list + - name: JD&TODO generation + run: + echo -e "BEFORE--------------"; ls -la justification/output; + mvn exec:java -Dexec.mainClass="JDCompiler" -Dexec.args="justification/Pattern4CI.jd -o justification/output/CI -rea realization.txt -act justification/actions.json -svg -svgR -td "; + echo -e "After--------------"; ls -la justification/output + + #I archive my diagrams created during the CI + - name: Archive JD&TODO + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: justification/output + + #I archive my realization file in the same artifacts as my diagrams + - name: Archive realization + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: realization.txt + + + #---------------Saving the last diagrams generated--------------- + + #I memorize all my files contained in the output directory + #- name: memorise the final result + # run: + # ls -la justification/output; + # git diff --quiet && git diff --staged --quiet || + # (git config user.name "GitHub Actions"; + # git add justification/output/*; + # git commit -m “justify${GITHUB_RUN_ID}“; + # git push origin master) + + + #---------JustificationDiagram----------- diff --git a/.gitignore b/.gitignore index 5b6a13f..df739d7 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ target/ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +/bin/ diff --git a/INF6200.iml b/INF6200.iml deleted file mode 100644 index 78b2cc5..0000000 --- a/INF6200.iml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/README.md b/README.md index 8ec435e..d9c5e71 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,75 @@ # Justification Diagram Generator +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=MireilleBF_JustificationDiagram&metric=alert_status)](https://sonarcloud.io/dashboard?id=MireilleBF_JustificationDiagram) -- Author : Corinne Pulgar -- Supervision : Sébastien Mosser + +- Author : Corinne Pulgar and Nicolas Corbière +- Supervision : Sébastien Mosser and Mireille Blay-Fornarino This prototype generates a justification diagram from a text file. +## QuickStart + +If you want to see the quick start, [go here](https://github.com/Nicolas-Corbiere/TestProjet/blob/master/QuickStart.md). + +Or see the test project used [here](https://github.com/Nicolas-Corbiere/TestProjet). + +## SonarCloud report + +If you want to see the quality of the project, [see here](https://sonarcloud.io/dashboard?id=MireilleBF_JustificationDiagram). + ## Installation JDGenerator is a Maven program. You can either clone the repo and run the following commands : ``` mvn install mvn compile -mvn exec:java -Dexec.mainClass="parsing.JDCompiler" -i -o ``` +or [download the jar file](https://github.com/MireilleBF/JustificationDiagram/releases/tag/V1.2). + +## Execution +From the cloned repo, run +``` +mvn exec:java -Dexec.mainClass="JDCompiler" -Dexec.args="[INPUT_FILE] -o [OUTPUT_FILE] (-rea [INPUT_REALIZATION_FILE]) (-act +[INPUT_ACTION_FILE]) [OPTIONS]" + +``` + +or execute the jar file with +``` +java -jar JDGenerator-jar-with-dependencies.jar [INPUT_FILE] -o [OUTPUT_FILE] (-rea [INPUT_REALIZATION_FILE]) (-act [INPUT_ACTION_FILE]) [OPTIONS] +``` + +### Options +| Flag | Argument | Description | +|-------|----------|------------------------------------------| +| -o | path | Output file (no extension) | +| -rea | path | indicate the realization file | +| -act | path | indicate the action file | +| ----- | -------- | ---------------------------------------- | +| -svg | - | Generate visual graph | +| -svgR | - | Generate visual realisation graph | +| -gv | - | Generate text files before dot formating | +| -td | - | Generate todo list | + + -or [download the jar file](https://github.com/ace-design/JustificationDiagram/releases/tag/v1.0) and run : + +If no output file is entered, the generated files will be named from the input file name. + + +There are a few examples: +``` +mvn exec:java -Dexec.mainClass="JDCompiler" -Dexec.args="example/basic.jd -o output/images/basic -svg" ``` -java -jar JDGenerator-jar-with-dependencies.jar -i -o +``` +mvn exec:java -Dexec.mainClass="JDCompiler" -Dexec.args="justification/example/basic.jd -o output/images/basic -rea output/realization/realization.txt -svg " +``` +``` +java -jar DGenerator-jar-with-dependencies.jar -Dexec.args="example/basic.jd -o output/images/basic -rea output/realization/realization.txt -act action/actionBasic.json -svg -td " ``` ## Syntax -The developped syntax strongly ressembles [PlantUML](https://plantuml.com/). +The developped syntax strongly ressembles [PlantUML](https://plantuml.com/)'s object and class diagram syntaxes. ### Tags The text file should start and end by the corresponding tags. @@ -44,57 +93,1116 @@ The conclusion and subconclusion may have a restriction field. There can only be ``` ### Relations -At the moment, the prototype permits only one type and one direction of link. +The prototype permits two types of oriented link. + +* Expanded link : ``` --> ``` +* Collapsed link : +``` + ..> +``` + +## Realization +In a file, you state the supports produced. + +For example, during the continuous integration, we add a file named "réalisation.txt" in which we trace the supports produced. + +``` +- name: Realization + run: echo -e "[Label of the accomplish task or support]" >> output/realization/realization.txt +``` + +## Action + +The action file is a json file that contains all additional information for a node (like the information to verify or the reference). + +For example, if you have a node with a "Validated Architecture" label and you want to add a "archi1" reference, you should write this : + +### ActionReference.json + +``` +[ + { + "Node":{ + "Label":"Architecture validated", + "Reference":"archi1" + } + }, + ] +``` + +You can also specify whether a node is optional. In this case, if that node is the child of another node, the state of the latter will not take into account the state of that child. + +For the example, we will put the node "Validated Architecture" as optional. + +### ActionOptional.json + +``` +[ + { + "Node":{ + "Label":"Architecture validated", + "Optional":"true", + "Reference":"archi1" + } + }, + ] +``` + + +### ActionFiles.json +``` +[ + { + "Node":{ + "Label":"Architecture validated", + "Optional":"true", + "Reference":"archi1", + "Files": [ + "test1", + "test2.txt" + ] + } + }, + ] +``` + + +You can also specify that a justification is only valid if a specific directory contains a specific number of files. + +For the example, we will say that the "Validated Architecture" node must verify that "test3" contains 2 files and "test4" contains 3 files. + +### ActionFilesNumber.json +``` +[ + { + "Node":{ + "Label":"Architecture validated", + "Optional":"true", + "Reference":"archi1", + "Files": [ + "test1", + "test2.txt" + ], + "FilesNumber": [ + { + "Path":"test3", + "Number":"2" + }, + + { + "Path":"test4", + "Number":"3" + }, + ], + } + }, + ] +``` + +More generally, you can check different properties depending on the actions described. +For example, below, an action to check the test coverage of your project is explained. + +### CheckCoverage -## Example -Here's an example of a text file and the graph it generates. +``` +[ + { + "Node":{ + "Actions": [ + "CheckCoverage [INPUT_JACOCO_REPORT] [OPERATOR] [NUMBER]", + ] + }, + ] +``` + +You need to specify where is the index.html or the jacoco.csv of the jacoco report in 'INPUT_JACOCO_REPORT' . + + +### OPERATOR +| Argument | Description | +|----------|-----------------------------------------------------------------------| +| '==' | Verifies than the test coverage is equal to 'NUMBER' | +| '!=' | Verifies than the test coverage is not equal to 'NUMBER' | +| '>' | Verifies than the test coverage is greater than 'NUMBER' | +| '>=" | Verifies that the test coverage is greater than or equal to "NUMBER" | +| '<' | Verifies that the test coverage is less than "NUMBER". | +| '<=' | Verifies that the test coverage is less than or equal to "NUMBER" | + + + +For the example, we will say that the "Validated Architecture" node must verify that the coverage is greater than or equal to 80. For this, we need "site/jacoco/index.html". + +### ActionsCheckCoverage.json +``` +[ + { + "Node":{ + "Label":"Architecture validated", + "Optional":"true", + "Reference":"archi1", + "Actions": [ + "CheckCoverage target/site/jacoco/index.html >= 80", + ] + }, + ] +``` + + + + +### other example + +Here is a more detailed example + +``` +[ + { + "Node":{ + "Label":"Technical specifications", + "Reference":"archi2", + "Files": [ + ".github/workflows" + ], + "FilesNumber": [ + { + "Path":".github/workflows", + "Number":"1" + }, + ], + } + }, + { + "Node":{ + "Label":"Architecture validated", + "Optional":"false", + "Reference":"archi1" + } + }, + { + "Node":{ + "Label":"Risks consistency", + "Optional":"true", + "Reference":"archi2" + } + }, + { + "Node":{ + "Label":"Jacoco Report", + "Reference":"archi2", + "Actions": [ + "CheckCoverage target/site/jacoco/index.html == 80", + ] + } + }, + ] + + +``` + +You can also specify whether a node needs to check the existence of a certain files or directorys, + +``` +- name: Realization + run: echo -e "[Label of the accompliseh task]!-![file necessery 1];[file necessery 2];|file necessery 3]" >> output/realization/realization.txt + + +``` + +and you can ask if the number of files in a directory is correct. + +``` +- name: Realization + run: echo -e "[Label of the accompliseh task]!-![directory]/!number!10" >> output/realization/realization.txt + + + +``` + +You can also add references for a certain node with this + +``` +- name: Realization + run: echo -e "[Label of the accompliseh task]!ref!Artifacts1" >> output/realization/realization.txt + +``` + +## Artifacts + +If you want to save the elements created during the continuous integration, always in your 'maven.yml' file, you can write this at the very end of your file : + +``` +- name: Archive generated codes + uses: actions/upload-artifact@v2 + with: + name: [Name of your Artifact] + path: [OUTPUT_FILE] + + + +``` + +if you want to save a specific file, you can write this : + +``` +- name: Archive generated codes + uses: actions/upload-artifact@v2 + with: + name: Artifact1 + path: realization.txt + +``` + +If you want more information about worflows, please [go here](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions) + + +## Example without realization and action +Here's an example of a text file, the graph and the todo list it generates. + + +#### example.jd ``` @startuml -conclusion C = "System integration tests validated" - "Internal" -strategy S = "Evaluate integration tests" +conclusion C = "Software safety validated" - "Internal" +strategy S = "Assess software safety" domain D = "Internal accreditation" -rationale R = "ISO 62304" +rationale R = "Credentials for IEC 62304" -support E = "SoapUI logs" +subconclusion C1 = "Specifications validated" -subconclusion CA = "Tests validated for module A" -strategy SA = "Evaluate unit tests" -rationale RAB = "ISO 62304" -support A = "Module A source code" -support J = "JUnit logs" +subconclusion C2 = "Architecture validated" +strategy S2 = "Review architecture" +support F = "Architecture" -subconclusion CB = "Tests validated for module B" -strategy SB = "Evaluate unit tests" -support B = "Module B source code" +subconclusion C3 = "Safety specifications validated" +strategy S3 = "Assess risk management" +rationale R3 = "Credentials for ISO 14971" +support G = "Risk mitigation plan" + +subconclusion C4 = "Risks consistency" +strategy S4 = "Verify consistency" +support H = "Technical specifications" +support I = "Functional specifications" +support J = "Identified risks" + +subconclusion C5 = "Feasible hard points" S --> C D --> S R --> S -E --> S -CA --> S -CB --> S -SA --> CA -SB --> CB -RAB --> SA -RAB --> SB -A --> SA -B --> SB -J --> SA -J --> SB + +C1 --> S +H ..> C1 +I ..> C1 + +C2 --> S +S2 --> C2 +F --> S2 +H --> S2 + +C3 --> S +C3 --> S2 +S3 --> C3 +R3 --> S3 +J --> S3 +G --> S3 + +C4 --> S3 +S4 --> C4 +H --> S4 +I --> S4 +J --> S4 + +C5 --> S2 +H ..> C5 @enduml ``` -![](med_graph.png) +#### generation of the diagrams +run this : +``` +mvn exec:java -Dexec.mainClass="JDCompiler" -Dexec.args="example/fig3.jd -o output/images/fig3 -svg -td" +``` + +or + +``` +java -jar JDGenerator-jar-with-dependencies.jar example/fig3.jd -o output/images/fig3 -svg -td +``` + +#### example.svg +![](justification/examples/fig3.svg) > The justification diagram was adapted from _Support of Justification Elicitation: Two Industrial Reports_ by Clément Duffau, Thomas Polacsek and Mireille Blay-Fornarino, 2018. +#### example.todo + +_Generated List_ +``` +Requirements list + +[ ] Identified risks +[ ] Functional specifications +[ ] Technical specifications +[ ] Feasible hard points +[ ] Specifications validated +[ ] Risk mitigation plan +[ ] Architecture +[ ] Risks consistency +[ ] Safety specifications validated +[ ] Architecture validated +----------------------------------------------- +[ ] Software safety validated +----------------------------------------------- +``` + +## Example with realization file,action file and application in IC + +Now we will see 2 examples of valid and invalid diagrams. +To do so, we will use the following example for both diagrams. + +#### example.jd +``` +@startuml + +conclusion C = "Valid Continuous Integration" - "interne" +PV --> C + +subconclusion PV = "Project Valid" +strategy SE = "Evaluate Project Quality" +SE --> PV +M --> SE +ASC --> SE +AJS --> SE + +subconclusion ASC = "Archivees Data" +strategy SD = "Data Archivate" +support CA = "code Archivate" +support IA = "images Archivate" + +SD --> ASC +AJS --> SD +CA --> SD +IA --> SD + +subconclusion M = "Maven ready" +strategy SM = "Evaluate Maven Project" +support TM = "Test Maven passed" +support BM = "Build Maven passed" +BM --> SM +TM --> SM +SM --> M + + + +subconclusion AJS = "Test Coverage validated and Archived" +strategy SJA = "testCoverage Archivate" +support JA = "Jacoco report Archivate" +JV --> SJA +RJ --> SJA +JA --> SJA +SJA --> AJS + +subconclusion JV = "Test Coverage validated" +strategy SJ = "Validate testCoverage" +support RJ = "Jacoco Report" +RJ --> SJ +SJ --> JV + +@enduml +``` + +#### example.svg + +![](justification/examples/exampleCI/Pattern4CI.svg) + + +## Valid Example with realization and action files +Here's an example of a text file, the graph and the todo list it generates if you have validate all the evidences. + +#### ActionValid.json - Valid + +In this file, I will specify any additional information, such as the reference and files to check for each node. +I'll just add comments with "@comment": "this is a comment". + +``` +[ + { + "Node":{ + "@comment": "The node labeled 'Jacoco Repor' is not optional... ", + "Label":"Jacoco Report", + "Optional":"false", + "@comment2": "...the total coverage need to be superior to 70%... ", + "Actions": [ + "CheckCoverage target/site/jacoco/index.html >= 70", + ], + "@comment3": "...and need to check the exitance of the file 'target/site/jacoco/index.html'." , + "Files": [ + "target/site/jacoco/index.html" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'code Archivate' has 'generatedCode' for reference.", + "Label":"code Archivate", + "Reference":"generatedCode", + } + }, + { + "Node": { + "@comment": "The node labeled 'images Archivate' has 'images' for reference and...", + "Label":"images Archivate", + "Reference":"images", + + "FilesNumber": [ + { + "@comment2": "...need to check if of the repertory 'justification/output/images/' have 13 files..." , + "Path":"justification/output/images/", + "Number":"13" + }, + { + "@comment3": "... and need to check if of the repertory 'justification/' have 2 files.", + "Path":"justification/", + "Number":"2" + }, + + + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Build Maven passed'...", + "Label":"Build Maven passed", + "FilesNumber": [ + { + "@comment2":"need to check if of the repertory 'justification/examples' have 10 files.", + "Path":"justification/examples", + "Number":"10" + }, + ] + } + + + }, + { + "Node":{ + "@comment": "The node labeled 'Jacoco report Archivate' has 'jacoco' for reference.", + "Label":"Jacoco report Archivate", + "Reference":"jacoco", + } + + + }, + + { + "Node": { + "@comment": "The node labeled 'Continuous Integration' has 'GeneratedJD' for reference.", + "Label":"Continuous Integration", + "Reference":"GeneratedJD", + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Test Coverage validated and Archived' is optional. ", + "Label":"Test Coverage validated and Archived", + "Optional":"true", + } + }, + { + "Node":{ + "@comment": "The node labeled 'Creation of the README' is optional and... ", + "Label":"Creation of the README", + "Optional":"true", + "@comment3": "...and need to check the exitance of the file 'README.md'", + "Files": [ + "README.md" + ] + } + } +] + +``` + + + +#### maven.yml - Valid +You should write this in 'maven.yml' : + +``` +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + #Build of the project, 'Creation of the README' and 'Build Maven passed' are done + - name: + Build with Maven; + run: + mvn -B package --file pom.xml; + echo -e "\nCreation of the README" >> realization.txt; + echo -e "Build Maven passed" >> realization.txt; + #Test of the project, 'Test Maven passed' is done + - name: Test with Maven + run: + mvn test; + echo -e "Test Maven passed" >> realization.txt; + #Scanning the project with SonarCloud + - name: SonarCloud Scan + run: + mvn -B verify sonar:sonar; + echo -e "Scanning the project with SonarCloud" >> realization.txt; + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + #I archive the diagrams generated during the test + - name: Archive images + uses: actions/upload-artifact@v2 + with: + name: images + path: justification/output/images + + #I archive the Jacoco report + - name: Archive Jacoco report + uses: actions/upload-artifact@v2 + with: + name: jacoco + path: target/site/jacoco + + #I archive the generated codes + - name: Archive generated codes + uses: actions/upload-artifact@v2 + with: + name: generatedCode + path: src/main/java/models + + #---------JustificationDiagram----------- + + #'Jacoco Report' and 'Jacoco report Archivate' are done + - name: Realization part1 + run: echo -e "Jacoco Report\nJacoco report Archivate" >> realization.txt + + #'images Archivate' and 'code Archivate' are done + - name: Realization part2 + run: + echo -e "images Archivate" >> realization.txt; + echo -e "code Archivate" >> realization.txt; + + #I generate the two diagrams and the TODO list + - name: JD&TODO generation + run: mvn exec:java -Dexec.mainClass="JDCompiler" -Dexec.args="justification/examples/exampleCI/Pattern4CI.jd -o justification/output/GeneratedJD/Pattern4CI -rea realization.txt -act justification/examples/exampleCI/actionValid.json -svg -svgR -td " + + #I archive my diagrams create during the CI + - name: Archive JD&TODO + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: justification/output/GeneratedJD/ + + #I archive my realization file in the same artifacts as my diagrams + - name: Archive realization + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: realization.txt + + #I archive my action file in the same artifacts as my diagrams + - name: Archive action + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: justification/examples/exampleCI/actionValid.json + + #---------JustificationDiagram----------- + + +``` + +#### realization.txt - Valid + +We end up with this realization file: + + +``` +Jacoco Report +code Archivate +images Archivate +Test Maven passed +Build Maven passed +Jacoco report Archivate +Valid Continuous Integration + +``` + +#### example_REA.svg - Valid + +![](justification/examples/exampleCI/Pattern4CI_Valid_REA.svg) + + +#### example.todo - Valid + +_Generated List_ +``` +Requirements list + +[X] Creation of the README + [X] README.md +[X] code Archivate - reference : generatedCode +[X] Test Maven passed +[X] Jacoco Report + [X] target/site/jacoco/index.html + [x] Current coverage is 80, it's >= 70 +[X] images Archivate - reference : images + [x] justification/output/images/ (13 Files found) + [x] justification/ (2 Files found) +[X] Jacoco report Archivate - reference : jacoco +[X] Scanning the project with SonarCloud +[X] Documentation ready (optional) +[X] Test Coverage validated +[X] Build Maven passed + [x] justification/examples (10 Files found) +[X] Maven ready +[X] Test Coverage validated and Archived (optional) +[X] Archivees Data +[X] SonarCloud ready +[X] Project Valid +----------------------------------------------- +[X] Valid Continuous Integration +----------------------------------------------- +``` + + + +## Invalid Example with realization +Here is an example of a text file, the graph and the list of tasks it generates if you have not validated "Build Maven passed", "Test Maven passed", "Jacoco Report" and "Jacoco report Archivate", with "Test Coverage validated and Archived" as an option. + +#### actionInvalid.json - Invalid + +In this file, I will specify any additional information, such as the reference and files to check for each node. +I'll just add comments with "@comment": "this is a comment". + +``` +[ + { + "Node":{ + "@comment": "The node labeled 'Jacoco Repor' is not optional, has 'Archi1' for reference and... ", + "Label":"Jacoco Report", + "Optional":"false", + "Reference":"Archi1", + "@comment2": "...the total coverage need to be superior to 80%... ", + "Actions": [ + "CheckCoverage target/site/jacoco/index.html > 80", + ], + "@comment3": "...need to check the exitance of the file 'target/site/jacoco/index.html'..." , + "Files": [ + "dontExist.todo","target/site/jacoco/index.html" + ], + "FilesNumber": [ + { + "@comment4":"...need to check if of the repertory 'justification/examples' have 10 files...", + "Path":"justification/examples", + "Number":"3" + }, + { + "@comment5":"...need to check if of the repertory 'justification/examples' have 10 files.", + "Path":"dontExist.txt", + "Number":"3" + }, + ], + } + }, + { + "Node":{ + "@comment": "The node labeled 'code Archivate' has 'generatedCode' for reference.", + "Label":"code Archivate", + "Reference":"generatedCode", + } + }, + { + "Node": { + "@comment": "The node labeled 'images Archivate' has 'images' for reference and...", + "Label":"images Archivate", + "Reference":"images", + "@comment2": "...need to check the exitance of the file 'justification/examples/exampleCI/Pattern4CI.jd'." , + "Files": [ + "justification/examples/exampleCI/Pattern4CI.jd" + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Build Maven passed'...", + "Label":"Build Maven passed", + "FilesNumber": [ + { + "@comment2":"need to check if of the repertory 'justification/examples' have 10 files.", + "Path":"justification/examples", + "Number":"10" + }, + ] + } + + + }, + { + "Node":{ + "@comment": "The node labeled 'Jacoco report Archivate' has 'jacoco' for reference.", + "Label":"Jacoco report Archivate", + "Reference":"jacoco", + } + + + }, + + { + "Node": { + "@comment": "The node labeled 'Data Archivat'...", + "Label":"Data Archivate", + "@comment2": "...need to check the exitance of the file 'dontExist.todo' and 'justification/output/images' and..." , + "Files": [ + "justification/output/images" + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Test Coverage validated and Archived' is optional and... ", + "Label":"Test Coverage validated and Archived", + "Optional":"true", + } + }, + { + "Node":{ + "@comment": "The node labeled 'Creation of the README' is optional and... ", + "Label":"Creation of the README", + "Optional":"true", + "@comment3": "...and need to check the exitance of the file 'README.md'", + "Files": [ + "README.md" + ] + } + } +] + + + + +``` + +#### maven.yml - Invalid +You should write this in 'maven.yml' : + +``` +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + #Build of the project, 'Creation of the README' and 'Build Maven passed' are done + - name: + Build with Maven; + run: + mvn -B package --file pom.xml; + echo -e "\nCreation of the README" >> realization.txt; + echo -e "Build Maven passed" >> realization.txt; + #Test of the project, 'Test Maven passed' is done + - name: Test with Maven + run: + mvn test; + echo -e "Test Maven passed" >> realization.txt; + #Scanning the project with SonarCloud + - name: SonarCloud Scan + run: + mvn -B verify sonar:sonar; + echo -e "Scanning the project with SonarCloud" >> realization.txt; + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + #I archive the diagrams generated during the test + - name: Archive images + uses: actions/upload-artifact@v2 + with: + name: images + path: justification/output/images + + #I archive the Jacoco report + - name: Archive Jacoco report + uses: actions/upload-artifact@v2 + with: + name: jacoco + path: target/site/jacoco + + #I archive the generated codes + - name: Archive generated codes + uses: actions/upload-artifact@v2 + with: + name: generatedCode + path: src/main/java/models + + #---------JustificationDiagram----------- + + #'Jacoco Report' and 'Jacoco report Archivate' are done + - name: Realization part1 + run: echo -e "Jacoco Report\nJacoco report Archivate" >> realization.txt + + #'images Archivate' and 'code Archivate' are done + - name: Realization part2 + run: + echo -e "images Archivate" >> realization.txt; + echo -e "code Archivate" >> realization.txt; + + #I generate the two diagrams and the TODO list + - name: JD&TODO generation + run: mvn exec:java -Dexec.mainClass="JDCompiler" -Dexec.args="justification/examples/exampleCI/Pattern4CI.jd -o justification/output/GeneratedJD/Pattern4CI -rea realization.txt -act justification/examples/exampleCI/actionValid.json -svg -svgR -td " + + #I archive my diagrams create during the CI + - name: Archive JD&TODO + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: justification/output/GeneratedJD/ + + #I archive my realization file in the same artifacts as my diagrams + - name: Archive realization + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: realization.txt + + #I archive my information file in the same artifacts as my diagrams + - name: Archive action + uses: actions/upload-artifact@v2 + with: + name: GeneratedJD + path: justification/examples/exampleCI/actionValid.json + + #---------JustificationDiagram----------- + +``` + +#### realization.txt - Invalid + + +``` +Build Maven passed +Jacoco Report!ref!Archi1 +code Archivate +images Archivate!-!examples/exampleCI/Pattern4CI.jd!ref!images +Data Archivate!-!examples!number!3;dontExist.txt!number!3;dontExist.todo +Jacoco report Archivate +``` + + +#### example_REA.svg - Invalid + +![](justification/examples/exampleCI/Pattern4CI_Invalid_REA.svg) + +#### example.todo - Invalid + +_Generated List_ +``` +Requirements list + +[X] Creation of the README + [X] README.md +[X] code Archivate - reference : generatedCode +[ ] Test Maven passed +[ ] Jacoco Report - reference : Archi1 + [ ] dontExist.todo (not found) + [X] target/site/jacoco/index.html + [ ] justification/examples - (3 file expected, but 10 found) + [ ] dontExist.txt (not found) + [x] Current coverage is 80, it's > 70 +[X] images Archivate - reference : images + [X] justification/examples/exampleCI/Pattern4CI.jd +[ ] Jacoco report Archivate - reference : jacoco +[X] Scanning the project with SonarCloud +[X] Documentation ready (optional) +[ ] Test Coverage validated +[X] Build Maven passed + [x] justification/examples (10 Files found) +[ ] Maven ready +[ ] Test Coverage validated and Archived (optional) +[X] Data Archivate + [X] justification/output/images +[X] Archivees Data +[X] SonarCloud ready +[ ] Project Valid +----------------------------------------------- +[ ] Valid Continuous Integration +----------------------------------------------- + +``` + +## Tips and tricks + +### Saving global variables in the Workflow + +If you want to save variables, such as the input or output of your project, there is a tricks for you. + +``` + #set Variables + - name set Variables + run : | + echo -e "examples/" >> Ouput.txt + echo -e "output/" >> Input.txt + + #I generate the two diagrams and the TODO list and used the Variables + - name: JD&TODO Generation + run : | + cat $(cat Ouput.txt) + cat $(cat varInput.txt) + +``` + +Here is the result : + +``` +> Run echo -e $(cat varOutput.txt) +examples/ +output/ +``` + +### Saving the last diagrams generated in a readme + +If you want to save your latest diagrams in a readme, there is a tip for you. + +For example, you want to generate a diagram with the following text (contained in "examples/exampleCI/basic"). + +``` +@startuml + +conclusion C = "Software is ready for launch" - "Internal" +strategy S = "Software is functionnal" +domain D = "Internal" +rationale R = "ISO 1234" +support A = "JUnit test logs" +support B = "Jenkins test logs" + +S --> C +D --> S +R --> S +A --> S +B --> S + +@enduml +``` +And you want to save the diagram generated with this text. +To do this, use this: + +``` +name: Java CI with Maven + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + #---------JustificationDiagram----------- + + #set Variables + - name set Variables + run : | + echo -e "examples/exampleCI/" >> Ouput.txt + echo -e "output/GeneratedJD/" >> Input.txt + + #I generate the two diagrams and the TODO list and used the Variables + - name: JD&TODO Generation + run : java -jar JDGenerator-jar-with-dependencies.jar $(cat varInput.txt)/Pattern4CI.jd -o $(cat varOutput.txt)Pattern4CI -rea realization.txt -svg -td + + #---------------Saving the last diagrams generated--------------- + #I memorize all my files contained in the output directory + - name: memorise the final result + #If you don't have any changes for your diagrams, nothing will be push. + run: + git config user.name "GitHub Actions"; + git diff --quiet && git diff --staged --quiet || (git add $(cat varOutput.txt)*;git commit -m “${COMMIT_MSG}“; git push origin master) + + #---------------Saving the last diagrams generated--------------- + + #---------JustificationDiagram----------- +``` + +Now, in your readme, put this : + +``` +Here is the realization diagram: + +![link to Google]([link to the diagram]) + + + + + +![link to Google](https://github.com/MireilleBF/JustificationDiagram/blob/master/justification/examples/exampleCI/Pattern4CI_Valid_REA.svg) +``` + +![link to justification Diagram](https://github.com/MireilleBF/JustificationDiagram/blob/master/documents/CI_REA.svg) + + +### SonarCloud +If you want to scan your project and get a report on its quality, check out [this tutorial](https://dev.to/remast/using-sonarcloud-with-github-actions-and-maven-31kg). +It will explain how to use the SonarCloud. + diff --git a/documents/CI_REA.svg b/documents/CI_REA.svg new file mode 100644 index 0000000..9e75a2e --- /dev/null +++ b/documents/CI_REA.svg @@ -0,0 +1,298 @@ + + +G + + + +C + + +Valid Continuous Integration + + + + + + + +interne + + + +PS + +Project Scan + + + +SCR + +SonarCloud ready + + + +PS->SCR + + + + + +SE + +Evaluate Project Quality + + + +SCR->SE + + + + + +PV + +Project Valid + + + +SE->PV + + + + + +PV->C + + + + + +AJS + +Test Coverage validated and Archived + + + +AJS->SE + + + + + +SD + +Data Archivate + + + +AJS->SD + + + + + +ASC + +Archivees Data + + + +SD->ASC + + + + + +ASC->SE + + + + + +BM + +Build Maven passed + + + +SM + +Evaluate Maven Project + + + +BM->SM + + + + + +M + +Maven ready + + + +SM->M + + + + + +M->SE + + + + + +SJA + +testCoverage Archivate + + + +SJA->AJS + + + + + +JV + +Test Coverage validated + + + +JV->SJA + + + + + +PDOC + +Project documented + + + +DOCR + +Documentation ready + + + +PDOC->DOCR + + + + + +DOCR->SE + + + + + +SC + +Scanning the project with SonarCloud + + + +SC->PS + + + + + +JA + +Jacoco report Archivate + + + +JA->SJA + + + + + +SJ + +Validate testCoverage + + + +SJ->JV + + + + + +IA + +images Archivate + + + +IA->SD + + + + + +RJ + +Jacoco Report + + + +RJ->SJA + + + + + +RJ->SJ + + + + + +TM + +Test Maven passed + + + +TM->SM + + + + + +CA + +code Archivate + + + +CA->SD + + + + + +CRM + +Creation of the README + + + +CRM->PDOC + + + + + diff --git a/documents/Nicolas-Corbiere-PowerPoint-Soutenance-PI.pptx b/documents/Nicolas-Corbiere-PowerPoint-Soutenance-PI.pptx new file mode 100644 index 0000000..e9ebd9c Binary files /dev/null and b/documents/Nicolas-Corbiere-PowerPoint-Soutenance-PI.pptx differ diff --git "a/documents/Rapport-Corbi\303\250re-Nicolas.pdf" "b/documents/Rapport-Corbi\303\250re-Nicolas.pdf" new file mode 100644 index 0000000..6b82731 Binary files /dev/null and "b/documents/Rapport-Corbi\303\250re-Nicolas.pdf" differ diff --git a/documents/These.pdf b/documents/These.pdf new file mode 100644 index 0000000..538b497 Binary files /dev/null and b/documents/These.pdf differ diff --git a/documents/caise18.pdf b/documents/caise18.pdf new file mode 100644 index 0000000..cda4f74 Binary files /dev/null and b/documents/caise18.pdf differ diff --git a/justification/Pattern4CI.jd b/justification/Pattern4CI.jd new file mode 100644 index 0000000..76e6e54 --- /dev/null +++ b/justification/Pattern4CI.jd @@ -0,0 +1,77 @@ +@startuml + +conclusion C = "Valid Continuous Integration" - "interne" +PV --> C + +subconclusion PV = "Project Valid" +strategy SE = "Evaluate Project Quality" +SE --> PV +M --> SE +ASC --> SE +AJS --> SE + +subconclusion ASC = "Archivees Data" +strategy SD = "Data Archivate" +support CA = "code Archivate" +support IA = "images Archivate" + +SD --> ASC +AJS --> SD +CA --> SD +IA --> SD + +subconclusion M = "Maven ready" +strategy SM = "Evaluate Maven Project" +support TM = "Test Maven passed" +support BM = "Build Maven passed" +BM --> SM +TM --> SM +SM --> M + + + +subconclusion AJS = "Test Coverage validated and Archived" +strategy SJA = "testCoverage Archivate" +support JA = "Jacoco report Archivate" +JV --> SJA +RJ --> SJA +JA --> SJA +SJA --> AJS + +subconclusion JV = "Test Coverage validated" +strategy SJ = "Validate testCoverage" +support RJ = "Jacoco Report" +RJ --> SJ +SJ --> JV + + +support SC = "Scanning the project with SonarCloud" +strategy PS = "Project Scan" +subconclusion SCR = "SonarCloud ready" + +SC --> PS +PS --> SCR +SCR --> SE + +support CRM = "Creation of the README" +strategy PDOC = "Project documented" +subconclusion DOCR = "Documentation ready" + +CRM --> PDOC +PDOC --> DOCR +DOCR --> SE + +@enduml + + + + + + + + + + + + + diff --git a/justification/actions.json b/justification/actions.json new file mode 100644 index 0000000..7fefde6 --- /dev/null +++ b/justification/actions.json @@ -0,0 +1,110 @@ +[ + { + "Node":{ + "@comment": "The node labeled 'Jacoco Report' is not optional... ", + "Label":"Jacoco Report", + "Optional":"false", + "@comment3": "...and need to check the existence of the file 'target/site/jacoco/jacoco.csv'." , + "Files": [ + "target/site/jacoco/jacoco.csv" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'Validate testCoverage' requires to check the coverage", + "Label":"Validate testCoverage", + "Actions": [ + "CheckCoverage target/site/jacoco/jacoco.csv >= 80", + "CheckValueInCSV target/site/jacoco/jacoco.csv INSTRUCTION_COVERED 1 >= 20" + ], + } + }, + { + "Node":{ + "@comment": "The node labeled 'code Archivate' has 'generatedCode' for reference.", + "Label":"code Archivate", + "Reference":"generatedCode", + } + }, + { + "Node": { + "@comment": "The node labeled 'images Archivate' has 'images' for reference and...", + "Label":"images Archivate", + "Reference":"images" + } + + }, + { + "Node": { + "@comment": "The node labeled 'Test Maven Passed' has 'images' for reference and...", + "Label":"Test Maven Passed", + "FilesNumber": [ + { + "@comment2": "...need to check if of the repertory 'justification/output/images/' have 13 files..." , + "Path":"justification/output/images/", + "Number":"13" + }, + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Build Maven passed'...", + "Label":"Build Maven passed", + "FilesNumber": [ + { + "@comment2":"need to check if of the repertory 'justification/examples/output/images' have 17 files.", + "Path":"justification/examples/output/images", + "Number":"17" + }, + ] + } + + + }, + { + "Node":{ + "@comment": "The node labeled 'Jacoco report Archivate' has 'jacoco' for reference.", + "Label":"Jacoco report Archivate", + "Reference":"jacoco", + } + + + }, + + { + "Node": { + "@comment": "The node labeled 'Continuous Integration' has 'GeneratedJD' for reference.", + "Label":"Continuous Integration", + "Reference":"GeneratedJD", + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Test Coverage validated and Archived' is optional. ", + "Label":"Test Coverage validated and Archived", + "Optional":"true", + } + }, + { + "Node":{ + "@comment": "The node labeled 'Creation of the README'... ", + "Label":"Creation of the README", + "@comment3": "...and need to check the exitance of the file 'README.md'", + "Files": [ + "README.md" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'Documentation ready' is optional", + "Label":"Documentation ready", + "Optional":"true", + + } + } +] \ No newline at end of file diff --git a/justification/output/local/realization.txt b/justification/output/local/realization.txt new file mode 100644 index 0000000..45376cc --- /dev/null +++ b/justification/output/local/realization.txt @@ -0,0 +1,9 @@ +Jacoco Report +code Archivate +images Archivate +Test Maven passed +Build Maven passed +Jacoco report Archivate +Valid Continuous Integration +Creation of the README +Scanning the project with SonarCloud \ No newline at end of file diff --git a/models/class_diagram_visit.puml b/models/class_diagram_visit.puml deleted file mode 100644 index 8c5cdbb..0000000 --- a/models/class_diagram_visit.puml +++ /dev/null @@ -1,68 +0,0 @@ -@startuml -!include commons.style - -title Justification Diagram Compiler (Structure) -center footer ACE - Corinne Pulgar - -package justificationDiagram { - - class JustificationDiagram { } - -} - -package export { - - interface JDVisitor { - + visitDiagram(JustificationDiagram) - + visitNode(Node) - + visitConclusion(Conclusion) - + visitSubConclusion(SubConclusion ) - + visitStrategy(Strategy) - + visitDomain(Domain) - + visitRationale(Rationale) - + visitSupport(Support) - + visitRelation(Relation) - } - - class GraphDrawer { - - gv - + draw() - } - -} - -package models { - - interface Visitable { - + accept(JDVisitor) - } - - class Node { - # alias - # label - } - - class Conclusion { - # restriction - } - - class Relation { } - - GraphDrawer -.up.-|> JDVisitor - JustificationDiagram -.up.-|> Visitable - Relation -.up.-|> Visitable - Relation "*" o-- "1" Node : from - Relation "*" o-- "1" Node : to - Node -.up.-|> Visitable - Node <|-- Domain - Node <|-- Conclusion - Node <|-- Rationale - Node <|-- Strategy - Node <|-- SubConclusion - Node <|-- Support -} - - JustificationDiagram "1" o-- "*" Node : nodes - JustificationDiagram "1" o-- "*" Relation : relations - -@enduml \ No newline at end of file diff --git a/models/commons.style b/models/commons.style deleted file mode 100644 index 83d14f9..0000000 --- a/models/commons.style +++ /dev/null @@ -1,63 +0,0 @@ -'Style defined by Benjamin Benni during his PhD thesis' -'Adapted by Sébastien Mosser for INF-5153' - -skinparam nodesep 75 -skinparam ranksep 75 -hide empty members - -skinparam noteFontSize 10 -skinparam noteFontName Courier - -skinparam monochrome false -skinparam shadowing false -skinparam roundcorner 10 -skinparam linetype polyline - -skinparam class { - BackgroundColor GhostWhite - ArrowColor Gray - BorderColor Black - fontColor CornFlowerBlue -} - -skinparam state { - BackgroundColor GhostWhite - ArrowColor Gray - BorderColor Black - fontColor CornFlowerBlue -} - -skinparam object { - BackgroundColor GhostWhite - ArrowColor Gray - BorderColor Black -} - -skinparam package<> { - borderColor Transparent - backgroundColor Transparent - fontColor Transparent - stereotypeFontColor Transparent -} - -skinparam sequence { - ArrowColor Gray - LifeLineBorderColor CornFlowerBlue - LifeLineBackgroundColor GhostWhite - ParticipantBorderColor CornFlowerBlue - ParticipantBackgroundColor GhostWhite - ActorBorderColor CornFlowerBlue - ActorBackgroundColor GhostWhite - BoxBorderColor CornFlowerBlue - BoxBackgroundColor GhostWhite -} - -skinparam stereotypeCBackgroundColor CornflowerBlue - -hide footbox -hide empty members - -skinparam note { - BackgroundColor GhostWhite - BorderColor CornFlowerBlue -} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4973707..2003a66 100644 --- a/pom.xml +++ b/pom.xml @@ -1,132 +1,180 @@ - 4.0.0 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.ace-design - justification-diagram-generator - 1.0 + org.ace-design + justification-diagram-generator + 1.0 - - UTF-8 - true - true - 1.8 - 1.8 - + + UTF-8 + true + true + 11 + 11 + 5.6.2 + https://sonarcloud.io + MireilleBF_JustificationDiagram + mireillebf-github + https://sonarcloud.io + 5ce8a205c4e7861d7c31ea0a1ddffe4142cc01d9 + 2.13.3 + - - - org.antlr - antlr4-runtime - 4.8 - - - org.codehaus.mojo - build-helper-maven-plugin - 3.1.0 - - - commons-cli - commons-cli - 1.3.1 - - - guru.nidi - graphviz-java - 0.16.0 - - - ch.qos.logback - logback-classic - 1.2.3 - - - org.junit.jupiter - junit-jupiter-api - 5.4.2 - test - + + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + + + org.antlr + antlr4-runtime + 4.8 + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + commons-cli + commons-cli + 1.3.1 + + + guru.nidi + graphviz-java + 0.16.0 + + + ch.qos.logback + logback-classic + 1.2.3 + + + org.junit.jupiter + junit-jupiter + ${version.junit} + test + + + + + org.apache.logging.log4j + log4j-api + 2.13.3 + + - org.junit.jupiter - junit-jupiter-engine - 5.4.2 - test + org.apache.logging.log4j + log4j-core + ${version.log4j} - + - - JDGenerator - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - 13 - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.4 - - - - parsing.JDCompiler - - - - jar-with-dependencies - + + JDGenerator + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.4 + + + + JDCompiler + + + + jar-with-dependencies + + + + + package + + single + + + + + + org.antlr + antlr4-maven-plugin + 4.8 + + + antlr + + antlr4 + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-source + generate-sources + + add-source + + + + ${project.build.directory}/generated-sources/java/ + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + true - - - package - - single - - - - - - org.antlr - antlr4-maven-plugin - 4.8 - - - antlr - - antlr4 - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.1.0 - - - add-source - generate-sources - - add-source - - - - ${project.build.directory}/generated-sources/java/ - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.1 - - - + + + org.jacoco + jacoco-maven-plugin + 0.8.4 + + + + prepare-agent + + + + + report + test + + report + + + + + + \ No newline at end of file diff --git a/src/main/antlr4/parsing/PlantUML.g4 b/src/main/antlr4/parsing/JustificationDiagram.g4 similarity index 86% rename from src/main/antlr4/parsing/PlantUML.g4 rename to src/main/antlr4/parsing/JustificationDiagram.g4 index c7ee917..15d67ef 100644 --- a/src/main/antlr4/parsing/PlantUML.g4 +++ b/src/main/antlr4/parsing/JustificationDiagram.g4 @@ -1,4 +1,6 @@ -grammar PlantUML; +// This grammar is strongly inspired from PlantUML's object and class diagram synthaxes. + +grammar JustificationDiagram; /* * Parser Rules diff --git a/src/main/java/JDCompiler.java b/src/main/java/JDCompiler.java new file mode 100644 index 0000000..5e51185 --- /dev/null +++ b/src/main/java/JDCompiler.java @@ -0,0 +1,231 @@ +import export.GraphDrawer; +import export.GraphDrawerRealization; +import export.RequirementsLister; +import guru.nidi.graphviz.engine.Format; +import guru.nidi.graphviz.engine.Graphviz; +import guru.nidi.graphviz.model.MutableGraph; +import justificationDiagram.JustificationDiagram; + +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTree; +import org.apache.commons.cli.*; +import parsing.*; +import java.io.*; +import java.util.ArrayList; +import java.util.List; + + +public class JDCompiler { + + + public static void main(String[] args) throws IOException { + CommandLine cmd = setup(args); + + + String outputOption = cmd.getOptionValue("output"); + if ( (outputOption != null) && (!outputIsValid(outputOption) ) ) { + System.exit(1); + } + + String inputFile = null; + for (int i = 0; i < cmd.getArgs().length; ++i) { + inputFile = cmd.getArgs()[i]; + if (inputIsValid(inputFile)) { + break; + } + } + + if (inputFile == null) { + System.err.println("A justification pattern is required : no input diagram in " + args); + System.exit(1); + } + String inputRealizationFile = null; + String inputActionFile = null; + + if (cmd.hasOption("rea")) { + inputRealizationFile = cmd.getOptionValue("rea"); + } + + if (cmd.hasOption("act")) { + inputActionFile = cmd.getOptionValue("act"); + } + + //TODO : Why this number? + generateFiles(cmd, inputFile, + generateOutputName(outputOption, 0, inputFile), + inputRealizationFile, + inputActionFile); + + } + + private static CommandLine setup(String[] args) { + Options options = new Options(); + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + + Option output = new Option("o", "output", true, "output file path"); + options.addOption(output); + + Option rea = new Option("rea","realization",true, "indicate the realization file"); + Option action = new Option("act","action",true, "indicate the action file"); + + options.addOption(rea); + options.addOption(action); + + options.addOption("svg", "generate graph"); + options.addOption("gv", "generate gv file"); + options.addOption("td", "generate todo list"); + options.addOption("svgR", "generate realization graph"); + + try { + return parser.parse(options, args); + } catch (org.apache.commons.cli.ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp("utility-name", options); + + System.exit(1); + return null; + } + } + + private static void generateFiles(CommandLine cmd, String inputFilePath, String outputFilePath, + String inputRealizationFilePath,String inputActionFile) throws IOException { + System.out.println("Generate from \n" + new File(inputFilePath).getAbsolutePath() + "\nTo \n" + + new File(outputFilePath).getAbsolutePath()); + if (inputRealizationFilePath != null) { + System.out.println("With Realization \n" + new File(inputRealizationFilePath).getAbsolutePath() + "\n"); + } + if (inputActionFile != null) { + System.out.println("And With Action \n" + new File(inputActionFile).getAbsolutePath() + "\n"); + } + + + JustificationDiagram diagram = createDiagram(inputFilePath); + + // if inputActionFile is not null, I analyze the action file + if(inputActionFile != null) { + ActionNodeParsing actionNodeParsing = new ActionNodeParsing(inputActionFile); + diagram.setActionNode(actionNodeParsing.getActionNodes()); + } + + // if inputRealizationFilePath is not null, I analyze the realization file and the state of the nodes + if(inputRealizationFilePath != null) { + RealizationParser realizationParser; + List labels = new ArrayList<>(); + try { + realizationParser = new RealizationParser(inputRealizationFilePath); + labels = realizationParser.getLabelList(); + } catch (ExceptionParsingRealizationFile e) { + System.out.println("Error reading Realization File" + e); + } + diagram.analysesDiagrammeRelation(labels); + + } + + if (cmd.hasOption("svgR")) { + if (cmd.hasOption("rea")) { + GraphDrawerRealization drawer = new GraphDrawerRealization(); + StringBuilder gv = drawer.draw(diagram); + + InputStream dot = new ByteArrayInputStream(gv.toString().getBytes()); + MutableGraph g = new guru.nidi.graphviz.parse.Parser().read(dot); + Graphviz.fromGraph(g).render(Format.SVG).toFile(new File(outputFilePath + "_REA" + ".svg")); + } else { + System.err.println( + "\nimpossible to generate a realization diagram without a realization file. Please add a realization file and the action file\n" + + "'example.jd -o output/example -rea example/realization.txt -act example/action.json -svgR'"); + } + + } + if (cmd.hasOption("svg")) { + GraphDrawer drawer = new GraphDrawer(); + StringBuilder gv = drawer.draw(diagram); + + InputStream dot = new ByteArrayInputStream(gv.toString().getBytes()); + MutableGraph g = new guru.nidi.graphviz.parse.Parser().read(dot); + Graphviz.fromGraph(g).render(Format.SVG).toFile(new File(outputFilePath + ".svg")); + } + if (cmd.hasOption("gv")) { + GraphDrawer drawer = new GraphDrawer(); + StringBuilder gv = drawer.draw(diagram); + + PrintWriter out = new PrintWriter(new FileWriter(outputFilePath + ".gv")); + out.print(gv); + out.close(); + } + if (cmd.hasOption("td")) { + PrintWriter out = new PrintWriter(new FileWriter(outputFilePath + ".todo")); + RequirementsLister lister = new RequirementsLister(); + out.print(lister.generate(diagram)); + out.close(); + } + } + + private static boolean inputIsValid(String in) { + if (!in.matches(".*\\.(jd|txt|json)")) { + System.err.println(in + " is not a valid name. The input file should end with .jd or .txt"); + return false; + } + return true; + } + + private static String generateOutputName(String outputOption, int index, String inputOption) { + if (outputOption != null) { + if (index > 0) { + return outputOption + index; + } else { + return outputOption; + } + } else { + return inputOption.split("\\.")[0]; + } + } + + private static boolean outputIsValid(String out) { + if (out.matches(".*\\..*")) { + System.err.println(out + "The output file should not have an extension"); + return false; + } + + // Create path to outputfile if needed + File outputFile = new File(out); + if (!(outputFile.exists())) { + String[] parts = out.split("/"); + if (parts.length != 1) { + String outDir = out.substring(0, out.lastIndexOf('/')); + new File(outDir).mkdirs(); + } + } + + return true; + } + + public static JustificationDiagram createDiagram(String file) { + + JDInitializer factory = new JDInitializer(); + factory.visit(parseAntlr(file)); + JustificationDiagram newDiagram= factory.getDiagram(); + JDLinker linker = new JDLinker(newDiagram); + linker.visit(parseAntlr((file))); + + return linker.getDiagram(); + } + + public static ParseTree parseAntlr(String file) { + // create a CharStream that reads from standard input + CharStream input = null; // create a lexer that feeds off of input CharStream + try { + input = CharStreams.fromFileName(file); + } catch (IOException e) { + System.err.println("the file " + file + "can't be parsed IO exeception is raised"); + } + JustificationDiagramLexer lexer = new JustificationDiagramLexer(input); // create a buffer of tokens pulled from + // the lexer + CommonTokenStream tokens = new CommonTokenStream(lexer); // create a parser that feeds off the tokens buffer + JustificationDiagramParser parser = new JustificationDiagramParser(tokens); + return parser.diagram(); + } + +} diff --git a/src/main/java/Log4J2PropertiesConf.java b/src/main/java/Log4J2PropertiesConf.java new file mode 100644 index 0000000..dc070ef --- /dev/null +++ b/src/main/java/Log4J2PropertiesConf.java @@ -0,0 +1,13 @@ +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +public class Log4J2PropertiesConf { + private static Logger logger = LogManager.getLogger(Log4J2PropertiesConf.class); + void performSomeTask(){ + logger.debug("This is a debug message"); + logger.info("This is an info message"); + logger.warn("This is a warn message"); + logger.error("This is an error message"); + logger.fatal("This is a fatal message"); + logger.trace("This is a trace message"); + } +} \ No newline at end of file diff --git a/src/main/java/command/CSVReader.java b/src/main/java/command/CSVReader.java new file mode 100644 index 0000000..950c7f9 --- /dev/null +++ b/src/main/java/command/CSVReader.java @@ -0,0 +1,87 @@ +package command; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class CSVReader { + + private static final Logger logger = LogManager.getLogger(CSVReader.class); + + private List> records = new ArrayList<>(); + private String path; + + private static final String DEFAULT_COMMA_DELIMITER = ","; + + private String commaDelimiter = DEFAULT_COMMA_DELIMITER; + + + public CSVReader(String path) throws IOException { + this(path,DEFAULT_COMMA_DELIMITER); + } + + public CSVReader(String path, String pcommaDelimiter) throws IOException { + super(); + this.path = path; + this.commaDelimiter = pcommaDelimiter; + records = readCSV(); + } + + + public List> readCSV() throws IOException { + records = new ArrayList<>(); + try ( + BufferedReader input = new BufferedReader(new FileReader(path)); + ){ + String line; + while ((line = input.readLine()) != null) { + String[] values = line.split(commaDelimiter); + records.add(Arrays.asList(values)); + } + return records; + } + catch (FileNotFoundException e) { + String logMsg =String.format("The file %s was not found",path); + logger.error(logMsg); + throw e; + } catch (IOException ie) { + String logMsg =String.format("Not able to read the file %s",path); + logger.error(logMsg); + throw ie; + } + } + + //Todo : Tests it + public List getLine(int indice ) throws OutOfCSVException { + if (indice >= records.size()) + throw new OutOfCSVException(path,indice); + return records.get(indice); + } + + //The first line is number 0. Be careful, it's often a header line. + public String getValue(String column, int lineIndice) throws OutOfCSVException { + int columnIndice= records.get(0).indexOf(column); + if (columnIndice == -1) { + throw new OutOfCSVException(path, "unexpected column name :"+ column); + } + List line = getLine(lineIndice); + return line.get(columnIndice); + } + + //The first line is number 0. Be careful, it's often a header line. + public String getValue(int column, int lineIndice) throws OutOfCSVException { + List line = getLine(lineIndice); + return line.get(column); + } + + + + +} diff --git a/src/main/java/command/Command.java b/src/main/java/command/Command.java new file mode 100644 index 0000000..f9be38e --- /dev/null +++ b/src/main/java/command/Command.java @@ -0,0 +1,7 @@ +package command; + +import java.util.ArrayList; + +public interface Command { + ArrayList execute(String args); +} diff --git a/src/main/java/command/CommandCheckCoverage.java b/src/main/java/command/CommandCheckCoverage.java new file mode 100644 index 0000000..0c5d2b1 --- /dev/null +++ b/src/main/java/command/CommandCheckCoverage.java @@ -0,0 +1,174 @@ +package command; + + + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class CommandCheckCoverage implements Command { + + private static final Logger logger = LogManager.getLogger(CommandCheckCoverage.class); + + private static final Object MISSED = "INSTRUCTION_MISSED"; + private static final Object COVERED = "INSTRUCTION_COVERED"; + + private String path; + private String operator; + private int coverage; + + public CommandCheckCoverage(String path, int coverage) { + this.path = path; + this.coverage = coverage; + + } + + public CommandCheckCoverage() { + this(null, 0); + } + + @Override + public ArrayList execute(String args) { + setArgs(args); + ArrayList result = new ArrayList<>(); + + if (Boolean.FALSE.equals(CommandHelper.inputIsCSVFile(path))) { + result.add(CommandHelper.FAIL); + result.add("Unexpected format for " + path); + } + + int coverageFind = 0; + + try { + coverageFind = parsingCSVJacocoReport(); + } catch (IOException e) { + String logMsg = String.format("error Parsing CSV file : %s", path); + logger.error(logMsg); + result.add(CommandHelper.FAIL); + result.add(logMsg); + } + + String isDone = searchIdItsDone(coverageFind); + + String step = ""; + if (isDone.contains("true")) { + // [x] Current coverage is 80, it's > 50 + step = "[x] Current coverage is " + coverageFind + ", it's " + operator + " " + coverage + " "; + } else { + // [ ] Current coverage is 30, it's not > 50 + step = "[ ] Current coverage is " + coverageFind + ", it's not " + operator + " " + coverage + " "; + } + + result.add(isDone); + result.add(step); + + return result; + + } + + public String searchIdItsDone(int coverageFind) { + String logMsg = String.format("compare %d %s %d", coverageFind, operator, coverage); + logger.debug(logMsg); + return String.valueOf(CommandHelper.compareInt(coverageFind, coverage, operator)); + } + + /** + * + * Used to analyze the "index.html" of the jacoco report and find the total + * coverage of the project. + * + * @return return the total coverage of the project + */ + /* + * public int parsingHTMLJacocoReport() { int coverageFind = 0; BufferedReader + * input = null; + * + * if(inputIsValid(path)) { try { input = new BufferedReader(new + * FileReader(path)); } catch (FileNotFoundException e) { + * System.err.println("The file '" + path + + * "' was not found. Please indicate the index.html of the jacoco report."); + * return 0; } String line; try { while ((line = input.readLine()) != null) { + * int position = line.indexOf(""); coverageFind = + * Integer.parseInt(line.substring(position +17,position+19)); } } catch + * (IOException e) { System.err.println("The file " + path + " was null" ); } + * try { input.close(); } catch (IOException e) { + * System.err.println("The input " + input + " was null" ); } } + * + * return coverageFind; + * + * } + */ + + /** + * + * Used to analyze the "jacoco.csv" of the jacoco report and find the total + * coverage of the project. based on + * https://www.baeldung.com/java-csv-file-array + * + * @return return the total coverage of the project + * @throws IOException + */ + public int parsingCSVJacocoReport() throws IOException { + + int coverageFind = 0; + + CSVReader cs = new CSVReader(path); + List> records = cs.readCSV(); + + int indiceCovered = records.get(0).indexOf(COVERED); + int indiceMissed = records.get(0).indexOf(MISSED); + + // Remove the header, i.e. the first line + records.remove(0); + logger.debug("Records after removing the first line : {}", records); + int covered = getSumOfOneIndice(indiceCovered, records); + logger.debug("Covered : {}", covered); + int missed = getSumOfOneIndice(indiceMissed, records); + logger.debug("Missed : {}", missed); + if (missed + covered == 0) + coverageFind = 0; + else + coverageFind = (100 * covered) / (missed + covered); + return coverageFind; + } + + private int getSumOfOneIndice(int indice, List> records) { + + int value = 0; + + for (List line : records) { + try { + value += Integer.parseInt(line.get(indice)); + } catch (NumberFormatException e) { + String logMsg = String.format("error Parsing CSV file, expecting a number : %s", line.get(indice)); + logger.error(logMsg); + throw e; + } + } + return value; + } + + /** + * Set the path, the operator and the coverage. + * + * @param args the normal ligne, example : "target/site/jacoco/index.html < 10" + */ + public void setArgs(String args) { + // example : + // justification/IUTtest/test < 10 + String[] tmp = args.split(" "); + if (tmp.length != 3) { + logger.error("%s is not a valid command to check coverage in jacoco report.",args); + return; + } + path = tmp[0]; + operator = tmp[1]; + coverage = Integer.parseInt(tmp[2]); + } + + + +} diff --git a/src/main/java/command/CommandCheckValueInCSV.java b/src/main/java/command/CommandCheckValueInCSV.java new file mode 100644 index 0000000..d8a3e1f --- /dev/null +++ b/src/main/java/command/CommandCheckValueInCSV.java @@ -0,0 +1,128 @@ +package command; + +import java.util.ArrayList; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + + +/** + * @author blay + * + */ +public class CommandCheckValueInCSV implements Command { + + + private static final Logger logger = LogManager.getLogger(CommandCheckValueInCSV.class); + + private String path; + private String column; + private String operator; + private String line; + private int valueToCompare; + + @Override + public ArrayList execute(String args) { + setArgs(args); + ArrayList result = new ArrayList<>(); + + // Read the CSV File + if (Boolean.FALSE.equals(CommandHelper.inputIsCSVFile(path))) { + result.add(CommandHelper.FAIL); + String logMsg =String.format("not a csv File :%s" , path); + result.add(logMsg); + logger.error(logMsg); + return result; + } + + CSVReader csvReader; + try { + csvReader = new CSVReader(path); + } catch (Exception e) { + String logMsg =String.format("error reading the file : %s %n %s", path, e.getClass()); + logger.error(logMsg); + result.add(CommandHelper.FAIL); + return result; + } + + // Get the value in CSV + int lineNumber = -1; + String value = ""; + try { + lineNumber = Integer.parseInt(line); + + int columnNumber = -1; + try { + columnNumber = Integer.parseInt(column); + value = csvReader.getValue(columnNumber, lineNumber); + } catch (NumberFormatException e) { + try { + value = csvReader.getValue(column, lineNumber); + } catch (OutOfCSVException e1) { + String logMsg =String.format("Reference to an invalid Cell (%s, %d)in the csv : %s", column,lineNumber, e); + logger.error(logMsg); + result.add(CommandHelper.FAIL); + result.add(logMsg); + return result; + } + } catch (OutOfCSVException e) { + String logMsg =String.format("Reference to an invalid Cell_ (%d, %d)in the csv : %s", columnNumber,lineNumber, e); + logger.error(logMsg); + result.add(CommandHelper.FAIL); + result.add(logMsg); + return result; + } + // Check value + int valueInt; + try { + valueInt = Integer.parseInt(value); + } catch (NumberFormatException e2) { + String logMsg =String.format("%s : Not an integer in Cell (%d, %d)in the csv %s : %s",value, columnNumber,lineNumber, path, e2); + logger.error(logMsg); + result.add(CommandHelper.FAIL); + result.add(logMsg); + return result; + } + + boolean resCommand = CommandHelper.compareInt(valueInt, valueToCompare, operator); + + if (resCommand) { + result.add(CommandHelper.TRUE); + result.add("[x] following property is verified : " + "value[" + column + " , " + line + "] =" + + valueInt + " " + operator + valueToCompare); + } + else { + result.add(CommandHelper.FALSE); + result.add("[] following property is not verified : " + "value[" + column + " , " + line + "] =" + + valueInt + " " + operator + valueToCompare); + } + return result; + } catch (NumberFormatException e2) { + String logMsg =String.format("%s is not a line number", line); + logger.error(logMsg); + result.add(CommandHelper.FAIL); + result.add(logMsg); + return result; + } + + } + + // example + // csvFile.scv "INSTRUCTION_MISSED" "1" "==" 546 + // csvFile.scv "3" "1" ">" 500 + private void setArgs(String args) { + String[] tmp = args.split(" "); + if (tmp.length != 5) { + logger.error("%s is not a valid command to check value in a CSV file (5 args are expected).",args); + return; + } + path = tmp[0]; + column = tmp[1]; + line = tmp[2]; + operator = tmp[3]; + valueToCompare = Integer.parseInt(tmp[4]); + String logMsg =String.format("CheckValueInCSV action - args : %s : [%s, %s] %s %d", path, column, line, operator, valueToCompare); + logger.info(logMsg); + } + +} diff --git a/src/main/java/command/CommandFactory.java b/src/main/java/command/CommandFactory.java new file mode 100644 index 0000000..c2c8c27 --- /dev/null +++ b/src/main/java/command/CommandFactory.java @@ -0,0 +1,59 @@ +package command; + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + + +public class CommandFactory { + + private static CommandFactory instance; // Singleton + + private static final Logger logger = LogManager.getLogger(CommandFactory.class); + + private static final String ANTECEDENT = "command.Command"; + + private CommandFactory() { + //nothing to do + } + + + public List executeCommand(String commandLigne) { + + String commandName = commandLigne.split(" ")[0]; + String args = ""; + + args = commandLigne.replace(commandName + " ", ""); + + // Use reflexivity + try { + Class commandClass = Class.forName(ANTECEDENT + commandName); + Command command = (Command) commandClass.getDeclaredConstructor().newInstance(); + return command.execute(args); + } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | IllegalArgumentException + | InvocationTargetException | NoSuchMethodException | SecurityException e) { + return unexpectedBehavior(commandName, args, e); + } + } + + private ArrayList unexpectedBehavior(String commandName, String args, Exception e) { + String logMsg = String.format("This command does not exist or there is a problem with args, please check the command validity : %n %s %s %n %s", + commandName, args, e); + logger.error(logMsg); + ArrayList result = new ArrayList<>(); + result.add("false"); + result.add(commandName + " this command does not exist with " + args); + return result; + } + + /* Singleton pattern */ + public static CommandFactory getInstance() { + if (instance == null) { + instance = new CommandFactory(); + } + return instance; + } +} diff --git a/src/main/java/command/CommandHelper.java b/src/main/java/command/CommandHelper.java new file mode 100644 index 0000000..4d83292 --- /dev/null +++ b/src/main/java/command/CommandHelper.java @@ -0,0 +1,45 @@ +package command; + + + +public class CommandHelper { + + public static final String CSV = "csv"; + public static final String FAIL = "fail"; + public static final String TRUE = "true"; + public static final String FALSE = "false"; + public static final String HTML = "html"; + + + private CommandHelper() { + throw new IllegalStateException("Utility class"); + } + + //todo : raise an exception when the operator is not expected + public static boolean compareInt (int value1, int value2, String operator) { + if(operator.equals("==")) + return value1 == value2; + if(operator.equals("<") ) + return value1 < value2; + if(operator.equals("<=")) + return value1 <= value2; + if(operator.equals(">")) + return value1 > value2; + if(operator.equals(">=") ) + return value1 >= value2; + if(operator.equals("!=") ) + return value1 != value2; + + return false; + } + + + public static String extension(String in) { + return in.substring(in.lastIndexOf(".")+1); + } + + public static Boolean inputIsCSVFile(String in) { + String extension = extension(in); + return extension.contentEquals(CSV); + } +} diff --git a/src/main/java/command/OutOfCSVException.java b/src/main/java/command/OutOfCSVException.java new file mode 100644 index 0000000..3d13da6 --- /dev/null +++ b/src/main/java/command/OutOfCSVException.java @@ -0,0 +1,22 @@ +package command; + +public class OutOfCSVException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 1L; + + public OutOfCSVException(String message) { + super(message); + } + + public OutOfCSVException(String path, int indice) { + this("Out of CVS Exception for" + path +" to" + indice); + } + + public OutOfCSVException(String path, String message) { + this(message + "for : " + path); + } + +} diff --git a/src/main/java/export/GraphDrawer.java b/src/main/java/export/GraphDrawer.java index f6f44b8..03eb3ea 100644 --- a/src/main/java/export/GraphDrawer.java +++ b/src/main/java/export/GraphDrawer.java @@ -2,7 +2,6 @@ import justificationDiagram.JustificationDiagram; import models.*; -import models.Relation; public class GraphDrawer implements JDVisitor { private final StringBuilder gv = new StringBuilder(); @@ -16,91 +15,84 @@ public StringBuilder draw(JustificationDiagram diagram) { public void visitDiagram(JustificationDiagram diagram) { gv.append("digraph G {\n\trankdir = \"BT\"\n"); - for (String alias : diagram.nodes.keySet()) { - diagram.nodes.get(alias).accept(this); + for (String alias : diagram.getNodes().keySet()) { + diagram.getNodes().get(alias).accept(this); } - - for (Relation relation : diagram.relations) { + for (Relation relation : diagram.getRelations()) { relation.accept(this); } - + GraphDrawerLayout layout = new GraphDrawerLayout(); + gv.append(layout.draw(diagram)); gv.append("}\n"); } @Override public void visitNode(Node node) { - gv.append("\t").append(node.alias).append(" [shape=box, label=").append(node.label).append("];\n"); + gv.append("\t").append(node.getAlias()).append(" [shape=box, label=").append(node.getAlias()).append("];\n"); } - + @Override public void visitConclusion(Conclusion conclusion) { - if (conclusion.restriction != null) { - gv.append("\t").append(conclusion.alias).append(" [shape=none margin=0 label=<" + "
").append(conclusion.label, 1, conclusion.label.length() - 1) + "COLOR=\"royalblue\">").append(conclusion.getLabel(), 1, conclusion.getLabel().length() - 1) .append("
") - .append(conclusion.restriction, 1, conclusion.restriction.length() - 1) + .append(conclusion.getRestriction(), 1, conclusion.getRestriction().length() - 1) .append("
>];\n"); } else { - gv.append("\t").append(conclusion.alias).append(" [shape=box, style=\"filled,rounded\", color=royalblue, " + - "fillcolor=gray75, label=").append(conclusion.label).append("];\n"); + gv.append("\t").append(conclusion.getAlias()).append(" [shape=box, style=\"filled,rounded\", color=royalblue, " + + "fillcolor=gray75, label=").append(conclusion.getLabel()).append("];\n"); } } @Override public void visitSubConclusion(SubConclusion subConclusion) { - if (subConclusion.restriction != null) { - gv.append("\t").append(subConclusion.alias).append(" [shape=none margin=0 label=<" + "
").append(subConclusion.label, 1, subConclusion.label.length() - 1) + "COLOR=\"royalblue\">").append(subConclusion.getLabel(), 1, subConclusion.getLabel().length() - 1) .append("
") - .append(subConclusion.restriction, 1, subConclusion.restriction.length() - 1) + .append(subConclusion.getRestriction(), 1, subConclusion.getRestriction().length() - 1) .append("
>];\n"); } else { - gv.append("\t").append(subConclusion.alias).append(" [shape=box, style=\"filled,rounded\", color=royalblue, " + - "fillcolor=none, label=").append(subConclusion.label).append("];\n"); + gv.append("\t").append(subConclusion.getAlias()).append(" [shape=box, style=\"filled,rounded\", color=royalblue, " + + "fillcolor=none, label=").append(subConclusion.getLabel()).append("];\n"); } } @Override public void visitStrategy(Strategy strategy) { - gv.append("\t").append(strategy.alias).append(" [shape=polygon, style=filled, fillcolor=darkolivegreen3, sides=4, skew=.4, label=") - .append(strategy.label).append("];\n"); + gv.append("\t").append(strategy.getAlias()).append(" [shape=polygon, style=filled, fillcolor=darkolivegreen3, sides=4, skew=.4, label=") + .append(strategy.getLabel()).append("];\n"); } @Override public void visitDomain(Domain domain) { - gv.append("\t").append(domain.alias).append(" [shape=ellipse, style=\"filled,dashed\", fillcolor=darkseagreen1, label=").append(domain.label).append("];\n"); + gv.append("\t").append(domain.getAlias()).append(" [shape=ellipse, style=\"filled,dashed\", fillcolor=darkseagreen1, label=").append(domain.getLabel()).append("];\n"); } @Override public void visitRationale(Rationale rationale) { - gv.append("\t").append(rationale.alias).append(" [shape=ellipse, style=filled, fillcolor=peachpuff, label=").append(rationale.label).append("];\n"); + gv.append("\t").append(rationale.getAlias()).append(" [shape=ellipse, style=filled, fillcolor=peachpuff, label=").append(rationale.getLabel()).append("];\n"); } @Override public void visitSupport(Support support) { - gv.append("\t").append(support.alias).append(" [shape=box, style=\"filled,rounded\", fillcolor=skyblue, label=").append(support.label).append("];\n"); + gv.append("\t").append(support.getAlias()).append(" [shape=box, style=\"filled,rounded\", color=black fillcolor=skyblue, label=").append(support.getLabel()).append("];\n"); } @Override public void visitRelation(Relation relation) { - gv.append("\t").append(relation.from.alias).append(" -> ").append(relation.to.alias); + gv.append("\t").append(relation.getFrom().getAlias()).append(" -> ").append(relation.getTo().getAlias()); - if (relation.collapsed) { + if (relation.isCollapsed()) { gv.append(" [style=dashed]"); } gv.append(";\n"); - - if (relation.from instanceof Domain) { - gv.append("\t{rank = same; ").append(relation.from.alias).append("; ").append(relation.to.alias).append(";}\n"); - } else if (relation.from instanceof Rationale) { - gv.append("\t").append(relation.to.alias).append(" -> ").append(relation.from.alias).append(" [style=invis];\n"); - gv.append("\t{rank = same; ").append(relation.from.alias).append("; ").append(relation.to.alias).append(";}\n"); - } } } diff --git a/src/main/java/export/GraphDrawerLayout.java b/src/main/java/export/GraphDrawerLayout.java new file mode 100644 index 0000000..eadd204 --- /dev/null +++ b/src/main/java/export/GraphDrawerLayout.java @@ -0,0 +1,68 @@ +package export; + +import justificationDiagram.JustificationDiagram; +import models.*; + +public class GraphDrawerLayout implements JDVisitor { + private final StringBuilder gv = new StringBuilder(); + + public StringBuilder draw(JustificationDiagram diagram) { + this.visitDiagram(diagram); + return gv; + } + + @Override + public void visitDiagram(JustificationDiagram diagram) { + for (String alias : diagram.getNodes().keySet()) { + diagram.getNodes().get(alias).accept(this); + } + for (Relation relation : diagram.getRelations()) { + relation.accept(this); + } + } + + @Override + public void visitNode(Node node) { + //Do nothing because Node is too general + } + + @Override + public void visitConclusion(Conclusion conclusion) { + //Do nothing because of ... + } + + @Override + public void visitSubConclusion(SubConclusion subConclusion) { + //Do nothing because of ... + } + + @Override + public void visitStrategy(Strategy strategy) { + //Do nothing because of ... + } + + @Override + public void visitDomain(Domain domain) { + for (Relation relation : domain.getOutputs()) { + gv.append("\t{rank = same; ").append(domain.getAlias()).append("; ").append(relation.getTo().getAlias()).append(";}\n"); + } + } + + @Override + public void visitRationale(Rationale rationale) { + for (Relation relation : rationale.getOutputs()) { + gv.append("\t").append(relation.getTo().getAlias()).append(" -> ").append(relation.getFrom().getAlias()).append(" [style=invis];\n"); + gv.append("\t{rank = same; ").append(rationale.getAlias()).append("; ").append(relation.getTo().getAlias()).append(";}\n"); + } + } + + @Override + public void visitSupport(Support support) { + //Do nothing because of ... + } + + @Override + public void visitRelation(Relation relation) { + //Do nothing because of ... + } +} \ No newline at end of file diff --git a/src/main/java/export/GraphDrawerRealization.java b/src/main/java/export/GraphDrawerRealization.java new file mode 100644 index 0000000..5dbd3d3 --- /dev/null +++ b/src/main/java/export/GraphDrawerRealization.java @@ -0,0 +1,134 @@ +package export; + +import justificationDiagram.JustificationDiagram; +import models.*; + +public class GraphDrawerRealization implements JDVisitor { + private StringBuilder gv = new StringBuilder(); + + private static final String COLOR = "COLOR=\""; + + // color to use according to the state of the node (todo or done) + private String[] colorUsedModel = {"red3","blue3"}; + private String colorUsed; + + public StringBuilder draw(JustificationDiagram diagram) { + + this.visitDiagram(diagram); + return gv; + + } + + @Override + public void visitDiagram(JustificationDiagram diagram) { + gv.append("digraph G {\n\trankdir = \"BT\"\n"); + + for (String alias : diagram.getNodes().keySet()) { + diagram.getNodes().get(alias).accept(this); + } + for (Relation relation : diagram.getRelations()) { + relation.accept(this); + } + GraphDrawerLayout layout = new GraphDrawerLayout(); + gv.append(layout.draw(diagram)); + gv.append("}\n"); + } + + @Override + public void visitNode(Node node) { + gv.append("\t").append(node.getAlias()).append(" [shape=box, label=").append(node.getLabel()).append("];\n"); + } + + @Override + public void visitConclusion(Conclusion conclusion) { + setColorUsed(conclusion); + + if (conclusion.getRestriction() != null) { + + gv.append("\t").append(conclusion.getAlias()).append(" [shape=none margin=0 fontcolor= " + colorUsed + " label=<" + + "
").append(conclusion.getLabel(), 1, conclusion.getLabel().length() - 1) + .append("
") + .append(conclusion.getRestriction(), 1, conclusion.getRestriction().length() -1) + .append("
>];\n"); + } else { + gv.append("\t").append(conclusion.getAlias()).append(" [shape=box, style=\"filled,rounded\", fontcolor= " + colorUsed + " color=\"" + colorUsed + "\", " + + "fillcolor=gray75, label=").append(conclusion.getLabel()).append("];\n"); + } + } + + @Override + public void visitSubConclusion(SubConclusion subConclusion) { + + setColorUsed(subConclusion); + + if (subConclusion.getRestriction() != null) { + gv.append("\t").append(subConclusion.getAlias()).append(" [shape=none margin=0 fontcolor= " + colorUsed + " label=<" + + "
").append(subConclusion.getLabel(), 1, subConclusion.getLabel().length() - 1) + .append("
") + .append(subConclusion.getRestriction(), 1, subConclusion.getRestriction().length() -1) + .append("
>];\n"); + } else { + gv.append("\t").append(subConclusion.getAlias()).append(" [shape=box, style=\"filled,rounded\", fontcolor= " + colorUsed + " color=\"" + colorUsed + "\", " + + "fillcolor=none, label=").append(subConclusion.getLabel()).append("];\n"); + } + } + + @Override + public void visitStrategy(Strategy strategy) { + setColorUsed(strategy); + + gv.append("\t").append(strategy.getAlias()).append(" [shape=polygon, style=filled, fontcolor= " + colorUsed + " fillcolor=darkolivegreen3, color=\"" + colorUsed + "\" sides=4, skew=.4, label=") + .append(strategy.getLabel()).append("];\n"); + } + + @Override + public void visitDomain(Domain domain) { + setColorUsed(domain); + gv.append("\t").append(domain.getAlias()).append(" [shape=ellipse, style=\"filled,dashed\", fontcolor= " + colorUsed + " fillcolor=darkseagreen1, color=\"" + colorUsed + "\" label=").append(domain.getLabel()).append("];\n"); + } + + @Override + public void visitRationale(Rationale rationale) { + setColorUsed(rationale); + gv.append("\t").append(rationale.getAlias()).append(" [shape=ellipse, style=filled,fontcolor= " + colorUsed + ", fillcolor=peachpuff, color=\"" + colorUsed + "\" label=").append(rationale.getLabel()).append("];\n"); + } + + @Override + public void visitSupport(Support support) { + setColorUsed(support); + + gv.append("\t").append(support.getAlias()).append(" [shape=box, style=\"filled,rounded\", fontcolor= " + colorUsed + ", fillcolor=skyblue, color=\"" + colorUsed + "\" label=").append(support.getLabel()).append("];\n"); + } + + @Override + public void visitRelation(Relation relation) { + gv.append("\t").append(relation.getFrom().getAlias()).append(" -> ").append(relation.getTo().getAlias()); + + if (relation.isCollapsed()) { + gv.append(" [style=dashed]"); + } + gv.append(";\n"); + } + + /** + * Analyse the state of the current node and set the corresponding color + * + * @param node to anlyses + */ + public void setColorUsed(Node node) { + + colorUsed = colorUsedModel[0]; + + if(node.getState().equals(State.DONE)) { + colorUsed = colorUsedModel[1]; + } + } + + + } diff --git a/src/main/java/export/JDVisitor.java b/src/main/java/export/JDVisitor.java index 9b45c23..079938a 100644 --- a/src/main/java/export/JDVisitor.java +++ b/src/main/java/export/JDVisitor.java @@ -2,7 +2,6 @@ import justificationDiagram.JustificationDiagram; import models.*; -import models.Relation; public interface JDVisitor { diff --git a/src/main/java/export/RequirementsLister.java b/src/main/java/export/RequirementsLister.java new file mode 100644 index 0000000..950fac4 --- /dev/null +++ b/src/main/java/export/RequirementsLister.java @@ -0,0 +1,170 @@ +package export; + + +import justificationDiagram.JustificationDiagram; +import models.*; + +public class RequirementsLister implements JDVisitor { + StringBuilder list; + + // model to use according to the state of the node (todo or done) + String[] model = {"[ ]\t","[X]\t"}; + String modelUsed = model[0]; + + public StringBuilder generate(JustificationDiagram diagram) { + TopologicalSort sort = new TopologicalSort(diagram); + diagram.accept(this); + + + for (Node node : sort.order) { + node.accept(this); + + } + + return list; + } + + @Override + public void visitDiagram(JustificationDiagram diagram) { + list = new StringBuilder("Requirements list\n\n"); + } + + @Override + public void visitNode(Node node) { + setModelUsed(node); + String stringToWrite = setStringToWrite(node); + + list.append(modelUsed).append(stringToWrite, 1, stringToWrite.length() - 1).append("\n"); + setLogForFiles(node); + } + + @Override + public void visitConclusion(Conclusion conclusion) { + setModelUsed(conclusion); + String stringToWrite = setStringToWrite(conclusion); + + list.append("-----------------------------------------------\n" + modelUsed + "\t") + .append(stringToWrite, 1, stringToWrite.length() - 1); + setLogForFiles(conclusion); + list.append("\n-----------------------------------------------"); + } + + @Override + public void visitSubConclusion(SubConclusion subConclusion) { + setModelUsed(subConclusion); + String stringToWrite = setStringToWrite(subConclusion); + list.append(modelUsed).append(stringToWrite, 1, stringToWrite.length() - 1).append("\n"); + setLogForFiles(subConclusion); + + } + + @Override + public void visitStrategy(Strategy strategy) { + if(!strategy.getSteps().isEmpty()) { + setModelUsed(strategy); + String stringToWrite = setStringToWrite(strategy); + + list.append(modelUsed).append(stringToWrite, 1, stringToWrite.length() - 1).append("\n"); + setLogForFiles(strategy); + } + } + + @Override + public void visitDomain(Domain domain) { + if(!domain.getSteps().isEmpty()) { + setModelUsed(domain); + String stringToWrite = setStringToWrite(domain); + + list.append(modelUsed).append(stringToWrite, 1, stringToWrite.length() - 1).append("\n"); + setLogForFiles(domain); + } + + } + + @Override + public void visitRationale(Rationale rationale) { + if(!rationale.getSteps().isEmpty()) { + setModelUsed(rationale); + String stringToWrite = setStringToWrite(rationale); + + list.append(modelUsed).append(stringToWrite, 1, stringToWrite.length() - 1).append("\n"); + setLogForFiles(rationale); + } + + } + + @Override + public void visitSupport(Support support) { + setModelUsed(support); + String stringToWrite = setStringToWrite(support); + list.append(modelUsed).append(stringToWrite, 1, stringToWrite.length() - 1).append("\n"); + setLogForFiles(support); + + } + + @Override + public void visitRelation(Relation relation) { + //Do nothing because a relation doesn't imply a requirement + } + + + /** + * Analyse the state of the node and chose the corresponding model to used + * + * @param node current node to analyse. + */ + public void setModelUsed(Node node) { + if (node.getState().equals(State.DONE)) { + modelUsed = model[1]; + + } + else { + modelUsed = model[0]; + } + } + + /** + * Checks if the current node has a reference and if it is optional. + * If this is the case, return "'label' - references: 'ref' (optional)". + * If there is only the reference, return "'label'" - references: 'ref'". + * If there is no reference and the node is optional, return "'label' (optional)". + * Otherwise, return "label". + * + * @param node to check + * @return string to write in the todo file. + */ + public String setStringToWrite(Node node) { + if(node.getActionNode().getReference() != null && !node.getActionNode().getReference().contains("!noRef!") && !node.getActionNode().getReference().equals(" ")) { + if(node.getActionNode().isOptional()) { + return node.getLabel().substring(0,node.getLabel().length()-1) + " - reference : " + node.getActionNode().getReference() + " (optional) \""; + } + else { + return node.getLabel().substring(0,node.getLabel().length()-1) + " - reference : " + node.getActionNode().getReference() + "\""; + } + + } + else { + if(node.getActionNode().isOptional()) { + return node.getLabel().substring(0,node.getLabel().length()-1) + " (optional) \""; + } + else { + return node.getLabel(); + } + } + + } + + /** + * Take the 'log' of the current node and write the log of the files in the 'list' (if they have an error or not) + * + * @param node to check + */ + public void setLogForFiles(Node node) { + if(!node.getSteps().isEmpty()) { + for (String step : node.getSteps()) { + list.append("\t").append(step, 0, step.length()).append("\n"); + } + } + + } + } diff --git a/src/main/java/export/TopologicalSort.java b/src/main/java/export/TopologicalSort.java new file mode 100644 index 0000000..afa0858 --- /dev/null +++ b/src/main/java/export/TopologicalSort.java @@ -0,0 +1,79 @@ +package export; + +import models.Node; +import models.Relation; +import java.util.*; + +import justificationDiagram.JustificationDiagram; + +public class TopologicalSort { + private Map toBeVisited; + private Queue finishingTime; + private int time; + LinkedList order; + + private static class OrderedNode implements Comparable { + int weight; + Node node; + + public OrderedNode(int weight, Node node) { + this.weight = weight; + this.node = node; + } + + + //"Note: this class has a natural ordering that is inconsistent with equals." + public int compareTo(OrderedNode n) { + if (n != null) { + return this.weight - n.weight; + } else { + return -1; + } + } + + } + + // Algorithm provided by Thomas H. Cormen et alt. in Introduction to algorithms 3rd Edition (2009), pp.603-615 + public TopologicalSort(JustificationDiagram diagraph) { + order = new LinkedList<>(); + depthFirstSearch(diagraph); + + while (!finishingTime.isEmpty()) { + order.addFirst(finishingTime.poll().node); + } + } + + public void depthFirstSearch(JustificationDiagram diagraph) { + toBeVisited = new HashMap<>(); + finishingTime = new PriorityQueue<>(); + + for (String u: diagraph.getNodes().keySet()) { + toBeVisited.put(u, diagraph.getNodes().get(u)); + } + time = 0; + for (String u: diagraph.getNodes().keySet()) { + if (toBeVisited.containsKey(u)) { + depthFirstSearchVisit(diagraph.getNodes().get(u)); + } + } + } + + private void depthFirstSearchVisit(Node u) { + ++time; + toBeVisited.remove(u.getAlias()); + + for (Relation relation: u.getOutputs()) { + Node v = relation.getTo(); + + if (toBeVisited.containsValue(v)) { + depthFirstSearchVisit(v); + } + } + time = time + 1; + finishingTime.add(new OrderedNode(time, u)); + } + + public List getOrder() { + return order; + } +} diff --git a/src/main/java/justificationDiagram/JustificationDiagram.java b/src/main/java/justificationDiagram/JustificationDiagram.java index 675f438..89d3bf7 100644 --- a/src/main/java/justificationDiagram/JustificationDiagram.java +++ b/src/main/java/justificationDiagram/JustificationDiagram.java @@ -1,25 +1,88 @@ package justificationDiagram; import export.*; +import models.ActionNode; import models.Node; import models.Relation; import models.Visitable; -import java.util.HashMap; -import java.util.HashSet; +import java.util.*; +import java.util.Map.Entry; public class JustificationDiagram implements Visitable { - public HashMap nodes; - public HashSet relations; + private Map nodes; + private Set relations; public JustificationDiagram() { - nodes = new HashMap<>(); - relations = new HashSet<>(); + setNodes(new HashMap<>()); + setRelations(new HashSet<>()); + } + + public JustificationDiagram(Map nodes, Set relations) { + this.setNodes(nodes); + this.setRelations(relations); } @Override public void accept(JDVisitor visitor) { visitor.visitDiagram(this); } + + /** + * Used to set the ActionNodes to the corresponding node. + * + * @param actionNodes Map of information found in the action file with the label of the node and the ActionNodes + */ + public void setActionNode(Map actionNodes) { + + if(actionNodes != null) { + + for (Entry node : getNodes().entrySet()) { + + String realLabel = node.getValue().getLabel(); + realLabel = realLabel.substring(1,realLabel.length()-1); + + if(actionNodes.containsKey(realLabel)) { + node.getValue().setActionNode(actionNodes.get(realLabel)); + } + } + } + else { + System.err.println("ActionNodes is null, there is no information in this file."); + } + } + + + /** + * Change the state of the node in fonction of there childrens. + * Uses a TopologicalSort but does not change the order of the nodes in the diagram (to avoid problems). + * call Node.analyseRelation(); + */ + public void analysesDiagrammeRelation(List labelList) { + + TopologicalSort sort = new TopologicalSort(this); + + for (Node node : sort.getOrder()) { + node.prerequisiteAnalysis(labelList); + } + + + } + + public Set getRelations() { + return relations; + } + + public void setRelations(Set relations) { + this.relations = relations; + } + + public Map getNodes() { + return nodes; + } + + public void setNodes(Map nodes) { + this.nodes = nodes; + } } diff --git a/src/main/java/models/ActionNode.java b/src/main/java/models/ActionNode.java new file mode 100644 index 0000000..0f452e5 --- /dev/null +++ b/src/main/java/models/ActionNode.java @@ -0,0 +1,73 @@ +package models; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * + * This class is used to store information retrieved with the "ActionNodeParsing" parser. + * + * @author Nicolas-Corbiere + * + */ +public class ActionNode { + + private String label; + private String reference; + private List path; + private Map pathWithNumber; + private boolean optional; + private List actions; + + public ActionNode() { + label = null; + reference = null; + path = new ArrayList<> (); + setPathWithNumber(new HashMap<> ()); + optional = false; + } + + public ActionNode(String label,String reference,List path, Map pathWithNumber,boolean optional,List action) { + this.label = label; + this.path = path; + this.setPathWithNumber(pathWithNumber); + this.reference = reference; + this.optional = optional; + this.actions = action; + } + + + + + private void setPathWithNumber(Map pathWithNumber) { + this.pathWithNumber = pathWithNumber; + } + + + public String getLabel() { + return label; + } + + public String getReference() { + return reference; + } + + public List getPath() { + return path; + } + + public Map getPathWithNumber() { + return pathWithNumber; + } + + public boolean isOptional() { + return optional; + } + + public List getActions() { + return actions; + } + +} diff --git a/src/main/java/models/Conclusion.java b/src/main/java/models/Conclusion.java index dee4fc4..a01e91f 100644 --- a/src/main/java/models/Conclusion.java +++ b/src/main/java/models/Conclusion.java @@ -3,15 +3,39 @@ import export.*; public class Conclusion extends Node { - public String restriction; + private final String restriction; - public Conclusion(String alias, String label, String restriction) { - super(alias, label); - this.restriction = restriction; - } + public Conclusion(String alias, String label, String restriction) { + super(alias, label); + this.restriction = restriction; + } - public void accept(JDVisitor JDVisitor) { - JDVisitor.visitConclusion(this); - } + @Override + public void accept(JDVisitor jDVisitor) { + jDVisitor.visitConclusion(this); + } + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime * result + ((restriction == null) ? 0 : restriction.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (!super.equals(obj)) + return false; + Conclusion other = (Conclusion) obj; + if (restriction == null) { + return (other.restriction == null); + } else { + return restriction.equals(other.restriction); + } + } + + public String getRestriction() { + return restriction; + } } diff --git a/src/main/java/models/Domain.java b/src/main/java/models/Domain.java index 846eff6..cbae9e9 100644 --- a/src/main/java/models/Domain.java +++ b/src/main/java/models/Domain.java @@ -3,12 +3,15 @@ import export.*; public class Domain extends Node { + public Domain(String alias, String label) { super(alias, label); } - public void accept(JDVisitor JDVisitor) { - JDVisitor.visitDomain(this); + @Override + public void accept(JDVisitor jDVisitor) { + jDVisitor.visitDomain(this); } + } diff --git a/src/main/java/models/Node.java b/src/main/java/models/Node.java index ec237a6..f7694a7 100644 --- a/src/main/java/models/Node.java +++ b/src/main/java/models/Node.java @@ -1,15 +1,204 @@ package models; -import export.*; +import java.io.File; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.Objects; +import java.util.Set; -public class Node implements Visitable { - public String alias; - public String label; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import command.CommandFactory; +import export.JDVisitor; - public Node(String alias, String label) { +public class Node implements Visitable { + + private static final Logger logger = LogManager.getLogger(Node.class); + private String alias; + private String label; + private Set inputs; + private Set outputs; + private State state; + + //information + private ActionNode actionNode; + + // - steps + private List steps = new ArrayList<>(); + + public Node(String alias, String label) { + this.label = label; this.alias = alias; - this.label = label; + this.inputs = new HashSet<>(); + this.outputs = new HashSet<>(); + this.state = State.TODO; + + actionNode = new ActionNode(); + } + + + public Node(Node node) { + this.label = node.label; + this.alias = node.alias; + this.inputs = node.inputs; + this.outputs = node.outputs; + this.state = node.state; + + actionNode = new ActionNode(); + } + + + /** + * If the current node have no child; check the realizationList. + * Verifies that all necessary files are present. + * Then analyze the children of the current node. If all the children of this one are DONE, it will be DONE, otherwise it will be TODO. + * If he has no children, no change will be made. + * + */ + public void prerequisiteAnalysis(List labelList) { + + boolean isDone = true; + + // Use to check that the current node depends on the state of these inputs. + if(inputs.isEmpty()) { + isDone = realizationListAnalyses(labelList); + } + + // use to analyze the state of the child nodes + if(isDone) { + isDone = relationAnalyse(); + } + + // used to verify that the necessary files are present. + + + if(actionNode != null && actionNode.getPath() != null && !actionNode.getPath().isEmpty()) { + boolean areFilesValid = checkFileAnalyses(); + isDone = isDone && areFilesValid; + } + + // used to check the number of files in a repository + if(actionNode != null && actionNode.getPathWithNumber()!= null&& !actionNode.getPathWithNumber().isEmpty()) { + boolean areNumberOfFilesValid = checkFileWithNumberAnalyses(); + isDone = isDone && areNumberOfFilesValid; + } + + if(actionNode != null && actionNode.getActions() != null && !actionNode.getActions().isEmpty()) { + boolean areActionsValid = checkAction(); + isDone = isDone && areActionsValid; + } + + if(isDone) { + this.state = State.DONE; + } + } + + /** + * use to analyze the actions of the nodes + * @Returns true if actions are valid + * + */ + //TODO : why logs are stored in the node whereas the validity of the node is not stored + public boolean checkAction() { + CommandFactory cf = CommandFactory.getInstance(); + boolean isDone = false; + + //TODO : change for a list of Objects ? + for(String command : actionNode.getActions()) { + List returnOfExecute = cf.executeCommand(command); + + // get the boolean of the execution + isDone = returnOfExecute.get(0).contains("true"); + + // get the steps of the execution + if(!returnOfExecute.get(1).isEmpty()) { + steps.add(returnOfExecute.get(1)); + } + } + return isDone; + } + + /** + * use to analyze the state of the child nodes + * + * @return true if all child node are DONE, else return false. + */ + public boolean relationAnalyse() { + for (Relation relation : inputs) { + if(!relation.getFrom().actionNode.isOptional() && relation.getFrom().state.equals(State.TODO)) { + return false; + } + } + return true; + } + + /** + * used to check if the label is contains in 'labelList' + * @return true if the label is contained in 'labelList' + */ + public boolean realizationListAnalyses(List labelList) { + + return (labelList != null && labelList.contains(label)) ; + } + + /** + * used to verify that the necessary files are present. + * + * @return true if all files are present, else return false. + */ + public boolean checkFileAnalyses() { + boolean isDone = true; + for (String filePath : actionNode.getPath()) { + if(!new File(filePath).exists()) { + String logMsg = String.format("The file %s was not found to validate the node %s ", filePath, label); + logger.error(logMsg); + steps.add("[ ] " + filePath + " (not found)"); + isDone = false; + } + else { + steps.add("[X] " + filePath); + + } + } + return isDone; + } + + /** + * used to check the number of files in a repertory + * + * @return returns true if the necessary number corresponds to the number of files to be found, else returen false. + */ + public boolean checkFileWithNumberAnalyses() { + boolean isDone = true; + for (Map.Entry mapentry : actionNode.getPathWithNumber().entrySet()) { + String filePath = mapentry.getKey(); + int currentLenght = 0; + if(!new File(mapentry.getKey()).exists()) { + steps.add("[ ] " + filePath + " (not found)"); + isDone = false; + } + else if((currentLenght = new File(filePath).listFiles().length) != mapentry.getValue()) { + steps.add("[ ] " + filePath + " (" + mapentry.getValue()+" files expected, but " + currentLenght + " found)" ); + logger.error("The directory %s has %d files instead of %s. The node %s can't be validate", filePath,currentLenght, mapentry.getValue(),label); + isDone = false; + } + else { + steps.add("[x] "+ filePath + " (" + mapentry.getValue() + " Files found)"); + + } + } + return isDone; + } + + public void addInput(Relation input) { + this.inputs.add(input); + } + + public void addOutput(Relation output) { + this.outputs.add(output); } public void accept(JDVisitor visitor) { @@ -29,4 +218,65 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(alias, label); } + + public void setActionNode(ActionNode actionNode) { + this.actionNode = actionNode; + } + + // Getter and Setter + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public Set getInputs() { + return inputs; + } + + public void setInputs(Set inputs) { + this.inputs = inputs; + } + + public Set getOutputs() { + return outputs; + } + + public void setOutputs(Set outputs) { + this.outputs = outputs; + } + + public State getState() { + return state; + } + + public void setState(State state) { + this.state = state; + } + + public List getSteps() { + return steps; + } + + public void setSteps(List steps) { + this.steps = steps; + } + + public ActionNode getActionNode() { + return actionNode; + } + + + } diff --git a/src/main/java/models/NodeFactory.java b/src/main/java/models/NodeFactory.java index f84fb27..a60a7e2 100644 --- a/src/main/java/models/NodeFactory.java +++ b/src/main/java/models/NodeFactory.java @@ -1,7 +1,14 @@ package models; -public class NodeFactory { +public class NodeFactory { + /** + * + * @param type (Domain,Rationale,Strategy,SubConclusion,Support or Node) + * @param alias of the node in the jd file + * @param label of the node used in todo and diagramme files + * @return + */ public static Node create(String type, String alias, String label) { switch (type) { case "domain": @@ -17,5 +24,10 @@ public static Node create(String type, String alias, String label) { default: return new Node(alias, label); } - } + } + + private NodeFactory() { + throw new IllegalStateException("Utility class"); + } + } diff --git a/src/main/java/models/Rationale.java b/src/main/java/models/Rationale.java index ce71d4e..7bec185 100644 --- a/src/main/java/models/Rationale.java +++ b/src/main/java/models/Rationale.java @@ -8,7 +8,9 @@ public Rationale(String alias, String label) { super(alias, label); } - public void accept(JDVisitor JDVisitor) { - JDVisitor.visitRationale(this); + @Override + public void accept(JDVisitor jDVisitor) { + jDVisitor.visitRationale(this); } + } diff --git a/src/main/java/models/Relation.java b/src/main/java/models/Relation.java index 3dc3036..5c53f55 100644 --- a/src/main/java/models/Relation.java +++ b/src/main/java/models/Relation.java @@ -5,15 +5,14 @@ import java.util.Objects; public class Relation implements Visitable { - public Node from; - public Node to; - public boolean collapsed; + private Node from; + private Node to; + private boolean collapsed; + public Relation(Node from, Node to) { - this.from = from; - this.to = to; - this.collapsed = false; - } + this(from,to, false); + } public Relation(Node from, Node to, boolean collapsed) { this.from = from; @@ -30,12 +29,24 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Relation relation = (Relation) o; - return Objects.equals(from, relation.from) && - Objects.equals(to, relation.to); + return Objects.equals(getFrom(), relation.getFrom()) && + Objects.equals(getTo(), relation.getTo()); } @Override public int hashCode() { - return Objects.hash(from, to); + return Objects.hash(getFrom(), getTo()); } + + public Node getFrom() { + return from; + } + + public Node getTo() { + return to; + } + + public boolean isCollapsed() { + return collapsed; + } } diff --git a/src/main/java/models/RelationFactory.java b/src/main/java/models/RelationFactory.java index 7d533bb..e67ea95 100644 --- a/src/main/java/models/RelationFactory.java +++ b/src/main/java/models/RelationFactory.java @@ -2,10 +2,15 @@ public class RelationFactory { - public static Relation create(String type, Node from, Node to) { + private RelationFactory() { + throw new IllegalStateException("Utility class"); + } + + public static Relation create(String type, Node from, Node to) { if ("..>".equals(type)) { return new Relation(from, to, true); } return new Relation(from, to, false); } } + \ No newline at end of file diff --git a/src/main/java/models/State.java b/src/main/java/models/State.java new file mode 100644 index 0000000..d90d319 --- /dev/null +++ b/src/main/java/models/State.java @@ -0,0 +1,30 @@ +package models; + +/** + * + * This enumerartion is used to define the state of a node + * + * @author Nicolas-Corbiere + * + */ +public enum State { + + TODO("Todo"), + DONE("Done"); + + private String nom = ""; + + private State(String nom) { + this.nom = nom; + } + + @Override + public String toString() { + return nom; + } + + /* + * public State setState(String state) { if(state.equalsIgnoreCase("DONE")) { + * return DONE; } else { return TODO; } } + */ +} diff --git a/src/main/java/models/Strategy.java b/src/main/java/models/Strategy.java index a1f87bc..b92ec9f 100644 --- a/src/main/java/models/Strategy.java +++ b/src/main/java/models/Strategy.java @@ -4,12 +4,14 @@ public class Strategy extends Node { - public Strategy(String alias, String label) { + public Strategy(String alias, String label ) { super(alias, label); } - - public void accept(JDVisitor JDVisitor) { - JDVisitor.visitStrategy(this); + + @Override + public void accept(JDVisitor jDVisitor) { + jDVisitor.visitStrategy(this); } } + diff --git a/src/main/java/models/SubConclusion.java b/src/main/java/models/SubConclusion.java index 279ce11..a5de814 100644 --- a/src/main/java/models/SubConclusion.java +++ b/src/main/java/models/SubConclusion.java @@ -3,13 +3,39 @@ import export.*; public class SubConclusion extends Node { - public String restriction; + private String restriction; public SubConclusion(String alias, String label) { super(alias, label); } - public void accept(JDVisitor JDVisitor) { - JDVisitor.visitSubConclusion(this); + @Override + public void accept(JDVisitor jDVisitor) { + jDVisitor.visitSubConclusion(this); } + + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime * result + ((restriction == null) ? 0 : restriction.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (!super.equals(obj)) + return false; + SubConclusion other = (SubConclusion) obj; + if (restriction == null) { + return (other.restriction == null); + } else { + return restriction.equals(other.restriction); + } + } + + public String getRestriction() { + return restriction; + } } + \ No newline at end of file diff --git a/src/main/java/models/Support.java b/src/main/java/models/Support.java index 610be03..e3128ea 100644 --- a/src/main/java/models/Support.java +++ b/src/main/java/models/Support.java @@ -8,8 +8,11 @@ public Support(String alias, String label) { super(alias, label); } - public void accept(JDVisitor JDVisitor) { - JDVisitor.visitSupport(this); + @Override + public void accept(JDVisitor jDVisitor) { + jDVisitor.visitSupport(this); } + + } diff --git a/src/main/java/models/Visitable.java b/src/main/java/models/Visitable.java index dc6dee8..8a6c415 100644 --- a/src/main/java/models/Visitable.java +++ b/src/main/java/models/Visitable.java @@ -3,5 +3,5 @@ import export.*; public interface Visitable { - void accept(JDVisitor JDVisitor); + void accept(JDVisitor jDVisitor); } diff --git a/src/main/java/parsing/ActionNodeParsing.java b/src/main/java/parsing/ActionNodeParsing.java new file mode 100644 index 0000000..8ee4203 --- /dev/null +++ b/src/main/java/parsing/ActionNodeParsing.java @@ -0,0 +1,159 @@ +package parsing; + +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; + +import models.ActionNode; +import models.Node; + +/** + * + * This class analyzes an action file and creates a map that contains the label of the node and the corresponding ActionNode. + * + * @author Nicolas-Corbiere + * + */ +public class ActionNodeParsing { + + private static final Logger logger = LogManager.getLogger(ActionNodeParsing.class); + + private String path; + private Map actionNodes; + + public Map getActionNodes() { + return actionNodes; + } + + public ActionNodeParsing(String path) { + this.path = path; + if(path != null) { + parseInfomation(); + } + + } + + /** + * retrieve the objects from the json file and analyze them + */ + public void parseInfomation() { + + actionNodes = new HashMap<>(); + + // JSON parser object to parse read file + JSONParser jsonParser = new JSONParser(); + try (FileReader reader = new FileReader(path)) { + readInformation(jsonParser,reader); + } catch (FileNotFoundException e) { + String logMsg = String.format("The file for actions %s was not found", path); + logger.error(logMsg); + } catch (IOException e) { + String logMsg = String.format("Fail reading the file for actions %s ", path); + logger.error(logMsg); + } + + } + + public void readInformation(JSONParser jsonParser, FileReader reader) { + // Read JSON file + Object obj = null; + try { + obj = jsonParser.parse(reader); + JSONArray actionList = (JSONArray) obj; + String logMsg = String.format("reading the action file : %s", actionList); + logger.debug(logMsg); + for (Object object : actionList) { + ActionNode info = parseInformation((JSONObject) object); + actionNodes.put(info.getLabel(), info); + } + + } catch (org.json.simple.parser.ParseException | IOException e) { + // if the information files is null + String logMsg = String.format("ActionNode is null, there is no information in this file : %s.", e); + logger.error(logMsg); + } + + + } + + /** + * create an ActionNode with the information from the JsonInformation + * + * @param jsonInformation object find in the file, the object correspond to a node + * @return + */ + public ActionNode parseInformation(JSONObject jsonInformation) { + + ArrayList fileList = null; + HashMap fileNumberMap = null; + ArrayList actionList = null; + + // Get Node object within list + JSONObject informationObject = (JSONObject) jsonInformation.get("Node"); + + // Get Node Label + String label = (String) informationObject.get("Label"); + + // Get Node Reference + String reference = (String) informationObject.get("Reference"); + if (reference == null) { + reference = "!noRef!"; + } + + // Get if the Node is Optional + String optionalString = (String) informationObject.get("Optional"); + boolean optional = false; + if (optionalString != null) { + optional = optionalString.contains("true"); + } + + // Get Node list of Files + + JSONArray arrFiles = (JSONArray) informationObject.get("Files"); + + if (arrFiles != null) { + fileList = new ArrayList<>(); + for (Object object : arrFiles) { + fileList.add(object.toString()); + } + + } + + // Get Node list of Files with number + JSONArray arrFilesNumber = (JSONArray) informationObject.get("FilesNumber"); + + if (arrFilesNumber != null) { + fileNumberMap = new HashMap<>(); + + for (Object object : arrFilesNumber) { + JSONObject o = (JSONObject) object; + fileNumberMap.put(o.get("Path").toString(), Integer.parseInt(o.get("Number").toString())); + + } + + } + + JSONArray arrActions = (JSONArray) informationObject.get("Actions"); + + if (arrActions != null) { + actionList = new ArrayList<>(); + for (Object object : arrActions) { + actionList.add(object.toString()); + } + + } + + return new ActionNode(label, reference, fileList, fileNumberMap,optional,actionList); + } + + +} diff --git a/src/main/java/parsing/ExceptionParsingRealizationFile.java b/src/main/java/parsing/ExceptionParsingRealizationFile.java new file mode 100644 index 0000000..e27f915 --- /dev/null +++ b/src/main/java/parsing/ExceptionParsingRealizationFile.java @@ -0,0 +1,16 @@ +package parsing; + +public class ExceptionParsingRealizationFile extends Exception { + + private final String path; + + public ExceptionParsingRealizationFile(String realizationPath) { + path = realizationPath; + } + + @Override + public String toString() { + return "ExceptionParsingRealizationFile [path=" + path + "]"; + } + +} diff --git a/src/main/java/parsing/JDCompiler.java b/src/main/java/parsing/JDCompiler.java deleted file mode 100644 index 080e9c6..0000000 --- a/src/main/java/parsing/JDCompiler.java +++ /dev/null @@ -1,103 +0,0 @@ -package parsing; - -import export.GraphDrawer; -import guru.nidi.graphviz.engine.Format; -import guru.nidi.graphviz.engine.Graphviz; -import guru.nidi.graphviz.model.MutableGraph; -import justificationDiagram.JustificationDiagram; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; -import org.antlr.v4.runtime.tree.ParseTree; -import org.apache.commons.cli.*; -import java.io.*; - -public class JDCompiler { - - public static void main(String[] args) throws IOException { - CommandLine cmd = setup(args); - String inputFilePath = cmd.getOptionValue("input"); - String outputFilePath = cmd.getOptionValue("output"); - - if (!argsAreValid(inputFilePath, outputFilePath)) { - System.exit(1); - } - - JustificationDiagram diagram = createDiagram(inputFilePath); - GraphDrawer drawer = new GraphDrawer(); - StringBuilder gv = drawer.draw(diagram); - - if (cmd.hasOption("gv")) { - String fileName = outputFilePath.split("\\.png")[0]; - PrintWriter out = new PrintWriter(new FileWriter(fileName + ".gv")); - out.print(gv); - out.close(); - } - - InputStream dot = new ByteArrayInputStream(gv.toString().getBytes()); - MutableGraph g = new guru.nidi.graphviz.parse.Parser().read(dot); - Graphviz.fromGraph(g).render(Format.PNG).toFile(new File(outputFilePath)); - } - - private static CommandLine setup(String[] args) { - Options options = new Options(); - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - - Option input = new Option("i", "input", true, "input file path"); - input.setRequired(true); - options.addOption(input); - - Option output = new Option("o", "output", true, "output file path"); - output.setRequired(true); - options.addOption(output); - - options.addOption("gv", "output gv files"); - - try { - return parser.parse(options, args); - } catch (org.apache.commons.cli.ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp("utility-name", options); - - System.exit(1); - return null; - } - } - - private static boolean argsAreValid(String in, String out) { - boolean valid = true; - - if (!in.matches(".*\\.(jd|txt)")) { - valid = false; - System.err.println("The input file should end with .jd or .txt"); - } - if (!out.matches(".*\\.png")) { - valid = false; - System.err.println("The output file should end with .png"); - } - return valid; - } - - public static JustificationDiagram createDiagram(String file) { - JDInitializer factory = new JDInitializer(); - factory.visit(parseAntlr(file)); - JDLinker linker = new JDLinker(factory.diagram); - linker.visit(parseAntlr((file))); - return linker.diagram; - } - - public static ParseTree parseAntlr(String file) { - // create a CharStream that reads from standard input - CharStream input = null; // create a lexer that feeds off of input CharStream - try { - input = CharStreams.fromFileName(file); - } catch (IOException e) { - e.printStackTrace(); - } - PlantUMLLexer lexer = new PlantUMLLexer(input); // create a buffer of tokens pulled from the lexer - CommonTokenStream tokens = new CommonTokenStream(lexer); // create a parser that feeds off the tokens buffer - PlantUMLParser parser = new PlantUMLParser(tokens); - return parser.diagram(); - } -} diff --git a/src/main/java/parsing/JDInitializer.java b/src/main/java/parsing/JDInitializer.java index 5508565..ac1d54d 100644 --- a/src/main/java/parsing/JDInitializer.java +++ b/src/main/java/parsing/JDInitializer.java @@ -3,40 +3,44 @@ import justificationDiagram.JustificationDiagram; import models.*; -public class JDInitializer extends PlantUMLBaseVisitor { - public JustificationDiagram diagram; +public class JDInitializer extends JustificationDiagramBaseVisitor { + private JustificationDiagram diagram; - @Override - public String visitDiagram(PlantUMLParser.DiagramContext ctx) { + public JustificationDiagram getDiagram() { + return diagram; + } + + @Override + public String visitDiagram(JustificationDiagramParser.DiagramContext ctx) { diagram = new JustificationDiagram(); return super.visitDiagram(ctx); - } + } - @Override - public String visitDeclaration(PlantUMLParser.DeclarationContext ctx) { + /* @Override + public String visitDeclaration(JustificationDiagramParser.DeclarationContext ctx) { return super.visitDeclaration(ctx); } @Override - public String visitRelation(PlantUMLParser.RelationContext ctx) { + public String visitRelation(JustificationDiagramParser.RelationContext ctx) { return super.visitRelation(ctx); } @Override - public String visitInstruction(PlantUMLParser.InstructionContext ctx) { + public String visitInstruction(JustificationDiagramParser.InstructionContext ctx) { return super.visitInstruction(ctx); } - +*/ @Override - public String visitElement(PlantUMLParser.ElementContext ctx) { - diagram.nodes.put(ctx.ALIAS().getText(), + public String visitElement(JustificationDiagramParser.ElementContext ctx) { + diagram.getNodes().put(ctx.ALIAS().getText(), NodeFactory.create(ctx.TYPE().getText(), ctx.ALIAS().getText(), ctx.label.getText())); return super.visitElement(ctx); } @Override - public String visitConclusion(PlantUMLParser.ConclusionContext ctx) { - diagram.nodes.put(ctx.ALIAS().getText(), new Conclusion(ctx.ALIAS().getText(), + public String visitConclusion(JustificationDiagramParser.ConclusionContext ctx) { + diagram.getNodes().put(ctx.ALIAS().getText(), new Conclusion(ctx.ALIAS().getText(), ctx.label.getText(), ctx.restriction != null? ctx.restriction.getText() : null)); return super.visitConclusion(ctx); } diff --git a/src/main/java/parsing/JDLinker.java b/src/main/java/parsing/JDLinker.java index 1c78594..4578925 100644 --- a/src/main/java/parsing/JDLinker.java +++ b/src/main/java/parsing/JDLinker.java @@ -1,44 +1,52 @@ package parsing; import justificationDiagram.JustificationDiagram; +import models.Relation; import models.RelationFactory; -public class JDLinker extends PlantUMLBaseVisitor { - public JustificationDiagram diagram; +public class JDLinker extends JustificationDiagramBaseVisitor { + private JustificationDiagram diagram; - public JDLinker(JustificationDiagram diagram) { + public JustificationDiagram getDiagram() { + return diagram; + } + + public JDLinker(JustificationDiagram diagram) { this.diagram = diagram; } @Override - public String visitDiagram(PlantUMLParser.DiagramContext ctx) { + public String visitDiagram(JustificationDiagramParser.DiagramContext ctx) { return super.visitDiagram(ctx); } @Override - public String visitDeclaration(PlantUMLParser.DeclarationContext ctx) { + public String visitDeclaration(JustificationDiagramParser.DeclarationContext ctx) { return super.visitDeclaration(ctx); } @Override - public String visitRelation(PlantUMLParser.RelationContext ctx) { - diagram.relations.add(RelationFactory.create(ctx.LINK().getText(), diagram.nodes.get(ctx.ALIAS(0).getText()), - diagram.nodes.get(ctx.ALIAS(1).getText()))); + public String visitRelation(JustificationDiagramParser.RelationContext ctx) { + Relation relation = RelationFactory.create(ctx.LINK().getText(), diagram.getNodes().get(ctx.ALIAS(0).getText()), + diagram.getNodes().get(ctx.ALIAS(1).getText())); + diagram.getRelations().add(relation); + diagram.getNodes().get(ctx.ALIAS(0).getText()).addOutput(relation); + diagram.getNodes().get(ctx.ALIAS(1).getText()).addInput(relation); return super.visitRelation(ctx); } @Override - public String visitInstruction(PlantUMLParser.InstructionContext ctx) { + public String visitInstruction(JustificationDiagramParser.InstructionContext ctx) { return super.visitInstruction(ctx); } @Override - public String visitElement(PlantUMLParser.ElementContext ctx) { + public String visitElement(JustificationDiagramParser.ElementContext ctx) { return super.visitElement(ctx); } @Override - public String visitConclusion(PlantUMLParser.ConclusionContext ctx) { + public String visitConclusion(JustificationDiagramParser.ConclusionContext ctx) { return super.visitConclusion(ctx); } } diff --git a/src/main/java/parsing/RealizationParser.java b/src/main/java/parsing/RealizationParser.java new file mode 100644 index 0000000..475bc03 --- /dev/null +++ b/src/main/java/parsing/RealizationParser.java @@ -0,0 +1,67 @@ +package parsing; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.util.ArrayList; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + + +public class RealizationParser { + + private static final Logger logger = LogManager.getLogger(RealizationParser.class); + + //private String path; + + private List labelList; + + + public List getLabelList() { + return labelList; + } + + public RealizationParser(String path) throws ExceptionParsingRealizationFile { + //this.path = path; + labelList = realizationParse(path); + + } + + /** + * Used to parse the file 'realizationPath' that corresponds to the accomplished + * tasks , required number of files and references of nodes. + * + * @param realizationPath path to the realization file + * @return list of node information + * @throws IOException + */ + public static List realizationParse(String realizationPath) throws ExceptionParsingRealizationFile { + + File realization; + ArrayList realizationResult = new ArrayList<>(); + + if (realizationPath != null) { + realization = new File(realizationPath); + if (realization.exists()) { + try (RandomAccessFile ranRealization = new RandomAccessFile(realization, "r")){ + String line; + while ((line = ranRealization.readLine()) != null) { + realizationResult.add("\"" + line + "\""); + } + } catch (IOException e) { + String logMsg = String.format("Exception raised during reading of the realization file %s", realizationPath); + logger.error(logMsg); + throw new ExceptionParsingRealizationFile(realizationPath); + } + + } else { + String logMsg = String.format("%s doesn't exist", realizationPath); + logger.error(logMsg); + throw new ExceptionParsingRealizationFile(realizationPath); + } + } + return realizationResult; + } +} diff --git a/src/main/resources/log4j2.properties b/src/main/resources/log4j2.properties new file mode 100644 index 0000000..3233848 --- /dev/null +++ b/src/main/resources/log4j2.properties @@ -0,0 +1,18 @@ +status = error +name = PropertiesConfig + +filters = threshold + +filter.threshold.type = ThresholdFilter +filter.threshold.level = warn + +appenders = console + +appender.console.type = Console +appender.console.name = STDOUT +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n + +rootLogger.level = warn +rootLogger.appenderRefs = stdout +rootLogger.appenderRef.stdout.ref = STDOUT \ No newline at end of file diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000..9e28a16 --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/java/Log4J2PropertiesConfTest.java b/src/test/java/Log4J2PropertiesConfTest.java new file mode 100644 index 0000000..0d53d7f --- /dev/null +++ b/src/test/java/Log4J2PropertiesConfTest.java @@ -0,0 +1,14 @@ +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +class Log4J2PropertiesConfTest { + + @Test + public void testPerformSomeTask() throws Exception { + Log4J2PropertiesConf log4J2PropertiesConf=new Log4J2PropertiesConf(); + log4J2PropertiesConf.performSomeTask(); + + } + +} diff --git a/src/test/java/OutputTests.java b/src/test/java/OutputTests.java index 20d09f6..4bb5a00 100644 --- a/src/test/java/OutputTests.java +++ b/src/test/java/OutputTests.java @@ -1,33 +1,119 @@ import org.junit.jupiter.api.Test; -import parsing.JDCompiler; + +import java.io.File; import java.io.IOException; -import static org.junit.jupiter.api.Assertions.assertEquals; -public class OutputTests { +import static org.junit.Assert.assertTrue; + + class OutputTests { + + String inputPath = "src/test/resources/"; + String inputPathJD = inputPath + "justificationDiagrams/"; + String outputPath = "justification/examples/output/images/"; + + //todo : improve by deleting the generated files ! + @Test + void test_CI4CVS() throws IOException { + JDCompiler.main(new String[] { inputPath+"exampleCI/Pattern4CI.jd", "-o", outputPath+"Pattern4CI_CVS_Valid", "-rea", inputPath+"exampleCI/realizationPattern4CI.txt", "-act", inputPath+"exampleCI/actionValid4CVS.json", "-td","-svg", "-svgR"}); + File fichier = new File(outputPath+"Pattern4CI_CVS_Valid.svg"); + assertTrue(fichier.exists()); + fichier = new File(outputPath+"Pattern4CI_CVS_Valid_REA.svg"); + assertTrue(fichier.exists()); + fichier = new File(outputPath+"Pattern4CI_CVS_Valid.todo"); + assertTrue(fichier.exists()); + } + + + //TODO : improve test @Test - public void dummy() { - assertEquals(0, 0); - assertEquals(1, 1); + void test_CI() throws IOException { + JDCompiler.main(new String[] { inputPath+"exampleCI/Pattern4CI.jd", "-o", outputPath+"Pattern4CI_Valid", "-rea", inputPath+"exampleCI/realizationPattern4CI.txt", "-act", inputPath+"exampleCI/actionValid.json", "-td","-svg", "-svgR"}); + File fichier = new File(outputPath+"Pattern4CI_Valid.svg"); + assertTrue(fichier.exists()); + fichier = new File(outputPath+"Pattern4CI_Valid_REA.svg"); + assertTrue(fichier.exists()); + fichier = new File(outputPath+"Pattern4CI_Valid.todo"); + assertTrue(fichier.exists()); } - + + @Test - public void basic() throws IOException { - JDCompiler.main(new String[] {"-i", "src/test/resources/basic.jd", "-o", "basic.png", "-gv"}); + void figToDOWithRea() throws IOException { + JDCompiler.main(new String[] { inputPathJD+"fig3.jd", "-o", outputPath+"fig3","-rea", inputPath+"realization/realizationFig3.txt", "-act", inputPath+"action/actionFig3.json", "-td", "-svg", "-svgR"}); + File fichier = new File(outputPath+"fig3.svg"); + assertTrue(fichier.exists()); } - + @Test - public void fig1() throws IOException { - JDCompiler.main(new String[] {"-i", "src/test/resources/fig1.jd", "-o", "fig1.png", "-gv"}); + void figToDOWithReaAndFileVerification() throws IOException { + JDCompiler.main(new String[] { inputPath+"exampleCI/Pattern4CI.jd", "-o", outputPath+"Pattern4CI_Invalid", "-rea", inputPath+"exampleCI/realizationPattern4CIInvalid.txt", "-act", inputPath+"exampleCI/actionInvalid.json", "-td", "-svgR"}); + File fichier = new File(outputPath+"Pattern4CI_Invalid_REA.svg"); + assertTrue(fichier.exists()); } - + + + @Test + void basicEmpty() throws IOException { + JDCompiler.main(new String[] {inputPathJD+"basic.jd", "-o", outputPath+"basicEmpty","-td", "-svgR", "-svg", "-rea",inputPath+"realization/empty.txt"}); + File fichier = new File(outputPath+"basicEmpty.svg"); + assertTrue(fichier.exists()); + fichier = new File(outputPath+"basicEmpty.todo"); + assertTrue(fichier.exists()); + fichier = new File(outputPath+"basicEmpty_REA.svg"); + assertTrue(fichier.exists()); + } + + + @Test - public void fig2() throws IOException { - JDCompiler.main(new String[] {"-i", "src/test/resources/fig2.jd", "-o", "fig2.png", "-gv"}); + void basic() throws IOException { + JDCompiler.main(new String[] {inputPathJD+"basic.jd", "-o", outputPath+"basic", "-svg"}); + File fichier = new File(outputPath+"basic.svg"); + assertTrue(fichier.exists()); + fichier = new File(outputPath+"basic.todo"); + assertTrue(!fichier.exists()); + fichier = new File(outputPath+"basic_REA.svg"); + assertTrue(!fichier.exists()); } @Test - public void fig3() throws IOException { - JDCompiler.main(new String[] {"-i", "src/test/resources/fig3.jd", "-o", "fig3.png", "-gv"}); + void fig1() throws IOException { + JDCompiler.main(new String[] {inputPathJD+"fig1.jd", "-o", outputPath+"fig1", "-svg"}); + File fichier = new File(outputPath+"fig1.svg"); + assertTrue(fichier.exists()); + } + + @Test + void fig2() throws IOException { + JDCompiler.main(new String[] {inputPathJD+"fig2.jd", "-o", outputPath+"fig2", "-gv"}); + File fichier = new File(outputPath+"fig2.gv"); + assertTrue(fichier.exists()); + } + + @Test + void fig3() throws IOException { + JDCompiler.main(new String[] { inputPathJD+"fig3.jd", "-o", outputPath+"fig3", "-svg"}); + File fichier = new File(outputPath+"fig3.svg"); + assertTrue(fichier.exists()); } + + + @Test + void test_CI4ThisProject() throws IOException { + String pattern = "justification/Pattern4CI.jd"; + String output="justification/output/local/CI"; + String realization = "justification/local/realization.txt"; + String actions = "justification/actions.json"; + JDCompiler.main(new String[] { pattern, "-o", output, "-rea",realization, "-act", actions, "-td","-svg", "-svgR"}); + File fichier = new File(output+".svg"); + assertTrue(fichier.exists()); + fichier = new File(output + "_REA.svg"); + assertTrue(fichier.exists()); + fichier = new File(output + ".todo"); + assertTrue(fichier.exists()); + + } + + } diff --git a/src/test/java/command/CommandCheckCoverageTest.java b/src/test/java/command/CommandCheckCoverageTest.java new file mode 100644 index 0000000..dc0c382 --- /dev/null +++ b/src/test/java/command/CommandCheckCoverageTest.java @@ -0,0 +1,81 @@ +package command; +import static org.junit.jupiter.api.Assertions.*; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import command.Command; +import command.CommandCheckCoverage; +import parsing.ExceptionParsingRealizationFile; +import parsing.RealizationParser; + + +class CommandCheckCoverageTest { + + + Command c = new CommandCheckCoverage(); + + String PATH = "./src/test/resources/jacoco/"; + + @BeforeEach + public void setUp() { + c = new CommandCheckCoverage(); + + } + + @Test + void testCoverageInCSVisNotVerified() { + ArrayList result = c.execute(PATH+ "jacocoComplexe0.csv >= 2"); + assertEquals("false", result.get(0)); + assertEquals("[ ] Current coverage is 0, it's not >= 2 ", result.get(1)); + + } + + @Test + void testCoverageInCSVIsVerified() { + ArrayList result = c.execute(PATH+ "jacocoSimple.csv >= 18"); + assertEquals("true", result.get(0)); + assertEquals("[x] Current coverage is 18, it's >= 18 ", result.get(1) ); + } + + @Test + void testCoverageInCSVIsVerified_notEquals() { + ArrayList result = c.execute(PATH+ "jacocoSimple.csv != 19"); + assertEquals("true", result.get(0)); + assertEquals("[x] Current coverage is 18, it's != 19 ", result.get(1) ); + } + + @Test + void testCoverageInCSVIsVerified_less() { + ArrayList result = c.execute(PATH+ "jacocoSimple.csv < 20"); + assertEquals("true", result.get(0)); + assertEquals("[x] Current coverage is 18, it's < 20 ", result.get(1) ); + } + + + @Test + void testCoverageInComplexCSV() { + ArrayList result = c.execute(PATH+ "jacocoEclEmma.csv >= 90"); + assertEquals("true", result.get(0)); + assertEquals("[x] Current coverage is 95, it's >= 90 ", result.get(1) ); + } + + @Test + void testCoverageFails() { + ArrayList result = c.execute(PATH+ "jacocoEclEmma2.csv >= 90"); + assertEquals("fail", result.get(0)); + assertTrue(result.get(1).contains("error Parsing CSV file")); + } + + @Test + void testJacocoCoverage4ThisProject() throws ExceptionParsingRealizationFile { + ArrayList result = c.execute("target/site/jacoco/jacoco.csv >= 80"); + assertEquals("true", result.get(0)); + } + + +} diff --git a/src/test/java/command/CommandCheckValueInCSVTest.java b/src/test/java/command/CommandCheckValueInCSVTest.java new file mode 100644 index 0000000..ce6691a --- /dev/null +++ b/src/test/java/command/CommandCheckValueInCSVTest.java @@ -0,0 +1,91 @@ +package command; +import static org.junit.jupiter.api.Assertions.*; + +import java.util.ArrayList; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import command.Command; +import command.CommandCheckCoverage; + + +class CommandCheckValueInCSVTest { + + + Command c = new CommandCheckValueInCSV(); + + String PATH = "./src/test/resources/jacoco/"; + + @BeforeEach + public void setUp() { + c = new CommandCheckValueInCSV(); + } + + @Test + void testPropertyEqualsInCSVisVerified() { + ArrayList result = c.execute(PATH+ "jacocoComplexe0.csv INSTRUCTION_MISSED 1 == 546"); + assertEquals("true", result.get(0)); + assertEquals("[x] following property is verified : value[INSTRUCTION_MISSED , 1] =546 ==546",result.get(1)); + } + @Test + void testPropertyEqualsInCSVisVerified2() { + ArrayList result = c.execute(PATH+ "jacocoComplexe0.csv 3 1 == 546"); + assertEquals("true", result.get(0)); + assertEquals("[x] following property is verified : value[3 , 1] =546 ==546",result.get(1)); + } + + @Test + void testPropertyOutOfCVS() { + ArrayList result = c.execute(PATH+ "jacocoComplexe0.csv 3 100 == 546"); + assertEquals("fail", result.get(0)); + assertTrue(result.get(1).contains("OutOfCSVException")); + } + + @Test + void testPropertyNonExpectedValueOfCVS() { + ArrayList result = c.execute(PATH+ "jacocoComplexe0.csv Coverage 100 == 546"); + assertEquals("fail", result.get(0)); + assertTrue(result.get(1).contains("Reference to an invalid Cell")); + } + + + @Test + void testPropertylessInCSVisVerified() { + ArrayList result = c.execute(PATH+ "jacocoComplexe0.csv 3 3 >= 50"); + assertEquals("true", result.get(0)); + assertEquals("[x] following property is verified : value[3 , 3] =63 >=50",result.get(1)); + } + + @Test + void testPropertylessInCSVisNotVerified() { + ArrayList result = c.execute(PATH+ "jacocoComplexe0.csv 3 3 >= 100"); + assertEquals("false", result.get(0)); + assertEquals("[] following property is not verified : value[3 , 3] =63 >=100",result.get(1)); + } + + + @Test + void testPropertyFails() { + ArrayList result = c.execute(PATH+ "jacocoEclEmma2.csv 3 3 >= 90"); + assertEquals("fail", result.get(0)); + } + + @Test + void testNotCsvFile() { + ArrayList result = c.execute(PATH+ "jacocoEclEmma2.html 3 3 >= 90"); + assertEquals("fail", result.get(0)); + } + + + //TODO manage IOexception + //@Test + /* void testCoverageThrowException() { + ArrayList result = c.execute("./src/test/resources/jacocoEclEmma2.csv >= 90"); + System.out.println("----------------------------- " + result); + Assertions.assertThrows(java.io.FileNotFoundException.class, () -> { + c.execute("./src/test/resources/jacocoEclEmma2.csv >= 90");} ); + } + */ + +} diff --git a/src/test/java/command/CommandFactoryTest.java b/src/test/java/command/CommandFactoryTest.java new file mode 100644 index 0000000..d02fecc --- /dev/null +++ b/src/test/java/command/CommandFactoryTest.java @@ -0,0 +1,46 @@ +package command; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.List; + +import org.junit.jupiter.api.Test; + +class CommandFactoryTest { + String PATH = "./src/test/resources/jacoco/"; + CommandFactory cf = CommandFactory.getInstance(); + + + + @Test + void testCheckCoverage() { + List returnOfExecute = cf.executeCommand("CheckCoverage "+PATH+ "jacocoSimple.csv >= 18"); + assertEquals("true", returnOfExecute.get(0)); + assertEquals("[x] Current coverage is 18, it's >= 18 ", returnOfExecute.get(1)); + } + + @Test + void testCheckCSV() { + List result = cf.executeCommand("CheckValueInCSV "+ PATH+ "jacocoComplexe0.csv INSTRUCTION_MISSED 1 == 546"); + assertEquals("true", result.get(0)); + assertEquals("[x] following property is verified : value[INSTRUCTION_MISSED , 1] =546 ==546",result.get(1)); + } + + @Test + void testChecklessCSV() { + List result = cf.executeCommand("CheckValueInCSV "+ PATH+ "jacocoComplexe0.csv INSTRUCTION_MISSED 1 <= 600"); + assertEquals("true", result.get(0)); + assertEquals("[x] following property is verified : value[INSTRUCTION_MISSED , 1] =546 <=600",result.get(1)); + } + + + @Test + void testUnknownCommand() { + List result = cf.executeCommand("unexpected "+ PATH+ "jacocoComplexe0.csv INSTRUCTION_MISSED 1 <= 600"); + assertEquals("false", result.get(0)); + assertTrue(result.get(1).contains("command does not exist")); + } + + + +} diff --git a/src/test/java/parsing/ActionNodeParsingTest.java b/src/test/java/parsing/ActionNodeParsingTest.java new file mode 100644 index 0000000..50f4939 --- /dev/null +++ b/src/test/java/parsing/ActionNodeParsingTest.java @@ -0,0 +1,27 @@ +package parsing; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.Map; + +import org.junit.jupiter.api.Test; + +import models.ActionNode; + +class ActionNodeParsingTest { + + String path = "src/test/resources/action/"; + + ActionNodeParsing anp ; + + @Test + void test() { + anp = new ActionNodeParsing(path + "actions.json"); + Map values = anp.getActionNodes(); + assertTrue(values.containsKey("images Archivate")); + assertTrue(values.containsKey("Validate testCoverage")); + assertEquals("models.ActionNode",values.get("Validate testCoverage").getClass().getName()); + + } + +} diff --git a/src/test/java/parsing/RealizationParserTest.java b/src/test/java/parsing/RealizationParserTest.java new file mode 100644 index 0000000..e104445 --- /dev/null +++ b/src/test/java/parsing/RealizationParserTest.java @@ -0,0 +1,46 @@ +package parsing; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.List; + +import org.junit.jupiter.api.Test; + +class RealizationParserTest { + + + String inputPath = "./src/test/resources/realization/"; + RealizationParser parser; + + @Test + void testRealizationFile() throws ExceptionParsingRealizationFile { + parser = new RealizationParser( inputPath+"example_realizationSimple.txt"); + List labels = parser.getLabelList(); + assertEquals(3, labels.size()); + assertTrue(labels.get(0).contains(("Test Maven passed")),"position 0 : OK"); + assertTrue(labels.get(2).contains("Jacoco report Archivate")); + + + } + + @Test + void testNonEXISTINGFile() throws ExceptionParsingRealizationFile { + assertThrows(ExceptionParsingRealizationFile.class, + () -> {new RealizationParser(inputPath+"notExist.txt");} ); + } + + @Test + void testEmptyRealizationFile() throws ExceptionParsingRealizationFile { + parser = new RealizationParser( inputPath+"empty.txt"); + List labels = parser.getLabelList(); + assertEquals(0, labels.size()); + + } + + + + + + + +} diff --git a/src/test/resources/action/actionBasic.json b/src/test/resources/action/actionBasic.json new file mode 100644 index 0000000..24a7494 --- /dev/null +++ b/src/test/resources/action/actionBasic.json @@ -0,0 +1,9 @@ +[ + { + "Node":{ + "Label":"Jenkins test logs", + "Optional":"true", + } + }, + +] diff --git a/src/test/resources/action/actionEmpty.json b/src/test/resources/action/actionEmpty.json new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/test/resources/action/actionEmpty.json @@ -0,0 +1 @@ + diff --git a/src/test/resources/action/actionFig3.json b/src/test/resources/action/actionFig3.json new file mode 100644 index 0000000..fcdc3ed --- /dev/null +++ b/src/test/resources/action/actionFig3.json @@ -0,0 +1,58 @@ +[ + { + "Node":{ + "Label":"Identified risks", + "Optional":"false", + "Reference":"Archi1", + + } + }, + { + "Node": { + "Label":"Functional specifications", + "Optional":"true", + "Reference":"Archi1", + "Files": [ + "justification/examples/realization/realizationFig3.txt" + ], + + } + + }, + { + "Node":{ + "Label":"Technical specifications", + "Reference":"jacoco", + "Files": [ + ".github/workflows" + ], + "FilesNumber": [ + { + "Path":".github/workflows", + "Number":"1" + }, + ], + } + + + }, + { + "Node":{ + "Label":"Architecture validated", + "Files": [ + "dontExit" + ], + + } + }, + { + "Node": { + "Label":"Risks consistency", + "Optional":"true", + "Files": [ + "dontExit" + ], + } + + }, +] diff --git a/src/test/resources/action/actions.json b/src/test/resources/action/actions.json new file mode 100644 index 0000000..7fefde6 --- /dev/null +++ b/src/test/resources/action/actions.json @@ -0,0 +1,110 @@ +[ + { + "Node":{ + "@comment": "The node labeled 'Jacoco Report' is not optional... ", + "Label":"Jacoco Report", + "Optional":"false", + "@comment3": "...and need to check the existence of the file 'target/site/jacoco/jacoco.csv'." , + "Files": [ + "target/site/jacoco/jacoco.csv" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'Validate testCoverage' requires to check the coverage", + "Label":"Validate testCoverage", + "Actions": [ + "CheckCoverage target/site/jacoco/jacoco.csv >= 80", + "CheckValueInCSV target/site/jacoco/jacoco.csv INSTRUCTION_COVERED 1 >= 20" + ], + } + }, + { + "Node":{ + "@comment": "The node labeled 'code Archivate' has 'generatedCode' for reference.", + "Label":"code Archivate", + "Reference":"generatedCode", + } + }, + { + "Node": { + "@comment": "The node labeled 'images Archivate' has 'images' for reference and...", + "Label":"images Archivate", + "Reference":"images" + } + + }, + { + "Node": { + "@comment": "The node labeled 'Test Maven Passed' has 'images' for reference and...", + "Label":"Test Maven Passed", + "FilesNumber": [ + { + "@comment2": "...need to check if of the repertory 'justification/output/images/' have 13 files..." , + "Path":"justification/output/images/", + "Number":"13" + }, + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Build Maven passed'...", + "Label":"Build Maven passed", + "FilesNumber": [ + { + "@comment2":"need to check if of the repertory 'justification/examples/output/images' have 17 files.", + "Path":"justification/examples/output/images", + "Number":"17" + }, + ] + } + + + }, + { + "Node":{ + "@comment": "The node labeled 'Jacoco report Archivate' has 'jacoco' for reference.", + "Label":"Jacoco report Archivate", + "Reference":"jacoco", + } + + + }, + + { + "Node": { + "@comment": "The node labeled 'Continuous Integration' has 'GeneratedJD' for reference.", + "Label":"Continuous Integration", + "Reference":"GeneratedJD", + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Test Coverage validated and Archived' is optional. ", + "Label":"Test Coverage validated and Archived", + "Optional":"true", + } + }, + { + "Node":{ + "@comment": "The node labeled 'Creation of the README'... ", + "Label":"Creation of the README", + "@comment3": "...and need to check the exitance of the file 'README.md'", + "Files": [ + "README.md" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'Documentation ready' is optional", + "Label":"Documentation ready", + "Optional":"true", + + } + } +] \ No newline at end of file diff --git a/src/test/resources/exampleCI/Pattern4CI.jd b/src/test/resources/exampleCI/Pattern4CI.jd new file mode 100644 index 0000000..76e6e54 --- /dev/null +++ b/src/test/resources/exampleCI/Pattern4CI.jd @@ -0,0 +1,77 @@ +@startuml + +conclusion C = "Valid Continuous Integration" - "interne" +PV --> C + +subconclusion PV = "Project Valid" +strategy SE = "Evaluate Project Quality" +SE --> PV +M --> SE +ASC --> SE +AJS --> SE + +subconclusion ASC = "Archivees Data" +strategy SD = "Data Archivate" +support CA = "code Archivate" +support IA = "images Archivate" + +SD --> ASC +AJS --> SD +CA --> SD +IA --> SD + +subconclusion M = "Maven ready" +strategy SM = "Evaluate Maven Project" +support TM = "Test Maven passed" +support BM = "Build Maven passed" +BM --> SM +TM --> SM +SM --> M + + + +subconclusion AJS = "Test Coverage validated and Archived" +strategy SJA = "testCoverage Archivate" +support JA = "Jacoco report Archivate" +JV --> SJA +RJ --> SJA +JA --> SJA +SJA --> AJS + +subconclusion JV = "Test Coverage validated" +strategy SJ = "Validate testCoverage" +support RJ = "Jacoco Report" +RJ --> SJ +SJ --> JV + + +support SC = "Scanning the project with SonarCloud" +strategy PS = "Project Scan" +subconclusion SCR = "SonarCloud ready" + +SC --> PS +PS --> SCR +SCR --> SE + +support CRM = "Creation of the README" +strategy PDOC = "Project documented" +subconclusion DOCR = "Documentation ready" + +CRM --> PDOC +PDOC --> DOCR +DOCR --> SE + +@enduml + + + + + + + + + + + + + diff --git a/src/test/resources/exampleCI/Pattern4CI.svg b/src/test/resources/exampleCI/Pattern4CI.svg new file mode 100644 index 0000000..12387fb --- /dev/null +++ b/src/test/resources/exampleCI/Pattern4CI.svg @@ -0,0 +1,298 @@ + + +G + + + +C + + +Valid Continuous Integration + + + + + + + +interne + + + +PS + +Project Scan + + + +SCR + +SonarCloud ready + + + +PS->SCR + + + + + +SE + +Evaluate Project Quality + + + +SCR->SE + + + + + +PV + +Project Valid + + + +SE->PV + + + + + +PV->C + + + + + +AJS + +Test Coverage validated and Archived + + + +AJS->SE + + + + + +SD + +Data Archivate + + + +AJS->SD + + + + + +ASC + +Archivees Data + + + +SD->ASC + + + + + +ASC->SE + + + + + +BM + +Build Maven passed + + + +SM + +Evaluate Maven Project + + + +BM->SM + + + + + +M + +Maven ready + + + +SM->M + + + + + +M->SE + + + + + +SJA + +testCoverage Archivate + + + +SJA->AJS + + + + + +JV + +Test Coverage validated + + + +JV->SJA + + + + + +PDOC + +Project documented + + + +DOCR + +Documentation ready + + + +PDOC->DOCR + + + + + +DOCR->SE + + + + + +SC + +Scanning the project with SonarCloud + + + +SC->PS + + + + + +JA + +Jacoco report Archivate + + + +JA->SJA + + + + + +SJ + +Validate testCoverage + + + +SJ->JV + + + + + +IA + +images Archivate + + + +IA->SD + + + + + +RJ + +Jacoco Report + + + +RJ->SJA + + + + + +RJ->SJ + + + + + +TM + +Test Maven passed + + + +TM->SM + + + + + +CA + +code Archivate + + + +CA->SD + + + + + +CRM + +Creation of the README + + + +CRM->PDOC + + + + + diff --git a/src/test/resources/exampleCI/Pattern4CI_Invalid_REA.svg b/src/test/resources/exampleCI/Pattern4CI_Invalid_REA.svg new file mode 100644 index 0000000..e2235aa --- /dev/null +++ b/src/test/resources/exampleCI/Pattern4CI_Invalid_REA.svg @@ -0,0 +1,298 @@ + + +G + + + +C + + +Valid Continuous Integration + + + + + + + +interne + + + +PS + +Project Scan + + + +SCR + +SonarCloud ready + + + +PS->SCR + + + + + +SE + +Evaluate Project Quality + + + +SCR->SE + + + + + +PV + +Project Valid + + + +SE->PV + + + + + +PV->C + + + + + +AJS + +Test Coverage validated and Archived + + + +AJS->SE + + + + + +SD + +Data Archivate + + + +AJS->SD + + + + + +ASC + +Archivees Data + + + +SD->ASC + + + + + +ASC->SE + + + + + +BM + +Build Maven passed + + + +SM + +Evaluate Maven Project + + + +BM->SM + + + + + +M + +Maven ready + + + +SM->M + + + + + +M->SE + + + + + +SJA + +testCoverage Archivate + + + +SJA->AJS + + + + + +JV + +Test Coverage validated + + + +JV->SJA + + + + + +PDOC + +Project documented + + + +DOCR + +Documentation ready + + + +PDOC->DOCR + + + + + +DOCR->SE + + + + + +SC + +Scanning the project with SonarCloud + + + +SC->PS + + + + + +JA + +Jacoco report Archivate + + + +JA->SJA + + + + + +SJ + +Validate testCoverage + + + +SJ->JV + + + + + +IA + +images Archivate + + + +IA->SD + + + + + +RJ + +Jacoco Report + + + +RJ->SJA + + + + + +RJ->SJ + + + + + +TM + +Test Maven passed + + + +TM->SM + + + + + +CA + +code Archivate + + + +CA->SD + + + + + +CRM + +Creation of the README + + + +CRM->PDOC + + + + + diff --git a/src/test/resources/exampleCI/Pattern4CI_Valid.todo b/src/test/resources/exampleCI/Pattern4CI_Valid.todo new file mode 100644 index 0000000..bc61635 --- /dev/null +++ b/src/test/resources/exampleCI/Pattern4CI_Valid.todo @@ -0,0 +1,26 @@ +Requirements list + +[X] Creation of the README + [X] README.md +[X] code Archivate - reference : generatedCode +[X] Test Maven passed +[X] Jacoco Report + [X] target/site/jacoco/index.html + [x] Current coverage is 80, it's >= 70 +[X] images Archivate - reference : images + [x] justification/output/images/ (13 Files found) + [x] justification/ (2 Files found) +[X] Jacoco report Archivate - reference : jacoco +[X] Scanning the project with SonarCloud +[X] Documentation ready (optional) +[X] Test Coverage validated +[X] Build Maven passed + [x] justification/examples (10 Files found) +[X] Maven ready +[X] Test Coverage validated and Archived (optional) +[X] Archivees Data +[X] SonarCloud ready +[X] Project Valid +----------------------------------------------- +[X] Valid Continuous Integration +----------------------------------------------- \ No newline at end of file diff --git a/src/test/resources/exampleCI/Pattern4CI_Valid_REA.svg b/src/test/resources/exampleCI/Pattern4CI_Valid_REA.svg new file mode 100644 index 0000000..f3f595b --- /dev/null +++ b/src/test/resources/exampleCI/Pattern4CI_Valid_REA.svg @@ -0,0 +1,298 @@ + + +G + + + +C + + +Valid Continuous Integration + + + + + + + +interne + + + +PS + +Project Scan + + + +SCR + +SonarCloud ready + + + +PS->SCR + + + + + +SE + +Evaluate Project Quality + + + +SCR->SE + + + + + +PV + +Project Valid + + + +SE->PV + + + + + +PV->C + + + + + +AJS + +Test Coverage validated and Archived + + + +AJS->SE + + + + + +SD + +Data Archivate + + + +AJS->SD + + + + + +ASC + +Archivees Data + + + +SD->ASC + + + + + +ASC->SE + + + + + +BM + +Build Maven passed + + + +SM + +Evaluate Maven Project + + + +BM->SM + + + + + +M + +Maven ready + + + +SM->M + + + + + +M->SE + + + + + +SJA + +testCoverage Archivate + + + +SJA->AJS + + + + + +JV + +Test Coverage validated + + + +JV->SJA + + + + + +PDOC + +Project documented + + + +DOCR + +Documentation ready + + + +PDOC->DOCR + + + + + +DOCR->SE + + + + + +SC + +Scanning the project with SonarCloud + + + +SC->PS + + + + + +JA + +Jacoco report Archivate + + + +JA->SJA + + + + + +SJ + +Validate testCoverage + + + +SJ->JV + + + + + +IA + +images Archivate + + + +IA->SD + + + + + +RJ + +Jacoco Report + + + +RJ->SJA + + + + + +RJ->SJ + + + + + +TM + +Test Maven passed + + + +TM->SM + + + + + +CA + +code Archivate + + + +CA->SD + + + + + +CRM + +Creation of the README + + + +CRM->PDOC + + + + + diff --git a/src/test/resources/exampleCI/actionInvalid.json b/src/test/resources/exampleCI/actionInvalid.json new file mode 100644 index 0000000..b4deab5 --- /dev/null +++ b/src/test/resources/exampleCI/actionInvalid.json @@ -0,0 +1,112 @@ +[ + { + "Node":{ + "@comment": "The node labeled 'Jacoco Repor' is not optional, has 'Archi1' for reference and... ", + "Label":"Jacoco Report", + "Optional":"false", + "Reference":"Archi1", + "@comment2": "...the total coverage need to be superior to 70%... ", + "Actions": [ + "CheckCoverage target/site/jacoco/index.html > 70", + ], + "@comment3": "...need to check the exitance of the file 'target/site/jacoco/index.html'..." , + "Files": [ + "dontExist.todo","target/site/jacoco/index.html" + ], + "FilesNumber": [ + { + "@comment4":"...need to check if of the repertory 'justification/examples' have 10 files...", + "Path":"justification/examples", + "Number":"3" + }, + { + "@comment5":"...need to check if of the repertory 'justification/examples' have 10 files.", + "Path":"dontExist.txt", + "Number":"3" + }, + ], + } + }, + { + "Node":{ + "@comment": "The node labeled 'code Archivate' has 'generatedCode' for reference.", + "Label":"code Archivate", + "Reference":"generatedCode", + } + }, + { + "Node": { + "@comment": "The node labeled 'images Archivate' has 'images' for reference and...", + "Label":"images Archivate", + "Reference":"images", + "@comment2": "...need to check the exitance of the file 'justification/examples/exampleCI/Pattern4CI.jd'." , + "Files": [ + "justification/examples/exampleCI/Pattern4CI.jd" + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Build Maven passed'...", + "Label":"Build Maven passed", + "FilesNumber": [ + { + "@comment2":"need to check if of the repertory 'justification/examples' have 10 files.", + "Path":"justification/examples", + "Number":"10" + }, + ] + } + + + }, + { + "Node":{ + "@comment": "The node labeled 'Jacoco report Archivate' has 'jacoco' for reference.", + "Label":"Jacoco report Archivate", + "Reference":"jacoco", + } + + + }, + + { + "Node": { + "@comment": "The node labeled 'Data Archivat'...", + "Label":"Data Archivate", + "@comment2": "...need to check the exitance of the file 'dontExist.todo' and 'justification/output/images' and..." , + "Files": [ + "justification/output/images" + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Test Coverage validated and Archived' is optional and... ", + "Label":"Test Coverage validated and Archived", + "Optional":"true", + } + }, + { + "Node":{ + "@comment": "The node labeled 'Creation of the README'... ", + "Label":"Creation of the README", + "@comment3": "...and need to check the exitance of the file 'README.md'", + "Files": [ + "README.md" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'Documentation ready' is optional", + "Label":"Documentation ready", + "Optional":"true", + + } + } +] + + diff --git a/src/test/resources/exampleCI/actionValid.json b/src/test/resources/exampleCI/actionValid.json new file mode 100644 index 0000000..1396428 --- /dev/null +++ b/src/test/resources/exampleCI/actionValid.json @@ -0,0 +1,121 @@ +[ + { + "Node":{ + "@comment": "The node labeled 'Jacoco Repor' is not optional... ", + "Label":"Jacoco Report", + "Optional":"false", + "@comment2": "...the total coverage need to be superior to 70%... ", + "Actions": [ + "CheckValueInCSV target/site/jacoco/jacoco.csv 3 1 <= 500", + "CheckCoverage target/site/jacoco/jacoco.csv >= 70", + ], + "@comment3": "...and need to check the exitance of the file 'target/site/jacoco/index.html'." , + "Files": [ + "target/site/jacoco/index.html" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'code Archivate' has 'generatedCode' for reference.", + "Label":"code Archivate", + "Reference":"generatedCode", + } + }, + { + "Node": { + "@comment": "The node labeled 'images Archivate' has 'images' for reference and...", + "Label":"images Archivate", + "Reference":"images", + + "FilesNumber": [ + { + "@comment2": "...need to check if of the repertory 'justification/output/images/' have 13 files..." , + "Path":"justification/output/images/", + "Number":"16" + }, + { + "@comment3": "... and need to check if of the repertory 'justification/' have 2 files.", + "Path":"justification/", + "Number":"2" + }, + + + ], + } + + }, + { + "Node": { + "@comment": "The node labeled 'Test Maven Passed' has 'images' for reference and...", + "Label":"Test Maven Passed", + + "FilesNumber": [ + { + "@comment2": "...need to check if of the repertory 'justification/output/images/' have 13 files..." , + "Path":"justification/output/images/", + "Number":"16" + }, + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Build Maven passed'...", + "Label":"Build Maven passed", + "FilesNumber": [ + { + "@comment2":"need to check if of the repertory 'justification/examples' have 10 files.", + "Path":"justification/examples", + "Number":"10" + }, + ] + } + + + }, + { + "Node":{ + "@comment": "The node labeled 'Jacoco report Archivate' has 'jacoco' for reference.", + "Label":"Jacoco report Archivate", + "Reference":"jacoco", + } + + + }, + + { + "Node": { + "@comment": "The node labeled 'Continuous Integration' has 'GeneratedJD' for reference.", + "Label":"Continuous Integration", + "Reference":"GeneratedJD", + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Test Coverage validated and Archived' is optional. ", + "Label":"Test Coverage validated and Archived", + "Optional":"true", + } + }, + { + "Node":{ + "@comment": "The node labeled 'Creation of the README'... ", + "Label":"Creation of the README", + "@comment3": "...and need to check the exitance of the file 'README.md'", + "Files": [ + "README.md" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'Documentation ready' is optional", + "Label":"Documentation ready", + "Optional":"true", + + } + } +] diff --git a/src/test/resources/exampleCI/actionValid4CVS.json b/src/test/resources/exampleCI/actionValid4CVS.json new file mode 100644 index 0000000..6e4f3e9 --- /dev/null +++ b/src/test/resources/exampleCI/actionValid4CVS.json @@ -0,0 +1,105 @@ +[ + { + "Node":{ + "@comment": "The node labeled 'Jacoco Repor' is not optional... ", + "Label":"Jacoco Report", + "Optional":"false", + "@comment2": "...the total coverage need to be superior to 70%... ", + "Actions": [ + "CheckCoverage justification/examples/exampleCI/jacocoEclEmma.csv >= 90", + ], + "@comment3": "...and need to check the exitance of the file 'justification/examples/exampleCI/jacocoEclEmma.csv'." , + "Files": [ + "justification/examples/exampleCI/jacocoEclEmma.csv" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'code Archivate' has 'generatedCode' for reference.", + "Label":"code Archivate", + "Reference":"generatedCode", + } + }, + { + "Node": { + "@comment": "The node labeled 'images Archivate' has 'images' for reference and...", + "Label":"images Archivate", + "Reference":"images" + } + + }, + { + "Node": { + "@comment": "The node labeled 'Test Maven Passed' has 'images' for reference and...", + "Label":"Test Maven Passed", + + "FilesNumber": [ + { + "@comment2": "...need to check if of the repertory 'justification/output/images/' have 13 files..." , + "Path":"justification/output/images/", + "Number":"13" + }, + ], + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Build Maven passed'...", + "Label":"Build Maven passed", + "FilesNumber": [ + { + "@comment2":"need to check if of the repertory 'justification/examples' have 10 files.", + "Path":"justification/examples", + "Number":"10" + }, + ] + } + + + }, + { + "Node":{ + "@comment": "The node labeled 'Jacoco report Archivate' has 'jacoco' for reference.", + "Label":"Jacoco report Archivate", + "Reference":"jacoco", + } + + + }, + + { + "Node": { + "@comment": "The node labeled 'Continuous Integration' has 'GeneratedJD' for reference.", + "Label":"Continuous Integration", + "Reference":"GeneratedJD", + } + + }, + { + "Node":{ + "@comment": "The node labeled 'Test Coverage validated and Archived' is optional. ", + "Label":"Test Coverage validated and Archived", + "Optional":"true", + } + }, + { + "Node":{ + "@comment": "The node labeled 'Creation of the README'... ", + "Label":"Creation of the README", + "@comment3": "...and need to check the exitance of the file 'README.md'", + "Files": [ + "README.md" + ] + } + }, + { + "Node":{ + "@comment": "The node labeled 'Documentation ready' is optional", + "Label":"Documentation ready", + "Optional":"true", + + } + } +] \ No newline at end of file diff --git a/src/test/resources/exampleCI/jacocoEclEmma.csv b/src/test/resources/exampleCI/jacocoEclEmma.csv new file mode 100644 index 0000000..e144348 --- /dev/null +++ b/src/test/resources/exampleCI/jacocoEclEmma.csv @@ -0,0 +1,292 @@ +GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED +JaCoCo/org.jacoco.core,org.jacoco.core.tools,ExecFileLoader,0,93,1,1,0,28,1,7,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.tools,ExecDumpClient,7,115,0,4,4,38,2,11,2,9 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,ModifiedSystemClassRuntime,16,109,0,0,4,25,1,7,1,7 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,AgentOptions.OutputMode,0,44,0,0,0,5,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,LoggerRuntime,0,101,0,0,0,28,0,5,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,RemoteControlWriter,0,22,0,0,0,8,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,AgentOptions,0,501,0,34,0,108,0,62,0,45 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,ModifiedSystemClassRuntime.new ClassVisitor() {...},0,16,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,ModifiedSystemClassRuntime.new ClassFileTransformer() {...},0,21,0,2,0,4,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,InjectedClassRuntime.Lookup,73,0,0,0,6,0,4,0,4,0 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,LoggerRuntime.RuntimeHandler,9,20,1,1,3,4,3,2,2,2 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,CommandLineSupport,0,216,1,39,0,51,1,24,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,RemoteControlReader,0,42,0,5,0,15,0,7,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,WildcardMatcher,0,106,0,9,0,21,0,8,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,AbstractRuntime,4,12,0,0,1,4,1,3,1,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,RuntimeData,0,205,0,4,0,56,0,12,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,OfflineInstrumentationAccessGenerator,0,40,0,0,0,10,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,SystemPropertiesRuntime,0,56,0,0,0,13,0,4,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,InjectedClassRuntime,84,0,0,0,16,0,5,0,5,0 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,PrivateEmptyNoArgConstructorFilter,0,36,2,6,0,5,2,4,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,SyntheticFilter,0,62,2,18,0,18,2,11,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinUnsafeCastOperatorFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,EnumFilter,0,67,2,10,0,10,2,7,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesEcjFilter.Matcher,29,533,14,44,13,127,14,25,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinNotNullOperatorFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinUnsafeCastOperatorFilter.Matcher,3,61,4,8,3,16,4,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenStringFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,RecordsFilter,0,35,0,8,0,8,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinNotNullOperatorFilter.Matcher,0,24,0,4,0,8,0,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenFilter,9,67,2,7,2,16,2,7,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,FinallyFilter,8,299,10,61,5,73,10,33,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter,0,56,0,10,0,12,0,7,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,EnumEmptyConstructorFilter,0,34,0,8,0,5,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinGeneratedFilter,0,50,0,10,0,14,0,9,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,BridgeFilter,0,18,0,2,0,5,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinLateinitFilter.Matcher,0,26,0,4,0,8,0,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchEcjFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter.new Object() {...},4,29,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,Filters,0,186,0,2,0,8,0,5,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter.Matcher,18,271,7,28,7,70,7,16,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,EnumEmptyConstructorFilter.Matcher,0,25,0,2,0,6,0,2,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,SynchronizedFilter.Matcher,0,65,0,8,0,18,0,8,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultArgumentsFilter.Matcher,2,157,4,16,2,36,4,8,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultMethodsFilter,0,15,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,SynchronizedFilter,0,42,0,8,0,13,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,AbstractMatcher,0,186,0,42,0,56,0,31,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchJavacFilter,0,52,0,8,0,13,0,7,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinCoroutineFilter.Matcher,8,415,13,33,8,104,13,14,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchEcjFilter.Matcher,1,130,1,15,1,36,1,8,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenStringFilter.Matcher,1,127,1,13,1,36,1,7,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,AnnotationGeneratedFilter,0,81,0,14,0,15,0,11,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavac11Filter,0,44,0,6,0,10,0,5,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter.Matcher.JavacPattern,0,44,0,0,0,5,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,PrivateEmptyNoArgConstructorFilter.Matcher,1,18,1,1,0,4,1,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultMethodsFilter.Matcher,0,25,0,4,0,5,0,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,RecordsFilter.Matcher,4,117,3,23,2,26,3,14,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinLateinitFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultArgumentsFilter,2,68,1,11,1,17,1,9,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesEcjFilter,0,43,0,8,0,12,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenFilter.Matcher,0,66,1,9,0,17,1,5,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinCoroutineFilter,1,45,2,4,0,10,2,4,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchJavacFilter.Matcher,5,96,3,13,2,23,3,6,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinInlineFilter,6,222,0,30,2,52,0,20,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavac11Filter.Matcher,11,176,6,20,5,49,6,11,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.data,SessionInfo,0,57,0,6,0,16,0,9,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionDataStore,0,166,0,12,0,36,0,17,0,11 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionDataReader,0,168,0,20,0,47,0,19,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionData,0,188,0,14,0,35,0,18,0,11 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionDataWriter,6,101,0,2,2,33,0,8,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.data,SessionInfoStore,0,88,0,6,0,19,0,9,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.data,IncompatibleExecDataVersionException,0,25,0,0,0,5,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.instr,Instrumenter,6,380,1,15,1,97,1,25,0,16 +JaCoCo/org.jacoco.core,org.jacoco.core.instr,Instrumenter.new ClassWriter() {...},4,8,0,0,1,1,1,1,1,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,ICoverageNode.ElementType,0,64,0,0,0,7,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,ICoverageNode.CounterEntity,0,64,0,0,0,7,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CoverageBuilder,0,138,0,12,0,28,0,13,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,NodeComparator,0,46,0,0,0,12,0,4,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,NodeComparator.new NodeComparator() {...},0,30,0,2,0,3,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CoverageNodeImpl,5,199,1,10,1,47,1,22,0,15 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CounterComparator,0,76,0,4,0,15,0,8,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,Analyzer,0,318,0,19,0,79,0,24,0,13 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CoverageNodeImpl.new Object() {...},6,41,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,ICounter.CounterValue,0,54,0,0,0,6,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,Analyzer.new ClassAnalyzer() {...},0,21,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core,JaCoCo,0,16,0,0,0,5,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,StringPool,0,62,0,10,0,17,0,9,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,ClassAnalyzer.new MethodAnalyzer() {...},0,48,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,SourceFileCoverageImpl,0,11,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl.Fix,0,15,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl.new Object() {...},5,35,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,MethodCoverageImpl,0,71,0,4,0,16,0,7,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl,5,218,1,23,1,42,1,28,0,15 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,ClassAnalyzer,10,151,0,2,2,36,1,15,1,14 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,InstructionsBuilder,0,140,0,14,0,35,0,15,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,PackageCoverageImpl,0,37,0,4,0,10,0,5,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,InstructionsBuilder.Jump,0,21,0,0,0,7,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,Instruction,0,153,0,16,0,41,0,17,0,9 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,BundleCoverageImpl,0,140,0,12,0,33,0,11,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,SourceNodeImpl,0,269,0,34,0,56,0,25,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,ClassCoverageImpl,0,89,0,4,0,28,0,16,0,14 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,MethodAnalyzer,17,263,0,14,6,76,3,29,3,22 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,LineImpl,0,176,0,22,0,29,0,19,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,LineImpl.Fix,0,20,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,MethodCoverageCalculator,0,300,0,30,0,63,0,24,0,9 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,LineImpl.Var,0,20,0,0,0,5,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl.Var,0,19,0,0,0,5,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,Pack200Streams,24,127,0,0,12,19,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,Pack200Streams.NoCloseInput,0,5,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,InputStreams,0,24,0,2,0,8,0,2,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,ContentTypeDetector,0,81,0,10,0,21,0,11,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,MethodProbesAdapter,0,236,0,27,0,57,0,26,0,12 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,FrameSnapshot,0,97,0,12,0,22,0,11,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,LabelFlowAnalyzer,0,220,0,19,0,81,0,31,0,21 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,MethodProbesVisitor,0,18,0,0,0,11,0,8,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,MethodSanitizer,0,33,0,6,0,8,0,6,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesAdapter.new MethodSanitizer() {...},0,60,0,2,0,11,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesAdapter.new MethodProbesVisitor() {...},0,3,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,LabelInfo,0,223,0,36,0,60,0,38,0,20 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesVisitor,0,9,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesAdapter,0,75,0,2,0,18,0,7,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,CondyProbeArrayStrategy,0,74,0,0,0,17,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,NoneProbeArrayStrategy,0,8,0,0,0,3,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ProbeCounter,0,32,0,4,0,11,0,7,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,LocalProbeArrayStrategy,0,33,0,0,0,10,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ProbeArrayStrategyFactory,0,100,0,16,0,18,0,11,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ProbeInserter,0,242,0,22,0,53,0,21,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,InterfaceFieldProbeArrayStrategy,0,201,1,3,0,48,1,8,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,InstrSupport,0,127,0,20,0,24,0,17,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ClassInstrumenter,0,76,0,2,0,17,0,6,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,SignatureRemover,0,87,0,16,0,25,0,15,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,MethodInstrumenter,0,256,0,31,0,76,0,34,0,11 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,DuplicateFrameEliminator,0,148,0,2,0,46,0,16,0,15 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ClassFieldProbeArrayStrategy,0,142,0,2,0,35,0,8,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.data,CRC64,0,109,0,14,0,19,0,11,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.data,CompactDataInput,0,61,0,8,0,14,0,7,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.data,CompactDataOutput,0,74,0,10,0,20,0,8,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.html,HTMLFormatter,0,188,0,2,0,43,0,17,0,16 +JaCoCo/org.jacoco.report,org.jacoco.report.html,HTMLFormatter.new IReportVisitor() {...},0,89,0,2,0,18,0,7,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,ReportElement,0,152,1,1,0,38,1,13,0,13 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,XMLElement,0,323,0,35,0,84,0,31,0,12 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,XMLCoverageWriter,0,152,0,16,0,34,0,15,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,XMLGroupVisitor,0,34,0,0,0,10,0,4,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,CSVGroupHandler,0,82,0,8,0,16,0,9,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,DelimitedWriter,0,131,0,10,0,31,0,15,0,10 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,ClassRowWriter,0,157,0,4,0,22,0,6,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,CSVFormatter,0,46,0,0,0,11,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,CSVFormatter.new IReportVisitor() {...},0,18,0,0,0,6,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,MultiSourceFileLocator,0,43,0,4,0,13,0,6,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report,ZipMultiReportOutput,0,42,0,2,0,13,0,5,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report,FileMultiReportOutput,0,43,0,2,0,10,0,4,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,DirectorySourceFileLocator,0,25,0,2,0,7,0,3,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report,JavaNames,0,262,0,34,0,54,0,27,0,10 +JaCoCo/org.jacoco.report,org.jacoco.report,MultiReportVisitor,0,39,0,4,0,9,0,5,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,InputStreamSourceFileLocator,0,52,0,6,0,13,0,6,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,ZipMultiReportOutput.EntryOutput,0,62,0,4,0,21,0,9,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report,MultiGroupVisitor,0,50,0,4,0,10,0,5,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.index,ElementIndex,0,29,0,0,0,7,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html,HTMLGroupVisitor,0,69,0,0,0,15,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html,HTMLElement,0,254,0,2,0,74,0,30,0,29 +JaCoCo/org.jacoco.report,org.jacoco.report.xml,XMLFormatter,0,16,0,0,0,5,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.xml,XMLFormatter.new IReportVisitor() {...},0,74,0,4,0,17,0,8,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,PercentageColumn,0,64,0,2,0,18,0,8,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,SortIndex.Entry,0,21,0,0,0,5,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,BarColumn,0,135,0,8,0,29,0,10,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn,0,97,0,4,0,20,0,11,0,9 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,SortIndex,0,83,0,8,0,18,0,7,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn.new CounterColumn() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn.new CounterColumn() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn.new CounterColumn() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,TableItemComparator,0,14,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,Table,0,168,0,14,0,38,0,14,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,LabelColumn.new Comparator() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,LabelColumn,0,22,0,0,0,8,0,6,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,Table.Column,0,126,0,8,0,24,0,8,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal,ReportOutputFolder,0,144,0,10,0,26,0,12,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal,AbstractGroupVisitor,0,52,0,2,0,18,0,6,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal,NormalizedFileNames,0,145,0,12,0,32,0,11,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SourceHighlighter,0,164,0,10,0,36,0,13,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,ClassPage,0,183,0,14,0,30,0,13,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,BundlePage,2,97,1,9,0,26,1,10,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SessionsPage,0,225,0,10,0,50,0,12,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SourceFileItem,3,14,0,0,1,6,1,4,1,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SessionsPage.new Comparator() {...},0,21,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SourceFilePage,0,80,0,0,0,14,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,ReportPage,0,194,0,4,0,46,0,13,0,11 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,NodePage,0,26,0,2,0,8,0,5,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,TablePage,0,49,0,0,0,11,0,4,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,MethodItem,0,50,0,4,0,13,0,7,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,PackagePage,0,111,0,10,0,26,0,12,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,GroupPage,0,11,0,0,0,4,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,PackageSourcePage,0,125,0,6,0,30,0,11,0,8 +JaCoCo/org.jacoco.report,org.jacoco.report.check,Rule,0,82,0,4,0,24,0,13,0,11 +JaCoCo/org.jacoco.report,org.jacoco.report.check,BundleChecker,0,342,0,46,0,61,0,33,0,8 +JaCoCo/org.jacoco.report,org.jacoco.report.check,RulesChecker.new IReportVisitor() {...},0,18,0,0,0,6,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.check,BundleChecker.new Object() {...},5,35,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.report,org.jacoco.report.check,RulesChecker,0,36,0,0,0,10,0,4,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.check,Limit,0,307,0,34,0,64,0,32,0,15 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.resources,Resources.new Object() {...},6,41,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.resources,Styles,0,41,0,8,0,7,0,5,0,1 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.resources,Resources,12,122,1,8,1,40,1,11,0,5 +JaCoCo/org.jacoco.agent,org.jacoco.agent,AgentJar,11,72,2,6,3,24,2,8,0,6 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,ClassFileDumper,0,82,0,6,0,19,0,5,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,CoverageTransformer,6,162,0,26,1,38,0,19,0,6 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Agent,43,168,5,12,14,50,5,19,2,12 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,IExceptionLogger,5,0,0,0,1,0,1,0,1,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Agent.new Thread() {...},10,0,0,0,3,0,2,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Agent.new Object() {...},4,29,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Offline,31,0,2,0,8,0,3,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,ConfigLoader,6,129,0,12,2,32,0,11,0,5 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,PreMain,120,0,2,0,16,0,5,0,4,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,IExceptionLogger.new IExceptionLogger() {...},6,0,0,0,3,0,2,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,JmxRegistration,0,30,0,0,0,7,0,2,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt,RT,2,0,0,0,1,0,1,0,1,0 +JaCoCo/org.jacoco.agent.rt,com.vladium.emma.rt,RT,19,0,0,0,6,0,2,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpClientOutput.new Runnable() {...},0,18,0,0,0,6,0,2,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpServerOutput.new Runnable() {...},0,58,0,4,0,12,0,4,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpClientOutput,8,55,0,0,1,16,1,4,1,4 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,FileOutput,0,63,1,1,0,18,1,5,0,5 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpConnection,3,88,3,11,1,27,3,10,0,6 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,NoneOutput,3,3,0,0,3,1,3,1,3,1 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpServerOutput,13,73,1,5,2,22,2,7,1,5 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.SourceFilesElement,0,24,0,2,0,9,0,4,0,3 +JaCoCo/org.jacoco.ant,org.jacoco.ant,DumpTask.new ExecDumpClient() {...},6,23,0,0,2,3,1,2,1,2 +JaCoCo/org.jacoco.ant,org.jacoco.ant,InstrumentTask,0,144,0,6,0,35,0,9,0,6 +JaCoCo/org.jacoco.ant,org.jacoco.ant,CoverageTask.JavaLikeTaskEnhancer,0,71,0,2,0,18,0,5,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,CoverageTask,0,126,0,12,0,26,0,10,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AntResourcesLocator,0,60,0,4,0,17,0,6,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.CSVFormatterElement,0,46,0,2,0,11,0,5,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,CoverageTask.TestNGTaskEnhancer,4,8,0,0,2,3,1,1,1,1 +JaCoCo/org.jacoco.ant,org.jacoco.ant,MergeTask,0,128,0,6,0,32,0,9,0,6 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.GroupElement,0,39,0,0,0,11,0,5,0,5 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AntFilesLocator,0,34,0,2,0,9,0,4,0,3 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.HTMLFormatterElement,0,101,0,6,0,28,0,10,0,7 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.CheckFormatterElement,0,111,0,8,0,25,0,11,0,7 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.FormatterElement,0,7,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask,0,443,1,33,0,90,1,31,0,15 +JaCoCo/org.jacoco.ant,org.jacoco.ant,DumpTask,4,127,0,8,2,36,1,12,1,8 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.XMLFormatterElement,0,46,0,2,0,11,0,5,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AgentTask,0,36,0,6,0,8,0,6,0,3 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AbstractCoverageTask,9,140,0,4,2,47,0,22,0,20 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandHandler.new OptionDef() {...},0,10,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandHandler.new AbstractList() {...},5,22,0,0,2,3,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,Main.new Writer() {...},2,4,0,0,2,2,2,2,2,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandParser,0,10,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,Command,0,63,0,0,0,13,0,4,0,4 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,XmlDocumentation,0,121,0,4,0,23,0,5,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandHandler,2,83,0,4,1,12,1,5,1,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,Main,23,73,0,6,5,23,1,8,1,5 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Merge,0,73,0,4,0,14,0,6,0,4 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ExecInfo.new IExecutionDataVisitor() {...},0,44,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ExecInfo.new ISessionInfoVisitor() {...},0,38,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Dump.new ExecDumpClient() {...},0,42,0,0,0,5,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ExecInfo,0,104,0,8,0,23,0,9,0,5 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Version,0,10,0,0,0,4,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Instrument,0,154,0,8,0,27,0,9,0,5 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ClassInfo.Printer,0,177,0,10,0,23,0,11,0,6 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Report,0,273,0,18,0,51,0,18,0,9 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Dump,0,58,0,0,0,13,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ClassInfo,0,51,0,4,0,11,0,5,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,AllCommands,0,76,0,4,0,7,0,4,0,2 +JaCoCo/org.jacoco.examples,org.jacoco.examples,CoreTutorial.MemoryClassLoader,0,36,0,2,0,8,0,4,0,3 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecDump,7,95,0,6,2,21,1,7,1,4 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecutionDataServer,29,0,0,0,5,0,1,0,1,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,MBeanClient,61,0,0,0,12,0,1,0,1,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecutionDataServer.Handler,91,0,2,0,26,0,5,0,4,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ReportGenerator,133,0,2,0,28,0,7,0,6,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,CoreTutorial,6,226,0,8,2,46,1,10,1,5 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecutionDataClient,52,0,2,0,13,0,2,0,1,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,CoreTutorial.TestTarget,25,0,4,0,7,0,5,0,3,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ClassInfo,7,136,0,2,2,15,1,4,1,3 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecDump.new IExecutionDataVisitor() {...},0,42,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecDump.new ISessionInfoVisitor() {...},0,36,0,0,0,3,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportAggregateMojo,13,245,2,24,4,42,3,23,1,12 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,DumpMojo,7,51,1,1,2,11,1,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportITMojo,7,65,2,2,2,14,3,9,1,9 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,RestoreMojo,7,25,0,0,2,6,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AbstractJacocoMojo,1,19,0,2,1,8,1,4,1,3 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportSupport.SourceFileCollection,3,65,3,5,2,12,3,4,0,3 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,CheckMojo,43,108,3,9,7,28,3,8,0,5 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AgentMojo,0,6,0,0,0,2,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,FileFilter,0,48,0,2,0,12,0,7,0,6 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AbstractAgentMojo,2,231,4,36,1,52,4,24,0,8 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AgentITMojo,0,6,0,0,0,2,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportSupport.NoSourceLocator,4,6,0,0,2,1,2,1,2,1 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AbstractReportMojo,3,120,0,8,1,33,1,13,1,9 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,DumpMojo.new ExecDumpClient() {...},0,31,0,0,0,5,0,3,0,3 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,InstrumentMojo,14,111,1,5,4,24,1,4,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportMojo,7,65,2,2,2,14,3,9,1,9 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportSupport,10,341,4,14,2,64,4,19,0,14 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,MergeMojo,44,117,5,9,10,24,5,8,0,6 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,RuleConfiguration,8,27,0,0,2,9,1,4,1,4 diff --git a/src/test/resources/exampleCI/realizationPattern4CI.txt b/src/test/resources/exampleCI/realizationPattern4CI.txt new file mode 100644 index 0000000..45376cc --- /dev/null +++ b/src/test/resources/exampleCI/realizationPattern4CI.txt @@ -0,0 +1,9 @@ +Jacoco Report +code Archivate +images Archivate +Test Maven passed +Build Maven passed +Jacoco report Archivate +Valid Continuous Integration +Creation of the README +Scanning the project with SonarCloud \ No newline at end of file diff --git a/src/test/resources/exampleCI/realizationPattern4CIInvalid.txt b/src/test/resources/exampleCI/realizationPattern4CIInvalid.txt new file mode 100644 index 0000000..0994008 --- /dev/null +++ b/src/test/resources/exampleCI/realizationPattern4CIInvalid.txt @@ -0,0 +1,6 @@ +Build Maven passed +code Archivate +images Archivate +Data Archivate +Scanning the project with SonarCloud +Creation of the README \ No newline at end of file diff --git a/src/test/resources/jacoco/index.html b/src/test/resources/jacoco/index.html new file mode 100644 index 0000000..508e112 --- /dev/null +++ b/src/test/resources/jacoco/index.html @@ -0,0 +1 @@ +justification-diagram-generator

justification-diagram-generator

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total5 106 of 5 1060 %346 of 3460 %4264261 0441 0442502503636
parsing1 7980 %960 %1721723963961231231414
export1 4660 %680 %8888238238545466
models8260 %860 %919118718746461212
default5460 %500 %34341131139911
command3780 %380 %32328686131322
justificationDiagram920 %80 %9924245511
\ No newline at end of file diff --git a/src/test/resources/jacoco/jacocoComplexe0.csv b/src/test/resources/jacoco/jacocoComplexe0.csv new file mode 100644 index 0000000..dd7a814 --- /dev/null +++ b/src/test/resources/jacoco/jacocoComplexe0.csv @@ -0,0 +1,36 @@ +GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED +justification-diagram-generator,default,JDCompiler,546,0,50,0,113,0,34,0,9,0 +justification-diagram-generator,models,Node,515,0,66,0,96,0,47,0,14,0 +justification-diagram-generator,models,InformationNode,63,0,0,0,25,0,7,0,7,0 +justification-diagram-generator,models,SubConclusion,9,0,0,0,4,0,2,0,2,0 +justification-diagram-generator,models,Relation,75,0,10,0,18,0,10,0,5,0 +justification-diagram-generator,models,Support,9,0,0,0,4,0,2,0,2,0 +justification-diagram-generator,models,Strategy,9,0,0,0,4,0,2,0,2,0 +justification-diagram-generator,models,State,48,0,2,0,11,0,5,0,4,0 +justification-diagram-generator,models,Domain,9,0,0,0,4,0,2,0,2,0 +justification-diagram-generator,models,RelationFactory,21,0,2,0,4,0,3,0,2,0 +justification-diagram-generator,models,NodeFactory,47,0,6,0,8,0,7,0,2,0 +justification-diagram-generator,models,Rationale,9,0,0,0,4,0,2,0,2,0 +justification-diagram-generator,models,Conclusion,12,0,0,0,5,0,2,0,2,0 +justification-diagram-generator,parsing,JustificationDiagramParser.InstructionContext,47,0,6,0,11,0,10,0,7,0 +justification-diagram-generator,parsing,JustificationDiagramParser.RelationContext,49,0,6,0,12,0,11,0,8,0 +justification-diagram-generator,parsing,JustificationDiagramParser.DeclarationContext,47,0,6,0,11,0,10,0,7,0 +justification-diagram-generator,parsing,JustificationDiagramBaseVisitor,27,0,0,0,7,0,7,0,7,0 +justification-diagram-generator,parsing,JustificationDiagramParser.ElementContext,50,0,6,0,12,0,11,0,8,0 +justification-diagram-generator,parsing,JustificationDiagramParser,707,0,22,0,158,0,29,0,17,0 +justification-diagram-generator,parsing,JustificationDiagramParser.ConclusionContext,49,0,6,0,12,0,11,0,8,0 +justification-diagram-generator,parsing,RealizationParser,77,0,8,0,22,0,6,0,2,0 +justification-diagram-generator,parsing,InformationNodeParsing,212,0,20,0,58,0,14,0,4,0 +justification-diagram-generator,parsing,JDInitializer,81,0,2,0,12,0,8,0,7,0 +justification-diagram-generator,parsing,JustificationDiagramBaseListener,19,0,0,0,17,0,17,0,17,0 +justification-diagram-generator,parsing,JustificationDiagramParser.DiagramContext,65,0,6,0,15,0,14,0,11,0 +justification-diagram-generator,parsing,JustificationDiagramLexer,281,0,8,0,35,0,17,0,13,0 +justification-diagram-generator,parsing,JDLinker,87,0,0,0,14,0,7,0,7,0 +justification-diagram-generator,export,GraphDrawerRealization,492,0,12,0,60,0,18,0,12,0 +justification-diagram-generator,export,GraphDrawerLayout,131,0,8,0,26,0,15,0,11,0 +justification-diagram-generator,export,GraphDrawer,284,0,10,0,49,0,16,0,11,0 +justification-diagram-generator,export,TopologicalSort,141,0,12,0,28,0,10,0,4,0 +justification-diagram-generator,export,RequirementsLister,399,0,24,0,68,0,26,0,14,0 +justification-diagram-generator,export,TopologicalSort.OrderedNode,19,0,2,0,7,0,3,0,2,0 +justification-diagram-generator,command,CommandFactory,122,0,6,0,27,0,9,0,6,0 +justification-diagram-generator,justificationDiagram,JustificationDiagram,92,0,8,0,24,0,9,0,5,0 diff --git a/src/test/resources/jacoco/jacocoEclEmma.csv b/src/test/resources/jacoco/jacocoEclEmma.csv new file mode 100644 index 0000000..e144348 --- /dev/null +++ b/src/test/resources/jacoco/jacocoEclEmma.csv @@ -0,0 +1,292 @@ +GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED +JaCoCo/org.jacoco.core,org.jacoco.core.tools,ExecFileLoader,0,93,1,1,0,28,1,7,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.tools,ExecDumpClient,7,115,0,4,4,38,2,11,2,9 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,ModifiedSystemClassRuntime,16,109,0,0,4,25,1,7,1,7 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,AgentOptions.OutputMode,0,44,0,0,0,5,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,LoggerRuntime,0,101,0,0,0,28,0,5,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,RemoteControlWriter,0,22,0,0,0,8,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,AgentOptions,0,501,0,34,0,108,0,62,0,45 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,ModifiedSystemClassRuntime.new ClassVisitor() {...},0,16,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,ModifiedSystemClassRuntime.new ClassFileTransformer() {...},0,21,0,2,0,4,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,InjectedClassRuntime.Lookup,73,0,0,0,6,0,4,0,4,0 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,LoggerRuntime.RuntimeHandler,9,20,1,1,3,4,3,2,2,2 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,CommandLineSupport,0,216,1,39,0,51,1,24,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,RemoteControlReader,0,42,0,5,0,15,0,7,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,WildcardMatcher,0,106,0,9,0,21,0,8,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,AbstractRuntime,4,12,0,0,1,4,1,3,1,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,RuntimeData,0,205,0,4,0,56,0,12,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,OfflineInstrumentationAccessGenerator,0,40,0,0,0,10,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,SystemPropertiesRuntime,0,56,0,0,0,13,0,4,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.runtime,InjectedClassRuntime,84,0,0,0,16,0,5,0,5,0 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,PrivateEmptyNoArgConstructorFilter,0,36,2,6,0,5,2,4,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,SyntheticFilter,0,62,2,18,0,18,2,11,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinUnsafeCastOperatorFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,EnumFilter,0,67,2,10,0,10,2,7,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesEcjFilter.Matcher,29,533,14,44,13,127,14,25,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinNotNullOperatorFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinUnsafeCastOperatorFilter.Matcher,3,61,4,8,3,16,4,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenStringFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,RecordsFilter,0,35,0,8,0,8,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinNotNullOperatorFilter.Matcher,0,24,0,4,0,8,0,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenFilter,9,67,2,7,2,16,2,7,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,FinallyFilter,8,299,10,61,5,73,10,33,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter,0,56,0,10,0,12,0,7,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,EnumEmptyConstructorFilter,0,34,0,8,0,5,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinGeneratedFilter,0,50,0,10,0,14,0,9,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,BridgeFilter,0,18,0,2,0,5,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinLateinitFilter.Matcher,0,26,0,4,0,8,0,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchEcjFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter.new Object() {...},4,29,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,Filters,0,186,0,2,0,8,0,5,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter.Matcher,18,271,7,28,7,70,7,16,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,EnumEmptyConstructorFilter.Matcher,0,25,0,2,0,6,0,2,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,SynchronizedFilter.Matcher,0,65,0,8,0,18,0,8,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultArgumentsFilter.Matcher,2,157,4,16,2,36,4,8,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultMethodsFilter,0,15,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,SynchronizedFilter,0,42,0,8,0,13,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,AbstractMatcher,0,186,0,42,0,56,0,31,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchJavacFilter,0,52,0,8,0,13,0,7,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinCoroutineFilter.Matcher,8,415,13,33,8,104,13,14,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchEcjFilter.Matcher,1,130,1,15,1,36,1,8,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenStringFilter.Matcher,1,127,1,13,1,36,1,7,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,AnnotationGeneratedFilter,0,81,0,14,0,15,0,11,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavac11Filter,0,44,0,6,0,10,0,5,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavacFilter.Matcher.JavacPattern,0,44,0,0,0,5,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,PrivateEmptyNoArgConstructorFilter.Matcher,1,18,1,1,0,4,1,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultMethodsFilter.Matcher,0,25,0,4,0,5,0,3,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,RecordsFilter.Matcher,4,117,3,23,2,26,3,14,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinLateinitFilter,0,25,0,2,0,6,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinDefaultArgumentsFilter,2,68,1,11,1,17,1,9,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesEcjFilter,0,43,0,8,0,12,0,6,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinWhenFilter.Matcher,0,66,1,9,0,17,1,5,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinCoroutineFilter,1,45,2,4,0,10,2,4,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,StringSwitchJavacFilter.Matcher,5,96,3,13,2,23,3,6,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,KotlinInlineFilter,6,222,0,30,2,52,0,20,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis.filter,TryWithResourcesJavac11Filter.Matcher,11,176,6,20,5,49,6,11,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.data,SessionInfo,0,57,0,6,0,16,0,9,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionDataStore,0,166,0,12,0,36,0,17,0,11 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionDataReader,0,168,0,20,0,47,0,19,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionData,0,188,0,14,0,35,0,18,0,11 +JaCoCo/org.jacoco.core,org.jacoco.core.data,ExecutionDataWriter,6,101,0,2,2,33,0,8,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.data,SessionInfoStore,0,88,0,6,0,19,0,9,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.data,IncompatibleExecDataVersionException,0,25,0,0,0,5,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.instr,Instrumenter,6,380,1,15,1,97,1,25,0,16 +JaCoCo/org.jacoco.core,org.jacoco.core.instr,Instrumenter.new ClassWriter() {...},4,8,0,0,1,1,1,1,1,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,ICoverageNode.ElementType,0,64,0,0,0,7,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,ICoverageNode.CounterEntity,0,64,0,0,0,7,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CoverageBuilder,0,138,0,12,0,28,0,13,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,NodeComparator,0,46,0,0,0,12,0,4,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,NodeComparator.new NodeComparator() {...},0,30,0,2,0,3,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CoverageNodeImpl,5,199,1,10,1,47,1,22,0,15 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CounterComparator,0,76,0,4,0,15,0,8,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,Analyzer,0,318,0,19,0,79,0,24,0,13 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,CoverageNodeImpl.new Object() {...},6,41,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,ICounter.CounterValue,0,54,0,0,0,6,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.analysis,Analyzer.new ClassAnalyzer() {...},0,21,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core,JaCoCo,0,16,0,0,0,5,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,StringPool,0,62,0,10,0,17,0,9,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,ClassAnalyzer.new MethodAnalyzer() {...},0,48,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,SourceFileCoverageImpl,0,11,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl.Fix,0,15,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl.new Object() {...},5,35,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,MethodCoverageImpl,0,71,0,4,0,16,0,7,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl,5,218,1,23,1,42,1,28,0,15 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,ClassAnalyzer,10,151,0,2,2,36,1,15,1,14 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,InstructionsBuilder,0,140,0,14,0,35,0,15,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,PackageCoverageImpl,0,37,0,4,0,10,0,5,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,InstructionsBuilder.Jump,0,21,0,0,0,7,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,Instruction,0,153,0,16,0,41,0,17,0,9 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,BundleCoverageImpl,0,140,0,12,0,33,0,11,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,SourceNodeImpl,0,269,0,34,0,56,0,25,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,ClassCoverageImpl,0,89,0,4,0,28,0,16,0,14 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,MethodAnalyzer,17,263,0,14,6,76,3,29,3,22 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,LineImpl,0,176,0,22,0,29,0,19,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,LineImpl.Fix,0,20,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,MethodCoverageCalculator,0,300,0,30,0,63,0,24,0,9 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,LineImpl.Var,0,20,0,0,0,5,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.analysis,CounterImpl.Var,0,19,0,0,0,5,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,Pack200Streams,24,127,0,0,12,19,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,Pack200Streams.NoCloseInput,0,5,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,InputStreams,0,24,0,2,0,8,0,2,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal,ContentTypeDetector,0,81,0,10,0,21,0,11,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,MethodProbesAdapter,0,236,0,27,0,57,0,26,0,12 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,FrameSnapshot,0,97,0,12,0,22,0,11,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,LabelFlowAnalyzer,0,220,0,19,0,81,0,31,0,21 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,MethodProbesVisitor,0,18,0,0,0,11,0,8,0,8 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,MethodSanitizer,0,33,0,6,0,8,0,6,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesAdapter.new MethodSanitizer() {...},0,60,0,2,0,11,0,3,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesAdapter.new MethodProbesVisitor() {...},0,3,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,LabelInfo,0,223,0,36,0,60,0,38,0,20 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesVisitor,0,9,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.flow,ClassProbesAdapter,0,75,0,2,0,18,0,7,0,6 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,CondyProbeArrayStrategy,0,74,0,0,0,17,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,NoneProbeArrayStrategy,0,8,0,0,0,3,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ProbeCounter,0,32,0,4,0,11,0,7,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,LocalProbeArrayStrategy,0,33,0,0,0,10,0,3,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ProbeArrayStrategyFactory,0,100,0,16,0,18,0,11,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ProbeInserter,0,242,0,22,0,53,0,21,0,10 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,InterfaceFieldProbeArrayStrategy,0,201,1,3,0,48,1,8,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,InstrSupport,0,127,0,20,0,24,0,17,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ClassInstrumenter,0,76,0,2,0,17,0,6,0,5 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,SignatureRemover,0,87,0,16,0,25,0,15,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,MethodInstrumenter,0,256,0,31,0,76,0,34,0,11 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,DuplicateFrameEliminator,0,148,0,2,0,46,0,16,0,15 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.instr,ClassFieldProbeArrayStrategy,0,142,0,2,0,35,0,8,0,7 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.data,CRC64,0,109,0,14,0,19,0,11,0,4 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.data,CompactDataInput,0,61,0,8,0,14,0,7,0,3 +JaCoCo/org.jacoco.core,org.jacoco.core.internal.data,CompactDataOutput,0,74,0,10,0,20,0,8,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.html,HTMLFormatter,0,188,0,2,0,43,0,17,0,16 +JaCoCo/org.jacoco.report,org.jacoco.report.html,HTMLFormatter.new IReportVisitor() {...},0,89,0,2,0,18,0,7,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,ReportElement,0,152,1,1,0,38,1,13,0,13 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,XMLElement,0,323,0,35,0,84,0,31,0,12 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,XMLCoverageWriter,0,152,0,16,0,34,0,15,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.xml,XMLGroupVisitor,0,34,0,0,0,10,0,4,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,CSVGroupHandler,0,82,0,8,0,16,0,9,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,DelimitedWriter,0,131,0,10,0,31,0,15,0,10 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,ClassRowWriter,0,157,0,4,0,22,0,6,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,CSVFormatter,0,46,0,0,0,11,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.csv,CSVFormatter.new IReportVisitor() {...},0,18,0,0,0,6,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,MultiSourceFileLocator,0,43,0,4,0,13,0,6,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report,ZipMultiReportOutput,0,42,0,2,0,13,0,5,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report,FileMultiReportOutput,0,43,0,2,0,10,0,4,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,DirectorySourceFileLocator,0,25,0,2,0,7,0,3,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report,JavaNames,0,262,0,34,0,54,0,27,0,10 +JaCoCo/org.jacoco.report,org.jacoco.report,MultiReportVisitor,0,39,0,4,0,9,0,5,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,InputStreamSourceFileLocator,0,52,0,6,0,13,0,6,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report,ZipMultiReportOutput.EntryOutput,0,62,0,4,0,21,0,9,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report,MultiGroupVisitor,0,50,0,4,0,10,0,5,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.index,ElementIndex,0,29,0,0,0,7,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html,HTMLGroupVisitor,0,69,0,0,0,15,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html,HTMLElement,0,254,0,2,0,74,0,30,0,29 +JaCoCo/org.jacoco.report,org.jacoco.report.xml,XMLFormatter,0,16,0,0,0,5,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.xml,XMLFormatter.new IReportVisitor() {...},0,74,0,4,0,17,0,8,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,PercentageColumn,0,64,0,2,0,18,0,8,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,SortIndex.Entry,0,21,0,0,0,5,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,BarColumn,0,135,0,8,0,29,0,10,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn,0,97,0,4,0,20,0,11,0,9 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,SortIndex,0,83,0,8,0,18,0,7,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn.new CounterColumn() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn.new CounterColumn() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,CounterColumn.new CounterColumn() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,TableItemComparator,0,14,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,Table,0,168,0,14,0,38,0,14,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,LabelColumn.new Comparator() {...},0,9,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,LabelColumn,0,22,0,0,0,8,0,6,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.table,Table.Column,0,126,0,8,0,24,0,8,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal,ReportOutputFolder,0,144,0,10,0,26,0,12,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal,AbstractGroupVisitor,0,52,0,2,0,18,0,6,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal,NormalizedFileNames,0,145,0,12,0,32,0,11,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SourceHighlighter,0,164,0,10,0,36,0,13,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,ClassPage,0,183,0,14,0,30,0,13,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,BundlePage,2,97,1,9,0,26,1,10,0,6 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SessionsPage,0,225,0,10,0,50,0,12,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SourceFileItem,3,14,0,0,1,6,1,4,1,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SessionsPage.new Comparator() {...},0,21,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,SourceFilePage,0,80,0,0,0,14,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,ReportPage,0,194,0,4,0,46,0,13,0,11 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,NodePage,0,26,0,2,0,8,0,5,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,TablePage,0,49,0,0,0,11,0,4,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,MethodItem,0,50,0,4,0,13,0,7,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,PackagePage,0,111,0,10,0,26,0,12,0,7 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,GroupPage,0,11,0,0,0,4,0,3,0,3 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.page,PackageSourcePage,0,125,0,6,0,30,0,11,0,8 +JaCoCo/org.jacoco.report,org.jacoco.report.check,Rule,0,82,0,4,0,24,0,13,0,11 +JaCoCo/org.jacoco.report,org.jacoco.report.check,BundleChecker,0,342,0,46,0,61,0,33,0,8 +JaCoCo/org.jacoco.report,org.jacoco.report.check,RulesChecker.new IReportVisitor() {...},0,18,0,0,0,6,0,5,0,5 +JaCoCo/org.jacoco.report,org.jacoco.report.check,BundleChecker.new Object() {...},5,35,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.report,org.jacoco.report.check,RulesChecker,0,36,0,0,0,10,0,4,0,4 +JaCoCo/org.jacoco.report,org.jacoco.report.check,Limit,0,307,0,34,0,64,0,32,0,15 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.resources,Resources.new Object() {...},6,41,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.resources,Styles,0,41,0,8,0,7,0,5,0,1 +JaCoCo/org.jacoco.report,org.jacoco.report.internal.html.resources,Resources,12,122,1,8,1,40,1,11,0,5 +JaCoCo/org.jacoco.agent,org.jacoco.agent,AgentJar,11,72,2,6,3,24,2,8,0,6 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,ClassFileDumper,0,82,0,6,0,19,0,5,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,CoverageTransformer,6,162,0,26,1,38,0,19,0,6 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Agent,43,168,5,12,14,50,5,19,2,12 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,IExceptionLogger,5,0,0,0,1,0,1,0,1,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Agent.new Thread() {...},10,0,0,0,3,0,2,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Agent.new Object() {...},4,29,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,Offline,31,0,2,0,8,0,3,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,ConfigLoader,6,129,0,12,2,32,0,11,0,5 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,PreMain,120,0,2,0,16,0,5,0,4,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,IExceptionLogger.new IExceptionLogger() {...},6,0,0,0,3,0,2,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal,JmxRegistration,0,30,0,0,0,7,0,2,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt,RT,2,0,0,0,1,0,1,0,1,0 +JaCoCo/org.jacoco.agent.rt,com.vladium.emma.rt,RT,19,0,0,0,6,0,2,0,2,0 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpClientOutput.new Runnable() {...},0,18,0,0,0,6,0,2,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpServerOutput.new Runnable() {...},0,58,0,4,0,12,0,4,0,2 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpClientOutput,8,55,0,0,1,16,1,4,1,4 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,FileOutput,0,63,1,1,0,18,1,5,0,5 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpConnection,3,88,3,11,1,27,3,10,0,6 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,NoneOutput,3,3,0,0,3,1,3,1,3,1 +JaCoCo/org.jacoco.agent.rt,org.jacoco.agent.rt.internal.output,TcpServerOutput,13,73,1,5,2,22,2,7,1,5 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.SourceFilesElement,0,24,0,2,0,9,0,4,0,3 +JaCoCo/org.jacoco.ant,org.jacoco.ant,DumpTask.new ExecDumpClient() {...},6,23,0,0,2,3,1,2,1,2 +JaCoCo/org.jacoco.ant,org.jacoco.ant,InstrumentTask,0,144,0,6,0,35,0,9,0,6 +JaCoCo/org.jacoco.ant,org.jacoco.ant,CoverageTask.JavaLikeTaskEnhancer,0,71,0,2,0,18,0,5,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,CoverageTask,0,126,0,12,0,26,0,10,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AntResourcesLocator,0,60,0,4,0,17,0,6,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.CSVFormatterElement,0,46,0,2,0,11,0,5,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,CoverageTask.TestNGTaskEnhancer,4,8,0,0,2,3,1,1,1,1 +JaCoCo/org.jacoco.ant,org.jacoco.ant,MergeTask,0,128,0,6,0,32,0,9,0,6 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.GroupElement,0,39,0,0,0,11,0,5,0,5 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AntFilesLocator,0,34,0,2,0,9,0,4,0,3 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.HTMLFormatterElement,0,101,0,6,0,28,0,10,0,7 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.CheckFormatterElement,0,111,0,8,0,25,0,11,0,7 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.FormatterElement,0,7,0,0,0,2,0,2,0,2 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask,0,443,1,33,0,90,1,31,0,15 +JaCoCo/org.jacoco.ant,org.jacoco.ant,DumpTask,4,127,0,8,2,36,1,12,1,8 +JaCoCo/org.jacoco.ant,org.jacoco.ant,ReportTask.XMLFormatterElement,0,46,0,2,0,11,0,5,0,4 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AgentTask,0,36,0,6,0,8,0,6,0,3 +JaCoCo/org.jacoco.ant,org.jacoco.ant,AbstractCoverageTask,9,140,0,4,2,47,0,22,0,20 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandHandler.new OptionDef() {...},0,10,0,0,0,1,0,1,0,1 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandHandler.new AbstractList() {...},5,22,0,0,2,3,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,Main.new Writer() {...},2,4,0,0,2,2,2,2,2,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandParser,0,10,0,0,0,4,0,2,0,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,Command,0,63,0,0,0,13,0,4,0,4 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,XmlDocumentation,0,121,0,4,0,23,0,5,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,CommandHandler,2,83,0,4,1,12,1,5,1,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal,Main,23,73,0,6,5,23,1,8,1,5 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Merge,0,73,0,4,0,14,0,6,0,4 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ExecInfo.new IExecutionDataVisitor() {...},0,44,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ExecInfo.new ISessionInfoVisitor() {...},0,38,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Dump.new ExecDumpClient() {...},0,42,0,0,0,5,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ExecInfo,0,104,0,8,0,23,0,9,0,5 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Version,0,10,0,0,0,4,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Instrument,0,154,0,8,0,27,0,9,0,5 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ClassInfo.Printer,0,177,0,10,0,23,0,11,0,6 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Report,0,273,0,18,0,51,0,18,0,9 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,Dump,0,58,0,0,0,13,0,3,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,ClassInfo,0,51,0,4,0,11,0,5,0,3 +JaCoCo/org.jacoco.cli,org.jacoco.cli.internal.commands,AllCommands,0,76,0,4,0,7,0,4,0,2 +JaCoCo/org.jacoco.examples,org.jacoco.examples,CoreTutorial.MemoryClassLoader,0,36,0,2,0,8,0,4,0,3 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecDump,7,95,0,6,2,21,1,7,1,4 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecutionDataServer,29,0,0,0,5,0,1,0,1,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,MBeanClient,61,0,0,0,12,0,1,0,1,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecutionDataServer.Handler,91,0,2,0,26,0,5,0,4,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ReportGenerator,133,0,2,0,28,0,7,0,6,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,CoreTutorial,6,226,0,8,2,46,1,10,1,5 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecutionDataClient,52,0,2,0,13,0,2,0,1,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,CoreTutorial.TestTarget,25,0,4,0,7,0,5,0,3,0 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ClassInfo,7,136,0,2,2,15,1,4,1,3 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecDump.new IExecutionDataVisitor() {...},0,42,0,0,0,3,0,2,0,2 +JaCoCo/org.jacoco.examples,org.jacoco.examples,ExecDump.new ISessionInfoVisitor() {...},0,36,0,0,0,3,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportAggregateMojo,13,245,2,24,4,42,3,23,1,12 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,DumpMojo,7,51,1,1,2,11,1,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportITMojo,7,65,2,2,2,14,3,9,1,9 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,RestoreMojo,7,25,0,0,2,6,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AbstractJacocoMojo,1,19,0,2,1,8,1,4,1,3 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportSupport.SourceFileCollection,3,65,3,5,2,12,3,4,0,3 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,CheckMojo,43,108,3,9,7,28,3,8,0,5 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AgentMojo,0,6,0,0,0,2,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,FileFilter,0,48,0,2,0,12,0,7,0,6 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AbstractAgentMojo,2,231,4,36,1,52,4,24,0,8 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AgentITMojo,0,6,0,0,0,2,0,2,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportSupport.NoSourceLocator,4,6,0,0,2,1,2,1,2,1 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,AbstractReportMojo,3,120,0,8,1,33,1,13,1,9 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,DumpMojo.new ExecDumpClient() {...},0,31,0,0,0,5,0,3,0,3 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,InstrumentMojo,14,111,1,5,4,24,1,4,0,2 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportMojo,7,65,2,2,2,14,3,9,1,9 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,ReportSupport,10,341,4,14,2,64,4,19,0,14 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,MergeMojo,44,117,5,9,10,24,5,8,0,6 +JaCoCo/jacoco-maven-plugin,org.jacoco.maven,RuleConfiguration,8,27,0,0,2,9,1,4,1,4 diff --git a/src/test/resources/jacoco/jacocoSimple.csv b/src/test/resources/jacoco/jacocoSimple.csv new file mode 100755 index 0000000..26f4506 --- /dev/null +++ b/src/test/resources/jacoco/jacocoSimple.csv @@ -0,0 +1,3 @@ +GROUP,PACKAGE,CLASS,INSTRUCTION_MISSED,INSTRUCTION_COVERED,BRANCH_MISSED,BRANCH_COVERED,LINE_MISSED,LINE_COVERED,COMPLEXITY_MISSED,COMPLEXITY_COVERED,METHOD_MISSED,METHOD_COVERED +TestProjet,default,Hello,0,6,0,0,0,3,0,1,0,1 +TestProjet,default,HelloMain,26,0,0,0,7,0,2,0,2,0 diff --git a/src/test/resources/basic.jd b/src/test/resources/justificationDiagrams/basic.jd similarity index 94% rename from src/test/resources/basic.jd rename to src/test/resources/justificationDiagrams/basic.jd index 92f3ef2..4da26cd 100644 --- a/src/test/resources/basic.jd +++ b/src/test/resources/justificationDiagrams/basic.jd @@ -13,4 +13,10 @@ R --> S A --> S B --> S -@enduml \ No newline at end of file +@enduml + + + + + + diff --git a/src/test/resources/fig1.jd b/src/test/resources/justificationDiagrams/fig1.jd similarity index 100% rename from src/test/resources/fig1.jd rename to src/test/resources/justificationDiagrams/fig1.jd diff --git a/src/test/resources/fig2.jd b/src/test/resources/justificationDiagrams/fig2.jd similarity index 100% rename from src/test/resources/fig2.jd rename to src/test/resources/justificationDiagrams/fig2.jd diff --git a/src/test/resources/fig3.jd b/src/test/resources/justificationDiagrams/fig3.jd similarity index 100% rename from src/test/resources/fig3.jd rename to src/test/resources/justificationDiagrams/fig3.jd diff --git a/src/test/resources/justificationDiagrams/fig3.svg b/src/test/resources/justificationDiagrams/fig3.svg new file mode 100644 index 0000000..c50af4c --- /dev/null +++ b/src/test/resources/justificationDiagrams/fig3.svg @@ -0,0 +1,264 @@ + + +G + + + +S3 + +Assess risk management + + + +C3 + +Safety specifications validated + + + +S3->C3 + + + + + +R3 + +Credentials for ISO 14971 + + + + +S + +Assess software safety + + + +C3->S + + + + + +S2 + +Review architecture + + + +C3->S2 + + + + + +C + + +Software safety validated + + + + + + + +Internal + + + +S->C + + + + + +R + +Credentials for IEC 62304 + + + + +R->S + + + + + +C2 + +Architecture validated + + + +S2->C2 + + + + + +C2->S + + + + + +R3->S3 + + + + + +S4 + +Verify consistency + + + +C4 + +Risks consistency + + + +S4->C4 + + + + + +C4->S3 + + + + + +D + +Internal accreditation + + + +D->S + + + + + +F + +Architecture + + + +F->S2 + + + + + +G + +Risk mitigation plan + + + +G->S3 + + + + + +H + +Technical specifications + + + +H->S2 + + + + + +H->S4 + + + + + +C5 + +Feasible hard points + + + +H->C5 + + + + + +C1 + +Specifications validated + + + +H->C1 + + + + + +C5->S2 + + + + + +C1->S + + + + + +I + +Functional specifications + + + +I->S4 + + + + + +I->C1 + + + + + +J + +Identified risks + + + +J->S3 + + + + + +J->S4 + + + + + diff --git a/src/test/resources/justificationDiagrams/fig3.todo b/src/test/resources/justificationDiagrams/fig3.todo new file mode 100644 index 0000000..69f9e9e --- /dev/null +++ b/src/test/resources/justificationDiagrams/fig3.todo @@ -0,0 +1,20 @@ +Requirements list + +[X] Identified risks - reference : Archi1 +[ ] Functional specifications - reference : Archi1 (optional) + [X] justification/examples/realization/realizationFig3.txt +[X] Technical specifications - reference : jacoco + [X] .github/workflows + [x] .github/workflows +[X] Feasible hard points +[X] Specifications validated +[ ] Risk mitigation plan +[ ] Architecture +[ ] Risks consistency (optional) + [ ] dontExit - (not found) +[ ] Safety specifications validated +[ ] Architecture validated + [ ] dontExit - (not found) +----------------------------------------------- +[ ] Software safety validated +----------------------------------------------- \ No newline at end of file diff --git a/src/test/resources/justificationDiagrams/fig3_REA.svg b/src/test/resources/justificationDiagrams/fig3_REA.svg new file mode 100644 index 0000000..cc1686d --- /dev/null +++ b/src/test/resources/justificationDiagrams/fig3_REA.svg @@ -0,0 +1,264 @@ + + +G + + + +S3 + +Assess risk management + + + +C3 + +Safety specifications validated + + + +S3->C3 + + + + + +R3 + +Credentials for ISO 14971 + + + + +S + +Assess software safety + + + +C3->S + + + + + +S2 + +Review architecture + + + +C3->S2 + + + + + +C + + +Software safety validated + + + + + + + +Internal + + + +S->C + + + + + +R + +Credentials for IEC 62304 + + + + +R->S + + + + + +C2 + +Architecture validated + + + +S2->C2 + + + + + +C2->S + + + + + +R3->S3 + + + + + +S4 + +Verify consistency + + + +C4 + +Risks consistency + + + +S4->C4 + + + + + +C4->S3 + + + + + +D + +Internal accreditation + + + +D->S + + + + + +F + +Architecture + + + +F->S2 + + + + + +G + +Risk mitigation plan + + + +G->S3 + + + + + +H + +Technical specifications + + + +H->S2 + + + + + +H->S4 + + + + + +C5 + +Feasible hard points + + + +H->C5 + + + + + +C1 + +Specifications validated + + + +H->C1 + + + + + +C5->S2 + + + + + +C1->S + + + + + +I + +Functional specifications + + + +I->S4 + + + + + +I->C1 + + + + + +J + +Identified risks + + + +J->S3 + + + + + +J->S4 + + + + + diff --git a/src/test/resources/realization/empty.txt b/src/test/resources/realization/empty.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/test/resources/realization/example2_realization.txt b/src/test/resources/realization/example2_realization.txt new file mode 100644 index 0000000..21612d7 --- /dev/null +++ b/src/test/resources/realization/example2_realization.txt @@ -0,0 +1,6 @@ +Jacoco Report +code Archivate +images Archivate +Test Maven passed +Build Maven passed +Jacoco report Archivate diff --git a/src/test/resources/realization/example3_realization.txt b/src/test/resources/realization/example3_realization.txt new file mode 100644 index 0000000..d8e028f --- /dev/null +++ b/src/test/resources/realization/example3_realization.txt @@ -0,0 +1,6 @@ +Jacoco Report!-!file1;file2!ref!archi1 +code Archivate!ref!archi2 +images Archivate!-!file1;file2 +Test Maven passed +Build Maven passed +Jacoco report Archivate diff --git a/src/test/resources/realization/example4_realization.txt b/src/test/resources/realization/example4_realization.txt new file mode 100644 index 0000000..cd9d629 --- /dev/null +++ b/src/test/resources/realization/example4_realization.txt @@ -0,0 +1,4 @@ +JUnit test logs +Jenkins test logs +Internal +ISO 1234 \ No newline at end of file diff --git a/src/test/resources/realization/example5_realization.txt b/src/test/resources/realization/example5_realization.txt new file mode 100644 index 0000000..e35fb09 --- /dev/null +++ b/src/test/resources/realization/example5_realization.txt @@ -0,0 +1,4 @@ +JUnit test logs!-!output/realization/realization.txt!ref!archi1 +Jenkins test logs +Internal +ISO 1234 \ No newline at end of file diff --git a/src/test/resources/realization/example6_realization.txt b/src/test/resources/realization/example6_realization.txt new file mode 100644 index 0000000..a4f0dbc --- /dev/null +++ b/src/test/resources/realization/example6_realization.txt @@ -0,0 +1,4 @@ +JUnit test logs!-!output/example5_realization!ref!archi1 +Jenkins test logs +Internal +ISO 1234 \ No newline at end of file diff --git a/src/test/resources/realization/example7_realization.txt b/src/test/resources/realization/example7_realization.txt new file mode 100644 index 0000000..4026e20 --- /dev/null +++ b/src/test/resources/realization/example7_realization.txt @@ -0,0 +1,7 @@ +Jacoco Report +code Archivate!ref!generatedCode +images Archivate!-!output/images/basic.svg;output/images/fig1.svg;output/images/fig2.gv;output/images/fig2.todo;output/images/fig3.svg;output/images/fig3.todo;output/images/Pattern4CI.svg;output/images/Pattern4CI.todo;output/images/test_NC.svg;output/images/test_NC.todo!ref!images +Test Maven passed +Build Maven passed +Jacoco report Archivate!ref!jacoco +Valid Continuous Integration!-!output/GeneratedJD/Pattern4CI.svg;output/GeneratedJD/Pattern4CI.td;output/GeneratedJD/Pattern4CI_REA.svg!ref!GeneratedJD diff --git a/src/test/resources/realization/example8_realization.txt b/src/test/resources/realization/example8_realization.txt new file mode 100644 index 0000000..c957430 --- /dev/null +++ b/src/test/resources/realization/example8_realization.txt @@ -0,0 +1,7 @@ +Jacoco Report +code Archivate!ref!generatedCode +images Archivate!-!output/images/basic.svg;output/images/fig1.svg;output/images/fig2.gv;output/images/fig2.todo;output/images/fig3.svg;output/images/fig3.todo;output/images/Pattern4CI_Valid_REA.svg;output/images/Pattern4CI_NotValid_REA.svg;output/images/Pattern4CI_NotValid.todo;output/images/Pattern4CI_Valid.svg;output/images/Pattern4CI_Valid.todo;output/images/test_NC.svg;output/images/test_NC.todo!ref!images +Test Maven passed +Build Maven passed +Jacoco report Archivate!ref!jacoco +Valid Continuous Integration!ref!GeneratedJD diff --git a/src/test/resources/realization/example_realizationSimple.txt b/src/test/resources/realization/example_realizationSimple.txt new file mode 100644 index 0000000..a5bc2fa --- /dev/null +++ b/src/test/resources/realization/example_realizationSimple.txt @@ -0,0 +1,3 @@ +Test Maven passed +Build Maven passed +Jacoco report Archivate diff --git a/src/test/resources/realization/realizationBasic.txt b/src/test/resources/realization/realizationBasic.txt new file mode 100644 index 0000000..a1e6a47 --- /dev/null +++ b/src/test/resources/realization/realizationBasic.txt @@ -0,0 +1,4 @@ + +JUnit test logs +ISO 1234 +Internal \ No newline at end of file