This repository contains the ConfFix tool, the evaluation detail and the benchmark of real-world configuration compatibility issues.
Please find Section_3.xlsx
for the detailed information of our empirical study in Section 3.
The dataset for evaluating ConfFix contains 81 reproducible CC issues. Please check ./evaluation/issue_in_the_latest_version.xlsx
and ./evaluation/issue_in_the_past.xlsx
for the information of 81 CC issues, including the reproduction videos and our submitted pull requests and issue reports to the app developers. We submitted patches for 39 successfully-repaired issues, of which 38 have been confirmed and merged by the app developers. For the detail please check ./evaluation/issue_in_the_latest_version.xlsx
.
The APK files and test cases of these 81 CC issues are provided here. Please put them inside the ./source_code
folder when you run the experiment.
We provide a .sh
file for each issue to help you reproduce the results of ConfFix (conffix-exp-sh.rar
) and XFix (xfix-exp-sh.rar
) . Put them in the root directory of ./source_code
to make them a try.
We also release the experimental results of ConfFix, XFix and Lint in ./evaluation/Lint&ConfFix&XFix output.xlsx
. Besides, the raw outputs of ConfFix and XFix can be found in ./evaluation/raw_outputs/
folders.
- UIAutomator2
- Python 3
- Android emulators at target API levels (e.g., API level 33)
- Download Android SDK Command line tools link and unzip the .zip file.
- Rename cmdline-tools to be tools and put it under an SDK root folder (e.g.,
/ssddata/SDK/android_sdk_linux
). So now the tools path will be/ssddata/SDK/android_sdk_linu/tools
- Navigate to the SDK root and type in the following commands to install necessary files for the SDK
(1) tools/bin/sdkmanager --sdk_root=/ssddata/SDK/android_sdk_linux --install "system-images;android-33;google_apis;x86_64"
(2) tools/bin/sdkmanager --sdk_root=/ssddata/SDK/android_sdk_linux --install "platforms;android-33"
(3) tools/bin/sdkmanager --sdk_root=/ssddata/SDK/android_sdk_linux --install "platform-tools"
(4) tools/bin/sdkmanager --sdk_root=/ssddata/SDK/android_sdk_linux --install "emulator"
(5) tools/bin/sdkmanager --sdk_root=/ssddata/SDK/android_sdk_linux --install "build-tools;31.0.0"
- Add something into PATH
export ANDROID_HOME=/ssddata/SDK/android_sdk_linux
export PATH=$PATH:$ANDROID_HOME:$ANDROID_HOME/emulator:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
export ANDROID_SDK_ROOT=$ANDROID_HOME
export ANDROID_AVD_HOME=~/.android/avd
export PATH=$PATH:$ANDROID_AVD_HOME
-
Create an folder under the SDK root named avds and create an Android emulator:
avdmanager create avd -n emulator0 -k "system-images;android-33;google_apis;x86_64" -p avds/emulator0
-
Modify the emulator configuration to change the screen size of your emulator: In our evaluation, we set an emulator with 560dpi density. The density is set following the device profile of Google Pixel 6 Pro. To achieve this, modify the emulator configuration files (the file usually is:
./emulator0/config.ini
). Please changehw.lcd.density=560
-
Launch the emulators:
- Copy the essential files
cd /SDK/android_sdk_linux
mkdir android_sdk_linux && cd android_sdk_linux && mkdir system-images
cd /SDK/android_sdk_linux
cp system-images/* ./android_sdk_linux/system-images/ -r
- Launch the emulator
emulator @emulator0 -wipe-data -no-window -no-audio -memory 4096 -port 5554 -partition-size 8192 -skin 1440x3120 “android_sdk_linux/....”
This command launches the emulator emulator0
in the port 5554. We set the device with 4GB RAM, 8GB disk, and 1440x3120 resolution. The resolution is set following the device profile of Google Pixel 6 Pro.
- Install uiautomator2, which is used for executing test scripts
pip3 install --upgrade --pre uiautomator2
- Add zipaligner and apksigner, which are used to sign the apk files generated by apktool. You can find zipaligner and apksigner in
android_sdk/build-tools/[version_number]
(the version number of the build tools you installed). For example, you may add the following environment variable.
export ANDROIDBUILDPATH=$ANDROID_SDK_ROOT/build-tools/31.0.0
export ANDROIDPLATFORMPATH=$ANDROID_SDK_ROOT/platform-tools
- To reproduce the experiment result, we have prepared a
.sh
file for each issue to run (./source_code/conffix-exp-sh.zip
and./source_code/xfix-exp-sh.zip
). For example, to try cwa_tan_input_digit_error, use the following command.
sh exp_cwa_tan_input_digit_error.sh emulator-5554 emulator-5556
where emulator-5554
stands for the devices in the target API level, and emulator-5556
stands for the devices in the issue-inducing API level.
ConfFix generates a patch as follows.