Encoding version history context for better code representation

With the exponential growth of AI tools that generate source code, understanding software has become crucial. When developers comprehend a program, they may refer to additional contexts to look for information, e.g. program documentation or historical code versions. Therefore, we argue that encoding...

Full description

Saved in:
Bibliographic Details
Main Authors: NGUYEN, Huy, TREUDE, Christoph, THONGTANUNAM, Patanamon
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2024
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/8883
https://ink.library.smu.edu.sg/context/sis_research/article/9886/viewcontent/huy.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-9886
record_format dspace
spelling sg-smu-ink.sis_research-98862024-06-13T08:53:52Z Encoding version history context for better code representation NGUYEN, Huy TREUDE, Christoph THONGTANUNAM, Patanamon With the exponential growth of AI tools that generate source code, understanding software has become crucial. When developers comprehend a program, they may refer to additional contexts to look for information, e.g. program documentation or historical code versions. Therefore, we argue that encoding this additional contextual information could also benefit code representation for deep learning. Recent papers incorporate contextual data (e.g. call hierarchy) into vector representation to address program comprehension problems. This motivates further studies to explore additional contexts, such as version history, to enhance models' understanding of programs. That is, insights from version history enable recognition of patterns in code evolution over time, recurring issues, and the effectiveness of past solutions. Our paper presents preliminary evidence of the potential benefit of encoding contextual information from the version history to predict code clones and perform code classification. We experiment with two representative deep learning models, ASTNN and CodeBERT, to investigate whether combining additional contexts with different aggregations may benefit downstream activities. The experimental result affirms the positive impact of combining version history into source code representation in all scenarios; however, to ensure the technique performs consistently, we need to conduct a holistic investigation on a larger code base using different combinations of contexts, aggregation, and models. Therefore, we propose a research agenda aimed at exploring various aspects of encoding additional context to improve code representation and its optimal utilisation in specific situations. 2024-04-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8883 https://ink.library.smu.edu.sg/context/sis_research/article/9886/viewcontent/huy.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Programming Languages and Compilers Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Programming Languages and Compilers
Software Engineering
spellingShingle Programming Languages and Compilers
Software Engineering
NGUYEN, Huy
TREUDE, Christoph
THONGTANUNAM, Patanamon
Encoding version history context for better code representation
description With the exponential growth of AI tools that generate source code, understanding software has become crucial. When developers comprehend a program, they may refer to additional contexts to look for information, e.g. program documentation or historical code versions. Therefore, we argue that encoding this additional contextual information could also benefit code representation for deep learning. Recent papers incorporate contextual data (e.g. call hierarchy) into vector representation to address program comprehension problems. This motivates further studies to explore additional contexts, such as version history, to enhance models' understanding of programs. That is, insights from version history enable recognition of patterns in code evolution over time, recurring issues, and the effectiveness of past solutions. Our paper presents preliminary evidence of the potential benefit of encoding contextual information from the version history to predict code clones and perform code classification. We experiment with two representative deep learning models, ASTNN and CodeBERT, to investigate whether combining additional contexts with different aggregations may benefit downstream activities. The experimental result affirms the positive impact of combining version history into source code representation in all scenarios; however, to ensure the technique performs consistently, we need to conduct a holistic investigation on a larger code base using different combinations of contexts, aggregation, and models. Therefore, we propose a research agenda aimed at exploring various aspects of encoding additional context to improve code representation and its optimal utilisation in specific situations.
format text
author NGUYEN, Huy
TREUDE, Christoph
THONGTANUNAM, Patanamon
author_facet NGUYEN, Huy
TREUDE, Christoph
THONGTANUNAM, Patanamon
author_sort NGUYEN, Huy
title Encoding version history context for better code representation
title_short Encoding version history context for better code representation
title_full Encoding version history context for better code representation
title_fullStr Encoding version history context for better code representation
title_full_unstemmed Encoding version history context for better code representation
title_sort encoding version history context for better code representation
publisher Institutional Knowledge at Singapore Management University
publishDate 2024
url https://ink.library.smu.edu.sg/sis_research/8883
https://ink.library.smu.edu.sg/context/sis_research/article/9886/viewcontent/huy.pdf
_version_ 1814047608336809984