Although numerous embedding approaches have been proposed for code representation of mobile applications, insufficient attention has been paid to its essential running nature: event-driven. As a result, the contextual semantics of event-driven callbacks re hardly captured. Existing solutions either discard the information of event callbacks such as their sequences, or simply treat event callbacks as ordinary APIs. Both of the solutions deviate from the actual running behavior of the applications and thus suffer from critical information loss of the callback contexts. To address the problem, in this paper, a callback based hierarchical embedding approach Callback2Vec is proposed, in which ordinary APIs and callbacks are distinguished and tackled at different levels in a top-down fashion. As such, the contextual semantics of callbacks can be reasonably represented by the embedding vectors. In particular, a fine-grained callback-sequence-generation algorithm is devised to capture the running behavior of callbacks. To evaluate the representation capability of Callback2Vec, a systematic analysis targeting at the embedding results is conducted, whereby the conventional embedding characteristics are rigorously investigated and new implications are identified. Of significance, the proposed embedding approach has been validated to be capable of providing novel solutions for typical downstream applications, through comprehensive experiments with large scale public datasets
Is data on this page outdated, violates copyrights or anything else? Report the problem now and we will take corresponding actions after reviewing your request.