EDBT 2026 Demo / reviewers in the wild / expert
Shing-Chi Cheung
dblp:c/SCCheung
· DBLP profile ↗
192ranked-venue papers
16as first author
62since 2021 · last 2026
0000-0002-3508-7172ORCID · verified
Domains — the database's venue-derived domains; a paper can count in several
Software engineering, systems software and programming languages · 156 · 14 first-author · 54 since 2021Applied, interdisciplinary, general and emerging computing · 14 · 2 first-authorArtificial intelligence and machine learning · 6 · 4 since 2021Computer networks · 6Databases, data management, data science and information retrieval · 5 · 1 first-authorSystems, architecture and hardware · 4Graphics, computer vision, multimedia, augmented reality and games · 4 · 3 since 2021Security and privacy · 3 · 3 since 2021Human-computer interaction and ubiquitous computing · 2Theory of computation · 2 · 2 since 2021
| Year | Publication | Venue | Position |
|---|---|---|---|
| 2026 | ModelWisdom: An Integrated Toolkit for TLA+ Model Visualization, Digest and Repair (Short Tool Paper)abstractAbstract Model checking in TLA+ provides strong correctness guarantees, yet practitioners continue to face significant challenges in interpreting counterexamples, understanding large state-transition graphs, and repairing faulty models. These difficulties stem from the limited explainability of raw model-checker output and the substantial manual effort required to trace violations back to source specifications. Although the TLA+ Toolbox includes a state diagram viewer, it offers only a static, fully expanded graph without folding, color highlighting, or semantic explanations, which limits its scalability and interpretability. We present ModelWisdom , an interactive environment that uses visualization and large language models to make TLA+ model checking more interpretable and actionable. ModelWisdom offers: (i) Model Visualization, with colorized violation highlighting, click-through links from transitions to TLA+ code, and mapping between violating states and broken properties; (ii) Graph Optimization, including tree-based structuring and node/edge folding to manage large models; (iii) Model Digest, which summarizes and explains subgraphs via large language models (LLMs) and performs preprocessing and partial explanations; and (iv) Model Repair, which extracts error information and supports iterative debugging. Together, these capabilities turn raw model-checker output into an interactive, explainable workflow, improving understanding and reducing debugging effort for nontrivial TLA+ specifications. This tool is available: https://github.com/ModelWisdom/ModelWisdom . A demonstrative video can be found at https://www.youtube.com/watch?v=plyZo30VShA . Jialun Cao, Chang Xu 0001, Shing-Chi Cheung |
FM (1) | 4 |
| 2026 | Enhancing Differential Testing with LLMs for Testing Deep Learning LibrariesabstractDifferential testing offers a promising strategy to alleviate the test oracle problem by comparing the test results between alternative implementations. However, existing differential testing techniques for deep learning (DL) libraries are limited by the key challenges of finding alternative implementations (called \(counterparts\) ) for a given API and subsequently generating diverse test inputs. To address the two challenges, this article introduces DLLens , a large language model (LLM)-enhanced differential testing technique for DL libraries. The first challenge is addressed by an observation that DL libraries are commonly designed to support the computation of a similar set of DL algorithms. Therefore, the counterpart of a given API’s computation could be successfully synthesized through certain composition and adaptation of the APIs from another DL library. DLLens incorporates a novel counterpart synthesis workflow, leveraging a LLM to search for valid counterparts for differential testing. To address the second challenge, DLLens incorporates a static analysis technique that extracts the path constraints from the implementations of a given API and its counterpart to guide diverse test input generation. The extraction is facilitated by LLM’s knowledge of the concerned DL library and its upstream libraries. DLLens incorporates validation mechanisms to manage the LLM’s hallucinations in counterpart synthesis and path constraint extraction. We evaluate DLLens on two popular DL libraries, TensorFlow and PyTorch. Our evaluation shows that DLLens synthesizes counterparts for 1.84 times as many APIs as those found by state-of-the-art techniques on these libraries. Moreover, under the same time budget, DLLens covers 7.23% more branches and detects 1.88 times as many bugs as state-of-the-art techniques on 200 randomly sampled APIs. DLLens has successfully detected 71 bugs in recent TensorFlow and PyTorch libraries. Among them, 59 are confirmed by developers, including 46 confirmed as previously unknown bugs, and 10 of these previously unknown bugs have been fixed in the latest version of TensorFlow and PyTorch. Meiziniu Li, Jianmeng Liu, Jialun Cao, Yongqiang Tian 0001, Shing-Chi Cheung |
ACM Trans. Softw. Eng. Methodol. | 6 |
| 2026 | Automated Unit Test Generation via Chain-of-Thought Prompt and Reinforcement Learning from Coverage FeedbackabstractRecently, Large Language Models (LLMs) have shown promising results in code generation, and several automated test generation approaches based on LLMs have been proposed. Although these approaches achieve promising performance, they suffer from two limitations. First, they lack the intrinsic understanding of the semantic intricacies and logical constructs inherent to the focal method. Second, they ignore the diversity of the generated tests and generate tests with limited code coverage. To alleviate these two limitations, in this work, we propose a novel approach named TestCTRL that optimizes LLMs for unit test generation by the Chain-of-Thought (CoT) prompt and Reinforcement Learning (RL) strategy. Specifically, we first build a new CoT dataset, containing the focal methods, corresponding unit tests, and CoT prompts. The CoT prompt includes the intention and possible test input values. Then, the CoT dataset is used to fine-tune one LLM (i.e., CodeLlama 7B) that can be seen as the policy model in RL. Meanwhile, we fine-tune another LLM (i.e., CodeGPT) as the reward model by predicting the line coverage of the focal method and its test. Moreover, we employ the Proximal Policy Optimization (PPO) algorithm to optimize the policy model and generate unit tests. We use the Defects4J benchmark to evaluate our approach from three perspectives (i.e., naturalness, validity, and code coverage). To avoid data leakage threats, we filtered out data from the CoT dataset that have the same focal method and test case names as those in the Defects4J. The experimental results demonstrate that TestCTRL outperforms state-of-the-art baselines in line and branch coverages, respectively. Besides, TestCTRL improves bug detection performance. We also investigate the reason for the proposed approach’s superiority. Xing Hu 0008, Xin Xia 0001, Shing-Chi Cheung, Shanping Li |
ACM Trans. Softw. Eng. Methodol. | 4 |
| 2025 | DOMAINEVAL: An Auto-Constructed Benchmark for Multi-Domain Code GenerationabstractCode benchmarks such as HumanEval are widely adopted to evaluate the capabilities of Large Language Models (LLMs), providing insights into their strengths and weaknesses. However, current benchmarks primarily exercise LLMs' capability on common coding tasks (e.g., bubble sort, greatest common divisor), leaving domain-specific coding tasks (e.g., computation, system, cryptography) unexplored. To fill this gap, we propose a multi-domain code benchmark, DOMAINEVAL, designed to evaluate LLMs' coding capabilities thoroughly. Our pipeline works in a fully automated manner, enabling a push-button construction from code repositories into formatted subjects under study. Interesting findings are observed by evaluating 12 representative LLMs against DOMAINEVAL. We notice that LLMs are generally good at computation tasks while falling short on cryptography and system coding tasks. The performance gap can be as much as 68.94% (80.94% - 12.0%) in some LLMs. We also observe that generating more samples can increase the overall performance of LLMs, while the domain bias may even increase. The contributions of this study include a code generation benchmark dataset DOMAINEVAL, encompassing six popular domains, a fully automated pipeline for constructing code benchmarks, and an identification of the limitations of LLMs in code generation tasks based on their performance on DOMAINEVAL, providing directions for future research improvements. Qiming Zhu, Jialun Cao, Yaojie Lu 0001, Xianpei Han, Le Sun 0001, Shing-Chi Cheung |
AAAI | 7 |
| 2025 | From Informal to Formal - Incorporating and Evaluating LLMs on Natural Language Requirements to Verifiable Formal ProofsabstractJialun Cao, Yaojie Lu, Meiziniu Li, Haoyang Ma, Haokun Li, Mengda He, Cheng Wen, Le Sun, Hongyu Zhang, Shengchao Qin, Shing-Chi Cheung, Cong Tian. Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2025. Jialun Cao, Yaojie Lu 0001, Meiziniu Li, Haokun Li, Mengda He, Cheng Wen 0002, Le Sun 0001, Hongyu Zhang 0002, Shengchao Qin, Shing-Chi Cheung, Cong Tian 0001 |
ACL (1) | 11 |
| 2025 | CRUXEVAL-X: A Benchmark for Multilingual Code Reasoning, Understanding and ExecutionabstractCode benchmarks such as HumanEval are widely adopted to evaluate Large Language Models' (LLMs) coding capabilities. However, there is an unignorable programming language bias in existing code benchmarks - over 95% code generation benchmarks are dominated by Python, leaving the LLMs' capabilities in other programming languages such as Java and C/C++ unknown. Moreover, coding task bias is also crucial. Most benchmarks focus on code generation capability, while benchmarks for code reasoning (given input, reasoning output; and given output, reasoning input), an essential coding capability, are insufficient. Yet, constructing multi-lingual benchmarks can be expensive and labor-intensive, and codes in contest websites such as Leetcode suffer from data contamination during training. To fill this gap, we propose CRUXEVAL-X, a multi-lingual code reasoning benchmark that contains 19 programming languages. It comprises at least 600 subjects for each language, along with 19K content-consistent tests in total. In particular, the construction pipeline of CRUXEVAL-X works in a fully automated and test-guided manner, which iteratively generates and repairs based on execution feedback. Also, to cross language barriers (e.g., dynamic/static type systems in Python/C++), we formulated various transition rules between language pairs to facilitate translation. Our extensive evaluation of 24 representative LLMs reveals the correlation between language pairs. For example, TypeScript and JavaScript show a significant positive correlation, while Racket has less correlation with other languages. More interestingly, even a model trained solely on Python can achieve at most 34.4% Pass@1 in other languages, revealing the cross-language generalization of LLMs. Jialun Cao, Yaojie Lu 0001, Ming Wen 0001, Xianpei Han, Ben He 0001, Shing-Chi Cheung, Le Sun 0001 |
ACL (1) | 8 |
| 2025 | A Tale of Two DL Cities: When Library Tests Meet CompilerabstractDeep Learning (DL) compilers typically load a DL model and optimize it with intermediate representation. Existing DL compiler testing techniques mainly focus on model optimization stages, but rarely explore bug detection at the model loading stage. Effectively testing the model loading stage requires covering diverse usages of each DL operator from various DL libraries, which shares a common objective with DL library testing, indicating that the embedded knowledge in DL library tests is beneficial for testing the model loading stage of DL compilers. With this idea, we propose Opera to migrate the knowledge embedded in DL library tests to test the model loading stage. Opera constructs diverse tests from various tests for DL libraries (including the tests documented in DL libraries and those generated by recent fuzzers). In total, we considered three sources of tests in DL libraries for migration. In addition, it incorporates a diversity-based test prioritization strategy to migrate and execute those tests that are more likely to detect diverse bugs earlier. We then used eight frontends from three DL compilers (e.g., TVM, TensorRT, and OpenVINO) for evaluation. OPERA detected 170 previously unknown bugs in total, 90 of which have been confirmed/fixed by developers, demonstrating the effectiveness of such the migration-based idea. The test prioritization strategy in OPERA improves testing efficiency with migrated tests by$11.9 \% \sim 47.4 \%$on average compared to general test prioritization strategies. Qingchao Shen, Yongqiang Tian 0001, Junjie Chen 0003, Ruifeng Fu, Shing-Chi Cheung |
ICSE | 7 |
| 2025 | Differential Testing of Concurrent ClassesabstractConcurrent programs are pervasive, yet difficult to write. The inherent complexity of thread synchronization makes the evolution of concurrent programs prone to concurrency faults. Previous work on regression testing concurrent programs focused on reducing the cost of re-run the existing tests. However, existing tests may not be able to expose the regression faults in the modified program. In this paper, we present Condiff a differential testing technique that generates concurrent tests and oracles to expose behavioral differences between two versions of a given concurrent class. Since concurrent programs are non-deterministic, this involves exploring all possible non-deterministic thread interleavings of each generated test on both versions. However, we can afford to analyze only a few concurrent tests due to the high cost of exhaustive interleaving exploration. To address the challenge, Condiff leverages the information of code changes and trace analysis to analyze only those concurrent tests that are likely to expose behavioral differences (if they exist). We evaluated Condiff on a set of Java classes. Our results show that Condiff can effectively generate concurrent tests that expose behavioral differences. Valerio Terragni, Shing-Chi Cheung |
ICST | 2 |
| 2025 | CodeCleaner: Mitigating Data Contamination for LLM BenchmarkingabstractData contamination presents a critical barrier preventing widespread industrial adoption of advanced software engineering techniques that leverage large language models (LLMs).This phenomenon occurs when evaluation data inadvertently overlaps with the public code repositories used to train LLMs, severely undermining the credibility of performance evaluations.Code refactoring, which comprises code restructuring and variable renaming, has emerged as a promising measure to mitigate data contamination.However, the lack of automated code refactoring tools and scientifically validated refactoring techniques has hampered widespread industrial implementation.To bridge the gap, this paper presents the first systematic study to examine the efficacy of code refactoring operators at multiple scales (method-level, class-level, and crossclass level) and in different programming languages.We develop CodeCleaner, including 11 operators for Python in multiple scales and 4 for Java.We elaborate on the rationale for why these operators could work to resolve data contamination and use both data-wise (e.g., N-gram matching overlap ratio) and model-wise metrics (e.g., perplexity) to quantify the efficacy after operators are applied.A drop of 75% overlap ratio is found when applying all operators in CodeCleaner, demonstrating their effectiveness in addressing data contamination.Besides, we migrate four operators to Java, showing their generalizability to another language.We also observed an average of 19% decrease in LLMs' performance after applying our operators.We make CodeCleaner online available at https://github.com/ArabelaTso/CodeCleaner-v1 to facilitate further studies on mitigating LLM data contamination. Jialun Cao, Songqiang Chen, Wuqi Zhang, Hau Ching Lo, Yeting Li, Shing-Chi Cheung |
Internetware | 6 |
| 2025 | Demystifying Cross-Language C/C++ Binaries: A Robust Software Component Analysis ApproachabstractBinary Software Composition Analysis (BSCA) is a technique for identifying the versions of third-party libraries (TPLs) used in compiled binaries, thereby tracing the dependencies and vulnerabilities of software components without access to their source code. However, existing BSCA techniques struggle with cross-language invoked C/C++ binaries in polyglot projects due to two key challenges: (1) interference from heterogeneous Foreign Function Interface (FFI) bindings that obscure distinctive TPL features and generate false positives during matching processes, and (2) the inherent complexity of composite binaries (fused binaries), particularly prevalent in polyglot development where multiple TPLs are frequently compiled into single executable units, resulting in blurred boundaries between libraries and substantially compromising version identification precision.We propose DeeperBin, a BSCA technique that addresses these challenges through a high-quality, large-scale feature database with four key advantages: (1) high scalability that is capable of analyzing 74,647 C/C++ TPL versions, (2) efficient noise filtering to remove FFI bindings and common functions, (3) automated extraction of version string regexes for 31,855 TPL versions, and (4) generation of distinctive version features using the Minimum Description Length (MDL) principle. Evaluated on 418 cross-language binaries, DeeperBin achieves 81.2% precision and 84.6% recall for TPL detection, outperforming state-of-the-art (SOTA) techniques by 14.1% and 23.2%, respectively. For version identification, it achieves 70.3% precision, a 12.6% improvement over state-of-the-art techniques. Ablation studies confirm the usefulness of FFI filtering and MDL-based features, boosting precision and recall by 17.1% and 18.8%. DeeperBin also maintains competitive efficiency, processing binaries in 364.3 seconds while supporting the largest feature database. Meiqiu Xu, Ying Wang 0038, Xian Zhan, Shing-Chi Cheung, Hai Yu 0001, Zhiliang Zhu 0001 |
ASE | 5 |
| 2025 | Cross2OH: Enabling Seamless Porting of C/C++ Software Libraries to OpenHarmonyabstractOpenHarmony is a new mobile operating system that offers a popular alternative to Android and iOS. To support its adoption, significant efforts have been devoted to porting C/C++ libraries from Linux to OpenHarmony. However, this porting process presents unique challenges due to the fundamental architectural differences in system libraries, runtime environments, and build systems between the two platforms. These discrepancies manifest as Cross-platform Incompatibility (CPI) issues during cross-compilation, which are particularly difficult to resolve for two key reasons. First, conventional cross-compilation toolchains provide only brief error messages that offer inadequate diagnostic information for CPI issues. Second, resolving these issues requires a deep understanding of cross-platform discrepancies, yet comprehensive documentation or systematic guidelines about such Linux-to-OpenHarmony differences remain largely unavailable.In this experience paper, to assist developers in addressing these challenges, we conducted an empirical study on 92 C/C++ libraries successfully ported to OpenHarmony. Through manual step-by-step reproduction of all CPI issues, our study reveals that discrepancies between Linux and OpenHarmony can be divided into three categories, and CPI issues can manifest through eight dimensions. Furthermore, we identified eight common adaptation strategies for resolving CPI issues. Based on these findings, we present Cross2OH, an automated technique for porting Linux-based software to OpenHarmony. Our approach combines: (1) an adaptation knowledge base (derived from RQ1 and RQ2 findings) and (2) a static analysis approach to detect and patch eight types of CPI issues. Evaluation using real developer patches shows Cross2OH achieves 0.94 recall and 0.91 precision in resolving CPI issues. Notably, Cross2OH enables successful cross-compilation for 40 critical libraries (including dependencies for popular Android apps such as WeChat, Microsoft Excel, Bilibili), with 29 of them passed official OpenHarmony review. The evaluation results demonstrate Cross2OH’s potential to streamline the porting process and foster the growth of the OpenHarmony software ecosystem. Tsz-On Li, Ying Wang 0038, Li Li 0029, Shing-Chi Cheung |
ASE | 5 |
| 2025 | LspFuzz: Hunting Bugs in Language ServersabstractThe Language Server Protocol (LSP) has revolutionized the integration of code intelligence in modern software development. There are approximately 300 LSP server implementations for various languages and 50 editors offering LSP integration. However, the reliability of LSP servers is a growing concern, as crashes can disable all code intelligence features and significantly impact productivity, while vulnerabilities can put developers at risk even when editing untrusted source code. Despite the widespread adoption of LSP, no existing techniques specifically target LSP server testing. To bridge this gap, we present LspFuzz, a grey-box hybrid fuzzer for systematic LSP server testing. Our key insight is that effective LSP server testing requires holistic mutation of source code and editor operations, as bugs often manifest from their combinations. To satisfy the sophisticated constraints of LSP and effectively explore the input space, we employ a two-stage mutation pipeline: syntax-aware mutations to source code, followed by context-aware dispatching of editor operations. We evaluated LspFuzz on four widely used LSP servers. LspFuzz demonstrated superior performance compared to baseline fuzzers, and uncovered previously unknown bugs in real-world LSP servers. Of the 51 bugs we reported, 42 have been confirmed, 26 have been fixed by developers, and two have been assigned CVE numbers. Our work advances the quality assurance of LSP servers, providing both a practical tool and foundational insights for future research in this domain. Hengcheng Zhu 0001, Songqiang Chen, Valerio Terragni, Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung |
ASE | 7 |
| 2025 | A study on prompt design, advantages and limitations of ChatGPT for deep learning program repairabstractAbstract The emergence of large language models (LLMs) such as ChatGPT has revolutionized many fields. In particular, recent advances in LLMs have triggered various studies examining the use of these models for software development tasks, such as program repair, code understanding, and code generation. Prior studies have shown the capability of ChatGPT in repairing conventional programs. However, debugging deep learning (DL) programs poses unique challenges since the decision logic is not directly encoded in the source code. This requires LLMs to not only parse the source code syntactically but also understand the intention of DL programs. Therefore, ChatGPT’s capability in repairing DL programs remains unknown. To fill this gap, our study aims to answer three research questions: (1) Can ChatGPT debug DL programs effectively? (2) How can ChatGPT’s repair performance be improved by prompting? (3) In which way can dialogue help facilitate the repair? Our study analyzes the typical information that is useful for prompt design and suggests enhanced prompt templates that are more efficient for repairing DL programs. On top of them, we summarize the dual perspectives (i.e., advantages and disadvantages) of ChatGPT’s ability, such as its handling of API misuse and recommendation, and its shortcomings in identifying default parameters. Our findings indicate that ChatGPT has the potential to repair DL programs effectively and that prompt engineering and dialogue can further improve its performance by providing more code intention. We also identified the key intentions that can enhance ChatGPT’s program repairing capability. Jialun Cao, Meiziniu Li, Ming Wen 0001, Shing-Chi Cheung |
Autom. Softw. Eng. | 4 |
| 2025 | On state reverting in solidity smart contracts: Developer practices, fault categorization, and tool evaluation
Lu Liu 0024, Lili Wei 0001, Wuqi Zhang, Shuqing Li 0001, Yepang Liu 0001, Shing-Chi Cheung, Michael R. Lyu |
Empir. Softw. Eng. | 7 |
| 2025 | How far are app secrets from being stolen? a case study on android
Lili Wei 0001, Heqing Huang 0002, Shing-Chi Cheung |
Empir. Softw. Eng. | 3 |
| 2025 | Question Selection for Multimodal Code Search Synthesis Using Probabilistic Version SpacesabstractSearching the occurrences of specific code patterns (code search) is a common task in software engineering, and programming by example (PBE) techniques have been applied to ease customizing code patterns. However, previous PBE tools only synthesize programs meeting the input-output examples, which may not always align with the user intent. To bridge this gap, this paper proposesExcalibur, a multi-modal (example and natural language description) and interactive synthesizer for code search.Excaliburensures that the generated programs are correct for the provided examples (soundness) and include the user-intended program (bounded completeness). Furthermore,Excaliburhelps the user identify the user-intended program through question-answer interaction. To minimize the required interaction efforts, question selection is crucial. To improve question selection for code search, we propose probabilistic version spaces (ProbVS), in which the user-intended program’s probability is high and others are low. ProbVS combines traditional version spaces for compactly representing extensive programs and large language models (on the user-provided natural language description) for adjusting programs’ probabilities to align with users’ intents. Extensive experiments on a benchmark of 44 tasks demonstrated the effectiveness ofExcaliburand ProbVS and demystified how ProbVS affects probability distributions and how the configurable parameters affect ProbVS. Yanyan Jiang 0001, Lili Wei 0001, Congying Xu, Shing-Chi Cheung, Chang Xu 0001 |
IEEE Trans. Software Eng. | 5 |
| 2024 | Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program VerificationabstractAbstract Formal verification provides a rigorous and systematic approach to ensure the correctness and reliability of software systems. Yet, constructing specifications for the full proof relies on domain expertise and non-trivial manpower. In view of such needs, an automated approach for specification synthesis is desired. While existing automated approaches are limited in their versatility, i.e. , they either focus only on synthesizing loop invariants for numerical programs, or are tailored for specific types of programs or invariants. Programs involving multiple complicated data types ( e.g. , arrays, pointers) and code structures ( e.g. , nested loops, function calls) are often beyond their capabilities. To help bridge this gap, we present AutoSpec , an automated approach to synthesize specifications for automated program verification. It overcomes the shortcomings of existing work in specification versatility, synthesizing satisfiable and adequate specifications for full proof. It is driven by static analysis and program verification, and is empowered by large language models (LLMs). AutoSpec addresses the practical challenges in three ways: (1) driving AutoSpec by static analysis and program verification, LLMs serve as generators to generate candidate specifications, (2) programs are decomposed to direct the attention of LLMs, and (3) candidate specifications are validated in each round to avoid error accumulation during the interaction with LLMs. In this way, AutoSpec can incrementally and iteratively generate satisfiable and adequate specifications. The evaluation shows its effectiveness and usefulness, as it outperforms existing works by successfully verifying 79% of programs through automatic specification synthesis, a significant improvement of 1.592x. It can also be successfully applied to verify the programs in a real-world X509-parser project. Cheng Wen 0002, Jialun Cao, Jie Su 0002, Zhiwu Xu 0001, Shengchao Qin, Mengda He, Haokun Li, Shing-Chi Cheung, Cong Tian 0001 |
CAV (2) | 8 |
| 2024 | Towards Understanding the Bugs in Solidity CompilerabstractSolidity compiler plays a key role in enabling the development of smart contract applications on Ethereum by governing the syntax of a domain-specific language called Solidity and performing compilation and optimization of Solidity code. The correctness of Solidity compiler is critical in fostering transparency, efficiency, and trust in industries reliant on smart contracts. However, like other software systems, Solidity compiler is prone to bugs, which may produce incorrect bytecodes on blockchain platforms, resulting in severe security concerns. As a domain-specific compiler for smart contracts, Solidity compiler differs from other compilers in many perspectives, posing unique challenges to detect its bugs. To understand the bugs in Solidity compiler and benefit future research, in this paper, we present the first systematic study on 533 Solidity compiler bugs. We carefully examined their characteristics (including symptoms, root causes, and distribution), and their triggering test cases. Our study leads to seven bug-revealing takeaways for Solidity compiler. Moreover, to study the limitations of Solidity compiler fuzzers and bring our findings into practical scenarios, we evaluate three Solidity compiler fuzzers on our constructed benchmark. The results show that these fuzzers are inefficient in detecting Solidity compiler bugs. The inefficiency arises from their failure to consider the interesting bug-inducing features, bug-related compilation flags, and test oracles. Wuqi Zhang, Qingchao Shen, Yongqiang Tian 0001, Junjie Chen 0003, Shing-Chi Cheung |
ISSTA | 6 |
| 2024 | JavaBench: A Benchmark of Object-Oriented Code Generation for Evaluating Large Language ModelsabstractCode generation benchmarks such as HumanEval are widely adopted to evaluate LLMs' capabilities. However, after consolidating the latest 24 benchmarks, we noticed three significant imbalances. First, imbalanced programming language. 95.8% of benchmarks involve Python, while only 5 benchmarks involve Java, resulting in an insufficient understanding of LLMs' capability to generate Java code. Second, imbalanced code granularity. Function-/statement-level benchmarks account for over 83.3% of benchmarks. Only a mere handful extends to class-/project-levels, and all are limited to Python. Third, lacking advanced features. Existing benchmarks primarily assess basic coding skills (e.g., variables, operators, and control structures), while overlooking advanced Object-Oriented Programming (OOP) features (i.e., encapsulation, inheritance, and polymorphism). Considering the prevalence of these advanced features in real-world Java project development, constructing benchmarks to test LLMs on handling OOP features is necessary. Jialun Cao, Shing-Chi Cheung, Chang Xu 0001 |
ASE | 4 |
| 2024 | MR-Adopt: Automatic Deduction of Input Transformation Function for Metamorphic TestingabstractWhile a recent study reveals that many developer-written test cases can encode a reusable Metamorphic Relation (MR), over 70% of them directly hard-code the source input and follow-up input in the encoded relation. Such encoded MRs, which do not contain an explicit input transformation to transform the source inputs to corresponding follow-up inputs, cannot be reused with new source inputs to enhance test adequacy. Congying Xu, Songqiang Chen, Shing-Chi Cheung, Valerio Terragni, Hengcheng Zhu 0001, Jialun Cao |
ASE | 4 |
| 2024 | Nyx: Detecting Exploitable Front-Running Vulnerabilities in Smart ContractsabstractSmart contracts are susceptible to front-running attacks, in which malicious users leverage prior knowledge of upcoming transactions to execute attack transactions in advance and benefit their own portfolios. Existing contract analysis techniques raise a number of false positives and false negatives in that they simplistically treat data races in a contract as front-running vulnerabilities and can only analyze contracts in isolation. In this work, we formalize the definition of exploitable front-running vulnerabilities based on previous empirical studies on historical attacks, and present Nyx, a novel static analyzer to detect them. Nyx features a Datalog-based preprocessing procedure that efficiently and soundly prunes a large part of the search space, followed by a symbolic validation engine that precisely locates vulnerabilities with an SMT solver. We evaluate Nyx using a large dataset that comprises 513 real-world front-running attacks in smart contracts. Compared to six state-of-the-art techniques, Nyx surpasses them by 32.64%-90.19% in terms of recall and 2.89%-70.89% in terms of precision. Nyx has also identified four zero-days in real-world smart contracts. Wuqi Zhang, Zhuo Zhang 0002, Qingkai Shi, Lu Liu 0024, Lili Wei 0001, Yepang Liu 0001, Xiangyu Zhang 0001, Shing-Chi Cheung |
SP | 8 |
| 2024 | Automatic build repair for test cases using incompatible Java versionsabstractContext: Bug bisection is a common technique used to identify a revision that introduces a bug or indirectly fixes a bug, and often involves executing multiple revisions of a project to determine whether the bug is present within the revision. However, many legacy revisions often cannot be successfully compiled due to changes in the programming language or tools used in the compilation process, adding complexity and preventing automation in the bisection process. Objective: In this paper, we introduce an approach to repair test cases of Java projects by performing dependency minimization. Our approach aims to remove classes and methods that are not required for the execution of one or more test cases. Unlike existing state-of-the-art techniques, our approach performs minimization at source-level, which allows compile-time errors to be fixed. Methods: A standalone Java tool implementing our technique was developed, and we evaluated our technique using subjects from Defects4J retargeted against Java 8 and 17. Results: Our evaluation showed that a majority of subjects can be repaired solely by performing minimization, including replicating the test results of the original version. Furthermore, our technique is also shown to achieve accurate minimized results, while only adding a small overhead to the bisection process. Conclusion: Our proposed technique is shown to be effective for repairing build failures with minimal overhead, making it suitable for use in automated bug bisection. Our tool can also be adapted for use cases such as bug corpus creation and refactoring. Ching Hang Mak, Shing-Chi Cheung |
Inf. Softw. Technol. | 2 |
| 2024 | Shortening Overlong Method Names with AbbreviationsabstractMethods should be named to summarize their responsibilities meaningfully. When a method has a non-trivial responsibility, it may require a naming using multiple words. However, overlong method names are susceptible to typos and reduced readability (e.g., displaying a statement partially in standard screen width or splitting it into multiple lines). Programming naming conventions commonly adopt a maximal length (in characters) for identifiers. In practice, developers may not necessarily find a meaningful name that follows such naming conventions when coding a non-trivial method. This article presents the first automated technique (called NameCompressor ) to shorten overlong method names. Our inspiration is that many lengthy words/phrases in an overlong method name have known and unambiguous abbreviations. The use of these abbreviations for method names is common. To shorten an overlong method name, NameCompressor employs three compression techniques, i.e., context-aware compression, probability-based compression, and machine learning-based compression, to find appropriate abbreviations for the words/phrases in the method name. We evaluate NameCompressor on a dataset of 700 overlong method names. It correctly generates 613 short names identical to those specified by the developers of these methods. Yanjie Jiang, Hui Liu 0003, Shing-Chi Cheung, Lu Zhang 0023 |
ACM Trans. Softw. Eng. Methodol. | 3 |
| 2024 | On the Caching Schemes to Speed Up Program ReductionabstractProgram reduction is a highly practical, widely demanded technique to help debug language tools, such as compilers, interpreters and debuggers. Given a program P that exhibits a property ψ, conceptually, program reduction iteratively applies various program transformations to generate a vast number of variants from P by deleting certain tokens and returns the minimal variant preserving ψ as the result. A program reduction process inevitably generates duplicate variants, and the number of them can be significant. Our study reveals that on average 61.8% and 24.3% of the generated variants in two representative program reducers HDD and Perses, respectively, are duplicates. Checking them against ψ is thus redundant and unnecessary, which wastes time and computation resources. Although it seems that simply caching the generated variants can avoid redundant property tests, such a trivial method is impractical in the real world due to the significant memory footprint. Therefore, a memory-efficient caching scheme for program reduction is in great demand. This study is the first effort to conduct a systematic, extensive analysis of memory-efficient caching schemes for program reduction. We first propose to use two well-known compression methods, ZIP and SHA , to compress the generated variants before they are stored in the cache. Furthermore, our keen understanding on the program reduction process motivates us to propose a novel, domain-specific, both memory and computation-efficient caching scheme, R efreshable C ompact C aching ( RCC ). Our key insight is two-fold: ① by leveraging the correlation between variants and the original program P , we losslessly encode each variant into an equivalent , compact , canonical representation; ② periodically, stale cache entries, which will never be accessed, are timely removed to minimize the memory footprint over time. Our extensive evaluation on 31 real-world C compiler bugs demonstrates that caching schemes help avoid issuing redundant queries by 61.8% and 24.3% in HDD and Perses, respectively; correspondingly, the runtime performance is notably boosted by 22.8% and 18.2%. With regard to the memory efficiency, all three methods use less memory than the state-of-the-art string-based scheme STR . Specifically, ZIP and SHA cut down the memory footprint by more than 80% and 90% in both Perses and HDD compared to STR ; moreover, the highly-scalable, domain-specific RCC dominates peer schemes, and outperforms the SHA by 96.4% and 91.74% in HDD and Perses, respectively. Yongqiang Tian 0001, Yiwen Dong 0002, Mengxiao Zhang 0004, Yu Jiang 0001, Shing-Chi Cheung, Chengnian Sun |
ACM Trans. Softw. Eng. Methodol. | 7 |
| 2024 | Programming by Example Made EasyabstractProgramming by example (PBE) is an emerging programming paradigm that automatically synthesizes programs specified by user-provided input-output examples. Despite the convenience for end-users, implementing PBE tools often requires strong expertise in programming language and synthesis algorithms. Such a level of knowledge is uncommon among software developers. It greatly limits the broad adoption of PBE by the industry. To facilitate the adoption of PBE techniques, we propose a PBE framework called Bee , which leverages an “entity-action” model based on relational tables to ease PBE development for a wide but restrained range of domains. Implementing PBE tools with Bee only requires adapting domain-specific data entities and user actions to tables, with no need to design a domain-specific language or an efficient synthesis algorithm. The synthesis algorithm of Bee exploits bidirectional searching and constraint-solving techniques to address the challenge of value computation nested in table transformation. We evaluated Bee ’s effectiveness on 64 PBE tasks from three different domains and usability with a human study of 12 participants. Evaluation results show that Bee is easier to learn and use than the state-of-the-art PBE framework, and the bidirectional algorithm achieves comparable performance to domain-specifically optimized synthesizers. Lili Wei 0001, Yanyan Jiang 0001, Shing-Chi Cheung, Luyao Ren, Chang Xu 0001 |
ACM Trans. Softw. Eng. Methodol. | 4 |
| 2024 | Word Closure-Based Metamorphic Testing for Machine TranslationabstractWith the wide application of machine translation, the testing of Machine Translation Systems (MTSs) has attracted much attention. Recent works apply Metamorphic Testing (MT) to address the oracle problem in MTS testing. Existing MT methods for MTS generally follow the workflow of input transformation and output relation comparison, which generates a follow-up input sentence by mutating the source input and compares the source and follow-up output translations to detect translation errors, respectively. These methods use various input transformations to generate the test case pairs and have successfully triggered numerous translation errors. However, they have limitations in performing fine-grained and rigorous output relation comparison and thus may report many false alarms and miss many true errors. In this article, we propose a word closure-based output comparison method to address the limitations of the existing MTS MT methods. We first propose word closure as a new comparison unit, where each closure includes a group of correlated input and output words in the test case pair. Word closures suggest the linkages between the appropriate fragment in the source output translation and its counterpart in the follow-up output for comparison. Next, we compare the semantics on the level of word closure to identify the translation errors. In this way, we perform a fine-grained and rigorous semantic comparison for the outputs and thus realize more effective violation identification. We evaluate our method with the test cases generated by five existing input transformations and the translation outputs from three popular MTSs. Results show that our method significantly outperforms the existing works in violation identification by improving the precision and recall and achieving an average increase of 29.9% in F1 score. It also helps to increase the F1 score of translation error localization by 35.9%. Xiaoyuan Xie, Songqiang Chen, Shing-Chi Cheung |
ACM Trans. Softw. Eng. Methodol. | 4 |
| 2024 | MR-Scout: Automated Synthesis of Metamorphic Relations from Existing Test CasesabstractMetamorphic Testing (MT) alleviates the oracle problem by defining oracles based on metamorphic relations (MRs) that govern multiple related inputs and their outputs. However, designing MRs is challenging, as it requires domain-specific knowledge. This hinders the widespread adoption of MT. We observe that developer-written test cases can embed domain knowledge that encodes MRs. Such encoded MRs could be synthesized for testing not only their original programs but also other programs that share similar functionalities. In this article, we propose MR-Scout to automatically synthesize MRs from test cases in open-source software (OSS) projects. MR-Scout first discovers MR-encoded test cases (MTCs), and then synthesizes the encoded MRs into parameterized methods (called codified MRs ), and filters out MRs that demonstrate poor quality for new test case generation. MR-Scout discovered over 11,000 MTCs from 701 OSS projects. Experimental results show that over 97% of codified MRs are of high quality for automated test case generation, demonstrating the practical applicability of MR-Scout . Furthermore, codified-MRs-based tests effectively enhance the test adequacy of programs with developer-written tests, leading to 13.52% and 9.42% increases in line coverage and mutation score, respectively. Our qualitative study shows that 55.76% to 76.92% of codified MRs are easily comprehensible for developers. Congying Xu, Valerio Terragni, Hengcheng Zhu 0001, Shing-Chi Cheung |
ACM Trans. Softw. Eng. Methodol. | 5 |
| 2024 | StubCoder: Automated Generation and Repair of Stub Code for Mock ObjectsabstractMocking is an essential unit testing technique for isolating the class under test from its dependencies. Developers often leverage mocking frameworks to develop stub code that specifies the behaviors of mock objects. However, developing and maintaining stub code is labor-intensive and error-prone. In this article, we present StubCoder to automatically generate and repair stub code for regression testing. StubCoder implements a novel evolutionary algorithm that synthesizes test-passing stub code guided by the runtime behavior of test cases. We evaluated our proposed approach on 59 test cases from 13 open source projects. Our evaluation results show that StubCoder can effectively generate stub code for incomplete test cases without stub code and repair obsolete test cases with broken stub code. Hengcheng Zhu 0001, Lili Wei 0001, Valerio Terragni, Yepang Liu 0001, Shing-Chi Cheung, Qin Sheng, Lihong Song |
ACM Trans. Softw. Eng. Methodol. | 5 |
| 2023 | Revisiting the Evaluation of Deep Learning-Based Compiler TestingabstractA high-quality program generator is essential to effective automated compiler testing. Engineering such a program generator is difficult, time-consuming, and specific to the language under testing, thus requiring tremendous efforts from human experts with language-specific domain knowledge. To avoid repeatedly writing program generators for different languages, researchers recently proposed a language-agnostic approach based on deep learning techniques to automatically learn a program generator (referred to as DLG) from existing programs. Evaluations show that DLGs outperform Language-Specific Program Generators (LSGs) in testing compilers. However, we argue that it is unfair to use LSGs as baselines to evaluate DLGs. LSGs aim to validate compiler optimizations by only generating compilable, well-defined test programs; this restriction inevitably impairs the diversity of the language features used in the generated programs. In contrast, DLGs do not aim to validate the correctness of compiler optimizations, and its generated programs are not guaranteed to be well-defined or even compilable. Therefore, it is not surprising that DLG-generated programs are more diverse in terms of used language features than LSG-generated ones. This study revisits the evaluation of DLGs, and proposes a new, fair, simple yet strong baseline named Kitten for evaluating DLGs. Given a dataset consisting of human-written programs, instead of using deep learning techniques to learn a program generator, Kitten directly derives new programs by mutating the programs in the dataset. Extensive experiments with more than 1,500 CPU-hours demonstrate that the state-of-the-art DLGs fail to compete against such a simple baseline: 3 v.s. 1,750 hang bugs, 1 v.s. 34 distinct compiler crashes. We believe that DLGs still have a large room for improvement. Yongqiang Tian 0001, Yiwen Dong 0002, Chengnian Sun, Shing-Chi Cheung |
IJCAI | 5 |
| 2023 | ωTest: WebView-Oriented Testing for Android ApplicationsabstractWebView is a UI widget that helps integrate web applications into the native context of Android apps. It provides powerful mechanisms for bi-directional interactions between the native-end (Java) and the web-end (JavaScript) of an Android app. However, these interaction mechanisms are complicated and have induced various types of bugs. To mitigate the problem, various techniques have been proposed to detect WebView-induced bugs via dynamic analysis, which heavily relies on executing tests to explore WebView behaviors. Unfortunately, these techniques either require manual effort or adopt random test generation approaches, which are not able to effectively explore diverse WebView behaviors. In this paper, we study the problem of test generation for WebViews in Android apps. Effective test generation for WebViews requires identifying the essential program properties to be covered by the generated tests. To this end, we propose WebView-specific properties to characterize WebView behaviors, and devise a cross-language dynamic analysis method to identify these properties. We develop ωTest, a test generation technique that searches for event sequences covering the identified WebView-specific properties. An evaluation on 74 real-world open-/closed-source Android apps shows that ωTest can cover diverse WebView behaviors and detect WebView-induced bugs effectively. ωTest detected 36 previously-unknown bugs. From the 22 bugs that we have reported to the app developers, 13 bugs were confirmed, 9 of which were fixed. Jiajun Hu, Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung |
ISSTA | 4 |
| 2023 | ConfFix: Repairing Configuration Compatibility Issues in Android AppsabstractXML configuration files are widely-used to specify the user interfaces (UI) of Android apps. Configuration compatibility (CC) issues are induced owing to the inconsistent handling of such XML configuration files across different Android framework versions. CC issues can cause software crashes and inconsistent look-and-feels, severely impacting the user experience of Android apps. However, there is no universal solution to resolve CC issues and app developers need to handle CC issues case by case. Existing tools are designed based on predefined rules or visual features that are possibly manifested by CC issues. Unfortunately, they can fail or generate overfitting patches when the CC issues are beyond their capabilities. To fill the above research gaps, we first empirically studied the app developers' common strategies in patching real-world CC issues. Based on the findings, we propose ConfFix, an automatic approach to repair CC issues in Android apps. ConfFix is driven by the knowledge of how an XML element is handled inconsistently in different versions of the Android framework and generates patches to eliminate such inconsistencies. We evaluated ConfFix on a set of 77 reproducible CC issues in 13 open-source Android apps. The results show that ConfFix outperforms baselines in successfully repairing 64 CC issues with a high precision. Encouragingly, the patches for 38 CC issues have been confirmed and merged by app developers. Huaxun Huang, Ming Wen 0001, Yepang Liu 0001, Shing-Chi Cheung |
ISSTA | 5 |
| 2023 | Fuzzing Deep Learning Compilers with HirGenabstractDeep Learning (DL) compilers are widely adopted to optimize advanced DL models for efficient deployment on diverse hardware. Their quality has a profound effect on the quality of compiled DL models. A recent bug study shows that the optimization of high-level intermediate representations (IRs) is the most error-prone compilation stage and bugs in this stage account for 44.92% of the whole collected ones. However, existing testing techniques do not consider the features related to high-level optimization (e.g., the high-level IR), and are therefore weak in exposing bugs at this stage. To bridge this gap, we propose HirGen, an automated testing technique that effectively exposes coding mistakes in the optimization of high-level IRs. The design of HirGen includes 1) three coverage criteria to generate diverse and valid computational graphs; 2) the use of the high-level IR’s language features to generate diverse IRs; 3) three test oracles of which two are inspired by metamorphic testing and differential testing. HirGen has successfully detected 21 bugs that occur at TVM, with 17 bugs confirmed and 12 fixed. Further, we construct four baselines using state-of-the-art DL compiler fuzzers that can cover the high-level optimization stage. Our experiment results show that HirGen can detect 10 crashes and inconsistencies that cannot be detected by the baselines in 48 hours. We also evaluate the usefulness of our proposed coverage criteria and test oracles. Qingchao Shen, Yongqiang Tian 0001, Junjie Chen 0003, Shing-Chi Cheung |
ISSTA | 5 |
| 2023 | Nuances are the Key: Unlocking ChatGPT to Find Failure-Inducing Tests with Differential PromptingabstractAutomated detection of software failures is an important but challenging software engineering task. It involves finding in a vast search space the failure-inducing test cases that contain an input triggering the software fault and an oracle asserting the incorrect execution. We are motivated to study how far this outstanding challenge can be solved by recent advances in large language models (LLMs) such as ChatGPT. However, our study reveals that ChatGPT has a relatively low success rate (28.8%) in finding correct failure-inducing test cases for buggy programs. A possible conjecture is that finding failure-inducing test cases requires analyzing the subtle differences (nuances) between the tokens of a program's correct version and those for its buggy version. When these two versions have similar sets of tokens and attentions, ChatGPT is weak in distinguishing their differences. We find that ChatGPT can successfully generate failure-inducing test cases when it is guided to focus on the nuances. Our solution is inspired by an interesting observation that ChatGPT could infer the intended functionality of buggy code if it is similar to the correct version. Driven by the inspiration, we develop a novel technique, called Differential Prompting, to effectively find failure-inducing test cases with the help of the compilable code synthesized by the inferred intention. Prompts are constructed based on the nuances between the given version and the synthesized code. We evaluate Differential Prompting on Quixbugs (a popular benchmark of buggy programs) and recent programs published at Codeforces (a popular programming contest portal, which is also an official benchmark of ChatGPT). We compare Differential Prompting with two baselines constructed using conventional ChatGPT prompting and Pynguin (the state-of-the-art unit test generation tool for Python programs). Our evaluation results show that for programs of Quixbugs, Differential Prompting can achieve a success rate of 75.0% in finding failure-inducing test cases, outperforming the best baseline by 2.6X. For programs of Codeforces, Differential Prompting's success rate is 66.7%, outperforming the best baseline by 4.0X. Tsz On Li, Wenxi Zong, Yibo Wang 0008, Haoye Tian, Ying Wang 0038, Shing-Chi Cheung, Jeff Kramer |
ASE | 6 |
| 2023 | Testing Coreference Resolution Systems without Labeled Test SetsabstractCoreference resolution (CR) is a task to resolve different expressions (e.g., named entities, pronouns) that refer to the same real-world en- tity/event. It is a core natural language processing (NLP) component that underlies and empowers major downstream NLP applications such as machine translation, chatbots, and question-answering. De- spite its broad impact, the problem of testing CR systems has rarely been studied. A major difficulty is the shortage of a labeled dataset for testing. While it is possible to feed arbitrary sentences as test inputs to a CR system, a test oracle that captures their expected test outputs (coreference relations) is hard to define automatically. To address the challenge, we propose Crest, an automated testing methodology for CR systems. Crest uses constituency and depen- dency relations to construct pairs of test inputs subject to the same coreference. These relations can be leveraged to define the meta- morphic relation for metamorphic testing. We compare Crest with five state-of-the-art test generation baselines on two popular CR systems, and apply them to generate tests from 1,000 sentences randomly sampled from CoNLL-2012, a popular dataset for corefer- ence resolution. Experimental results show that Crest outperforms baselines significantly. The issues reported by Crest are all true positives (i.e., 100% precision), compared with 63% to 75% achieved by the baselines. Jialun Cao, Yaojie Lu 0001, Ming Wen 0001, Shing-Chi Cheung |
ESEC/SIGSOFT FSE | 4 |
| 2023 | Understanding the Bug Characteristics and Fix Strategies of Federated Learning SystemsabstractFederated learning (FL) is an emerging machine learning paradigm that aims to address the problem of isolated data islands. To preserve privacy, FL allows machine learning models and deep neural networks to be trained from decentralized data kept privately at individual devices. FL has been increasingly adopted in missioncritical fields such as finance and healthcare. However, bugs in FL systems are inevitable and may result in catastrophic consequences such as financial loss, inappropriate medical decision, and violation of data privacy ordinance. While many recent studies were conducted to understand the bugs in machine learning systems, there is no existing study to characterize the bugs arising from the unique nature of FL systems. To fill the gap, we collected 395 real bugs from six popular FL frameworks (Tensorflow Federated, PySyft, FATE, Flower, PaddleFL, and Fedlearner) in GitHub and StackOverflow, and then manually analyzed their symptoms and impacts, prone stages, root causes, and fix strategies. Furthermore, we report a series of findings and actionable implications that can potentially facilitate the detection of FL bugs. Xiaohu Du, Xiao Chen 0026, Jialun Cao, Ming Wen 0001, Shing-Chi Cheung, Hai Jin 0001 |
ESEC/SIGSOFT FSE | 5 |
| 2023 | Can Machine Learning Pipelines Be Better Configured?abstractA Machine Learning (ML) pipeline configures the workflow of a learning task using the APIs provided by ML libraries. However, a pipeline’s performance can vary significantly across different configurations of ML library versions. Misconfigured pipelines can result in inferior performance, such as poor execution time and memory usage, numeric errors and even crashes. A pipeline is subject to misconfiguration if it exhibits significantly inconsistent performance upon changes in the versions of its configured libraries or the combination of these libraries. We refer to such performance inconsistency as a pipeline configuration (PLC) issue. Yibo Wang 0008, Ying Wang 0038, Yue Yu 0001, Shing-Chi Cheung, Hai Yu 0001, Zhiliang Zhu 0001 |
ESEC/SIGSOFT FSE | 5 |
| 2023 | Neural-FEBI: Accurate function identification in Ethereum Virtual Machine bytecodeabstractMillions of smart contracts have been deployed onto the Ethereum platform, posing potential attack subjects. Therefore, analyzing contract binaries is vital since their sources are unavailable, involving identification comprising function entry identification and detecting its boundaries. Such boundaries are critical to many smart contract applications, e.g. reverse engineering and profiling. Unfortunately, it is challenging to identify functions from these stripped contract binaries due to the lack of internal function call statements and the compiler-inducing instruction reshuffling. Recently, several existing works excessively relied on a set of handcrafted heuristic rules which impose several faults. To address this issue, we propose a novel neural network-based framework for EVM bytecode Function Entries and Boundaries Identification (neural-FEBI) that does not rely on a fixed set of handcrafted rules. Instead, it used a two-level bi-Long Short-Term Memory network and a Conditional Random Field network to locate the function entries. The suggested framework also devises a control flow traversal algorithm to determine the code segments reachable from the function entry as its boundary. Several experiments on 38,996 publicly available smart contracts collected as binary demonstrate that neural-FEBI confirms the lowest and highest F1-scores for the function entries identification task across different datasets of 88.3 to 99.7, respectively. Its performance on the function boundary identification task is also increased from 79.4% to 97.1% compared with state-of-the-art. We further demonstrate that the identified function information can be used to construct more accurate intra-procedural CFGs and call graphs. The experimental results confirm that the proposed framework significantly outperforms state-of-the-art, often based on handcrafted heuristic rules. Shuangyin Li, Shing-Chi Cheung, Gansen Zhao, Jinji Yang |
J. Syst. Softw. | 4 |
| 2023 | COMET: Coverage-guided Model Generation For Deep Learning Library TestingabstractRecent deep learning (DL) applications are mostly built on top of DL libraries. The quality assurance of these libraries is critical to the dependable deployment of DL applications. Techniques have been proposed to generate various DL models and apply them to test these libraries. However, their test effectiveness is constrained by the diversity of layer API calls in their generated DL models. Our study reveals that these techniques can cover at most 34.1% layer inputs, 25.9% layer parameter values, and 15.6% layer sequences. As a result, we find that many bugs arising from specific layer API calls (i.e., specific layer inputs, parameter values, or layer sequences) can be missed by existing techniques. Because of this limitation, we propose COMET to effectively generate DL models with diverse layer API calls for DL library testing. COMET: (1) designs a set of mutation operators and a coverage-based search algorithm to diversify layer inputs, layer parameter values, and layer sequences in DL models. (2) proposes a model synthesis method to boost the test efficiency without compromising the layer API call diversity. Our evaluation result shows that COMET outperforms baselines by covering twice as many layer inputs (69.7% vs. 34.1%), layer parameter values (50.2% vs. 25.9%), and layer sequences (39.0% vs. 15.6%) as those by the state-of-the-art. Moreover, COMET covers 3.4% more library branches than those by existing techniques. Finally, COMET detects 32 new bugs in the latest version of eight popular DL libraries, including TensorFlow and MXNet, with 21 of them confirmed by DL library developers and seven of those confirmed bugs have been fixed by developers. Meiziniu Li, Jialun Cao, Yongqiang Tian 0001, Tsz On Li, Ming Wen 0001, Shing-Chi Cheung |
ACM Trans. Softw. Eng. Methodol. | 6 |
| 2023 | Finding Deviated Behaviors of the Compressed DNN Models for Image ClassificationsabstractModel compression can significantly reduce the sizes of deep neural network (DNN) models and thus facilitate the dissemination of sophisticated, sizable DNN models, especially for deployment on mobile or embedded devices. However, the prediction results of compressed models may deviate from those of their original models. To help developers thoroughly understand the impact of model compression, it is essential to test these models to find thosedeviated behaviorsbefore dissemination. However, this is a non-trivial task, because the architectures and gradients of compressed models are usually not available. To this end, we proposeDflare, a novel, search-based, black-box testing technique to automatically find triggering inputs that result in deviated behaviors in image classification tasks.Dflareiteratively applies a series of mutation operations to a given seed image until a triggering input is found. For better efficacy and efficiency,Dflaremodels the search problem as Markov Chains and leverages the Metropolis-Hasting algorithm to guide the selection of mutation operators in each iteration. Further,Dflareutilizes a novel fitness function to prioritize the mutated inputs that either cause large differences between two models’ outputs or trigger previously unobserved models’ probability vectors. We evaluatedDflareon 21 compressed models for image classification tasks with three datasets. The results show thatDflarenot only constantly outperforms the baseline in terms of efficacy but also significantly improves the efficiency:Dflareis 17.84×–446.06× as fast as the baseline in terms of time; the number of queries required byDflareto find one triggering input is only 0.186–1.937% of those issued by the baseline. We also demonstrated that the triggering inputs found byDflarecan be used to repair up to 48.48% deviated behaviors in image classification tasks and further decrease the effectiveness ofDflareon the repaired models. Yongqiang Tian 0001, Wuqi Zhang, Ming Wen 0001, Shing-Chi Cheung, Chengnian Sun, Shiqing Ma, Yu Jiang 0001 |
ACM Trans. Softw. Eng. Methodol. | 4 |
| 2023 | Plumber: Boosting the Propagation of Vulnerability Fixes in the npm EcosystemabstractVulnerabilities are known reported security threats that affect a large amount of packages in thenpmecosystem. To mitigate these security threats, the open-source community strongly suggests vulnerable packages to timely publish vulnerability fixes and recommends affected packages to update their dependencies. However, there are still serious lags in the propagation of vulnerability fixes in the ecosystem. In our preliminary study on the latest versions of 356,283 activenpmpackages, we found that 20.0% of them can still introduce vulnerabilities via direct or transitive dependencies although the involved vulnerable packages have already published fix versions for over a year. Prior study by (Chinthanet et al. 2021) lays the groundwork for research on how to mitigate propagation lags of vulnerability fixes in an ecosystem. They conducted an empirical investigation to identify lags that might occur between the vulnerable package release and its fixing release. They found that factors such as the branch upon which a fix landed and the severity of the vulnerability had a small effect on its propagation trajectory throughout the ecosystem. To ensure quick adoption and propagation of a release that contains the fix, they gave several actionable advice to developers and researchers. However, it is still an open question how to design an effective technique to accelerate the propagation of vulnerability fixes. Motivated by this problem, in this paper, we conducted an empirical study to learn the scale of packages that block the propagation of vulnerability fixes in the ecosystem and investigate their evolution characteristics. Furthermore, we distilled the remediation strategies that have better effects on mitigating the fix propagation lags. Leveraging our empirical findings, we propose an ecosystem-level technique,Plumber, for deriving feasible remediation strategies to boost the propagation of vulnerability fixes. To precisely diagnose the causes of fix propagation blocking,Plumbermodels the vulnerability metadata, andnpmdependency metadata and continuously monitors their evolution. By analyzing a full-picture of the ecosystem-level dependency graph and the corresponding fix propagation statuses, it derives remediation schemes for pivotal packages. In the schemes,Plumberprovides customized remediation suggestions with vulnerability impact analysis to arouse package developers’ awareness. We appliedPlumberto generating 268 remediation reports for the identified pivotal packages, to evaluate its remediation effectiveness based on developers’ feedback. Encouragingly, 47.4% our remediation reports received positive feedback from many well-knownnpmprojects, such asTensorflow/tfjs,Ethers.js, andGoogleChrome/workbox. Our reports have boosted the propagation of vulnerability fixes into 16,403 root packages through 92,469 dependency paths. On average, each remediated package version is receiving 72,678 downloads per week by the time of this work. Ying Wang 0038, Lin Pei, Yue Yu 0001, Chang Xu 0001, Shing-Chi Cheung, Hai Yu 0001, Zhiliang Zhu 0001 |
IEEE Trans. Software Eng. | 6 |
| 2023 | Runtime Permission Issues in Android Apps: Taxonomy, Practices, and Ways ForwardabstractAndroid introduces a new permission model that allows apps to request permissions at runtime rather than at the installation time since 6.0 (Marshmallow, API level 23). While this runtime permission model provides users with greater flexibility in controlling an app's access to sensitive data and system features, it brings new challenges to app development. First, as users may grant or revoke permissions at any time while they are using an app, developers need to ensure that the app properly checks and requests required permissions before invoking any permission-protected APIs. Second, Android's permission mechanism keeps evolving and getting customized by device manufacturers. Developers are expected to comprehensively test their apps on different Android versions and device models to make sure permissions are properly requested in all situations. Unfortunately, these requirements are often impractical for developers. In practice, many Android apps suffer from various runtime permission issues (ARP issues). While existing studies have explored ARP issues, the understanding of such issues is still preliminary. To better characterize ARP issues, we performed an empirical study using 135 Stack Overflow posts that discuss ARP issues and 199 real ARP issues archived in popular open-source Android projects on GitHub. Via analyzing the data, we observed 11 types of ARP issues that commonly occur in Android apps. For each type of issues, we systematically studied: (1) how they can be manifested, (2) how pervasive and serious they are in real-world apps, and (3) how they can be fixed. We also analyzed the evolution trend of different types of issues from 2015 to 2020 to understand their impact on the Android ecosystem. Furthermore, we conducted a field survey and in-depth interviews among the practitioners from open-source community and industry, to gain insights from practitioners’ practices and learn their requirements of tools that can help combat ARP issues. Finally, to understand the strengths and weaknesses of the existing tools that can detect ARP issues, we builtARPBench, an open benchmark consisting of 94 real ARP issues, and evaluated the performance of three available tools. The experimental results indicate that the existing tools have very limited supports for detecting our observed issue types and report a large number of false alarms. We further analyzed the tools’ limitations and summarized the challenges of designing an effective ARP issue detection technique. We hope that our findings can shed light on future research and provide useful guidance to practitioners. Ying Wang 0038, Yibo Wang 0008, Yepang Liu 0001, Chang Xu 0001, Shing-Chi Cheung, Hai Yu 0001, Zhiliang Zhu 0001 |
IEEE Trans. Software Eng. | 6 |
| 2023 | Combatting Front-Running in Smart Contracts: Attack Mining, Benchmark Construction and Vulnerability Detector EvaluationabstractFront-running attacks have been a major concern on the blockchain. Attackers launch front-running attacks by inserting additional transactions before upcoming victim transactions to manipulate victim transaction executions and make profits. Recent studies have shown that front-running attacks are prevalent on the Ethereum blockchain and have caused millions of US dollars loss. It is the vulnerabilities in smart contracts, which are blockchain programs invoked by transactions, that enable the front-running attack opportunities. Although techniques to detect front-running vulnerabilities have been proposed, their performance on real-world vulnerable contracts is unclear. There is no large-scale benchmark based on real attacks to evaluate their capabilities. We make four contributions in this paper. First, we design an effective algorithm to mine real-world attacks in the blockchain history. The evaluation shows that our mining algorithm is more effective and comprehensive, achieving higher recall in finding real attacks than the previous study. Second, we propose an automated and scalable vulnerability localization approach to localize code snippets in smart contracts that enable front-running attacks. The evaluation also shows that our localization approaches are effective in achieving higher precision in pinpointing vulnerabilities compared to the baseline technique. Third, we build a benchmark consisting of 513 real-world attacks with vulnerable code labeled in 235 distinct smart contracts, which is useful to help understand the nature of front-running attacks, vulnerabilities in smart contracts, and evaluate vulnerability detection techniques. Last but not least, we conduct an empirical evaluation of seven state-of-the-art vulnerability detection techniques on our benchmark. The evaluation experiment reveals the inadequacy of existing techniques in detecting front-running vulnerabilities, with a low recall of$\leq$6.04%. Our further analysis identifies four common limitations in existing techniques: lack of support for inter-contract analysis, inefficient constraint solving for cryptographic operations, improper vulnerability patterns, and lack of token support. Wuqi Zhang, Lili Wei 0001, Shing-Chi Cheung, Yepang Liu 0001, Shuqing Li 0001, Lu Liu 0024, Michael R. Lyu |
IEEE Trans. Software Eng. | 3 |
| 2022 | DeepFD: Automated Fault Diagnosis and Localization for Deep Learning ProgramsabstractAs Deep Learning (DL) systems are widely deployed for mission-critical applications, debugging such systems becomes essential. Most existing works identify and repair suspicious neurons on the trained Deep Neural Network (DNN), which, unfortunately, might be a detour. Specifically, several existing studies have reported that many unsatisfactory behaviors are actually originated from the faults residing in DL programs. Besides, locating faulty neurons is not actionable for developers, while locating the faulty statements in DL programs can provide developers with more useful information for debugging. Though a few recent studies were proposed to pinpoint the faulty statements in DL programs or the training settings (e.g. too large learning rate), they were mainly designed based on predefined rules, leading to many false alarms or false negatives, especially when the faults are beyond their capabilities. Jialun Cao, Meiziniu Li, Xiao Chen 0026, Ming Wen 0001, Yongqiang Tian 0001, Bo Wu 0018, Shing-Chi Cheung |
ICSE | 7 |
| 2022 | Nufix: Escape From NuGet Dependency MazeabstractDevelopers usually suffer from dependency maze (DM) issues, i.e., package dependency constraints are violated when a project's platform or dependencies are changed. This problem is especially serious in .NET ecosystem due to its fragmented platforms (e.g., .NET Framework, .NET Core, and .NET Standard). Fixing DM issues is challenging due to the complexity of dependency constraints: multiple DM issues often occur in one project; solving one DM issue usually causes another DM issue cropping up; the exponential search space of possible dependency combinations is also a barrier. Zhenming Li, Ying Wang 0038, Zeqi Lin, Shing-Chi Cheung, Jian-Guang Lou |
ICSE | 4 |
| 2022 | APER: Evolution-Aware Runtime Permission Misuse Detection for Android AppsabstractThe Android platform introduces the runtime permission model in version 6.0. The new model greatly improves data privacy and user experience, but brings new challenges for app developers. First, it allows users to freely revoke granted permissions. Hence, developers cannot assume that the permissions granted to an app would keep being granted. Instead, they should make their apps carefully check the permission status before invoking dangerous APIs. Second, the permission specification keeps evolving, bringing new types of compatibility issues into the ecosystem. To understand the impact of the challenges, we conducted an empirical study on 13,352 popular Google Play apps. We found that 86.0% apps used dangerous APIs asynchronously after permission management and 61.2% apps used evolving dangerous APIs. If an app does not properly handle permission revocations or platform differences, unexpected runtime issues may happen and even cause app crashes. We call such Android Runtime Permission issues as ARP bugs. Unfortunately, existing runtime permission issue detection tools cannot effectively deal with the ARP bugs induced by asynchronous permission management and permission specification evolution. To fill the gap, we designed a static analyzer, Aper, that performs reaching definition and dominator analysis on Android apps to detect the two types of ARP bugs. To compare Aper with existing tools, we built a benchmark, ARPfix, from 60 real ARP bugs. Our experiment results show that Aper significantly outperforms two academic tools, ARPDroid and RevDroid, and an industrial tool, Lint, on ARPfix, with an average improvement of 46.3% on F1-score. In addition, Aper successfully found 34 ARP bugs in 214 open-source Android apps, most of which can result in abnormal app behaviors (such as app crashes) according to our manual validation. We reported these bugs to the app developers. So far, 17 bugs have been confirmed and seven have been fixed. Yibo Wang 0006, Xian Zhan, Ying Wang 0038, Yepang Liu 0001, Xiapu Luo, Shing-Chi Cheung |
ICSE | 7 |
| 2022 | Insight: Exploring Cross-Ecosystem Vulnerability ImpactsabstractVulnerabilities, referred to as CLV issues, are induced by cross-language invocations of vulnerable libraries. Such issues greatly increase the attack surface of Python/Java projects due to their pervasive use of C libraries. Existing Python/Java build tools in PyPI and Maven ecosystems fail to report the dependency on vulnerable libraries written in other languages such as C. CLV issues are easily missed by developers. In this paper, we conduct the first empirical study on the status quo of CLV issues in PyPI and Maven ecosystems. It is found that 82,951 projects in these ecosystems are directly or indirectly dependent on libraries compiled from the C project versions that are identified to be vulnerable in CVE reports. Our study arouses the awareness of CLV issues in popular ecosystems and presents related analysis results. Meiqiu Xu, Ying Wang 0038, Shing-Chi Cheung, Hai Yu 0001, Zhiliang Zhu 0001 |
ASE | 3 |
| 2022 | RegexScalpel: Regular Expression Denial of Service (ReDoS) Defense by Localize-and-Fix
Yeting Li, Yecheng Sun, Zhiwu Xu 0001, Jialun Cao, Yuekang Li, Rongchen Li, Haiming Chen 0001, Shing-Chi Cheung, Yang Liu 0003, Yang Xiao 0011 |
USENIX Security Symposium | 8 |
| 2022 | Multi-Constraint Adversarial Networks for Unsupervised Image-to-Image TranslationabstractUnsupervised image-to-image translation aims to learn the mapping from an input image in a source domain to an output image in a target domain without paired training dataset. Recently, remarkable progress has been made in translation due to the development of generative adversarial networks (GANs). However, existing methods suffer from the training instability as gradients passing from discriminator to generator become less informative when the source and target domains exhibit sufficiently large discrepancies in appearance or shape. To handle this challenging problem, in this paper, we propose a novel multi-constraint adversarial model (MCGAN) for image translation in which multiple adversarial constraints are applied at generator's multi-scale outputs by a single discriminator to pass gradients to all the scales simultaneously and assist generator training for capturing large discrepancies in appearance between two domains. We further notice that the solution to regularize generator is helpful in stabilizing adversarial training, but results may have unreasonable structure or blurriness due to less context information flow from discriminator to generator. Therefore, we adopt dense combinations of the dilated convolutions at discriminator for supporting more information flow to generator. With extensive experiments on three public datasets, cat-to-dog, horse-to-zebra, and apple-to-orange, our method significantly improves state-of-the-arts on all datasets. Divya Saxena, Tarun Kulshrestha, Jiannong Cao 0001, Shing-Chi Cheung |
IEEE Trans. Image Process. | 4 |
| 2022 | SemMT: A Semantic-Based Testing Approach for Machine Translation SystemsabstractMachine translation has wide applications in daily life. In mission-critical applications such as translating official documents, incorrect translation can have unpleasant or sometimes catastrophic consequences. This motivates recent research on the testing methodologies for machine translation systems. Existing methodologies mostly rely on metamorphic relations designed at the textual level (e.g., Levenshtein distance) or syntactic level (e.g., distance between grammar structures) to determine the correctness of translation results. However, these metamorphic relations do not consider whether the original and the translated sentences have the same meaning (i.e., semantic similarity). To address this problem, in this article we propose SemMT, an automatic testing approach for machine translation systems based on semantic similarity checking. SemMT applies round-trip translation and measures the semantic similarity between the original and the translated sentences. Our insight is that the semantics concerning logical relations and quantifiers in sentences can be captured by regular expressions (or deterministic finite automata) where efficient semantic equivalence/similarity checking algorithms can be applied. Leveraging the insight, we propose three semantic similarity metrics and implement them in SemMT. We compared SemMT with related state-of-the-art testing techniques, demonstrating the effectiveness of mistranslation detection. The experiment results show that SemMT outperforms existing metrics, achieving an increase of 34.2% and 15.4% on accuracy and F-score, respectively. We also study the possibility of further enhancing the performance by combining various metrics. Finally, we discuss a solution to locate the suspicious trip in round-trip translation, which provides hints for bug diagnosis. Jialun Cao, Meiziniu Li, Yeting Li, Ming Wen 0001, Shing-Chi Cheung, Haiming Chen 0001 |
ACM Trans. Softw. Eng. Methodol. | 5 |
| 2022 | Will Dependency Conflicts Affect My Program's Semantics?abstractJava projects are often built on top of various third-party libraries. If multiple versions of a library exist on the classpath, JVM will only load one version and shadow the others, which we refer to asdependency conflicts. This would give rise tosemantic conflict(SC) issues, if the library APIs referenced by a project have identical method signatures but inconsistent semantics across the loaded and shadowed versions of libraries. SC issues are difficult for developers to diagnose in practice, since understanding them typically requires domain knowledge. Although adapting the existing test generation technique for dependency conflict issues,Riddle, to detect SC issues is feasible, its effectiveness is greatly compromised. This is mainly becauseRiddlerandomly generates test inputs, while the SC issues typically require specific arguments in the tests to be exposed. To address that, we conducted an empirical study of 316 real SC issues to understand the characteristics of such specific arguments in the test cases that can capture the SC issues. Inspired by our empirical findings, we propose an automated testing techniqueSensor, which synthesizes test cases using ingredients from the project under test to trigger inconsistent behaviors of the APIs with the same signatures in conflicting library versions. Our evaluation results show thatSensoris effective and useful: it achieved a$Precision$of 0.898 and a$Recall$of 0.725 on open-source projects and a$Precision$of 0.821 on industrial projects; it detected 306 semantic conflict issues in 50 projects, 70.4 percent of which had been confirmed as real bugs, and 84.2 percent of the confirmed issues have been fixed quickly. Ying Wang 0038, Rongxin Wu, Ming Wen 0001, Yepang Liu 0001, Shing-Chi Cheung, Hai Yu 0001, Chang Xu 0001, Zhiliang Zhu 0001 |
IEEE Trans. Software Eng. | 6 |
| 2021 | TRANSREGEX: Multi-modal Regular Expression Synthesis by Generate-and-RepairabstractSince regular expressions (abbrev. regexes) are difficult to understand and compose, automatically generating regexes has been an important research problem. This paper introduces TransRegex, for automatically constructing regexes from both natural language descriptions and examples. To the best of our knowledge, TransRegex is the first to treat the NLP-and-example-based regex synthesis problem as the problem of NLP-based synthesis with regex repair. For this purpose, we present novel algorithms for both NLP-based synthesis and regex repair. We evaluate TransRegex with ten relevant state-of-the-art tools on three publicly available datasets. The evaluation results demonstrate that the accuracy of our TransRegex is 17.4%, 35.8% and 38.9% higher than that of NLP-based approaches on the three datasets, respectively. Furthermore, TransRegex can achieve higher accuracy than the state-of-the-art multi-modal techniques with 10% to 30% higher accuracy on all three datasets. The evaluation results also indicate TransRegex utilizing natural language and examples in a more effective way. Yeting Li, Shuaimin Li, Zhiwu Xu 0001, Jialun Cao, Haiming Chen 0001, Shing-Chi Cheung |
ICSE | 8 |
| 2021 | HERO: On the Chaos When PATH Meets ModulesabstractEver since its first release in 2009, the Go programming language (Golang) has been well received by software communities. A major reason for its success is the powerful support of library-based development, where a Golang project can be conveniently built on top of other projects by referencing them as libraries. As Golang evolves, it recommends the use of a new library-referencing mode to overcome the limitations of the original one. While these two library modes are incompatible, both are supported by the Golang ecosystem. The heterogeneous use of library-referencing modes across Golang projects has caused numerous dependency management (DM) issues, incurring reference inconsistencies and even build failures. Motivated by the problem, we conducted an empirical study to characterize the DM issues, understand their root causes, and examine their fixing solutions. Based on our findings, we developed Hero, an automated technique to detect DM issues and suggest proper fixing solutions. We applied Hero to 19,000 popular Golang projects. The results showed that Hero achieved a high detection rate of 98.5% on a DM issue benchmark and found 2,422 new DM issues in 2,356 popular Golang projects. We reported 280 issues, among which 181 (64.6%) issues have been confirmed, and 160 of them (88.4%) have been fixed or are under fixing. Almost all the fixes have adopted our fixing suggestions. Ying Wang 0038, Liang Qiao 0002, Chang Xu 0001, Yepang Liu 0001, Shing-Chi Cheung, Na Meng 0001, Hai Yu 0001, Zhiliang Zhu 0001 |
ICSE | 5 |
| 2021 | Characterizing and Detecting Configuration Compatibility Issues in Android AppsabstractXML configuration files are widely used in Android to define an app’s user interface and essential runtime information such as system permissions. As Android evolves, it might introduce functional changes in the configuration environment, thus causing compatibility issues that manifest as inconsistent app behaviors at different API levels. Such issues can often induce software crashes and inconsistent look-and-feel when running at specific Android versions. Existing works incur plenty of false positive and false negative issue-detection rules by conducting trivial data-flow analysis while failing to model the XML tree hierarchies of the Android configuration files. Besides, little is known about how the changes in an Android framework can induce such compatibility issues. To bridge such gaps, we conducted a systematic study by analyzing 196 real-world issues collected from 43 popular apps. We identified common patterns of Android framework code changes that induce such configuration compatibility issues. Based on the findings, we propose CONFDROID that can automatically extract rules for detecting configuration compatibility issues. The intuition is to perform symbolic execution based on a model learned from the common code change patterns. Experiment results show that CONFDROID can successfully extract 282 valid issue-detection rules with a precision of 91.9%. Among them, 65 extracted rules can manifest issues that cannot be detected by the rules of state-of-the-art baselines. More importantly, 11 out of them have led to the detection of 107 reproducible configuration compatibility issues that the baselines cannot detect in 30 out of 316 real-world Android apps. Huaxun Huang, Ming Wen 0001, Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung |
ASE | 5 |
| 2021 | Characterizing Transaction-Reverting Statements in Ethereum Smart ContractsabstractSmart contracts are programs stored on blockchains to execute transactions. When input constraints or security properties are violated at runtime, the transaction being executed by a smart contract needs to be reverted to avoid undesirable consequences. On Ethereum, the most popular blockchain that supports smart contracts, developers can choose among three transaction-reverting statements (i.e., require, if…revert, and if…throw) to handle anomalous transactions. While these transaction-reverting statements are vital for preventing smart contracts from exhibiting abnormal behaviors or suffering malicious attacks, there is limited understanding of how they are used in practice. In this work, we perform the first empirical study to characterize transaction-reverting statements in Ethereum smart contracts. We measured the prevalence of these statements in 3,866 verified smart contracts from popular dapps and built a taxonomy of their purposes via manually analyzing 557 transaction-reverting statements. We also compared template contracts and their corresponding custom contracts to understand how developers customize the use of transaction-reverting statements. Finally, we analyzed the security impact of transaction-reverting statements by removing them from smart contracts and comparing the mutated contracts against the original ones. Our study led to important findings. For example, we found that transaction-reverting statements are commonly used to perform seven types of authority verifications or validity checks, and missing such statements may compromise the security of smart contracts. We also found that current smart contract security analyzers cannot effectively handle transaction-reverting statements when detecting security vulnerabilities. Our findings can shed light on further research in the broad area of smart contract quality assurance and provide practical guidance to smart contract developers on the appropriate use of transaction-reverting statements. Lu Liu 0024, Lili Wei 0001, Wuqi Zhang, Ming Wen 0001, Yepang Liu 0001, Shing-Chi Cheung |
ASE | 6 |
| 2021 | A comprehensive study of deep learning compiler bugsabstractThere are increasing uses of deep learning (DL) compilers to generate optimized code, boosting the runtime performance of DL models on specific hardware. Like their traditional counterparts, DL compilers can generate incorrect code, resulting in unexpected model behaviors that may cause catastrophic consequences in mission-critical systems. On the other hand, the DL models processed by DL compilers differ fundamentally from imperative programs in that the program logic in DL models is implicit. As such, various characteristics of the bugs arising from traditional compilers need to be revisited in the context of DL compilers. Qingchao Shen, Junjie Chen 0003, Yongqiang Tian 0001, Shing-Chi Cheung, Xiang Chen 0005 |
ESEC/SIGSOFT FSE | 5 |
| 2021 | ÐArcher: detecting on-chain-off-chain synchronization bugs in decentralized applicationsabstractSince the emergence of Ethereum, blockchain-based decentralized applications (DApps) have become increasingly popular and important. To balance the security, performance, and costs, a DApp typically consists of two layers: an on-chain layer to execute transactions and store crucial data on the blockchain and an off-chain layer to interact with users. A DApp needs to synchronize its off-chain layer with the on-chain layer proactively. Otherwise, the inconsistent data in the off-chain layer could mislead users and cause undesirable consequences, e.g., loss of transaction fees. However, transactions sent to the blockchain are not guaranteed to be executed and could even be reversed after execution due to chain reorganization. Such non-determinism in the transaction execution is unique to blockchain. DApp developers may fail to perform the on-chain-off-chain synchronization accurately due to their lack of familiarity with the complex transaction lifecycle. In this work, we investigate the challenges of synchronizing on-chain and off-chain data in Ethereum-based DApps. We present two types of bugs that could result in inconsistencies between the on-chain and off-chain layers. To help detect such on-chain-off-chain synchronization bugs, we introduce a state transition model to guide the testing of DApps and propose two effective oracles to facilitate the automatic identification of bugs. We build the first testing framework, ÐArcher, to detect on-chain-off-chain synchronization bugs in DApps. We have evaluated ÐArcher on 11 popular real-world DApps. ÐArcher achieves high precision (99.3%), recall (87.6%), and accuracy (89.4%) in bug detection and significantly outperforms the baseline methods. It has found 15 real bugs in the 11 DApps. So far, six of the 15 bugs have been confirmed by the developers, and three have been fixed. These promising results demonstrate the usefulness of ÐArcher. Wuqi Zhang, Lili Wei 0001, Shuqing Li 0001, Yepang Liu 0001, Shing-Chi Cheung |
ESEC/SIGSOFT FSE | 5 |
| 2021 | ReDoSHunter: A Combined Static and Dynamic Approach for Regular Expression DoS Detection
Yeting Li, Jialun Cao, Zhiwu Xu 0001, Qiancheng Peng, Haiming Chen 0001, Shing-Chi Cheung |
USENIX Security Symposium | 8 |
| 2021 | To what extent do DNN-based image classification models make unreliable inferences?
Yongqiang Tian 0001, Shiqing Ma, Ming Wen 0001, Yepang Liu 0001, Shing-Chi Cheung, Xiangyu Zhang 0001 |
Empir. Softw. Eng. | 5 |
| 2021 | Workflow Refactoring for Maximizing Concurrency and Block-StructurednessabstractIn the era of Internet and big data, contemporary workflows become increasingly large in scale and complex in structure, introducing greater challenges for workflow modeling. Workflows are not with maximized concurrency and block-structuredness in terms of control flow, though languages supporting block-structuredness (e.g., BPEL) are employed. Existing workflow refactoring approaches mostly focus on maximizing concurrency according to dependences between activities, but do not consider the block-structuredness of the refactored workflow. It is easier to comprehend and analyze a workflow that is block-structured and to transform it into BPEL-like processes. In this paper, we aim at maximizing both concurrency and block-structuredness. Nevertheless, not all workflows can be refactored with a block-structured representation, and it is intractable to make sure that the refactored workflows are as block-structured as possible. We first define a well-formed dependence pattern of activities. The control flow among the activities in this pattern can be represented in block-structured forms with maximized concurrency. Then, we propose a greedy heuristics-based graph reduction approach to recursively find such patterns. In this way, the resulting workflow is with maximized concurrency and its block-structuredness approximates optimality. We show the effectiveness and efficiency of our approach with real-world scientific workflows. Wei Song 0003, Hans-Arno Jacobsen, Shing-Chi Cheung, Xiaoxing Ma |
IEEE Trans. Serv. Comput. | 3 |
| 2021 | Sifter: A Service Isolation Strategy for Internet ApplicationsabstractService oriented architecture (SOA) provides a flexible platform to build collaborative Internet applications by composing existing self-contained and autonomous services. However, the implicit interactions among the concurrently provisioned services may introduce interference to Internet applications and cause them behave abnormally. It is thus desirable to isolate services to safeguard their application consistency. Existing approaches mostly address this problem by restricting concurrent execution of services to avoid all the implicit interactions. These approaches, however, compromise the performance and flexibility of Internet applications due to the long running nature of services. This paper presents Sifter, a new service isolation strategy for Internet applications. We devise in this strategy a novel static approach to analyze the potential implicit interactions among the services and their impacts on the consistency of the associated Internet applications. By locating only those afflicted implicit interactions that may violate the application consistency, a novel approach based on exception handling and behavior constraints is customized to involved services to eliminate their impacts. We show that this approach exempts the consistency property of Internet applications from being interfered at runtime. The experimental results show that our approach has a better performance than existing solutions. Chunyang Ye, Shing-Chi Cheung, Wing Kwong Chan |
IEEE Trans. Serv. Comput. | 2 |
| 2021 | Automatic Detection and Update Suggestion for Outdated API Names in DocumentationabstractApplication programming interfaces (APIs) continually evolve to meet ever-changing user needs, and documentation provides an authoritative reference for their usage. However, API documentation is commonly outdated because nearly all of the associated updates are performed manually. Such outdated documentation, especially with regard to API names, causes major software development issues. In this paper, we propose a method for automatically updating outdated API names in API documentation. Our insight is that API updates in documentation can be derived from API implementation changes between code revisions. To evaluate the proposed method, we applied it to four open source projects. Our evaluation results show that our method, FreshDoc, detects outdated API names in API documentation with 48 percent higher accuracy than the existing state-of-the-art methods do. Moreover, when we checked the updates suggested by FreshDoc against the developers' manual updates in the revised documentation, FreshDoc detected 82 percent of the outdated names. When we reported 40 outdated API names found by FreshDoc via issue tracking systems, developers accepted 75 percent of the suggestions. These evaluation results indicate that FreshDoc can be used as a practical method for the detection and updating of API names in the associated documentation. Seonah Lee 0001, Rongxin Wu, Shing-Chi Cheung, Sungwon Kang |
IEEE Trans. Software Eng. | 3 |
| 2021 | Historical Spectrum Based Fault LocalizationabstractSpectrum-based fault localization (SBFL) techniques are widely studied and have been evaluated to be effective in locating faults. Recent studies also showed that developers from industry value automated SBFL techniques. However, their effectiveness is still limited by two main reasons. First, the test coverage information leveraged to construct the spectrum does not reflect the root cause directly. Second, SBFL suffers from the tie issue so that the buggy code entities can not be well differentiated from non-buggy ones. To address these challenges, we propose to leverage the information of version histories in fault localization based on the following two intuitions. First, version histories record how bugs are introduced to software projects and this information reflects the root cause of bugs directly. Second, the evolution histories of code can help differentiate those suspicious code entities ranked in tie by SBFL. Our intuitions are also inspired by the observations on debugging practices from large open source projects and industry. Based on the intuitions, we propose a novel technique HSFL (historical spectrum based fault localization). Specifically, HSFL identifies bug-inducing commits from the version history in the first step. It then constructs historical spectrum (denoted as Histrum) based on bug-inducing commits, which is another dimension of spectrum orthogonal to the coverage based spectrum used in SBFL. HSFL finally ranks the suspicious code elements based on our proposed Histrum and the conventional spectrum. HSFL outperforms the state-of-the-art SBFL techniques significantly on the Defects4J benchmark. Specifically, it locates and ranks the buggy statement at Top-1 for 77.8 percent more bugs as compared with SBFL, and 33.9 percent more bugs at Top-5. Besides, for the metrics MAP and MRR, HSFL achieves an average improvement of 28.3 and 40.8 percent over all bugs, respectively. Moreover, HSFL can also outperform other six families of fault localization techniques, and our proposed Histrum model can be integrated with different families of techniques and boost their performance. Ming Wen 0001, Junjie Chen 0003, Yongqiang Tian 0001, Rongxin Wu, Dan Hao 0001, Shi Han, Shing-Chi Cheung |
IEEE Trans. Software Eng. | 7 |
| 2020 | Watchman: monitoring dependency conflicts for Python library ecosystemabstractThe PyPI ecosystem has indexed millions of Python libraries to allow developers to automatically download and install dependencies of their projects based on the specified version constraints. Despite the convenience brought by automation, version constraints in Python projects can easily conflict, resulting in build failures. We refer to such conflicts as Dependency Confict (DC) issues. Although DC issues are common in Python projects, developers lack tool support to gain a comprehensive knowledge for diagnosing the root causes of these issues. In this paper, we conducted an empirical study on 235 real-world DC issues. We studied the manifestation patterns and fixing strategies of these issues and found several key factors that can lead to DC issues and their regressions. Based on our findings, we designed and implemented Watchman, a technique to continuously monitor dependency conflicts for the PyPI ecosystem. In our evaluation, Watchman analyzed PyPI snapshots between 11 Jul 2019 and 16 Aug 2019, and found 117 potential DC issues. We reported these issues to the developers of the corresponding projects. So far, 63 issues have been confirmed, 38 of which have been quickly fixed by applying our suggested patches. Ying Wang 0038, Ming Wen 0001, Yepang Liu 0001, Yibo Wang 0008, Zhenming Li, Hai Yu 0001, Shing-Chi Cheung, Chang Xu 0001, Zhiliang Zhu 0001 |
ICSE | 8 |
| 2020 | FlashRegex: Deducing Anti-ReDoS Regexes from ExamplesabstractRegular expressions (regexes) are widely used in different fields of computer science such as programming languages, string processing and databases. However, existing tools for synthesizing or repairing regexes were not designed to be resilient to Regex Denial of Service (ReDoS) attacks. Specifically, if a regex has super-linear (SL) worst-case complexity, an attacker could provide carefully-crafted inputs to launch ReDoS attacks. Therefore, in this paper, we propose a programming-by-example framework, FlashRegex, for generating anti-ReDoS regexes by either synthesizing or repairing from given examples. It is the first framework that integrates regex synthesis and repair with the awareness of ReDoS-vulnerabilities. We present novel algorithms to deduce anti-ReDoS regexes by reducing the ambiguity of these regexes and by using Boolean Satisfiability (SAT) or Neighborhood Search (NS) techniques. We evaluate FlashRegex with five related state-of-the-art tools. The evaluation results show that our work can effectively and efficiently generate anti-ReDoS regexes from given examples, and also reveal that existing synthesis and repair tools have neglected ReDoS-vulnerabilities of regexes. Specifically, the existing synthesis and repair tools generated up to 394 ReDoS-vulnerable regex within few seconds to more than one hour, while FlashRegex generated no SL regex within around five seconds. Furthermore, the evaluation results on ReDoS-vulnerable regex repair also show that FlashRegex has better capability than existing repair tools and even human experts, achieving 4 more ReDoS-invulnerable regex after repair without trimming and resorting, highlighting the usefulness of FlashRegex in terms of the generality, automation and user-friendliness. Yeting Li, Zhiwu Xu 0001, Jialun Cao, Haiming Chen 0001, Tingjian Ge, Shing-Chi Cheung, Haoren Zhao |
ASE | 6 |
| 2020 | MockSniffer: Characterizing and Recommending Mocking Decisions for Unit TestsabstractIn unit testing, mocking is popularly used to ease test effort, reduce test flakiness, and increase test coverage by replacing the actual dependencies with simple implementations. However, there are no clear criteria to determine which dependencies in a unit test should be mocked. Inappropriate mocking can have undesirable consequences: under-mocking could result in the inability to isolate the class under test (CUT) from its dependencies while over-mocking increases the developers' burden on maintaining the mocked objects and may lead to spurious test failures. According to existing work, various factors can determine whether a dependency should be mocked. As a result, mocking decisions are often difficult to make in practice. Studies on the evolution of mocked objects also showed that developers tend to change their mocking decisions: 17% of the studied mocked objects were introduced sometime after the test scripts were created and another 13% of the originally mocked objects eventually became unmocked. In this work, we are motivated to develop an automated technique to make mocking recommendations to facilitate unit testing. We studied 10,846 test scripts in four actively maintained open-source projects that use mocked objects, aiming to characterize the dependencies that are mocked in unit testing. Based on our observations on mocking practices, we designed and implemented a tool, MockSniffer, to identify and recommend mocks for unit tests. The tool is fully automated and requires only the CUT and its dependencies as input. It leverages machine learning techniques to make mocking recommendations by holistically considering multiple factors that can affect developers' mocking decisions. Our evaluation of MockSniffer on ten open-source projects showed that it outperformed three baseline approaches, and achieved good performance in two potential application scenarios. Hengcheng Zhu 0001, Lili Wei 0001, Ming Wen 0001, Yepang Liu 0001, Shing-Chi Cheung, Qin Sheng, Cui Zhou |
ASE | 5 |
| 2020 | Detecting numerical bugs in neural network architecturesabstractDetecting bugs in deep learning software at the architecture level provides additional benefits that detecting bugs at the model level does not provide. This paper makes the first attempt to conduct static analysis for detecting numerical bugs at the architecture level. We propose a static analysis approach for detecting numerical bugs in neural architectures based on abstract interpretation. Our approach mainly comprises two kinds of abstraction techniques, i.e., one for tensors and one for numerical values. Moreover, to scale up while maintaining adequate detection precision, we propose two abstraction techniques: tensor partitioning and (elementwise) affine relation analysis to abstract tensors and numerical values, respectively. We realize the combination scheme of tensor partitioning and affine relation analysis (together with interval analysis) as DEBAR, and evaluate it on two datasets: neural architectures with known bugs (collected from existing studies) and real-world neural architectures. The evaluation results show that DEBAR outperforms other tensor and numerical abstraction techniques on accuracy without losing scalability. DEBAR successfully detects all known numerical bugs with no false positives within 1.7–2.3 seconds per architecture. On the real-world architectures, DEBAR reports 529 warnings within 2.6–135.4 seconds per architecture, where 299 warnings are true positives. Yuhao Zhang 0005, Luyao Ren, Liqian Chen, Yingfei Xiong 0001, Shing-Chi Cheung, Tao Xie 0001 |
ESEC/SIGSOFT FSE | 5 |
| 2020 | ContractGuard: Defend Ethereum Smart Contracts with Embedded Intrusion DetectionabstractEthereum smart contracts are programs that can be collectively executed by a network of mutually untrusted nodes. Smart contracts handle and transfer assets of values, offering strong incentives for malicious attacks. Intrusion attacks are a popular type of malicious attacks. In this article, we propose ContractGuard, the first intrusion detection system (IDS) to defend Ethereum smart contracts against such attacks. Like IDSs for conventional programs, ContractGuard detects intrusion attempts as abnormal control flow. However, existing IDS techniques/tools are inapplicable to Ethereum smart contracts due to Ethereum's decentralized nature and its highly restrictive execution environment. To address these issues, we design ContractGuard by embedding it in the contracts to profile context-tagged acyclic paths, and optimizing it under the Ethereum gas-oriented performance model. The main goal is to minimize the overheads, to which the users will be extremely sensitive since the cost needs to be paid upfront in digital concurrency. Empirical investigation using real-life contracts deployed in the Ethereum mainnet shows that on average, ContractGuard only adds to 36.14 percent of the deployment overhead and 28.27 percent of the runtime overhead. Furthermore, we conducted controlled experiments and show that ContractGuard successfully guard against attacks on all real-world vulnerabilities and 83 percent of the seeded vulnerabilities. Zhijian Xie, Gansen Zhao, Shing-Chi Cheung |
IEEE Trans. Serv. Comput. | 5 |
| 2020 | Understanding and Detecting Fragmentation-Induced Compatibility Issues for Android AppsabstractAndroid ecosystem is heavily fragmented. The numerous combinations of different device models and operating system versions make it impossible for Android app developers to exhaustively test their apps, and thus various compatibility issues arise. Unfortunately, little is known on the characteristics of such fragmentation-induced compatibility issues. No mature tools exist to help developers quickly diagnose and fix these issues. To bridge the gap, we conducted an empirical study on 220 real-world compatibility issues collected from five popular open-source Android apps. We further interviewed Android practitioners and conducted an online survey to gain insights from real practices. Via the studies, we characterized compatibility issues, investigated common practices to handle compatibility issues, and disclosed that these issues exhibit common patterns. With these findings, we propose a technique, FicFinder, to automatically detect compatibility issues in Android apps. FicFinder performs static code analysis based on a model that captures Android APIs as well as their associated context by which compatibility issues can be triggered. FicFinder reports actionable debugging information to developers when it detects potential issues. We evaluated FicFinder with 53 large-scale open-source Android apps. The results show that FicFinder can precisely detect compatibility issues in these apps and uncover previously-unknown issues. Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung, Huaxun Huang, Xuanzhe Liu |
IEEE Trans. Software Eng. | 3 |
| 2020 | How Well Do Change Sequences Predict Defects? Sequence Learning from Software ChangesabstractSoftware defect prediction, which aims to identify defective modules, can assist developers in finding bugs and prioritizing limited quality assurance resources. Various features to build defect prediction models have been proposed and evaluated. Among them, process metrics are one important category. Yet, existing process metrics are mainly encoded manually from change histories and ignore the sequential information arising from the changes during software evolution. Are the change sequences derived from such information useful to characterize buggy program modules? How can we leverage such sequences to build good defect prediction models? Unlike traditional process metrics used for existing defect prediction models, change sequences are mostly vectors of variable length. This makes it difficult to apply such sequences directly in prediction models that are driven by conventional classifiers. To resolve this challenge, we utilize Recurrent Neural Network (RNN), which is a deep learning technique, to encode features from sequence data automatically. In this paper, we propose a novel approach called Fences, which extracts six types of change sequences covering different aspects of software changes via fine-grained change analysis. It approaches defects prediction by mapping it to a sequence labeling problem solvable by RNN. Our evaluations on 10 open source projects show that Fences can predict defects with high performance. In particular, our approach achieves an average F-measure of 0.657, which improves the prediction models built on traditional metrics significantly. The improvements vary from 31.6 to 46.8 percent on average. In terms of AUC, Fences achieves an average value of 0.892, and the improvements over baselines vary from 4.2 to 16.1 percent. Fences also outperforms the state-of-the-art technique which learns semantic features automatically from static code via deep learning. Ming Wen 0001, Rongxin Wu, Shing-Chi Cheung |
IEEE Trans. Software Eng. | 3 |
| 2019 | Could I have a stack trace to examine the dependency conflict issue?abstractIntensive use of libraries in Java projects brings potential risk of dependency conflicts, which occur when a project directly or indirectly depends on multiple versions of the same library or class. When this happens, JVM loads one version and shadows the others. Runtime exceptions can occur when methods in the shadowed versions are referenced. Although project management tools such as Maven are able to give warnings of potential dependency conflicts when a project is built, developers often ask for crashing stack traces before examining these warnings. It motivates us to develop Riddle, an automated approach that generates tests and collects crashing stack traces for projects subject to risk of dependency conflicts. Riddle, built on top of Asm and Evosuite, combines condition mutation, search strategies and condition restoration. We applied Riddle on 19 real-world Java projects with duplicate libraries or classes. We reported 20 identified dependency conflicts including their induced crashing stack traces and the details of generated tests. Among them, 15 conflicts were confirmed by developers as real issues, and 10 were readily fixed. The evaluation results demonstrate the effectiveness and usefulness of Riddle. Ying Wang 0038, Ming Wen 0001, Rongxin Wu, Zhenwei Liu 0001, Shin Hwei Tan, Zhiliang Zhu 0001, Hai Yu 0001, Shing-Chi Cheung |
ICSE | 8 |
| 2019 | Pivot: learning API-device correlations to facilitate Android compatibility issue detectionabstractThe heavily fragmented Android ecosystem has induced various compatibility issues in Android apps. The search space for such fragmentation-induced compatibility issues (FIC issues) is huge, comprising three dimensions: device models, Android OS versions, and Android APIs. FIC issues, especially those arising from device models, evolve quickly with the frequent release of new device models to the market. As a result, an automated technique is desired to maintain timely knowledge of such FIC issues, which are mostly undocumented. In this paper, we propose such a technique, PIVOT, that automatically learns API-device correlations of FIC issues from existing Android apps. PIVOT extracts and prioritizes API-device correlations from a given corpus of Android apps. We evaluated PIVOT with popular Android apps on Google Play. Evaluation results show that PIVOT can effectively prioritize valid API-device correlations for app corpora collected at different time. Leveraging the knowledge in the learned API-device correlations, we further conducted a case study and successfully uncovered ten previously-undetected FIC issues in open-source Android apps. Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung |
ICSE | 3 |
| 2019 | Exposing library API misuses via mutation analysisabstractMisuses of library APIs are pervasive and often lead to software crashes and vulnerability issues. Various static analysis tools have been proposed to detect library API misuses. They often involve mining frequent patterns from a large number of correct API usage examples, which can be hard to obtain in practice. They also suffer from low precision due to an over-simplified assumption that a deviation from frequent usage patterns indicates a misuse. We make two observations on the discovery of API misuse patterns. First, API misuses can be represented as mutants of the corresponding correct usages. Second, whether a mutant will introduce a misuse can be validated via executing it against a test suite and analyzing the execution information. Based on these observations, we propose MutApi, the first approach to discovering API misuse patterns via mutation analysis. To effectively mimic API misuses based on correct usages, we first design eight effective mutation operators inspired by the common characteristics of API misuses. MutApi generates mutants by applying these mutation operators on a set of client projects and collects mutant-killing tests as well as the associated stack traces. Misuse patterns are discovered from the killed mutants that are prioritized according to their likelihood of causing API misuses based on the collected information. We applied MutApi on 16 client projects with respect to 73 popular Java APIs. The results show that MutApi is able to discover substantial API misuse patterns with a high precision of 0.78. It also achieves a recall of $0.49$ on the MuBench benchmark, which outperforms the state-of-the-art techniques. Ming Wen 0001, Yepang Liu 0001, Rongxin Wu, Xuan Xie 0001, Shing-Chi Cheung, Zhendong Su 0001 |
ICSE | 5 |
| 2019 | SGUARD: A Feature-Based Clustering Tool for Effective Spreadsheet Defect DetectionabstractSpreadsheets are widely used but subject to various defects. In this paper, we present SGuard to effectively detect spreadsheet defects. SGuard learns spreadsheet features to cluster cells with similar computational semantics, and then refines these clusters to recognize anomalous cells as defects. SGuard well balances the trade-off between the precision (87.8%) and recall rate (71.9%) in the defect detection, and achieves an F-measure of 0.79, exceeding existing spreadsheet defect detection techniques. We introduce the SGuard implementation and its usage by a video presentation (https://youtu.be/gNPmMvQVf5Q), and provide its public download repository (https://github.com/sheetguard/sguard). Huiyan Wang 0001, Chang Xu 0001, Ruiqing Zhang, Shing-Chi Cheung, Xiaoxing Ma |
ASE | 5 |
| 2019 | Exploring and exploiting the correlations between bug-inducing and bug-fixing commitsabstractBug-inducing commits provide important information to understand when and how bugs were introduced. Therefore, they have been extensively investigated by existing studies and frequently leveraged to facilitate bug fixings in industrial practices. Ming Wen 0001, Rongxin Wu, Yepang Liu 0001, Yongqiang Tian 0001, Xuan Xie 0001, Shing-Chi Cheung, Zhendong Su 0001 |
ESEC/SIGSOFT FSE | 6 |
| 2019 | DroidLeaks: a comprehensive database of resource leaks in Android apps
Yepang Liu 0001, Lili Wei 0001, Chang Xu 0001, Shing-Chi Cheung, Tianyong Wu, Jun Yan 0009, Jian Zhang 0001 |
Empir. Softw. Eng. | 5 |
| 2019 | Disclosing and Locating Concurrency Bugs of Interrupt-Driven IoT ProgramsabstractThe Internet of Things (IoT) is envisioned as a distributed network formed by many end devices, e.g., the motes of wireless sensor network (WSN). These important IoT end devices enable ubiquitous sensing of environments and provide reliable services for mission-critical applications. However, programs running on WSN devices are typically interrupt-driven and prone to interrupt-induced concurrency bugs, which are primarily caused by erroneous interleavings among interrupt procedure instances (IPIs) (namely, executions of interrupt processing logic). In this paper, we use a set of dynamic bug patterns to characterize the concurrency bugs due to buggy access-interleavings among IPIs to shared resources, including shared memory locations and shared communication channels. By matching the above bug patterns, a dynamic analysis approach called disclosing and locating concurrency bugs of interrupt-driven IoT programs based on dynamic bug patterns (Daemon) is proposed to automatically detect and locate concurrency bugs in WSN programs. A GUI tool of Daemon is developed. As the empirical studies exhibit, the tool can discover concurrency bugs effectively and locate the buggy source lines visually. Yuxia Sun, Shing-Chi Cheung, Song Guo 0001 |
IEEE Internet Things J. | 2 |
| 2019 | Analyzing and Disentangling Interleaved Interrupt-Driven IoT ProgramsabstractIn the Internet of Things (IoT) community, wireless sensor network (WSN) is a key technique to enable ubiquitous sensing of environments and provide reliable services to applications. WSN programs, typically interrupt-driven, implement the functionalities via the collaboration of interrupt procedure instances (IPIs, namely executions of interrupt processing logic). However, due to the complicated concurrency model of WSN programs, the IPIs are interleaved intricately and the program behaviors are hard to predicate from the source codes. Thus, to improve the software quality of WSN programs, it is significant to disentangle the interleaved executions and develop various IPI-based program analysis techniques, including offline and online ones. As the common foundation of those techniques, a generic efficient and real-time algorithm to identify IPIs is urgently desired. However, the existing instance-identification approach cannot satisfy the desires. In this paper, we first formally define the concept of IPI. Next, we propose a generic IPI-identification algorithm, and prove its correctness, real-time, and efficiency. We also conduct comparison experiments to illustrate that our algorithm is more efficient than the existing one in terms of both time and space. As the theoretical analyses and empirical studies exhibit, our algorithm provides the groundwork for IPI-based analyses of WSN programs in IoT environment. Yuxia Sun, Song Guo 0001, Shing-Chi Cheung, Yong Tang 0001 |
IEEE Internet Things J. | 3 |
| 2019 | File-level socio-technical congruence and its relationship with bug proneness in OSS projects
Shing-Chi Cheung, Zhenyu Chen 0001, Yuming Zhou, Bin Luo 0003 |
J. Syst. Softw. | 2 |
| 2018 | Context-aware patch generation for better automated program repairabstractThe effectiveness of search-based automated program repair is limited in the number of correct patches that can be successfully generated. There are two causes of such limitation. First, the search space does not contain the correct patch. Second, the search space is huge and therefore the correct patch cannot be generated (i.e., correct patches are either generated after incorrect plausible ones or not generated within the time budget). Ming Wen 0001, Junjie Chen 0003, Rongxin Wu, Dan Hao 0001, Shing-Chi Cheung |
ICSE | 5 |
| 2018 | ChangeLocator: locate crash-inducing changes based on crash reportsabstractSoftware crashes are severe manifestations of software bugs. Debugging crashing bugs is tedious and time-consuming. Understanding software changes that induce a crashing bug can provide useful contextual information for bug fixing and is highly demanded by developers. Locating the bug inducing changes is also useful for automatic program repair, since it narrows down the root causes and reduces the search space of bug fix location. However, currently there are no systematic studies on locating the software changes to a source code repository that induce a crashing bug reflected by a bucket of crash reports. To tackle this problem, we first conducted an empirical study on characterizing the bug inducing changes for crashing bugs (denoted as crash-inducing changes). We also propose ChangeLocator, a method to automatically locate crash-inducing changes for a given bucket of crash reports. We base our approach on a learning model that uses features originated from our empirical study and train the model using the data from the historical fixed crashes. We evaluated ChangeLocator with six release versions of Netbeans project. The results show that it can locate the crash-inducing changes for 44.7%, 68.5%, and 74.5% of the bugs by examining only top 1, 5 and 10 changes in the recommended list, respectively. It significantly outperforms the existing state-of-the-art approach. Rongxin Wu, Ming Wen 0001, Shing-Chi Cheung, Hongyu Zhang 0002 |
ICSE | 3 |
| 2018 | An empirical study on TensorFlow program bugsabstractDeep learning applications become increasingly popular in important domains such as self-driving systems and facial identity systems. Defective deep learning applications may lead to catastrophic consequences. Although recent research efforts were made on testing and debugging deep learning applications, the characteristics of deep learning defects have never been studied. To fill this gap, we studied deep learning applications built on top of TensorFlow and collected program bugs related to TensorFlow from StackOverflow QA pages and Github projects. We extracted information from QA pages, commit messages, pull request messages, and issue discussions to examine the root causes and symptoms of these bugs. We also studied the strategies deployed by TensorFlow users for bug detection and localization. These findings help researchers and TensorFlow users to gain a better understanding of coding defects in TensorFlow programs and point out a new direction for future research. Yuhao Zhang 0005, Shing-Chi Cheung, Yingfei Xiong 0001, Lu Zhang 0023 |
ISSTA | 3 |
| 2018 | A tale of two cities: how WebView induces bugs to Android applicationsabstractWebView is a widely used Android component that augments a native app with web browser capabilities. It eases the interactions between an app’s native code and web code. However, the interaction mechanism of WebView induces new types of bugs in Android apps. Understanding the characteristics and manifestation of these WebView-induced bugs (ωBugs for short) facilitates the correct usages of WebViews in Android apps. This motivates us to conduct the first empirical study on ωBugs based on those found in popular open-source Android apps. Our study identified the major root causes and consequences of ωBugs and made interesting observations that can be leveraged for detecting and diagnosing ωBugs. Based on the empirical study, we further propose an automated testing technique ωDroid to effectively expose ωBugs in Android apps. In our experiments, ωDroid successfully discovered 30 unique and previously-unknown ωBugs when applied to 146 open-source Android apps. We reported the 30 ωBugs to the corresponding app developers. Out of these 30 ωBugs, 14 were confirmed and 7 of them were fixed. This shows that ωDroid can effectively detect ωBugs that are of the developers’ concern. Jiajun Hu, Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung, Huaxun Huang |
ASE | 4 |
| 2018 | Understanding and detecting callback compatibility issues for Android applicationsabstractThe control flows of Android apps are largely driven by the protocols that govern how callback APIs are invoked in response to various events. When these callback APIs evolve along with the Android framework, the changes in their invocation protocols can induce unexpected control flows to existing Android apps, causing various compatibility issues. We refer to these issues as callback compatibility issues. While Android framework updates have received due attention, little is known about their impacts on app control flows and the callback compatibility issues thus induced. To bridge the gap, we examined Android documentations and conducted an empirical study on 100 real-world callback compatibility issues to investigate how these issues were induced by callback API evolutions. Based on our empirical findings, we propose a graph-based model to capture the control flow inconsistencies caused by API evolutions and devise a static analysis technique, Cider, to detect callback compatibility issues. Our evaluation of Cider on 20 popular open-source Android apps shows that Cider is effective. It detected 13 new callback compatibility issues in these apps, among which 12 issues were confirmed and 9 issues were fixed. Huaxun Huang, Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung |
ASE | 4 |
| 2018 | Which generated test failures are fault revealing? prioritizing failures based on inferred precondition violations using PAFabstractAutomated unit testing tools, such as Randoop, have been developed to produce failing tests as means of finding faults. However, these tools often produce false alarms, so are not widely used in practice. The main reason for a false alarm is that the generated failing test violates an implicit precondition of the method under test, such as a field should not be null at the entry of the method. This condition is not explicitly programmed or documented but implicitly assumed by developers. To address this limitation, we propose a technique called PAF to cluster generated test failures due to the same cause and reorder them based on their likelihood of violating an implicit precondition of the method under test. From various test executions, PAF observes their dataflows to the variables whose values are used when the program fails. Based on the dataflow similarity and where these values are originated, PAF clusters failures and determines their likelihood of being fault revealing. We integrated PAF into Randoop. Our empirical results on open-source projects show that PAF effectively clusters fault revealing tests arising from the same fault and successfully prioritizes the fault-revealing ones. Mijung Kim, Shing-Chi Cheung, Sunghun Kim 0001 |
ESEC/SIGSOFT FSE | 2 |
| 2018 | Do the dependency conflicts in my project matter?abstractIntensive dependencies of a Java project on third-party libraries can easily lead to the presence of multiple library or class versions on its classpath. When this happens, JVM will load one version and shadows the others. Dependency conflict (DC) issues occur when the loaded version fails to cover a required feature (e.g., method) referenced by the project, thus causing runtime exceptions. However, the warnings of duplicate classes or libraries detected by existing build tools such as Maven can be benign since not all instances of duplication will induce runtime exceptions, and hence are often ignored by developers. In this paper, we conducted an empirical study on real-world DC issues collected from large open source projects. We studied the manifestation and fixing patterns of DC issues. Based on our findings, we designed Decca, an automated detection tool that assesses DC issues' severity and filters out the benign ones. Our evaluation results on 30 projects show that Decca achieves a precision of 0.923 and recall of 0.766 in detecting high-severity DC issues. Decca also detected new DC issues in these projects. Subsequently, 20 DC bug reports were filed, and 11 of them were confirmed by developers. Issues in 6 reports were fixed with our suggested patches. Ying Wang 0038, Ming Wen 0001, Zhenwei Liu 0001, Rongxin Wu, Hai Yu 0001, Zhiliang Zhu 0001, Shing-Chi Cheung |
ESEC/SIGSOFT FSE | 9 |
| 2018 | ChangeLocator: locate crash-inducing changes based on crash reports
Rongxin Wu, Ming Wen 0001, Shing-Chi Cheung, Hongyu Zhang 0002 |
Empir. Softw. Eng. | 3 |
| 2017 | OASIS: prioritizing static analysis warnings for Android apps based on app user reviewsabstractLint is a widely-used static analyzer for detecting bugs/issues in Android apps. However, it can generate many false warnings. One existing solution to this problem is to leverage project history data (e.g., bug fixing statistics) for warning prioritization. Unfortunately, such techniques are biased toward a project’s archived warnings and can easily miss newissues. Anotherweakness is that developers cannot readily relate the warnings to the impacts perceivable by users. To overcome these weaknesses, in this paper, we propose a semantics-aware approach, OASIS, to prioritizing Lint warnings by leveraging app user reviews. OASIS combines program analysis and NLP techniques to recover the intrinsic links between the Lint warnings for a given app and the user complaints on the app problems caused by the issues of concern. OASIS leverages the strength of such links to prioritize warnings. We evaluated OASIS on six popular and large-scale open-source Android apps. The results show that OASIS can effectively prioritize Lint warnings and help identify new issues that are previously-unknown to app developers. Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung |
ESEC/SIGSOFT FSE | 3 |
| 2017 | How effectively can spreadsheet anomalies be detected: An empirical study
Ruiqing Zhang, Chang Xu 0001, Shing-Chi Cheung, Ping Yu 0004, Xiaoxing Ma, Jian Lu 0001 |
J. Syst. Softw. | 3 |
| 2017 | CACheck: Detecting and Repairing Cell Arrays in SpreadsheetsabstractSpreadsheets are widely used by end users for numerical computation in their business. Spreadsheet cells whose computation is subject to the same semantics are often clustered in a row or column as a cell array. When a spreadsheet evolves, the cells in a cell array can degenerate due to ad hoc modifications. Such degenerated cell arrays no longer keep cells prescribing the same computational semantics, and are said to exhibit ambiguous computation smells. We propose CACheck, a novel technique that automatically detects and repairs smelly cell arrays by recovering their intended computational semantics. Our empirical study on the EUSES and Enron corpora finds that such smelly cell arrays are common. Our study also suggests that CACheck is useful for detecting and repairing real spreadsheet problems caused by smelly cell arrays. Compared with our previous work AmCheck, CACheck detects smelly cell arrays with higher precision and recall rate. Wensheng Dou, Chang Xu 0001, Shing-Chi Cheung, Jun Wei 0001 |
IEEE Trans. Software Eng. | 3 |
| 2016 | CUSTODES: automatic spreadsheet cell clustering and smell detection using strong and weak featuresabstractVarious techniques have been proposed to detect smells in spreadsheets, which are susceptible to errors. These techniques typically detect spreadsheet smells through a mechanism based on a fixed set of patterns or metric thresholds. Unlike conventional programs, tabulation styles vary greatly across spreadsheets. Smell detection based on fixed patterns or metric thresholds, which are insensitive to the varying tabulation styles, can miss many smells in one spreadsheet while reporting many spurious smells in another. In this paper, we propose CUSTODES to effectively cluster spreadsheet cells and detect smells in these clusters. The clustering mechanism can automatically adapt to the tabulation styles of each spreadsheet using strong and weak features. These strong and weak features capture the invariant and variant parts of tabulation styles, respectively. As smelly cells in a spreadsheet normally occur in minority, they can be mechanically detected as clusters' outliers in feature spaces. We implemented and applied CUSTODES to 70 spreadsheets files randomly sampled from the EUSES corpus. These spreadsheets contain 1,610 formula cell clusters. Experimental results confirmed that CUSTODES is effective. It successfully detected harmful smells that can induce computation anomalies in spreadsheets with an F-measure of 0.72, outperforming state-of-the-art techniques. Shing-Chi Cheung, Yepang Liu 0001, Chang Xu 0001 |
ICSE | 1 |
| 2016 | Coverage-driven test code generation for concurrent classesabstractPrevious techniques on concurrency testing have mainly focused on exploring the interleaving space of manually written test code to expose faulty interleavings of shared memory accesses. These techniques assume the availability of failure-inducing tests. In this paper, we present AutoConTest, a coverage-driven approach to generate effective concurrent test code that achieve high interleaving coverage. AutoConTest consists of three components. First, it computes the coverage requirements dynamically and iteratively during sequential test code generation, using a coverage metric that captures the execution context of shared memory accesses. Second, it smartly selects these sequential codes based on the computed result and assembles them for concurrent tests, achieving increased context-sensitive interleaving coverage. Third, it explores the newly covered interleavings. We have implemented AutoConTest as an automated tool and evaluated it using 6 real-world concurrent Java subjects. The results show that AutoConTest is able to generate effective concurrent tests that achieve high interleaving coverage and expose concurrency faults quickly. AutoConTest took less than 65 seconds (including program analysis, test generation and execution) to expose the faults in the program subjects. Valerio Terragni, Shing-Chi Cheung |
ICSE | 2 |
| 2016 | CSNIPPEX: automated synthesis of compilable code snippets from Q&A sitesabstractPopular Q&A sites like StackOverflow have collected numerous code snippets. However, many of them do not have complete type information, making them uncompilable and inapplicable to various software engineering tasks. This paper analyzes this problem, and proposes a technique CSNIPPEX to automatically convert code snippets into compilable Java source code files by resolving external dependencies, generating import declarations, and fixing syntactic errors. We implemented CSNIPPEX as a plug-in for Eclipse and evaluated it with 242,175 StackOverflow posts that contain code snippets. CSNIPPEX successfully synthesized compilable Java files for 40,410 of them. It was also able to effectively recover import declarations for each post with a precision of 91.04% in a couple of seconds. Valerio Terragni, Yepang Liu 0001, Shing-Chi Cheung |
ISSTA | 3 |
| 2016 | Taming Android fragmentation: characterizing and detecting compatibility issues for Android appsabstractAndroid ecosystem is heavily fragmented. The numerous combinations of different device models and operating system versions make it impossible for Android app developers to exhaustively test their apps. As a result, various compatibility issues arise, causing poor user experience. However, little is known on the characteristics of such fragmentation-induced compatibility issues and no mature tools exist to help developers quickly diagnose and fix these issues. To bridge the gap, we conducted an empirical study on 191 real-world compatibility issues collected from popular open-source Android apps. Our study characterized the symptoms and root causes of compatibility issues, and disclosed that the patches of these issues exhibit common patterns. With these findings, we propose a technique named FicFinder to automatically detect compatibility issues in Android apps. FicFinder performs static code analysis based on a model that captures Android APIs as well as their associated context by which compatibility issues are triggered. FicFinder reports actionable debugging information to developers when it detects potential issues. We evaluated FicFinder with 27 large-scale open-source Android apps. The results show that FicFinder can precisely detect compatibility issues in these apps and uncover previously-unknown issues. Lili Wei 0001, Yepang Liu 0001, Shing-Chi Cheung |
ASE | 3 |
| 2016 | Locus: locating bugs from software changesabstractVarious information retrieval (IR) based techniques have been proposed recently to locate bugs automatically at the file level. However, their usefulness is often compromised by the coarse granularity of files and the lack of contextual information. To address this, we propose to locate bugs using software changes, which offer finer granularity than files and provide important contextual clues for bug-fixing. We observe that bug inducing changes can facilitate the bug fixing process. For example, it helps triage the bug fixing task to the developers who committed the bug inducing changes or enables developers to fix bugs by reverting these changes. Our study further identifies that change logs and the naturally small granularity of changes can help boost the performance of IR-based bug localization. Motivated by these observations, we propose an IR-based approach Locus to locate bugs from software changes, and evaluate it on six large open source projects. The results show that Locus outperforms existing techniques at the source file level localization significantly. MAP and MRR in particular have been improved, on average, by 20.1% and 20.5%, respectively. Locus is also capable of locating the inducing changes within top 5 for 41.0% of the bugs. The results show that Locus can significantly reduce the number of lines needing to be scanned to locate the bug compared with existing techniques. Ming Wen 0001, Rongxin Wu, Shing-Chi Cheung |
ASE | 3 |
| 2016 | Casper: an efficient approach to call trace collectionabstractCall traces, i.e., sequences of function calls and returns, are fundamental to a wide range of program analyses such as bug reproduction, fault diagnosis, performance analysis, and many others. The conventional approach to collect call traces that instruments each function call and return site incurs large space and time overhead. Our approach aims at reducing the recording overheads by instrumenting only a small amount of call sites while keeping the capability of recovering the full trace. We propose a call trace model and a logged call trace model based on an LL(1) grammar, which enables us to define the criteria of a feasible solution to call trace collection. Based on the two models, we prove that to collect call traces with minimal instrumentation is an NP-hard problem. We then propose an efficient approach to obtaining a suboptimal solution. We implemented our approach as a tool Casper and evaluated it using the DaCapo benchmark suite. The experiment results show that our approach causes significantly lower runtime (and space) overhead than two state-of-the-arts approaches. Rongxin Wu, Xiao Xiao 0003, Shing-Chi Cheung, Hongyu Zhang 0002, Charles Zhang 0001 |
POPL | 3 |
| 2016 | Detecting table clones and smells in spreadsheetsabstractSpreadsheets are widely used by end users for various business tasks, such as data analysis and financial reporting. End users may perform similar tasks by cloning a block of cells (table) in their spreadsheets. The corresponding cells in these cloned tables are supposed to keep the same or similar computational semantics. However, when spreadsheets evolve, thus cloned tables can become inconsistent due to ad-hoc modifications, and as a result suffer from smells. In this paper, we propose TableCheck to detect table clones and related smells due to inconsistency among them. We observe that two tables with the same header information at their corresponding cells are likely to be table clones. Inspired by existing fingerprint-based code clone detection techniques, we developed a detection algorithm to detect this kind of table clones. We further detected outliers among corresponding cells as smells in the detected table clones. We implemented our idea into TableCheck, and applied it to real-world spreadsheets from the EUSES corpus. Experimental results show that table clones commonly exist (21.8%), and 25.6% of the spreadsheets with table clones suffer from smells due to inconsistency among these clones. TableCheck detected table clones and their smells with a precision of 92.2% and 85.5%, respectively, while existing techniques detected no more than 35.6% true smells that TableCheck could detect. Wensheng Dou, Shing-Chi Cheung, Chushu Gao, Chang Xu 0001, Jun Wei 0001 |
SIGSOFT FSE | 2 |
| 2016 | Understanding and detecting wake lock misuses for Android applicationsabstractWake locks are widely used in Android apps to protect critical computations from being disrupted by device sleeping. Inappropriate use of wake locks often seriously impacts user experience. However, little is known on how wake locks are used in real-world Android apps and the impact of their misuses. To bridge the gap, we conducted a large-scale empirical study on 44,736 commercial and 31 open-source Android apps. By automated program analysis and manual investigation, we observed (1) common program points where wake locks are acquired and released, (2) 13 types of critical computational tasks that are often protected by wake locks, and (3) eight patterns of wake lock misuses that commonly cause functional and non-functional issues, only three of which had been studied by existing work. Based on our findings, we designed a static analysis technique, Elite, to detect two most common patterns of wake lock misuses. Our experiments on real-world subjects showed that Elite is effective and can outperform two state-of-the-art techniques. Yepang Liu 0001, Chang Xu 0001, Shing-Chi Cheung, Valerio Terragni |
SIGSOFT FSE | 3 |
| 2016 | Hybrid CPU-GPU constraint checking: Towards efficient context consistency
Jun Sui, Chang Xu 0001, Shing-Chi Cheung, Yanyan Jiang 0001, Chun Cao, Xiaoxing Ma, Jian Lu 0001 |
Inf. Softw. Technol. | 3 |
| 2015 | RECONTEST: Effective Regression Testing of Concurrent ProgramsabstractConcurrent programs proliferate as multi-core technologies advance. The regression testing of concurrent programs often requires running a failing test for weeks before catching a faulty interleaving, due to the myriad of possible interleavings of memory accesses arising from concurrent program executions. As a result, the conventional approach that selects a sub-set of test cases for regression testing without considering interleavings is insufficient. In this paper we present RECONTEST to address the problem by selecting the new interleavings that arise due to code changes. These interleavings must be explored in order to uncover regression bugs. RECONTEST efficiently selects new interleavings by first identifying shared memory accesses that are affected by the changes, and then exploring only those problematic interleavings that contain at least one of these accesses. We have implemented RECONTEST as an automated tool and evaluated it using 13 real-world concurrent program subjects. Our results show that RECONTEST can significantly reduce the regression testing cost without missing any faulty interleavings induced by code changes. Valerio Terragni, Shing-Chi Cheung, Charles Zhang 0001 |
ICSE (1) | 2 |
| 2015 | A survey on dependability improvement techniques for pervasive computing systems
Wenhua Yang 0001, Yepang Liu 0001, Chang Xu 0001, Shing-Chi Cheung |
Sci. China Inf. Sci. | 4 |
| 2015 | Cina: Suppressing the Detection of Unstable Context InconsistencyabstractContext-aware applications adapt their behavior based on contexts. Contexts can, however, be incorrect. A popular means to build dependable applications is to augment them with a set of constraints to govern the consistency of context values. These constraints are evaluated upon context changes to detect inconsistencies so that they can be timely handled. However, we observe that many context inconsistencies are unstable. They vanish by themselves and do not require handling. Such inconsistencies are detected due to misaligned sensor sampling or improper inconsistency detection scheduling. We call them unstable context inconsistencies (or STINs). STINs should be avoided to prevent unnecessary inconsistency handling and unstable behavioral adaptation to applications. In this article, we study STINs systematically, from examples to theoretical analysis, and present algorithms to suppress their detection. Our key insight is that only certain patterns of context changes can make a consistency constraint subject to the detection of STINs. We derive such patterns and proactively use them to suppress the detection of STINs. We implemented our idea and applied it to real-world applications. Experimental results confirmed its effectiveness in suppressing the detection of numerous STINs with negligible overhead, while preserving the detection of stable context inconsistencies that require inconsistency handling. Chang Xu 0001, Shing-Chi Cheung, Xiaoxing Ma, Chun Cao, Jian Lu 0001 |
IEEE Trans. Software Eng. | 3 |
| 2014 | Is spreadsheet ambiguity harmful? detecting and repairing spreadsheet smells due to ambiguous computationabstractSpreadsheets are widely used by end users for numerical computation in their business. Spreadsheet cells whose computation is subject to the same semantics are often clustered in a row or column. When a spreadsheet evolves, these cell clusters can degenerate due to ad hoc modifications or undisciplined copy-and-pastes. Such degenerated clusters no longer keep cells prescribing the same computational semantics, and are said to exhibit ambiguous computation smells. Our empirical study finds that such smells are common and likely harmful. We propose AmCheck, a novel technique that automatically detects and repairs ambiguous computation smells by recovering their intended computational semantics. A case study using AmCheck suggests that it is useful for discovering and repairing real spreadsheet problems. Wensheng Dou, Shing-Chi Cheung, Jun Wei 0001 |
ICSE | 2 |
| 2014 | Characterizing and detecting performance bugs for smartphone applicationsabstractSmartphone applications’ performance has a vital impact on user experience. However, many smartphone applications suffer from bugs that cause significant performance degradation, thereby losing their competitive edge. Unfortunately, people have little understanding of these performance bugs. They also lack effective techniques to fight with such bugs. To bridge this gap, we conducted a study of 70 real-world performance bugs collected from eight large-scale and popular Android applications. We studied the characteristics (e.g., bug types and how they manifested) of these bugs and identified their common patterns. These findings can support follow-up research on performance bug avoidance, testing, debugging and analysis for smartphone applications. To demonstrate the usefulness of our findings, we implemented a static code analyzer, PerfChecker, to detect our identified performance bug patterns. We experimentally evaluated PerfChecker by applying it to 29 popular Android applications, which comprise 1.1 million lines of Java code. PerfChecker successfully detected 126 matching instances of our performance bug patterns. Among them, 68 were quickly confirmed by developers as previously-unknown issues that affect application performance, and 20 were fixed soon afterwards by following our optimization suggestions. Yepang Liu 0001, Chang Xu 0001, Shing-Chi Cheung |
ICSE | 3 |
| 2014 | CrashLocator: locating crashing faults based on crash stacksabstractSoftware crash is common. When a crash occurs, software developers can receive a report upon user permission. A crash report typically includes a call stack at the time of crash. An important step of debugging a crash is to identify faulty functions, which is often a tedious and labor-intensive task. In this paper, we propose CrashLocator, a method to locate faulty functions using the crash stack information in crash reports. It deduces possible crash traces (the failing execution traces that lead to crash) by expanding the crash stack with functions in static call graph. It then calculates the suspiciousness of each function in the approximate crash traces. The functions are then ranked by their suspiciousness scores and are recommended to developers for further investigation. We evaluate our approach using real-world Mozilla crash data. The results show that our approach is effective: we can locate 50.6%, 63.7% and 67.5% of crashing faults by examining top 1, 5 and 10 functions recommended by CrashLocator, respectively. Our approach outperforms the conventional stack-only methods significantly. Rongxin Wu, Hongyu Zhang 0002, Shing-Chi Cheung, Sunghun Kim 0001 |
ISSTA | 3 |
| 2014 | Symbolic state validation through runtime dataabstractReal world programs are typically built on top of many library functions. Symbolic analysis of these programs generally requires precise models of these functions? Application Programming Interfaces (APIs), which are mostly unavailable because these models are costly to construct. A variant approach of symbolic analysis is to over-approximate the return values of those APIs that have not been modeled. However, such approximation can induce many unreachable symbolic states, which are expensive to validate manually. In this paper, we propose a static approach to automatically validating the reported anomalous symbolic states. The validation makes use of the available runtime data of the un-modeled APIs collected from previous program executions. We show that the symbolic state validation problem can be cast as a MAX-SAT problem and solved by existing constraint solvers. Shing-Chi Cheung |
ASE | 2 |
| 2014 | Scaling Up Symbolic Analysis by Removing Z-Equivalent StatesabstractPath explosion is a major issue in applying path-sensitive symbolic analysis to large programs. We observe that many symbolic states generated by the symbolic analysis of a procedure are indistinguishable to its callers. It is, therefore, possible to keep only one state from each set of equivalent symbolic states without affecting the analysis result. Based on this observation, we propose an equivalence relation called z-equivalence, which is weaker than logical equivalence, to relate a large number of z-equivalent states. We prove that z-equivalence is strong enough to guarantee that paths to be traversed by the symbolic analysis of two z-equivalent states are identical, giving the same solutions to satisfiability and validity queries. We propose a sound linear algorithm to detect z-equivalence. Our experiments show that the symbolic analysis that leverages z-equivalence is able to achieve more than ten orders of magnitude reduction in terms of search space. The reduction significantly alleviates the path explosion problem, enabling us to apply symbolic analysis in large programs such as Hadoop and Linux Kernel. Shing-Chi Cheung, Xiangyu Zhang 0001, Yepang Liu 0001 |
ACM Trans. Softw. Eng. Methodol. | 2 |
| 2014 | GreenDroid: Automated Diagnosis of Energy Inefficiency for Smartphone ApplicationsabstractSmartphone applications' energy efficiency is vital, but many Android applications suffer from serious energy inefficiency problems. Locating these problems is labor-intensive and automated diagnosis is highly desirable. However, a key challenge is the lack of a decidable criterion that facilitates automated judgment of such energy problems. Our work aims to address this challenge. We conducted an in-depth study of 173 open-source and 229 commercial Android applications, and observed two common causes of energy problems: missing deactivation of sensors or wake locks, and cost-ineffective use of sensory data. With these findings, wepropose an automated approach to diagnosing energy problems in Android applications. Our approach explores an application's state space by systematically executing the application using Java PathFinder (JPF). It monitors sensor and wake lock operations to detect missing deactivation of sensors and wake locks. It also tracks the transformation and usage of sensory data and judges whether they are effectively utilized by the application using our state-sensitive data utilization metric. In this way, our approach can generate detailed reports with actionable information to assist developers in validating detected energy problems. We built our approach as a tool, GreenDroid, on top of JPF. Technically, we addressed the challenges of generating user interaction events and scheduling event handlers in extending JPF for analyzing Android applications. We evaluated GreenDroid using 13 real-world popular Android applications. GreenDroid completed energy efficiency diagnosis for these applications in a few minutes. It successfully located real energy problems in these applications, and additionally found new unreported energy problems that were later confirmed by developers. Yepang Liu 0001, Chang Xu 0001, Shing-Chi Cheung, Jian Lu 0001 |
IEEE Trans. Software Eng. | 3 |
| 2013 | Where has my battery gone? Finding sensor related energy black holes in smartphone applicationsabstractSmartphone applications have millions of users. Their energy efficiency is very important. However, we investigated 174 Android applications and found 33 of them suffering serious energy inefficiency problems. Many of these problems are due to ineffective use of sensors and their data. In this paper, we propose a novel approach to systematically diagnose energy inefficiency problems in Android applications. We derive an application execution model from Android specifications, and leverage it to realistically simulate an application's runtime behavior. Our approach can automatically analyze an application's sensory data utilization at different states, and report actionable information to help developers locate energy inefficiency problems and identify their root causes. We built a tool called GreenDroid on top of Java PathFinder and evaluated it using six popularly downloaded Android applications. GreenDroid analyzed these applications in a few minutes, and successfully located real energy inefficiency problems in them. Yepang Liu 0001, Chang Xu 0001, Shing-Chi Cheung |
PerCom | 3 |
| 2013 | A cost-effectiveness criterion for applying software defect prediction modelsabstractIdeally, software defect prediction models should help organize software quality assurance (SQA) resources and reduce cost of finding defects by allowing the modules most likely to contain defects to be inspected first. In this paper, we study the cost-effectiveness of applying defect prediction models in SQA and propose a basic cost-effectiveness criterion. The criterion implies that defect prediction models should be applied with caution. We also propose a new metric FN/(FN+TN) to measure the cost-effectiveness of a defect prediction model. Hongyu Zhang 0002, Shing-Chi Cheung |
ESEC/SIGSOFT FSE | 2 |
| 2013 | Towards context consistency by concurrent checking for Internetware applications
Chang Xu 0001, Yepang Liu 0001, Shing-Chi Cheung, Chun Cao, Jian Lu 0001 |
Sci. China Inf. Sci. | 3 |
| 2013 | AFChecker: Effective model checking for context-aware adaptive applications
Yepang Liu 0001, Chang Xu 0001, Shing-Chi Cheung |
J. Syst. Softw. | 3 |
| 2012 | Dynamic fault detection in context-aware adaptationabstractInternetware applications are context-aware and adaptive to their environmental changes. Faulty adaptation may arise when these applications face unexpected situations. Such adaptation faults can be difficult to detect at design time. The recent Adaptation Finite-State Machine (A-FSM) approach proposes to statically analyze model-based context-aware applications for adaptation faults. However, this approach may suffer expressiveness and precision problems. To address these limitations, we propose an Adaptation Model (AM) approach. As compared with A-FSM, AM offers increased expressive power to model complex rules, and guarantees soundness in fault detection. Besides, AM deploys an efficient rule evaluation technique to cater for context-aware applications that are subject to continual environmental changes. We evaluated our AM approach using both simulated and real-world experiments with two applications. The experimental results confirmed that AM can detect real faults missed by A-FSM, and avoid false positives that were misreported otherwise. Chang Xu 0001, Shing-Chi Cheung, Xiaoxing Ma, Chun Cao, Jian Lu 0001 |
Internetware | 2 |
| 2012 | Human and program factors affecting the maintenance of programs with deployed design patterns
Tsz Hin Ng, Yuen-Tak Yu, Shing-Chi Cheung, Wing Kwong Chan |
Inf. Softw. Technol. | 3 |
| 2012 | Adam: Identifying defects in context-aware adaptation
Chang Xu 0001, Shing-Chi Cheung, Xiaoxing Ma, Chun Cao, Jian Lu 0001 |
J. Syst. Softw. | 2 |
| 2011 | Understanding a developer social network and its evolutionabstractWith the growing number of large scale software projects, software development and maintenance demands the participation of larger groups. Having a thorough understanding of the group of developers is critical for improving development and maintenance quality and reducing cost. In contrast to most commercial software endeavors, developers in open source software (OSS) projects enjoy more freedom to organize and contribute to a project in their own working style. Their interactions through various means in the project generate a latent developer social network (DSN). We have observed that developers and their relationships in these DSNs change continually under the influence of differences in the set of active developers and their changing activities. Revealing and understanding the structure and evolution of these social networks as well as their similarities and differences from other more general social networks (GSNs) is of value to our software engineering community, as it allows us to begin building an understanding of how well the findings from other fields based on GSNs apply to DSN. In this paper, we compare DSNs with popular GSNs such as Facebook, Twitter, Cyworld (a large social network in South Korea), and the Amazon recommendation network. We found, for instance, that while most social networks exhibit power law degree distributions, our DSNs do not. In addition, we also examine how DSNs evolve over time, highlighting how events within a project (such as a release of new software or the departure of prominent developers) impact the makeup of the DSNs, and observe the evolution of topological properties such as modularity and the paths of communities within these networks. Qiaona Hong, Sunghun Kim 0001, Shing-Chi Cheung, Christian Bird |
ICSM | 3 |
| 2011 | Refactoring and Publishing WS-BPEL Processes to Obtain More PartnersabstractWS-BPEL processes can facilitate service discovery when the services have multiple interfaces in certain order. Current approaches derive the abstract WS-BPEL processes directly from the corresponding executable ones by hiding or omitting the internal activities. However, these simple approaches may prevent the services from being found by valuable potential partners at service discovery stage. To address this problem, we propose a novel approach to refactoring the executable and abstract WS-BPEL processes for service discovery. We show the application of our approach through a typical travel agency service. Wei Song 0003, Xiaoxing Ma, Shing-Chi Cheung, Hao Hu 0001, Qiliang Yang, Jian Lu 0001 |
ICWS | 3 |
| 2011 | ReLink: recovering links between bugs and changesabstractSoftware defect information, including links between bugs and committed changes, plays an important role in software maintenance such as measuring quality and predicting defects. Usually, the links are automatically mined from change logs and bug reports using heuristics such as searching for specific keywords and bug IDs in change logs. However, the accuracy of these heuristics depends on the quality of change logs. Bird et al. found that there are many missing links due to the absence of bug references in change logs. They also found that the missing links lead to biased defect information, and it affects defect prediction performance. We manually inspected the explicit links, which have explicit bug IDs in change logs and observed that the links exhibit certain features. Based on our observation, we developed an automatic link recovery algorithm, ReLink, which automatically learns criteria of features from explicit links to recover missing links. We applied ReLink to three open source projects. ReLink reliably identified links with 89% precision and 78% recall on average, while the traditional heuristics alone achieve 91% precision and 64% recall. We also evaluated the impact of recovered links on software maintainability measurement and defect prediction, and found the results of ReLink yields significantly better accuracy than those of traditional heuristics. Rongxin Wu, Hongyu Zhang 0002, Sunghun Kim 0001, Shing-Chi Cheung |
SIGSOFT FSE | 4 |
| 2011 | Service Composition and Interaction in a SOC Middleware Supporting Separation of Concerns with Flows and ViewsabstractService-Oriented Computing (SOC) has recently gained attention both within industry and academia; however, its characteristics cannot be easily solved using existing distributed computing technologies. Composition and interaction issues have been the central concerns, because SOC applications are composed of heterogeneous and distributed processes. To tackle the complexity of inter-organizational service integration, the authors propose a methodology to decompose complex process requirements into different types of flows, such as control, data, exception, and security. The subset of each type of flow necessary for the interactions with each partner can be determined in each service. These subsets collectively constitute a process view, based on which interactions can be systematically designed and managed for system integration through service composition. The authors illustrate how the proposed SOC middleware, named FlowEngine, implements and manages these flows with contemporary Web services technologies. An experimental case study in an e-governmental environment further demonstrates how the methodology can facilitate the design of complex inter-organizational processes. Dickson K. W. Chiu, Qing Li 0001, Patrick C. K. Hung, Zhe Shan 0001, Shing-Chi Cheung, Matthias Farwick |
J. Database Manag. | 5 |
| 2011 | Read More with Less: An Adaptive Approach to Energy-Efficient RFID SystemsabstractRecent years have witnessed the wide adoption of the RFID technology in many important application domains including logistics, inventory, retailing, public transportation, and security. Though RFID tags (transponders) can be passive, the high power consumption of RFID readers (interrogators) has become a critical issue as handheld and mobile readers are increasingly available in pervasive computing environments. Moreover, high transmission power aggravates interference, complicating the deployment and operation of RFID systems. In this paper, we present an energy-efficient RFID inventory algorithm called Automatic Power Stepping (APS). The design of APS is based on extensive empirical study on passive tags, and takes into consideration several important details such as tag response states and variable slot lengths. APS dynamically estimates the number of tags to be read, incrementally adjusts the transmission power level to use sufficient but not excessive power for communication, and consequently reduces both the energy consumption for reading a set of tags and the possibility of collisions. We design APS to be compatible with the current Class-1 Generation-2 RFID standards so that a reader running APS can interact with existing commercial tags without modification. We have implemented APS both on an NI RFID testing platform and in a high-fidelity simulator. The evaluation shows that APS can save more than 60% energy used by RFID readers while maintaining comparable performance on the read rate. Xunteng Xu, Lin Gu 0001, Jianping Wang 0001, Guoliang Xing, Shing-Chi Cheung |
IEEE J. Sel. Areas Commun. | 5 |
| 2011 | Which Crashes Should I Fix First?: Predicting Top Crashes at an Early Stage to Prioritize Debugging EffortsabstractMany popular software systems automatically report failures back to the vendors, allowing developers to focus on the most pressing problems. However, it takes a certain period of time to assess which failures occur most frequently. In an empirical investigation of the Firefox and Thunderbird crash report databases, we found that only 10 to 20 crashes account for the large majority of crash reports; predicting these “top crashes” thus could dramatically increase software quality. By training a machine learner on the features of top crashes of past releases, we can effectively predict the top crashes well before a new release. This allows for quick resolution of the most important crashes, leading to improved user experience and better allocation of maintenance efforts. Dongsun Kim 0001, Sunghun Kim 0001, Andreas Zeller, Shing-Chi Cheung, Sooyong Park |
IEEE Trans. Software Eng. | 5 |
| 2010 | LocaToR: Locating Passive RFID Tags with the Relative Neighborhood GraphabstractPassive tags are widely used in many applications, for example, the supply chain, the food industry and ware-house management. In such applications, the location information of tags is very important. However, the uncertain proper-ties of Received Signal Strength Indicators (RSSI), various backscattering events on different power levels and the directivity of readers prevent traditional ranging-based approaches working well in passive RFID systems. In accordance with our observations during experiments, we create a novel approach to locate a specific tag among objects. Although absolute positions are difficult to obtain, we can estimate locations by building a relative relationship between tags. To reduce the effect of the above limitations, we propose a range-free approach named LocaToR to establish a relative neighborhood graph. We implement our method on a real passive system. Taking environmental factors into consideration, we look at two situations: a controlled chamber and a semi-open space. Experimental results show that our approach can obviously improve the accuracy of the localization system as well as save readers' energy. Shing-Chi Cheung, Lionel M. Ni |
EUC | 2 |
| 2010 | Detecting atomic-set serializability violations in multithreaded programs through active randomized testingabstractConcurrency bugs are notoriously difficult to detect because there can be vast combinations of interleavings among concurrent threads, yet only a small fraction can reveal them. Atomic-set serializability characterizes a wide range of concurrency bugs, including data races and atomicity violations. In this paper, we propose a two-phase testing technique that can effectively detect atomic-set serializability violations. In Phase I, our technique infers potential violations that do not appear in a concrete execution and prunes those interleavings that are violation-free. In Phase II, our technique actively controls a thread scheduler to enumerate these potential scenarios identified in Phase I to look for real violations. We have implemented our technique as a prototype system AssetFuzzer and applied it to a number of subject programs for evaluating concurrency defect analysis techniques. The experimental results show that AssetFuzzer can identify more concurrency bugs than two recent testing tools RaceFuzzer and AtomFuzzer. Zhifeng Lai, Shing-Chi Cheung, Wing Kwong Chan |
ICSE (1) | 2 |
| 2010 | Sequential event pattern based context-aware adaptationabstractRecent pervasive systems are designed to be context-aware so that they are able to adapt to continual changes of their environments. Rule-based adaptation, which is commonly adopted by these applications, introduces new challenges in software design and verification. Recent research results have identified some faulty or unwanted adaptations caused by factors such as asynchronous context updating, and missing or faulty context reading. In addition, adaptation rules based on simple event models and propositional logic are not expressive enough to address these factors and to satisfy users' expectation in the design. We tackle these challenges at design stage by introducing sequential event patterns in adaptation rules to eliminate faulty and unwanted adaptations with features provided in the event pattern query language. We illustrate our approach using the recent published examples of adaptive applications, and show that it is promising on designing more reliable context-aware adaptive applications. Chushu Gao, Jun Wei 0001, Chang Xu 0001, Shing-Chi Cheung |
Internetware | 4 |
| 2010 | The Impact of Reader to Tag Collision on RFID Tag Identification
Weijun Hong, Shing-Chi Cheung, Shufang Li |
WASA | 3 |
| 2010 | Data-driven testing methodology for RFID systems
An Lu, Wenbin Fang, Chang Xu 0001, Shing-Chi Cheung, Yu Liu 0078 |
Frontiers Comput. Sci. China | 4 |
| 2010 | Partial constraint checking for context consistency in pervasive computingabstractPervasive computing environments typically change frequently in terms of available resources and their properties. Applications in pervasive computing use contexts to capture these changes and adapt their behaviors accordingly. However, contexts available to these applications may be abnormal or imprecise due to environmental noises. This may result in context inconsistencies, which imply that contexts conflict with each other. The inconsistencies may set such an application into a wrong state or lead the application to misadjust its behavior. It is thus desirable to detect and resolve the context inconsistencies in a timely way. One popular approach is to detect context inconsistencies when contexts breach certain consistency constraints. Existing constraint checking techniques recheck the entire expression of each affected consistency constraint upon context changes. When a changed context affects only a constraint's subexpression, rechecking the entire expression can adversely delay the detection of other context inconsistencies. This article proposes a rigorous approach to identifying the parts of previous checking results that are reusable without entire rechecking. We evaluated our work on the Cabot middleware through both simulation experiments and a case study. The experimental results reported that our approach achieved over a fifteenfold performance improvement on context inconsistency detection than conventional approaches. Chang Xu 0001, Shing-Chi Cheung, Wing Kwong Chan, Chunyang Ye |
ACM Trans. Softw. Eng. Methodol. | 2 |
| 2009 | Taming coincidental correctness: Coverage refinement with context patterns to improve fault localizationabstractRecent techniques for fault localization leverage code coverage to address the high cost problem of debugging. These techniques exploit the correlations between program failures and the coverage of program entities as the clue in locating faults. Experimental evidence shows that the effectiveness of these techniques can be affected adversely by coincidental correctness, which occurs when a fault is executed but no failure is detected. In this paper, we propose an approach to address this problem. We refine code coverage of test runs using control- and data-flow patterns prescribed by different fault types. We conjecture that this extra information, which we call context patterns, can strengthen the correlations between program failures and the coverage of faulty program entities, making it easier for fault localization techniques to locate the faults. To evaluate the proposed approach, we have conducted a mutation analysis on three real world programs and cross-validated the results with real faults. The experimental results consistently show that coverage refinement is effective in easing the coincidental correctness problem in fault localization techniques. Shing-Chi Cheung, Wing Kwong Chan, Zhenyu Zhang 0004 |
ICSE | 2 |
| 2009 | Constructing and testing privacy-aware services in a cloud computing environment: challenges and opportunitiesabstractAfter decades of engineering development and infrastructural investment, Internet connections have become a commodity product in many countries, and Internetscale "cloud computing" has started to compete with traditional software business through its technological advantages and economy of scale. Cloud computing is a promising enabling technology of Internetware. One distinct characteristic of cloud computing is the global integration of data, logic, and users, but such integration magnifies a sharp concern about privacy, which is one of the most frequently cited reasons by enterprises for not migrating to cloud-based solutions. We argue that cloud-based systems should include privacy as a fundamental design goal, and that privacy in a cloud environment is bidirectional, covering both end users and application providers. End users need privacy-aware software services that prevent their private data from being exposed to other users or the cloud providers. Application providers need a privacy-protected testing methodology to prevent the companies' internal activities and product features from leaking to external users. Focusing on privacy protection, we discuss the research challenges in this unique design space, and explore potential solutions for enhancing privacy protection in several important components of the system. Lin Gu 0001, Shing-Chi Cheung |
Internetware | 2 |
| 2009 | A study on the replaceability of context-aware middlewareabstractIn context-ware computing paradigm, context-aware middleware plays a key role. The middleware collects and manipulates contexts from environments, providing context-aware applications well-defined interfaces to adapt their behaviors when environments change. However, some minor difference in the implementation of context-aware middleware may cause the same context-aware application behave differently. Such behavior deviation may lead to serious problems or even disasters for a context-aware application. It is thus desirable to check whether a mobile context-aware application behaves consistently before moving it from one middleware to another, or whether a context-aware application still works correctly when upgrading the underlying middleware? Existing approaches for context-aware applications are not adequate for detecting such behavior deviation because these approaches do not consider the impacts of the difference in the middleware implementation. In this paper, we study the strategies in the implementation of context-aware middleware and their impacts on the behavior of context-aware applications. By exploring the implied scenarios where a context-aware application may behave differently, new testing approach is proposed to detect the behavior deviation of a context-aware application running on different middleware by generating test cases to cover these implied scenarios. Chunyang Ye, Shing-Chi Cheung, Jun Wei 0001, Hua Zhong 0001, Tao Huang 0001 |
Internetware | 2 |
| 2009 | Guest Editorial to the Special Issue on Automation of Software TestingabstractHong Zhu, S. C. Cheung, Joseph R. Horgan, J. Jenny Li; Guest Editorial to the Special Issue on Automation of Software Testing, The Computer Journal, Volume 52, Hong Zhu 0002, Shing-Chi Cheung, Joseph Robert Horgan, J. Jenny Li 0001 |
Comput. J. | 2 |
| 2009 | PAT: A pattern classification approach to automatic reference oracles for the testing of mesh simplification programs
Wing Kwong Chan, Shing-Chi Cheung, Jeffrey C. F. Ho, T. H. Tse |
J. Syst. Softw. | 2 |
| 2009 | Preface for the ICEBE 2007 special section
Shing-Chi Cheung, Hui Lei 0001, Michael R. Lyu |
Serv. Oriented Comput. Appl. | 1 |
| 2009 | Atomicity Analysis of Service Composition across OrganizationsabstractAtomicity is a highly desirable property for achieving application consistency in service compositions. To achieve atomicity, a service composition should satisfy the atomicity sphere, a structural criterion for the backend processes of involved services. Existing analysis techniques for atomicity sphere generally assume complete knowledge of all involved backend processes. Such an assumption is invalid when some service providers do not release all details of their backend processes to service consumers outside the organizations. To address this problem, we propose a process algebraic framework to publish atomicity-equivalent public views from the backend processes. These public views extract relevant task properties and reveal only partial process details that service providers need to expose. Our framework enables the analysis of atomicity sphere for service compositions using these public views instead of their backend processes. This allows service consumers to choose suitable services such that their composition satisfies the atomicity sphere without disclosing the details of their backend processes. Based on the theoretical result, we present algorithms to construct atomicity-equivalent public views and to analyze the atomicity sphere for a service composition. Two case studies from supply chain and insurance domains are given to evaluate our proposal and demonstrate the applicability of our approach. Chunyang Ye, Shing-Chi Cheung, Wing Kwong Chan, Chang Xu 0001 |
IEEE Trans. Software Eng. | 2 |
| 2009 | Interactive Visual Optimization and Analysis for RFID BenchmarkingabstractRadio frequency identification (RFID) is a powerful automatic remote identification technique that has wide applications. To facilitate RFID deployment, an RFID benchmarking instrument called aGate has been invented to identify the strengths and weaknesses of different RFID technologies in various environments. However, the data acquired by aGate are usually complex time varying multidimensional 3D volumetric data, which are extremely challenging for engineers to analyze. In this paper, we introduce a set of visualization techniques, namely, parallel coordinate plots, orientation plots, a visual history mechanism, and a 3D spatial viewer, to help RFID engineers analyze benchmark data visually and intuitively. With the techniques, we further introduce two workflow procedures (a visual optimization procedure for finding the optimum reader antenna configuration and a visual analysis procedure for comparing the performance and identifying the flaws of RFID devices) for the RFID benchmarking, with focus on the performance analysis of the aGate system. The usefulness and usability of the system are demonstrated in the user evaluation. Yingcai Wu, Ka-Kei Chung, Huamin Qu, Xiaoru Yuan, Shing-Chi Cheung |
IEEE Trans. Vis. Comput. Graph. | 5 |
| 2008 | Heuristics-Based Strategies for Resolving Context Inconsistencies in Pervasive Computing ApplicationsabstractContext-awareness allows pervasive applications to adapt to changeable computing environments. Contexts, the pieces of information that capture the characteristics of environments, are often error-prone and inconsistent due to noises. Various strategies have been proposed to enable automatic context inconsistency resolution. They are formulated on different assumptions that may not hold in practice. This causes applications to be less context-aware to different extents. In this paper, we investigate such impacts and propose our new resolution strategy. We conducted experiments to compare our work with major existing strategies. The results showed that our strategy is both effective in resolving context inconsistencies and promising in its support of applications using contexts. Chang Xu 0001, Shing-Chi Cheung, Wing Kwong Chan, Chunyang Ye |
ICDCS | 2 |
| 2008 | Inter-context control-flow and data-flow test adequacy criteria for nesC applicationsabstractNesC is a programming language for applications that run on top of networked sensor nodes. Such an application mainly uses an interrupt to trigger a sequence of operations, known as contexts, to perform its actions. However, a high degree of inter-context interleaving in an application can cause it to be error-prone. For instance, a context may mistakenly alter another context's data kept at a shared variable. Existing concurrency testing techniques target testing programs written in general-purpose programming languages, where a small scale of inter-context interleaving between program executions may make these techniques inapplicable. We observe that nesC blocks new context interleaving when handling interrupts, and this feature significantly restricts the scale of inter-context interleaving that may occur in a nesC application. This paper models how operations on different contexts may interleave as inter-context flow graphs. Based on these graphs, it proposes two test adequacy criteria, one on inter-context data-flows and another on inter-context control-flows. It evaluates the proposal by a real-life open-source nesC application. The empirical results show that the new criteria detect significantly more failures than their conventional counterparts. Zhifeng Lai, Shing-Chi Cheung, Wing Kwong Chan |
SIGSOFT FSE | 2 |
| 2008 | A context- and role-driven scientific workflow development patternabstractAbstract Scientific workflow execution often demands data‐centric and computation‐intensive collaboration efforts, which is typically different from the process‐centric workflow execution with fixed execution specifications. Scientific workflow execution often challenges the traditional workflow development strategy in dynamic context management and role definition. In view of this observation, application context spectrums are firstly distinguished from different profiles of scientific workflow development. Then, a role enactment strategy is proposed for enabling workflow execution in certain application context. They jointly enhance the validity of a scientific workflow development through clearly articulating the correlation between computational subjects and computational objects engaged in scientific workflow system. Furthermore, a novel context‐ and role‐driven scientific workflow development pattern is proposed for enacting a scientific workflow system on the Grid. Finally, a case study is presented to demonstrate the generic natures of the methods in this paper. Copyright © 2008 John Wiley & Sons, Ltd. Wan-Chun Dou, Jinjun Chen, Shaokun Fan, Shing-Chi Cheung |
Concurr. Comput. Pract. Exp. | 4 |
| 2007 | Teaching embedded systems software: The HKUST experienceabstractRecent trends in embedded systems indicate a growing importance of the software component of these systems, and the concomitant increase in the importance of formal design and development of embedded software. In this paper we share our experience with designing and offering courses related to embedded software in the Department of Computer Science and Engineering at the Hong Kong University of Science and Technology. We give a detailed overview of the courses, the structure and the teaching/learning methodology followed in our courses, followed by some discussion and reflections on the courses. Jogesh K. Muppala, Zonghua Gu 0001, Shing-Chi Cheung |
ICPADS | 3 |
| 2007 | Do Maintainers Utilize Deployed Design Patterns Effectively?abstractOne claimed benefit of deploying design patterns is facilitating maintainers to perform anticipated changes. However, it is not at all obvious that the relevant design patterns deployed in software will invariably be utilized for the changes. Moreover, we observe that many well-known design patterns consist of three types of programming elements (called participants), and that performing an anticipated change typically entails multiple tasks related to different types of participants. This paper studies empirically whether maintainers utilize deployed design patterns, and when they do, which tasks they more commonly perform. Our experiments show that almost all subjects perform the task of adding new concrete participants, fewer perform the tasks involving clients, whereas even fewer perform the tasks involving abstract participants. Furthermore, utilizing deployed design patterns (by performing whichever of the corresponding tasks) is found to be statistically associated with the delivery of less faulty codes. Tsz Hin Ng, Shing-Chi Cheung, Wing Kwong Chan, Yuen-Tak Yu |
ICSE | 2 |
| 2007 | Developing a Distributed e-Monitoring System for Enterprise Website and Web Services: An Experience Report with Free Libraries and ToolsabstractEnterprises value monitoring as it provides dependable e-services, whether it is an interactive Web site or programmatic Web service. However, this task becomes non-trivial when enterprises begin to require support from thousands of servers across geographical areas. How can the communications between a monitoring systems and remote servers be minimized? Could the task be achieved easily based on a readily available technology such as SNMP? How can we monitor thousands of servers powered by, say, Tomcat, which lacks SNMP support? How may a poorly responsive site be identified prior to being reported as a failure by SNMP? In this paper, we propose a unified e-monitoring system that enables system administrators to remotely monitor the health of distributed e-services in both the form of Web site and Web services. We further discuss our implementation experience based on a pragmatic prototype. Frank K. W. Cheong, Dickson K. W. Chiu, Shing-Chi Cheung, Patrick C. K. Hung |
ICWS | 3 |
| 2007 | On impact-oriented automatic resolution of pervasive context inconsistencyabstractContext-awareness is a capability that allows applications in pervasive computing to adapt themselves continuously to changing contexts of their environments. However, contexts from physical environments may be inconsistent. It affects the correctness of these applications. Existing resolution strategies for context inconsistency have diverse adverse impacts on the context awareness of applications, such as feeding different amounts of contexts to the applications. In this paper, we examine the impacts of inconsistency resolution and study the extent to which their effects on context-awareness can be reduced. We conduct simulation experiments of two pervasive computing applications. The experimental results show that existing inconsistency resolution strategies adversely affect the context-awareness of applications. This motivates the importance of deploying an impact-oriented approach to respect context-awareness in inconsistency resolution. Chang Xu 0001, Shing-Chi Cheung, Wing Kwong Chan, Chunyang Ye |
ESEC/SIGSOFT FSE | 2 |
| 2007 | Detection and resolution of atomicity violation in service compositionabstractAtomicity is a desirable property that safeguards application consistency for service compositions. A service composition exhibiting this property could either complete or cancel itself without any side effects. It is possible to achieve this property for a service composition by selecting suitable web services to form an atomicity sphere. However, this property might still be breached at runtime due to the interference between various service compositions caused by implicit interactions. Existing approaches to addressing this problem by restricting concurrent execution of services to avoid all implicit interactions however compromise the performance of service compositions due to the long running nature of web services. In this paper, we propose a novel static approach to analyzing the implicit interactions a web service may incur and their impacts on the atomicity property in each of its service compositions. By locating afflicted implicit interactions in a service composition, behavior constraints based on property propagation are formulated as local safety properties, which can then be enforced by the affected web services at runtime to suppress the impacts of the afflicted implicit interactions. We show that the satisfaction of these safety properties exempts the atomicity property of this service composition from being interfered by other services at runtime. The approach is illustrated using two service applications. Chunyang Ye, Shing-Chi Cheung, Wing Kwong Chan, Chang Xu 0001 |
ESEC/SIGSOFT FSE | 2 |
| 2006 | Reference Models and Automatic Oracles for the Testing of Mesh Simplification Software for Graphics RenderingabstractSoftware with graphics rendering is an important class of applications. Many of them use polygonal models to represent the graphics. Mesh simplification is a vital technique to vary the levels of object details and, hence, improve the overall performance of the rendering process. It progressively enhances the effectiveness of rendering from initial reference systems. As such, the quality of its implementation affects that of the associated graphics rendering application. Testing of mesh simplification is essential towards assuring the quality of the applications. Is it feasible to use the reference systems to serve as automated test oracles for mesh simplification programs? If so, how well are they useful for this purpose? We present a novel approach in this paper. We propose to use pattern classification techniques to address the above problem. We generate training samples from the reference system to test samples from the implementation. Our experimentation shows that the approach is promising Wing Kwong Chan, Shing-Chi Cheung, Jeffrey C. F. Ho, T. H. Tse |
COMPSAC (1) | 2 |
| 2006 | Adapting Ubiquitous Enterprise Services with Context and ViewsabstractRecent advances in mobile technologies and infrastructures have led to increasing demands for ubiquitous access to enterprise services from mobile handheld devices, such as mobile phones and PDAs. The context in which such a service is used becomes an integral part of the associated enterprise application. This demands a new paradigm for system requirements elicitation and design in order to make good use of such extended context information. Instead of redesigning or adapting existing enterprise services in an ad-hoc manner, we introduce a methodology for the elicitation of context-aware adaptation requirements and the matching of context-awareness features to the target context by capability matching. For the implementation of these adaptations, we propose the use of three tiers of views: user interface views, data views, and process views. This approach centers on a novel notion of process views to service adaptation according to their context. We demonstrate our methodology by extending an enterprise appointment service into a ubiquitous one with context support Dickson K. W. Chiu, Dan Hong, Shing-Chi Cheung, Eleanna Kafeza |
EDOC | 3 |
| 2006 | Incremental consistency checking for pervasive contextabstractApplications in pervasive computing are typically required to interact seamlessly with their changing environments. To provide users with smart computational services, these applications must be aware of incessant context changes in their environments and adjust their behaviors accordingly. As these environments are highly dynamic and noisy, context changes thus acquired could be obsolete, corrupted or inaccurate. This gives rise to the problem of context inconsistency, which must be timely detected in order to prevent applications from behaving anomalously. In this paper, we propose a formal model of incremental consistency checking for pervasive contexts. Based on this model, we further propose an efficient checking algorithm to detect inconsistent contexts. The performance of the algorithm and its advantages over conventional checking techniques are evaluated experimentally using Cabot middleware. Chang Xu 0001, Shing-Chi Cheung, Wing Kwong Chan |
ICSE | 2 |
| 2006 | Publishing and composition of atomicity-equivalent services for B2B collaborationabstractException handling resolves inconsistency by backward or forward error recovery methods or both in Business-to-Business (B2B) process collaboration. To avoid committing irrevocable tasks followed by exceptions, B2B processes, which guarantee the atomicity sphere property, are attractive. While atomicity sphere ensures its outcomes to be either all or nothing, conflicting local recoveries may lead to global B2B inconsistencies. Existing (global) analysis techniques however mandate every process unveiling all individual tasks. Such an analysis is infeasible when some business parties refuse to disclose their process details for privacy or business reasons. To address this problem, we propose a process algebraic technique to prove, construct, and check atomicity-equivalent public views from B2B processes. By checking atomicity spheres in the composition of these public views, business parties can identify suitable services that respect their individual and overall atomicity requirements. An example based on a real-life multilateral supply chain process is included. Chunyang Ye, Shing-Chi Cheung, Wing Kwong Chan |
ICSE | 2 |
| 2006 | The first international workshop on automation of software testabstractNo abstract available. Hong Zhu 0002, Joseph Robert Horgan, Shing-Chi Cheung, J. Jenny Li 0001 |
ICSE | 3 |
| 2006 | Work experience versus refactoring to design patterns: a controlled experimentabstractProgram refactoring using design patterns is an attractive approach for facilitating anticipated changes. Its benefit depends on at least two factors, namely the effort involved in the refactoring and how effective it is. For example, the benefit would be small if too much effort is required to translate a program correctly into a refactorized form, and whether such a form could effectively guide maintainers to complete anticipated changes is unknown. A metric of effectiveness is the maintainers' performance, which can be affected by their work experience, in realizing the changes. Hence, an interesting question arises. Is program refactoring to introduce additional patterns beneficial regardless of the work experience of the maintainers? In this paper, we report a controlled experiment on maintaining JHotDraw, an open source system deployed with multiple patterns. We compared maintainers with and without work experience. Our empirical results show that, to complete a maintenance task of perfective nature, the time spent even by the inexperienced maintainers on a refactorized version is much shorter than that of the experienced subjects on the original version. Moreover, the quality of their delivered programs, in terms of correctness, is found to be comparable. Tsz Hin Ng, Shing-Chi Cheung, Wing Kwong Chan, Yuen-Tak Yu |
SIGSOFT FSE | 2 |
| 2006 | Local analysis of atomicity sphere for B2B collaborationabstractAtomicity is a desirable property for business processes to conduct transactions in Business-to-Business (B2B) collaboration. Although it is possible to reason about atomicity of B2B collaboration using the public views, yet such reasoning requires the presence of a trustworthy party who has complete knowledge of these views. It is inapplicable when some parties may want to keep the confidentiality of their collaborative partners for privacy and other business reasons, or the trustworthy party is not available. To address this problem, we propose a novel approach that allows each party to jointly conduct local atomicity checking with its direct partners. It is based on iterative forwarding and regression of compensability properties between each pair of direct partners. This approach is applied to a case study based on a real-life insurance process in the motor damage claims domain. Chunyang Ye, Shing-Chi Cheung, Wing Kwong Chan, Chang Xu 0001 |
SIGSOFT FSE | 2 |
| 2006 | Performance Aware Service Pool in Dependable Service Oriented Architecture
Gang Huang 0001, Xuanzhe Liu, Hong Mei 0001, Shing-Chi Cheung |
J. Comput. Sci. Technol. | 5 |
| 2006 | Automatic goal-oriented classification of failure behaviors for testing XML-based multimedia software applications: An experimental case study
Wing Kwong Chan, M. Y. Cheng, Shing-Chi Cheung, T. H. Tse |
J. Syst. Softw. | 3 |
| 2005 | A Metamodel Based Model Transformation ApproachabstractThe information transformation problem of model driven software development (MDSD) processes is gaining increasing attentions. In this paper, we present an indepth analysis of the major causes leading to the ambiguities of existing transformation. A metamodel based approach is then proposed to address these causes. A mechanism to generate transformation rules is devised based on a classification of the UML metamodel elements to be used in subsequent transformation processes. Some other critical issues relating to the generated transformation system are also discussed. Yucong Duan, Shing-Chi Cheung, Xiaolan Fu, Yuqing Gu |
SERA | 2 |
| 2005 | Inconsistency detection and resolution for context-aware middleware supportabstractContext-awareness is a key feature of pervasive computing whose environments keep evolving. The support of context-awareness requires comprehensive management including detection and resolution of context inconsistency, which occurs naturally in pervasive computing. In this paper we present a framework for realizing dynamic context consistency management. The framework supports inconsistency detection based on a semantic matching and inconsistency triggering model, and inconsistency resolution with proactive actions to context sources. We further present an implementation based on the Cabot middleware. The feasibility of the framework and its performance are evaluated through a case study and a simulated experiment, respectively. Chang Xu 0001, Shing-Chi Cheung |
ESEC/SIGSOFT FSE | 2 |
| 2005 | Developing e-Negotiation support with a meta-modeling approach in a Web services environment
Dickson K. W. Chiu, Shing-Chi Cheung, Patrick C. K. Hung, Sherina Y. Y. Chiu, Andriy K. K. Chung |
Decis. Support Syst. | 2 |
| 2005 | Integrating Legacy Sites into Web Services with WebXcriptabstractDespite the recent uprising of the Web Services technology for programmatic interfaces of business-to-business (B2B) E-commerce services (e-services) over the Internet, most existing sites can only support human interactions with Hypertext Markup Language (HTML) through web browsers. Automating third-party client access into Web Services generally requires developing sophisticated programs to simulate human access by handling HTML pages. However, these HTML interfaces vary across web sites, and are often subject to changes. Client maintenance is therefore tedious and expensive. Even for the site owner, it may still require much effort in redeveloping the underlying presentation and application logics. This motivates our study for the requirement and the formulation of a conceptual model for such automation. Based on the requirement, we develop a novel approach to automating dialogs with web-based services (particularly for cross-organizational processes), using a high-level script language, called WebXcript language. The language provides features for HTML forms-based dialogues and eXtended Markup Language (XML) messaging. The XML syntax of WebXcript further enables convenient user authoring and easy engine development with extensively available XML tools. It supports expected responses and exception handling. We further propose a wrapper architecture based on WebXcript to integrate legacy sites into Web Services, where Web Service Definition Language (WSDL) interfaces are generated from high-level mappings from database or WebXcript parameter definitions. We demonstrate the applicability of our approach with examples in integrating distributed information, online ordering, and XML messaging, together with discussions on our experiences and the advantages of our approach. Dickson K. W. Chiu, Danny Kok, Alex K. C. Lee, Shing-Chi Cheung |
Int. J. Cooperative Inf. Syst. | 4 |
| 2005 | Enhancing class commutability in the deployment of design patterns
Tsz Hin Ng, Shing-Chi Cheung |
Inf. Softw. Technol. | 2 |
| 2005 | BLOSSOMS: Building Lightweight Optimized Sensor Systems on a Massive Scale
Wen Gao 0001, Lionel M. Ni, Zhiwei Xu 0002, Shing-Chi Cheung, Qiong Luo 0001 |
J. Comput. Sci. Technol. | 4 |
| 2004 | Use of Cryptographic Technologies for Privacy Protection of Watermarks in Internet Retails of Digital ContentsabstractIn this paper, we propose an implementation of secure watermarking protocol using cryptographic technologies for use in real-life Internet retail market of digital contents, in which there is no trust assumption between a customer and a digital content provider. The blind RSA decryption algorithm is used in our scheme to doubly lock the information by the public key of the content provider and the secret numbers of the customer separately. The privacy of watermark pattern is maintained, while the digital rights of the contents provider are protected. This is achieved by allowing the customer to choose a secret pattern of watermark combination unknown to the content provider. Consequently, the quality of the watermarked digital contents can be guaranteed. We show that the protocol is secure against any possible attacks from the customer and the content provider. Moreover, the dispute resolution process becomes mechanical. Changjie Wang, Ho-fung Leung, Shing-Chi Cheung, Yumin Wang |
AINA (1) | 3 |
| 2004 | Semantic Interpretation and Matching of Web Services
Chang Xu 0001, Shing-Chi Cheung, Xiangye Xiao |
ER | 2 |
| 2004 | Cabot: On the Ontology for the Middleware Support of Context-Aware Pervasive Applications
Chang Xu 0001, Shing-Chi Cheung, Cindy Lo, Ka-Chung Leung, Jun Wei 0001 |
NPC | 2 |
| 2004 | Alerts in Mobile Healthcare Applications: Requirements and Pilot StudyabstractRecent advances in mobile technologies have greatly extended traditional communication technologies to mobile devices. At the same time, healthcare environments are by nature "mobile" where doctors and nurses do not have fixed workspaces. Irregular and exceptional events are generated in daily hospital routines, such as operations rescheduling, laboratory/examination results, and adverse drug events. These events may create requests that should be delivered to the appropriate person at the appropriate time. Those requests that are classified as urgent are referred to as alerts. Efficient routing and monitoring of alerts are keys to quality and cost-effective healthcare services. Presently, these are generally handled in an ad hoc manner. In this paper, we propose the use of a healthcare alert management system to handle these alert messages systematically. We develop a model for specifying alerts that are associated with medical tasks and a set of parameters for their routing. We design an alert monitor that matches medical staff and their mobile devices to receive alerts, based on the requirements of these alerts. We also propose a mechanism to handle and reroute, if necessary, an alert message when it has not been acknowledged within a specific deadline. Eleanna Kafeza, Dickson K. W. Chiu, Shing-Chi Cheung, Marina Kafeza |
IEEE Trans. Inf. Technol. Biomed. | 3 |
| 2004 | Applying generic timing tests for distributed multimedia software systemsabstractWith recent advances in network technologies and computing power, multimedia systems have become a popular means for information delivery. However, testing of these systems is difficult. Due to incomplete control of their runtime and communication environment, precise temporal properties of multimedia systems are nonreproducible. Traditional software testing, which mainly deals with functional correctness, cannot be directly applied to testing temporal properties. Furthermore, time points are hard to be measured exactly, and in this sense are nondeterministic and nonreproducible. To address this problem, we propose a framework for testing the generic temporal properties of media objects in distributed multimedia software systems (DMSS). The timing properties are based on Allen's basic binary temporal relations between two objects, which can be extended to cover multiple objects. We have developed techniques for test case generation, and test result analysis based on a distributed tester architecture. Test templates are used in test case generation to reduce the possibility of human error, and the entire testing procedure can be automated. A prototype system has been built to test a DEC HPAS multimedia presentation system, which is a multimedia system supporting W3C's SMIL standard. Detailed discussions on practical issues illustrated with a number of actual tests are given. Experimental results have shown that our framework is effective in detecting errors in temporal properties. Furthermore, ways to reduce the test effort have been discussed, and guidelines for coming up with criteria for verdict computation based on the real-time requirements of the applications have been suggested. Shing-Chi Cheung, Samuel T. Chanson, Zhendong Xu |
IEEE Trans. Reliab. | 1 |
| 2003 | A Three-Tier View-Based Methodology for Adapting Human-Agent Collaboration Systems
Dickson K. W. Chiu, Shing-Chi Cheung, Ho-fung Leung |
CAiSE | 2 |
| 2003 | Integrating Heterogeneous Web Services with WebXcriptabstractDespite recent uprising of the Web services technology for programmed interfaces of business-to-business (B2B) e-commerce services (e-services) over the Internet, most sites (e.g., online purchases) can only support Hypertext Markup Language (HTML) for human interactions through Web browsers. Automating client access to these services generally requires developing sophisticated programs to simulate human access by handling HTML pages and forms. However, these HTML interfaces vary across Web sites, and are often subjected to changes. Client maintenance is therefore tedious and expensive. This paper presents a novel approach to automate dialogs with Web-based services, using a high-level script language, called WebXcript. WebXcript provides features for HTML forms based dialogues and XML messaging. The XML syntax of WebXcript further enables convenient user authoring and easy engine development with extensively available XML tools. It supports expected responses and exception handling. We further propose a wrapper architecture to integrate heterogeneous Web services based on WebXcript. We demonstrate the applicability of our approach with examples in integrating distributed information, online ordering, and XML messaging. Dickson K. W. Chiu, Danny Kok, Alex K. C. Lee, Shing-Chi Cheung |
COMPSAC | 4 |
| 2003 | Proactive Views on Concrete Aspects: A Pattern Documentation Approach for Software EvolutionabstractA design pattern provides a structure to manage a design aspect by allowing the aspect to be changed without software redesign. For example, the command pattern allows a software design to be easily reconfigured to replace a receiver of a command request or issue a new command request. To prepare for everlasting demands in diverse requirement changes, multiple design patterns are typically deployed to manage various design aspects of a software program. However, this can complicate the underlying program structure, resulting in difficulties of succeeding program revisions to preserve effective management of aspects. In particular, when design aspects cut across each other, realizing changes in one aspect likely revokes the management of other aspects. To address this problem, we propose a documentation approach to govern program revisions. In the approach, a design aspect is associated with a set of proactive views. Each view specifies how an implementation of the aspect is organized so that other aspects can be managed at the same time. The views capture the class relationships that must be kept to preserve effective management of aspects. The approach is illustrated using a pattern-based hotel management system. Tsz Hin Ng, Shing-Chi Cheung |
COMPSAC | 2 |
| 2003 | Implementing Watermark Token in WS-Security for Digital Content Distribution
Shing-Chi Cheung, Hanif Curreem, Dickson K. W. Chiu, Patrick C. K. Hung |
ICWS | 1 |
| 2003 | Developing e-Negotiation Process Support by Web Services
Dickson K. W. Chiu, Shing-Chi Cheung, Patrick C. K. Hung |
ICWS | 2 |
| 2003 | Alert-Driven Process Integration in a Web Services Environment
Eleanna Kafeza, Dickson K. W. Chiu, Shing-Chi Cheung |
ICWS | 3 |
| 2003 | Integration of digital rights management into the Internet Open Trading Protocol
Sai Ho Kwok, Shing-Chi Cheung, K. C. Wong 0004, K. F. Tsang, Siu Man Lui, Kar Yan Tam |
Decis. Support Syst. | 2 |
| 2003 | A three-tier view-based methodology for M-services adaptationabstractWith recent advances in mobile technologies and infrastructures, there are increasing demands for ubiquitous access to networked services. These services, generally known as m-services, extend supports from Web browsers on personal computers to handheld devices, such as mobile phones and PDAs. However, in general, the capabilities and bandwidth of these devices are significantly inferior to desktop computers over wired connections, which have been assumed by most Internet services. Instead of redesigning or adapting m-services in an ad-hoc manner for multiple platforms available in handheld devices, we propose a methodology for such adaptation based on three tiers: user interface views, data views, and process views. These views provide customization and help balance security and trust. User interface views provide alternative presentations of inputs and outputs. Data views summarize data over limited bandwidth and map heterogeneous data sources. In addition, we introduce a novel approach of applying process views to m-service adaptation, where mobile users may execute a more concise version or modified procedures of the original process. The process view also serves as the key mechanism for integrating user interface views and data views. In addition, we present a formal model on view consistency and integrity in our methodology. We demonstrate the feasibility of our methodology by extending a service negotiation subsystem into an m-service with multi-platform support. Dickson K. W. Chiu, Shing-Chi Cheung, Eleanna Kafeza, Ho-fung Leung |
IEEE Trans. Syst. Man Cybern. Part A | 2 |
| 2002 | Rights Protection for Digital Contents Redistribution Over the InternetabstractAlthough the customer-to-customer (C2C) business model has been around for years, second-hand markets of digital contents over the Internet are still unpopular. A key factor to the success of second-hand markets lies in the support of rights management of digital contents redistribution over the Internet. Although various watermarking protocols have been proposed to achieve digital rights protection over the Internet, they do not generally provide protection over a second-hand market. We propose a buyer-reseller watermarking protocol that protects the interests of buyers, resellers and the original sellers. The protocol is adapted from a previous work proposed by Memon and Wong (2001), which defends the interests of buyers against sellers' unethical distribution of watermarked contents. Our protocol makes use of watermark certificates to distribute the information of buyers' identities. An implementation outline of the proposed protocol is given. Shing-Chi Cheung, Hanif Curreem |
COMPSAC | 1 |
| 2002 | A Meta-model for e-Contract Template Variable Dependencies Facilitating e-Negotiation
Shing-Chi Cheung, Patrick C. K. Hung, Dickson K. W. Chiu |
ER | 1 |
| 2002 | A CSP and Z combined modeling of document exchange processes in e-commerce protocols
Shing-Chi Cheung, Jun Wei 0001 |
Inf. Softw. Technol. | 2 |
| 2002 | Automated test case generation for the stress testing of multimedia systemsabstractAbstract With the advancement in network bandwidth and computing power, multimedia systems have become a popular means for information delivery. However, general principles of system testing cannot be directly applied to testing of multimedia systems on account of their stringent temporal and synchronization requirements. In particular, few studies have been made on the stress testing of multimedia systems with respect to their temporal requirements under resource saturation. Stress testing is important because erroneous behavior is most likely to occur under resource saturation. This paper presents an automatable method of test case generation for the stress testing of multimedia systems. It adapts constraint solving techniques to generate test cases that lead to potential resource saturation in a multimedia system. Coverage of the test cases is defined upon the reachability graph of a multimedia system. The proposed stress testing technique is supported by tools and has been successfully applied to a real‐life commercial multimedia system. Although our technique focuses on the stress testing of multimedia systems, the underlying issues and concepts are applicable to other types of real‐time systems. Copyright © 2002 John Wiley & Sons, Ltd. Jian Zhang 0001, Shing-Chi Cheung |
Softw. Pract. Exp. | 2 |
| 2001 | Exploiting Automatic Analysis of E-Commerce ProtocolsabstractWhile e-commerce continuously grows prosperous, some advantages e-commerce applications claimed haven't really been gained. More seriously, the availability and reliability of these systems are particularly hard to obtain. The e-commerce protocols, as the core of e-commerce applications, ask for new development approach and techniques to be introduced for their highly reliable and safe design and implementation. This paper describes research on synthesis of extended UML formalism and formal verification techniques for automatic development of e-commerce protocols. In this paper, we refine AUML protocol diagrams for visual modeling, and develop algorithm and rules to translate visually modeled e-commerce protocols into formal models that are then validated using model checking. This approach is applied to the design of an e-commerce protocol, NetBill, as example. Our objective is to create tools that enable designers to automatically develop available and reliable e-commerce protocols. Jun Wei 0001, Shing-Chi Cheung |
COMPSAC | 2 |
| 2001 | Automatic Generation of Database Instances for White-box TestingabstractTesting is a critical activity for database application programs as faults if undetected could lead to unrecoverable data loss. Database application programs typically contain statements written in an imperative programming language with embedded data manipulation commands, such as SQL. However relatively little study has been made in the testing of database application programs. In particular, few testing techniques explicitly consider the inclusion of database instances in the selection of test cases and the generation of test data input. In this paper, we study the generation of database instances that respect the semantics of SQL statements embedded in a database application program. The paper also describes a supporting tool which generates a set of constraints. These constraints collectively represent a property against which the program is tested. Database instances for program testing can be derived by solving the set of constraints using existing constraint solvers. Jian Zhang 0001, Shing-Chi Cheung |
COMPSAC | 3 |
| 2001 | Toward Generic Timing Tests for Distributed Multimedia Software SystemsabstractWhile multimedia software applications are becoming popular, few studies exist on testing this important class of software, especially with respect to its temporal properties. Traditional software testing techniques mainly deal with functional correctness and cannot be directly applied to testing timing properties. The authors present a framework for testing the generic temporal relations of media objects in distributed multimedia software systems (DMSS). The temporal relations are based on J.F. Allen's (1983) basic binary temporal relations between two objects and extended to cover multiple number of objects in different streams. We have developed techniques for test case generation and test result analysis based on a distributed tester architecture. A prototype system has been built to test a DEC HPAS multimedia presentation system which is a typical multimedia system supporting W3C's SMIL standard. A detailed discussion on practical issues and illustration with a number of actual tests are given. Experimental results have shown that our framework is effective in detecting timing errors. The techniques and methodology are general and can be applied to other DMSS with only minor modification. Shing-Chi Cheung, Samuel T. Chanson, Zhendong Xu |
ISSRE | 1 |
| 2001 | Modeling and Verifying Strong Cache Consistency for Mobile Data Access abstractRecent advances in wireless and mobile networks have led to the exponential growth of mobile applications. Unlike conventional computing, mobile computing has stringent constraints in network resources, such as bandwidth and connectivity. As such, data in mobile applications are often cached at clients to increase performance, data availability and reliability. Formal verification of cache coherence in data access is essential in ascertaining the validity of a cache coherence protocol. Although a number of studies have been made in this subject, few researchers focused on mobile data access. In this paper, we present an automatic approach towards formal validation of a cache validation protocol supporting mobile data access. This approach combines the flexibility of visual modeling techniques with the rigor of formal validation. As it is difficult to construct the formal model of protocol, we have developed a set of formalization and translation rules to automate the process of construction. The reliability of the protocol has been verified using model checking. Jun Wei 0001, Shing-Chi Cheung, Jing Li 0047, Yulin Feng |
ISSRE | 2 |
| 1999 | Stress Testing of Distributed Multimedia Software Systems
Jian Zhang 0001, Shing-Chi Cheung, Samuel T. Chanson |
FORTE | 2 |
| 1999 | A CSCW Framework for the Flexible Coupling of Groupware WidgetsabstractModern CSCW (computer supported cooperative work) applications are driven by intensive graphical user interfaces. Groupware widgets such as shared scrollbars and text editors are common in these applications to facilitate synchronization of shared information across a user group. These widgets differ from their single-user counterparts in that they must coordinate and consistently reflect changes in shared widget properties. We propose a framework allowing these groupware widgets to be transformed from their single-user counterparts. The framework enables single-user widgets to register their connections to a separate notification server. After registration, these widgets become groupware widgets. The notification server uses the registered connections to update widgets of the changes in shared properties using a callback mechanism. Widget designers only need to determine the set of properties by which a group of widgets should be synchronized and to what extent they are synchronized. These properties collectively define the coupling among a group of widgets. The coupling is kept as a coupling portfolio in the notification server. Dynamic modification of coupling portfolios is supported by on-the-fly reconfiguration of multicast groups. Our framework is useful to simplify the client implementation of handling synchronization events and reduce the overheads of processing these events. These concepts are illustrated using a groupware Web browser. Paul Leung, Shing-Chi Cheung |
ICECCS | 2 |
| 1999 | Behaviour Analysis of Distributed Systems Using the Tracta Approach
Dimitra Giannakopoulou, Jeff Kramer, Shing-Chi Cheung |
Autom. Softw. Eng. | 3 |
| 1999 | A model-based authorware for the construction of distributed multimedia systems
Shing-Chi Cheung, Samuel T. Chanson |
Inf. Softw. Technol. | 1 |
| 1999 | Checking Safety Properties Using Compositional Reachability AnalysisabstractThe software architecture of a distributed program can be represented by a hierarchical composition of subsystems, with interacting processes at the leaves of the hierarchy. Compositional reachability analysis (CRA) is a promising state reduction technique which can be automated and used in stages to derive the overall behavior of a distributed program based on its architecture. CRA is particularly suitable for the analysis of programs that are subject to evolutionary change. When a program evolves, only the behaviors of those subsystems affected by the change need be reevaluated. The technique however has a limitation. The properties available for analysis are constrained by the set of actions that remain globally observable. Properties involving actions encapsulated by subsystems may therefore not be analyzed. In this article, we enhance the CRA technique to check safety properties which may contain actions that are not globally observable. To achieve this, the state machine model is augmented with a special trap state labeled as π. We propose a scheme to transform, in stages, a property that involves hidden actions to one that involves only globally observable actions. The enhanced technique also includes a mechanism aiming at reducing the debugging effort. The technique is illustrated using a gas station system example. Shing-Chi Cheung, Jeff Kramer |
ACM Trans. Softw. Eng. Methodol. | 1 |
| 1997 | A Framework for Distributed Object-Oriented Testing
Alan C. Y. Wong, Samuel T. Chanson, Shing-Chi Cheung, Holger Fuchs |
FORTE | 3 |
| 1996 | Checking Subsystem Safety Properties in Compositional Reachability Analysis
Shing-Chi Cheung, Jeff Kramer |
ICSE | 1 |
| 1996 | Context Constraints for Compositional Reachability AnalysisabstractBehavior analysis of complex distributed systems has led to the search for enhanced reachability analysis techniques which support modularity and which control the state explosion problem. While modularity has been achieved, state explosion in still a problem. Indeed, this problem may even be exacerbated, as a locally minimized subsystem may contain many states and transitions forbidden by its environment or context. Context constraints, specified as interface processes, are restrictions imposed by the environment on subsystem behavior. Recent research has suggested that the state explosion problem can be effectively controlled if context constraints are incorporated in compositional reachability analysis (CRA). Although theoretically very promising, the approach has rarely been used in practice because it generally requires a more complex computational model and does not contain a mechanism to derive context constraints automatically. This article presents a technique to automate the approach while using a similar computational model to that of CRA. Context constraints are derived automatically, based on a set of sufficient conditions for these constraints to be transparently included when building reachability graphs. As a result, the global reachability graph generated using the derived constraints is shown to be observationally equivalent to that generated by CRA without the inclusion of context constraints. Constraints can also be specified explicitly by users, based on their application knowledge. Erroneous constraints which contravene transparency can be identified together with an indication of the error sources. User-specified constraints can be combined with those generated automatically. The technique is illustrated using a clients/server system and other examples. Shing-Chi Cheung, Jeff Kramer |
ACM Trans. Softw. Eng. Methodol. | 1 |
| 1995 | Compositional Reachability Analysis of Finite-State Distributed Systems with User-Specified ConstraintsabstractThe software architecture of a distributed system can be described as a hierarchical composition of subsystems, with SIGSOFT '95 Washington, D. C.. USA Shing-Chi Cheung, Jeff Kramer |
SIGSOFT FSE | 1 |
| 1995 | Contextual Local Analysis in the Design of Distributed Systems
Shing-Chi Cheung, Jeff Kramer |
Autom. Softw. Eng. | 1 |
| 1994 | An Integrated Method for Effective Behaviour Analysis of Distributed Systems
Shing-Chi Cheung, Jeff Kramer |
ICSE | 1 |
| 1994 | Tractable Dataflow Analysis for Distributed SystemsabstractAutomated behavior analysis is a valuable technique in the development and maintenance of distributed systems. In this paper, we present a tractable dataflow analysis technique for the detection of unreachable states and actions in distributed systems. The technique follows an approximate approach described by Reif and Smolka, but delivers a more accurate result in assessing unreachable states and actions. The higher accuracy is achieved by the use of two concepts: action dependency and history sets. Although the technique does not exhaustively detect all possible errors, it detects nontrivial errors with a worst-case complexity quadratic to the system size. It can be automated and applied to systems with arbitrary loops and nondeterministic structures. The technique thus provides practical and tractable behavior analysis for preliminary designs of distributed systems. This makes it an ideal candidate for an interactive checker in software development tools. The technique is illustrated with case studies of a pump control system and an erroneous distributed program. Results from a prototype implementation are presented.> Shing-Chi Cheung, Jeff Kramer |
IEEE Trans. Software Eng. | 1 |
| 1993 | Enhancing Compositional Reachability Analysis with Context ConstraintsabstractCompositional techniques have been proposed for traditional reachability analysis in order to introduce modularity and to control the state explosion problem. While modularity has been achived, state explosion is still a problem. Indeed, this problem may even be exacerbated as a locally minimised subsystem may contain many states and transitions forbidden by its context or environments. This paper presents a method to alleviate this problem effectively by including context constraints in local subsystem minimisation. The global behaviour generated using the method is observationally equivalent to that generated by compositional reachability analysis without the inclusion of context constraints.Context constraints, specified as interface processes, are restrictions imposed by the environment on subsystem behaviour. The minimisation produces a simplified machine that describes the behaviour of the subsystem constrained by its context. This machine can also be used as a substitute for the original subsystem in the subsequent steps of the compositional reachability analysis. Interface processes capturing context constraints can be specified by users or automatically constructd using a simple algorithm. The concepts in the paper are illustrated with a clients/server system. Shing-Chi Cheung, Jeff Kramer |
SIGSOFT FSE | 1 |
| 1991 | Parallel Algorithm Design for Workstation ClustersabstractAbstract Clusters of workstations connected by local area networks are in common use in many organizations. The combined processing power of these clusters is rarely exploited owing to the lack of suitable parallel algorithms. The paper describes a parallel programming paradigm calledsupervisor‐worker, suitable for the workstation environment, which can be used to speed up the execution of a large class of existing sequential programs. Simple formulae are developed to predict the speed‐up of a parallel algorithm developed in this way. The predictions depend on two easily‐determined parameters of the sequential program and the characteristic communication cost of the workstation cluster. Consequently, it is possible to estimate the benefits of the parallel program before proceeding with detailed implementation. As an example, the parallel version of a travelling salesman program is developed and the measured speed‐up compared with the predicted speed‐up. Jeff Magee, Shing-Chi Cheung |
Softw. Pract. Exp. | 2 |