Dataset Viewer
Auto-converted to Parquet Duplicate
task_type
stringclasses
4 values
code_task
stringclasses
15 values
start_line
int64
4
1.79k
end_line
int64
4
1.8k
before
stringlengths
79
76.1k
between
stringlengths
17
806
after
stringlengths
2
72.6k
reason_categories_output
stringlengths
2
2.24k
horizon_categories_output
stringlengths
83
3.99k
reason_freq_analysis
stringclasses
150 values
horizon_freq_analysis
stringlengths
23
185
infilling_java
CounterTester
76
77
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' return myWord.compareTo(w.myWord);', ' }']
[" // If the counts are not equal, subtract the count of the current word from the count of the word 'w'", ' return w.myCount - myCount;', ' }', '}', '', '', '/**', ' * This class is used to count occurences of words (strings) in a corpus. Used by', ' * the IndexedDocumentCollection class to find the most frequ...
[{'reason_category': 'If Body', 'usage_line': 76}, {'reason_category': 'If Body', 'usage_line': 77}]
Global_Variable 'myWord' used at line 76 is defined at line 13 and has a Long-Range dependency. Variable 'w' used at line 76 is defined at line 72 and has a Short-Range dependency.
{'If Body': 2}
{'Global_Variable Long-Range': 1, 'Variable Short-Range': 1}
infilling_java
CounterTester
79
80
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' return w.myCount - myCount;', ' }']
['}', '', '', '/**', ' * This class is used to count occurences of words (strings) in a corpus. Used by', ' * the IndexedDocumentCollection class to find the most frequent words in the corpus.', ' */', '', 'class WordCounter {', ' ', " // this is the map that holds (for each word) the number of times we've seen it...
[]
Variable 'w' used at line 79 is defined at line 72 and has a Short-Range dependency. Global_Variable 'myCount' used at line 79 is defined at line 14 and has a Long-Range dependency.
{}
{'Variable Short-Range': 1, 'Global_Variable Long-Range': 1}
infilling_java
CounterTester
107
111
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' ones.remove (addMe);', ' WordWrapper temp = new WordWrapper (addMe, 1, extractedWords.size ());', ' wordsIHaveSeen.put(addMe, temp);', ' extractedWords.add (temp);', ' }']
['', ' // first check to see if the word is alredy in wordsIHaveSeen', ' if (wordsIHaveSeen.containsKey (addMe)) {', ' // if it is, then remove and increment its count', ' WordWrapper temp = wordsIHaveSeen.get (addMe);', ' temp.incCount ();', '', ' // find the slot that we go to in the extract...
[{'reason_category': 'If Body', 'usage_line': 107}, {'reason_category': 'If Body', 'usage_line': 108}, {'reason_category': 'If Body', 'usage_line': 109}, {'reason_category': 'If Body', 'usage_line': 110}, {'reason_category': 'If Body', 'usage_line': 111}]
Global_Variable 'ones' used at line 107 is defined at line 94 and has a Medium-Range dependency. Variable 'addMe' used at line 107 is defined at line 105 and has a Short-Range dependency. Class 'WordWrapper' used at line 108 is defined at line 11 and has a Long-Range dependency. Variable 'addMe' used at line 108 is def...
{'If Body': 5}
{'Global_Variable Medium-Range': 4, 'Variable Short-Range': 5, 'Class Long-Range': 1}
infilling_java
CounterTester
116
117
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' WordWrapper temp = wordsIHaveSeen.get (addMe);', ' temp.incCount ();']
['', ' // find the slot that we go to in the extractedWords list', " // by sorting the 'extractedWords' list in ascending order", ' for (int i = temp.getPos () - 1; i >= 0 && ', ' extractedWords.get (i).compareTo (extractedWords.get (i + 1)) > 0; i--) {', ' temp = extractedWords.get (i + 1)...
[{'reason_category': 'If Body', 'usage_line': 116}, {'reason_category': 'If Body', 'usage_line': 117}]
Class 'WordWrapper' used at line 116 is defined at line 11 and has a Long-Range dependency. Global_Variable 'wordsIHaveSeen' used at line 116 is defined at line 93 and has a Medium-Range dependency. Variable 'addMe' used at line 116 is defined at line 105 and has a Medium-Range dependency. Variable 'temp' used at line ...
{'If Body': 2}
{'Class Long-Range': 1, 'Global_Variable Medium-Range': 1, 'Variable Medium-Range': 1, 'Variable Short-Range': 1}
infilling_java
CounterTester
153
153
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' return s;']
[' which++;', ' }', ' return null;', ' } else {', ' // If k is less than the size of the extractedWords list,', ' // return the kth most frequent word from extractedWords', ' return extractedWords.get (k).extractWord ();', ' }', ' }', '}', '/**', ' * A JUnit test case class.', ' *...
[{'reason_category': 'If Body', 'usage_line': 153}, {'reason_category': 'Loop Body', 'usage_line': 153}]
Variable 's' used at line 153 is defined at line 151 and has a Short-Range dependency.
{'If Body': 1, 'Loop Body': 1}
{'Variable Short-Range': 1}
infilling_java
CounterTester
152
155
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' if (which == k)', ' return s;', ' which++;', ' }']
[' return null;', ' } else {', ' // If k is less than the size of the extractedWords list,', ' // return the kth most frequent word from extractedWords', ' return extractedWords.get (k).extractWord ();', ' }', ' }', '}', '/**', ' * A JUnit test case class.', ' * Every method starting with the...
[{'reason_category': 'Loop Body', 'usage_line': 152}, {'reason_category': 'If Body', 'usage_line': 152}, {'reason_category': 'If Condition', 'usage_line': 152}, {'reason_category': 'If Body', 'usage_line': 153}, {'reason_category': 'Loop Body', 'usage_line': 153}, {'reason_category': 'If Body', 'usage_line': 154}, {'re...
Variable 'which' used at line 152 is defined at line 150 and has a Short-Range dependency. Variable 'k' used at line 152 is defined at line 146 and has a Short-Range dependency. Variable 's' used at line 153 is defined at line 151 and has a Short-Range dependency. Variable 'which' used at line 154 is defined at line 15...
{'Loop Body': 4, 'If Body': 4, 'If Condition': 1}
{'Variable Short-Range': 4}
infilling_java
CounterTester
150
156
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' int which = extractedWords.size ();', ' for (String s : ones.navigableKeySet ()) {', ' if (which == k)', ' return s;', ' which++;', ' }', ' return null;']
[' } else {', ' // If k is less than the size of the extractedWords list,', ' // return the kth most frequent word from extractedWords', ' return extractedWords.get (k).extractWord ();', ' }', ' }', '}', '/**', ' * A JUnit test case class.', ' * Every method starting with the word "test" will be c...
[{'reason_category': 'If Body', 'usage_line': 150}, {'reason_category': 'If Body', 'usage_line': 151}, {'reason_category': 'Define Stop Criteria', 'usage_line': 151}, {'reason_category': 'Loop Body', 'usage_line': 152}, {'reason_category': 'If Body', 'usage_line': 152}, {'reason_category': 'If Condition', 'usage_line':...
Global_Variable 'extractedWords' used at line 150 is defined at line 97 and has a Long-Range dependency. Global_Variable 'ones' used at line 151 is defined at line 94 and has a Long-Range dependency. Variable 'which' used at line 152 is defined at line 150 and has a Short-Range dependency. Variable 'k' used at line 152...
{'If Body': 7, 'Define Stop Criteria': 1, 'Loop Body': 4, 'If Condition': 1}
{'Global_Variable Long-Range': 2, 'Variable Short-Range': 4}
infilling_java
CounterTester
160
161
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' return extractedWords.get (k).extractWord ();', ' }']
[' }', '}', '/**', ' * A JUnit test case class.', ' * Every method starting with the word "test" will be called when running', ' * the test with JUnit.', ' */', 'public class CounterTester extends TestCase {', '', ' /**', ' * File object to read words from, with buffering.', ' */', ' private FileReader file ...
[{'reason_category': 'Else Reasoning', 'usage_line': 160}, {'reason_category': 'Else Reasoning', 'usage_line': 161}]
Global_Variable 'extractedWords' used at line 160 is defined at line 97 and has a Long-Range dependency. Variable 'k' used at line 160 is defined at line 146 and has a Medium-Range dependency. Function 'extractWord' used at line 160 is defined at line 30 and has a Long-Range dependency.
{'Else Reasoning': 2}
{'Global_Variable Long-Range': 1, 'Variable Medium-Range': 1, 'Function Long-Range': 1}
infilling_java
CounterTester
183
185
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' file.close();', ' file = null;', ' }']
[' if (reader != null) {', ' reader.close();', ' reader = null;', ' }', ' } catch (Exception e) {', ' System.err.println("Problem closing file");', ' System.err.println(e);', ' e.printStackTrace();', ' }', ' }', '', ' /**', ' * Close files no matter what happens in the t...
[{'reason_category': 'If Body', 'usage_line': 183}, {'reason_category': 'If Body', 'usage_line': 184}, {'reason_category': 'If Body', 'usage_line': 185}]
Global_Variable 'file' used at line 183 is defined at line 174 and has a Short-Range dependency. Global_Variable 'file' used at line 184 is defined at line 174 and has a Short-Range dependency.
{'If Body': 3}
{'Global_Variable Short-Range': 2}
infilling_java
CounterTester
187
189
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' reader.close();', ' reader = null;', ' }']
[' } catch (Exception e) {', ' System.err.println("Problem closing file");', ' System.err.println(e);', ' e.printStackTrace();', ' }', ' }', '', ' /**', ' * Close files no matter what happens in the test.', ' */', ' protected void tearDown () {', ' closeFiles();', ' }', '', ' /**', ' ...
[{'reason_category': 'If Body', 'usage_line': 187}, {'reason_category': 'If Body', 'usage_line': 188}, {'reason_category': 'If Body', 'usage_line': 189}]
Global_Variable 'reader' used at line 187 is defined at line 175 and has a Medium-Range dependency. Global_Variable 'reader' used at line 188 is defined at line 175 and has a Medium-Range dependency.
{'If Body': 3}
{'Global_Variable Medium-Range': 2}
infilling_java
CounterTester
182
189
['import junit.framework.TestCase;', 'import java.io.*;', 'import java.util.HashMap;', 'import java.util.TreeMap;', 'import java.util.ArrayList;', '', '/**', ' * This silly little class wraps String, int pairs so they can be sorted.', ' * Used by the WordCounter class.', ' */', 'class WordWrapper implements Comparable ...
[' if (file != null) {', ' file.close();', ' file = null;', ' }', ' if (reader != null) {', ' reader.close();', ' reader = null;', ' }']
[' } catch (Exception e) {', ' System.err.println("Problem closing file");', ' System.err.println(e);', ' e.printStackTrace();', ' }', ' }', '', ' /**', ' * Close files no matter what happens in the test.', ' */', ' protected void tearDown () {', ' closeFiles();', ' }', '', ' /**', ' ...
[{'reason_category': 'If Condition', 'usage_line': 182}, {'reason_category': 'If Body', 'usage_line': 183}, {'reason_category': 'If Body', 'usage_line': 184}, {'reason_category': 'If Body', 'usage_line': 185}, {'reason_category': 'If Condition', 'usage_line': 186}, {'reason_category': 'If Body', 'usage_line': 187}, {'r...
Global_Variable 'file' used at line 182 is defined at line 174 and has a Short-Range dependency. Global_Variable 'file' used at line 183 is defined at line 174 and has a Short-Range dependency. Global_Variable 'file' used at line 184 is defined at line 174 and has a Short-Range dependency. Global_Variable 'reader' used...
{'If Condition': 2, 'If Body': 6}
{'Global_Variable Short-Range': 3, 'Global_Variable Medium-Range': 3}
End of preview. Expand in Data Studio

Dataset Card for Dataset Name

SimCoPilot is a benchmark for evaluating LLMs to perform as a "copilot"-style, interactive coding assistant.

Dataset Details

Dataset Description

SimCoPilot is a benchmark for evaluating LLMs to perform as a "copilot"-style, interactive coding assistant, testing their ability to add and complete code in complex real-world software environments and analyzing how LLMs manage different code dependencies and logic complexities.

  • Curated by: Mingchao Jiang
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Language(s) (NLP): Python & Java
  • License: CC-BY-SA 4.0

Dataset Sources [optional]

The source code and supporting material can be found in the Github link below

Uses

Program Synthesis, Benchmarking and Research, Development of New Coding Tools

Direct Use

Program Synthesis, Benchmarking and Research, Development of New Coding Tools

Out-of-Scope Use

Commercial Purposes, Infer Personal Information

Dataset Structure

The dataset comprises 11 columns, detailed as follows:

  • task_type: Identifies the task category, with options including infilling_java, completion_java, infilling_python, and completion_python.

  • code_task: Describes the nature of the coding tasks. For Java, the tasks involve advanced academic projects focusing on text processing, data structures (such as AVL, B-tree, M-Tree), and statistical algorithms. Python tasks span from notebook scripts to object-oriented programming, covering areas like linear programming, computer vision, and reinforcement learning.

  • start_line and end_line: Specify the beginning and ending line numbers of the code segment targeted for completion.

  • before, between, and after: Capture the code preceding the target code block, the ground truth of the target code block, and the code following the target block, respectively.

  • reason_categories_output: A collection of dictionaries detailing the usage_line for logical components within the target code block, including elements like If Body, If Condition, Loop Body, etc.

  • horizon_categories_output: Documents the programming constructs such as Global_Variable, Function, Class, along with their define_line and usage_line.

  • reason_freq_analysis and horizon_freq_analysis: These dictionaries tally the occurrences within reason_categories_output and horizon_categories_output, respectively.

Dataset Creation

Curation Rationale

Currently, the most widely-used benchmarks for checking the ability of AI models to perform program synthesis (``AI-for-code'') consist of a detailed English description of a concise, self-contained code to synthesize, as well as a few test cases to test the correctness of the synthesized code. While such benchmarks are useful, they match one particularly narrow use case, where the goal is to synthesize a relatively short, complete, standalone program.

We introduce SimCoPilot, a novel benchmark crafted to simulate the ability of an AI such as a large language model (LLM) to perform as a ``copilot''-style, interactive coding assistant.

Source Data

Source Code

Data Collection and Processing

Emails were sent to faculty and students within the Rice University Computer Science, Electrical Engineering, and Statistics departments, inviting them to contribute Java and Python code private repositories for AI-for-code research. Upon receipt, 1,163 code generation tasks were curated to ensure a diverse and representative sample of real-world code, gathering approximately 11,000 lines of code.

Who are the source data producers?

The dataset includes Java and Python code contributions primarily from students and faculty at Rice University's Computer Science department, Electrical Engineering, and Statistics departments, representing a community of academic programmers and developers.

Annotations [optional]

Annotation process

Each of the 1,163 programming tasks was created from eight Java repositories and seven Python repositories, totaling nearly 11,000 lines of code.

Our team went through these codes, generating both infill and completion tasks.
To create an infill task, the annotator picks a meaningful starting point for the AI-for-code model to begin writing code (at the beginning of the boolean if condition, or at the beginning of the body of a for loop, for example) and then marks the rest of that particular code block for deletion, to be re-created by the AI-for-code model.

In the case of an if condition, the entire boolean predicate would be marked for deletion.
In the case of a for-loop body, the entire body would be marked.

A completion task is created in much the same way, but the code for the remainder of the method or function is marked for deletion.

Who are the annotators?

A team of graduate students from Rice Univerity with medium to advanced programming skill level with 5-10 years experience each.

Personal and Sensitive Information

N/A

Bias, Risks, and Limitations

Sample Bias: Contributions mainly from students and faculty at a single institution (Rice University) could reflect a biased sample of coding styles, proficiency levels, and problem-solving approaches. Overfitting Risks: Models trained on this dataset might perform well on similar academic or controlled environments but may not generalize well to diverse coding tasks outside of these parameters.

Recommendations

Diversifying the Data Sources: Expand the dataset to include code from a broader range of contributors beyond the academic circle of Rice University. This could involve soliciting code from developers in different industries, countries, and cultural backgrounds to enhance the dataset's diversity and representativeness. Cross-Validation with External Datasets: Use external datasets for cross-validation of the AI models trained with this dataset. This helps in assessing the model’s performance and generalizability to other coding environments and tasks.

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Dataset Card Authors [optional]

[More Information Needed]

Dataset Card Contact

[More Information Needed]

Downloads last month
21