conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Return NONE connection type for null.\n" }, { "from": "human", "value": "package com.intellij.remote;\n\nimport com.intellij.openapi.diagnostic.Logger;\n\n/**\n * This class denotes the type of the source to obtain remote credentials. \n * \n * @author traff\n */\np...
java
chosen
[ { "from": "human", "value": "Add tests regarding module system setup at test runtime\n" }, { "from": "gpt", "value": "/*\n * Bach - Java Shell Builder\n * Copyright (C) 2019 Christian Stein\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file ex...
java
chosen
[ { "from": "human", "value": "Add new rest manager, for download files using rest." }, { "from": "gpt", "value": "package br.com.softctrl.http.rest;\n\nimport java.io.InputStream;\n\nimport br.com.softctrl.http.rest.listener.RequestFinishedListener;\nimport br.com.softctrl.http.rest.listener.Resp...
java
chosen
[ { "from": "human", "value": "Add circle transformation for Picasso\n" }, { "from": "gpt", "value": "package io.github.froger.instamaterial;\n\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapShader;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.g...
java
chosen
[ { "from": "human", "value": "Test of Wells Fargo, suitable for SSL testing\n\nr4073\n" }, { "from": "gpt", "value": "package com.thoughtworks.selenium;\n\nimport junit.framework.*;\n\nimport org.openqa.selenium.server.*;\n\npublic class SSLWellsFargoTest extends TestCase {\n private Selenium ...
java
chosen
[ { "from": "system", "value": "Improve DropWizard test to use JSON generation similar to Servlet test -- more efficient that way\n" }, { "from": "human", "value": "\npackage com.example.helloworld.resources;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport javax.ws.rs.GET;\nimport ja...
java
chosen
[ { "from": "system", "value": "Update regex to cope with the request paths used in portlets" }, { "from": "human", "value": "/*\n@VaadinApache2LicenseForJavaFiles@\n */\n\npackage com.vaadin.terminal.gwt.server;\n\nimport java.io.IOException;\nimport java.util.regex.Matcher;\nimport java.util.reg...
java
chosen
[ { "from": "human", "value": "Add solution to day 19\n" }, { "from": "gpt", "value": "// From https://www.hackerrank.com/challenges/30-interfaces\n\n// Write the Calculator class, which implements the AdvancedArithmetic\n// interface. The implementation for the divisorSum method must be public\n/...
java
chosen
[ { "from": "human", "value": "Check that member_production_counts table is fully populated\n" }, { "from": "gpt", "value": "package org.ensembl.healthcheck.testcase.eg_compara;\n\nimport org.ensembl.healthcheck.DatabaseRegistryEntry;\nimport org.ensembl.healthcheck.DatabaseType;\nimport org.ensem...
java
chosen
[ { "from": "human", "value": "Write unit tests for StringToPatternFunction\n" }, { "from": "gpt", "value": "package io.knotx.http;\n\nimport org.junit.BeforeClass;\nimport org.junit.Test;\n\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\nimport static org.junit.Assert.*;\n\np...
java
chosen
[ { "from": "human", "value": "Add some tests around isTransitionState\n" }, { "from": "gpt", "value": "package replicant;\n\nimport org.testng.annotations.Test;\nimport static org.testng.Assert.*;\n\npublic class ConnectorStateTest\n extends AbstractReplicantTest\n{\n @Test\n public void isTra...
java
chosen
[ { "from": "human", "value": "Add executeChain endpoint, which will be used to extract the audio, do speech-to-text and return text text output. Once Elasticsearch is in place, it will also search for keywaord.\n" }, { "from": "gpt", "value": "package nl.ekholabs.nlp.controller;\n\nimport java.io...
java
chosen
[ { "from": "human", "value": "Test case to trigger build.\n\n\ngit-svn-id: 931ef96727c1945c41eec76d1319aea4c3c125f4@11199 6cd15df7-5b2d-4548-a7df-5dcce267a22b\n" }, { "from": "gpt", "value": "package org.tensorics;\n\n/**\n * Created by kkrol on 29/10/2015.\n */\npublic class KamilTest {\n\n p...
java
chosen
[ { "from": "human", "value": "Create interface for the registry of all comannds of a bot\n" }, { "from": "gpt", "value": "package org.telegram.telegrambots.api.commands;\n\nimport java.util.Map;\n\n/**\n *\n */\npublic interface ICommandRegistery {\n\n /**\n * register a command\n *\n ...
java
chosen
[ { "from": "human", "value": "Test case for the PropertiesTokenizer inner class\n\n\ngit-svn-id: e880b733a23c90f0f9baec999c734722e861dc13@141849 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Copyright 2001-2004 The Apache Software Foundation.\n *\n * Licensed under ...
java
chosen
[ { "from": "human", "value": "Add some constants for SRTP" }, { "from": "gpt", "value": "package org.bouncycastle.crypto.tls;\r\n\r\npublic class SRTPProtectionProfile {\r\n /*\r\n * RFC 5764 4.1.2.\r\n */\r\n public static final int SRTP_AES128_CM_HMAC_SHA1_80 = 0x0001;\r\n publ...
java
chosen
[ { "from": "human", "value": "Determine whether a toolbar is in a pane with a north toolbar that is not itself." }, { "from": "gpt", "value": "/*\n * Copyright (c) 2009 Kathryn Huxtable and Kenneth Orr.\n *\n * This file is part of the SeaGlass Pluggable Look and Feel.\n *\n * Licensed under the ...
java
chosen
[ { "from": "human", "value": "Test case for incorrectly transported exceptions" }, { "from": "gpt", "value": "package com.payu.ratel.tests;\n\nimport static com.jayway.awaitility.Awaitility.await;\nimport static com.payu.ratel.config.beans.RegistryBeanProviderFactory.SERVICE_DISCOVERY_ADDRESS;\ni...
java
chosen
[ { "from": "human", "value": "Add observable color matrix work with image view\n" }, { "from": "gpt", "value": "package com.sinyuk.yuk.utils.glide;\n\nimport android.graphics.ColorMatrix;\nimport android.util.Property;\n\nimport com.sinyuk.yuk.utils.AnimUtils;\n\n\n/**\n * An extension to {@link ...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 41\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": "Test for \"window modifed\" state." }, { "from": "gpt", "value": "/*\n * Copyright (c) 2009 Kathryn Huxtable and Kenneth Orr.\n *\n * This file is part of the SeaGlass Pluggable Look and Feel.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\...
java
chosen
[ { "from": "human", "value": "Add a base action for \"projectile\" type actions. (Used for ThrowBlock, Firework, etc.. not actually for Projectile or CustomProjectile yet)\n" }, { "from": "gpt", "value": "package com.elmakers.mine.bukkit.action;\n\nimport com.elmakers.mine.bukkit.api.action.CastC...
java
chosen
[ { "from": "human", "value": "Create controller for person look up (for type ahead)" }, { "from": "gpt", "value": "/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\npackage uk.org.rbc1b.roms.controller.person;\n\nimport java.util.List;\nimport...
java
chosen
[ { "from": "human", "value": "Add mapper to convert CSVRecords to Tuples\n" }, { "from": "gpt", "value": "package de.bigprak.transform.csv;\n\nimport java.lang.reflect.Constructor;\n\nimport org.apache.commons.csv.CSVRecord;\nimport org.apache.flink.api.common.functions.MapFunction;\nimport org.a...
java
chosen
[ { "from": "human", "value": "Add DTO for two factor authentication when grading\n\n" }, { "from": "gpt", "value": "package at.ac.tuwien.inso.controller.lecturer;\n\nimport at.ac.tuwien.inso.entity.Grade;\n\npublic class GradeAuthorizationDTO {\n //TODO: MOVE TO DTOs\n\n private Grade grade...
java
chosen
[ { "from": "human", "value": "Add an integration test for debugging lights\n" }, { "from": "gpt", "value": "package com.easternedgerobotics.rov.integration;\n\nimport com.easternedgerobotics.rov.event.BroadcastEventPublisher;\nimport com.easternedgerobotics.rov.event.EventPublisher;\nimport com.e...
java
chosen
[ { "from": "human", "value": "Work done in < 45minutes.\n" }, { "from": "gpt", "value": "package com.artbeatte.exercises.strings;\n\n/**\n * @author art.beatte\n * @version 3/16/16\n */\npublic class SubStringReplace {\n\n /* non-instantiable class */\n private SubStringReplace() { }\n\n ...
java
chosen
[ { "from": "system", "value": "Fix corner case for javadoc redirector\n" }, { "from": "human", "value": "/*\n * Copyright 2014 ZXing 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 License.\n * You may o...
java
chosen
[ { "from": "human", "value": "Add unit tests for DSN creation\n" }, { "from": "gpt", "value": "package net.kencochrane.raven;\n\nimport net.kencochrane.raven.exception.InvalidDsnException;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.asse...
java
chosen
[ { "from": "human", "value": "Define test code for PointDistance\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2018 Barry DeZonia\n * \n * Redistribution and use in source and binary forms, with or without\n ...
java
chosen
[ { "from": "human", "value": "Add a single channel throughput test\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016-2022 chronicle.software\n *\n * https://chronicle.software\n *\n * Licensed under Contract only\n */\n\npackage net.openhft.chronicle.wire.channel;\n\nimport net.openhft...
java
chosen
[ { "from": "human", "value": "Test an EventBus using Java adapters\n" }, { "from": "gpt", "value": "package com.github.blackrush.acara;\n\nimport org.fungsi.Unit;\nimport org.fungsi.concurrent.Future;\nimport org.fungsi.concurrent.Futures;\nimport org.fungsi.concurrent.Worker;\nimport org.fungsi....
java
chosen
[ { "from": "human", "value": "Add the JUnit test for the ShingleLinkedList\n" }, { "from": "gpt", "value": "package com.test.linkedlist;\n\nimport com.linkedlist.LinkedList;\nimport com.linkedlist.ShingleLinkedList;\n\nimport junit.framework.TestCase;\n\npublic class TestShingleLinkedList extends...
java
chosen
[ { "from": "human", "value": "Drop in the message parser.\n" }, { "from": "gpt", "value": "package com.miguelgaeta.message_parser;\n\nimport java.io.IOException;\nimport java.util.List;\n\n/**\n * Created by Miguel Gaeta on 1/19/16.\n */\n@SuppressWarnings(\"UnusedDeclaration\")\npublic interface...
java
chosen
[ { "from": "system", "value": "Make it clear when a cookie is not found" }, { "from": "human", "value": "package org.jscookie.test.integration.encoding;\n\nimport java.io.IOException;\n\nimport javax.servlet.ServletException;\nimport javax.servlet.annotation.WebServlet;\nimport javax.servlet.http...
java
chosen
[ { "from": "human", "value": "Add new page search test.\n" }, { "from": "gpt", "value": "package pt.fccn.mobile.arquivo.tests.pagesearch;\n\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\nimport org.openqa.selenium.By;\n\nimport pt.fccn.arquivo.selenium.Retry;\nimport pt.fc...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 38\n" }, { "from": "gpt", "value": "package com.github.pedrovgs.problem38;\n\nimport com.github.pedrovgs.binarytree.BinaryNode;\nimport java.util.List;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.asser...
java
chosen
[ { "from": "human", "value": "Include assumption example in junit-conditional-tests project\n" }, { "from": "gpt", "value": "/*\n * (C) Copyright 2017 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...
java
chosen
[ { "from": "human", "value": "Add end-to-end test for HTTP client" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2016 EMC Corporation. All Rights Reserved.\n */\npackage com.emc.ia.sdk.support.http;\n\nimport static org.junit.Assert.assertEquals;\n\nimport java.io.IOException;\nimport java.i...
java
chosen
[ { "from": "human", "value": "Add NthToLastNode problem from chapter 2\n" }, { "from": "gpt", "value": "package com.ttaylorr.ctci.answers.linked_lists;\n\nimport com.ttaylorr.ctci.answers.linked_lists.util.LinkedList;\nimport com.ttaylorr.ctci.meta.Solution;\n\n@Solution(chapter = 2, problem = 3)...
java
chosen
[ { "from": "human", "value": "Add new class to hold promotion information\n" }, { "from": "gpt", "value": "/*\n * This file is released under terms of BSD license\n * See LICENSE file for more information\n */\n\npackage cx2x.translator.transformation.claw.parallelize;\n\n/**\n * Hold various inf...
java
chosen
[ { "from": "human", "value": "Enable cross origin requests to the API\n" }, { "from": "gpt", "value": "package com.lyubenblagoev.postfixrest.configuration;\n\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframew...
java
chosen
[ { "from": "human", "value": "Add unit test for that.\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 General Public License, version 3,\n * as pu...
java
chosen
[ { "from": "human", "value": "Add \"bump\" commands for fine position adjustment." }, { "from": "gpt", "value": "/*\r\n * To change this license header, choose License Headers in Project Properties.\r\n * To change this template file, choose Tools | Templates\r\n * and open the template in the ed...
java
chosen
[ { "from": "human", "value": "Camel-AWS: Create single Karaf feature tests for single components, aws-mq test\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 * t...
java
chosen
[ { "from": "human", "value": "Add tests for CoTermConfig setup.\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.index.annotation.coterms;\n\nimport org.junit.Test;\n\n/**\n * @author Tony Wardell\n * Date: 07/02/2017\n * Time: 11:00\n * Created with IntelliJ IDEA.\n */\npublic class Co...
java
chosen
[ { "from": "human", "value": "Add JUnit test for Method class in rest modeling module.\n" }, { "from": "gpt", "value": "package org.slc.sli.modeling.rest;\n\nimport static org.junit.Assert.*;\n\nimport java.util.ArrayList;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\n/**\n * JUnit test ...
java
chosen
[ { "from": "human", "value": "Add more Maven Mojo tests\n" }, { "from": "gpt", "value": "package com.github.zaplatynski.firstspirit.modules.fsm;\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.project.MavenProject;\nimpo...
java
chosen
[ { "from": "human", "value": "Add new parameter overload annotation for storing the valid patterns of a Siddhi Extension\n" }, { "from": "gpt", "value": "package io.siddhi.annotation;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotat...
java
chosen
[ { "from": "human", "value": "Create model class for storing upload progress info\n" }, { "from": "gpt", "value": "package com.google.android.gnd.persistence.remote;\n\npublic class UploadProgress {\n\n private final UploadState state;\n private final int total;\n private final int progress;\n...
java
chosen
[ { "from": "human", "value": "Print coverage per reference base for each sample in a merged BAM file.\nThis is a good example for how to untangle a merged BAM file.\n\n\ngit-svn-id: 4561c0a8f080806b19201efb9525134c00b76d40@269 348d0f76-0448-11de-a6fe-93d51630548a\n" }, { "from": "gpt", "value": ...
java
chosen
[ { "from": "human", "value": "Add managed client which closes underlying resources at shutdown.\n" }, { "from": "gpt", "value": "package com.hubspot.singularity;\n\nimport java.io.IOException;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport com.google.inject.Inject;\n\nimpo...
java
chosen
[ { "from": "human", "value": "Move non-shared tests out of pure java\n\nChange-Id: I34830f0fb54321f8fa72a752325edbbbcb607eb2\n" }, { "from": "gpt", "value": "//\n// Copyright (c) 2019 Couchbase, Inc All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n//...
java
chosen
[ { "from": "human", "value": "Add test for Creator class\n" }, { "from": "gpt", "value": "package io.github.omskscream.ioc;\n\nimport org.junit.Test;\n\nimport java.lang.reflect.Constructor;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n * @author omskscream\n */\npublic class CreatorTe...
java
chosen
[ { "from": "human", "value": "Add test for new clear image method.\n\ngit-svn-id: 9c6ef37dfd7eaa5a3748af7ba0f8d9e7b67c2a4c@4000 1312f61e-266d-0410-97fa-c3b71232c9ac\n" }, { "from": "gpt", "value": "package org.jdesktop.swingx.graphics;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static...
java
chosen
[ { "from": "human", "value": "Camel-AWS: Create single Karaf feature tests for single components, aws-lambda test\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...
java
chosen
[ { "from": "human", "value": "Add a base fragment with ActionBar\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 o...
java
chosen
[ { "from": "human", "value": "Align the shooter horizontally with vision data.\n" }, { "from": "gpt", "value": "package org.robockets.stronghold.robot.highgoalshooter;\n\nimport org.robockets.stronghold.robot.Robot;\n\nimport edu.wpi.first.wpilibj.command.Command;\nimport edu.wpi.first.wpilibj.ne...
java
chosen
[ { "from": "human", "value": "Introduce a second model which utilizes simple thread stealing\n" }, { "from": "gpt", "value": "package mandelbrot.core;\n\nimport javax.swing.*;\nimport java.awt.*;\nimport java.awt.event.ActionEvent;\nimport java.awt.event.ActionListener;\nimport java.awt.geom.Poin...
java
chosen
[ { "from": "human", "value": "Add caller info test to log4j-slf4j-impl.\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 rega...
java
chosen
[ { "from": "human", "value": "Move session class to impl package\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 * h...
java
chosen
[ { "from": "human", "value": "[PLAT-3584] Increase test coverage of package\n" }, { "from": "gpt", "value": "/**\n * Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies\n * \n * Please see distribution for license.\n */\npackage com.opengamma.engine.exec;\n\nimport...
java
chosen
[ { "from": "human", "value": "Add utility method for filtering a property database\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@7625 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package edu.umd.cs.findbugs.tools;\nimport java.io.BufferedReader;\nimport java.io....
java
chosen
[ { "from": "human", "value": "Add some acceptance tests to check default values for LynxActivity when it's created without any special configuration.\n" }, { "from": "gpt", "value": "package com.github.pedrovgs.sample;\n\nimport android.test.ActivityInstrumentationTestCase2;\nimport com.github.pe...
java
chosen
[ { "from": "human", "value": "Add the shows/recommendation request (DELETE)\n" }, { "from": "gpt", "value": "package com.alexrnl.jbetaseries.request.shows;\n\nimport com.alexrnl.jbetaseries.request.APIAddresses;\nimport com.alexrnl.jbetaseries.request.Request;\nimport com.alexrnl.jbetaseries.requ...
java
chosen
[ { "from": "human", "value": "Add java solution for 209. Minimum Size Subarray Sum\n\n209. Minimum Size Subarray Sum: https://leetcode.com/problems/minimum-size-subarray-sum/" }, { "from": "gpt", "value": "package leetcode.minimum_size_subarray_sum;\n\npublic class Solution {\n public int minS...
java
chosen
[ { "from": "human", "value": "Create tests verifying appropriate propagation of InterruptedException during filesystem operations.\n\nRELNOTES: None.\nPiperOrigin-RevId: 197740585\n" }, { "from": "gpt", "value": "// Copyright 2018 The Bazel Authors. All rights reserved.\n//\n// Licensed under the...
java
chosen
[ { "from": "human", "value": "Add Fourth Exercise Right Triangle\n" }, { "from": "gpt", "value": "import java.util.Scanner;\n\n/**\n * Created by Nathan_Zeplowitz on 4/11/15.\n */\npublic class RightTriangle {\n public static void main(String[] args) {\n Scanner in = new Scanner(System....
java
chosen
[ { "from": "human", "value": "Add test using different @Options (for Chrome and Firefox) in the same class\n" }, { "from": "gpt", "value": "/*\n * (C) Copyright 2019 Boni Garcia (http://bonigarcia.github.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no...
java
chosen
[ { "from": "human", "value": "Simplify XML handling by using DOM instead of Pull API.\n" }, { "from": "gpt", "value": "package experimentalcode.erich;\n\nimport java.util.Iterator;\n\nimport org.w3c.dom.Node;\n\n/**\n * Simple adapter class to iterate over a DOM tree nodes children.\n * \n * @aut...
java
chosen
[ { "from": "human", "value": "Add edit text with custom font\n" }, { "from": "gpt", "value": "package com.stephenvinouze.linkifiedtextview;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Typeface;\nimport android.support.v7.widget.AppCompatEdit...
java
chosen
[ { "from": "human", "value": "Add a simple test invoked by \"testng.xml\".\n" }, { "from": "gpt", "value": "package de.lemona.android.testng.others;\n\nimport org.testng.annotations.Test;\n\npublic class TestFromXMLFile {\n\n @Test\n public void testFromXMLFile() {\n // Nothing to do...
java
chosen
[ { "from": "human", "value": "Add debug not-unit test for H2\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 * h...
java
chosen
[ { "from": "human", "value": "Solve No.2920 from Baekjoon Online Judge\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 haeun kim\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": "Solve No.5622 from Baekjoon Online Judge\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 haeun kim\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": "Define a simple test of BigList\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2019 Barry DeZonia\n * \n * Redistribution and use in source and binary forms, with or without\n * m...
java
chosen
[ { "from": "human", "value": "Add service for batch xml processing" }, { "from": "gpt", "value": "/*\r\n * Copyright (c) 2014 Sacred Scripture Foundation.\r\n * \"All scripture is given by inspiration of God, and is profitable for\r\n * doctrine, for reproof, for correction, for instruction in ri...
java
chosen
[ { "from": "human", "value": "Add distributed multiset service backup/restore test.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017-present Open Networking Foundation\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": "human", "value": "Add test for alwaysCleanAfter and alwaysCleanBefore\n" }, { "from": "gpt", "value": "package com.github.database.rider.core;\n\nimport com.github.database.rider.core.api.configuration.DBUnit;\nimport com.github.database.rider.core.api.dataset.DataSet;\nimport com.git...
java
chosen
[ { "from": "human", "value": "Allow to inject AbstractCryptoProvider into services" }, { "from": "gpt", "value": "package org.gluu.oxauth.service;\n\nimport javax.enterprise.context.ApplicationScoped;\nimport javax.enterprise.inject.Produces;\nimport javax.inject.Inject;\nimport javax.inject.Name...
java
chosen
[ { "from": "human", "value": "Add a dummy class to presto-thrift-spec\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 listener interface for publication events.\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (C) 2017 Push Technology Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"...
java
chosen
[ { "from": "human", "value": "Add rule for temporarily setting a system property\n" }, { "from": "gpt", "value": "/*\n * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n * (the \"License\"). You may not use this work except in compliance with the License, whi...
java
chosen
[ { "from": "human", "value": "Add a new byte writer class for class and object table implementations\n" }, { "from": "gpt", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2012, Red Hat, Inc., and individual contributors\n * as indicated by the @author tags. See the copyri...
java
chosen
[ { "from": "human", "value": "Create : 53 Maximum Subarray\n" }, { "from": "gpt", "value": "public class Solution {\n\n public int maxSubArray(int[] nums) {\n\n int sum = 0;\n int max = Integer.MIN_VALUE;\n\n for (int i = 0; i < nums.length; i++) {\n\n sum += nu...
java
chosen
[ { "from": "human", "value": "Add failing test for Multipart bug\n" }, { "from": "gpt", "value": "package io.quarkus.undertow.test;\n\nimport static io.restassured.RestAssured.given;\nimport static org.hamcrest.Matchers.is;\n\nimport java.io.IOException;\nimport java.io.PrintWriter;\n\nimport jav...
java
chosen
[ { "from": "human", "value": "Add I18NGeneratorException unit tests class\n" }, { "from": "gpt", "value": "package com.github.ggiamarchi.i18n.test;\r\n\r\nimport static org.junit.Assert.*;\r\nimport org.junit.Test;\r\n\r\nimport com.github.ggiamarchi.i18n.I18NGeneratorException;\r\n\r\npublic cla...
java
chosen
[ { "from": "human", "value": "Create an overlay for mode info objects" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (c) 2014 Codenvy, S.A.\n * All rights reserved. This program and the accompanying materials\n * are m...
java
chosen
[ { "from": "system", "value": "Add Netware parser test to all test suite\n\ngit-svn-id: 8e7fc3cb9b5e494b5390f56e4b66b18dc2b2e92b@394701 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "human", "value": "/*\n * Created on Apr 5, 2004\n *\n * To change the template for this generated file go t...
java
chosen
[ { "from": "human", "value": "Add a correlation data provider that provides the original message identifier\n\nWhen a Message is processed and another message is created as a result, this correlation data provider can be used to attach the identifier of the first message to the second message.\n" }, { ...
java
chosen
[ { "from": "human", "value": "Create generic observable base class which contains basic observer infra" }, { "from": "gpt", "value": "package to.etc.domui.util;\n\nimport javax.annotation.*;\n\nimport to.etc.domui.databinding.*;\nimport to.etc.webapp.annotations.*;\n\npublic class ObservableObjec...
java
chosen
[ { "from": "human", "value": "Add tests for InventorySystem class\n" }, { "from": "gpt", "value": "package com.proofpoint.cloudmanagement.service.inventoryclient;\n\nimport com.google.common.collect.ImmutableSet;\nimport com.proofpoint.json.JsonCodec;\nimport org.testng.Assert;\nimport org.testng...
java
chosen
[ { "from": "human", "value": "Add jboss deployment structure fro wildfly\n" }, { "from": "gpt", "value": "package org.bedework.util.deployment;\n\nimport org.w3c.dom.Element;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.util.List;\n\n/** Represent a jboss-deployment-stru...
java
chosen
[ { "from": "human", "value": "Add JUnit test for ShortestPathWithDijkstra\n" }, { "from": "gpt", "value": "package com.test.graphs;\n\nimport java.util.LinkedList;\n\nimport com.graphs.GraphAdjacencyListRepresentation;\nimport com.graphs.ShortestPathWithDijkstra;\n\nimport junit.framework.TestCas...
java
chosen
[ { "from": "human", "value": "Add QuantifiedFormulaManager (not yet active)\n\nAdded Yices2QuantifiedFormulaManager but not yet usable as it requires\nvariables created with yices_new_variable() instead of\nyices_new_uininterpreted_term()." }, { "from": "gpt", "value": "/*\n * JavaSMT is an API ...
java
chosen
[ { "from": "human", "value": "Add a single unit test\n" }, { "from": "gpt", "value": "package com.atb.demo.stagger.util;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertNull;\n\npublic class UtilsTest {\n\n @Test\n public void testNullAllowedValuesReturnsNull() throws Exce...
java
chosen
[ { "from": "human", "value": "Add tests for the plugin blacklisting feature\n" }, { "from": "gpt", "value": "/*\n * #%L\n * SciJava Common shared library for SciJava software.\n * %%\n * Copyright (C) 2009 - 2016 Board of Regents of the University of\n * Wisconsin-Madison, Broad Institute of MIT ...
java
chosen
[ { "from": "human", "value": "Disable mutiple datasource for serviceTest\n" }, { "from": "gpt", "value": "package org.pdxfinder;\n\n\nimport org.neo4j.ogm.session.SessionFactory;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.ComponentScan;\nim...
java
chosen
[ { "from": "human", "value": "Add an nio mmap based Directory implementation.\n\n\ngit-svn-id: 4c5078813df38efa56971a28e09a55254294f104@150538 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.lucene.store;\n\n/**\n * Copyright 2004 The Apache Software Found...
java
chosen
[ { "from": "human", "value": "Sort k sorted lists using min heap . O(nklogk).\n" }, { "from": "gpt", "value": "package com.sunny.grokkingalgorithms.fasttrack.week2;\n\nimport java.util.Arrays;\nimport java.util.PriorityQueue;\n\n/**\n * Created by sundas on 6/24/2018.\n */\npublic class MergeSort...
java
chosen