Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stimulating reuse with an automated active code search tool Júlio Lins – André Santos (Advisor) –

Similar presentations


Presentation on theme: "Stimulating reuse with an automated active code search tool Júlio Lins – André Santos (Advisor) –"— Presentation transcript:

1 Stimulating reuse with an automated active code search tool Júlio Lins – jcsl@cin.ufpe.br André Santos (Advisor) – alms@cin.ufpe.br

2 Reuse in Software Engineering Group 2 Context  Locating and retrieving software components if one of the most important problems of reuse  Large reuse repositories make it difficult to find reusable components  Developers tend to reuse components they wrote or previously known components How to locate and present reusable software components?

3 Reuse in Software Engineering Group 3 Recent techniques for finding software components  Indexing using an uncontrolled vocabulary  Free-text indexing (similar to web search engines)  Indexing using a controlled vocabulary (Facets)  Manual: requires big effort for large repositories  Automatic: indexing tools translate the encountered terms to an equivalent from a set of well defined terms  Signature matching  Formalization of the code structure  May specify semantic with a formal language

4 Reuse in Software Engineering Group 4 Active Component Repository Systems [YE 2001]  Locate reusable software components relevant to the task at hand  Components in repository are actively located when the developer is programming  Uses the information available on the current piece of software being written  Keywords form the documentation: indexed search  Method signature search

5 Reuse in Software Engineering Group 5 Benefits  Presents reusable components that might not be known to the developer  Forces the developer to know that what he/she is doing has probably being already done  Automates the job of doing a search into the repository

6 Reuse in Software Engineering Group 6 Code Searcher  Implements the task-relevant search for the Eclipse platform  It is a plug-in for the Eclipse environment  Detects a creation of a new method or a change in a method signature  Two search methods are used  Keyword search  Signature matching (formal definition is not required)

7 Reuse in Software Engineering Group 7 Keywords: Cadastra uma conta corrente na base de dados inserir conta Method Signature: Conta -> void Scenario

8 Reuse in Software Engineering Group 8 Architecture Agent Notifies Repository Interface Searches Presenter Presents Eclipse IDE

9 Reuse in Software Engineering Group 9 Agent  Uses the information available in the IDE for the current method being created or modified  Combines different types of search to present the most relevant components

10 Reuse in Software Engineering Group 10 Agent plug-in  Listens to changes made to a compilation unit open in a Java editor  The JDT API provides access to  The Java compiler  Source code generator  The refactor  The Eclipse Java parser is very powerful  Provides an object model to the java language elements  Offers an abstract level API

11 Reuse in Software Engineering Group 11 The search algorithm  One keyword search if executed using the words available in the javadoc main description, plus the method name and the name of the each parameter  Several code structure searches may be run  Method signature matching  Methods that handle the same exceptions  Methods that throws the same exceptions  Each result has a priority  For each repeated search result: p = p 2

12 Reuse in Software Engineering Group 12 Repository  A reuse repository is previously populated with source code  Three kinds of code  Reusable components  The current system code  Code from previews systems, that may be not read for reuse  The idea is to find similar code and then let the developer decide how the reuse will happen for each case

13 Reuse in Software Engineering Group 13 Repository structure Repository Interface Source code copy Indexed documents File systemApache Lucene Code structure SGBD

14 Reuse in Software Engineering Group 14 Technologies used  Apache Lucene  Open source free-text indexing tool  Provides a built-in java source code indexer  IBM Cloudscape  Java embedded relational database  Supports the same SQL as the DB2  The system may be migrated to a centralized DB2 server  The SGBD technology was chosen due to memory use constraints  Approximately 26MB of memory is needed for the Java 1.4 source  An XML structure requires 72MB

15 Reuse in Software Engineering Group 15 Presenter  An Eclipse View that may be optionally showed  When open, activates the Agent  Presents the search results ordered by relevance  File name, project, date  Allows the developer to double-click a result  Opens the file in the Java edtior

16 Reuse in Software Engineering Group 16 DEMO

17 Reuse in Software Engineering Group 17 Planned new functionalities  Change the passive search to a scrap book page where code can be written  The idea is to locate similar code  Allow access to the javadoc of the reusable component  Include a simple faceted classification  Operating system, platform  Allow the configuration of synonymous for possible keywords  Allows the developer to filter the results

18 Reuse in Software Engineering Group 18 Any new ideas?

19 Reuse in Software Engineering Group 19 References  Y. Ye (2001) Supporting Component-Based Software Development with Active Component Repository Systems, Ph.D. Dissertation, Department of Computer Science, University of Colorao at Boulder.


Download ppt "Stimulating reuse with an automated active code search tool Júlio Lins – André Santos (Advisor) –"

Similar presentations


Ads by Google