Datasets:

Modalities:
Text
Languages:
code
ArXiv:
Libraries:
Datasets
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
repo_name
stringlengths
7
104
file_path
stringlengths
11
238
context
list
import_statement
stringlengths
103
6.85k
code
stringlengths
60
38.4k
next_line
stringlengths
10
824
gold_snippet_index
int32
0
8
sastix/cms
server/src/main/java/com/sastix/cms/server/services/content/impl/ZipHandlerServiceImpl.java
[ "@Getter @Setter @NoArgsConstructor @ToString\npublic class CreateResourceDTO {\n\n /**\n * The media-type of this new resource.\n */\n @NotNull\n private String resourceMediaType;\n\n /**\n * The author creating this resource.\n */\n @NotNull\n private String resourceAuthor;\n\n ...
import com.sastix.cms.common.content.CreateResourceDTO; import com.sastix.cms.common.content.ResourceDTO; import com.sastix.cms.common.content.exceptions.ResourceAccessError; import com.sastix.cms.server.domain.entities.Resource; import com.sastix.cms.server.services.content.DistributedCacheService; import com.sastix.c...
/* * Copyright(c) 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
HashedDirectoryService hashedDirectoryService;
5
melloc/roguelike
game/src/main/java/edu/brown/cs/roguelike/game/GUIApp.java
[ "public final class Vec2i implements Serializable {\r\n\tprivate static final long serialVersionUID = 5659632794862666943L;\r\n\t\r\n\t/**\r\n\t * Since {@link Vec2i} instances are immutable, their x and y fields may be accessed without getters.\r\n\t */\r\n\tpublic final int x, y;\r\n\t\r\n\t/**\r\n\t * Creates a ...
import cs195n.Vec2i; import edu.brown.cs.roguelike.engine.config.ConfigurationException; import edu.brown.cs.roguelike.engine.game.CumulativeTurnManager; import edu.brown.cs.roguelike.engine.game.Game; import edu.brown.cs.roguelike.engine.graphics.Application; import edu.brown.cs.roguelike.engine.proc.BSPLevelGenerator...
package edu.brown.cs.roguelike.game; public class GUIApp extends Application { private final static Vec2i SCREEN_SIZE = new Vec2i(80,30); private final static int POINTS_PER_TURN = 10; private SaveManager sm;
private CumulativeTurnManager tm;
2
IncQueryLabs/smarthome-cep-demonstrator
runtime/com.incquerylabs.smarthome.eventbus.api/src/main/java/com/incquerylabs/smarthome/eventbus/api/IEventSubscriber.java
[ "public class GroupItemStateChangedEvent extends ItemStateChangedEvent {\n\n\tpublic GroupItemStateChangedEvent(Item item, State newState, State oldState) {\n\t\tsuper(item, newState, oldState);\n\t}\n\t\n @Override\n public String toString() {\n return String.format(\"%s group state changed from %s to...
import java.util.Collection; import org.eclipse.smarthome.core.items.Item; import com.incquerylabs.smarthome.eventbus.api.events.GroupItemStateChangedEvent; import com.incquerylabs.smarthome.eventbus.api.events.ItemAddedEvent; import com.incquerylabs.smarthome.eventbus.api.events.ItemCommandEvent; import com.incqueryla...
package com.incquerylabs.smarthome.eventbus.api; public interface IEventSubscriber { public void stateUpdated(ItemStateEvent event); public void stateChanged(ItemStateChangedEvent event); public void groupStateChanged(GroupItemStateChangedEvent event); public void commandReceived(ItemCommandEve...
public void itemRemoved(ItemRemovedEvent event);
3
integeruser/jgltut
src/integeruser/jgltut/tut13/GeomImpostor.java
[ "public enum MouseButtons {\n MB_LEFT_BTN,\n MB_RIGHT_BTN,\n MB_MIDDLE_BTN\n}", "public static class ViewData {\n public Vector3f targetPos;\n public Quaternionf orient;\n public float radius;\n public float degSpinRotation;\n\n public ViewData(Vector3f targetPos, Quaternionf orient, float...
import integeruser.jglsdk.glutil.MousePoles.MouseButtons; import integeruser.jglsdk.glutil.MousePoles.ViewData; import integeruser.jglsdk.glutil.MousePoles.ViewPole; import integeruser.jglsdk.glutil.MousePoles.ViewScale; import integeruser.jgltut.Tutorial; import integeruser.jgltut.commons.*; import integeruser.jgltut....
package integeruser.jgltut.tut13; /** * Visit https://github.com/integeruser/jgltut for info and updates. * Original: https://bitbucket.org/alfonse/gltut/src/default/Tut%2013%20Impostors/GeomImpostor.cpp * <p> * Part III. Illumination * Chapter 13. Lies and Impostors * <p> * W,A,S,D - move the cameras forw...
MousePole.forwardMouseButton(window, viewPole, button, pressed, x, y);
7
CagataySonmez/EdgeCloudSim
src/edu/boun/edgecloudsim/applications/sample_app2/SampleNetworkModel.java
[ "public class SimManager extends SimEntity {\r\n\tprivate static final int CREATE_TASK = 0;\r\n\tprivate static final int CHECK_ALL_VM = 1;\r\n\tprivate static final int GET_LOAD_LOG = 2;\r\n\tprivate static final int PRINT_PROGRESS = 3;\r\n\tprivate static final int STOP_SIMULATION = 4;\r\n\t\r\n\tprivate String s...
import org.cloudbus.cloudsim.core.CloudSim; import edu.boun.edgecloudsim.core.SimManager; import edu.boun.edgecloudsim.core.SimSettings; import edu.boun.edgecloudsim.edge_client.Task; import edu.boun.edgecloudsim.network.NetworkModel; import edu.boun.edgecloudsim.utils.Location; import edu.boun.edgecloudsim.utils...
/* * Title: EdgeCloudSim - Network Model * * Description: * SampleNetworkModel uses * -> the result of an empirical study for the WLAN and WAN delays * The experimental network model is developed * by taking measurements from the real life deployments. * * -> MMPP/MMPP/1 queue model for MA...
Location accessPointLocation = SimManager.getInstance().getMobilityModel().getLocation(sourceDeviceId,CloudSim.clock());
4
aurbroszniowski/Rainfall-core
src/main/java/io/rainfall/execution/Executions.java
["public abstract class Execution {\n\n public enum ExecutionState {\n UNKNOWN,\n BEGINNING,\(...TRUNCATED)
"import io.rainfall.Execution;\nimport io.rainfall.Unit;\nimport io.rainfall.unit.Every;\nimport io.(...TRUNCATED)
"/*\n * Copyright (c) 2014-2022 Aurélien Broszniowski\n *\n * Licensed under the Apache License, Ve(...TRUNCATED)
public static InParallel inParallel(int count, Unit unit, Every every, Over over) {
4
jenkinsci/ghprb-plugin
"src/test/java/org/jenkinsci/plugins/ghprb/manager/impl/downstreambuilds/BuildFlowBuildManagerTest.j(...TRUNCATED)
["public abstract class GhprbITBaseTestCase {\n\n @Mock\n protected GHCommitPointer commitPoin(...TRUNCATED)
"import com.cloudbees.plugins.flow.BuildFlow;\nimport com.cloudbees.plugins.flow.FlowRun;\nimport co(...TRUNCATED)
"package org.jenkinsci.plugins.ghprb.manager.impl.downstreambuilds;\n\n\n\n\n/**\n * @author mdelape(...TRUNCATED)
public JenkinsRuleWithBuildFlow jenkinsRule = new JenkinsRuleWithBuildFlow();
4
criticalmaps/criticalmaps-android
app/src/main/java/de/stephanlindauer/criticalmaps/service/ServerSyncService.java
["public class App extends Application {\n\n private static AppComponent appComponent;\n\n pub(...TRUNCATED)
"import android.app.Service;\nimport android.content.Intent;\nimport android.os.IBinder;\nimport and(...TRUNCATED)
"package de.stephanlindauer.criticalmaps.service;\n\n\n\n\n\n\n\npublic class ServerSyncService exte(...TRUNCATED)
EventBus eventBus;
4
w3c/epubcheck
src/main/java/com/adobe/epubcheck/bitmap/BitmapChecker.java
["public final class EPUBLocation implements Comparable<EPUBLocation>\n{\n\n public static EPUBLoca(...TRUNCATED)
"import javax.imageio.stream.FileImageInputStream;\nimport javax.imageio.stream.ImageInputStream;\ni(...TRUNCATED)
"/*\n * Copyright (c) 2007 Adobe Systems Incorporated\n *\n * Permission is hereby granted, free of(...TRUNCATED)
private final Report report;
1
sorinMD/MCTS
src/main/java/mcts/tree/selection/PUCT.java
["public interface Game {\n\n\t/**\n\t * @return a clone of the game state\n\t */\n\tpublic int[] ge(...TRUNCATED)
"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.concurrent.ThreadLocal(...TRUNCATED)
"package mcts.tree.selection;\n\n\n\n\n/**\n * PUCT selection policy for handling a prior probabilit(...TRUNCATED)
" protected Selection selectChild(StandardNode node, Tree tree, GameFactory factory, Game obsGame(...TRUNCATED)
6
End of preview. Expand in Data Studio

Dataset Card for RepoBench-R

Dataset Summary

RepoBench-R (Retrieval) is a subtask of RepoBench(GitHub, arXiv), targeting the retrieval component of a repository-level auto-completion system, focusing on retrieving the most relevant code snippet from a project repository for next-line code prediction.

Settings

  • cff: short for cross_file_first, indicating the cross-file module in next line is first used in the current file.

  • cfr: short for cross_file_random, indicating the cross-file module in next line is not first used in the current file.

Supported Tasks

The dataset has 4 subsets:

  • python_cff: python dataset with cff setting.
  • python_cfr: python dataset with cfr setting.
  • java_cff: java dataset with cff setting.
  • java_cfr: java dataset with cfr setting.

Each subset has 4 splits:

  • train_easy: training set with easy difficulty, where the number of code snippets in the context kk satisfies 5k<10 5 \leq k < 10 .
  • train_hard: training set with hard difficulty, where the number of code snippets in the context kk satisfies k10 k \geq 10 .
  • test_easy: testing set with easy difficulty.
  • test_hard: testing set with hard difficulty.

Loading Data

For example, if you want to load the test cross_file_first python dataset with easy difficulty, you can use the following code:

from datasets import load_dataset

dataset = load_dataset("tianyang/repobench-r", "python_cff", split="test_easy")

Note: The split argument is optional. If not provided, the entire dataset (including, train and test data with easy and hard level) will be loaded.

Dataset Structure

{
  "repo_name": "repository name of the data point",
  "file_path": "path/to/file",
  "context": [
      "snippet 1",
      "snippet 2",
      // ...
      "snippet k"
  ],
  "import_statement": "all import statements in the file",
  "gold_snippet_idex": 2, // the index of the gold snippet in the context list, 0~k-1
  "code": "the code for next-line prediction",
  "next_line": "the next line of the code"
}

Licensing Information

CC BY-NC-ND 4.0

Citation Information

@misc{liu2023repobench,
      title={RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems}, 
      author={Tianyang Liu and Canwen Xu and Julian McAuley},
      year={2023},
      eprint={2306.03091},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Contributions

Thanks to @Leolty for adding this dataset.

Downloads last month
93

Paper for tianyang/repobench-r