{"id":{"repo_id":"ohiolink","oai_identifier":"oai:etd.ohiolink.edu:akron1784225704710196"},"canonical_url":"https://search.ndltd.org/etd/ohiolink/oai:etd.ohiolink.edu:akron1784225704710196","repository":{"repo_id":"ohiolink","name":"OhioLINK","base_url":"https://etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai"},"display":{"title":"Detecting and Analyzing Security Code Smells in C/C++ Using Program Slicing and Query-based Static Analysis","abstract":"Many security weaknesses in C and C++ arise from a small set of recurring source-code patterns: bound-unchecked function calls, unguarded arithmetic, hard-coded credentials, and similar constructs. Each maps to a known weakness class, yet conventional static analyzers are designed to confirm exploitable vulnerabilities and so overlook these patterns until they prove dangerous.This thesis treats such patterns as security code smells. It defines the concept, formalizes ten smells as the 10 SCS catalog with explicit Common Weakness Enumeration mappings, and builds SmellDetect — a compilation-free detector that combines srcML markup, program slicing, and query-based analysis (srcQL with XPath guard filters). Each smell is classified by the minimum program-analysis level its detection requires.SmellDetect is evaluated against cppcheck, a widely used lightweight static analyzer for C/C++, and Joern, a code-property graph platform built for deep vulnerability analysis - on the NIST Juliet benchmark and on subsystems of Linux kernel. Across the Juliet cases, it detects all ten smells with an F1 of 1.00 and no false positives or false negatives, exceeding both baselines. Detection quality depends on the type of pattern rather than on analysis depth. The result is a formally defined, reproducible smell detector for C/C++ and a direct measurement of the gap between smell-oriented and vulnerability-oriented detection. Because it builds on srcML’s language-independent markup, the same compilation-free, query-based approach extends to other srcML-supported languages, such as C++, Java, and C#, given a smell catalog of each.","abstract_html":"Many security weaknesses in C and C++ arise from a small set of recurring source-code patterns: bound-unchecked function calls, unguarded arithmetic, hard-coded credentials, and similar constructs. Each maps to a known weakness class, yet conventional static analyzers are designed to confirm exploitable vulnerabilities and so overlook these patterns until they prove dangerous.This thesis treats such patterns as security code smells. It defines the concept, formalizes ten smells as the 10 SCS catalog with explicit Common Weakness Enumeration mappings, and builds SmellDetect — a compilation-free detector that combines srcML markup, program slicing, and query-based analysis (srcQL with XPath guard filters). Each smell is classified by the minimum program-analysis level its detection requires.SmellDetect is evaluated against cppcheck, a widely used lightweight static analyzer for C/C++, and Joern, a code-property graph platform built for deep vulnerability analysis - on the NIST Juliet benchmark and on subsystems of Linux kernel. Across the Juliet cases, it detects all ten smells with an F1 of 1.00 and no false positives or false negatives, exceeding both baselines. Detection quality depends on the type of pattern rather than on analysis depth. The result is a formally defined, reproducible smell detector for C/C++ and a direct measurement of the gap between smell-oriented and vulnerability-oriented detection. Because it builds on srcML’s language-independent markup, the same compilation-free, query-based approach extends to other srcML-supported languages, such as C++, Java, and C#, given a smell catalog of each.","abstract_has_math":false,"creators":["Asante, Afia Darko"],"institution":"University of Akron","degree_name":"Master of Science","degree_level":"masters","degree_discipline":"Computer Science","degree_department":null,"school":null,"contributors":[],"advisors":["Collard, Michael"],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026-07-23","date_published":"2026-07-23","updated_at":"2026-11-27T05:03:15Z","subjects":["Computer Science","security code smells, static analysis, C/C++, program slicing, query-based static analysis, srcML, srcQL, compilation-free analysis, source-sink taint analysis, Common Weakness Enumeration (CWE), vulnerability detection, secure coding practices, NIST Juliet Test Suite, code smell taxonomy."],"languages":["English"],"rights":["unrestricted","This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws."],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"http://rave.ohiolink.edu/etdc/view?acc_num=akron1784225704710196","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"http://rave.ohiolink.edu/etdc/view?acc_num=akron1784225704710196","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aohiolink%3Aoai%3Aetd.ohiolink.edu%3Aakron1784225704710196","prefix":"oai_dc"},"source_record":{"url":"https://etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Aetd.ohiolink.edu%3Aakron1784225704710196","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Collard, Michael"]},{"key":"dc:creator","label":"Author","values":["Asante, Afia Darko"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026-07-23"]},{"key":"dc:publisher","label":"Institution","values":["University of Akron / OhioLINK"]},{"key":"dc:type","label":"Dc Type","values":["Electronic Thesis or Dissertation"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science"]},{"key":"thesis:degree_level","label":"Degree Level","values":["masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of Akron"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Computer Science","security code smells, static analysis, C/C++, program slicing, query-based static analysis, srcML, srcQL, compilation-free analysis, source-sink taint analysis, Common Weakness Enumeration (CWE), vulnerability detection, secure coding practices, NIST Juliet Test Suite, code smell taxonomy."]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["English"]},{"key":"dc:rights","label":"Dc Rights","values":["unrestricted","This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["http://rave.ohiolink.edu/etdc/view?acc_num=akron1784225704710196"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Many security weaknesses in C and C++ arise from a small set of recurring source-code patterns: bound-unchecked function calls, unguarded arithmetic, hard-coded credentials, and similar constructs. Each maps to a known weakness class, yet conventional static analyzers are designed to confirm exploitable vulnerabilities and so overlook these patterns until they prove dangerous.This thesis treats such patterns as security code smells. It defines the concept, formalizes ten smells as the 10 SCS catalog with explicit Common Weakness Enumeration mappings, and builds SmellDetect — a compilation-free detector that combines srcML markup, program slicing, and query-based analysis (srcQL with XPath guard filters). Each smell is classified by the minimum program-analysis level its detection requires.SmellDetect is evaluated against cppcheck, a widely used lightweight static analyzer for C/C++, and Joern, a code-property graph platform built for deep vulnerability analysis - on the NIST Juliet benchmark and on subsystems of Linux kernel. Across the Juliet cases, it detects all ten smells with an F1 of 1.00 and no false positives or false negatives, exceeding both baselines. Detection quality depends on the type of pattern rather than on analysis depth. The result is a formally defined, reproducible smell detector for C/C++ and a direct measurement of the gap between smell-oriented and vulnerability-oriented detection. Because it builds on srcML’s language-independent markup, the same compilation-free, query-based approach extends to other srcML-supported languages, such as C++, Java, and C#, given a smell catalog of each."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf","p.119","2.59 MB"]},{"key":"dc:title","label":"Title","values":["Detecting and Analyzing Security Code Smells in C/C++ Using Program Slicing and Query-based Static Analysis"]}]}],"canonical_facts":{"dc:contributor.advisor":["Collard, Michael"],"dc:creator":["Asante, Afia Darko"],"dc:date":["2026-07-23"],"dc:description":["Many security weaknesses in C and C++ arise from a small set of recurring source-code patterns: bound-unchecked function calls, unguarded arithmetic, hard-coded credentials, and similar constructs. Each maps to a known weakness class, yet conventional static analyzers are designed to confirm exploitable vulnerabilities and so overlook these patterns until they prove dangerous.This thesis treats such patterns as security code smells. It defines the concept, formalizes ten smells as the 10 SCS catalog with explicit Common Weakness Enumeration mappings, and builds SmellDetect — a compilation-free detector that combines srcML markup, program slicing, and query-based analysis (srcQL with XPath guard filters). Each smell is classified by the minimum program-analysis level its detection requires.SmellDetect is evaluated against cppcheck, a widely used lightweight static analyzer for C/C++, and Joern, a code-property graph platform built for deep vulnerability analysis - on the NIST Juliet benchmark and on subsystems of Linux kernel. Across the Juliet cases, it detects all ten smells with an F1 of 1.00 and no false positives or false negatives, exceeding both baselines. Detection quality depends on the type of pattern rather than on analysis depth. The result is a formally defined, reproducible smell detector for C/C++ and a direct measurement of the gap between smell-oriented and vulnerability-oriented detection. Because it builds on srcML’s language-independent markup, the same compilation-free, query-based approach extends to other srcML-supported languages, such as C++, Java, and C#, given a smell catalog of each."],"dc:format":["application/pdf","p.119","2.59 MB"],"dc:identifier":["http://rave.ohiolink.edu/etdc/view?acc_num=akron1784225704710196"],"dc:language":["English"],"dc:publisher":["University of Akron / OhioLINK"],"dc:rights":["unrestricted","This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws."],"dc:subject":["Computer Science","security code smells, static analysis, C/C++, program slicing, query-based static analysis, srcML, srcQL, compilation-free analysis, source-sink taint analysis, Common Weakness Enumeration (CWE), vulnerability detection, secure coding practices, NIST Juliet Test Suite, code smell taxonomy."],"dc:title":["Detecting and Analyzing Security Code Smells in C/C++ Using Program Slicing and Query-based Static Analysis"],"dc:type":["Electronic Thesis or Dissertation"],"thesis:degree_discipline":["Computer Science"],"thesis:degree_level":["masters"],"thesis:degree_name":["Master of Science"],"thesis:institution_name":["University of Akron"]},"updated_at":"2026-11-27T05:03:15Z"}