The recent rise in the amount of unstructured data in digital format has given rise to the use of natural language processing techniques to understand the data. Organizations have started recognizing the potential in the unstructured textual data. Data from the internet as well as from the organizations' internal repository can help them to gain more insight into the market. Information collected from such sources provides valuable decision-making probability for the organizations. Keyword-based search is the most helpful form of the document retrieval process. The paper discusses such processes used in the current scenario as well as propose a new form of classification technique to be used for the process of document retrieval.
Background Code clone detection is important for software maintenance, but detecting semantic clones remains challenging. Many existing methods rely on Graph Neural Networks (GNNs), which require high computational resources. Large Language Models (LLMs) can also be computationally expensive and may not effectively capture the structural relationships present in source code. This study proposes an efficient approach that combines structural program information with a Small Language Model (SLM) for code clone detection. Methods Program Dependence Graphs (PDGs) are generated from the BigCloneBench dataset and converted into a standard Graphviz text representation. This structural representation is used to fine-tune a 0.5-billion-parameter SLM using Parameter-Efficient Fine-Tuning (PEFT) with Low-Rank Adaptation (LoRA). The model is trained to detect code clones, identify their clone types, and locate the corresponding cloned lines of code. Results The proposed method achieved competitive F1-scores compared with existing code clone detection methods while using only approximately 5.5 GB of GPU memory. The Graphviz-based structural representation enabled the SLM to learn relationships within source code effectively while maintaining low computational requirements. The model also provided interpretable predictions by identifying clone types and locating cloned code segments. Conclusions The results demonstrate that combining structural graph information with an SLM provides an efficient approach to code clone detection. The proposed method reduces computational requirements while maintaining competitive detection performance and providing interpretable results. This approach offers a practical solution for code clone detection in software maintenance and related software engineering tasks.