Datasets:

Modalities:
Text
Formats:
parquet
Languages:
code
ArXiv:
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
40
40
text
stringlengths
97
2.24k
title
stringclasses
1 value
4fdfcbe5eae517d56b22006a528b278672bec8d8
--- +++ @@ -19,7 +19,7 @@ const char* call) { uint32_t err = GR_GL_GET_ERROR(gl); if (GR_GL_NO_ERROR != err) { - GrPrintf("---- glGetError %x", GR_GL_GET_ERROR(gl)); + GrPrintf("---- glGetError %x", err); if (NULL != location) { GrPrintf(" at\n\t%s", lo...
9cbf57ac65f9daaf1a44803ce9bdf15a1e7b91b2
--- +++ @@ -28,8 +28,16 @@ void ShadingLanguageIncludeImplementation_ARB::compile(const Shader * shader) const { - std::vector<const char*> cStrings = collectCStrings(shader->includePaths()); - glCompileShaderIncludeARB(shader->id(), static_cast<GLint>(cStrings.size()), cStrings.data(), nullptr); + if (!...
55c58da86afa491768a0b895e7f1285ecad8d7b2
--- +++ @@ -9,13 +9,6 @@ float saldo; } Conta; -float get_saldo( Conta &conta ) { - return conta.saldo; -} - -void set_saldo( Conta &conta ) { - conta.saldo; -} int main() { Conta conta;
211c278e536b9f5bf468a99dc24449ad734466fe
--- +++ @@ -1,12 +1,29 @@ // RUN: clang-cc -fsyntax-only -verify %s // XFAIL + +template<typename T> struct X1 { }; template<typename T> struct X0 { typedef int size_type; + typedef T value_type; size_type f0() const; + value_type *f1(); + X1<value_type*> f2(); }; template<typename T> -typename...
ae9b8c7ea1d4a262f68c5c9c867a818ed83733f4
--- +++ @@ -26,7 +26,7 @@ HWND hwnd = wminfo.info.win.window; HICON icon = ::LoadIcon(handle, "IDI_MAIN_ICON"); - ::SetClassLong(hwnd, GCL_HICON, (LONG) icon); + ::SetClassLong(hwnd, GCLP_HICON, (LONG) icon); } } //...
70c2a7038a7804c18d3359ba954be8fe7f69e613
--- +++ @@ -5,7 +5,8 @@ #include "chrome/browser/extensions/extension_apitest.h" #include "net/base/mock_host_resolver.h" -IN_PROC_BROWSER_TEST_F(ExtensionApiTest, JavaScriptURLPermissions) { +// Disabled, http://crbug.com/63589. +IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_JavaScriptURLPermissions) { ho...
a2061d038a9b3ff1ebfecb0d9bbd466531babdaf
--- +++ @@ -7,8 +7,8 @@ { const int desired_width = 11; const int desired_height = 12; - Board b(desired_width, desired_height); + Board b(desired_height, desired_width); + REQUIRE(desired_height == b.height()); REQUIRE(desired_width == b.width()); - REQUIRE(desired_height == b.height())...
cbaf4a52d678c495e045e785ca70c35ebe48a4d7
--- +++ @@ -5,9 +5,9 @@ #include "chrome/browser/extensions/extension_apitest.h" #include "net/base/mock_host_resolver.h" -// This test failed at times on the Vista dbg builder and has been marked as -// flaky for now. Bug http://code.google.com/p/chromium/issues/detail?id=28630 -IN_PROC_BROWSER_TEST_F(ExtensionA...
4945f164e58cbc6952225289add67b9632669ddb
--- +++ @@ -10,10 +10,14 @@ #include <gloperate-qtapplication/Viewer.h> +#include <widgetzeug/dark_fusion_style.hpp> + int main(int argc, char * argv[]) { Application app(argc, argv); + + widgetzeug::enableDarkFusionStyle(); std::unique_ptr<gloperate_qtapplication::Viewer> viewer(new gloperate...
4d1eb4a80cf17e5dace8e305716a3f74d8fc3e55
--- +++ @@ -7,12 +7,15 @@ #if defined(HAVE_GTEST) && defined(HAVE_GMOCK) +#include <boost/log/common.hpp> #include <gtest/gtest.h> int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); + boost::log::core::get()->set_logging_enabled(false); - return RUN_ALL_TESTS(); + testing::In...
4d489c5be7e823e7e5fa1155d84060af47dd613f
--- +++ @@ -25,7 +25,10 @@ }; void -Interrupt::interrupt() { throw InterruptedException(); } +Interrupt::interrupt() { + requested = false; + throw InterruptedException(); +} bool Interrupt::requested = false; Interrupt::Callback *Interrupt::callback = 0;
958809cc0dfdbe289339a913c586f64a6fe8d0d3
--- +++ @@ -4,31 +4,29 @@ namespace { -using namespace Core8; - TEST_CASE("Decode X from pattern vXvv", "[decoder]") { - REQUIRE(WordDecoder::readX(0x0F00) == 0XF); - REQUIRE(WordDecoder::readX(0xF0FF) == 0X0); + REQUIRE(Core8::WordDecoder::readX(0x0F00) == 0XF); + REQUIRE(Core8::WordDecoder::readX(0xF0FF) ...
ae568d39ad555bf9300b54fc95e9e3b34c047f47
--- +++ @@ -12,9 +12,8 @@ { auto home = getenv("HOME"); - // For root or if the directory exists, use the global code directory - sys::error_code ec; - if (!home || geteuid() == 0 || fs::is_directory("/etc/puppetlabs/code", ec)) { + // For root or users without a HOME direc...
1bba242c85038a27865259ef8a50643e19b2079e
--- +++ @@ -7,3 +7,9 @@ void wibble(); ; + +namespace Blah { + void f() { }; + + void g(); +}
c6ca7345fbe67ac3b1ea5a23b75daea5a019814f
--- +++ @@ -3,6 +3,8 @@ // RUN: %clangxx_lsan %s -o %t // RUN: %env_lsan_opts=$LSAN_BASE %run %t // RUN: %env_lsan_opts=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s +// +// UNSUPPORTED: darwin #include <sanitizer/lsan_interface.h>
92634056948c8ea72b3900c4a11cbe9cb142a1c4
--- +++ @@ -30,6 +30,8 @@ } void AppModalDialogQueue::ShowModalDialog(AppModalDialog* dialog) { + // Set active_dialog_ before showing it, because ShowModalDialog can wind up + // calling ShowNextDialog in some cases, which will change active_dialog_. + active_dialog_ = dialog; dialog->ShowModalDialog(); - ...
a7bf688d859a0500c77ab89d58cafc25b537fab5
--- +++ @@ -4,8 +4,9 @@ static const char *DEFAULT_WPAD_ORDER[] = { "wpad_dhcp", "wpad_slp", - "wpad_dns", - "wpad_dnsdevolution", + "wpad_dns_srv", + "wpad_dns_txt", + "wpad_dns_alias", NULL };
8763baf23005220b7315f8fc3f2950516bfbbea3
--- +++ @@ -14,9 +14,15 @@ set<KontsevichGraph> relevants = KontsevichGraph::graphs(order, 2, true, true, [](KontsevichGraph g) -> bool { - return g.positive_differential_order() && g.is_prime() && !g.is_zero(); + return g.po...
13e294a2a5c7041eb4833f744a7dbf5f371584c4
--- +++ @@ -1,6 +1,8 @@ #include <unistd.h> +#include <event/callback_handler.h> #include <event/event_callback.h> +#include <event/event_handler.h> #include <event/event_main.h> #include <io/stream_handle.h> @@ -9,51 +11,37 @@ LogHandle log_; StreamHandle fd_; - Action *action_; + CallbackHandler close...
9893df5b2423b330782f0a9b02f335277b677c40
--- +++ @@ -14,19 +14,24 @@ { init_shogun(); - // create array of kernels - CGCArray<CKernel*> kernels(l); + // we need this scope, because exit_shogun() must not be called + // before the destructor of CGCArray<CKernel*> kernels! + { + // create array of kernels + CGCArray<CKernel*> kernels(l); - // fill ar...
b464ffc4c8b091c183f81bcc3720b1417e3cbae8
--- +++ @@ -7,7 +7,8 @@ #include "chrome/test/ui_test_utils.h" #include "net/base/mock_host_resolver.h" -IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FLAKY_WebSocket) { +// Disabled, http://crbug.com/38225 +IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WebSocket) { FilePath websocket_root_dir; PathService::...
9b4d648a30f120aa6158413fbbeaa8442a4c2c0d
--- +++ @@ -6,6 +6,7 @@ #include "config.h" #include "webkit/glue/resource_loader_bridge.h" +#include "webkit/glue/webappcachecontext.h" #include "net/http/http_response_headers.h" @@ -13,6 +14,7 @@ ResourceLoaderBridge::ResponseInfo::ResponseInfo() { content_length = -1; + app_cache_id = WebAppCacheC...
aa3d4ad19f9ec72990b2a0fff828baa5b7bdde39
--- +++ @@ -1,11 +1,45 @@ #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp" #include "EasyRandom.hpp" +#include <limits> using namespace EasyRandom; -TEST_CASE( "TEST_TEST", "RANDOM" ) { - const auto randomNumber = Random::get( ); - RE...
f0ae6c62e8cd53ef8c81f87e3a7abb0d15b6775b
--- +++ @@ -24,6 +24,9 @@ // apparently this has been a problem with Solaris for years. # include <ieeefp.h> static int isinf(double x) { return !finite(x) && x==x; } +#elif defined(_MSC_VER) +#include <float.h> +#define isinf(X) (!_finite(X)) #else # error "Don't know how to get isinf()" #endif
193fdf6730721d55789b184d001115dcdc018e69
--- +++ @@ -25,7 +25,7 @@ if (!first) OS << ", "; first = false; - T.dump(); + OS << T.getString(); } } OS << "\n";
a99754d59f6716deba1bd4715a143550208b1b29
--- +++ @@ -24,7 +24,7 @@ // static void* ThreadLocalPlatform::GetValueFromSlot(SlotType& slot) { - return pthread_getspecific(slot_); + return pthread_getspecific(slot); } // static
ef4b8cf7d28021cd8e05948ca388ef24e71348bc
--- +++ @@ -6,7 +6,7 @@ #include <array> #include <iostream> #include <fstream> -#include "util/gzstream.h" +#include "io/gzstream.h" using namespace meta; @@ -22,7 +22,7 @@ { std::ifstream file{argv[1], std::ios::in | std::ios::binary}; - util::gzofstream output{argv[2]}; + io::...
4b25be7aa182fd36e86b3bf3dcbed17ae11b44c8
--- +++ @@ -15,4 +15,16 @@ virtual void TearDown() {} }; +TEST(test_setupTunnel, handleSetupTunnel) { + setupTunnel st; + StaticJsonBuffer<1000> buffer; + JsonObject &reply = buffer.createObject(); + + StaticJsonBuffer<200> jsonBuffer; + char json[] = "{\"sensor\":\"gps\",\"msg_uuid\":1351824120,\"data\":[48.756...
6fac364468105fdb54a8c685602a9590cb7dde84
--- +++ @@ -1,8 +1,9 @@ +#include <kernel/config.h> #include <kernel/kernconf.hh> USDK_API kernconf_type kernconf = { // Default is large enough until we enable a mechanism to dynamically // reallocate task space on demand. - /* .default_stack_size = */ 128 * 1024, + /* .default_stack_size = */ ...
9353636427a66a1e1d14d41da6455c6a0dea4984
--- +++ @@ -1,15 +1,15 @@ #include <QApplication> #include <QDeclarativeView> #include <QUrl> +#include <MDeclarativeCache> -int main(int argc, char** argv) +Q_DECL_EXPORT int main(int argc, char** argv) { - // FIXME: Use the (new?) harmattan booster!! - QApplication app(argc, argv); + QApplication* ap...
4e6c19c5089fb6ff2d984633ff00617290f14b16
--- +++ @@ -16,7 +16,11 @@ void EmitterSimple::Process(FeatureBuilder1 & fb) { + auto & polygonizer = m_regionGenerator->Parent(); + // Emit each feature independently: clear current country names (see Polygonizer::GetCurrentNames()). + polygonizer.Start(); (*m_regionGenerator)(fb); + polygonizer.Finish();...
be1bc412b07d61883c6bd7524f1ec259c3a95df5
--- +++ @@ -4,6 +4,8 @@ #include<fstream> #include<vector> #include<experimental/filesystem> + +namespace fs = std::experimental::filesystem; void extract(const char* in_file, const char* out_dir) { std::ifstream in(in_file); @@ -31,9 +33,9 @@ BinaryRead bin_in(in_iterator); for(auto& fn : filenames) { ...
cfe562a7adba0d35502f7b4586b8c73f65c1f28f
--- +++ @@ -12,18 +12,22 @@ v8::Handle<Value> Item::WrapInstance(iTunesItem* item) { HandleScope scope; - NSLog(@"%@", item); + //NSLog(@"%@", [item persistentID]); if (item == nil) { return scope.Close(Null()); } NSString* className = NSStringFromClass([item class]); - NSLog(@"Class: %@", cl...
e4ef1685cb9dd087f24f9ed7205b8a85fef18b3f
--- +++ @@ -4,6 +4,8 @@ #include "Miner.h" #include <memory> +#include <limits> +#include <cassert> class CpuMiner : public Miner { @@ -15,6 +17,41 @@ { return MinerPtr( new CpuMiner ); } + +protected: + virtual Result _mine( const Sha256& preHash, const ByteArray& reverseTarget, uint32_t& no...
868af68aebb50d179fc45c86f7348ce8494e241b
--- +++ @@ -22,9 +22,13 @@ int main() { - char buf[3*sizeof(A)]; + const std::size_t Size = 3; + // placement new might require additional space. + const std::size_t ExtraSize = 64; + char buf[Size*sizeof(A) + ExtraSize]; - A* ap = new(buf) A[3]; - assert((char*)ap == buf); - assert(A_co...
a8309afcbd53df6bbc58712347aa28b9b4ab2e03
--- +++ @@ -14,7 +14,14 @@ return 1; } - auto reader = ProgramReader(argv[1]); + auto filename = std::string(argv[1]); + + if(filename == "--build-only"){ + std::cerr << "Build completed, not executing." << std::endl; + return 0; + } + + auto reader = filename == "-" ? Pro...
d24d18b9e3f4f98bd820ae1f25a7c9b5c5fac0f3
--- +++ @@ -4,7 +4,14 @@ #include "chrome/browser/extensions/extension_apitest.h" -IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Storage) { +#if defined(OS_LINUX) +// See http://crbug.com/42943. +#define MAYBE_Storage FLAKY_Storage +#else +#define MAYBE_Storage Storage +#endif + +IN_PROC_BROWSER_TEST_F(ExtensionApiTe...
b8811ad2ca62f1cbd907751c5e7154848cf9f831
--- +++ @@ -9,13 +9,14 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// aligned allocation functions are not provided prior to macosx10.13 -// XFAIL: availability=macosx10.12 -// XFAIL: availability=macosx10.11 -// XFAIL: availability=macosx10.10 -// XFAIL: availability=macosx10.9 -// XFAIL: availability=macosx...
b3b874819921a35406c9bdb0a649727909796a8b
--- +++ @@ -2,6 +2,8 @@ #include "ui_ZulipAboutDialog.h" #include "Config.h" +#include "ZulipApplication.h" +#include "ZulipWindow.h" #include <QFile> #include <QDebug> @@ -10,6 +12,8 @@ QDialog(parent), m_ui(new Ui::ZulipAboutDialog) { m_ui->setupUi(this); + + connect(m_ui->webView, SIGNAL(link...
fc51305d4711ab5a10c5ab50b75617b480dd93e8
--- +++ @@ -1,3 +1,29 @@ #include "Bmp180.h" +namespace rcr { +namespace level1payload { +Bmp180::Bmp180(void) { + // Start the BMP-180. Trap the thread if no sensor is found. + if (!bmp_.begin()) { + Serial.println("No BMP sensor found. Program will not proceed."); + while (1) { /* Trap the thread. */ }...
823e2464b309158215b04bd252d6762adfa61199
--- +++ @@ -44,8 +44,8 @@ void print_version(void) { - cout << PACKAGE_STRING << endl; - cout << "Copyright (C) 2014 James Durand\n" + cerr << PACKAGE_STRING << endl; + cerr << "Copyright (C) 2014 James Durand\n" "This is free software; see the source for copying conditions.\n" "There is NO warranty." << ...
334f8b9b37aef9e650af2007f9f3f7169f284425
--- +++ @@ -20,4 +20,20 @@ EXPECT_TRUE(abs(static_cast<long>(now_t - now.toEpochTime())) < 2); } +TEST(TimeValue, Win32FILETIME) { + uint64_t epoch_as_filetime = 0x19DB1DED53E8000ULL; + uint32_t ns = 765432100; + sys::TimeValue epoch; + + // FILETIME has 100ns of intervals. + uint64_t ft1970 = epoch_as_fil...
47cf06cf3db23069fce4650a5fc68021ea3151aa
--- +++ @@ -1,5 +1,6 @@ #include <iostream> #include <memory> +#include <fstream> #include <boost/interprocess/ipc/message_queue.hpp> #include "messageQueue.h" @@ -19,6 +20,22 @@ return 0; } + { + std::ifstream initFile("vttainit.ini"); + if (initFile.good()) { + std:...
aaba193cd4bb76c9aa91fe83aeb250b71f0c4db4
--- +++ @@ -25,8 +25,9 @@ const float y = 2.0f * a - 1.0f; const float latitude = std::asin(y); const float longitude = b * two_pi; + const float cos_latitude = std::cos(latitude); - return mvec3(cos(latitude) * cos(longitude), y, cos(latitude) * sin(longitude)); + return mvec3(cos_latitude * cos(longit...
72a6bd0556099b119732866d4a69c5dece0f6427
--- +++ @@ -19,14 +19,18 @@ TEST_F(ParamPolicy2Test, ParamVectorTest) { GaussianModel model1(1.2, 3.7); EXPECT_EQ(2, model1.parameter_vector().size()); + + // Fix the mean at its current value. model1.disable_parameter_1(); model1.set_mu(0.1); EXPECT_DOUBLE_EQ(0.1, model1.mu()); - ...
0fb62536914ea825e6a457746f83141e9d51fcce
--- +++ @@ -12,7 +12,7 @@ rate_limit_enabled(true), max_wait_to_launch(base::TimeDelta::FromMinutes(4)), time_to_live(base::TimeDelta::FromMinutes(5)), - abandon_time_to_live(base::TimeDelta::FromSeconds(30)), + abandon_ti...
f3f85f7373a64abdb03821f6e13416c58ec68ca1
--- +++ @@ -20,8 +20,6 @@ int DoorEntity::Update(float dT, InputHandler * inputHandler) { - this->SyncComponents(); - return 0; } @@ -39,6 +37,7 @@ this->m_isOpened = false; this->m_pComp->PC_rotation = DirectX::XMVectorSet(0.f, 0.f, 0.f, 0.f); } + this->SyncComponents(); } return 0;
58257612265e77de8b4988f70c25dec7124719f3
--- +++ @@ -7,7 +7,7 @@ void before(std::string entity, Hook hook) { ExampleGroup* parent_group = groups_being_defined.top(); - if (entity == "each") + if (entity == "each" || entity == "example") parent_group->addBeforeEachHook(hook); else throw "no such before hook type";
6b4e6e799b489a8058e3f6e3c9a5676b3cb4a4bf
--- +++ @@ -25,22 +25,26 @@ return true; } -void* win_heap_malloc(size_t s) { - return HeapAlloc(win_heap, 0, s); +void* win_heap_malloc(size_t size) { + return HeapAlloc(win_heap, 0, size); } -void* win_heap_realloc(void* p, size_t s) { - if (!p) - return win_heap_malloc(s); - return HeapReAlloc(win_...
e3e0a2432c587ee06e469c37ffae133b7ac55c77
--- +++ @@ -12,25 +12,49 @@ #include <univalue.h> +namespace { + +struct TestBlockAndIndex { + TestingSetup test_setup{}; + CBlock block{}; + uint256 blockHash{}; + CBlockIndex blockindex{}; + + TestBlockAndIndex() + { + CDataStream stream(benchmark::data::block413567, SER_NETWORK, PROTO...
7a26d87c9fef90d2d87ec7138b12db9efb2a11fd
--- +++ @@ -9,6 +9,9 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03 + +// GCC versions prior to 7.0 don't provide the required [[nodiscard]] attribute. +// UNSUPPORTED: gcc-4, gcc-5, gcc-6 // Test that entities declared [[nodiscard]] as at exten...
563c80c649e5696a42e1ec32d5dbff90e5404da9
--- +++ @@ -27,9 +27,9 @@ DeviceMotionHardwareBuffer* buffer) { DCHECK(buffer); device_motion_buffer_ = buffer; - return DataFetcherImplAndroid::GetInstance()-> + started_ = DataFetcherImplAndroid::GetInstance()-> StartFetchingDeviceMotionData(buffer); - started_ = true; + return started_; } ...
a0e4956b1ac64254bb504af2bad45ccf0cd58195
--- +++ @@ -5,6 +5,7 @@ // property of any third parties. #include <Rosetta/Commons/Constants.hpp> +#include <Rosetta/Models/Enchantment.hpp> #include <Rosetta/Models/Graveyard.hpp> namespace RosettaStone @@ -27,5 +28,11 @@ void Graveyard::AddCard(Entity& card) { m_cards.emplace_back(&card); + + int...
3ad630f5570101f6f7aa077de622f29e319e7f4b
--- +++ @@ -1,11 +1,14 @@ #include <ncurses.h> +#include <cstring> + +#include <string> #include "print.hpp" #include "lightsout.hpp" #include "keybindings.hpp" using namespace roadagain; -int main() +int main(int argc, char** argv) { initscr(); cbreak(); @@ -14,8 +17,15 @@ start_color(); ...
a08bfa6f5b6115a910060405ec8e88db8f8e539e
--- +++ @@ -6,9 +6,11 @@ #include "../common/thread_local.h" namespace gles2 { -namespace { -gpu::ThreadLocalKey g_gl_context_key; -} // namespace anonymous +// TODO(kbr): the use of this anonymous namespace core dumps the +// linker on Mac OS X 10.6 when the symbol ordering file is used +// namespace { +static ...
424bd5284d548311876089aa938f84206e594e39
--- +++ @@ -1,4 +1,10 @@ +/* Copyright 2014, Adrien Destugues <pulkomandy@pulkomandy.tk> + * Distributed under the terms of the MIT license + */ #include <stdio.h> + +#include <sys/time.h> +#include <sys/resource.h> #include "video.h" @@ -6,22 +12,30 @@ { if (argc < 3) { - printf("missing filename\n"); -...
7702b9419208a06275fd7043d1bbb6245dc12f17
--- +++ @@ -50,7 +50,7 @@ } - msleep(20); + msleep(100); } }
d113b3b7a7e30b50444274cde034fb673611abe1
--- +++ @@ -8,7 +8,7 @@ year -= month < 3; return (year + year / 4 - year / 100 + year / 400 + t[month - 1] + day) % 7; } - + int main() { int y, m, count = 0; for (y = 1901; y <= 2000; y++) { @@ -16,7 +16,7 @@ if (week_day(1, m, y) == 0) count++; } } - + ...
f6836c0af850d3cbce4c54885f6c4468210aa04c
--- +++ @@ -21,17 +21,17 @@ if (m_NextRenderTime <= g_Ticks) { - //m_NextUpdateTime = g_Ticks + 50; + m_NextUpdateTime = g_Ticks + 50; m_NextRenderTime = g_Ticks + g_OrionWindow.RenderTimerDelay; g_Orion.Process(true); } - /*else if (m_NextUpdateTime <= g_Ticks) + else if (m_NextUpdateTime <= g_Tick...
392d957512b85242e094c42df9271ce1c7af6ee7
--- +++ @@ -15,7 +15,7 @@ double result; - switch(operation) { + switch (operation) { case '+': result = first_operand + second_operand; break;
41689848bc47c304350c3c613655ea5df98c60fb
--- +++ @@ -23,7 +23,7 @@ ValueArg<Strategy, StrategyReader, StrategyWriter>& strategy_arg = ValueArg<Strategy, StrategyReader, StrategyWriter>::create("strategy") - .usage("(none|hold_out|extension)") + .usage("(none|hold_out|formal|extension)") .description("Verification strategy") .default_val(Strate...
a3fc3260b73ce3f50b8d94c7066db625a71309e7
--- +++ @@ -32,6 +32,11 @@ QApplication kit(argc, argv); +#ifdef Q_WS_QPA + // Workaround for lighthouse Qt + kit.setInputContext(QInputContextFactory::create("Maliit", &kit)); +#endif + MainWindow window; return kit.exec(); }
f42d74f41076542fc9b4f4d5fa034dfa93b3c916
--- +++ @@ -1,7 +1,8 @@ // RUN: clang-cc -emit-llvm-only -verify %s // PR5454 +#include <stddef.h> -class X {static void * operator new(unsigned long size) throw(); X(int); }; +class X {static void * operator new(size_t size) throw(); X(int); }; int a(), b(); void b(int x) {
8b23479136d9e5ed1c107a5818c3916aaf312875
--- +++ @@ -1,7 +1,49 @@ #include "CacheJsonToArticleConverter.h" +#include <json/json.h> + +#include "WalkerException.h" +#include "Article.h" ArticleCollection& CacheJsonToArticleConverter::convertToArticle(std::string json, ArticleCollection& articleCache) { + Json::Reader reader; + Json::Value docume...
2a811bca8385871d630e1b819527f69eff11b14c
--- +++ @@ -18,11 +18,10 @@ } fixed_point abs(fixed_point fixedPoint) { - float temp = (float) fixedPoint; - if (temp >= 0) { - return fixed_point(temp); + if (fixedPoint >= 0) { + return fixedPoint; } else { - return fixed_point(-temp); + return -fixedPoint; } }
fb7afb02e1131955f3a71f15bc4d61304f1c95cd
--- +++ @@ -1,13 +1,16 @@ #include <hal/clock.hpp> #include <hal/gpio.hpp> + +#define LED_PORT 6 +#define LED_PIN 1 //------------------------------------------------------------------------------ int main(void) { - ::gpio::GPIO pinLed = ::gpio::GPIO(1, 0); + ::gpio::GPIO pinLed = ::gpio::...
a7683f116b988f519549a34e2e743573746b8913
--- +++ @@ -19,8 +19,8 @@ s += "GitHub!"; printGreeting(); } - GitHubGreeting(GitHubGreeting & h) { } - GitHubGreeting(GitHubGreeting * h) { } + GitHubGreeting(GitHubGreeting & h) { GitHubGreeting(); } + GitHubGreeting(GitHubGreeting * h) { GitHubGreeting...
2a92dee217ccf5618e05ca758d2909b3ef71d129
--- +++ @@ -15,10 +15,10 @@ using namespace rgb_matrix; const Color GameDisplay::Background = Color( 0, 0, 0); -const Color GameDisplay::WhiteTeamFG = Color(200, 200, 200); -const Color GameDisplay::BlackTeamFG = Color( 0, 0, 0); +const Color GameDisplay::WhiteTeamFG = Color(255, 255, 255); +const ...
610ac5b045e03bd666d054d7aca01b34a421c8fc
--- +++ @@ -13,7 +13,8 @@ const string16& message_text, bool is_reload, const DialogClosedCallback& callback) { - bool prevent_reload = !message_text.empty() || + + bool prevent_reload = message_text.empty() || message_text == ASCIIToUTF16("false"); callback.Run(!prevent_r...
8da270e644481a3ddd13f937970b3555332182c9
--- +++ @@ -7,15 +7,7 @@ template <unsigned short T> class Type2 {}; template <unsigned short T> void Function2(Type2<T>& x) {} // expected-note{{candidate function [with T = 42] not viable: no known conversion from 'Type2<42>' to 'Type2<42> &' for 1st argument;}} -template <__int128_t T> class Type3 {}; -templat...
e9d666c9cf225227f986df3de9efb010c7bb5d0a
--- +++ @@ -14,6 +14,10 @@ list<std::string> list_str; }; +// test the helper class listNodeTest +// this is a canonical example of writing testable code: +// to test private members, just write another helper class +// and make its data public TEST(listNodeTest, DefaultCtor) { int element_1 = 100; std::...
ebfa9a9ddb3ebbf234d5ac216fca4c0b164e9985
--- +++ @@ -11,6 +11,8 @@ clear(); //Don't echo entered characters on the screen noecho(); + //Enable getting function keys + keypad(stdscr, true); //Hide the cursor curs_set(false);
14dde5bf1dbbb65e7cbd464701ae756da56e82fd
--- +++ @@ -4,6 +4,8 @@ int main() { + arma_rng::set_seed_random(); + vec datos; datos.load(config::sourceDir + "/guia2/datos/merval.csv");
e595a6f955108bfb28b68f1004b6216e27e02cb1
--- +++ @@ -14,6 +14,7 @@ #include <string> using namespace llvm; +#ifndef NDEBUG TEST(DebugTest, Basic) { std::string s1, s2; raw_string_ostream os1(s1), os2(s2); @@ -30,3 +31,4 @@ DEBUG_WITH_TYPE("B", os2 << "B"); EXPECT_EQ("A", os2.str()); } +#endif
b093b08204ec21f46e198b2da92b419889108f70
--- +++ @@ -1,4 +1,5 @@ #include "Course.h" +#include "Assignment.h" #include <cstdio> #include <iostream> @@ -17,9 +18,24 @@ Course course("test-0"); cout << "Created " << course.getName() << endl; - cout << "All Assignments:" << endl; + cout << "All Assignments: " << course.assignments.size() << endl...
00fe29604e0799a76090f3ce30afa269ea65a960
--- +++ @@ -3,13 +3,11 @@ #include <grid/geometry_info.h> -// enable these lines for gcc2.95 -// -//const unsigned int GeometryInfo<deal_II_dimension>::vertices_per_cell; -//const unsigned int GeometryInfo<deal_II_dimension>::lines_per_cell; -//const unsigned int GeometryInfo<deal_II_dimension>::quads_per_cell; ...
b5e4f06e9f2f2a21e625e7103e37a0a80bf88e9c
--- +++ @@ -7,14 +7,7 @@ #include <Qt> #include "QZXingFilter.h" - -#if defined(Q_OS_IOS) -/// Reference for iOS entry point: -/// http://stackoverflow.com/questions/25353686/you-are-creating-qapplication-before-calling-uiapplicationmain-error-on-ios -extern "C" int qtmn(int argc, char **argv) -#else int main(in...
a1873afd1c4d5bf42dd2f3dc573c66add6c129c0
--- +++ @@ -35,7 +35,7 @@ return UpgradeClient(); } - bool DownloadGridcoinBlocks() + int DownloadGridcoinBlocks() { return DownloadBlocks(); }
30bec5829924725b63f8415504e562a1d71ad3b6
--- +++ @@ -9,14 +9,15 @@ for(double input = 1; input < 4; input++) { totalError += pow(input*2 - network.getOutput({input})[0], 2); } - fitnesses.push_back(1/totalError); + fitnesses.push_back(1/totalError); } return fitnesses; } int main() { - srand(time(NULL)); + srand(time(NULL))...
29514913dd21888a6a6d5dc2a752cea7727356b2
--- +++ @@ -8,6 +8,10 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03 + +// This workaround option is specific to MSVC's C1XX, so we don't care that +// it isn't set for older GCC versions. +// XFAIL: gcc-4.9 // Verify TEST_WORKAROUND_C1XX_BROKEN...
461797d21a2b26c4d55e623c51818f399574774c
--- +++ @@ -21,18 +21,13 @@ std::tuple<std::unique_ptr<char>> up; std::tuple<std::shared_ptr<char>> sp; std::tuple<std::weak_ptr <char>> wp; -// std::tuple<std::auto_ptr <char>> ap; } { std::tuple<std::unique_ptr<char[]>> up; std::tuple<std::shared_ptr<char[]>> sp; std::t...
3df8d2b6693e05b633159969a3b735039950f073
--- +++ @@ -7,7 +7,8 @@ #include "base/logging.h" ChromeBrowserMainPartsAura::ChromeBrowserMainPartsAura( - const MainFunctionParams& parameters) { + const MainFunctionParams& parameters) + : ChromeBrowserMainParts(parameters) { NOTIMPLEMENTED(); }
8f5dc2f9e9ee03ef6b28eb4d4dc210c0fd3eec2c
--- +++ @@ -1,5 +1,6 @@ #include "parsertest.h" #include "fileast.h" +#include "parser.h" #include "scanner.h" #include "myexception.h" #include <QtTest/QtTest> @@ -35,10 +36,14 @@ QVERIFY(file.open(QFile::ReadOnly)); QByteArray data = file.readAll(); auto doc = QJsonDocument::fromJson...
a0ddec879cc5bf65904736b3fb88c1f2699080e4
--- +++ @@ -20,7 +20,7 @@ DWORD exception_code = info->ExceptionRecord->ExceptionCode; if (exception_code == EXCEPTION_ACCESS_VIOLATION) { fprintf(stderr, "in SEHHandler\n"); - fflush(stdout); + fflush(stderr); TerminateProcess(GetCurrentProcess(), 0); } return EXCEPTION_CONTINUE_SEARCH; @...
b125095170774a2d62240cbeddaeb02c2c385ee5
--- +++ @@ -9,5 +9,9 @@ int main() { - + RESTART: + string input = ""; + getline(cin, input); + cin.ignore(); + goto RESTART; }
17a18e2cfb860957b51923f1e5f01287f871653d
--- +++ @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fmodules-cache-path=%t %s -emit-llvm -o - | FileCheck %s -// CHECK: @_Z3varIiE = {{.*}} %union.union_type { i8 1 }, +// CHECK: @{{.*var.*}} = {{.*}} %union.union_type { i8 1 }, #pragma clang module build bar mo...
20e13275c24a0de17aea33714eb2fce17702cff1
--- +++ @@ -5,9 +5,11 @@ #include "base/bind.h" #include "base/test/launcher/unit_test_launcher.h" #include "base/test/test_suite.h" +#include "ui/gl/gl_surface.h" int main(int argc, char** argv) { base::TestSuite test_suite(argc, argv); + gfx::GLSurface::InitializeOneOffForTests(true); return base::La...
9724d6c63e878e4cbe98cd907c5e5f39175ef1bd
--- +++ @@ -12,12 +12,14 @@ // name. std::string mlpack::util::GetVersion() { -#ifndef __MLPACK_SUBVERSION +#ifndef __MLPACK_GIT_VERSION std::stringstream o; o << "mlpack " << __MLPACK_VERSION_MAJOR << "." << __MLPACK_VERSION_MINOR << "." << __MLPACK_VERSION_PATCH; return o.str(); #else - #includ...
fc8ddc06963d6d8a2d4a6288abfa398ab2dd5e56
--- +++ @@ -10,11 +10,14 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QtQuick1ApplicationViewer viewer; + qmlRegisterType<qiscp>("org.tal.qiscp", 1, 0, "QISCP"); - qmlRegisterUncreatableType<qiscpInputs>("org.tal.qiscp", 1, 0, "ISCPInputs", "ISCPInputs can not be created...
63ddb4b32b74ade76730b721ea8553baf39211c5
--- +++ @@ -10,7 +10,8 @@ char buffer[1000]; void *Thread(void *p) { - return strerror_r(TEST_ERROR, buffer, sizeof(buffer)); + (void)strerror_r(TEST_ERROR, buffer, sizeof(buffer)); + return p; } int main() {
28e4929f428f7d2dedd983c2638bbf2d4704e1ea
--- +++ @@ -16,12 +16,15 @@ pindexLastCommonBlock = nullptr; pindexBestHeaderSent = nullptr; fSyncStarted = false; + fSyncStartTime = -1; + fFirstHeadersReceived = false; + nFirstHeadersExpectedHeight = -1; + fRequestedInitialBlockAvailability = false; nDownloadingSince = 0; nBloc...
1fb32fcf717366b82bb2a3b6f1a35fbfe1973302
--- +++ @@ -15,10 +15,11 @@ hits[2].setTime(4); hits[3].setTime(3); auto results = JPetAnalysisTools::getHitsOrderedByTime(hits); - BOOST_REQUIRE_EQUAL(results[0].getTime(), 1); - BOOST_REQUIRE_EQUAL(results[1].getTime(), 2); - BOOST_REQUIRE_EQUAL(results[2].getTime(), 3); - BOOST_REQUIRE_EQUAL(results[3...
1c04a73f9b4cb05add263762d5ff3839065a3bab
--- +++ @@ -2,11 +2,11 @@ Matrix2f m; m = M; cout << "Here is the matrix m:" << endl << m << endl; -cout << "Now we want to replace m by its own transpose." << endl; -cout << "If we do m = m.transpose(), then m becomes:" << endl; -m = m.transpose() * 1; +cout << "Now we want to copy a column into a row." << endl; ...
7f3df4150c9bfa2e5de07220cea19f9c84d4db52
--- +++ @@ -19,10 +19,13 @@ /// materializeFunction - make sure the given function is fully read. /// -void ModuleProvider::materializeModule() { - if (!TheModule) return; +Module* ModuleProvider::materializeModule() { + // FIXME: throw an exception instead? + if (!TheModule) return 0; for (Module::iterat...
d27362e7d375d325d3144ba9d01293aac0a8b8fa
--- +++ @@ -7,7 +7,7 @@ std::string random_greeting() { std::random_device rand; std::default_random_engine rand_eng(rand()); - std::uniform_int_distribution<int> uniform_dist(0, STORE_GREETINGS.size()); + std::uniform_int_distribution<int> uniform_dist(0, STORE_GREETINGS.size()-1); size_t index...
ae27181502d9a1453ea247e4d1509e249f9d0b1e
--- +++ @@ -9,6 +9,6 @@ void g() { static int a = f(); } -// CHECK: load atomic i8* bitcast (i64* @_ZGVZ1gvE1a to i8*) acquire -// CHECK-NEXT: %guard.uninitialized = icmp eq i8 %0, 0 -// CHECK-NEXT: br i1 %guard.uninitialized, label %init.check, label %init.end +// CHECK: [[LOAD:%.*]] = load atomic i8* bitcast (...
df47fa9d4ae5494ef8a1e2cec1511eeaabc19629
--- +++ @@ -21,8 +21,8 @@ int main() { std::cout << "Just test hnc.hpp include" << std::endl; - std::cout << "hnc version = " << hnc::version << std::endl; - std::cout << "hnc codename = " << hnc::codename << std::endl; + std::cout << "hnc version = " << hnc::version() << std::endl; + std::cout << "hnc codename...
5b3e03e3cf6847cc0275c6ec1c54b6dab7b70209
--- +++ @@ -10,6 +10,9 @@ { } +/* when streaming an instance of this type to an ostream of any kind this function will build the string + containing the state of the object. +*/ std::ostream& operator<<(std::ostream& os, const UserTypeToString& obj) { // write obj to stream
5fdc466315a2764ea7a242b97c3ced5656bcce97
--- +++ @@ -1,2 +1,9 @@ +#ifdef BITS_64 +#define SYS_CLOCK_GETTIME 113 +#endif + +#ifdef BITS_32 #define SYS_CLOCK_GETTIME 263 +#endif + #include "linux_clock.cpp"
7b18ff7dd264df9675ff607d70315a8dbb370522
--- +++ @@ -27,4 +27,12 @@ EXPECT_FALSE(Struct->hasName()); } +TEST(TypesTest, LayoutIdenticalEmptyStructs) { + LLVMContext C; + + StructType *Foo = StructType::create(C, "Foo"); + StructType *Bar = StructType::create(C, "Bar"); + EXPECT_TRUE(Foo->isLayoutIdentical(Bar)); +} + } // end anonymous namespace
End of preview. Expand in Data Studio

CodeEditSearchRetrieval

An MTEB dataset
Massive Text Embedding Benchmark

The dataset is a collection of unified diffs of code changes, paired with a short instruction that describes the change. The dataset is derived from the CommitPackFT dataset.

Task category Retrieval (text-to-text)
Domains Programming, Written
Reference OctoPack: Instruction Tuning Code Large Language Models

Source datasets:

How to evaluate on this task

You can evaluate an embedding model on this dataset using the following code:

import mteb

task = mteb.get_task("CodeEditSearchRetrieval")
model = mteb.get_model(YOUR_MODEL)
mteb.evaluate(model, task)

To learn more about how to run models on mteb task check out the GitHub repository.

Citation

If you use this dataset, please cite the dataset as well as mteb, as this dataset likely includes additional processing as a part of the MMTEB Contribution.


@inproceedings{muennighoff2023octopack,
  archiveprefix = {arXiv},
  author = {Niklas Muennighoff and Qian Liu and Armel Randy Zebaze and Qinkai Zheng and Binyuan Hui and Terry Yue Zhuo and Swayam Singh and Xiangru Tang and Leandro Von Werra and Shayne Longpre},
  booktitle = {The Twelfth International Conference on Learning Representations},
  eprint = {2308.07124},
  title = {OctoPack: Instruction Tuning Code Large Language Models},
  url = {https://openreview.net/forum?id=mw1PWNSWZP},
  year = {2024},
}


@article{enevoldsen2025mmtebmassivemultilingualtext,
  title={MMTEB: Massive Multilingual Text Embedding Benchmark},
  author={Kenneth Enevoldsen and Isaac Chung and Imene Kerboua and Márton Kardos and Ashwin Mathur and David Stap and Jay Gala and Wissam Siblini and Dominik Krzemiński and Genta Indra Winata and Saba Sturua and Saiteja Utpala and Mathieu Ciancone and Marion Schaeffer and Gabriel Sequeira and Diganta Misra and Shreeya Dhakal and Jonathan Rystrøm and Roman Solomatin and Ömer Çağatan and Akash Kundu and Martin Bernstorff and Shitao Xiao and Akshita Sukhlecha and Bhavish Pahwa and Rafał Poświata and Kranthi Kiran GV and Shawon Ashraf and Daniel Auras and Björn Plüster and Jan Philipp Harries and Loïc Magne and Isabelle Mohr and Mariya Hendriksen and Dawei Zhu and Hippolyte Gisserot-Boukhlef and Tom Aarsen and Jan Kostkan and Konrad Wojtasik and Taemin Lee and Marek Šuppa and Crystina Zhang and Roberta Rocca and Mohammed Hamdy and Andrianos Michail and John Yang and Manuel Faysse and Aleksei Vatolin and Nandan Thakur and Manan Dey and Dipam Vasani and Pranjal Chitale and Simone Tedeschi and Nguyen Tai and Artem Snegirev and Michael Günther and Mengzhou Xia and Weijia Shi and Xing Han Lù and Jordan Clive and Gayatri Krishnakumar and Anna Maksimova and Silvan Wehrli and Maria Tikhonova and Henil Panchal and Aleksandr Abramov and Malte Ostendorff and Zheng Liu and Simon Clematide and Lester James Miranda and Alena Fenogenova and Guangyu Song and Ruqiya Bin Safi and Wen-Ding Li and Alessia Borghini and Federico Cassano and Hongjin Su and Jimmy Lin and Howard Yen and Lasse Hansen and Sara Hooker and Chenghao Xiao and Vaibhav Adlakha and Orion Weller and Siva Reddy and Niklas Muennighoff},
  publisher = {arXiv},
  journal={arXiv preprint arXiv:2502.13595},
  year={2025},
  url={https://arxiv.org/abs/2502.13595},
  doi = {10.48550/arXiv.2502.13595},
}

@article{muennighoff2022mteb,
  author = {Muennighoff, Niklas and Tazi, Nouamane and Magne, Loïc and Reimers, Nils},
  title = {MTEB: Massive Text Embedding Benchmark},
  publisher = {arXiv},
  journal={arXiv preprint arXiv:2210.07316},
  year = {2022}
  url = {https://arxiv.org/abs/2210.07316},
  doi = {10.48550/ARXIV.2210.07316},
}

Dataset Statistics

Dataset Statistics

The following code contains the descriptive statistics from the task. These can also be obtained using:

import mteb

task = mteb.get_task("CodeEditSearchRetrieval")

desc_stats = task.metadata.descriptive_stats
{
    "train": {
        "num_samples": 26000,
        "number_of_characters": 8099526,
        "documents_text_statistics": {
            "total_text_length": 7176685,
            "min_text_length": 81,
            "average_text_length": 552.0526923076923,
            "max_text_length": 2538,
            "unique_texts": 12920
        },
        "documents_image_statistics": null,
        "queries_text_statistics": {
            "total_text_length": 922841,
            "min_text_length": 18,
            "average_text_length": 70.98776923076923,
            "max_text_length": 2532,
            "unique_texts": 12898
        },
        "queries_image_statistics": null,
        "relevant_docs_statistics": {
            "num_relevant_docs": 13000,
            "min_relevant_docs_per_query": 1,
            "average_relevant_docs_per_query": 1.0,
            "max_relevant_docs_per_query": 1,
            "unique_relevant_docs": 13000
        },
        "top_ranked_statistics": null
    }
}

This dataset card was automatically generated using MTEB

Downloads last month
89

Papers for mteb/CodeEditSearchRetrieval