query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Constructor Creates the Brick and ControlPanel's and sets their layouts
public MainPanel() { super(); this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); _brickbackground = new ImageIcon("brickbackground.jpg").getImage(); _paddle2 = new PaddleShape(); _paddle1 = new PaddleShape(); Holder _holder = new Holder(BrickPanel); BrickPanel ...
[ "public ControlPanel()\n\t{\n\t\tsuper();\n\n\t\tsetLayout(new GridLayout(15,1,3,3));\n\n\t\tbtnStart = new JButton(\" Start \");\n\t\tbtnStep = new JButton(\" Step \");\n\t\tbtnStop = new JButton(\" Stop \");\n\t\tbtnPause = new JButton(\" Pause \");\n\t\tbtnReset = new JButton(\" Reset \");\n\t\tbtnOptions = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__FQN__Group_1__0" $ANTLR start "rule__FQN__Group_1__0__Impl" InternalCommunicationObject.g:2491:1: rule__FQN__Group_1__0__Impl : ( '.' ) ;
public final void rule__FQN__Group_1__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCommunicationObject.g:2495:1: ( ( '.' ) ) // InternalCommunicationObject.g:2496:1: ( '.' ) { // InternalCommunicati...
[ "public final void rule__FQN__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.eclipsecon.conference.ui/src-gen/org/eclipse/eclipsecon/ui/contentassist/antlr/internal/InternalConference.g:1073:1: ( ( '.' ) )\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return list of serialization actefacts contained in supplied serialization actifact Return empty list if supplied serialization artefact has no contents
@Override public List<InJarResourceImpl> getContents(InJarResourceImpl serializationArtefact) { return serializationArtefact.getContents(false); }
[ "public List<Act> getActs() {\r\n ActRelationshipCollectionPropertyEditor collection = getEditor();\r\n return new ArrayList<>(collection.getActs().keySet());\r\n }", "List<Assessment> getArchivedAssessments(String context, boolean includeFce);", "ArrayList<IFact> getGoogleBinaryFacts();", "A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set whether the move comes from the board or a client
abstract public void setFromBoard(boolean from_board);
[ "void setInitialMovePassed(boolean initialMovePassed);", "public void canMove() {\n int loserClient = whoIsLosing();\n boolean goAhead = gameModel.canMove();\n if (goAhead) {\n gameModel.notifyStartTurn();\n } else {\n int winnerClient = gameModel.getWinner();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will continue to swipe either up or down(based on Direction enum provided,) until the desired MobileElement is found or the number of attempts provided for the method has hit its max.
public MobileElement swipeUntilFound(By method, int attempts, MobileElement targetElement, Direction dir) { Swipe.Direction direct= null; switch (dir) { case up: direct = Swipe.Direction.up; break; case down: direct = Swipe.Direction.down; break; default: break; } return targetElement = sw...
[ "public MobileElement swipeUntilFound(By method, By secondMethod, int attempts, MobileElement targetElement, Direction dir) {\n\t\tSwipe.Direction direct= null;\n\t\tswitch (dir) {\n\t\tcase up:\n\t\t\tdirect = Swipe.Direction.up;\n\t\t\tbreak;\n\t\tcase down: \n\t\t\tdirect = Swipe.Direction.down;\n\t\t\tbreak;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
map&lt;int32, int64&gt; i2l_map = 13;
java.util.Map<Integer, Long> getI2LMapMap();
[ "java.util.Map<Long, Integer>\n getL2IMapMap();", "java.util.Map<Long, Long>\n getL2LMapMap();", "long getI2LMapOrThrow(\n int key);", "java.util.Map<Integer, ListValue>\n getI2ListMapMap();", "java.util.Map<Integer, Integer>\n getI2IMapMap();", "int getL2IMapOrThrow(\n l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the containing executable
public void setExecutable(Executable executable) { this.executable = executable; }
[ "public void setExecutable(String executable);", "public void setExecutable(Executable executable) {\r\n this.executable = executable;\r\n }", "public static void setExecutable(String executable) {\n \tGlobals.executable = executable;\n \tsetProperty(\"executable\", executable);\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the components screen resolution or the default screen resolution if the component is null or has no toolkit assigned yet.
protected int getScreenResolution(Component c) { int res = 0; if (c == null){ res= getDefaultScreenResolution(); } else { Toolkit toolkit = c.getToolkit(); res = toolkit != null ? toolkit.getScreenResolution() :...
[ "java.lang.String getScreenResolution();", "public ScreenResolution getScreenResolution();", "static int[] getResolution ()\n\t{\n\t\t//get the Toolkit of this instance\n\t\tToolkit tk = Toolkit.getDefaultToolkit ();\n\t\t\n\t\t//get the screen size as Dimension object\n\t\tDimension resolution = tk.getScreenSi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check whether register data is valid or not
boolean isRegisterDataValid();
[ "public boolean isValidData(){\n\t\tif(lengthOfArray > MINIMUMVALIDTOKENNUMBER){\n\t\t\tSystem.out.println(\"This is a valid GPS data\");\n\t\t\t\n\t\t\treturn true;\n\t\t}else{\n\t\t\tSystem.out.println(\"This is not a valid GPS data\");\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public Boolean checkRegNu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reads the file with the income
public String readIncomeFile () { try { FileReader reader = new FileReader(incomeFile); Scanner in = new Scanner(reader); while (in.hasNextLine()) { String incomeItem = in.nextLine(); incomeEntered = incomeItem; } reader.close(); in.close(); } catch (IOException e) { System.err.printl...
[ "@Override\r\n\tpublic void readFile()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner sc = new Scanner(new File(\"cashregister.txt\"));\r\n\t\t\tsc.useDelimiter(\"[,\\0]\");\r\n\t\t\twhile(sc.hasNext())\r\n\t\t\t{\r\n\t\t\t\tcashOnHand = sc.nextFloat();\r\n\t\t\t\tsc.close();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a SignalStrengthTuple with randomly populated values, and automatically inserts a randomly generated MonitorSession row into the MonitorSession table to reference
static SignalStrengthTuple makeSignalStrengthTuple(Random random, SQLiteDatabase db) { // insert MonitorSession row to reference ContentValues monitorSessionValues = MonitorSessionTableTest.makeMonitorSessionValues(random, db); final long monitorSessionRowId = db.insert(TBL_MONITOR_S...
[ "static ContentValues makeSignalStrengthValues(Random random, SQLiteDatabase db) {\n // insert MonitorSession row to reference\n ContentValues monitorSessionValues =\n MonitorSessionTableTest.makeMonitorSessionValues(random, db);\n final long monitorSessionRowId = db.insert(TBL_MONIT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method can be used to detect and clean stale transactions which may keep (potentially damaged) objects alive.
public long cleanStaleTransactions() { if (hive.getLockContentValidator() == null) { return 0; } LongAdder amount = new LongAdder(); try { Files.list(markerRoot).forEach(p -> { if (Files.isDirectory(p) && PathHelper.exists(p.resolve(TX_PID_FILE)))...
[ "private void removeOrphanedTransactions() {\n for (Transaction transaction : getTransactions()) {\n boolean orphaned = true;\n \n for (Account account : getAccountList()) {\n if (account.contains(transaction)) {\n orphaned = false;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds all files matching a wildcard expression (based on '?', '~' or '').
protected List<String> wildcardFiles(String pathWithWildcard) throws CommandAbstractException { List<String> resultPaths = new ArrayList<String>(); // First check if pathWithWildcard contains wildcards if (!(pathWithWildcard.contains("*") || pathWithWildcard.contains("?") || path...
[ "List<String> getFiles(String path, String searchPattern, String searchOption) throws IOException;", "List<File> search(String directory, String fileName);", "Set<String> wildcardMatches(String pattern);", "private void findAllFiles() {\n foundFiles = searcher.search(params.getDirectoryKey(), params.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel NONNULL_PTR msg
public static native void ChannelMessageHandler_handle_open_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
[ "public static native void ChannelMessageHandler_handle_accept_channel(long this_arg, byte[] their_node_id, long their_features, long msg);", "public static native void ChannelMessageHandler_handle_channel_update(long this_arg, byte[] their_node_id, long msg);", "public static native long MessageSendEvent_send_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a TR tag for an HTML table with some content.
public static HtmlTree TR(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.TR, nullCheck(body)); return htmltree; }
[ "private ContainerTag generateTableRow(HtmlData rowData) {\n ContainerTag row = tr();\n for (String entry : rowData.getFields()) {\n row.with(td(entry));\n }\n return row;\n }", "protected ContainerTag generateVerticalTable(HtmlData data) {\n ContainerTag table = t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Common method to call savegame slots activation.
public void activateSlots() { this.activateSaveSlots(); this.activateLoadSlots(); }
[ "private void saveActivationCode() {\n }", "void enableSlot(int slot, IPlayer player);", "private void saveGame() {\n }", "public static void runSaveState() {\n for (GUISaveable s: saveables) {\n s.saveState();\n }\n }", "public void loadGame(int saveSlot){\n saveSlots[saveSlot].lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an iterator that provides access to all the check results.
public Iterator getCheckIterator() { return checkResults.iterator(); }
[ "public OpIterator iterator() {\n // some code goes here\n List<Tuple> tups = new LinkedList<>();\n if(gbfield == NO_GROUPING){\n tups.add(noGbRes);\n }else{\n for(Object key : groups.keySet())\n tups.add(groups.get(key));\n }\n logger.l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Equivalent to new Change(byTypeURI);.
public static Change change(String byTypeURI) { return new Change(byTypeURI); }
[ "ChangeKind getChangeType();", "public void setType(ChangeType type) {\n this._type = type;\n }", "public ChangeType getType() {\n return _type;\n }", "public ChangeBase getChange(Class<? extends ChangeBase> type)\r\n {\r\n return (ChangeBase) m_changes.getValue(type);\r\n }", "void cha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if has "MultipleBetMinimum" element
boolean isSetMultipleBetMinimum();
[ "boolean isNilMultipleBetMinimum();", "boolean isSetSingleBetMinimum();", "boolean isNilSingleBetMinimum();", "boolean isSetWagerMinimum();", "public boolean checkBetValidity(){\n if(player.getBet() >= table.getMinBet()){\n return true;\n }\n return false;\n }", "boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Asserts a task was part of a build result, and was skipped.
public static void assertTaskSkipped(@Nonnull final BuildResult result, @Nullable final String projectName, @Nonnull final String taskName) { assertTaskOutcome(result, projectName, taskName, TaskOutcome.SKIPPED); }
[ "protected void assertTaskSkipped(BuildTask task) {\n assertNotNull(\"task is null\", task);\n assertEquals(\"task \" + task + \" state should be skipped\", SKIPPED, task.getOutcome());\n }", "public static void assertTaskSkipped(@Nonnull final BuildResult result, @Nonnull final String taskName) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
There are a total of n courses you have to take labelled from 0 to n 1. Some courses may have prerequisites, for example, if prerequisites[i] = [ai, bi] this means you must take the course bi before the course ai. Given the total number of courses numCourses and a list of the prerequisite pairs, return the ordering of ...
public int[] findOrder(int numCourses, int[][] prerequisites) { // HashMap will have key as the pre - req course and the value (list) as the dependent courses HashMap<Integer, List<Integer>> adjMap = new HashMap<>(); // In degree of a course will represent the number of pre-req for that c...
[ "public boolean canFinish(int numCourses, int[][] prerequisites) {\n List<Integer>[] edges = new ArrayList[numCourses];\n int[] degree = new int[numCourses];\n int courseCounter = 0;\n\n //count degree of all the nodes, degree represents in-degree of every node here\n for (int i =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the given code is a valid ISBN10 or ISBN13.
public static boolean isValidISBN(String isbn) { return isValidISBN10(isbn) || isValidISBN13(isbn); }
[ "private boolean isIsbn13(String code) {\n return checkDigit(code, 13);\n }", "public static boolean isValidISBN13(String isbn) {\n String isbnInteger = isbn.replace(\"-\", \"\").replace(\" \", \"\");\n if (isbnInteger.length() != 13 || !isbnInteger.matches(\"^[0-9]+$\")) {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new instance of the site publication data model to be used when displaying the form.
public SitePublication initSitePublication(final RenderContext renderContext) { JCRSiteNode site = renderContext.getSite(); String siteUuid; try { siteUuid = site.getIdentifier(); } catch (RepositoryException e) { throw new JahiaRuntimeException(e); } ...
[ "Publication createPublication();", "Publication getPubli();", "@NotNull public static PublicationEvent.Builder publicationEvent() { return new PublicationEvent.Builder(new HashMap<String,Object>()); }", "public Form getViewForm() throws PublicationTemplateException;", "protected Document createDefaultModel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When all is done, hide the progress bar and switch out the search fragment for the results fragment.
@Override public final void onCompleted() { hideProgressBar(); getSupportFragmentManager().beginTransaction() .replace(R.id.search_fragment_container, resultsFragment, RESULTS_FRAGMENT_TAG) ...
[ "@Override\n protected void onPostExecute(String sentFromDoInBackground) {\n super.onPostExecute(sentFromDoInBackground);\n searchButton.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n myAdapter.notifyDataSetChanged();\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tests adding an item to the long term storage
@Test public void testAddItem() { assertEquals("testAddItem(LongTermTest): valid enter failure", 0, ltsTest.addItem(item4, 10)); //can enter assertEquals("testAddItem(LongTermTest): invalid available capacity after adding", 900, ltsTest.getAvailableCapacity()); assertEquals("testAddItem(LongTermTest): invalid it...
[ "@Test\r\n public void testAddItem() {\r\n // the parameter that will save the return value from the AddItem method for each test.\r\n int isAdded;\r\n\r\n //test1:\r\n isAdded = myLongTermStorage.addItem(item2, 3);\r\n assertEquals(\"These items should be added to the storage ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves list of Category UIDs where the last modified date is later than the specified date.
List<Long> findUidsByModifiedDate(Date date);
[ "public List<Long> findUidsByModifiedDate(final Date date) {\n\t\tsanityCheck();\n\t\treturn getPersistenceEngine().retrieveByNamedQuery(\"GIFT_CERTIFICATE_UIDS_SELECT_BY_MODIFIED_DATE\", date);\n\t}", "List<Long> findUidsByModifiedDate(final Date date);", "List<Long> findUidsByDeletedDate(final Date date);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ checks or unchecks the radio button with the given name and the given ref value
private void checkRadio( String groupName, String refValue, XPropertySet form ) throws com.sun.star.uno.Exception, java.lang.Exception { XPropertySet xRadio = getRadioModel( groupName, refValue, form ); XRadioButton radioButton = (XRadioButton)UnoRuntime.queryInterface( XRadioButton.class, m_document....
[ "private void checkRadio( String groupName, String refValue ) throws com.sun.star.uno.Exception, java.lang.Exception\n {\n checkRadio( groupName, refValue, m_primaryForm );\n }", "static public String inputRadio(String name, String value, Boolean isChecked){\n \t\treturn \"<input type=\\\"radio\\\" n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the stat tracker associated with the malevolent mob
public MobStatTracker getStatTracker() { return tracker; }
[ "public MobStat getMobStat(String ref){\r\n\t\t\treturn mpx.getMobStat(ref);\r\n\t\t}", "public static HashMap<LivingEntity, MalevolentMob> getMalevolentMobMap()\n\t{\n\t\treturn mobMap;\n\t}", "float getHumid();", "java.lang.String getStat();", "public Mob getMob() {\n\t\treturn mob;\n\t}", "public Stati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if is valid session.
public boolean isValidSession(HttpServletRequest httpServletRequest) { boolean status = false; try { Chiraghuser chiraghuser = getSessionUser(httpServletRequest); if (chiraghuser == null) status = false; else status = true; } catch (Exception e) { System.out.println("Invalid Sessi...
[ "boolean isSessionValid(Object session);", "public boolean isValid(S session);", "protected boolean shouldValidateSession ()\n {\n return false;\n }", "@Override\n\tpublic boolean isRequestedSessionIdValid() {\n\t\tString id = getRequestedSessionId();\n\t\treturn id != null ? sessionContext.check...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "SignatureProviderId" element
void setSignatureProviderId(java.lang.String signatureProviderId);
[ "void xsetSignatureProviderId(com.microsoft.schemas.office.x2006.digsig.STUniqueIdentifierWithBraces signatureProviderId);", "java.lang.String getSignatureProviderId();", "void setSignatureProviderDetails(int signatureProviderDetails);", "void setSignatureProviderUrl(java.lang.String signatureProviderUrl);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to find the electricity network based in a tile entity and checks to see if it is a conductor. All machines should use this function to search for a connecting conductor around it.
public static IElectricityNetwork getNetworkFromTileEntity(TileEntity tileEntity, ForgeDirection approachDirection) { if (tileEntity != null) { if (tileEntity instanceof INetworkProvider) { if (tileEntity instanceof IConnector) { if (((IConnector) tileEntity).canConnect(approachDirection...
[ "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "public ConnectionType getPotentialConnectionType() {\r\n Map<String, Cell> cells = getAdjacen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "port" /home/kane/apachecassandra0.7.4src/src/java/org/apache/cassandra/cli/Cli.g:494:1: port : IntegerLiteral ;
public final CliParser.port_return port() throws RecognitionException { CliParser.port_return retval = new CliParser.port_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token IntegerLiteral249=null; CommonTree IntegerLiteral249_tree=null; try { ...
[ "public Node(int port) {\n this();\n portnum = port;\n }", "public void setPort(int port);", "public void setPort(Port port);", "public void setPort(int value) {\n this.port = value;\n }", "int getPort(int port);", "public CassandraNode(int port) {\r\n\t\tthis(null, port);\r\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ConstDecl__Group_2_1_1__0" $ANTLR start "rule__ConstDecl__Group_2_1_1__0__Impl" InternalGo.g:8653:1: rule__ConstDecl__Group_2_1_1__0__Impl : ( ( rule__ConstDecl__Constspec2Assignment_2_1_1_0 ) ) ;
public final void rule__ConstDecl__Group_2_1_1__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalGo.g:8657:1: ( ( ( rule__ConstDecl__Constspec2Assignment_2_1_1_0 ) ) ) // InternalGo.g:8658:1: ( ( rule__ConstDecl__Constsp...
[ "public final void rule__ConstSpec__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:8764:1: ( ( ( rule__ConstSpec__Group_2__0 )? ) )\r\n // InternalGo.g:8765:1: ( ( rule__ConstSpec__Group_2__0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the given base class' method if the given method (declared in the repository interface) was also declared at the repository base class. Returns the given method if the given base class does not declare the method given. Takes generics into account.
Method getBaseClassMethodFor(Method method) { for (Method baseClassMethod : repositoryBaseClass.getMethods()) { // Wrong name if (!method.getName().equals(baseClassMethod.getName())) { continue; } // Wrong number of arguments if (!(m...
[ "private boolean isBaseClassMethod(Method method) {\n\n Assert.notNull(method);\n\n if (method.getDeclaringClass().isAssignableFrom(repositoryBaseClass)) {\n return true;\n }\n\n return !method.equals(getBaseClassMethod(method));\n }", "void findByOverridingMethod();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set white player for game
private void setWhitePlayer(Player player) { this.whitePlayer = player; }
[ "private void changePlayer()\n\t{\n\t\tif(player.equals(\"white\"))\n\t\t{\n\t\t\tplayer = \"black\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer = \"white\";\n\t\t}\n\t}", "private void switchPlayer() {\n\t\tif (player.equals(\"black\")) {\n\t\t\tthis.player = \"white\";\n\t\t}\n\t\telse {\n\t\t\tthis.player = \"black...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls the Controlled Vocabulary web service that returns a newlineseparated list of preferred terms and returns them in a string array.
public static String[] webServicePreferredTerms() throws Exception { HttpGet httpGet = null; CloseableHttpClient httpClient = HttpClientBuilder.create().build(); String[] preferredTerms = null; if (PREFERRED_TERMS_ARRAY != null) { preferredTerms = PREFERRED_TERMS_ARRAY; } else { ...
[ "private VocabularyTerms getVocabularyTerms(Collection<CMAContentType> vocabularies) {\n VocabularyTerms vocabularyTerms = new VocabularyTerms();\n vocabularies\n .forEach(contentType -> {\n //Keeps the country vocabulary ID for future use\n if (contentType.getName().equals(configuration.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show view courses schedule.
@FXML public void ViewCoursesSchedule(ActionEvent event) { str.add("ViewCoursesSchedule"); last = this; client.Accept(str); str.clear(); }
[ "@Override\r\n\tpublic void showCourses() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tSystem.out.println(\"\\n========================================================================\");\r\n\t\tSystem.out.println(\"\\t\\t\\tAvailable Courses\");\r\n\t\tSystem.out.println(\"===================================...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The worker method. It will find the container, create the file if missing or just replace its contents, and open the editor on the newly created file.
void doFinish(String containerName, String fileName, IProgressMonitor monitor) throws CoreException { // create a sample file monitor.beginTask("Creating " + fileName, 2); final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); final IResource resource = root.findMember(new Path(containerName))...
[ "public void runEditorExisting()\r\n\t{\r\n\t\tmainFrame.runEditorExisting();\r\n\t}", "private void storageKnowhowDetailInputFile() throws IOException {\n\t\tIFileEditorInput fileInput = (IFileEditorInput) super.getEditorInput();\n\t\tknowhowSelectionProject = fileInput.getFile().getProject();\n\t\tString workDi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Savoir si l'etatUML courant en est a sa premiere methode.
public boolean isPremiereMethode() { return premiereMethode; }
[ "public boolean isForGenere();", "@Override\n public String cualquierMetodo2() {\n return \"Método implementado en la clase hija viaje de incentivo\";\n }", "public void actualiserAffichage();", "public abstract boolean isUsaNonSpecificato();", "@Override\r\n\t\t\tpublic void atras() {\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of the timeout property.
public void setTimeout ( Integer timeout ) { getStateHelper().put(PropertyKeys.timeout, timeout); handleAttribute("timeout", timeout); }
[ "public void setTimeOut(int value) {\n this.timeOut = value;\n }", "public void setTimeout(org.apache.axis.types.UnsignedInt timeout) {\n this.timeout = timeout;\n }", "T setStartTimeout(Integer timeout);", "void setTimeOut(int timeOut);", "private void setTimedOut() {\n\t\tthis.timedOut...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of UndoManager.
public UndoManager() { events = new Stack(); redoEvents = new Stack(); }
[ "public static UndoManagerPlus<DocOp> createUndoManager() {\n return new UndoManagerImpl<DocOp>(algorithms);\n }", "private static IUndoManager createUndoManager() {\n return new UndoManager2();\n }", "void openUndoManager();", "private UndoManager() {\n undoList = new LinkedHashMap<Refac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines states of a game session
interface GameState { String WAITING_FOR_SECOND_PLAYER = "WAITING_FOR_SECOND_PLAYER"; String TURN_HARE = "TURN_HARE"; String TURN_HOUND = "TURN_HOUND"; String WIN_HARE_BY_ESCAPE = "WIN_HARE_BY_ESCAPE"; String WIN_HARE_BY_STALLING = "WIN_HARE_BY_STALLING"; String WIN_HOUND...
[ "private void setGameState(int value) {\n gameState = value;\n }", "private GameStateEvaluator() {}", "private void setGameState() // Convert the string version of the game state to the GameState version.\n\t{\n\t\tif (gameStateString.equalsIgnoreCase(\"waitingForStart\"))\n\t\t{\n\t\t\tgameState = Ga...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of testDeleteAllCookies method, of class WebDriverService.
@Test public void testDeleteAllCookies() { LOG.entering(CLASS, "testDeleteAllCookies"); try{ setUrl(URL); JsonObject result = MarionetteUtil.parseJsonObject(DELETE(getUri("deleteAllCookies", sessionId), "").body()); Assertions.assertTrue(null != result); ...
[ "@Before\n public void deleteAllCookies() { \n LOGGER.info(\"Deleting all cookies...\");\n DriverManager.getDriver().manage().deleteAllCookies(); \n }", "public Action DeleteAllCookies()\n{\n try\n { \n driver.manage().deleteAllCookies();\n //if (driver...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the kafka source information and create a flink kafka producer
private static FlinkKafkaConsumer<String> getKafkaSource(Tuple3<String, String, String> sourceTuple) { Properties properties = new Properties(); properties.setProperty("bootstrap.servers", sourceTuple.f0); properties.setProperty("group.id", sourceTuple.f1); FlinkKafkaConsumer<String> source = new FlinkKafkaCons...
[ "private static Producer<String, byte[]> createProducer(){\n //Java.utils.properties defines certain properties to pass to constructor of kafka producer\n Properties props = new Properties();\n\n props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, BOOTSTRAP_SERVERS);\n props.put(Producer.CLIENT_ID_CONFIG...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the XPathSyntaxException(String,int,String) constructor test.
@Test public void testXPathSyntaxException_5() throws Exception { String xpath = "0123456789"; int position = 0; String message = ""; XPathSyntaxException result = new XPathSyntaxException(xpath, position, message); // add additional test code here assertNotNull(result); assertEquals(0, result.getPos...
[ "@Test\n\tpublic void testXPathSyntaxException_1()\n\t\tthrows Exception {\n\t\tString xpath = \"\";\n\t\tint position = 0;\n\t\tString message = \"\";\n\n\t\tXPathSyntaxException result = new XPathSyntaxException(xpath, position, message);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display the next country
public void nextCountry(View view) { if (!countryList.getCountryList().isEmpty() && index < countryList.getCountryList().size()) { index += 1; displayCountry(); } }
[ "public void bankInfoPanelNext() {\n\t\tsetBooBankGenInfo(false);\n\t\tsetBooBankAddress(true);\n\t\tsetBooFileAcceptance(false);\n\n\t\t/*First time we have to make this local panel invisible, at that time Id will be null*/\n\t\tif(getCountryId() == null) {\n\t\t\tsetBooLocalPanelRender(false);\n\t\t} else if(getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method where passengers are stuck until the busDriver announces they can board the bus, whenever this happens they check if the busQueue still has free spots. If it does and if the passenger fills the last spot it signals that the bus is full and so the busDriver can precede with his life cycle.
public void enterTheBus(){ lock.lock(); try { // Condition where passengers wait for the bus boarding signal busBoarding.await(); // Check if the passenger can still get in the bus if(spots.size() < ClientAirport.nSeatingPlaces) { ...
[ "public void announcingBusBoarding(){\n lock.lock();\n try {\n busQsize = 0;\n\n // Waits for at least one passenger to arrive.\n do\n {\n waitingqueue.await(1,TimeUnit.SECONDS);\n\n // Condition to check if their are three or l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a value to property accessibilityAPI.
Builder addAccessibilityAPI(Text value);
[ "Builder addAccessibilityAPI(String value);", "Builder addAccessibilityControl(String value);", "Builder addAccessibilityControl(Text value);", "Builder addAccessibilityFeature(String value);", "Builder addAccessibilityFeature(Text value);", "void add(Usage.Value value);", "Builder addAccessibilityHazar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Insert a a batch of merged peptide spectra into the database
public synchronized void insertBatch(int startPeptideID, LinkedList<float[]> listOfMzArrays, LinkedList<float[]>listOfIntensityArrays, LinkedList<Integer> massKeys) throws SQLException { String SQL = "INSERT INTO "+MergedSpectrumTable+"(peptideID,peakMz,pea...
[ "@Insert\n void insertAll(Measurement... measurements);", "public abstract void insertBatch();", "public void insertSegments(Activity activity) throws SQLException {\n /*\n * Insert every segment with a for loop and a custom made database procedure.\n */\n for (Segment segment: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a rotor, reading its description from _config.
private Rotor readRotor() { try { String name; if (starter.isEmpty()) { name = _config.next(); } else { name = starter; } String orientation = _config.next(); String typer = ""; String notches = "...
[ "private Rotor readRotor() {\n try {\n String rotorNotches;\n String notches = \"\";\n String name = _config.next().toUpperCase();\n String rotorType = _config.next();\n while (_config.hasNext(\"([(]\\\\S+[)])+\")) {\n notches += _config.n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column PIP_FEE_ACTUAL_REG.INPUTIME
public void setInputime(Date inputime) { this.inputime = inputime; }
[ "public void setIMEI(String IMEI) {\n this.IMEI = IMEI;\n }", "public void setInputNum(Integer inputNum) {\r\n this.inputNum = inputNum;\r\n }", "public void setIstimed(BigDecimal istimed) {\n this.istimed = istimed;\n }", "protected void onChange_InfectionRisk() {\n onChange_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a VBRuleInfo for the given rule. If there is a cached rule info, this one is used
private VBRuleInfo getRuleInfo(final Rule rule) throws InconsistentRuleException { VBRuleInfo modifyableRuleInfo = ruleInfoRegistry.get(rule); if (modifyableRuleInfo != null) { return modifyableRuleInfo; } modifyableRuleInfo = new VBRuleInfo(rule); ruleInfoRegistry.put(rule, modifyableRuleInfo); return m...
[ "RuleInfo getRuleInfo(long ruleID) throws IOException;", "IpFirewallRuleInfo get(String resourceGroupName, String workspaceName, String ruleName);", "Rule getRule();", "com.google.ads.googleads.v0.common.UserListRuleInfo getRule();", "public Rule getRule() {\n\t\treturn rule;\n\t}", "public void cacheResu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Check if there is a path between a point and an object.
public boolean hasPathTo(Ray ray, WorldObject object) { Hit objHit = object.intersect(ray); for(int i = 0; i < scene.objects.size(); i++) { WorldObject curObject = scene.objects.get(i); if(curObject == object) continue; Hit hit = curObject.intersect(ray); if(hit.distance < objHit.distance)...
[ "public boolean isPointOnPath();", "@Override\n public boolean isPointInPath(double x, double y) {\n return graphicsEnvironmentImpl.isPointInPath(canvas, x, y);\n }", "private boolean onPath( Shape path, float x, float y )\n\t{\n\t\tfor( int i = 0; i < path.getPointCount() + 1; i++ )\n\t\t{\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of configServiceUrl.
protected void setConfigServiceUrl(String configServiceUrl) { this.configServiceUrl = configServiceUrl; }
[ "public void setServiceUrl(String serviceUrl) {\n this.serviceUrl = serviceUrl;\n }", "public void setConfigService(ConfigurationService configService) {\n this.configService = configService;\n }", "@Override\n public void setServiceUrl(String serviceUrl) {\n\n remoteCertificateSer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the lists and items into database. Can store data into either MySQL or Derby database.
public void databaseSave(String type) { try { for (int i = 0; i < lists.size(); i++) { Databaser.storeToDatabase(type, lists.get(i)); for (int j = 0; j < lists.get(i).size(); j++) { List<ShoppingLinkedList> tempList = Databaser.getLists(type); ...
[ "public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}", "public int saveItems(ItemList list);", "public void saveList() {\n String name = (String) listnameField.getValue();\n if (languageSelect.getV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Model of the Club entity
public interface Club { String getIdClub(); String getNameClub(); String getLogoClub(); String getFK_idLeague(); }
[ "public Club getClub() {\n\t\treturn club;\n\t}", "public String getClubName() {\r\n return clubName;\r\n }", "public String getClubName() {\n return clubName;\n }", "public static List<Club> getClubs(){\n return clubs;\n }", "public Club() {\n }", "public Club() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clear the list of seed URLs.
public void clearSeedUrls(){ seedUrls.clear(); }
[ "public void clearSeeds() {\n\t\tseedList = new ArrayList<String>();\n\t}", "public final void setSeedUrls(URL[] urls){\n\t\tseedUrls.clear();\n\t\taddSeedUrls(urls);\n\t}", "public void resetUrl()\r\n {\r\n this.url = null;\r\n }", "private void resetSeeds(){\n sensorCountGeneratorSeed = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads the requested level and returns the player for the level, if no level is found for the given name returns null
public Player loadLevel(String level) { stopLevel(); Level temp = levels.get(level); if (temp == null) { return null; } Player player = temp.load(); currentObjective = temp.getObjective(); levelRunning = level; return player; }
[ "private IPlayer loadPlayer() {\n double x = levelJSON.getAsJsonObject(\"Player\").get(\"x\").getAsDouble();\n double y = levelJSON.getAsJsonObject(\"Player\").get(\"y\").getAsDouble();\n return EntityFactory.basicPlayer(x,y);\n }", "protected abstract Player getModPlayer(String name);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this is the helper function for the boolean or it takes in both the or expression as well as the boolean expression containing the or. This is so that we can prune the expression if necessary
private void handleOr( ObjRef or, ObjRef exp, SymbolTable symbolTable, ObjRef boolContext ) throws NoSuchTypeException, MissingElementException, TypeMismatchException { ObjRef left = ( ObjRef )xArch.get( or, "BooleanExp1" ); ObjRef right = ( ObjRef )xArch.get( or, "BooleanExp2" ); ...
[ "private Expr or() {\n Expr expr = and();\n while (match(OR)) {\n Token operator = previous();\n Expr right = and();\n expr = new Expr.Logical(expr, operator, right);\n }\n\n return expr;\n }", "DSL_Expression_Or createDSL_Expression_Or();", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initializing the recycler view comments adapter
private void initCommentAdapter() { adapter = new CommentsAdapter(mContext, new CommentsAdapter.OnDeletingCommentListener() { @Override public void OnDeleteComment() { post_comments_count--; if (index != -1) posts.get(index).setPost_com...
[ "private void initAdapter() {\n mHeaderDetailAdapter = new HeaderDetailAdapter(this, mListImage);\n mViewPager.setAdapter(mHeaderDetailAdapter);\n // Set Adapter for recycler view Comment and rating\n mListCommentAdapter = new ListCommentAdapter(mListUser);\n mRecyclerViewComment....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC NONNULL_PTR this_ptr);
public static native long UpdateAddHTLC_get_amount_msat(long this_ptr);
[ "public static native long HTLCOutputInCommitment_get_amount_msat(long this_ptr);", "public static native void UpdateAddHTLC_set_amount_msat(long this_ptr, long val);", "public static native long RouteHop_get_fee_msat(long this_ptr);", "public static native int UnsignedChannelUpdate_get_fee_base_msat(long thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To verify "Edit Frontdesk Payment Receipt Number" page with (,_) special characters in Prefix field.
@Test(priority=31,groups={"P0","InvoiceNumbserSettingsTest"},description="To verify Edit Frontdesk Payment Receipt Number page with (-,_) special characters in Prefix field.") public void HMS9189() throws Throwable { try { AdminHome AH=AL.adminlogin("12903","barkha.kapoor52@gmail.com","86bc0493"); //AdminHo...
[ "private void validatePrefix(RowValidation rowValidation) {\n String phoneNumber = rowValidation.getPhoneNumber();\n logger.info(String.format(\"Phone number is valid: %s\", phoneNumber));\n\n Matcher matcherWithTrailingZero = patternWithTrailingZero.matcher(phoneNumber);\n Matcher match...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to change the role of a CastMember.
public boolean changeCastMemberRole(CastMember castMember) { try (PreparedStatement ps = connection.prepareStatement("UPDATE castMembers SET " + "role = ? " + "WHERE productionID = ?" + "AND artistID = ?")) { ps.setString(1, castMember.getJobTitle()); ...
[ "public void setRole(Role role);", "public void setRole(de.tif.jacob.core.definition.impl.jad.castor.CastorRole[] roleArray)\n {\n //-- copy array\n _roleList.removeAllElements();\n for (int i = 0; i < roleArray.length; i++) {\n _roleList.addElement(roleArray[i]);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the schedule settings of the given object
public static String[] getSchedule(final Object obj) { Tasklet annot = obj.getClass().getAnnotation(Tasklet.class); String[] effectiveSchedDefs = null; if (annot != null) { String[] schedDefs = annot.schedule(); for (String schedDef : schedDefs) { if (!schedDef.equals("")) { effectiveSchedDefs = ...
[ "public ScheduleProperties schedule() {\n return this.schedule;\n }", "public Schedule getSchedule(){\r\n\t\treturn this.schedule;\r\n\t}", "public Schedules getSchedule() {\n\t\treturn schedule;\n\t}", "java.lang.String getSchedule();", "public Schedule getSchedule() {\r\n\t\treturn schedule;\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The draw method will draw one iteration of the random set of cards.
private void draw () { GraphicsContext g; Deck deck; Card card; double sx; double sy; double dx; double dy; int i; g = canvas.getGraphicsContext2D (); deck = new Deck (); deck.shuffle (); for (i = 0; i < 5; i ++) { card = deck.dealCard (); sx = 79 * (card.getValue () - 1); sy = 12...
[ "public Card draw()\r\n\t {\r\n\t int s = random.nextInt(suits.length);\r\n\t int f = random.nextInt(faces.length);\r\n\t Card card = new Card(suits[s], faces[f]); \r\n\t return card;\r\n\t }", "private Card drawCard()\n {\n int random = (int)(Math.random()*deck.size());\n if(!deck.isEmpty())...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to get all tracks with endpoint track
@GetMapping("/track") public ResponseEntity<?> getAllTracks() { // return list of tracks return new ResponseEntity<List<Track > >(trackService.getAllTracks(),HttpStatus.OK); }
[ "@GET(\"tracks\")\n Call<List<Track>> getTracks();", "@GetMapping(\"/tracks\")\n public Collection<Track> getAllTracks() {\n return trackService.getAllTracks();\n }", "@Override\n public List<Track> getAllTracks() {\n return trackRepository.findAll();\n }", "List<Track> getTrackLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the datetime when the script execution started. Also sets the attribute used to determine whether or not the script has been executed to "true".
public void setScriptStartedAt() { scriptHistory.setStartedAt(DateTime.now()); scriptHistory.setRan(true); }
[ "public void setServerStarted(java.util.Date value);", "public void setTestStart ()\n {\n this.startTime = Instant.now();\n }", "public void setStartTime() {\r\n startTime = System.currentTimeMillis();\r\n }", "public void setSimulationStartTime() {\n simulationStartTime = simula...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback invoked as the result of a read RSSI operation
public void onReadRemoteRssi(@NotNull BlePeripheral peripheral, int rssi, @NotNull GattStatus status) {}
[ "public abstract int wifiGetRssi();", "public void serialEvent (Serial myPort) {\n rssi= myPort.read();\n}", "public String getRSSI() {\n return RSSI;\n }", "public void setRSSI(String RSSI) {\n this.RSSI = RSSI;\n }", "public int getRssi() {\r\n return rssi;\r\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
STAT from user's Mailbox
public String status(User user) { return user.getMailbox().status(); }
[ "boolean hasMailInbox();", "boolean hasInboxMailNum();", "public String getMailbox() {\n return mailbox;\n }", "public static long getInbox(long userNum) throws Exception {\n for (int i = 0;i < UserodC.getListt().Count;i++)\n {\n //No need to check RemotingRole; no call to d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDET_SWITCHED.ROLLOVER_CUMULATIVE
public void setROLLOVER_CUMULATIVE(String ROLLOVER_CUMULATIVE) { this.ROLLOVER_CUMULATIVE = ROLLOVER_CUMULATIVE == null ? null : ROLLOVER_CUMULATIVE.trim(); }
[ "public String getROLLOVER_CUMULATIVE() {\r\n return ROLLOVER_CUMULATIVE;\r\n }", "public void setROLLOVER_NO(BigDecimal ROLLOVER_NO)\r\n {\r\n\tthis.ROLLOVER_NO = ROLLOVER_NO;\r\n }", "public void setROLLOVER_AMOUNT(BigDecimal ROLLOVER_AMOUNT) {\r\n this.ROLLOVER_AMOUNT = ROLLOVER_AMOUNT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a list of favorite TV shows for a user with the specified ID
public int[] getFavoriteTvShowsByUserID(int userID) throws SQLException;
[ "public FavoritesDTO getUserFavorites(final int id){\n return getFavoritesDTO(getUserById(id));\n }", "public static List<Video> getUserFavorites() {\n List<Video> userVideos = new ArrayList<>();\n\n for (int i = 0; i < UserCache.user.getFavoriteList().size(); i++) {\n userVideo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String query = "DELETE FROM "+TABLE_DEMO+" WHERE "+ SEROID + " IS NULL ";
public void delete(){ SQLiteDatabase db = this.getWritableDatabase(); db.execSQL("delete from "+TABLE_DEMO+" where "+SEROID+" IS NULL"); db.execSQL("delete from "+TABLE_FAM+" where "+SEROID+" IS NULL"); db.execSQL("delete from "+TABLE_ADM+" where "+SEROID+" IS NULL"); db.execSQL(...
[ "public static void deleteEmptyRows( LoopTable table )\n throws java.sql.SQLException {\n java.sql.Statement stat = table.getConnection().createStatement();\n stat.executeUpdate( \"DELETE FROM LOOP WHERE SVALUE IS NULL OR AATMCODE IS NULL\" );\n stat.getConnection().commit();\n s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recupere la liste des projet de l'etudiant pour lequel l'etudiant a deja postuler ainsi que la note
public ArrayList<ArrayList<String>> listeProjet() throws RemoteException{ ArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>(); String requete="Select p_id, p_titre, t_debprojet, t_finprojet From projet, association, groupeassoc," + " typeprojet Where ga_idetudiant =" + _etu...
[ "public static void getDernierAllQuestionnaireDerniereVersionsPatient(\r\n\t\t\tArrayList<DoublonDateQuest> listeRetour, Patient pat) {\r\n\t\tfor (Tripplon_questionnaire quest : Configuration.getInstances()\r\n\t\t\t\t.getListeQuestionnaireActif()) {\r\n\t\t\tFile bdd;\r\n\t\t\ttry {\r\n\t\t\t\tbdd = new File(ques...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the specified system service from the owning Activity.
protected Object getSystemService(final String name) { return getActivity().getSystemService(name); }
[ "public Object getSystemService() {\n return this.getSystemService();\n }", "private Object f_getService(String p_name) {\n return f_getApp().getSystemService(p_name);\n }", "private PackageItemInfo getCurrentServiceInfo() {\n final ComponentName currentServiceName = new ComponentName...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This accessor method returns the comma seperated list of Legend Labels.
public String getLegendLabels();
[ "public String getLegend();", "public String legend() {\n \n Attribute classAttribute = null;\n if (m_trainInstances == null) return \"\";\n try {classAttribute = m_trainInstances.classAttribute();} catch (Exception x){};\n if (m_numOfClasses == 1) {\n return (\"-ve = \" + classAttribute.value...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Asserts that a shuffled deck contains the same cards as the original deck, but in a different order Note: it is improbable but possible for this test to produce a false failure if the shuffled deck is identical to the original deck
public void testShuffle() { Deck shuffledDeck = deck; shuffledDeck.shuffle(); Card[] shuffledCards = shuffledDeck.getCards(); validateCards(shuffledCards); for (int ii = 0; ii < shuffledCards.length; ii++) { int matchedCards = 0; if (shuffledCards[ii].eq...
[ "@Test\n public void testValidShuffle() {\n RandomShuffler randomShuffler = new RandomShuffler();\n\n // Test data is built with a ten card deck. This ensures that there are statistically\n // insignificant odds that a random shuffle will produce the same order. The odds are\n // ro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the primary key of this e s f match result.
@Override public void setPrimaryKey(long primaryKey) { _esfMatchResult.setPrimaryKey(primaryKey); }
[ "@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_esfMatchType.setPrimaryKey(primaryKey);\n\t}", "@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_esfTournament.setPrimaryKey(primaryKey);\n\t}", "@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_candidate.setPrimaryKe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SEARCH /_search/offers?query=:query : search for the offer corresponding to the query.
@GetMapping("/_search/offers") @Timed public ResponseEntity<List<OfferDTO>> searchOffers(@RequestParam String query, Pageable pageable) { log.debug("REST request to search for a page of Offers for query {}", query); Page<OfferDTO> page = offerService.search(query, pageable); HttpHeaders ...
[ "private void searchFor(String query) {\n AnalyticsHelper.sendEvent(SCREEN_LABEL, \"Search\", \"\");\n Bundle args = new Bundle(1);\n if (query == null) {\n query = \"\";\n }\n args.putString(ARG_QUERY, query);\n mQuery = query;\n\n }", "List<Revenue> search...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Oracle columns in the schema. When unspecified as part of inclue/exclude lists, includes/excludes everything. repeated .google.cloud.datastream.v1alpha1.OracleColumn oracle_columns = 2;
java.util.List<com.google.cloud.datastream.v1alpha1.OracleColumn> getOracleColumnsList();
[ "java.util.List<? extends com.google.cloud.datastream.v1alpha1.OracleColumnOrBuilder> \n getOracleColumnsOrBuilderList();", "com.google.cloud.datastream.v1alpha1.OracleColumnOrBuilder getOracleColumnsOrBuilder(\n int index);", "int getOracleColumnsCount();", "public void discoverColumnTypes() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a vector of Strings parsable as integers that represent NCBI taxids of the selected species in the panel's JList
public Vector getSelectedSpeciesTaxids (){ Object[] species = this.speciesList.getSelectedValues(); if(species == null || species.length == 0) return new Vector(); Vector taxids = new Vector(); for(int i = 0; i < species.length; i++){ Hashtable sp = (Hashtable)species...
[ "public Vector getSelectedSpeciesNames (){\n \tObject[] species = this.speciesList.getSelectedValues();\n if(species == null || species.length == 0) return new Vector();\n \n Vector names = new Vector();\n for(int i = 0; i < species.length; i++){\n Hashtable sp = (Hashtable)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .rplugininterop.ShortS4ClassInfoList.ShortS4ClassInfo shortS4ClassInfos = 1;
java.util.List<? extends org.jetbrains.r.rinterop.ShortS4ClassInfoList.ShortS4ClassInfoOrBuilder> getShortS4ClassInfosOrBuilderList();
[ "java.util.List<org.jetbrains.r.rinterop.ShortS4ClassInfoList.ShortS4ClassInfo> \n getShortS4ClassInfosList();", "org.jetbrains.r.rinterop.ShortS4ClassInfoList.ShortS4ClassInfo getShortS4ClassInfos(int index);", "int getShortS4ClassInfosCount();", "org.jetbrains.r.rinterop.ShortS4ClassInfoList.ShortS4Cla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the specified comment to the list of trailing comments.
public void addTrailingComment(Comment c) { addComment(RelativePosition.TRAILING, c); }
[ "public void addTrailingComments(List<Comment> comments) {\n for (Comment comment : comments) {\n addComment(RelativePosition.TRAILING, comment);\n }\n }", "public void addComment(String comment) {\n this.comments[numOfComments++] = comment;\n }", "public void addTrailingCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the object with the settings used for calls to createWorkflow.
public UnaryCallSettings<CreateWorkflowRequest, Operation> createWorkflowSettings() { return ((WorkflowsStubSettings) getStubSettings()).createWorkflowSettings(); }
[ "public UnaryCallSettings.Builder<GetWorkflowRequest, Workflow> getWorkflowSettings() {\n return getStubSettingsBuilder().getWorkflowSettings();\n }", "public UnaryCallSettings.Builder<CreateWorkflowRequest, Operation> createWorkflowSettings() {\n return getStubSettingsBuilder().createWorkflowSetting...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Main loop: iterates over all mobs and triggers their next action
@SuppressWarnings("InfiniteLoopStatement") public static void loop() throws IOException { final int frame_interval_ms = 200; while (true) { long startMs = System.currentTimeMillis(); for (var mobAI : mobs.values()) { Action action = mobAI.getAction(); ...
[ "public void run() {\n\t\todometer.setXYT(0.0, 0.0, 0.0);\n\t\t\n\t\tleftMotor.setSpeed(FORWARD_SPEED);\n\t\trightMotor.setSpeed(FORWARD_SPEED);\n\n\t\tint i;\n\t\tfor (i = 0; i < 5; i++) {\n\t\t\ttravelTo(Lab3.MAP[i][0], Lab3.MAP[i][1]);\n\t\t}\n\t}", "public void runSimulation(){\n\t\tdetermineActivity();\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
try to move all drones
public void moveAllDrones() { for (Pieces d : drones) { d.tryToMove(this); } }
[ "public void moveAll()\n\t{\n\t\tmoveOutput = \"\";\n\t\tfor (int i = 0; i < 20; i++)\n\t\t{\n\t\t\tif (river[i] != null)\n\t\t\t{\n\t\t\t\triver[i].move(i);\n\t\t\t}\n\t\t}\n\t}", "public void moveAll() {\r\n for (House a : houses) {\r\n a.move();\r\n }\r\n }", "public void movePawn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Manages the chain of repository filters to perform result filtering.
public interface RepositoryResultFilterChain<T> { /** * Invokes the next filter in the chain or the actual repository once all filters * have been invoked. * * @param context holding the request and other information. * @return filtered result */ Collection<T> doFilter(RepositoryF...
[ "Collection<T> doFilter(RepositoryFilterContext context);", "@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies atom and residue names from author columns in all rows.
public static void copyFromAuthorData( LoopTable table ) throws java.sql.SQLException { java.sql.Statement stat = table.getConnection().createStatement(); stat.executeUpdate( "UPDATE LOOP SET COMPID=ACOMPCODE,ATOMID=AATMCODE" ); stat.getConnection().commit(); stat.close(); ...
[ "private void convertAuthorsToPerson() {\n List<Object[]> authors = jdbcTemplate.query(\"SELECT * FROM T_AUTHORS\", new AuthorRowMapper());\n\n String query = \"INSERT INTO \" + IDaoPersons.TABLE + \"(NAME, FIRST_NAME, NOTE, THE_COUNTRY_FK, TYPE) VALUES (?,?,?,?,?)\";\n\n for (Object[] author :...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the nonlinear regression tolerance
public void setTolerance(final double tol) { fTol = tol; }
[ "private void internalSetTolerance(final double tolerance) {\n if (tolerance < MIN_TOLERANCE) {\n throw new IllegalArgumentException();\n }\n this.tolerance = tolerance;\n }", "public void setVarimaxTolerance(double tolerance){\n this.varimaxTolerance = tolerance;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hook for sending a corrupt callback.
protected void sendCorruptCallback() { downloadCallback.promptAboutCorruptDownload(this); }
[ "protected abstract void processCorruptFrame(CorruptFrame frame) throws InvalidCrc;", "public boolean onTransBuffer_C2C_RealTimeSendFaild_CallBack(Protocal p);", "void onSwallowException(Exception e);", "public void setCorrupt() {\n\t\t\n\t\tthis.isCorrupt = true;\n\t}", "public boolean onProtocolError() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Answers a question whether a given file should be searched. The file must be a plain file (not folder).
public boolean searchFile(FileObject file) throws IllegalArgumentException;
[ "public static void searchFile() \n\t{\n\t\t//Variable Declaration\n\t\tString fileName;\n\t\tScanner obj = new Scanner(System.in);\n\n\t\t//Read file name from user\n\t\tSystem.out.println(\"Enter file name to searched:\");\n\t\tfileName= obj.nextLine();\n\t\t\n\t\t//Searching the file\n\t\tboolean isFound = FileM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of deposit method, of class SavingsAccount.
@Test public void testDeposit() { System.out.println("deposit"); double amount = 0.00; Bank bank = new Bank("BankOfATeam"); String custId = bank.addCustomer("Piffl", "Hymie"); Customer cust = bank.getCustomer(custId); SavingsAccount account = cust.addSa...
[ "public void testDeposit() {\n\t\tAccount nancy = new Account(500);\n\t\tnancy.deposit(500);\n\t\tint expectedBal = 1000;\n\t\tint actualBal = nancy.balance();\n\t\tassertEquals(expectedBal, actualBal);\n\t}", "@Test\n\tpublic void depositTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls CheckStageEventStatus (CCMN06U) common function to determine whether or not the case is still open and modifiable.
private void callCheckStageEventStatus(EventValueBean event) { String actionCode = ServiceConstants.REQ_FUNC_CD_ADD; if (event.getEventId() > 0) { actionCode = ServiceConstants.REQ_FUNC_CD_UPDATE; } CCMN06UI ccmn06ui = populateCCMN06UI_CheckStageEventStatus(event, actionCode); checkStage...
[ "private CCMN06UI populateCCMN06UI_CheckStageEventStatus(EventValueBean eventBean, String actionCode) {\r\n GrndsTrace.enterScope(TRACE_TAG + \".populateCCMN06UI_CheckStageEventStatus\");\r\n\r\n CCMN06UI ccmn06ui = new CCMN06UI();\r\n ArchInputStruct input = new ArchInputStruct();\r\n\r\n ccmn06ui.setU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the optimization filter composed from the settings in the dialog.
public String getFilter() { return new FilterBuilder(optimizationCheckBoxes, '/').buildFilter(); }
[ "private IDialogSettings getFilterSettings(IDialogSettings settings) {\n return settings.getSection(\"filter\");\n }", "Filter getFilter();", "ImageFilter getFilter();", "public Filter getFilter() {\n\t\treturn (filter);\n\t}", "protected HashMap<String, Object> getFilter() {\n Boolean b = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds Faculty by Primary Key
@Transactional(readOnly = true) public FacultyDTO findByPK(long id) { return dao.findByPK(id); }
[ "public FacultyDTO findByPK(long pk);", "public FacultyBean findByPK(long pk) throws ApplicationException{\n\t\t\t\n\t\t\tlog.debug(\"Model findByPK Started\");\n\t\t\t\n\t\t\tStringBuffer sql=new StringBuffer(\"SELECT * FROM ST_FACULTY WHERE ID=?\");\n\t\t\t\n\t\t\tFacultyBean bean=null;\n\t\t\tConnection conn=n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the e s f matchs before and after the current e s f match in the ordered set where eventType = &63;.
public it.ethica.esf.model.ESFMatch[] findByEventType_PrevAndNext( long esfMatchId, java.lang.String eventType, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException, it.ethica.esf.NoSuchMatchException;
[ "public List<Match> getPreviousMatches(Date date, long relevantDuration) {\n\t\tDate earliestGame = new Date(date.getTime()-relevantDuration);\n\t\tList<Match> toReturn = new ArrayList<>();\n\t\tfor (int i=teamMatches.size()-1;i>=0;i--) {\n\t\t\tDate dateOfMatch = teamMatches.get(i).getDate();\n\t\t\tif (dateOfMatc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use this API to delete dnssrvrec resources.
public static base_responses delete(nitro_service client, dnssrvrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnssrvrec deleteresources[] = new dnssrvrec[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new d...
[ "public static base_responses delete(nitro_service client, String domain[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (domain != null && domain.length > 0) {\n\t\t\tdnssrvrec deleteresources[] = new dnssrvrec[domain.length];\n\t\t\tfor (int i=0;i<domain.length;i++){\n\t\t\t\tdeleteresources[i] =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ByteArrayResource which provides access to the given byte array. Changes to the given byte array will affect this resource even after the resource is created. Changing the byte array while an input stream from this resource is in use has undefined behavior.
public ByteArrayResource(String mimetype, byte[] bytes) { super(mimetype); this.bytes = bytes; }
[ "public Resource(byte bytes[], String aName) { _bytes = bytes; _name = aName; }", "ByteArray(byte []a) {\n\tdata = a;\n }", "public interface ByteArrayable\r\n{\r\n /**\r\n * Returns a new byte array representing the data in the object.\r\n * (Note: this should generally return a clone of the data...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this runs the connect four game
public static void connect4(){ //set grid and print it tell users how to win and the game System.out.print("\n-------- WELCOME TO CONNECT 4 --------"); System.out.println("\n GET FOUR IN A ROW TO WIN\n"); setGrid(); outputGrid(); for(int i =0; i>-1;i++){ ...
[ "private void run(Connect4 pConnect4) {\n//\t\tmConnect4 = pConnect4;\n//\t\tint randMove = 0;\n//\t\tboolean valid = false;\n//\t\tRandom rand = new Random();\n//\t\t//\tContinues to generate random moves until we get a valid one.\n//\t\tdo {\n//\t\t\trandMove = rand.nextInt(6) + 1;\n//\t\t\tvalid = mConnect4.vali...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getAvatarByEnvironmentID method, of class AvatarDAO.
@Test public void testGetAvatarByEnvironmentID_int() throws Exception { System.out.println("getAvatarByEnvironmentIDint"); int envID = 0; AvatarDAO instance = new AvatarDAO(); Avatar result = instance.getAvatarByEnvironmentID(envID); int res = result.getAvatarIdPk(); ...
[ "@Test\n public void testGetAvatarByEnvironmentID_Environment() throws Exception {\n System.out.println(\"getAvatarByEnvironmentID_envi\");\n Environment environment = new Environment(1);\n environment.setEnvIdPk(3);\n AvatarDAO instance = new AvatarDAO();\n Avatar result = ins...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the SocketCreator that should be used to produce sockets for TCPConduit connections.
protected SocketCreator getSocketCreator() { return socketCreator; }
[ "public Socket createSocket() throws IOException {\n return factory.createSocket();\n }", "interface SocketFactory {\n /** Return a listen socket of the appropriate type */\n ServerSocket newServerSocket(String bindAddr, int port, int backlog)\n\tthrows IOException;\n\n /** Return a socket of t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }