5,539 research outputs found

    What Programmers do with Inheritance in Java and C#

    Get PDF
    Inheritance is a widely used concept in modern object oriented software engineering. Previous studies show that inheritance is widely used in practice yet empirical data about how it is used in practice is scarce. An empirical study into this subject has been done by Tempero, Yang and Noble titled “What Programmers do with Inheritance in Java” [1]. This study replicates and extends the study by Tempero et al through inclusion of C# and explanation of the differences and similarities between the languages with respect to practical use of inheritance. It contributes towards the validation and broadening of original conclusions. This study presents a comparative analysis of 169 open source C# and Java systems totalling around 23 million lines of code. Interesting findings are presented on the potential effects of forbidding implicit dynamic binding and inferring types for local variables on the practical use of inheritance amongst C# and Java open-source systems

    Expanding JavaScript\u27s metaobject protocol

    Get PDF

    Experience with statically-generated proxies for facilitating Java runtime specialisation

    Get PDF
    Issues pertaining to mechanisms which can be used to change the behaviour of Java classes at runtime are discussed. The proxy mechanism is compared to, and contrasted with other standard approaches to this problem. Some of the problems the proxy mechanism is subject to are expanded upon. The question of whether statically-developed proxies are a viable alternative to bytecode rewriting was investigated by means of the JavaCloak system, which uses statically-generated proxies to alter the runtime behaviour of externally-developed code. The issues addressed include ensuring the type safety, dealing with the self problem, object encapsulation, and issues of object identity and equality. Some performance figures are provided which demonstrate the load the JavaCloak proxy mechanism places on the system

    A heuristic-based approach to code-smell detection

    Get PDF
    Encapsulation and data hiding are central tenets of the object oriented paradigm. Deciding what data and behaviour to form into a class and where to draw the line between its public and private details can make the difference between a class that is an understandable, flexible and reusable abstraction and one which is not. This decision is a difficult one and may easily result in poor encapsulation which can then have serious implications for a number of system qualities. It is often hard to identify such encapsulation problems within large software systems until they cause a maintenance problem (which is usually too late) and attempting to perform such analysis manually can also be tedious and error prone. Two of the common encapsulation problems that can arise as a consequence of this decomposition process are data classes and god classes. Typically, these two problems occur together – data classes are lacking in functionality that has typically been sucked into an over-complicated and domineering god class. This paper describes the architecture of a tool which automatically detects data and god classes that has been developed as a plug-in for the Eclipse IDE. The technique has been evaluated in a controlled study on two large open source systems which compare the tool results to similar work by Marinescu, who employs a metrics-based approach to detecting such features. The study provides some valuable insights into the strengths and weaknesses of the two approache

    Specifying Reusable Components

    Full text link
    Reusable software components need expressive specifications. This paper outlines a rigorous foundation to model-based contracts, a method to equip classes with strong contracts that support accurate design, implementation, and formal verification of reusable components. Model-based contracts conservatively extend the classic Design by Contract with a notion of model, which underpins the precise definitions of such concepts as abstract equivalence and specification completeness. Experiments applying model-based contracts to libraries of data structures suggest that the method enables accurate specification of practical software
    • 

    corecore