scholarly journals Design Patterns Discovery in Source Code: Novel Technique Using Substring Match

TEM Journal ◽  
2021 ◽  
pp. 1166-1174
Author(s):  
Akshara Pande ◽  
Vivekanand Pant ◽  
Manjari Gupta ◽  
Alok Mishra

The role of design pattern mining is a very significant strategy of re-engineering as with the help of detection one could easily understand complex systems. Of course, identifying a design pattern is not always a simple task. Additionally, pattern recovering methods often encounter problems dealing with space outburst for extensive systems. This paper introduces a new way to discover a design pattern based on an Impact Analysis matrix followed by substring match. UML diagrams corresponding to codes are created using Visual Paradigm Enterprise. Impact Analysis matrices of these UML diagrams are converted to string format. Considering system code string as main string and design pattern string as a substring, the main string is further decomposed. A substring match technique is developed here to discover design patterns in the source code. Overall, this procedure has the potential to convert the representation of system design and design pattern in ingenious shapes. In addition, this method has the advantage of moderation in the size. Therefore, this approach is beneficial for Software professionals and researchers due to its simplicity.

e-xacta ◽  
2016 ◽  
Vol 9 (1) ◽  
pp. 37
Author(s):  
Cristiano Martins Monteiro ◽  
Flavianne Braga Campos de Lima ◽  
Carlos Renato Storck

<p>A geração automática de código-fonte é uma prática adotada no desenvolvimento de softwares para agilizar, facilitar e padronizar a implementação dos projetos. Embora seja uma prática comum nas fábricas de software, não se conhece uma ferramenta que permita escolher o padrão de projeto a ser usado. O objetivo principal deste trabalho é apresentar um gerador de códigos para o desenvolvimento de sistemas Web a partir de uma modelagem entidade-relacionamento, uma linguagem de programação e um padrão de projeto determinados pelo usuário. Os objetivos específicos são propor uma arquitetura do sistema capaz de adequar e reaproveitar diferentes padrões de projeto, linguagens de programação e projetos cadastrados; permitir que o usuário cadastre, altere, exclua, importe e exporte um projeto; e gerar automaticamente o seu código-fonte e scripts de banco de dados. Este trabalho se justifica pela importância de reduzir erros de codificação; e evitar perca tempo ao realizar atividades rotineiras de implementação de padrões de projeto. Possibilitando assim, maior dedicação no planejamento das regras de negócios e redução de custos. A ferramenta proposta (GCER) foi desenvolvida em linguagem Java com o uso banco de dados Oracle 11g, e seguindo os padrões DAO e MVC. Os resultados foram avaliados através da geração e compilação de códigos de um projeto para cadastro de veículos. A geração com êxito evidencia a viabilidade da ferramenta proposta para a geração automática de códigos no processo de desenvolvimento de software.</p><p>Abstract</p><p>The automatic generation of source code is a practice adopted in the development of software to streamline, facilitate and standardize the implementation of projects. Although it be a common practice in software factories, it is not known a tool able to choose the design pattern to be used. The main objective of this paper is to present a code generator for the development of Web systems from an entity-relationship modeling, a programming language and a design pattern determined by the user. The specific objectives are to propose a system architecture able to suit and reuse different design patterns, programming languages and saved projects; allow the user to insert, update, delete, import and export a project; and automatically generate the source code and database scripts. This work is justified by the importance to reduce errors of coding; and to avoid waste of time in the development of Web systems performing routine tasks. Allowing, then, a greater dedication in the planning of business rules and the reduction of costs. The tool proposed (GCER) was developed in Java with the database using Oracle 11g, and following the DAO and MVC patterns. The results were evaluated by generating and compiling codes of a project for vehicle registration. The successful code generation demonstrate the feasibility of the proposed tool for the automatic generation of code in the software development process.</p>


Author(s):  
Franca Garzotto ◽  
Symeon Retalis

“A design pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice” (Alexander et al., 1977). In the field of e-learning, design patterns are frequently advocated as a powerful way of providing structured, teacher-friendly, textual representations of learning designs, or of expressing the design rationale underlying learning objects. The purpose of this chapter is to look at e-learning design patterns from a critical perspective. We provide a historical, multidisciplinary excursus of the notion of design patterns. We propose a taxonomy of e-learning design patterns, providing examples in the various categories. Finally, we discuss both the benefits of design patterns for e-learning professionals (particularly, novice ones) and their drawbacks, and investigate how such pros and cons may affect the role of patterns for learning designs.


Author(s):  
Taher Ahmed Ghaleb ◽  
Khalid Aljasser ◽  
Musab A. Alturki

Design patterns are generic solutions to common programming problems. Design patterns represent a typical example of design reuse. However, implementing design patterns can lead to several problems, such as programming overhead and traceability. Existing research introduced several approaches to alleviate the implementation issues of design patterns. Nevertheless, existing approaches pose different implementation restrictions and require programmers to be aware of how design patterns should be implemented. Such approaches make the source code more prone to faults and defects. In addition, existing design pattern implementation approaches limit programmers to apply specific scenarios of design patterns (e.g. class-level), while other approaches require scattering implementation code snippets throughout the program. Such restrictions negatively impact understanding, tracing, or reusing design patterns. In this paper, we propose a novel approach to support the implementation of software design patterns as an extensible Java compiler. Our approach allows developers to use concise, easy-to-use language constructs to apply design patterns in their code. In addition, our approach allows the application of design patterns in different scenarios. We illustrate our approach using three commonly used design patterns, namely Singleton, Observer and Decorator. We show, through illustrative examples, how our design pattern constructs can significantly simplify implementing design patterns in a flexible, reusable and traceable manner. Moreover, our design pattern constructs allow class-level and instance-level implementations of design patterns.


Author(s):  
JING DONG ◽  
YAJING ZHAO ◽  
TU PENG

The quality of a software system highly depends on its architectural design. High quality software systems typically apply expert design experience which has been captured as design patterns. As demonstrated solutions to recurring problems, design patterns help to reuse expert experience in software system design. They have been extensively applied in the industry. Mining the instances of design patterns from the source code of software systems can assist in the understanding of the systems and the process of re-engineering them. More importantly, it also helps to trace back to the original design decisions, which are typically missing in legacy systems. This paper presents a review on current techniques and tools for mining design patterns from source code or design of software systems. We classify different approaches and analyze their results in a comparative study. We also examine the disparity of the discovery results of different approaches and analyze possible reasons with some insight.


2003 ◽  
Vol 11 (4) ◽  
pp. 309-320 ◽  
Author(s):  
Douglas Gregor ◽  
Sibylle Schupp ◽  
David R. Musser

We apply the notion of design patterns to optimizations performed by designers of software libraries, focusing especially on object-oriented numerical libraries. We formalize three design patterns that we have abstracted from many existing libraries and discuss the role of these formalizations as a tool for guiding compiler optimizers. These optimizers operate at a very high level that would otherwise be left unoptimized by traditional optimizers. Finally, we discuss the implementation of a design pattern-based compiler optimizer for C++ abstract data types.


Author(s):  
Matt Gatrell ◽  
Steve Counsell

This paper documents a study of fault proneness in commercial, proprietary software and attempts to determine whether a relationship exists between class faults and the design context of a class, namely the coupling and cohesion of a class, and whether the class is a participant of common design patterns. The authors studied a commercial software system for a 24 month period and identified design pattern participants by inspecting the design documentation and source code; coupling and cohesion metrics were measured by inspecting the source code with a tool; we also extracted fault data for the same period to determine whether a relationship existed between the design context and the fault propensity of a class. Results showed that design pattern participant classes were marginally more fault-prone than non-participant classes, The Adaptor, Method and Singleton patterns were found to be the most fault-prone of thirteen patterns explored. Coupling was found to have a significant relationship with the fault proneness of classes in the system; efferent coupling was a stronger indicator of fault propensity than afferent coupling. Cohesion, when measured using the LCOM(HS) metric, was not found to have a strong relationship with fault proneness.


Author(s):  
Jason Smith ◽  
David Stotts

This chapter introduces the system for pattern query and recognition, a collection of formalisms, definitions, and concepts that provides a means for formally describing Design patterns from the viewpoint of design intent. These descriptions enable efficient and effective searching for instances of Design patterns in source code, for purposes of discovery, documentation, validation, or refactoring. SPQR is composed of ?-calculus, a formal denotation semantics for defining relationships between programmatic entities, elemental Design patterns, a collection of binary relationships that define the basis for software design principles, and isotopes, a flexible approach to combining formal design definitions so that they retain their conceptual integrity. It is our intent that the reader be better equipped to contemplate the hierarchical nature of the concepts of programming, and to come away from this discussion with a clearer view of how software is designed, from the small to the large.


2018 ◽  
Vol 6 (3) ◽  
pp. 36-52
Author(s):  
Mohammed Ghazi Al-Obeidallah ◽  
Miltos Petridis ◽  
Stelios Kapetanakis

Design patterns describe both structure, behavior of classes and their relationships. They can improve software documentation, speed up the development process and enable large-scale reuse of software architectures. This article presents a multiple levels detection approach (MLDA) to recover design pattern instances from Java source code. MLDA is able to recover design pattern instances based on a generated class level representation of a subject system. Specifically, MLDA presents what is the so-called Structural Search Model (SSM) which incrementally builds the structure of each design pattern based on the generated source code model. Moreover, MLDA uses a rule-based approach to match the method signatures of the candidate design instances to that of the subject system. As the experiment results illustrate, MLDA is able to recover 23 design patterns with reasonable detection accuracy.


2012 ◽  
Vol 2 (2) ◽  
pp. 112-116
Author(s):  
Shikha Bhatia ◽  
Mr. Harshpreet Singh

With the mounting demand of web applications, a number of issues allied to its quality have came in existence. In the meadow of web applications, it is very thorny to develop high quality web applications. A design pattern is a general repeatable solution to a generally stirring problem in software design. It should be noted that design pattern is not a finished product that can be directly transformed into source code. Rather design pattern is a depiction or template that describes how to find solution of a problem that can be used in many different situations. Past research has shown that design patterns greatly improved the execution speed of a software application. Design pattern are classified as creational design patterns, structural design pattern, behavioral design pattern, etc. MVC design pattern is very productive for architecting interactive software systems and web applications. This design pattern is partition-independent, because it is expressed in terms of an interactive application running in a single address space. We will design and analyze an algorithm by using MVC approach to improve the performance of web based application. The objective of our study will be to reduce one of the major object oriented features i.e. coupling between model and view segments of web based application. The implementation for the same will be done in by using .NET framework.


Sign in / Sign up

Export Citation Format

Share Document