query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Returns bowler with top bowling strike rate, 5Ws and 4Ws | public Bowler getBowlerWithTopBowlingStrikeRateWith5WsAnd4Ws() throws IPLAnalyserException {
checkEmptyList(bowlerList);
Comparator<Bowler> bowlerComparator = Comparator.comparing(s -> s.getFourWicket() + s.getFiveWicket());
bowlerComparator = bowlerComparator.reversed();
bowlerComparato... | [
"public Bowler getBowlerWithTopBowlingStrikeRate() throws IPLAnalyserException {\n checkEmptyList(bowlerList);\n Comparator<Bowler> bowlerComparator = Comparator.comparing(Bowler::getStrikeRate);\n return sortList(bowlerComparator, bowlerList).get(0);\n }",
"public Bowler getBowlerWithBest... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a sleep token acquirer for the specified display with the specified tag. | public abstract SleepTokenAcquirer createSleepTokenAcquirer(@NonNull String tag); | [
"public interface SleepTokenAcquirer {\n\n /**\n * Acquires a sleep token.\n * @param displayId The display to apply to.\n */\n void acquire(int displayId);\n\n /**\n * Releases the sleep token.\n * @param displayId The display to apply to.\n */\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end / Add userB to userA's Chat Returns empty string on success. Else error string. | public static String AddToChat(Messenger esql, int chatId, String userA, String userB) {
try {
String query = String.format("select editChatList(%d,'%s','%s',1) as retVal;",chatId,userA,userB);
String retVal = esql.executeQueryStr(query);
return retVal;
}
catch(Exception e) {
//return e.getMessage();... | [
"public void requestAddUserToChat(String otherUsername){\n System.out.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.flush();\n }",
"private void addUserToChatroom() {\n\t\tString usern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__DistributedEventUpdate__Group_1__1" $ANTLR start "rule__DistributedEventUpdate__Group_1__1__Impl" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6478:1: rule__DistributedEventUpdate__Group_1__1__Impl : ( ( rule__DistributedEventUpdate__AssigneeAssignment_1... | public final void rule__DistributedEventUpdate__Group_1__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6482:1: ( ( ( rule__DistributedEventUpdate_... | [
"public final void rule__DistributedEventUpdate__Group_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:6155:1: ( ( ( rule__Distributed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
__________________________________________________________________________ Setters __________________________________________________________________________ Called by constructor method or can be called externally if wish to change k. Sets k value to be used as well as initializes arrays necessary for k of that size | public void setK(int kval){
// Set K value
this.k = kval;
// Init cluster size array. Stores number of points assigned to each
// cluster in step 1.
this.cs = new int[kval];
} | [
"public MyCircularQueue(int k) {\n this.data = new int[k];\n this.dataSize = k;\n }",
"public MyCircularDeque(int k) {\n emelent = new int[k];\n }",
"public KTree (E[] arrayTree, int k)\r\n\t{\r\n\t\tkFactor = k;\r\n\t\theight = 0;\r\n\t\tsize = 0;\r\n\t\tcurrentHeight = 0;\r\n\t\t\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compute sum weights of a term in relevant or irrelevant documents | private double computeSumWeightDocuments(String term, ArrayList<Integer> listDocumentsSameType) {
double sumWeightDoc = 0.0;
Iterator iterator = listDocumentsSameType.iterator();
while (iterator.hasNext()) {
int indexDocument = (Integer) iterator.next();
try {
... | [
"private void ComputeWeights() {\r\n // The importante is equal to the product between the number of times\r\n // the word appears in the document (term frequence) with \r\n // the inverted document frequence. It is presumed that the term frequence\r\n // has been already computed and is... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set a notification message. The message will be show on the client screen as a notification. | public void setNotify(String message) {
set("notify", message);
} | [
"public void setNewNotificationMessage() {\n newNotificationMessage.insert(0, newLine + \"-----------------------------\" +\n \"-------------------\\n\");\n newLine=\"\";\n displayLabel.setText(this.newNotificationMessage.toString());\n }",
"public void displayNotificationMe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to find a student by its id | Student findById(String id); | [
"public Student findStudent(int id);",
"public Student getStudent(Integer id);",
"Student get(long id);",
"Student getStudentById(Long id);",
"public Student findStudent(int id){\t\t\n\t\tfor (Student currentStudent : students){\n\t\t\tif (currentStudent.getStudentID() == id)\n\t\t\t\treturn currentStudent;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ isExtended Test if the given ExtendedValueType is extended (as opposed to / being simple). | public boolean isExtended() {
return !isSimple();
} | [
"public void test_containsExtendedElement_accuracy() {\n instance.addExtendedElement(element);\n assertTrue(\"The element is not added properly.\", instance.containsExtendedElement(element));\n }",
"public boolean bitsGE(ExtendedValueType VT) {\n\t\tif (this.equals(VT)) \n\t\t\treturn true;\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make an http PUT request for the given path with provided JSON body. | CompletableFuture<Response> put(final String path, final String data) {
final Request request =
requestBuilder(path)
.method("PUT", RequestBody.create(parse(MediaType.APPLICATION_JSON), data))
.build();
log.debug("Making POST request to {}", request.url().toString());
return ... | [
"protected Response put(Object payload, Object... pathArgs) throws IOException {\n URL url = getApiUrl(pathArgs);\n Entity<?> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);\n return (invocation(url, null).put(entity));\n }",
"private Response applyPUTRequest(String url, Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
second thread responsible for refreshing the first thread every 17ms at 60fps | private void frameRateThread(){
Runnable runnable = new Runnable() {
@Override
public void run() {
sleep(); // seperate thread to sleep every 17 ms for 60 fps
}
};
Thread frameThr = new Thread(runnable);
frameThr.start();
} | [
"@Override\n public void run(){\n\n while(true){\n\n repaint();\n try {\n Thread.sleep(1000 / frameRate);\n } catch (InterruptedException e) {}\n \n \n }\n }",
"@Override\n public v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the fragment that shows a info panel of the currently selected media object. Uses lazy instantiation. | private MediaObjectInfoFragment getMOFrag(){
if(mofrag == null){
mofrag = new MediaObjectInfoFragment();
}
return mofrag;
} | [
"public InfoView getInfoView() {\r\n return infoPanel;\r\n }",
"private JPanel getSelectedInfoPanel() {\r\n return this.infoPanelRef;\r\n }",
"public InfoPanel getInfoPanel() {\n return infoPanel;\n }",
"private Widget getInfo() {\n FocusPanel infoPanel = new FocusPanel();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the current user, or throws an exception, if the user is not authenticated yet. | public static UserDetails getCurrentUser() {
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication authentication = securityContext.getAuthentication();
if (authentication != null) {
if (authentication.getPrincipal() instanceof User) {
r... | [
"public static User getCurrentUser() {\n\t\treturn ApplicationContext.getInstance().getCurrentUser();\n\t}",
"public UserDetails getLoggedInUser() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n if (auth != null && auth.isAuthenticated()\n && !(Secu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.org.naru.park.CommonAction all = 1; | org.naru.park.ParkController.CommonActionOrBuilder getAllOrBuilder(); | [
"org.naru.park.ParkController.CommonAction getAll();",
"public org.naru.park.ParkController.CommonAction getAll() {\n return all_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : all_;\n }",
"@Override\n public void Action(Robot r){}",
"protected abstract int getAllActionM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Remove body from Box2D world when we're done. | public void destroy(){
super.destroy();
if(body != null){
body.getWorld().destroyBody(body);
body = null;
}
} | [
"public void destroyBody(){\n if(body != null){\n world.destroyBody(body);\n this.body = null;\n }\n }",
"public void onRemoveRigidBody(GVRWorld world, GVRRigidBody body);",
"void removeFromWorld(){\r\n\t\tassert (this.getWorld() != null && !this.getWorld().hasAsGameObject... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Runs as a separate thread capturing all output in a StringBuffer | public void run() {
try {
byte b[] = new byte[100];
for (;;) {
int n = in.read(b);
String str;
if (n < 0) {
break;
}
str = new String(b, 0, n);
buffer.append(str)... | [
"public void run()\n {\n int read;\n String line;\n\n try\n {\n while((read = from.read(buffer)) != -1)\n {\n line = \"\";\n for(int i=0;i<read;i++)\n line = line + (char)buffer[i];\n ioPanel.writeOutput(line);\n }\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete Genomic Data Sharing Plan Document | public String deleteGdsFile() {
logger.info("deleteGdsFile()");
try {
if (getDocId() == null) {
inputStream = new ByteArrayInputStream(
getText("error.doc.id").getBytes("UTF-8"));
return INPUT;
}
fileUploadService.deleteFile(getDocId());
gdsPlanFile = fileUploadService.retri... | [
"@Override\n\tpublic void delete(final Document document) throws AvpExploitException {\n\t\tfsprocMirror.deleteFile(document.getEmpreinte().getEmpreinteUnique());\n\n\t\t// Lancer suppression de fichier du document dans unite mirror\n\t\tfsprocMaster.deleteFile(document.getEmpreinte().getEmpreinteUnique());\n\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
double player_lng = 4; | @java.lang.Override
public double getPlayerLng() {
return playerLng_;
} | [
"@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }",
"public Builder setPlayerLng(double value) {\n \n playerLng_ = value;\n onChanged();\n return this;\n }",
"public void setLng(double lng);",
"public int getCurrPoints(){\n return playerPoints;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This adds a property descriptor for the Field Names feature. | protected void addFieldNamesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RuleDependency_fieldNames_feature"),
getString("_UI_PropertyDescrip... | [
"void addField(\n JavaSymbolName propertyName,\n JavaType propertyType,\n String columnName,\n String columnType,\n JavaType className\n );",
"protected void addNamePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemProp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ID of the Amazon Route 53 hosted zone associated with the load balancer. | public String getCanonicalHostedZoneId() {
return this.canonicalHostedZoneId;
} | [
"public Integer getZoneId() {\n\t\treturn zoneId;\n\t}",
"public Integer getZoneId() {\n return zoneId;\n }",
"public String getNextHostedZoneId() {\n return this.nextHostedZoneId;\n }",
"public Long getZoneId() {\n return zoneId;\n }",
"public ZoneId getZoneId() {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Upsert a pressure reading. | @Insert
boolean upsertPressure(SpacecraftPressureOverTime reading); | [
"@Insert\n boolean upsertTemperature(SpacecraftTemperatureOverTime reading);",
"private void readPressure() {\n try {\n m_pressureSensor.write(0xF4, (byte) 0xF4);//Configure Data Register\n Thread.sleep(26);\n byte[] buffer = new byte[3];//Declares a buffer which will ho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates the properties that are different given the type and driver specified for the publishing server. | private void validateProperties(PSPublishServerInfo pubServerInfo, String siteId, boolean isNew) throws PSValidationException, PSPubServerServiceException {
String driver = pubServerInfo.findProperty(IPSPubServerDao.PUBLISH_DRIVER_PROPERTY);
String type = pubServerInfo.getType();
String serverTy... | [
"private void validatePropertiesByDriver(PSPublishServerInfo pubServerInfo, String[] requieredProperties) throws PSValidationException {\n PSValidationErrorsBuilder builder = validateParameters(\"validatePropertiesByDriver\");\n String val = pubServerInfo.findProperty(IPSPubServerDao.PUBLISH_AS3_USE_A... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test noHdfsChecking option can detect region is not in meta but deployed. However, it can not fix it without checking Hdfs because we need to get the region info from Hdfs in this case, then to patch the meta. | @Test (timeout=180000)
public void testFixMetaNotWorkingWithNoHdfsChecking() throws Exception {
TableName table =
TableName.valueOf("testFixMetaNotWorkingWithNoHdfsChecking");
try {
setupTable(table);
assertEquals(ROWKEYS.length, countRows());
// Mess it up by deleting a region from... | [
"@Test (timeout=180000)\n public void testHDFSRegioninfoMissing() throws Exception {\n TableName table = TableName.valueOf(\"tableHDFSRegioninfoMissing\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the meta data\n admi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate and return a localized message from all the constituent exceptions | public String getLocalizedMessage() {
StringBuilder sb = new StringBuilder();
for (X x : exceptions) {
if (sb.length() > 0) {
sb.append(lineSeparator);
}
sb.append(x.getLocalizedMessage());
}
return sb.toString();
} | [
"public String getMessage() {\n StringBuilder sb = new StringBuilder();\n for (X x : exceptions) {\n if (sb.length() > 0) {\n sb.append(lineSeparator);\n }\n sb.append(x.getMessage());\n }\n return sb.toString();\n }",
"public String g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method used to print the SOAP Response | private static void printSOAPResponse(SOAPMessage soapResponse) throws Exception {
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
Source sourceContent = soapResponse.getSOAPPart().getContent();
Str... | [
"private static void printSOAPResponse(SOAPMessage soapResponse) throws Exception {\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n Source sourceContent = soapResponse.getSOAPPart().getContent();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /salaries/:id : delete the "id" salary. | @DeleteMapping("/salaries/{id}")
@Timed
public ResponseEntity<Void> deleteSalary(@PathVariable Long id) {
log.debug("REST request to delete Salary : {}", id);
salaryService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).bu... | [
"@DeleteMapping(\"/employee-salary-slips/{id}\")\n @Timed\n public ResponseEntity<Void> deleteEmployeeSalarySlip(@PathVariable Long id) {\n log.debug(\"REST request to delete EmployeeSalarySlip : {}\", id);\n employeeSalarySlipService.delete(id);\n return ResponseEntity.ok().headers(Heade... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test host selector against a real server and test what happens after calling | public void testNodeSelector() throws Exception {
try (RestClient restClient = buildRestClient(firstPositionNodeSelector())) {
Request request = new Request("GET", "/200");
int rounds = between(1, 10);
for (int i = 0; i < rounds; i++) {
/*
* R... | [
"public void testSetHost() {\n }",
"public void testServerFound()\n {\n }",
"@Test\n public void hostNetworkTest() {\n // TODO: test hostNetwork\n }",
"public void testGetHost() {\n }",
"@Test\n public void testDuplicateHttp() throws Exception {\n selector.select(URI.create(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A graph that is both Dirtiable (values can be deleted) and Evaluable (values can be added). All methods in this interface (as inherited from superinterfaces) should be threadsafe. This class is not intended for direct use, and is only exposed as public for use in evaluation implementations outside of this package. | @ThreadSafe
public interface ProcessableGraph extends DeletableGraph, EvaluableGraph {} | [
"public interface GraphStorage {\r\n\r\n /**\r\n * All nodes in the graph. It can be used to iterate all at once,\r\n * too costly something like depth-first search or breadth first search.\r\n * Graph representations normally do not provide this functionality\r\n * directly, here this can be a b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invoked when rows have been inserted into the underlying model in the specified range (inclusive). The arguments give the indices of the effected range. The first argument is in terms of the model before the change, and must be less than or equal to the size of the model before the change. The second argument is in ter... | public abstract void rowsInserted(int firstRow, int endRow); | [
"public void setModelIndexRangeMessage(String modelIndexRangeMessage);",
"public void setModelIndexRangePolicy(String modelIndexRangePolicy);",
"void setRange(int newRange);",
"void setRangeIncrement(int value);",
"public boolean addIndexEntries( int fromSeqNum, int toSeqNum );",
"public void spreadsheetI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates if S3 Block Public Access is set to BlockPublicAcls. | public Boolean isBlockPublicAcls() {
return this.blockPublicAcls;
} | [
"public Boolean getBlockPublicAcls() {\n return this.blockPublicAcls;\n }",
"public Boolean isIgnorePublicAcls() {\n return this.ignorePublicAcls;\n }",
"public Boolean isBlockPublicPolicy() {\n return this.blockPublicPolicy;\n }",
"public Boolean isRestrictPublicBuckets() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
slect ..... from.... where ... order by ?1 ?2 order by price asc search?keyword=ddd&category=7,7,7& | @GetMapping("/search")
public List<ItemFull> searchByKeyword(@RequestParam String keyword, @RequestParam List<Integer> category,
@RequestParam String sort) {
// System.out.println("sort:\t" + sort);
System.out.println("--------------------------------------");
List<Long> articles;
ArrayList<Long> resu... | [
"public List<Books> searchBook(String keywords,String author,double low_price,double high_price){\n /*\n * search books by keywords of book_name\n * */\n List<Books> books=null;\n ResultSet resultSet=null;\n if(keywords!=\"\"&&author==\"\"&&low_price<0&&high_price<0){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the widget refresh rate. | public int getWidgetRefreshRate() {
return mWidgetRefreshRate;
} | [
"public final int getRefreshRate() {\r\n return settings.getRefreshRate();\r\n }",
"public double getRefreshRate(){\n\t\treturn refreshRate;\n\t}",
"public abstract int getRefreshRate();",
"public double getRefresh(){\n\t\treturn refresh;\n\t}",
"public int getRefreshFreq() {\n return m_refresh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table tb_email_template | emailTemplateWithBLOBs selectByPrimaryKey(Integer emailTemplateId); | [
"public void setEmailTemplate(java.lang.String value);",
"java.lang.String getTemplateId();",
"public void createSubjectTable() {\n LOGGER.info(\"Entered createSubjectTable()\");\n\n JdbcTemplate jdbcTemplate = new JdbcTemplate(getJdbcTemplate().getDataSource());\n jdbcTemplate.execute(CREA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the orderDocId property value | public void setOrderDocId(String orderDocId) {
this.orderDocId = orderDocId;
} | [
"public void setbvOrderDocId(Number value) {\n ensureVariableManager().setVariableValue(\"bvOrderDocId\", value);\n }",
"public String getOrderDocId() {\r\n return this.orderDocId;\r\n }",
"public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }",
"public void setDoc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calcs x2p by purchased game | public abstract int x2pByPurchasing(double preco); | [
"@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to check if this is the same object with a given object by comparing name of both folders | @Override
public boolean equals(@Nullable Object o) {
if (o instanceof Folder) {
return this.name.equalsIgnoreCase(((Folder) o).name);
}
return false;
} | [
"@cli.System.Security.SecuritySafeCriticalAttribute.Annotation\n public boolean equals(Object o) {\n if (o == null || !(o instanceof Win32ShellFolder2)) {\n // Short-circuit circuitous delegation path\n if (!(o instanceof File)) {\n return super.equals(o);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modifies the Matrix by exchanging row i with row j | public void exchangeRows(int i, int j){
for (int m=0; m<this.getNumCols(); m++) {
double temp = this.values[i][m];
this.values[i][m] = this.values[j][m];
this.values[j][m] = temp;
}
} | [
"private static <F extends FieldElement<F, ?>> void swap(EditableMatrix<F> A, int i, int k, int j){\r\n\t\tfinal int m = A.columnsCount();\r\n\t\tfor(int q=j - 1; q<m; q++){\r\n\t\t\tF temp = A.get(i,q);\r\n\t\t\tA.set(i,q,A.get(k,q));\r\n\t\t\tA.set(k,q,temp);\r\n\t\t}\r\n\t}",
"public void updateMatrix();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /etapas/:id : delete the "id" etapa. | @DeleteMapping("/etapas/{id}")
@Timed
public ResponseEntity<Void> deleteEtapa(@PathVariable Long id) {
log.debug("REST request to delete Etapa : {}", id);
etapaService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build()... | [
"@DeleteMapping(\"/{id}\")\n public void deleteVenda(@PathVariable(\"id\") Long id) {\n vendaRepository.deleteById(id);\n }",
"@DeleteMapping(\"/faixa-etarias/{id}\")\n @Timed\n public ResponseEntity<Void> deleteFaixaEtaria(@PathVariable Long id) {\n log.debug(\"REST request to delete FaixaEtari... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("Checking if " + state.get(i).token.normalizedPitch + " in " + chordNotes); | @Override
public boolean isSatisfiedBy(LinkedList<T> state, int i) {
T t = state.get(i);
if (t instanceof StateToken) {
// if (!chordNotes.contains(((StateToken<PitchToken>)state.get(i)).token.normalizedPitch%12)) {
// System.out.println("StateToken " + state.get(i) + " didn't satisfy " + this);
// }
... | [
"@Override\n\t\tpublic boolean isSatisfiedBy(LinkedList<T> state, int i) {\n\t\t\tT t = state.get(i);\n\t\t\tif (t instanceof StateToken) {\n//\t\t\t\tif (!chordNotes.contains(((StateToken<PitchToken>)state.get(i)).token.normalizedPitch%12)) {\n//\t\t\t\t\tSystem.out.println(\"StateToken \" + state.get(i) + \" didn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that grabs all data with a specific HRID | public String[] displayData(String tableName, int hrid) {
String[] resultArray; //String array to store processed results from a result set
dao.connect();
dao.setAutoCommit(false);
rs = dao.executeSQLQuery("SELECT * FROM " + tableName + " WHERE HRID = " ... | [
"@GetMapping(\"/GetHR/{hrId}\")\r\n public Optional<HR> getHR(@PathVariable String hrId) {\r\n return admin.getHR(hrId);\r\n }",
"@GetMapping(\"/GetAllHRs\")\r\n public List<HR> viewAllHRs() {\r\n return admin.viewAllHRs();\r\n }",
"public Halls selectByIDHalls(Integer id) {\n H... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint32 baseballNum = 1; | boolean hasBaseballNum(); | [
"int getBaseballNum();",
"public int getBaseballNum() {\n return baseballNum_;\n }",
"public int getBaseballNum() {\n return baseballNum_;\n }",
"public int get_ball_number(){\n return this.ball_number;\n }",
"public Builder setBaseballNum(int value) {\n bitField0_ |= 0x... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleClassifierOperationCS" $ANTLR start "entryRuleEnumerationCS" ../org.eclipse.qvto.examples.xtext.qvtoperational/srcgen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:2035:1: entryRuleEnumerationCS returns [EObject current=null] : iv_ruleEnumerationCS= ruleEn... | public final EObject entryRuleEnumerationCS() throws RecognitionException {
EObject current = null;
EObject iv_ruleEnumerationCS = null;
try {
// ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/I... | [
"public final EObject entryRuleEnumerationLiteralCS() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleEnumerationLiteralCS = null;\r\n\r\n\r\n try {\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtop... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Info related to ANTS. | void antsInfo(String text); | [
"public void showAnts() {\n\t\tfor (int i = 0; i < this.getNumberOfAnts(); i++) {\n\t\t\tSystem.out.println(this.getAnt(i));\n\t\t}\n\t}",
"private void _generateATa(TaInfo ta) {\n\t String id = _getId(CS_C_GRADSTUD, ta.indexInGradStud);\n writer_.startAboutSection(CS_C_TA, id);\n if(globalVersionTrigger){... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an initialized map of String(Profile id)>Profile. | protected Map getProfileMap() {
if (profiles != null) {
Map result = (Map) profiles.get();
if (result != null)
return result;
}
Map result = restore();
if (result == null)
result = new LinkedHashMap(8);
profiles = new SoftReference(result);
return result;
} | [
"public Map<String, TrippiProfile> getProfiles() throws TrippiException {\n Properties p = loadProps();\n Map<String, TrippiProfile> profileMap = new HashMap<String, TrippiProfile>();\n Enumeration<?> e = p.propertyNames();\n while (e.hasMoreElements()) {\n String key = (Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of Courts for the given language | public Map<Integer, String> getCourtNames(String language); | [
"public List<Currency> getListOfCurrencies(String language);",
"private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getNam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Local Endpoint Configuration'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseLocalEndpointConfiguration(LocalEndpointConfiguration object) {
return null;
} | [
"public T caseLocalHTTPEndpointConfiguration(LocalHTTPEndpointConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public T caseLocalTSTPEndpointConfiguration(LocalTSTPEndpointConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public T caseLocalSSLEndpointConfiguration(LocalSSLEndpointConfiguration object) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use Count.newBuilder() to construct. | private Count() {} | [
"private Count(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Counter(int count)\n {\n this.setCount(count);\n }",
"public Counter() {\n this.count = 0;\n }",
"public Counter() {\n mCount = 0;\n }",
"public BasicCount... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column FreeHost_Product_VPS.CDNMB28 | public void setCdnmb28(Integer cdnmb28) {
this.cdnmb28 = cdnmb28;
} | [
"public void setCdnmb12(Integer cdnmb12) {\r\n this.cdnmb12 = cdnmb12;\r\n }",
"public void setCdnmb16(Integer cdnmb16) {\r\n this.cdnmb16 = cdnmb16;\r\n }",
"public void setCdnmb8(Integer cdnmb8) {\r\n this.cdnmb8 = cdnmb8;\r\n }",
"public void setCdnmb2(Integer cdnmb2) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Listing group. .google.ads.googleads.v0.common.ListingGroupInfo listing_group = 32; | com.google.ads.googleads.v0.common.ListingGroupInfo getListingGroup(); | [
"com.google.ads.googleads.v0.common.ListingGroupInfoOrBuilder getListingGroupOrBuilder();",
"boolean hasListingGroup();",
"private GroupedListHeroWidget.Group createSampleListGroup(final String groupName, final int groupSize) {\n if (groupSize < 0) {\n return null;\n }\n\n // Cre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get method "getDirection" to return the Direction object "dir" | public Direction getDirection()
{
return dir;
} | [
"Direction getTurnDir();",
"public Vector2 getDirection() { return direction.cpy(); }",
"int getDirection();",
"Direction getMoveDir();",
"default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }",
"public double getDirection() {\n return directi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the port harbour code of this dm port harbour. | public java.lang.String getPortHarbourCode() {
return _dmPortHarbour.getPortHarbourCode();
} | [
"public java.lang.String getPortHarbourCode() {\n\t\treturn _tempNoTiceShipMessage.getPortHarbourCode();\n\t}",
"@AutoEscape\n\tpublic String getPortHarbourCode();",
"@Override\n\tpublic java.lang.String getPortHarbourCode() {\n\t\treturn _tempNoTiceShipMessage.getPortHarbourCode();\n\t}",
"public int getPort... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional bool isPerMsg = 106; | boolean getIsPerMsg(); | [
"boolean hasIsPerMsg();",
"public boolean getIsPerMsg() {\n return isPerMsg_;\n }",
"public boolean hasIsPerMsg() {\n return ((bitField1_ & 0x00000001) == 0x00000001);\n }",
"boolean isMessage();",
"public boolean hasIsPerMsg() {\n return ((bitField1_ & 0x00000800) == 0x00000800);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove all commands from scheduler | public void removeAllCommands(); | [
"public void deleteCommands() {\n\t\tcommands = new ArrayList<Command>();\n\t\tassert(commands.size() == 0);\n\t}",
"void deleteLatestCommand();",
"void clearTasks();",
"public void clearCommandQueue() {\n commander.clearQueue();\n }",
"public void removeAllCommands()\r\n {\r\n if (isTim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "border" attribute. | @JsxGetter
public String getBorder() {
final String border = getDomNodeOrDie().getAttribute("border");
return border;
} | [
"public java.lang.String getBorder() {\n return border;\n }",
"public int getBorder() throws Jaxception\n {\n return getPropertyInt( \"border\" );\n }",
"public Border getBorder() {\n\t return border;\n\t}",
"public double getBorder() {return border;}",
"public Border getBorder()\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find whether or not the actor intersects with others | public boolean intersects(Actor other) {
double d = getDistance(other);
if(d <= (getRadius()+other.getRadius())/2) {
return true;
}else {
return false;
}
} | [
"boolean intersects( Geometry gmo );",
"boolean collidesWith(PhysObj other);",
"@Override\n\tpublic boolean intersects(GameObject other)\n\t{\n\t\treturn getCollider().intersects(other.getCollider().getBounds2D());\n\t}",
"public boolean areIntersecting() {\n return intersection != null;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses a given XML string. | public static Element parseString(String xml_string)
throws ParserConfigurationException, SAXException, IOException {
InputSource is = new InputSource(new StringReader(xml_string));
DOMParser parser = new DOMParser();
parser.parse(is);
Document doc = parser.getDocument();
return doc.getDocument... | [
"public String parseXML(String xmlString, String attribute){\n SAXBuilder saxBuilder = new SAXBuilder(XMLReaders.DTDVALIDATING);\n Document doc = null;\n try {\n doc = saxBuilder.build(new StringReader(xmlString));\n System.out.println(\"Recived XML:\");\n print... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the current CarrierShape parent of the shape | public CarrierShape parent()
{
return parent;
} | [
"public RMParentShape getParent() { return _parent; }",
"public RMShape getRootShape() { return _parent!=null? _parent.getRootShape() : this; }",
"public GateContainer getParent() {\r\n\treturn parent;\r\n }",
"public DimensionalObject getParent();",
"public GObject getParent() {\n\t\treturn parent_;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__BarChart__Group__3__Impl" $ANTLR start "rule__BarChart__Group__4" InternalMyDsl.g:5999:1: rule__BarChart__Group__4 : rule__BarChart__Group__4__Impl rule__BarChart__Group__5 ; | public final void rule__BarChart__Group__4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:6003:1: ( rule__BarChart__Group__4__Impl rule__BarChart__Group__5 )
// InternalMyDsl.g:6004:2: rule__BarChart__Group__4__Impl rule__Ba... | [
"public final void rule__BarChart__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:6015:1: ( ( RULE_SEMICOLON ) )\n // InternalMyDsl.g:6016:1: ( RULE_SEMICOLON )\n {\n // Intern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Queues a file response to the channel that issued the command. | public void sendFile(File toRespondWith, String extension)
{
GlobalLog.log(LogFilter.Response, "Sending file response");
event.getChannel().sendFile(toRespondWith, "return." + extension).queue();
} | [
"public void commandCompleted(boolean bSuccess,\n\t\t\t\t IpcFile replyFile);",
"public synchronized void crit_reply(String filename)\n {\n out.println(\"REPLY\");\n out.println(my_c_id);\n out.println(filename);\n }",
"protected void writeAndFlushResponseToClient(Channel channel) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column ZLNF_FOODINFO.NBBM | public void setNbbm(String nbbm) {
this.nbbm = nbbm == null ? null : nbbm.trim();
} | [
"public void setBNAMF(java.lang.String BNAMF) {\n this.BNAMF = BNAMF;\n }",
"public String getNbbm() {\n return nbbm;\n }",
"public void setBNAMLONGF(java.lang.String BNAMLONGF) {\n this.BNAMLONGF = BNAMLONGF;\n }",
"public void setBANK_CIF(BigDecimal BANK_CIF) {\r\n this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if the the int selectDir direction is less than the currentFloor the lift was called from | @Override
public boolean SelectDirection(int selectDir)
{
if(selectDir < currentFloor)
{
//move the lift down
selectedDirection = false;
}
//else if the int selectDir is greater than
//the currentFloor the lift was called from
els... | [
"public Elevator(int currentFloor, boolean direction)\n {\n if (currentFloor < 1)\n currentFloor = 1;\n\n else if (currentFloor > NUM_FLOORS)\n currentFloor = NUM_FLOORS;\n\n this.currentFloor = currentFloor;\n this.direction = direction;\n }",
"private void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Not flexible, "tedious" code: / System.out.println("10,000 at 2% interest = " + calculateInterest(10000.0, 2.0)); System.out.println("10,000 at 3% interest = " + calculateInterest(10000.0, 3.0)); System.out.println("10,000 at 4% interest = " + calculateInterest(10000.0, 4.0)); System.out.println("10,000 at 5% interest ... | public static void main(String[] args) {
for (int i = 0; i <= 5; i++) {
System.out.println("Loop " + i);
}
for (double interestRate = 2; interestRate <= 8; interestRate++) {
System.out.println("Interest on 10,000 = " + String.format("%.2f", calculateInterest(1000... | [
"public static void main(String[] args) {\n // Challenge Part 1\n for(int i = 2; i <= 8; i++){\n System.out.println(\"$10,000 at \" + i + \"% interest = $\" +\n String.format(\"%.2f\",calculateInterest(10000,i)));\n /* Output:\n $10,000 at 2% int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a MAIL command with a specified sender, but no additional mail parameters. | public MailCommand(@Nonnull final String sender) {
this(sender, null);
} | [
"public MailCommand(@Nonnull final String sender, @Nullable final Collection<MailParameter> mailParameters) {\n super(MAIL);\n this.sender = sender;\n this.mailParameters = mailParameters;\n }",
"public MailCommand() {\n this(\"\");\n }",
"public MailCommand(@Nonnull final Coll... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first e s f user e s f user role in the ordered set where esfUserRoleId = &63;. | public static it.ethica.esf.model.ESFUserESFUserRole findByESFUserRoleId_First(
long esfUserRoleId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
it.ethica.esf.NoSuchUserESFUserRoleException {
return getPersistence()
.fi... | [
"public static it.ethica.esf.model.ESFUserESFUserRole fetchByESFUserRoleId_First(\n\t\tlong esfUserRoleId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByESFUserRoleId_First(e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The animation id for the spell | int animationId(); | [
"public int getSpriteID() {\n\treturn currentAnimatedspriteID;\n }",
"public static int getAnimation (int weatherId) {\n if (weatherId >= 200 && weatherId <= 232) {\n return R.drawable.art_storm;\n } else if (weatherId >= 300 && weatherId <= 321) {\n return R.drawable.art_l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indique si la preuve est un contre exemple. | public boolean isContreExemple(); | [
"public boolean isPartiePrete(){\n if(nbClientReady >= nbClient && debut>0) {\n return true;\n }\n return false;\n }",
"private boolean getNeedTitle()\r\n\t{\n\t\tif (new EditionSpeService().ficheProducteurNeedEngagement()==false)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the progress of the seek bar. | public int getProgress() {
SeekBar seekBar = (SeekBar) targetObject;
return seekBar.getProgress();
} | [
"public int getSeekbarProgress();",
"private int updateProgress() {\n MediaPlayerController playerControl = layerManager.getControl();\n if (playerControl == null || isSeekBarDragging) {\n return 0;\n }\n\n int position = playerControl.getCurrentPosition();\n int duration = playerControl.getDu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
verify check successfully saved shows and new banner page displays | public boolean checkSuccessfullySavedShowsAndNewBannerPageDisplays() {
Configure.waitElementDisplay(3000);
boolean checkAlert = getTextElement(readElement(Interfaces.BannersPage.textAlertMessage))
.equals("Banner saved.");
return checkAlert && displayNewBannerPage();
} | [
"private void showSuccess() {\n if (binder.isValid()){\n Notification notification = Notification.show(\"Your Advert Has Been Updated \");\n notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);\n UI.getCurrent().getPage().reload();\n }\n }",
"public bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Finds all Cart Objects stored on Database | @Override
public List<Cart> findAllCarts() {
return em.createNamedQuery("Cart.findAll").getResultList();
} | [
"public List<Cart> retrieveAllCarts() throws UserApplicationException;",
"public List <CartItem> findAll() {\n\t\t\n\t\t//listing all the items in the cart from the SQL\n\t\treturn em.createQuery(\" FROM CartItem\", CartItem.class).getResultList();\n\t\t\n\t}",
"@Transactional(readOnly = true)\n public List<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method behaves similarly to the writeValueAsString(Object value) method except that it includes an indentation prefix that will be prepended to each line of the resulting string (except the first line). | String writeValueAsString(Object value, String indentation) throws JsonProcessingException {
PrettyPrinter printer = new BetterPrettyPrinter(indentation).withArrayIndenter(new DefaultIndenter());
return writer(printer).writeValueAsString(value);
} | [
"public static String writeValueAsPrettyString(Object value) throws JsonProcessingException {\n final JsonFactory factory = prettyMapper.getFactory();\n final SegmentedStringWriter sw = new SegmentedStringWriter(factory._getBufferRecycler());\n try {\n final JsonGenerator g = prettyM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the set of files that fall outside of the package boundaries, using a string to specify the package/scope. | public abstract FileSet getFilesOutsidePackage(String pkgSpec); | [
"public abstract FileSet getFilesOutsidePackage(int pkgId, int pkgScopeId);",
"@Nullable\n public Condition<PsiFile> getPackageFilesFilter(@NotNull PsiPackage psiPackage, @NotNull GlobalSearchScope scope) {\n return null;\n }",
"public abstract FileSet getFilesOutsidePackage(int pkgId);",
"public Iterato... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates company with budget provided as parameter. | public Company(double budget) {
this.budget = budget;
} | [
"void createCompany(Company company);",
"void addCompany(Company company);",
"@PostMapping(\"/budgets\")\n @Timed\n public ResponseEntity<Budget> createBudget(@RequestBody Budget budget) throws URISyntaxException {\n log.debug(\"REST request to save Budget : {}\", budget);\n if (budget.getId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new configuration instance for a specific url pattern. | UrlConfigurationConfigurer configurationFor(String matcher,
RequestConfiguration configuration); | [
"public interface UrlConfigurationConfigurer {\n\n /**\n * Create a new configuration instance for a specific url pattern.\n *\n * @param matcher nonnull ant path matcher for the url.\n * @param configuration configuration for the url matcher.\n * @return updated url configurer.\n *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a remote property service adapter for one device in the KNX network. The adapter uses a KNX network link for access, also is created by this method. | private PropertyAdapter createRemoteAdapter(InetSocketAddress local,
InetSocketAddress host, Map options) throws KNXException
{
final KNXMediumSettings medium = (KNXMediumSettings) options.get("medium");
if (options.containsKey("serial")) {
// create FT1.2 network link
final String p = (String) optio... | [
"private PropertyAdapter create(Map options) throws KNXException\r\n\t{\r\n\t\t// add a log writer for the console (System.out), setting a\r\n\t\t// user log level, if specified\r\n\t\tLogManager.getManager().addWriter(null,\r\n\t\t\tnew ConsoleWriter(options.containsKey(\"verbose\")));\r\n\t\t// create local and r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the node by point coordinates returning the node if it exists, null otherwise. | public Node<T> findNode(final Point point) {
final Integer nodeId = this.nodesIdsByCoordinates.get(point);
if (nodeId == null) {
return null;
} else {
return getNode(nodeId);
}
} | [
"private SearchNode findNodeWithCoords(HashSet<SearchNode> set, int x, int y){\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (cur.posX == x && cur.posY == y)\n\t\t\t\t\treturn cur;\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public GPSNode getNode(double x, double y){\n int i=0;\n while (i<nrOfNodes){\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a collection of string "types". | protected Place addTypes(Collection<String> types) {
this.types.addAll(types);
return this;
} | [
"public void addDojoTypes(Collection<String> types) {\n dojoTypes.addAll(types);\n }",
"public void addType(String name) {\n\t\tintOfTypes.add(intOfTypes.size());\n\t\tnameOfTypes.add(name);\n\t}",
"public void addStringListValue(int type, String value);",
"void setTypes(TypeDescription[] aTypes);",
"pr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ends the configuration of this response message | public ResponseMessageDefinition endResponseHeader() {
return response;
} | [
"public void endResponse()\n\t\t\t{\n\t\t\t\tsend(\"</response>\", false);\n\t\t\t}",
"void configurationDone();",
"protected Configuration endConfiguration() {\n final DefaultConfiguration config = (DefaultConfiguration) this.configurationStack.removeLast();\n if ( this.characters != null ) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Connect to the endpoint and return a connected Thrift transport. | @Override
public TTransportWrapper getTransport(HostAndPort endpoint) throws Exception {
return new TTransportWrapper(connectToServer(new InetSocketAddress(endpoint.getHostText(),
endpoint.getPort())),
endpoint);
} | [
"private static SlotManagementService.Client getServiceClient() throws TTransportException, ThriftClientException {\n\n if (client == null) {\n ClusterAgent clusterAgent = AndesContext.getInstance().getClusterAgent();\n InetSocketAddress thriftAddressOfCoordinator = clusterAgent.getThr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether the directives are valid for this cipher type, and sets if they are | @Override
public String canParametersBeSet(Directives dirs) {
String reason = super.canParametersBeSet(dirs);
if (reason != null)
return reason;
String alphabet = dirs.getAlphabet();
if (alphabet.length() != 26)
return "Alphabet has length "+alphabet.length()+... | [
"private void checkCharacterSet() {\n if (header.characterSet == null) {\n if (rootValidator.autorepair) {\n header.characterSet = new CharacterSet();\n rootValidator.addInfo(\"Header did not have a character set defined - corrected.\", header);\n } else {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all of the MethodDeclarations associated with the class | public List<MethodDeclaration> getMethodDeclarations() {
return methodDeclarations;
} | [
"public MethodDeclaration[] getMethods() {\n return m_classBuilder.getMethods();\n }",
"public List<ResolvedMethodDeclaration> getAllMethods() {\n List<ResolvedMethodDeclaration> allMethods = new LinkedList<>(this.getTypeDeclaration().getDeclaredMethods());\n getDirectAncestors().forEach(a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
decodes the XML attributes | @Override
public void decodeAttributes(HashMap<String, String> attrMap, XMLTokenizer tokenizer) {
ref = getRequiredAttribute("ref", attrMap, tokenizer);
program = getOptionalAttribute("program", attrMap);
super.decodeAttributes(attrMap, tokenizer);
} | [
"@Override\r\n public void decodeAttributes(HashMap<String, String> attrMap, XMLTokenizer tokenizer) { \r\n stage = getOptionalAttribute(\"stage\", attrMap);\r\n super.decodeAttributes(attrMap, tokenizer);\r\n }",
"private Map<String, Variant> decodeAttributeChange ( final Message message )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves images for HTML tags. | public static interface ImageGetter {
/**
* This methos is called when the HTML parser encounters an <img>
* tag. The <code>source</code> argument is the string from the "src"
* attribute; the return value should be a Drawable representation of
* the image or <code>null... | [
"@Path(\"/tags/{tag}\")\n\t@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getTagImages(@PathParam(\"tag\") String tag) {\n\t\tString[] imgNamesArray = GalleryImageDB.getInstance().getTagImageNames(tag);\n\n\t\tif(imgNamesArray.length==0) {\n\t return Response.status(Response.Status.NOT_FOUN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if device is a tablet | public static boolean isTablet() {
return TeamUp.getAppContext().getResources().getBoolean(R.bool.is_tablet);
} | [
"public boolean isTablet() { \n\t \tTelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t \tint type = telephony.getPhoneType();\n\t \tif (type == TelephonyManager.PHONE_TYPE_NONE) { return true;} \n\t \t return false; \n\t }",
"private Boolean c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True, if the reported attempt was a cache hit in a remote cache. bool cached_remotely = 6; | public boolean getCachedRemotely() {
return cachedRemotely_;
} | [
"boolean getCachedRemotely();",
"boolean canBeCached() {\n return (!noCache);\n }",
"public boolean isCached() { return cached; }",
"public boolean getCachedRemotely() {\n return cachedRemotely_;\n }",
"boolean isCached(IPAddress address) {\n return false; // just so it compile... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method used to retrieve a CategoryRule from the database. | public CategoryRule getCategoryRule(int userID, long categoryRuleID) {
CategoryRule categoryRule = null;
try {
PreparedStatement statement = connection.prepareStatement(GET_CATEGORYRULE);
statement.setInt(1, userID);
statement.setLong(2, categoryRuleID);
R... | [
"public String getRuleCategory() {\n\t\tlog.trace(\"Get ruleCategory, returns [{}]\", ruleCategory);\n\t\treturn ruleCategory;\n\t}",
"Category getCategory(String categoryId) throws Exception;",
"Category getCategoryById(int categoryId);",
"Category getCategoryById(int id);",
"public Category getCategoryByI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for series outlier markers. | public com.anychart.core.StateSettings outlierMarkers(Boolean settings) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".outlierMarkers(%s);", settings));
return this;
} | [
"public com.anychart.core.ui.MarkersFactory outlierMarkers() {\n return new com.anychart.core.ui.MarkersFactory(jsBase + \".outlierMarkers()\");\n }",
"public com.anychart.core.StateSettings outlierMarkers(String settings) {\n APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + \".ou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load the Question details by question Id. | @RequestMapping(value = "/loadQuestionDetails", method = RequestMethod.POST)
public @ResponseBody Question loadQuestionDetails(@RequestParam String questionId) {
Question question = new Question();
if (null != questionId && !questionId.equalsIgnoreCase("")) {
question = questionService.getQuestionById(Integ... | [
"Question getQuestion(String questionId);",
"List<Answer> loadAnswerByQuestionId(Long questionId);",
"Question getQuestionById(Long id);",
"Question getQuestionById(int questionId);",
"Question get(Integer id);",
"public Question getQuestion(long questionId) {\n List<Long> listOfId = new ArrayList<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If a ClientIO in the game is an AI Client, the AI is initialized to its preset AI level | private void setupAIPlayers() {
for (ClientIO io : this.getPlayers()) {
if (io instanceof FakeAIClientTCG) {
FakeAIClientTCG aiClient = (FakeAIClientTCG) io;
Entity player = playerFor(io);
AIComponent aiComponent = new AIComponent(aiClient.getAI());
aiComponent.setDelay(2000);
player.addCompone... | [
"public void setAI(boolean ai) {\r\n this.ai = ai;\r\n }",
"public void initAI() {\n ai = new ABEvalAI(this);\n aiThread = new Thread(ai);\n aiThread.start();\n }",
"@Override\n public boolean isAiOn()\n {\n return aiIsOn;\n }",
"public void createAI(int lobby... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a change set after it has been applied. | public void simpleAddChangeSet(Object changeSet) {
// check whether the change set was removed earlier
if (!this.removeRemovedChangeSet(changeSet)) {
this.addAddedChangeSet(changeSet);
}
} | [
"public void addRemovedChangeSet(Object changeSet) {\r\n this.getRemoves().addElement(changeSet);\r\n }",
"public void addAddedChangeSet(Object changeSet) {\r\n this.getAdds().addElement(changeSet);\r\n }",
"void setChangeSet(ChangeSet changeSet);",
"public void addChangedMapKeyChangeSet(O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load all GenericDaos from this spring bean's bean factory. | protected void initDaosFromSpringBeans() {
this.waitUntilApplicationContextIsReady();
final String[] beanNamesToLoad = this.m_applicationContext
.getBeanNamesForType(GenericDao.class);
for (final String name : beanNamesToLoad) {
if (!PatternMatchUtils.simpleMa... | [
"private void loadBeans() throws BeanCreationException {\n Map<Class<?>, Bean> discoveredClasses = context.getDiscoveredClasses();\n discoveredClasses.keySet().forEach(this::loadBean);\n }",
"@PostConstruct\n public void load()\n {\n datasources = new HashMap<>();\n String app... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
implement an explicit intent for opening the order activity | @Override
public void onClick(View view) {
Intent intent = new Intent(MainActivity.this, OrderActivity.class);
intent.putExtra(EXTRA_ORDER_KEY, mOrderMessage);
startActivity(intent);
} | [
"void navigateToOrderingDonut() {\n Intent gotoOrderDonut = new Intent(this, OrderingDonutActivity.class);\n startActivity(gotoOrderDonut);\n }",
"@Override\n public void onClick(View view) {\n Intent orderingPortalIntent = new Intent(getActivity(), NewOrderActivity.clas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build a null relay. | private Relay nullRelayBuilder() {
Relay relay = new Relay();
relay.setAdvertisedBandwidth(null);
relay.setAllegedFamily(null);
relay.setASName(null);
relay.setASNumber(null);
relay.setBandwidthBurst(null);
relay.setBandwidthRate(null);
relay.setCityName(null);
relay.setConsensusWeight(null);
relay... | [
"private Relay relayBuilder(JSONObject jsonRelay) {\n\t\tRelay relay = new Relay();\n\n\t\tif (isPresent(jsonRelay, \"advertised_bandwidth\")) {\n\t\t\trelay.setAdvertisedBandwidth((Integer) jsonRelay.get(\"advertised_bandwidth\"));\n\t\t} else {\n\t\t\trelay.setAdvertisedBandwidth(null);\n\t\t}\n\n\t\tif (isPresen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for the most eligible elevator then assign the task to it. | private void searchElevatorAndAssignTask(Floor targetFloor) {
// buffer elevator list
int[] info = new int[elevators.size()];
// find the elevator which has the lowest workload
for (int i = 0; i < elevators.size(); i++) {
// skip the malfunction elevator
if (elev... | [
"public ElevatorTravelTask(final Elevator elevator) {\n this.elevator = elevator;\n }",
"public int chooseElevator() {\n\t\tPair<Integer,Direction> eleLoc;\n\t\tHashMap<Integer, Pair<Integer, Direction>> mapClone = map.getElevatorsData(); //get map of up to date elevator locations\n\t\tint distance;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will configure the enter alarm timeout. This is the period of time, when the sensor is in the status AlarmStatus.ENTER_TIMEOUT_RUNNING. In this state, the alarm doesn't notify the API. Before this period, the alarm is in the status AlarmStatus.ALARM_ENABLED. Then intrusion is detected and based on this the ... | public void configureAlarmEnterTimeout(int period) throws RemoteHomeConnectionException, RemoteHomeManagerException {
if ((period < 0) || (period > 255)) {
throw new RemoteHomeManagerException("The value should be 0 - 255", RemoteHomeManagerException.WRONG_PARAMETER_VALUE);
}
m.sendC... | [
"public void configureAlarmLeaveTimeout(int period) throws RemoteHomeConnectionException, RemoteHomeManagerException {\n if ((period < 0) || (period > 255)) {\n throw new RemoteHomeManagerException(\"The value should be 0 - 255\", RemoteHomeManagerException.WRONG_PARAMETER_VALUE);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of EntryAngsurPetikemasBean | public EntryAngsurPetikemasBean() {
angsurService = new AngsurService();
registration = new Registration();
perhitunganAngsur = new PerhitunganAngsur();
} | [
"public PeticionBean() {\n this.pet = new Peticion();\n }",
"public PerhitunganBatalKapalBean() {}",
"public ProfesorFormBeans() {\r\n \r\n profesor= new Profesor(nombre,apellido,legajo,edad,materia);\r\n \r\n }",
"public PruebaBean() {\n }",
"public AtributoAsientoBean(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for the politicoAtributo corresponding to the query. | List<PoliticoAtributo> search(String query); | [
"List<PoliticoAtributo> findAll();",
"PoliticoAtributo findOne(Long id);",
"List<Prueba> search(String query);",
"Page<Tbc_proprietario> search(String query, Pageable pageable);",
"ProteinCurrent searchByID(String uniprotID);",
"ProteinCurrent searchByName(String proteinName);",
"Page<Tbc_analises_compo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint32 lineIndex = 2; | int getLineIndex(); | [
"public void setLineNo (int LineNo);",
"public int getOffsetForLine(int lineNum);",
"public int getLinePos() {\n return linePos;\n }",
"public void setLine (int Line);",
"int getLineOffset(int line) throws BadLocationException;",
"public abstract String getLine(int lineNumber);",
"public L... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Broadcasting Broadcast on cols. | public final Matrix broadcastOnCols(final BinaryFunctor inFunc,
final Vector inVector) {
final int uBegInc = this.mMatrix.getPitch();
final int vBeg = inVector.getOffset();
final int vInc = inVector.getStride();
final double[] lA = this.mMatrix.getData();
final double[] lB = inVector.getData... | [
"public void broadcast_neighborhood() {\n\t\tthis.sim.local_broadcast(this.address, this.message_buffer.clone());\t\t\n\t}",
"public void applyColumnOffset() {\n\t\tapplyToAll(e -> e.shiftCol(_colOffset));\n\t\tif(_legacyOmit != null)\n\t\t\t_legacyOmit.shiftCols(_colOffset);\n\t\tif(_legacyMVImpute != null)\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks availability for the room specified based on start and end date | public static boolean checkAvailabilityByLocation(Room room, String startTime, String endTime) {
PreparedStatement statement;
try {
statement = Database.getDatabase().getConnection().prepareStatement(
"SELECT * FROM " + Constants.BOOK_LOCATION_TABLE +
... | [
"public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);",
"public static boolean CheckRoomIsAvailable(Room room, long Start, long end) {\n\t\tboolean[] DIO = room.getDateIsOccupied();\n\t\tfor (int i = (int) Start; i < end; i++)\n\t\t\tif (DIO[i] == true) \n\t\t\t\treturn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increments the family health if conditions are good. | public void incAllHealth(){
fam.incAllHealth(numConsumed.getAmountConsumed());
} | [
"public void incrementHealth() {\n this.health += 1;\n }",
"public void increaseHealthCount() {\n\t\tif (this.healthCount < HIGHEST_HEALTH_COUNT)\n\t\tthis.healthCount = this.healthCount + HEALTH_INCREMENT;\n\t}",
"public void buyHealth() {\n if (gold >= 5) {\n health += 3;\n gold -= 5;\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |