• Home
  • Search
  • Incorporating Code Structure and Quality in Deep Code Search
  • Open Access IconOpen Access
  • Cite Icon11
  • https://doi.org/10.3390/app12042051Copy DOI Icon

Incorporating Code Structure and Quality in Deep Code Search

Show More
  • Abstract
  • Highlights & Summary
  • PDF
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Developers usually search for reusable code snippets to improve software development efficiency. Existing code search methods, including methods based on full-text or deep learning, have two disadvantages: (1) ignoring structural information of code snippets, such as conditional statements and loop statements, and (2) ignoring quality information of code snippets, such as naming clarity and logical correctness. These disadvantages limit the performance of existing code search methods. In this paper, we propose a novel code search method named Structure and Quality based Deep Code Search (SQ-DeepCS). SQ-DeepCS introduces a code representation method called program slice to represent structual information as well as API usage of code snippets. Meanwhile, SQ-DeepCS introduces a novel deep neural network named Method-Description-Joint Embedding Neural Network (MD-JEnn) to weight the quality of code snippets. To evaluate the proposed methods, we train MD-JEnn and evaluate SQ-DeepCS by searching for code snippets with respect to the top-rated questions from Stack Overflow. We use four evaluation indicators to measure the effectiveness of SQ-DeepCS: FRank, SuccessRate@k, PrecisionRate@k, and Mean Reciprocal Rank (MRR). The experimental results show that our approach can provide better results than existing techniques when searching for relevant code snippets.

Loading PDF

Similar Papers
  • Conference Article
  • Citations63

Relationship-aware code search for JavaScript frameworks

  • Nov 01, 2016
  • Xuan Li +5
  • Conference Article
  • Citations30

Is a Single Model Enough? MuCoS: A Multi-Model Ensemble Learning Approach for Semantic Code Search

  • Oct 26, 2021
  • Lun Du +5
  • Conference Article
  • Citations27

Python Coding Style Compliance on Stack Overflow

  • May 01, 2019
  • Nikolaos Bafatakis +6
  • Conference Article
  • Citations17

ICSD

  • Dec 03, 2018
  • Yanfang Ye +7
  • Conference Article
  • Citations621

Deep code search

  • May 27, 2018
  • Xiaodong Gu +2
  • Conference Article
  • Citations7

Characterizing Duplicate Code Snippets between Stack Overflow and Tutorials

  • May 01, 2019
  • Manziba Akanda Nishi +2
  • PDF
  • Research Article
  • Citations1

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

  • Jul 07, 2024
  • Mathematics
  • Mohammad D Alahmadi +2
  • Conference Article
  • Citations69

Are the Code Snippets What We Are Searching for? A Benchmark and an Empirical Study on Code Search with Natural-Language Queries

  • Feb 01, 2020
  • Shuhan Yan +4
  • Research Article
  • Citations28

CodeMatcher: Searching Code Based on Sequential Semantics of Important Query Words

  • Sep 28, 2021
  • ACM Transactions on Software Engineering and Methodology
  • Chao Liu +5
  • Conference Article
  • Citations6

Reinforcement Learning of Code Search Sessions

  • Dec 01, 2019
  • Wei Li +3
  • Research Article
  • Citations29

Post2Vec: Learning Distributed Representations of Stack Overflow Posts

  • Sep 01, 2022
  • IEEE Transactions on Software Engineering
  • Bowen Xu +5
  • Conference Article
  • Citations36

Cross-language code search using static and dynamic analyses

  • Aug 18, 2021
  • George Mathew +1
  • Dissertation
  • Citations5

Towards understanding the challenges faced by machine learning software developers and enabling automated solutions

  • Sep 04, 2020
  • Md Johirul Islam
  • Conference Article

Detecting Adversarial Prompted AI-Generated Code on Stack Overflow: A Benchmark Dataset and an Enhanced Detection Approach

  • Sep 07, 2025
  • Aman Swaraj +3
  • Research Article
  • Citations1

How Do OSS Developers Reuse Architectural Solutions From Q&A Sites: An Empirical Study

  • Jul 01, 2025
  • IEEE Transactions on Software Engineering
  • Musengamana Jean De Dieu +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.