Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into main for the upcoming 5.0.0 major release #1576

Merged
merged 249 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
fd89367
Testing local report viewer
dfuchss Jul 5, 2023
739fa34
Update to Java JDK 20
dfuchss Jul 16, 2023
6807daf
Merge branch 'develop' into feature/internal-web-viewer
dfuchss Jul 16, 2023
a52b059
Merge branch 'develop' into feature/internal-web-viewer
tsaglam Sep 29, 2023
5d2c8df
Implemented routing for internal report viewer.
TwoOfTwelve Oct 12, 2023
7e2d1bd
Implemented server side for local mode.
TwoOfTwelve Oct 12, 2023
e27f632
Fixed 404 response codes for local mode.
TwoOfTwelve Oct 12, 2023
3085de0
frontend logic for local mode
Kr0nox Oct 12, 2023
0defe37
Removed accidental changes from package.json
TwoOfTwelve Oct 12, 2023
5a27848
remove unneeded dependencies
Kr0nox Oct 16, 2023
3a5b0be
Merge remote-tracking branch 'origin/develop' into feature/internal-w…
Kr0nox Oct 16, 2023
853ff7f
Changed local report viewer to return index html for every path, that…
TwoOfTwelve Oct 18, 2023
c794eff
Merge remote-tracking branch 'origin/feature/internal-web-viewer' int…
TwoOfTwelve Oct 18, 2023
4c8ea19
Fixed small error for local mode.
TwoOfTwelve Oct 18, 2023
30ac721
fix new tabs on comparison
Kr0nox Oct 21, 2023
288716f
Moved compiling the report-viewer into a profile.
TwoOfTwelve Oct 31, 2023
d65afab
Merge remote-tracking branch 'origin/feature/internal-web-viewer' int…
TwoOfTwelve Oct 31, 2023
e9f902d
fix tests
Kr0nox Nov 8, 2023
e36eb01
Merge remote-tracking branch 'origin/develop' into feature/internal-w…
Kr0nox Nov 30, 2023
4f055d0
fix report viewer build
Kr0nox Nov 30, 2023
daede42
fix new tabs
Kr0nox Nov 30, 2023
71d094c
Added javadoc to internal report viewer and moved the resource declar…
TwoOfTwelve Dec 1, 2023
c00d460
Changed the report object factory to immediately write to a zip file …
TwoOfTwelve Dec 5, 2023
a207694
Added logging for not existing resource url.
TwoOfTwelve Dec 5, 2023
dc58ad6
Merge branch 'develop' into feature/internal-web-viewer
dfuchss Dec 6, 2023
31b818b
Changed port to 1996.
TwoOfTwelve Dec 11, 2023
aadeae3
Merge remote-tracking branch 'origin/feature/internal-web-viewer' int…
TwoOfTwelve Dec 11, 2023
f9d32d2
Merge remote-tracking branch 'origin/develop' into feature/internal-w…
Kr0nox Dec 11, 2023
10a9453
Added port option for internal report viewer
TwoOfTwelve Dec 12, 2023
3c84512
Merge remote-tracking branch 'origin/feature/internal-web-viewer' int…
TwoOfTwelve Dec 12, 2023
324e86b
Implemented progress bars for the cli
TwoOfTwelve Dec 12, 2023
9d864d0
Spotless
TwoOfTwelve Dec 12, 2023
e4fa97f
Merge remote-tracking branch 'origin/develop' into feature/internal-w…
dfuchss Dec 14, 2023
86f0716
Build report viewer only if needed.
dfuchss Dec 14, 2023
085f0c8
Changed progress bar implementation to rely on a singleton instead of…
TwoOfTwelve Jan 9, 2024
1b7a1c4
Fixed error in NormalizationTest from previous commit.
TwoOfTwelve Jan 9, 2024
8881407
Implemented suggestions
TwoOfTwelve Jan 9, 2024
b69cd36
Merge branch 'develop' into feature/internal-web-viewer
TwoOfTwelve Jan 23, 2024
52bf30b
fix prettier
Kr0nox Jan 23, 2024
1dcc4b5
fix loading index html file
Kr0nox Jan 23, 2024
4b9c925
file name in tab
Kr0nox Jan 23, 2024
67ba1ab
Renamed cpp to c and cpp2 to cpp
TwoOfTwelve Jan 23, 2024
d4920db
fix anonymous propagation
Kr0nox Jan 23, 2024
3c7c9d3
add c/cpp rename to report viewer
Kr0nox Jan 30, 2024
a0ed87b
Fixed compiler error due to renaming of cpp modules.
TwoOfTwelve Jan 30, 2024
de1c6e8
Merge remote-tracking branch 'origin/feature/cpp-module-names' into f…
TwoOfTwelve Jan 30, 2024
24c1df3
Reverted old changes to JPlag.java, due to the different solution for…
TwoOfTwelve Jan 30, 2024
77e79d6
add link text
Kr0nox Jan 30, 2024
51eaa54
increase bottom padding
Kr0nox Jan 30, 2024
20d269f
new submission index structure
Kr0nox Jan 30, 2024
7bef2f3
extract token information
Kr0nox Jan 30, 2024
e29ea26
exclude non matchable tokens
Kr0nox Jan 30, 2024
953b0a2
display file percentage
Kr0nox Jan 30, 2024
ffd2f25
fix spotless
Kr0nox Jan 30, 2024
7068e97
tooltip
Kr0nox Jan 30, 2024
bec418f
fix unit tests
Kr0nox Jan 30, 2024
75fa0a5
fix sonar cloud
Kr0nox Jan 30, 2024
e3381f3
handle eof token
Kr0nox Feb 1, 2024
1e19cb1
Merge branch 'develop' into feature/immediateZipFileCreation
TwoOfTwelve Feb 2, 2024
9a24ef1
Added logging and cleaned up progress bar code.
TwoOfTwelve Feb 2, 2024
faf05ca
Simplified C / CPP names
TwoOfTwelve Feb 2, 2024
0e6a23a
Simplified C / CPP names
TwoOfTwelve Feb 2, 2024
34e34e8
Simplified C / CPP names
TwoOfTwelve Feb 2, 2024
3442517
Merge pull request #1416 from jplag/feature/immediateZipFileCreation
tsaglam Feb 2, 2024
8ca2c8a
Merge remote-tracking branch 'origin/develop' into feature/cpp-module…
Kr0nox Feb 2, 2024
7e61b0f
Increase development version to 5.0.0-SNAPSHOT.
tsaglam Feb 2, 2024
ac80abd
Update README.md
tsaglam Feb 4, 2024
61426d5
Merge pull request #1527 from jplag/fix/java-badge
tsaglam Feb 5, 2024
57e70b9
Merge pull request #1526 from jplag/release/500-snapshot
tsaglam Feb 5, 2024
3bbc3e4
use undefined for not given value
Kr0nox Feb 5, 2024
dd039ac
Renamed the submissions for the demo. The names are now the combinati…
TwoOfTwelve Feb 6, 2024
7956543
Fixed some minor code style issues in the internal report viewer.
TwoOfTwelve Feb 6, 2024
989d83b
remove cyclic reference problem
Kr0nox Feb 6, 2024
9046f6e
Merge pull request #1530 from jplag/feature/demo-rename
tsaglam Feb 6, 2024
480fcca
Merge pull request #1531 from jplag/bug-fix/broken-cluster-sorting
sebinside Feb 6, 2024
d7cec8f
include similarities in report
Kr0nox Feb 6, 2024
8fc0aeb
remove visual complexity
Kr0nox Feb 6, 2024
66945f5
Fix EMF model language submission order customization.
tsaglam Feb 6, 2024
3823c9a
Introduce zero-padded data structure for token occurrence vectors.
tsaglam Feb 6, 2024
9fa84a9
Fix EMF model instance test.
tsaglam Feb 6, 2024
317f739
Ensure consistent order and instance-independent state for the dynami…
tsaglam Feb 6, 2024
60c7ad4
Use zero-padded token occurrence vectors to fix normalization crashes…
tsaglam Feb 6, 2024
ab6ae74
Merge branch 'develop' into feature/internal-web-viewer
TwoOfTwelve Feb 6, 2024
34c177b
Merge remote-tracking branch 'origin/feature/internal-web-viewer' int…
TwoOfTwelve Feb 6, 2024
ccaddce
add example zip name again
Kr0nox Feb 6, 2024
7b724bb
add node js link to docs
Kr0nox Feb 6, 2024
33d84ac
Changed the implementation of the progress bar for the comparison.
TwoOfTwelve Feb 6, 2024
70a5ff1
exclude eof token
Kr0nox Feb 6, 2024
2e7de5f
total token count
Kr0nox Feb 6, 2024
da8f186
add similarity to view
Kr0nox Feb 6, 2024
0f56be2
spottless
Kr0nox Feb 6, 2024
01e4612
reference component
Kr0nox Feb 6, 2024
6861c64
different repo message styles
Kr0nox Feb 6, 2024
77ae7f5
Merge remote-tracking branch 'origin/develop' into report-viewer/gith…
Kr0nox Feb 6, 2024
5946812
Merge remote-tracking branch 'origin/develop' into report-viewer/sing…
Kr0nox Feb 7, 2024
3a28b96
Dependency(deps-dev): Bump postcss from 8.4.33 to 8.4.34 in /report-v…
dependabot[bot] Feb 7, 2024
2a8de66
Dependency(deps-dev): Bump @vue/eslint-config-prettier from 8.0.0 to …
dependabot[bot] Feb 7, 2024
94215ac
Dependency(deps-dev): Bump prettier from 3.2.4 to 3.2.5 in /report-vi…
dependabot[bot] Feb 7, 2024
49a9d11
Dependency(deps): Bump edu.stanford.nlp:stanford-corenlp
dependabot[bot] Feb 7, 2024
c782fbb
Dependency(deps-dev): Bump junit.version from 5.10.1 to 5.10.2
dependabot[bot] Feb 7, 2024
ec67dd8
Dependency(deps-dev): Bump org.assertj:assertj-core
dependabot[bot] Feb 7, 2024
ffd6c01
Dependency(deps): Bump slf4j.version from 2.0.11 to 2.0.12
dependabot[bot] Feb 7, 2024
e6f0cd4
remove empty style block
Kr0nox Feb 7, 2024
907542e
Dependency(deps-dev): Bump lint-staged from 15.2.1 to 15.2.2 in /repo…
dependabot[bot] Feb 7, 2024
1a66d1e
bump husky to v9
Kr0nox Feb 7, 2024
b7e7cc8
update configs for husky v9
Kr0nox Feb 7, 2024
0691c42
Merge pull request #1548 from jplag/dependencies/bump-husky
Kr0nox Feb 7, 2024
258d0e0
Consider attributes with the keyword name as identifiers for the meta…
tsaglam Feb 7, 2024
ebd5ca5
Remove temporary debug statement.
tsaglam Feb 7, 2024
023f41d
Rename MetamodelTreeView to GenericEmfTreeView.
tsaglam Feb 7, 2024
40f6699
Merge pull request #1547 from jplag/report-viewer/fix-sonar
tsaglam Feb 8, 2024
c7f47d6
add calculation to submission and use parralel stream
Kr0nox Feb 8, 2024
06e4bbe
fix path of copied submissions
Kr0nox Feb 8, 2024
f1651ec
remove print
Kr0nox Feb 8, 2024
43549e1
Merge pull request #1549 from jplag/report-viewer/remove-print
tsaglam Feb 9, 2024
70a449f
Written tests for internal server.
TwoOfTwelve Feb 9, 2024
24fba7e
Merge remote-tracking branch 'origin/feature/internal-web-viewer' int…
TwoOfTwelve Feb 9, 2024
889cc05
Improved clarity for HttpRequestMethod
TwoOfTwelve Feb 9, 2024
ff41250
Improved language for progress bars.
TwoOfTwelve Feb 9, 2024
63e9839
Moved SubmissionFileData into its own file.
TwoOfTwelve Feb 9, 2024
b25863c
Improved c++ readability.
TwoOfTwelve Feb 9, 2024
b4ae507
Changes to MatchMerging as its tests by nils.
TwoOfTwelve Feb 9, 2024
bd10512
spotless.
TwoOfTwelve Feb 9, 2024
306e10b
fix file copying
Kr0nox Feb 10, 2024
c4a25f5
Merge pull request #1551 from jplag/bug-fix/submission-file-copy
tsaglam Feb 13, 2024
0464d4f
Merge remote-tracking branch 'origin/develop' into feature/internal-w…
Kr0nox Feb 13, 2024
133b6cf
Merge remote-tracking branch 'origin/develop' into report-viewer/sing…
Kr0nox Feb 13, 2024
459c598
Overhaul generic EMF model view to derive more information from an EM…
tsaglam Feb 13, 2024
a8b85c8
Clean up EMF modules.
tsaglam Feb 13, 2024
45dd565
Remove duplicate name feature from generic EMF view.
tsaglam Feb 13, 2024
19e19bc
Update expected output of the generic EMF view tests.
tsaglam Feb 13, 2024
66a834f
Re-enable model normalization.
tsaglam Feb 13, 2024
8c252fb
save calculation
Kr0nox Feb 13, 2024
beb31a7
dont break line in report viewer
Kr0nox Feb 13, 2024
9e1c76d
Improved c++ readability.
TwoOfTwelve Feb 9, 2024
0e2c55b
Merge remote-tracking branch 'origin/feature/cpp-module-names' into f…
TwoOfTwelve Feb 13, 2024
46c674c
Revert "Improved c++ readability."
TwoOfTwelve Feb 13, 2024
916f6c1
Provide the generic model view with UUID for better readability.
tsaglam Feb 13, 2024
8bf61d7
Adapt test results and rename test class.
tsaglam Feb 13, 2024
9f03872
spotless.
TwoOfTwelve Feb 13, 2024
7385996
Simplified code
TwoOfTwelve Feb 13, 2024
5942e67
Minor fixes regarding code quality.
tsaglam Feb 13, 2024
f51c7a6
Merge pull request #1550 from jplag/feature/Merging
tsaglam Feb 13, 2024
16d1aa1
fix print
Kr0nox Feb 13, 2024
07e4386
Fixed bug in the end-to-end test, that occurred on mac, due to symbol…
TwoOfTwelve Feb 13, 2024
dc0d3c7
Merge pull request #1553 from jplag/feature/e2e-tests-mac-bug
tsaglam Feb 13, 2024
ce39f2c
Updated c/cpp readmes.
TwoOfTwelve Feb 13, 2024
235f81b
Fix typos.
tsaglam Feb 13, 2024
93b6655
Added port lookup.
TwoOfTwelve Feb 13, 2024
1f27130
spotless
TwoOfTwelve Feb 13, 2024
2ac4188
Update documentation of EMF language modules.
tsaglam Feb 13, 2024
b91395a
Merge pull request #1516 from jplag/report-viewer/single-file-similarity
sebinside Feb 13, 2024
afcc519
add tooltip
Kr0nox Feb 13, 2024
8eb5ee3
left allign
Kr0nox Feb 13, 2024
583a1ca
fetch system dark mode
Kr0nox Feb 13, 2024
4b0a944
remove duplicate info about token count
Kr0nox Feb 13, 2024
ce32991
remove unused import
Kr0nox Feb 13, 2024
79ae0e2
move files from state to model
Kr0nox Feb 13, 2024
769f83f
Merge pull request #1515 from jplag/report-viewer/github-link
sebinside Feb 14, 2024
bdbb7c1
Merge pull request #1554 from jplag/report-viewer/system-dark-mode
sebinside Feb 14, 2024
4a3290f
Merge pull request #1552 from jplag/report-viewer/fix-line-break
sebinside Feb 14, 2024
a3ff195
Merge pull request #1533 from jplag/report-viewer/seperate-similarity
sebinside Feb 14, 2024
d1d8be1
Merge pull request #1556 from jplag/report-viewer/move-files
sebinside Feb 14, 2024
6fe98ad
Merge remote-tracking branch 'origin/develop' into feature/internal-w…
Kr0nox Feb 14, 2024
38772e2
Dependency(deps-dev): Bump @types/node from 18.19.14 to 18.19.15 in /…
dependabot[bot] Feb 14, 2024
8784291
Dependency(deps-dev): Bump husky from 9.0.10 to 9.0.11 in /report-vie…
dependabot[bot] Feb 14, 2024
f475830
Dependency(deps-dev): Bump postcss from 8.4.34 to 8.4.35 in /report-v…
dependabot[bot] Feb 14, 2024
9539488
Dependency(deps-dev): Bump vite from 5.0.12 to 5.1.1 in /report-viewe…
dependabot[bot] Feb 14, 2024
5837856
Dependency(deps-dev): Bump @vitejs/plugin-vue from 5.0.3 to 5.0.4 in …
dependabot[bot] Feb 14, 2024
d533bcd
Dependency(deps): Bump whelk-io/maven-settings-xml-action from 21 to 22
dependabot[bot] Feb 14, 2024
13d40b6
Clean up logging for internal server and remove unnecessary index.html
TwoOfTwelve Feb 14, 2024
c198274
Fixed error due to renaming of enum constant.
TwoOfTwelve Feb 14, 2024
a5705bb
Merge pull request #1496 from jplag/feature/cpp-module-names
tsaglam Feb 15, 2024
b280143
Use default values for CLI
uuqjz Feb 15, 2024
1dadfb9
Spotless
uuqjz Feb 15, 2024
579ccbe
Pushed default values to constants
uuqjz Feb 15, 2024
68c22cd
Merging options default test
uuqjz Feb 15, 2024
f0ff4dd
JavaDoc
uuqjz Feb 15, 2024
38e4c20
Sonar Issues
uuqjz Feb 15, 2024
c3fcf62
Added more tests for RoutingTree
TwoOfTwelve Feb 16, 2024
80e95b2
Removed the duplication of the progress bar names.
TwoOfTwelve Feb 16, 2024
d83fe37
Merge branch 'develop' into feature/rework-logging
TwoOfTwelve Feb 16, 2024
a6ccc06
Renamed the result-directory option to result-file
TwoOfTwelve Feb 16, 2024
2bd719f
spotless
TwoOfTwelve Feb 16, 2024
36de011
spotless
TwoOfTwelve Feb 16, 2024
8b26c7f
Fixed error in ScalaLanguageTest due to Language interface change.
TwoOfTwelve Feb 16, 2024
0be10a0
Revert "Fixed error in ScalaLanguageTest due to Language interface ch…
TwoOfTwelve Feb 16, 2024
0f2a6c9
Merge pull request #1563 from jplag/bug-fix/default-values-mm
tsaglam Feb 16, 2024
00d7d8c
Fixed log message if port is not available.
TwoOfTwelve Feb 16, 2024
7012aa4
Feature/normalization option (#1479)
TwoOfTwelve Feb 16, 2024
da16484
Merge branch 'develop' into feature/emf-mode-fixes
tsaglam Feb 16, 2024
cd8d85d
add old cpp language names to report viewer
Kr0nox Feb 16, 2024
7961cb5
Update inconsistent JDoc regarding normalization.
tsaglam Feb 16, 2024
1ba85a6
Implement --normalize support for the EMF language modules.
tsaglam Feb 16, 2024
42137d9
Add missing serialization identifiers.
tsaglam Feb 16, 2024
97aec31
Fixed a bug in the creation of the result due to missing slashes.
TwoOfTwelve Feb 16, 2024
c41cd89
Remove duplicate comment and incorrect lower bound check for the toke…
tsaglam Feb 16, 2024
d246d6d
Merge pull request #1567 from jplag/bug-fix/old-cpp
tsaglam Feb 16, 2024
156b1da
Merge pull request #1545 from jplag/feature/emf-mode-fixes
tsaglam Feb 16, 2024
31a91f7
Merge pull request #1555 from jplag/deduplicate-token-count
tsaglam Feb 16, 2024
9792f63
Fix bug in CLI exception handling that leads to a NPE.
tsaglam Feb 19, 2024
c13a782
Ensure CLI errors are properly passed through.
tsaglam Feb 19, 2024
fb8aa7f
Fixed sonar cloud issues.
TwoOfTwelve Feb 19, 2024
d14e6f5
Build logging string lazily.
tsaglam Feb 19, 2024
1c87e2e
Merge pull request #1570 from jplag/fix/cli-exception
tsaglam Feb 19, 2024
44a6a8d
Merge pull request #1566 from jplag/feature/result-file-option
tsaglam Feb 19, 2024
e9dee07
Remove duplicate dependency version.
tsaglam Feb 19, 2024
94b601a
Remove unused code.
tsaglam Feb 19, 2024
646e803
spotless
TwoOfTwelve Feb 20, 2024
3dad24e
Improved naming of joinPathSegments
TwoOfTwelve Feb 20, 2024
eaea554
Merge pull request #1568 from jplag/bug/submissionFilePathsMissingSlash
tsaglam Feb 20, 2024
00fcaf3
Enforce quiet language loader.
tsaglam Feb 20, 2024
960a96d
Provide cleaner error logging for all language modules.
tsaglam Feb 20, 2024
1d27464
Avoid duplicate error logging in the java module and provide erroneou…
tsaglam Feb 20, 2024
da2f9be
Merge pull request #1433 from jplag/feature/rework-logging
tsaglam Feb 20, 2024
520453e
Avoid visiting erroneous Java AST nodes.
tsaglam Feb 20, 2024
cec3c6d
Sonarcloud issues
TwoOfTwelve Feb 20, 2024
54d8474
Merge remote-tracking branch 'origin/develop' into feature/internal-w…
TwoOfTwelve Feb 20, 2024
93bb2d8
Merge pull request #1571 from jplag/fix/unused-code
tsaglam Feb 20, 2024
d4303bc
Code style and documentation
TwoOfTwelve Feb 20, 2024
a780a0d
Merge pull request #1176 from jplag/feature/internal-web-viewer
tsaglam Feb 20, 2024
bd92e73
Merge pull request #1572 from jplag/feature/error-handling
tsaglam Feb 20, 2024
028b989
Deleted the unused DirectoryManager.java
TwoOfTwelve Feb 20, 2024
c64e46a
Clean up CLI and its options.
tsaglam Feb 20, 2024
190485f
Fix minor code quality issues.
tsaglam Feb 20, 2024
d029fa2
Enforce explicit import declarations.
tsaglam Feb 20, 2024
d3419f2
Automated clean-up of the JPlag core.
tsaglam Feb 20, 2024
2ce9748
Automated clean-up of the CLI.
tsaglam Feb 20, 2024
c7206b6
Automated clean-up of utils and E2E tests.
tsaglam Feb 20, 2024
dd310b6
Automated clean-up of languages.
tsaglam Feb 20, 2024
13caafc
Re-added logging for created result.
TwoOfTwelve Feb 20, 2024
c9b3007
Changed progress bar style to ascii
TwoOfTwelve Feb 20, 2024
ed3c7a2
Merge pull request #1575 from jplag/feature/progress-bar-style
tsaglam Feb 20, 2024
0388a2a
Merge pull request #1573 from jplag/feature/remove-directory-manager
tsaglam Feb 20, 2024
3bba7db
set min version to 4.2.0
Kr0nox Feb 20, 2024
9508d64
Change JPlag revision to 5.0.0.
tsaglam Feb 20, 2024
e8e1e02
fix test file
Kr0nox Feb 20, 2024
b32ecd6
Merge pull request #1578 from jplag/report-viewer/min-version
tsaglam Feb 20, 2024
a586a3e
Merge branch 'develop' into feature/clean-up
tsaglam Feb 20, 2024
5066559
Merge pull request #1574 from jplag/feature/clean-up
tsaglam Feb 21, 2024
e850908
Merge pull request #1577 from jplag/release/500
tsaglam Feb 21, 2024
61db408
Fix missing line break in CLI help text with workaround.
tsaglam Feb 21, 2024
ca321bb
Merge pull request #1579 from jplag/fix/cli-help-text
uuqjz Feb 21, 2024
df2b3b9
Update main readme for the upcoming 5.0.0 release (#1580)
tsaglam Feb 21, 2024
3de4dfc
Update 1.-How-to-Use-JPlag.md
uuqjz Feb 21, 2024
905aef4
Update Home.md
tsaglam Feb 21, 2024
934eb6a
Update docs/1.-How-to-Use-JPlag.md
uuqjz Feb 21, 2024
a6e684c
Merge pull request #1582 from jplag/fix-wiki
tsaglam Feb 21, 2024
5d1ce9d
Merge pull request #1583 from jplag/feature/update-wiki-home
tsaglam Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .github/workflows/files/progpedia.zip
Binary file not shown.
18 changes: 11 additions & 7 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build

on:
push:
push:
paths:
- ".github/workflows/maven.yml"
- "**/pom.xml"
Expand All @@ -14,7 +14,7 @@ on:
- "**/pom.xml"
- "**.java"
- "**.g4"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down Expand Up @@ -43,17 +43,21 @@ jobs:
with:
java-version: 21
distribution: 'temurin'


- uses: actions/setup-node@v4
with:
node-version: "18"

- name: Run Tests
run: mvn verify -B -U

- name: Build Assembly
run: mvn clean package assembly:single
run: mvn -Pwith-report-viewer clean package assembly:single

- name: Upload Assembly
uses: actions/upload-artifact@v4
with:
name: "JPlag"
path: "jplag.cli/target/jplag-*-jar-with-dependencies.jar"


8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
java-version: '21'
distribution: 'temurin'
- name: Set maven settings.xml
uses: whelk-io/maven-settings-xml-action@v21
uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '[{ "id": "ossrh", "username": "jplag", "password": "${{ secrets.OSSRH_TOKEN }}" }]'
- name: Import GPG key
Expand All @@ -34,8 +34,12 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
- uses: actions/setup-node@v4
with:
node-version: "18"

- name: Build JPlag
run: mvn -U -B clean package assembly:single
run: mvn -Pwith-report-viewer -U -B clean package assembly:single

- name: Attach CLI to Release on GitHub
uses: softprops/action-gh-release@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build and analyze (PR)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/spotless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- "**/pom.xml"
- "**.java"
- "**.g4"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down Expand Up @@ -43,9 +43,9 @@ jobs:
with:
java-version: 21
distribution: 'temurin'

- name: Check with Spotless
run: mvn clean spotless:check



162 changes: 74 additions & 88 deletions README.md

Large diffs are not rendered by default.

63 changes: 61 additions & 2 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<version>${revision}</version>
</parent>
<artifactId>cli</artifactId>

<dependencies>
<!-- IMPORTANT: For Coverage testing, you have to add dependencies to the coverage-report project ! -->

Expand Down Expand Up @@ -44,12 +45,12 @@
</dependency>
<dependency>
<groupId>de.jplag</groupId>
<artifactId>cpp</artifactId>
<artifactId>c</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>de.jplag</groupId>
<artifactId>cpp2</artifactId>
<artifactId>cpp</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -128,6 +129,12 @@
<artifactId>picocli</artifactId>
<version>4.7.5</version>
</dependency>

<dependency>
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
<version>0.10.0</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down Expand Up @@ -161,4 +168,56 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>with-report-viewer</id>
<build>
<resources>
<resource>
<targetPath>report-viewer</targetPath>
<directory>../report-viewer/dist</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<id>npm install</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<executable>npm</executable>
<workingDirectory>../report-viewer</workingDirectory>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>npm build</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<executable>npm</executable>
<workingDirectory>../report-viewer</workingDirectory>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
107 changes: 75 additions & 32 deletions cli/src/main/java/de/jplag/cli/CLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
import static picocli.CommandLine.Model.UsageMessageSpec.SECTION_KEY_OPTION_LIST;
import static picocli.CommandLine.Model.UsageMessageSpec.SECTION_KEY_SYNOPSIS;

import java.awt.Desktop;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.HashSet;
Expand All @@ -21,9 +25,12 @@
import de.jplag.JPlagResult;
import de.jplag.Language;
import de.jplag.cli.logger.CollectedLoggerFactory;
import de.jplag.cli.logger.TongfeiProgressBarProvider;
import de.jplag.cli.server.ReportViewer;
import de.jplag.clustering.ClusteringOptions;
import de.jplag.clustering.Preprocessing;
import de.jplag.exceptions.ExitException;
import de.jplag.logging.ProgressBarLogger;
import de.jplag.merging.MergingOptions;
import de.jplag.options.JPlagOptions;
import de.jplag.options.LanguageOption;
Expand All @@ -45,12 +52,12 @@ public final class CLI {

private static final Random RANDOM = new SecureRandom();

private static final String CREDITS = "Created by IPD Tichy, Guido Malpohl, and others. JPlag logo designed by Sandro Koch. Currently maintained by Sebastian Hahner and Timur Saglam.";
private static final String CREDITS = "Created by IPD Tichy, Guido Malpohl, and others. Maintained by Timur Saglam and Sebastian Hahner. Logo by Sandro Koch.";

private static final String[] DESCRIPTIONS = {"Detecting Software Plagiarism", "Software-Archaeological Playground", "Since 1996",
"Scientifically Published", "Maintained by SDQ", "RIP Structure and Table", "What else?", "You have been warned!", "Since Java 1.0",
"More Abstract than Tree", "Students Nightmare", "No, changing variable names does not work", "The tech is out there!",
"Developed by plagiarism experts."};
"More Abstract than Tree", "Students Nightmare", "No, changing variable names does not work...", "The tech is out there!",
"Developed by plagiarism experts.", "State of the Art Obfuscation Resilience", "www.helmholtz.software/software/jplag"};

private static final String OPTION_LIST_HEADING = "Parameter descriptions: ";

Expand All @@ -63,6 +70,8 @@ public final class CLI {

private static final String DESCRIPTION_PATTERN = "%nJPlag - %s%n%s%n%n";

private static final String DEFAULT_FILE_ENDING = ".zip";

/**
* Main class for using JPlag via the CLI.
* @param args are the CLI arguments that will be passed to JPlag.
Expand All @@ -76,15 +85,20 @@ public static void main(String[] args) {
ParseResult parseResult = cli.parseOptions(args);

if (!parseResult.isUsageHelpRequested() && !(parseResult.subcommand() != null && parseResult.subcommand().isUsageHelpRequested())) {
JPlagOptions options = cli.buildOptionsFromArguments(parseResult);
JPlagResult result = JPlag.run(options);
ReportObjectFactory reportObjectFactory = new ReportObjectFactory();
reportObjectFactory.createAndSaveReport(result, cli.getResultFolder());

OutputFileGenerator.generateCsvOutput(result, new File(cli.getResultFolder()), cli.options);
ProgressBarLogger.setProgressBarProvider(new TongfeiProgressBarProvider());
switch (cli.options.mode) {
case RUN -> cli.runJPlag(parseResult);
case VIEW -> cli.runViewer(null);
case RUN_AND_VIEW -> cli.runViewer(cli.runJPlag(parseResult));
}
}
} catch (ExitException | IOException exception) { // do not pass exceptions here to keep log clean
if (exception.getCause() != null) {
logger.error("{} - {}", exception.getMessage(), exception.getCause().getMessage());
} else {
logger.error(exception.getMessage());
}
} catch (ExitException exception) {
logger.error(exception.getMessage()); // do not pass exception here to keep log clean

finalizeLogger();
System.exit(1);
}
Expand All @@ -102,9 +116,8 @@ public CLI() {
this.commandLine.getHelpSectionMap().put(SECTION_KEY_OPTION_LIST, help -> help.optionList().lines().map(it -> {
if (it.startsWith(" -")) {
return " " + it;
} else {
return it;
}
return it;
}).collect(Collectors.joining(System.lineSeparator())));

buildSubcommands().forEach(commandLine::addSubcommand);
Expand All @@ -114,6 +127,29 @@ public CLI() {
this.commandLine.setAllowSubcommandsAsOptionParameters(true);
}

public File runJPlag(ParseResult parseResult) throws ExitException, FileNotFoundException {
JPlagOptions jplagOptions = buildOptionsFromArguments(parseResult);
JPlagResult result = JPlag.run(jplagOptions);
File target = new File(getResultFilePath());
ReportObjectFactory reportObjectFactory = new ReportObjectFactory(target);
reportObjectFactory.createAndSaveReport(result);
logger.info("Successfully written the result: {}", target.getPath());
logger.info("View the result using --mode or at: https://jplag.github.io/JPlag/");
OutputFileGenerator.generateCsvOutput(result, new File(getResultFileBaseName()), this.options);
return target;
}

public void runViewer(File zipFile) throws IOException {
ReportViewer reportViewer = new ReportViewer(zipFile, this.options.advanced.port);
int port = reportViewer.start();
logger.info("ReportViewer started on port http://localhost:{}", port);
Desktop.getDesktop().browse(URI.create("http://localhost:" + port + "/"));

System.out.println("Press Enter key to exit...");
System.in.read();
reportViewer.stop();
}

private List<CommandSpec> buildSubcommands() {
return LanguageLoader.getAllAvailableLanguages().values().stream().map(language -> {
CommandSpec command = CommandSpec.create().name(language.getIdentifier());
Expand Down Expand Up @@ -143,7 +179,7 @@ public ParseResult parseOptions(String... args) throws CliException {
}
return result;
} catch (CommandLine.ParameterException e) {
if (e.getArgSpec().isOption() && Arrays.asList(((OptionSpec) e.getArgSpec()).names()).contains("-l")) {
if (e.getArgSpec() != null && e.getArgSpec().isOption() && Arrays.asList(((OptionSpec) e.getArgSpec()).names()).contains("-l")) {
throw new CliException(String.format(UNKOWN_LANGAUGE_EXCEPTION, e.getValue(),
String.join(", ", LanguageLoader.getAllAvailableLanguageIdentifiers())));
}
Expand Down Expand Up @@ -181,33 +217,31 @@ public JPlagOptions buildOptionsFromArguments(ParseResult parseResult) throws Cl
JPlagOptions jPlagOptions = new JPlagOptions(loadLanguage(parseResult), this.options.minTokenMatch, submissionDirectories,
oldSubmissionDirectories, null, this.options.advanced.subdirectory, suffixes, this.options.advanced.exclusionFileName,
JPlagOptions.DEFAULT_SIMILARITY_METRIC, this.options.advanced.similarityThreshold, this.options.shownComparisons, clusteringOptions,
this.options.advanced.debug, mergingOptions);
this.options.advanced.debug, mergingOptions, this.options.normalize);

String baseCodePath = this.options.baseCode;
File baseCodeDirectory = baseCodePath == null ? null : new File(baseCodePath);
if (baseCodeDirectory == null || baseCodeDirectory.exists()) {
return jPlagOptions.withBaseCodeSubmissionDirectory(baseCodeDirectory);
} else {
logger.warn("Using legacy partial base code API. Please migrate to new full path base code API.");
return jPlagOptions.withBaseCodeSubmissionName(baseCodePath);
}
logger.warn("Using legacy partial base code API. Please migrate to new full path base code API.");
return jPlagOptions.withBaseCodeSubmissionName(baseCodePath);
}

private Language loadLanguage(ParseResult result) throws CliException {
if (result.subcommand() != null) {
ParseResult subcommandResult = result.subcommand();
Language language = LanguageLoader.getLanguage(subcommandResult.commandSpec().name())
.orElseThrow(() -> new CliException(IMPOSSIBLE_EXCEPTION));
LanguageOptions languageOptions = language.getOptions();
languageOptions.getOptionsAsList().forEach(option -> {
if (subcommandResult.hasMatchedOption(option.getNameAsUnixParameter())) {
option.setValue(subcommandResult.matchedOptionValue(option.getNameAsUnixParameter(), null));
}
});
return language;
} else {
if (result.subcommand() == null) {
return this.options.language;
}
ParseResult subcommandResult = result.subcommand();
Language language = LanguageLoader.getLanguage(subcommandResult.commandSpec().name())
.orElseThrow(() -> new CliException(IMPOSSIBLE_EXCEPTION));
LanguageOptions languageOptions = language.getOptions();
languageOptions.getOptionsAsList().forEach(option -> {
if (subcommandResult.hasMatchedOption(option.getNameAsUnixParameter())) {
option.setValue(subcommandResult.matchedOptionValue(option.getNameAsUnixParameter(), null));
}
});
return language;
}

private static ClusteringOptions getClusteringOptions(CliOptions options) {
Expand Down Expand Up @@ -249,7 +283,16 @@ private String generateDescription() {
return String.format(DESCRIPTION_PATTERN, randomDescription, CREDITS);
}

public String getResultFolder() {
return this.options.resultFolder;
private String getResultFilePath() {
String optionValue = this.options.resultFile;
if (optionValue.endsWith(DEFAULT_FILE_ENDING)) {
return optionValue;
}
return optionValue + DEFAULT_FILE_ENDING;
}

private String getResultFileBaseName() {
String defaultOutputFile = getResultFilePath();
return defaultOutputFile.substring(0, defaultOutputFile.length() - DEFAULT_FILE_ENDING.length());
}
}
Loading
Loading