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

Physical Sciences and Mathematics Commons

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

Series

Publications and Research

Automated refactoring

Articles 1 - 6 of 6

Full-Text Articles in Physical Sciences and Mathematics

Safe Automated Refactoring For Intelligent Parallelization Of Java 8 Streams, Raffi T. Khatchadourian, Yiming Tang, Mehdi Bagherzadeh Jan 2020

Safe Automated Refactoring For Intelligent Parallelization Of Java 8 Streams, Raffi T. Khatchadourian, Yiming Tang, Mehdi Bagherzadeh

Publications and Research

Streaming APIs are becoming more pervasive in mainstream Object-Oriented programming languages and platforms. For example, the Stream API introduced in Java 8 allows for functional-like, MapReduce-style operations in processing both finite, e.g., collections, and infinite data structures. However, using this API efficiently involves subtle considerations such as determining when it is best for stream operations to run in parallel, when running operations in parallel can be less efficient, and when it is safe to run in parallel due to possible lambda expression side-effects. ics-preserving fashion. The approach, based on a novel data ordering and typestate analysis, consists of preconditions and …


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 Enumerated Types, Raffi T. Khatchadourian Jan 2016

Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi T. Khatchadourian

Publications and Research

Modern Java languages introduce several new features that offer significant improvements over older Java technology. In this article we consider the new enum construct, which provides language support for enumerated types. Prior to recent Java languages, programmers needed to employ various patterns (e.g., the weak enum pattern) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. We present a novel fully-automated approach for transforming legacy Java code to use the new enumeration construct. This semantics-preserving approach increases type safety, produces code that is …


Enumeration Refactoring: A Tool For Automatically Converting Java Constants To Enumerated Types, Raffi T. Khatchadourian, Benjamin Muskalla Sep 2010

Enumeration Refactoring: A Tool For Automatically Converting Java Constants To Enumerated Types, Raffi T. Khatchadourian, Benjamin Muskalla

Publications and Research

Java 5 introduces several new features that significantly improve older Java technology. We consider the new enum construct, which provides language support for enumerated types. Before Java 5, programmers needed to employ various patterns to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly desirable properties of the enum construct, notably type-safety. We demonstrate an automated refactoring tool called Convert Constants to Enum for transforming legacy Java code to use the new enumeration construct. An interprocedural type inferencing algorithm that tracks the flow of enumerated values drives the approach, and the tool is …


Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi T. Khatchadourian, Jason Sawin, Atanas Rountev Oct 2007

Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi T. Khatchadourian, Jason Sawin, Atanas Rountev

Publications and Research

Modern Java languages introduce several new features that offer significant improvements over older Java technology. In this article we consider the new enum construct, which provides language support for enumerated types. Prior to recent Java languages, programmers needed to employ various patterns (e.g., the weak enum pattern) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. We present a novel fully-automated approach for transforming legacy Java code to use the new enumeration construct. This semantics-preserving approach increases type safety, produces code that is …


Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi T. Khatchadourian, Jason Sawin, Atanas Rountev Apr 2007

Automated Refactoring Of Legacy Java Software To Enumerated Types, Raffi T. Khatchadourian, Jason Sawin, Atanas Rountev

Publications and Research

Modern Java languages introduce several new features that offer significant improvements over older Java technology. In this article we consider the new enum construct, which provides language support for enumerated types. Prior to recent Java languages, programmers needed to employ various patterns (e.g., the weak enum pattern) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. We present a novel fully-automated approach for transforming legacy Java code to use the new enumeration construct. This semantics-preserving approach increases type safety, produces code that is …