Outline Motivation and research aim Overview of Component SPARS-J Search System SPARS-J Outline System architecture Ranking method Each part Tetsuo Yamamoto* ,Makoto Matsushita* * , Analysis part Katsuro Inoue* * Retrieval part User Interface * Japan Science and Technology Agency Experiment * * Osaka University Conclusion and Future work 1 Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 2 Motivation Research aim Reuse of Software Components We have built the system which have functions as is a technique of developing new software components by using the follows components developed in the past. Collects software components eagerly without preserving Example of reusable components: source code, document ….. their inherent structures improves productivity and quality, and cuts down development cost as a result. Manages the component information automatically However, reuse of components is not utilized effectively. Provides component be suitable for User’s request A developer doesn’t know existence of desirable components. Although there are a lot of components, these components are not Targets organized. Intranet closed software development inside a company Internet In order to take advantage of reuse, it is required to manage components and search suitable component easily Large open source software development web site – SourceForge, Jakarta Project. etc. Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 3 Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 4 SPARS-J Outline (Software Product Archive , analysis and Retrieval System for Java) Motivation and research aim Java Software Product Archiving, analyzing and Retrieving System SPARS-J Many components are analyzed automatically. Outline A search engine is built based on the analysis information. System architecture Component: a source code of class or interface Ranking method Features Each part Keyword search Analysis part Two ranking methods Retrieval part Frequency in use of a word User Interface Use relation Experiment Analyzed information Components using/used by a component Conclusion and Future work Package hierarchy Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 5 6
Structure of SPARS-J Ranking search results User Library Ranking method (Java source files) Result Component suited to a user request 1. File Query Ranking based on frequency in use of a word – User interface part Component analysis part ・ Keyword Rank (KR) ・ deliver query to component retrieval extract components from a file ・ part store analyzed information to DB Component used mostly 2. ・ ・ show search results clustering and rank components Ranking based on component use relation – using DB Hit components Query Component Rank (CR) Component retrieval part Analyzed We make it high ranking that the ・ information Component search components in component both 1 and 2 are high information correspondence with query from DB ・ rank components based on Search results are shown to aggregate two Database frequency in use of a keyword ・ ranks store analyzed information and ・ aggregate two rankings component Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 7 Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 8 Outline Component analysis part Motivation and research aim Extract component and its information from a Java source file SPARS-J Outline The process System architecture Extract a component Ranking method Index the component Each part Extract use relations Analysis part Retrieval part Clustering similar components User Interface Rank components based on use relations (CR Experiment method) Conclusion and Future work Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 9 Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 10 Extract use relations Extract and index a component Extracting component public final class Sort { Extract use relations among components / * quicksort * / Find class or interface block using semantic analysis private static void quicksort(…) { in a java source file int pivot; Make component graph from use relations : Location information in the file (start line number, end quicksort(…); Node: component line number) quicksort(…); Inheritance } Edge: use relation Indexing Interface } implementation Extract index key from the Data public class Test extend Data{ word kind component : Variable type Index key : Sort Class name 1 a word and the public static void main(…) { Instance Inheritance : kind of it quicksort Comment 1 creation Field access Sort Sort.quicksort(super.array); No reserved words are quicksort Method name 1 Field access : extracted pivot Variable name 1 Method call } Method call Test Count frequency in use of the quicksort Method call 2 } The kind of use relation word : : : Component graph Index key frequency Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 11 12
Similar component Clustering components Similar component is copied component or minor modified We measure characteristics metrics to merge component components We merge similar components into single component Merged component have use relations that all component The difference ratio of each component before merging have metrics Metrics C C G G C G complexity – The number of methods, cyclomatic, etc. B F B BF F – represent a structural characteristic Token-composition A D E A D E E – The number of appearances of each token AD – represent a surface characteristic Component graph Clustered component graph Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 13 Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 14 Propagating weights Ranking based on use relation Component Rank (CR) 0.34 0.33 0.17 Reusable component have many use relation A B The example of use is much General purpose component 0.17 Sophisticated component We measure use relation quantitatively, and rank 0.33 0.33 components 0.33 The component used by many components is important C The component used by important component is also important Ad-hoc weights are assigned to each node Katsuro Inoue, Reishi Yokomori, Hikaru Fujiwara, Tetsuo Yamamoto, Makoto Matsushita, Shinji Kusumoto: "Component Rank: Relative Significance Rank for Software Component Search" , ICSE, Portland, OR, May 6, 2003. Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 15 Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 16 Propagating weights Propagating weights 0.33 0.17 0.5 0.175 0.175 0.25 A B A B 0.175 0.25 0.5 0.17 0.345 0.175 0.5 0.345 C C We get new node weights The node weights are re-defined by the incoming edge weights Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y Sof t ware Engineering Laborat ory, Depart ment of Comput er Science, Graduat e School of I nf ormat ion Science and Technology, Osaka Universit y 17 18
Recommend
More recommend