An approach to detect similar script functions in web applications based on calling information

Jung Il Kim, Eun Joo Lee

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Cloned code might exacerbate a system maintenance problem, so it is important to remove duplicate code to improve system performance. In web development, script code can often be duplicated as a unit of a script function. Previous research for detecting similar script functions forecasted candidates of similar script functions based on the name of the function and classified the detected candidates into four similarity levels by comparing factors contained within the script functions. There are two key issues that need to be considered to detect similar script functions when using that method. One was that a pair of similar script functions needs to have the same name to be detected. The other was that some modifications particularly such as adding or removing calling statements were not identified after detecting. Adding or removing calling statements might prevent identification for duplicate script function. In this paper, we propose a novel approach to detect similar script functions that can determine the similarity of a script function by evaluating the structural similarity of function code and the calling structure. The evaluation for detecting the structural similarity of code and the calling structure is performed based on a similarity metric, FSIM, which we have defined. We showed the usefulness of FSIM by applying it to three open source projects.

Original languageEnglish
Title of host publicationInformation Technology Applications in Industry
Pages1593-1599
Number of pages7
EditionPART 1
DOIs
StatePublished - 2013
Event2012 International Conference on Information Technology and Management Innovation, ICITMI 2012 - Guangzhou, China
Duration: 10 Nov 201211 Nov 2012

Publication series

NameApplied Mechanics and Materials
NumberPART 1
Volume263-266
ISSN (Print)1660-9336
ISSN (Electronic)1662-7482

Conference

Conference2012 International Conference on Information Technology and Management Innovation, ICITMI 2012
Country/TerritoryChina
CityGuangzhou
Period10/11/1211/11/12

Keywords

  • Code duplication
  • Function clones
  • Refactoring
  • Similarity
  • Software metric
  • Web application

Fingerprint

Dive into the research topics of 'An approach to detect similar script functions in web applications based on calling information'. Together they form a unique fingerprint.

Cite this