Spectrum-Based Fault Localization (SBFL) is a well-understood statistical approach to software fault localization, and there have been numerous studies performed that tackle its effectiveness. However, mostly Java and...
详细信息
ISBN:
(纸本)9781728151434
Spectrum-Based Fault Localization (SBFL) is a well-understood statistical approach to software fault localization, and there have been numerous studies performed that tackle its effectiveness. However, mostly Java and C/C++ programs have been addressed to date. We performed an empirical study on SBFL for javascript programs using a recent bug benchmark, BugsJS. In particular, we examined (1) how well some of the most popular SBFL algorithms, Tarantula, Ochiai and DStar, can predict the faulty source code elements in these javascript programs, (2) whether there is a significant difference between the effectiveness of the different SBFL algorithms, and (3) whether there is any relationship between the bug-fix types and the performance of SBFL methods. For the latter, we performed a manual classification of each benchmark bug according to an existing classification scheme. Results show that the performance of the SBFL algorithms is similar but there are some notable differences among them as well, and that certain bug-fix types can be significantly differentiated from the others (in both positive and negative direction) based on the fault localization effectiveness of the investigated algorithms.
Record-replay techniques are developed to facilitate debugging client-side javascript application failures. They faithfully record all events that reveal a failure, but record many events irrelevant to the failure. De...
详细信息
ISBN:
(纸本)9781538650127
Record-replay techniques are developed to facilitate debugging client-side javascript application failures. They faithfully record all events that reveal a failure, but record many events irrelevant to the failure. Delta debugging adopts the divide-and-conquer algorithm to generate a minimal event subtrace that still reveals the same failure. However, delta debugging is slow because it may generate lots of syntactically infeasible candidate event subtraces in which some events can trigger syntactical errors (e.g., ReferenceError and TypeError), and thus cannot be replayed as expected. Based on this observation, we propose EvMin, an effective and efficient approach to remove failure-irrelevant events from an event trace. We use the variable usage information (e.g., DOM variable usage) in an event to model the event's context. We require that, each event in an event subtrace has the compatible context with its corresponding one in the original event trace. In this way, we avoid generating syntactically infeasible event subtraces, and dramatically speed up delta debugging. We have implemented EvMin and evaluated it on 10 real-world javascript application failures. Our evaluation shows that EvMin generates 72% fewer event subtraces, and takes 84% less time than delta debugging.
Many javascript programs are written in an event-driven style. In particular, in server-side Node. js applications, operations involving sockets, streams, and files are typically performed in an asynchronous manner, w...
详细信息
ISBN:
(纸本)9781450336895
Many javascript programs are written in an event-driven style. In particular, in server-side Node. js applications, operations involving sockets, streams, and files are typically performed in an asynchronous manner, where the execution of listeners is triggered by events. Several types of programming errors are specific to such event-based programs (e.g., unhandled events, and listeners that are registered too late). We present the event-based call graph, a program representation that can be used to detect bugs related to event handling. We have designed and implemented three analyses for constructing event-based call graphs. Our results show that these analyses are capable of detecting problems reported on StackOverflow. Moreover, we show that the number of false positives reported by the analysis on a suite of small Node. js applications is manageable.
javascript is a powerful and flexible prototype-based scripting language that is increasingly used by developers to create interactive web applications. The language is interpreted, dynamic, weakly-typed, and has firs...
详细信息
ISBN:
(纸本)9781467357395
javascript is a powerful and flexible prototype-based scripting language that is increasingly used by developers to create interactive web applications. The language is interpreted, dynamic, weakly-typed, and has first-class functions. In addition, it interacts with other web languages such as CSS and HTML at runtime. All these characteristics make javascript code particularly error-prone and challenging to write and maintain. Code smells are patterns in the source code that can adversely influence program comprehension and maintainability of the program in the long term. We propose a set of 13 javascript code smells, collected from various developer resources. We present a javascript code smell detection technique called JSNOSE. Our metric-based approach combines static and dynamic analysis to detect smells in client-side code. This automated technique can help developers to spot code that could benefit from refactoring. We evaluate the smell finding capabilities of our technique through an empirical study. By analyzing 11 web applications, we investigate which smells detected by JSNOSE are more prevalent.
javascript is the de facto programming language for the Web. It is used to implement mail clients, office applications, or IDEs, that can weight hundreds of thousands of lines of code. The language itself is prototype...
详细信息
ISBN:
(纸本)9781479984695
javascript is the de facto programming language for the Web. It is used to implement mail clients, office applications, or IDEs, that can weight hundreds of thousands of lines of code. The language itself is prototype based, but to master the complexity of their application, practitioners commonly rely on informal class abstractions. This practice has never been the target of empirical research in javascript. Yet, understanding it is key to adequately tuning programming environments and structure libraries such that they are accessible to programmers. In this paper we report on a large and in-depth study to understand how class emulation is employed in javascript applications. We propose a strategy to statically detect class-based abstractions in the source code of javascript systems. We used this strategy in a dataset of 50 popular javascript applications available from GitHub. We found four types of javascript software: class-free (systems that do not make any usage of classes), class-aware (systems that use classes, but marginally), class-friendly (systems that make a relevant usage of classes), and class-oriented (systems that have most of their data structures implemented as classes). The systems in these categories represent, respectively, 26%, 36%, 30%, and 8% of the systems we studied.
Developers often make mistakes while developing a software. Also,despite being a popular language, javascript codes are not free from errors. Though developers and testers give their best effort to minimize these bugs...
详细信息
ISBN:
(纸本)9781538651636
Developers often make mistakes while developing a software. Also,despite being a popular language, javascript codes are not free from errors. Though developers and testers give their best effort to minimize these bugs, often times the occurrence of bugs becomes inevitable. Very few works have been conducted to generate bug patterns in javascript source code. The existing works suggest that more bug patterns can be found out and also their verification techniques are not clear. To solve these issues, this paper suggests an approach of generating bug patterns from the syntactic structure of the source code. We have proposed six algorithms to generate six types of bug patterns from javascript source code. This work is also verified by commit log analysis of some big projects from GitHub. We found out 73 bug patterns by analyzing the commit log messages of 7 GitHub projects.
Embedded Systems (ES) are present in several domains like automotive, smart homes, smart cities, industry, and healthcare, to name but a few. ES brings new challenges to designing embedded software that requires a hig...
详细信息
ISBN:
(纸本)9781450395175
Embedded Systems (ES) are present in several domains like automotive, smart homes, smart cities, industry, and healthcare, to name but a few. ES brings new challenges to designing embedded software that requires a high level of abstraction and being aware of resource consumption, mainly on resource-constrained devices. Modern programming languages like javascript ( JS) can help solve these issues. However, JS is an interpreted language that demands attention to develop applications considering the balance between performance and resource consumption. In this scenario, this paper introduces an architecture design that proposes to model software for embedded systems as event-driven applications. Our design combines traditional architectures traits of Time-triggered (TT) and Event-triggered (ET) into a framework named JSEVAsync, promoting a hybrid system that explores javascript's non-blocking concept as a development interface to structure the algorithms into asynchronous units. As a result, we aid the development of applications with high abstraction levels and better resource consumption. To validate it, we compare C- and javascript-based applications, analyze the source code (static code analysis) to extract software quality metrics, and explore the results from the energy consumption perspective. We found that writing code through JSEVAsync can be up to 21% more energy efficient than the traditional method and can improve design-time metrics.
The paper presents a distributed computing system that is based on evolutionary algorithms and utilizing a web browser on a client's side. Evolutionary algorithm is coded in javascript language embedded in a web p...
详细信息
ISBN:
(纸本)9783642368035
The paper presents a distributed computing system that is based on evolutionary algorithms and utilizing a web browser on a client's side. Evolutionary algorithm is coded in javascript language embedded in a web page sent to the client. The code is optimized with regards to the memory usage and communication efficiency between the server and the clients. The server side is also based on javascript language, as *** server was applied. The proposed system has been tested on the basis of permutation flowshop scheduling problem, one of the most popular optimization benchmarks for heuristics studied in the literature. The results have shown, that the system scales quite smoothly, taking additional advantage of local search algorithm executed by some clients.
Substantial recent research has examined the accuracy of presentation durations and response time measurements for visually presented stimuli in Web-based experiments, with a general conclusion that accuracy is accept...
详细信息
Substantial recent research has examined the accuracy of presentation durations and response time measurements for visually presented stimuli in Web-based experiments, with a general conclusion that accuracy is acceptable for most kinds of experiments. However, many areas of behavioral research use auditory stimuli instead of, or in addition to, visual stimuli. Much less is known about auditory accuracy using standard Web-based testing procedures. We used a millisecond-accurate Black Box Toolkit to measure the actual durations of auditory stimuli and the synchronization of auditory and visual presentation onsets. We examined the distribution of timings for 100 presentations of auditory and visual stimuli across two computers with difference specs, three commonly used browsers, and code written in either Adobe Flash or javascript. We also examined different coding options for attempting to synchronize the auditory and visual onsets. Overall, we found that auditory durations were very consistent, but that the lags between visual and auditory onsets varied substantially across browsers and computer systems.
Due to the loosely typed and interpreted features of javascript, the attention of type errors is commonly not paid enough when writing code. Our previous work called Yapures provides a convenient way to allow develope...
详细信息
ISBN:
(纸本)9781450366335
Due to the loosely typed and interpreted features of javascript, the attention of type errors is commonly not paid enough when writing code. Our previous work called Yapures provides a convenient way to allow developers to write both the javascript and the PureScript codes in the same file. This paper introduces YapuresPlus as an upgraded version of Yapures by rationalizing the syntax to improve the compatibility between the javascript and the PureScript codes. To verify the performance of YapuresPlus, we compare with general javascript code through more experiments.
暂无评论