How Do Programmers Express High-Level Concepts using Primitive Data Types?

03/18/2022
by   Yusuke Shinyama, et al.
0

We investigated how programmers express high-level concepts such as path names and coordinates using primitive data types. While relying too much on primitive data types is sometimes criticized as a bad smell, it is still a common practice among programmers. We propose a novel way to accurately identify expressions for certain predefined concepts by examining API calls. We defined twelve conceptual types used in the Java Standard API. We then obtained expressions for each conceptual type from 26 open source projects. Based on the expressions obtained, we trained a decision tree-based classifier. It achieved 83 expression. Our result indicates that it is possible to infer a conceptual type from a source code reasonably well once enough examples are given. The obtained classifier can be used for potential bug detection, test case generation and documentation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/06/2019

Analyzing Code Comments to Boost Program Comprehension

We are trying to find source code comments that help programmers underst...
research
03/23/2021

Characterising the Knowledge about Primitive Variables in Java Code Comments

Primitive types are fundamental components available in any programming ...
research
10/15/2020

Holistic Combination of Structural and Textual Code Information for Context based API Recommendation

Context based API recommendation is an important way to help developers ...
research
08/09/2020

Function completion in the time of massive data: A code embedding perspective

Code completion is an important feature of integrated development enviro...
research
05/26/2019

Programming with Applicative-like expressions

The fact that Applicative type class allows one to express simple parser...
research
06/02/2021

Metaphor Generation with Conceptual Mappings

Generating metaphors is a difficult task as it requires understanding nu...
research
04/03/2019

x3ogre: Connecting X3D to a state of the art rendering engine

We connect X3D to the state of the art OGRE renderer using our prototypi...

Please sign up or login with your details

Forgot password? Click here to reset