Change-level defect prediction is widely referred to as just-in-time (JIT) defect prediction since it identifies a defect-inducing change at the check-in time, and researchers have proposed many approaches based on th...
详细信息
Change-level defect prediction is widely referred to as just-in-time (JIT) defect prediction since it identifies a defect-inducing change at the check-in time, and researchers have proposed many approaches based on the language-independent change-level features. These approaches can be divided into two types: supervised approaches and unsupervised approaches, and their effectiveness has been verified on Java or C++ projects. However, whether the language-independent change-level features can effectively identify the defects of javascript projects is still unknown. Additionally, many researches have confirmed that supervised approaches outperform unsupervised approaches on Java or C++ projects when considering inspection effort. However, whether supervised JIT defect prediction approaches can still perform best on javascript projects is still unknown. Lastly, prior proposed change-level features are programming languageindependent, whether programming language-specific change-level features can further improve the performance of JIT approaches on identifying defect-prone changes is also unknown. To address the aforementioned gap in knowledge, in this article, we collect and label the top-20 most starred javascript projects on GitHub. javascript is an extremely popular and widely used programming language in the industry. We propose five javascript-specific change-level features and conduct a large-scale empirical study (i.e., involving a total of 176,902 changes) and find that (1) supervised JIT defect prediction approaches (i.e., CBS+) still statistically significantly outperform unsupervised approaches on javascript projects when considering inspection effort;(2) javascript-specific change-level features can further improve the performance of approach built with language-independent features on identifying defect-prone changes;(3) the change-level features in the dimension of size (i.e., LT), diffusion (i.e., NF), and javascript-specific (i.e., SO and TC) are the m
Thread-level speculation can be used to take advantage of multicore architectures for javascript in web applications. We extend previous studies with these main contributions;we implement thread-level speculation in t...
详细信息
Thread-level speculation can be used to take advantage of multicore architectures for javascript in web applications. We extend previous studies with these main contributions;we implement thread-level speculation in the state-of-the art just-in-time-enabled javascript engine V8 and make the measurements in the Chromium web browser both from Google instead of using an interpreted javascript engine. We evaluate the thread-level speculation and just-in-time compilation combination on 15 very popular web applications, 20 HTML5 demos from the JS1K competition, and 4 Google Maps use cases. The performance is evaluated on two, four, and eight cores. The results clearly show that it is possible to successfully combine thread-level speculation and just-in-time compilation. This makes it possible to take advantage of multicore architectures for web applications while hiding the details of parallel programming from the programmer. Further, our results show an average speedup for the thread-level speculation and just-in-time compilation combination by a factor of almost 3 on four cores and over 4 on eight cores, without changing any of the javascript source code. Copyright (c) 2016 John Wiley & Sons, Ltd.
V8 is the open source interpreter developed by Google to enable javascript (JS) functionality in Chrome and power other software. Malicious threat actors abuse the usage of JS because most modern-day browsers implicit...
详细信息
V8 is the open source interpreter developed by Google to enable javascript (JS) functionality in Chrome and power other software. Malicious threat actors abuse the usage of JS because most modern-day browsers implicitly trust script code to execute. To aid in incident response and memory forensics in such scenarios, our work introduces the first generalizable account of the memory forensics of the V8 JS engine and provides practitioners with a list of objects and their descriptors extracted from a memory image. These objects can be used to reveal key information about a user and their activity. We analyzed the V8 engine and its garbage collection process. We then developed and validated a Volatility plugin - V8MapScan - to reconstruct V8 objects from a memory image. The runtime of the V8 engine is housed within the V8 isolate which contains its own heap manager and garbage collector. Within the heap of the isolate exists a root object map known as the MetaMap. By using the MetaMap and a object-fitting technique, we were able to extract objects, object-maps, and object properties. The V8MapScan plugin scans process memory for the MetaMap data structure contained within the V8 isolate using its data structure, references to objects can be found and extracted. Our findings were verified with Chrome DevTool's Heap Profiler. Our approach recovered the majority of objects indicated by the heap profiler with common types such as the ONE_BYTE_INTERNALIZED_STR type returning more than 98.9%. Lastly, we provide a case study using our tools on the Monero Cryptocurrency Miner. (C) 2022 The Authors. Published by Elsevier Ltd.
In the current era where multi-core technologies are very common in use, the existing web browsers are unable to fully utilize the capability of multi-core processors. The web browsers execute the javascript code loca...
详细信息
In the current era where multi-core technologies are very common in use, the existing web browsers are unable to fully utilize the capability of multi-core processors. The web browsers execute the javascript code locally in order to produce an efficient response of web pages. This responsiveness is however limited by the fact that the javascript code is uni-threaded, and consequently, the efficiency of the code degrades if it involves a large number of computations. In this paper, we propose a framework called JSOPT (javascript Optimizer) which generates an efficient javascript code to effectively utilize multi-core architectures. The framework uses a template containing constructs for communication & synchronization, and subsequently generates optimized code to be executed on the multi-core architectures. Multiple instances of templates are then generated with different implementations of the code and the best instance is selected to be incorporated in the library. With the optimized code generated using JSOPT, our results show a significant improvement in the performance of several benchmarks involving intensive computations based matrix operations on the Mozilla Firefox web browser.
javascript (JS) is one of the most popular programming languages due to its flexibility and versatility, but maintaining JS code is tedious and error-prone. In our research, we conducted an empirical study to characte...
详细信息
javascript (JS) is one of the most popular programming languages due to its flexibility and versatility, but maintaining JS code is tedious and error-prone. In our research, we conducted an empirical study to characterize the relationship between co-changed software entities (e.g., functions and variables), and built a machine learning (ML)-based approach to recommend additional entity to edit given developers' code changes. Specifically, we first crawled 14,747 commits in 10 open-source projects;for each commit, we created at least one change dependency graph (CDG) to model the referencer-referencee relationship between co-changed entities. Next, we extracted the common subgraphs between CDGs to locate recurring co-change patterns between entities. Finally, based on those patterns, we extracted code features from co-changed entities and trained an ML model that recommends entities-to-change given a program commit. According to our empirical investigation, (1) three recurring patterns commonly exist in all projects;(2) 80%-90% of co-changed function pairs either invoke the same function(s), access the same variable( s), or contain similar statement(s);(3) our ML-based approach CoRec recommended entity changes with high accuracy (73%-78%). CoRec complements prior work because it suggests changes based on program syntax, textual similarity, as well as software history;it achieved higher accuracy than two existing tools in our evaluation. (C) 2021 Elsevier Inc. All rights reserved.
JSConTest introduced the notions of effect monitoring and dynamic effect inference for javascript. It enables the description of effects with path specifications resembling regular expressions. It is implemented by an...
详细信息
JSConTest introduced the notions of effect monitoring and dynamic effect inference for javascript. It enables the description of effects with path specifications resembling regular expressions. It is implemented by an offline source code transformation. To overcome the limitations of the JSConTest implementation, we redesigned and reimplemented effect monitoring by taking advantange of javascript proxies. Our new design avoids all drawbacks of the prior implementation. It guarantees full interposition;it is not restricted to a subset of javascript;it is self-maintaining;and its scalability to large programs is significantly better than with JSConTest. The improved scalability has two sources. First, the reimplementation is significantly faster than the original, transformationbased implementation. Second, the reimplementation relies on the fly-weight pattern and on trace reduction to conserve memory. Only the combination of these techniques enables monitoring and inference for large programs.
The fastest javascript production implementations use just-in-time (JIT) compilation and the vast majority of academic publications about implementations of dynamic languages published during the last two decades focu...
详细信息
The fastest javascript production implementations use just-in-time (JIT) compilation and the vast majority of academic publications about implementations of dynamic languages published during the last two decades focus on JIT compilation. This does not imply that static compilers (AoT) cannot be competitive;as comparatively little effort has been spent creating fast AoT javascript compilers, a scientific comparison is lacking. This paper presents the design and implementation of an AoT javascript compiler, focusing on a performance analysis. The paper reports on two experiments, one based on standard javascript benchmark suites and one based on 18 new benchmarks chosen for their diversity of styles, authors, sizes, provenance, and coverage of the language. The first experiment shows an advantage to JIT compilers, which is expected after the decades of effort that these compilers have paid to these very tests. The second shows more balanced results, as the AoT compiler generates programs that reach competitive speeds and that consume significantly less memory. The paper presents and evaluates techniques that we have either invented or adapted from other systems, to improve AoT javascript compilation.
From the Book: Welcome to javascript! Using this easy-to-learn programming language, you'll be able to add pizzazz to your Web pages and make them more useful for you and for your site's visitors. We've wr...
详细信息
ISBN:
(纸本)0201354632
From the Book: Welcome to javascript! Using this easy-to-learn programming language, you'll be able to add pizzazz to your Web pages and make them more useful for you and for your site's visitors. We've written this book as a painless introduction to javascript, so you don't have to be a geek or a nerd to write a script. Pocket protectors will not be necessary at any time. As a friend of ours says, "We're geeky, so you don't have to be!" We wrote this book for you We figure that if you're interested in javascript, then you've already got some experience in creating HTML pages and Web sites, and you want to take the next step by adding some interactivity to your sites. We don't assume that you know anything about programming or scripting. We also don't assume that you are an HTML expert (though if you are, that's just fine). We do assume that you've got at least the basics of building Web pages down, and that you have some familiarity with common HTML, such as links, images, forms, and frames. How to use this book Throughout the book, we've used some devices that should make it easier for you to work with both the book and with javascript itself. In the step-by-step instructions that make up most of the book, we've used a special type style to denote either HTML or javascript code, like this: *** You'll also notice that we show the HTML in uppercase, and the javascript in lowercase, which makes it easier to distinguish between the two on a Web page. Whenever you see a quote mark in a javascript, it is always a straight quote (like " or "), never curlyquotes (aka "smart" quotes, like' or "). Curly quotes will prevent your javascript from working, so make sure that you avoid them when you write scripts. In the illustrations accompanying the stepby-step instructions, we've highlighted the part of the scripts that we're discussing in red, so you can quickly find what we're talking about. We often also highlight parts of the screen shots of Web browser windows i
暂无评论