Week 3 (6/3 - 6/7)

This week marks the beginning of an exciting hands-on task, where I will put into practice the knowledge gained from previous weeks into practical settings. In this task, I will be checking out Defects4J bugs listed in a compressed file named “patches-dataset.tar.gz”, applying patches to them, and running their test cases to ensure that all the test cases pass. The main objective of this task is to develop proficiency in checking out bugs from the repository, applying patches to resolve them, and conducting quality assurance through immersive, hands-on practice.

Progress Update for this Week:

  • 6/3/2024
    • Began working on the hands-on task. When I attempted to extract the contents of the downloaded file “patches-dataset.tar.gz”, I encountered a problem. To my surprise, the file turned out to be an HTML document rather than a valid gzip archive, and this led to an “End-of-central-directory signature not found” error during the extraction process. The ‘file’ command confirmed that the downloaded file was not in the expected format. I spent several hours trying to resolve this issue but could not solve the problem. Thus, I brought this issue up to Dr. Ghanbari.
  • 6/4/2024
    • Attended the weekly group meeting on Zoom with Dr. Ghanbari and fellow students, where we brainstormed solutions to the problem that I faced yesterday. Dr. Ghanbari suggested a potential fix by transferring files from a Windows environment to the Windows Subsystem for Linux (WSL). Searching on the internet, I discovered that accessing the Windows system through the “/mnt/c” directory within the WSL environment could potentially resolve the issue. Implementing this approach successfully resolved my issue, allowing me to proceed with the task.
    • Checked out Defects4J bugs listed in the “patches-dataset.tar.gz” file using the following command format:

                                  defects4j checkout -p <project_id> -v <version_id> -w <work_dir>
      
  • 6/5/2024
    • Read a research paper on Automated Classification of Overfitting Patches. This paper introduces Overfitting Detection System (ODS), a machine learning approach that determines the likelihood of a patch being overfit. Using this technique, researchers not only can evaluate the correctness of the patch but also the generalizability of generated solutions. In the context of my project, applying the ODS technique can contribute to evaluating the correctness and effectiveness of automated repair patches, which aligns with the goal of improving automated program repair methodologies for my project.
  • 6/6/2024
    • Applied patches to the bugs using the command format:

                                                git apply <name_of_the_patch_file>
      

      For patches that are labelled as correct, the terminal outputs: “Applied patch cleanly".

      For patches that are labelled as incorrect, the terminal outputs: “error: patch failed: Apply patch with reject... Rejected hunk..."

  • 6/7/2024
    • Read a research paper on Evaluating Representation Learning of Code Changes for Predicting Patch Correctness. This paper investigates the use of deep learning models to predict patch correctness by learning representations of code changes. Unlike the Overfitting Detection System (ODS) technique, which focuses on detecting overfitting patches, this research emphasizes the application of neural networks to enhance the accuracy of predicting whether a patch is correct. Understanding these advanced representation learning techniques is crucial for my project, as it offers new methodologies to effectively identify and validate correct patches, thereby improving the reliability and performance of automated repair tools.