conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add log filter for filtering events based on MDC\n" }, { "from": "gpt", "value": "package no.cantara.jau.eventextraction;\n\nimport ch.qos.logback.classic.Level;\nimport ch.qos.logback.classic.spi.ILoggingEvent;\nimport ch.qos.logback.core.filter.AbstractMatcherFilte...
java
chosen
[ { "from": "human", "value": ":sparkles: Create Firebase sign in task\n" }, { "from": "gpt", "value": "package com.udinic.accounts_authenticator_example.authentication;\n\nimport android.os.Bundle;\nimport android.support.annotation.NonNull;\n\nimport com.google.android.gms.tasks.Continuation;\ni...
java
chosen
[ { "from": "human", "value": "[hotfix][table-common] Add a default data type visitor\n" }, { "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 in...
java
chosen
[ { "from": "human", "value": "Move PhenotypeArchive to trunk\nCopyright notice changed\nObservation classes added\nBiological sample and model added.\n" }, { "from": "gpt", "value": "/**\n * Copyright © 2011-2012 EMBL - European Bioinformatics Institute\n * \n * Licensed under the Apache License,...
java
chosen
[ { "from": "human", "value": "Add initializer for the config server\n" }, { "from": "gpt", "value": "package org.apereo.cas;\n\nimport org.springframework.boot.builder.SpringApplicationBuilder;\nimport org.springframework.boot.web.support.SpringBootServletInitializer;\n\n/**\n * This is {@link Ca...
java
chosen
[ { "from": "human", "value": "XWIKI-11034: Use LESS4J for the implementation of LESSCompiler.\n\n* Add missing file.\n" }, { "from": "gpt", "value": "/*\n * See the NOTICE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; ...
java
chosen
[ { "from": "human", "value": "Add unit test for CDK-207: Formats should support a fromString() method\n" }, { "from": "gpt", "value": "/**\n * Copyright 2013 Cloudera Inc.\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": "Add java solution for 206. Reverse Linked List\n\n206. Reverse Linked List: https://leetcode.com/problems/reverse-linked-list/" }, { "from": "gpt", "value": "package leetcode.reverse_linked_list;\n\nimport common.ListNode;\n\npublic class Solution {\n public ListN...
java
chosen
[ { "from": "human", "value": "Add Immutable style for Jpa DTOs\n" }, { "from": "gpt", "value": "package com.box.l10n.mojito.immutables;\n\nimport org.immutables.value.Value;\n\n@Value.Style(\n allParameters = true,\n of = \"new\",\n defaults = @Value.Immutable(builder = false...
java
chosen
[ { "from": "human", "value": "Add support for NTCIR topic format\n\nExtracts the MathSearchPatterns from a topics file.\n\nChange-Id: I2bebc1ff37ef2cc61fe39047ffab904929e1ac86\n" }, { "from": "gpt", "value": "package com.formulasearchengine.mathmlquerygenerator;\n\n/**\n * Created by Moritz on 08...
java
chosen
[ { "from": "human", "value": "Add regression test verifying the previous commit\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2009 - 2017 Board of Regents of the University of\n * Wisconsin-Madison, Bro...
java
chosen
[ { "from": "human", "value": "Add insertion sort test for Java implementation\n" }, { "from": "gpt", "value": "import org.junit.Test;\nimport java.util.Arrays;\n\npublic class InsertionSortTest {\n\n @Test\n public void test() {\n int list[] = { -5, 8, 0, 12, 55, 1, -66, 35, 3 };\n ...
java
chosen
[ { "from": "human", "value": "Convert Stream to Array in Java 8" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2014-present The openSourcLibrary-2015 Authors\n *\n * https://github.com/sdcuike\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use t...
java
chosen
[ { "from": "human", "value": "Move mappings for the dispatcher servlet - LUI-40\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, You can\n * obtain one at http...
java
chosen
[ { "from": "human", "value": "Add test case that shows how the optimistic locking failure occurs when using JDBC batching\n" }, { "from": "gpt", "value": "package com.vladmihalcea.book.hpjp.hibernate.batch;\n\nimport com.vladmihalcea.book.hpjp.util.AbstractTest;\nimport com.vladmihalcea.book.hpjp...
java
chosen
[ { "from": "human", "value": "Create test to check that time picker opens.\n" }, { "from": "gpt", "value": "package com.philliphsu.bottomsheetpickers;\n\nimport android.support.test.espresso.Espresso;\nimport android.support.test.espresso.ViewAssertion;\nimport android.support.test.espresso.ViewI...
java
chosen
[ { "from": "human", "value": "Add integration test that verifies the exception\n" }, { "from": "gpt", "value": "package arez.integration.references;\n\nimport arez.Arez;\nimport arez.annotations.Action;\nimport arez.annotations.ArezComponent;\nimport arez.annotations.Observable;\nimport arez.anno...
java
chosen
[ { "from": "human", "value": "Add a generator/builder for Parquet filters\n" }, { "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\...
java
chosen
[ { "from": "human", "value": "Solve No.9498 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": "Add test to ensure that unkown user preferences are just ignored\n\nI378c72 is the first of a series of changes that will just remove\nobsolete user preferences without a data migration. That is desired,\nbecause leaving these around is cheap and a data migration requires\nextra...
java
chosen
[ { "from": "human", "value": "Add a new Annotation to identify Ph Models\n" }, { "from": "gpt", "value": "package com.sb.elsinore.annotations;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annota...
java
chosen
[ { "from": "human", "value": "ADD approximate entropy measurment for a signal\n" }, { "from": "gpt", "value": "package jeranvier.math.dsp;\n\n\npublic class Entropy {\n\t\n\tpublic static double computeApproximateEntropy(int m, double r, double[] t){\n\t\treturn computePhi(m, r, t) - computePhi(m...
java
chosen
[ { "from": "human", "value": "Support loading images from jar resource.\n\nNot yet working, believe it's a path issue.\n" }, { "from": "gpt", "value": "/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\npackage foam.na...
java
chosen
[ { "from": "human", "value": "Add skeleton for problem 275\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/h-index-ii/\n */\npublic class Problem275 {\n public int hIndex(int[] citations) {\n // TODO:\n return 0;\n }\n\n public st...
java
chosen
[ { "from": "human", "value": "Add the class representing nutrition values of a food" }, { "from": "gpt", "value": "package com.japlj.healthydiet.food;\n\npublic class FoodParameter {\n\tpublic float proteinValue;\n\tpublic float carbohydrateValue;\n\tpublic float vitaMineValue;\n\tpublic float sa...
java
chosen
[ { "from": "human", "value": "Add test for FiniteParametricProperty based on HasNext\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 ...
java
chosen
[ { "from": "human", "value": "Add a utility class to do lazy screen resizing.\n" }, { "from": "gpt", "value": "package de.lmu.ifi.dbs.elki.visualization.batikutil;\n\nimport java.awt.Component;\nimport java.awt.event.ComponentAdapter;\nimport java.awt.event.ComponentEvent;\n\n/**\n * Class to laz...
java
chosen
[ { "from": "human", "value": "Add application config class for swagger app\n" }, { "from": "gpt", "value": "package jp.pushmestudio.kcuc.rest;\n\nimport java.util.Set;\n\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.core.Application;\n\nimport io.swagger.jaxrs.config.BeanConfig;\n\n@Ap...
java
chosen
[ { "from": "human", "value": "Add a test for DebugUtil\n" }, { "from": "gpt", "value": "package org.jbake.app;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.PrintStream;\nimport java.io.UnsupportedEncodingException;\nimport java.nio.charset.StandardCharsets;\nimport java.util.HashMap;\...
java
chosen
[ { "from": "human", "value": "Test case for [ 1942828 ] ResultSet getXXX where index is not zero reported as zero\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@9533 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package sfBugs;\n\nimport java.sql.ResultSet;\nimp...
java
chosen
[ { "from": "system", "value": "Use the new system now" }, { "from": "human", "value": "package info.u_team.u_team_test.init;\n\nimport info.u_team.u_team_core.util.registry.ClientRegistry;\nimport info.u_team.u_team_test.TestMod;\nimport net.minecraft.client.Minecraft;\nimport net.minecraft.clien...
java
chosen
[ { "from": "human", "value": "Add tests to highlight issue with unit mapping with MetricPrefix\n" }, { "from": "gpt", "value": "package io.pcp.parfait.dxm.semantics;\n\nimport static org.junit.Assert.assertNotNull;\nimport static systems.uom.unicode.CLDR.BIT;\nimport static systems.uom.unicode.CL...
java
chosen
[ { "from": "human", "value": "Add test case for AmountParser.\n" }, { "from": "gpt", "value": "package org.gnucash.android.test.unit.util;\n\nimport org.gnucash.android.util.AmountParser;\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.math.BigDecimal;\ni...
java
chosen
[ { "from": "human", "value": "test(core): Add unit test for adding headers\n" }, { "from": "gpt", "value": "package com.ibm.watson.developer_cloud.service;\n\nimport com.ibm.watson.developer_cloud.WatsonServiceUnitTest;\nimport com.ibm.watson.developer_cloud.http.HttpMediaType;\nimport com.ibm.wa...
java
chosen
[ { "from": "human", "value": "Test case for [ 1926389 ] Wrong line number printed/highlighted in bug.\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@9460 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package sfBugs;\r\n\r\npublic class Bug1926389 {\r\n\tpublic int...
java
chosen
[ { "from": "human", "value": "Add missing file for checkstyle plugin fix" }, { "from": "gpt", "value": "/*\n * Copyright 2011 The Netty Project\n *\n * The Netty Project licenses this file to you under the Apache License,\n * version 2.0 (the \"License\"); you may not use this file except in comp...
java
chosen
[ { "from": "human", "value": "Add test for AssignableDay entity\n\nSample test for testing date equality after and before persisting to\nthe db.\n" }, { "from": "gpt", "value": "package com.yammer.stresstime.entities;\n\nimport com.yammer.stresstime.managers.AssignableDayManager;\nimport com.yamm...
java
chosen
[ { "from": "human", "value": "Rename the serialization java file name\n" }, { "from": "gpt", "value": "\n//pcckage com.hotye.dchaoxiong.serializabletest; \n \n import java.io.FileInputStream; \n import java.io.FileOutputStream; \n import java.io.ObjectInputStream; \n import j...
java
chosen
[ { "from": "human", "value": "SDACK-18: Add support for arbitrary client events" }, { "from": "gpt", "value": "//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n// This file is a part of the 'esoco-business' project.\n// Copyright 2016 Elmar Sonnenschein, esoco GmbH,...
java
chosen
[ { "from": "human", "value": "Add some code about creating multiple threads\n\nAdd code snippets for creating multiple threads in java.\nIt is all from the chapter 11.\n" }, { "from": "gpt", "value": "class NewThread implements Runnable {\n public NewThread(String name) {\n this.name = ...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 69\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 association's relation test case" }, { "from": "gpt", "value": "package test;\n\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Test;\n\nimport P.A2;\nimport P.B2;\n\npublic class AssociationTests {\n\n\t@Test\n\tpublic void test() {\n\t\t\n\t\t...
java
chosen
[ { "from": "human", "value": "Add java solution for 168. Excel Sheet Column Title\n\n168. Excel Sheet Column Title: https://leetcode.com/problems/excel-sheet-column-title/" }, { "from": "gpt", "value": "package leetcode.excel_sheet_column_title;\n\npublic class Solution {\n public String conve...
java
chosen
[ { "from": "human", "value": "[Scenario] Add policy to prevent Remove from repositories\n\nnasa/MCT-Plugins#135 specifies containment rules which\nmust be met for Activity Type and Tag objects, including\nthat these must be contained in exactly one repository.\nAdding policy to prevent their removal (via Rem...
java
chosen
[ { "from": "human", "value": "Make an enum since only one instance should ever exist\n" }, { "from": "gpt", "value": "/*\n * The MIT License (MIT)\n * \n * Copyright (c) 2013 Jeff Nelson, Cinchapi Software Collective\n * \n * Permission is hereby granted, free of charge, to any person obtaining a...
java
chosen
[ { "from": "human", "value": "Add a releasable resource channel listener.\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, which is\n...
java
chosen
[ { "from": "human", "value": "Add an interface for Provider interception\n" }, { "from": "gpt", "value": "/*\n * Copyright 2019 Michael Rozumyanskiy\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 * Y...
java
chosen
[ { "from": "human", "value": "Camel-AWS: Create single Karaf feature tests for single components, aws-s3 component\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\...
java
chosen
[ { "from": "human", "value": "Add unit test based on user forum issue\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 regar...
java
chosen
[ { "from": "human", "value": "Camel-AWS: Create single Karaf feature tests for single components, aws-sns 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 missing file to previous commit.\n\n\ngit-svn-id: 18f68cb356f2bf53a217c39a7af1470588d83bce@1213593 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor lic...
java
chosen
[ { "from": "human", "value": "Add a smoke test for IdCollection.\n" }, { "from": "gpt", "value": "package ru.ifmo.nds.rundb.tests;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\nimport ru.ifmo.nds.IdCollection;\n\npublic class IdCollectionTests {\n @Test\n public void idCollectionCo...
java
chosen
[ { "from": "human", "value": "Add unit tests for Searvice.parse\n" }, { "from": "gpt", "value": "/*\n * Copyright 2011 Splunk, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n * not use this file except in compliance with the License. You may obtain\n * a c...
java
chosen
[ { "from": "human", "value": "[prototype] Add New Wizard (really, this time ...)\n" }, { "from": "gpt", "value": "package org.xtext.example.mydsl.plugin;\n\nimport org.eclipse.jface.viewers.IStructuredSelection;\nimport org.eclipse.jface.wizard.Wizard;\nimport org.eclipse.ui.INewWizard;\nimport o...
java
chosen
[ { "from": "human", "value": "Add JUnit testing for SubnetHandler class.\n\nChange-Id: I164fbf62f1a119ec8582740c84b77a1775e149b0\nSigned-off-by: Alexis de Talhouët <3f85d13b1d0fb141169e8f22f55d7ee87dcd5f00@inocybe.com>\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2015 Inocybe and others....
java
chosen
[ { "from": "human", "value": "Add test that covers failing scenario present react project\n" }, { "from": "gpt", "value": "package arez.integration.dagger.codegen;\n\nimport arez.annotations.ArezComponent;\nimport arez.annotations.Feature;\nimport arez.annotations.InjectMode;\nimport arez.annotat...
java
chosen
[ { "from": "human", "value": "Add introduction to funcitonal model\n" }, { "from": "gpt", "value": "package de.springbootbuch.reactive.watchednow;\n\nimport java.util.concurrent.CountDownLatch;\nimport static org.springframework.http.HttpMethod.GET;\nimport org.springframework.http.server.reactiv...
java
chosen
[ { "from": "human", "value": "Add wms server type enumiration." }, { "from": "gpt", "value": "/*\n * Copyright 2016 Serge Silaev aka iSergio <s.serge.b@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...
java
chosen
[ { "from": "human", "value": "Add a test harness for ConnectionDetailsFrame (runs and waits)" }, { "from": "gpt", "value": "/**\n * \n */\npackage mathsquared.resultswizard2;\n\nimport org.junit.Test;\n\n/**\n * @author MathSquared\n * \n */\npublic class ConnectionDetailsFrameTest {\n\n /**\n...
java
chosen
[ { "from": "human", "value": "Add test for roman class\n" }, { "from": "gpt", "value": "package org.lodder.subtools.sublibrary.control;\n\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\npublic class RomanTest {\n\n @Before\n public void setUp...
java
chosen
[ { "from": "human", "value": "Enable cache in http header" }, { "from": "gpt", "value": "@Override\npublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/static/**\")\n .addResourceLocations(\"classpath:/static/\")\n .setCacheCo...
java
chosen
[ { "from": "human", "value": "Create DAOS interfaces and implementations\n" }, { "from": "gpt", "value": "/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\npackage com.toscana.model.dao.implementations;\n\nimport com.toscana.model.dao.interfac...
java
chosen
[ { "from": "human", "value": "Add unit tests for ClusterManager.\n" }, { "from": "gpt", "value": "import cloudsimulator.clustersimulator.ClusterManager;\nimport cloudsimulator.clustersimulator.dto.Cluster;\nimport org.junit.Test;\n\npublic class TestClusterManager {\n\n @Test\n public void ...
java
chosen
[ { "from": "human", "value": "Add @OneToOne N+1 query issue test\n" }, { "from": "gpt", "value": "package com.vladmihalcea.book.hpjp.hibernate.association;\n\nimport com.vladmihalcea.book.hpjp.util.AbstractTest;\nimport org.junit.Test;\n\nimport javax.persistence.*;\nimport java.util.Date;\nimpor...
java
chosen
[ { "from": "human", "value": "Add basic implementation for ServletListener\n" }, { "from": "gpt", "value": "package com.epam.cdp.jee.todo.servlet.listener;\n\nimport javax.servlet.ServletRequestEvent;\nimport javax.servlet.ServletRequestListener;\nimport javax.servlet.annotation.WebListener;\nimp...
java
chosen
[ { "from": "human", "value": "Project7: Add ArrayAdapter for Book objects\n" }, { "from": "gpt", "value": "package com.example.georgekaraolanis.project7_booklistingapp;\n\nimport android.content.Context;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGrou...
java
chosen
[ { "from": "system", "value": "Add two more test suites, pending containment and configuration." }, { "from": "human", "value": "/**\n * Copyright (c) 2010 RedEngine Ltd, http://www.redengine.co.nz. All rights reserved.\n *\n * This program is licensed to you under the Apache License Version 2.0,...
java
chosen
[ { "from": "human", "value": ":star: Add listener to notify when the button to add a signature has been pressed\n" }, { "from": "gpt", "value": "package colector.co.com.collector.listeners;\n\nimport android.widget.LinearLayout;\n\nimport colector.co.com.collector.views.PhotoItemView;\nimport col...
java
chosen
[ { "from": "human", "value": "Add probe for PatternSet creation\n" }, { "from": "gpt", "value": "import com.sun.btrace.annotations.BTrace;\nimport com.sun.btrace.annotations.OnMethod;\nimport com.sun.btrace.annotations.OnTimer;\n\nimport java.util.Map;\nimport java.util.concurrent.atomic.AtomicIn...
java
chosen
[ { "from": "human", "value": "Add an incomplete impl of KeyValueFileReader\n" }, { "from": "gpt", "value": "/*\n * Licensed to the University of California, Berkeley under one or more contributor license\n * agreements. See the NOTICE file distributed with this work for additional information reg...
java
chosen
[ { "from": "human", "value": "Add failing test for wait().\n\nwait() should not cause other waiting threads to run, unless they have\nalready received a notification.\n" }, { "from": "gpt", "value": "package classes.test;\n\n/*\n * Verify that calling wait() does not cause other threads to wake u...
java
chosen
[ { "from": "human", "value": "Add a quick test of three-argument lambda\n" }, { "from": "gpt", "value": "\npackage net.restlesscoder.sandbox;\n\npublic class TriLambda {\n\n\t@FunctionalInterface\n\tpublic interface TernaryFunction {\n\t\tString apply(String a, String b, String c);\n\t}\n\n\tpubl...
java
chosen
[ { "from": "system", "value": "EranMes: Allow running the Android tests on a real device by specifying the external IP of the in-process test server.\n\nr14991\n" }, { "from": "human", "value": "/*\r\nCopyright 2010 WebDriver committers\r\nCopyright 2010 Google Inc.\r\nPortions copyright 2011 Sof...
java
chosen
[ { "from": "human", "value": "Create a cached callable for caching expensive stats\n" }, { "from": "gpt", "value": "package voldemort.utils;\n\n\nimport voldemort.annotations.concurrency.Threadsafe;\n\nimport java.util.concurrent.Callable;\nimport java.util.concurrent.atomic.AtomicReference;\n\n@...
java
chosen
[ { "from": "human", "value": "Add a main method to launch the SciJava Swing UI\n" }, { "from": "gpt", "value": "/*\n * #%L\n * SciJava UI components for Java Swing.\n * %%\n * Copyright (C) 2010 - 2017 Board of Regents of the University of\n * Wisconsin-Madison.\n * %%\n * Redistribution and use ...
java
chosen
[ { "from": "human", "value": "Add delayer for computing the time to sleep before try to deliver the message again. See JAMES-977\n\ngit-svn-id: de9d04cf23151003780adc3e4ddb7078e3680318@919131 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/**********************************...
java
chosen
[ { "from": "human", "value": "Add integration tests for the org membership log entries." }, { "from": "gpt", "value": "package com.orgsync.api.integration;\n\nimport static org.junit.Assert.assertEquals;\n\nimport java.util.List;\n\nimport org.junit.AfterClass;\nimport org.junit.Test;\n\nimport c...
java
chosen
[ { "from": "human", "value": "Add unit test to retrieve workflow and job configurations.\n" }, { "from": "gpt", "value": "package org.apache.helix.integration.task;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE fil...
java
chosen
[ { "from": "human", "value": "OAK-4503: Update count increases with rebase\n\nAdd ignored test\n\ngit-svn-id: 67138be12999c61558c3dd34328380c8e4523e73@1750052 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or...
java
chosen
[ { "from": "human", "value": "[Java] Convert binary tree to singly linked list.\n" }, { "from": "gpt", "value": "package binarytrees;\n\nimport common.Pair;\n\n/**\n * Given a binary tree, convert it into a singly linked list. The \"next\" pointer\n * in each node of the list is defined using the...
java
chosen
[ { "from": "human", "value": "Add small database interface class.\n" }, { "from": "gpt", "value": "package database;\n\n/**\n * A simple class that calls the database.\n *\n * Created by alex on 9/18/15.\n */\n\nimport java.sql.*;\nimport java.util.ArrayList;\n\npublic class Database {\n // JD...
java
chosen
[ { "from": "human", "value": "PIG-3426: Add support for removing s3 files\n\ngit-svn-id: c4d08399a8c07badad33cbf13a0909bacb78f41f@1521211 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.pig.tools.grunt;\n\nimport static org.junit.Assert.assertFalse;\nimpor...
java
chosen
[ { "from": "human", "value": "Implement of Camel case in IJava\n" }, { "from": "gpt", "value": "package fullcodes.session.camelCase;\n\n/**\n * Created by dotcom on 7/7/17.\n */\n\n//Pascal case\npublic class FootBall {\n\n private double BallWeight;\n\n\n //Pascal case\n public FootBall...
java
chosen
[ { "from": "human", "value": "Add java solution for 15. 3Sum\n\n15. 3Sum: https://leetcode.com/problems/3sum/" }, { "from": "gpt", "value": "package leetcode._3sum;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\npublic class Solution {\n public ArrayList<ArrayList<Integer>> threeS...
java
chosen
[ { "from": "human", "value": "Create a location for spawn locations of creatures" }, { "from": "gpt", "value": "package creatures;\r\n\r\npublic class Location {\r\n\r\nprivate final float x, y, z; // the public coordinates\r\n\r\npublic Location() {\r\n this(0,0,0);\r\n}\r\n\r\npublic Locatio...
java
chosen
[ { "from": "human", "value": "Add simple benchmark for quadtree\n" }, { "from": "gpt", "value": "package uk.co.ticklethepanda.location.history.cartograph;\n\nimport org.apache.logging.log4j.LogManager;\nimport org.apache.logging.log4j.Logger;\nimport org.junit.jupiter.api.BeforeAll;\nimport org.j...
java
chosen
[ { "from": "human", "value": "Add java solution for 234. Palindrome Linked List\n\n234. Palindrome Linked List: https://leetcode.com/problems/palindrome-linked-list/" }, { "from": "gpt", "value": "package leetcode.palindrome_linked_list;\n\nimport common.ListNode;\n\npublic class Solution {\n ...
java
chosen
[ { "from": "human", "value": "Add an initial test for the URI pool, more tests needed." }, { "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 i...
java
chosen
[ { "from": "human", "value": "Test MessageKey parcel and unparceling.\n" }, { "from": "gpt", "value": "package com.openxc.messages;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.*;\nimport static or...
java
chosen
[ { "from": "human", "value": "Create test global loot modifiers provider" }, { "from": "gpt", "value": "package info.u_team.u_team_test.data.provider;\n\nimport java.util.function.Supplier;\n\nimport info.u_team.u_team_core.data.*;\nimport info.u_team.u_team_core.util.TriConsumer;\nimport net.min...
java
chosen
[ { "from": "human", "value": "Create the class used to find which intervals which requires realignment.\n" }, { "from": "gpt", "value": "package com.github.sparkcaller.preprocessing;\n\nimport com.github.sparkcaller.BaseGATKProgram;\nimport com.github.sparkcaller.Utils;\nimport org.apache.spark.a...
java
chosen
[ { "from": "human", "value": "Add solution to the Balanced brackets problem.\n" }, { "from": "gpt", "value": "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Stack;\n\n// https://www...
java
chosen
[ { "from": "human", "value": "Replace gaf, tsv and gpad specific versions with this generic version.\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.annotation.download.http;\n\nimport uk.ac.ebi.quickgo.annotation.model.Annotation;\nimport uk.ac.ebi.quickgo.rest.search.results.QueryRes...
java
chosen
[ { "from": "human", "value": "Add solution for 445. Add Two Numbers II" }, { "from": "gpt", "value": "package Solution;\n\nimport java.util.ArrayList;\n\n//445. Add Two Numbers II\n/**\n * You are given two non-empty linked lists representing two non-negative integers. \n * The most significant d...
java
chosen
[ { "from": "human", "value": "Add a supplier memoizer as an utility interface\n" }, { "from": "gpt", "value": "package org.ethereumclassic.etherjar.util;\n\nimport java.util.function.Supplier;\n\n/**\n * Lazy related util methods.\n */\npublic interface Lazy {\n\n /**\n * Memoize a given {...
java
chosen
[ { "from": "human", "value": "Add health check unit tests\n" }, { "from": "gpt", "value": "package org.oddox.action.api;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNull;\nimport static org.junit.Assert.assertTrue;\nimport static org.junit.Assert.fail;\n\...
java
chosen
[ { "from": "human", "value": "Make an augmented list type for List<Object>\n" }, { "from": "gpt", "value": "package com.conveyal.r5.trove;\n\nimport java.util.*;\n\n/**\n * This List implementation wraps another existing List, and only allows extending it and retrieving values.\n */\npublic class...
java
chosen
[ { "from": "human", "value": "Add util class for set operations\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 License v1.0\n...
java
chosen
[ { "from": "human", "value": "Add tests for the Tetromino class\n" }, { "from": "gpt", "value": "package model;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Created by vincet on 31/03/16.\n */\npublic class TetrominoTest {\n private Tetrom...
java
chosen
[ { "from": "human", "value": "Add tool to clean workspace on Tachyon\n" }, { "from": "gpt", "value": "package tachyon.perf.tools;\n\nimport java.io.IOException;\n\nimport tachyon.conf.MasterConf;\nimport tachyon.perf.conf.PerfConf;\nimport tachyon.perf.fs.PerfFileSystem;\n\n/**\n * A tool to clea...
java
chosen