conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add unit test for radix sort BWT\n" }, { "from": "gpt", "value": "/*-\n * Copyright (c) 2014 Mikolaj Izdebski\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 ob...
java
chosen
[ { "from": "human", "value": "Delete dialog for deleting contacts\n" }, { "from": "gpt", "value": "package de.fau.amos.virtualledger.android.views.contacts.Delete;\n\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.content.Context;\nimport android.content.DialogInter...
java
chosen
[ { "from": "human", "value": "Add tests for OffsetDateTimeTypeAdapter to test JSON conversion\n" }, { "from": "gpt", "value": "package de.philipphager.disclosure.api.adapters;\n\nimport com.google.gson.JsonDeserializationContext;\nimport com.google.gson.JsonElement;\nimport com.google.gson.JsonPr...
java
chosen
[ { "from": "human", "value": "Add unit tests for ImapPushState\n" }, { "from": "gpt", "value": "package com.fsck.k9.mail.store.imap;\n\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.robolectric.RobolectricTestRunner;\nimport org.robolectric.annotation.Config;\n\nimport st...
java
chosen
[ { "from": "human", "value": "[androsdk-1087] Add user settings DI module\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2004-2019, University of Oslo\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provide...
java
chosen
[ { "from": "human", "value": "[BEAM-11714] Add dummy class for testing\n" }, { "from": "gpt", "value": "package org.apache.beam.sdk.extensions.sql.zetasql;\n\n// Dummy class for testing spotbugs results in Jenkins.\n// TODO(BEAM-11714) Delete class before merge\n\npublic class Dummy implements Cl...
java
chosen
[ { "from": "human", "value": "Add unit test for MeanSpeedFeature" }, { "from": "gpt", "value": "package de.biomedical_imaging.traj.features.test;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.Test;\n\nimport de.biomedical_imaging.traJ.Trajectory;\nimport de.biomedical_imaging.traJ.feat...
java
chosen
[ { "from": "human", "value": "Add test for multiple mapsid\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.ArrayList;\nimport...
java
chosen
[ { "from": "human", "value": "Add base unit test for operators\n" }, { "from": "gpt", "value": "package org.verapdf.model.impl.pb.operator.base;\n\nimport org.apache.pdfbox.cos.COSObject;\nimport org.apache.pdfbox.cos.COSObjectKey;\nimport org.apache.pdfbox.cos.COSStream;\nimport org.apache.pdfbo...
java
chosen
[ { "from": "human", "value": "Add health-check controller to oxtrust-server" }, { "from": "gpt", "value": "package org.gluu.oxtrust.ws.rs.controller;\n\nimport javax.enterprise.context.ApplicationScoped;\nimport javax.ws.rs.GET;\nimport javax.ws.rs.POST;\nimport javax.ws.rs.Path;\nimport javax.ws...
java
chosen
[ { "from": "human", "value": "Add some basic tests for synchronizer\n" }, { "from": "gpt", "value": "/**\n * Copyright 2017 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 c...
java
chosen
[ { "from": "human", "value": "Move string tidy method to simple utility class\n" }, { "from": "gpt", "value": "package utils;\n\n/**\n * Created by emma on 13/04/2016.\n *\n * @author emma\n * <p>\n * Simple utility class to tidy up user entered strings before saving to database\n...
java
chosen
[ { "from": "human", "value": "Create skeleton for problem 315\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * https://leetcode.com/problems/count-of-smaller-numbers-after-self/\n */\npublic class Problem315 {\n public List<In...
java
chosen
[ { "from": "human", "value": "Add fake test for tosser\n" }, { "from": "gpt", "value": "package org.fidonet.tests.toss;\n\n/**\n * Created by IntelliJ IDEA.\n * User: sly\n * Date: 9/2/11\n * Time: 5:42 PM\n * To change this template use File | Settings | File Templates.\n */\npublic class TestTo...
java
chosen
[ { "from": "human", "value": "Add dashboard util to commons project" }, { "from": "gpt", "value": "package org.eclipse.viatra.cep.mqtt.commons.utils;\r\n\r\nimport java.text.SimpleDateFormat;\r\nimport java.util.Date;\r\n\r\nimport org.apache.log4j.Logger;\r\nimport org.eclipse.viatra.cep.mqtt.co...
java
chosen
[ { "from": "system", "value": "Maven: Add Dependency QuickFix improvement\nMaven: Runner optimization\nMaven: better process cancelling handling" }, { "from": "human", "value": "package org.jetbrains.idea.maven.dom.intentions;\n\nimport com.intellij.codeInsight.quickfix.UnresolvedReferenceQuickFi...
java
chosen
[ { "from": "human", "value": "Add mixed metric request to be used for inserting multiple types of metrics.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2014-2015 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache...
java
chosen
[ { "from": "human", "value": "[LOG4J2-1299] Add pattern converter for thread id in PatternLayout. Add\nmissing unit test on existing thread name converter." }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. ...
java
chosen
[ { "from": "human", "value": "Add class to check distance between plots" }, { "from": "gpt", "value": "package org.openforis.collect.earth.sampler.utils;\r\n\r\nimport java.io.File;\r\n\r\nimport org.geotools.referencing.GeodeticCalculator;\r\nimport org.geotools.referencing.crs.DefaultGeographic...
java
chosen
[ { "from": "human", "value": "Remove text between CommentRangeStart and CommentRangeEnd\n" }, { "from": "gpt", "value": "package com.aspose.words.examples.programming_documents.comments;\n\nimport com.aspose.words.*;\nimport com.aspose.words.examples.Utils;\n\n@SuppressWarnings(\"unchecked\")\npu...
java
chosen
[ { "from": "human", "value": "Add helper for api version extraction\n" }, { "from": "gpt", "value": "package com.github.dockerjava.utils;\n\nimport com.github.dockerjava.api.DockerClient;\nimport com.github.dockerjava.core.RemoteApiVersion;\n\n/**\n * @author Kanstantsin Shautsou\n */\npublic cla...
java
chosen
[ { "from": "human", "value": "Add test for readProjectHash when remote project does not have the hash rel.\n" }, { "from": "gpt", "value": "package ca.corefacility.bioinformatics.irida.repositories.remote.impl;\n\nimport org.apache.el.stream.Optional;\nimport org.junit.jupiter.api.BeforeEach;\nim...
java
chosen
[ { "from": "human", "value": "Test for model serializer + frozen layers\n" }, { "from": "gpt", "value": "package org.deeplearning4j.nn.transferlearning;\n\nimport org.deeplearning4j.nn.conf.NeuralNetConfiguration;\nimport org.deeplearning4j.nn.conf.Updater;\nimport org.deeplearning4j.nn.conf.laye...
java
chosen
[ { "from": "human", "value": "Use <span> instead of <font> (as in GradientFormatter) to keep Mozilla happy.\n\n\ngit-svn-id: 4c5078813df38efa56971a28e09a55254294f104@151029 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.lucene.search.highlight;\n/**\n * C...
java
chosen
[ { "from": "human", "value": "XCOMMONS-511: Add concept of log tree\n* move all marker related classes to new package\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 a Java BigInteger varint to hex utility\n\nUseful for generating test data.\n" }, { "from": "gpt", "value": "class TestVarint {\n // Hex print helper\n final protected static char[] hexArray = \"0123456789ABCDEF\".toCharArray();\n public static String by...
java
chosen
[ { "from": "human", "value": "Add advanced options to connector retrieval\n" }, { "from": "gpt", "value": "/*\n* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n*\n* WSO2 Inc. licenses this file to you under the Apache License,\n* Version 2.0 (the \"License\"); you ma...
java
chosen
[ { "from": "human", "value": "Add JUnit testing for SecurityServicesImpl class.\n\nChange-Id: I9fa3af98acc89d4ea10764f573c0bcc2050f0e09\nSigned-off-by: Alexis de Talhouët <3f85d13b1d0fb141169e8f22f55d7ee87dcd5f00@inocybe.com>\n" }, { "from": "gpt", "value": "package org.opendaylight.ovsdb.opensta...
java
chosen
[ { "from": "human", "value": "Add identifier strategy for ClientRegistration\n\nFixes gh-4561\n" }, { "from": "gpt", "value": "/*\n * Copyright 2012-2017 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except ...
java
chosen
[ { "from": "human", "value": "Enable integartion test framework for ES java components\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2005-2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \...
java
chosen
[ { "from": "human", "value": "Add base for JS code generators\n" }, { "from": "gpt", "value": "/*\n * Copyright 2018, TeamDev. 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 follow...
java
chosen
[ { "from": "human", "value": "Add a simple test for ContextManager.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017, Google Inc.\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 c...
java
chosen
[ { "from": "human", "value": "Add an abstract service class\n" }, { "from": "gpt", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2010, Red Hat Middleware LLC, and individual contributors\n * as indicated by the @author tags. See the copyright.txt file in the\n * distribu...
java
chosen
[ { "from": "human", "value": "Package javadoc for the `tasks.io` package.\n" }, { "from": "gpt", "value": "/**\r\n * This package provides classes which perform image input and output\r\n * operations in conjunction with the \r\n * {@link net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask} c...
java
chosen
[ { "from": "human", "value": "Check coverage for enum methods\n" }, { "from": "gpt", "value": "package examples.pokerhands.valuation;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.Test;\n\npublic class RankTest {\n\n\t@Test\n\tpublic void testContainsAllHandsAndNone() {\n\t\tassertEqua...
java
chosen
[ { "from": "human", "value": "Include IAY's test script to check for full crypto in Java\n" }, { "from": "gpt", "value": "import java.security.InvalidKeyException;\nimport java.security.NoSuchAlgorithmException;\nimport java.security.Key;\nimport java.security.MessageDigest;\nimport javax.crypto....
java
chosen
[ { "from": "human", "value": "Add example test + failing test to check if travis is working\n\n" }, { "from": "gpt", "value": "package GameNationBackEnd;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Created by lucas on 17/11/2016.\n */\npublic class GameTest {\n\n ...
java
chosen
[ { "from": "system", "value": "Add a message for the wait multiplier" }, { "from": "human", "value": "/*******************************************************************************\n * Copyright (c) 2017 Red Hat Inc and others.\n *\n * All rights reserved. This program and the accompanying mate...
java
chosen
[ { "from": "human", "value": "Add Chellenge class to model a challenge\n" }, { "from": "gpt", "value": "package ch.epfl.sweng.project.Model;\n\n/**\n * This class models a Challenge, it contains your Run and your opponent one.\n *\n * @author Pablo Pfister\n */\npublic class Challenge {\n priv...
java
chosen
[ { "from": "human", "value": "Add dummy RememeberMe bean to conform old xhtml pages" }, { "from": "gpt", "value": "package org.xdi.model.security;\r\n\r\nimport java.io.Serializable;\r\n\r\nimport javax.enterprise.context.RequestScoped;\r\nimport javax.inject.Named;\r\n\r\n/**\r\n * Represents a ...
java
chosen
[ { "from": "human", "value": "Add file to hold a followedTag and its id" }, { "from": "gpt", "value": "// 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 c...
java
chosen
[ { "from": "human", "value": "Test of Object View Methods\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2013-2014, Arjuna Technologies Limited, Newcastle-upon-Tyne, England. All rights reserved.\n */\n\npackage com.arjuna.databroker.tests.metadata.rdf;\n\nimport java.util.HashMap;\nimport...
java
chosen
[ { "from": "human", "value": "Write Test to check if Error Messages are propagated properly through MondoFailures on dynamically registered Subcommands\n" }, { "from": "gpt", "value": "package mondocommand.dynamic;\n\nimport static org.junit.Assert.*;\nimport mondocommand.CallInfo;\nimport mondoc...
java
chosen
[ { "from": "human", "value": "XWIKI-17574: Implement a Live Data source that reuses existing Live Table results\n* Add missing test\n" }, { "from": "gpt", "value": "/*\n * See the NOTICE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is ...
java
chosen
[ { "from": "human", "value": "Add package info for exported package\n\ngit-svn-id: 6eed74fe9a15c8da84b9a8d7f2960c0406113ece@1706144 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor licen...
java
chosen
[ { "from": "human", "value": "[test] Implement separate configurator for repository tests\n" }, { "from": "gpt", "value": "/*-\n * Copyright (c) 2013-2014 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance wit...
java
chosen
[ { "from": "human", "value": "Add test for INSTANCE_OF MLang.\n" }, { "from": "gpt", "value": "/**\n * @license\n * Copyright 2018 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\npackage foam.mlang;\n\nimport foam.core.X;\nimport foam.nanos.auth.*;\ni...
java
chosen
[ { "from": "human", "value": "[MTOMCAT-191] Return the \"redeploy\" goal to the Maven plugin\n\ngit-svn-id: 127192e8212bb0c5b19f2c3aa333cc66dfed8a45@1418084 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.tomcat.maven.plugin.tomcat7.deploy;\n\n/*\n * Licen...
java
chosen
[ { "from": "human", "value": "java: Add example that uses P-Store Java API\n\nSigned-off-by: Karim Osman <94396faf6cc817be76165477038b3cfa832e89a4@reaktor.fi>\nSigned-off-by: Kare Nuorteva <9ddc85c347529f7b35a7cd6b44bef03c7222a8be@reaktor.fi>\nSigned-off-by: Riku Hurmalainen <6c06622681729c81e7a2d921b037b07a...
java
chosen
[ { "from": "human", "value": "Solve homework3-problem3: Symmetric Numbers in Range\n" }, { "from": "gpt", "value": "import java.util.Scanner;\n\npublic class SymmetricNumbersInRange {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int star...
java
chosen
[ { "from": "human", "value": "Add statement to problem 28\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 statement to problem 59\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 unit tests for XmpParser class.\n" }, { "from": "gpt", "value": "package com.google.android.libraries.motionphotoreader;\n\nimport com.adobe.internal.xmp.XMPException;\nimport com.adobe.internal.xmp.XMPMeta;\nimport com.google.common.primitives.Bytes;\n\nimport o...
java
chosen
[ { "from": "human", "value": "SO-3965: Add lock context to non-SNOMEDCT import requests" }, { "from": "gpt", "value": "/*\n * Copyright 2020 B2i Healthcare Pte Ltd, http://b2i.sg\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in comp...
java
chosen
[ { "from": "human", "value": "Add type qualifier test case\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@14251 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package bugIdeas;\n\nimport java.lang.annotation.Documented;\nimport java.lang.annotation.Retention;\nimpo...
java
chosen
[ { "from": "human", "value": "Test good and bad byte enum marshaller creation.\n\n" }, { "from": "gpt", "value": "//\n// $Id$\n//\n// Depot library - a Java relational persistence library\n// Copyright (C) 2006-2010 Michael Bayne and Pär Winzell\n//\n// This library is free software; you can redi...
java
chosen
[ { "from": "human", "value": "DBZ-5097: Add tests to cover PostgresErrorHandler behaviour\n\nThe error handler had no unit tests at all, so I thought it might be a good idea\nto add some tests to verify the behaviour given there's a bunch of different\nways to determine if something is retryable.\n" }, {...
java
chosen
[ { "from": "human", "value": "Add unit test for BuildPlatform.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2013 Andrew Everitt, Andrew Heckford, Daniele Masato\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with t...
java
chosen
[ { "from": "human", "value": "Add static methods for render package" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright 2014, 2021 gwt-ol\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may...
java
chosen
[ { "from": "human", "value": "Add an XmlAdapter for AttributeTypes.\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * This file is part of OpenNMS(R).\n *\n * Copyright (C) 2010-2016 The OpenNMS Group, Inc.\n * OpenNMS(R) is Copy...
java
chosen
[ { "from": "human", "value": "Add tests for PushLimitThroughMarkDistinct rule\n" }, { "from": "gpt", "value": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\...
java
chosen
[ { "from": "human", "value": "Add Bootstrap BooleanRadioChoice as an alternative to single checbox\n" }, { "from": "gpt", "value": "package lt.inventi.wicket.component.bootstrap.form;\n\nimport java.util.Arrays;\n\nimport org.apache.wicket.markup.html.form.IChoiceRenderer;\nimport org.apache.wick...
java
chosen
[ { "from": "human", "value": ":white_check_mark: Add tests for password check in authentication service\n" }, { "from": "gpt", "value": "/*\n * DefaultAuthenticationService.java\n *\n * Copyright (C) 2018 [ A Legge Up ]\n *\n * This software may be modified and distributed under the terms\n * of ...
java
chosen
[ { "from": "human", "value": "[validation] Add needed file for 'names are unique' syntax error messages\n" }, { "from": "gpt", "value": "package edu.kit.iti.formal.pse.worthwhile.validation;\n\nimport org.eclipse.emf.ecore.EClass;\nimport org.eclipse.emf.ecore.EObject;\nimport org.eclipse.emf.eco...
java
chosen
[ { "from": "human", "value": "Create a junit test for the Controller class. Test the method that load\nthe fund data in the data base, the pass criteria is that the fund rate\nlist should be greater than 0." }, { "from": "gpt", "value": "package cl.fatman.capital.fund;\n\nimport static org.hamcre...
java
chosen
[ { "from": "human", "value": "[JENKINS-34350] Fix POST to /git/notifyCommit with CSRF protection on\n\nInspired by\nhttps://github.com/jenkinsci/github-plugin/commit/5c2a04169171cb8e36da7ba39c4003aa318c74cb\n" }, { "from": "gpt", "value": "package hudson.plugins.git;\n\nimport hudson.Extension;\n...
java
chosen
[ { "from": "human", "value": "[PSM] Check in generated Xtend Java files.\n" }, { "from": "gpt", "value": "/**\n * generated by Xtext\n */\npackage de.uni_paderborn.fujaba.muml.allocation.ilp.lpsolve.xtext.ui.contentassist;\n\nimport de.uni_paderborn.fujaba.muml.allocation.ilp.lpsolve.xtext.ui.con...
java
chosen
[ { "from": "human", "value": "ENG-6104: Add initial new test for adhoc alter table\n" }, { "from": "gpt", "value": "/* This file is part of VoltDB.\n * Copyright (C) 2008-2014 VoltDB Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and...
java
chosen
[ { "from": "human", "value": "Add unit test for DeviceNotFoundException" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2013 Klaus Reimer <k@ailis.de>\n * See LICENSE.md for licensing information.\n */\npackage de.ailis.usb4java;\n\nimport static org.junit.Assert.assertSame;\n\nimport org.jun...
java
chosen
[ { "from": "human", "value": "Add Optional type JSON (de)serialization unit tests\n\nRelease-Notes: skip\nChange-Id: Ied9fc2f702922cc61a8a9e0b2bf9b372539eddb7\n(cherry picked from commit da9078c3c3ee92f6c55ce4063603974c70f00c9c)\n" }, { "from": "gpt", "value": "// Copyright (C) 2022 The Android O...
java
chosen
[ { "from": "human", "value": "Add statement to problem 52\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2014 Pedro Vicente Gómez Sánchez.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ...
java
chosen
[ { "from": "human", "value": "Test for event handling of projections.\n\n\ngit-svn-id: ed25c26de1c5325e8eb0deed0b990ab8af8a4def@2324 7c6358e6-4a41-0410-a743-a5b2a554c398\n" }, { "from": "gpt", "value": "/*\n * BioJava development code\n *\n * This code may be freely distributed...
java
chosen
[ { "from": "human", "value": "XWIKI-6574: Add XWiki extensions repository\nForgot to commit a file" }, { "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; you can redistribute...
java
chosen
[ { "from": "human", "value": "Add a method in the utils fonction.\n" }, { "from": "gpt", "value": "import java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Locale.FilteringMode;\n\nimport javax.imageio.str...
java
chosen
[ { "from": "human", "value": "Add parameter validator for digdag cli\n\nAdd validate params whether or not and these List covert to Map.\n" }, { "from": "gpt", "value": "package io.digdag.cli;\n\nimport com.beust.jcommander.IParameterValidator;\nimport com.beust.jcommander.ParameterException;\n\...
java
chosen
[ { "from": "human", "value": "Add unit tests for EventHub\n" }, { "from": "gpt", "value": "package org.aanguita.jacuzzi.event.hub;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.mockito.Mockito.*;\n\n/**\n * Created by Alberto on 23/09/2016.\n */...
java
chosen
[ { "from": "human", "value": "Add test case for last node out of bounds\n" }, { "from": "gpt", "value": "package com.maxmind.geoip;\n\n/* CityLookupTest.java */\n\nimport static org.junit.Assert.assertEquals;\n\nimport java.io.IOException;\n\nimport org.junit.Test;\n\npublic class CityLookupIdxTe...
java
chosen
[ { "from": "human", "value": "Add a finish callback interface\n" }, { "from": "gpt", "value": "package info.feelyou.volleyplus;\n\n/**\n * Callback interface for http request finish\n * <p/>\n * Created by Yufei Huang\n */\npublic interface FinishListener {\n /**\n * Called when a http req...
java
chosen
[ { "from": "human", "value": "Add unit test for AtgInstallation.\n" }, { "from": "gpt", "value": "package atg.tools.ant.types;\n\nimport org.junit.Before;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\nimport org.junit.runner.RunWith;\nimport org.junit.r...
java
chosen
[ { "from": "human", "value": "Add unit tests for utils.MimeType\nThese tests were written using Diffblue Cover.\n\n\nFormer-commit-id: eb9cfcfd8824d3799c43fa4975f9f9ec1f416cdb" }, { "from": "gpt", "value": "package org.jkiss.utils;\n\nimport org.jkiss.utils.MimeType;\nimport org.junit.Assert;\nim...
java
chosen
[ { "from": "system", "value": "Remove unnecessary dependency from unit test\n" }, { "from": "human", "value": "package com.mdaniline.spring.autoproperties;\n\nimport com.mdaniline.spring.autoproperties.testclasses.TestBasicProperties;\nimport org.junit.After;\nimport org.junit.Before;\nimport org...
java
chosen
[ { "from": "human", "value": "Integrate the second big patch for OTR. With this patch all the required GSoC functions are available. Third commit.\n" }, { "from": "gpt", "value": "package net.java.sip.communicator.service.protocol;\n\nimport java.util.*;\n\npublic class OperationSetInstantMessage...
java
chosen
[ { "from": "human", "value": "Create a fake yes file that contains only 1 chapter for span test\n" }, { "from": "gpt", "value": "package yuku.alkitabconverter.paratest;\n\nimport java.io.RandomAccessFile;\nimport java.nio.charset.Charset;\nimport java.util.List;\n\nimport yuku.alkitab.yes.YesFile...
java
chosen
[ { "from": "human", "value": "Add the ability to calculate JRE version." }, { "from": "gpt", "value": "/*\n * Copyright (C) 2021 DiffPlug\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 obta...
java
chosen
[ { "from": "human", "value": "Check for DNA that is not stored on the sequence-level coordinate system.\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 terms of the GNU Lesser General Public...
java
chosen
[ { "from": "human", "value": "Format to add a simple test\n" }, { "from": "gpt", "value": "package edu.virginia.psyc.pi.mvc;\n\nimport edu.virginia.psyc.pi.Application;\nimport edu.virginia.psyc.pi.persistence.ParticipantDAO;\nimport edu.virginia.psyc.pi.persistence.ParticipantRepository;\nimport...
java
chosen
[ { "from": "human", "value": "Add some basic tests for our Trie\n" }, { "from": "gpt", "value": "package org.mozilla.focus.webkit.matcher;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.mozilla.focus.webkit.matcher.Trie.WhiteListTrie;\nimport org.robolectric.RobolectricTe...
java
chosen
[ { "from": "human", "value": "Add unit tests for SimpleProcessManager\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 Viktor Csomor\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 obt...
java
chosen
[ { "from": "human", "value": "Add custom exception for querier class\n" }, { "from": "gpt", "value": "// 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 co...
java
chosen
[ { "from": "human", "value": "Write simple JacksonConverter test for object mapping\n" }, { "from": "gpt", "value": "package com.ibm.mil.cafejava;\n\nimport com.worklight.wlclient.api.WLResponse;\n\nimport org.json.JSONObject;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport java.util....
java
chosen
[ { "from": "human", "value": "Add comparison tests with different number subclasses\n" }, { "from": "gpt", "value": "package no.ssb.vtl.model;\n\nimport org.junit.Test;\n\nimport static org.assertj.core.api.Java6Assertions.assertThat;\n\npublic class VTLObjectTest {\n\n @Test\n public void ...
java
chosen
[ { "from": "human", "value": "Add base test that adds all the assertions and invariant checks\n" }, { "from": "gpt", "value": "package org.realityforge.arez.api2;\n\nimport org.testng.annotations.AfterTest;\nimport org.testng.annotations.BeforeTest;\n\npublic class AbstractArezTest\n{\n @BeforeT...
java
chosen
[ { "from": "human", "value": "Add tools for fetching file path" }, { "from": "gpt", "value": "package monica.framework.tools;\r\n\r\nimport java.io.File;\r\n\r\npublic class Utils {\r\n\tpublic static File getPropertiesPath(String propertiesName) {\r\n\t\tString[] pathArray = System.getProperty(\...
java
chosen
[ { "from": "human", "value": "Add static getSqlSessionFactory and getSqlSession" }, { "from": "gpt", "value": "package org.pinae.timon.session;\n\nimport java.io.IOException;\n\nimport org.pinae.timon.session.defaults.DefaultSqlSessionFactory;\n\n/**\n * 会话帮助类\n * \n * @author Huiyugeng\n *\n */\...
java
chosen
[ { "from": "human", "value": "Add basic, and failing, unit tests for RelationFetchOperation.fromResponse()\n" }, { "from": "gpt", "value": "package io.orchestrate.client;\n\nimport static org.junit.Assert.assertFalse;\n\nimport java.io.IOException;\n\nimport org.glassfish.grizzly.http.HttpHeader;...
java
chosen
[ { "from": "human", "value": "Create : 104 Maximum Depth of Binary Tree\n" }, { "from": "gpt", "value": "/**\n * Definition for a binary tree node.\n * public class TreeNode {\n * int val;\n * TreeNode left;\n * TreeNode right;\n * TreeNode(int x) { val = x; }\n * }\n */\n\npublic...
java
chosen
[ { "from": "human", "value": "Add the missing class to fix the minium developer build.\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2015 The Minium Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with th...
java
chosen
[ { "from": "human", "value": "Add custom AsyncTask for DB operations\n" }, { "from": "gpt", "value": "package com.whereuat.whereu.db;\n\nimport android.os.AsyncTask;\n\nimport com.whereuat.whereu.db.command.DbCommand;\n\n/**\n * Created by kangp3 on 4/5/16.\n */\npublic class DbTask extends Async...
java
chosen
[ { "from": "human", "value": "Add test class with failing test for viewmaphelper\n" }, { "from": "gpt", "value": "package org.jenkinsci.plugins.p4.client;\n\nimport static org.junit.Assert.assertArrayEquals;\nimport static org.junit.Assert.assertEquals;\n\nimport java.util.logging.Logger;\n\nimpo...
java
chosen
[ { "from": "human", "value": "Add a db service layer test stub\n" }, { "from": "gpt", "value": "/*\n * MIT License\n *\n * Copyright (c) 2018 Billy Yuan\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (th...
java
chosen