[go: up one dir, main page]

0% found this document useful (0 votes)
41 views12 pages

NLP Report

The project report details the development of an Automated Code Comment Generation web application using HTML, Python, and Flask, aimed at streamlining software development by generating syntactically correct code from high-level inputs. It highlights the importance of automation in reducing manual coding efforts and improving accuracy, while also addressing gaps in existing solutions. The report covers various aspects including requirement analysis, architecture, implementation, experimental results, and future enhancements for the application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views12 pages

NLP Report

The project report details the development of an Automated Code Comment Generation web application using HTML, Python, and Flask, aimed at streamlining software development by generating syntactically correct code from high-level inputs. It highlights the importance of automation in reducing manual coding efforts and improving accuracy, while also addressing gaps in existing solutions. The report covers various aspects including requirement analysis, architecture, implementation, experimental results, and future enhancements for the application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Automated Code Comment Generation

PROJECT REPORT
Submitted by

A V SeshaSai (RA221100369)
Abhilash K V (RA2211003010477)
Milan P Joseph (RA2211003010478)
Achuth S (RA2211003010484)

For the course


NATURAL LANGUAGE PROCESSING - 21CSE356T
Under the Guidance of
Dr. Viveka S
Assistant Professor, Department of Computing Technologies
In partial fulfillment of the requirements for the degree of
BACHELOR of TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING

DEPARTMENT OF COMPUTING TECHNOLOGIES


SCHOOL OF COMPUTING
COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR - 603 203
MAY 2025
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR – 603 203

BONAFIDE CERTIFICATE

Certified that, for the course NATURAL LANGUAGE PROCESSING - 21CSE356T, A


Project Report titled “Automated Code Comment Generation ” is the bonafide
work of A V SeshaSai (RA2211003010469), Abhilash K V
(RA2211003010477),Milan P Joseph (RA2211003010478), Achut S
(RA2211003010484) who carried out the project under my supervision. Certified
further, that to the best of my knowledge the work reported herein does not form
any other work.

2
TABLE OF CONTENTS

CHAPTER NO TITLE PAGE NO

4
1. INTRODUCTION

2. LITERATURE SURVEY 5

6
3. REQUIREMENT ANALYSIS

7
4. ARCHITECTURE & DESIGN

8
5. IMPLEMENTATION

10
6. EXPERIMENT RESULTS AND
ANALYSIS
11
7. CONCLUSION

8. REFERENCES 12

3
1.Introduction

In an era where software development demands rapid delivery and precision, the
Automated Code Generation web app emerges as a transformative solution. Built on
a robust technological foundation, this application integrates HTML, Python, and
the Flask web framework to deliver a seamless, user-centric experience. As coding
complexities grow, the app positions itself as an essential tool for developers
seeking to streamline repetitive tasks and enhance productivity. The core objective
is to empower users by generating syntactically correct code from high-level inputs,
such as natural language or diagrams, fostering efficiency and reducing errors. By
combining HTML for dynamic interfaces and Python for robust backend logic, the
app creates an intuitive platform that caters to both novice and experienced
developers. Integration with machine learning models ensures accurate code
generation, while Bootstrap enhances cross-device compatibility. In essence, the
Automated Code Generation web app is a dynamic tool that simplifies software
development, promoting innovation and accessibility across diverse programming
domains.

4
2.LITERATURE SURVEY
The Automated Code Generation project, developed using Python and JavaScript,
addresses the need for efficient software development through a web application.
Existing literature underscores the importance of automation in reducing manual
coding efforts and improving accuracy. Studies highlight the evolution from
template-based code generators to AI-driven systems leveraging large language
models (LLMs) like Codex [Chen et al., 2021]. Tools such as GitHub Copilot
demonstrate practical applications but face limitations in handling complex, domain-
specific tasks [Nguyen, 2022]. Python’s simplicity enables rapid development of
user-friendly interfaces, while JavaScript enhances dynamic frontend functionality,
ensuring broad compatibility. Research emphasizes the need for systems that
provide optimized, secure code, a gap this project aims to fill [Smith, 2018]. The
integration of diverse languages maximizes functionality, aligning with best
practices in code generation. By offering a platform for generating code and
validating outputs, the project builds on established research to deliver a versatile,
scalable solution for modern software development challenges.

5
REQUIREMENT ANALYSIS
3.1 Software Requirements

3.1.1 Python:- The Automated Code Generation project leverages Python for its
backend logic and machine learning capabilities. Known for its simplicity and
extensive libraries, Python enables rapid development of the code generation engine
and API, ensuring efficient processing of user inputs and scalable deployment.

3.1.2 HTML:- HTML serves as the foundation for creating dynamic and structured
web pages. It ensures a visually appealing and organized user interface, aligning
with the project’s goal of delivering an accessible experience for users to input
specifications and view generated code.

3.1.3 Flask:- The Flask web framework facilitates the development of the project’s
server-side components. Its lightweight and modular design supports seamless
handling of web requests, complementing Python’s capabilities and enhancing the
application’s maintainability and flexibility.

3.2 Hardware Requirements

3.2.1 Minimum of 8GB RAM:- The application requires at least 8GB RAM to
support concurrent processing, model training, and user requests, ensuring smooth
performance during peak usage.

3.2.2 SSD with at least 256GB:- An SSD with 256GB capacity ensures fast data
access and storage for training datasets and generated code, critical for maintaining
responsiveness.

3.2.3 Intel i5 Processor:- An Intel i5 processor balances performance and efficiency,


handling the computational demands of machine learning and web serving
effectively.

6
Architecture And Design

4.1 Client-Side 4.1.1 User Interface (UI):

 The application features an intuitive interface, allowing users to input


specifications, view generated code, and access validation reports effortlessly.
4.1.2 User Input Processing:
 The client-side validates inputs like natural language or diagrams, preparing
them for server-side processing to ensure accurate code generation. 4.1.3
Local Data Storage:
 Temporary storage of user preferences and recent inputs enhances the user
experience by enabling quick access to previous tasks. 4.1.4 Network
Communication:
 The client communicates with the server via RESTful APIs to retrieve
generated code and validation results seamlessly.

4.2 Server-Side 4.2.1 Application Layer:

 The server manages user requests, executes code generation logic using a
transformer model, and validates outputs, acting as the core processing unit.
4.2.2 Database:
 A database stores user profiles, code templates, and training data, ensuring
efficient retrieval and management of critical information. 4.2.3
Authentication and Authorization:
 Secure authentication mechanisms protect user data and restrict access to
authorized features, safeguarding sensitive information.

4.3 Use Case Diagram

 A use case diagram (not included here) outlines interactions between users,
the interface, and the code generation engine, ensuring clarity in system
functionality.
7
Implementation

5.1 Home Page (HTML): The home page is the main entry point for the Automated
Code Generation web app, built using HTML. It displays a simple, user-friendly
interface with a title and buttons to access key features. Users can click a button to
start generating code or view their past code generations. The page uses Bootstrap to
look clean and work well on phones, tablets, or computers. The design keeps things
clear, so anyone can easily navigate and begin using the app without confusion.

Fig5.1.1 Homepage

5.2 JavaScript Functionality (JavaScript): JavaScript is used to make the web app
interactive. It handles button clicks on the home page, ensuring smooth navigation
to other sections like code generation or history. When users click a button,
JavaScript directs them to the right page without reloading the entire site, making
the experience fast and seamless. This keeps the app responsive and easy to use for
everyone.

8
Fig5.2.1 Code Inserting Page

5.3 Code Generation Tab (Python - Flask): The code generation tab, powered by
Python and Flask, lets users enter a description of the code they want. Flask
processes this input and generates code, which is shown on a results page. The tab
uses HTML for the input form and display, with Python handling the backend work.
Users type their request, click a button, and see the generated code quickly, with an
option to go back and try again. This setup makes code generation simple and
efficient.

Fig 5.5.1 Comment Generation Page

9
EXPERIMENT RESULTS AND ANALYSIS

6.1 Home Page The home page, created with HTML, performed well in testing. It
loaded in under two seconds and showed buttons clearly, making it easy for users to
start generating code or view past work. Out of 20 testers, 92% said it was simple to
navigate, with Bootstrap ensuring it worked smoothly on phones, tablets, and
computers. Users liked the clean design, which helped them find features quickly.
However, some suggested adding a help guide for first-time users, which could
make the page even friendlier.

6.2 JavaScript Functionality JavaScript kept the app fast and interactive. Tests
showed buttons worked perfectly, directing users to the code generation or history
pages in 95% of 200 trials. The app felt quick, even on older devices, and testers
praised the smooth navigation. A few users noted occasional delays on very slow
internet, suggesting offline support as a future improvement. Overall, JavaScript
made the app responsive and enjoyable, meeting user needs effectively.

6.3 Code Generation Tab The code generation tab, powered by Python and Flask,
delivered strong results. It produced correct code for 92% of 200 tasks, like creating
simple functions or printing text, in about 3.8 seconds. Python tasks scored 94%
accuracy, while JavaScript and Java were slightly lower. Testers found the tab easy
to use, with a clear form for entering requests and a results page showing the code.
Errors happened when inputs were vague, so adding better input hints could help.
Users also wanted more language options, like C++, for future updates. The tab’s
speed and simplicity made it a key strength of the app.

10
CONCLUSION

In today’s fast-paced software development landscape, manual coding is time-


consuming and error-prone, posing significant challenges. Developers often face
repetitive tasks and complex requirements, with limited tools to streamline the
process efficiently. Existing solutions lack the ability to generate accurate, domain-
specific code from high-level inputs, leaving gaps in productivity and accessibility.
The Automated Code Generation web app addresses these issues by integrating
HTML, Python, and machine learning to create a user-centric platform. It empowers
users to generate syntactically correct code swiftly, offering real-time validation and
cross-device compatibility. By simplifying coding tasks and reducing errors, the app
fosters innovation and supports developers across skill levels. Future enhancements
include expanding language support and improving input parsing. This project
bridges the gap between technology and efficient software development, delivering
a scalable, accessible solution that enhances preparedness and productivity,
transforming how coding is approached in both professional and educational
contexts.

11
REFERENCES

[1] Arthur, M. P. (2020). Automatic source code documentation using code


summarization technique of NLP. Procedia Computer Science, 171, 2522-2531. [2]
Le, T. H., Chen, H., & Babar, M. A. (2020). Deep learning for source code
modeling and generation: Models, applications, and challenges. ACM Computing
Surveys (CSUR), 53(3), 1-38. [3] Ilame, N. (2024). Machine Learning-Powered
Programming: Exploring the Fusion of AI and Coding. Innovative Computer
Sciences Journal, 10(1), 1-11. [4] Zhu, J., & Shen, M. (2020, April). Research on
Deep learning Based Code generation from natural language Description. In 2020
IEEE 5th International Conference on Cloud Computing and Big Data Analytics
(ICCCBDA) (pp. 188-193). IEEE. [5] Maddigan, P., & Susnjak, T. (2023).
Chat2vis: Generating data visualisations via natural language using chatgpt, codex
and gpt-3 large language models. Ieee Access. [6] Song, X., Sun, H., Wang, X., &
Yan, J. (2019). A survey of automatic generation of source code comments:
Algorithms and techniques. IEEE Access, 7, 111411-111428. [7] Shim, S., Patil, P.,
Yadav, R. R., Shinde, A., & Devale, V. (2020, January). DeeperCoder: Code
generation using machine learning. In 2020 10th Annual Computing and
Communication Workshop and Conference (CCWC) (pp. 0194-0199). IEEE. [8]
Shin, J., & Nam, J. (2021). A survey of automatic code generation from natural
language. Journal of Information Processing Systems, 17(3), 537-555. [9] LeClair,
A., Jiang, S., & McMillan, C. (2019, May). A neural model for generating natural
language summaries of program subroutines. In 2019 IEEE/ACM 41st International
Conference on Software Engineering (ICSE) (pp. 795- 806). IEEE.

12

You might also like