{'fraction_non_alphanumeric': 0.018633540372670808, 'fraction_numerical': 0.0, 'mean_word_length': 5.602459016393443, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Context Model for Code and API Recommendation Systems based on Programming Onsite Data

Code and application programming interface (API) recommendation systems are important guarantees for efficient and accurate code reuse to improve the efficiency of software development. Context data plays a key role in code and API recommendation. A large amount of programming onsite data has been generated, but existing code and API recommendation systems rarely consider the context based on programming onsite data, which leads to low efficiency and poor accuracy of code and API recommendation. In this paper, we proposed a context model for code and API recommendation systems. Our context model is based on programming onsite data collected during programming. It includes four aspects: developer, project, time, and environment. Developer data is labeled data abstracted from information according to developers' programming habits and abilities, project data is information about the project, time data is information about temporal aspects of developers interacting with the project, and environment data is all environment elements used by developers during programming. Then, we collected programming onsite data in three ways: explicit collection, implicit collection, and reasoning. Lastly, we built the context model using a coarse-grained abstract model for recommendation. Our context model retains the key information in the code while eliminating redundant information that may affect the accuracy of the recommend task, and it can theoretically improve the efficiency and accuracy of recommendation.