While working with code, one thing I kept noticing was how much time goes into repeating the same kind of fixes. Things like replacing deprecated methods, updating syntax, or making small improvements — none of it is very hard, but it keeps coming back again and again.
Even when using AI tools, the suggestions were fine, but they didn’t really improve over time. Every time I asked for help, it felt like starting from scratch.
That’s what led me to build Code Review Agent.
Where the idea started
At first, I was just trying to build a simple tool to convert Java code from one version to another. Something like taking older Java code and updating it to a newer version.
But while working on it, I realized the bigger issue wasn’t just conversion.
It was repetition.
If I fix something once, why should I have to fix it again somewhere else? And why doesn’t the tool remember what was already done?
What the tool does
Right now, the tool works like this:
- You upload a Java file or project
- It analyzes the code and finds issues
- It suggests improvements using AI
- You can choose which Java version to convert to (like Java 8, 11, 17, or 21)
- And it stores previous fixes so it can reuse them later
So instead of just giving suggestions, it slowly becomes more consistent based on past usage.
How it works (simple explanation)
When a file is uploaded, the system first parses the code using JavaParser. This helps in understanding the structure properly instead of just treating it as plain text.
Once parsed, it looks for common issues like:
- deprecated methods
- outdated patterns
- places where modern syntax can be used
Instead of sending the whole file to AI, only small relevant parts are used. This makes the suggestions more focused and avoids unnecessary output.
The AI then returns:
- updated code
- a short explanation
- whether the fix is safe or needs manual review
The memory part
This is the part that makes the system different.
Whenever a fix is applied, the system stores it along with context:
- what the original code was
- what it was changed to
- where it was used
Next time a similar issue appears, it checks if something like this was already fixed before.
If yes, it can reuse that solution instead of generating a completely new one.
This makes the system feel less repetitive and more aligned with how developers actually work.
Version selection
One small but useful feature is version selection.
Instead of forcing everything to upgrade to the latest version, the tool allows you to choose the target version:
- Java 8
- Java 11
- Java 17
- Java 21
Based on that, the suggestions change accordingly. This makes it more practical for different types of projects.
Tech stack
The project is built using:
- Java with Spring Boot for backend
- JavaParser for analyzing and modifying code structure
- OpenAI or Groq API for generating code suggestions
- Hindsight for storing and retrieving memory
- React for the frontend
- Render for deployment
Challenges faced
There were a few challenges while building this:
- AI sometimes generated extra or unnecessary code
- Directly replacing code caused structure issues in early versions
- Deciding what to store in memory was not straightforward
Switching to AST-based updates and adding validation checks helped fix most of these problems.
My contribution
In this project, I worked on:
- backend logic and API development
- integrating JavaParser for code analysis
- handling AI responses
- implementing version-based conversion
- adding memory integration
- making sure the overall flow works smoothly
Final thoughts
This started as a simple idea to reduce repetitive work.
It slowly became something more useful — a tool that improves as you use it. Even a small memory feature makes it less repetitive and more practical. There’s still more to improve, but it’s a good star
Demo:
we deployed using render :
https://code-review-agent-v1.onrender.com
Top comments (0)