“…First, if two API parameters have the same position but different keyword names, we add a rename_parameter operation into the DSL (lines 11-14). Second, if two API parameters have the same name, but one is a positional parameter in the deprecated API signature and the other is a keyword parameter in the updated API signature, we add a positi-onal_to_keyword_parameter operation (lines [15][16][17][18]. Then, we check whether there are any remaining API parameters in deprecated and the updated API signatures.…”
Section: Transformation Inferencementioning
confidence: 99%
“…Brito et al [16] proposed a recommendation tool that helps to find deprecated API alternatives by mining solutions adopted by developers. Sawant et al [17], [18] found that most developers do not update their API usages due to the cost. Xavier et al [19] found that the frequency of API deprecations increases over time and more popular systems have a higher frequency of deprecations.…”
Due to the rise of AI applications, machine learning (ML) libraries, often written in Python, have become far more accessible. ML libraries tend to be updated periodically, which may deprecate existing APIs, making it necessary for application developers to update their usages. In this paper, we build a tool to automate deprecated API usage updates. We first present an empirical study to better understand how updates of deprecated ML API usages in Python can be done. The study involves a dataset of 112 deprecated APIs from Scikit-Learn, TensorFlow, and PyTorch. Guided by the findings of our empirical study, we propose MLCatchUp, a tool to automate the updates of Python deprecated API usages, that automatically infers the API migration transformation through comparison of the deprecated and updated API signatures. These transformations are expressed in a Domain Specific Language (DSL). We evaluate MLCatchUp using a dataset containing 267 files with 551 API usages that we collected from public GitHub repositories. In our dataset, MLCatchUp can detect deprecated API usages with perfect accuracy, and update them correctly for 80.6% of the cases. We further improve the accuracy of MLCatchUp in performing updates by adding a feature that allows it to accept an additional user input that specifies the transformation constraints in the DSL for context-dependent API migration. Using this addition, MLCatchUp can make correct updates for 90.7% of the cases.
“…First, if two API parameters have the same position but different keyword names, we add a rename_parameter operation into the DSL (lines 11-14). Second, if two API parameters have the same name, but one is a positional parameter in the deprecated API signature and the other is a keyword parameter in the updated API signature, we add a positi-onal_to_keyword_parameter operation (lines [15][16][17][18]. Then, we check whether there are any remaining API parameters in deprecated and the updated API signatures.…”
Section: Transformation Inferencementioning
confidence: 99%
“…Brito et al [16] proposed a recommendation tool that helps to find deprecated API alternatives by mining solutions adopted by developers. Sawant et al [17], [18] found that most developers do not update their API usages due to the cost. Xavier et al [19] found that the frequency of API deprecations increases over time and more popular systems have a higher frequency of deprecations.…”
Due to the rise of AI applications, machine learning (ML) libraries, often written in Python, have become far more accessible. ML libraries tend to be updated periodically, which may deprecate existing APIs, making it necessary for application developers to update their usages. In this paper, we build a tool to automate deprecated API usage updates. We first present an empirical study to better understand how updates of deprecated ML API usages in Python can be done. The study involves a dataset of 112 deprecated APIs from Scikit-Learn, TensorFlow, and PyTorch. Guided by the findings of our empirical study, we propose MLCatchUp, a tool to automate the updates of Python deprecated API usages, that automatically infers the API migration transformation through comparison of the deprecated and updated API signatures. These transformations are expressed in a Domain Specific Language (DSL). We evaluate MLCatchUp using a dataset containing 267 files with 551 API usages that we collected from public GitHub repositories. In our dataset, MLCatchUp can detect deprecated API usages with perfect accuracy, and update them correctly for 80.6% of the cases. We further improve the accuracy of MLCatchUp in performing updates by adding a feature that allows it to accept an additional user input that specifies the transformation constraints in the DSL for context-dependent API migration. Using this addition, MLCatchUp can make correct updates for 90.7% of the cases.
“…By analysing the Javadoc messages, source code, issue tracker and commit histories, Sawant et al have observed 12 reasons that may trigger API producers to deprecate a feature (Sawant et al 2018b). Furthermore, towards understanding developers' needs on API deprecation, the authors have conducted semi-structured interviews and surveys with Java producers and developers.…”
Because of functionality evolution, or security and performance-related changes, some APIs eventually become unnecessary in a software system and thus need to be cleaned to ensure proper maintainability. Those APIs are typically marked first as deprecated APIs and, as recommended, follow through a deprecated-replace-remove cycle, giving an opportunity to client application developers to smoothly adapt their code in next updates. Such a mechanism is adopted in the Android framework development where thousands of reusable APIs are made available to Android app developers. In this work, we present a research-based prototype tool called CDA and apply it to different revisions (i.e., releases or tags) of the Android framework code for characterising deprecated APIs. Based on the data mined by CDA, we then perform an empirical study on API deprecation in the Android ecosystem and the associated challenges for maintaining quality apps. In particular, we investigate the prevalence of deprecated APIs, their annotations and documentation, their removal and
“…This study was replicated on the Java ecosystem and similar results were reported [27], [28], except that the number of deprecated API replacements was higher in the Smalltalk ecosystem. Sawant et al [26] created a taxonomy containing 12 reasons for deprecation and developed an approach to automatically classify them. Li et al [17] performed an exploratory study on characterizing Android APIs.…”
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.