1,313 research outputs found
Statically Checking Web API Requests in JavaScript
Many JavaScript applications perform HTTP requests to web APIs, relying on
the request URL, HTTP method, and request data to be constructed correctly by
string operations. Traditional compile-time error checking, such as calling a
non-existent method in Java, are not available for checking whether such
requests comply with the requirements of a web API. In this paper, we propose
an approach to statically check web API requests in JavaScript. Our approach
first extracts a request's URL string, HTTP method, and the corresponding
request data using an inter-procedural string analysis, and then checks whether
the request conforms to given web API specifications. We evaluated our approach
by checking whether web API requests in JavaScript files mined from GitHub are
consistent or inconsistent with publicly available API specifications. From the
6575 requests in scope, our approach determined whether the request's URL and
HTTP method was consistent or inconsistent with web API specifications with a
precision of 96.0%. Our approach also correctly determined whether extracted
request data was consistent or inconsistent with the data requirements with a
precision of 87.9% for payload data and 99.9% for query data. In a systematic
analysis of the inconsistent cases, we found that many of them were due to
errors in the client code. The here proposed checker can be integrated with
code editors or with continuous integration tools to warn programmers about
code containing potentially erroneous requests.Comment: International Conference on Software Engineering, 201
Recommended from our members
Creating awareness of kinaesthetic learning using the Experience API: current practices, emerging challenges, possible solutions
We describe our use of the Experience API in preparing blue-collar workers for three frequently arising work contexts, including, for example, the requirement to perform maintenance tasks exactly as specified, consistently, quickly, and without error. We provide some theoretical underpinning for modifying and updating the API to remain useful in near-future training scenarios, such as having a shorter time allowed for kinaesthetic learning experiences than in traditional apprenticeships or training. We propose ways to involve a wide range of stakeholders in appraising the API and ensuring that any enhancements to it, or add-ons, are useful, feasible and compatible with current TEL practices and tools, such as learning-design modelling languages
Comprehension of Ads-supported and Paid Android Applications: Are They Different?
The Android market is a place where developers offer paid and-or free apps to
users. Free apps are interesting to users because they can try them immediately
without incurring a monetary cost. However, free apps often have limited
features and-or contain ads when compared to their paid counterparts. Thus,
users may eventually need to pay to get additional features and-or remove ads.
While paid apps have clear market values, their ads-supported versions are not
entirely free because ads have an impact on performance.
In this paper, first, we perform an exploratory study about ads-supported and
paid apps to understand their differences in terms of implementation and
development process. We analyze 40 Android apps and we observe that (i)
ads-supported apps are preferred by users although paid apps have a better
rating, (ii) developers do not usually offer a paid app without a corresponding
free version, (iii) ads-supported apps usually have more releases and are
released more often than their corresponding paid versions, (iv) there is no a
clear strategy about the way developers set prices of paid apps, (v) paid apps
do not usually include more functionalities than their corresponding
ads-supported versions, (vi) developers do not always remove ad networks in
paid versions of their ads-supported apps, and (vii) paid apps require less
permissions than ads-supported apps. Second, we carry out an experimental study
to compare the performance of ads-supported and paid apps and we propose four
equations to estimate the cost of ads-supported apps. We obtain that (i)
ads-supported apps use more resources than their corresponding paid versions
with statistically significant differences and (ii) paid apps could be
considered a most cost-effective choice for users because their cost can be
amortized in a short period of time, depending on their usage.Comment: Accepted for publication in the proceedings of the IEEE International
Conference on Program Comprehension 201
- …