conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add tests for link between section and data element\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2017, University of Oslo\n *\n * All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted prov...
java
chosen
[ { "from": "human", "value": "Add JUnit test for CashControlDocumentService\n\n" }, { "from": "gpt", "value": "/*\n * Copyright 2008 The Kuali Foundation.\n * \n * Licensed under the Educational Community License, Version 1.0 (the \"License\");\n * you may not use this file except in compliance w...
java
chosen
[ { "from": "human", "value": "Add application configration reload event" }, { "from": "gpt", "value": "package org.gluu.service.cdi.event;\n\n/**\n * @author Yuriy Movchan Date: 05/25/2020\n */\npublic class AppConfigurationReloadEvent {\n}\n" } ]
java
chosen
[ { "from": "human", "value": "Add mock network implementation for unit tests" }, { "from": "gpt", "value": "\npackage org.jenkinsci.plugins.relution_publisher.unittest.mocks;\n\nimport org.jenkinsci.plugins.relution_publisher.logging.Log;\nimport org.jenkinsci.plugins.relution_publisher.net.Netwo...
java
chosen
[ { "from": "human", "value": "Add test case for default class writer strategy.\n" }, { "from": "gpt", "value": "package net.bytebuddy.dynamic;\n\nimport net.bytebuddy.dynamic.scaffold.ClassWriterStrategy;\nimport net.bytebuddy.pool.TypePool;\nimport net.bytebuddy.test.utility.MockitoRule;\nimport...
java
chosen
[ { "from": "human", "value": "Add unit test for editItem()\n\nDoesn't work yet.\nOPEN - task 48: Create \"Edit Item\" functionality \nhttp://github.com/DevOpsDistilled/OpERP/issues/issue/48" }, { "from": "gpt", "value": "package devopsdistilled.operp.client.items.controllers;\n\nimport static org...
java
chosen
[ { "from": "human", "value": "Add an empty class to the integration-tests module\n" }, { "from": "gpt", "value": "package org.gbif.registry.it;\n\n// This is a temporal fix for the following problem:\n// JAR will be empty - no content was marked for inclusion!\npublic class RegistryIntegrationTes...
java
chosen
[ { "from": "human", "value": ":white_check_mark: Add simple tests for DateTimeService\n" }, { "from": "gpt", "value": "/*\n * DefaultDateTimeServiceTest.java\n *\n * Copyright (C) 2018 [ A Legge Up ]\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. Se...
java
chosen
[ { "from": "human", "value": "Add the integer array transform\n\ngit-svn-id: 4741f78aa2d3279ddd0a34c053c42ca3ce19451b@716 124fc276-1b20-0410-8d16-dc08e6bff5e9\n" }, { "from": "gpt", "value": "\r\n\r\npackage simple.xml.transform;\r\n\r\nimport simple.xml.transform.Transform;\r\n\r\npublic class I...
java
chosen
[ { "from": "human", "value": "Introduce Feature for using SecurityFilter globally\n" }, { "from": "gpt", "value": "package org.pac4j.jax.rs.features;\n\nimport javax.servlet.http.HttpServletRequest;\nimport javax.ws.rs.container.ContainerRequestFilter;\nimport javax.ws.rs.core.Context;\nimport ja...
java
chosen
[ { "from": "human", "value": "Add messages interface for the new datasource wizard" }, { "from": "gpt", "value": "package com.codenvy.ide.ext.datasource.client.newdatasource;\n\nimport com.google.gwt.i18n.client.Messages;\n\npublic interface NewDatasourceWizardMessages extends Messages {\n\n @...
java
chosen
[ { "from": "human", "value": "Add Base class for long operations.\n" }, { "from": "gpt", "value": "package md.frolov.legume.client.util;\n\nimport java.util.Iterator;\n\nimport com.google.gwt.core.client.Scheduler;\n\n/** @author Ivan Frolov (ifrolov@tacitknowledge.com) */\npublic abstract class ...
java
chosen
[ { "from": "human", "value": "[ELY-884] Add a sorted mechanism factory for HTTP authentication mechanisms.\n" }, { "from": "gpt", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2017 Red Hat, Inc., and individual contributors\n * as indicated by the @author tags.\n *\n * L...
java
chosen
[ { "from": "human", "value": "Refactor out fake api client\n" }, { "from": "gpt", "value": "package kg.apc.jmeter.reporters;\n\nimport org.apache.commons.httpclient.methods.multipart.Part;\nimport org.apache.jorphan.logging.LoggingManager;\nimport org.apache.log.Logger;\nimport org.loadosophia.jm...
java
chosen
[ { "from": "human", "value": "Add new writeable dataset interface" }, { "from": "gpt", "value": "/*-\n * Copyright 2015 Diamond Light Source Ltd.\n *\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 Connect Servlets, tests and some code refactoring\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....
java
chosen
[ { "from": "human", "value": "Add a RuntimeException to be thrown for never-happens sanity checks and detected programming errors.\n\n\ngit-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@13388 4f837ed2-42f5-46e7-a7a5-fa17313484d4\n" }, { "from": "gpt", "value": "/*\n * $Id: ShouldNotHappenExcep...
java
chosen
[ { "from": "human", "value": "Prepare to strong referencing of stored subqueries\n" }, { "from": "gpt", "value": "/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\npackage com.eas.designer.application.query.completion;\n\nimport com.bearsoft.r...
java
chosen
[ { "from": "human", "value": "Add helper for managing System properties in tests.\n" }, { "from": "gpt", "value": "package net.dempsy.utils.test;\n\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Properties;\nimp...
java
chosen
[ { "from": "human", "value": "Add X-Frame-Options HTTP response header and set it to deny to reduce the risk of a clickjacking attack.\n" }, { "from": "gpt", "value": "package com.systelab.seed.infrastructure.security;\n\nimport javax.servlet.annotation.WebFilter;\nimport javax.servlet.*;\nimport...
java
chosen
[ { "from": "human", "value": "Add file to store configs\n" }, { "from": "gpt", "value": "/*\n * Copyright 2019 Google LLC\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 a copy of the...
java
chosen
[ { "from": "human", "value": "Add skeleton for DBus analyzer JavaFX app.\n" }, { "from": "gpt", "value": "package com.cathive.fx.dbus;\n\nimport javafx.application.Application;\nimport javafx.stage.Stage;\n\n/**\n * @author Benjamin P. Jung\n */\npublic class DBusAnalyzer extends Application {\n\...
java
chosen
[ { "from": "human", "value": "Add a localization annotation. Because implementations are a lot of work.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 __0x277F <0x277F@gmail.com>\n * and other copyright owners as documented in the project's IP log.\n *\n * Licensed under the Apache Lic...
java
chosen
[ { "from": "human", "value": "Add class for table selection listening\n\nTo reduce repeated code\n" }, { "from": "gpt", "value": "package editor.gui;\n\nimport java.awt.event.MouseEvent;\nimport java.awt.event.MouseListener;\n\nimport javax.swing.event.ListSelectionEvent;\nimport javax.swing.even...
java
chosen
[ { "from": "human", "value": "Create DB schema for Ingredient\n" }, { "from": "gpt", "value": "package com.example.profbola.bakingtime.provider;\n\nimport android.content.Context;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteOpenHelper;\n\nimport com.examp...
java
chosen
[ { "from": "human", "value": "Add a sci notation like universal numeric constructor\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2017 Barry DeZonia\n * \n * Redistribution and use in source and binary forms,...
java
chosen
[ { "from": "human", "value": "Add support for Geode and Cloud Foundry\n\n Updated\n 1. Provided new discovery implementation for Cloud Foundry. Now you can\n push NdBench on Cloud Foundry and run.\n 2. Added a new plugin for Geode in `local` and `cloud` mode.\n 3. Updated read me on how to run NdBench on Clo...
java
chosen
[ { "from": "human", "value": "Create a Geofance save listener\n" }, { "from": "gpt", "value": "package jasenmoloy.wirelesscontrol.io;\n\n/**\n * Created by jasenmoloy on 2/25/16.\n */\npublic interface OnGeofenceSaveFinishedListener {\n void onGeofenceSaveError();\n\n void onGeofenceSaveSuc...
java
chosen
[ { "from": "human", "value": "Add test: UI-initiated all-text deletion should not throw exception\n" }, { "from": "gpt", "value": "package org.fxmisc.richtext.api;\n\nimport com.nitorcreations.junit.runners.NestedRunner;\nimport javafx.stage.Stage;\nimport org.fxmisc.richtext.InlineCssTextAreaApp...
java
chosen
[ { "from": "human", "value": "Add unit tests for ServletContextCleaner class.\n\n\ngit-svn-id: 6ecf90c357d929aee58b51a998def805f2e9c62f@370739 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Copyright 2006 The Apache Software Foundation.\n * \n * Licensed under the Ap...
java
chosen
[ { "from": "human", "value": "OC-2738: Create unitTests in the library: unshare a item.\n" }, { "from": "gpt", "value": "/* ownCloud Android Library is available under MIT license\n * Copyright (C) 2014 ownCloud (http://www.owncloud.org/)\n * \n * Permission is hereby granted, free of charg...
java
chosen
[ { "from": "human", "value": "Test PMoores Problem with Procedure sptestexec\n\n\ngit-svn-id: 344b71073909399dbfbb72461917dbf939dfdc0a@23 97a8069c-bbaa-4fa2-9e49-561d8e0b19ef\n" }, { "from": "gpt", "value": "/*\n * AsTest.java\n *\n * Created on 10. September 2001, 09:44\n */\n\npackage freetds;\...
java
chosen
[ { "from": "human", "value": "Add marker interface that tools can implement to show that they know if they have content or not\n" }, { "from": "gpt", "value": "package org.sakaiproject.entity.api;\n\n/**\n * Services which implement ContentExistsAware declare that they are able to determine if th...
java
chosen
[ { "from": "human", "value": "Add CAST with JSON_PARSE benchmark\n\nNew benchmark to evaluate the performance gain with the optimization on\nCAST with JSON_PARSE\n" }, { "from": "gpt", "value": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file...
java
chosen
[ { "from": "human", "value": "Add manual test to count shaded jar files\n" }, { "from": "gpt", "value": "package org.gbif.checklistbank.cli;\n\nimport java.io.IOException;\nimport java.util.Collections;\nimport java.util.Enumeration;\nimport java.util.Map;\nimport java.util.TreeMap;\nimport java....
java
chosen
[ { "from": "human", "value": "Add SQL Server UPSERT alternative using locks\n" }, { "from": "gpt", "value": "package com.vladmihalcea.book.hpjp.hibernate.concurrency.upsert;\n\nimport com.vladmihalcea.book.hpjp.util.AbstractSQLServerIntegrationTest;\nimport org.hibernate.annotations.NaturalId;\ni...
java
chosen
[ { "from": "human", "value": "Add scenario where no injections present\n" }, { "from": "gpt", "value": "package arez.integration.dagger.codegen;\n\nimport arez.annotations.ArezComponent;\nimport arez.annotations.Feature;\nimport arez.annotations.InjectMode;\nimport arez.annotations.PerInstance;\n...
java
chosen
[ { "from": "human", "value": "Test the duplicate checker method in AssignedByPresetsConfig works properly.\n" }, { "from": "gpt", "value": "package uk.ac.ebi.quickgo.client.service.loader.presets.assignedBy;\n\nimport uk.ac.ebi.quickgo.client.service.loader.presets.assignedby.AssignedByPresetsCon...
java
chosen
[ { "from": "human", "value": "Move the package. Container user info\n\n\nSVN-Revision: 7817\n" }, { "from": "gpt", "value": "package gov.nih.nci.calab.dto.common;\n\n/**\n * This class includes properties for User Authentication and Authorization .\n * \n * \n * @author doswellj\n * \n */\n\npub...
java
chosen
[ { "from": "human", "value": "Add Apache HTTP client version of client system property timeout tests\n\ngit-svn-id: 00d204a5454029cb4c4f043d44e9809460a5ea01@923914 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\r\n * Licensed to the Apache Software Foundation (ASF) under...
java
chosen
[ { "from": "human", "value": "Add model for content of a note\n" }, { "from": "gpt", "value": "package lombelo.model;\n\nimport lombok.Data;\n\n/**\n * @author Niklas Wünsche\n */\n@Data\npublic class ContentOfNote {\n private String titleOfNote;\n private String textOfNote;\n}\n" } ]
java
chosen
[ { "from": "human", "value": "Add a sample of Java inner class\n" }, { "from": "gpt", "value": "\npublic class EnclosingEnum {\n\n private class Inner { }\n private class InnerA extends Inner { }\n private class InnerB extends Inner { }\n private class InnerC extends Inner { }\n\n ...
java
chosen
[ { "from": "human", "value": "Make overlay manager available as a plugin.\n\nThis used to be revision r3136.\n" }, { "from": "gpt", "value": "package imagej.ui.swing.plugins;\n\nimport imagej.plugin.ImageJPlugin;\nimport imagej.plugin.Menu;\nimport imagej.plugin.Plugin;\nimport imagej.ui.swing.Sw...
java
chosen
[ { "from": "human", "value": "Add an exeption to handle app sign up errors\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": "[ROCKETMQ-52] Add unit tests for LatencyFaultTolerance\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 in...
java
chosen
[ { "from": "human", "value": "Add util class, to hold assisted object related util methods\n\ngit-svn-id: 1119f77b1e9a9b65230954af94f4d37570a443ef@1230 7ef67a20-634e-90e6-9ab5-3f2075439470\n" }, { "from": "gpt", "value": "package com.inepex.ineom.shared.assistedobject;\r\n\r\nimport java.util.Arr...
java
chosen
[ { "from": "human", "value": "Add new image search query suggestion test.\n" }, { "from": "gpt", "value": "package pt.fccn.mobile.arquivo.tests.imagesearch;\n\nimport static org.hamcrest.CoreMatchers.containsString;\nimport static org.hamcrest.MatcherAssert.assertThat;\n\nimport org.junit.Test;\n...
java
chosen
[ { "from": "human", "value": "Implement peer close on connection degradation handler.\n" }, { "from": "gpt", "value": "package com.tacitknowledge.performance.degrade;\n\nimport com.tacitknowledge.performance.Component;\n\nimport io.netty.channel.ChannelHandlerContext;\nimport io.netty.channel.Cha...
java
chosen
[ { "from": "human", "value": "Add solution of 1 DP problem\n" }, { "from": "gpt", "value": "import java.util.*;\nimport java.io.*;\n\nclass Abbreviation {\n\n\tstatic boolean isUpperCase(char c) {\n\t\treturn (c >= 'A' && c <= 'Z');\n\t}\n\n\tstatic char upperCase(char c) {\n\t\tif(isUpperCase(c)...
java
chosen
[ { "from": "human", "value": "Add terrain profile to pti\n" }, { "from": "gpt", "value": "package flyway.paikkis;\n\nimport fi.nls.oskari.db.BundleHelper;\nimport fi.nls.oskari.domain.map.view.Bundle;\nimport fi.nls.oskari.util.FlywayHelper;\nimport org.flywaydb.core.api.migration.jdbc.JdbcMigrat...
java
chosen
[ { "from": "human", "value": "Upgrade ES 6 (new for alien4cloud-rest-it/netty4)\n" }, { "from": "gpt", "value": "package alien4cloud.it.utils.websocket;\n\nimport java.nio.charset.Charset;\nimport java.util.Set;\n\nimport lombok.extern.slf4j.Slf4j;\nimport io.netty.buffer.ByteBuf;\nimport io.nett...
java
chosen
[ { "from": "human", "value": "Revise drive system to use two motor controllers." }, { "from": "gpt", "value": "package edu.afs.robot;\r\n\r\n\r\n/**\r\n * The RobotMap is a mapping from the ports sensors and actuators are wired into\r\n * to a variable name. This provides flexibility changing wir...
java
chosen
[ { "from": "human", "value": "Sort Integers by The Power Value\n" }, { "from": "gpt", "value": "// sort\nimport java.util.*;\n\nclass Solution {\n \n private Map<Integer, Integer> map = new HashMap<>();\n \n public int getKth(int lo, int hi, int k) {\n\n for (int index = 1; ind...
java
chosen
[ { "from": "human", "value": "Introduce Requisition Predicate Helper\n- Helper applies most common requisition related where conditions.\nNote: this is only usable based on predefined alias for r for requisitions, p for programs, pr for products tables.\nA later version should remove the aliases for less con...
java
chosen
[ { "from": "human", "value": "Add utility for finding available JAVA_HOMEs to use in our tests.\n\nIt looks for env vars JDK_15, JDK_16 and JDK_17.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2011 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"...
java
chosen
[ { "from": "human", "value": "Create interface to data reader.\n" }, { "from": "gpt", "value": "package com.github.aureliano.evtbridge.core.agent;\n\nimport java.util.Map;\nimport java.util.Properties;\n\npublic interface IDataReader extends IAgent {\n\t\n\tpublic abstract void initializeResource...
java
chosen
[ { "from": "human", "value": "Add integration test for CLI beans\n" }, { "from": "gpt", "value": "package com.netflix.genie.agent.cli;\n\nimport com.beust.jcommander.JCommander;\nimport com.google.common.collect.Sets;\nimport com.netflix.genie.test.categories.IntegrationTest;\nimport org.junit.As...
java
chosen
[ { "from": "human", "value": "Add test for attribute ambiguity" }, { "from": "gpt", "value": "package org.simpleframework.xml.core;\r\n\r\nimport java.io.StringWriter;\r\n\r\nimport junit.framework.TestCase;\r\n\r\nimport org.simpleframework.xml.Attribute;\r\nimport org.simpleframework.xml.Path;\...
java
chosen
[ { "from": "human", "value": "Add a test for `SelectEventRecordsById`\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 an...
java
chosen
[ { "from": "human", "value": "Add the key/value store interface\n" }, { "from": "gpt", "value": "package com.example.crystalgame.library.datawarehouse;\n\nimport java.io.Serializable;\n\n/**\n * An interface describing the expected behaviour of a database\n * @author Balazs Pete, Allen Thomas Var...
java
chosen
[ { "from": "human", "value": "Add default implementation of CollapseNumeric to CompositeView.\n" }, { "from": "gpt", "value": "package net.imagej.ops.views;\n\nimport net.imagej.ops.view.ViewOps;\nimport net.imagej.ops.view.ViewOps.CollapseNumeric;\nimport net.imglib2.RandomAccessible;\nimport ne...
java
chosen
[ { "from": "human", "value": "Add Regenerate UUIDs in test files\n" }, { "from": "gpt", "value": "package eu.pericles.processcompiler.testutils;\n\nimport static org.junit.Assert.fail;\n\nimport java.io.IOException;\nimport java.util.Arrays;\nimport java.util.Collection;\n\nimport org.junit.Test;...
java
chosen
[ { "from": "system", "value": "CONNECT MPI Adapter - DB implementation - implemented MPI DB Checks\n" }, { "from": "human", "value": "/*\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n * \n * Copyright 2010(Year date of delivery) United States Government, as represented by the Sec...
java
chosen
[ { "from": "human", "value": "Add test for case where @ResponseStatus is used along with @ExceptionHandler\n\nRelates to: #16321\n" }, { "from": "gpt", "value": "package io.quarkus.spring.web.test;\n\nimport static io.restassured.RestAssured.when;\n\nimport org.jboss.shrinkwrap.api.ShrinkWrap;\ni...
java
chosen
[ { "from": "human", "value": "Add test for overview share controller\n" }, { "from": "gpt", "value": "package org.synyx.urlaubsverwaltung.calendar;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.mockito.Mock;\nimport org.mockito.junit.MockitoJUni...
java
chosen
[ { "from": "human", "value": "Add matrix operation code template. All methods are static." }, { "from": "gpt", "value": "package cmu.core;\r\n\r\npublic class MatOperation {\r\n\t/**\r\n\t * Generalized matrix multiplication\r\n\t * @param src1\r\n\t * @param src2\r\n\t * @return\r\n\t */\r\n\tpu...
java
chosen
[ { "from": "human", "value": "Create a calculator class. Allows users to add, subtract, multiply, divide, square-root, exponent, modulus, and average\n" }, { "from": "gpt", "value": "import java.util.Scanner;\n\npublic class Calculator{\n\n\tstatic double result, num1, num2;\n\n\tpublic static do...
java
chosen
[ { "from": "human", "value": "Create the skeleton for the first unit test\n" }, { "from": "gpt", "value": "/*\n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */\n...
java
chosen
[ { "from": "human", "value": "Solve problem 148 with O(N) space\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\n/**\n * https://leetcode.com/problems/sort-list/\n */\npublic class Problem148 {\n public ...
java
chosen
[ { "from": "human", "value": "Add the forgotten file for malformed exception\n" }, { "from": "gpt", "value": "package com.bloatit.framework.exceptions.lowlevel;\n\npublic class MalformedArgumentException extends IllegalArgumentException {\n private static final long serialVersionUID = -3164039...
java
chosen
[ { "from": "human", "value": "Add bonus content related to exceptions in test\n" }, { "from": "gpt", "value": "package com.workshop.wilqor.testing.bonus.examples;\n\nimport org.junit.Test;\n\nimport java.io.IOException;\n\n/**\n * Example demonstrating basic behavior of exceptions in JUnit\n * an...
java
chosen
[ { "from": "human", "value": "Add generic class for Json results from the service.\n" }, { "from": "gpt", "value": "package com.antew.redditinpictures.library.json;\n\nimport android.content.Intent;\nimport android.os.Bundle;\n\nimport com.antew.redditinpictures.library.service.RedditService;\nim...
java
chosen
[ { "from": "human", "value": "Add MVC controller to create messages\n" }, { "from": "gpt", "value": "package com.epam.itweek.boosenger.controller;\n\nimport java.util.Collections;\nimport java.util.concurrent.Callable;\n\nimport org.springframework.stereotype.Controller;\nimport org.springframewo...
java
chosen
[ { "from": "human", "value": "Create sound HashMap for KeyCode to file name\n" }, { "from": "gpt", "value": "package keymix;\n\nimport java.util.HashMap;\nimport javafx.scene.input.KeyCode;\nimport java.io.File;\n\n/**\n * HashMap to map keycodes to the corresponding sound they should produce.\n ...
java
chosen
[ { "from": "system", "value": "Remove a duplicated label from the collection view\n" }, { "from": "human", "value": "package com.intellij.debugger.streams.ui;\n\nimport com.intellij.debugger.DebuggerContext;\nimport com.intellij.debugger.engine.ContextUtil;\nimport com.intellij.debugger.engine.ev...
java
chosen
[ { "from": "human", "value": "Add test for baseIri extraction.\n" }, { "from": "gpt", "value": "package de.uni_stuttgart.vis.vowl.owl2vowl.parser.helper;\n\nimport org.junit.Test;\n\nimport static org.hamcrest.Matchers.is;\nimport static org.junit.Assert.assertThat;\n\npublic class ComparisonHelp...
java
chosen
[ { "from": "human", "value": "Add utility class to create list of names from bean\n\nWorks with bean with or without DbBeanLabels as fields.\n" }, { "from": "gpt", "value": "package org.beanmaker.util;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\npublic...
java
chosen
[ { "from": "human", "value": "Add script to create visualization for biic2017\n" }, { "from": "gpt", "value": "package forBiic;\n\nimport bdv.util.Bdv;\nimport bdv.util.BdvFunctions;\nimport ij.IJ;\nimport ij.ImagePlus;\nimport net.imglib2.FinalInterval;\nimport net.imglib2.img.Img;\nimport net.i...
java
chosen
[ { "from": "human", "value": "Delete Resource Scenario Implemented and Fixed\n" }, { "from": "gpt", "value": "package org.fundacionjala.automation.framework.utils.common;\n\nimport org.openqa.selenium.By;\nimport org.openqa.selenium.WebElement;\nimport org.openqa.selenium.support.ui.ExpectedCondi...
java
chosen
[ { "from": "human", "value": "Add simple service that generates points for a person over time\n" }, { "from": "gpt", "value": "package fgis.server.services;\n\nimport fgis.server.entity.fgis.Resource;\nimport fgis.server.entity.fgis.ResourceTrack;\nimport fgis.server.entity.fgis.dao.ResourceRepos...
java
chosen
[ { "from": "human", "value": "Add simple init and zoom test for the camera.\n" }, { "from": "gpt", "value": "package de.gurkenlabs.litiengine.graphics;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\npublic class CameraTests {\n\n @Test\n public void testInit() {\n Camera cam = new Ca...
java
chosen
[ { "from": "human", "value": "Stop the training once we achieved an expected score. Normally this will stop if the current score is lower than the initialized score. If you want to stop the training once the score increases the defined score set the lesserBetter flag to false (feel free to give the flag a be...
java
chosen
[ { "from": "human", "value": "Disable Websockets logging during native image build\n\nThis gets rid of the following messages when building the native image:\n\n```\n16:32:37,255 INFO [io.und.websockets] UT026004: Adding annotated client endpoint class io.quarkus.it.websocket.CodingClient\n16:32:37,260 INFO...
java
chosen
[ { "from": "human", "value": "Add java solution for 61. Rotate List\n\n61. Rotate List: https://leetcode.com/problems/rotate-list/" }, { "from": "gpt", "value": "package leetcode.rotate_list;\n\nimport common.ListNode;\n\npublic class Solution {\n public ListNode rotateRight(ListNode head, int...
java
chosen
[ { "from": "human", "value": "Add a serializer for LocalDateTime-\n" }, { "from": "gpt", "value": "package com.gruppe27.fellesprosjekt.common.serializers;\n\nimport com.esotericsoftware.kryo.Kryo;\nimport com.esotericsoftware.kryo.Serializer;\nimport com.esotericsoftware.kryo.io.Input;\nimport co...
java
chosen
[ { "from": "human", "value": "Use SequenceAccessorService to get the next sequence number for the ACI Model ID field.\n" }, { "from": "gpt", "value": "/*\r\n * Copyright 2010 The Kuali Foundation.\r\n * \r\n * Licensed under the Educational Community License, Version 1.0 (the \"License\");\r\n * ...
java
chosen
[ { "from": "human", "value": "[BEAM-8470] Add a test for the most simple possible Combine\n" }, { "from": "gpt", "value": "package org.apache.beam.runners.spark.structuredstreaming.translation.batch;\n\nimport java.io.Serializable;\nimport org.apache.beam.runners.spark.structuredstreaming.SparkPi...
java
chosen
[ { "from": "human", "value": "Add test for ForEach moulder\n" }, { "from": "gpt", "value": "package moulder.moulds;\n\nimport moulder.Moulder;\nimport moulder.values.SeqValue;\nimport moulder.values.SimpleBox;\nimport org.jsoup.Jsoup;\nimport org.jsoup.nodes.Document;\nimport org.jsoup.nodes.Elem...
java
chosen
[ { "from": "human", "value": "Add new file missing from last commit.\n\ngit-svn-id: 9e047e1e624cce0a2485e750063112e834f85522@7342 fc29be9c-2cb0-420d-b520-73dbd18add6e\n" }, { "from": "gpt", "value": "/*\r\n * To change this template, choose Tools | Templates\r\n * and open the template in the edi...
java
chosen
[ { "from": "human", "value": "Add User Agent header wrapper\n" }, { "from": "gpt", "value": "/*\n * Copyright 2011 Eric F. Savage, code@efsavage.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.\...
java
chosen
[ { "from": "human", "value": "Standardize JobList response with a Model object\n" }, { "from": "gpt", "value": "/**\n * Copyright 2016, RadiantBlue Technologies, Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with...
java
chosen
[ { "from": "human", "value": "Create : 217 Contains Duplicate\n" }, { "from": "gpt", "value": "public class Solution {\n\n public boolean containsDuplicate(int[] nums) {\n\n Arrays.sort(nums);\n\n for (int i = 1; i < nums.length; i++) {\n\n if (nums[i] == nums[i - 1]) ...
java
chosen
[ { "from": "human", "value": "Add a TestDrive for the editor in legacy mode\n\nSigned-off-by: Johannes Schindelin <53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de>\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyri...
java
chosen
[ { "from": "human", "value": "Test TimerTask with Mvel expression\n" }, { "from": "gpt", "value": "package org.aspectj.aspect;\n\nimport com.google.gson.GsonBuilder;\nimport org.aspectj.configuration.model.Artifact;\nimport org.aspectj.configuration.model.ClassRef;\nimport org.aspectj.configurati...
java
chosen
[ { "from": "human", "value": "Add integration test for arez dependencies only and calling reportStale\n" }, { "from": "gpt", "value": "package arez.integration.observed;\n\nimport arez.Observer;\nimport arez.annotations.ArezComponent;\nimport arez.annotations.Observable;\nimport arez.annotations....
java
chosen
[ { "from": "human", "value": "Add Operation helpers to replace Java 8 Streams, and Guava's utils\n" }, { "from": "gpt", "value": "\npackage io.dmitryivanov.crdt.helpers;\n\nimport java.util.*;\n\npublic final class Operations {\n private Operations() {\n // No instances\n }\n\n pu...
java
chosen
[ { "from": "human", "value": "Add utility to split byte arrary into chunks\n" }, { "from": "gpt", "value": "package net.interfax.rest.client.util;\n\npublic class ArrayUtil {\n\n public static byte[][] chunkArray(byte[] array, int chunkSize) {\n int numOfChunks = (int)Math.ceil((double)...
java
chosen
[ { "from": "human", "value": "Add flip horizontal shader wrapper class" }, { "from": "gpt", "value": "package com.haxademic.core.draw.filters.shaders;\n\nimport processing.core.PApplet;\n\npublic class FlipHFilter\nextends BaseFilter {\n\n\tpublic static FlipHFilter instance;\n\t\n\tpublic FlipHF...
java
chosen
[ { "from": "human", "value": "Add unit tests for CompositeVisitorHelper\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 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 * Yo...
java
chosen
[ { "from": "human", "value": "Apply patch for HARMONY-3388([classlib][luni] Refactor the default constuctor of NotSerializableException)\n\nsvn path=/harmony/; revision=518078\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contribu...
java
chosen