From 34a89a08937a2b4f9444a75229acfd3de7c138ab Mon Sep 17 00:00:00 2001 From: cactusbranch01 Date: Mon, 20 May 2024 19:38:31 -0700 Subject: [PATCH] Delete jupyter nbs --- src/python/high_level_analysis.ipynb | 250 --------------------------- 1 file changed, 250 deletions(-) delete mode 100644 src/python/high_level_analysis.ipynb diff --git a/src/python/high_level_analysis.ipynb b/src/python/high_level_analysis.ipynb deleted file mode 100644 index 2b326c9318..0000000000 --- a/src/python/high_level_analysis.ipynb +++ /dev/null @@ -1,250 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "RangeIndex: 1181 entries, 0 to 1180\n", - "Data columns (total 45 columns):\n", - " # Column Non-Null Count Dtype \n", - "--- ------ -------------- ----- \n", - " 0 idx 1181 non-null object\n", - " 1 repo-idx 1181 non-null int64 \n", - " 2 merge-idx 1181 non-null int64 \n", - " 3 branch_name 1181 non-null object\n", - " 4 merge 1181 non-null object\n", - " 5 left 1181 non-null object\n", - " 6 right 1181 non-null object\n", - " 7 notes 1 non-null object\n", - " 8 test merge 1181 non-null bool \n", - " 9 diff contains java file 1181 non-null bool \n", - " 10 left_tree_fingerprint 1181 non-null object\n", - " 11 left parent test result 1181 non-null object\n", - " 12 right_tree_fingerprint 1181 non-null object\n", - " 13 right parent test result 1181 non-null object\n", - " 14 parents pass 1181 non-null bool \n", - " 15 sampled for testing 1181 non-null bool \n", - " 16 gitmerge_ort 1181 non-null object\n", - " 17 gitmerge_ort_merge_fingerprint 1181 non-null object\n", - " 18 gitmerge_ort_ignorespace 1181 non-null object\n", - " 19 gitmerge_ort_ignorespace_merge_fingerprint 1181 non-null object\n", - " 20 gitmerge_recursive_histogram 1181 non-null object\n", - " 21 gitmerge_recursive_histogram_merge_fingerprint 1181 non-null object\n", - " 22 gitmerge_recursive_ignorespace 1181 non-null object\n", - " 23 gitmerge_recursive_ignorespace_merge_fingerprint 1181 non-null object\n", - " 24 gitmerge_recursive_minimal 1181 non-null object\n", - " 25 gitmerge_recursive_minimal_merge_fingerprint 1181 non-null object\n", - " 26 gitmerge_recursive_myers 1181 non-null object\n", - " 27 gitmerge_recursive_myers_merge_fingerprint 1181 non-null object\n", - " 28 gitmerge_recursive_patience 1181 non-null object\n", - " 29 gitmerge_recursive_patience_merge_fingerprint 1181 non-null object\n", - " 30 gitmerge_resolve 1181 non-null object\n", - " 31 gitmerge_resolve_merge_fingerprint 1181 non-null object\n", - " 32 gitmerge_ort_adjacent 1181 non-null object\n", - " 33 gitmerge_ort_adjacent_merge_fingerprint 1181 non-null object\n", - " 34 gitmerge_ort_imports 1181 non-null object\n", - " 35 gitmerge_ort_imports_merge_fingerprint 1181 non-null object\n", - " 36 gitmerge_ort_imports_ignorespace 1181 non-null object\n", - " 37 gitmerge_ort_imports_ignorespace_merge_fingerprint 1181 non-null object\n", - " 38 git_hires_merge 1181 non-null object\n", - " 39 git_hires_merge_merge_fingerprint 1181 non-null object\n", - " 40 spork 1181 non-null object\n", - " 41 spork_merge_fingerprint 1181 non-null object\n", - " 42 intellimerge 1181 non-null object\n", - " 43 intellimerge_merge_fingerprint 1181 non-null object\n", - " 44 repository 1181 non-null object\n", - "dtypes: bool(4), int64(2), object(39)\n", - "memory usage: 383.0+ KB\n", - "1046\n", - "ebay/xcelite : Cloning repo\n", - "ebay/xcelite : Finished cloning\n", - "ebay/xcelite : Finished cloning\n", - "Checked out left and right\n", - "Found base sha64931b26ccb11d738f22ab50ff2db6ca1070a16c\n", - "\n", - "ebay/xcelite : Cloning repo\n", - "ebay/xcelite : Finished cloning\n", - "ebay/xcelite : Finished cloning\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Switched to branch 'TEMP_LEFT_BRANCH'\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Running: git merge --no-edit -s ort TEMP_RIGHT_BRANCH\n", - "Auto-merging src/main/java/com/ebay/xcelite/Xcelite.java\n", - "CONFLICT (content): Merge conflict in src/main/java/com/ebay/xcelite/Xcelite.java\n", - "Auto-merging src/main/java/com/ebay/xcelite/options/XceliteOptions.java\n", - "Auto-merging src/main/java/com/ebay/xcelite/reader/BeanSheetReader.java\n", - "CONFLICT (content): Merge conflict in src/main/java/com/ebay/xcelite/reader/BeanSheetReader.java\n", - "Auto-merging src/main/java/com/ebay/xcelite/reader/SimpleSheetReader.java\n", - "CONFLICT (content): Merge conflict in src/main/java/com/ebay/xcelite/reader/SimpleSheetReader.java\n", - "Auto-merging src/test/java/com/ebay/xcelite/reader/AnyColumnTest.java\n", - "CONFLICT (content): Merge conflict in src/test/java/com/ebay/xcelite/reader/AnyColumnTest.java\n", - "Automatic merge failed; fix conflicts and then commit the result.\n", - "Conflict\n", - "\n", - "ebay/xcelite : Cloning repo\n", - "ebay/xcelite : Finished cloning\n", - "ebay/xcelite : Finished cloning\n", - "['src/main/java/com/ebay/xcelite/Xcelite.java', 'src/main/java/com/ebay/xcelite/reader/BeanSheetReader.java', 'src/main/java/com/ebay/xcelite/reader/SimpleSheetReader.java', 'src/test/java/com/ebay/xcelite/reader/AnyColumnTest.java']\n", - "ebay/xcelite : Cloning repo\n", - "ebay/xcelite : Finished cloning\n", - "ebay/xcelite : Finished cloning\n", - "Checking out leftbbccda650a890b30b8d5c0d8a6d66f03410fd4bd\n", - "Checking out right9d35e9ae77230c74d655add3c90aaf8f12b235b9\n", - "Diff results saved to ./mixed_results_resolve/1046/gitmerge_ort/diff_Xcelite.txt\n", - "Diff results saved to ./mixed_results_resolve/1046/spork/diff_Xcelite.txt\n", - "Diff results saved to ./mixed_results_resolve/1046/gitmerge_ort/diff_BeanSheetReader.txt\n", - "Diff results saved to ./mixed_results_resolve/1046/spork/diff_BeanSheetReader.txt\n", - "Diff results saved to ./mixed_results_resolve/1046/gitmerge_ort/diff_SimpleSheetReader.txt\n", - "Diff results saved to ./mixed_results_resolve/1046/spork/diff_SimpleSheetReader.txt\n", - "Diff results saved to ./mixed_results_resolve/1046/gitmerge_ort/diff_AnyColumnTest.txt\n", - "Diff results saved to ./mixed_results_resolve/1046/spork/diff_AnyColumnTest.txt\n", - "243\n", - "javaparser/javaparser : Cloning repo\n", - "javaparser/javaparser : Finished cloning\n" - ] - } - ], - "source": [ - "import subprocess\n", - "import re\n", - "import os\n", - "import tempfile\n", - "import pandas as pd\n", - "\n", - "from merge_tester import MERGE_STATE\n", - "from diff3_analysis import diff3_analysis\n", - "from diff3_analysis import diff3_analysis\n", - "\n", - "df = pd.read_csv('../../results/greatest_hits/result.csv')\n", - "\n", - "df.info()\n", - "\n", - "shuffled_df = df.sample(frac=1, random_state=42)\n", - "\n", - "# Filter rows where column 16 and 42 are different\n", - "repo_output_dir = os.path.join(\"./mixed_results_resolve\")\n", - "os.makedirs(repo_output_dir, exist_ok=True)\n", - "\n", - "# Iterate over rows\n", - "count = 0\n", - "total = 0\n", - "for index, row in shuffled_df.iterrows():\n", - " total += 1\n", - " if row.iloc[16] == \"Merge_failed\" and row.iloc[40] == \"Tests_passed\":\n", - " print(index)\n", - " count += 1\n", - " diff3_pair_analysis(\"gitmerge_ort\", \"spork\", index, repo_output_dir)\n", - "print(\"count:\")\n", - "print(count)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "brunoribeiro/sql-parser : Cloning repo\n", - "brunoribeiro/sql-parser : Finished cloning\n", - "brunoribeiro/sql-parser : Finished cloning\n", - "Checked out left and right\n", - "Found base shac75b2c654691d95a9f6adf899137047bf7b12611\n", - "\n", - "brunoribeiro/sql-parser : Cloning repo\n", - "brunoribeiro/sql-parser : Finished cloning\n", - "brunoribeiro/sql-parser : Finished cloning\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Switched to branch 'TEMP_LEFT_BRANCH'\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Running: git merge --no-edit -s ort TEMP_RIGHT_BRANCH\n", - "Auto-merging src/main/java/com/akiban/sql/parser/NodeFactoryImpl.java\n", - "Auto-merging src/main/java/com/akiban/sql/parser/NodeNames.java\n", - "Auto-merging src/main/java/com/akiban/sql/parser/NodeTypes.java\n", - "CONFLICT (content): Merge conflict in src/main/java/com/akiban/sql/parser/NodeTypes.java\n", - "Auto-merging src/main/java/com/akiban/sql/unparser/NodeToString.java\n", - "CONFLICT (content): Merge conflict in src/main/java/com/akiban/sql/unparser/NodeToString.java\n", - "Auto-merging src/main/javacc/SQLGrammar.jj\n", - "Automatic merge failed; fix conflicts and then commit the result.\n", - "Conflict\n", - "\n", - "brunoribeiro/sql-parser : Cloning repo\n", - "brunoribeiro/sql-parser : Finished cloning\n", - "brunoribeiro/sql-parser : Finished cloning\n", - "['src/main/java/com/akiban/sql/parser/NodeTypes.java', 'src/main/java/com/akiban/sql/unparser/NodeToString.java']\n", - "brunoribeiro/sql-parser : Cloning repo\n", - "brunoribeiro/sql-parser : Finished cloning\n", - "brunoribeiro/sql-parser : Finished cloning\n", - "Checking out left492a69a136036053b88bc77083ba382c0c4cd38a\n", - "Checking out right1f2b87746e5e36bf83b4e68b5cc42a5540fcbfd9\n", - "Diff results saved to ./mixed_results_resolve/32/gitmerge_ort/diff_NodeTypes.txt\n", - "Diff results saved to ./mixed_results_resolve/32/spork/diff_NodeTypes.txt\n", - "Diff results saved to ./mixed_results_resolve/32/gitmerge_ort/diff_NodeToString.txt\n", - "Diff results saved to ./mixed_results_resolve/32/spork/diff_NodeToString.txt\n" - ] - } - ], - "source": [ - "diff3_pair_analysis(\"gitmerge_ort\", \"spork\", 32, repo_output_dir)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import sys" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "research", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.18" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}