Zhejiang University Team Develops CatCoder to Tackle AI Programming Challenges

Deep News12-13

A team led by Associate Professor Hu Xing from Zhejiang University has developed an AI framework called CatCoder, which can understand entire software projects and generate accurate, functional code. In Java tasks, it improved compilation pass rates and test pass rates by up to 14.44% and 17.35%, respectively, compared to RepoCoder, a leading industry benchmark.

CatCoder demonstrates strong versatility. Tests with AI models of varying sizes and types confirmed its ability to enhance the performance of all evaluated models.

Hu Xing explained, "We validated our approach using two languages: widely adopted Java and Rust, which is newer but increasingly important. Our method generates high-quality code even for lower-resource languages like Rust, where training data and user bases are limited."

The framework acts as a "super assistant" for AI, understanding not only programming syntax but also project-specific rules—such as which classes to call and how to use functions—enabling error-free, context-aware code generation. Smaller models particularly benefit, narrowing their performance gap with larger counterparts.

Key innovations include: 1. **Similar Code Radar**: Identifies functionally or structurally analogous code from comparable projects as references. 2. **Type Relationship Map**: Automatically analyzes available classes, interfaces, functions, and properties within the current codebase.

This dual approach is likened to navigating a vast library with both thematic guides and detailed floor plans, ensuring precise, professional outputs.

**Three-Step Workflow**: 1. **Code Retrieval**: Intelligently segments source files and employs keyword/semantic searches to gather relevant snippets. 2. **Context Mapping**: Uses static analyzers for languages like Java/Rust to map class dependencies and usage rules. 3. **Code Generation**: Combines references and type maps with task descriptions to guide AI in producing syntactically correct, project-integrated code.

Hu highlighted CatCoder’s significance for China’s foundational and industrial software development, especially with Rust’s system-level applications. Future directions include improving code generation for low-resource languages (e.g., Ruby, Julia) and enabling large-small model collaboration for cost-effective deployment in resource-constrained environments.

Reference: [arXiv:2406.03283](https://arxiv.org/pdf/2406.03283)

Disclaimer: Investing carries risk. This is not financial advice. The above content should not be regarded as an offer, recommendation, or solicitation on acquiring or disposing of any financial products, any associated discussions, comments, or posts by author or other users should not be considered as such either. It is solely for general information purpose only, which does not consider your own investment objectives, financial situations or needs. TTM assumes no responsibility or warranty for the accuracy and completeness of the information, investors should do their own research and may seek professional advice before investing.

Comments

We need your insight to fill this gap
Leave a comment