1 / 19

Stimulating reuse with an automated active code search tool

Stimulating reuse with an automated active code search tool. Júlio Lins – jcsl@cin.ufpe.br André Santos (Advisor) – alms@cin.ufpe.br. Context. Locating and retrieving software components if one of the most important problems of reuse

tyra
Download Presentation

Stimulating reuse with an automated active code search tool

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. 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? 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 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 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 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) Reuse in Software Engineering Group

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

  8. Architecture Eclipse IDE Notifies Agent Searches RepositoryInterface Presenter Presents 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 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 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 = p2 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 Reuse in Software Engineering Group

  13. Repository structure RepositoryInterface Source codecopy Indexed documents Code structure File system Apache Lucene SGBD 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 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 Reuse in Software Engineering Group

  16. DEMO 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 Reuse in Software Engineering Group

  18. Any new ideas? 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. Reuse in Software Engineering Group

More Related