arrow
返回

An empirical study of data constraint implementations in Java

delete2022-06-16
delete6
PRE
AI
J
Juan Manuel Florez *
L
Laura Moreno
Z
Zenong Zhang
S
Shiyi Wei
A
Andrian Marcus
DOI:10.1007/s10664-022-10175-wdelete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Software systems are designed according to guidelines and constraints defined by business rules. Some of these constraints define the allowable or required values for data handled by the systems. These data constraints usually originate from the problem domain (e.g., regulations), and developers must write code that enforces them. Understanding how data constraints are implemented is essential for testing, debugging, and software change. Unfortunately, there are no widely-accepted guidelines or best practices on how to implement data constraints. This paper presents an empirical study that investigates how data constraints are implemented in Java. We study the implementation of 187 data constraints extracted from the documentation of eight real-world Java software systems. First, we perform a qualitative analysis of the textual description of data constraints and identify four data constraint types. Second, we manually identify the implementations of these data constraints and reveal that they can be grouped into 31 implementation patterns. The analysis of these implementation patterns indicates that developers prefer a handful of patterns when implementing data constraints. We also found evidence suggesting that deviations from these patterns are associated with unusual implementation decisions or code smells. Third, we develop a tool-assisted protocol that allows us to identify 256 additional trace links for the data constraints implemented using the 13 most common patterns. We find that almost half of these data constraints have multiple enforcing statements, which are code clones of different types. Finally, a study with 16 professional developers indicates that the patterns we describe can be easily and accurately recognized in Java code.
Keyword:
Business rule
Data constraint
Empirical study
Code pattern
Discourse analysis

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

U
University of Texas Dallas
学者数:
5.6K
论文数: 5.0K
被引数: 15
U
university of texas system
学者数:
18.5W
论文数: 15.6W
被引数: 210
引用论文

引用论文

err分享
err收藏
Sustainability of the community-based ecotourism development in the Aksu-Zhabagly nature reserve, Kazakhstan
err2022-03-07
err0
errOAAI
errImanaly Akbar; Sergeyeva Aigul Maksatovna; Myrzaliyeva Zabira Kazbekkyzy; Tazhekova Akmaral Zhaksybekkyzy; Saulembaev Altynbai Tagabayevich; Mominov Serik Abdukarimovich
err分享
err收藏
Post‐rift magmatic evolution of the eastern North American “passive‐aggressive” margin
err2017-01-09
err0
errOAAI
errSarah E. Mazza; Esteban Gazel; Elizabeth A. Johnson; Michael Bizimis; Ryan McAleer; C. Berk Biryol
err分享
err收藏
err分享
err收藏
err分享
err收藏
Mortality in the offspring of individuals living along the radioactively contaminated Techa River: a descriptive analysis
err2000-12-14
err0
PREAI
errM. M. Kossenko; Y. Ostroumova; A. Akleyev; N. Startsev; M. Degteva; F. Granath; P. Hall
err分享
err收藏
学者 查看更多内容