Git Product home page Git Product logo

Comments (9)

TwoOfTwelve avatar TwoOfTwelve commented on September 27, 2024 1

This error is not caused by JPlag directly. This is the same issue as #1427. There is already an ANTLR issue related to this: antlr/grammars-v4#3952.

It seems that the character only occurs in comments, so as a workaround you could write a script that deletes all comments and run JPlag after it.

from jplag.

tsaglam avatar tsaglam commented on September 27, 2024

If you want to keep comments, another workaround might be to remove all non-ASCII characters from the comments via a script.

from jplag.

uuqjz avatar uuqjz commented on September 27, 2024

After removing every non ascii char, I get this error:
line 1:3 token recognition error at: ''
The line in question is
/�B�2017/2018: Zadaa 5, Zadatak 4
It seems like these are start of heading control codes which have to be removed too

from jplag.

uuqjz avatar uuqjz commented on September 27, 2024

Even after this preprocessing those files cannot be parsed:
failed to parse 'student9307.cpp'Cannot invoke "de.jplag.cpp.grammar.CPP14Parser$DeclaratorContext.pointerDeclarator()" because the return value of "de.jplag.cpp.grammar.CPP14Parser$ParameterDeclarationContext.declarator()" is null

from jplag.

TwoOfTwelve avatar TwoOfTwelve commented on September 27, 2024

After removing every non ascii char, I get this error: line 1:3 token recognition error at: '' The line in question is /�B�2017/2018: Zadaa 5, Zadatak 4 It seems like these are start of heading control codes which have to be removed too

This is probably caused by an encoding issue. I think your files might be encoded in UTF-16 or something, but there is very little for the heuristic to actually go by. We might want to include an encoding flag in the future.

I will look into the second error later, but it also seems to be caused by ANTLR.

from jplag.

TwoOfTwelve avatar TwoOfTwelve commented on September 27, 2024

I look a little more into the first line of the files and I don't know how that ever came to be. It certainly does not look like valid cpp code.

The null pointer issue should be fixed in #1613

from jplag.

uuqjz avatar uuqjz commented on September 27, 2024

Got the dataset from here:
https://ieee-dataport.org/open-access/programming-homework-dataset-plagiarism-detection

from jplag.

TwoOfTwelve avatar TwoOfTwelve commented on September 27, 2024

With the fix and the first line removed JPlag runs on my machine.

from jplag.

uuqjz avatar uuqjz commented on September 27, 2024

Awesome, the fix works

from jplag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.