conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add first tests for JTS converter\n" }, { "from": "gpt", "value": "package me.itszooti.geojson.jts;\n\nimport org.junit.Test;\n\nimport com.vividsolutions.jts.geom.Coordinate;\nimport com.vividsolutions.jts.geom.Geometry;\nimport com.vividsolutions.jts.geom.Point;\n\...
java
chosen
[ { "from": "human", "value": "Test case for Label modes\n\nsvn changeset:10797/svn branch:6.2\n" }, { "from": "gpt", "value": "package com.vaadin.tests.components.label;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.vaadin.tests.components.ComponentTestCase;\nimport com.vaa...
java
chosen
[ { "from": "human", "value": "Add our own Restrictions object like Hibernate, for OpenNMS-specific Restrictions. Right now, it provides a way to do an iplike match.\n" }, { "from": "gpt", "value": "package org.opennms.netmgt.model;\n\nimport org.hibernate.criterion.Criterion;\nimport org.hiberna...
java
chosen
[ { "from": "human", "value": "Add statement to problem 31\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2014 Pedro Vicente Gómez Sánchez.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ...
java
chosen
[ { "from": "system", "value": "Fix a NPE in MobHealthDisplayUpdateTask\n\nBand aid for broken isValid() function.\nFixes #1396\n" }, { "from": "human", "value": "package com.gmail.nossr50.runnables;\n\nimport org.bukkit.entity.LivingEntity;\nimport org.bukkit.scheduler.BukkitRunnable;\n\nimport c...
java
chosen
[ { "from": "human", "value": "Create test to qualifier filter\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 Otavio Santana and others\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this w...
java
chosen
[ { "from": "human", "value": "Add very basic localizer tests\n" }, { "from": "gpt", "value": "package co.phoenixlab.common.localization;\n\nimport org.junit.*;\n\nimport java.util.HashMap;\nimport java.util.Locale;\nimport java.util.Map;\n\nimport static org.junit.Assert.*;\n\npublic class Locali...
java
chosen
[ { "from": "human", "value": "Add an expression for truncating strings as part of full CAST.\n" }, { "from": "gpt", "value": "/**\n * Copyright (C) 2011 Akiban Technologies Inc.\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero Gener...
java
chosen
[ { "from": "human", "value": "Add tests to collection utils\n" }, { "from": "gpt", "value": "package com.futurice.freesound.utils;\n\nimport org.junit.Test;\n\nimport java.util.Collection;\nimport java.util.Collections;\n\nimport rx.Observable;\n\nimport static org.assertj.core.api.Assertions.ass...
java
chosen
[ { "from": "human", "value": "Add names of init parameters to an interface\n" }, { "from": "gpt", "value": "/*\n * JBoss, Home of Professional Open Source\n * Copyright 2013, Red Hat, Inc., and individual contributors\n * by the @authors tag. See the copyright.txt in the distribution for a\n * fu...
java
chosen
[ { "from": "human", "value": "Create : 35 Search Insert Position\n" }, { "from": "gpt", "value": "public class Solution {\n\n public static int searchInsert(int[] nums, int target) {\n\n int low = 0;\n int high = nums.length;\n\n while (low < high) {\n\n int mid...
java
chosen
[ { "from": "human", "value": "Create Search a 2D Matrix for LintCode\n" }, { "from": "gpt", "value": "public class Solution {\n /**\n * @param matrix, a list of lists of integers\n * @param target, an integer\n * @return a boolean, indicate whether matrix contains target\n */\n...
java
chosen
[ { "from": "human", "value": "Include Docker tests with custom versions\n" }, { "from": "gpt", "value": "/*\n * (C) Copyright 2021 Boni Garcia (http://bonigarcia.github.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complianc...
java
chosen
[ { "from": "system", "value": "Add check for null/empty results in commit selection dialog.\n\nBug: 353151\nChange-Id: Ia3ca7764b4d7dde41da6f9219ff43d322c9f4ab5\nSigned-off-by: Kevin Sawicki <ffb4761cba839470133bee36aeb139f58d7dbaa9@github.com>\n" }, { "from": "human", "value": "/****************...
java
chosen
[ { "from": "human", "value": "Create basic J2CL supersources for GSON.\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=290376531\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 The Closure Compiler Authors.\n *\n * Licensed under the Apache License, Vers...
java
chosen
[ { "from": "human", "value": "Add no leak checked textview\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 Peter Kenji Yamanaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain ...
java
chosen
[ { "from": "human", "value": "Add class for representing a single meat probe reading\n" }, { "from": "gpt", "value": "package uk.ac.abdn.foodsafety.sensordata;\n\nimport java.time.ZonedDateTime;\n\n/**\n * \n * @author nhc\n *\n * Represents one ID'ed and timestamped temperature reading from a me...
java
chosen
[ { "from": "human", "value": "Create utility class that generates IDs.\n\nSee issue: https://www.ebi.ac.uk/panda/jira/browse/GOA-2352\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.annotation;\n\nimport java.util.function.Function;\n\n/**\n * A helper class containing a set of utility...
java
chosen
[ { "from": "human", "value": "Test that the blocking execution handler actually blocks\n" }, { "from": "gpt", "value": "package forklift.concurrent;\n\nimport static org.mockito.Mockito.any;\nimport static org.mockito.Mockito.times;\n\nimport org.junit.After;\nimport org.junit.Assert;\nimport org...
java
chosen
[ { "from": "human", "value": "Add byte array input stream example\n" }, { "from": "gpt", "value": "package learntocode.javaapi.io_and_nio.io;\r\n\r\nimport java.io.ByteArrayInputStream;\r\n\r\npublic class ByteArrayInputStreamsExample {\r\n\r\n public static void main (String[] args) {\r\n\r\n...
java
chosen
[ { "from": "human", "value": "Add servlet to retrieve opportunities given event id.\n" }, { "from": "gpt", "value": "package com.google.sps.servlets;\n\nimport com.google.sps.data.VolunteeringOpportunity;\nimport com.google.sps.utilities.CommonUtils;\nimport com.google.sps.utilities.DatabaseConst...
java
chosen
[ { "from": "human", "value": "Test lazyloading : Add search test\n" }, { "from": "gpt", "value": "package org.matrix.androidsdk.lazyloading;\n\nimport android.support.test.InstrumentationRegistry;\n\nimport junit.framework.Assert;\n\nimport org.junit.BeforeClass;\nimport org.junit.FixMethodOrder;...
java
chosen
[ { "from": "human", "value": "Move error response to scim schema\n\nThe scim schema specification specifies the error response object. It's\nrepresentation should be part of the scim-schema.\n" }, { "from": "gpt", "value": "package org.osiam.resources.scim;\n\nimport com.fasterxml.jackson.databin...
java
chosen
[ { "from": "human", "value": "Add JUnit tests. See ticket:63.\n\nSigned-off-by: Raymond Audet <281aa2b19aab01efe2941a7da076ec0616a9b992@gmail.com>\nSigned-off-by: Etienne M. Gagnon <bf06ec0eb40152cd863534753d026b021022c851@j-meg.com>\n" }, { "from": "gpt", "value": "/* This file is part of SableC...
java
chosen
[ { "from": "human", "value": "Add some more html output and a Query resource\n" }, { "from": "gpt", "value": "package eu.stratuslab.marketplace.server.resources;\n\nimport java.util.logging.Level;\n\nimport org.openrdf.query.QueryLanguage;\nimport org.restlet.data.Form;\nimport org.restlet.data.M...
java
chosen
[ { "from": "human", "value": "Add tests for the EventStore based on GAE Storage.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017, TeamDev Ltd. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyrigh...
java
chosen
[ { "from": "human", "value": "Fix timeout in FontsContract.getFontSync() caused because Context.canLoadUnsafeResources() now returns false since the context isn't a system context.\n\nPiperOrigin-RevId: 229855004\n" }, { "from": "gpt", "value": "package org.robolectric.shadows;\n\nimport static a...
java
chosen
[ { "from": "human", "value": "ROO-1778: Create utility class for displaying text files to console\n" }, { "from": "gpt", "value": "package org.springframework.roo.support.util;\n\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.logging.Level;\nimport java.util.log...
java
chosen
[ { "from": "human", "value": "Add test codes to test readssummary/Interval\n" }, { "from": "gpt", "value": "package jp.ac.utokyo.rcast.karkinos.readssummary;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\nimport static ...
java
chosen
[ { "from": "human", "value": "Add first version of framework's execution\n\nSigned-off-by: vadim8kiselev <fa15545ff1e6dadf68092ba9fdf3e84f23d27fd0@gmail.com>\n" }, { "from": "gpt", "value": "package com.kiselev.dataframework.example.main;\n\nimport com.kiselev.dataframework.core.loader.impl.Confi...
java
chosen
[ { "from": "human", "value": "Add unit test for JHBlurFilter\n" }, { "from": "gpt", "value": "package com.github.sarxos.webcam.util.jh;\n\nimport java.awt.image.BufferedImage;\n\nimport org.assertj.core.api.Assertions;\nimport org.junit.Test;\n\n\npublic class JHBlurFilterTest {\n\n\t@Test\n\tpub...
java
chosen
[ { "from": "human", "value": "Add Test for equals and hashcode method of ValidationMessage class\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright 2015 Alexander Casall, Manuel Mauky\n *\n * Licensed under the Apache Li...
java
chosen
[ { "from": "human", "value": "Add exception class for build process\n" }, { "from": "gpt", "value": "package com.github.blindpirate.gogradle.core.exceptions;\n\nimport java.io.IOException;\nimport java.nio.file.Path;\n\npublic class BuildException extends RuntimeException {\n private BuildExce...
java
chosen
[ { "from": "human", "value": "Add test case for StringCombiner\n" }, { "from": "gpt", "value": "package com.insightfullogic.java8.examples.chapter5;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\npublic class StringCombinerTest {\n private StringCom...
java
chosen
[ { "from": "human", "value": "Add web response with search results\n" }, { "from": "gpt", "value": "package org.stepic.droid.web;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.stepic.droid.model.Meta;\nimport org.stepic.droid.model.SearchResult;\n\nimport java.util.List;\n\n...
java
chosen
[ { "from": "human", "value": "Add a class to make Throwable immutable\n" }, { "from": "gpt", "value": "package net.kencochrane.raven.event.interfaces;\n\nimport java.io.PrintStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\n\n/**\n * Wrapper for {@code Throwable} to make it immutabl...
java
chosen
[ { "from": "human", "value": "Add config util to load json files and create default ones\n" }, { "from": "gpt", "value": "package info.u_team.u_team_core.util;\n\nimport java.io.*;\nimport java.nio.file.*;\nimport java.util.function.Function;\n\nimport com.google.gson.Gson;\nimport com.google.gso...
java
chosen
[ { "from": "human", "value": "Add OSGi test for Guava 21 support\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2012-2015 DataStax Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n ...
java
chosen
[ { "from": "human", "value": "Add this simple internal launcher ot be able to launch ParallelJ Program from Eclipse.\n" }, { "from": "gpt", "value": "package org.parallelj.launching.internal;\n\nimport org.parallelj.Programs;\n\npublic class DefaultLauncher {\n\n\t/**\n\t * @param args\n\t */\n\t...
java
chosen
[ { "from": "human", "value": "Add RavenFactory capable of creating connections to getSentry\n" }, { "from": "gpt", "value": "package net.kencochrane.raven.getsentry;\n\nimport net.kencochrane.raven.DefaultRavenFactory;\nimport net.kencochrane.raven.connection.Connection;\nimport net.kencochrane.r...
java
chosen
[ { "from": "human", "value": "Add skeleton for command help command.\n" }, { "from": "gpt", "value": "package com.maddenabbott.jenny.command.help;\n\nimport com.maddenabbott.jenny.cli.Summary;\nimport com.maddenabbott.jenny.command.Command;\n@Summary(\"Pass the name of a command for help with tha...
java
chosen
[ { "from": "human", "value": "Add test for BEANUTILS-140 - LocaleBeanUtils setProperty does not work on nested property - reposted by Marco La Porta\n\ngit-svn-id: 695e8515a9258845e6163903654874b217615ba0@555476 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed...
java
chosen
[ { "from": "human", "value": "Introduce a generic list loader.\n" }, { "from": "gpt", "value": "\npackage com.battlelancer.seriesguide.loaders;\n\nimport android.content.Context;\nimport android.support.v4.content.AsyncTaskLoader;\n\nimport java.util.List;\n\n/**\n * A generic {@link AsyncTaskLoa...
java
chosen
[ { "from": "system", "value": "Enable right content types (based on file types) in compare editor opened from Synchronization view\n" }, { "from": "human", "value": "/*******************************************************************************\n * Copyright (c) 2005-2008 VecTrace (Zingo Anders...
java
chosen
[ { "from": "human", "value": "Add statement to problem 77\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2014 Pedro Vicente Gómez Sánchez.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ...
java
chosen
[ { "from": "human", "value": "Add basic unit tests for datastore\n" }, { "from": "gpt", "value": "import static com.google.appengine.api.datastore.FetchOptions.Builder.withLimit;\nimport static org.junit.Assert.assertEquals;\nimport com.google.appengine.api.datastore.DatastoreService;\nimport com...
java
chosen
[ { "from": "human", "value": "Add a simple class to contian information pertaining to subscription actions\n" }, { "from": "gpt", "value": "package org.realityforge.replicant.client.transport;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\n\nfinal class AreaOfInterestActi...
java
chosen
[ { "from": "human", "value": "Joseph: Update the obsolete Vison sub system to initialize tensor flow.\n" }, { "from": "gpt", "value": "\npackage gjb.experimental;\n\nimport com.qualcomm.robotcore.eventloop.opmode.Autonomous;\nimport com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;\n\nimport ...
java
chosen
[ { "from": "human", "value": "Create helper class for basic FST operations\n\n" }, { "from": "gpt", "value": "package net.explorviz.landscape.repository.persistence;\n\nimport net.explorviz.landscape.model.application.AggregatedClazzCommunication;\nimport net.explorviz.landscape.model.application...
java
chosen
[ { "from": "human", "value": "Define how to dispatch an object.\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.annotation.download;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\n\n/**\n * Define how to dispatch an object.\n *\n * @author Tony Wardell\n * Date: 27/09/20...
java
chosen
[ { "from": "human", "value": "Create a custom data type and its associated handler for providers - TRUNK-3623\n" }, { "from": "gpt", "value": "/**\n * This Source Code Form is subject to the terms of the Mozilla Public License,\n * v. 2.0. If a copy of the MPL was not distributed with this file, ...
java
chosen
[ { "from": "human", "value": "Add a sample ToolKit file\n" }, { "from": "gpt", "value": "package es.litesolutions.sonar.grappa;\n\nimport com.sonar.sslr.api.Grammar;\nimport com.sonar.sslr.impl.Parser;\nimport org.sonar.colorizer.Tokenizer;\nimport org.sonar.sslr.toolkit.AbstractConfigurationMode...
java
chosen
[ { "from": "human", "value": "Create find document menu item.\n" }, { "from": "gpt", "value": "package com.github.aureliano.edocs.app.gui.menu;\n\nimport javax.swing.JMenuItem;\n\npublic class FindDocumentMenuItem extends JMenuItem {\n\n\tprivate static final long serialVersionUID = -204807152346...
java
chosen
[ { "from": "human", "value": "[ONOS-3251] Add the junit test code of SecurityGroup\n\nChange-Id: If436b5e5e7acaed422794bf53a3b2e1d9da18695\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Open Networking Laboratory\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n ...
java
chosen
[ { "from": "human", "value": "Add REST API for listing tasks\n" }, { "from": "gpt", "value": "package de.unistuttgart.iste.rss.bugminer.api;\n\nimport de.unistuttgart.iste.rss.bugminer.api.exceptions.NotFoundException;\nimport de.unistuttgart.iste.rss.bugminer.model.entities.Bug;\nimport de.unist...
java
chosen
[ { "from": "human", "value": "Add tests for parsing BlockState matchers" }, { "from": "gpt", "value": "package org.monospark.spongematchers.type;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.mockito.Mockito.mock;\nimport static org....
java
chosen
[ { "from": "human", "value": "Add a test case for Closer in Java8.\n" }, { "from": "gpt", "value": "package study.hard.javalib.nativelib;\n\npublic class CloserTest {\n\n\tpublic static void main(String[] args) {\n int counter = 0;\n// counter++; // compile error!\n Thread th...
java
chosen
[ { "from": "human", "value": "[Java] Add default implementation for status receiver\n\nChange-Id: I87e839dfb8ebcb30518ecc4c065b2600101e021b\n" }, { "from": "gpt", "value": "/*\n * #%L\n * %%\n * Copyright (C) 2018 BMW Car IT GmbH\n * %%\n * Licensed under the Apache License, Version 2.0 (the \"Li...
java
chosen
[ { "from": "human", "value": "Build simple test cases to test the app and UI components.\n" }, { "from": "gpt", "value": "package me.christine.housewifesolution;\n\nimport android.test.ActivityInstrumentationTestCase2;\nimport android.test.TouchUtils;\nimport android.test.ViewAsserts;\nimport and...
java
chosen
[ { "from": "human", "value": "Add MySQL automatic Join pushdown test\n" }, { "from": "gpt", "value": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * ...
java
chosen
[ { "from": "human", "value": "Add button click behaviour for webmaster link\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Ryan Gilera.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ma...
java
chosen
[ { "from": "human", "value": "Define constants for the data layer.\n" }, { "from": "gpt", "value": "package nl.tehdreamteam.se42.data;\n\n/**\n * Defines certain constants for the data layer.\n *\n * @author Lesley\n */\npublic final class DataConstants {\n\n /**\n * The persistency-unit n...
java
chosen
[ { "from": "human", "value": "Add initial CLI config. class\n" }, { "from": "gpt", "value": "package ahlers.phantom.embedded;\n\nimport de.flapdoodle.embed.process.config.ExecutableProcessConfig;\nimport de.flapdoodle.embed.process.config.ISupportConfig;\nimport de.flapdoodle.embed.process.distri...
java
chosen
[ { "from": "human", "value": "Add JUnit test which checks that OTObjectInternal gracefully handles the case where another thread removes a listener during a change event.\n\ngit-svn-id: 8ebed0c25533aaea68ca43268d4d516467f97e6a@20852 6e01202a-0783-4428-890a-84243c50cc2b\n" }, { "from": "gpt", "val...
java
chosen
[ { "from": "human", "value": "Add unit test for RD A5-02-05\n" }, { "from": "gpt", "value": "/**\n * \n */\npackage eu.aleon.aleoncean.device.remote;\n\nimport eu.aleon.aleoncean.packet.radio.userdata.UserDataScaleValueException;\nimport eu.aleon.aleoncean.packet.radio.RadioPacket4BS;\nimport eu....
java
chosen
[ { "from": "human", "value": "Test cases for lTrim and lTrimKeepTabs\n\n\nFormer-commit-id: d300819cf24d945698e6fbb491ada29f46409f62\n" }, { "from": "gpt", "value": "/*\r\n Copyright 2006 Paul Zepernick\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); \r\n you may not use...
java
chosen
[ { "from": "human", "value": "Add sync entry to region_sunc table on region api failure\n" }, { "from": "gpt", "value": "// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional inf...
java
chosen
[ { "from": "human", "value": "Add a simple saga ident strat by event id" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2013 Red Rainbow IT Solutions GmbH, Germany\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated document...
java
chosen
[ { "from": "human", "value": "Add the basic strategy interface\n" }, { "from": "gpt", "value": "package io.github.ddebree.game.ai.core.strategy;\n\nimport javax.annotation.Nonnull;\nimport java.util.stream.Stream;\n\n/**\n * A basic representation of a player's strategy.\n *\n * At a given state,...
java
chosen
[ { "from": "human", "value": "Add an enum which stores static data about ANT sensors.\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the Licens...
java
chosen
[ { "from": "human", "value": "Add migration to register camera-controls-3d bundle\n" }, { "from": "gpt", "value": "package flyway.oskari;\n\nimport java.sql.Connection;\n\nimport org.flywaydb.core.api.migration.jdbc.JdbcMigration;\n\nimport fi.nls.oskari.db.BundleHelper;\nimport fi.nls.oskari.dom...
java
chosen
[ { "from": "human", "value": "Add java solution for 107. Binary Tree Level Order Traversal II\n\n107. Binary Tree Level Order Traversal II: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/" }, { "from": "gpt", "value": "package leetcode.binary_tree_level_order_traversal_ii;\n\n...
java
chosen
[ { "from": "human", "value": "Add a skeletal Sponge plugin class\n" }, { "from": "gpt", "value": "package io.github.satoshinm.WebSandboxMC.sponge;\n\nimport com.google.inject.Inject;\nimport org.slf4j.Logger;\nimport org.spongepowered.api.event.Listener;\nimport org.spongepowered.api.event.game.s...
java
chosen
[ { "from": "human", "value": "Add a base conversion client class\n" }, { "from": "gpt", "value": "/*\n * The MIT License\n *\n * Copyright 2015 Ryan Gilera.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files...
java
chosen
[ { "from": "human", "value": "Add a failing test for JsonParser.compile() and Very Deeply Nested expressions\n" }, { "from": "gpt", "value": "package com.fasterxml.jackson.failing;\n\nimport com.fasterxml.jackson.core.BaseTest;\nimport com.fasterxml.jackson.core.JsonPointer;\n\n// For https://bug...
java
chosen
[ { "from": "human", "value": "Implement unit test for CommentCountResource\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the L...
java
chosen
[ { "from": "human", "value": "Implement MutlicastException, which handle the exception related to networking\n" }, { "from": "gpt", "value": "package jp.naist.inet_lab.android.ipv6multicast;\n\n/**\n * Throw if something issue related to networking is occurred.\n * \n * @author yohei-ka\n * \n */...
java
chosen
[ { "from": "human", "value": "Add HTTP client response handler.\n" }, { "from": "gpt", "value": "package com.blankstyle.vertx.php.http;\n\nimport org.vertx.java.core.buffer.Buffer;\n\nimport com.blankstyle.vertx.php.Handler;\nimport com.blankstyle.vertx.php.streams.ExceptionSupport;\nimport com.b...
java
chosen
[ { "from": "human", "value": "Add a config class to avoid a warning for -Dquarkus.args=...\n" }, { "from": "gpt", "value": "package io.quarkus.runtime;\n\nimport java.util.Optional;\n\nimport io.quarkus.runtime.annotations.ConfigItem;\nimport io.quarkus.runtime.annotations.ConfigPhase;\nimport io...
java
chosen
[ { "from": "human", "value": "Test to get all p-values from a line" }, { "from": "gpt", "value": "package uk.ac.ebi.phenotype.dao;\n\nimport java.util.List;\nimport java.util.Map;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.springframework.beans.factory.annotation.Auto...
java
chosen
[ { "from": "human", "value": "Configure Environment Variables for database and host \n\nAllow to adjust environment variables for \n\n--> database.[type|url|user|password] \n--> kiwi.[path|context|host]\n\nall variables must be present to be set. when successful, \n\n--> kiwi.setup.database\n--> kiwi.setup.h...
java
chosen
[ { "from": "human", "value": "Add a test for CreateFluidSourceEvent\n" }, { "from": "gpt", "value": "package net.minecraftforge.test;\n\nimport net.minecraft.init.Blocks;\nimport net.minecraftforge.common.MinecraftForge;\nimport net.minecraftforge.event.world.BlockEvent.CreateFluidSourceEvent;\ni...
java
chosen
[ { "from": "human", "value": "Add the java file that calculates the UPI that is executed in the Oracle database\n" }, { "from": "gpt", "value": "public class Upi {\n\n\tpublic static String getUpi( long id ) {\n\t\tString str = Long.toHexString( id ).toUpperCase();\n\t\treturn \"URS0000000000\".s...
java
chosen
[ { "from": "human", "value": "Fix - updated Croatian translation\n\nAdded test for updated Croatian translation.\nCroatian durations have more complex rules for plurals, depending on\nquantity (2, 3 and 4 usualy use different plural word than other\nplurals - example for minutes - 1 minuta, 2 minute, 5 minut...
java
chosen
[ { "from": "human", "value": "Add callback funnel handler (like `InvocationHandler` from `java.lang.reflect`)\n" }, { "from": "gpt", "value": "\npackage eu.mosaic_cloud.tools.callbacks.core;\n\n\nimport java.lang.reflect.Method;\n\n\npublic interface CallbackFunnelHandler\n\t\textends\n\t\t\tCall...
java
chosen
[ { "from": "human", "value": "Add a new database oriented logger\n\nAdd a new logger in which we store log lines in an SQLite database.\nThis ensures thread safety, although we need to export the data to a file or to\na server to view it, since we cannot store the database on the external drive.\n" }, { ...
java
chosen
[ { "from": "human", "value": "Add SpyEventHandler useful during tests\n" }, { "from": "gpt", "value": "package org.realityforge.arez;\n\nimport java.util.ArrayList;\nimport javax.annotation.Nonnull;\nimport static org.testng.Assert.*;\n\nfinal class TestSpyEventHandler\n implements SpyEventHandl...
java
chosen
[ { "from": "human", "value": "Add random test to try out drone\n" }, { "from": "gpt", "value": "package lt.dariusl.rxfirebaseandroid;\n\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\npublic class TestTest {\n @Test\n public void testTest() throws Exception {\n Assert.assertTr...
java
chosen
[ { "from": "human", "value": "Add a test class for RollupEvent.\n" }, { "from": "gpt", "value": "package com.rackspacecloud.blueflood.eventemitter;\n\nimport com.rackspacecloud.blueflood.types.Locator;\nimport com.rackspacecloud.blueflood.types.Points;\nimport com.rackspacecloud.blueflood.types.R...
java
chosen
[ { "from": "human", "value": "Add exception class for oauth processing" }, { "from": "gpt", "value": "package org.thinkinghub.gateway.oauth.exception;\n\npublic class OAuthProcessingException extends GatewayException {\n\n\tprivate static final long serialVersionUID = -253028809896546433L;\n\n\tp...
java
chosen
[ { "from": "human", "value": "Add HTTP test for git resource\n" }, { "from": "gpt", "value": "/*\n * Copyright 2013 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Eclipse Public License version 1.0, available at http://www.eclipse.org/legal/epl-v10.html\n */\npackage io.liveoak.g...
java
chosen
[ { "from": "human", "value": "Add test for StaxValueLoader of strings.\n" }, { "from": "gpt", "value": "package org.robolectric.res;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport javax.xml.stream.XMLInputFactory;\nimport javax.xml.stream.XMLStreamException;\nimport javax.xml.strea...
java
chosen
[ { "from": "human", "value": "Add unit test for UserPrincipalLookupService" }, { "from": "gpt", "value": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n ...
java
chosen
[ { "from": "human", "value": "Add mock log implementation for unit tests" }, { "from": "gpt", "value": "\npackage org.jenkinsci.plugins.relution_publisher.unittest.mocks;\n\nimport org.jenkinsci.plugins.relution_publisher.logging.Log;\n\nimport java.io.PrintWriter;\nimport java.io.StringWriter;\n...
java
chosen
[ { "from": "human", "value": "Add integration test to verify that invariant is correctly generated\n" }, { "from": "gpt", "value": "package arez.integration;\n\nimport arez.ArezContext;\nimport arez.annotations.ArezComponent;\nimport arez.annotations.ContextRef;\nimport org.testng.annotations.Tes...
java
chosen
[ { "from": "human", "value": "Add integration test for tracking observer\n" }, { "from": "gpt", "value": "package arez.integration.observe;\n\nimport arez.Arez;\nimport arez.ArezContext;\nimport arez.Environment;\nimport arez.Function;\nimport arez.SafeFunction;\nimport arez.annotations.ArezCompo...
java
chosen
[ { "from": "human", "value": "Add standalone test for ToBooleanBiFunction.\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information ...
java
chosen
[ { "from": "human", "value": "Add Agent Demo for java wrapper.\n\nSigned-off-by: Sergey Minaev <322af3f2df10918c6ef5280f56be0b711278b1ae@dsr-company.com>\n" }, { "from": "gpt", "value": "package org.hyperledger.indy.sdk.demo;\n\nimport org.hyperledger.indy.sdk.IndyIntegrationTest;\nimport org.hyp...
java
chosen
[ { "from": "system", "value": "TODO: REMOVE THIS COMMAND\n for now it just calls DeleteDatasetVersion" }, { "from": "human", "value": "package edu.harvard.iq.dataverse.engine.command.impl;\n\nimport edu.harvard.iq.dataverse.Dataset;\nimport edu.harvard.iq.dataverse.authorization.Permission;\nimpo...
java
chosen
[ { "from": "human", "value": "Add a benchmark for ImmutableStringIntMap.get().\n" }, { "from": "gpt", "value": "// Copyright 2013 Daniel de Kok\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You ma...
java
chosen