Open Access. Powered by Scholars. Published by Universities.®

Physical Sciences and Mathematics Commons

Open Access. Powered by Scholars. Published by Universities.®

Computer Sciences

PDF

Series

Java

Institution
Publication Year
Publication

Articles 1 - 30 of 71

Full-Text Articles in Physical Sciences and Mathematics

Chatgpt, Can You Generate Solutions For My Coding Exercises? An Evaluation On Its Effectiveness In An Undergraduate Java Programming Course, Eng Lieh Ouh, Benjamin Gan, Kyong Jin Shim, Swavek Wlodkowski Jul 2023

Chatgpt, Can You Generate Solutions For My Coding Exercises? An Evaluation On Its Effectiveness In An Undergraduate Java Programming Course, Eng Lieh Ouh, Benjamin Gan, Kyong Jin Shim, Swavek Wlodkowski

Research Collection School Of Computing and Information Systems

In this study, we assess the efficacy of employing the ChatGPT language model to generate solutions for coding exercises within an undergraduate Java programming course. ChatGPT, a large-scale, deep learning-driven natural language processing model, is capable of producing programming code based on textual input. Our evaluation involves analyzing ChatGPT-generated solutions for 80 diverse programming exercises and comparing them to the correct solutions. Our findings indicate that ChatGPT accurately generates Java programming solutions, which are characterized by high readability and well-structured organization. Additionally, the model can produce alternative, memory-efficient solutions. However, as a natural language processing model, ChatGPT struggles with coding …


Source Code Plagiarism Detection Using Jplag & Stack Overflow Data, Sudheer Yetthapu May 2023

Source Code Plagiarism Detection Using Jplag & Stack Overflow Data, Sudheer Yetthapu

Masters Theses & Specialist Projects

Advancements in computer technology and internet services have led to the availability of vast amounts of information like videos, articles, research papers, and code samples. Free online information will increase the possibility of plagiarism and collusion among students. People can commit plagiarism in both text and code [1], as tools used to detect plagiarism between texts and between codes are distinct. Traditionally plagiarism in code is detected using manual inspection, which is a tedious process and misses to compare code from previous submissions and external sources. To overcome this issue, systems that can automatically detect plagiarism in code were developed …


Review Java Basics In 2 Weeks (Slides), Shoshana Marcus Jan 2023

Review Java Basics In 2 Weeks (Slides), Shoshana Marcus

Open Educational Resources

No abstract provided.


Cp6200 Javaprogramming2 Oer - Oop Assignment - Item And Shopping Cart Classes, Shoshana Marcus Jan 2023

Cp6200 Javaprogramming2 Oer - Oop Assignment - Item And Shopping Cart Classes, Shoshana Marcus

Open Educational Resources

No abstract provided.


Cp 6200 Java Programming 2 Syllabus (Oer), Shoshana Marcus Jan 2023

Cp 6200 Java Programming 2 Syllabus (Oer), Shoshana Marcus

Open Educational Resources

No abstract provided.


Cp6200 Javaprogramming2 Oer - Oop Course Project, Shoshana Marcus Jan 2023

Cp6200 Javaprogramming2 Oer - Oop Course Project, Shoshana Marcus

Open Educational Resources

No abstract provided.


College Teaching And Ai, Leo Irakliotis Dec 2022

College Teaching And Ai, Leo Irakliotis

Computer Science: Faculty Publications and Other Works

Artificial Intelligence will reshape the way we assess student learning in ways that no one has prepared us for.


Automatic Solution Summarization For Crash Bugs, Haoye Wang, Xin Xia, David Lo, John C. Grundy, Xinyu Wang May 2021

Automatic Solution Summarization For Crash Bugs, Haoye Wang, Xin Xia, David Lo, John C. Grundy, Xinyu Wang

Research Collection School Of Computing and Information Systems

The causes of software crashes can be hidden anywhere in the source code and development environment. When encountering software crashes, recurring bugs that are discussed on Q&A sites could provide developers with solutions to their crashing problems. However, it is difficult for developers to accurately search for relevant content on search engines, and developers have to spend a lot of manual effort to find the right solution from the returned results. In this paper, we present CRASOLVER, an approach that takes into account both the structural information of crash traces and the knowledge of crash-causing bugs to automatically summarize solutions …


Coding Overhead Of Mobile Apps, Yoonsik Cheon Oct 2020

Coding Overhead Of Mobile Apps, Yoonsik Cheon

Departmental Technical Reports (CS)

A mobile app runs on small devices such as smartphones and tablets. Perhaps, because of this, there is a common misconception that writing a mobile app is simpler than a desktop application. In this paper, we show that this is indeed a misconception, and it's the other way around. We perform a small experiment to measure the source code sizes of a desktop application and an equivalent mobile app written in the same language. We found that the mobile version is 19% bigger than the desktop version in terms of the source lines of code, and the mobile code is …


Evote – The Revolution Of Vote, Tianming Zhu Apr 2020

Evote – The Revolution Of Vote, Tianming Zhu

Other Student Works

This report focuses on independently developed applications that are primarily used to support group or group solutions. The tools used to develop this application include Android development tools, and Google Firebase development tools are also involved in the development process.


Smartcitecon: Implicit Citation Context Extraction From Academic Literature Using Unsupervised Learning, Chenrui Gao, Haoran Cui, Li Zhang, Jiamin Wang, Wei Lu, Jian Wu Jan 2020

Smartcitecon: Implicit Citation Context Extraction From Academic Literature Using Unsupervised Learning, Chenrui Gao, Haoran Cui, Li Zhang, Jiamin Wang, Wei Lu, Jian Wu

Computer Science Faculty Publications

We introduce SmartCiteCon (SCC), a Java API for extracting both explicit and implicit citation context from academic literature in English. The tool is built on a Support Vector Machine (SVM) model trained on a set of 7,058 manually annotated citation context sentences, curated from 34,000 papers in the ACL Anthology. The model with 19 features achieves F1=85.6%. SCC supports PDF, XML, and JSON files out-of-box, provided that they are conformed to certain schemas. The API supports single document processing and batch processing in parallel. It takes about 12–45 seconds on average depending on the format to process a …


Semantic Patches For Java Program Transformation (Artifact), Hong Jin Kang, Thung Ferdian, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo Jul 2019

Semantic Patches For Java Program Transformation (Artifact), Hong Jin Kang, Thung Ferdian, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo

Research Collection School Of Computing and Information Systems

The program transformation tool Coccinelle is designed for making changes that is required in many locations within a software project. It has been shown to be useful for C code and has been been adopted for use in the Linux kernel by many developers. Over 6000 commits mentioning the use of Coccinelle have been made in the Linux kernel. Our artifact, Coccinelle4J, is an extension to Coccinelle in order for it to apply program transformations to Java source code. This artifact accompanies our experience report “Semantic Patches for Java Program Transformation”, in which we show a case study of applying …


Semantic Patches For Java Program Transformation, Hong Jin Kang, Ferdian Thung, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo Jul 2019

Semantic Patches For Java Program Transformation, Hong Jin Kang, Ferdian Thung, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo

Research Collection School Of Computing and Information Systems

Developing software often requires code changes that are widespread and applied to multiple locations.There are tools for Java that allow developers to specify patterns for program matching and source-to-source transformation. However, to our knowledge, none allows for transforming code based on its control-flow context. We prototype Coccinelle4J, an extension to Coccinelle, which is a program transformation tool designed for widespread changes in C code, in order to work on Java source code. We adapt Coccinelle to be able to apply scripts written in the Semantic Patch Language (SmPL), a language provided by Coccinelle, to Java source files. As a case …


Code Reuse Between Java And Android Applications, Yoonsik Cheon, Carlos V. Chavez, Ubaldo Castro May 2019

Code Reuse Between Java And Android Applications, Yoonsik Cheon, Carlos V. Chavez, Ubaldo Castro

Departmental Technical Reports (CS)

Java and Android applications can be written in the same programming language. Thus, it is natural to ask how much code can be shared between them. In this paper, we perform a case study to measure quantitatively the amount of code that can be shared and reused for a multiplatform application running on the Java platform and the Android platform. We first configure a development environment consisting of platform-specific tools and supporting continuous integration. We then propose a general architecture for a multiplatform application under a guiding design principle of having clearly defined interfaces and employing loose coupling to accommodate …


Multiplatform Application Development For Android And Java, Yoonsik Cheon Apr 2019

Multiplatform Application Development For Android And Java, Yoonsik Cheon

Departmental Technical Reports (CS)

Software developers of today are under increasing pressure to support multiple platforms, in particular mobile platforms. However, developing a multiplatform application is difficult and challenging due to a variety of platform differences. We propose a native approach for developing a multiplatform application running on two similar but different platforms, Java and Android. We address practical software engineering concerns attributed to native multiplatform application development, from configuration of tools to software design and development process. Our approach allows one to share 37%~40% of application code between the two platforms as well as improving the quality of the application. We believe our …


Proactive Empirical Assessment Of New Language Feature Adoption Via Automated Refactoring: The Case Of Java 8 Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara Apr 2018

Proactive Empirical Assessment Of New Language Feature Adoption Via Automated Refactoring: The Case Of Java 8 Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Programming languages and platforms improve over time, sometimes resulting in new language features that offer many benefits. However, despite these benefits, developers may not always be willing to adopt them in their projects for various reasons. In this paper, we describe an empirical study where we assess the adoption of a particular new language feature. Studying how developers use (or do not use) new language features is important in programming language research and engineering because it gives designers insight into the usability of the language to create meaning programs in that language. This knowledge, in turn, can drive future innovations …


Proactive Empirical Assessment Of New Language Feature Adoption Via Automated Refactoring: The Case Of Java 8 Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara Apr 2018

Proactive Empirical Assessment Of New Language Feature Adoption Via Automated Refactoring: The Case Of Java 8 Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Programming languages and platforms improve over time, sometimes resulting in new language features that offer many benefits. However, despite these benefits, developers may not always be willing to adopt them in their projects for various reasons. In this paper, we describe an empirical study where we assess the adoption of a particular new language feature. Studying how developers use (or do not use) new language features is important in programming language research and engineering because it gives designers insight into the usability of the language to create meaning programs in that language. This knowledge, in turn, can drive future innovations …


Project Emerald: Designing A Language To Be Fun, Addison Bostian Apr 2018

Project Emerald: Designing A Language To Be Fun, Addison Bostian

Scholars Day

For a computer language to be fun, it needs to be flexible, powerful, and easy to use. Emerald is a compromise between all of these features.


Defaultification Refactoring: A Tool For Automatically Converting Java Methods To Default, Raffi T. Khatchadourian, Hidehiko Masuhara Oct 2017

Defaultification Refactoring: A Tool For Automatically Converting Java Methods To Default, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Enabling interfaces to declare (instance) method implementations, Java 8 default methods can be used as a substitute for the ubiquitous skeletal implementation software design pattern. Performing this transformation on legacy software manually, though, may be non-trivial. The refactoring requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods. All of this is necessary to preserve type-correctness and confirm semantics preservation. We demonstrate an automated refactoring tool called Migrate Skeletal Implementation to Interface for transforming legacy Java code to use the new default construct. The …


Understanding Stack Overflow Code Fragments, Christoph Treude, Martin P. Robillard Sep 2017

Understanding Stack Overflow Code Fragments, Christoph Treude, Martin P. Robillard

Research Collection School Of Computing and Information Systems

Code fragments posted in answers on Q&A forums can form an important source of developer knowledge. However, effective reuse of code fragments found online often requires information other than the code fragment alone. We report on the results of a survey-based study to investigate to what extent developers perceive Stack Overflow code fragments to be self-explanatory. As part of the study, we also investigated the types of information missing from fragments that were not self-explanatory. We find that less than half of the Stack Overflow code fragments in our sample are considered to be self-explanatory by the 321 participants who …


Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara May 2017

Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods as it requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods to preserve type-correctness and confirm semantics preservation. In this paper, we present an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software. The approach features an extensive …


Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara May 2017

Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Java 8 introduces enhanced interfaces, allowing for default (instance) methods that implementers will inherit if none are provided [3]. Default methods can be used [2] as a replacement of the skeletal implementation pattern [1], which creates abstract skeletal implementation classes that implementers extend. Migrating legacy code using the skeletal implementation pattern to instead use default methods can require significant manual effort due to subtle language and semantic restrictions. It requires preserving typecorrectness by analyzing complex type hierarchies, resolving issues arising from multiple inheritance, reconciling differences between class and interface methods, and ensuring tie-breakers with overriding class methods do not alter …


Empirical Study Of Usage And Performance Of Java Collections, Diego Costa, Artur Andrzejak, Janos Seboek, David Lo Apr 2017

Empirical Study Of Usage And Performance Of Java Collections, Diego Costa, Artur Andrzejak, Janos Seboek, David Lo

Research Collection School Of Computing and Information Systems

Collection data structures have a major impact on the performance of applications, especially in languages such as Java, C#, or C++. This requires a developer to select an appropriate collection from a large set of possibilities, including different abstractions (e.g. list, map, set, queue), and multiple implementations. In Java, the default implementation of collections is provided by the standard Java Collection Framework (JCF). However, there exist a large variety of less known third-party collection libraries which can provide substantial performance benefits with minimal code changes.


Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara Jan 2017

Automated Refactoring Of Legacy Java Software To Default Methods, Raffi T. Khatchadourian, Hidehiko Masuhara

Publications and Research

Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods as it requires analyzing complex type hierarchies, resolving multiple implementation inheritance issues, reconciling differences between class and interface methods, and analyzing tie-breakers (dispatch precedence) with overriding class methods to preserve type-correctness and confirm semantics preservation. In this paper, we present an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software. The approach features an extensive …


Writing Jml Specifications Using Java 8 Streams, Yoonsik Cheon, Zejing Cao, Khandoker Rahad Nov 2016

Writing Jml Specifications Using Java 8 Streams, Yoonsik Cheon, Zejing Cao, Khandoker Rahad

Departmental Technical Reports (CS)

JML is a formal behavioral interface specification language for Java to document Java program modules such as classes and interfaces. When composing JML specifications, one frequently writes assertions involving a collection of values. In this paper we propose to use Java 8 streams for writing more concise and cleaner assertions on a collection. The use of streams in JML can be minimal and non-invasive in the conventional style of writing assertions. It can also be holistic to write all assertions in the abstract state defined by streams. We perform a small case study to illustrate our approach and show its …


"Automated Debugging Considered Harmful" Considered Harmful: A User Study Revisiting The Usefulness Of Spectra-Based Fault Localization Techniques With Professionals Using Real Bugs From Large Systems, Xin Xia, Lingfeng Bao, David Lo, Shanping Li Oct 2016

"Automated Debugging Considered Harmful" Considered Harmful: A User Study Revisiting The Usefulness Of Spectra-Based Fault Localization Techniques With Professionals Using Real Bugs From Large Systems, Xin Xia, Lingfeng Bao, David Lo, Shanping Li

Research Collection School Of Computing and Information Systems

Due to the complexity of software systems, bugs are inevitable. Software debugging is tedious and time consuming. To help developers perform this crucial task, a number of spectra-based fault localization techniques have been proposed. In general, spectra-based fault localization helps developers to find the location of a bug given its symptoms (e.g., program failures). A previous study by Parnin and Orso however implies that several assumptions made by existing work on spectra-based fault localization do not hold in practice, which hinders the practical usage of these tools. Moreover, a recent study by Xie et al. claims that spectra-based fault localization …


Mining Revision Histories To Detect Cross-Language Clones Without Intermediates, Lingxiao Jiang, Zhiming Peng, Lingxiao Jiang, Hao Zhong, Haibo Yu, Jianjun Zhao Sep 2016

Mining Revision Histories To Detect Cross-Language Clones Without Intermediates, Lingxiao Jiang, Zhiming Peng, Lingxiao Jiang, Hao Zhong, Haibo Yu, Jianjun Zhao

Research Collection School Of Computing and Information Systems

To attract more users on different platforms, many projects release their versions in multiple programming languages (e.g., Java and C#). They typically have many code snippets that implement similar functionalities, i.e., cross-language clones. Programmers often need to track and modify cross-language clones consistently to maintain similar functionalities across different language implementations. In literature, researchers have proposed approaches to detect cross-language clones, mostly for languages that share a common intermediate language (such as the .NET language family) so that techniques for detecting single-language clones can be applied. As a result, those approaches cannot detect cross-language clones for many projects that are …


Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi T. Khatchadourian, Olivia Moore, Hidehiko Masuhara Mar 2016

Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi T. Khatchadourian, Olivia Moore, Hidehiko Masuhara

Publications and Research

The skeletal implementation pattern is a software design pattern that defines an abstract class that provides a partial interface implementation. However, since Java allows only single class inheritance, if implementers decide to extend a skeletal implementation, they will not be allowed to extend any other class. Also, discovering the skeletal implementation may require a global analysis. Java 8 enhanced interfaces alleviate these problems by enabling interfaces to contain (default) method implementations, which implementers inherit. Java classes are then free to extend a different class, and a separate abstract class is no longer needed; developers considering implementing an interface need only …


A Large Scale Study Of Multiple Programming Languages And Code Quality, Pavneet Singh Kochhar, Withthige Dinusha Ruchira Wijedasa, David Lo Mar 2016

A Large Scale Study Of Multiple Programming Languages And Code Quality, Pavneet Singh Kochhar, Withthige Dinusha Ruchira Wijedasa, David Lo

Research Collection School Of Computing and Information Systems

Nowadays, most software use multiple programming languages to implement certain functionalities based on the strengths and weaknesses of different languages. Researchers in the past have studied the impact of independent programming languages on software quality, however, there has been little or no research on the impact of multiple languages on the quality of software. Does the use of multiple languages cause more bugs? Are certain languages when used with other languages make software more bug prone? What are the relationships between multi-language usage and various bug categories? In this study, we perform a large scale empirical investigation to shed light …


Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi T. Khatchadourian, Olivia Moore, Hidehiko Masuhara Mar 2016

Towards Improving Interface Modularity In Legacy Java Software Through Automated Refactoring, Raffi T. Khatchadourian, Olivia Moore, Hidehiko Masuhara

Publications and Research

The skeletal implementation pattern is a software design pattern consisting of defining an abstract class that provides a partial interface implementation. However, since Java allows only single class inheritance, if implementers decide to extend a skeletal implementation, they will not be allowed to extend any other class. Also, discovering the skeletal implementation may require a global analysis. Java 8 enhanced interfaces alleviate these problems by allowing interfaces to contain (default) method implementations, which implementers inherit. Java classes are then free to extend a different class, and a separate abstract class is no longer needed; developers considering implementing an interface need …