409 research outputs found

    A Neural Model for Generating Natural Language Summaries of Program Subroutines

    Full text link
    Source code summarization -- creating natural language descriptions of source code behavior -- is a rapidly-growing research topic with applications to automatic documentation generation, program comprehension, and software maintenance. Traditional techniques relied on heuristics and templates built manually by human experts. Recently, data-driven approaches based on neural machine translation have largely overtaken template-based systems. But nearly all of these techniques rely almost entirely on programs having good internal documentation; without clear identifier names, the models fail to create good summaries. In this paper, we present a neural model that combines words from code with code structure from an AST. Unlike previous approaches, our model processes each data source as a separate input, which allows the model to learn code structure independent of the text in code. This process helps our approach provide coherent summaries in many cases even when zero internal documentation is provided. We evaluate our technique with a dataset we created from 2.1m Java methods. We find improvement over two baseline techniques from SE literature and one from NLP literature

    Understanding Eye Gaze Patterns in Code Comprehension

    Get PDF
    Program comprehension is a sub-field of software engineering that seeks to understand how developers understand programs. Comprehension acts as a starting point for many software engineering tasks such as bug fixing, refactoring, and feature creation. The dissertation presents a series of empirical studies to understand how developers comprehend software in realistic settings. The unique aspect of this work is the use of eye tracking equipment to gather fine-grained detailed information of what developers look at in software artifacts while they perform realistic tasks in an environment familiar to them, namely a context including both the Integrated Development Environment (Eclipse or Visual Studio) and a web browser (Google Chrome). The iTrace eye tracking infrastructure is used for certain eye tracking studies on large code files as it is able to handle page scrolling and context switching. The first study is a classroom-based study on how students actively trained in the classroom understand grouped units of C++ code. Results indicate students made many transitions between lines that were closer together, and were attracted the most to if statements and to a lesser extent assignment code. The second study seeks to understand how developers use Stack Overflow page elements to build summaries of open source project code. Results indicate participants focused more heavily on question and answer text, and the embedded code, more than they did the title, question tags, or votes. The third study presents a larger code summarization study using different information contexts: Stack Overflow, bug repositories and source code. Results show participants tended to visit up to two codebase files in either the combined or isolated codebase session, but visit more bug report pages, and spend longer time on new Stack Overflow pages they visited, when given either these two treatments in isolation. In the combined session, time spent on the one or two codebase files they viewed dominated the session time. Information learned from tracking developers\u27 gaze in these studies can form foundations for developer behavior models, which we hope can later inform recommendations for actions one might take to achieve workflow goals in these settings. Advisor: Bonita Shari

    AN EYE TRACKING REPLICATION STUDY OF A RANDOMIZED CONTROLLED TRIAL ON THE EFFECTS OF EMBEDDED COMPUTER LANGUAGE SWITCHING

    Get PDF
    The use of multiple programming languages (polyglot programming) during software development is common practice in modern software development. However, not much is known about how the use of these different languages affects developer productivity. The study presented in this thesis replicates a randomized controlled trial that investigates the use of multiple languages in the context of database programming tasks. Participants in our study were given coding tasks written in Java and one of three SQL-like embedded languages: plain SQL in strings, Java methods only, a hybrid embedded language that was more similar to Java. In addition to recording the online questionnaire responses and the participants\u27 solutions to the tasks, the participants\u27 eye movements were also recorded using an eye tracker. Eye tracking as a method for software development studies has grown in recent years and allows for finer-grain information about how developers complete programming tasks. Eye tracking data was collected from 31 participants (from both academia and industry) for each of the six programming tasks they completed. Unlike the original study, we were unable to find a significant effect on productivity due to the language used or whether they were a native English speaker. However, we did find the same effect of participant experience on programming productivity which indicates that more experienced programmers are able to complete polyglot programming tasks in a more efficient manner. We also found that all participants looked at the sample code the same percentage of the time for a given task regardless of their experience or language variant they were given. The top level navigation behavior also remained largely unchanged across experience or language variants. We found that professionals performed more transitions in the code between the Java code and method parameters than their novice counterparts. Overall, we found that the level of polyglot programming did not have as significant of an effect as the task itself. The high-level strategy that participants employed appeared similar regardless of language variant they were given. Adviser: Bonita Shari

    Human Computer Interaction Using Eye-tracking Data

    Get PDF
    The eye-tracking device records users’ eye movements in order to better understand users’ information-seeking behavior. One of our research goals was to investigate the search behavior when participants interact with a health-related online database. Another research goal was to explore how participants browse for health information inquiries. The result shows that the health professional participants studied spent more time on our proposed or recommended browsers which are called help mechanism comparing to general participants
    • …
    corecore