• Home
  • Search
  • Engineering Paper] SCC: Automatic Classification of Code Snippets
  • Cite Icon14
  • https://doi.org/10.1109/scam.2018.00031Copy DOI Icon

Engineering Paper] SCC: Automatic Classification of Code Snippets

  • Sep 1, 2018
  • Kamel Alreshedy +4 more
Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Determining the programming language of a source code file has been considered in the research community; it has been shown that Machine Learning (ML) and Natural Language Processing (NLP) algorithms can be effective in identifying the programming language of source code files. However, determining the programming language of a code snippet or a few lines of source code is still a challenging task. Online forums such as Stack Overflow and code repositories such as GitHub contain a large number of code snippets. In this paper, we describe Source Code Classification (SCC), a classifier that can identify the programming language of code snippets written in 21 different programming languages. A Multinomial Naive Bayes (MNB) classifier is employed which is trained using Stack Overflow posts. It is shown to achieve an accuracy of 75% which is higher than that with Programming Languages Identification (PLI-a proprietary online classifier of snippets) whose accuracy is only 55.5%. The average score for precision, recall and the F1 score with the proposed tool are 0.76, 0.75 and 0.75, respectively. In addition, it can distinguish between code snippets from a family of programming languages such as C, C++ and C#, and can also identify the programming language version such as C# 3.0, C# 4.0 and C# 5.0.

Similar Papers
  • PDF
  • Research Article
  • Citations1

SCC-GPT: Source Code Classification Based on Generative Pre-Trained Transformers

  • Jul 07, 2024
  • Mathematics
  • Mohammad D Alahmadi +2
  • Research Article
  • Citations29

Post2Vec: Learning Distributed Representations of Stack Overflow Posts

  • Sep 01, 2022
  • IEEE Transactions on Software Engineering
  • Bowen Xu +5
  • PDF
  • Research Article
  • Citations3

Knowledge reuse in software projects: Retrieving software development Q&A posts based on project task similarity.

  • Dec 17, 2020
  • PloS one
  • Glaucia Melo +3
  • Research Article
  • Citations22

Identification of recurrent atrial fibrillation using natural language processing applied to electronic health records.

  • Mar 30, 2023
  • European heart journal. Quality of care & clinical outcomes
  • Chengyi Zheng +11
  • Research Article
  • Citations86

Deep Graph Matching and Searching for Semantic Code Retrieval

  • May 10, 2021
  • ACM Transactions on Knowledge Discovery from Data
  • Xiang Ling +8
  • Conference Article
  • Citations10

Towards Understanding Developers’ Machine-Learning Challenges: A Multi-Language Study on Stack Overflow

  • Sep 01, 2021
  • Alaleh Hamidi +4
  • Research Article
  • Citations17

Validation of an Artificial Intelligence driven framework to automatically detect red flag symptoms in screening for rare diseases in electronic health records: hereditary transthyretin amyloidosis polyneuropathy as a key example.

  • Dec 11, 2022
  • Journal of the Peripheral Nervous System
  • Dries Hens +2
  • Research Article
  • Citations22

Development and Validation of a Natural Language Processing Tool to Identify Injuries in Infants Associated With Abuse.

  • Aug 01, 2022
  • Academic Pediatrics
  • Gunjan Tiyyagura +14
  • Research Article
  • Citations1

Development and validation of natural language processing (NLP) algorithm for detection of distant versus local breast cancer recurrence and metastatic site.

  • May 20, 2020
  • Journal of Clinical Oncology
  • Yasmin Karimi +4
  • Book Chapter
  • Citations1

A Catalog of Source Code Metrics – A Tertiary Study

  • Jan 01, 2023
  • Umar Iftikhar +3
  • Conference Article
  • Citations27

Python Coding Style Compliance on Stack Overflow

  • May 01, 2019
  • Nikolaos Bafatakis +6
  • Research Article

PP04 Assessing The Utility Of Natural Language Processing In Generating A Granular Estimated Indication For A Horizon Scanning Database

  • Dec 01, 2024
  • International Journal of Technology Assessment in Health Care
  • Caitríona Ní Choitir +15
  • Research Article
  • Citations1

Diagnostic performance of natural language processing in detection of acute cancer VTE.

  • Jun 01, 2023
  • Journal of Clinical Oncology
  • Naveen G Subramanian +7
  • Conference Article
  • Citations12

A language-agnostic model for semantic source code labeling

  • Sep 03, 2018
  • Ben Gelman +4
  • Conference Article
  • Citations2

Automated Approach for DDOS Attacks Detection Based on Naive Bayes Multinomial Classifier

  • May 01, 2018
  • Shital K Ajagekar +1
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.