Code Harbor - A Code Analysis Tool
Code Harbor - A Code Analysis Tool
24-25J-044
TABLE OF CONTENTS
01. 02. 03.
Introduction
Research Questions Objectives
Overall Project
Overall Title & Content Objectives and
Description
important facts
04. 05.
24-25J-044 04/08/2024 1
Meet the Code Harbor Team: Developers and
Supervisors
24-25J-044 04/08/2024 2
Meet the Code Harbor Team: Developers and
Supervisors
24-25J-044 04/08/2024 4
INTRODUCTION
Our research aims to address the problem of managing the
code complexity in software development projects. Day by
day software systems expand in size, complexity where
developers finds it difficult in maintaining and
understanding their evolving codebases. Our tool code
harbor addresses this gap where it integrates with machine
learning models with code analysis techniques to deliver
personalized and actionable suggestions for simplifying
complex code segments
24-25J-044 04/08/2024 5
Code Analysis Tool
Research Questions
How can we leverage machine learning and code analysis to reduce the complexity of software code and assist
developers in maintaining and understanding their codebases?
How can we ensure the generated recommendations are both actionable and aligned with industry best practices
to improve code maintainability and performance?
How can we enhance the accessibility of software applications and ensure compliance with accessibility
standards using automated tools ?
24-25J-044 04/08/2024 6
Code Analysis Tool
Answers
Utilize machine learning algorithms to analyze code patterns and identify areas of high complexity
Implement static and dynamic code analysis to assess code quality, detect potential issues
Generate context-aware suggestions tailored to the specific codebase and development practices of the project
Develop recommendation algorithms that align with established coding standards and best practices, such as
those outlined by OWASP and major language-specific guidelines (e.g., Java, Python)
Implement tools that automatically audit web applications for accessibility standards such as WCAG and ATAG
24-25J-044 04/08/2024 7
Objectives
➢ To provide tools for measuring and displaying code complexity metrics
➢ To integrate AI-driven recommendations for automated code review and compliance checking
Tools that measure and display code complexity Machine learning-driven refactoring can identify and
metrics can reduce the number of bugs and issues in address code smells more accurately, leading to
software improvement in code quality metrics
24-25J-044 04/08/2024 8
Overall Solution
as a System
Diagram
24-25J-044 04/08/2024 9
Component 1
Automated Code Review & Compliance
Checking with AI Driven Recommendations
Specific Objectives
❑ Create algorithms that can automatically analyze code for common issues, code smells, and violations of
coding standards
❑ Train models on historical code reviews to improve the accuracy and relevance of recommendations.
❑ Ensure that the tool can verify code against industry and project-specific coding standards
❑ Enhance the AI-driven recommendation engine's capability to provide context-aware suggestions for
code improvement
Sub Objectives
❑ Collect a diverse dataset of code samples and annotate them with issues and corresponding
recommendations.
❑ Train machine learning models on the annotated dataset and validate their performance
❑ Train models to consider project-specific contexts, such as architectural patterns and coding
conventions, to provide more relevant and targeted recommendations.
➢ Instant Feedback: Helps to provide immediate feedback on code quality, enabling developers to address issues
as they code, thus reducing the time spent on reviews.
➢ Consistent Analysis: Offer consistent and unbiased code reviews, ensuring that all code is evaluated against
the same standards without the variability of human reviewers.
➢ Efficiency Improvement: By automating repetitive review tasks will help developers to focus on more complex
issues, leading to faster development cycles and improved overall productivity.
➢ Machine Learning Integration: Machine learning models can be trained on large datasets of code to identify
common issues and patterns, providing specific and context-aware recommendations for improvement.
➢ Dynamic Compliance Monitoring: Continuously update and apply coding standards to ensure that code
remains compliant with evolving best practices, offering efficient feedback to developers.
How will the effectiveness and accuracy of the AI-driven automated code review tool be validated?
➢ Developer Feedback: The tool will be experimented by group of developers. Their feedback on the
relevance and usefulness of the recommendations will be collected to assess the tool's practical value
Research D
Research C L. C. Briand, J. W. Daly, and J. Wust, "A
Y. Wang, S. Zhong, W. Zou, and H. Li, Unified Framework for Coupling
"Deep Learning for Code Analysis and Measurement in Object-Oriented
Search," ACM Computing Surveys, vol. Systems," IEEE Transactions on Software
52, no. 6, Article 118, pp. 1-35, 2020. Engineering, vol. 25, no. 1, pp. 91-121,
Jan. 1999.
Research A Detects design issues and Does not focus on security Adds comprehensive
code smells checks security checks and
interactive user feedback
Research B Understanding code Primarily a search tool; lacks Provides actionable, real-
structure and searching actionable time recommendations
relevant code snippets recommendations and real-
time feedback.
Research C Explores the code review Limited in security Includes advanced security
tasks using machine compliance checks and checks and dynamic
learning updating with new coding updates with coding
standards. standards
➢ Limited to rule-based analysis and do not leverage machine learning to learn from historical data and
adapt to evolving code standards and tailored to the specific context of a project's codebase with
advanced security checks
➢ ESLint: Focuses on enforcing code style and detecting syntax issues, but does not address higher-level
design and architectural concerns
Reduces
AI-Driven, Enhanced Optimized
time and
Context- Compliance methods
effort for
Aware Code and Code with AI
code
Analysis Quality Suggestions
reviews
Methodology
Technologies Techniques
➢ Languages – Python, JavaScript ➢ Machine Learning
➢ Libraries – Pylint, scikit-learn , Pandas, Bootstrap ➢ Generative AI
➢ PyCharm ➢ Deep Learning
➢ Vs Code ➢ Code Analysis Algorithm
➢ Google Collab ➢ Optimization
➢ Databases : MySQL, MongoDB ➢ Standard Coding Guidlines
➢ Small Language Models
Innovative Reduced
Aspect Biases
Utilizes machine learning
techniques to analyze the code
and provide personalized
refactoring suggestions.
Alignment
Enhanced
with Best
Resolution
Practices
Technologies Techniques
Specific Objectives
❑ Create algorithms that can automatically analyze code for accessibility issues by checking WCAG
guidelines
❑ Train models on WCAG guidelines to improve the accuracy and relevance of recommendations.
Sub Objectives
❑ Collect a diverse dataset of code samples and annotate them with the WCAG guidline, codes with known
issues and the correct output
❑ Generate reports
Research Questions
Why do many websites fail to ensure accessibility for people with disabilities, and how can developers
be motivated to address this issue?
➢ Most websites do not pay attention to whether the website is accessible for everyone, even for people
with disabilities. Creating a web application for developers to check their own code for accessibility
checks, adding gamification elements to motivate developers, and tracking developers' progress using
personalized profiles can help address this issue.
Research Questions
How can the accessibility of web content for people with disabilities be ensured, and what categories
should be considered in the evaluation?
➢ To ensure the accessibility of web content for people with disabilities, I will evaluate the code across four
key categories: vision, auditory, cognitive, and motor. By systematically checking each category, we can
identify and address a wide range of accessibility issues, ensuring that web content is accessible to all
users.
References
Research B
Research A Osama Sohaib and Kyeong Kang, "Assessing
Panayiotis Zaphiris and R. Darin Ellis, "Website Web Content Accessibility of E-Commerce
Usability and Content Accessibility of the top USA Websites for People with Disabilities," in
Universities," in Proceedings of the 2024 Proceedings of the 25th International
International Conference on Web Accessibility and Conference on Information Systems
Usability, 2024, pp. 1-15. Development (ISD2016), Poland, 2016, pp.
466-470.
Research D
Research C Caio C. S. Sousa, Luíla M. Oliveira, Cássio L.
Rodrigues, Renato F. Bulcão-Neto, and Deller J.
Sukhpal Kaur. "An Automated Tool for Web Site
Ferreira, "Web Accessibility Testing for Deaf:
Evaluation," in International Journal of Computer
Requirements and Approaches for Automation," in
Science and Information Technologies (IJCSIT), Proceedings of the 2020 IEEE International
Vol. 3 (3), 2012, pp. 4310-4313. Conference on Systems, Man, and Cybernetics
(SMC), Toronto, Canada, 2020, pp. 2734-2737.
Research A Check the usability and Doesn't focus on Includes suggestions for
accessibility of university suggestions on enhancing accessibility issues and
websites. the accessibility of websites provide a quantitative
measure on accessibility
Research B Accessibility evaluation of e- Checks the accessibility only Any developer can check
commerce websites for in E-commerce websites their code for accessibility
disabled users. issues and suggestions are
provided
Research C Provides an automated tool Gamification features are not Includes gamification
named "SITE CHECKER" for included features to
evaluating the accessibility motivate developers
and usability of websites.
Research D Web accessibility Does not focus on visual, Checks web accessibility on
requirements and motor and cognitive four categories visual,
automation for deaf users. disabilities auditory, cognitive and
motor
➢ do not incorporate gamification features or personalized profiles to engage and motivate developers
➢ axe-core: Focuses on rule-based accessibility compliance but does not offer personalized improvement
suggestions or integrate gamification features for enhanced developer engagement.
Inspect Category-
dynamic Specific
content analyze code against WCAG Feedback
guidelines integrated with
gamification features and
personalized developer profiles.
Gamification Personalized
Features Developer
Profiles
Methodology
Technologies Techniques
➢ Languages – Python, JavaScript ➢ Machine Learning
➢ Libraries – scikit-learn , Pandas, Bootstrap, gamify, ➢ Microservice
openBadges, Puppeteer, Celery, Jupiter Notebook ➢ Optimization
➢ PyCharm ➢ Continuous Integration
➢ Vs Code
➢ Google Collab
➢ Microsoft Teams
➢ Kanban Board
System Diagram
• Bug Reduction: Complex code is more likely to contain bugs. Identifying and
simplifying these areas can reduce the errors.
• Development and Maintenance Cost Reduction: Simpler, more
maintainable code reduces the time and effort needed for future development
and maintenance, leading to cost savings.
• Performance Optimization: Measuring complexity helps identify inefficient
code that may benefit from optimization.
Research D
Research C
S. R. Chidamber and C. F. Kemerer, "A
U. C. a. S. Bhasin, "A New Weighted
Metrics Suite for Object Oriented Design,"
Composite Complexity Measure for
*IEEE Transactions on Software
Object-Oriented Systems," Kurukshetra,
Engineering*, vol. 20, no. 6, pp. 476-493,
Haryana, India, 2024.
Jun. 1994.
A complexity measure Introduced Cyclomatic Does not account for object- Extends the concept of
Complexity (CC) as a oriented features Ignores complexity by incorporating
measure of code complexity and behavioral aspects. both structural and
based on control flow behavioral factors.
graphs.
A unified framework for Developed a unified Limited to coupling without Provides distinct guidelines
framework for measuring addressing control for Java and C# and
coupling measurement coupling in object-oriented structures or nesting and calculate code complexity
in object-oriented systems. calculating complexity for for both language and
java language only. Highlights high complexity
systems areas
New Weighted Introduced the Weighted Limited scope of factors Use & Extends WCC by
Composite Complexity considered (e.g., does not including additional
Composite Complexity (WCC) measure. include error handling, structural factors and
Measure for Object- threads) and behavioral behavioral factors. provides
aspects actionable
Oriented Systems recommendations for
improvement.
A Metrics Suite for Developed a suite of metrics Requires further validation Conducts industry surveys
for object-oriented design and refinement. and uses statistical analysis
Object Oriented Design to refine guidelines and
identify WCC threshold
values..
Using
provides
Extended
Language- Performing actionable
WCC Metric
Specific Statistical recommendati
Calculate
Guidelines Analysis ons for
Code
improvement
Complexity
Identify Relevant Code Complexity Metrics & Conduct an industry survey for Validate the
Extend the WCC Metric Extended WCC Metric factors
Develop Language-Specific Guidelines for Java Conduct an industry survey for get developer
and C# rating for code
Implement Code Complexity Measurement Perform statistical analysis to correlate these
Component ratings with WCC scores and establish
complexity thresholds.
What feedback do developers provide regarding the guidelines for calculating it?
➢ Some developers might provide feedback on areas where the guidelines could be refined. For example,
they might suggest additional examples, clearer definitions of certain factors, or adjustments to the
weights assigned to different complexity factors.
Technologies Techniques