Recovering Traceability Links between | a Simple Natural Language Sentence and Source Code | Using Domain Ontologies | Takashi Yoshikawa, Shinpei Hayashi, and Motoshi Saeki

Conclusion: Domain ontologies give us valuable guides for traceability-recovering and feature-location.

Department of Computer Science Tokyo Institute of Technology, Japan

1. Motivation

. .

3. Methodology

JDraw's website (http://jdraw.sf.net/?page=6)

• Need to recover doc-to-code traceability links

J-Domain [JDraw] - Opera http://jdraw.sourceforge.net/index.php?page=6

– for reducing maintenance costs – for easily reusing existing code

• Simple NL sentences as documents – some software products do not contain rich information – e.g., just feature names, agile software development – feature-location approach

The system overview Sentence

Extracting Words

splitting, stemming, extract identifiers removing stop words...

Source Code Domain Ontologies

method invocation analysis

Words in the Sentence Words in the Code (w/ scores)

Call-graph Functional Call-graphs

Traversing call-graph

Inputs

Prioritizing

Outputs Ordered Functional Call-graphs

Source Code

Documents: simple NL sentences

Call-graph traversing (Extracting func. call-graphs) 1. Root selection

2. Problem and Our Solution

2. Traversal

• Problems of two basic criteria for feature-location – Usage of word similarity: leads to false positives (A) / negatives (B) – Usage of method invocations: leads to false positives (C) – Combination of both approaches could not be a solution

Another criterion is needed – representing the characteristics of the product's problem domain NL sentence (a set of words)

Source code (a set of methods and their invocations)

User can draw a plain oval. Ontology canvas

C

draw Oval() The correct fragments

writeLog()

getCanvas()

getColor()

setPixel() draw

void setPixel(...) { ... draw ... }

DrawPanel() oval

color

A

False positives (method invocation)

B

False negatives (word similarity)

getColorPallete() OvalTool()

False positives (word similarity)

• Our solution: using domain ontology – Ontology = binary relationships between concepts – Representing the domain knowledge of the target product family – e.g., the draw function concerns the color concept

– Checking co-occurrence of relationships

Sa

{wa, wb } – Choose the methods having the words of the input sentence – The words become the methods' roles – Traverse method invocations in depthfirst order iff the invocation satisfies one of the traversal rules – Method roles are extracted by the rules

{wa, ...}

m1

role: {wa}

m2 Sb

3. Extracting results

m4

{wb, ...}

m5

role: {wb}

m6

– The traversed set of methods are the candidates of feature-related code

m3

m7

m8

Traversal rules Rule #1 (sentence) getCanvas()

Rule #2 (ontology) drawOval()

Rule #3 (inheritance) getColor()

role: {canvas}

role: {draw, oval}

role: {color}

draw

User can draw a plain oval.

canvas

drawPixel() role: {draw}

getCanvas()

getColorPallete()

role: {canvas}

role: {color}

Prioritizing • Using three criteria: 1. Emphasizing methods having important roles 2. Emphasizing method invocations matching to the relationships in the ontologies and/or the sentence 3. Normalizing the whole score of invocations by the inclusion rate • How many input words the candidate includes?

4. Case Study Experimental Results

• Evaluation target: JDraw 1.1.5 – Having 1,450 methods – Picked up 7 sentences from JDraw's manual on the Web – Prepared an ontology for painting tools (38 concepts, 45 relationships)

• Improved accuracy – (1st and 2nd cases) recalls increase (although precisions a little decrease) – (3rd case) newly detected

• Bad effects, no improvement: future work – (4th case) reason: usage of external modules – (7th case) reason: usage of compound words

with ontology Input sentences

Prec. Recall

1. "plain, filled and gradient filled rectangles" 2. "plain, filled and gradient filled ovals" 3. "image rotation" 4. "image scaling" 5. "save JPEGs of configurable quality" 6. "colour reduction" 7. "grayscaling"

0.83 0.82 1.00 0.22 0.40 0.74 -

0.94 0.98 0.35 0.68 1.00 0.95 -

without ontology F

0.88 0.89 0.52 0.33 0.57 0.83 -

Prec. Recall 1.00 1.00 0.00 1.00 0.67 0.74 -

0.19 0.21 0.00 0.58 1.00 0.95 -

F 0.32 0.35 0.73 0.80 0.83 -

Picked up the results having the highest F-measure from the results ranked in the top 5 F-measure (F) = 2 / (precision-1 + recall-1)

Recovering Traceability Links between a Simple ...

J-Domain [JDraw] - Opera http://jdraw.sourceforge.net/index.php?page=6. Recovering Traceability Links between. | a Simple Natural Language Sentence and ...

2MB Sizes 3 Downloads 144 Views

Recommend Documents

Recovering Traceability Links between a Simple ...
and Source Code. Using Domain Ontologies ... How to precisely get the set? ... Domain. Ontologies. Prioritizing. Sentence-related. Code fragments. Words in the.

The neuroscience of affiliation: Forging links between ...
Mount Sinai School of Medicine, One Gustave L. Levy Place, Box 1230, ... Available online 1 August 2006. Abstract ...... Carter, C.S., Altemus, M., 1997.

Empirical links between achievement goal theory and ...
variables with diþerent degrees of self-determination. .... the same degree of self-determination. The ®rst ...... Morgantown, WV: Fitness Information Technology.

Links between soil microbial communities and ... - Wiley Online Library
Nov 27, 2016 - This is an open access article under the terms of the Creative Commons Attribution License, which permits use, ... ties underpins ecosystem function, succession, and recovery from .... weighted plant trait data from Fridley et al.

Empirical links between achievement goal theory and ...
Journal of Sports Sciences ISSN 0264-0414 print/ISSN 1466-447X online Ó 2001 Taylor .... strive to learn or master sport skills. ..... During administration.

Traceability from global manufacturer's ...
Collaboration. Page 4 of 30. Traceability from global manufacturer's perspective_MikeDethick_RDPAC_Beijing2016.pdf. Traceability from global manufacturer's ...

Cannabis Supply Chain Traceability - GitHub
Companies or organizations using this document are advised to seek professional ...... Cannabis Supply Chain Traceability. Open Cannabis System of. 10. 27 ...

07 - Masiulis - outbreak investigation and traceability RU.pdf ...
07 - Masiulis - outbreak investigation and traceability RU.pdf. 07 - Masiulis - outbreak investigation and traceability RU.pdf. Open. Extract. Open with. Sign In.

PDF Refuge Recovery: A Buddhist Path to Recovering ...
Recovery is a systematic method based on Buddhist principles. which integrates scientific. non-theistic. and psychological insight. Viewing addiction as cravings ...

Recovering from Airline Operational Problems with a ...
problems (identify solutions that can mitigate the problems encountered). ..... probably won't compensate the penalization associated with the exchange). If the.

PDF Cloak of Green: The Links Between Key Environmental Groups, Government, & Big Business Full Books
Cloak of Green: The Links Between Key Environmental Groups, Government, & Big Business Download at => https://pdfkulonline13e1.blogspot.com/1550284509 Cloak of Green: The Links Between Key Environmental Groups, Government, & Big Business pdf down

Recovering American Philosophy
Feb 1, 2014 - is that the way truly to advance American philosophy is to abandon ... philosophy”—which invaded America and declared pragmatism soft.

Dancing Links
The element denoted by x has been deleted from its list; why would anybody want .... corresponding to rank i and file j of the board; each row is conveniently represented by giving the ...... Chinese title, “Dr. Dragon's Intelligence Profit System.

Korea pharmaceuticals serialisation policy & national traceability ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Korea pharmaceuticals serialisation policy & national traceability system_KyongjaLee_KPIS_Beijing2016.pdf. K