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

Is it possible to enable only "method is extracted as a single file" feature without tokenization? #147

Open
ani-hovhannisyan opened this issue Mar 23, 2022 · 2 comments

Comments

@ani-hovhannisyan
Copy link

Dear FinerGit team,
As it's written in the Readme, FinerGit has two features now:

  1. Every method in source files gets extracted as a single file.
  2. Every line of extracted files includes only a single token.

Is it possible to run FinerGit with some flags for only enabling 1st feature?
If it's not possible now, then can you tell where is written that code of starting tokenization process, as I might help me to easily comment out that part from FinerGit source code and run my experiment?
(I have to do an experiment with dividing java source files into method files then analyzing method level files without tokenization, that is why I want to skip 2nd feature, with current tokenization I can't analyse java source code.)

@YoshikiHigo
Copy link
Member

Thank you for using FinerGit.

Is it possible to run FinerGit with some flags for only enabling 1st feature?

Yes.
You can see the option list if you put the following command on your terminal.
java -jar build/libs/FinerGit-all.jar create

You will see option -t (--tokenize) <true|false>) at the bottom of the option list.
If you add -t false to your command, then you will get method files without tokenization.

@ani-hovhannisyan
Copy link
Author

Thank you very much for the reply!

You will see option -t (--tokenize) <true|false>) at the bottom of the option list. If you add -t false to your command, then you will get method files without tokenization.

Yes, now the "-t" flag worked fine for my experiment.
However, if I enable "--class-file-generated true" as well, methods and fields are without tokens but ".cjava" files contain tokens:
As a sample, I paste the extracted result for FinerGit repo FinerGitMain.java file.
Used command is:
$ java -jar FinerGit-all.jar create --src ../FinerGitRepository/ --des ../FinerGit_extracted -t false --class-file-generated true

Reported extracted Main class looks like:

public
class
FinerGitMain
{
}

PS. This won't affect my experiment, however I wanted to report this behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants