6,346 research outputs found

    A Proposal of Code Completion Problem for Java Programming Learning Assistant System

    Get PDF
    To enhance Java programming educations in schools, we have developed a Web-based Java Programming Learning Assistant System (JPLAS) that provides a variety of programming assignments to cover different learning stages. For the first stage, JPLAS offers the element fill-in-blank problem where students study the grammar and code reading through filling the blank elements, composed of reserved words, identifiers, and control symbols, in a high-quality code. Unfortunately, it has been observed that students can fill the blanks without reading the code carefully, because the choice is limited for each blank. In this paper, we propose a code completion problem as a generalization of the element fill-in-blank problem. To solve the drawback, it does not explicitly show blank locations in the code, which expects students to carefully read the code to understand the grammar and code structure. The correctness of the answer is verified through string matching of each statement with the filled elements and the corresponding correct one. Besides, to encourage students to study readable code writing, the correct statement satisfies the coding rules including the spaces. For evaluations, we generated six code completion and element fill-in-blank problems respectively, and asked ten students in two universities to solve them. Their solution results show that the code completion problem is much harder than the element fill-in-blank problem, and requires far deeper code reading and understanding of coding rules

    A proposal of recommendation function for element fill-in-Blank problems in java programming learning assistant system

    Get PDF
    Purpose To advance Java programming educations, the authors have developed a Web-based Java programming learning assistant system (JPLAS). It offers the element fill-in-blank problem (EFP) for novice students to study Java grammar and basic programming skills by filling in the missing elements in a source code. An EFP instance can be generated by selecting an appropriate code, and applying the blank element selection algorithm. As it is expected to cover broad grammar topics, a number of EFP instances have been generated. This paper aims to propose a recommendation function to guide a student solving the proper EFP instances among them. Design/methodology/approach This function considers the difficulty level of the EFP instance and the grammar topics that have been correctly answered by the student, and is implemented at the offline answering function of JPLAS using JavaScript so that students can use it even without the Internet connections. Findings To evaluate the effectiveness of the proposal, 85 EFP instances are prepared to cover various grammar topics, and are assigned to a total of 92 students in two universities in Myanmar and Indonesia to solve them using the recommendation function. Their solution results confirmed the effectiveness of the proposal. Originality/value The concept of the difficulty level for an EFP instance is newly defined for the proper recommendation, and the accuracy in terms of the average numbers of answer submission times among the students is verified

    A design-aware test code approach for code writing problem in Java programming learning assistant system

    Get PDF
    To advance Java programming educations, we have developed the web-based Java programming learning assistant system (JPLAS) that provides the code writing problem. This problem asks a student to write a source code for a given assignment, where the correctness is verified by running the test code on JUnit. In this paper, we propose a design-aware test code approach for the code writing problem. The design-aware test code tests any important method in the model source code that has the advisable design for the assignment. Thus, by writing a code that can pass it, a student is expected to implement the code with the proper classes/methods in the model code. In evaluations of the proposal, all the students could complete highly qualitative codes for five graph algorithms using the design-aware test codes, where the code quality metrics were measured by metrics plugin for Eclipse

    Stepwise API usage assistance based on N-gram language models

    Get PDF
    Software development requires the use of external Application Programming Interfaces (APIs) in order to reuse libraries and frameworks. Programmers often struggle with unfamiliar APIs due to their lack of resources or less common design. Such difficulties often lead to an incorrect sequences of API calls that may not produce the desired outcome. Language models have shown the ability to capture regularities in text as well as in code. In this work we explore the use of n-gram language models and their ability to capture regularities in API usage through an intrinsic and extrinsic evaluation of these models on some of the most widely used APIs for the Java programming language. To achieve this, several language models were trained over a source code corpora containing several hundreds of GitHub Java projects that use the desired APIs. In order to fully assess the performance of the language models, we have selected APIs from multiple domains and vocabulary sizes. This work allowed us to conclude that n-gram language models are able to capture the API usage patterns due to their low perplexity values and their high overall coverage, going up to 100% in some cases, which encouraged us to create a code completion tool to help programmers stay in the right path when using unknown APIs while allowing for some exploration.O desenvolvimento de software requer a utilização de Application Programming Interfaces (APIs) externas com o objectivo de reutilizar bibliotecas e frameworks. Muitas vezes, os programadores têm dificuldade em utilizar APIs desconhecidas, devido à falta de recursos ou desenho fora do comum. Essas dificuldades provocam inúmeras vezes sequências incorrectas de chamadas às APIs que poderão não produzir o resultado desejado. Os modelos de língua mostraram-se capazes de capturar regularidades em texto, bem como em código. Neste trabalho é explorada a utilização de modelos de língua de n-gramas e a sua capacidade de capturar regularidades na utilização de APIs, através de uma avaliação intrínseca e extrínseca destes modelos em algumas das APIs mais utilizadas na linguagem de programação Java. Para alcançar este objectivo, vários modelos foram treinados sobre repositórios de código do GitHub, contendo centenas de projectos Java que utilizam estas APIs. Com o objectivo de ter uma avaliação completa do desempenho dos modelos de língua, foram seleccionadas APIs de múltiplos domínios e tamanhos de vocabulário. Este trabalho permite concluir que os modelos de língua de n-gramas são capazes de capturar padrões de utilização de APIs devido aos seus baixos valores de perplexidade e a sua alta cobertura, chegando a atingir 100% em alguns casos, o que levou à criação de uma ferramenta de code completion para guiar os programadores na utilização de uma API desconhecida, mas mantendo a possibilidade de a explorar

    A Static Assignment Algorithm of Uniform Jobs to Workers in a User-PC Computing System Using Simultaneous Linear Equations

    Get PDF
    Currently, the User-PC computingsystem (UPC) has been studied as a low-cost and high-performance distributed computing platform. It uses idling resources of personal computers (PCs) in a group. The job-worker assignment for minimizing makespan is critical to determine the performance of the UPC system. Some applications need to execute a lot of uniform jobs that use the identical program but with slightly different data, where they take the similar CPU time on a PC. Then, the total CPU time of a worker is almost linear to the number of assigned jobs. In this paper, we propose a static assignment algorithm of uniform jobs to workers in the UPC system, using simultaneous linear equations to find the lower bound on makespan, where every worker requires the same CPU time to complete the assigned jobs. For the evaluations of the proposal, we consider the uniform jobs in three applications. In OpenPose, the CNN-based keypoint estimation program runs with various images of human bodies. In OpenFOAM, the physics simulation program runs with various parameter sets. In code testing, two open-source programs run with various source codes from students for the Android programming learning assistance system (APLAS). Using the proposal, we assigned the jobs to six workers in the testbed UPC system and measured the CPU time. The results show that makespan was reduced by 10% on average, which confirms the effectiveness of the proposal

    Stepwise API usage assistance using n-gram language models

    Get PDF
    Reusing software involves learning third-party APIs, a process that is often time-consuming and error-prone. Recommendation systems for API usage assistance based on statistical models built from source code corpora are capable of assisting API users through code completion mechanisms in IDEs. A valid sequence of API calls involving different types may be regarded as a well-formed sentence of tokens from the API vocabulary. In this article we describe an approach for recommending subsequent tokens to complete API sentences using n-gram language models built from source code corpora. The provided system was integrated in the code completion facilities of the Eclipse IDE, providing contextualized completion proposals for Java taking into account the nearest lines of code. The approach was evaluated against existing client code of four widely used APIs, revealing that in more than 90% of the cases the expected subsequent token is within the 10-top-most proposals of our models. The high score provides evidence that the recommendations could help on API learning and exploration, namely through the assistance on writing valid API sentences.info:eu-repo/semantics/submittedVersio
    corecore