query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
This shows the daily goal that was set by the user | public void getDailyGoal()
{
JOptionPane.showMessageDialog(pane, "You have: " + goal + " kcal left, You got this!");
} | [
"public int getGoalstartPeriod() {\r\n return goalstartPeriod;\r\n }",
"private void refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekye... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Code System'. | CodeSystem createCodeSystem(); | [
"Code createCode();",
"public CodeSystem getCodeSystem() {\r\n\t\treturn codeSystem;\r\n\t}",
"Coding createCoding();",
"public String getCodeSystem() {\n return this.codeSystem;\n }",
"CodeType createCodeType();",
"CodeSystemVersion createCodeSystemVersion();",
"public String getCodeSystem() {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
org.exolab.castor.types.Date getDtDtIncmgPersBirth() Returns the value of field 'dtDtIncmgPersDeath'. | public org.exolab.castor.types.Date getDtDtIncmgPersDeath()
{
return this._dtDtIncmgPersDeath;
} | [
"public org.exolab.castor.types.Date getDtDtIncmgPersBirth()\r\n {\r\n return this._dtDtIncmgPersBirth;\r\n }",
"public org.exolab.castor.types.Date getDtDtPersonDeath()\r\n {\r\n return this._dtDtPersonDeath;\r\n }",
"public void setDtDtIncmgPersDeath(org.exolab.castor.types.Date dtDt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstEntity__AnnotationsAssignment_0" $ANTLR start "rule__AstEntity__ActorAssignment_1" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22746:1: rule__AstEntity__ActorAssignment_1 : ( ruleAstAbstractActor ) ; | public final void rule__AstEntity__ActorAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22750:1: ( ( ruleAstAbstractActor ) )
... | [
"public final void rule__AstEntity__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4041:1: ( ( ( rule__AstEntity__Act... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column S_TODO_DET.TODO_STATUS | public String getTODO_STATUS() {
return TODO_STATUS;
} | [
"public String getTODO_ALERT_OLD_STATUS() {\r\n return TODO_ALERT_OLD_STATUS;\r\n }",
"public void setTODO_STATUS(String TODO_STATUS) {\r\n this.TODO_STATUS = TODO_STATUS == null ? null : TODO_STATUS.trim();\r\n }",
"public String getStatus(){\n\n //returns the value of the status field\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for CARDGROUP_SEQ using the alias name CardgroupSeq. | public String getCardgroupSeq() {
return (String) getAttributeInternal(CARDGROUPSEQ);
} | [
"public void setCardgroupSeq(String value) {\r\n setAttributeInternal(CARDGROUPSEQ, value);\r\n }",
"public Number getSeq() {\n return (Number)getAttributeInternal(SEQ);\n }",
"public String getAcIdseq() {\n return (String)getAttributeInternal(ACIDSEQ);\n }",
"java.lang.String getGrpSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__OpaqueAction__Group_5_3__0" $ANTLR start "rule__OpaqueAction__Group_5_3__0__Impl" InternalActivityDiagram.g:2963:1: rule__OpaqueAction__Group_5_3__0__Impl : ( ',' ) ; | public final void rule__OpaqueAction__Group_5_3__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:2967:1: ( ( ',' ) )
// InternalActivityDiagram.g:2968:1: ( ',' )
{
// InternalActiv... | [
"public final void rule__OpaqueAction__Group_4_3__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:2744:1: ( ( ',' ) )\n // InternalActivityDiagram.g:2745:1: ( ',' )\n {\n /... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/From closed phase clicking on close button and selecting Lost competition from followup type and filling all details and verifying that lead in Management module. | @Test
public void za_LC_TS_33_leadcloseLostCompetition() throws Exception{ // ts33_tc004 (Hardik)
help.expand();
startup("closedPhase","Closed Phase");
WebElement w = driver.findElement(By.tagName(bdm.getProperty("leads_info_tag"))).findElements(By.tagName(bdm.getProperty("leads_info_tagname"))... | [
"@Test\n\t\tpublic void za_LC_TS_33_leadcloseLostCompetition() throws Exception{ // ts33_tc004 (Hardik)\n\t \t \thelp.expand();\n\t \t \tstartup(\"closedPhase\",\"Closed Phase\");\n\t\t\tWebElement w = driver.findElement(By.tagName(bdm.getProperty(\"leads_info_tag\"))).findElements(By.tagName(bdm.getProperty(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sort the request parameters by their name. | @SuppressWarnings("unchecked")
private static Map<String, String[]> sortRequestParameters( ServletRequest request ) {
Map<String, String[]> sortedParams = new TreeMap<String, String[]>();
Set<Map.Entry<String, String[]>> params = request.getParameterMap().entrySet();
for ( Map.Entry<String, String[]> entr... | [
"Sort asc(QueryParameter parameter);",
"@SuppressWarnings(\"unchecked\")\n private static Map<String, String> sortHeaders( HttpServletRequest request ) {\n Map<String, String> sortedHeaders = new TreeMap<String, String>();\n Enumeration<String> attrEnum = request.getHeaderNames();\n while ( attrEnum.has... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if(a>b) return a; else return b; | static int maxOf(int a,int b){
return a>b?a:b;
} | [
"int max(int a, int b) { return (a > b) ? a : b;}",
"int maxOf(int a, int b) {\n return (a > b) ? a : b;\n }",
"public static Comparable max(Comparable a, Comparable b)\n\t{\n\t\tif (a.compareTo(b) > 0) //if a > b ...\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"public double maximum(double a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add email and password to registration info. Override to add more... Perform checks before running this | protected void createRegistrationInfo() {
registrationInfo.put("email", email.getText().toString());
registrationInfo.put("password", password.getText().toString());
} | [
"private void registerAccount() {\n\t\taccountManager.registerAccount(etEmail.getText().toString(), etPassword.getText().toString(), etUser.getText().toString());\n\t}",
"public void register()\n {\n String n = nameProperty.getValue();\n if (n == null || n.isEmpty())\n {\n throw new Illeg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getMailing returns a Package object's mailing class | public String getMailing() {
return mailing;
} | [
"public String getMailingClass() {\r\n return mailingclass;\r\n }",
"Object getMailhost();",
"@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)\n public net.zylk.liferay.portal.model.Mailing getMailing(long mailingId)\n throws com.liferay.portal.kernel.exception.PortalExcep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an aliased public.circuits table reference | public Circuits(Name alias) {
this(alias, CIRCUITS);
} | [
"private static TableRef createAliasedTableRef( final TableMeta table,\n final String alias ) {\n return new TableRef() {\n public String getColumnName( String rawName ) {\n return alias + \".\" + rawName;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test rentMovie(int movieId, String user) when a book is already rented. | @Test
public void vrentMovie2() {
Map<Integer, String> rentedMovies = MovieDatabase.getRentedMovies();
rentedMovies.put(m1.getId(), "Vishal");
Assert.assertEquals(false, ms.rentMovie(m1.getId(), "Rohit"));
} | [
"@Test\n\tpublic void vrentMovie3() {\n\t\tAssert.assertEquals(false, ms.rentMovie(doesnotExistMovie.getId(), \"Rohit\")); // exist\n\t}",
"@Test\n\tpublic void vrentMovie1() {\n\t\tAssert.assertEquals(true, ms.rentMovie(m1.getId(), \"Vishal\"));\n\t}",
"@Test\n void addNewRatedProduct01() {\n ListOfU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the templatE value for this Uiinternal. | public java.lang.String getTemplatE() {
return templatE;
} | [
"public String getTemplatename() {\n\t\treturn templatename;\n\t}",
"public Template getValueTemplate() {\n\t\treturn valueTemplate;\n\t}",
"@objid (\"f86cdd13-614a-4941-aa6e-f30bd085d79c\")\n public String getTemplateImage() {\n return this.elt.getTagValue(Pattern.MdaTypes.TEMPLATE_IMAGE_TAGTYPE_ELT)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function : processFailedMails Input: SqlHelper object, number of threads Purpose: Prompts the user to retry sending mails Returns: Number of mails which are still not sent | public static int processFailedMails(SqlHelper sqlHelper, int threadsCount) {
// Fetch number of mails which were not sent
int failedCount = sqlHelper.getFailedCount();
// Check for failed mails and prompt user to retry
while (failedCount > 0) {
String in = inputValidString("\nFailed to send " + failedCount ... | [
"protected void sendEmails() {\n\t\tboolean sent;\n\t\tVector<Email> unsent = new Vector<Email>();\n\n\t\twhile (messages.size() > 0) {\n\t\t\tEmail email = messages.remove(0);\n\t\t\tsent = sendEmail(email);\n\n\t\t\t// If the mail can not be sent, trace the email\n\t\t\tif (!sent) {\n\t\t\t\temail.increaseRetryCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overwrites the current gift list for the specified username and gift list if date is different | public void overwriteGift(ArrayList<Gift> gList, String username){
String path = FILEPATH + username+".csv";
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yy");
PrintStream fileOut = null;
try {
fileOut = new PrintStream(new FileOutputStream(path, false));
fileOut.println("friendName... | [
"private void updateUserList() {\n\t\tUser u = jdbc.get_user(lastClickedUser);\n\t\tString s = String.format(\"%s, %s [%s]\", u.get_lastname(), u.get_firstname(), u.get_username());\n\t\tuserList.setElementAt(s, lastClickedIndex);\n\t}",
"public void forceUserListUpdate() {\n\t\tif ( hsUserUpdates.size() > 0 )\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update a batch of custom vocabulary items for a given bot locale's custom vocabulary. | java.util.concurrent.Future<BatchUpdateCustomVocabularyItemResult> batchUpdateCustomVocabularyItemAsync(
BatchUpdateCustomVocabularyItemRequest batchUpdateCustomVocabularyItemRequest,
com.amazonaws.handlers.AsyncHandler<BatchUpdateCustomVocabularyItemRequest, BatchUpdateCustomVocabularyItemResul... | [
"java.util.concurrent.Future<BatchUpdateCustomVocabularyItemResult> batchUpdateCustomVocabularyItemAsync(\n BatchUpdateCustomVocabularyItemRequest batchUpdateCustomVocabularyItemRequest);",
"java.util.concurrent.Future<ListCustomVocabularyItemsResult> listCustomVocabularyItemsAsync(\n ListCu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show/hide the CPU idle data based on the check box selection | @Override
public void actionPerformed(ActionEvent ae)
{
setCPUIdleTime(cpuIdleCheckbox.isSelected());
} | [
"protected void setCPUIdleTime(boolean showIdle)\n {\n // Adjust the check box selection. This is necessary if the user\n // toggles the \"Show idle\" check box in the Preferences dialog;\n // otherwise the local check box will be out of sync\n cpuIdleCheckbox.setSelected(showIdle);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process the pipeline tasks. | private void process(IPipeline pipeline) {
if (pipeline != null) {
pipelineExecutor.submit(new DoPipelineThread(mHandler, pipeline));
} else {
PipeLog.w(TAG, "pipeline is null");
}
} | [
"public void doPipeline(IPipeline pipeline) {\n if (pipeline != null && pipeline.getTaskList() != null && pipeline.getPipeItem() != null) {\n process(pipeline);\n } else {\n PipeLog.w(TAG, \"pipeline or tastList or pipeItem is null.\");\n }\n }",
"public void process(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the function with a null string | @Test
public void testWithNullString() throws org.nfunk.jep.ParseException
{
String string = null;
Stack<Object> parameters = CollectionsUtils.newParametersStack(string);
function.run(parameters);
assertEquals(TRUE, parameters.pop());
} | [
"public boolean testnull(String in) {return in==null;}",
"public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }",
"public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }",
"private boolean isStringNull(String string) {\n return string.equals(\"\");\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a new module is added to this modular configuration. Will register the entries found inside into this instance. It's important that this module is already registered inside the base block list somewhere before this method is called. | void onModuleAdded(final ModularConfigurationModule<T> module) {
for (ModularConfigurationEntry<T> newEntry : module.getAll()) {
ModularConfigurationEntry<T> existing = entries.getIfExists(newEntry.getName());
if (existing == null) {
existing = removedEntries.remove(newEn... | [
"@SubscribeEvent\n public void registerBlocks(RegistryEvent.Register<Block> event) {\n IForgeRegistry<Block> reg = event.getRegistry();\n for (Block block : registrationListBlocks) {\n reg.register(block\n .setRegistryName(new ResourceLocation(ReforgedMod.ID, block.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a temporary file in a given directory. Filename: "tmpfileHHmmss" | public static Path createTempFile(Path dir) {
try {
String timestamp = simpleDateFormat.format(new Date());
String basename = "tmpfile" + timestamp;
var path = Files.createTempFile(dir, basename, ".txt");
toDelete.add(path);
return path;
} catc... | [
"public static File createTempDirectory() throws IOException {\n\t\treturn createTempDirectory(\"temp\" + System.nanoTime());\n\t}",
"protected File createTmpFile() {\n final long rand = (new Random(System.currentTimeMillis())).nextLong();\n File file = new File(\"jpcoverage\" + rand + \".tmp\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Applies the given node to the given vizmapper | public boolean applyVizMap ( NodeView node_view ); | [
"public boolean applyVizMap ( NodeView node_view, VisualStyle style );",
"public abstract Node apply(Node node);",
"public boolean applyVizMap ( CyNode node );",
"public boolean applyVizMap ( CyNode node, VisualStyle style );",
"public boolean applyVizMap ( EdgeView edge_view );",
"boolean updateMapping(S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PERFORMANCE DATA FUNCTIONS / updates service performance data | public static int update_service_performance_data(objects_h.service svc)
{
/* should we be processing performance data for anything? */
if(blue.process_performance_data==common_h.FALSE)
return common_h.OK;
/* should we process performance data for this service? ... | [
"public static int update_host_performance_data(objects_h.host hst){\n \n /* should we be processing performance data for anything? */\n if( blue.process_performance_data==common_h.FALSE)\n return common_h.OK;\n \n /* should we process performance data for this host? */... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saving data from the textarea in the UI to a .tsd file | @Test
public void saveDataToTsdFile() {
String data = "@Instance6\tlabel2\t11,9.1";
File f = new File("saving data to a .tsd file.tsd");
AppData appData = new AppData();
appData.saveDataTest(f.toPath(),data);
} | [
"public void saveTextToFile() {\r\n\t\tthis.menu.printAppUsage();\r\n\t\tthis.menu.print(\"WARNING: Please enter your text according to usage definition!\");\r\n\t\tthis.menu.print(\"Enter a text to save file: \");\r\n\t\tString inputText = this.menu.scanMultipleLines();\r\n\t\t\r\n\t\tthis.menu.print(\"Enter a fil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get list of audit events for the given account | public PageableList<AuditEvent> listAuditEvents(final Account account) {
return listAuditEvents(account, new AuditEventPageRequest());
} | [
"public PageableList<AuditEvent> listAuditEvents(final Account account, final Page page) {\n notNull(account, \"account\");\n notEmpty(account.getId(), \"account.id\");\n notNull(page, \"page\");\n\n final String uri = AuditEvent.USER_URI_TEMPLATE.expand(account.getId()).toString();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Left quotient of quaternions. | public Quaternion divideByLeft (Quaternion q) {
if (q != null && !q.isZero()){
return q.inverse().times(this);
}
throw new RuntimeException("Provided Quaternion is null.");
} | [
"public Quaternion divideByRight (Quaternion q) {\n if (q != null && !q.isZero()){\n return this.times(q.inverse());\n }\n throw new RuntimeException(\"Provided Quaternion is null.\");\n }",
"public final void multiplyLeft (Quaternion q1)\n {\n val = doMultiplication (q1, this);\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of buckets in use (one more than AlphabeticIndex uses, because this class adds a bucket for phone numbers). | public int getBucketCount() {
return mAlphabeticIndexBucketCount + 1;
} | [
"int getBucketCount();",
"private int numOfBuckets(){\r\n \treturn (int) Math.floor((1.4404*(Math.log10(this.size)/Math.log10(2))+2));\r\n }",
"public int getBucketCount() {\n return buckets.size();\n }",
"public int numBuckets();",
"public int numBuckets() {\n return this.buckets;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write single row to output stream using given delimiter. | private void writeRow(RowData row, String tag) {
StringBuilder builder = new StringBuilder(tag);
boolean isFirst = true;
for (String value : row.getValues()) {
if (isFirst) {
isFirst = false;
} else {
builder.append(this.delimiter);
}
builder.append(value);
}
out.println(builder.toStrin... | [
"private static void writeRow(PrintStream out, String[] row) {\n for (int i = 0; i < row.length; i++)\n assert row[i].indexOf(',') < 0; // quoting not supported here\n\n out.println(Stream.of(row).collect(Collectors.joining(\",\")).toString());\n }",
"public void endRow() {\n if (currentColumn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the forward path. | public void setForwardPath(String forwardPath) {
logger.debug("HatCoverSiteEntaryFilter --> setForwardPath()");
this.forwardPath = forwardPath;
} | [
"public void setForwardHost(String ForwardHost) {\n this.ForwardHost = ForwardHost;\n }",
"public void setDrivePath(Path path) {\n if (mpFollower != null) {\n // Stops & resets everything\n stop();\n zero();\n // The path may start at a different angle ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given that I have selected a car And am currently viewing its information page When I change only the number of years in the price calculator Then the correct total price will be calculated for the car for n 12 months (n yrs) with no downpayment | @Test
public void changeNumYears() {
WebElement new_page = wdriver.findElement(By.name("payment_form"));
double dwnpymnt = Double.valueOf(new_page.findElement(By.name("downpayment")).getAttribute("value"));
double interest = Double.valueOf(new_page.findElement(By.name("interest")).getAttribute("value"));
... | [
"@Test\n\tpublic void negativeNumYrs() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tdouble dwnpymnt = Double.valueOf(new_page.findElement(By.name(\"downpayment\")).getAttribute(\"value\"));\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ First write of a function to place a block. Plan to rewrite soon now that I have more experience with the Minecraft code and Java. Attaches a block from my mod by the name of "block_name" to the block at pos in the direction of side. | public static void placeBlock(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, String block_name)
{
String placeMe = ("bh_housing:" + block_name);
int direction = side.getIndex(); //D-U-N-S-W-E
switch (direction)
{
case 0: worldIn.setBlockState(pos.down(1), Block.getB... | [
"boolean placeBuildingBlock(BlockPos pos, IDesiredBlock desiredBlock);",
"void placeStackAt(ItemStack blockStack, World world, BlockPos pos);",
"public void placeBlock(Block b)\r\n\t{\r\n\t\tSquare s;\r\n\t\ts = b.getSquare(0);\r\n\t\tgrid[s.getY()][s.getX()] = s;\r\n\t\ts = b.getSquare(1);\r\n\t\tgrid[s.getY()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleMethodsExpression" $ANTLR start "ruleMethodsExpression" ../com.jaspersoft.studio.editor.jrexpressions/srcgen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1378:1: ruleMethodsExpression returns [EObject current=null] : ( () ( ( ( (lv_includeObjectInstati... | public final EObject ruleMethodsExpression() throws RecognitionException {
EObject current = null;
Token lv_includeObjectInstatiation_1_0=null;
Token otherlv_3=null;
Token otherlv_6=null;
Token otherlv_8=null;
Token otherlv_10=null;
EObject lv_methodInvocations_2... | [
"public final EObject entryRuleMethodsExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleMethodsExpression = null;\n\n\n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Translates b2d Fixture to appropriate color, depending on body state/type Modify to suit your needs | private static Color fixtureToColor(Fixture fixture) {
if (fixture.isSensor()) {
return Color.PINK;
} else {
Body body = fixture.getBody();
if (!body.isActive()) {
return Color.BLACK;
} else {
if (!body.isAwake()) {
return Color.RED;
} else {
switch (body.getType()) {
... | [
"private static Color getTint(int random, SmokeBombArrowEntityPacketHandler msg) {\n\t\t\t\tColor[] tints = {\n\t\t\t\t\t\tnew Color(1.00f, 1.00f, 1.00f), // no tint (white)\n\t\t\t\t\t\tnew Color(1.00f, 0.97f, 1.00f), // off-white\n\t\t\t\t\t\tnew Color(1.00f, 1.00f, 0.97f), // off-white 2\n\t\t\t\t};\n\t\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a book to a shopping cart | public void addToCart(Publication book) {
if(book != null){
shoppingCart.add(book);
} else {
throw new NoSuchPublicationException();
}
} | [
"ShoppingCartVO addBookToCart(ShoppingCartVO shoppingCart, String isbn, String purchaseType) throws SapeStoreException;",
"public void addBookToCart(Book book){\n\t\t\n\t\t\n\t\t\tfor(int i = 0; i < cart.size(); i++){\n\t\t\t\tif(book.getTitle().equalsIgnoreCase(cart.get(i).getTitle())){\n\t\t\t\t\tcart.get(i).se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of invocation of jQuery function index() on given element. | public static int getIndexOfElement(WebElement element) {
return Integer.valueOf(returningJQ(getExecutorFromElement(element), "index()", element));
} | [
"long getIndex();",
"public int indexOfElement(DomainElement element);",
"int indexOf(data element) throws ElementNotExist;",
"public int indexOf(Object elem, int index);",
"private int indexOf(Object element) {\n\t\tint index = -1;\n\t\tfor (int i = 0; i < numberOfElements; i++) {\n\t\t\tif (elements[i].eq... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmParameterizedTypeReference__Group_1_2__0__Impl" $ANTLR start "rule__JvmParameterizedTypeReference__Group_1_2__1" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11616:1: rule__JvmParameterizedTypeReference__Group_1_2__1 : rule__JvmPar... | public final void rule__JvmParameterizedTypeReference__Group_1_2__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11620:1: ( rule__Jvm... | [
"public final void rule__JvmParameterizedTypeReference__Group_1_2__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a connection to ingredient using the join table ingredientAmount | public void addIngredientAmount(IngredientAmount ingredientAmount) {this.ingredientAmounts.add(ingredientAmount); } | [
"public void addIngredient(Ingredient ingredient){\r\n\t\tingredients.add(ingredient);\r\n\t}",
"void starRecipeIngredients(Ingredient ingre, String userId, String recipeName) throws SQLException;",
"public void addIngredientQuantity(Ingredient ingredient, Integer addedValue){\n\t\tbeverageInventoryMap.put(ingr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extracts the SAML authorization query from the request in order to process it. It sends the authorization object to be processed through the authorization. | private AuthzDecisionQuery extractQueryFromRequest(HttpServletRequest request) throws IOException,
XMLStreamException,
XmlProcessingExce... | [
"protected void processRequest(HttpServletRequest request, \r\n HttpServletResponse response) throws ServletException, \r\n IOException {\r\n logger.debug(\"AuthzDecisionQuery received\");\r\n\r\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "controlType" attribute | void setControlType(org.landxml.schema.landXML11.TrafficControlType.Enum controlType); | [
"public void setControlType(final ControlType controlType) {\n this.controlType = controlType;\n }",
"public void setControlType(short value) {\n this.controlType = value;\n }",
"public short getControlType() {\n return controlType;\n }",
"public control.Controlmessage.ControlMes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Estimate the cost for the whole row. | private void computeRowCost(EstimateComputation estimateComputationBean) {
EstimateResultConcrete concrete = estimateComputationBean.getResultConcreteEstimate();
EstimateResultMasonryCHB chb = estimateComputationBean.getResultCHBEstimate();
EstimateResultMasonryCHBLaying chbLaying = estimateComputationBean.getResul... | [
"@Override\r\n\tpublic double calculateCost() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn cost;\r\n\t}",
"double getCost();",
"float getCost();",
"public abstract double getCost();",
"public void computeTotalCost() {\n\t\tthis.totalCost = this.getTotalCost();\n\t}",
"private double computeCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for standard faithPath state | public LightFaithPath() {
this.faithIndicator = 0;
this.papalCards = new int[]{UNDEFINED, UNDEFINED, UNDEFINED};
this.currCall = 0;
} | [
"public Path() {\n\n\t}",
"public PathBuilder() {\n\t\tthis( null, true );\n\t}",
"public void initPath(Path p) {\r\n\tpath = new Path(p);\r\n}",
"public AStarPathfinder() {\n this(1);\n }",
"public NFA() {\n\t\tsuper();\n\t\tthis.startState = genFreshState();\n\t}",
"public Path(Board b, Scorin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves all Dutch abstracts | public List<String> getAbstracts() throws XPathExpressionException {
return getNodes(
document,
"OAI-PMH/ListRecords/record/metadata//*[name()='oai_oi:oi']//*[name()='oi:abstract'][@lang='nl']");
} | [
"private List<SyndContent> extractAbstract(Item i)\n {\n // Add the abstract of the item as the content of the feed entry\n List<SyndContent> contents = new ArrayList<SyndContent>();\n SyndContentImpl itemAbstract = new SyndContentImpl();\n\n String itemAbstractString;\n DCValu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the detail view of the Pokemon to be displayed in the main section of the Pokedex. | public BorderPane createDetailView() {
//Create the bigger detail view for the main pane here
//Remember to actually save this view or change this method
//header to return the view.
//This method is called inside of PokemonFactory
BorderPane p = new BorderPane();
VBox pa... | [
"@Override\n public void onClickPokemon(PokemonItem pokemon) {\n// Toast.makeText(PokemonBankActivity.this, \"clicked \"+ pokemon.id, Toast.LENGTH_LONG).show();\n //\n gotoPkmDetail(pokemon);\n }",
"Object getViewDetails();",
"public void showDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the syntaxsupport class that belongs to the document of the given component. Besides using directly this method, the SyntaxSupport can be obtained by calling doc.getSyntaxSupport(). The method can return null in case the document is not an instance of the BaseDocument. The method doesn't require any document lockin... | public static SyntaxSupport getSyntaxSupport(JTextComponent target) {
Document doc = target.getDocument();
return (doc instanceof BaseDocument) ? ((BaseDocument)doc).getSyntaxSupport() : null;
} | [
"public static Class getKitClass(JTextComponent target) {\n return (target != null) ? target.getUI().getEditorKit(target).getClass() : null;\n }",
"public String getDocumentClass()\n {\n return documentClass;\n }",
"public static BaseDocument getDocument(JTextComponent target) {\n Do... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required int64 offset = 2; | long getOffset(); | [
"int offset(int actual, int length);",
"int getOffset();",
"public abstract Pointer<T> offset(long offset);",
"@NativeType(\"size_t\")\n public long offset() { return noffset(address()); }",
"Offset createOffset();",
"int getRawOffset();",
"public int getMPOffset();",
"public static int offset_id()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column t_mp_num.twoMerchant | public void setTwomerchant(Long twomerchant) {
this.twomerchant = twomerchant;
} | [
"public void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);",
"public void setMerchantNo(String merchantNo) {\n\t\tthis.merchantNo = merchantNo;\n\t}",
"public void setMultiMerchant(java.lang.String multiMerchant) {\r\n this.multiMerchant = multiMerchant;\r\n }",
"public void setMerc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setSchool method, of class Associate. | @Test
public void testSetSchool() {
System.out.println("setSchool");
String school = "";
Associate instance = null;
instance.setSchool(school);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
} | [
"public void setSchool(String school) {\n this.school = school;\n }",
"void setCulinarySchool () {\n\t}",
"@Test\n public void testGetSchool() {\n System.out.println(\"getSchool\");\n Associate instance = null;\n String expResult = \"\";\n String result = instance.getSch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleLessOrEqualThanOperator" $ANTLR start "ruleLessOrEqualThanOperator" ../eu.artist.postmigration.nfrvt.lang.gml/srcgen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4733:1: ruleLessOrEqualThanOperator returns [EObject current=null] : ( () otherlv_1= '<=' ) ; | public final EObject ruleLessOrEqualThanOperator() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
enterRule();
try {
// ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/... | [
"public final EObject entryRuleLessOrEqualThanOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleLessOrEqualThanOperator = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query for all features ordered by id, starting at the offset and returning no more than the limit | public FeatureCursor queryFeaturesForChunk(int limit, long offset) {
return queryFeaturesForChunk(getPkColumnName(), limit, offset);
} | [
"public FeatureCursor queryFeaturesForChunk(String orderBy, int limit,\n long offset) {\n return featureDao.queryInForChunk(queryIdsSQL(), orderBy, limit,\n offset);\n }",
"public FeatureCursor queryFeaturesForChunk(BoundingBox boundingBox,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finding tipo for TipoDeLogin | public void setTipo() {
try
{
Statement stmt = (Statement) this.conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT tipo FROM TipoDeLogin WHERE idTipoDeLogin=" + this.getIdTipoDeLogin());
while (rs.next())
{
this.tipo = rs.getString("tipo");
}
} catch (SQLException e)... | [
"int getLoginType();",
"int getTipoUsuario();",
"public String getLoginType() { return loginType; }",
"public void setLoginType(String in) { this.loginType = in; }",
"public static Integer getIdUserTipoLog() {\n FacesContext context = FacesContext.getCurrentInstance();\n HttpSession sesion = (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send Control Change (Bank Select) MIDI message. | protected void setBankNum(int bankNum) {
try {
ShortMessage msg = new ShortMessage();
msg.setMessage(ShortMessage.CONTROL_CHANGE, getChannel() - 1,
0x00, // Bank Select (MSB)
bankNum / 128); // Bank Number (MSB)
send(msg);
... | [
"public void sendControl(char control) {\n }",
"public void sendMidiMessage(int cable, int byte1, int byte2, int byte3) {\n int codeIndexNumber = 0;\n\n switch (byte1 & 0xf0) {\n case 0x80: // Note Off\n codeIndexNumber = 0x8;\n break;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Referenced ACL contains 1 line: Permit 1.0.0.0/24 Main ACL contains 2 lines: 0. Permit anything that referenced ACL permits 1. Permit 1.0.0.0/24 | @Test
public void testIndirection() {
List<AclLine> referencedAclLines =
ImmutableList.of(
acceptingHeaderSpace(
HeaderSpace.builder().setSrcIps(Prefix.parse("1.0.0.0/24").toIpSpace()).build()));
IpAccessList referencedAcl = _aclb.setLines(referencedAclLines).setName("acl1"... | [
"interface ACL {\n /**\n * Acl with WRITE type grants write to group defined to resource (Post, Category or Upload) attached.\n */\n\t\tstatic final Character WRITE = 'W';\n /**\n * Acl with NONE type revokes read access to group defined to resource (Post, Category or Upload) a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Le constructeur de la Grille de jeu, selon le nombre de piaces en x et y, la largeur de ces piaces, et le nombre de NonKittenItems | public Grille(int nbrPiecesX, int nbrPiecesY,
int largeurPiece, int hauteurPiece, int nbrNonKitten) {
/* Largeur: le nombre de cases en largeur au total
* Hauteur: le nombre de cases en hauteur au total
*
* La grille[][] est crae avec ces paramatres
*/
this.largeur = nbrPiecesX*largeurPiece+(1... | [
"private Groupe(int nbcoll){\n this.M=nbcoll;\n this.values = new Vector();\n this.bitmaps = new BitMap();\n }",
"private void initialisationGrille() {\r\n\t\tif (typeGrille == 1) {\r\n\t\t\ttableau = new GrilleRectangulaire(hauteur, largeur);\r\n\t\t}\r\n\t\tif (typeGrille... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts an Image to a RealGrayImage | public static RealGrayImage toRealGray(Image img) throws ColorModelNotSupportedException,
ColorModelUnknownException {
if (img instanceof GrayImage) {
return toRealGray((GrayImage) img);
} else if (img instanceof RealGrayImage) {
return toRealGray((RealGrayImage) img);
} else if (img instanceof ColorImag... | [
"public static RealGrayImage toRealGray(RealGrayImage img) {\n\t\tint X = img.X();\n\t\tint Y = img.Y();\n\t\tRealGrayImage newimg = new RealGrayImage(X, Y);\n\t\tfor (int y = 0; y < Y; y++) {\n\t\t\tfor (int x = 0; x < X; x++) {\n\t\t\t\tnewimg.set(x, y, img.get(x, y));\n\t\t\t}\n\t\t}\n\t\treturn newimg;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method manages the progress bar is started just before the beginning of the http request | public void updateUIWhenStartingHTTPRequest(ProgressBar progressBar) {
progressBar.setVisibility(View.VISIBLE);
} | [
"public void startProgressBar() {\n stopProgressBar();\n PROGRESS_MAX = lastMax;\n COUNT = PROGRESS_MAX;\n PREV_COUNT = 0;\n start();\n }",
"private void progressBarLoading() {\n new Thread(new Runnable() {\n public void run() {\n while (progr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do not compute all descendants, and apply predicate afterwards. That is way too expensive. | public final List<Element> descendants(Predicate<Element> predicate) throws Exception {
List<? extends Element> tmp = childrenAux();
predicate.filter(tmp);
List<Element> result = (List<Element>)tmp;
for (Element e : childrenAux()) {
result.addAll(e.descendants(predicate));
}
return result;
} | [
"public final List<Element> descendants(SafePredicate<Element> predicate) {\n \t\tList<? extends Element> tmp = childrenAux();\n \t\tpredicate.filter(tmp);\n \t\tList<Element> result = (List<Element>)tmp;\n \t\tfor (Element e : childrenAux()) {\n \t\t\tresult.addAll(e.descendants(predicate));\n \t\t}\n \t\treturn r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Below method is to check bill is generated for customer after checking job status is completed. | @Step
public String check_invoicae_generated_at_billingaccount(String CustAccountNumber) {
String BD = "";
try {
//Below method is executed after job status is completed.
if (jobstatus.equalsIgnoreCase("Completed")) {
//Search the customer for whoom job is run... | [
"@Step\n public boolean verifyRegularInvoice(String customerAccountNumber) {\n\n // stores result\n boolean result = false;\n try {\n // search the customer\n caam.searchCustomer(customerAccountNumber);\n\n // Click on billing account number\n clic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the n_IdResidente value for this ViviendaBE. | public java.lang.Integer getN_IdResidente() {
return n_IdResidente;
} | [
"public void setN_IdResidente(java.lang.Integer n_IdResidente) {\r\n this.n_IdResidente = n_IdResidente;\r\n }",
"public Integer getResouceId() {\n return resouceId;\n }",
"public org.datacontract.schemas._2004._07.Architects_Dominio.ResidenteBE getObjResidente() {\r\n return objResid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Move fish at index | public void swim(int index) {
fish[index].swim();
} | [
"private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Besteffort function to determine if a hypervisor is absent. | private static boolean hypervisorAbsent()
{
try {
final BufferedReader cpuinfo
= Files.newBufferedReader(
Paths.get("/proc/cpuinfo"), StandardCharsets.UTF_8);
String line;
while ((line = cpuinfo.readLine()) != null) {
if... | [
"private boolean isNohupPresent(ITestDevice device) throws DeviceNotAvailableException {\n String output = device.executeShellCommand(\"which nohup\");\n\n // If which command is found\n if (!output.contains(\"which: not found\")) {\n // Output should be \"/path/to/nohup\" or \"\"\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reset This method determines if we have reached the set point target. It is considered on target if the previous error is smaller than the tolerance and is maintained for at least settling time. If NoOscillation mode is set, it is considered on target if we are within tolerance or pass target regardless of setting time... | public synchronized boolean isOnTarget()
{
final String funcName = "isOnTarget";
if (debugEnabled)
{
dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);
}
boolean onTarget = false;
if (noOscillation)
{
//
// Don't ... | [
"public void reset()\n {\n doneCalculation = false;\n }",
"public void setTarget(double target, TrcWarpSpace warpSpace)\n {\n final String funcName = \"setTarget\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"target=%f,war... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert a JSONObject to Nodes | protected Nodes jsonToNodes(JSONObject jsonObject) throws JSONException, ProtocolPortException, ProtocolAddressException {
if ( jsonObject.has(JSON_NODES) ) {
Nodes nodes = new Nodes();
try {
JSONArray jsonNodesArray = (JSONArray) jsonObject.get(JSON_NODES);
for ( int x=0;x<jsonNodesArra... | [
"public TreeNode buildDictionaryTreeFromJSON(JSONObject json) {\n\t\tTreeNode n = new TreeNode();\n\t\tn.fromJSON(json);\n\t\treturn n;\n\t}",
"public static JsonNode json2Node(String json) throws IOException {\n return objectMapper.readTree(json);\n\n }",
"private static JsonNode json2Node(String jso... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the collection of foods and replaces them with a given array of foods. | public void setFoods(Food[] newFoods) {
for (int i = 0; i < newFoods.length; i++) {
foods.remove(i);
foods.add(newFoods[i]);
}
} | [
"@Override\n public void clearFoods() {\n this.storage.clearFoods();\n }",
"public FoodCollection(Food[] startFoods) {\n for (int i = 0; i < startFoods.length; i++) {\n foods.add(startFoods[i]);\n }\n }",
"public void setFoods(ch.ivyteam.ivy.scripting.objects.List<online.food.ordering.F... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a MessagePlus and any Action Messages associated with it. This works with all MessagePlusses whether sent or unsent, or even if it's a draft. | public void deleteMessageAndAssociatedActionMessages(MessagePlus messagePlus, boolean deleteAssociatedFiles) {
deleteMessageAndAssociatedActionMessages(messagePlus, deleteAssociatedFiles, null);
} | [
"public void deleteMessageAndAssociatedActionMessages(MessagePlus messagePlus) {\n deleteMessageAndAssociatedActionMessages(messagePlus, false);\n }",
"public void deleteMessageAndAssociatedActionMessages(MessagePlus messagePlus, boolean deleteAssociatedFiles, final MessageManager.MessageDeletionRespons... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
validate the array for Element | protected void validateElement(Element[] param){
} | [
"protected void validateCadConversionElement(CadConversionElement[] param){\n \n }",
"@Pure\n public static boolean validate(@NonCaptured @Unmodified @Nullable Object[] array) {\n if (array == null) { return true; }\n for (@Null... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_system_msg_push_task.AUDIT_TIME | public Date getAuditTime() {
return auditTime;
} | [
"public String getAuditTime() {\n return auditTime;\n }",
"public Date getAuditingTime() {\r\n return auditingTime;\r\n }",
"public Date getAuditingTime() {\n return auditingTime;\n }",
"public Timestamp getTransactionTime() {\r\n return (Timestamp) getAttributeInternal(TR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes the Cipher object with the appropriate Key. This method should be used for algorithms which do not need initialization parameters or use default parameter values. init() must be used to update the Cipher object with a new key. If the Key object is modified after invoking the init() method, the behavior of t... | public abstract void init(Key theKey, byte theMode) throws CryptoException; | [
"public void init(\r\n boolean forEncryption,\r\n byte[] key\r\n )\r\n {\r\n /*\r\n * RC4 encryption and decryption is completely\r\n * symmetrical, so the 'forEncryption' is\r\n * irrelevant.\r\n */\r\n workingKey... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reissue an existing certificate order. | @ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> reissueAsync(
String resourceGroupName,
String certificateOrderName,
ReissueCertificateOrderRequest reissueCertificateOrderRequest) {
return reissueWithResponseAsync(resourceGroupName, certificateOrderName, reissueCertific... | [
"@ServiceMethod(returns = ReturnType.SINGLE)\n public void reissue(\n String resourceGroupName,\n String certificateOrderName,\n ReissueCertificateOrderRequest reissueCertificateOrderRequest) {\n reissueAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).blo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column agc_professional.agcProCertiStatus | public void setAgcProCertiStatus(Integer agcProCertiStatus) {
this.agcProCertiStatus = agcProCertiStatus;
} | [
"public void setStatusCusEmpPro(int statusCusEmpPro) {\n this.statusCusEmpPro = statusCusEmpPro;\n }",
"public Integer getAgcProCertiStatus() {\n\t\treturn agcProCertiStatus;\n\t}",
"public void setProstatusid(Integer prostatusid) {\n this.prostatusid = prostatusid;\n }",
"public void setC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.dstore.values.BooleanValue only_procedures_in_any_values = 2; | io.dstore.values.BooleanValue getOnlyProceduresInAnyValues(); | [
"io.dstore.values.BooleanValueOrBuilder getOnlyProceduresInAnyValuesOrBuilder();",
"boolean hasOnlyProceduresInAnyValues();",
"io.dstore.values.BooleanValue getValuesInAnyValues();",
"public io.dstore.values.BooleanValueOrBuilder getOnlyProceduresInAnyValuesOrBuilder() {\n return getOnlyProceduresInAnyVa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert controller method that inserts the story into the database | @PostMapping(value = "/insertstory")
public void insertPost(@RequestBody String jsonString) {
Story s = null;
try {
s = new ObjectMapper().readValue(jsonString, Story.class);
} catch (IOException e) {
e.printStackTrace();
}
loggy.info("Insert Story Controller Accessed");
storyServ.insert(s);
} | [
"public void submitStory(Story story) {\n storyRepository.save(story);\n }",
"public void createStory(String story) {\n createStoryBtn.click();\n nameStoryTextArea.clear();\n nameStoryTextArea.sendKeys(story);\n valueInput.sendKeys(Constants.STORY_VALUE);\n pointsInput... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Locates the index of the base register which represents the bank which contains the given relative address. Does appropriate limits checking. | private int findBaseRegisterIndexBasicMode(
final int relativeAddress,
final boolean writeAccess
) throws MachineInterrupt,
UnresolvedAddressException {
// Find the bank containing the current offset.
// We don't need to check for storage limits, since this is done for... | [
"private int findBaseRegisterIndex(\n final int relativeAddress,\n final boolean writeAccess\n ) throws MachineInterrupt,\n UnresolvedAddressException {\n if (_designatorRegister.getBasicModeEnabled()) {\n return findBaseRegisterIndexBasicMode(relativeAddress, writeAcc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the message that is to the left above the map. | protected String getLeftMessage() {
return player2.getName() + ": " + player2.getScore();
} | [
"public Location left() {\n return new Location(row, column - 1);\n }",
"private byte l() {\r\n\t\treturn left_map;\r\n\t}",
"public String getLeft() {\n\t\tString text = helper.getLeftSection(getText());\n\t\tif (stripFields)\n\t\t\treturn stripFields(text);\n\t\treturn text;\n\t}",
"public Locatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
map<string, .wso2.discovery.api.Scopes> scopeList = 1; | @java.lang.Override
public java.util.Map<java.lang.String, org.wso2.choreo.connect.discovery.api.Scopes> getScopeListMap() {
return internalGetScopeList().getMap();
} | [
"@java.lang.Override\n\n public java.util.Map<java.lang.String, org.wso2.choreo.connect.discovery.api.Scopes> getScopeListMap() {\n return internalGetScopeList().getMap();\n }",
"List<Scope> getScopes();",
"@java.lang.Override\n\n public org.wso2.choreo.connect.discovery.api.Scopes getScopeListOrT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the storagePods value for this PlacementSpec. | public com.vmware.converter.ManagedObjectReference[] getStoragePods() {
return storagePods;
} | [
"public void setStoragePods(com.vmware.converter.ManagedObjectReference[] storagePods) {\r\n this.storagePods = storagePods;\r\n }",
"@java.lang.Deprecated\n public io.kubernetes.client.openapi.models.V1StorageOSPersistentVolumeSource getStorageos();",
"@Override\n public DatanodeStorageInfo[] getEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a ResizeWithCropOrPadOp which could crop/pad images to specified size. It adopts centercrop and zeropadding. | public ResizeWithCropOrPadOp(int targetHeight, int targetWidth) {
this.targetHeight = targetHeight;
this.targetWidth = targetWidth;
output = Bitmap.createBitmap(this.targetWidth, this.targetHeight, Config.ARGB_8888);
} | [
"static BufferedImage cropImage(final BufferedImage inImage,\n final Crop crop,\n final ReductionFactor rf) {\n final Dimension croppedSize = crop.getResultingSize(\n new Dimension(inImage.getWidth(), inImage.getHeight()));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the list of all partitions loaded from the partition metadata document. | public List<Partition> getPartitions() {
return partitions;
} | [
"public List<PartitionInfo> getPartitionList() {\n\t\treturn partitions;\n\t}",
"public Collection<Integer> getPartitions() {\n return partitions;\n }",
"public com.tangosol.net.partition.PartitionSet getPartitions()\n {\n return __m_Partitions;\n }",
"private List<org.apache.hadoop.h... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates if errors are logged | public boolean logErrors()
{
return errorLevelHandler.getBoolean();
} | [
"public boolean isErrorLog() {\n\t\treturn mError;\n\t}",
"public static boolean isErrorEnabled() {\n return getInstance().getDebuglevel() >= LogTarget.ERROR;\n }",
"public boolean isErrorEnabled() {\n return isLevelEnabled(LOG_LEVEL_ERROR);\n }",
"public boolean isErrorEnabled();",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find FAQ by its id. | public static FAQ find(int id){
return find.byId(id);
} | [
"public Faq findByPrimaryKey(Integer id) throws FaqDaoException;",
"public static Answer findById(Integer id) {\n try (Connection con = DB.sql2o.open();) {\n String query = \"SELECT * FROM answers WHERE id=:id\";\n return con.createQuery(query)\n .addParameter(\"id\", i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the map of drones currently active in the world (key = drone id and value = drone with id) | private Map<String, Drone> getDroneMap(){
return this.drones;
} | [
"public HashMap<String, Door> getDoors() {\n return (doors);\n }",
"private Map<String, DroneGuiState> getDroneGuiStates(Set<Drone> drones)\n\t{\n\t\t//generate the map containing the gui states\n\t\tMap<String, DroneGuiState> stateMap = new HashMap<>();\n\t\t//fill the map\n\t\tString key;\n\t\tDroneGuiS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all of running IPStream tasks with specific wallId. | public List<Task> findRunningIPStreamComposeTasksByWallId(int wallId); | [
"public List<Task> findRunningIPStreamComposeTasks();",
"List<BackfillTask> getRunning();",
"List<Task> findComposeTasksByWallIdAndTypesAndStatus(int wallId, TaskStatus[] status, Integer... types);",
"public Map<Thread, Runnable> getCurrentRunningTasks() {\n Map<Thread, Runnable> map = new HashMap<>();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unlock the focus. This method should be called when still image capture sequence is finished. | private void unlockFocus() {
if (DEBUG)
MLog.d(TAG, "unlockFocus(): " + printThis());
try {
// Reset the auto-focus trigger
// 重置自动对焦
mPreviewRequestBuilder.set(
CaptureRequest.CONTROL_AF_TRIGGER,
CameraMetadata.CONT... | [
"private void unlockFocus() {\n try {\n // Reset the auto-focus trigger\n mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER,\n CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);\n //setAutoFlash(mPreviewRequestBuilder);\n mCaptureSession.captu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleJvmUpperBoundAnded" $ANTLR start "entryRuleJvmLowerBound" ../org.xtext.scripting/srcgen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5729:1: entryRuleJvmLowerBound returns [EObject current=null] : iv_ruleJvmLowerBound= ruleJvmLowerBound EOF ; | public final EObject entryRuleJvmLowerBound() throws RecognitionException {
EObject current = null;
EObject iv_ruleJvmLowerBound = null;
try {
// ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:5730:2: (iv_ruleJvmLowerBound= ruleJvmLowe... | [
"public final void entryRuleJvmLowerBound() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:2176:1: ( ruleJvmLowerBound EOF )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form InformesComics | public InformesComics() {
initComponents();
cmbComics.setModel(modeloComics);
rellenarComics();
} | [
"public iAdd() {\n initComponents();\n formIdMecanico.setModel(new DefaultComboBoxModel<>(new String[]{\n \"---Selecciona Mecanico---\", \"1212\", \"1213\", \"2121\", \"1214\"\n }));\n }",
"private void addComiteCredit() {\n\n comiteCredit = new ComiteCredit();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a new RequestListenerMessageEventHandler which is to implement MessageEventHandler for a specific RequestListener. | public RequestListenerMessageEventHandler(RequestListener requestListener) {
super(Message.STUN_REQUEST, requestListener);
} | [
"public void addRequestListener(RequestListener listener) {\n addMessageListener(new RequestListenerMessageEventHandler(listener));\n }",
"public void addRequestListener(TransportAddress localAddr, RequestListener listener) {\n addMessageListener(localAddr, new RequestListenerMessageEventHandler(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for tableName. The new value is set only if compareTo() says it is different, or if one of either the new value or the current value is null. In case the new value is different, it is set and the field is marked as 'modified'. | public void setTableName(String newVal) {
if ((newVal != null && this.tableName != null && (newVal.compareTo(this.tableName) == 0)) ||
(newVal == null && this.tableName == null && tableName_is_initialized)) {
return;
}
this.tableName = newVal;
tableName_is_mo... | [
"@Override\n\tpublic void setTableName(String tableName) {\n\t\tsuper.setTableName(tableName);\n\t}",
"public void setTable(Table table)\n {\n this.table = table;\n }",
"public void setTableName(String value) {\n setAttributeInternal(TABLENAME, value);\n }",
"public void setTable(Table tabl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get A list containing all the CarTypes that are available at the given (registered) company. | public List<CarType> getAvailableCarTypesIn(String companyName) throws RemoteException; | [
"public Collection<CarType> getCarTypesOfCarRentalCompany(String companyName) {\n \tQuery<Entity> query = Query.newEntityQueryBuilder()\n \t\t .setKind(\"CarType\")\n \t\t .setFilter(\n \t\t \t\tPropertyFilter.hasAncestor(\n \t\t \t\t\t\tdatastore\n \t\t \t\t\t\t.newKeyFactory()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the startTokenIndex value. | public int startTokenIndex() {
return this.startTokenIndex;
} | [
"public final int getStartOffset() {\n\t\treturn fStartToken;\n\t}",
"public int getStartIdx() {\n return this.startIdx;\n }",
"public ParseToken getStartToken() { return _startToken; }",
"public int getLocalStartIdx() {\n if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_localStartIdx ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
IMPORTANT! We use anonymous classes instead of lambdas for a reason here. It is necessary because the maven shade plugin cannot relocate classes in SerializedLambdas (MSHADE260). On the other hand we want to relocate Avro for sqlclient uber jars. Creates a runtime converter according to the given logical type that conv... | public static RowDataToAvroConverter createConverter(LogicalType type) {
final RowDataToAvroConverter converter;
switch (type.getTypeRoot()) {
case NULL:
converter =
new RowDataToAvroConverter() {
private static final long s... | [
"private DeserializationRuntimeConverter createNotNullConverter(LogicalType type) {\n\t\tswitch (type.getTypeRoot()) {\n\t\t\tcase NULL:\n\t\t\t\treturn (dbzObj) -> null;\n\t\t\tcase BOOLEAN:\n\t\t\t\treturn this::convertToBoolean;\n\t\t\tcase TINYINT:\n\t\t\t\treturn (dbzObj) -> Byte.parseByte(dbzObj.toString());\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the e s f entity state where className = &63; and classPK = &63; and esfStateId = &63; or returns null if it could not be found, optionally using the finder cache. | public it.ethica.esf.model.ESFEntityState fetchByESFEntityStateC_PK_S(
java.lang.String className, long classPK, long esfStateId,
boolean retrieveFromCache)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public it.ethica.esf.model.ESFEntityState fetchByESFEntityStateC_PK_S(\n\t\tjava.lang.String className, long classPK, long esfStateId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public it.ethica.esf.model.ESFEntityState fetchByESFEntityStateC_PK(\n\t\tjava.lang.String className, long cla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function return the asset salary | int getSalary(); | [
"public double getExpectedSalary();",
"@Override\n public double salary(){\n double salaryComp = 0.0;\n salaryComp = this.getEmployeeHours()*this.getEmployeeRate();\n if (salaryComp>50000){\n salaryComp=50000;\n }\n return salaryComp;\n }",
"public int getSala... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Describes a type of shipping. | public String getShipping(){
return this.post.getType();
} | [
"public void setTypeOfShipping(String typeOfShipping) {\n\t\tthis.typeOfShipping = typeOfShipping;\n\t}",
"void setShippingMode(java.lang.String shippingMode);",
"public PaymentRequest setShippingType(ShippingType type) {\r\n if (shipping == null) {\r\n shipping = new Shipping();\r\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Try to transfer a group of players to a given world | @Override
public int apparate(String worldName, List<String> playerNames, Vector3d position) {
return Sponge.getServer().loadWorld(worldName).map(world -> {
int playerTransferCount = 0;
WorldAction worldAction = new WorldAction();
for(String playerName : playerNames) {
... | [
"public void transferPlayersToWorld(List<Player> players, Location<World> location) {\n players.forEach(player -> {\n EpicBoundaries.getInstanceDao().updateInstancePlayerCount(player.getWorld().getName(), -1);\n player.transferToWorld(location.getExtent(), location.getPosition());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Guess the number of pixel given the String val. | public static int guessPixelValue(int relTo, String val) {
int retval;
if (val.indexOf("%") >= 0) {
retval = relTo * getIntVal(val) / 100;
} else {
retval = getIntVal(val);
}
return retval;
} | [
"private int countVals( String val )\n\t{\n \tint valCount = 0;\n \t\n \tint cols = grid.length;\n int rows = grid[0].length;\n\t\tint col =0;\n\t\tint ro = 0;\n\t\t\n\t\tfor (int i =0; i<cols*rows;i++) {\n\t\t\tif (grid[ro][col]==val) {\n\t\t\t\tvalCount++;\n\t\t\t}\n\t\t\tcol++;\n\t\t\tif (col==co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor scope is restricted to inheritance and package as it should not be used directly by user applications. It is only intended to be used from within factory methods and properties of the Outlook object model itself. It may also be called from unit tests which may supply a mock version of the IDispatch object. | protected BaseItemLevel1(IDispatch iDispatch) {
super(iDispatch);
} | [
"private PBMailItem() {}",
"protected AirspaceObject() {}",
"public Communication() {\n if (impl == null) {\n init();\n }\n }",
"protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }",
"public WWObjectImpl()\n {\n }",
"public MOItem_Internal()\n {\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the path of /storage/emulated/0/Android/data/package/files/Download. | public static String getExternalAppDownloadPath() {
if (isExternalStorageDisable()) return "";
return getAbsolutePath(Utils.getApp().getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS));
} | [
"private static String getDownloadFilePath() {\n File pathExternalPublicDir =\n Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS);\n return pathExternalPublicDir.getPath();\n }",
"public static String getExternalDownloadsPath()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Restituisce il nome del Report | public String getNomeReport() {
return nomeReport;
} | [
"@Override\n\tpublic String getReportName() {\n\t\treturn NAME;\n\t}",
"public String getReportname() {\n return reportname;\n }",
"public String getReportName() {\n\n return reportName;\n\n }",
"public String getReportName() {\r\n return reportName;\r\n }",
"public String getReport(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Divides this unit into another unit. This operation is invalid. | protected Unit
myDivideInto(Unit that)
throws DivideException
{
throw new DivideException(that, this);
} | [
"public final Unit<Q> divide(long divisor) {\r\n return transform(new RationalConverter(1, divisor));\r\n }",
"protected Unit\r\n myDivideBy(Unit that)\r\n\tthrows DivideException\r\n {\r\n\tthrow new DivideException(this);\r\n }",
"public final Unit<? extends Quantity> divide(Unit<?> that) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |