MoazEmad1/AdvancedProject

https://github.com/MoazEmad1/AdvancedProject

Scanned on Mar 16, 2026

7 High
8 Medium
13 Low

AI Assessment

VERDICT

Based on automated analysis, this project is not production-ready. High code quality issues (particularly extreme complexity and pervasive duplication) combined with missing testing and infrastructure practices present significant maintainability and reliability risks.

TOP RISKS

→ Extreme cyclomatic complexity was flagged in AdminServlet::doPost (CCN 87) in src/main/java/Project/AdminServlet.java. This is far above maintainable thresholds and indicates a method that is difficult to test and modify.

→ Duplicated code block spanning 103 lines was detected across multiple files (src/main/webapp/LoginPage.jsp, src/main/java/Project/userpageservlet.java). The scanner identified this pattern 10 times, indicating systematic code reuse issues.

→ Overall code duplication at 28.2% with 54 detected clones (reported in quality analysis). This level of duplication inflates maintenance burden and introduces inconsistency risks.

→ No test suite was detected. The absence of tests prevents verification of functionality and increases regression risk in production.

→ Missing infrastructure files: no .gitignore, CI/CD configuration, SECURITY.md, or CODEOWNERS were detected. These gaps suggest incomplete DevOps practices.

WHAT TO FIX FIRST

Refactor the doPost method in src/main/java/Project/AdminServlet.java (CCN 87). This single method accounts for much of the complexity burden. Breaking it into smaller, testable methods would directly improve the overall quality score and code maintainability.

After refactoring complexity, extract the 103-line duplicated block across LoginPage.jsp and userpageservlet.java into shared components to reduce the 28.2% duplication rate.

Note: Verify these findings against actual code, as some may be false positives depending on legitimate design patterns in use.

fix-prompt.md

Category Breakdown

Security0%Secrets & Credentials0%Dependencies0%Code Quality0%Best Practices0%
300/300
Security
200/200
Secrets & Credentials
150/150
Dependencies
56/100
Code Quality23 findings
93/100
Best Practices5 findings

Findings(28 in 10 groups)

Duplicate found between src/main/webapp/LoginPage.jsp:1 and src/main/webapp/ResetPassword.jsp:1. Consider extracting shared logic into a reusable function or module.

Affected files

src/main/webapp/LoginPage.jspL1
src/main/java/Project/userpageservlet.javaL527
src/main/java/Project/userpageservlet.javaL434
src/main/webapp/AddChapterpage.jspL15
src/main/webapp/SeeFeedBack.jspL12
src/main/java/Project/AdminServlet.javaL484
src/main/webapp/ResetPassword.jspL33
src/main/webapp/Leaderboard.jspL1
src/main/webapp/Leaderboard.jspL44
src/main/webapp/HomePage.jspL63

Function "AdminServlet::doPost( HttpServletRequest request" has a cyclomatic complexity of 87 (406 lines, 2 parameters). This function is extremely complex and should be refactored into smaller functions.

Affected files

src/main/java/Project/AdminServlet.java0
src/main/java/Project/userpageservlet.java0
src/main/java/Project/homepageservlet.java0
src/main/java/Project/Database.java0
src/main/java/Project/Database.java0

1563 duplicated lines out of 5539 total lines across 33 files. High code duplication increases maintenance burden and bug surface area.

Affected files

unknown

No test directory or test files were found. Automated tests are critical for maintaining code quality and preventing regressions.

Affected files

unknown

Biome rule: lint/complexity/useArrowFunction

Affected files

unknown
unknown
unknown
unknown
unknown
unknown

This repository has no .gitignore file. Without one, build artifacts, dependencies, and IDE files may be accidentally committed.

Affected files

unknown

No CI/CD configuration was found (GitHub Actions, GitLab CI, CircleCI, etc.). Continuous integration helps catch issues before they reach production.

Affected files

unknown

This repository has no SECURITY.md file. A security policy helps users report vulnerabilities responsibly and shows that the project takes security seriously.

Affected files

unknown

This repository has no CODEOWNERS file. CODEOWNERS ensures that pull requests are automatically assigned to the right reviewers, improving code review coverage.

Affected files

unknown

Biome rule: format

Affected files

unknown

Share your ShipScanner

Show the world your code quality. Your report has a beautiful preview image built in.

Embed Trust Badge

Show your code quality score in your README. The badge updates automatically every time you re-scan.

README.md
ShipScanner: B 693
[![ShipScanner: B 693](https://shipscanner.dev/api/badge/cmmt5z5b20005kt044b0dnnui)](https://shipscanner.dev/report/cmmt5z5b20005kt044b0dnnui)