query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
This method tells you whether the element you are looking for exists or not. | public static boolean isElementPresent(By selector,WebDriver driver)
{
try
{
driver.findElement(selector);
return true;
}
catch (Exception e)
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasElement();",
"public boolean isElementExists(By targetElement) throws Exception {\n try {\n info(\"Verifying Element Present By :: \" + targetElement);\n boolean isPresent = getDriver().findElements(targetElement).size() > 0;\n return isPresent;\n } catch... | [
"0.80349046",
"0.75395066",
"0.75305",
"0.75266254",
"0.7370945",
"0.7356943",
"0.7288144",
"0.72476727",
"0.7243129",
"0.722824",
"0.7207142",
"0.7170823",
"0.69132274",
"0.6818048",
"0.68158704",
"0.6778169",
"0.6714784",
"0.6698441",
"0.66902405",
"0.6684605",
"0.66632754"... | 0.6551591 | 30 |
This method waits for the page to load. | public static void waitForPageToLoad(WebDriver driver) throws InterruptedException
{
Thread.sleep(2000);
//waitPageLoad.until(executeJavaScript("return document.readyState;", "complete"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void waitThePageToLoad() {\n ExpectedCondition pageLoadCondition = new ExpectedCondition<Boolean>() {\n public Boolean apply(WebDriver driver) {\n return ((JavascriptExecutor) driver).executeScript(\"return document.readyState\").equals(\"complete\");\n }\n ... | [
"0.85527253",
"0.8401382",
"0.837459",
"0.82199144",
"0.8154072",
"0.806805",
"0.8053063",
"0.79757327",
"0.7973608",
"0.7887102",
"0.779892",
"0.76100093",
"0.7534947",
"0.747054",
"0.7314004",
"0.7186228",
"0.7181639",
"0.7142595",
"0.7131092",
"0.7060114",
"0.70161355",
... | 0.72149014 | 15 |
This method executes javascript. | private static ExpectedCondition<Boolean> executeJavaScript(final String javascript, final String expectedString)
{
return new ExpectedCondition<Boolean>()
{
/**
* This method executes the string (javascript).
*
* @param driver The driver to set.
* @return Returns true/false.
*/
public Boolean apply(WebDriver driver)
{
try
{
return expectedString.equalsIgnoreCase(javaScriptExecutor.executeScript(javascript).toString());
}
catch (Exception e)
{
return false;
}
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void Javascript() {\n\n\t}",
"public void executeScript(String js) {\n try {\n this.webView.getEngine().executeScript(js);\n } catch (RuntimeException ex) {\n ex.printStackTrace();\n if (!this.pdfJsLoaded) this.toExecuteWhenPDFJSLoaded += String.format... | [
"0.75274235",
"0.6795817",
"0.64642125",
"0.61405504",
"0.6126322",
"0.60983187",
"0.60681474",
"0.59191865",
"0.5914562",
"0.5896179",
"0.58203286",
"0.57700616",
"0.57090443",
"0.57013065",
"0.56751394",
"0.56494915",
"0.5580458",
"0.55227464",
"0.55081016",
"0.5499867",
"0... | 0.0 | -1 |
This method executes the string (javascript). | public Boolean apply(WebDriver driver)
{
try
{
return expectedString.equalsIgnoreCase(javaScriptExecutor.executeScript(javascript).toString());
}
catch (Exception e)
{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tCocos2dxJavascriptJavaBridge.evalString(rStr);\n\t\t\t\t\t}",
"private static native void eval(String script)\n /*-{\n try {\n if (script == null) return;\n $wnd.eval(script);\n } catch (e) {\n }\n }-*/;",
"public... | [
"0.7410852",
"0.66119546",
"0.6580387",
"0.65738714",
"0.6460157",
"0.64582855",
"0.6393659",
"0.63653797",
"0.6189092",
"0.6140155",
"0.606897",
"0.5963121",
"0.595378",
"0.59028745",
"0.58380175",
"0.5799187",
"0.57984346",
"0.5777207",
"0.5717895",
"0.5677996",
"0.5633795"... | 0.50947124 | 52 |
This method will wait for the element to be available on the screen. | public static WebElement waitForElement(WebElement we, int seconds,WebDriver driver)
{
WebDriverWait wait = new WebDriverWait(driver, seconds);
return wait.until(waitForElementToBeDisplayed(we));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"public static void waitForVisibility(WebElement element){\n getWait().until(ExpectedConditions.visibilityOf(element));\n ... | [
"0.778999",
"0.7638941",
"0.7612091",
"0.75727016",
"0.7512325",
"0.74420416",
"0.7409389",
"0.73902065",
"0.7301966",
"0.7271726",
"0.72667193",
"0.7215571",
"0.7130441",
"0.7101139",
"0.7091716",
"0.70848745",
"0.7023452",
"0.7017677",
"0.7005502",
"0.69867647",
"0.69653547... | 0.0 | -1 |
This method will wait until the element is available. | private static ExpectedCondition<WebElement> waitForElementToBeDisplayed(final WebElement we)
{
return new ExpectedCondition<WebElement>()
{
/**
* This method will retrieve the element.
*
* @param driver The driver to set.
* @return Returns the webelement.
*/
public WebElement apply(WebDriver driver)
{
if(we.isDisplayed()){
return we;
}
return null;
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void waitForElement(WebElement element) {\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}",
"public void waitForVisibilityOfElement(WebEle... | [
"0.7957577",
"0.7445507",
"0.7378389",
"0.737836",
"0.733412",
"0.7323199",
"0.731691",
"0.73003215",
"0.72889835",
"0.72398716",
"0.7198",
"0.7152326",
"0.7130143",
"0.7129225",
"0.7125444",
"0.70631576",
"0.7057135",
"0.70392835",
"0.7001127",
"0.69781595",
"0.691167",
"0... | 0.0 | -1 |
This method will retrieve the element. | public WebElement apply(WebDriver driver)
{
if(we.isDisplayed()){
return we;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object getElement()\r\n\t\t{ return element; }",
"public String getElement() { return element; }",
"public T getElement() {\n\t\treturn element;\n\t}",
"public E getElement() { return element; }",
"public T getElement() {\r\n\t\t\r\n\t\treturn element;\r\n\t\r\n\t}",
"public T getElement()\n {\... | [
"0.7328896",
"0.7315092",
"0.7294364",
"0.7290529",
"0.7283905",
"0.72785217",
"0.725457",
"0.72387797",
"0.72250146",
"0.71354616",
"0.71181905",
"0.71059525",
"0.71059525",
"0.7081456",
"0.70627964",
"0.7056834",
"0.7050569",
"0.7036328",
"0.699397",
"0.697669",
"0.69687027... | 0.0 | -1 |
This method maximizes the browser. | public static void maximizeWindow(WebDriver driver)
{
int width = ((Long) javaScriptExecutor.executeScript("return screen.width;")).intValue();
int height = ((Long) javaScriptExecutor.executeScript("return screen.height;")).intValue();
switch (getBrowserType())
{
case Firefox:
{
maximizeFirefoxWindow(width, height,driver);
break;
}
case InternetExplorer:
{
maximizeInternetExplorerWindow(width, height);
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void browserMaximize(){\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t}",
"public static void MaximizeWindow() {\n\t\tBrowser.Driver.manage().window().maximize();\n\t}",
"public static void maximizeWindow() {\n\t\tLOG.info(\"Maximize browser window.\");\n\t\tConstants.driver.manage().... | [
"0.8032848",
"0.796085",
"0.7792715",
"0.7767888",
"0.74905723",
"0.7326832",
"0.7262452",
"0.7049399",
"0.7005635",
"0.6962519",
"0.6948406",
"0.6931058",
"0.6870985",
"0.66853386",
"0.66684884",
"0.6620783",
"0.6558003",
"0.65355974",
"0.6426429",
"0.62966925",
"0.6182682",... | 0.6994028 | 9 |
This method maximizes Firefox. | private static void maximizeFirefoxWindow(int screenWidth, int screenHeight,WebDriver driver)
{
driver.manage().window().setPosition(new Point(0, 0));
driver.manage().window().setSize(new Dimension(screenWidth, screenHeight));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void browserMaximize(){\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t}",
"private void maximizeWindow() {\n\t\tdriver.manage().window().maximize();\n\t}",
"public static void browserMax() {\r\n\tdriver.manage().window().maximize();\r\n}",
"public static void maximizeWindow() {\n\t\... | [
"0.7421722",
"0.7068212",
"0.70490503",
"0.6933905",
"0.69079703",
"0.6396761",
"0.63744915",
"0.6328958",
"0.62507284",
"0.6192102",
"0.61836773",
"0.6178731",
"0.61310065",
"0.61107564",
"0.6011183",
"0.58082646",
"0.5795528",
"0.57563823",
"0.5753274",
"0.5743808",
"0.5741... | 0.7044116 | 3 |
This method maximizes Internet Explorer. | private static void maximizeInternetExplorerWindow(int screenWidth, int screenHeight)
{
javaScriptExecutor.executeScript("return window.moveTo(0, 0)");
javaScriptExecutor.executeScript("return window.resizeTo(" + Integer.toString(screenWidth) + ", " + Integer.toString(screenHeight) + ")");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void MaximizeWindow() {\n\t\tBrowser.Driver.manage().window().maximize();\n\t}",
"private void maximizeWindow() {\n\t\tdriver.manage().window().maximize();\n\t}",
"public void browserMaximize(){\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t}",
"public static void maximizeWin... | [
"0.7032443",
"0.6969192",
"0.6941859",
"0.6840569",
"0.6643934",
"0.6513844",
"0.642982",
"0.64247644",
"0.6394731",
"0.6297534",
"0.6266576",
"0.61356604",
"0.60958093",
"0.5957041",
"0.5883904",
"0.5833481",
"0.57230556",
"0.56313616",
"0.56180155",
"0.56085163",
"0.5577788... | 0.72552943 | 0 |
This method switches to appropriate window. | public static void switchWindow(String windowName, WebDriver driver)
{
driver.switchTo().window(windowName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void switchToDefaultWindow() {\n\n\t}",
"public void switchToWindow(int index) {\n\t\ttry {\r\n\t\t\tSet<String> allWindows = getter().getWindowHandles();\r\n\t\t\tList<String> allhandles = new ArrayList<String>(allWindows);\r\n\t\t\tString windowIndex = allhandles.get(index);\r\n\t\t\tgetter().switchTo()... | [
"0.75299376",
"0.75219995",
"0.7521758",
"0.69920814",
"0.69782877",
"0.6948998",
"0.6772914",
"0.6692469",
"0.6658473",
"0.6599477",
"0.65761983",
"0.6534322",
"0.6503803",
"0.6403443",
"0.6363147",
"0.63548857",
"0.6354028",
"0.633394",
"0.632717",
"0.6291844",
"0.6285073",... | 0.64268315 | 13 |
This method closes the appropriate window. | public static void closeWindow(String windowName,WebDriver driver)
{
driver.switchTo().window(windowName).close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeWindow() {\n\t\tgetDriver().close();\n\n\t}",
"public void closeWindow() {\n\t\tframeUnableToBuyPopup.dispose();\n\t}",
"@Override\n public void closeWindow() {\n \n }",
"public static void closeMe() {\n window.close();\n }",
"@Override\n public void windowClosing... | [
"0.83431816",
"0.82250607",
"0.7969735",
"0.79623055",
"0.78516036",
"0.78290945",
"0.777672",
"0.7756534",
"0.7747074",
"0.7740691",
"0.77284527",
"0.7712025",
"0.7709267",
"0.7702189",
"0.7669746",
"0.7651472",
"0.7651179",
"0.7649809",
"0.76419073",
"0.762618",
"0.7566372"... | 0.0 | -1 |
This method stops the browser. | public static void stop(WebDriver driver)
{
if (driver != null)
{
driver.quit();
driver = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeBrowser(){\n driver.quit();\n }",
"private static void closeBrowser() {\n System.out.println(\"Browser closed\");}",
"public static void CloseBrowser() {\n\t\tBrowser.Driver.quit();\n\t}",
"public void stop() {\n\t\tthis.controller.terminate();\n\t}",
"public void ... | [
"0.7028397",
"0.7019444",
"0.70163804",
"0.693013",
"0.69282335",
"0.6918532",
"0.68883175",
"0.6876703",
"0.68361175",
"0.679529",
"0.6728034",
"0.6682762",
"0.6682762",
"0.6682762",
"0.6682762",
"0.6682762",
"0.6682762",
"0.6682762",
"0.6682762",
"0.6682762",
"0.6682762",
... | 0.0 | -1 |
An interface for processing XSLT result trees. This class is a combination of a SAX 1.0 document handler plus some extra methods for dealing with CDATA comments and entity references. This should be upgraded to a SAX 2.0 Lexical Handler, when they become more prominent | public interface ResultHandler extends DocumentHandler {
/**
* Signals to receive CDATA characters
* @param chars the character array containing the characters
* to receive
* @param start the index into the character array to start receiving
* characters at
* @param length the number of characters to recieve
**/
public void cdata(char[] chars, int start, int length);
/**
* Signals to recieve a comment
* @param data, the content of the comment
**/
public void comment(String data);
/**
* Signals to recieve an entity reference with the given name
* @param name the name of the entity reference
**/
public void entityReference(String name);
/**
* Sets the behavoir of handling character content. If argument is true,
* character content will be escaped. If false, character content will
* not be escaped.
* @param escapeText the flag indicating whether or not to
* escape character content
**/
//public void setEscapeText(boolean escapeText);
/**
* Sets the indent size for all formatters that perform
* serialization, in which indentation is applicable.
* @param indentSize the number of characters to indent
**/
public void setIndentSize(short indentSize);
/**
* Sets the output format information for Formatters that
* perform serialization.
* @param format the OutputFormat used to specify properties
* during serialization
**/
public void setOutputFormat(OutputFormat format);
/**
* Signals to receive characters which should not be escaped
* @param chars the character array containing the characters
* to receive
* @param start the index into the character array to start receiving
* characters at
* @param length the number of characters to recieve
**/
public void unescapedCharacters(char[] chars, int start, int length);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void parseResultXML (String res) {\n\n try {\n \t DOMParser dparser = new DOMParser ();\n\n // Construct an InputSource from the XML String we're given.\n\t // Xerces is usually used to handling file objects so we need\n\t // to hack a bit here ....\n dparser.pars... | [
"0.56619674",
"0.56545454",
"0.5643969",
"0.5517483",
"0.54216176",
"0.53792185",
"0.53554446",
"0.53487927",
"0.5344933",
"0.5338663",
"0.52860934",
"0.52803564",
"0.5275448",
"0.5270456",
"0.5267102",
"0.5263538",
"0.5253949",
"0.5252236",
"0.52522147",
"0.52485114",
"0.524... | 0.655864 | 0 |
Signals to receive CDATA characters | public void cdata(char[] chars, int start, int length); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void cdata() {\n\t\t\n\t}",
"public void cdata(Object parser, String data) {\n if (!empty(this.in_content)) {\r\n\t\t\t// handle self-closing tags (case: text node found, need to close element started)\r\n if (!strictEqual(Strings.strpos(strval(this.in_content.getValue(Array... | [
"0.6742789",
"0.66116583",
"0.6593536",
"0.6586711",
"0.6430449",
"0.6425146",
"0.6390538",
"0.62299067",
"0.6134785",
"0.5925048",
"0.5908314",
"0.58809257",
"0.5789637",
"0.57200074",
"0.5694845",
"0.5684377",
"0.5679228",
"0.56774247",
"0.5664764",
"0.56596565",
"0.5645965... | 0.630123 | 7 |
Signals to recieve a comment | public void comment(String data); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onCommentsReceived(String comment, String URL) {\n\n }",
"public void handleComment(HtmlObjects.Comment t)\n {\n }",
"@Override\n public void onComment(Comment newComment) {\n addComment(mPostRef, newComment)\n .addOnSuccessListener(this, new OnSucce... | [
"0.778911",
"0.690257",
"0.6717392",
"0.66728985",
"0.66640073",
"0.66170686",
"0.64339215",
"0.64199543",
"0.63556653",
"0.6340601",
"0.62906766",
"0.62906766",
"0.6288626",
"0.62449014",
"0.6221687",
"0.6208992",
"0.6208992",
"0.6178837",
"0.61786425",
"0.61656344",
"0.6157... | 0.64967734 | 6 |
Signals to recieve an entity reference with the given name | public void entityReference(String name); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reference(Name entityName) throws IOException {\n\t\t\n\t\tentityName.writeTo(chars);\n\t}",
"@DOMSupport(DomLevel.ONE)\r\n @BrowserSupport({BrowserType.FIREFOX_2P})\r\n\t@Function EntityReference createEntityReference(String name);",
"void selectedEntityChanged(String name);",
"void trigger(E... | [
"0.6688192",
"0.63541675",
"0.63181835",
"0.6038263",
"0.60218513",
"0.56910187",
"0.5592515",
"0.55692405",
"0.55421996",
"0.5528006",
"0.5528006",
"0.5434315",
"0.53872395",
"0.53872395",
"0.53841954",
"0.5382323",
"0.53578633",
"0.5353863",
"0.5291544",
"0.5277125",
"0.526... | 0.78647906 | 0 |
Sets the behavoir of handling character content. If argument is true, character content will be escaped. If false, character content will not be escaped. | public void setIndentSize(short indentSize); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String handleEntities(String content, boolean attribute)\n\t{\n\t\tString text;\n\t\t\n\t\tif (keepEntities(attribute))\n\t\t\ttext = EscHandler.theInstance.escape(content);\n\t\telse\n\t\t\ttext = content;\n\t\t\n\t\treturn text;\n\t}",
"public Builder setHasCharacter(boolean value) {\n bitField0_... | [
"0.64246905",
"0.6270802",
"0.6193187",
"0.5929715",
"0.5912388",
"0.5866184",
"0.567982",
"0.5640216",
"0.5599674",
"0.559237",
"0.5584777",
"0.5518613",
"0.55058664",
"0.5417263",
"0.54137254",
"0.54005444",
"0.53793025",
"0.53605795",
"0.5347547",
"0.5344653",
"0.5331352",... | 0.0 | -1 |
Sets the output format information for Formatters that perform serialization. | public void setOutputFormat(OutputFormat format); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setOutputFormat(String outputFormat);",
"public Format setOutputFormat(Format output) {\n outputFormat = output;\n return output;\n }",
"@Override\n public Format setOutputFormat(Format format)\n {\n Format outputFormat = super.setOutputFormat(format);\n \n if (log... | [
"0.8032062",
"0.73210114",
"0.72996444",
"0.68412554",
"0.68304205",
"0.66188824",
"0.6359998",
"0.63273674",
"0.62710065",
"0.62638885",
"0.6222817",
"0.6143432",
"0.6143432",
"0.6143432",
"0.60668206",
"0.60292345",
"0.60154027",
"0.60013664",
"0.5997104",
"0.5966787",
"0.5... | 0.76053286 | 1 |
Signals to receive characters which should not be escaped | public void unescapedCharacters(char[] chars, int start, int length); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface BreakingBadCharactersListener {\n\n void onStarted();\n}",
"private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}",
"@Override\n public void accep... | [
"0.6442858",
"0.6434342",
"0.6373155",
"0.62948626",
"0.62713856",
"0.6143036",
"0.61000466",
"0.6079254",
"0.60420024",
"0.60009235",
"0.5724612",
"0.56985235",
"0.5677505",
"0.56189466",
"0.5615345",
"0.5591698",
"0.5589459",
"0.55572206",
"0.5531344",
"0.55226713",
"0.5518... | 0.54046506 | 34 |
Getting the bag for inspection by basic strategy and then checking if it is a oven round and adding highest profit illegal card in the bag if there is space for it. | public Bag getGreedyBag() {
bag = super.getBag();
List<Integer> auxiliarHand = new LinkedList<Integer>(hand);
for (int i = 0; i < bag.getCardsIds().size(); i++) {
if (auxiliarHand.contains(bag.getCardsIds().get(i))) {
auxiliarHand.remove(bag.getCardsIds().get(i));
}
}
if (this.roundNumber % 2 == 0) {
highestProfitIllegalCard = 0;
if (bag.getCards().size() < MAX_CARDS_IN_BAG) {
for (Integer cardId : auxiliarHand) {
if (cardId > MAX_LEGAL_INDEX
&& goodsFactory.getGoodsById(cardId).getProfit()
> goodsFactory.getGoodsById(highestProfitIllegalCard).getProfit()) {
highestProfitIllegalCard = cardId;
}
}
if (highestProfitIllegalCard != 0
&& (coins - goodsFactory
.getGoodsById(highestProfitIllegalCard)
.getPenalty()) > 0) {
bag.addCard(goodsFactory.getGoodsById(highestProfitIllegalCard));
}
}
}
return bag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Pair[] bribeCalculateBag(final int maxCards,\n final HashMap<String, Integer> association) {\n final int minMoney = 5;\n final int maxBagSize = 3;\n if (getInventory().getMoney() < minMoney || numberOfIllegals(association) == 0) {\n return... | [
"0.68540186",
"0.62430185",
"0.5600383",
"0.55914617",
"0.557765",
"0.5546295",
"0.5538817",
"0.55384934",
"0.5514274",
"0.5488679",
"0.54390615",
"0.5340065",
"0.53144145",
"0.53120273",
"0.53093666",
"0.5300801",
"0.5292735",
"0.52832586",
"0.5282865",
"0.52826774",
"0.5278... | 0.7134051 | 0 |
Inspecting the bag if there is no bribe and take the bribe if exists. | public void inspect(final Bag bagToInspect) {
letGo = false;
if (bagToInspect.getBribe() != 0) {
letGo = true;
} else {
super.inspectBag(bagToInspect);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Bag getBag()\n\t{\n\t\treturn m_bag;\n\t}",
"public Bag getGreedyBag() {\r\n bag = super.getBag();\r\n List<Integer> auxiliarHand = new LinkedList<Integer>(hand);\r\n\r\n for (int i = 0; i < bag.getCardsIds().size(); i++) {\r\n if (auxiliarHand.contains(bag.getCardsIds().ge... | [
"0.5871743",
"0.5705495",
"0.5537763",
"0.5514047",
"0.54878575",
"0.5474307",
"0.5458542",
"0.5445191",
"0.5317419",
"0.5202331",
"0.51914394",
"0.5187163",
"0.51783556",
"0.51706284",
"0.51550597",
"0.51515794",
"0.5122589",
"0.51203185",
"0.5109071",
"0.5085339",
"0.508460... | 0.50411516 | 23 |
Check if boolean letGo is true or false. | public boolean isLetGo() {
if (letGo) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasBool();",
"boolean hasBoolValue();",
"Boolean getCompletelyCorrect();",
"boolean isAlwaysTrue();",
"private CheckBoolean() {\n\t}",
"public boolean isGoal() {\n return (man == 0);\n }",
"public final boolean getBool(final Bool varNum) {\n try {\n return sysBools[v... | [
"0.66754764",
"0.6153762",
"0.6081447",
"0.60620904",
"0.60026234",
"0.58488584",
"0.5780478",
"0.57525843",
"0.57408404",
"0.5733537",
"0.5716571",
"0.57133365",
"0.57115734",
"0.5696636",
"0.5651789",
"0.5645469",
"0.5645469",
"0.5642906",
"0.5642906",
"0.5639283",
"0.56085... | 0.7282556 | 0 |
Adds a node to the relevant painters | public void addToPainter(OSMNode node) {
GeoPosition geoP = new GeoPosition(Double.parseDouble(node.getLat()), Double.parseDouble((node.getLon())));
geopoints.add(geoP);
//waypoints.add(new DefaultWaypoint(geoP));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addNode(NodeImpl node) {\n supervisedNodes.add(node);\n \n colorNodes();\n shortenNodeLabels();\n colorNodeLabels();\n colorNodeLabelBorders();\n }",
"public void addToPane(Node node) {\n pane.getChildren().add(node);\n }",
"private void addNode... | [
"0.68421656",
"0.63707256",
"0.6134523",
"0.6058155",
"0.6043776",
"0.60344267",
"0.60122985",
"0.59099245",
"0.5892732",
"0.5872578",
"0.5855461",
"0.5843647",
"0.58315516",
"0.58143175",
"0.5812549",
"0.58024085",
"0.5796546",
"0.5791227",
"0.57912123",
"0.5759398",
"0.5738... | 0.6340625 | 2 |
End tileSetUp() Takes in a nodes and edges, creates painters and draws them on the map | public void drawRoute(Set<Waypoint> waypoints, List<GeoPosition> track) {
RoutePainter routePainter = new RoutePainter(track);
WaypointPainter<Waypoint> waypointPainter = new WaypointPainter<Waypoint>();
waypointPainter.setWaypoints(waypoints);
List<Painter<JXMapViewer>> painters = new ArrayList<Painter<JXMapViewer>>();
painters.add(routePainter);
painters.add(waypointPainter);
CompoundPainter<JXMapViewer> painter = new CompoundPainter<JXMapViewer>(painters);
mapViewer.setOverlayPainter(painter);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void setup() {\r\n\t\tthis.gridCells = this.world.getCells();\r\n\t\tthis.markerDrawOrders = new HashMap<Cell, Integer>();\r\n\t\tsetMarkerDrawOrders(this.gridCells);\r\n\t\t//Number of hexagons in columns and rows\r\n\t\tthis.numHexRow = this.gridCells.length;\r\n\t\tthis.numHexCol = this.gr... | [
"0.59566915",
"0.5828543",
"0.5820766",
"0.5773345",
"0.57523847",
"0.5734561",
"0.5625966",
"0.5620319",
"0.56072706",
"0.558953",
"0.5563435",
"0.5552949",
"0.5475537",
"0.5474196",
"0.5463358",
"0.5440966",
"0.54312074",
"0.53683025",
"0.53554946",
"0.53332543",
"0.5328299... | 0.0 | -1 |
TODO Autogenerated method stub | private void psvm() {
System.out.println("test");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO: get all generators from jdbc | @Override
public List<Generator> getAll() {
return new ArrayList<>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generat... | [
"0.7441692",
"0.6013413",
"0.5933038",
"0.57288796",
"0.54425573",
"0.5411744",
"0.5403221",
"0.5387518",
"0.53624916",
"0.53065515",
"0.52690744",
"0.5162463",
"0.5133688",
"0.5115399",
"0.50915945",
"0.5068128",
"0.5062732",
"0.5054546",
"0.5052809",
"0.5037885",
"0.5036601... | 0.57615495 | 3 |
TODO: get specific generator by id | @Override
public Optional<Generator> getById(int id) {
return Optional.empty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic Optional<Generator> getById(int id) {\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tPreparedStatement stmt = c.prepareStatement(getByIdQuery)) \n\t\t{\n\t\t\t\n\t\t\tstmt.setInt(1, id);\n\t\t\tResultSet rs = stmt.executeQuery();\n \tGenerator generator = new Generator(\n ... | [
"0.7117647",
"0.6858608",
"0.623691",
"0.6129065",
"0.60519606",
"0.6002497",
"0.58720636",
"0.58100545",
"0.5796738",
"0.57842433",
"0.56995374",
"0.56890386",
"0.5682141",
"0.5622481",
"0.561543",
"0.5582973",
"0.5565287",
"0.5531018",
"0.5491435",
"0.54865474",
"0.54724216... | 0.7171547 | 0 |
TODO: update specific generator by id | @Override
public void set(int id, Generator generator) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }",
"@Override\n\tpublic void set(int id, Generator generator) {\n\n\t\ttry (Connection c = con... | [
"0.63749075",
"0.6158535",
"0.6054298",
"0.60040593",
"0.5908422",
"0.5870021",
"0.5859277",
"0.5815539",
"0.57127655",
"0.5704599",
"0.5695022",
"0.56759113",
"0.56556875",
"0.56528103",
"0.5652626",
"0.5619077",
"0.561505",
"0.56127733",
"0.55927277",
"0.55917954",
"0.55915... | 0.70326304 | 0 |
TODO: implement jdbc logic to add a new generator | @Override
public void add(Generator generator) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.404 -0500\", hash_original_method = \"CD5C82C799E78C74801FDB521CEE7324\", hash_generated_method = \"CD5C82C799E78C74801FDB521CEE7324\")\n \nContext ()\n {\n copyTables();\n }",
"@Override\n... | [
"0.6614962",
"0.6511302",
"0.6328672",
"0.6237117",
"0.6194328",
"0.5906611",
"0.5890437",
"0.5863422",
"0.58514965",
"0.5827935",
"0.5688117",
"0.5682085",
"0.56051546",
"0.5563637",
"0.5516666",
"0.54876167",
"0.54602396",
"0.5457924",
"0.5451754",
"0.5430421",
"0.5427884",... | 0.5033949 | 67 |
TODO: implement jdbc logic to remove generator by id | @Override
public void remove(int id) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removeNextId(int nextId);",
"public SnowflakeIDGenerator() {\n setWorkerIndexes(null);\n }",
"void unsetId();",
"public static void resetId() {\r\n nextid=1;\r\n }",
"@Override\n public void freeId( long id )\n {\n }",
"void unsetID();",
"@DSGenerator(tool_... | [
"0.6241359",
"0.59526485",
"0.58152753",
"0.57232606",
"0.56875676",
"0.5677217",
"0.5641484",
"0.5570465",
"0.5570465",
"0.5533871",
"0.5524475",
"0.55223536",
"0.551142",
"0.55059445",
"0.5491996",
"0.54623246",
"0.5461755",
"0.54569626",
"0.54424196",
"0.54153776",
"0.5397... | 0.50219315 | 78 |
date of birth in iso format. | public T dob(LocalDate birthday) {
dccObject.set("dob", jsonNodeFactory.textNode(toIsoDate(birthday)));
requiredNotSet.remove(RequiredFieldsBase.dob);
return getThis();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"LocalDate getDateOfBirth();",
"public String getDateOfBirth(){\n\t\treturn dateOfBirth;\n\t}",
"Date getBirthDate();",
"public String getDate_of_Birth() {\n\t\treturn Date_of_Birth;\n\t}",
"public String getDateOfBirth(){\n return(this.dateOfBirth);\n }",
"public String getDateOfBirth() {\r\n\t... | [
"0.7688544",
"0.762541",
"0.7591251",
"0.7578558",
"0.7526191",
"0.7422878",
"0.7422148",
"0.7410853",
"0.73543787",
"0.73065925",
"0.7258544",
"0.7188546",
"0.7184194",
"0.71685886",
"0.7158249",
"0.7136642",
"0.71270216",
"0.70964587",
"0.70889825",
"0.7045584",
"0.7040985"... | 0.0 | -1 |
Wird aufgerufen, wenn ein neues Fragment gefunden wurde. | protected abstract void fragmentTrigger(Fragment fragment); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void onFragmentStart() {\n\t}",
"public boolean is_fragment() {\r\n\t\treturn is_fragment_;\r\n\t}",
"@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}",
"public void cargarFragment (Fragment fragment, String tag){\r\n FragmentManager manager = getSupp... | [
"0.7194029",
"0.69687563",
"0.693681",
"0.68170965",
"0.67638314",
"0.67514324",
"0.67073226",
"0.6685371",
"0.6592745",
"0.6571829",
"0.6571005",
"0.6548787",
"0.6543906",
"0.65124875",
"0.64924365",
"0.6488243",
"0.64688635",
"0.63819784",
"0.63752747",
"0.63540953",
"0.635... | 0.5981591 | 89 |
Constructor for a Snake object. Will construct a snake left of the head. | public Snake(Location snakeHead, int initialLength) {
int posX = snakeHead.locX;
int posY = snakeHead.locY;
for (int i = 0; i < initialLength; i++) {
body.add(new Location(posX, posY, Direction.RIGHT));
posX -= segmentOffset;
}
snakeTail = body.getLast();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Snake() {\n\t\tsnakeId = 0;\n\t\theadId = 0;\n\t\tTailId = 0;\n\t}",
"public Snake(){ super(); }",
"public Snake(Snake s) {\n\t\tsnakeId = s.snakeId;\n\t\theadId = s.headId;\n\t\tTailId = s.TailId;\n\t}",
"protected void createStartSnake() {\n int screenXCenter = maxX / 2; //Cast just in case ... | [
"0.78871053",
"0.7849279",
"0.70977914",
"0.7056979",
"0.6941497",
"0.6864584",
"0.68319434",
"0.651599",
"0.6418667",
"0.6360063",
"0.62616426",
"0.62069476",
"0.609453",
"0.6075189",
"0.5974662",
"0.5881447",
"0.57850575",
"0.5748938",
"0.57486826",
"0.57189053",
"0.5703992... | 0.7043553 | 4 |
this method will make a deep copy of a snake. | public Snake(Snake snake) {
for (int i = 0; i < snake.getBody().size(); i++) {
Location snB = snake.getBody().get(i);
this.body.add(new Location(snB.locX, snB.locY, Direction.RIGHT));
}
snakeTail = body.getLast();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Snake(Snake s) {\n\t\tsnakeId = s.snakeId;\n\t\theadId = s.headId;\n\t\tTailId = s.TailId;\n\t}",
"public Snake(){ super(); }",
"public Snake() {\n\t\tsnakeId = 0;\n\t\theadId = 0;\n\t\tTailId = 0;\n\t}",
"private void setSnake() {\r\n length = 1;\r\n snake = new Location[maxRows*maxColu... | [
"0.70778936",
"0.67941165",
"0.66228086",
"0.6480524",
"0.6448303",
"0.61824834",
"0.6069821",
"0.6015534",
"0.58863527",
"0.5822513",
"0.5793769",
"0.5786626",
"0.5784655",
"0.578193",
"0.57009506",
"0.56948817",
"0.568894",
"0.56842315",
"0.5680297",
"0.56466764",
"0.564276... | 0.68502116 | 1 |
Getter for the body of the snake. | public LinkedList<Location> getBody() {
return this.body;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SmilBody getBody();",
"public java.lang.String getBody() {\n return body_;\n }",
"Body getBody();",
"CompoundSt getBody () { return body; }",
"public String getBody() {\r\n return body;\r\n }",
"public String getBody()\n\t{\n\t\treturn m_sBody;\t\n\t}",
"public String getBody_() {\n ... | [
"0.7499408",
"0.74888414",
"0.7484202",
"0.7407574",
"0.7374712",
"0.7348823",
"0.73478895",
"0.73403895",
"0.7327531",
"0.73184186",
"0.7313963",
"0.730005",
"0.7282788",
"0.72676075",
"0.72676075",
"0.72676075",
"0.72135264",
"0.71843153",
"0.71706975",
"0.71568",
"0.71568"... | 0.626256 | 63 |
This method sets the new direction of the snake after some keyboard input. It shouldn't be possible if it is in conflict with the current movement. | public boolean setDirection(Direction dir) {
//If a new direction was set but the update wasn't made yet,
// you cannot change the direction.
if (!moveMade) {
return false;
}
if (!direction.isValid(dir)) {
return false;
}
prevDir = direction;
direction = dir;
moveMade = false;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void moveSnake() { \r\n for (int i = length; i > 0; i--) {\r\n snake[i].row = snake[i-1].row;\r\n snake[i].column = snake[i-1].column; \r\n snake[i].direction = snake[i-1].direction; \r\n }\r\n if (snake[HEAD].direct... | [
"0.6965944",
"0.67069656",
"0.6699653",
"0.6680854",
"0.6629683",
"0.64627403",
"0.64399296",
"0.6411754",
"0.6401664",
"0.6384882",
"0.63327515",
"0.6244385",
"0.6224518",
"0.62169504",
"0.621001",
"0.6140571",
"0.61328405",
"0.6128774",
"0.6066109",
"0.5972804",
"0.59621763... | 0.56062955 | 71 |
If this method is called the snake will be updated and collisions should be checked. | public void move(int tick) {
moveMade = true;
Location newTail;
if (grow) {
switch (body.getLast().direction) {
case RIGHT:
newTail = new Location(body.getLast().locX - GraphicsBounds.spriteSize,
body.getLast().locY, body.getLast().direction);
break;
case LEFT:
newTail = new Location(body.getLast().locX + GraphicsBounds.spriteSize,
body.getLast().locY, body.getLast().direction);
break;
case UP:
newTail = new Location(body.getLast().locX, body.getLast().locY
+ GraphicsBounds.spriteSize, body.getLast().direction);
break;
case DOWN:
newTail = new Location(body.getLast().locX, body.getLast().locY
- GraphicsBounds.spriteSize, body.getLast().direction);
break;
default:
newTail = new Location(0,0);
break;
}
body.addLast(newTail);
}
for (int i = body.size() - 1; i > 0; i--) {
body.get(i).direction = body.get(i - 1).direction;
}
switch (direction) {
case RIGHT:
body.getFirst().direction = Direction.RIGHT;
break;
case LEFT:
body.getFirst().direction = Direction.LEFT;
break;
case UP:
body.getFirst().direction = Direction.UP;
break;
case DOWN:
body.getFirst().direction = Direction.DOWN;
break;
default:
break;
}
for (int i = body.size() - 1; i >= 0; i--) {
Direction dir = body.get(i).direction;
Location segment = body.get(i);
switch (dir) {
case RIGHT:
segment.locX += snakeSpeed;
break;
case LEFT:
segment.locX -= snakeSpeed;
break;
case UP:
segment.locY -= snakeSpeed;
break;
case DOWN:
segment.locY += snakeSpeed;
break;
default:
break;
}
}
grow = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void update() {\n\t\tif(snakeUpdateTimer.update()) {\n\t\t\tpreventMovementInOppositeDirection();\n\t\t\t\n\t\t\tsnake.removeFirst(); // \"last\" element of the snake\n\t\t\tconvertHeadToTailComponent();\n\t\t\taddNewHead();\n\t\t}\n\t}",
"void update()\n\t{\n\t\t// the snake moves this function records i... | [
"0.7559484",
"0.7229525",
"0.7224278",
"0.7188994",
"0.7044716",
"0.6942244",
"0.6938132",
"0.6863908",
"0.67572826",
"0.67406416",
"0.6735817",
"0.6688404",
"0.6681266",
"0.66767704",
"0.6658536",
"0.6603737",
"0.65997016",
"0.6580729",
"0.6504393",
"0.64839023",
"0.64717484... | 0.5862727 | 57 |
If the snake has eaten an apple, this method will be called which will make sure that the snake will growSnake one segment. | public void growSnake() {
grow = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void eatApple(){\n int rowsOld = snakePartList.get(SnakePartMaxID).getSnakePartRowsOld();\n int collsOld = snakePartList.get(SnakePartMaxID).getSnakePartCollsOld();\n\n snakePartList.add(new SnakePart(rowsOld, collsOld, SnakePartMaxID));\n board[rowsOld][collsOld] = 'S';\n ... | [
"0.716942",
"0.67440945",
"0.65822625",
"0.6572713",
"0.6480725",
"0.6461559",
"0.6391655",
"0.6362174",
"0.6355134",
"0.6266146",
"0.61011666",
"0.6098048",
"0.6049663",
"0.58522934",
"0.5822194",
"0.58221865",
"0.57783806",
"0.5775102",
"0.57566154",
"0.5725058",
"0.5684927... | 0.7034664 | 1 |
This method makes a deep copy of the snake body. | public LinkedList<Location> cloneBody() {
LinkedList<Location> clone = new LinkedList<>();
for (Location loc : body) {
clone.add(new Location(loc.locX, loc.locY, loc.direction));
}
return clone;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Snake(Snake snake) {\n for (int i = 0; i < snake.getBody().size(); i++) {\n Location snB = snake.getBody().get(i);\n this.body.add(new Location(snB.locX, snB.locY, Direction.RIGHT));\n }\n\n snakeTail = body.getLast();\n }",
"@Test\n\tpublic void copy() {\n\t\... | [
"0.6723562",
"0.65193033",
"0.61751723",
"0.61403704",
"0.59059125",
"0.5803241",
"0.5772509",
"0.575677",
"0.56766576",
"0.5658573",
"0.56334317",
"0.5559842",
"0.55595857",
"0.55174804",
"0.54978216",
"0.5486035",
"0.54544884",
"0.5451078",
"0.54017204",
"0.5384268",
"0.538... | 0.59204805 | 4 |
Gets the value of the brojParcele property. | public int getBrojParcele() {
return brojParcele;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getPodbrojParcele() {\n return podbrojParcele;\n }",
"public void setBrojParcele(int value) {\n this.brojParcele = value;\n }",
"Nodo_B getPrimero(){\n return this.primero;\n }",
"public String getPoblacion() {\r\n\t\treturn poblacion;\r\n\t}",
"public String getPar... | [
"0.7252737",
"0.6029167",
"0.59807813",
"0.5901608",
"0.5846575",
"0.58149266",
"0.58149266",
"0.57729936",
"0.57395834",
"0.57125473",
"0.56802064",
"0.5673649",
"0.5670177",
"0.56505483",
"0.56059986",
"0.55800545",
"0.5531683",
"0.55156034",
"0.5487579",
"0.5476073",
"0.54... | 0.78923166 | 0 |
Sets the value of the brojParcele property. | public void setBrojParcele(int value) {
this.brojParcele = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPodbrojParcele(int value) {\n this.podbrojParcele = value;\n }",
"public int getBrojParcele() {\n return brojParcele;\n }",
"public int getPodbrojParcele() {\n return podbrojParcele;\n }",
"public void setBloque(Integer bloque) {\r\n this.bloque = bloque;\r\n ... | [
"0.6819885",
"0.6275845",
"0.57648253",
"0.5449781",
"0.5373401",
"0.5203037",
"0.5140059",
"0.5042637",
"0.49758807",
"0.49612308",
"0.49069414",
"0.48974615",
"0.48892644",
"0.4835054",
"0.48339948",
"0.48259985",
"0.48076585",
"0.4763624",
"0.47614527",
"0.47513092",
"0.47... | 0.7294692 | 0 |
Gets the value of the podbrojParcele property. | public int getPodbrojParcele() {
return podbrojParcele;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getBrojParcele() {\n return brojParcele;\n }",
"public void setPodbrojParcele(int value) {\n this.podbrojParcele = value;\n }",
"public String getPar() {\n\t\treturn par;\n\t}",
"public static PVProperty getPVProperty() {\n return pvProperty;\n }",
"public Double ge... | [
"0.68101645",
"0.6471461",
"0.6280829",
"0.61860275",
"0.6176674",
"0.61522347",
"0.6045467",
"0.59688544",
"0.587417",
"0.58734757",
"0.58535016",
"0.58451116",
"0.5803257",
"0.5800279",
"0.5797219",
"0.57753694",
"0.5766427",
"0.5765164",
"0.57249206",
"0.5687095",
"0.56793... | 0.79749006 | 0 |
Sets the value of the podbrojParcele property. | public void setPodbrojParcele(int value) {
this.podbrojParcele = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getPodbrojParcele() {\n return podbrojParcele;\n }",
"public void setBrojParcele(int value) {\n this.brojParcele = value;\n }",
"public void setP(byte[] value) {\n this.p = ((byte[]) value);\n }",
"public void setPuntoDeVenta(PuntoDeVenta puntoDeVenta)\r\n/* 145: *... | [
"0.63940686",
"0.63689023",
"0.57645065",
"0.53771985",
"0.5360481",
"0.5340875",
"0.5309414",
"0.52679396",
"0.5236354",
"0.52313244",
"0.5154847",
"0.5141102",
"0.51395625",
"0.51254964",
"0.5121813",
"0.5121731",
"0.511994",
"0.51176935",
"0.50836986",
"0.5052103",
"0.5050... | 0.75881255 | 0 |
Gets the value of the zgrada property. | public int getZgrada() {
return zgrada;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getZhxgr() {\n return zhxgr;\n }",
"public String getz()\n\t{\n\t\treturn z.getText();\n\t}",
"public double getGz() {\n return mGz;\n }",
"public String getZpdz() {\n return zpdz;\n }",
"public Float getZbjg() {\n return zbjg;\n }",
"public java.lang... | [
"0.6522764",
"0.6420862",
"0.63959885",
"0.6256192",
"0.6247757",
"0.62026745",
"0.61299264",
"0.6090572",
"0.60821503",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.6071691",
"0.60076004"... | 0.71717787 | 0 |
Sets the value of the zgrada property. | public void setZgrada(int value) {
this.zgrada = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void zza() throws RemoteException {\n this.zzd.zzr.setConditionalUserProperty(this.zzc, this.zza);\n }",
"public void setZ(Double z);",
"public void setGz(final double gz) {\n mGz = gz;\n }",
"public void setZ ( boolean z ) {\n\n\tthis.z = z;\n }",
"public void setZ(int ... | [
"0.6294206",
"0.61817235",
"0.60831827",
"0.58828276",
"0.5739516",
"0.57148093",
"0.56622714",
"0.5602438",
"0.55867547",
"0.55787826",
"0.5564071",
"0.55465513",
"0.554513",
"0.55405086",
"0.5532444",
"0.5532444",
"0.55021155",
"0.5499925",
"0.5499431",
"0.5495448",
"0.5494... | 0.72754616 | 0 |
Employee Constructor with Person parameters | public Employee(String name, int id) {
super(name, id);
position = "None";
salary = 0.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Employee(String firstName, String lastName, Date birthDate, \n Date hireDate, Address Address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.birthDate = birthDate;\n this.hireDate = hireDate;\n this.Address = Address;\n }",
"public Employee(String first... | [
"0.7610967",
"0.7481617",
"0.7448992",
"0.74249035",
"0.74187183",
"0.74187183",
"0.7385433",
"0.7370613",
"0.7369812",
"0.73533994",
"0.735013",
"0.7336977",
"0.73233956",
"0.7306926",
"0.7296513",
"0.7284102",
"0.7268854",
"0.72522056",
"0.72478026",
"0.7225882",
"0.7191947... | 0.66272306 | 80 |
Employee Constructor with Person and Employee parameters | public Employee(String name, int id, String position, double salary) {
super(name, id);
this.position = position;
this.salary = salary;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Employee(String firstName, String lastName, Date birthDate, \n Date hireDate, Address Address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.birthDate = birthDate;\n this.hireDate = hireDate;\n this.Address = Address;\n }",
"public Employee(String first... | [
"0.7559133",
"0.74308264",
"0.73720866",
"0.73110485",
"0.73110485",
"0.7306622",
"0.7278242",
"0.7267658",
"0.7267257",
"0.7200354",
"0.71934575",
"0.7179861",
"0.71455956",
"0.7122851",
"0.71188366",
"0.71177524",
"0.7116348",
"0.7109426",
"0.7107451",
"0.7105997",
"0.70900... | 0.6779768 | 47 |
Method that gets the employee's position | public String getPosition() {
return position;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer getPosition();",
"public int getPosition();",
"public int PositionGet();",
"int getPosition();",
"public int getPosition(){\n return -1;\n }",
"public int getPos();",
"public int getPos();",
"public long getPosition();",
"public int getPosition()\n {\n return getI... | [
"0.70998746",
"0.7050263",
"0.691037",
"0.68996507",
"0.6895159",
"0.68704414",
"0.68704414",
"0.67921937",
"0.6767816",
"0.67360115",
"0.66687894",
"0.6643987",
"0.66249555",
"0.66249555",
"0.6611571",
"0.66113883",
"0.6565114",
"0.6565114",
"0.6565114",
"0.6558336",
"0.6547... | 0.612624 | 69 |
Method that sets the employee's position | public void setPosition(String position) {
this.position = position;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPosition(int position);",
"public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }",
"public void PositionSet(int position);",
"public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees... | [
"0.70111275",
"0.6923706",
"0.68801457",
"0.6771977",
"0.67671674",
"0.6734753",
"0.6723309",
"0.672136",
"0.67064613",
"0.67064613",
"0.6682586",
"0.6682051",
"0.6682051",
"0.6667097",
"0.6665763",
"0.66116875",
"0.65889615",
"0.6491119",
"0.6461172",
"0.64595777",
"0.644796... | 0.0 | -1 |
Method that gets the employee's salary | public double getSalary() {
return salary;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getSalary();",
"public void getSalary() {\n this.payDay(this.monthlyIncome);\n }",
"public double getSalary() {\r\n return salary;\r\n }",
"public double getSalary() {\r\n\t\treturn this.salary;\r\n\t}",
"@Override\r\n public double getSalary() {\r\n return salary;\r\n ... | [
"0.8076933",
"0.78663397",
"0.7711294",
"0.76989216",
"0.7603791",
"0.7598151",
"0.75970274",
"0.75792134",
"0.7565988",
"0.7565596",
"0.7565596",
"0.7529954",
"0.7480462",
"0.7459398",
"0.7439578",
"0.73838717",
"0.72855705",
"0.72624713",
"0.7224386",
"0.72238195",
"0.71729... | 0.7645484 | 6 |
Method that sets the employee's salary | public void setSalary(double salary) {
this.salary = salary;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSalary(double salary){\r\n this.salary = salary;\r\n }",
"public void setSalary(double salary) {\r\n this.salary = salary;\r\n }",
"public void setSalary(double sal) { //salary variable to assign a value\n\t\tsalary = sal;\n\t}",
"public void setSalary(double salary) {\r\n\t\tth... | [
"0.79924804",
"0.78892696",
"0.7763322",
"0.7691023",
"0.74867755",
"0.74760365",
"0.7471513",
"0.7466277",
"0.7101825",
"0.70235735",
"0.7022807",
"0.70017576",
"0.699035",
"0.69631106",
"0.6864626",
"0.68085855",
"0.67036396",
"0.6632103",
"0.66046184",
"0.6580351",
"0.6541... | 0.78516793 | 3 |
print method (Person) override | @Override
public String toString(){
return super.toString() + "\tPosition: " + this.position + "\tSalary: $" + this.salary;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void print() {\n System.out.println(\"Person of name \" + name);\n }",
"@Override\n\t\tpublic void print() {\n\n\t\t}",
"@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}",
"... | [
"0.82561135",
"0.78996265",
"0.789445",
"0.78448445",
"0.7821827",
"0.7738622",
"0.770125",
"0.7673234",
"0.76687616",
"0.7665232",
"0.76466763",
"0.7633503",
"0.75953376",
"0.7585073",
"0.7509861",
"0.7475535",
"0.7459539",
"0.7453431",
"0.74436754",
"0.74283886",
"0.7393855... | 0.0 | -1 |
on click method of the add button | public void add(View v) {
int type = tabHost.getCurrentTab() + 1;
Intent i = new Intent(this, AddActivity.class);
i.putExtra("type", type);
startActivityForResult(i, MainActivity.REQUEST_ADD);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onAddClicked();",
"void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }",
"void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }",
"@Override\n public void onClick(View v) {\n buttonAddClicked();\n }",
"pub... | [
"0.84543073",
"0.82870233",
"0.8076165",
"0.8010345",
"0.7754691",
"0.7504662",
"0.74808496",
"0.7347024",
"0.72697407",
"0.7260889",
"0.72478455",
"0.7238043",
"0.7235461",
"0.7224857",
"0.7209372",
"0.7167023",
"0.71544456",
"0.7153457",
"0.7119229",
"0.7059478",
"0.7030297... | 0.0 | -1 |
Create a directory locator that uses the current directory | public DirectoryFileLocator() {
this(System.getProperty("user.dir"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DirectoryFileLocator(File dir) {\r\n directory = dir;\r\n }",
"FsPath baseDir();",
"public DirectoryFileLocator(String dirname) {\r\n this(new File(dirname));\r\n }",
"public static void dir(String currentPath){}",
"Object getDir();",
"public String getDir();",
"String getDir();",
"pub... | [
"0.66764903",
"0.6489526",
"0.64067674",
"0.64029175",
"0.6114928",
"0.59107137",
"0.5885763",
"0.58139664",
"0.5743384",
"0.5734639",
"0.57192355",
"0.5636622",
"0.5619015",
"0.5618105",
"0.5586068",
"0.556664",
"0.556589",
"0.5558707",
"0.5555199",
"0.5545988",
"0.55421597"... | 0.71860987 | 0 |
Create a directory file locator using the given name for the directory. | public DirectoryFileLocator(String dirname) {
this(new File(dirname));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DirectoryFileLocator(File dir) {\r\n directory = dir;\r\n }",
"Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }",
"private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile p... | [
"0.6509946",
"0.6092031",
"0.591051",
"0.5871891",
"0.5860667",
"0.58133453",
"0.5798775",
"0.5785774",
"0.57584125",
"0.57525104",
"0.57429224",
"0.550607",
"0.544558",
"0.543813",
"0.5427826",
"0.54028875",
"0.5401403",
"0.5391341",
"0.5355901",
"0.53341055",
"0.52601683",
... | 0.6665321 | 0 |
Create a directory file locator that will find files in the given directory | public DirectoryFileLocator(File dir) {
directory = dir;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DirectoryFileLocator(String dirname) {\r\n this(new File(dirname));\r\n }",
"public DirectoryFileLocator() {\r\n this(System.getProperty(\"user.dir\"));\r\n }",
"AntiIterator<FsPath> listFilesAndDirectories(FsPath dir);",
"@Override\n public List<GEMFile> getLocalFiles(String directory) {\n ... | [
"0.6685968",
"0.6461292",
"0.6386068",
"0.6143555",
"0.61321604",
"0.5874465",
"0.5852877",
"0.5837734",
"0.57352173",
"0.57337636",
"0.5687831",
"0.56669486",
"0.5662561",
"0.5610669",
"0.55306965",
"0.55244106",
"0.55213934",
"0.55118275",
"0.5472971",
"0.54563564",
"0.5419... | 0.70540917 | 0 |
Build up the directory structure if it does not already exist; set this as the new directory file locator | public void setAndCreateDirPath(String dirname) {
File newPath = new File(dirname);
if(!newPath.isDirectory()) {
newPath.mkdirs();
}
directory = newPath;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadDirectoryUp() {\n\t\tString s = pathDirsList.remove(pathDirsList.size() - 1);\n\t\t// path modified to exclude present directory\n\t\tpath = new File(path.toString().substring(0,\n\t\t\t\tpath.toString().lastIndexOf(s)));\n\t\tfileList.clear();\n\t}",
"private DirectoryObjects getDirectory(Strin... | [
"0.6230747",
"0.6166538",
"0.6077308",
"0.59897155",
"0.59341615",
"0.59198534",
"0.5867034",
"0.58595365",
"0.58496076",
"0.5809457",
"0.5805616",
"0.5793282",
"0.5793019",
"0.578083",
"0.57772285",
"0.5749603",
"0.57484674",
"0.5738078",
"0.56564903",
"0.56508136",
"0.56461... | 0.5853742 | 8 |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
System.out.println("am in Validate click");
String u=user.getText();
String p=pwd.getText();
if(u.equals("seed")&&p.equals("infotech"))
{
System.out.println("You are a Valid user");
}
else
System.out.println("You are a InValid user");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
user.setText("");
pwd.setText("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
FirstUserApp obj=new FirstUserApp();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Created by tanghongfeng on 2019/1/25 | public interface RouterDemoCommand {
// Ui command begin
String goDemoHomeActivity = "goDemoHomeActivity";
// Ui command end
// Data command begin
// Data command end
// Op command begin
// Op command end
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"p... | [
"0.5716367",
"0.5573347",
"0.55381525",
"0.55212927",
"0.5468445",
"0.5468445",
"0.54169995",
"0.5400206",
"0.53596157",
"0.5345246",
"0.53319156",
"0.53294677",
"0.5308101",
"0.5277917",
"0.5266717",
"0.52446246",
"0.5220941",
"0.5202814",
"0.51803255",
"0.5176987",
"0.51687... | 0.0 | -1 |
Find order item seq id string. | protected String findOrderItemSeqId(String productId, String orderId, String shipGroupSeqId, BigDecimal quantity, Locale locale)
throws GeneralException {
Map<String, Object> orderItemLookupMap = new HashMap<>();
orderItemLookupMap.put("orderId", orderId);
orderItemLookupMap.put("productId", productId);
orderItemLookupMap.put("statusId", "ITEM_APPROVED");
orderItemLookupMap.put("shipGroupSeqId", shipGroupSeqId);
List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItemAndShipGroupAssoc", orderItemLookupMap, null, false);
String orderItemSeqId = null;
if (orderItems != null) {
for (GenericValue orderItem : orderItems) {
// get the reservations for the item
Map<String, Object> inventoryLookupMap = new HashMap<>();
inventoryLookupMap.put("orderId", orderId);
inventoryLookupMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId"));
inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId);
List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", inventoryLookupMap, null, false);
for (GenericValue reservation : reservations) {
BigDecimal qty = reservation.getBigDecimal("quantity");
if (quantity.compareTo(qty) <= 0) {
orderItemSeqId = orderItem.getString("orderItemSeqId");
break;
}
}
}
}
if (orderItemSeqId != null) {
return orderItemSeqId;
} else {
throw new GeneralException(UtilProperties.getMessage("ProductErrorUiLabels",
"ProductErrorNoValidOrderItemFoundForProductWithEnteredQuantity",
UtilMisc.toMap("productId", productId, "quantity", quantity), locale));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getAcctgTransEntrySeqId();",
"public String getSequenceId() {\n return this.placement.getSeqId();\n }",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"public String getQcIdseq() {\n ... | [
"0.68019825",
"0.6557914",
"0.652803",
"0.652803",
"0.652803",
"0.652803",
"0.652803",
"0.652803",
"0.652803",
"0.64535236",
"0.6410033",
"0.6399824",
"0.6384735",
"0.63613755",
"0.6352325",
"0.6352325",
"0.6335293",
"0.62663186",
"0.6196408",
"0.61712694",
"0.61683744",
"0... | 0.63330066 | 17 |
Check row for add int. | protected int checkRowForAdd(GenericValue reservation, String orderId, String orderItemSeqId, String shipGroupSeqId, String productId,
BigDecimal quantity) {
// check to see if the reservation can hold the requested quantity amount
String inventoryItemId = reservation.getString("inventoryItemId");
BigDecimal resQty = reservation.getBigDecimal("quantity");
VerifyPickSessionRow pickRow = this.getPickRow(orderId, orderItemSeqId, shipGroupSeqId, productId, inventoryItemId);
if (pickRow == null) {
if (resQty.compareTo(quantity) < 0) {
return 0;
} else {
return 2;
}
} else {
BigDecimal newQty = pickRow.getReadyToVerifyQty().add(quantity);
if (resQty.compareTo(newQty) < 0) {
return 0;
} else {
pickRow.setReadyToVerifyQty(newQty);
return 1;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean canAddRow()\n {\n\t \treturn getAccessBit(0);\n }",
"public int addRow() {\n\t\t// Create a new row with nothing in it\n\t\tList row = new ArrayList();\n\t\treturn(addRow(row));\n\t}",
"int addRow(RowData row_data) throws IOException;",
"public boolean add(IntSet add){\n\t\tif(contains(add)... | [
"0.6262331",
"0.62028",
"0.6074117",
"0.6054997",
"0.5951152",
"0.5833963",
"0.57697755",
"0.5758936",
"0.57324326",
"0.5720267",
"0.57118034",
"0.56965977",
"0.569401",
"0.5678975",
"0.56745297",
"0.56440187",
"0.5643461",
"0.56164044",
"0.5600743",
"0.5589665",
"0.5585518",... | 0.6298181 | 0 |
Create verify pick row. | protected void createVerifyPickRow(int checkCode, GenericValue res, String orderId, String orderItemSeqId, String shipGroupSeqId,
String productId, String originGeoId, BigDecimal quantity, Locale locale) throws GeneralException {
// process the result; add new item if necessary
switch (checkCode) {
case 0:
// not enough reserved
throw new GeneralException(UtilProperties.getMessage("ProductErrorUiLabels",
"ProductErrorNotEnoughInventoryReservationAvailableCannotVerifyTheItem", locale));
case 1:
// we're all good to go; quantity already updated
break;
case 2:
// need to create a new item
String inventoryItemId = res.getString("inventoryItemId");
pickRows.add(new VerifyPickSessionRow(orderId, orderItemSeqId, shipGroupSeqId, productId, originGeoId, inventoryItemId, quantity));
break;
default:
// if a wrong checkCode is given
Debug.logError("There was a wrong checkCode given in the method createVerifyPickRow: " + checkCode, MODULE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void test_ROWID_insert_select() {\r\n // ## Arrange ##\r\n VendorCheck vendorCheck = new VendorCheck();\r\n vendorCheck.setVendorCheckId(99999L);\r\n vendorCheck.setTypeOfRowid(\"123456789012345678\");\r\n\r\n // ## Act ##\r\n try {\r\n vendorCheckBhv.ins... | [
"0.6158885",
"0.60101414",
"0.55763984",
"0.5445149",
"0.5439021",
"0.5271565",
"0.5230846",
"0.5229476",
"0.51351106",
"0.51171654",
"0.5089591",
"0.505966",
"0.49612445",
"0.49556375",
"0.49283418",
"0.4922772",
"0.491116",
"0.48922518",
"0.48904476",
"0.48564154",
"0.48342... | 0.652498 | 0 |
Sets picklist bin id. | public void setPicklistBinId(String setPicklistBinId) {
this.picklistBinId = setPicklistBinId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPicklistBinId() {\n return this.picklistBinId;\n }",
"private void setBId(int value) {\n \n bId_ = value;\n }",
"public void setBin(java.lang.String bin) {\r\n this.bin = bin;\r\n }",
"public void setIdBoleta(int value) {\n this.idBoleta = value;... | [
"0.6923926",
"0.6294242",
"0.60410935",
"0.5929199",
"0.59234375",
"0.58880985",
"0.5665552",
"0.56466323",
"0.5557099",
"0.54766804",
"0.5411283",
"0.53301543",
"0.53035235",
"0.52855027",
"0.526557",
"0.52088076",
"0.5202808",
"0.5202808",
"0.5202808",
"0.5202766",
"0.51656... | 0.7830125 | 0 |
Gets picklist bin id. | public String getPicklistBinId() {
return this.picklistBinId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPicklistBinId(String setPicklistBinId) {\n this.picklistBinId = setPicklistBinId;\n }",
"public int getCurrentBinNum() {\n return currentBinNum;\n }",
"public java.lang.String getBin() {\r\n return bin;\r\n }",
"public String toString() { \n\treturn _binNum;\n ... | [
"0.65455484",
"0.6275782",
"0.6172645",
"0.59908676",
"0.5988029",
"0.5854779",
"0.58517444",
"0.5843533",
"0.57984674",
"0.5724841",
"0.5687957",
"0.5660441",
"0.5605266",
"0.55664414",
"0.54946184",
"0.5488776",
"0.5464983",
"0.54218656",
"0.5419737",
"0.5418557",
"0.539515... | 0.8405099 | 0 |
Gets ready to verify quantity. | public BigDecimal getReadyToVerifyQuantity(String orderId, String orderSeqId) throws GeneralException {
BigDecimal readyToVerifyQty = BigDecimal.ZERO;
for (VerifyPickSessionRow line: this.getPickRows()) {
if ((orderId.equals(line.getOrderId())) && (orderSeqId.equals(line.getOrderItemSeqId()))) {
readyToVerifyQty = readyToVerifyQty.add(line.getReadyToVerifyQty());
}
}
return readyToVerifyQty;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desi... | [
"0.71420795",
"0.69919443",
"0.69919443",
"0.6936183",
"0.69342345",
"0.68399715",
"0.68399715",
"0.67747706",
"0.67747706",
"0.6746495",
"0.67433107",
"0.6735858",
"0.6708426",
"0.66771036",
"0.6671509",
"0.6669168",
"0.66543454",
"0.6644501",
"0.66396564",
"0.66396564",
"0.... | 0.67551816 | 9 |
Issue items to shipment. | protected void issueItemsToShipment(String shipmentId, Locale locale) throws GeneralException {
List<VerifyPickSessionRow> processedRows = new LinkedList<>();
for (VerifyPickSessionRow pickRow : this.getPickRows()) {
if (this.checkLine(processedRows, pickRow)) {
BigDecimal totalVerifiedQty = this.getVerifiedQuantity(pickRow.getOrderId(), pickRow.getOrderItemSeqId(),
pickRow.getShipGroupSeqId(), pickRow.getProductId(), pickRow.getInventoryItemId());
pickRow.issueItemToShipment(shipmentId, picklistBinId, userLogin, totalVerifiedQty, getDispatcher(), locale);
processedRows.add(pickRow);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void execute() {\n\t\tif(p.getType().equals(\"Manufacturing\")) {\n\t\t\tArrayList<Item> items = DatabaseSupport.getItems();\n\t\t\tIterator<Item> it = items.iterator();\n\t\t\tItem i;\n\t\t\twhile(it.hasNext()) {\n\t\t\t\ti = it.next();\n\t\t\t\tint a = InputController.promptInteger(\"How many \"+i.getName... | [
"0.671557",
"0.6140334",
"0.5919085",
"0.59075236",
"0.588664",
"0.5873801",
"0.581789",
"0.5816146",
"0.5804901",
"0.5804858",
"0.5798083",
"0.573303",
"0.5701309",
"0.56688803",
"0.565308",
"0.55919343",
"0.55902165",
"0.55580634",
"0.55554676",
"0.5501444",
"0.548161",
"... | 0.69016755 | 0 |
connects to the input host on the port This function opens the socket and creates the input and output streams used for communication. | public void connect(String host, int port) throws IOException {
this.host = host;
/**
* Open my socket to the specified host at the default port.
*/
socket = new Socket(host, port);
/**
* Create the output stream.
*/
ostream = new BufferedOutputStream(socket.getOutputStream());
/**
* Create the input stream.
*/
istream = new BufferedInputStream(socket.getInputStream());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void openSocket(String host, int port) throws IOException {\n \t\t// Debug - attempting connection\n \n \t\tclientSocket = new Socket(InetAddress.getByName(host), port);\n \n \t\toutput = new BufferedWriter(new OutputStreamWriter(\n \t\t\t\tclientSocket.getOutputStream()));\n \t\toutput.flush();\n \n \t\tf... | [
"0.73331374",
"0.6712215",
"0.6640216",
"0.6637713",
"0.65257263",
"0.64809996",
"0.64349735",
"0.6421416",
"0.6389756",
"0.63764054",
"0.63661236",
"0.63535553",
"0.6314135",
"0.63123137",
"0.6311126",
"0.63111115",
"0.6293679",
"0.629303",
"0.6271334",
"0.6240605",
"0.62189... | 0.6533063 | 4 |
process the input GET request. | public void processGetRequest(String request, boolean keepAlive) throws IOException {
/**
* Send the request to the server.
*/
request += CRLF;
request += "Host: " + this.host + CRLF;
request += "User-Agent: MyClient-1.0" + CRLF;
request += "Accept-Encoding: ISO-8859-1" + CRLF;
if (keepAlive) {
request += "Connection: keep-alive" + CRLF + CRLF;
} else {
request += "Connection: close" + CRLF + CRLF;
}
byte[] buffer = request.getBytes(ENCODING);
ostream.write(buffer, 0, request.length());
ostream.flush();
/**
* waiting for the response.
*/
processResponse("GET");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpS... | [
"0.6368719",
"0.63307965",
"0.63238126",
"0.6318615",
"0.6318615",
"0.62982315",
"0.6297077",
"0.62848616",
"0.62848616",
"0.6266144",
"0.6264388",
"0.62455547",
"0.62455547",
"0.62455547",
"0.62455547",
"0.62455547",
"0.62455547",
"0.62455547",
"0.62455547",
"0.62455547",
"0... | 0.0 | -1 |
process the input PUT request. | public void processPutRequest(String request) throws IOException {
String[] tokens = request.split("\\s+");
if (tokens.length != 3) {
System.out.println("Incorrect Request");
close();
} else {
String fileName = tokens[1];
String version = tokens[2];
if (version.equals("HTTP/1.0") || version.equals("HTTP/1.1")) {
String filePath = "C:\\Users\\admin\\Desktop\\socket" + fileName.replaceAll("/", "\\\\");
// The path of file that client put
File file = new File(filePath);
if (file.exists()) {
// Send the response
StringBuilder putMessage = new StringBuilder();
putMessage.append(request);
putMessage.append(CRLF);
putMessage.append("User-Agent: MyClient-1.0" + CRLF);
putMessage.append("Accept-Encoding: ISO-8859-1" + CRLF);
putMessage.append(
"Content-Type: " + URLConnection.getFileNameMap().getContentTypeFor(fileName) + CRLF);
putMessage.append("Content-Length: " + file.length() + CRLF);
putMessage.append("Connection: close" + CRLF);
putMessage.append(CRLF);
// Send to server
String message = putMessage + "";
byte[] buffer = message.getBytes(ENCODING);
ostream.write(buffer, 0, message.length());
ostream.flush();
System.out.println(message);
// Read file and send it to server
byte[] sendData = Files.readAllBytes(file.toPath());
ostream.write(sendData);
ostream.flush();
} else {
System.out.println("File does not exist");
close();
}
} else {
System.out.println("Bad Request");
close();
}
}
processResponse("PUT");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public DataObjectResponse<T> handlePUT(DataObjectRequest<T> request)\n {\n return handlePUT(request, null);\n }",
"@Override\n public final void doPut() {\n try {\n checkPermissions(getRequest());\n if (id == null) {\n throw new APIMissin... | [
"0.6821928",
"0.66279536",
"0.6372696",
"0.6292809",
"0.6180423",
"0.6082985",
"0.60777175",
"0.6065581",
"0.6009556",
"0.5968",
"0.59607756",
"0.593747",
"0.5919755",
"0.57521576",
"0.5717384",
"0.5640511",
"0.5561619",
"0.5554704",
"0.5492773",
"0.54210097",
"0.5409432",
... | 0.62496483 | 4 |
process the server response. | public void processResponse(String requestType) throws IOException {
int last = 0, c = 0;
/**
* Process the header and add it to the header StringBuffer.
*/
boolean inHeader = true; // loop control
while (inHeader && ((c = istream.read()) != -1)) {
switch (c) {
case '\r':
break;
case '\n':
if (c == last) {
inHeader = false;
break;
}
last = c;
header.append("\r\n");
break;
default:
last = c;
header.append((char) c);
}
}
header.append(CRLF);
if (requestType.equals("GET")) {
/**
* Read the contents and add it to the response StringBuffer.
*/
String[] tokens = getHeader().split("\\s+");
statusCode = tokens[1];
int fileLength = 0;
for (int i = 0; i < tokens.length; i++) {
if (tokens[i].equals("Content-Length:")) {
fileLength = Integer.parseInt(tokens[i + 1]);
// Get the length of file
break;
}
}
content = new StringBuilder(fileLength + 1);
int revBytes = 0;
int len = 0;
byte[] buffer = new byte[BUFFER_SIZE];
while ((len = istream.read(buffer, 0, BUFFER_SIZE)) > 0) {
// Get the data of the specified length from server
revBytes += len;
content.append(new String(buffer, 0, len, ENCODING));
if (revBytes >= fileLength) {
break;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"static void processResponse(CTPResponse response)\n {\n \tfor(int i=0;i<response.GetNumResponses();i++)\n \t{\n \t\tint type = response.getReponseType(i);\n \t... | [
"0.77462703",
"0.7442457",
"0.70325756",
"0.69991916",
"0.67997766",
"0.6784853",
"0.6784853",
"0.67482525",
"0.6707344",
"0.66991955",
"0.6686344",
"0.66521025",
"0.66191703",
"0.65536535",
"0.64822876",
"0.6468417",
"0.64632064",
"0.64390844",
"0.6431603",
"0.6398861",
"0.6... | 0.0 | -1 |
Get the response header. | public String getHeader() {
return header.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getResponseHeader();",
"protected ResponseHeader getHeader() {\n return this.header;\n }",
"public String getResponseHeader(String key)\n\t{\n\t\treturn this.responseHeader.getOrDefault(key, \"\");\n\t}",
"public String getHeader() {\n\t\treturn _header;\n\t}",
"public String getHeader();",
"c... | [
"0.83849126",
"0.7799251",
"0.7625009",
"0.7261051",
"0.72444254",
"0.7219471",
"0.7171782",
"0.71661186",
"0.7116562",
"0.7083749",
"0.7083749",
"0.6927241",
"0.6850539",
"0.68414116",
"0.68217885",
"0.6771051",
"0.67241514",
"0.66351163",
"0.6630507",
"0.6613056",
"0.660093... | 0.7304029 | 3 |
Get the server's response. | public String getContent() {
return content.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getResponse()\r\n {\r\n return this.response;\r\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String g... | [
"0.77034575",
"0.75666577",
"0.75666577",
"0.75666577",
"0.75666577",
"0.75666577",
"0.7503392",
"0.7489375",
"0.74483234",
"0.7331623",
"0.7305273",
"0.72979635",
"0.7266204",
"0.72295994",
"0.72043735",
"0.7179178",
"0.71753347",
"0.7171079",
"0.71618366",
"0.7122396",
"0.7... | 0.0 | -1 |
Get the status code of response | public String getStatusCode() {
return statusCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getStatusCode();",
"int getStatusCode();",
"int getStatusCode( );",
"public int getStatusCode() {\n\t\treturn response.getStatusLine().getStatusCode();\n\t}",
"public static Integer getStatusCode() {\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n return r... | [
"0.8607685",
"0.8607685",
"0.8521032",
"0.82434976",
"0.8207382",
"0.8195296",
"0.81531644",
"0.79526967",
"0.7933901",
"0.78486",
"0.78120136",
"0.78120136",
"0.78120136",
"0.78120136",
"0.7790305",
"0.77900815",
"0.77900815",
"0.77900815",
"0.77870506",
"0.7784939",
"0.7706... | 0.70582247 | 53 |
Clear the header of response. | public void clearHeader() {
header.setLength(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearHeader() {\n this.headers.clear();\n }",
"public void clear()\r\n/* 416: */ {\r\n/* 417:580 */ this.headers.clear();\r\n/* 418: */ }",
"public void clear() {\n this.responseHeaders.clear();\n this.markupHeaders.clear();\n this.cookies.clear();\n ... | [
"0.82803506",
"0.7736696",
"0.7654064",
"0.73474044",
"0.73249483",
"0.72105217",
"0.7002138",
"0.7002138",
"0.6819378",
"0.67231137",
"0.6583547",
"0.65739095",
"0.65397847",
"0.64715797",
"0.64493394",
"0.6438905",
"0.6399076",
"0.63825524",
"0.6360965",
"0.6336951",
"0.632... | 0.785954 | 1 |
Clear the content of response. | public void clearContent() {
content.setLength(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void clearResponse() { response_ = null;\n \n }",
"private void clearResponse() { response_ = null;\n \n }",
"public void reset() {\n this.response.reset();\n }",
"public void clear() {\n this.responseHeaders.clear();\n this.markupHeaders.clear();\n th... | [
"0.8093707",
"0.8093707",
"0.7915162",
"0.7839716",
"0.7610518",
"0.7600611",
"0.75140595",
"0.75140595",
"0.75140595",
"0.75140595",
"0.74491155",
"0.73885024",
"0.73208946",
"0.730703",
"0.72318536",
"0.72129977",
"0.7164255",
"0.70658267",
"0.70316666",
"0.70189214",
"0.70... | 0.7380924 | 12 |
Close all open connections sockets and streams. | public void close() throws IOException {
istream.close();
ostream.close();
socket.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final private void closeAll() throws IOException {\n // This method is final since version 2.2\n\n try {\n // Close the socket\n if (clientSocket != null)\n clientSocket.close();\n\n // Close the output stream\n if (output != null)\n output.close();\n\n // Close the inp... | [
"0.8121939",
"0.78364766",
"0.77910125",
"0.7771895",
"0.77160805",
"0.7678433",
"0.7646306",
"0.75822884",
"0.75822884",
"0.7470734",
"0.7408228",
"0.73762727",
"0.7346471",
"0.7249202",
"0.72347707",
"0.7197413",
"0.71369064",
"0.7127903",
"0.7119544",
"0.7110606",
"0.71026... | 0.6753882 | 37 |
Create a space to print out values in a list | public String toString() {
System.out.println("Inventory: ");
String str = "";
for(int i = 0; i < numItems; i++) {
if(inventory[i]!= null) {
str += inventory[i].toString() + "\n";
}
}
return str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}",
"public void printSpace(){\n\t\tSystem.out.println(\"Cu... | [
"0.7259757",
"0.6909835",
"0.68353695",
"0.6834659",
"0.68250144",
"0.6751267",
"0.6734045",
"0.67316496",
"0.6712588",
"0.66786754",
"0.6665498",
"0.6650279",
"0.65795285",
"0.6578112",
"0.6551188",
"0.651711",
"0.6504675",
"0.6503314",
"0.65000165",
"0.64996326",
"0.6497459... | 0.0 | -1 |
Check if a code already exist and would return a number where it equals that value | public int alreadyExists(FoodItem item){
for(int i = 0; i < numItems; i++) {
if(inventory[i]!= null) {
if(item.isEqual(inventory[i])){
return i;
}
}
}
return -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int findAvailableNo() {\n\t\t//TODO: Maybe add a check that a number doesn't already exist even though it is almost impossible\n\t\tboolean notfound = true;\n\t\tint number = 0;\n\t\tnumber = RANDOM_NUMBER.nextInt(Integer.MAX_VALUE);\n\t\t\n\t\treturn number;\n\t}",
"Integer getCode();",
"public int fi... | [
"0.64549387",
"0.63622016",
"0.6329273",
"0.6269813",
"0.6171837",
"0.5984659",
"0.59445876",
"0.59264505",
"0.58629006",
"0.5855376",
"0.5855376",
"0.5855376",
"0.5838003",
"0.5838003",
"0.5838003",
"0.58229345",
"0.58148503",
"0.5810681",
"0.5758352",
"0.5693899",
"0.567961... | 0.0 | -1 |
Ask you what item you would like to add and check if it already exist or not | public boolean addItem(Scanner scanner){
String input;
for(int i = 0; i < numItems; i++) {
if(inventory[i] == null){
do {
System.out.print("Do you wish to add a fruit(f), vegetable(v) or a preserve(p)? ");
input = scanner.next();
if (input.equals("f")) {
Fruit fruit = new Fruit();
fruit.inputCode(scanner);
int var = alreadyExists(fruit);
if(var != -1) {
System.out.println("Item code already exists");
return false;
}
fruit.addItem(scanner);
inventory[i]=fruit;
} else if (input.equals("v")) {
Vegetable vegetable = new Vegetable();
vegetable.inputCode(scanner);
int var = alreadyExists(vegetable);
if(var != -1) {
System.out.println("Item code already exists");
return false;
}
vegetable.addItem(scanner);
inventory[i]=vegetable;
} else if (input.equals("p")) {
Preserve preserve = new Preserve();
preserve.inputCode(scanner);
int var = alreadyExists(preserve);
if(var != -1) {
System.out.println("Item code already exists");
return false;
}
preserve.addItem(scanner);
inventory[i]=preserve;
} else {
System.out.println("Invalid entry");
}
}while(!input.equals("f") && !input.equals("v") && !input.equals("p"));
break;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void add(Item item);",
"public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n ... | [
"0.6901098",
"0.68359995",
"0.679696",
"0.6768823",
"0.66375643",
"0.6594416",
"0.65848255",
"0.65568435",
"0.6488558",
"0.6480905",
"0.6402775",
"0.6395803",
"0.63805985",
"0.6368007",
"0.63234067",
"0.6321786",
"0.63200176",
"0.63148576",
"0.6306339",
"0.63033783",
"0.62988... | 0.6739726 | 4 |
ask you if you would like to Buy/Sell and item and if you do how much do you need | public boolean updateQuantity(Scanner scanner, boolean buyOrSell){
if(inventory[0]==null){
System.out.println("Error...could not buy item");
return false;
}
FoodItem foodItem = new FoodItem();
boolean valid = false;
int sellQuantity = 0;
foodItem.inputCode(scanner);
int var = alreadyExists(foodItem);
System.out.println(var);
if(buyOrSell){
if(var == -1) {
System.out.println("Error...could not buy item");
return false;
}
} else{
if(var == -1) {
System.out.println("Error...could not sell item");
return false;
}
}
do{
try {
if(buyOrSell){
System.out.print("Enter valid quantity to buy: ");
}else{
System.out.print("Enter valid quantity to sell: ");
}
sellQuantity = scanner.nextInt();
System.out.println(sellQuantity);
valid = true;
} catch (InputMismatchException e) {
System.out.println("Invalid entry");
scanner.next();
}
}while(!valid);
if(buyOrSell){
if(sellQuantity > inventory[var].itemQuantityInStock){
System.out.println("Error...could not buy item");
return false;
}else {
inventory[var].updateItem(sellQuantity);
}
}else{
if(sellQuantity > inventory[var].itemQuantityInStock){
System.out.println("Error...could not sell item");
return false;
}else{
inventory[var].updateItem(-sellQuantity);
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void buyItem(ShopItem item) {\n int gold = world.getCharacter().getGold().get();\n if (world.isSurvivalMode() && item.getName().equals(\"Potion\")){\n this.potionNum = 0;\n System.out.println(\"This shop has 0 Potion left.\");\n }\n if (world.isBerserkerMod... | [
"0.6761042",
"0.6723212",
"0.6721605",
"0.6681802",
"0.66560507",
"0.6651673",
"0.66503805",
"0.6607354",
"0.6579842",
"0.6567778",
"0.65437686",
"0.650938",
"0.6489924",
"0.64845794",
"0.64775825",
"0.64545345",
"0.6439126",
"0.6421909",
"0.6419687",
"0.638009",
"0.6344381",... | 0.59769416 | 66 |
set user profile picture | public void setProfilePic(ParseFile image) {
put(KEY_IMAGE, image);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setProfilePic() {\n ParseFile image = (ParseFile) user.get(User.KEY_PROFILE_PIC);\n\n if (image != null)\n Glide.with(getContext()).load(image.getUrl()).circleCrop().into(mProfilePicImageView);\n else\n Glide.with(getContext()).load(R.drawable.no_profile_pic)... | [
"0.81461835",
"0.7999672",
"0.77757215",
"0.75307566",
"0.7510623",
"0.75021976",
"0.7390068",
"0.73678297",
"0.72514284",
"0.7241725",
"0.7214851",
"0.720932",
"0.71673244",
"0.71488965",
"0.70808005",
"0.7061246",
"0.70345944",
"0.7001817",
"0.69947666",
"0.6981629",
"0.695... | 0.7325363 | 8 |
get user profile picture | public ParseFile getProfilePicture() {
return getParseFile(KEY_IMAGE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getProfileImage();",
"public String getUserProfileImg() {\n return userProfileImg;\n }",
"byte[] getProfileImage();",
"private void getUserProfileImage() {\n if (!StringEmptyUtil.isEmptyString(sharedPrefManager.getImageUrl())) {\n Glide.wit... | [
"0.84098196",
"0.8081066",
"0.79331875",
"0.7877039",
"0.7584943",
"0.7542304",
"0.7530653",
"0.746529",
"0.7364153",
"0.7345752",
"0.7330744",
"0.732588",
"0.7305926",
"0.7286029",
"0.71994334",
"0.7190583",
"0.7148716",
"0.71207565",
"0.7088948",
"0.70725507",
"0.7008018",
... | 0.79446703 | 2 |
constructor for class Animal | public Animal(String name) {
this.animalName = name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Animal() {\t\r\n\t}",
"public Animal() {\n\t\tSystem.out.println(\"Animal constructor called\");\n\t}",
"public void constructor() {\n setEdibleAnimals();\n }",
"public Animal(){\n System.out.println(\"An animal has been created...\");\n }",
"public Animal(int age){\n t... | [
"0.8496873",
"0.8225382",
"0.78092605",
"0.78041637",
"0.77267885",
"0.7726236",
"0.7649582",
"0.756682",
"0.72131157",
"0.68909186",
"0.6833525",
"0.68273175",
"0.67910284",
"0.6781117",
"0.6770902",
"0.6750493",
"0.6697285",
"0.6694853",
"0.6622388",
"0.6583002",
"0.6526460... | 0.80203193 | 2 |
method that returns the name of the animal | public String getName() {
return this.animalName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tString getName(){\n\t\treturn animalName;\n\t}",
"public String getAnimalName() {\n if (animal == null) {\n String msg = \"Name is null\";\n return msg;\n } else {\n return animal.getName();\n }\n }",
"public java.lang.String getAnimalName()... | [
"0.87487954",
"0.8261055",
"0.7829977",
"0.7446642",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
"0.7394676",
... | 0.86029476 | 1 |
method that prints out that the animal eats | public void eat(){
System.out.println(this.animalName + " eats");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void eat() {\n\t\tSystem.out.println(this.name + \" the \" + this.type + \" ate their rabbit meat.\");\n\t}",
"public void showAnimalInfo(Player p, Entity e){\r\n\tif(this.checkifHasOwner(e.getUniqueId().toString())){\r\n\t\tAnimals a = new Animals(plugin, e.getUniqueId().toString(), p.getUniqueId().toSt... | [
"0.75002146",
"0.72770995",
"0.7196593",
"0.7133724",
"0.7123299",
"0.709973",
"0.7083734",
"0.7039352",
"0.6983205",
"0.6926254",
"0.68802905",
"0.68458176",
"0.68216294",
"0.6808293",
"0.6785756",
"0.67767364",
"0.67477936",
"0.6728577",
"0.6723819",
"0.66850114",
"0.668466... | 0.8304625 | 0 |
method that prints out that the animal sleeps | public void sleep() {
System.out.println(this.animalName + " sleeps");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sleep(){\n System.out.println(\"Human Sleeps\");\n }",
"protected void sleep() {\n\t\tSystem.out.println(\"human sleep\");\n\t}",
"public void sleep(){\n\n System.out.println(\"ZZZZZZZZZ bubble bubble bubble\");\n }",
"private void sleep() {\n\t\tSystem.out.println(\"Ape sleeping... | [
"0.80866444",
"0.78155196",
"0.78120375",
"0.7773655",
"0.74956083",
"0.73150635",
"0.70138323",
"0.6926515",
"0.6850611",
"0.6846137",
"0.6829687",
"0.6806028",
"0.67406857",
"0.67265236",
"0.6725789",
"0.672258",
"0.670825",
"0.66784585",
"0.6659901",
"0.6659901",
"0.665624... | 0.8965789 | 0 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_merah);
TampilGambar.startAnimation(animScale);
suara1.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_kuning);
TampilGambar.startAnimation(animScale);
suara2.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_hijau);
TampilGambar.startAnimation(animScale);
suara3.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_biru);
TampilGambar.startAnimation(animScale);
suara4.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_nila);
TampilGambar.startAnimation(animScale);
suara5.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_pink);
TampilGambar.startAnimation(animScale);
suara6.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_ungu);
TampilGambar.startAnimation(animScale);
suara7.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_oren);
TampilGambar.startAnimation(animScale);
suara8.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_birutua);
TampilGambar.startAnimation(animScale);
suara9.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_abu);
TampilGambar.startAnimation(animScale);
suara0.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
TampilGambar.setImageResource(R.drawable.pop_coklat);
TampilGambar.startAnimation(animScale);
suara11.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.