文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 计算机软件及应用 > SOURCE CODE RETRIEVAL USING SEQUENCE BASED SIMILARITY
侵权投诉

SOURCE CODE RETRIEVAL USING SEQUENCE BASED SIMILARITY

Figure 1. Outline of our research process

2.2. Extracting Source Code Segments

At the beginning of our approach, a set of Java source codes is partitioned into methods. Then, the code matching statements are extracted for each method. The extracted fragments comprise class method signatures, control statements, and method calls.

(1) Class method signatures

Each method in Java is declared in a class [5]. Our parser extracts class method signatures in the following syntax.

<class identifier>:<method signature>

An anonymous class, which is a local class without a class declaration, is often used when a local class is used only once. An anonymous class is defined and instantiated in a single expression using the new operator to make code concise. Our parser extracts a method declared in an anonymous class in the following syntax.

<class identifier>:<anonymous class identifier>:<method signature>

Arrays and generics are widely used in Java to facilitate the manipulation of data collections. Our parser also extracts arrays and generic data types according to Java syntax. For example, Object[], String[][], List<String>, and List<Integer> are extracted and treated as different data types.

SOURCE CODE RETRIEVAL USING SEQUENCE BASED SIMILARITY

SOURCE CODE RETRIEVAL USING SEQUENCE BASED SIMILARITY

60

上一页第4页

你可能喜欢

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email