Repository used for the lab of the "Applied Software Engineering" course
This is a parent project containing other maven modules
- Calculates the Lines of Code (LOC) metric for a Java source code file.
- Calculates the Number of Classes (NOC) metric for a Java source code file.
- Calculates the Number of Methods (NOM) metric for a Java source code file.
- Supports both local and web-based Java source code files.
- Exports the calculated metrics to an output file.
- Java Development Kit (JDK) version X or higher
- Apache Maven build tool version X or higher
-
Clone the repository:
git clone https://github.com/your-username/java-code-metrics-calculator.git
-
Build the project using Maven:
cd java-code-metrics-calculator mvn clean install
-
Run:
java -jar "jar-with-dependencies" arg0 arg1 arg2 arg3 arg4
arg0
: "JavaSourceCodeInputFile" (e.g.,src/test/resources/TestClass.java
)arg1
: "sourceCodeAnalyzerType" [regex|strcomp]arg2
: "SourceCodeLocationType" [local|web]arg3
: "OutputFilePath" (e.g.,../output_metrics_file
)arg4
: "OutputFileType" [csv|json]
Usage:
Navigate to the module directory:
cd seip2023_practical_assignments/gradeshistogram
Build & run:
mvn package
java -jar target/gradeshistogram-1.0-SNAPSHOT.jar <argument>
Where argument can be the absolute or relative path of the input file
For specific details and instructions, please refer to the Individual README file.
This software system reads a Java source code file, calculates the Lines of Code (LOC), Number of Classes (NOC), and Number of Methods (NOM) metrics, and exports these metrics to an output file.
Where:
For specific details and instructions, please refer to the Individual README file.