2016 · 13 citations · 30 references
ComputingComputer ScienceData MiningProgramming LanguagesSoftware EngineeringAbstract Syntax TreesControl-flow AnalysisData-flow AnalysisStatic Code AnalysisAbsorbing Markov ChainsClone DetectionCode Clone DetectionHorvitz-thompson EstimationProgram Dependence AnalysisProgram Dependence GraphsProgram Dependency Graph AnalysisSubgraph Mining
We present GRAPLE, a method to generate a representative sample of recurring (frequent) subgraphs of any directed labeled graph(s). GRAPLE is based on frequent subgraph mining, absorbing Markov chains, and Horvitz-Thompson estimation. It can be used to sample any kind of graph representation for programs. One of many software engineering applications for finding recurring subgraphs is detecting duplicated code (code clones) from representations such as program dependence graphs (PDGs) and abstract syntax trees. To assess the usefulness of clones detected from PDGs, we conducted a case study on a 73 KLOC commercial Android application developed over 5 years. Nine of the application's developers participated. To our knowledge, it is the first study to have professional developers examine code clones detected from PDGs. We describe a new PDG generation tool jpdg for JVM languages, which was used to generate the dependence graphs used in the study.
30