Manuscript Offprint

arXiv:2610.12920

SCCGBench: Executability-Oriented Evaluation for Real-World Web Service-Call Code Generation

Shuo Wang, Guodong Fan, Ming Zhu, Jing Li, Chun Wang

Shuo Wang, Guodong Fan, Ming Zhu, Jing Li, and Chun Wang

Abstract—LLM-generated service-call code is increasingly important for service computing, where developers rely on large language models (LLMs) to compose services and invoke third-party services. However, current approaches have not yet evaluated the invocation and execution of services in the actual code environment. To support execution-grounded evaluation, we present the Service-Call Code Generation Benchmark (SCCG-Bench), a benchmark of 3,135 traceable and decontamination-filtered RapidAPI call functions from real GitHub repositories. SCCGBench uses redacted-intent generation to reduce circular leakage and introduces Mock, Robust, ParamF1, and host-, endpoint-, method-, and parameter-level diagnostics. Mock denotes a virtual-execution hit that simultaneously matches the gold host, endpoint, and HTTP method, while Robust further requires status checking and exception handling. We evaluate six code LLMs and one non-neural retrieval baseline under intent-only, retrieval-augmented, and gold-documentation Oracle settings. Results show that models often generate syntactically correct or superficially similar HTTP-request code but achieve low Mock success in the intent-only setting; the strongest evaluated model obtains only 3.76% Mock. Under the gold-documentation Oracle settings (C3 and C5), Mock reaches 88.73%-90.52% for the open-source models evaluated in RQ2 and 76.47%-81.86% for DeepSeek-V4-Pro, whereas sparse and dense retrieval remain far below this oracle level. The findings indicate that service/API grounding is the main bottleneck: Mock is dominated by host, endpoint, and method alignment, while ParamF1 separately reveals parameter-alignment errors. SCCGBench provides an execution-grounded benchmark for Web service invocation, API recommendation, service-interface retrieval, endpoint grounding, and reliable service-call automation.

Index Terms—Service computing, Web service invocation, API recommendation, code generation benchmark, large language models, executability evaluation, data contamination.

I. INTRODUCTION

Service computing increasingly relies on software agents and large language models (LLMs) that can transform user intents into executable interactions with external Web services [1]. In a typical service-oriented application, a developer may ask an assistant to retrieve weather information, query financial data, translate text, or access travel services through APIs. The generated code must not only be syntactically valid; it must also select the correct service host, endpoint route, HTTP method, request headers, and query/body parameters. Therefore, service-call code generation is a service-interface grounding problem as well as a code synthesis problem.

As a motivating example, consider the developer intent “get the current weather for a city.” The model must correctly select the host of the target service, e.g., weather-api.p.rapidapi.com, the endpoint route, e.g., /current, the HTTP method, and valid query parameters, such as the city name. Fig. 1 illustrates this grounding requirement: a service-call program is executable only when the generated request is aligned with the intended service interface rather than merely resembling plausible HTTP-request code. If either the host or the endpoint points to an incorrect target, for example by invoking another weather service or misspelling the route, the generated code fails to hit the intended interface even if it is syntactically complete and structurally plausible. In engineering terms, the entire request fails. As our experiments show (Section V), current models most often fail exactly at this stage of selecting the right service: the vast majority of failures are caused by incorrect hosts rather than by an inability to construct requests. This highlights that evaluating service-call code generation must go beyond textual similarity and directly measure the executability of requests.

The community has proposed a series of benchmarks for evaluating code models. HumanEval and MBPP evaluate algorithmic correctness using standalone functions and unit tests [2], [3]; CrossCodeEval and CoderEval introduce cross-file context to better approximate repository-level engineering [4], [5]; and ComplexCodeEval further emphasizes high-star repositories, real dependencies, and timestamp-based designs to mitigate data leakage [6]. These benchmarks have made important progress in algorithmic correctness, contextual dependency, and realism. However, directly transferring them to Web service-call evaluation leaves three limitations insufficiently addressed.

First, tasks and metrics are misaligned with service computing. Existing benchmarks usually rely on static similarity measures such as CodeBLEU and Edit Similarity or on unit-test pass rates. Static similarity can indicate whether generated code looks like a reference implementation, but it cannot determine whether a request hits the correct service endpoint. Unit-test evaluation is also difficult to apply at scale because real Web service calls depend on credentials, network reachability, billing, rate limits, and service availability. Second, sample realism and traceability remain insufficient. Many public data sources contain automatically generated wrappers or tool-learning templates whose signatures and request structures are highly repetitive. Such samples do not reflect the diversity of in-the-wild API usage in real repositories. Third,

Shuo Wang, Ming Zhu, and Jing Li are with Shandong University of Technology, Zibo, China (e-mail: 25405010689@stumail.sdut.edu.cn; zhu_ming@sdut.edu.cn; li_jing@sdut.edu.cn).

Guodong Fan is with Shandong Agriculture and Engineering University, Zibo, China (e-mail: guodong.fan@126.com).

Chun Wang is with Concordia University, Montreal, QC, Canada (e-mail: chun.wang@concordia.ca).

Corresponding author: Jing Li.

This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.

Figure

Fig. 1. Motivating example of service-interface grounding in service-call code generation.

data contamination and circular leakage remain a concern. When missing comments are completed by asking an LLM to directly transcribe code, the resulting comments may leak hosts, endpoints, parameter keys, or URL fragments, thereby turning interface grounding into answer extraction.

To address these issues, this study presents the Service-Call Code Generation Benchmark (SCCGBench), an executability-oriented benchmark for real-world Web service-call code generation. SCCGBench mines RapidAPI call functions from real GitHub repositories and semantically aligns them with official documentation. It detects and removes template and automatically generated wrapper code, preserves complete provenance information such as repository, file URL, stars, license, and update time, and uses redacted intent generation for samples with missing comments. Specifically, before the code is given to the generation model, hosts, URLs, endpoints, and parameter keys/values are masked, and only the user goal is described in the style of real developer intents. Paired validation and group-wise ablations show no evidence that redacted intents provide an execution advantage over human comments, supporting the effectiveness of the decontamination procedure.

Based on SCCGBench, we conduct a systematic evaluation of one non-neural baseline and six code LLMs around three research questions. RQ1 investigates whether static similarity is consistent with real executability. RQ2 examines whether retrieval augmentation and gold documentation can overcome the bottleneck and where the bottleneck lies. RQ3 evaluates the reliability of the benchmark with respect to data contamination, temporal leakage, metric trustworthiness, and decoding diversity. The experiments yield three main findings. First, models “look right but fail to execute”: their Mock scores remain below 3.8% in the intent-only setting, including a frontier reasoning-capable model evaluated in non-think mode. Second, API documentation retrieval and endpoint grounding form the core bottleneck: with gold documentation, Mock scores increase to approximately 89–90% for most open-source models and about 82% for DeepSeek-V4-Pro, whereas BM25 and dense retrieval still leave many correct endpoints outside the candidate set. Third, decontamination ablation, temporal slicing, human–machine agreement, decoding-diversity analysis, and bounded real-call validation jointly support the reliability of the data and evaluation.

The main contributions of this paper are as follows:

• Benchmark contribution: We propose SCCGBench, a provenance-preserving benchmark for real-world Web service-call code generation. It contains 3,135 samples, 850 APIs, and 2,082 repositories, and uses redacted intent generation with paired validation to substantially reduce data contamination and circular leakage.

• Evaluation-framework contribution: We design an executability-oriented evaluation framework for service-interface grounding. It includes Mock/Robust metrics, host/endpoint/method/parameter-level diagnostics, and a macro-micro analysis strategy that connects generated code to service invocation correctness.

• Service-computing contribution: We identify API documentation retrieval and endpoint grounding as the central bottlenecks for reliable Web service invocation, quantifying the gap between intent-only generation, RAG, and gold-documentation oracle settings. This provides direct implications for API recommendation, service discovery, and retrieve–select–generate service-call automation.

• Reliability contribution: We validate benchmark reliability through comment-contamination analysis, temporal slicing, human–machine agreement, decoding-diversity analysis, and bounded real-call validation, while explicitly discussing the limitations of virtual execution, Python-only data, and the RapidAPI ecosystem.

References (32)