Skip to main content
. 2023 Jan 3;23(1):525. doi: 10.3390/s23010525

Table 1.

Component’s Features.

Category/Class Feature Description Query Dependency
Similarity Textual Similarity Candidate code example and query likeness is measured using cosine similarity. Yes
Popularity Frequency Code example method frequent occurrence of a specific in the corpus No
Probability The frequency at which a method calls a code fragment. method
Code Metrics Line length The candidate code length in terms of lines. No
Number of identifiers The average amount of identifiers associated with each LOC of a candidate fragment
Length of call sequence Number of times a candidate code component method is called
Code Comment ratio The number of comments associated with candidates LOC
Page Ranking A metric to compute significance of code snippets
Fan-in The number of times a specific code snippet calls other unique code snippets
Fan-out The number of times a specific code snippet is called by other code fragments
Cyclomatic complexity Occurrences of decisions in a code component (for, while, etc.)
Context Context similarity The Jaccard similarity measure is computed when a query is raised; it calculates the likeness between the method’s body and code example signature Yes