conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add some super basic OutputQueue tests.\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2006-2016 DMDirc Developers\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the...
java
chosen
[ { "from": "human", "value": "Add test for duration stringifier\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 copyright notice and the ...
java
chosen
[ { "from": "human", "value": "Check types of repeat features against previous release.\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2003 EBI, GRL\n * \n * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as p...
java
chosen
[ { "from": "human", "value": "ENG-4568: Add a helper class to encapsulate serialization of multiple snapshot\nbuffers to EE.\n" }, { "from": "gpt", "value": "/* This file is part of VoltDB.\n * Copyright (C) 2008-2013 VoltDB Inc.\n *\n * This program is free software: you can redistribute it and/...
java
chosen
[ { "from": "human", "value": "Create template of apt package manager.\n" }, { "from": "gpt", "value": "package com.github.aureliano.achmed.os.pkg;\n\nimport com.github.aureliano.achmed.command.CommandResponse;\nimport com.github.aureliano.achmed.resources.properties.PackageProperties;\n\npublic c...
java
chosen
[ { "from": "human", "value": "Add Self adaptive strategy test\n" }, { "from": "gpt", "value": "package com.jraska.vsb.or1.schedule;\n\nimport org.junit.Test;\n\nimport java.util.ArrayList;\nimport java.util.Random;\n\nimport static org.hamcrest.core.IsEqual.equalTo;\nimport static org.junit.Asser...
java
chosen
[ { "from": "human", "value": "Add test for large directory raw cryptree size\n" }, { "from": "gpt", "value": "package peergos.server.tests;\n\nimport org.junit.*;\nimport peergos.server.*;\nimport peergos.server.storage.*;\nimport peergos.shared.*;\nimport peergos.shared.crypto.*;\nimport peergos...
java
chosen
[ { "from": "human", "value": "Introduce @Suite for TestNG tests\n\nIn order to allow developers to execute TestNG tests in Eclipse IDE\nwithout installing the TestNG plugin for Eclipse, this commit introduces\na JUnit Platform @Suite class that can be executed within the IDE.\n\nSee gh-27407\n" }, { ...
java
chosen
[ { "from": "human", "value": "Add raw table client skeleton.\n" }, { "from": "gpt", "value": "package tachyon.client.table;\n\nimport tachyon.annotation.PublicApi;\n\n@PublicApi\npublic class TachyonRawTables {\n private static TachyonRawTables sTachyonRawTables;\n\n public static class Tachyon...
java
chosen
[ { "from": "human", "value": "Add solution to \"Filling Jars\" problem\n" }, { "from": "gpt", "value": "package fillingjars;\r\n\r\nimport java.io.*;\r\nimport java.util.*;\r\nimport java.text.*;\r\nimport java.math.*;\r\nimport java.util.regex.*;\r\n\r\npublic class Solution {\r\n private sta...
java
chosen
[ { "from": "human", "value": "Add util function to get version string in Java code\n" }, { "from": "gpt", "value": "package util;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.Properties;\n\n/**\n * Small helper functions that don't need their own class.\n */\npubl...
java
chosen
[ { "from": "human", "value": "Add annotation to stop tests from running in tabbed mode\n\nNeed an annotation to run tests only in Document mode, if\nit's available.\n\nBUG=394854\n\nReview URL: https://codereview.chromium.org/738183004\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#305127}...
java
chosen
[ { "from": "human", "value": "Add an annotation to allow marking fields that hold credential ids\n" }, { "from": "gpt", "value": "/*\n * The MIT License\n *\n * Copyright (c) 2011-2014, CloudBees, Inc., Stephen Connolly.\n *\n * Permission is hereby granted, free of charge, to any person obtainin...
java
chosen
[ { "from": "human", "value": "Remove non-persistant job queue from the library. All that we intend to do from now should be persistant on disk\n" }, { "from": "gpt", "value": "/***\n This is free and unencumbered software released into the public domain.\n\n Anyone is free to copy, modify, publis...
java
chosen
[ { "from": "human", "value": "Add a color progression interface.\n" }, { "from": "gpt", "value": "package cs437.som.visualization;\n\nimport java.awt.Color;\n\n/**\n * Interface for accessing color progressions.\n */\npublic interface ColorProgression {\n\n /**\n * Provide a Color object c...
java
chosen
[ { "from": "human", "value": "Add Unit Test for ProcessStepConfigurations\n" }, { "from": "gpt", "value": "/*\n * DownloadClient Geodateninfrastruktur Bayern\n *\n * (c) 2016 GSt. GDI-BY (gdi.bayern.de)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use ...
java
chosen
[ { "from": "human", "value": "Add solution for 283. Move Zeroes\n\n283. Move Zeroes: https://leetcode.com/problems/move-zeroes/\n" }, { "from": "gpt", "value": "package leetcode.move_zeroes;\n\npublic class Solution {\n public void moveZeroes(int[] nums) {\n if(nums == null) return;\n ...
java
chosen
[ { "from": "human", "value": "Check for any coord_system.versions that are blank ('') - they should be NULL for various other things to work.\n" }, { "from": "gpt", "value": "/*\n Copyright (C) 2003 EBI, GRL\n\n This library is free software; you can redistribute it and/or\n modify it under the t...
java
chosen
[ { "from": "human", "value": "ADD simple implementation of a moving average\n" }, { "from": "gpt", "value": "package jeranvier.math.dsp.filters;\n\nimport jeranvier.math.linearAlgebra.Vector;\nimport jeranvier.math.util.Complex;\n\npublic class MovingAverage {\n\t\n\tpublic static Vector SimpleMo...
java
chosen
[ { "from": "human", "value": "Add base implementation of BasicLinkedDataFragment.\n" }, { "from": "gpt", "value": "package org.linkeddatafragments.datasource;\n\nimport com.hp.hpl.jena.rdf.model.Model;\n\n/**\n * Base implementation of a Basic Linked Data Fragment.\n * @author Ruben Verborgh\n */...
java
chosen
[ { "from": "human", "value": "Create style sheet tag component.\n" }, { "from": "gpt", "value": "package com.github.aureliano.verbum_domini.web.ui;\n\nimport java.io.IOException;\n\nimport javax.faces.component.FacesComponent;\nimport javax.faces.component.UIComponentBase;\nimport javax.faces.con...
java
chosen
[ { "from": "human", "value": "Define some constructor tests for InvalidCardFormatException." }, { "from": "gpt", "value": "package com.skraylabs.poker.model;\n\nimport static org.hamcrest.CoreMatchers.equalTo;\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.hamcrest.CoreMatchers.n...
java
chosen
[ { "from": "human", "value": "Add RS Test Application provider" }, { "from": "gpt", "value": "package org.xdi.oxauth.service;\r\n\r\nimport java.util.HashSet;\r\nimport java.util.Set;\r\n\r\nimport javax.ws.rs.core.Application;\r\nimport javax.ws.rs.ext.Provider;\r\n\r\nimport org.xdi.oxauth.gluu...
java
chosen
[ { "from": "human", "value": "Add catch all Exception maper\n" }, { "from": "gpt", "value": "package org.aslak.github.merge.rest.jaxrs;\n\nimport javax.ws.rs.core.MediaType;\nimport javax.ws.rs.core.Response;\nimport javax.ws.rs.ext.ExceptionMapper;\nimport javax.ws.rs.ext.Provider;\n\n@Provider\...
java
chosen
[ { "from": "human", "value": "mobile: Make initial android table view realisation\n" }, { "from": "gpt", "value": "package com.souptitlemobile;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport android.content.Context;\nimport android.support.v7.widget.LinearLayoutManager;\nimport ...
java
chosen
[ { "from": "human", "value": "Check for methods with array return type that return null\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@1085 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "/*\n * FindBugs - Find bugs in Java programs\n * Copyright (C) 2003, Univers...
java
chosen
[ { "from": "human", "value": "Add unit test exposing @OnChange bug.\n" }, { "from": "gpt", "value": "\n/*\n * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.\n */\n\npackage org.jsimpledb;\n\nimport java.util.UUID;\n\nimport org.jsimpledb.annotation.JSimpleClass;\nimport org.jsimpledb.an...
java
chosen
[ { "from": "human", "value": "Enable serialization of adaptability scores to a LaTeX longtable\n" }, { "from": "gpt", "value": "package prope.metrics.adaptability.elements;\n\nimport java.io.FileNotFoundException;\nimport java.io.PrintWriter;\nimport java.util.List;\n\npublic class ElementSeriali...
java
chosen
[ { "from": "human", "value": "Add a utility class that can help to create row expressions.\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (c) 2004, 2005 Actuate Corporation.\n * All rights reserved. This program and ...
java
chosen
[ { "from": "human", "value": "Add helper class for building functions for getting single column\n" }, { "from": "gpt", "value": "package com.getbase.android.db.cursors;\n\nimport com.google.common.base.Function;\n\nimport android.database.Cursor;\n\npublic abstract class SingleRowTransforms {\n ...
java
chosen
[ { "from": "human", "value": "Add HR client example, which fails over to another ISPN server\n" }, { "from": "gpt", "value": "package org.infinispan.demo;\n\nimport org.infinispan.client.hotrod.RemoteCache;\nimport org.infinispan.client.hotrod.RemoteCacheManager;\nimport org.infinispan.client.hot...
java
chosen
[ { "from": "human", "value": "Add test for AnalogToPowerLevel control\n" }, { "from": "gpt", "value": "package com.easternedgerobotics.rov.control;\n\nimport org.junit.Assert;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\n\nimport java.util.Ar...
java
chosen
[ { "from": "human", "value": "Add test: paragraph index mapping (allPar <-> visiblePar) works\n" }, { "from": "gpt", "value": "package org.fxmisc.richtext.api;\n\nimport javafx.stage.Stage;\nimport org.fxmisc.richtext.InlineCssTextAreaAppTest;\nimport org.fxmisc.richtext.TextBuildingUtils;\nimpor...
java
chosen
[ { "from": "human", "value": "Add until test (with continue).\n" }, { "from": "gpt", "value": "class UntilContinue {\n public static void main(String[] args) {\n\tint i = 1;\n\tuntil (i == 6) {\n\t i = i + 1;\n\t System.out.println(3);\n\t continue;\n\t System.out.println(i);\n\t}\...
java
chosen
[ { "from": "human", "value": "Reset the branch and created a class to store documentation comments\n" }, { "from": "gpt", "value": "package shadow.typecheck.type;\n\nimport java.util.ArrayList;\n\n/**\n * Represents the contents of a Shadow documentation comment. Should be\n * associated with a c...
java
chosen
[ { "from": "human", "value": "Add enum for Xbox One controllers\n" }, { "from": "gpt", "value": "package org.robockets.buttonmanager.joysticks;\n\npublic enum XboxOne {\n\tA(1),\n\tB(2),\n\tX(3),\n\tY(4),\n\tRIGHT_BUMPER(6),\n\tLEFT_BUMPER(5),\n\tRIGHT_TRIGGER_AXIS(3),\n\tLEFT_TRIGGER_AXIS(2),\n\...
java
chosen
[ { "from": "human", "value": "Add exception to signal invalid messages\n" }, { "from": "gpt", "value": "/*\n * Zed Attack Proxy (ZAP) and its related class files.\n * \n * ZAP is an HTTP/HTTPS proxy for assessing web application security.\n * \n * Copyright 2015 The ZAP Development Team\n * \n * ...
java
chosen
[ { "from": "human", "value": "Test container functionality with conflicting JARs from core impl\n" }, { "from": "gpt", "value": "package org.example;\n\nimport javax.inject.Inject;\n\nimport org.jboss.arquillian.container.test.api.Deployment;\nimport org.jboss.arquillian.junit.Arquillian;\nimport...
java
chosen
[ { "from": "human", "value": "Add an empty implementation of PluginsFinder that can be bound when there is no convenient file system.\n" }, { "from": "gpt", "value": "/**\n * Copyright (C) 2009-2013 FoundationDB, LLC\n *\n * This program is free software: you can redistribute it and/or modify\n *...
java
chosen
[ { "from": "human", "value": "Add static methods which reverse engineer ScoredText\n" }, { "from": "gpt", "value": "package com.grayben.riskExtractor.helpers;\n\nimport com.grayben.riskExtractor.htmlScorer.ScoredText;\nimport com.grayben.riskExtractor.htmlScorer.partScorers.Scorer;\nimport org.ap...
java
chosen
[ { "from": "human", "value": "Add utility class for validating tables against WeakTypes\n" }, { "from": "gpt", "value": "package net.engin33r.luaspigot.lua;\n\nimport org.luaj.vm2.LuaTable;\nimport org.luaj.vm2.LuaValue;\n\n/**\n * Utility class for validating arguments against {@link WeakType} t...
java
chosen
[ { "from": "human", "value": "Load and extract \"Mainrunner\" project sample\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 except in c...
java
chosen
[ { "from": "human", "value": "Add iterator to ensure implementation is as per v3.0\n\n\ngit-svn-id: b713d2d75405ee089de821fbacfe0f8fc04e1abf@131751 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Copyright 2004 The Apache Software Foundation\n *\n * Licensed under t...
java
chosen
[ { "from": "human", "value": "Add unit tests to satisfy coverage requirements.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015, Red Hat, Inc. and individual contributors as indicated by the\n * @author tags. See the copyright.txt file in the distribution for a full\n * listing of individua...
java
chosen
[ { "from": "human", "value": "Add composite widget for tableViewer contorls\n" }, { "from": "gpt", "value": "/*\n * Perfclispe\n * \n * \n * Copyright (c) 2013 Jakub Knetl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance ...
java
chosen
[ { "from": "human", "value": "189699: Add @RequiredApi annotation as the dual of @TargetApi\n\nChange-Id: I0310b642a049f077c839d1408efa90d10f01756a\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (th...
java
chosen
[ { "from": "human", "value": "Add last returned timestamp tests\n" }, { "from": "gpt", "value": "/**\n * Copyright 2016 Palantir Technologies\n *\n * Licensed under the BSD-3 License (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy ...
java
chosen
[ { "from": "human", "value": "Create a ListActivity so that the Fragment functionality can also be\nused as an Activity " }, { "from": "gpt", "value": "/*\n * Copyright (c) 2014 Ben Murphy\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file exce...
java
chosen
[ { "from": "human", "value": "Fix missing file and git troubles\n" }, { "from": "gpt", "value": "package com.twilio.ivrrecording.servlet.extension;\n\nimport com.twilio.ivrrecording.models.Agent;\nimport com.twilio.ivrrecording.repositories.AgentRepository;\nimport com.twilio.ivrrecording.servlet...
java
chosen
[ { "from": "human", "value": "Fix and test case for NET-290 (incl test case this time)\n\ngit-svn-id: 4de9e10a8372d59eb4972153ee28637d84aca65e@920259 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n *...
java
chosen
[ { "from": "human", "value": "Add a test to verify that 404 is returned for non-existing REST endpoints\n\nThe error messages for non-existing root collections and non-existing\nviews / child collections are a bit inconsistent. This is because for\nnon-existing root collections no RestApiServlet is bound (ge...
java
chosen
[ { "from": "human", "value": "Add support to turbine for adding additional keyword arguments\n\ngit-svn-id: 47705994653588c662f4ea400dfe88107361c0e2@7203 dc4e9af1-7f46-4ead-bba6-71afc04862de\n" }, { "from": "gpt", "value": "package exm.stc.common.lang;\n\nimport java.util.Collections;\nimport jav...
java
chosen
[ { "from": "human", "value": "Create servlet to get TA email helping student\n" }, { "from": "gpt", "value": "package com.google.sps.servlets;\n\nimport com.google.appengine.api.datastore.DatastoreService;\nimport com.google.appengine.api.datastore.DatastoreServiceConfig;\nimport com.google.appen...
java
chosen
[ { "from": "human", "value": "Add an interface for OutputEvent listeners\n" }, { "from": "gpt", "value": "/*\n * #%L\n * SciJava Common shared library for SciJava software.\n * %%\n * Copyright (C) 2009 - 2015 Board of Regents of the University of\n * Wisconsin-Madison, Broad Institute of MIT and...
java
chosen
[ { "from": "human", "value": "Add abstract client test for shared functionality.\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2011-2018 Nexmo Inc\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 test helper methods for Dim2D" }, { "from": "gpt", "value": "package nl.weeaboo.gdx.test;\n\nimport org.junit.Assert;\n\nimport nl.weeaboo.common.Dim2D;\n\npublic final class DimAssert {\n\n private DimAssert() {\n }\n\n /**\n * Checks if two dimensi...
java
chosen
[ { "from": "human", "value": "Add Dashboard Configurations list load response class\n" }, { "from": "gpt", "value": "package gr.demokritos.iit.ydsapi.responses;\n\nimport com.google.gson.*;\nimport gr.demokritos.iit.ydsapi.model.DashboardConfig;\n\nimport java.lang.reflect.Type;\nimport java.util...
java
chosen
[ { "from": "human", "value": "Add tests for secure compare\n" }, { "from": "gpt", "value": "package com.braintreegateway.util;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertTrue;\nimport static org.junit.Assert.assertFalse;\n\n\npublic class CryptoTest {\n\n @Test\n publ...
java
chosen
[ { "from": "human", "value": "Add abstract base class for HandlerPlugins\n\nWhile this class is not strictly necessary, it provides a nice symmetry\nwhen implementing new HandlerPlugin types. Otherwise, the new plugin\ntype's interface extends HandlerPlugin, but the corresponding abstract\nbase class extends...
java
chosen
[ { "from": "human", "value": "Create a test that reads in the icdar xml data\n" }, { "from": "gpt", "value": "package technology.tabula;\n\nimport java.io.File;\nimport java.io.FilenameFilter;\nimport java.nio.file.Files;\n\nimport org.junit.Test;\nimport org.w3c.dom.*;\n\nimport javax.xml.parser...
java
chosen
[ { "from": "human", "value": "Change pakage name to \"grid\"" }, { "from": "gpt", "value": "package com.sudoku.grid.ihm_grid_cells;\n\nimport javafx.scene.Group;\nimport javafx.scene.Scene;\nimport javafx.scene.text.Text;\n\n/**\n *\n * @author groudame\n */\nabstract class IhmGridLayout {\n p...
java
chosen
[ { "from": "human", "value": "Insert numerals while enter literals\n" }, { "from": "gpt", "value": "package com.javarush.test.level09.lesson11.home03;\n\n/* Метод в try..catch\nВводить с клавиатуры числа. Код по чтению чисел с клавиатуры вынести в отдельный метод readData.\nОбернуть все тело (вес...
java
chosen
[ { "from": "human", "value": "Add tests for MessageManager class.\n" }, { "from": "gpt", "value": "/**\n * Copyright (C) 2014 android10.org. All rights reserved.\n * @author Fernando Cejas (the android10 coder)\n */\npackage com.fernandocejas.android10.gandalf.internal;\n\nimport com.fernandoceja...
java
chosen
[ { "from": "human", "value": "Remove Duplicates from Sorted Array -- easy in place, two pointer\n" }, { "from": "gpt", "value": "package removeDuplicatesFromSortedArray;\n\npublic class Solution {\n public int removeDuplicates(int[] nums) {\n int fast = 1, slow = 1;\n while(fast ...
java
chosen
[ { "from": "human", "value": "Add java solution for 128. Longest Consecutive Sequence\n\n128. Longest Consecutive Sequence: https://leetcode.com/problems/longest-consecutive-sequence/" }, { "from": "gpt", "value": "package leetcode.longest_consecutive_sequence;\n\nimport java.util.HashMap;\n\npub...
java
chosen
[ { "from": "system", "value": "Add constructor for adding multiple levels at once. Need to work out how\nto handle level-ups in order for this to be properly cancelled, however." }, { "from": "human", "value": "package com.gmail.nossr50.events.experience;\n\nimport org.bukkit.entity.Player;\n\nim...
java
chosen
[ { "from": "human", "value": "Add test for DNS timeout\n" }, { "from": "gpt", "value": "package com.algolia.search.saas;\n\nimport org.junit.Assume;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport static org.junit.Assert.assertTru...
java
chosen
[ { "from": "human", "value": "Add user service for Spring Security\n" }, { "from": "gpt", "value": "package io.github.saidie.plantuml_api;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport org.springframework.security.core.us...
java
chosen
[ { "from": "human", "value": "Introduce an AutomaticFeature for jdbc-postgresql enabling XML processing capabilities only when required\n" }, { "from": "gpt", "value": "package io.quarkus.jdbc.postgresql.runtime.graal;\n\nimport java.lang.reflect.Method;\nimport java.util.concurrent.atomic.Atomic...
java
chosen
[ { "from": "human", "value": "Add memoized solution for count ways to reach nth stair\n" }, { "from": "gpt", "value": "package algorithms.dp;\n\n/**\n * Question: http://www.geeksforgeeks.org/count-ways-reach-nth-stair/\n * \n * @author Sudharsanan Muralidharan\n */\npublic class CountWaysToReach...
java
chosen
[ { "from": "human", "value": "Ch11: Change class name, add imports, re-format." }, { "from": "gpt", "value": "package com.architecting.ch11;\n\nimport java.util.List;\nimport java.util.concurrent.atomic.AtomicLong;\n\nimport org.apache.flume.Context;\nimport org.apache.flume.Event;\nimport org.ap...
java
chosen
[ { "from": "human", "value": "Add tests to the card request model\n" }, { "from": "gpt", "value": "package org.bitreserve.bitreserve_android_sdk.test.integration.model.card;\n\nimport junit.framework.Assert;\n\nimport org.bitreserve.bitreserve_android_sdk.model.card.CardRequest;\nimport org.junit...
java
chosen
[ { "from": "human", "value": "Add an App plugin for ImageJ 1.x\n\nThis is nice to have, and will come in handy soon...\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2009 - 2014 Board of Regents of the U...
java
chosen
[ { "from": "human", "value": "Add unit test for HttpUtils\n" }, { "from": "gpt", "value": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License.\n\npackage com.microsoft.aad.msal4j;\n\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\nimp...
java
chosen
[ { "from": "human", "value": "Add Cucumber runner in test cases\n" }, { "from": "gpt", "value": "package cucumber.demo.bank;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport cucumber.api.junit.Cucumber;\n\n@RunWith(Cucumber.class)\npublic ...
java
chosen
[ { "from": "human", "value": "Test measurements with a value but no range.\n" }, { "from": "gpt", "value": "package com.openxc;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimport static ...
java
chosen
[ { "from": "human", "value": "Add unit test coverage for the HeaderConverter\n" }, { "from": "gpt", "value": "/*\n * ******************************************************************************\n * Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved.\n * Licensed under the Ap...
java
chosen
[ { "from": "human", "value": "Add File Resource and Service to manage file downloads.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the\n * @author tags. See the copyright.txt file in the distribution for a full\n * listing of in...
java
chosen
[ { "from": "human", "value": "Add helper to disable scrolling" }, { "from": "gpt", "value": "/*\n * Copyright 2014 Kevin Quan (kevin.quan@gmail.com)\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 unit tests for parsing map matchers" }, { "from": "gpt", "value": "package org.monospark.spongematchers.parser.element;\n\nimport static org.hamcrest.CoreMatchers.equalTo;\nimport static org.junit.Assert.assertThat;\n\nimport org.junit.Test;\nimport org.monospark...
java
chosen
[ { "from": "human", "value": "Test equals function of UrlShortenerEntry\n" }, { "from": "gpt", "value": "package org.corpus_tools.annis.gui.query_references;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.junit.jupiter.api.Assertions.assertFalse;\n\nimport java...
java
chosen
[ { "from": "human", "value": "Add exception class for module loader\n" }, { "from": "gpt", "value": "package org.kairosdb.security.auth.core.exception;\n\npublic class LoadingModuleException extends Exception\n{\n private final String moduleName;\n\n public LoadingModuleException(String mod...
java
chosen
[ { "from": "human", "value": "Work started on device location discovery\n" }, { "from": "gpt", "value": "package io.mobeacon.sdk;\n\nimport android.content.Context;\nimport android.location.Location;\nimport android.os.Bundle;\nimport android.util.Log;\n\nimport com.google.android.gms.common.Conn...
java
chosen
[ { "from": "human", "value": "Add a filter to transform requests that have tenantId as a query param when header information is missing. The fallback mechanism gracefully attempts to recreate the tenantId header if the param with an identical name is present. This will allow an easy transition and backwards ...
java
chosen
[ { "from": "human", "value": "Define the types of co-occurring by source - manual (not electronic) or all (every source).\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.ontology.common.coterm;\n\n/**\n * @author Tony Wardell\n * Date: 29/09/2016\n * Time: 15:49\n * Created with Intell...
java
chosen
[ { "from": "human", "value": "Add flyway class to add bundle\n" }, { "from": "gpt", "value": "package flyway.oskari;\n\nimport fi.nls.oskari.db.BundleHelper;\nimport fi.nls.oskari.domain.map.view.Bundle;\nimport org.flywaydb.core.api.migration.jdbc.JdbcMigration;\n\nimport java.sql.Connection;\ni...
java
chosen
[ { "from": "human", "value": "Add interface for finite state specifications\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public Li...
java
chosen
[ { "from": "human", "value": "Add cheaper calculator (no need to save results)\n\ngit-svn-id: 52ad764cdf1b64a6e804f4e5ad13917d3c4b2253@405491 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\r\n * Copyright 2006 The Apache Software Foundation.\r\n *\r\n * Licensed under th...
java
chosen
[ { "from": "human", "value": "Add EntityChangeData implementation used for testing\n" }, { "from": "gpt", "value": "package replicant;\n\nimport java.util.HashMap;\nimport javax.annotation.Nonnull;\n\npublic class TestEntityChangeData\n implements EntityChangeData\n{\n private final HashMap<Str...
java
chosen
[ { "from": "human", "value": "Add OAuth token generating test\n" }, { "from": "gpt", "value": "package com.aemreunal.controller;\n\n/*\n ***************************\n * Copyright (c) 2014 *\n * *\n * This code belongs to: *\n * *\n * @author ...
java
chosen
[ { "from": "human", "value": "Add missing class (mostly unimplemented).\n" }, { "from": "gpt", "value": "\n/*\n * Java core library component.\n *\n * Copyright (c) 1999\n *\tArchie L. Cobbs. All rights reserved.\n * Copyright (c) 1999\n *\tTransvirtual Technologies, Inc. All rights reserved.\n...
java
chosen
[ { "from": "human", "value": "Add first cut at model loader\n" }, { "from": "gpt", "value": "package org.krugler.yalder;\n\nimport java.io.DataInputStream;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Coll...
java
chosen
[ { "from": "human", "value": "Add java solution for 132. Palindrome Partitioning II\n\n132. Palindrome Partitioning II: https://leetcode.com/problems/palindrome-partitioning-ii/" }, { "from": "gpt", "value": "package leetcode.palindrome_partitioning_ii;\n\npublic class Solution {\n\t\n\tpublic vo...
java
chosen
[ { "from": "human", "value": "Create basic implementations (lambda) of numbers generators\n" }, { "from": "gpt", "value": "package com.pturpin.quickcheck.generator;\n\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\n\nimport static com.google.common.base.Preconditions.checkArgument;\n...
java
chosen
[ { "from": "human", "value": "Test our Equals method a bit\n" }, { "from": "gpt", "value": "package com.darwinsys.todo.test;\n\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\n\nimport com.pobox.cbarham.testhelpers.EqualsHashCodeTestCase;\n\npublic class TaskEqualsHashcodeTe...
java
chosen
[ { "from": "human", "value": "Add some test cases for entity actions.\n" }, { "from": "gpt", "value": "package de.gurkenlabs.litiengine.entities;\n\nimport static org.junit.jupiter.api.Assertions.assertFalse;\nimport static org.junit.jupiter.api.Assertions.assertNotNull;\nimport static org.junit....
java
chosen
[ { "from": "human", "value": "Add default implementation of ZeroMin interface.\n" }, { "from": "gpt", "value": "package net.imagej.ops.views;\n\nimport org.scijava.plugin.Plugin;\n\nimport net.imagej.ops.view.ViewOps;\nimport net.imagej.ops.view.ViewOps.ZeroMin;\nimport net.imglib2.RandomAccessib...
java
chosen
[ { "from": "human", "value": "Add java solution for 25. Reverse Nodes in k-Group\n\n25. Reverse Nodes in k-Group: https://leetcode.com/problems/reverse-nodes-in-k-group/" }, { "from": "gpt", "value": "package leetcode.reverse_nodes_in_k_group;\n\nimport common.ListNode;\n\npublic class Solution {...
java
chosen
[ { "from": "human", "value": "Add tests asserting that search matching is working as per spec\n" }, { "from": "gpt", "value": "import android.support.test.filters.SmallTest;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport com.hewgill.android.nzsldict.Dictionary;\n\nimport org.junit.A...
java
chosen
[ { "from": "human", "value": "Create first matchmaking implementation for captains\n" }, { "from": "gpt", "value": "package core.util;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport core.Database;\nimport net.dv8tion.jda.core.entities.User;\n\npublic class MatchMaker {\n\t\n\tSt...
java
chosen