This application tokenize Java source code files and compile a list of longest common tokenizer sequences.
- Download this application.
- Extract the content of the downloaded zip file into a directory.
- Open Terminal or Command prompt in windows.
- CD to the application directory like
cd TokenizingCode/src
- Run the following command to compile the application
javac tokenizingcode/TokenizingCode.java- After compiling, You can run the application with the follwing command
java tokenizingcode.TokenizingCode file1.java file2.java file3.java- You should provide absolute file URLs like
java tokenizingcode.TokenizingCode /Users/Demo/app/file1.java /Users/Demo/app/file2.java- Or provide relative URLs like
java tokenizingcode.TokenizingCode ./app/file.java ./app/file2.java
After running the application, it takes all the provided arguments and tokenize it. Then it compares the tokanized code and match the longest sequence and compile a CSV file with token counts, score and the source code. The CSV file will be generated in the project main directory, for example, 'TokenizingCode' in this case.
##Testing This application is already run on some of the existing java files i.e. AbstractJavaSource.java and WebDriverBackedEmbeddedBrowser.java, which are already included in this repository. The resultant CSV file can be seen here with the name test.csv.