کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
421060 684027 2016 19 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Over-exposed classes in Java: An empirical study
ترجمه فارسی عنوان
کلاسهای بیش از حد در جاوا: یک مطالعه تجربی
کلمات کلیدی
دسترسی به کلاس، مدولار، کلاس های بیش از حد در معرض، سیستم های جاوا
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
چکیده انگلیسی


• We conduct an extensive study on the use of class access modifiers in Java systems.
• We identify a code anomaly called class over-exposure that applies to classes.
• We have found that 25% of classes are over-exposed.
• 90% of these classes are over-exposed since their first implementation.

Java access modifiers regulate interactions among software components. In particular, class modifiers specify which classes from a component are publicly exposed and therefore belong to the component public interface. Restricting the accessibility as specified by a programmer is key to ensure a proper software modularity. It has been said that failing to do so is likely to produce maintenance problems, poor system quality, and architecture decay. However, how developers uses class access modifiers or how inadequate access modifiers affect software systems has not been investigated yet in the literature.In this work, we empirically analyze the use of class access modifiers across a collection of 15 Java libraries and 15 applications, totaling over 3.6M lines of code. We have found that an average of 25% of classes are over-exposed, i.e., classes defined with an accessibility that is broader than necessary. A number of code patterns involving over-exposed classes have been formalized, characterizing programmers׳ habits. Furthermore, we propose an Eclipse plugin to make component public interfaces match with the programmer׳s intent.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Computer Languages, Systems & Structures - Volume 46, November 2016, Pages 1–19
نویسندگان
, , , ,