首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
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.  相似文献   

2.
Free and open source software (FOSS) plays an important role in source code reuse practice. They usually come with one or more software licenses written in the header part of source files, stating the requirements and conditions which should be followed when been reused. Removing or modifying the license statement by re-distributors will result in the inconsistency of license with its ancestor, and may potentially cause license infringement. In this paper, we describe and categorize different types of license inconsistencies and propose a method to detect them. Then we applied this method to Debian 7.5 and a collection of 10,514 Java projects on GitHub and present the license inconsistency cases found in these systems. With a manual analysis, we summarized various reasons behind these license inconsistency cases, some of which imply potential license infringement and require attention from the developers. This analysis also exposes the difficulty to discover license infringements, highlighting the usefulness of finding and maintaining source code provenance.  相似文献   

3.
Corpora with high-quality linguistic annotations are an essential component in many NLP applications and a valuable resource for linguistic research. For obtaining these annotations, a large amount of manual effort is needed, making the creation of these resources time-consuming and costly. One attempt to speed up the annotation process is to use supervised machine-learning systems to automatically assign (possibly erroneous) labels to the data and ask human annotators to correct them where necessary. However, it is not clear to what extent these automatic pre-annotations are successful in reducing human annotation effort, and what impact they have on the quality of the resulting resource. In this article, we present the results of an experiment in which we assess the usefulness of partial semi-automatic annotation for frame labeling. We investigate the impact of automatic pre-annotation of differing quality on annotation time, consistency and accuracy. While we found no conclusive evidence that it can speed up human annotation, we found that automatic pre-annotation does increase its overall quality.  相似文献   

4.
A design pattern is a general reusable solution to commonly recurring problems in software projects. Bad smells are symptoms existing in the source code that possibly indicate the presence of a structural problem that requires code refactoring. Although design pattern and bad smells be different concepts, literature has shown that they may be related and cooccur during the evolution of a software system. This paper presents an empirical study that investigates cooccurrences of design patterns and bad smells as well as identifies the main factors that contribute to the emergence of the relationship between them. We carried out a case study with five Java systems to: (1) investigate if the use of design pattern reduces bad smell occurrence, (2) identify cooccurrences of design patterns and bad smells, and (3) identify situations that contribute for the cooccurrence emergence. As the main result, we found that the application of design pattern not necessarily avoid bad smell occurrences. The results also show that some design patterns such as composite, factory method, and singleton, are intrinsically modular and might be useful in creating high-quality systems. However, other design patterns such as adapter-command, proxy, and state-strategy, have presented high cooccurrence frequency with bad smells; therefore, they require attention in their implementation. Finally, via manual inspection in the components with cooccurrence, we found that the identified cooccurrences appeared due to poor planning and inadequate application of design patterns.  相似文献   

5.
程序设计语言的相互转换技术可以被广泛运用在软件维护、遗留系统的升级改造以及软件逆向工程等领域中。文中先对现有的几种移植方法进行了分析和研究,分析表明在将程序库移植到Java中和将它们与Java整合时,这些方法暴露出了各自的局限性和不足。借鉴语言转换经验,制定了转换的设计原则并探讨了将C语言转换到Java语言的过程中需要解决的一些问题,以及这个转换系统的设计思想和实现方法。文中所阐述的内容为实现异种程序设计语言的程序代码转换,提高程序代码的可移植性和重用性提供了有意义的思路和实现方法。  相似文献   

6.
贾统  李影  张齐勋  吴中海 《软件学报》2021,32(9):2713-2728
基于日志分析的故障诊断是智能运维的关键技术之一,然而该技术存在关键瓶颈——日志的质量.当今,由于程序开发人员缺乏日志打印规范和指导等问题,日志质量欠佳,因此实现日志的自动化打印决策以提升日志质量的需求日益迫切.关注自动化日志打印决策问题,与现有研究工作不同,提出一种基于程序层次树和逆序组合的特征向量生成方法,能够适用于不同编程语言编写的软件系统.此外,还利用迁移学习算法实现跨组件和跨软件系统的日志打印位置决策.在3个典型的应用场景——版本升级、组件开发和系统开发及5个流行的开源软件系统——OpenStack,Tensorflow,SaltCloud,Hadoop和Angel上的实验表明:所述方法在Java系统中的日志打印决策准确率约为95%,在Python系统中的日志打印决策准确率约为70%.  相似文献   

7.
寇晓雨 《软件》2012,(5):84-85
CAXA系列软件已经具有了非常丰富的功能,其应用范围涵盖了制造业的多种领域。CAXA系列软件的应用可以有效的解决手动编程过程中需要处理的大量计算问题,从而很大程度上缩短了编程所需的时间,同时可以减少人为错误,提升了编程效率和编程质量。本文主要对CAXA软件在自动编程中几点注意问题,并就几个难点问题进行解析。  相似文献   

8.
Software defects often lead to bugs, runtime errors and software maintenance difficulties. They should be systematically prevented, found, removed or fixed all along the software lifecycle. However, detecting and fixing these defects is still, to some extent, a difficult, time-consuming and manual process. In this paper, we propose a two-step automated approach to detect and then to correct various types of maintainability defects in source code. Using Genetic Programming, our approach allows automatic generation of rules to detect defects, thus relieving the designer from a fastidious manual rule definition task. Then, we correct the detected defects while minimizing the correction effort. A correction solution is defined as the combination of refactoring operations that should maximize as much as possible the number of corrected defects with minimal code modification effort. We use the Non-dominated Sorting Genetic Algorithm (NSGA-II) to find the best compromise. For six open source projects, we succeeded in detecting the majority of known defects, and the proposed corrections fixed most of them with minimal effort.  相似文献   

9.
Software defects due to coding errors continue to plague the industry with disastrous impact, especially in the enterprise application software category. Identifying how much of these defects are specifically due to coding errors is a challenging problem. In this paper, we investigate the best methods for preventing new coding defects in enterprise resource planning (ERP) software, and discovering and fixing existing coding defects. A large-scale survey-based ex-post-facto study coupled with experiments involving static code analysis tools on both sample code and real-life million lines of code open-source ERP software were conducted for such purpose. The survey-based methodology consisted of respondents who had experience developing ERP software. This research sought to determine if software defects could be merely mitigated or totally eliminated, and what supporting policies, procedures and infrastructure were needed to remedy the problem. In this paper, we introduce a hypothetical framework developed to address our research questions, the hypotheses we have conjectured, the research methodology we have used, and the data analysis methods used to validate the stated hypotheses. Our study revealed that: (a) the best way for ERP developers to discover coding-error based defects in existing programs is to choose an appropriate programming language; perform a combination of manual and automated code auditing, static code analysis, and formal test case design, execution and analysis, (b) the most effective ways to mitigate defects in an ERP system is to track the defect densities in the ERP software, fix the defects found, perform regression testing, and update the resulting defect density statistics, and (c) the impact of epistemological and legal commitments on the defect densities of ERP systems is inconclusive.We feel that our proposed model has the potential to vastly improve the quality of ERP and other similar software by reducing the coding-error defects, and recommend that future research aimed at testing the model in actual production environments.  相似文献   

10.
How can we measure the impact of an open‐source software package over time? When a system has no price, no purchase contracts and no buyers or sellers it can be difficult to judge its impact on the world. To explore this issue, we have instrumented the Condor distributed batch system in a variety of ways and observed its growth to over 50 000 CPUs at over 1000 sites over five years. Instrumentation methods include automatic updates by e‐mail and user datagram protocol (UDP), annotated download records and a voluntary user survey. Each of these metrics has various strengths and weaknesses that we are able to compare and contrast. We also explore the ethical and legal issues surrounding automatic data collection. Surprisingly, we discover that objections to automatic data collection are higher among people that are not using the Condor software. We conclude with some practical advice for further research into the measurement of software systems. Copyright © 2006 John Wiley & Sons, Ltd.  相似文献   

11.
Code smells are indicators of deeper design problems that may cause difficulties in the evolution of a software system. This paper investigates the capability of twelve code smells to reflect actual maintenance problems. Four medium-sized systems with equivalent functionality but dissimilar design were examined for code smells. Three change requests were implemented on the systems by six software developers, each of them working for up to four weeks. During that period, we recorded problems faced by developers and the associated Java files on a daily basis. We developed a binary logistic regression model, with “problematic file” as the dependent variable. Twelve code smells, file size, and churn constituted the independent variables. We found that violation of the Interface Segregation Principle (a.k.a. ISP violation) displayed the strongest connection with maintenance problems. Analysis of the nature of the problems, as reported by the developers in daily interviews and think-aloud sessions, strengthened our view about the relevance of this code smell. We observed, for example, that severe instances of problems relating to change propagation were associated with ISP violation. Based on our results, we recommend that code with ISP violation should be considered potentially problematic and be prioritized for refactoring.  相似文献   

12.
软件度量研究方兴未艾,构建软件度量模型是其中一个重要的研究方向。度量模型从本质上说,是一组对软件进行评价的标准。这个标准并不是仅仅为了用来证明软件的好坏优劣,也用来反映不同软件系统或者软件模块的特点,从而为不同的需求服务。计算机科学中没有绝对的概念,它从诞生起就是紧密围绕应用服务的,计算机科学的研究一定要和现实需求相关联,因此作为一种评价标准,度量模型同样是从不同方面来综合评测软件的属性,从而在不同需求面前提供可参考的选择。  相似文献   

13.
In this paper, we present an in-depth empirical study of a new metric, change dispersion, that measures the extent changes are scattered throughout the code of a software system. Intuitively, highly dispersed changes, the changes that are scattered throughout many software entities (such as files, classes, methods, and variables), should require more maintenance effort than the changes that only affect a few entities. In our research we investigate change dispersion on the code-base of a number of subject systems as a whole, and separately on each system's cloned and non-cloned code. Our central objective is to determine whether cloned code negatively affects software evolution and maintenance. The granularity of our focus is at the method level.Our experimental results on 16 open source subject systems written in four different programming languages (Java, C, C#, and Python) involving two clone detection tools (CCFinderX and NiCad) and considering three major types of clones (Type 1: exact, Type 2: dissimilar naming, and Type 3: some dissimilar code) suggests that change dispersion has a positive and statistically significant correlation with the change-proneness (or instability) of source code. Cloned code, especially in Java and C systems, often exhibits a higher change dispersion than non-cloned code. Also, changes to Type 3 clones are more dispersed compared to changes to Type 1 and Type 2 clones. According to our analysis, a primary cause of high change dispersion in cloned code is that clones from the same clone class often require corresponding changes to ensure they remain consistent.  相似文献   

14.
ContextCode smells are indicators of poor coding and design choices that can cause problems during software maintenance and evolution.ObjectiveThis study is aimed at a detailed investigation to which extent problems in maintenance projects can be predicted by the detection of currently known code smells.MethodA multiple case study was conducted, in which the problems faced by six developers working on four different Java systems were registered on a daily basis, for a period up to four weeks. Where applicable, the files associated to the problems were registered. Code smells were detected in the pre-maintenance version of the systems, using the tools Borland Together and InCode. In-depth examination of quantitative and qualitative data was conducted to determine if the observed problems could be explained by the detected smells.ResultsFrom the total set of problems, roughly 30% percent were related to files containing code smells. In addition, interaction effects were observed amongst code smells, and between code smells and other code characteristics, and these effects led to severe problems during maintenance. Code smell interactions were observed between collocated smells (i.e., in the same file), and between coupled smells (i.e., spread over multiple files that were coupled).ConclusionsThe role of code smells on the overall system maintainability is relatively minor, thus complementary approaches are needed to achieve more comprehensive assessments of maintainability. Moreover, to improve the explanatory power of code smells, interaction effects amongst collocated smells and coupled smells should be taken into account during analysis.  相似文献   

15.
Possibilities of application of new ideas connected with control in development of practically useful intelligent systems are discussed. Basic subsystems of the system controlling the software are distinguished: monitoring, manual, automatic, and automated control. It is shown that the development of control actions on the software can be performed according to prior knowledge of managers, input data flow, and user models. A classification of control problems of intelligent systems is proposed. According to this classification, methods for achieving controllability of intelligent systems and examples of control problems of information resources, problem solvers, and user interfaces of intelligent systems are considered.  相似文献   

16.
Successful implementation of Radio Frequency Identification (RFID) in Enterprise Information System (EIS) depends on exploring the knowledge of RFID technology and providing EIS software training to potential users. The restriction of RFID technology and huge amount item-level data collection via RFID potentially increases the complexity of integrating with EIS. It raises several concerns such as reduced data accuracy, and increased exceptions leading to processes requiring more time to be developed, tested and maintained. However, this approach has not been entirely investigated so far. This paper proposes an integrated research on EIS and a training approach for students and employees who intend to integrate RFID with EIS software in an organization. This integrated research approach applies a typical EIS project workflow from automatic shop floor data collection to customer order fulfillment. This research identifies these stages as transaction, planning and scheduling, integration, execution and control, and automatic identification and data collection. For training and demonstration purpose, this research proposes prototype information systems that emulate the systems used in any organization. This ensures that the logic of the proposed methodology of integrating RFID and EIS software is consistent with that in the business organization. This paper discusses some of the important case studies that were conducted with the suggested prototype systems.  相似文献   

17.
聂兰苏 《软件》2021,(1):121-123
随着科技发展,人们对软件质量有更高的要求,自动化测试也得到广泛的应用。本文从手工测试面临的问题、自动化测试概述、适合做自动化测试的项目、网络设备类自动化测试方法、自动化测试人员具备技能、与开发人员的配合等进行阐述。  相似文献   

18.
Java并发机制研究   总被引:5,自引:0,他引:5  
针对高质量Java多线程并发程序设计,结合实例分析研究了Java多线程同步机制、通信机制以及并发机制的扩展,给出了防止死锁现象的编程策略,有助于解决实际编程中的并发问题。  相似文献   

19.
Test case prioritization provides a way to run test cases with the highest priority earliest. Numerous empirical studies have shown that prioritization can improve a test suite's rate of fault detection, but the extent to which these results generalize is an open question because the studies have all focused on a single procedural language, C, and a few specific types of test suites. In particular, Java and the JUnit testing framework are being used extensively to build software systems in practice, and the effectiveness of prioritization techniques on Java systems tested under JUnit has not been investigated. We have therefore designed and performed a controlled experiment examining whether test case prioritization can be effective on Java programs tested under JUnit, and comparing the results to those achieved in earlier studies. Our analyses show that test case prioritization can significantly improve the rate of fault detection of JUnit test suites, but also reveal differences with respect to previous studies that can be related to the language and testing paradigm. To investigate the practical implications of these results, we present a set of cost-benefits models for test case prioritization, and show how the effectiveness differences observed can result in savings in practice, but vary substantially with the cost factors associated with particular testing processes.  相似文献   

20.
针对用于气象观测的气压传感器手动误差调整方式通用性差、效率低等问题,设计了用于目标传感器误差调整的误差自校准系统;研发的传感器误差自校准软件配合自主设计的传感器多通道转换器与压力控制器、气压标准器,可同时完成8个通道气压传感器的误差自动调整任务;实际测试中,系统在1小时内完成了8通道传感器的误差自动调整,经过调整后的各通道传感器的误差绝对值均未超过0.05 hPa,远小于传感器出厂的最大允许误差±0.25 hpa及规范要求的±0.30 hPa误差范围,提升了传感器误差调整工作效率的同时,有利于提高气压观测数据质量。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号