This paper considers the realisation of lambda expressions in java 8 on the basis of a global type inference algorithm, which we have introduced in java-TX. We demonstrate that the java 8 approach has indeed some bene...
详细信息
The proliferation of diverse kinds of programminglanguages and platforms makes it a common need to have the same functionality implemented in different languages for different platforms, such as java for Android appl...
详细信息
The proliferation of diverse kinds of programminglanguages and platforms makes it a common need to have the same functionality implemented in different languages for different platforms, such as java for Android applications and C# forWindows phone applications. Although versions of code written in different languages appear syntactically quite different from each other, they are intended to implement the same software and typically contain many code snippets that implement similar functionalities, which we call cross-language clones. When the version of code in one language evolves according to changing functionality requirements and/or bug fixes, its cross-language clones may also need be changed to maintain consistent implementations for the same functionality. Thus, it is needed to have automated ways to locate and track cross-language clones within the evolving software. In the literature, approaches for detecting cross-language clones are only for languages that share a common intermediate language (such as the .NET language family) because they are built on techniques for detecting single-language clones. To extend the capability of cross-language clone detection to more diverse kinds of languages, we propose a novel automated approach, CLCMiner, without the need of an intermediate language. It mines such clones from revision histories, based on our assumption that revisions to different versions of code implemented in different languages may naturally reflect how programmers change cross-language clones in practice, and that similarities among the revisions (referred to as clones in diffs or diff clones) may indicate actual similar code. We have implemented a prototype and applied it to ten open source projects implementations in both java and C#. The reported clones that occur in revision histories are of high precisions (89% on average) and recalls (95% on average). Compared with token-based code clone detection tools that can treat code as plain texts, o
Empirical studies on fault behaviour in evolving complex software systems have shown that communication structures among the software entities such as classes, modules, software units and communications among them, is...
详细信息
Web applications have become the primary source of information and transactions over the internet. The number of statistical research organizations, with focused interests in publishing result data on the web, is incr...
详细信息
More methods and agent-oriented programminglanguages have been introduced based on the javalanguage is based, we show that C++ is an agent-oriented programming carried by the object-oriented approach, to do so, the ...
详细信息
The garbage collector (GC) is a critical component of any managed runtime environment (MRE), such as the java virtual machine. While the main goal of the GC is to simplify and automate memory management, it may have a...
详细信息
The term 'gamification' refers to the use of game elements in non-game environments like education, business, sales and marketing. The method of 'gamifying' has been applied in many different contexts ...
详细信息
The use of formal contracts has long been advocated as an approach to develop programs that are provably correct. However, the reality is that adoption of contracts has been slow in practice. Despite this, the adoptio...
详细信息
ISBN:
(纸本)9783959770354
The use of formal contracts has long been advocated as an approach to develop programs that are provably correct. However, the reality is that adoption of contracts has been slow in practice. Despite this, the adoption of lightweight contracts - typically utilising runtime checking - has progressed. In the case of java, built-in features of the language (e.g. assertions and exceptions) can be used for this. Furthermore, a number of libraries which facilitate contract checking have arisen. In this paper, we catalogue 25 techniques and tools for lightweight contract checking in java, and present the results of an empirical study looking at a dataset extracted from the 200 most popular projects found on Maven Central, constituting roughly 351,034 KLOC. We examine (1) the extent to which contracts are used and (2) what kind of contracts are used. We then investigate how contracts are used to safeguard code, and study problems in the context of two types of substitutability that can be guarded by contracts: (3) unsafe evolution of APIs that may break client programs and (4) violations of Liskov's Substitution Principle (LSP) when methods are overridden. We find that: (1) a wide range of techniques and constructs are used to represent contracts, and often the same program uses different techniques at the same time;(2) overall, contracts are used less than expected, with significant differences between programs;(3) projects that use contracts continue to do so, and expand the use of contracts as they grow and evolve;and, (4) there are cases where the use of contracts points to unsafe subtyping (violations of Liskov Substitution Principle) and unsafe evolution.
Dynamic software updating (DSU) is an extremely useful feature to be used during software evolution. It can be used to reduce down-Time costs, for security enhancements, profiling and testing new functionalities. Ther...
详细信息
java is one of the languages that are popular for high abstraction and automatic memory management. As in other object-oriented languages, java's objects can easily represent a domain model of an application. Whil...
详细信息
暂无评论