CONCORD: Towards a DSL for Configurable Graph Code Representation

Deep learning is widely used to uncover hidden patterns in large code corpora. To achieve this, constructing a format that captures the relevant characteristics and features of source code is essential. Graph-based representations have gained attention for their ability to model structural and semantic information. However, existing tools lack flexibility in constructing graphs across different programming languages, limiting their use. Additionally, the output of these tools often lacks interoperability and results in excessively large graphs, making graph-based neural networks training slower and less scalable.

We introduce , a domain-specific language to build customizable graph representations. It implements reduction heuristics to reduce graphs' size complexity. We demonstrate its effectiveness in code smell detection as an illustrative use case and show that: first,  can produce code representations automatically per the specified configuration, and second, our heuristics can achieve comparable performance with significantly reduced size.
will help researchers
a) create and experiment with customizable graph-based code representations for different software engineering tasks involving DL,
b) reduce the engineering work to generate graph representations,
c) address the issue of scalability in GNN models, and
d) enhance the reproducibility of experiments in research through a standardized approach to code representation and analysis.

§ INTRODUCTION

In recent years, deep learning ()-based methods for source code analysis have gained significant momentum <cit.>.
Such methods have been applied in various software engineering tasks, such as defect prediction <cit.>, <cit.>, <cit.>, code smell detection <cit.>, <cit.>, <cit.>, code summarization <cit.>, <cit.>,  <cit.>, and program synthesis <cit.>.
Generating code embeddings is a common step in these approaches, where code is converted from its raw textual form to a numeric representation that can be processed and fed to -models <cit.>.

However, treating source code as a stream of tokens ignores its rich structure and semantics <cit.>, <cit.>, <cit.>, <cit.>.
Hence, efforts have been made to incorporate the code's structural and semantic features into its vector representation <cit.>.

To further leverage the power of semantics, researchers are experimenting with graph-based neural network architectures <cit.> that can better capture  different semantic aspects ( control and data flow) of source code.
Often, based on the downstream task,
it is required to combine multiple code representations
such as Abstract Syntax Tree ()
and Program Dependence Graph ()
into a unified graph structure.
For example,
Allamanis  <cit.> augmented  with custom data flow edges and control flow edges
to detect variable misuse in a code snippet.
The process of combining code representations,
pre-processing them,
and training a  model is done manually and from scratch
which wastes significant research time and resources.

Current tools for constructing graph representations of source code face challenges due to different parsers used, resulting in varied s representation and hindering effective combinations. Lack of interoperability arises from generating graphs in different formats (JSON, GraphML), and functionality fragmentation occurs due to unique edge augmentation operations introduced by each tool. Combining these representations or artifacts requires considerable effort, as noted by Siow  <cit.>.

Another significant problem in generating graphs from source code is the high size complexity such structures can attain.
To demonstrate this issue, let us consider a small code snippet and its corresponding :

of Listing <ref>

Despite being only four lines long, this code results in an  containing 19 nodes as shown in Figure <ref>.

An  can only capture the structural aspects of code, which is why it might be required to include other relevant attributes to represent control and data flow.
Therefore, in order to effectively model these properties,
additional structures such as Control Flow Graphs (s) need to be incorporated.
However, this augmentation further aggravates the issue of complexity in terms of graph size.

Graph Neural Networks (s) require large memory and computational resources during training,
which renders them computationally expensive to train and difficult to scale.
This is because s operate on graph data, which is often more complex and larger than other types of data as we have shown in the previous example.
During training, a  must store and manipulate large adjacency matrices representing the graph.
Additionally, these models typically perform multiple rounds of message passing or graph convolution operations adding further to memory requirements.
This entails that computational requirements are directly proportional to the size of the graph and the number of layers in a .
Hence, finding reduction techniques is critical to make the training tractable.

A codebase may contain noisy statements that do not contribute to its core logic. Finding unrelated print statements is natural: often, developers use print statements for debugging and tracing errors. Studies have shown <cit.> that professional software developers rely on print statements such as  as a debugging method. These statements do not relate to the overall semantics because debugging is not the primary goal of the said snippet. We can claim the same about temporary variables. We introduce temporary variables to make source code more readable for others, however, this also comes at a cost by making the program longer.
One might conjecture that the removal of such statements can reduce source code and allow the model to learn better its implicit patterns and salient features to capture its intended behaviour.
Moreover, such modifications to the code while generating its representation highly depend on the downstream task. The existing tools and technologies do not offer any customizable way to generate code representation automatically.

This paper introduces configurable code representation (), a Domain Specific Language () and a unifying framework designed to automate the generation of custom code representations. The  automatically generates code representations from source code and as per the specified configuration. By leveraging  researchers can easily obtain customized code representations for their downstream tasks without the need to handle intricate code representation details.

This streamlined approach not only enhances overall efficiency but also reduces the risk of errors. Experimental results demonstrate that our proposed method achieves improved model performance at a lower computational cost. We applied  to solve the code smell detection task, and managed to maintain up to 100% performance and reduce computations by 10.15%.
We summarize the key contributions of this work below.

* We provide a one-stop solution in the form of a  that unifies multiple edge augmentation techniques from previous works to produce rich and expressive graph representations in a composable, configurable, and cross-linguistic manner.

* We propose and implement two pruning techniques to reduce the size of code graphs to make training more tractable.

* We present a case study to demonstrate the capabilities of  to apply on code smell detection task.

* We show how the proposed pruning techniques can reduce size and computational time for  training while preserving performance.

* We have made the replication package available online <cit.> for other researchers to use and extend the proposed  and framework.

§ BACKGROUND AND RELATED WORK

§.§ Graph Neural Networks

Graph Neural Networks <cit.> operate on graph-structured data, using a message-passing mechanism to learn node and edge representations. The process involves computing messages, aggregating them, and updating node representations iteratively.
They have been used in the context of Software Engineering to solve different tasks, specifically those that focus on source code analysis. Such works include but are not limited to defect prediction <cit.>, <cit.>, <cit.>, <cit.>, clone detection <cit.>, <cit.>, code search <cit.>, <cit.>, <cit.>, and code summarization <cit.>, <cit.>.
The reason behind the prevalence of using such architecture is that source code is often modelled using graphs like in the case of syntax trees, control flow graphs and call graphs. Such structures encompass properties that cannot be reflected if the source code was represented as a flat sequence of tokens.

§.§ Domain Specific Languages

A domain-specific language () is a specialized language that uses concepts and rules of a domain <cit.>.
s are divided into two major categories—external and internal.
External s like css and sql, have their own syntax and parser that interprets the language or translates it into another language.
Internal s are written on top of an existing general-purpose language such as libraries or apis.
The proposed   falls into the first category.
There have been many s proposed in software engineering literature <cit.>.
For example,
Pig Latin <cit.> is a textual  that abstracts the MapReduce implementation.
The  code is translated by the compiler into MapReduce jobs that are executed by the infrastructure provided by Apache Hadoop.

Andrzejak  proposed nldsl <cit.> that is used to create chain and pipeline operations for data processing. Giner-Miguelez  <cit.> presented a  to precisely describe machine learning datasets, aligning with the data-centric cultural shift in the ML community. The  aids in dataset selection and result reproducibility, with a Visual Studio Code plugin for usability. Case studies and experiments validate its expressiveness and potential impact on achieving higher-quality ML models, particularly in terms of fairness, diversity, and bias mitigation.
Morales  <cit.> have proposed a  to model AI engineering processes, tailored for multidisciplinary teams developing AI-embedded software. It provides a structured framework and common ground to address communication issues and promote best practices. Its goal is to facilitate the formalization of AI processes within organizations and seamlessly integrate with existing model-driven tools, advancing the adoption of AI engineering practices.

Overview of CONCORD

§.§ Tools for code graphs construction

Bieber  <cit.> provide an open-source Python library called python_graphs
to construct graph representations of Python programs suitable for training machine learning models by employing static analysis.
The library is capable of constructing control-flow graphs, data-flow graphs, and composite “program graphs” that combine control-flow, data-flow, syntactic, and lexical information about a program.

Rice  <cit.> developed a javac plugin feature-javac that creates feature graphs for Java-based source code repositories.
These graphs incorporate a variety of syntactic and semantic features.
It bears similarities with the python_graphs library and has been designed to facilitate machine learning on source code research.

Limitations of existing work:
The first limitation is that each tool supports one programming language, either Python or Java, thereby limiting their applicability to those languages only.

Second is the lack of composability and configurability. These tools produce representations that include all types of edge augmentations at once. In other words, users cannot specify configurations that specify what augmentations to be included or excluded. Finally, the set of augmentations in these tools is disjoint,  a list of operations is found in one tool but missing in another. This fragmented nature of functionalities makes it difficult to inter-operate the structures yielded by these methods.

§.§ Source code reduction

Zhang  <cit.> introduce an approach referred to as DietCode that leverages large pre-trained models such as CodeBERT <cit.> for source code.
Through an empirical analysis of CodeBERT's attention mechanism,
they discovered that the model attends more to certain types of tokens and statements such as keywords and data-relevant statements.
Based on this finding, they proposed three strategies for simplifying CodeBERT's input program:
word dropout,
frequency filtering,
and an attention-based approach that selects statements and tokens with the highest attention weights.
They tested the efficacy of DietCode on code search and code summarization tasks and found that it performs comparably to CodeBERT while requiring 40% less computational cost during fine-tuning and testing.
Rabin  <cit.> propose sivand,
which employs delta debugging to identify the most critical code segments for a deep learning model.
This technique involves a deep learning model receiving a code snippet as input, which is subsequently segmented.
The neural network model then processes each segment for a downstream task, such as method name prediction.
If a segment achieves a desirable score, it is further divided.
This iterative process continues until the subset's performance fails to meet the targeted score.
Ultimately, the algorithm produces the smallest code snippet that satisfies the model's objective.

Limitations of existing work:
The limitation of these works is that they require multiple rounds of expensive computation. Specifically, sivand requires the execution and evaluation of a deep learning model at each stage of program reduction, which can be inefficient if the data scales upwards. Similarly, at least one forward and backward pass ( fine-tuning) is needed by DietCode to compute the attention scores of each token. This overhead operation is computationally demanding given that the number of parameters ($125$M and $220$M) in the considered Language Models.
As we have discussed, graph neural networks have the capacity to better model source code. However, the current state of tooling that addresses the challenges such models bring is limited. The aim is to propose a new solution in the form of a domain-specific language that enables flexible and configurable graph code modeling to address such limitations.

§ CONCORD DSL DESIGN

is a  and framework that we propose in this paper to construct customized graph representations of source code.
The constructed graph representation can be employed for training  models.
Figure <ref> provides an overview of a generic pipeline
for  model training

using .
To train a  model, a user first generates a graph representation of the source code. They provide a  configuration which is interpreted, and the language's backend generates the concrete samples. These samples can later be used for training and inference.

The language grammar is defined and interpreted using textX <cit.>. A  is typically characterized by a metamodel, which serves as a representation of its domain-specific entities and their interconnections. Figure <ref> illustrates 's metamodel and the relationship between the 's elements.

CONCORD's metamodel excerpt

's grammar is formalized by a Parsing Expression Grammar (PEG) <cit.>. PEG is a formalism used to describe language syntax and facilitate  parsing. Unlike Context-Free Grammar (CFG), PEG ensures deterministic parsing and disallows ambiguity. It employs recursive descent parsing, prioritizes alternatives in order, handles left recursion gracefully, and provides better support for nested structures. In Table <ref> we present the different grammar rules and their body. The full grammar specification can be found in the replication package.[<https://bit.ly/3Kb5u84>]

§.§ DSL key elements

A Representation specifies the intended graph to be constructed;
it is defined by a set of base representations, as well as a set of Tasks.
The base representations are: , , and .
If multiple base representations are specified, they are merged into a single graph.

A Task comprises a set of Operations that are applied to the base graphs.
An Operation represents an atomic action that can be applied to the graph,
and there are two types—node removal and edge addition.

A Code Condition specifies the code structures that are exempt from node removal.
Currently, supported code structures include control statements such as if statements and for loops (rule CodeBlock in Table <ref>).
In other words, nodes ( statements) that are within these blocks will not be removed, if specified.
This feature

provide greater flexibility to the user, where instead of blindly pruning statements through all code regions, they may want to keep some blocks intact depending on their use case.

§.§ Graph generation process

Syntactic validation:
In the syntactic evaluation, textX <cit.> constructs a model from the  configuration file and checks whether it conforms to the grammar rules and the metamodel of the language.

Semantic validation:
We ensure the correctness of representation semantics.
For example,  is syntactically correct, but it is semantically invalid since next_token is an edge addition operation.
The framework warns the user when it detects such issues.

Statement deletion: In this step, we prune the statements specified by the user at the file level.

Base graphs generation:
Once the configuration passes the validation steps and statements are pruned,
we generate the base graph representations by communicating with joern <cit.> (a platform for code analysis that supports C/C++, Java, Javascript, Python and PHP), through its HTTP server.
The generated representations are stored in json format.

Representation construction:
Finally, we import the base graphs and construct the representation using the NetworkX library <cit.>.

The framework generates code representations as per the specification in the configuration file.
We store code representations in json format, which can be parsed by NetworkX, allowing further processing, if needed.

§.§ Node removal

When source code is transformed into graphs,
the resulting structure can be significantly complex in terms of size ( the number of vertices and edges).
To mitigate this issue, one approach is to discard graphs from the dataset that exceed a certain threshold.
For example, Zhou  <cit.> do not consider graphs with more than $500$ nodes.
However, such a strategy can lead to information loss, which may adversely impact the performance of  models.

Gu  <cit.> introduced Simplified Syntax Tree (sst),
which is an approximation that simplifies the  by pruning nodes such as type declarations and modifier keywords.
By using this simplified representation, they were able to improve the performance of neural models in code search tasks using the CodeSearchNet benchmark.
Inspired by this heuristic, we introduce a similar way of simplification in , however, at a wider ( statement-level removal) scale.
The three types of statements that can be removed are simple assignment, print, and system exit statements,
as a means to reduce the complexity of the graph representations
(Step $3$, Figure <ref>).

Simple assignment statements initialize a variable with a literal value, such as an integer, float, double, or boolean value.
Print statements are functions or methods provided by the programming language to output information on console,
such as the  statement in Java. Similarly, exit statements are methods used to transfer control of the program, such as the .
In our approach, we perform statement removal at the file level
we identify the line numbers corresponding to these statements and then perform the removal for each source code file in a repository.
We chose to perform statement removal at the file level rather than removing them after generating the base graphs in order to leverage the data flow engine of the joern tool for generating the .
This is especially relevant when the user specifies more complex base representations, such as  or ,
as it ensures more reliable results by using a well-implemented and maintained engine.

The overall process is illustrated in Figure <ref>, where we first collect the statements specified by the user, and then perform the deletion, taking into consideration the code blocks specified in the specification.

Statement removal process using CONCORD

Algorithm <ref>
presents the procedure for identifying simple assignment statements.
After loading the source code into joern,
we extract the  of each method.
Then, for each tree, we iterate over its nodes and return those that represent simple assignment statements.
A statement is considered a simple assignment statement if it satisfies the following four conditions:

* The node representing the statement is of type .

* Its left subtree of the node have only one node of type .

* The non-leaf nodes of its right subtree represents one of the allowed operators (arithmetic, logical, relational, and bitwise).

* All leaf nodes of its right subtree are literals.

Although it is sufficient to check whether the right subtree is composed of only one node of type ,
we implemented it this way to ensure that even complex statements involving operations between literals, such as ,
are also considered.
Though such type of statements are rarely found in practice,
we did so for the sake of completeness.

When removing simple assignment statements we do not remove the entire source code line,
rather, we replace the statement at that specific line with an empty string.
To explain why we follow such an approach,
let us consider the example given in Listing <ref>.

If we were to remove the entire line, the resulting code would be completely erroneous, as seen in Listing <ref>, with mismatched opening and closing brackets.

However, replacing the statement with an empty string instead preserves the rest of the code that has not matched the condition, which is relevant for the code representation process.

Moreover, joern employs fuzzy parsing <cit.> to handle incomplete source code with errors, but the accuracy of the output depends on the extent of the error in the input. This approach ensures a careful deletion process that retains code fragments without a significant loss of information.

§.§ Edge addition

The next major operation provided by  is edge addition.
Edges generated from base representations,
such as s and s,
capture certain aspects of the source code.

For instance, while s effectively reflect the structure of a code snippet,
they do not capture its control flow.

As an alternative approach,
several studies <cit.> have proposed additional sets of edges that can augment the base representations for various tasks.
In the rest of the sections, we will provide a detailed description of each type of edge that can be added.

§.§.§ NextSibling

Used by Wenhan  <cit.>, this type of edge connects an  node to its sibling node.
The reason for such augmentation is primarily due to the behaviour of gnns that does not consider the order of nodes.
Hence, it is helpful for the neural model to provide the order of children.

§.§.§ NextToken

This edge connects terminal nodes of an  with each other.
Allamanis  <cit.> introduced this edge type in their study; which was also used by Wenhan  <cit.>.
The rationale for introducing the edge is that an  does not reflect the sequential nature of the source code. Let us consider Figure <ref> that represents the syntax tree of this C-like statement

Example of a NextToken edges in an

The figure shows that the NextToken edges in blue reflect,
to an extent,
the sequential property of the code snippet.

§.§.§ LastRead

Let  is to the set of tokens where a variable  could have been last used.
This set can consist of multiple nodes, such as when the variable is used in both paths of a conditional statement, or even tokens that come after in the code, as in the case of loops <cit.>.
The LastRead edges create a connection between these nodes in the set  and .

§.§.§ LastWrite

It is similar to LastRead, except the set  would contain the tokens where  could have been last written to.

§.§.§ LastLexicalUse

It is also similar to both of the aforementioned edges, however, it is flow independent.
In other words, all occurrences of variable  in a source code snippet are chained or linked together by this type of edge.

§.§.§ ComputedFrom

This concerns assignment statements. It connects tokens that are on the right-hand side of an assignment statement to the variable on the left-hand side.
For example, in Figure <ref> both of the literal leaf nodes will be connected to the variable  by this edge.

§.§.§ ReturnsTo

Connects a method declaration node in the  with the node that refers to the method's  statement.

§.§.§ GuardedBy and GuardedByNegation

A GuardedBy edge connects a conditional node to the usage of the variable when

the guard condition is true.
GuardedByNegation performs a similar action but when the conditional is false.
Figure <ref> presents the  of the snippet given below (note that we pruned some parts of it for presentation purposes).

Example of GuardedBy and GuardedByNegation edges in an

The green edge refers to a GuardedBy relation, whereas GuardedByNegation is represented by the blue edge.

§.§.§ WhileCFG and ForCFG

Both of these relations were introduced by Wenhan  <cit.> to model the control flow behaviour of while and for loops.
Concretely, each relation is represented by two edges:  and  for WhileCFG and the same logic for ForCFG.
The  connects the conditional node of the while statement to its block node, whereas  does the inverse.
Again, the same mechanism is implemented for the for-loop blocks.

Through the implementation of all of these operations,  provides a unifying tool bench for code graph constructions to deal with the address the current fragmented nature of tools for building such structures.

§ CASE STUDY: CODE SMELL DETECTION

To demonstrate how  can be used effectively, we conducted a study to prepare code representations to classify code smells.
Code smells are symptoms of sub-optimal design and implementation choices manifested in the form of poorly written code that requires refactoring <cit.>.
Their presence in a given software system hinders its quality,
specifically maintainability <cit.> and reliability <cit.>.

Hence, many efforts have been made to produce tools and methods to detect them <cit.>.
However, an important aspect of code smells is that they are subjective in nature <cit.>.
A code snippet can be smelly in one context, and benign in another.
This means that classifying such anomalies deterministically using rule-based tools may not produce accurate results.
To this end, we conduct a set of experiments where we showcase how the features of  can be put into use in the task of code smell detection.

In this study, we consider four types of code smells that were initially investigated by Sharma  <cit.>: Complex method, Complex conditional, Feature envy, and Multifaceted abstraction.
We formulate the problem as a one-vs-all binary classification problem, meaning that each code smell has its own dataset where each sample can be either categorized as smelly or non-smelly, which is the commonly adopted way in related literature.

§.§ Data preparation

Sharma  <cit.> carried out an empirical study to explore the feasibility to detect code smells using deep learning techniques without feature engineering.
They identified a set of $922$ Java repositories after applying a filtering criteria using RepoRepears' <cit.> eight repository characteristics.
We randomly selected and cloned a set of $100$ projects from the repositories used by Sharma  <cit.>.

To ensure greater reliability,
we selected the snapshot of each project before the replication package by Sharma  <cit.> was published.
Specifically, we checked out the commit prior to January $26$, $2019$, to reduce the possibility of refactoring that could have led to the removal of code smells.

To demonstrate the capabilities of  and evaluate the pruning strategies mentioned in Sections <ref> and <ref>, we define three  configurations: , , and  specified in Table <ref>. In Listing <ref> we show how  is expressed using the  syntax. All of the specification files for these representations can be found in the replication package[<https://bit.ly/3Q9LpTo>].

We select these configurations to capture different aspects of the source code using the .
Specifically, we utilize  as the base representation to capture the structural properties of the code for the three representations.
The NextToken edge is used to model its sequential nature, while the WhileCFG, ForCFG, GuardedBy, and ComputedFrom edges are specified to capture the flow of control and data through the program.

The representations  and  differ from  as they specify a pruning strategy.

After executing  using each of the three configurations,
we generate an initial collection of $\approx$ $1.5M$ methods,
with $\approx$ $500K$ samples for each configuration. We then filter out methods generated by  that did not contain at least one print and a simple assignment statement.
To construct the datasets for each code smell, we randomly select a subset of the methods,
while maintaining the positive to negative ratio mentioned in the work of Sharma  <cit.>.
Finally, we perform an 80:10:10 split corresponding to training, validation, and test using stratified sampling to ensure fair evaluation for each classifier. Table <ref> presents a summary of the training dataset with the class distribution for each dataset at each split.

Table <ref> tabulates the average number of nodes and edges in each dataset after running  using the three mentioned configurations.

One may observe the difference in the number of nodes and edges between the implementation smells (Complex Conditional/Method) and design smells (Multifaceted Abstraction and Feature Envy).
This arises because we represent the graph of a design smell instance ( a class) by combining the graphs of its methods.
Consequently, on average, design smells have a higher number of nodes compared to its implementation counterpart.

During the construction of the datasets, we ensured the presence of a mapping with the aid of the original dataset provided by Sharma  <cit.>. In particular, for each code smell dataset, a CSV file was used to represent the mapping between each code snippet ( method) and its corresponding graph representations generated using , , and .

Furthermore, the CSV file includes additional columns to indicate the type of split (train, validation, or test). This approach was adopted to ensure that the models are trained and evaluated on the same data, thereby ensuring a fair evaluation. In Table <ref> we show a snapshot on how these CSV files are stored.

§.§ Model description

We employ a Gated Graph Neural Network (ggnn)-based <cit.> classifier to solve the code smell classification task.
We select this architecture over other variants such as Graph Convolutional Networks (gcn) <cit.> or Graph Attention Networks (gat) <cit.>,
due to its superior performance demonstrated in other software engineering tasks <cit.> including clone detection, code classification, and vulnerability detection.

Gated Graph Neural Network-based classifier

Figure <ref> illustrates the end-to-end training process of the classifier.
We take the graph yielded by  and generate an initial
node feature matrix $V$ using the pre-trained embedding layer of CodeBERT <cit.>.
Once created, we feed $V$ and the adjacency matrix $E$ to the ggnn layer. In this layer, a Gated Recurrent Unit (gru) <cit.> is created for each vertex in $V$.
The ggnn updates the hidden states of the nodes in an iterative manner, using the following equations:

\begin{eqnarray*}
a_v^t = \sum_{u \in \mathcal{N}(v)} W_{\text{edge}} \cdot h_u^{t-1} \nonumber \\
z_v^t = \text{GRU}_{\text{update}}(a_v^t, h_v^{t-1}) \nonumber \\
h_v^t = (1 - z_v^t) \odot h_v^{t-1} + z_v^t \odot z_v^t \nonumber \\
\end{eqnarray*}

* $a_v^t$ is the sum of edge weights for node $v$ at time step $t$,

* $W_{\text{edge}}$ is a learnable weight matrix for the edges,

* $\mathcal{N}(v)$ represents the neighbourhood of node $v$ in the graph,

* $\text{GRU}_{\text{update}}(\cdot)$ is the update function of the gru,

* $z_v^t$ is the update gate for node $v$ at time step $t$,

* $h_v^t$ is the hidden state of node $v$ at time step $t$, and

* $\odot$ represents element-wise multiplication.

After $t$ time steps, the
hidden representations of all the nodes for all the graphs are updated.
We map the feature matrix $V^{t}$ to a single vector
since we are solving a graph-level classification problem.
We employ a Global Attention Pooling layer <cit.> that computes an attention score for each node in the graph.

Finally, we pass the resulting pooled vector into an mlp layer to perform the final classification.
Table <ref> lists all of the hyper-parameters that were used to train the classifier. Our choice of hyperparameters is inspired by the experiments conducted by Siow  <cit.> and Chakraborty  <cit.>.

Hyper-parameters and values

Hyper-parameter     Value

Learning rate     1e-3

GGNN Layer Input Size     768

GGNN Layer Hidden Size     128

MLP Layer Input Size     128

MLP Output Size     2

Batch size     128

Number of Epochs     100

Patience     15

§.§ Research question

We train a classifier for each code smell-representation combination, giving a total of 12 trained models.
Given it is a classification problem,
we compute  precision ($P$), recall ($R$), and ($F_1$) measure.
The $F_1$ measure metric is considered insufficient for such classification tasks <cit.>;
hence, we also include
Matthews Correlation Coefficient (mcc) metric.
Furthermore, we compute flops (floating operation points) to measure the model's complexity.
The lower the flops value, the lower the complexity, in turn, the lower the processing.

Through the conducted experiments,
we would like to answer the following research question.

RQ. Does reducing the size complexity of code representation affect the performance and the needed computational operations?

Answering this research question will highlight the size reduction achieved by  framework and its effect on
aspects such as computational cost and performance.

§.§ Results

Table <ref> shows the performance of the models trained on datasets generated from the three representation configurations. We report the average over five runs with different initialization.

We obtain the average Precision, Recall, F1 measure and MCC as $0.515$, $0.423$, $0.425$, $0.408$ respectively
when training the models using the  representation.
Although the primary focus of the study is not to showcase the performance of s on code smell detection task,
one possible explanation for obtaining such values could be the extreme class imbalance of each dataset.
Table <ref> shows that the smelly samples accounts for only $\sim4\%$ of the total sample size on average.
Given that we retained the real-life distribution of smelly and benign sample ratio,
this adds robustness to our evaluation. Indeed, experimenting with datasets that do reflect the actual distribution of anomalies can lead to misleading results. Chakraborty  <cit.> showed how state-of-the-art -based models used for vulnerability detection failed to yield the same results when trained and evaluated on representative data, and their performance dropped by more than 50%.

[breakable,width=,boxrule=0pt,top=1pt, bottom=1pt, left=1pt,right=1pt, colback=gray!20,colframe=gray!20]
Key observation 1: Graph Neural Network-based models seem to yield a reasonable performance on data that maintains real-world code smell distribution where the presence of smelly snippets is rare. The results indicate that our proposed approach generates code representation that can effectively capture the desired code features for code analysis tasks.

Models trained on the  representation show on average $0.47$, $0.38$, $0.37$, and $0.357$ in terms of the classification metrics.
The models attain around $88\%$ (in terms of mcc) of the original performance compared to the models that were trained using .
We performed a paired t-test to measure whether such a difference is significant. We defined the null hypothesis as $H_0$: The mean difference is zero ( there is no significant change in MCC after removing simple assignment statements) and the alternative hypothesis as $H_1$: the mean difference is not zero ( there is a significant change in MCC after removing such statements). We found that the p-value = 0.099 $>$ 0.05, hence, we conclude that there is no significant difference in the compared MCCs.
In addition, these models exhibit such performance with lower size complexity ( nodes and edges) graph samples and less computation.
Table <ref> shows that graphs under the  representation have  $11.3\%$ fewer nodes and $12\%$ fewer edges on average.
Consequently, the computational load is reduced by approximately $2.27\times 10\textsuperscript{7}$ flops.

[breakable,width=,boxrule=0pt,top=1pt, bottom=1pt, left=1pt,right=1pt, colback=gray!20,colframe=gray!20]
Key observation 2: The elimination of basic assignment statements have resulted in a decrease in the size and complexity of the samples and the associated computational expenses needed for model training. Nonetheless, the models maintained roughly 88% of their predictive performance, though such a difference is not statistically significant.

Interestingly, upon removing print statements as specified in , the trained models  maintain their performance on par with the models trained using  representation (in terms of ).
The removal of print statements also resulted in an increase of  scores for the Complex Conditional and Feature Envy code smells by $2.2\%$ and $14.9\%$, respectively.
Additionally, the models achieved comparable results for the Complex Method and Multifaceted Abstraction code smells, with  scores of $0.41$ and $0.47$, and $0.23$ and $0.25$, respectively.
Similar to the  representation,
the  graphs are smaller in size,
having $8\%$ fewer nodes and $9\%$ fewer edges compared to .
Therefore, graphs generated from  require less computation, with the reduction of floating point operations by approximately $1.87 \times 10\textsuperscript{7}$ operations.

[breakable,width=,boxrule=0pt,top=1pt, bottom=1pt, left=1pt,right=1pt, colback=gray!20,colframe=gray!20]
Key observation 3: Adopting  statement removal as a pruning technique has enabled the models to retain their predictive performance at a rate of 100%. In addition to maintaining this high-performance rate, the approach has also resulted in reduced graph sample sizes, leading to lower computational costs.

Both strategies  simple assignment removal (in )
and print statement removal (in )
reduce computational costs by decreasing the number of flops performed.
The  representation requires approximately $\times 1.02$ fewer operations than .
However, in terms of performance,  is superior
as illustrated in the results.
It manages to maintain the same level of performance as the models trained on the original data,
whereas  did not fully attain the performance of .
The choice between these strategies depends on a specific goal.
If the objective is to reduce computation,
adopting the simple assignment strategy could be a suitable option,
as it can, to some extent, maintain the original performance.
However, if the goal is to balance both performance and computation, removing print statements might be a better option.
This strategy reduces computation while fully preserving performance.

[breakable,width=,boxrule=0pt,top=1pt, bottom=1pt, left=1pt,right=1pt, colback=gray!20,colframe=gray!20]
Key observation 4: Both pruning strategies have led to a decrease in computational costs given they have reduced the input size of the -based models. However, removing print statements seems to be more a efficient strategy in this context because it succeeded in fully retaining the performance and reducing the complexity of graphs at the same time.

In order to further investigate the impact of removing print statements, we select samples from the test set of the Complex Conditional dataset where the models trained on  and  exhibit disagreement by providing different classifications.
Listing <ref> presents a snippet where such a disagreement occurred.
For presentation purposes,
the code has been simplified,
whereas the full version can be found here[<http://bit.ly/446v0n7>].

The model trained on  classifies the code snippet as smelly, whereas the model trained on  classifies it correctly.
Misclassification can be attributed to the noise that print statements introduce, as they lead the model to learn implicit patterns that potentially hinder the learning of an effective representation.
Analogous to stop words in the Natural Language Processing (NLP) domain, print statements, in this context,
introduce noise and do not help the model to classify correctly.
Moreover, their high frequency increases computational costs.

and framework automates the customized code representation.
Of course, the automation and simplification strategies offered by  must be used according to the requirements of the downstream task. For example, it may be unwise to perform print statement removal if we would like to generate code representation for code search as the downstream task that retrieves snippets that print to the I/O. Continuing with the analogy we drew from NLP, the same can be applied to stop words. For instance, if an NLP system is used for stylistic analysis ( authorship attribution) removing stop words may remove important stylistic markers, such as sentence structure and word choice.

§ THREATS TO VALIDITY

Internal validity
Internal validity threats are related to experiment errors. When we cloned the repositories, we took into account the snapshots that were prior to the publication date of the replication package released by Sharma  <cit.>. This was done to minimize the risk of code smells being refactored. Moreover, we excluded code snippets that did not have simple assignment and print statements to avoid generating misleading results. Furthermore, during the sampling process for the construction of the data set, we ensured the preservation of the same positive-to-negative class ratio to avoid erroneous results as discovered by Chakraborty  <cit.>. Furthermore, to ensure fairness in evaluation, all models were trained and evaluated on the exact same splits.

External validity
This type of threat is related to the generalizability of the method. Although we provided a use case for code smell detection,  can be integrated into many other tasks, such as vulnerability detection or code search. Moreover, it supports multiple programming languages, unlike the aforementioned tools, which makes it flexible and can be used on multi-linguistic datasets and benchmarks.

Construct validity
Construct validity threats are related to measurements and randomness. First, we carefully constructed the , , and  configurations to measure the effect of removing simple assignment and print statements across the code snippets in isolation. Moreover, we set the same random seed across all models during the training and inference phases. Regarding metrics, we used adequate measures to evaluate classifiers and calculate their computational costs as done in similar work <cit.>.

§ CONCLUSIONS, IMPLICATIONS, AND FUTURE WORK

In this study, we propose , a  for graph code representation construction. It is a method to build representations in a configurable and customizable way.

We demonstrate how it can be used in a real example to detect code smells. Our experiments show that it can effectively produce graph representation of source code and reduce computational costs while maintaining up to 100% performance.

Implications for Research: Using this , researchers no longer need to manually implement disparate edge augmentations and modelling configurations, saving time and effort. Moreover, by introducing a unified tooling support, researchers can adopt a standardized approach to code representation and analysis, enhancing the reproducibility of experiments and fostering transparency in research findings. Having a tool like  that unifies the fragmented functionality of graph-based code representations
and allows composition can accelerate research progress in the field. Researchers can quickly experiment with different configurations, facilitating faster iteration and hypothesis testing. The ease of use and automation provided by the tooling support can lead to more efficient exploration of new analysis techniques and advancing the state-of-the-art in software engineering research. We also hope that by open-sourcing our work, the  can be further expanded by the research community to accommodate new emerging ideas.

Implications for Industry: In the industry context,  addresses the challenge of scalability in training s. The reduction heuristics can contribute to the creation of scalable solutions for bug detection, code refactoring, and security analysis in industries. In addition, the reduced engineering overhead of using  facilitates quicker adoption of graph-based source code analysis in real-world software development pipelines, potentially improving code quality and software maintenance practices.

In the future, we will investigate how we can apply  in other tasks in source code analysis, and extend it further to accommodate other modelling techniques that can emerge in the literature. We hope that this  helps the research community explore new frontiers by providing new tooling support.

#1     #1#1#1     #1     #1     #1     #1#1          #1#1

[Allamanis et al(2018a)]
authorpersonMiltiadis Allamanis,
personEarl T. Barr, personPremkumar Devanbu, and
personCharles Sutton. year2018a.
A Survey of Machine Learning for Big Code and
journalACM Comput. Surv. volume51,
number4, Article articleno81 (dateJuly
year2018), numpages37 pages.

[Allamanis et al(2018b)]
authorpersonMiltiadis Allamanis, personMarc
Brockschmidt, and personMahmoud Khademi.
Learning to Represent Programs with Graphs. In
booktitleInternational Conference on Learning

[Alon et al(2019)]
authorpersonUri Alon, personMeital
Zilberstein, personOmer Levy, and personEran
Yahav. year2019.
Code2vec: Learning Distributed Representations of
journalProc. ACM Program. Lang.
volume3, numberPOPL, Article articleno40
(datejan year2019), numpages29 pages.

[Andrzejak et al(2019)]
authorpersonArtur Andrzejak, personKevin
Kiefer, personDiego Elias Costa, and personOliver
Wenz. year2019.
Agile Construction of Data Science DSLs (Tool
Demo). In booktitleProceedings of the 18th ACM SIGPLAN
International Conference on Generative Programming: Concepts and
Experiences (Athens, Greece) (seriesGPCE 2019).
publisherAssociation for Computing Machinery,
addressNew York, NY, USA, pages27–33.

authorpersonAnonymous Authors.
titleReplication package for Concord DSL and framework.

[Bansal et al(2021)]
authorpersonAakash Bansal, personSakib
Haque, and personCollin McMillan.
Project-level encoding for neural source code
summarization of subroutines. In booktitle2021 IEEE/ACM
29th International Conference on Program Comprehension (ICPC). IEEE,

[Bavota et al(2012)]
authorpersonGabriele Bavota, personAbdallah
Qusef, personRocco Oliveto, personAndrea De Lucia,
and personDavid Binkley. year2012.
An empirical analysis of the distribution of unit
test smells and their impact on software maintenance. In
booktitleIEEE International Conference on Software
Maintenance, ICSM. Universita di Salerno, Salerno, Italy,
publisherIEEE, pages56–65.

[Beller et al(2018)]
authorpersonMoritz Beller, personNiels
Spruit, personDiomidis Spinellis, and personAndy
Zaidman. year2018.
On the Dichotomy of Debugging Behavior among
Programmers (seriesICSE '18).

[Bieber et al(2022)]
authorpersonDavid Bieber, personKensen Shi,
personPetros Maniatis, personCharles Sutton,
personVincent J. Hellendoorn, personDaniel D.
Johnson, and personDaniel Tarlow.
A Library for Representing Python Programs as
Graphs for Machine Learning.
journalArXiv  volumeabs/2208.07461

[Buch and Andrzejak(2019)]
authorpersonL. Buch and personA.
Andrzejak. year2019.
Learning-Based Recursive Aggregation of Abstract
Syntax Trees for Code Clone Detection. In booktitle2019
IEEE 26th International Conference on Software Analysis, Evolution and
Reengineering (SANER). publisherIEEE Computer Society,
addressLos Alamitos, CA, USA, pages95–104.

[Chakraborty et al(2022)]
authorpersonS. Chakraborty, personR.
Krishna, personY. Ding, and personB. Ray.
Deep Learning Based Vulnerability Detection: Are We
There Yet?
journalIEEE Transactions on Software Engineering
(datesep year2022).

[Cho et al(2014)]
authorpersonKyunghyun Cho, personBart van
Merriënboer, personCaglar Gulcehre, personDzmitry
Bahdanau, personFethi Bougares, personHolger
Schwenk, and personYoshua Bengio.
Learning Phrase Representations using RNN
Encoder–Decoder for Statistical Machine Translation. In
booktitleProceedings of the 2014 Conference on Empirical
Methods in Natural Language Processing (EMNLP).
publisherAssociation for Computational Linguistics,
addressDoha, Qatar, pages1724–1734.

[Cui et al(2022)]
authorpersonDi Cui, personSiqi Wang,
personYong Luo, personXingyu Li, personJie
Dai, personLu Wang, and personQingshan Li.
RMove: Recommending Move Method Refactoring
Opportunities using Structural and Semantic Representations of Code.
journal2022 IEEE International Conference on
Software Maintenance and Evolution (ICSME) (year2022).

[DeFreez et al(2018)]
authorpersonDaniel DeFreez, personAditya V.
Thakur, and personCindy Rubio-González.
Path-Based Function Embedding and Its Application
to Error-Handling Specification Mining. In
booktitleProceedings of the 2018 26th ACM Joint Meeting on
European Software Engineering Conference and Symposium on the Foundations of
Software Engineering (Lake Buena Vista, FL, USA)
(seriesESEC/FSE 2018). publisherAssociation for
Computing Machinery, addressNew York, NY, USA,

[Dejanović et al(2017)]
authorpersonI. Dejanović, personR.
Vaderna, personG. Milosavljević, and
personŽ. Vuković. year2017.
TextX: A Python tool for Domain-Specific Languages
journalKnowledge-Based Systems
volume115 (year2017), pages1–4.

[Devlin et al(2017)]
authorpersonJacob Devlin, personJonathan
Uesato, personRishabh Singh, and personPushmeet
Kohli. year2017.
Semantic Code Repair using Neuro-Symbolic
Transformation Networks.
journalArXiv  volumeabs/1710.11054

[Feng et al(2020)]
authorpersonZhangyin Feng, personDaya Guo,
personDuyu Tang, personNan Duan,
personXiaocheng Feng, personMing Gong (YIMING),
personLinjun Shou, personBing Qin,
personTing Liu, personDaxin Jiang, and
personMing Zhou. year2020.
CodeBERT: A Pre-Trained Model for Programming and
Natural Languages. In booktitleFindings of EMNLP 2020.

authorpersonBryan Ford.
Parsing Expression Grammars: A Recognition-Based
Syntactic Foundation.
journalSIGPLAN Not. volume39,
number1 (datejan year2004),

authorpersonMartin Fowler.
booktitleRefactoring: Improving the Design of
Existing Programs (edition1 ed.).
publisherAddison-Wesley Professional.

[Fowler and Parsons(2022)]
authorpersonMartin Fowler and
personRebecca Parsons. year2022.
booktitleDomain-specific Languages.

[Giner-Miguelez et al(2023)]
authorpersonJoan Giner-Miguelez, personAbel
Gómez, and personJordi Cabot.
A domain-specific language for describing machine
learning datasets.
journalJournal of Computer Languages
volume76 (year2023), pages101209.

[Grieco et al(2016)]
authorpersonGustavo Grieco,
personGuillermo Luis Grinblat, personLucas Uzal,
personSanjay Rawat, personJosselin Feist, and
personLaurent Mounier. year2016.
Toward Large-Scale Vulnerability Discovery Using
Machine Learning (seriesCODASPY '16).

[Gu et al(2021)]
authorpersonJian Gu, personZimin Chen,
and personMartin Monperrus. year2021.
Multimodal Representation for Neural Code Search.
In booktitle2021 IEEE International Conference on Software
Maintenance and Evolution (ICSME). pages483–494.

[Hadj-Kacem and Bouassida(2018)]
authorpersonMouna Hadj-Kacem and
personNadia Bouassida. year2018.
A Hybrid Approach To Detect Code Smells using Deep
Learning.. In booktitleENASE. pages137–146.

[Hagberg et al(2008)]
authorpersonAric A. Hagberg, personDaniel A.
Schult, and personPieter J. Swart.
Exploring Network Structure, Dynamics, and Function
using NetworkX. In booktitleProceedings of the 7th Python
in Science Conference, editorpersonGaël
Varoquaux, personTravis Vaught, and personJarrod
Millman (Eds.). addressPasadena, CA USA, pages11 –

[Hall et al(2014)]
authorpersonTracy Hall, personMin Zhang,
personDavid Bowes, and personYi Sun.
Some Code Smells Have a Significant but Small
Effect on Faults.
journalACM Transactions on Software Engineering and
Methodology (TOSEM) volume23, number4
(dateSept. year2014), pages33–39.

[Haque et al(2020)]
authorpersonSakib Haque, personAlexander
LeClair, personLingfei Wu, and personCollin
McMillan. year2020.
Improved Automatic Summarization of Subroutines via
Attention to File Context (seriesMSR '20).
publisherAssociation for Computing Machinery.

[Ikama et al(2022)]
authorpersonAurel Ikama, personVincent Du,
personPhilippe Belias, personBiruk Asmare Muse,
personFoutse Khomh, and personMohammad Hamdaqa.
Revisiting the Impact of Anti-patterns on
Fault-Proneness: A Differentiated Replication. In
booktitle2022 IEEE 22nd International Working Conference on
Source Code Analysis and Manipulation (SCAM). pages56–65.

[Iyer et al(2016)]
authorpersonSrinivasan Iyer, personIoannis
Konstas, personAlvin Cheung, and personLuke
Zettlemoyer. year2016.
Summarizing Source Code using a Neural Attention
Model. In booktitleProceedings of the 54th Annual Meeting
of the Association for Computational Linguistics (Volume 1: Long Papers).

[Jaafar et al(2013)]
authorpersonFehmi Jaafar,
personYann-Gaël Guéhéneuc, personSylvie
Hamel, and personFoutse Khomh.
Mining the relationship between anti-patterns
dependencies and fault-proneness. In booktitleProceedings
- Working Conference on Reverse Engineering, WCRE. Ecole Polytechnique de
Montreal, Montreal, Canada, publisherIEEE,

[Kanade et al(2020)]
authorpersonAditya Kanade, personPetros
Maniatis, personGogul Balakrishnan, and
personKensen Shi. year2020.
Learning and Evaluating Contextual Embedding of
Source Code. In booktitleProceedings of the 37th
International Conference on Machine Learning
(seriesICML'20). publisherJMLR.org, Article
articleno474, numpages12 pages.

[Khomh et al(2012)]
authorpersonFoutse Khomh, personMassimiliano
Di Penta, personYann-Gaël Guéhéneuc, and
personGiuliano Antoniol. year2012.
An exploratory study of the impact of antipatterns
on class change- and fault-proneness.
journalEmpirical Software Engineering
volume17, number3 (dateJune
year2012), pages243–275.

[Kim et al(2022)]
authorpersonSehoon Kim, personSheng Shen,
personDavid Thorsley, personAmir Gholami,
personWoosuk Kwon, personJoseph Hassoun, and
personKurt Keutzer. year2022.
Learned Token Pruning for Transformers
(seriesKDD '22).

[Kipf and Welling(2017)]
authorpersonThomas N. Kipf and personMax
Welling. year2017.
Semi-Supervised Classification with Graph
Convolutional Networks. In booktitleInternational
Conference on Learning Representations.

authorpersonRainer Koppler.
A Systematic Approach to Fuzzy Parsing.
journalSoftw. Pract. Exper. volume27,
number6 (datejun year1997),

[LeClair et al(2020)]
authorpersonAlexander LeClair, personSakib
Haque, personLingfei Wu, and personCollin
McMillan. year2020.
booktitleImproved Code Summarization via a Graph
Neural Network.
publisherAssociation for Computing Machinery,
addressNew York, NY, USA, pages184–195.

[Li et al(2022a)]
authorpersonRongfan Li, personBihuan Chen,
personFengyi Zhang, personChao Sun, and
personXin Peng. year2022a.
Detecting Runtime Exceptions by Deep Code
Representation Learning with Attention-Based Graph Neural Networks. In
booktitle2022 IEEE International Conference on Software
Analysis, Evolution and Reengineering (SANER).

[Li et al(2016)]
authorpersonYujia Li, personDaniel Tarlow,
personMarc Brockschmidt, and personRichard S.
Zemel. year2016.
Gated Graph Sequence Neural Networks. In
booktitle4th International Conference on Learning
Representations, ICLR 2016, San Juan, Puerto Rico, May 2-4, 2016,
Conference Track Proceedings, editorpersonYoshua
Bengio and personYann LeCun (Eds.).

[Li et al(2022b)]
authorpersonZhen Li, personDeqing Zou,
personShouhuai Xu, personHai Jin,
personYawei Zhu, and personZhaoxuan Chen.
SySeVR: A Framework for Using Deep Learning to
Detect Software Vulnerabilities.
journalIEEE Transactions on Dependable and Secure
Computing (year2022).

[Liu and Coblenz(2023)]
authorpersonAmanda Liu and personMichael
Coblenz. year2023.
Debugging Techniques in Professional
(date3 year2023).

[Liu et al(2019)]
authorpersonHui Liu, personJiahao Jin,
personZhifeng Xu, personYanzhen Zou,
personYifan Bu, and personLu Zhang.
Deep learning based code smell detection.
journalIEEE transactions on Software Engineering

[Liu et al(2020)]
authorpersonShangqing Liu, personYu Chen,
personXiaofei Xie, personJ. Siow, and
personYang Liu. year2020.
Retrieval-Augmented Generation for Code
Summarization via Hybrid GNN. In booktitleInternational
Conference on Learning Representations.

[Liu et al(2021)]
authorpersonShangqing Liu, personXiaofei
Xie, personL. Ma, personJ. Siow, and
personYang Liu. year2021.
GraphSearchNet: Enhancing GNNs via Capturing Global
Dependencies for Semantic Code Search.
journalIEEE Transactions on Software Engineering

[Liu et al(2023)]
authorpersonZhenguang Liu, personPeng Qian,
personXiaoyang Wang, personYuan Zhuang,
personLin Qiu, and personXun Wang.
Combining Graph Neural Networks With Expert
Knowledge for Smart Contract Vulnerability Detection.
journalIEEE Transactions on Knowledge and Data
Engineering (year2023).

[Mehrotra et al(2021)]
authorpersonNikita Mehrotra, personNavdha
Agarwal, personPiyush Gupta, personSaket Anand,
personDavid Lo, and personRahul Purandare.
Modeling functional similarity in source code with
graph-based siamese networks.
journalIEEE Transactions on Software Engineering

[Morales et al(2022)]
authorpersonSergio Morales, personRobert
Clarisó, and personJordi Cabot.
Towards a DSL for AI Engineering Process
Modeling. In booktitleProduct-Focused Software Process
Improvement, editorpersonDavide Taibi,
personMarco Kuhrmann, personTommi Mikkonen,
personJil Klünder, and personPekka Abrahamsson
(Eds.). publisherSpringer International Publishing,
addressCham, pages53–60.

[Munaiah et al(2017)]
authorpersonNuthan Munaiah, personSteven
Kroh, personCraig Cabrey, and personMeiyappan
Nagappan. year2017.
Curating GitHub for Engineered Software Projects.
journalEmpirical Softw. Engg.

[Nandani et al(2023)]
authorpersonHimesh Nandani, personMootez
Saad, and personTushar Sharma.
DACOS—A Manually Annotated Dataset of Code
Smells. In booktitle2023 IEEE/ACM 20th International
Conference on Mining Software Repositories (MSR).

[Nguyen et al(2016)]
authorpersonTrong Duc Nguyen, personAnh Tuan
Nguyen, and personTien N. Nguyen.
Mapping API Elements for Code Migration with Vector
Representations. In booktitleProceedings of the 38th
International Conference on Software Engineering Companion (Austin, Texas)
(seriesICSE '16). publisherAssociation for
Computing Machinery, addressNew York, NY, USA,

[Olston et al(2008)]
authorpersonChristopher Olston,
personBenjamin C. Reed, personUtkarsh Srivastava,
personRavi Kumar, and personAndrew Tomkins.
Pig latin: a not-so-foreign language for data
processing. In booktitleSIGMOD Conference.

[Perepletchikov and Ryan(2011)]
authorpersonMikhail Perepletchikov and
personCaspar Ryan. year2011.
A controlled experiment for evaluating the impact
of coupling on the maintainability of service-oriented software.
journalIEEE Transactions on Software Engineering
volume37, number4 (dateAug.
year2011), pages449–465.

[Rabin et al(2021)]
authorpersonMd Rafiqul Islam Rabin,
personVincent J. Hellendoorn, and
personMohammad Amin Alipour. year2021.
Understanding Neural Code Intelligence through
Program Simplification (seriesESEC/FSE 2021).
publisherAssociation for Computing Machinery,
addressNew York, NY, USA, pages441–452.

[Rice et al(2018)]
authorpersonAndrew Rice, personHenry
Mercer, personKarthik Chandra, personKarthik
Chandra, and personYijun Yu. year2018.

[Scarselli et al(2009)]
authorpersonFranco Scarselli, personMarco
Gori, personAh Chung Tsoi, personMarkus
Hagenbuchner, and personGabriele Monfardini.
The Graph Neural Network Model.
journalIEEE Transactions on Neural Networks
volume20, number1 (year2009),

[Sharma et al(2021a)]
authorpersonTushar Sharma, personVasiliki
Efstathiou, personPanos Louridas, and
personDiomidis Spinellis. year2021a.
Code smell detection by deep direct-learning and
journalJournal of Systems and Software
volume176 (year2021), pages110936.

[Sharma et al(2021b)]
authorpersonTushar Sharma, personMaria
Kechagia, personStefanos Georgiou, personRohit
Tiwari, personIndira Vats, personHadi Moazen, and
personFederica Sarro. year2021b.
titleA Survey on Machine Learning Techniques for Source
Code Analysis.

[Sharma and Spinellis(2018)]
authorpersonTushar Sharma and
personDiomidis Spinellis. year2018.
A survey on software smells.
journalJournal of Systems and Software
volume138 (year2018), pages158–173.

[Siow et al(2022)]
authorpersonJ. Siow, personShangqing Liu,
personXiaofei Xie, personGuozhu Meng, and
personYang Liu. year2022.
Learning Program Semantics with Code
Representations: An Empirical Study.
journal2022 IEEE International Conference on
Software Analysis, Evolution and Reengineering (SANER)
(year2022), pages554–565.

[Thanhofer-Pilisch et al(2017)]
authorpersonJürgen Thanhofer-Pilisch,
personAlexander Lang, personMichael Vierhauser, and
personRick Rabiser. year2017.
A Systematic Mapping Study on DSL Evolution. In
booktitle2017 43rd Euromicro Conference on Software
Engineering and Advanced Applications (SEAA). pages149–156.

[Veličković et al(2018)]
authorpersonPetar Veličković,
personGuillem Cucurull, personArantxa Casanova,
personAdriana Romero, personPietro Liò, and
personYoshua Bengio. year2018.
Graph Attention Networks. In
booktitleInternational Conference on Learning

[Wan et al(2020)]
authorpersonYao Wan, personJingdong Shu,
personYulei Sui, personGuandong Xu,
personZhou Zhao, personJian Wu, and
personPhilip S. Yu. year2020.
Multi-Modal Attention Network Learning for Semantic
Source Code Retrieval (seriesASE '19).

[Wang et al(2020a)]
authorpersonWenhan Wang, personGe Li,
personBo Ma, personXin Xia, and
personZhi Jin. year2020a.
Detecting Code Clones with Graph Neural Network and
Flow-Augmented Abstract Syntax Tree.
journal2020 IEEE 27th International Conference on
Software Analysis, Evolution and Reengineering (SANER)
(year2020), pages261–271.

[Wang et al(2020b)]
authorpersonWenhan Wang, personGe Li,
personBo Ma, personXin Xia, and
personZhi Jin. year2020b.
Detecting code clones with graph neural network and
flow-augmented abstract syntax tree. In
booktitleProceedings of the 2020 IEEE 27th International
Conference on Software Analysis, Evolution, and Reengineering,
editorpersonKostas Kontogiannis,
personFoutse Khomh, personAlexander Chatzigeorgiou,
personMarios-Eleftherios Fokaefs, and personMinghui
Zhou (Eds.). pages261–271.

[Yamaguchi et al(2014)]
authorpersonFabian Yamaguchi, personNico
Golde, personDaniel Arp, and personKonrad Rieck.
Modeling and Discovering Vulnerabilities with Code
Property Graphs. In booktitle2014 IEEE Symposium on
Security and Privacy. publisherIEEE.

[Yao and Shepperd(2020)]
authorpersonJingxiu Yao and personMartin
Shepperd. year2020.
Assessing Software Defection Prediction
Performance: Why Using the Matthews Correlation Coefficient Matters. In
booktitleProceedings of the Evaluation and Assessment in
Software Engineering (Trondheim, Norway) (seriesEASE
'20). publisherAssociation for Computing Machinery,
addressNew York, NY, USA, pages120–129.

[Zeng et al(2023)]
authorpersonChen Zeng, personYue Yu,
personShanshan Li, personXin Xia,
personZhiming Wang, personMingyang Geng,
personLinxiao Bai, personWei Dong, and
personXiangke Liao. year2023.
DeGraphCS: Embedding Variable-Based Flow Graph for
Neural Code Search.
journalACM Trans. Softw. Eng. Methodol.
(datemar year2023).

[Zhang et al(2019)]
authorpersonJian Zhang, personXu Wang,
personHongyu Zhang, personHailong Sun,
personKaixuan Wang, and personXudong Liu.
A Novel Neural Source Code Representation Based on
Abstract Syntax Tree. In booktitle2019 IEEE/ACM 41st
International Conference on Software Engineering (ICSE).

[Zhang et al(2022)]
authorpersonZhaowei Zhang, personHongyu
Zhang, personBeijun Shen, and personXiaodong Gu.
Diet code is healthy: simplifying programs for
pre-trained models of code.
journalProceedings of the 30th ACM Joint European
Software Engineering Conference and Symposium on the Foundations of Software
Engineering (year2022).

[Zhou et al(2019)]
authorpersonYaqin Zhou, personShangqing
Liu, personJingkai Siow, personXiaoning Du, and
personYang Liu. year2019.
Devign: Effective Vulnerability Identification by
Learning Comprehensive Program Semantics via Graph Neural Networks. In
booktitleAdvances in Neural Information Processing
Systems, editorpersonH. Wallach,
personH. Larochelle, personA. Beygelzimer,
personF. d'Alché-Buc,
personE. Fox, and personR. Garnett (Eds.),
Vol. volume32. publisherCurran Associates, Inc.

[Zou et al(2021)]
authorpersonDeqing Zou, personSujuan Wang,
personShouhuai Xu, personZhen Li, and
personHai Jin. year2021.
$\mu$VulDeePecker: A Deep Learning-Based System for
Multiclass Vulnerability Detection.
journalIEEE Transactions on Dependable and Secure
Computing (year2021).

'Tasks' ''
'Representations' ''
representations+= Representation
name=ID ''
repo_dirs = STRING
output_dir = STRING
base_graph_types+= BaseGraphType
'tasks' ''
name=ID ''
operations+= Operation
'conditions' ''
graph_element=GraphElement operation_type=OperationType graph_element_type=GraphElementType
action=CodeConditionAction code_block=CodeBlock
graph_element=GraphElement property=StructuralConditionProperty spec=StructuralConditionSpec
'['lbound=NUMBER ','ubound=NUMBER ']'
/(.|)*?/ | /.*?$/
\end{minted}
\caption{\concord{}'s textx grammar.}
\label{lst:concord_grammar}
\end{listing}
\end{document}
\endinput
%% End of file `main.tex'.