201 research outputs found

    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

    A Systematic Aspect-Oriented Refactoring and Testing Strategy, and its Application to JHotDraw

    Full text link
    Aspect oriented programming aims at achieving better modularization for a system's crosscutting concerns in order to improve its key quality attributes, such as evolvability and reusability. Consequently, the adoption of aspect-oriented techniques in existing (legacy) software systems is of interest to remediate software aging. The refactoring of existing systems to employ aspect-orientation will be considerably eased by a systematic approach that will ensure a safe and consistent migration. In this paper, we propose a refactoring and testing strategy that supports such an approach and consider issues of behavior conservation and (incremental) integration of the aspect-oriented solution with the original system. The strategy is applied to the JHotDraw open source project and illustrated on a group of selected concerns. Finally, we abstract from the case study and present a number of generic refactorings which contribute to an incremental aspect-oriented refactoring process and associate particular types of crosscutting concerns to the model and features of the employed aspect language. The contributions of this paper are both in the area of supporting migration towards aspect-oriented solutions and supporting the development of aspect languages that are better suited for such migrations.Comment: 25 page

    Quantitative assessment of modularity of caesarJ components

    Get PDF
    Dissertação apresentada no âmbito do Mestrado em Engenharia Informática para obtenção do grau de Mestre em Engenharia InformáticaOs defensores do paradigma de programação orientada a aspectos afirmam que este paradigma oferece melhor modularidade que a programação orientada a objectos, assim como um melhor suporte para separação de facetas transversais. Embora o AspectJ seja a linguagem de AOP mais conhecida, e alvo de mais estudos, surgiram novas linguagens de programação que propõem diferentes formas de instanciar este paradigma. O CaesarJ é uma destas linguagens. Possui abstracções e mecanismos que o diferenciam do AspectJ, tais como classes virtuais, polimorfismo de família e uma maneira diferente de representar um aspecto. Qualquer alegação de uma linguagem ser melhor, à luz de um critério bem definido (neste caso, a modularidade), tem que ser apoiada por avaliações rigorosas de implementações feitas nessa linguagem. Este trabalho pretende fazer isso com um estudo comparativo entre as duas linguagens em termos da modularidade que se obtém em software por elas implementado. Em particular, vai-se estudar uma faceta da modularidade: a coesão. Este estudo utiliza da estrutura padrão de relatórios experimentais em Engenharia de Software, assim como todos os testes estatísticos apropriados. Para este fim, foi desenvolvida uma métrica de coesão que foi usada, juntamente com várias métricas de tamanho para avaliar 51 exemplos de implementações de padrões de concepção. No contexto desta dissertação a ferramenta de recolha automática de métricas MuLATo foi adaptada para suportar esta nova métrica de coesão. Os resultados do estudo efectuado sugerem que o CaesarJ é mais verboso que Java mas contem componentes menos complexos e mais coesos

    Analysis of support for modularity in object teams based on design patterns

    Get PDF
    Dissertação de Mestrado em Engenharia InformáticaThe paradigm of Aspect-Oriented Programming is currently being studied and matured. Many aspectoriented languages have been proposed, including Object Teams for Java (OT/J). However, to date few studies were carried out to assess the contribution of the various languages available and compare their relative advantages and disadvantages. The aim of this dissertation is to contribute to fill this gap. In the past, implementations of design patterns in Java and AspectJ were successfully used as case studies to derive conclusions on the relative advantages and disadvantages of the language under consideration. This dissertation follows this approach, with the development of a suitable collection of examples based on the well-known Gang-of-Four design patterns. Two repositories of implementations in OT/J of the complete collection of 23 Gang-of-Four design patterns have been developed, to be used as a basis for subsequent analysis. The scenarios used for the examples are based on Java repositories by independent authors, freely available on the Web. Based on the repositories developed, an analysis of the modularizations obtained with OT/J is presented and compared with the results obtained using Java and AspectJ. OT/J provides direct language support for 3 of the patterns. 20 patterns yielded separate modules for the patterns, of which 10 modules proved to be reusable. Only in 1 of the patterns, no significant differences between Java and OT/J were obtained

    Workload characterization of JVM languages

    Get PDF
    Being developed with a single language in mind, namely Java, the Java Virtual Machine (JVM) nowadays is targeted by numerous programming languages. Automatic memory management, Just-In-Time (JIT) compilation, and adaptive optimizations provided by the JVM make it an attractive target for different language implementations. Even though being targeted by so many languages, the JVM has been tuned with respect to characteristics of Java programs only -- different heuristics for the garbage collector or compiler optimizations are focused more on Java programs. In this dissertation, we aim at contributing to the understanding of the workloads imposed on the JVM by both dynamically-typed and statically-typed JVM languages. We introduce a new set of dynamic metrics and an easy-to-use toolchain for collecting the latter. We apply our toolchain to applications written in six JVM languages -- Java, Scala, Clojure, Jython, JRuby, and JavaScript. We identify differences and commonalities between the examined languages and discuss their implications. Moreover, we have a close look at one of the most efficient compiler optimizations - method inlining. We present the decision tree of the HotSpot JVM's JIT compiler and analyze how well the JVM performs in inlining the workloads written in different JVM languages

    1st Workshop on Refactoring Tools (WRT'07) : Proceedings

    Get PDF

    Recursion Aware Modeling and Discovery For Hierarchical Software Event Log Analysis (Extended)

    Get PDF
    This extended paper presents 1) a novel hierarchy and recursion extension to the process tree model; and 2) the first, recursion aware process model discovery technique that leverages hierarchical information in event logs, typically available for software systems. This technique allows us to analyze the operational processes of software systems under real-life conditions at multiple levels of granularity. The work can be positioned in-between reverse engineering and process mining. An implementation of the proposed approach is available as a ProM plugin. Experimental results based on real-life (software) event logs demonstrate the feasibility and usefulness of the approach and show the huge potential to speed up discovery by exploiting the available hierarchy.Comment: Extended version (14 pages total) of the paper Recursion Aware Modeling and Discovery For Hierarchical Software Event Log Analysis. This Technical Report version includes the guarantee proofs for the proposed discovery algorithm

    A systematic aspect-oriented refactoring and testing strategy, and its application to JHotDraw.

    Get PDF
    Aspect oriented programming aims at achieving better modularization for a system's crosscutting concerns in order to improve its key quality attributes, such as evolvability and reusability. Consequently, the adoption of aspect-oriented techniques in existing (legacy) software systems is of interest to remediate software aging. The refactoring of existing systems to employ aspect-orientation will be considerably eased by a systematic approach that will ensure a safe and consistent migration. In this paper, we propose a refactoring and testing strategy that supports such an approach and consider issues of behavior conservation and (incremental) integration of the aspect-oriented solution with the original system. The strategy is applied to the JHotDraw open source project and illustrated on a group of selected concerns. Finally, we abstract from the case study and present a number of generic refactorings which contribute to an incremental aspect-oriented refactoring process and associate particular types of crosscutting concerns to the model and features of the employed aspect language. The contributions of this paper are both in the area of supporting migration towards aspect-oriented solutions and supporting the development of aspect languages that are better suited for such migration

    Metrics for Aspect Mining Visualization

    Get PDF
    Aspect oriented programming has over the last decade become the subject of intense research within the domain of software engineering. Aspect mining, which is concerned with identification of cross cutting concerns in legacy software, is an important part of this domain. Aspect refactoring takes the identified cross cutting concerns and converts these into new software constructs called aspects. Software that have been transformed using this process becomes more modularized and easier to comprehend and maintain. The first attempts at mining for aspects were dominated by manual searching and parsing through source code using simple tools. More sophisticated techniques have since emerged including evaluation of execution traces, code clone detection, program slicing, dynamic analysis, and use of various clustering techniques. The focus of most studies has been to maximize aspect mining performance measured by various metrics including those of aspect mining precision and recall. Other metrics have been developed and used to compare the various aspect mining techniques with each other. Aspect mining automation and presentation of aspect mining results has received less attention. Automation of aspect mining and presentation of results conducive to aspect refactoring is important if this research is going to be helpful to software developers. This research showed that aspect mining can be automated. A tool was developed which performed automated aspect mining and visualization of identified cross cutting concerns. This research took a different approach to aspect mining than most aspect mining research by recognizing that many different categories of cross cutting concerns exist and by taking this into account in the mining process. Many different aspect mining techniques have been developed over time, some of which are complementary. This study was different than most aspect mining research in that multiple complementary aspect mining algorithms was used in the aspect mining and visualization process
    corecore