-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
Tool Used: QT Creator 5.5 Programming Language: C++
Java Finalperl.pl GnuWin32
Perl script to generate OO metrics for only common classes between two versions.
Deletes temporary files from working directory.
Confirmation-box before exiting. If CRG is doing some processing then force-close it using taskkill /F command.
About button.
Help button.
Directory browser for version 1.
Directory browser for version 2.
Removes comments from the JAVA file. Creates a temporary file and stores the code without comment in that file. Removes original file and renames temporary file to original file.
Compares to JAVA classes name lists stored in 2 vectors and stores the common classes names in another vector.
Uses a hash map to hash lines to file name. As file name=package name + class name and there can be hierarchy of classes, so each line is mapped accordingly. Example: For writing line to classa.b.c , first the line is mapped to a.b.c then to a.b and finally to a.
Scans the line and returns class name, number of opening parentheses and number of closing parentheses.
Scans the line and returns package name.
Checks if keyword package is present in the line and if present, then uses fnp() to return the package name.
Checks if keyword class is present in the line and if present, then uses fnd() to return the class name.
Recursively reads the file, writes each class into a separate file and uses balanced parentheses (curly-braces actually) to check where the class ends.
Compares to JAVA file name lists stored in vectors and stores the common file names into a new vector.
First validates directory paths. Deletes old temporary data if present. Current working directory is used to store everything. Java files from version are copied into current directory temporary folder and same is done for folder 2. Path for JAVA files for version 1 is stored in myfiles.lis as they are needed while creating project database using und.exe in metrics.cpp. Finds common JAVA files. Removes comments from common files. Each class is extracted from both the folders and is stores in temporary folder. Common classes are found and difference is calculated using diff command (First all the commands are stored in a then they are executed). Results are written into results.csv file. Temporary files are deleted.
File browser to locate installation directory of SciTools Understand tool.
Validates directory paths. Finds und.exe in SciTools directory. Stores all the commands for und.exe in comlist.txt. Executes the commands using system() command. Results are stored in anb.csv. anb.csv is scanned and metrics are renamed and the contents are copied to a new file in destination location. Understand project database and anb.csv are removed.
About button.
Help button.
on_toolButton_2_clicked() Directory browser for destination file.