query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Function for binary search in descending part of array | static int descendingBinarySearch(int arr[], int low, int high, int key) {
while (low <= high) {
int mid = low + (high - low) / 2;
if (arr[mid] == key) {
return mid;
}
if (arr[mid] < key) {
high = mid - 1;
} else {
low = mid + 1;
}
}
return -1;
} | [
"int binarySearch(int[] arr, int low, int high, int key){\n while(low <= high){\n int mid = (low + high) / 2;\n if (key < arr[mid])\n high = mid - 1;\n else if (key > arr[mid])\n low = mid + 1;\n else\n return mid;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the ByteArrayReader object | public ByteArrayReader(byte data[]) {
super(data);
} | [
"public BinaryReader(byte[] bytes) {\n this.bytes = bytes;\n this.position = 0;\n }",
"public BinaryReader(BinaryReader binaryReader, int position) {\n this.bytes = binaryReader.bytes;\n this.position = position;\n }",
"public StreamReaderBufferCreator() {\n }",
"public Bi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ The Streams API includes an alternate version of the forEach() operation called forEachOrdered() , which forces a parallel stream to process the results in order at the cost of performance. For example, take a look at the following code snippet: | public static void main(String[] args) {
Arrays.asList(1, 2, 3, 4, 5, 6)
.parallelStream()
.forEachOrdered(s -> System.out.print(s + " "));
} | [
"@Test\n public void testForEachOrdered() {\n List<Integer> integers = Arrays.asList(1, 2, 3, 4);\n integers.stream().parallel().forEachOrdered(a -> logger.info(\"Число в массиве '{}'\", a));\n }",
"@Test\n public void streamsExample() {\n List<Integer> list = asList(1, 2, 3, 4, 5);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply magenta color on g2 context | public void magenta() {
g2.setPaint(Color.magenta);
} | [
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"public void green() {\n g2.setPaint(Color.green);\r\n }",
"public void red() {\n g2.setPaint(Color.red);\r\n }",
"public void blue() {\n g2.setPaint(Color.blue);\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the time series data. If the minimum win is observed, the stock is bought. If the maximum win or the maximum loss is observed, the stock is sold. | public void update()
{
String inst = "";
float cash = getCash();
float quantity = getPosition(inst);
float price = getPrice(inst);
_data.add(new Float(price));
if (_data.size() > _period)
{
_data.remove(0);
float min = Float.MAX_VALUE;
float max = Float.MIN_VALUE;
for (int i = 0; ... | [
"public void UpdateNewStock(ArrayList<StockData> newUpdStockData){\n for (int i = 0; i < newUpdStockData.size(); i++){\n mysqlfiles.MorningStock(newUpdStockData.get(i));\n }\n }",
"private void modifySavings(){\r\n\t\twhile (Math.abs(diffFromST) >= 2 * BUFFER) {\r\n\t\t\tif (hasExceede... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'callSetIds' field | public java.util.List<java.lang.CharSequence> getCallSetIds() {
return callSetIds;
} | [
"public java.util.List<java.lang.CharSequence> getCallSetIds() {\n return callSetIds;\n }",
"public org.ga4gh.methods.SearchVariantsRequest.Builder setCallSetIds(java.util.List<java.lang.CharSequence> value) {\n validate(fields()[2], value);\n this.callSetIds = value;\n fieldSetFlags()[2] = tru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check StatusCode from RangerServiceException and try to log helpful, actionable messages. | private void decodeRSEStatusCodes(RangerServiceException rse) {
ClientResponse.Status status = rse.getStatus();
if (status == null) {
LOG.error("Request failure with no status provided.", rse);
} else {
switch (status.getStatusCode()) {
case HTTP_STATUS_CODE_UNAUTHORIZED:
LOG.error... | [
"public HttpServiceException(int status, String message) {\n super(message);\n this.status = status;\n }",
"int getStatusCode();",
"RestLiServiceException getServiceException();",
"public StatusCodeException(int statuscode, String message, int expected, String successMsg){\n\t\tsuper(\"Server... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the endpoint map with new data. | private void updateEndpointMap(Map<String, ResetRemainPair> map, String id, long reset, int remaining) {
map.put(id, new ResetRemainPair(reset, remaining));
} | [
"private void update() {\n log(\"update.enter\");\n\n if (serviceDatasMap.size() == 0) {\n return;\n }\n\n removeBadConns();\n\n for (Iterator<Map.Entry<ServiceAddressKey, ServiceData>> itr = serviceDatasMap.entrySet().iterator(); itr.hasNext();)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Multiplies the runningTotal with TAX_PERCENTAGE and returns a new price after tax. | private double calculateTax(){
return ((double)runningTotal * (1+TAX_PERCENTAGE/100));
} | [
"private double calcTax() {\r\n // tax = 15% of gross\r\n double taxrate = 0.15;\r\n return gross * taxrate;\r\n }",
"public double calcTax() {\n return 2.10 * (value / 1000);\n }",
"@Override\n\tpublic BigDecimal computeTotalTax(BigDecimal subTotal, BigDecimal tax) {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of all kills caused by the given unit. Items are in format VBS_Kill. | public native static java.util.List VBS_kills(String oper1); | [
"public static String[] getKillTransactionMSGItems() {\n\t\treturn (String[]) (KILL_TRANSACTION_MSG_ITEMS.clone());\n\t}",
"private List<String> extractRawKills(String game) {\r\n\t\tMatcher matcher = Pattern.compile(\" \\\\d+ \\\\d+ \\\\d+\\\\: .+ \"+KEY_WORD_KILLED+\" .+ by\").matcher(game);\r\n\t\t\r\n\t\tList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an entry based on name alone | TarEntry CreateEntry(String name); | [
"public Entry(String n)\n {\n name = n;\n }",
"Entry createEntry();",
"public void add_name_entry(String name, Entry new_entry)\n {\n names.put(name, new_entry);\n }",
"private void makeNewEntry () {\n entry_group.createEntry ();\n }",
"public Entry(String name) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that remote channel cannot be added if one already exists for the given destination ID. | @Test
public void testAddDuplicateRemoteChannel()
{
m_SUT.addRemoteChannel(DEST_ID, m_OutStream, m_ChannelCallback);
try
{
m_SUT.addRemoteChannel(DEST_ID, m_OutStream, m_ChannelCallback);
fail("addRemoteChannel should throw IllegalStateException");
}
... | [
"@Test\n public void testAddRemoteChannelInvalidStream()\n {\n try\n {\n m_SUT.addRemoteChannel(DEST_ID, null, m_ChannelCallback);\n fail(\"addRemoteChannel should throw IllegalArgumentException\");\n }\n catch (IllegalArgumentException e)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Empresa__CatalogoAssignment_9" $ANTLR start "rule__Catalogo__IdCatalogoAssignment_2_1" ../org.xtext.catalogo.ui/srcgen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:3417:1: rule__Catalogo__IdCatalogoAssignment_2_1 : ( ruleELong ) ; | public final void rule__Catalogo__IdCatalogoAssignment_2_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:3421:1: ( ( ruleELong ) )
// ../org.x... | [
"public final void rule__Categoria__IdCategoriaAssignment_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:3481:1: ( ( ruleELong ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set method for field imageLayout[vkenum] Prototype: VkImageLayout imageLayout | public VkDescriptorImageInfo imageLayout(VkImageLayout imageLayout){
this.imageLayout = imageLayout;
int enumVal = imageLayout.getValue();
setImageLayout0(this.ptr, enumVal );
return this;
} | [
"public VkImageLayout imageLayout(){\n\t\t int nativeVal = getImageLayout0(super.ptr);\n\t\t this.imageLayout = VkImageLayout.fromValue(nativeVal); \n\t\t return this.imageLayout;\n\t }",
"private static native void setImageLayout0(Buffer ptr, int _imageLayout);",
"public void setLayout(Integer layout) {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends SMS message to doctor | public void sendSMS() {
//http://www.mkyong.com/android/how-to-send-sms-message-in-android/
Intent intent = getIntent();
String userName = intent.getStringExtra(LoginActivity.USER_NAME);
String userDOB = intent.getStringExtra(LoginActivity.DOB);
String doctorName = intent.getStr... | [
"String sendSmsForDodocaHttp(String smsServer, String smsUserID, String smsPassword, String phoneNo, String msg);",
"void sendSms(String to, String text);",
"@Override\n public void send() {\n try {\n SmsManager smsManager = SmsManager.getDefault();\n smsManager.sendTextMessage(p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the falloff radius of the light. | public float getFalloffRadius() {
return this.falloffRadius;
} | [
"public float getFalloff_radius() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 300);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 260);\n\t\t}\n\t}",
"float getFlangeEdgeRadius();",
"float getFilletRadius();",
"float getF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an UnlockCommand object. | UnlockCommand(String door, String key){
this.key = key;
this.door = door;
} | [
"public ConfbridgeUnlockAction() {\n super();\n }",
"public LockCommand getLockCommand(String userName, String password, Model model) {\n LockCommand command = new LockCommand(userName, password);\n UserPrefs userPrefs = new UserPrefs();\n Config config = new Config();\n Logi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the completed percentage of the task, assuming that the task has completed. | public void updatePercentDone() {
if (progressBar.getValue() < taskPercentages.getCurrentTotalPercent()) {
this.setPercentDone(taskPercentages.getCurrentTotalPercent());
}
} | [
"public void incrementSubtaskPercentDone() {\n taskPercentages.incrementSubtaskIncrementSum();\n double sum = taskPercentages.getSubtaskIncrementSum();\n if ((int)sum > 0) {\n int done = progressBar.getValue();\n int currentTotal = this.taskPercentages.getCurrentTotalPercent();\n int update ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove all elements from a linked list of integers that have value val. Input: 1>2>6>3>4>5>6, val = 6 Output: 1>2>3>4>5 | public ListNode removeElements(ListNode head, int val) {
ListNode dummy = new ListNode(-1, head);
ListNode curr = dummy;
ListNode prev = new ListNode(0);
while (curr != null) {
if (curr.val != val) {
prev = curr;
curr = curr.next;
... | [
"public ListNode removeElements(ListNode head, int val) {\n ListNode trav = head;\n ListNode pre = null;\n while (trav != null){\n if(trav.val == val){\n if(pre == null){\n head = head.next;\n trav = head;\n }else {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the transaction manager. | public void setTransactionManager(
PlatformTransactionManager transactionManager) {
this.transactionManager = transactionManager;
} | [
"void setTransactionManager(TransactionManager tm);",
"public void setTxManager(PlatformTransactionManager txManager) {\r\n this.txManager = txManager;\r\n }",
"public void setTransactionManager(TransactionManager tm)\n {\n _tm = tm;\n }",
"protected PlatformTransactionManager getTxManager()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the message a new value. Default encoding Data.ENC_GSM7BIT is used. | public void setMessage(String message) throws WrongLengthOfStringException {
try {
setMessage(message, Data.ENC_GSM7BIT);
} catch (UnsupportedEncodingException e) {
try {
setMessage(message, Data.ENC_ASCII);
} catch (UnsupportedEncodingException uee) {
// ascii always supported
}
}
... | [
"public void setMessage(String message)\n {\n //Check if message can be encoded in the image or not\n if (message.length() > getMaxCharactersInMessage()) throw new IndexOutOfBoundsException(\"Message length is too long!\");\n\n //Add ` character at the start and end of the image to locate me... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the salary of the employee. | public void setSalary(double salary); | [
"public void setEmplSalary(double salary) {\n this.emplSalary = salary;\n }",
"public void setSalary(double empSal) {\r\n salary = empSal;\r\n }",
"public void setSalary(double salary){\r\n this.salary = salary;\r\n }",
"public void setSalary(double salary) {\n this.salary = s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ void setShipType (Point xy, int value) sets the shipType of the ship at Point xy to value | public void setShipType(Point xy, int value) {
shipTypeMap.put(xy, value);
} | [
"public void setShipInfo(Point xy, int state, int shipType) {\r\n\t\tshipTypeMap.put(xy, shipType);\r\n\t\tshipStateMap.put(xy, state);\r\n\t}",
"public void setType(ShipType type) {\r\n this.type = type;\r\n }",
"public void setType(ShipType type) {\n\t\tthis.type = type; }",
"public void setShipTy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Opens the plib ui in the pservice storage direction. | public static void showPlibUiPServiceStorage(Activity activity, Integer activityForRequestCode) {
PLibSettingsActivity.showPlibUiPServiceStorage(activity, activityForRequestCode);
} | [
"public void displayOpenDialog()\n\t{\n\t\tIONetwork.open();\n\t}",
"public void openLibraryManager() {\r\n parent.setEnabled(false);\r\n libraryDialog.setVisible(true);\r\n libraryDialog.setStatusMessage(\"Ready.\");\r\n }",
"public void open() {\n\t\tensureGuiCreated();\n\t\tensureGuiN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets ith "BridgeElement" element | void setBridgeElementArray(int i, org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement bridgeElement); | [
"void setBridgeElementArray(org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement[] bridgeElementArray);",
"org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement addNewBridgeElement();",
"org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement insertNewBridgeElement(int i);",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleExp0" $ANTLR start "entryRuleAddition0" ../../intellij/org.eclipse.xtext.core.idea.tests/srcgen/org/eclipse/xtext/serializer/idea/parser/antlr/internal/PsiInternalSyntacticSequencerTestLanguage.g:337:1: entryRuleAddition0 : ruleAddition0 EOF ; | public final void entryRuleAddition0() throws RecognitionException {
try {
// ../../intellij/org.eclipse.xtext.core.idea.tests/src-gen/org/eclipse/xtext/serializer/idea/parser/antlr/internal/PsiInternalSyntacticSequencerTestLanguage.g:337:19: ( ruleAddition0 EOF )
// ../../intellij/org.e... | [
"public final void entryRuleAddition0() throws RecognitionException {\n try {\n // ../../intellij/org.eclipse.xtext.core.idea.tests/src-gen/org/eclipse/xtext/serializer/idea/parser/antlr/internal/PsiInternalSyntacticSequencerTestLanguage.g:325:19: ( ruleAddition0 EOF )\n // ../../intell... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'var280' field. | public com.dj.model.avro.LargeObjectAvro.Builder clearVar280() {
var280 = null;
fieldSetFlags()[281] = false;
return this;
} | [
"public com.dj.model.avro.LargeObjectAvro.Builder clearVar290() {\n var290 = null;\n fieldSetFlags()[291] = false;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder clearVar180() {\n var180 = null;\n fieldSetFlags()[181] = false;\n return this;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets proxy port. System property Dsinat4j.http.proxyPort or Dhttp.proxyPort overrides this attribute. | public void setProxyPort(int proxyPort) {
this.proxyPort = Configuration.getProxyPort(proxyPort);
} | [
"public void setProxyPort(String port)\r\n {\r\n this.proxyPort = port;\r\n }",
"public void setHttpProxyPort(int port);",
"public VaultConfig proxyPort(final Integer proxyPort) {\n this.proxyPort = proxyPort;\n return this;\n }",
"private void setRemoteProxyPort(int value) {\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates a module to export a package to another module without notifying the VM. | void implAddExportsNoSync(String pn, Module other) {
implAddExportsOrOpens(pn.replace('/', '.'), other, false, false);
} | [
"public abstract void updatePackage(PackageParser.Package pkg);",
"void implAddExports(String pn, Module other) {\n implAddExportsOrOpens(pn, other, false, true);\n }",
"public void receiveResultupdateModule(\n com.wso2.build.stub.ModuleStub.UpdateModuleResponse result\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a reply to this Sone. If the given reply was not made by this Sone, nothing is added to this Sone. | public synchronized void addReply(Reply reply) {
if (reply.getSone().equals(this) && replies.add(reply)) {
modificationCounter++;
}
} | [
"public void addReply(Reply newReply) {\n\t\tthis.replyList.add(newReply);\n\t}",
"public void add(ReplyToPost reply){\n super.add(reply);\n list.add(reply);\n }",
"public void Add_Reply( String Comment_ID, String Reply_ID) {\n // TODO implement here\n }",
"public void sendReply(Me... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add an artifical delay before harvesting a block (if needed). The next given job is typically one of harvestAndPickup or harvestAndDrop. If the hardness of the block is low enough this performs the job immediatelly | void delayForHardBlocks(BlockPos pos, Consumer<BlockPos> nextJob); | [
"private void waitForHikeTask() {\n double counter = 0;\n while (counter < 2 && mHikeList == null) {\n try {\n TimeUnit.SECONDS.sleep(1);\n counter++;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve el vertice de indice elem en el conjunto de posibles. | public Vertice getVerticePosible(int elem){
return this.posibles.get(elem);
} | [
"public Vertice getVertice(int elem){\n\t\treturn this.conjunto.get(elem);\n\t}",
"public int getElementoVector(int posicion) {\r\n\t\treturn vector[posicion];\r\n\t}",
"public int getPositionRow(){return this.positionRow;}",
"public int[] getSlicePosition();",
"public int getPositionColumn(){return this.po... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the behaviour for the "Settings" button. A new window is created with the option to delete all statistics (this included previous reviewtimes and scores) and will confirm if the user means to delete them. | public void settings() {
// build the settings window (currently with a single button)
Dialog<Void> dialog = new Dialog<Void>();
dialog.setTitle("Settings");
Button clearStatistics = new Button("Clear statistics");
clearStatistics.setPrefWidth(160);
clearStatistics.setOnAction(bEvent -> {
// confirm if t... | [
"private void resetAllPreferences() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(\"Are you sure?\")\n\t\t\t\t.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int which) {\n //Yes butto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column lb01_pt.lbt82_kinken_sum.insipaddr | public void setInsipaddr(String insipaddr) {
this.insipaddr = insipaddr;
} | [
"public String getInsipaddr() {\r\n return insipaddr;\r\n }",
"private void setS1Ip(int value) {\n \n s1Ip_ = value;\n }",
"private void\r\n setIpVersionAndStartEndAddress(ResultSet rs, Network objIp)\r\n throws SQLException {\r\n String ipVersio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method verifies if an ip address adheres to a given rule. | public boolean isValid(String addr, String rule) throws FilterParseException {
if (rule.length() == 0) {
return true;
} else {
/*
* see if the ip address is contained in the list that the
* rule returns
*/
return getIPList(rule).... | [
"private boolean validate(final String ip){\t\t \n \t Pattern pattern = Pattern.compile(IPADDRESS_PATTERN);\n\t Matcher matcher = pattern.matcher(ip);\n\t return matcher.matches();\t \t \n }",
"@Override\n\tpublic boolean validate(String ip) {\n\t\tPattern pattern = Pattern.compile(IPADDRESS_PATTERN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events. | public com.google.cloud.aiplatform.v1.LineageSubgraph queryExecutionInputsAndOutputs(
com.google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getQueryExecutionInputsAndOutputsMethod(), getCallOptions(), requ... | [
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.LineageSubgraph>\n queryExecutionInputsAndOutputs(\n com.google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns number of levels. | int getLevelsCount(); | [
"public static int getLevelCount() {\n return levels.size();\n }",
"public int countLevels() {\n return levels.size();\n }",
"public static int getLevelsCount() {\n initLevelsOffsets();\n return levelsOffsets.size() - 1;\n }",
"public int countLevels() {\n return co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses inputstream into scenario object. | public Scenario parse(InputStream input, boolean aboutOnly) throws XmlPullParserException, IOException {
scenario = null;
parser.setInput(input, null);
parser.nextTag();
parser.require(XmlPullParser.START_TAG, ns, "scenario");
while (parser.next() != XmlPullParser.END_TAG) {
if (... | [
"ScenarioModel loadScenarioModel(InputStream inputStream) throws ModelSerializationException, ModelConversionException;",
"public static Step parse(java.io.InputStream inpt) throws scg.ParseException{\n return new scg.TheParser(inpt).parse_Step();\n }",
"public final T parse(InputStream stream) throws... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if all size of the list is as expected | @Test
public void testListSize() {
assertEquals(10, itemList.size());
} | [
"public void testListSize()\r\n {\r\n assertEquals(\"Check Empty Size\",0,empty.size()) ;\r\n assertEquals(\"Check One Size\",1,one.size()) ;\r\n assertEquals(\"Check Several Size\",DIM,several.size()) ;\r\n }",
"@Test\n public void testListSize()\n {\n assertEquals(\"Check Empty S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A player wishes to join a game room | GameJoinResult join(Player player); | [
"public void joinGame(){\n\t\tsendJoinMsg(ownPlayer);\t\n\t}",
"private void joinRoomLobby(){\n sfsClient.send( new JoinRoomRequest(\"lo_baicao\") );\n }",
"public void joinGame() {\n\t\tif (m_joinedPlayers < 6) {\n\t\t\t++m_joinedPlayers;\n\t\t\tm_joinedPlayerText.setText(Integer.toString(m_joinedPla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Redo change story estimate, sets estimate to new estimate | @Override
public void redo()
{
story.setEstimate(newEstimate);
} | [
"@Override\n public void undo()\n {\n story.setEstimate(oldEstimate);\n\n if (ready) {\n story.setReadinessToReady();\n }\n }",
"@Override\n public void redo() {\n super.redo();\n rateParameter.setExpression(newExpression);\n }",
"public void redo() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
helper methods Cleanup any previously cancelled keys | protected void cleanupCancelledKeys()
throws IOException
{
Set<SelectionKey> setCanceled = cancelledKeys();
SelectionKey[] aKey = null;
synchronized (setCanceled)
{
if (!setCanceled.isEmpty())
{
// first allow ... | [
"public void resetKey()\n\t{\n\t\tthis.lastStop.clear();\n\t\tkeyFound = null;\n\t}",
"private void closeAndCancel() {\n try {\n stats.removeKey(key);\n key.cancel();\n channel.close();\n } catch (IOException e) {\n System.err.println(\"Error while trying to close Task channel\");\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstExternalFunction__Group__9__Impl" $ANTLR start "rule__AstExternalFunction__Group__10" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9293:1: rule__AstExternalFunction__Group__10 : rule__AstExternalFunction__Group__10__Impl ; | public final void rule__AstExternalFunction__Group__10() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9297:1: ( rule__AstExternalFunction__Grou... | [
"public final void rule__AstExternalFunction__Group__9() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:9268:1: ( rule__AstExternalFun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the householdHeadGender value for this Account. | public java.lang.String getHouseholdHeadGender() {
return householdHeadGender;
} | [
"public void setHouseholdHeadGender(java.lang.String householdHeadGender) {\n this.householdHeadGender = householdHeadGender;\n }",
"public java.lang.String getHouseholdHeadOccupation() {\n return householdHeadOccupation;\n }",
"com.google.ads.googleads.v0.common.GenderInfo getGender();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A method used to get the stacked area chart image name \return the stacked area chart image name | public String GetStackedAreaChartImage() {
return m_StackedAreaChartImage;
} | [
"public String getAreaName() {\n\t\tif (areaName == null) {\n\t\t\tProtectedRegion p = getPlot();\n\t\t\tPlotInfo info = plugin.getPlotInfo(worldName, p.getId());\n\t\t\tif (info != null) {\n\t\t\t\tareaName = info.areaName;\n\t\t\t}\n\t\t}\n\t\treturn areaName;\n\t}",
"public String GetBarChartImage() {\n\t\tret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the second axis instance for the current annotation. | public void setSecondAxis(AxisModel value) {
this.setValue(SECOND_AXIS_PROPERTY_KEY, value);
} | [
"protected void onSecondAxisChanged() {\n }",
"public AxisModel getSecondAxis() {\n return this.getTypedValue(SECOND_AXIS_PROPERTY_KEY, null);\n }",
"public void setY2( double y2 )\n {\n this.y2 = y2;\n }",
"public DualAxisDemo2(final String title) {\n\n\t\tsuper(title);\n\n\t\t//... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column game_mst.GAME_DT | public String getGameDt() {
return gameDt;
} | [
"public void setGameDt(String gameDt) {\r\n this.gameDt = gameDt;\r\n }",
"public String getGame_date() {\n return game_date;\n }",
"public java.lang.String getDateColumn() {\r\n return dateColumn;\r\n }",
"DsGameType selectByPrimaryKey(Long id);",
"public Date getGameTime() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for VALUE using the alias name Value. | public Number getValue() {
return (Number) getAttributeInternal(VALUE);
} | [
"public String getAttributeValueAlias() {\n return attributeValueAlias;\n }",
"@Override\n\tpublic Object getAliasValue(String alias) {\n\t\treturn aliasValues.get(alias);\n\t}",
"public String getValue() {\n return getAttribute(\"value\");\n }",
"public Object getValueOf(String attributeN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The dock layout panel is the fundamental panel | private static void assembleDockLayoutPanel() {
dockLayoutPanel.addNorth(headerPanel, 3);
dockLayoutPanel.addSouth(footerPanel, 3);
dockLayoutPanel.addEast(eastPanel, 0);
dockLayoutPanel.addWest(controlPanel, 24);
dockLayoutPanel.add(middleMainPanel);
} | [
"Component getDockable();",
"public void initDock(){\n\r\n\t\t// // -------------------workflow 1----------------\r\n\t\t// String loc = \"Workflow1\";\r\n\t\t// PGraphics canvas = applet.createGraphics((int)textWidth(loc)+20,20,applet.P2D);\r\n\t\t// myDock.canvases.add(canvas);\r\n\t\t// b = new Button(currentW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return true if the door is open, otherwise false. | public boolean isDoorOpen() {
return doorOpen;
} | [
"public boolean isDoor() {\n return this.type == Type.DOOR;\n }",
"boolean hasDoorStatus();",
"@Test\r\n\tpublic void testDoorBoolean() {\r\n\t\tDoor doorOpen = new Door(true);\r\n\t\tDoor doorClosed = new Door(false);\r\n\t\tassertTrue(doorOpen.isOpen());\r\n\t\tassertFalse(doorClosed.isOpen());\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Chunks compiled from each character render info | public List<TextChunk> getCharacterChunks()
{
return characterChunks;
} | [
"final void updateCharacterData() {\n\tchar c[] = new char[1];\n\n\tif (geometryList.length != numChars) {\n\t geometryList = new GeometryArrayRetained[numChars];\n\t glyphVecs = new GlyphVector[numChars];\n\t}\n\n\tif (font3D != null) {\n for (int i=0; i<numChars; i++) {\n\t\tc[0] = string.charAt(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the fixture for this Application Condition test case. | protected ApplicationCondition getFixture()
{
return fixture;
} | [
"protected ApplicationConfig getFixture() {\n\t\treturn fixture;\n\t}",
"protected Requirement getFixture() {\n\t\treturn fixture;\n\t}",
"protected BooleanExp getFixture() {\n\t\treturn fixture;\n\t}",
"protected Meta getFixture() {\r\n\t\treturn fixture;\r\n\t}",
"@Override\n\tprotected ConditionalExpress... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Streaming storage option. By default: storage is disabled. .google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig storage_config = 30; | com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfig getStorageConfig(); | [
"com.google.cloud.videointelligence.v1p3beta1.StreamingStorageConfigOrBuilder getStorageConfigOrBuilder();",
"com.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfigOrBuilder\n getStreamingConfigOrBuilder();",
"com.google.privacy.dlp.v2.StorageConfigOrBuilder getStorageConfigOrBuilder();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var138' field. | public java.lang.Double getVar138() {
return var138;
} | [
"public java.lang.Double getVar138() {\n return var138;\n }",
"public java.lang.Integer getVar159() {\n return var159;\n }",
"public java.lang.CharSequence getVar144() {\n return var144;\n }",
"public java.lang.Integer getVar159() {\n return var159;\n }",
"public java.lang.Double get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
==================================================================================================== Singleton method, returns the MarketMaker object. | public static MarketMaker getInstance() {
if(marketMaker == null) {
marketMaker = new MarketMaker();
}
return marketMaker;
} | [
"public MarketDataManagerImpl()\n {\n instance = this;\n }",
"public static Ticker getInstance(){\n if(ticker == null)\n ticker = new Ticker();\n return ticker;\n }",
"public static IMarketDataManager getMarketDataManager() {\r\n\t\tsynchronized (Activator.class) {\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will generate a color mosaic pattern based on the RGB value entered. | public static void myRGBMosaic(MyImage img, int r, int g, int b, int pieceSize){
int DYColor = (255<<24) | (r<<16) | (g<<8) | b;
_createMosaic(img, DYColor, pieceSize);
} | [
"private void _fillPattern() {\n // FIXME: We probably want a fill pattern rather than\n // just a gray scale.\n int red = _currentColor.getRed();\n int green = _currentColor.getGreen();\n int blue = _currentColor.getBlue();\n\n // Scaling constants so that fully saturated ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .com.cst14.im.protobuf.GroupMemberInfo myInfo = 14; | com.cst14.im.protobuf.ProtoClass.GroupMemberInfoOrBuilder getMyInfoOrBuilder(); | [
"com.cst14.im.protobuf.ProtoClass.GroupMemberInfo getMyInfo();",
"public com.cst14.im.protobuf.ProtoClass.GroupMemberInfoOrBuilder getMyInfoOrBuilder() {\n if (myInfoBuilder_ != null) {\n return myInfoBuilder_.getMessageOrBuilder();\n } else {\n return myInfo_ == null ?\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch document on given address as DOMtree | public Document fetchDocument(String address) throws IOException, FetcherException; | [
"Element getDOM(String documentAddress) throws DAOException;",
"private Document fetchDocument(String uri) {\n CloseableHttpClient httpclient = HttpClients.createDefault();\n HttpGet httpget = new HttpGet(uri);\n CloseableHttpResponse response = null;\n\n try {\n response = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An HQL query method used in order to find all of a customers' purchased coupons (represented in the customer coupon joined table) | @Query("select c from Coupon as c inner join c.customers as cust where cust.id =:customerId")
List<Coupon> getMyPurchasedCoupons(long customerId); | [
"@Override\r\n\tpublic Set<Coupon> getAllCoupons() {\r\n\t\tSet<Coupon> couponList = new HashSet<>();\r\n\t\tString query = \"SELECT * FROM COUPON\";\r\n\t\tConnection conn = connectionPool.getConnection();\r\n\t\ttry{\r\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(query);\r\n\t\tResultSet rs = pstmt.ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a soft skill violation by its unique id | @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(value = "Delete a violation by Id")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "Violation not found"),
@ApiResponse(code = 200, message = "Violation deleted")
})
public ResponseEntity<String> deleteSoftSkillViolation... | [
"void deleteSkill(Skill t) throws PersonNotFoundException, DuplicatePersonException,\n UniqueSkillList.DuplicateSkillException;",
"void delete(EmployeeSkillId id);",
"@DeleteMapping(\"/{skillId}\")\n public void deleteSkill(@PathVariable Integer skillId){\n skillsService.deleteSkill(skillId);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a CommandLineUserInterface class for interaction with the user. Uses processor classes to deliver the desired information to the user. | public CommandLineUserInterface(ParkingViolationProcessor parkingViolationProcessor,
PopulationProcessor populationProcessor,
PropertyValueProcessor propertyValueProcessor) {
this.parkingViolationProcessor = parkingViolationProcessor;
... | [
"public CLI createCLI() {\n\t\treturn new UserCLI(employeeRepository,taskRepository);\n\t}",
"public UserInterface()\n {\n this(System.in, System.out);\n }",
"public interface CommandLineProvider {\n CommandLine create();\n}",
"public CLI() {\n in = new Scanner(System.in);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write autorisationCollabInterdite into a marshalled stream | public void _write(org.omg.CORBA.portable.OutputStream ostream)
{
autorisationCollabInterditeHelper.write(ostream,value);
} | [
"private void writeCOBIE()\n\t{\n\t\tsuper.modelToCOBie();\n\t\tLOGGER.info(getLoggerMessageBegin());\n\t\tthis.writeCOBieToSpreadsheet();\n\t\tLOGGER.info(getLoggerMessageDone());\n\t\tsuper.GetCobie().setNil();\n\t\tSystem.gc();\n\t\tRuntime.getRuntime().gc();\n\t\t\n\t\ttry {\n\t\t\t//StreamResult result = this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field specMap is set (has been assigned a value) and false otherwise | public boolean isSetSpecMap() {
return this.specMap != null;
} | [
"public boolean isSetMapMap() {\n return this.mapMap != null;\n }",
"public boolean isSetMapData() {\n return this.mapData != null;\n }",
"public boolean isSetListMap() {\n return this.listMap != null;\n }",
"public boolean isSetMapObj() {\n return this.mapObj != null;\n }",
"public bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read the application config for Marathon refresh transformation. | public static AppTransformConfig readAppTransformConfig() {
if(triedLoadingTransformConfig){
return config;
}
triedLoadingTransformConfig = true;
try {
ObjectMapper mapper = new ObjectMapper();
InputStream in = new FileInputStream("transform.json");
config = mapper.readValue(in, AppTransformConfig.c... | [
"protected void readConfigFile(){\n ReadJSON.readConfig(this);\n }",
"public static Map<String, Object> getAppConfig() throws IOException {\n Properties properties = PropertiesReader.loadProperties(new FileInputStream(\"src/main/resources/app.properties\"));\n\n String appPathValue = prope... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stress tests for the method: addNotification(long, long, long, String). | public void testAddNotification() throws Exception {
Date start = new Date();
for (int i = 0; i < STRESS_TEST_NUM; i++) {
persistence.addNotification(200 + i, 1, 3, "reviewer");
String sql = "SELECT * FROM notification WHERE external_ref_id = ? ";
assertTru... | [
"public void testAddNotificationType() throws Exception {\r\n Date start = new Date();\r\n\r\n for (int i = 0; i < STRESS_TEST_NUM; i++) {\r\n persistence.addNotificationType(getNotificationType(i + 100));\r\n\r\n String sql = \"SELECT * FROM notification_type_lu WHERE notificati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of createCategorizationLearner method, of class RandomForestFactory. | @Test
public void testCreateCategorizationLearner()
{
int ensembleSize = 3 + random.nextInt(1000);
double baggingFraction = random.nextDouble();
double dimensionsFraction = random.nextDouble();
int maxTreeDepth = 3 + random.nextInt(10);
int minLeafSize = 4 + random.nextIn... | [
"public void testLearner()\n {\n WinnerTakeAllCategorizer.Learner<Vector, String> learner = \n new WinnerTakeAllCategorizer.Learner<Vector, String>();\n learner.setLearner(new MultivariateLinearRegression());\n\n ArrayList<InputOutputPair<Vector, String>> training =\n n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
annual fuelwood need consumed in summer and then only if Village.BURN_WOOD == 1 | protected int burnWood() {
int need, dx, dy, dw, bw_cals;
float trips, cellwood;
Cell c;
trips = 0;
bw_cals = 0;
dx = dy = dw = 0;
need = FW_need * getFamilySize(); // FW_need set to Village.WOOD_NEED in
// -createEnd
FWsearchradius = 0;
FWHappy = 0;
FWout = 0;
while (need > 0) {
int wood_typ... | [
"boolean IsFullFuelTank();",
"private static void reportEconomicalSituationOfTheVillage() {\r\n\t\tfor (DependentHousehold serfHousehold : serfs) {\r\n\t\t\tserfHousehold.reportsSilver();\r\n\t\t}\r\n\t\tleSeigneur.reportsSilver();\r\n\t\tSystem.out.println(\"there are \" + serfs.length + \" SERF households left\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the JIRA URL of the project. | public void setJiraURL(DirectProjectMetadata jiraURL) {
this.jiraURL = jiraURL;
} | [
"void setURL(java.lang.String url);",
"public DirectProjectMetadata getJiraURL() {\n return jiraURL;\n }",
"public void setURL(String url);",
"public String getProjectUrl() {\n return projectUrl;\n }",
"public void openURL() {\n\t\ttry {\n\t\t\tgetProjectUIFacade().openRemoteProject(getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds a new user to Firestore using GoogleAccountInfo properties after they log in | public void addUserToFirestore() {
if (isSignedIn()) {
getUserTask().addOnCompleteListener(
new OnCompleteListener<DocumentSnapshot>()
{
@Override
public void onComplete(@NonNull Task<DocumentSnapshot> task) {
... | [
"private void createUserInFirestore() {\n\n if (getCurrentUser () != null) {\n\n String urlPicture = ( getCurrentUser ().getPhotoUrl () != null ) ? getCurrentUser ().getPhotoUrl ().toString () : null;\n String username = getCurrentUser ().getDisplayName ();\n String resto = \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get list of vaccines given the branch code | public List<Vaccine> getVaccinesByBranchCode(String branchCode){
Branch branch =
branchRepository
.findByBranchCode(branchCode)
.orElseThrow(() -> new PreconditionException(ErrorCode.INTERNAL_SERVER_ERROR));
return branch.getVaccines();
... | [
"List<String> getBranches();",
"List<String> branches();",
"java.util.List<Bank.InitBranch.Branch> \r\n getAllBranchesList();",
"Map<HibBranch, VV> findReferencedBranches();",
"public static List<String> getBranches(String formula) {\r\n\t\tif (null == formula || 0 == formula.length()) {\r\n\t\t\tthr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Identity V2 Access object assigned during authentication | Access getAccess(); | [
"public AccessGrant getAccessGrant();",
"public Identity getIdentity()\r\n {\r\n return securityService.findLoggedInIdentity();\r\n }",
"public AccessManager getAccessManager();",
"public String getAccessId() {\n return this.accessId;\n }",
"public ClientIdentity getIdentity() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get accessor for persistent attribute: fk_camrol_2_rol_rol_id | public abstract java.lang.Long getFk_camrol_2_rol_rol_id(); | [
"public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.RolLocal getFk_camrol_2_rol();",
"public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Campo_variableLocal getFk_camrol_2_cam();",
"public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Splits by space and take initial letters(if alphanumeric but skip for numeric) for given text | public static String splitByInitialLetter(String text) {
// split by punctuation
String tokens[] = text.split("( |:|,|-|_|;)+");
StringBuilder mtext = new StringBuilder();
for(String t : tokens) {
if(NumberUtils.isDigits(t)) {
// skip for number
mtext.append(t).append('_');
} else {
mtext.a... | [
"public static String normalizeText( String text )\n\t{ all number\n\t\t// remove\n\t\ttext = text.toLowerCase().replaceAll( \"\\\\d\", \"\" ).replaceAll( \"\\\\w$\", \"\" ).replaceAll( \"[_\\\\-()]\", \" \" );\n\t\treturn text;\n\t}",
"private static String splitWords(String str) {\n if (str.isEmpty()) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
process the if statements | public void ifStat(){
spacingPlus();
myGenerate.commenceNonterminal("If Statement");
acceptTerminal(Token.ifSymbol);
cond();
acceptTerminal(Token.thenSymbol);
statementsList();
if(nextToken.symbol==Token.elseSymbol){
acceptTerminal(Token.elseSymbol);
... | [
"private void compileIfHelper() throws IOException {\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileExpression();\n for (int i = 0; i < 2; i++) {\n printToken();\n getNextToken();\n }\n compileState... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update discount information Map discount table to MySql parameters, and update database | @Override
public int updateDiscount(DiscountTable discountTable) {
int affectedRow;
Map<String, Object> param = DiscountMap(discountTable);
SqlParameterSource pramSource = new MapSqlParameterSource(param);
logger.info("Updating discount : {} ",pramSource);
affectedRow =namedParameterJdbcTemplate.update(UP... | [
"Discount updateDiscount(Discount discount);",
"void update(Discount discount) throws ServiceException;",
"DiscountResponse update(Long id, DiscountRequest request, UserInfo userInfo);",
"public void assignDiscountType(int acc_no, String discount_type){\n try {\n Stm = conn.prepareStatement(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the id candidato of this candidato. | @Override
public long getIdCandidato() {
return _candidato.getIdCandidato();
} | [
"public Long getIdPersonaCandidato() {\n return idPersonaCandidato;\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _candidato.getPrimaryKey();\n\t}",
"public int getIdComentario() {\n return id;\n }",
"public String obtenerIdPersona(){\n Persona m = (Persona) personas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Requests that the column widths should be recalculated. In most cases Grid will know when column widths need to be recalculated but this method can be used to force recalculation in situations when grid does not recalculate automatically. | public void recalculateColumnWidths() {
getRpcProxy(GridClientRpc.class).recalculateColumnWidths();
} | [
"void updateWidth() {\n for (Resize r : autoResizeColumns) {\n updateWidth(r.column, r.keep);\n }\n }",
"private static void OnWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) \r\n {\r\n DataGridColumn column = (DataGridColumn)d; \r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transform a char to a String | private String charToString(char c)
{
String s;
s = "";
s += c;
return s;
} | [
"public static java.lang.String charToString(char input) {\n return Character.toString(input);\n }",
"protected String toString(char c) {\n\t\t\treturn Character.toString(c);\n\t\t}",
"public static String charToString(char c) {\r\n if (c == '\\n') {\r\n return \"NL\";\r\n } e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls the methods from levelbase that are required to build the level. The int n parameter is used for spawning in the correct number of players. The players for the level are passed as parameters so that they keep their score when advancing to the next level. This level is different from the others, as it only has one... | public Level5(Player p1, Player p2, int n)
{
numPlyrs = n;
player1 = p1;
player2 = p2;
spawnPlayers(player1, player2, numPlyrs);
spawnSB(numPlyrs);
spawnWalls();
spawnGhosts(4);
addObject(new megaRuby(),883,77);
} | [
"public void runLevels(List<LevelInformation> levels) {\n\n for (LevelInformation levelInfo : levels) {\n\n Counter blocks = new Counter();\n GameLevel level = new GameLevel(levelInfo, this.keyboardSensor, this.animationRunner, this.lives,\n this.score, blocks);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts up the database connection. | private void setupDatabase() throws SQLException {
db.open("localhost", 3306, "wow", "greeneconomyapple");
db.use("auctionscan");
} | [
"public void startConnection() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n }\n catch (ClassNotFoundException ex) {\n System.out.println(\"Driver not found\");\n }\n try {\n db = DriverManager.getConnection(\"jdbc:postgresql://\" + url, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for property totalSimWajib. | public double getTotalSimWajib() {
return this.totalSimWajib;
} | [
"public double getTotalSimPokok() {\n return this.totalSimPokok;\n }",
"public final double getObsWeightedSum() {\n return (myJsum);\n }",
"public void setTotalSimWajib(double totalSimWajib) {\n this.totalSimWajib = totalSimWajib;\n }",
"public double getTotalSimSukarela() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets a new rank and/or suit for a card | public void setCardRank(int newValue){
cardRank = newValue;
} | [
"Card(int suit, int rank)\r\n {\r\n this.rank = rank;\r\n this.suit = suit;\r\n }",
"@Override\n public void setCardRank(int rank) {\n this.rank = rankMap.get(rank);\n }",
"Card(int rank, Suit suit)\n {\n this.rank=rank;\n //If less than 11, val=rank, else if ra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end mapTerm Returns a document in the VSM. | public Vector mapDocument(BOW bow, boolean b) {
//logger.info("lsm.mapDocument " + b);
SparseVector vector = new SparseVector();
Iterator<String> it = bow.termSet().iterator();
for (int i = 0; it.hasNext(); i++) {
//logger.info(i + " " + t[i]);
String term = it.n... | [
"public Term getTerm();",
"public TermMap getTermMap()\n\t{\n\t\treturn termContainer;\n\t}",
"public int getTermIndex() {return termIndex;}",
"public String getTerm() {\n return term;\n }",
"public void addTermToDoc(String term){//todo\n Term currentTerm;\n if(Character.isLowerCase(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a string that includes all the input characters from start to end in an orderly fashion | public static String allChars(char start, char end)
{
StringBuilder finalString = new StringBuilder("");
char c = start;
int stringLength = end - start;
for(int i = 0; i <= stringLength; i++)
{
finalString.append((char)(c+i));
}
return finalString.toString();
} | [
"private String showAllChars(String in) {\n String out = \"\";\n char cc;\n int size = in.length();\n if(size%2 != 0) {// in case user input a hex string with a missing 4 bits, we trim it\n size = size - 1;\n }\n for(int i=0; i<size; i=i+2){ // two char represent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize a flock of boids, given a set of boids and a source to get a predator from | public Flock(Boid[] boids, LinkedBlockingQueue<Vector> predq) {
this.boids = boids;
this.predq = predq;
} | [
"Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }",
"public void initialize(Collection<Bookshelf> basis)\n\t throws IllegalArgumentException {\n\n\tif (null == basis)\n\t throw new IllegalArgumentException(\"input cannot be null.\");\n\n\tIterator<Bookshelf> shelfs = basis.iter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor. Create an empty data column | public DataColumn() {
data = null;
typeName = "";
} | [
"public DataColumn() {\n }",
"public DataTable() {\n\n\t\t// In this application, we use HashMap data structure defined in\n\t\t// java.util.HashMap\n\t\tdc = new HashMap<String, DataColumn>();\n\t}",
"protected DataColumn createDataColumn() {\n Color markerColor = DisplayColors.getMarkerColor(colorIndex)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Regenerates the properties of all of the map squares. This should be called after the tile size is changed. | public void generateSquareProperties()
{
for(int row = 0;row < rowCount;row++)
for(int col = 0;col < colCount;col++)
if(map[row][col] != null)
{
map[row][col].setX(col);
map[row][col].setY(row);
map[row][col].setWidth(1);
map[row][col].setHeight(1);
map[row][col].setRotation(0.0f)... | [
"public void update()\n {\n for(int row = 0; row < mapHeight; row++)\n {\n for(int col = 0; col < mapWidth; col++)\n {\n Tilemap[row][col].setRectangle(row, col, x, y, tileSize); \n }\n }\n }",
"private void pop... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the primitiveDefs file for the appropriate family based on FamilyType. | public static PrimitiveDefList loadPrimitiveDefs(FamilyType familyType) {
String path = getPrimitiveDefsFileName(familyType);
return (PrimitiveDefList) loadFromCompressedFile(path);
} | [
"public static String getPrimitiveDefsFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + primitiveDefFileName;\n }",
"public static PrimitiveDefList loadPrimitiveDefs(String partName) {\n String path = getPrimitiveDefsFileName(partName);\n return (PrimitiveDefList) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the nocEchoSuppression value for this PmRule. | public java.lang.Integer getNocEchoSuppression() {
return nocEchoSuppression;
} | [
"public void setNocEchoSuppression(java.lang.Integer nocEchoSuppression) {\r\n this.nocEchoSuppression = nocEchoSuppression;\r\n }",
"public com.github.jtendermint.jabci.types.Types.ResponseEchoOrBuilder getEchoOrBuilder() {\n if ((valueCase_ == 2) && (echoBuilder_ != null)) {\n return e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints name and rating on one line | public void print() {
System.out.println(name + " -- " + rating + " -- " + phoneNumber);
} | [
"public void print() { // Prints name and rating on one line\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}",
"public String ratingToString() {\n String a=\"\";\n for(int i=0;i<rating;i++){\n a+=\"*\";\n }\n return a;\n }",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reset undos back to original count to three | public void resetUndos() {
undos = 3;
} | [
"public void updateUndos() {\n\t\tundos--;\n\t}",
"public void resetCount() {\n\t\tcount = 0;\n\t}",
"public final void resetNumDiscardedThisTurn() {\n this.numDiscardedThisTurn = 0;\n }",
"public void resetCount() {\r\n\t\tthis.count = 0;\r\n\t\tthis.isCounting = true;\r\n\t}",
"public void reset... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add: takes in both the key and value. This method should hash the key, and add the key and value pair to the table, handling collisions as needed. | public boolean add(String key, String value){
// takes a key and turns it into a hashed thing
int arrIndex = hash(key);
Entry entry = new Entry(key, value);
if (hashTableArray[arrIndex] == null){
hashTableArray[arrIndex] = new LinkedList<>();
}
if(c... | [
"@Override\n public V add(K key, V value) {\n if ((key == null) || (value == null)) throw new IllegalArgumentException(\"Cannot add null to a dictionary.\");\n int index = probe(key);\n if (table[index] == null || table[index].available) { //Entry not found\n table[index] = new En... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XUnaryOperation__OperandAssignment_0_2" $ANTLR start "rule__XCastedExpression__TypeAssignment_1_1" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17388:1: rule__XCastedExpression__TypeAssignment_1_1 : ( ruleJvmTypeReference ) ; | public final void rule__XCastedExpression__TypeAssignment_1_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17392:1: ( ( ruleJvmTypeR... | [
"public final void rule__XCastedExpression__TypeAssignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30691:1:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subtract the given otherFraction from the current fraction. That is, thisFraction otherFraction. | public Fraction subtract(Fraction otherFraction) {
//new
Fraction theNewFraction= new Fraction(numerator, denominator);
//numerator calculation
theNewFraction.numerator = this.numerator*otherFraction.denominator-
this.denominator*otherFraction.numerator;
//denominator calculation
theNewFractio... | [
"public Fraction minus(Fraction other) {\n int finder = MathUtils.findLowestCommonMultiple(denominator, other.getDenominator());\n\n int idk = finder/denominator;\n int idc = finder/other.getDenominator();\n int fraction = (idk * getNumerator()) - (idc * other.getNumerator());\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table t_member_transaction | @Select({
"select",
"id, date, member_id, money, order_number, pay_by, transactios, status, park_id",
"from t_member_transaction",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(co... | [
"@SelectProvider(type=TMemberTransactionSqlProvider.class, method=\"selectByExample\")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"date\", property=\"date\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"member_id\", propert... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overwrites where the cursor used to be with blank spaces and draws it at its new position. Options should be 0indexed. | private void drawCursor(final Terminal term, int prevOption, int curOption)
{
// create a blank string and use it to clear where the cursor used to be
String blank = "";
for (int i = 0; i < cursor.length(); i++)
{
blank += SPACE;
}
LanternaUtil.termPrint(t... | [
"public void setCursorPosition();",
"void setCursorPos( int pos );",
"private void resetCursorPos() {\n cursor.setX(0);\n cursor.setY(0);\n }",
"public void moveCursorToStart();",
"public synchronized void alternateCursor() {\r\n\t\tif (tempText == null)\r\n\t\t\treturn;\r\n\t\tGraphics2D g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the vehicle name | public String getVehicleName() {
return itemName;
} | [
"public String getVehicleName() {\n return vehicleName;\n }",
"public String getVehicleName() {\n\t\treturn carriage.getName();\n\t}",
"java.lang.String getHotelName();",
"public String getVehicle() {\n return vehicle;\n }",
"public String getCarteName() {\n return carteName;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of parameter group descriptions. If a parameter group name is specified, the list contains only the descriptions for that group. | DescribeParameterGroupsResult describeParameterGroups(DescribeParameterGroupsRequest describeParameterGroupsRequest); | [
"TParameterGroupList getParameterGroupList();",
"public List<GroupParameter> getParameters();",
"DescribeCacheParameterGroupsResult describeCacheParameterGroups();",
"public List<TreePositionDescriptionGroup> getDescGroups();",
"DescribeCacheParameterGroupsResult describeCacheParameterGroups(DescribeCachePa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ description: sends customized HTTP Response as per Request getRES: the Resource as per mentioned in GET Request link: the Socket opened for Client Request return: true/false as per Response sent | public boolean sendHTTPResponseGET(String getRES, Socket link) throws IOException{
DataOutputStream ds = new DataOutputStream(link.getOutputStream());
resourceHandler.ServerSideScripter objSvrSidScr = new resourceHandler.ServerSideScripter();
String res=null;
String WEBDOCS = serverConfig.ServerPaths.WE... | [
"public String receiveResponse()\n\t{\n\t\t\n\t}",
"public Response status(int socket);",
"OutputStream getResponseOutputStream();",
"public static String readRespone() throws IOException {\r\n InputStream inputStream = null;\r\n if (conn != null) {\r\n inputStream = conn.getInputStream();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implement this interface to provide mappings for BioPAX xrefs to GPML xrefs. | public interface XrefMapper {
/**
* Map the xref property for the given BioPAX element
* to the GPML pathway element.
* @param e The BioPAX element
* @param pwElm The GPML element
*/
public void mapXref(Entity e, PathwayElement pwElm);
} | [
"public void mapXref(Entity e, PathwayElement pwElm);",
"@ApiModelProperty(example = \"null\", value = \"Database cross-references. These are usually CURIEs, but may also be URLs. E.g. ENSEMBL:ENSG00000099940 \")\n public List<String> getXrefs() {\n return xrefs;\n }",
"public List<String> getAllXrefs() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |