conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Solve No.2739 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 for list controller\n"
},
{
"from": "gpt",
"value": "package test.unit.haushaltsbuch;\n\nimport static org.mockito.Matchers.anyString;\nimport static org.mockito.Matchers.eq;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.verify;... | java | chosen |
[
{
"from": "human",
"value": "Create servlet that will return workspace link\n"
},
{
"from": "gpt",
"value": "package com.google.sps.servlets;\n\nimport com.google.appengine.api.datastore.DatastoreService;\nimport com.google.appengine.api.datastore.DatastoreServiceConfig;\nimport com.google.appen... | java | chosen |
[
{
"from": "human",
"value": "Add constant class collecting exit codes (now it is OK only)\n"
},
{
"from": "gpt",
"value": "package co.vorobyev.exitsign;\n\n/**\n * Constant class collecting exit status codes.\n *\n * @author Anton Vorobyev, <anton@vorobyev.co>\n */\npublic final class ExitStatus... | java | chosen |
[
{
"from": "human",
"value": "Create bean that maps to Company table in database\n"
},
{
"from": "gpt",
"value": "package com.KOIFish.FishStock.beans;\n\nimport javax.persistence.Cacheable;\nimport javax.persistence.Column;\nimport javax.persistence.Entity;\nimport javax.persistence.GeneratedValu... | java | chosen |
[
{
"from": "human",
"value": "Add the ability to cache the results parsed from a CharSequence.\n"
},
{
"from": "gpt",
"value": "package net.openhft.chronicle.core.pool;\n\nimport net.openhft.chronicle.core.Maths;\nimport net.openhft.chronicle.core.util.StringUtils;\nimport org.jetbrains.annotatio... | java | chosen |
[
{
"from": "human",
"value": "Add test of fletcher checksum functions\n"
},
{
"from": "gpt",
"value": "import com.serial.*;\n\nimport org.junit.*;\nimport static org.junit.Assert.*;\nimport static org.mockito.Mockito.*;\n\npublic class fletcher_test {\n @Test\n public void testHelloWorldInt... | java | chosen |
[
{
"from": "human",
"value": "Add an interface that extends Closeable which cannot throw a checked exception.\n"
},
{
"from": "gpt",
"value": "package com.google.instrumentation.common;\n\nimport java.io.Closeable;\n\n/**\n * An {@link Closeable} which cannot throw a checked exception.\n */\npubl... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for IOProtocolHandler\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2007-2013 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 in compliance with the Licen... | java | chosen |
[
{
"from": "human",
"value": "Test cases for -c and --create switches.\n"
},
{
"from": "gpt",
"value": "package com.somerledsolutions.pa11y.client;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.mockito.InjectMocks;\nimport org.mockito.Mock;\n\nimport static org.mockito.Mockito.t... | java | chosen |
[
{
"from": "human",
"value": "Implement counting sort for non-negative numbers\n"
},
{
"from": "gpt",
"value": "public class CountingSort {\n\tpublic static int[] countingSort(int[] unsorted) {\n\t\tint maxValue = max(unsorted);\n\n\t\t// Count occurrences of each value in unsorted\n\t\tint[] cou... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for PR 52"
},
{
"from": "gpt",
"value": "/*\n * The MIT License (MIT)\n * Copyright (c) 2018 Microsoft Corporation\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation fi... | java | chosen |
[
{
"from": "human",
"value": "Add tool to generate total report\n"
},
{
"from": "gpt",
"value": "package tachyon.perf.tools;\n\nimport java.io.File;\nimport java.io.IOException;\n\nimport tachyon.perf.basic.PerfTaskContext;\nimport tachyon.perf.basic.PerfTotalReport;\nimport tachyon.perf.basic.Ta... | java | chosen |
[
{
"from": "human",
"value": "Add test for usage example\n"
},
{
"from": "gpt",
"value": "package org.commonmark.test;\n\nimport org.commonmark.html.HtmlRenderer;\nimport org.commonmark.node.Node;\nimport org.commonmark.parser.Parser;\nimport org.junit.Test;\n\nimport static org.junit.Assert.asse... | java | chosen |
[
{
"from": "system",
"value": "Remove unneeded fields from APIGeneral\n"
},
{
"from": "human",
"value": "package com.blazeloader.api.api.general;\n\nimport com.blazeloader.api.main.BLMain;\n\nimport java.io.File;\n\n/**\n * General API functions\n */\npublic class ApiGeneral {\n /**\n * Lo... | java | chosen |
[
{
"from": "human",
"value": "Move Account validator to separate class to allow reusing it\n"
},
{
"from": "gpt",
"value": "package org.jpos.qi.minigl;\n\nimport com.vaadin.data.ValidationResult;\nimport com.vaadin.data.Validator;\nimport com.vaadin.data.ValueContext;\nimport com.vaadin.shared.ui... | java | chosen |
[
{
"from": "human",
"value": "Add class to manage squared errors between collections\n"
},
{
"from": "gpt",
"value": "package io.sigpipe.sing.stat;\n\nimport java.util.List;\n\nimport org.apache.commons.math3.util.FastMath;\n\nimport io.sigpipe.sing.dataset.feature.Feature;\n\npublic class Square... | java | chosen |
[
{
"from": "human",
"value": "Add tests for the Tagcomparator\n"
},
{
"from": "gpt",
"value": "package beaform.utilities;\n\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\n\nimport beaform.entities.FormulaTag;\n\n/**\n * Test for the formula tag.\n * @author Steven Post\n *... | java | chosen |
[
{
"from": "human",
"value": "Fix file name encoding issue\n\nFiles with accents in names, when uploaded with some binary widgets\ndoesn't save file name properly.\n\nFixes RM-5500\n"
},
{
"from": "gpt",
"value": "/**\n * Axelor Business Solutions\n *\n * Copyright (C) 2005-2016 Axelor (<http://a... | java | chosen |
[
{
"from": "human",
"value": "Work around CTMLib missing from Chisel api and deobf jars.\n"
},
{
"from": "gpt",
"value": "package com.cricketcraft.ctmlib;\n\nimport cpw.mods.fml.relauncher.Side;\nimport cpw.mods.fml.relauncher.SideOnly;\nimport net.minecraft.block.Block;\nimport net.minecraft.cli... | java | chosen |
[
{
"from": "human",
"value": "Add test verifying that ops can be run as commands\n"
},
{
"from": "gpt",
"value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2014 - 2016 Board of Regents of the University of\n * Wisconsin-Madison, Un... | java | chosen |
[
{
"from": "human",
"value": "Add custom activity for settings page\n"
},
{
"from": "gpt",
"value": "package com.example.asadkhan.sunshine;\n\nimport android.annotation.TargetApi;\nimport android.content.Intent;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.preference.ListP... | java | chosen |
[
{
"from": "human",
"value": "Add an example of using YAML\n"
},
{
"from": "gpt",
"value": "/*\nCopyright 2018 The Kubernetes Authors.\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the... | java | chosen |
[
{
"from": "human",
"value": "Add a wrapper class for DataSource\n"
},
{
"from": "gpt",
"value": "package com.codacy.play.tomcatcp.pool;\n\nimport com.codacy.play.tomcatcp.metrics.MetricsTrackerFactory;\nimport com.codahale.metrics.MetricRegistry;\nimport com.codahale.metrics.health.HealthCheckRe... | java | chosen |
[
{
"from": "human",
"value": "Include example with two browsers (Chrome and Firefox)\n"
},
{
"from": "gpt",
"value": "/*\n * (C) Copyright 2017 Boni Garcia (http://bonigarcia.github.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except... | java | chosen |
[
{
"from": "human",
"value": "Add Unit test for OffersFragment using Roboelectric\n"
},
{
"from": "gpt",
"value": "package com.abhi.fyberdemo.fragments;\n\nimport android.support.v4.app.Fragment;\nimport android.view.View;\n\nimport com.abhi.fyberdemo.BuildConfig;\nimport com.abhi.fyberdemo.MainA... | java | chosen |
[
{
"from": "human",
"value": "Connect strings and keys constants"
},
{
"from": "gpt",
"value": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * ht... | java | chosen |
[
{
"from": "human",
"value": "Add a simple dialog box that automatically centers itself\n\nBlatantly stolen from Gerrit Code Review, this is a simple dialog\nthat registers a window listener to recenter itself whenever the\nmain browser window resizes.\n\nSigned-off-by: Shawn O. Pearce <f3ea74d906fa9fe97c1fe... | java | chosen |
[
{
"from": "human",
"value": "Monitor for QEA with no quantified variables added\n"
},
{
"from": "gpt",
"value": "package monitoring.impl;\r\n\r\nimport monitoring.intf.Monitor;\r\nimport structure.impl.Verdict;\r\nimport structure.intf.QEA;\r\n\r\n/**\r\n * A small-step monitor for a simple QEA ... | java | chosen |
[
{
"from": "human",
"value": "Add Maximal Layers (2017) solution\n"
},
{
"from": "gpt",
"value": "package year2017;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * <h3>Maximal Layers</h3>\n * <p>Consider a group of points. Each point is made of an x and y coordinate.\n * A point... | java | chosen |
[
{
"from": "human",
"value": "Add default implementation of InvertAxis interface.\n"
},
{
"from": "gpt",
"value": "package net.imagej.ops.views;\n\nimport net.imagej.ops.view.ViewOps;\nimport net.imagej.ops.view.ViewOps.InvertAxis;\nimport net.imglib2.RandomAccessible;\nimport net.imglib2.view.Mi... | java | chosen |
[
{
"from": "human",
"value": "Add JMS test command handler, 1st try"
},
{
"from": "gpt",
"value": "package org.jeecqrs.commands.bus.jms;\n\nimport javax.annotation.PostConstruct;\nimport javax.annotation.Resource;\nimport javax.ejb.ActivationConfigProperty;\nimport javax.ejb.MessageDriven;\nimpor... | java | chosen |
[
{
"from": "human",
"value": "Add adapter for drop downs (e.g. spinners)\n"
},
{
"from": "gpt",
"value": "package de.michiruf.android.viewholder;\r\n\r\nimport android.content.Context;\r\nimport android.util.Log;\r\nimport android.view.LayoutInflater;\r\nimport android.view.View;\r\nimport androi... | java | chosen |
[
{
"from": "human",
"value": "Add test for argument parser\n\nSigned-off-by: Jarno Elovirta <0f1ab0ac7dffd9db21aa539af2fd4bb04abc3ad4@elovirta.com>\n"
},
{
"from": "gpt",
"value": "/*\n * This file is part of the DITA Open Toolkit project.\n *\n * Copyright 2019 Jarno Elovirta\n *\n * See the acc... | java | chosen |
[
{
"from": "human",
"value": "Add tests for the new User interface\n"
},
{
"from": "gpt",
"value": "package net.kencochrane.raven.event.interfaces;\n\nimport org.testng.annotations.Test;\n\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.is;\n\npublic cla... | java | chosen |
[
{
"from": "human",
"value": "Test case for undefined wide sub windows\n\nsvn changeset:8212/svn branch:6.0\n"
},
{
"from": "gpt",
"value": "package com.vaadin.tests.components.window;\n\nimport com.vaadin.tests.components.TestBase;\nimport com.vaadin.ui.Button;\nimport com.vaadin.ui.HorizontalLa... | java | chosen |
[
{
"from": "human",
"value": "Check whether simple_features end beyond the end of their scaffold\n"
},
{
"from": "gpt",
"value": "package org.ensembl.healthcheck.testcase.eg_core;\n\nimport java.sql.Connection;\n\nimport org.ensembl.healthcheck.DatabaseRegistryEntry;\nimport org.ensembl.healthche... | java | chosen |
[
{
"from": "human",
"value": "Add the actual integration test\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 EuregJUG.\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 o... | java | chosen |
[
{
"from": "human",
"value": "Add proper tests for execute-around pattern\n"
},
{
"from": "gpt",
"value": "package com.iluwatar.execute.around;\n\nimport org.junit.Assert;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.TemporaryFolder;\n\nimport java.io.File;\nimport java... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 329\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/longest-increasing-path-in-a-matrix/\n */\npublic class Problem329 {\n public int longestIncreasingPath(int[][] matrix) {\n // TODO... | java | chosen |
[
{
"from": "human",
"value": "Add skeleton of life cycle"
},
{
"from": "gpt",
"value": "package fourmiz.abillity;\n\nimport fourmiz.collision.Entity;\nimport fourmiz.engine.Abillity;\n\npublic class Level extends Abillity {\t\n\tprivate static final int EGGS_TIME=30*1000;\n\tprivate static final ... | java | chosen |
[
{
"from": "human",
"value": "Create publisher to split output by timestamp\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2014-2016 LinkedIn Corp. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n * this file except in complia... | java | chosen |
[
{
"from": "human",
"value": "Add an integration test for @SuppressWarnings feature\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2012 Google Inc. All Rights Reserved.\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 Renderable interface for foreground and background render methods"
},
{
"from": "gpt",
"value": "package info.u_team.u_team_core.api.gui;\n\nimport com.mojang.blaze3d.matrix.MatrixStack;\n\nimport net.minecraft.client.Minecraft;\nimport net.minecraft.client.gui.I... | java | chosen |
[
{
"from": "human",
"value": "Add sum of two integers\n"
},
{
"from": "gpt",
"value": "public class SumOfTwoIntegers {\n public int getSum(int a, int b) {\n if (b == 0) {\n return a;\n }\n\n int sum = a ^ b;\n int carry = (a & b) << 1;\n\n return getSum(sum, carry);\n }\n}"
... | java | chosen |
[
{
"from": "human",
"value": "Add a basic village structure.\n"
},
{
"from": "gpt",
"value": "package net.darkmorford.btweagles.villager;\n\nimport net.minecraft.block.state.IBlockState;\nimport net.minecraft.init.Blocks;\nimport net.minecraft.util.EnumFacing;\nimport net.minecraft.world.World;\n... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 343\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/integer-break/\n */\npublic class Problem343 {\n public int integerBreak(int n) {\n // TODO\n return 0;\n }\n\n public... | java | chosen |
[
{
"from": "human",
"value": "Add code to display encryption key\n"
},
{
"from": "gpt",
"value": "import java.io.FileInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.security.*;\nimport java.security.cert.CertificateException;\nimport java.util.Arrays;\nimport j... | java | chosen |
[
{
"from": "human",
"value": "Add Signature information of pdf document\n"
},
{
"from": "gpt",
"value": "/**\n* OpenCPS PKI is the open source PKI Integration software\n* Copyright (C) 2016-present OpenCPS community\n\n* This program is free software: you can redistribute it and/or modify\n* it u... | java | chosen |
[
{
"from": "human",
"value": "Add packet to sync all slots at container open"
},
{
"from": "gpt",
"value": "package info.u_team.u_team_core.intern.network;\n\nimport java.util.*;\nimport java.util.function.Supplier;\n\nimport info.u_team.u_team_core.container.*;\nimport net.minecraft.client.Minec... | java | chosen |
[
{
"from": "human",
"value": "Add factory class for generating view bindings\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2020 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... | java | chosen |
[
{
"from": "human",
"value": "Add Piwik telemetry into views\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.JdbcMi... | java | chosen |
[
{
"from": "system",
"value": "Add the schematic icon to the starting message.\n"
},
{
"from": "human",
"value": "package com.github.lunatrius.schematica.network.message;\n\nimport com.github.lunatrius.schematica.world.SchematicWorld;\nimport cpw.mods.fml.common.network.simpleimpl.IMessage;\nimpo... | java | chosen |
[
{
"from": "human",
"value": "Allow shared actor materializer to be looked up through Extension\n"
},
{
"from": "gpt",
"value": "package com.tradeshift.reaktive.akka;\n\nimport akka.actor.AbstractExtensionId;\nimport akka.actor.ActorSystem;\nimport akka.actor.ExtendedActorSystem;\nimport akka.act... | java | chosen |
[
{
"from": "human",
"value": "Create save document menu item.\n"
},
{
"from": "gpt",
"value": "package com.github.aureliano.edocs.app.gui.menu;\n\nimport javax.swing.JMenuItem;\n\npublic class SaveDocumentMenuItem extends JMenuItem {\n\n\tprivate static final long serialVersionUID = -234984488854... | java | chosen |
[
{
"from": "human",
"value": "Add file missing from last commit\n"
},
{
"from": "gpt",
"value": "package com.facebook.android;\n\nimport java.util.LinkedList;\n\npublic class SessionEvents {\n\n private static LinkedList<AuthListener> mAuthListeners = \n new LinkedList<AuthListener>();\... | java | chosen |
[
{
"from": "human",
"value": "Add init package with class to init blocks.\n"
},
{
"from": "gpt",
"value": "package com.pseudo_sudo.openstorage.init;\n\nimport com.pseudo_sudo.openstorage.block.BlockNAS;\nimport com.pseudo_sudo.openstorage.util.Name;\nimport cpw.mods.fml.common.registry.GameRegist... | java | chosen |
[
{
"from": "human",
"value": "Convert dp/sp to pixel value\n"
},
{
"from": "gpt",
"value": "/*\n * DimensionUtils.java\n *\n * Author: Ming Tsang\n * Copyright (c) 2015 Ming Tsang\n * Refer to LICENSE for details\n */\n\npackage com.nkming.utils.unit;\n\nimport android.content.Context;\nimport an... | java | chosen |
[
{
"from": "human",
"value": "Add vertex class for Dijkstras algorithm\n"
},
{
"from": "gpt",
"value": "package dijkstras;\n\n/*\n\tThis class defines a vertex for Dijkstra's algorithm\n*/\n\nclass Vertex{\n\n\tprivate int name = -1;\t\t\t\t// Vertex name\n\tprivate int parent = -1;\t\t\t// Paren... | java | chosen |
[
{
"from": "human",
"value": "Add encoding utility required to publish artifacts\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2010-2011 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 in compliance... | java | chosen |
[
{
"from": "human",
"value": "Add rundeck API version validation\n"
},
{
"from": "gpt",
"value": "package com.github.sbugat.rundeckmonitor.wizard;\n\nimport org.rundeck.api.RundeckClient.Version;\n\npublic enum RundeckAPIVersion {\n\n\tRUNDECK_APIVERSION_5( Version.V5, \"1.4.4\" ), //$NON-NLS-1$\... | java | chosen |
[
{
"from": "human",
"value": "Add a test for s3a direct output stream.\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 unit test for utils package\n"
},
{
"from": "gpt",
"value": "/*\n * MIT License\n *\n * Copyright (c) 2018 JUAN CALVOPINA M\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation file... | java | chosen |
[
{
"from": "human",
"value": "Test for parcelable of SchedulePredicate is added.\n"
},
{
"from": "gpt",
"value": "package com.kii.thingif.trigger;\n\nimport android.os.Parcel;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport com.kii.thingif.SmallTestBase;\n\nimport org.junit.Assert;\n... | java | chosen |
[
{
"from": "system",
"value": "Insert mapping variable in the correct list\n"
},
{
"from": "human",
"value": "package x2x.translator.pragma;\n\nimport java.util.ArrayList;\n\npublic class CLAWmapping {\n\n private ArrayList<String> _mappedVariables = null;\n private ArrayList<String> _mappingVa... | java | chosen |
[
{
"from": "human",
"value": "Add integration test to test if translog was trimmed correctly\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to Crate under one or more contributor license agreements.\n * See the NOTICE file distributed with this work for additional\n * information regarding copy... | java | chosen |
[
{
"from": "human",
"value": "Add statement to problem 53\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": "Introduce workflow for running modules in-process\n"
},
{
"from": "gpt",
"value": "package com.github.sormuras.bach.customizable;\n\nimport com.github.sormuras.bach.Bach;\nimport com.github.sormuras.bach.Command;\nimport com.github.sormuras.bach.Project;\nimport com.... | java | chosen |
[
{
"from": "human",
"value": "Add handler to allow eager parsing of form data using async IO\n"
},
{
"from": "gpt",
"value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2012 Red Hat, Inc., and individual contributors\n * as indicated by the @author tags.\n *\n * Licensed under ... | java | chosen |
[
{
"from": "human",
"value": "Add a class for describing providers\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 * You may... | java | chosen |
[
{
"from": "human",
"value": "Update for latest protocols trunk"
},
{
"from": "gpt",
"value": "/****************************************************************\n * Licensed to the Apache Software Foundation (ASF) under one *\n * or more contributor license agreements. See the NOTICE file *\n ... | java | chosen |
[
{
"from": "human",
"value": "Add a factory for prefix maps, not yet used\n\ngit-svn-id: bc509ec38c1227b3e85ea1246fda136342965d36@1440000 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor... | java | chosen |
[
{
"from": "human",
"value": "Include specific test for BrowserBuilder\n"
},
{
"from": "gpt",
"value": "/*\r\n * (C) Copyright 2018 Boni Garcia (http://bonigarcia.github.io/)\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in co... | java | chosen |
[
{
"from": "human",
"value": "Update unit testing for class DeterlabProjectEntity in adapter-deterlab (SIO)\n"
},
{
"from": "gpt",
"value": "package sg.ncl.adapter.deterlab.dtos.entities;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n ... | java | chosen |
[
{
"from": "human",
"value": "Add scratch file that shows how accurate WeightedDistribution is\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2013 - 2017 xxyy (Philipp Nowak; xyc@l1t.li). All rights reserved.\n *\n * Any usage, including, but not limited to, compiling, running, redistribut... | java | chosen |
[
{
"from": "human",
"value": "Add unit tests for IncDecUpdateExpression, on plane PHX -> CALGARY XD\n"
},
{
"from": "gpt",
"value": "package org.minijs.core.parser;\n\nimport org.antlr.v4.runtime.tree.ParseTree;\nimport org.junit.Test;\nimport org.minijs.core.ast.*;\n\nimport static org.junit.Ass... | java | chosen |
[
{
"from": "human",
"value": "Prepare configuration properties class.\nWill be used to enable and disable the auto configuration.\n"
},
{
"from": "gpt",
"value": "package com.github.gabrielruiu.spring.cloud.config.redis;\n\nimport org.springframework.boot.context.properties.ConfigurationPropertie... | java | chosen |
[
{
"from": "human",
"value": "Create : 232 Implement Queue using Stacks\n"
},
{
"from": "gpt",
"value": "import java.util.Stack;\n\npublic class MyQueue {\n\n private Stack<Integer> input;\n private Stack<Integer> output;\n\n /** Initialize your data structure here. */\n public MyQueu... | java | chosen |
[
{
"from": "human",
"value": "Add application entry point (skeleton).\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 Will Knez <wbknez.dev@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 Licen... | java | chosen |
[
{
"from": "human",
"value": "Check if number is a palindrome\n"
},
{
"from": "gpt",
"value": "public class IsPalindromeNumber {\n public boolean isPalindrome(int x) {\n int n = x;\n int digit = 0;\n int rev = 0;\n while (x > 0) {\n digit = x % 10;\n ... | java | chosen |
[
{
"from": "human",
"value": "Test for pull request \"CoreJavaFileManager.findClass: properly resolve $ in inner class names\"\n"
},
{
"from": "gpt",
"value": "package com.intellij.psi;\n\nimport com.intellij.core.CoreJavaFileManager;\nimport com.intellij.ide.highlighter.JavaFileType;\nimport com... | java | chosen |
[
{
"from": "human",
"value": "Add try-catch clauses around all update queues.\n\nNow we will at least get an error message when an Exception occurs\ninstead of silently killing the thread.\n"
},
{
"from": "gpt",
"value": "package net.floodlightcontroller.util;\n\nimport java.io.PrintWriter;\nimpo... | java | chosen |
[
{
"from": "human",
"value": "Add basic test for dictionary aggregation\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n ... | java | chosen |
[
{
"from": "human",
"value": "PROC-258: Add simple test definition validator\n"
},
{
"from": "gpt",
"value": "package com.indeed.proctor.common;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.indeed.proctor.common.model.ConsumableTestDefinition;\nimport com.indeed.proctor.comm... | java | chosen |
[
{
"from": "human",
"value": "Introduce a new mojo for groupId graphs\n"
},
{
"from": "gpt",
"value": "package com.github.ferstl.depgraph;\n\nimport org.apache.maven.artifact.resolver.filter.ArtifactFilter;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plug... | java | chosen |
[
{
"from": "human",
"value": "Add some class map tests.\n\ngit-svn-id: 10199add9e99fdfd09a887e21850bf0d170bc390@476968 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "package org.apache.velocity.test.util.introspection;\n\n/*\n * Licensed to the Apache Software Foundation (A... | java | chosen |
[
{
"from": "human",
"value": "Add a test for merging sentences\n"
},
{
"from": "gpt",
"value": "package cc.redpen.parser.markdown;\n\nimport cc.redpen.parser.LineOffset;\nimport org.junit.Test;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport static org.junit.Assert.assertEquals;\... | java | chosen |
[
{
"from": "human",
"value": "Add a basic test for MeetingRequest.java\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 ... | java | chosen |
[
{
"from": "human",
"value": "Add usage tracking confirmation class that was missing from the last commit.\n"
},
{
"from": "gpt",
"value": "package com.google.ase;\n\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.content.DialogInterface;\nimport android.content.Sha... | java | chosen |
[
{
"from": "human",
"value": "Create actionBean for saved system searches\n\nThe actionBean finds the appropriate SystemSearch and passes it on to\nthe searchResults.jsp page for processing.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 Space Dynamics Laboratory - Utah State University R... | java | chosen |
[
{
"from": "human",
"value": "Add JUnit test for JsonPipe (by Lars)"
},
{
"from": "gpt",
"value": "package nl.nn.adapterframework.pipes;\n\nimport org.junit.Test;\nimport org.junit.rules.ExpectedException;\nimport org.mockito.Mock;\n\nimport nl.nn.adapterframework.configuration.ConfigurationExcep... | java | chosen |
[
{
"from": "human",
"value": "Create skeleton handler for the creation of new tokens\n"
},
{
"from": "gpt",
"value": "/**\n * \n */\npackage org.corpus_tools.atomic.tokeneditor.handlers;\n\nimport org.eclipse.core.commands.AbstractHandler;\nimport org.eclipse.core.commands.ExecutionEvent;\nimport... | java | chosen |
[
{
"from": "human",
"value": "Test for default ribbon client configuration\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2013-2014 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 in compliance with ... | java | chosen |
[
{
"from": "human",
"value": "Add form validation view model test\n"
},
{
"from": "gpt",
"value": "package com.kickstarter.viewmodels;\n\nimport com.kickstarter.KSRobolectricTestCase;\n\nimport org.junit.Test;\n\nimport rx.observers.TestSubscriber;\n\npublic class ResetPasswordViewModelTest exten... | java | chosen |
[
{
"from": "human",
"value": "Add support for invoke static method calls"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017 Volker Berlin (i-net software)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licens... | java | chosen |
[
{
"from": "human",
"value": "Create custom scope to match that of the activity\n"
},
{
"from": "gpt",
"value": "package kapil.voiceassistedweatherapp;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\nimport javax.inject.Scope;\n\n/**\n * Custom scope int... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 67. Add Binary\n\n67. Add Binary: https://leetcode.com/problems/add-binary/"
},
{
"from": "gpt",
"value": "package leetcode.add_binary;\n\npublic class Solution {\n public String addBinary(String a, String b) {\n \tif(a == null) a = \"\";\... | java | chosen |
[
{
"from": "human",
"value": "Create a delegate class to access DAO from within the impl\n"
},
{
"from": "gpt",
"value": "package uk.ac.ox.oucs.oauth.dao;\n\nimport uk.ac.ox.oucs.oauth.domain.Accessor;\nimport uk.ac.ox.oucs.oauth.domain.Consumer;\n\nimport java.util.Collection;\n\n/**\n * Delegat... | java | chosen |
[
{
"from": "human",
"value": "Test Sample : Test Driver (1)\nJunit으로 만든 Test Driver"
},
{
"from": "gpt",
"value": "package co.kr.godo.test.driver;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.Test;\nimport static org.hamcrest.CoreMatchers.*;\n\npublic class TestObjectTest {\n\n\t@Test... | java | chosen |
[
{
"from": "human",
"value": "Create empty class for URL /place_details\n"
},
{
"from": "gpt",
"value": "package goplaces.resources;\n\nimport java.util.logging.Level;\nimport java.util.logging.Logger;\n\nimport javax.servlet.http.HttpServletResponse;\nimport javax.ws.rs.Consumes;\nimport javax.w... | java | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.