Internet code search is quite popular research area. StackOverflow allows developers to ask and answer questions about code. Previous approach to search code on StackOverflow uses tf-idf method that based on number of occurrences of words to recommend source code. This method has the disadvantage that variable or method identifiers are considered as normal words, even though identifiers are often a combination of two or more words. For example, there is an identifier named "randomString". In that case, if we search using a keyword "random" the system probably will not recommend "randomString" because both words are different. Concept location can tackle this problem. Concept location has been used widely to obtain the correlation between code with a specific concepts or features. Previous research of concept location only focused on source code's comments, and relation among the objects within the source code.This research proposes a mechanism for finding code on StackOverflow uses Latent Dirichlet Allocation (LDA) using concept location in the preprocessing stage. Questions, answers, and code snippets about Java programming are downloaded from StackOverflow to a local repository. Corpuses are generated by extracting questions, answers and code snippets. Inferencing concept location from source code is created using LDA algorithm. Developers query concepts and then system will recommend source code based on the relevant concepts. The result of the experiment shows that the system is able to recommend source code with 48% average of precision and 58% average of recall.
Basis path testing is a method used to identify code defects. The determination of independent paths on basis path testing can be generated by using Genetic Algorithm. However, this method has a weakness. In example, the number of iterations can affect the emersion of basis path. When the iteration is low, it results in the incomplete path occurences. Conversely, if iteration is plentiful resulting to path occurences, after a certain iteration, unfortunately, the result does not change. This study aims to perform the optimization of Genetic Algorithm performance for independent path determination by determining how many iteration levels match the characteristics of the code. The characteristics of the code used include Node, Edge, VG, NBD, and LOC. Moreover, Naïve Bayes is a method used to predict the exact number of iterations based on 17 selected code data into training data, and 16 data into test data. The result of system accuracy test is able to predict the exact iteration of 93.75% from 16 test data. Time-test results show that the new system was able to complete an independent search path being faster 15% than the old system.
<span lang="EN">Basis test paths is a method that uses a graph contains nodes as a representation of codes and the lines as a sequence of code execution steps. Determination of basis test paths can be generated using a Genetic Algorithm, but the drawback was the number of iterations affect the possibility of visibility of the appropriate basis path. When the iteration is less, there is a possibility the paths do not appear all. Conversely, if the iteration is too much, all the paths have appeared in the middle of iteration. This research aims to optimize the performance of Genetic Algorithms for the generation of Basis Test Paths by determining how many iterations level corresponding to the characteristics of the code. Code metrics Node, Edge, VG, NBD, LOC were used as features to determine the number of iterations. J48 classifier was employed as a method to predict the number of iterations. There were 17 methods have selected as a data training, and 16 methods as a data test. The system was able to predict 84.5% of 58 basis paths. Efficiency test results also show that our system was able to seek Basis Paths 35% faster than the old system.</span>
In a basis path testing, there are independent paths that must be passed/tested at least once to make sure there are no errors in the code and ensure all pseudocode have implemented on the code. Previously, the independent path was generated using the Genetic Algorithm, but the number of iterations influenced the likelihood of the emergence of the corresponding the independent path. Besides, the pseudocode was also unable to be used directly since it must be implemented first, this makes finding an independent path longer because it has to implement the code. This research aims to find out how to find the independent path directly from pseudocode using a graph and how
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.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.