source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 40 40 | instruction_seed stringlengths 440 3.8k | gold_standard_solution stringlengths 15 4.44k | verification_info stringclasses 1
value | metadata stringlengths 70 81 | problem_id stringlengths 5 9 | _source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|
commitpack | llm_judgeable_groundtruth_similarity | b4b210373a9cdc0df5bdb7cf577320c328520f72 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the IpGetterTest.kt file to fix the test by changing the plugin application to use IpGetter::class.java, update the type assertion for 'localIpOr' to Closure::class.java, a... | ```Kotlin
package com.brunodles.ipgetter
import com.brunodles.oleaster.suiterunner.OleasterSuiteRunner
import com.brunodles.test.helper.context
import com.brunodles.test.helper.given
import com.mscharhag.oleaster.runner.StaticRunnerSupport.beforeEach
import com.mscharhag.oleaster.runner.StaticRunnerSupport.it
import g... | {'judging_instructions': ''} | {'language': 'Kotlin', 'diff_stats': {'total_changes': 7, 'operations': 6}} | jdg_66375 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 1e6fcb420c0cd3c41afd8a91ec020b6e15cf1973 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the Django views by adding a login restriction to a chatroom feature. Implement a view function that retrieves messages from the database, orders them by date, and renders... | ```Python
from django.shortcuts import render
from django.http import HttpResponse, Http404
from .models import Message
from django.contrib.auth.decorators import login_required
# Create your views here.
@login_required
def chatroom(request):
messages = Message.objects.order_by('date')
context = {'messages': ... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 9, 'operations': 2}} | jdg_46793 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 94c2a97bf926e01ae68730ffdb92a9d1439b3dcc |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the `PipelineStatusUpdateTask` class to maintain the scroll position in the data source and sink lists. Instead of replacing the adapter each time the list is updated, ke... | ```Java
package com.openxc.enabler;
import java.util.TimerTask;
import android.app.Activity;
import com.openxc.VehicleManager;
import android.widget.ListView;
import android.widget.ArrayAdapter;
public class PipelineStatusUpdateTask extends TimerTask {
private VehicleManager mVehicleManager;
private Activit... | {'judging_instructions': ''} | {'language': 'Java', 'diff_stats': {'total_changes': 19, 'operations': 3}} | jdg_18035 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 2353c00e76d841b10e7c27750c4ce973d536f453 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the manage.py script by adding a new command to remove all .pyc files from the project directory. Implement this functionality using the Flask-Script manager and ensure it... | ```Python
# Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger ... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 6, 'operations': 1}} | jdg_66557 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 5a0796804eb1a15c40ed6cb3f0310e4ffea6ce5b |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the existing HtmlSafeI18nExceptionHandler class to handle exceptions more robustly by checking if the exception is a MissingTranslation type and ensuring HTML escaping for... | ```Ruby
if ::Rails::VERSION::MAJOR == 3 ||
(::Rails::VERSION::MAJOR == 4 && ::Rails::VERSION::MINOR == 0)
require 'i18n'
# Override exception handler to more carefully html-escape missing-key results.
class HtmlSafeI18nExceptionHandler
Missing = I18n.const_defined?(:MissingTranslation) ? I18n::MissingTra... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 14, 'operations': 3}} | jdg_28094 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 0137da853166c5837bb83df9910ef7ab28d33955 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the `echo` method in the Gearman Client class to remove the timeout mechanism and add error handling for socket connection failures. Ensure that the code handles socket rea... | ```Ruby
require 'timeout'
module Gearman
class Client
PACK = 'NN'
UNPACK = 'a4NN'
def echo(data)
echo_req_packet_type = 16
echo_req_packet_magic = "\0REQ"
echo_req_packet_meta = [echo_req_packet_type, data.size].pack(PACK)
echo_req_packet = [
echo_req_packet_magic,
... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 19, 'operations': 6}} | jdg_17310 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 356c9cd23ebf4953af169f38126fd521b49ca6c4 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the AbstractScraper class by adding descriptive docstrings to each method. The docstrings should explain the purpose and expected behavior of each method, such as retrievi... | ```Python
from urllib import request
from bs4 import BeautifulSoup
class AbstractScraper():
def __init__(self, url, test=False):
if test:
# when testing, we simply load a file
self.soup = BeautifulSoup(url.read(), "html.parser")
else:
self.soup = BeautifulSoup... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 7, 'operations': 7}} | jdg_59662 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | dfd12d7e1e9d7eac9ea968ed77a188391170243a |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the ExpressionXml class to fix XML parsing issues by removing the Obsolete attribute from the Value property, updating the getter and setter to directly access Script.Code,... | ```C#
using NBi.Core.Evaluate;
using NBi.Core.ResultSet;
using NBi.Core.Transformation;
using NBi.Xml.Variables;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace NBi.Xml.Items.Calc... | {'judging_instructions': ''} | {'language': 'C#', 'diff_stats': {'total_changes': 10, 'operations': 5}} | jdg_45189 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 752b3f760f56a6d8f097230e5cb9cd39f322c647 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the Asteroid class to apply angular velocity when asteroids collide with other objects. Update the Update method to adjust the facing based on angular velocity and apply de... | ```C#
/*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System;
using Microsoft.Xna.Framework;
namespace ShiftDrive {
/// <summary>
/// A <seealso cref="GameObject"/> representing a single asteroid.
/// </summary>
internal sealed class Asteroid : GameObject {
private float angu... | {'judging_instructions': ''} | {'language': 'C#', 'diff_stats': {'total_changes': 8, 'operations': 4}} | jdg_57649 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | a8d6c1209a737eb760ece69e12348b4bd275dc9f |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the IPv6Endpoint class by adding stream operators for input and output. Implement the 'operator>>' to parse a string from an input stream into an IPv6Endpoint object and '... | ```C
#ifndef OFP_IPV6ENDPOINT_H
#define OFP_IPV6ENDPOINT_H
#include "ofp/ipv6address.h"
#include <istream>
#include "ofp/log.h"
namespace ofp { // <namespace ofp>
class IPv6Endpoint {
public:
IPv6Endpoint() = default;
IPv6Endpoint(const IPv6Address &addr, UInt16 port) : addr_{addr}, port_{port} {}
IPv6Endpoint(co... | {'judging_instructions': ''} | {'language': 'C', 'diff_stats': {'total_changes': 21, 'operations': 2}} | jdg_15294 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 5502319b6f43be0c476d89ba01115179ce4d7b83 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the ShareActivity class by implementing a check to determine if a user exists using SharedPreferences. If the user does not exist, initiate the registration process by sta... | ```Java
package io.github.shark_app.shark;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
public class ShareActivity extends AppCompatActivity {
public static final String PREFS_NAM... | {'judging_instructions': ''} | {'language': 'Java', 'diff_stats': {'total_changes': 18, 'operations': 4}} | jdg_19883 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 3c563d2b83532e84fcb4a80cd74fb755f2bd5a80 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Extend the TCHome XCTestCase class by adding a test to verify the session loading process. Import the 'gattaca' module, define private variables for the session and controller, an... | ```Swift
import XCTest
@testable import gattaca
class TCHome:XCTestCase
{
private var session:MSession?
private var controller:CHome?
private let kWaitSession:UInt32 = 3
override func setUp()
{
super.setUp()
let session:MSession = MSession()
self.session = sess... | {'judging_instructions': ''} | {'language': 'Swift', 'diff_stats': {'total_changes': 27, 'operations': 3}} | jdg_9159 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | d12cfc648eb996730fa052e70b2fb27339dd3582 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the test suite for Everypolitician::AreaTest by adding a new test method to verify that the properties of an area, such as id, name, and type, are accessible and return th... | ```Ruby
require 'test_helper'
class Everypolitician::AreaTest < Minitest::Test
def test_reading_popolo_areas
popolo = Everypolitician::Popolo::JSON.new(
areas: [{ id: '123', name: 'Newtown', type: 'constituency' }]
)
area = popolo.areas.first
assert_instance_of Everypolitician::Popolo::Areas, ... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 11, 'operations': 1}} | jdg_37582 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | bab95a0a17ae94f2363d789eb70ab50b1eaebf91 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the existing React application to include a new set of components for handling challenges. Create a constant array 'CHALLENGES' with a sample challenge and options. Imple... | ```JavaScript
import React from 'react';
import { render } from 'react-dom';
const CHALLENGES = [
{
title: "Here is a question title",
optionList: [
{
id: 0,
title: "First",
order: 1
},
{
id: 1,
title: "Second",
order: 2
},
{
... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 86, 'operations': 7}} | jdg_106 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 5c86f56ff2a10390af5039956a788ec083034aef |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Expand the existing test suite in JavascriptFunctionTests.cs to include additional tests for function passing and managed object interoperability. Add tests for named functions, a... | ```C#
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Noesis.Javascript.Tests
{
[TestClass]
public class JavascriptFunctionTests
{
private JavascriptContext _context;
[TestInitialize]
public... | {'judging_instructions': ''} | {'language': 'C#', 'diff_stats': {'total_changes': 45, 'operations': 4}} | jdg_2295 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 01331f37c629f0738c5517527a6e78be55334e04 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the AbstractFieldSerializer and AbstractSerializerMixin classes to allow overriding the ManyRelatedField for image fields. Introduce a many_field_class attribute and a many... | ```Python
# -*- coding: utf-8 -*-
from functools import lru_cache
from rest_framework import serializers
from rest_framework.relations import ManyRelatedField, MANY_RELATION_KWARGS
class AbstractFieldSerializer(serializers.RelatedField):
parent_serializer_class = serializers.ModelSerializer
many_field_class ... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 15, 'operations': 6}} | jdg_24791 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 48dcf46b048c94437b957616a363f9f64447b8da |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the `pyinfra/__init__.py` file by adding a TODO comment to highlight the need for removing the import statements for all operations and facts, as these imports trigger un... | ```Python
'''
Welcome to pyinfra.
'''
import logging
# Global flag set True by `pyinfra_cli.__main__`
is_cli = False
# Global pyinfra logger
logger = logging.getLogger('pyinfra')
# Setup package level version
from .version import __version__ # noqa
# Trigger pseudo_* creation
from . import pseudo_modules # noqa... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 11, 'operations': 2}} | jdg_36904 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | c465b1f0c995ac2cb7c6c8b4ad5f721f800e2864 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Update the ARGparams class to include 'beta' and 'theta' as attributes in the class docstring. Also, add a 'Raises' section to document the AssertionError that may be raised durin... | ```Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""ARG parameters class
"""
from __future__ import print_function, division
class ARGparams(object):
"""Class for ARG model parameters.
Attributes
----------
scale : float
rho : float
delta : float
beta : float
theta : list
... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 6, 'operations': 2}} | jdg_66873 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | ecac13f406b31a7e6e71b49a2dacec2680d4baa8 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the DBConfig class by adding a method to create a ConnectionSource object using the current JDBC URL, user, and password. Ensure to handle any SQLExceptions that might occ... | ```Java
package edu.umass.cs.ciir.waltz.dbindex;
import com.j256.ormlite.jdbc.JdbcConnectionSource;
import com.j256.ormlite.support.ConnectionSource;
import java.io.File;
import java.sql.SQLException;
/**
* @author jfoley
*/
public class DBConfig {
private final String jdbcURL;
private final String password;
... | {'judging_instructions': ''} | {'language': 'Java', 'diff_stats': {'total_changes': 8, 'operations': 3}} | jdg_57185 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 92e9c53b715b8ba5e004bbceec73c3181726acae |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the JavaScript code by adding an AJAX call to handle the deletion of an entry on a user's dashboard page. Implement this by binding a 'submit' event to a '#delete-button',... | ```JavaScript
$(document).ready(function() {
$('#login-link').on('click', function(event) {
event.preventDefault();
var $target = $(event.target);
$.ajax({
type: 'GET',
url: $target.attr('href'),
dataType: 'html'
}).done(function(response){
$resp = $(response).children('.auth... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 20, 'operations': 7}} | jdg_16271 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | c9d70386d230ec0ffd1fe7cacb14ee601654dcf1 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Expand the main function to calculate and print the cosine and sine of a given input x using a series approximation. Define a helper function 'formula' to compute terms of the ser... | ```C++
#include <stdio.h>
#define MAX_LOOP 10000
double formula(const double x, const double k)
{
return (x * x) / ((2 * k - 1) * (2 * k));
}
int main(void)
{
double x;
printf("Enter x= ");
scanf("%lf", &x);
double cosx = 1,
sinx = x;
int k = 2;
while(k < MAX_LOOP)
{
... | {'judging_instructions': ''} | {'language': 'C++', 'diff_stats': {'total_changes': 25, 'operations': 2}} | jdg_10859 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 16d5a32553342cdff499ca0bb96b767d9bbbcedf |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the function to support 'root' as a direct string argument. If 'options' is a string, assign it to 'root'. Otherwise, convert 'options' to an object and set 'root' to 'opti... | ```JavaScript
'use strict';
module.exports = function (deck/*, options*/) {
var options = arguments[1], root, update, activateSlide;
if (typeof options === 'string') {
root = options;
} else {
options = Object(options);
root = options.root || '/';
}
activateSlide = function (index) {
if (index === deck.... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 8, 'operations': 1}} | jdg_56061 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | a1eae2e3e3b2fe8aba3b6ebbe3590a7f853f136b |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the SkippedStepResult class to include a public method getSearchResult() that returns the private $searchResult attribute. This change allows access to the searchResult aft... | ```PHP
<?php
/*
* This file is part of the Behat.
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Behat\Behat\Tester\Result;
use Behat\Behat\Definition\SearchResult;
/**... | {'judging_instructions': ''} | {'language': 'PHP', 'diff_stats': {'total_changes': 10, 'operations': 1}} | jdg_44396 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 9963afd9ff13e8256d3f63080140ee3f80963e64 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the Config class by modifying the get method to throw a RuntimeException if the requested key does not exist. Additionally, implement a magic __call method to allow dynami... | ```PHP
<?php
namespace HeyDoc;
class Config
{
protected $config;
/**
*
*
* @param array $config The container
*/
public function __construct(array $config)
{
$this->config = new \ArrayObject(array_replace($this->getDefaults(), $config));
}
public function has($k... | {'judging_instructions': ''} | {'language': 'PHP', 'diff_stats': {'total_changes': 9, 'operations': 3}} | jdg_50085 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | ffcd8b53f23f83f5022152071d99c0c2c32a1fd0 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the Fixtures class by adding a new method named createAssignment. This method should create and return a StudyParticipantAssignment object by utilizing the existing method... | ```Java
package gov.nih.nci.cabig.caaers.domain;
/**
* @author Rhett Sutphin
*/
public class Fixtures {
public static <T extends DomainObject> T setId(int id, T target) {
target.setId(id);
return target;
}
public static Participant createParticipant(String first, String last) {
P... | {'judging_instructions': ''} | {'language': 'Java', 'diff_stats': {'total_changes': 10, 'operations': 2}} | jdg_45019 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 064d5b673d539d884b1dfb53012bf49e56b49832 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the Avatar function to allow customization of the default avatar by context. Use the instance context name to attempt to retrieve a context-specific avatar file before fall... | ```Go
// Package public adds some public routes that can be used to give information
// to anonymous users, or to the not yet authentified cozy owner on its login
// page.
package public
import (
"net/http"
"time"
"github.com/cozy/cozy-stack/pkg/statik/fs"
"github.com/cozy/cozy-stack/web/middlewares"
"github.com... | {'judging_instructions': ''} | {'language': 'Go', 'diff_stats': {'total_changes': 7, 'operations': 3}} | jdg_66163 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 117ce3f5b86de2ec4d773537bd88c9f2e9d38391 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the CLI tool by adding a legend that provides usage instructions for the split and merge commands. Ensure to handle errors gracefully by displaying appropriate messages an... | ```JavaScript
#!/usr/bin/env node
var split = require('./split-file.js');
if (require.main === module) {
cli();
}
function cli() {
var option = process.argv[2];
switch (option) {
case '-m':
cliMerge();
break;
case '-s':
cliSplit();
break;
default:
printLegend();
}
}
... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 35, 'operations': 5}} | jdg_4791 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 1f32ef0de22465a69b5db7a96dcf6d3a449eec6f |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the `compare_gpa_spec.rb` file to include additional branch information in the `before` block. Add a new branch 'another_branch' with a GPA of 2. Update the test to check i... | ```Ruby
require 'spec_helper'
module CodeclimateCi
describe CompareGpa do
let(:codeclimate_ci) { CodeclimateCi::CompareGpa.new('repo11', 'token1') }
before do
allow_any_instance_of(ApiRequester).to receive(:branch_info).with('master')
.and_return(
'last_snapshot' => { 'gpa' => 3 }
... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 9, 'operations': 4}} | jdg_48393 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 64a30e3fff0c893c82816c0de0f45faac1c7e9d8 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the `stub_filesystem!` method to not only create directories but also ensure that each directory contains a stub file named 'file.stub' with the content 'Stub file'. Updat... | ```Ruby
def stub_filesystem!
[
'/root/app/assets/javascripts',
'/root/app/assets/stylesheets',
'/root/app/assets/images',
'/root/contao/non_existing_folder',
'/root/contao/system/modules/some_extension',
'/root/public/resources',
'/root/public/system/modules/frontend',
'/root/vendor/a... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 18, 'operations': 1}} | jdg_19131 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | d146036998d3595730b3de5f03fd7ac6e63ae498 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the OrganizationMemberSerializer to include the user's ID in the serialized output. If the user object is present, add a 'user' key with a dictionary containing the user's ... | ```Python
from __future__ import absolute_import
from sentry.api.serializers import Serializer, register
from sentry.models import OrganizationMember
@register(OrganizationMember)
class OrganizationMemberSerializer(Serializer):
def serialize(self, obj, attrs, user):
if obj.user:
user_data = {... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 6, 'operations': 2}} | jdg_68390 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 6a436412ace79a233d7b23200ddd881d08e573f9 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the test suite for update expression construction in the UpdateExpressionTest.scala file. Add additional arbitrary generators for Set[Int] and List[String]. Include new op... | ```Scala
package com.gu.scanamo.update
import org.scalacheck.{Arbitrary, Gen}
import org.scalacheck.Arbitrary._
import com.gu.scanamo.syntax._
class UpdateExpressionTest extends org.scalatest.FunSpec
with org.scalatest.Matchers
with org.scalatest.prop.Checkers {
implicit lazy val arbSymbol: Arbitrary[Symbol] =... | {'judging_instructions': ''} | {'language': 'Scala', 'diff_stats': {'total_changes': 13, 'operations': 3}} | jdg_32866 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 7931974900deb703ceab6eb759be0f1b56c8a209 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Add a helper method named 'display_event' to the EventsHelper module. This method should determine the event type from a constant array 'Event::EVENT_TYPE' and return the first el... | ```Ruby
module EventsHelper
def event_location(event)
location = Location.find(event.location_id)
html = ''
content_tag(:address) do
html << "#{location.address1} \n<br />\n #{location.city}, #{location.state_abbrv} #{location.zipcode}"
end
html.html_safe
end
def event_dates(event)
content_tag(:span... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 7, 'operations': 2}} | jdg_60811 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | e4d6556664aad6efadbe8942e49a56490112bfc9 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the Rust CLI application code to replace the use of the `clap_app!` macro with the `app_from_crate!` macro. Additionally, extract the command-line argument parsing logic ... | ```Rust
#[macro_use]
extern crate clap;
extern crate names;
use clap::{AppSettings, Arg};
use names::{Generator, Name};
fn main() {
let (naming, amount) = parse_cli_args();
let mut generator = Generator::with_naming(naming);
for _ in 0..amount {
println!("{}", generator.next().unwrap());
}
}
... | {'judging_instructions': ''} | {'language': 'Rust', 'diff_stats': {'total_changes': 50, 'operations': 3}} | jdg_1586 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 143787623e9a923e0b606d4b3a3e080c872152e3 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the FastPrimitiveConverter class by adding support for converting strings to float primitives. Implement a new entry in the primitiveConverterMap for the 'float' type, ens... | ```Java
package com.arondor.common.reflection.reflect.instantiator;
import java.util.HashMap;
import java.util.Map;
public class FastPrimitiveConverter
{
private interface PrimitiveConverter
{
Object convert(String value);
}
private final Map<String, PrimitiveConverter> primitiveConverterMap ... | {'judging_instructions': ''} | {'language': 'Java', 'diff_stats': {'total_changes': 7, 'operations': 1}} | jdg_64592 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 1cfd300a0aed8cf1aa940b06975c56f9d2196c30 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Update the script to accommodate changes in the routing of Ingress intel and mission URLs by using wildcard subdomains. Also, increment the version number from 0.1.0 to 0.1.1.
Co... | ```JavaScript
// ==UserScript==
// @id iitc-plugin-drawtools-sync@hansolo669
// @name IITC plugin: drawtools sync
// @category Tweaks
// @version 0.1.1
// @namespace https://github.com/hansolo669/iitc-tweaks
// @updateURL https://iitc.reallyawesomedomain.com/drawtools-sync.m... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 9, 'operations': 2}} | jdg_48932 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | b1c659f0ae77336ebad33ef040d64985eba9c612 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the SQL view definition in the provided code by adding explicit column aliases to each selected field in the 'userView'. Ensure that each column in the SELECT statement is ... | ```SQL
CREATE TABLE IF NOT EXISTS users (
id BIGSERIAL NOT NULL,
firstName VARCHAR NOT NULL,
middleName VARCHAR,
lastName VARCHAR NOT NULL,
title VARCHAR,
streetAddress VARCHAR NOT NULL,
city VARCHAR NOT NULL,
state VARCHAR NOT NULL,
zipcode VARCHAR(5) NOT NULL,
phoneNumber VARC... | {'judging_instructions': ''} | {'language': 'SQL', 'diff_stats': {'total_changes': 12, 'operations': 1}} | jdg_36769 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | a2f2a006f5c91001abe8868ec8720c349d017960 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the Program.cs file to use environment variables for the Recurly client configuration. Replace hardcoded strings for the subdomain and API key with calls to 'Environment.Ge... | ```C#
using System;
using Recurly;
using Recurly.Resources;
namespace RecurlyTestRig
{
class Program
{
static void Main(string[] args)
{
try {
var subdomain = Environment.GetEnvironmentVariable("RECURLY_SUBDOMAIN");
var apiKey = Environment.GetEnvi... | {'judging_instructions': ''} | {'language': 'C#', 'diff_stats': {'total_changes': 12, 'operations': 6}} | jdg_36129 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 210b303b03c686cd16f76617b8761af14baffc75 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the Gulp tasks in the provided gulpfile.js to use separate functions for bundling games and users JavaScript files. Replace the existing task definitions with calls to th... | ```JavaScript
// gulpfile.js
// Packages
var gulp = require('gulp');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
// Tasks
var b... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 16, 'operations': 5}} | jdg_23093 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | c0563f5c112d02f13eabd94765da4565a2f6c235 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the Wedding component by adding a countdown timer that displays the milliseconds remaining until the next wedding anniversary. Use the date '2018-09-23T00:00:00+1200' as t... | ```JavaScript
import React from 'react';
import css from './styles.css';
const weddingAnniversary = new Date('2018-09-23T00:00:00+1200');
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
const timeUntilAnniversary = () => {
const currentYear = (new Date()).getFullYear(... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 50, 'operations': 2}} | jdg_1518 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 069f69e866f85938f5cf4fe338e73a39f1089b1d |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the Ruby cask definition for 'adium-beta' by adding missing stanzas. Specifically, include the 'name' stanza with the value 'Adium', update the 'license' stanza to ':gpl',... | ```Ruby
cask :v1 => 'adium-beta' do
version '1.5.11b2'
sha256 'e7690718f14defa3bc08cd3949a4eab52e942abd47f7ac2ce7157ed7295658c6'
url "https://adiumx.cachefly.net/Adium_#{version}.dmg"
name 'Adium'
homepage 'https://beta.adium.im/'
license :gpl
app 'Adium.app'
zap :delete => [
'~/Lib... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 8, 'operations': 3}} | jdg_53553 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 4873469225a9d0b2cfca473daadd168a17271c58 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the initializer 'pay.processors' in the Ruby module to use ActiveSupport::Reloader's to_prepare block, ensuring that processor backends are continuously included on reloads... | ```Ruby
module Pay
class Engine < ::Rails::Engine
isolate_namespace Pay
config.autoload_paths += Dir["#{config.root}/lib/**/"]
initializer 'pay.processors' do
ActiveSupport::Reloader.to_prepare do
# Include processor backends
if defined? Stripe
Dir[File.join(__dir__, 'pay... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 25, 'operations': 7}} | jdg_10308 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | afcdaa4983563ca3ca4ffd3c4dd87d43442f0cb2 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the App component in the given JavaScript file to ensure the application builds successfully by wrapping the PageHeader and Switch components inside a div within the Connec... | ```JavaScript
import React from 'react'
import {connect} from 'react-redux'
import {compose, lifecycle} from 'recompose'
import {Route, Switch} from "react-router"
import {ConnectedRouter} from "react-router-redux"
import auth from '../auth'
import {updateAuth} from '../actions/auth'
import PageHeader from './PageHea... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 11, 'operations': 2}} | jdg_39039 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | e582ef07d4b9f537e31d31c1546df870a2bd361c |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the AsyncPlugin class to fix multiprocessing issues in Python 2.7. Specifically, move the _train method outside the class as a standalone function since Python 2.7 cannot... | ```Python
from senpy.plugins import AnalysisPlugin
import multiprocessing
def _train(process_number):
return process_number
class AsyncPlugin(AnalysisPlugin):
def _do_async(self, num_processes):
pool = multiprocessing.Pool(processes=num_processes)
values = pool.map(_train, range(num_process... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 10, 'operations': 3}} | jdg_41112 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 76ff703ace51f5d672432cbc9d59b12b35e4b047 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the RoleDescriptor class by removing the deprecated tag methods: 'with_any_tag', 'with_all_tags', and 'join_tags'. Ensure the class maintains its functionality without th... | ```Ruby
class RoleDescriptor < Sequel::Model
many_to_one :entity_descriptor
many_to_one :organization
one_to_many :protocol_supports
one_to_many :key_descriptors
one_to_many :contact_people
one_to_many :scopes, class: 'SHIBMD::Scope'
one_to_one :ui_info, class: 'MDUI::UIInfo'
plugin :class_table_inhe... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 12, 'operations': 1}} | jdg_34252 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 9b68793a42b82fe00b6cba6dac10676cc9f52624 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the 'compress' function to use a string for accumulating the result instead of a bytes.Buffer. Update the logic to concatenate characters and counts directly to the strin... | ```Go
package compress
import "strconv"
func compress(uncompressed string) string {
var buf string
if len(uncompressed) == 0 {
return buf
}
var prev byte
letter := uncompressed[0]
last := 0
for i := 1; i < len(uncompressed); i++ {
prev = uncompressed[i-1]
letter = uncompressed[i]
if letter != prev {
... | {'judging_instructions': ''} | {'language': 'Go', 'diff_stats': {'total_changes': 8, 'operations': 6}} | jdg_58343 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 7b74210b6e1a896143388a89766d8f898e630db0 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the provided Ruby Rake task code to ensure that updates are queued up in all environments, not just in production. Remove the condition that restricts the task execution to... | ```Ruby
desc "This task is called by the Heroku cron add-on"
task :cron => :environment do
# Get all streams
streams = Stream.all_active
# Check for feed updates for each stream
streams.each do |stream|
puts "Queuing up an update for #{stream.name}"
stream.feeds.each do |feed|
Resque.enqueue(Fee... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 9, 'operations': 3}} | jdg_48328 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 91352ed9a745cad0caff5484e1143095c0243544 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Update the Perl script to enhance the log message checks in the 'file' section. Modify the client's message format and add specific regex patterns in 'loggrep' to verify the prese... | ```Perl
# The syslogd listens on 127.0.0.1 TCP socket.
# The client writes a message to Sys::Syslog TCP method.
# The syslogd writes it into a file and through a pipe.
# The syslogd passes it via UDP to the loghost.
# The server receives the message on its UDP socket.
# Find the message in client, file, pipe, syslogd, ... | {'judging_instructions': ''} | {'language': 'Perl', 'diff_stats': {'total_changes': 12, 'operations': 2}} | jdg_36747 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 98bb4305ccdd8a83763bedb1f09c261e9904487c |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the test method 'test_filter_queryset_success_200' in the 'FullCaseViewSetTestCase' class to use a URL generated by 'reverse'. Create a new test method to verify filterin... | ```Python
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase, Client
from django.contrib.auth.models import Permission
from django.core.urlresolvers import reverse
from legalaid.views import FullCaseViewSet
from cla_backend.apps.call_centre.permiss... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 15, 'operations': 9}} | jdg_24789 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 68810450d29da4b62023629b5a3064cf3f08f1df |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the Ruby script to fix the fog gem installation on RHEL and its variants. Update the platform detection logic to use 'platform_family' instead of 'platform', and adjust the... | ```Ruby
#
# Cookbook Name:: route53
# Recipe:: default
#
# Copyright 2010, Platform14.com.
#
# 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
#... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 18, 'operations': 4}} | jdg_19038 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | ca97842f85a569f6123f62976f35c51986ffd586 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the test for the OptimizerComponent to ensure it creates three panels. Update the test to check for three child nodes and verify the presence of 'user-input', 'barchart', a... | ```TypeScript
import {
beforeEach,
beforeEachProviders,
describe,
expect,
it,
inject,
} from '@angular/core/testing';
import { ComponentFixture, TestComponentBuilder } from '@angular/compiler/testing';
import { Component } from '@angular/core';
import { By } from '@angular/platform-browser';
import { Optimi... | {'judging_instructions': ''} | {'language': 'TypeScript', 'diff_stats': {'total_changes': 11, 'operations': 3}} | jdg_40612 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 2f2f6cba331515b8d563d0e2f7869111df4227c3 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the existing Django management command to handle new fields when scraping convening times. Update the code to parse the status and time from the 'time_string', make the tim... | ```Python
from django.core.management.base import BaseCommand
from django.utils import timezone
from core.models import ConveneTime
from legislators.models import Chamber
from dateutil.parser import parse
import requests
class Command(BaseCommand):
help = u'Scrape TLO for convening times.'
def handle(self,... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 7, 'operations': 4}} | jdg_59120 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 754f5c968ad1dff3ae7f602d23baac1299731062 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the script to sort the list of source and header files alphabetically before appending them to the project file. Use Python's built-in list.sort method with a case-insensit... | ```Python
#!/usr/bin/python3
import os
import re
import subprocess
dir_path = os.path.dirname(os.path.realpath(__file__))
filename = 'chatterino.pro'
data = ""
with open(filename, 'r') as project:
data = project.read()
sources_list = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ ... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 6, 'operations': 2}} | jdg_67149 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 362751ba24ee4a5efc5895981d0c032d0baaa889 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the messageCreateHandler function to include a check for whether a user has accepted the rules in a Discord channel named 'regeln'. If the user types the command '$accept'... | ```Go
package main
import (
"fmt"
"strings"
"github.com/bwmarrin/discordgo"
"github.com/spf13/viper"
)
const commandPrefix = `$`
func messageCreateHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
user, _ := s.User("@me")
if m.Author.ID != user.ID {
if !strings.HasPrefix(m.Content, commandPrefix)... | {'judging_instructions': ''} | {'language': 'Go', 'diff_stats': {'total_changes': 17, 'operations': 3}} | jdg_22110 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | e081646028e4f3283fb9c7278fed89c3e42cc4d3 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the test suite for the User API by implementing tests for retrieving an empty user list and a single user list. Use the 'api_request' method to check the number of results... | ```Python
import json
from tests.helpers import FlaskTestCase, fixtures
class TestUserAPI(FlaskTestCase):
@fixtures('base.json')
def test_get_empty_users(self):
"""Test GET /api/users endpoint with no data"""
response, data = self.api_request('get', '/api/users')
assert data['num_resu... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 9, 'operations': 6}} | jdg_46815 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 2488110480cd817d4ae5e0578a25f235968f9f35 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the toggleTrackingOptOut function to improve privacy tracking by adding a promise that combines trackEvent and processEvent for both analytics and internalAnalytics. Ensu... | ```JavaScript
import { createAction } from 'redux-act'
import analytics from 'src/analytics'
import internalAnalytics from 'src/analytics/internal'
export const setTrackingFlag = createAction(
'privacy/setTrackingFlag',
value => {
// Value will be string from UI events, else bool from storage syncing
... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 14, 'operations': 5}} | jdg_28334 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | cc6b9e82123d9a9f75075ed0e843227ea9c74e4d |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Refactor the 'trigger' function in the provided JavaScript code to minimize its responsibilities by moving functionality to separate functions. Ensure to use '===' for strict equa... | ```JavaScript
var Timer = (function(Util) {
'use strict';
// Internal constants for the various timer states.
var Waiting = 0, Inspecting = 1, Ready = 2, Running = 3, Delay = 4;
var state = Waiting;
var startTime = undefined, endTime = undefined, solveTime = undefined;
var intervalID = undefined;
funct... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 28, 'operations': 4}} | jdg_8264 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 52d037d9093a18ebdf15d1c00b959cae06aa345b |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the Sequelize model definition in the 'api/models/submission.js' file to include a new field named 'version'. This field should be of type INTEGER, not allow null values, h... | ```JavaScript
const Sequelize = require('sequelize');
const sequelize = require('./');
const Stage = require('./stage');
const Submission = sequelize.define('submissions', {
name: {
type: Sequelize.STRING,
allowNull: false,
validate: {
len: [1, 100],
},
},
board: {
type: Sequelize.TEXT,
allowNull: f... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 8, 'operations': 1}} | jdg_55955 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | a46c7d80a627a7043678dee6fc6486147401b9e4 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the SpecHelpers module in the spec_helper.rb file by adding methods to access directories within the project directory structure. Implement a 'spec_dir' method to join the... | ```Ruby
gem 'minitest'
require 'yacl'
require 'minitest/autorun'
require 'minitest/pride'
require 'tmpdir'
module SpecHelpers
def self.tmpfile_with_contents( full_path, contents )
File.open( full_path, "w+" ) do |f|
f.write( contents )
end
end
def self.spec_dir( *other )
::File.join( proj_root... | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 9, 'operations': 2}} | jdg_48217 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 058f4288d7d0424a55045aee86f46e37e48b883a |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the 'lowland.events.DataEvent' class by adding a constructor that accepts 'value' and 'oldValue' parameters. Implement logic to set the 'data' and 'oldData' properties usi... | ```JavaScript
/*
==================================================================================================
Lowland - JavaScript low level functions
Copyright (C) 2012 Sebatian Fastner
==================================================================================================
*/
core.Class("lowland.... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 11, 'operations': 1}} | jdg_38687 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | a9b226f56edd9fce977257afb2a76a5975e28bdc |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the existing Express.js application by implementing Mongo and Redis adapters. Create a function to handle service execution and integrate middleware to manage dependencies... | ```JavaScript
var express = require('express');
var app = express();
var CurrentUser = require('../Architecture/CurrentUser').CurrentUser;
var WebService = require('../Architecture/WebService').WebService;
var MongoAdapter = require('../Adapters/Mongo').MongoAdapter;
var RedisAdapter = require('../Adapters/Redis').Red... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 36, 'operations': 2}} | jdg_4401 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 17cbd84b9b5a4bd08123ff5f429be191b1bdf063 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the Polynomial class by implementing an __init__ method that accepts a list of coefficients, and add attributes for coefficients and degree. Ensure the coefficients are va... | ```Python
class Polynomial(object):
def __init__(self, coeffs):
"""
1 parameter:
coeff (list): coeff[n] = coefficient of nth degree term
"""
self.coeffs = coeffs
@property
def coeffs(self):
return self._coeffs
@property
def degree(self):
r... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 34, 'operations': 1}} | jdg_5015 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 8fdd73b7b8b907da264eac26ea52eef2bb8f6ce7 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the 'load_image_as_array' function by adding an alternative implementation using OpenCV. Ensure the function reads an image file as a numpy array, converts it to RGB, and ... | ```Python
# ==============================================================================
# LOAD_IMAGE_AS_ARRAY
# ==============================================================================
# USING SCIPY (with i think PIL on the backend)
import scipy.misc
d... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 13, 'operations': 2}} | jdg_30096 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 6908ebe12d4dca68d45694575c48adcbfb4e0009 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Enhance the Swift file by implementing a new function named 'bisect' that operates on a 'Sliceable' sequence. The function should split the sequence at a specified index, returnin... | ```Swift
// Copyright (c) 2015 Neil Pankey. All rights reserved.
/// "Missing" sequence and related protocol functions
// TODO Better name than `bisect` since that implies equal slices. Could use `split` but
// but that would overload an existing stdlib function.
public func bisect<S: Sliceable>(sequence: S, atIndex... | {'judging_instructions': ''} | {'language': 'Swift', 'diff_stats': {'total_changes': 8, 'operations': 1}} | jdg_57923 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | a38be80a86bb07db2ffd68e9e3c33f6242291d5b |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Revert the changes made in a previous commit that aimed to fix an IE bug by using a secondary global and eval. Instead, restore the code to refer to the actual global object using... | ```JavaScript
var global = { },
ObjectiveJ = { };
(function (global, exports, namespace)
{
var GLOBAL_NAMESPACE = namespace;
#include "Includes.js"
})(global, ObjectiveJ, window);
var hasOwnProperty = Object.prototype.hasOwnProperty;
// If we can't trust the host object, don't treat it as global
// and fall... | {'judging_instructions': ''} | {'language': 'JavaScript', 'diff_stats': {'total_changes': 21, 'operations': 4}} | jdg_14901 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | 883f1b1c28e76ade6632f762391cbb4a97918e12 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Modify the import statement to import 'core' from 'panda3d' instead of 'HTTPChannel' directly. Ensure compatibility by checking if 'HTTPChannel' exists in 'core' before applying '... | ```Python
####################################################################
#Dtool_funcToMethod(func, class)
#del func
#####################################################################
from panda3d import core
from .extension_native_helpers import Dtool_funcToMethod
"""
HTTPChannel-extensions module: c... | {'judging_instructions': ''} | {'language': 'Python', 'diff_stats': {'total_changes': 8, 'operations': 3}} | jdg_51899 | PrimeIntellect/real-world-swe-problems |
commitpack | llm_judgeable_groundtruth_similarity | edca0a4e339b034f622b7d1425c67a56eb2fa823 |
Below is an instruction to modify a code file along with the code file. Apply these instructions and return the adapted code:
Instruction:
Update the SMTP settings in the Ruby configuration file to enhance security and ensure proper mail delivery in production. Replace the hardcoded 'user_name' with an environment va... | ```Ruby
ActionMailer::Base.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: "gmail.com",
user_name: ENV["EMAIL_USERNAME"],
password: ENV["EMAIL_PASSWORD"],
authentication: :login
}
``` | {'judging_instructions': ''} | {'language': 'Ruby', 'diff_stats': {'total_changes': 7, 'operations': 1}} | jdg_60904 | PrimeIntellect/real-world-swe-problems |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 23