Embedding Code Contexts for Cryptographic API Suggestion:New Methodologies and Comparisons

03/15/2021
by   Ya Xiao, et al.
0

Despite recent research efforts, the vision of automatic code generation through API recommendation has not been realized. Accuracy and expressiveness challenges of API recommendation needs to be systematically addressed. We present a new neural network-based approach, Multi-HyLSTM for API recommendation –targeting cryptography-related code. Multi-HyLSTM leverages program analysis to guide the API embedding and recommendation. By analyzing the data dependence paths of API methods, we train embedding and specialize a multi-path neural network architecture for API recommendation tasks that accurately predict the next API method call. We address two previously unreported programming language-specific challenges, differentiating functionally similar APIs and capturing low-frequency long-range influences. Our results confirm the effectiveness of our design choices, including program-analysis-guided embedding, multi-path code suggestion architecture, and low-frequency long-range-enhanced sequence learning, with high accuracy on top-1 recommendations. We achieve a top-1 accuracy of 91.41 77.44 compared with the commercial tool Codota, we achieve a top-1 recommendation accuracy of 88.98 64.90 dataset.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/15/2020

Holistic Combination of Structural and Textual Code Information for Context based API Recommendation

Context based API recommendation is an important way to help developers ...
research
04/02/2021

Plot2API: Recommending Graphic API from Plot via Semantic Parsing Guided Neural Network

Plot-based Graphic API recommendation (Plot2API) is an unstudied but mea...
research
12/23/2021

Revisiting, Benchmarking and Exploring API Recommendation: How Far Are We?

Application Programming Interfaces (APIs), which encapsulate the impleme...
research
01/20/2022

APIRO: A Framework for Automated Security Tools API Recommendation

Security Orchestration, Automation, and Response (SOAR) platforms integr...
research
03/29/2021

Embedding API Dependency Graph for Neural Code Generation

The problem of code generation from textual program descriptions has lon...
research
10/26/2022

NeuralSearchX: Serving a Multi-billion-parameter Reranker for Multilingual Metasearch at a Low Cost

The widespread availability of search API's (both free and commercial) b...
research
08/03/2022

API Usage Recommendation via Multi-View Heterogeneous Graph Representation Learning

Developers often need to decide which APIs to use for the functions bein...

Please sign up or login with your details

Forgot password? Click here to reset