0% found this document useful (0 votes)
19 views78 pages

Code Harbor - A Code Analysis Tool

Uploaded by

pevinyapeiris
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)
19 views78 pages

Code Harbor - A Code Analysis Tool

Uploaded by

pevinyapeiris
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/ 78

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.

System Diagram Components


Overall system diagram Individual Components with research
with components​ question, objectives and methodology

24-25J-044 04/08/2024 1
Meet the Code Harbor Team: Developers and
Supervisors

Supervisor Co -supervisor External supervisor


Dr. Dilshan De Silva Mr. Samadhi Rathnayake Mr. Raditha Dissanayake

24-25J-044 04/08/2024 2
Meet the Code Harbor Team: Developers and
Supervisors

Group Leader Fernando K.R.A.W Dayananda I.H.M.B.L. Kodithuwakku Y.S.


Dewmin T.Y

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 offer context-aware suggestions for code refactoring and complexity reduction​

➢ To integrate AI-driven recommendations for automated code review and compliance checking​

➢ To enhance accessibility testing of code through gamification

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

Integrating AI into code review processes can


reduce the time developers spend on manual reviews Gamification in software tools can increase user
leading to faster development cycles and more engagement and productivity of a developer​
efficient project workflows​

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

IT21440922 | Dewmin T.Y


IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 10
Automated Code Review & Compliance Checking
with AI Driven Recommendations
➢ Purpose: Automates the process of identifying code
issues, code smells, and standard violations,
enhancing code quality and developer efficiency

➢ Evolution: Transitioned from manual reviews to using


static analysis tools, now enhanced by AI and
machine learning for deeper analysis

➢ Advantages: Provides consistent, unbiased reviews, instant


feedback, and actionable recommendations, reducing
manual effort, time and improving project outcomes.

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 11


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

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 12


Automated Code Review & Compliance Checking
with AI Driven Recommendations

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

❑ User Interface Development

❑ Train models to consider project-specific contexts, such as architectural patterns and coding
conventions, to provide more relevant and targeted recommendations.

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 13


Automated Code Review & Compliance Checking
with AI Driven Recommendations
Research Questions
How can AI-driven automated code review tools enhance developer productivity and code quality
compared to traditional manual review processes?

➢ 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.

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 14


Automated Code Review & Compliance Checking
with AI Driven Recommendations
Research Questions
How can AI-driven techniques be integrated into automated code review processes to provide targeted,
actionable recommendations and ensure compliance with coding standards?

➢ 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

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 15


Automated Code Review & Compliance Checking
with AI Driven Recommendations
References
Research A Research B
R. Coelho, F. Figueiredo, C. Rubira, and F. R. Tufano, L. Ponzanelli, M. Aniche, and
Kon, "Automated Code Review: A A. Bacchelli, "Towards Automating Code
Systematic Mapping Study," in Proceedings Review Activities," in Proceedings of the
of the 34th International Conference on IEEE/ACM 43rd International
Software Maintenance and Evolution Conference on Software Engineering
(ICSME), pp. 401-411, 2018. (ICSE), pp. 185-195, 2021

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.

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 16


Automated Code Review & Compliance Checking
with AI Driven Recommendations
Research Gap Analysis
Feature Limitation My Component
Research

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

Research D Focused on understanding limited to static analysis Uses machine learning


dependencies and potential without incorporating models to dynamically
maintenance issues immediate feedback analyze code and provide
real-time feedback

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 17


Automated Code Review & Compliance Checking
with AI Driven Recommendations
Research Gap Analysis
➢ current automated code review tools like SonarLint and ESLint provide valuable static analysis
features, they lack the ability to deliver advanced, AI-driven recommendations.

➢ 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

Existing Tools and Limitations


➢ SonarLint: Provides comprehensive static analysis but lacks context-aware, AI-driven recommendations

➢ ESLint: Focuses on enforcing code style and detecting syntax issues, but does not address higher-level
design and architectural concerns

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 18


Automated Code Review & Compliance Checking
with AI Driven Recommendations
Novelty

Reduces
AI-Driven, Enhanced Optimized
time and
Context- Compliance methods
effort for
Aware Code and Code with AI
code
Analysis Quality Suggestions
reviews

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 19


Automated Code Review & Compliance Checking
with AI Driven Recommendations

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

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 20


Automated Code Review & Compliance Checking
with AI Driven Recommendations

Evidences for Completion

❑ Sufficient data collection to develop AI tool that successfully analyzes and


suggests context aware suggestions to improve code quality adhering to
coding standards and guidlines.

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 20


Automated Code Review & Compliance Checking
with AI Driven Recommendations
System Diagram

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 21


User Requirements Functional Requirements Non- Functional
Requirements
• provide developers detailed • The system must automatically
insights into code quality, analyze code for common issues, • Performance: The tool should be
highlighting areas with code smells, and adherence to able to analyze large codebases
potential issues such as code coding standards while scanning efficiently, providing results in a
smells, violations of coding the codebases reasonable time frame to avoid
standards, and areas of high delays in the development
complexity • The system must include an AI- workflow
driven recommendation engine
• Provide specific, actionable that provides suggestions for • Usability: The user interface
recommendations for code improvements should be intuitive and easy to
improving code quality, navigate, allowing users to
adherence to best practices, quickly understand the analysis
and compliance with coding results and recommendations.
standards

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 22


Automated Code Review & Compliance Checking
with AI Driven Recommendations
Work Break Down

Automated Code Review and Compliance Checking with AI Driven Recommendations

Requirement AI Integration Publish


Project Design the Data collection and
analysis for recommend research
research architecture preprocessing
suggestions papers

Feasibility Study Design the Continuous feeding Validate with


Create Proposal Final
automated code of data to train the experienced
Presentation
review method model developers
Explore Data
sets Method to Deploy the
Implement an
upload/process product
interactive UI
multiple files

IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 23


IT21440922 | Dewmin T.Y. | 24-25J-044 04/08/2024 24
Component 2
AI Integration for Complexity
Reduction with Suggested Refactoring

IT21440236 | Kodithuwakku Y.S.


IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 25
AI Integration for Complexity Reduction with
Suggested Refactoring
Background

Reasons to have low-quality code​

Why we need high-quality code?​

What is the importance?​

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 26


Reasons to have low-quality code

• Legacy Systems: Older codebases may not follow modern standards.


• Lack of Expertise: Developers might lack knowledge of best practices.
• Time Constraints: Pressure to deliver quickly can lead to compromised code
quality.
• Inadequate Tools: Existing tools might not sufficiently identify or suggest
improvements for complex code.

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 27


Why we need high-quality code?​

• Readability: High-quality code is easier to understand and maintain.​


• Scalability: Better-structured code scales more efficiently.
• Reduced Errors: Clean code reduces the likelihood of bugs and errors.
• Performance: Optimized code enhances performance.

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 28


What is the importance?​

• Improved Development Speed: Easier code maintenance and updates.​


• Cost-Effectiveness: Reduced long-term maintenance costs.​
• Enhanced Collaboration: Clearer code improves team collaboration.​
• Better Product Quality: Higher code quality leads to more reliable
software.​

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 29


References​
Research A Research B Research C
A. Christopoulou, . E. Giakoumakis, H. Y. Shahir, E. Kouroshfar, and R. M. O. Cinneide, "Automated
V. E. Zafeiris and V. Soukara, Ramsin, "Using Design Patterns for Refactoring to Introduce Design
"Automated refactoring to the Refactoring Real-World Models," in Patterns," in Proceedings of the 21st
Strategy design pattern," Proceedings of the 2009 35th IEEE International Conference on
Information and Software Euromicro Conference on Software Software Maintenance, Budapest,
Technology, vol. 54, no. 11, pp. 1202- Engineering and Advanced Hungary, Sep. 2005, pp. 78-86.​
1214, 2012. Applications, Patras, Greece, Aug.
2009, pp. 297-304.​

Research D Research E Research F


M. G. Al-Obeidallah, "Towards a B. S. Dillon, "A case study in object- P. S. Aslin Jenila and P. Ranjana,
Framework to Assess the Impact of oriented patterns identified during "Design pattern prediction
Design Patterns on Software manual refactoring," in 2016 IEEE techniques: A comparative analysis,"
Metrics," in 2023 International 14th International Conference on 2011 International Conference on
Conference on Multimedia Software Engineering Research, Nanoscience, Engineering and
Computing, Networking and Management and Applications Technology (ICONSET), Chennai,
Applications (MCNA), Valencia, (SERA), Towson, MD, USA, 2016, pp. India, 2011, pp. 1-6​
Spain, June 2023​ 1-8​

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044 04/08/2024 30


Research - Summary​
Research A Research B Research C
This research makes significant This research introduces a method This research presents a
strides in automating refactoring to for refactoring real-world models methodology for automated
the Strategy pattern, it primarily into software models using design transformations to introduce design
focuses on identifying and patterns, leveraging model-driven patterns into software systems,
transforming conditional logic architecture to improve model enhancing flexibility, preserving
based on predefined patterns and quality and address common issues. program behavior, and facilitating
rules. the application to existing code.​

Research D Research E Research F


This research introduces a This paper explores the identification This paper evaluates design pattern
framework to evaluate the impact and cataloging of design patterns prediction techniques for software
of design patterns on software through case studies, highlighting refactoring, categorizing patterns,
metrics, comparing pattern and issues like unused code and duplicate proposing metrics for quality
non-pattern versions and finding no functionality, and proposing assessment, and suggesting a
consistent metric behavior across preventive practices to enhance framework to integrate these metrics
two subject systems and one design understanding of software aging and and patterns for improved quality in
pattern. improve coding practices. object-oriented software models.

IT21307058 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 31


Research Gap​
Research Key Focus Findings/Contributio Research Gap Relation to my
ns Component
A Pattern Development of a pattern Introduced a structured Lack of empirical Integrate AI to
Language for language for software approach to design pattern evaluation of the empirically evaluate
Software design language’s the effectiveness of
Design effectiveness in design patterns in
refactoring refactoring
Empirical Empirical studies on the Provided insights into the Limited focus on Explore AI-driven
Studies of use of design patterns applicability of design measuring the impact metrics to measure
Design Patterns patterns in real-world of patterns on code complexity before and
projects complexity after applying design
patterns.
Software Analysis of metrics in Identified various metrics Insufficient exploration Bridge this gap by
Metrics for object-oriented software for assessing software of how these metrics using AI to analyze the
Object-Oriented quality relate to design relationship between
Systems patterns specifically design patterns and
software metrics.

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 32


Research Gap​

Research Key Focus Findings/Contributio Research Gap Relation to my


ns Component
Design Pattern Comparative analysis of Evaluated design patterns Lack of a Aims to develop a
Prediction design patterns based on software metrics comprehensive framework that
Techniques: A framework that integrates AI for
Comparative combines design complexity reduction
Analysis patterns and AI metrics and suggests
appropriate design
patterns.

IT21307058 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 33


Novelty​

Innovative Reduced
Aspect Biases
Utilizes machine learning
techniques to analyze the code
and provide personalized
refactoring suggestions.

Alignment
Enhanced
with Best
Resolution
Practices

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 34


Research Question​

Can AI-driven tools, utilizing smaller language models (SLMs),


effectively identify complex code segments and provide
personalized, actionable refactoring suggestions based on
design patterns to reduce code complexity and improve
maintainability?​

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 35


Specific Objectives

❑ Develop an AI-driven tool that analyzes code to identify complex


segments.​
❑ Generate personalized, actionable refactoring suggestions tailored to
the specific context of the code, focusing on established design patterns.​
❑ Evaluate the effectiveness of these suggestions in improving code
quality and maintainability.​

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 36


Sub Objectives​​

❑ Integrate smaller language models (SLMs) from platforms like Hugging


Face for advanced code analysis and refactoring.​
❑ Design algorithms for generating context-aware refactoring suggestions
based on design patterns.​​
❑ Conduct experiments to compare pre- and post-refactoring code
quality.​

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 37


Evidences for Completion

❑ Development of an AI tool, i.e. Code Harbor, that successfully analyzes


and suggests refactoring in sample projects using design patterns.
❑ Documentation of case studies demonstrating the complexity reduction
in real-world projects.

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 38


Methodology – Component Diagram

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 39


Methodology – Technologies & Techniques

Technologies Techniques

➢ Python Language​ ➢ Machine Learning​


➢ Python Libraries​ ➢ Deep Learning​
-Ex: Pandas​ ➢ Code Analysis Algorithms​
➢ IDE: VS Code / PyCharm​ ➢ Refactoring Patterns​
➢ Collaboration: Google Colab ➢ Optimization Techniques​
➢ Small Language Models​
➢ Databases: Vector DB (Ex: ChromaDB), MongoDB
➢ Code Analysis Tools: SonarQube

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 40


Methodology – Requirements

Personal Requirements Functional Non- Functional


Requirements Requirements
• Guidance from supervisors in
software engineering and AI • High accuracy in complexity • Performance efficiency of the
domains. analysis. tool.​
• Scalability to handle large
• Collaboration with experts in • Reliable and actionable
code quality and design refactoring suggestions based codebases.​
patterns. on design patterns.​ • User-friendly interface.​

IT21440236 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 41


Work Break Down

AI Integration for Complexity Reduction with Suggested Refactoring

Requirement Develop high- Refine models Publish


Project Data collection and
analysis level for context- research
research preprocessing
architecture.​ aware papers
suggestions.​
Assess feasibility Final
Create Proposal Plan for SLM Implement and train
of using SLMs.​ Validate with Presentation
integration.​ models.​
Developers​
Explore Data Label and prepare
Method to Deploy the
sets datasets.​ Incorporate SLMs for product
upload/process
refactoring.​
multiple files
Knowledge
Transfer​

IT21307058 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 42


IT21307058 | Kodithuwakku Y.S. | 24-25J-044 04/08/2024 43
Component 3
Enhancing Accessibility of codes with
Gamification

IT21312908 | Fernando K.R.A.W


IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 44
Enhancing Accessibility of codes with Gamification

➢ Purpose: Enhance frontend accessibility by providing


suggestions, personalized profiles and gamification
features.

➢ Evolution: Transitioned from basic code validation to


automated WCAG compliance checks, enhanced by AI
and gamification for personalized, dynamic
accessibility improvements.

➢ Advantages: Offers consistent accessibility


evaluations, personalized improvement tracking, and
engaging challenges, reducing manual effort and
enhancing code quality and developer skills.

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 45


Enhancing Accessibility of codes with Gamification

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.

❑ Provide detailed accessibility measures for different categories

❑ Develop personalized profiles that track developer progress with a leaderboard

❑ Create and automate periodic challenges

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 46


Enhancing Accessibility of codes with Gamification

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

❑ User Interface Development

❑ Backend Development to handle data storage, and user management.

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 46


Enhancing Accessibility of codes with Gamification

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.

IT21312908 | Fernando K.R.A.W. | 24-25J-044


Enhancing Accessibility of codes with Gamification

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.

IT21312908 | Fernando K.R.A.W. | 24-25J-044


Enhancing Accessibility of codes with Gamification

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.

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 8


Enhancing Accessibility of codes with Gamification

Research Gap Analysis


Feature Limitation My Component
Research

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

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 8


Evidences for Completion

❑ Development of an AI-powered accessibility checker that analyzes code


and provides personalized suggestions based on WCAG guidelines.

❑ Documentation of case studies illustrating enhanced accessibility


compliance and usability in real-world projects.

❑ Performance metrics showing increased developer engagement,


improved accessibility scores, and effectiveness of gamification features.

IT21312908 | Fernando K.R.A.W. | 24-25J-044


Enhancing Accessibility of codes with Gamification

Research Gap Analysis


➢ Current accessibility checking tools like Wave and axe-core provide essential static analysis features,

➢ do not incorporate gamification features or personalized profiles to engage and motivate developers

➢ do not leverage machine learning.

Existing Tools and Limitations


➢ Wave: Provides fundamental accessibility checks but lacks AI-driven, context-aware recommendations and
real-time feedback.

➢ axe-core: Focuses on rule-based accessibility compliance but does not offer personalized improvement
suggestions or integrate gamification features for enhanced developer engagement.

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 54


Novelty​

Inspect Category-
dynamic Specific
content analyze code against WCAG Feedback
guidelines integrated with
gamification features and
personalized developer profiles.

Gamification Personalized
Features Developer
Profiles

IT21312908 | Fernando K.R.A.W. | 24-25J-044


Enhancing Accessibility of codes with Gamification

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

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 56


Enhancing Accessibility of codes with Gamification

System Diagram

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 57


Methodology – Requirements

Personal Requirements Functional Non- Functional


Requirements Requirements
• Guidance from supervisors in
web accessibility standards • Accurate reporting of • Real-time responsiveness for
and best practices. accessibility issues per WCAG immediate feedback.
guidelines.
• Scalability to handle large
• Collaboration with experts in
gamification and user • Gamification Features for the codebases.​
engagement strategies. developers to engage • User-friendly interface.​

IT21312908 | Fernando K.R.A.W. | 24-25J-044


Automated Code Review & Compliance Checking
with AI Driven Recommendations
Work Break Down

Automated Code Review and Compliance Checking with AI Driven Recommendations

Requirement Data collection and AI Integration Publish


Project Design the
analysis Preprocessing with for recommend research
research architecture WCAG guidlines suggestions papers

Feasibility Study Design the Implement user Validate with


Create Proposal Final
accessibility management experienced
Presentation
checker and backend developers
Explore Data
sets Design Method to
Implement an Deploy the
Gamification automatically
interactive UI product
features and suggest
leaderboard challanges

IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 58


IT21312908 | Fernando K.R.A.W. | 24-25J-044 04/08/2024 59
Component 4
Logic for Calculating and Displaying
Code Complexity using Metric

IT21307058 | Dayananda I.H.M.B.L.


IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044 04/08/2024 7
Logic for Calculating and Displaying Code
Complexity using Metric
Background

Reason for high complexity


code?​

What is Code Complexity?

Why is it important to measure


code complexity?

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Reason for high complexity code

• Inconsistent Coding Practices: Variations in coding styles and practices


among developers can lead to inconsistent and complex code.
• Complex Business Logic: Implementing complicated business rules and
logic within the code can significantly increase complexity
• Error Handling: Complex error handling mechanisms can add to the overall
complexity

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


What is Code Complexity?​

• Code complexity refers to how complicated a piece of software code is.


It affects how hard it is to understand, maintain, and manage the code.
• High code complexity can lead to increased development and
maintenance costs, as well as a higher bugs and errors.

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Why is it important to measure code
complexity?​

• 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.

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Logic for Calculating and Displaying Code
Complexity using Metric
References
Research B
L. C. Briand, J. W. Daly, and J. Wust, "A
Research A unified framework for coupling
T. J. McCabe, "A complexity measure”, vol. measurement in object-oriented
SE-2, no. 4, pp. 308-320, Dec. 1976. systems,” , vol. 25, no. 1, pp. 91-121,
Jan. 1999.

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.

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Research Gap Analysis
Feature Limitation My Component
Research

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..

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Logic for Calculating and Displaying Code
Complexity using Metric
Novelty

Using
provides
Extended
Language- Performing actionable
WCC Metric
Specific Statistical recommendati
Calculate
Guidelines Analysis ons for
Code
improvement
Complexity

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Logic for Calculating and Displaying Code
Complexity using Metric
Specific & Sub Objectives
Specific Objectives Sub Objectives

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.

Provide Highlighting areas of high complexity User Interface Development


Visualization, Recommendations

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Evidences for Completion

❑ Documentation of Extended WCC Metric:


Description: Detailed documentation explaining the extended WCC metric,
including the added structural and behavioral factors, guidelines for Java
and C#, and the methodology for calculating complexity.

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Logic for Calculating and Displaying Code
Complexity using Metric
Research Questions

Why Choose the Weighted Composite Complexity (WCC) Metric?

➢ Object-Oriented Focus Metric: Tailored for object-oriented programming, considering inheritance.


➢ Comprehensive Coverage: Capturing complexity of control structures, nesting, and inheritance more
effectively than other metrics.
➢ Quick Identification: By analyzing the code line by line, it can pinpoint specific sections where complexity
is high.

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Logic for Calculating and Displaying Code
Complexity using Metric
Research Questions
How does the inclusion of additional structural and behavioral factors in the Extended WCC metric
improve the accuracy and comprehensiveness of code complexity measurement compared to traditional
metrics?
➢ Traditional metrics like Cyclomatic Complexity primarily focus on control flow structures, missing out on
other critical aspects. By incorporating factors such as structural factors and behavioral factors, the WCC
metric offers a more complete view of what makes the code complex.

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.

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Methodology – Component Diagram

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Methodology – Technologies & Techniques

Technologies Techniques

➢ Python Language ➢ Tokenization and Parsing


➢ Python Libraries ➢ Statistical Analysis and Correlation
Statistical analysis -: Pandas, NumPy, SciPy, ➢ Weighted Composite Complexity Calculation
Scikit-Learn, Statsmodels. ➢ Visualization and Reporting
Tokenization-: javalang, antlr4-python3-
runtime.
Visualizations -: Matplotlib
➢ IDE: VS Code / PyCharm
➢ Databases: MongoDB

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Methodology – Requirements

Personal Requirements Functional Non- Functional


Requirements Requirements
• Guidance from supervisors in
software engineering. • Complexity Calculation for • Performance - The tool must
Java and C# and categorize analyze and calculate
• Conduct surveys with class
complexity quickly.
experienced software • Offer actionable
developers. recommendations for • Scalability - handle large
improvement codebases.
• Highlight high-complexity • User-friendly interface​
areas in the code
• Visualization

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


Logic for Calculating and Displaying Code
Complexity using Metric
Work Break Down
Logic for Calculating and Displaying Code Complexity using Metric

Requirement Extend WCC


Doing statistical Publish
Project analysis Design the metric calculate
analysis identify research
research architecture complexity for
thresholds values papers
java and c#
Feasibility Study
For factors Implement the Validate with
Create Proposal provide distinct Final
extended Extend experienced
Identify metric guidelines for Presentation
WCC metric developers
and factors for each language
calculate code Method to
complexity Implement visual Deploy the
Doing survey upload/process product
verify and adjust overview
multiple files
Explore Code guidelines.
Data sets

IT21307058 | Dayananda I.H.M.B.L. | 24-25J-044


04/08/2024 3
THANK YOU!
Write a closing statement or call-to-action here.

You might also like