query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
optional string countries_forbidden = 3; | public java.lang.String getCountriesForbidden() {
java.lang.Object ref = countriesForbidden_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobu... | [
"java.lang.String getCountriesForbidden();",
"public Builder setCountriesForbidden(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n countriesFo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Class Specific Methods // Returns 1, 2, or 3 depending on the level of the conversion tool. 0 if it can't convert | private int GetConversionLevelForTool( ItemStack stack, World world, int i, int j, int k )
{
if ( stack != null )
{
if ( stack.getItem() instanceof FCItemPickaxe )
{
int iToolLevel = ((FCItemTool)stack.getItem()).toolMaterial.getHarvestLevel();
if (... | [
"@Test \n\tpublic void CheckConvertionsTest1() throws Exception {\n\t\t\n\t\t/** these are non-defined conversions **/\n\t\tassertEquals((double)-1, PortionSearchEngine.CheckConvertions(\"kilocalories\", 1.0),0.01);\n\t\tassertEquals((double)-1, PortionSearchEngine.CheckConvertions(\"bamba\", 1.0),0.01);\n\n\t\t/**... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the number of paths | public Builder nbPaths(int nbPaths) {
this.nbPaths = nbPaths;
return this;
} | [
"public void setPathN(int newPathN) {\n pathM = newPathN;\n }",
"public int getNbPaths() {\n return nbPaths;\n }",
"int getPathsCount();",
"public void setNumberOfChildren(int value) {\n this.numberOfChildren = value;\n }",
"public void setNumberOfInProcessFiles(int value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the utente_cambio_stato of this richiesta badge. | public void setUtente_cambio_stato(String utente_cambio_stato); | [
"@AutoEscape\n\tpublic String getUtente_cambio_stato();",
"public void setStato(String stato) {\n this.stato = stato; }",
"public void modificar_tipo_cambio(String dato_nuevo)\n {\n tipo_cambio = dato_nuevo;\n }",
"public void gestisciStatoCammino(CamminoAzioni camminoDaGestire, String nuo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deserializes string extracted from database to T object. | protected T deserialize(String string) {
return (T) string;
} | [
"public T deserialize( String aString );",
"Object deserialize(String string);",
"public abstract T deserialize(String serial);",
"T deserialize(T t) throws IOException;",
"@Override\n public Field fromString(String string) {\n return null;\n }",
"@Override\n\tpublic O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the current customer to be null and current customer authenticated to be false. | public void deAuthenticateCustomer() {
this.currentCustomerAuthenticated = false;
this.currentCustomer = null;
} | [
"public void setCurrentCustomer(Customer customer) {\n if (this.currentUserAuthenticated) {\n this.currentCustomer = customer;\n this.currentCustomerAuthenticated = false;\n }\n }",
"public void clearCustomer()\n\t{\n\t\tcustomer = null;\n\t}",
"public void setCustomerLoggedIn(final boolean cus... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Checks if a Map object that is passed as a parameter and this Map object are identical. Returns true if they are, false otherwise. | public boolean equals(Map map) {
boolean ans = (this.map.length == map.map.length);
for (int i = 0; i < this.map.length && ans; i++) {
for (int j = 0; j < this.map[i].length && ans; j++) {
ans = sameColor(this.map[i][j], map.map[i][j]);
}
}
return ans;
} | [
"public static boolean mapEquals(Map map1, Map map2) {\r\n for (Map.Entry map1Entry : (Set<Map.Entry>)map1.entrySet() ) {\r\n Object map1Val = map1Entry.getValue();\r\n Object map2Val = map2.get(map1Entry.getKey());\r\n\r\n if ( ! ObjectUtils.equals( map1Val, map2Val ) ) {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs Stagger on the information from the cards database OBS: The output will end up in RDFoutput.txt.conll, not in out.txt. But Stagger doesn't seem to work without it. | public static void tag() throws Exception {
System.out.println("Tagging...");
Process proc = Runtime
.getRuntime()
.exec("java -Xms2000M -jar stagger.jar -modelfile configs/swedish.bin -tag RDF_output.txt > out.txt");
proc.waitFor();
} | [
"public static void main(String[] args) throws FileNotFoundException {\n\t\tint REP_LENGTH = 1;\n\t\tString templateFile = \"/data/onco_pos/brown/representation.template\";\n\t\tStringBuffer content = new StringBuffer();\n\t\tint featureIndex = 0;\n\t\t//smoothed word upto hasHyphen\n\t\tfor(int i=1; i<=12; i++) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate an undo record for a put, given the previous state of the map and the parameters to the put call. | default V undoPutRecord(ISMRMap<K,V> previousState, K key, V value) {
return previousState.get(key);
} | [
"default void undoPut(ISMRMap<K,V> map, V undoRecord, K key, V value) {\n if (undoRecord == null) {\n map.remove(key);\n } else {\n map.put(key, undoRecord);\n }\n }",
"default Map<K,V> undoPutAllRecord(ISMRMap<K,V> previousState, Map<? extends K, ? extends V> m) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an instance of a HexEncoder. | public static HexEncoder getInstance() {
return instance;
} | [
"protected ErasureCoder createEncoder() {\n ErasureCoder encoder;\n try {\n ErasureCoderOptions options = new ErasureCoderOptions(\n numDataUnits, numParityUnits, allowChangeInputs, allowDump);\n Constructor<? extends ErasureCoder> constructor =\n (Constructor<? extends ErasureCode... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column FreeHost_CDN_analog.ServerlistID | public Integer getServerlistid() {
return serverlistid;
} | [
"public void setServerlistid(Integer serverlistid) {\r\n this.serverlistid = serverlistid;\r\n }",
"public java.lang.String getList_id() {\n return list_id;\n }",
"public Long getListId() {\n return listId;\n }",
"public org.apache.axis.types.NormalizedString getListID() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Factory method to create a new instance of this fragment to show the introduction of the quiz | public static QuizStartFragment newInstance() {
return new QuizStartFragment();
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View rootView = inflater.inflate(R.layout.fragment_answer, container, false);\n\n ((TextView) rootView.findViewById(R.id.correctAnswer)).setText(cor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
save the state of the rooms to the savedRooms table | public static Boolean saveRoomState(String roomsState)
{
String[] rooms = roomsState.split("[|]");
//inserts room 1-50
String playerRoomsInsert = "Insert into playerRooms(playerID, currentRoom";
for (int i = 1; i <= 50; i++)
{
playerRoomsInsert += ", room" + i;
... | [
"public void setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by room number\n \n roomStartDate = convertMonthToDigit(startMo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MODIFICADOR_10: Metodo para modificar el tipo de cambio del Vehiculo | public void modificar_tipo_cambio(String dato_nuevo)
{
tipo_cambio = dato_nuevo;
} | [
"public void modificarTasaCambio() throws Exception {\n\n logger.debug(\"Modificando registro de tasa de cambio\");\n\n try {\n\n //Obtener manager de administracion\n ManagerAdministracionServiceBusiness mgrAdministracion = getMgrAdministracionService();\n\n //persist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This checks if the the specified symbol is present in eight directions around the specified position | public boolean posTouching(Position pos, String s){
// check whether at least one of the 8 (horizontal/vertical/diagonal) neighbors
// of the specified position pos has a symbol as the incoming string s
//
// The eight horizontal/vertical/diagonal neighbors of a pos is shown as below:
// up left / up / up r... | [
"public boolean hasSymbol(Address addr);",
"private boolean checkForSymbol(final String symb) throws IOException {\n for (int x = 0; x < symb.length(); x++) {\n if (symb.charAt(x) != lookahead(x)) {\n return false;\n }\n }\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function under test: zstdCompress, zstdDecompress Reason for testing: empty string can be compressed & uncompressed. Failure explanation: empty string is failure edge case. | @Test
public void byteStringEmptyStringIdempotent() throws Exception {
// ARRANGE
String data = "";
// ACT
ByteString result =
CompressionUtils.zstdDecompress(
CompressionUtils.zstdCompress(ByteString.copyFromUtf8(data)));
// ASSERT
assertThat(data).isEqualTo(result.toStr... | [
"public static void main (String[] args)\n {\n String str1 = \"aaaabbbcccd\";\n String expected_str1 = \"a4b3c3d1\";\n String actual_str1 = string_compression(str1);\n assert true == expected_str1.equals(actual_str1);\n\n /*\n * Test 2: Test a string which has only one ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional float hit = 2; | float getHit(); | [
"public void setHitCount(int count) {\nthis.hitpoints = count;\n}",
"Hit hit(Ray ray);",
"public boolean isHit() { return hit; }",
"void ponderhit();",
"public void hit()\n {\n hitCount++;\n state = Status.Hit;\n \n if (hitCount == size)\n {\n state = Status.Sunk;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public Reporting(WebDriver webDriver, String DT,HashMap Dict,HashMap Env) | public Reporting(WebDriver webDriver, String DT,HashMapNew Dict,HashMap <String, String> Env){
driver = webDriver;
Dictionary = Dict;
Environment = Env;
driverType = DT;
} | [
"public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlrepo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ From file: avl_doc.txt Control keywords and data formats CONTROL | (keyword) elevator 1.0 0.6 0. 1. 0. 1.0 | name, gain, Xhinge, XYZhvec, SgnDup The CONTROL keyword declares that a hinge deflection at this section is to be governed by one or more control variables. An arbitrary number of control variables can be used... | public static String formatAsAVLWingSectionControlSurface(AVLWingSectionControlSurface controlSurface) {
StringBuilder sb = new StringBuilder();
sb.append("CONTROL").append("\n");
sb.append(
String.format(Locale.ROOT, "%1$s %2$-7.4g %3$-7.4g %4$-7.4g %5$-7.4g %6$-7.4g %7$-7.4g",
controlSurface.getDescr... | [
"@Test\n public void voicesAndvarMeterHeaderTest(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invention.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n ass... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ 5 getCustomersRetainedForYearsByPlcyCostAsc() Return a list of customers retained for a given number of years, in ascending order of their policy cost. | public List<Customer> getCustomersRetainedForYearsByPlcyCostAsc(String customerFilePath, short yearsOfService) {
List<Customer> customersRetainedForYears = new ArrayList<Customer>();
String line = "";
int index = 0;
BufferedReader fileScanner;
try {
fileScanner = new BufferedReader(new FileReader(custom... | [
"public void setCostYear(Integer costYear) {\r\n this.costYear = costYear;\r\n }",
"IListOfBooks allBefore(int year);",
"public Integer getCostYear() {\r\n return costYear;\r\n }",
"List<Expense> listExpenseByYear();",
"public static List<NewHousingPriceIndex> gethousePriceIndexOnyear(in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Listener listens and monitors all changes made to the canvas application when the user changes the paint color with which the canvas is painted, clears the canvas, paints on the canvas using the mouse and restarts the application | public interface Listener {
/**
* Triggered when a user paints on the canvas using the mouse.
*
* @param oldXCoordinate the X co-ordinate of the point wherein the painting move starts
* @param oldYCoordinate the Y co-ordinate of the point wherein the painting move starts
* @param newXCoordinate the X... | [
"public interface CanvasListener {\r\n\r\n /**\r\n * This method is invoked by the model to inform the listener about the start of a paint session.\r\n */\r\n void firePaintStartedEvent();\r\n\r\n /**\r\n * This method is invoked by the model to inform the listener that somewhen has made changes to\r\n *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for property customer. | public String getCustomer() {
return customer;
} | [
"public Integer getCustomer() {\n return customer;\n }",
"public String getCustomer()\n {\n return name;\n }",
"io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();",
"public String getCustomerName(){\n return customerName;\n }",
"public String getName()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value for the failUnstable property | ScriptBuilder setFailUnstable(Boolean failUnstable) {
this.failUnstable = failUnstable;
return this;
} | [
"public void setFailure(boolean value) {\n\t\tif (value) {\n\t\t\tcountdown = EXIT_COUNT;\n\t\t}\n\t\tfailed = value;\n\t}",
"public void setFailure(boolean value) {\n\t\tif (value)\n\t\t\tcountdown = EXIT_COUNT;\n\n\t\tfailed = value;\n\t}",
"public void setFailed() {\n \t\tfailed = true;\n \t}",
"private st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getCar method, of class Board. Null | @Test
public void testGetCarNull() {
char id = '1';
Board instance = new Board();
Car car = new Car(id, 2, Orientation.HORIZONTAL, new Position(5, 4));
instance.put(car);
Car expResult = null;
Car result = instance.getCar('3');
assertEquals(expResult, ... | [
"@Test\r\n public void testGetCarAtNull() {\r\n Position pos = new Position(2, 5);\r\n Board instance = new Board();\r\n Car expResult = null;\r\n Car result = instance.getCarAt(pos);\r\n assertEquals(expResult, result);\r\n\r\n }",
"@Test\r\n public void testGetCarHori... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method del =====================// All the upd methods // =====================// Update record(s) from the table, The fields and values to use for the update are taken from the MrnWoatlas5 argument, .e.g. Boolean success MrnWoatlas5 updMrnWoatlas5 = new MrnWoatlas5(); updMrnWoatlas5.setLongitude(); MrnWoatlas5 whereMr... | public boolean upd(MrnWoatlas5 woatlas5) {
return db.update (TABLE, createColVals(woatlas5), createWhere());
} | [
"int updateByPrimaryKey(Miss_dislocation record);",
"private void updateLocation(){\r\n\t\t//UPDATE location SET longitude = double, latitude = double WHERE userName = userName\r\n\t\tString sqlCmd = \"UPDATE location SET longitude = \" + commandList.get(2) + \", latitude = \"\r\n\t\t\t\t+ commandList.get(3) + \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET : List of all projects | @GetMapping(value = "/projects")
public List<Project> getAllProjects() {
return projectRepository.findAll();
} | [
"public List<Project> getAllProjects();",
"List<Project> getAll();",
"@GetMapping(\"/project\")\n public Object doGet(){\n return service.getAllProjects();\n }",
"List<Project> getProjectList();",
"private ProjectBaseBean[] getAllProjects() {\n ProjectBaseBean[] projects = ProjectServic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the warehouses the item is stocked in against the warehouses requested in the report. Returns true if the item is stocked in one of the selected warehouses. | private boolean warehouseOk(WorksheetItem item) {
boolean ok = false;
for (int i = 0; i < m_Warehouses.size(); i++) {
for (int j = 0; j < item.getWarehouseCount(); j++) {
if (m_Warehouses.get(i).equals(item.getWarehouse(j))) {
ok = true;
... | [
"public static boolean isStocks() {\n\n // first of all check if there are Stocks available in the system:\n try {\n Engine.getStocks();\n return true;\n } catch (IOException e) {\n MessagePrint.println(MessagePrint.Stream.ERR, e.getMessage());\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CM11610 Obtain the storage date/time. | public java.util.Date getStorageDate()
{
return wStorageDate;
} | [
"public String getStorageTime() {\n return storageTime;\n }",
"public Date getMD_TIME() {\n return MD_TIME;\n }",
"public Date getMD_TIME() {\n\t\treturn MD_TIME;\n\t}",
"public Date readFileTime() {\n UnsignedLong hundredsOfNanosecondsSinceJan11601 = readQWord();\n long mill... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Repository method for fetching HierarchyEntity with specified entityId | public HierarchyEntity getHierarchyEntity(String entityId); | [
"public interface HierarchyRepository {\n\n\t/**\n\t * Repository method for fetching entire hierarchy starting from the\n\t * specified startEntityId with the specified relationship(non-mandatory)\n\t * and entityTypes\n\t * \n\t * @param entityId\n\t * @param relationship\n\t * @param entityType\n\t * @return\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the index of a photo with a given name. | public int Photoindexer(String name) {
for (int i = 0; i < this.photos.size(); i++) {
if (photos.get(i) != null && photos.get(i).getName().equals(name)) {
return i;
}
}
return -1;
} | [
"public int findIndexByPhoto(Photo photo) {\n\t\tfor (int i = 0; i < photos.size(); i++)\n\t\t\tif (photos.get(i).equals(photo))\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}",
"int indexOf(long photoId);",
"public Photo getPhotoByName(String n);",
"public int findPinIndex(String pinName) {\n for(int i=0; i<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MigrateMsg json encoded message to be passed to the contract on migration bytes migrate_msg = 6; | @java.lang.Override
public com.google.protobuf.ByteString getMigrateMsg() {
return migrateMsg_;
} | [
"com.google.protobuf.ByteString getMigrateMsg();",
"@java.lang.Override\n public com.google.protobuf.ByteString getMigrateMsg() {\n return migrateMsg_;\n }",
"gr.uoa.di.containermigrator.master.communication.protocol.Protocol.AdminMessage.Migrate getMigrate();",
"public Builder setMigrateMsg(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Amazon Resource Number (ARN) corresponding to the import request. | public String getImportArn() {
return this.importArn;
} | [
"@Output\n @Id\n public String getArn() {\n return arn;\n }",
"String getArn();",
"public String getArn() {\n return this.arn;\n }",
"public String getSourceARN() {\n return this.sourceARN;\n }",
"public String getAsset_num_address() {\n\t\treturn asset_num_address;\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new srcML folder reader. | public SrcMlFolderReader(Context ctx) {
this(ctx, new PositionalXmlReader());
} | [
"protected SrcMlFolderReader(Context ctx, PositionalXmlReader reader) {\n this(ctx, reader, Method::new);\n }",
"public SCMLReader() {}",
"public SrcMlFolderReader(Context ctx, PositionalXmlReader reader, IMethodFactory methodFactory) {\n this.ctx = ctx;\n this.reader = reader;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
========================================================================== Mutator Methods ========================================================================== Sets the service record ID. | public void setServiceRecordId(long aServiceRecordId) {
serviceRecordId = aServiceRecordId;
} | [
"public void setIdService( Long idService ) {\n this.idService = idService;\n }",
"public void setServiceID(int value) {\n this.serviceID = value;\n }",
"public void setRecordID(int value) {\n this.recordID = value;\n }",
"void xsetServiceId(com.microsoft.schemas._2003._10.seri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column store.storename | public void setStorename(String storename) {
this.storename = storename == null ? null : storename.trim();
} | [
"public void setStoreName(String storeName) {\r\n this.storeName = storeName;\r\n }",
"public void setStoreName(String storeName) {\n this.storeName = storeName;\n }",
"public void setStoreId(java.lang.String value) {\n this.storeId = value;\n }",
"public void setStore(String store) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update First name and last name | public void updateFirstNameAndlastName() {
print("Update First name and last name");
DateFormat txt = new SimpleDateFormat("yyyyMMddHHmmss");
Date date = new Date();
String fNamePostFix = "Vivek" + txt.format(date);
String lNamePostFix = "Sharma" + txt.format(date);
sendKeys(Locator.MyTrader.First_Nam... | [
"void updateNames(Long id, String firstName, String lastName);",
"public void setName(String first, String last)\n {\n firstName = first;\n lastName = last;\n }",
"public void setName(String firstName, String lastName){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the default email recipients. | public String getDefaultEmailRecipients() {
return defaultEmailRecipients;
} | [
"public void setDefaultEmailRecipients(String defaultEmailRecipients) {\n this.defaultEmailRecipients = defaultEmailRecipients;\n }",
"public String[] getRecipients() {\n return recipients;\n }",
"public List<MailRecipient> mailRecipients() {\n return this.mailRecipients;\n }",
"@Overr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints the average number of service years | public void getAvgServiceYears()
{
float average = employees.stream()
.map(e->e.getServiceYears())
.reduce(0, (total,years) -> total + years) / employees.size();
System.out.println("The average number of service years is " + average);
} | [
"public double getAverageYearly(){\n\t\treturn this.totalInterest() / (this.yearlyPay());\n\t\t\n\t}",
"public static double avgAge(){\r\n\t\tdouble avg = (double)totalAge / (double)totalPersons;\r\n\t\treturn avg;\r\n\t}",
"private void AverageAgeOfStudent(){\n \t\n \tsumOfStudentAge = sumOfStudentAge + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Chooses a most specific common named superclass of a given collection of named classes. | RDFSNamedClass getCommonSuperclass(Collection<RDFSNamedClass> classes); | [
"Set<RDFSNamedClass> getCommonSuperclasses(Collection<RDFSNamedClass> classes);",
"public static OntClass getFirstNamedSuperClass(OntClass c)\n\t{\n\t\tfor (BreadthFirstIterator<OntClass> i = new BreadthFirstIterator<OntClass>(new SuperClassSearchNode(c)); i.hasNext(); ) {\n\t\t\tOntClass superClass = i.next();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "wasNotGiven" element | public boolean isSetWasNotGiven()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(WASNOTGIVEN$4) != 0;
}
} | [
"public org.hl7.fhir.Boolean getWasNotGiven()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Boolean target = null;\n target = (org.hl7.fhir.Boolean)get_store().find_element_user(WASNOTGIVEN$4, 0);\n if (target == null)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List of additional JavaC arguments identified by the extractor as necessary for analysis, but not included in the argument list. repeated string extra_javacopts = 10; | public com.google.protobuf.ProtocolStringList
getExtraJavacoptsList() {
return extraJavacopts_;
} | [
"java.lang.String getExtraJavacopts(int index);",
"int getExtraJavacoptsCount();",
"public int getExtraJavacoptsCount() {\n return extraJavacopts_.size();\n }",
"public java.lang.String getExtraJavacopts(int index) {\n return extraJavacopts_.get(index);\n }",
"public com.google.proto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get user enrolled courses | public List<Course> getUserEnrolledCourses(int id); | [
"List<Course> viewEnrolledCourses(int userId);",
"public Course[] getCourses(boolean enrolled) {\n\t\t\treturn null;\n\t\t}",
"@GetMapping\n @PostFilter(\"hasRole(filterObject.roleName)\")\n public List<CourseMetadataDTO> getEnrolledCourses() {\n logger.info(\"Fetching all enrolled courses\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__GetAttribute__Group__2" $ANTLR start "rule__GetAttribute__Group__2__Impl" InternalAADMParser.g:16799:1: rule__GetAttribute__Group__2__Impl : ( ( rule__GetAttribute__AttributeAssignment_2 ) ) ; | public final void rule__GetAttribute__Group__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAADMParser.g:16803:1: ( ( ( rule__GetAttribute__AttributeAssignment_2 ) ) )
// InternalAADMParser.g:16804:1: ( ( rule__GetAttribute_... | [
"public final void rule__GetAttribute__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:16791:1: ( rule__GetAttribute__Group__2__Impl rule__GetAttribute__Group__3 )\n // InternalAADMParser.g:16792:2: r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specialized Get and Set functions These functions provide convenient support for localized text properties, including a number of special and obscure aspects. Localized text properties are stored in alttext arrays. They allow multiple concurrent localizations of a property value, for example a document title or copyrig... | XMPProperty getLocalizedText(
String schemaNS,
String altTextName,
String genericLang,
String specificLang) throws XMPException; | [
"public interface I18n\n{\n\t/** \n\t * Returns configured default locale.\n\t * \n\t * @return the default locale object. \n\t */\n\tpublic Locale getDefaultLocale();\n\n /** \n * Returns configured prefered locale.\n * \n * @return the prefered locale object. \n */\n public Locale getPrefere... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that adds dependencies to program | void dependsOn(SfProgram program, Set<SfProgram> dependencies) throws SfRuntimeException; | [
"public interface SfDependencyBo {\n\n /**\n * Method that adds dependencies to program\n *\n * @param program\n * @param dependencies\n */\n void dependsOn(SfProgram program, Set<SfProgram> dependencies) throws SfRuntimeException;\n\n /**\n * Lists currently installed programs\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Left Exp' containment reference. If the meaning of the 'Left Exp' containment reference isn't clear, there really should be more of a description here... | LogicExpression getLeftExp(); | [
"EObject getLeft();",
"public Expression getLeftExpression() {\r\n return m_left;\r\n }",
"public ExpressionNode getLeft() {\n\t\treturn (this.left);\n\t}",
"@Override\n\tpublic Exp leftOperand() {\n\t\treturn this.e1;\n\t}",
"public L getLeft() {\n return left;\n }",
"public Node getLef... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Applies mutation to the child dependent on its current meme option for mutation. Mapping of meme option to IOM: IntensityOfMutation < memeOption | public void applyMutationForChildDependentOnMeme(int childIndex, int memeIndex) {
int rate = problem.getMeme(childIndex, memeIndex).getMemeOption();
mutation.setMutationRate(rate);
mutation.applyHeuristic(childIndex);
} | [
"private void mutate() {\n\t\n\t\t// copy mutations\n\t\tfor (int i = 0; i < this.exe_size; i++) {\n\t\t\tif (RAND.nextDouble() < MUT_PROB_COPY) {\n\t\t\t\t// mutate to random instruction\n\t\t\t\tthis.genome[i] = RAND.nextInt(Instruction.INST_SET_SIZE);\n\t\t\t}\n\t\t}\n\t\tfor (int i = EXE_SIZE_MAX; i < GENOME_SI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build a new edge with end vertices v and w and name n and insert into the graph. Return the new Edge object. NB: The vertices u and v must already be in the graph. | public Edge insertEdge(Vertex v, Vertex w, String n){
Edge newEdge = new Edge(v,w,n);
edges.add(newEdge);
return newEdge;
} | [
"void addEdge(int v, int w);",
"Edge<V> createEdge(V from, V to, double weight);",
"public void addEdge(Object u, Object v, int weight){\n\t if(vTable.isExist(v) && vTable.isExist(u)){\n\t\t VertexPair edge = new VertexPair(u,v,weight);\n\t\t if(eTable.isExist(edge)){\n\t\t\t ((VertexPair)(eTable.getNode(ed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the game panel with a HUD, window size, collection of game objects, and start the game loop. | void init() {
this.resetDelay = 0;
GameObjectCollection.init();
this.gameHUD = new GameHUD();
this.generateMap();
this.gameHUD.init();
this.setPreferredSize(new Dimension(this.mapWidth * 32, (this.mapHeight * 32) + GameWindow.HUD_HEIGHT));
System.gc();
... | [
"public GamePanel() {\n initComponents();\n setting();\n }",
"public void setupGame() {\n\t\tfinal int worldWidth = 500;\n\t\tfinal int worldHeight = 700;\n\t\t\n\t\tcreateViewWithoutViewport(worldWidth, worldHeight);\n\t\t\n\t\tinitializePersistence();\n\t\t\n\t\tif (getStartGame()) {\n\t\t\tcre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Rg' attribute. If the meaning of the 'Rg' attribute isn't clear, there really should be more of a description here... | int getRg(); | [
"public java.lang.String getRg() {\n return rg;\n }",
"public String getRG() {\r\n return RG;\r\n }",
"public java.lang.String getRG() {\r\n return RG;\r\n }",
"public void setRg(java.lang.String rg) {\n this.rg = rg;\n }",
"public void setRG(String RG) {\r\n t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new instance of ContestRole. | static ContestRole createContestRole(long... ids) {
ContestRole contestRole = new ContestRole();
setAuditProperties(contestRole);
contestRole.setContestId(id);
contestRole.setMaxRegistrants((int) (1 * id));
contestRole.setMinRegistrants((int) (id % 2 + 1));
contestR... | [
"Role createRole();",
"ExistingRole createExistingRole();",
"ArrivingRole createArrivingRole();",
"ResourceRole createResourceRole();",
"public BeanRole() {\r\n }",
"public RoleEntity(){}",
"public RoleAssignment() {\n }",
"Roles createRoles();",
"public RoleAccess() {\n }",
"private Role... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the indicator which determines whether echo cancellation is to be performed for captured audio. | public void setEchoCancel(boolean echoCancel)
{
ConfigurationService cfg = LibJitsi.getConfigurationService();
if (cfg != null)
cfg.setProperty(getPropertyName(PNAME_ECHOCANCEL), echoCancel);
} | [
"public boolean echoCancellationEnabled();",
"public void enableEchoCancellation(boolean val);",
"void enableEchoCancellation(boolean enable);",
"public void cancelAudioCapture(){\n\t\tLogger.log(\"cancelAudioCapture()::BEGIN\");\n\t\tif (mRecordControl != null){\n\t\t\ttry {\n\t\t\t\tmRecordControl.reset();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of SensorDataId | public final void setSensorDataId(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Long sensordataid)
{
getMendixObject().setValue(context, MemberNames.SensorDataId.toString(), sensordataid);
} | [
"public void setDataId(String dataId) {\n this.dataId = dataId;\n }",
"public void setDataId(Long dataId) {\r\n this.dataId = dataId;\r\n }",
"public final void setSensorDataId(java.lang.Long sensordataid)\n\t{\n\t\tsetSensorDataId(getContext(), sensordataid);\n\t}",
"public void setDataId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Matches a string against a pattern. The pattern contains two special characters: '' which means zero or more characters, '?' which means one and only one character. | protected static boolean match( String pattern, String str, boolean isCaseSensitive )
{
char[] patArr = pattern.toCharArray();
char[] strArr = str.toCharArray();
int patIdxStart = 0;
int patIdxEnd = patArr.length - 1;
int strIdxStart = 0;
int strIdxEnd = strArr.length... | [
"public Pattern getValidStringPattern();",
"public static void main(String[] args) {\n String s = \"acdcb\", p = \"a*?b\";//true\n System.out.println(isMatch(s, p));\n }",
"boolean validatePattern(String raw);",
"public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extract a user id from the input json. If there is no user id it pulls one from the user session service. | private String getUserId(JSONObject input) throws JSONException {
String userId;
if(input.has("user_id")) { //$NON-NLS-1$
userId = input.getString("user_id"); //$NON-NLS-1$
} else {
userId = userSessionService.getUser().getUsername();
}
return userId;
... | [
"public String getUserId(JSONObject jsonResponse){\n \tif( jsonResponse != null ){\n \t\tif(jsonResponse.has(\"authentication\")){\n \t\t\tif(jsonResponse.getJSONObject(\"authentication\").has(\"user\")){\n \t\t\t\treturn jsonResponse.getJSONObject(\"authentication\").getJSONObject(\"user\").getString(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the student time costed. | int getStudentTimeCosted(long studentId, Date start, Date end); | [
"int getStudentTimeCosted(long studentId);",
"public Integer getTimecost() {\n return timecost;\n }",
"long getEstimatedTime();",
"public int getSkillRechargeTime(Skills currentSkill);",
"int getTimeSpend();",
"public Integer getCrtTime() {\n return crtTime;\n }",
"public int getTime... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
goes through parkingSpaces looking for an available free space. First from spaces 1115, then from 15, then finally from 610. returns whether or not the check is successful | @Override
public boolean checkSpaces(ParkingSpace[] parkingSpaces, CarParkPanel panel)
{
//sets i = 10 to enable first set of bays to be searched
int i = 10;
boolean found = false;
//try and find a free space from bays 11-15
if(this.searchElevenToFif... | [
"private boolean checkSpaceAccounting()\n {\n long removable = _sweeper.getRemovableSpace();\n long total = _repository.getTotalSpace();\n long free = _repository.getFreeSpace();\n long precious = _repository.getPreciousSpace();\n long used = total - free;\n \n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check for Kraken Fish Type 2: If for all cells in indices chains starting and ending in a weak link exist to a candidate, a Kraken Fish Type 2 exists. A set with all cells holding a target for the KF is returned. | protected boolean checkKrakenTypeTwo(SudokuSet indices, SudokuSet result, int startCandidate, int endCandidate) {
result.set(finder.getCandidates()[endCandidate]);
result.andNot(indices);
for (int i = 0; i < indices.size(); i++) {
int tableIndex = indices.get(i) * 10 + startCandi... | [
"protected boolean checkKrakenTypeOne(SudokuSet fins, int index, int candidate) {\r\n for (int i = 0; i < fins.size(); i++) {\r\n int tableIndex = fins.get(i) * 10 + candidate;\r\n if (!onTable[tableIndex].offSets[candidate].contains(index)) {\r\n return false;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this asks the user of they are graduating or not | public static void Graduating()
{
Scanner scan = new Scanner(System.in);
boolean error;
char areGraduating = 'n';
error = true;
do {
System.out.println("Are you graduating?");
areGraduating = scan.next().charAt(0);
areGraduating = Character.toUpperCase(areGraduating);
error = false;
... | [
"public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Ca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the maximum variable index. | protected int maxvar() {
int res = vars.size();
if (res != 0) {
assert res > 1;
res--;
}
return res;
} | [
"public int getMaxIndex()\n {\n return maxIndex;\n }",
"public abstract int maxIndex();",
"private int maxIndex() {\r\n\t\tint result = 0;\r\n\t\tfor (int i = 1; i < this.evaluationBoard.length; i++) {\r\n\t\t\tif (this.evaluationBoard[i] > this.evaluationBoard[result]) {\r\n\t\t\t\tresult = i;\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Expand the given string, using both the system properties and system environment for expansion. | public static String expand(String string)
{
Properties props=new Properties(System.getProperties());
props.putAll(System.getenv());
return expand(string,props);
} | [
"private static String expandValue (String value)\n {\n String env_var;\n \n if (value.startsWith(\"$\"))\n {\n env_var = System.getProperty (value.substring(1, value.length ()));\n \n if (env_var != null)\n {\n value = env_var... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Maps usercommand dto to usercommand entity | public UserCommandEntity mapToUserCommandEntity(UserCommand userCommand, String userEmail) {
UserCommandEntity userCommandEntity = new UserCommandEntity();
userCommandEntity.setId(userCommand.getId());
userCommandEntity.setUserEmail(userEmail);
userCommandEntity.setCommandName(userCommand.getCommandName... | [
"UserDto toDto(UserEntity userEntity);",
"private UserDto convertToDto(User u){\n return new UserDto(u.getId(), u.getUsername());\n }",
"@Override\n @Mapping(source = \"user.id\", target = \"userId\")\n UserAttributeDTO mapToDTO(UserAttribute userAttribute);",
"public UserDto toUserDto() {\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleImport" $ANTLR start "entryRuleMicroservice" InternalMappingDsl.g:1883:1: entryRuleMicroservice returns [EObject current=null] : iv_ruleMicroservice= ruleMicroservice EOF ; | public final EObject entryRuleMicroservice() throws RecognitionException {
EObject current = null;
EObject iv_ruleMicroservice = null;
try {
// InternalMappingDsl.g:1883:53: (iv_ruleMicroservice= ruleMicroservice EOF )
// InternalMappingDsl.g:1884:2: iv_ruleMicroservic... | [
"public final EObject entryRuleImportedMicroservice() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleImportedMicroservice = null;\n\n\n try {\n // InternalMappingDsl.g:1390:61: (iv_ruleImportedMicroservice= ruleImportedMicroservice EOF )\n // In... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getActualinView method, of class BookinventoryJpaController. | @Test
public void testGetActualinView() {
BookinventoryJpaController instance = new BookinventoryJpaController();
int expResult;
Bookinventory result = instance.getActualinView();
if(loginbean.isLoggedIn()==true)
assertThat(result).isNotNull();
else
... | [
"@Test\n void test_getView() {\n // status by default is set to one, so verify that the view is one\n assertEquals(1,getView());\n }",
"@Test\r\n public void testFindBookinventory() {\r\n \r\n Integer id = 1;//find the first book in inventory\r\n BookinventoryJpaControll... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the horizontal and vertical scrolling to specified values | public void setScroll(int dx,int dy){
xscroll=dx;
yscroll=dy;
} | [
"void setScrollPosition(int x, int y);",
"public void setHScrollPosition(int horizontalScrollPosition);",
"public void setVScrollPosition(int verticalScrollPosition);",
"public void updateScrollBars() {\n\t\tScrollBar horizontal = getHorizontalBar();\n\t\tScrollBar vertical = getVerticalBar();\n\t\tRectangle ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .UserFunction user_functions = 6; | int getUserFunctionsCount(); | [
"UserFunction getUserFunctions(int index);",
"private int getNumFunctions() {\n return 15;\n }",
"@Override\n public int getUserFunctionsCount() {\n return userFunctions_.size();\n }",
"UserFunctionOrBuilder getUserFunctionsOrBuilder(\n int index);",
"@Override\n public UserFu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns set of all bids | public @NotNull Set<Bid> findAllBids() throws BazaarException; | [
"public List<Bid> getAllBids() {\n\t\treturn new ArrayList<>(allBids);\n\t}",
"public Bid[] getBids()\n {\n \treturn aBids;\n }",
"public List<BidListModel> getAllBids() {\n return bidListRep.findAll();\n }",
"public Bids[] populateBids() {\r\n\t\tint bidsLength = bids.size();\r\n\t\tint in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the user that has the corresponding uuid for the questionnaire. | User getByQuestionnaireUUID(String uuid); | [
"User getUserByUUID(String uuid);",
"User getUser(PlatformUser pu, UUID uuid);",
"PlatformUser getPlatformUser(UUID id);",
"User selectById(String uid);",
"public UsersEntity getUser(final String uuid) {\n try {\n UsersEntity user = entityManager.createNamedQuery(\"userByUuid\", UsersEntit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show the volume units conversion factors | public void showVolumeConvFactors() {
showConvFactors(volumeConv);
} | [
"void volume() {\n System.out.print(\"Volume is \");\n System.out.println(width * height * depth);\n }",
"public void showCurrencyConvFactors() {\n\t\tshowConvFactors(currencyConv);\n\t}",
"private void updateVolumeLabel()\n {\n float volume = ( game.getPreferencesManager().getVolume(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the primary connection protocol | public final void setPrimaryProtocol(int proto) {
m_primaryProto = proto;
} | [
"public void setProtocol(Protocol protocol);",
"public void setProtocol( Properties p )\n {\n Enumeration e = p.keys();\n while (e.hasMoreElements())\n {\n String key = (String) e.nextElement();\n m_ConnectionProtocol.put(key, p.getProperty(key));\n }\n }",
"public void setProtocol(Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("> ApplicabilityChecker.makeConcurrentRulesDuetoDependency(ConcurrentRule r1, final Rule r2 "); | private List<ConcurrentRule> makeConcurrentRulesDuetoDependency(
final ConcurrentRule cr1,
final Rule r2,
final Hashtable<?, ?> matchmap) {
final DependencyPairContainer
dependencyContainer = this.makeDependencyPairContainer();
dependencyContainer.enableProduceConcurrentRule(true);
// if this.c... | [
"@Test\n\tpublic void testTransitiveClosure(){\n\t\tDependencyAnalyzer_C2CInbound dpDirect = new DependencyAnalyzer_C2CInbound();\n\t\tda = new DependencyAnalyzer_C2CInboundTransitive();\n\t\tda.analyze(v2);\n\t\tdpDirect.analyze(v2);\n\t\tList<String> directDependentClasses = dpDirect.findDirectDependentClasses(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns country of given prefix | public static List<Country> getByPrefix(String prefix) {
List<Country> out = new ArrayList<>();
for (Country country : countries) {
if(country.getPrefix().toLowerCase().contains(prefix.toLowerCase())) {
out.add(country);
}
}
if(out.isEmpty()) {
... | [
"java.lang.String getCountry();",
"java.lang.String getPostalPrefix();",
"java.lang.String getCountryCode();",
"SimpleString getPrefix(SimpleString address);",
"public String getCountryAbbreviation();",
"public String fetchCountry() {\n Vector args = new Vector();\n args.add(fetchIP());\n try {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays an error message if the download for a PDF file Fails | private void displayPDFDownloadError() {
Toast.makeText(LessonDetailActivity.this, "There was an error downloading the study guide. Check your connection or try again later.", Toast.LENGTH_LONG).show();
/*
AlertDialog.Builder errorBox = new AlertDialog.Builder(this);
errorBox.setMessage("There was an error dow... | [
"private void detectionPDF() {\n\t\tif (sourcePDF.getText().equals(\"\")){\n\t\t\tlockButton();\n\t\t\tmessage.setText(\"<html><span color='red'>Pas de PDF</span></html>\");\n\t\t}\n\t\telse{\n\t\t\tif(new File(sourcePDF.getText()).exists()){\n\t\t\t\tmessage.setText(\"<html><head><meta charset=\\\"UTF-8\\\"><span ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns and removes the last card in the m_hand ArrayObject | public Card pop() {
Card temp;
try {
temp = m_hand.get(m_len-1);
m_hand.remove(m_len-1);
m_len -= 1;
return temp;
}
catch (IndexOutOfBoundsException ex ){
System.out.println("");
System.out.println("An error has occured: ");
System.out.println(ex);
return null;
}
} | [
"public Card getLastCard(){\n\t\treturn this.hand.get(hand.size()-1);\n\t}",
"public Card getLastDrawnCard()\n\t{\n\t\treturn currentHand.get(getHandSize() - 1);\n\t}",
"public Card popCard() {\n int i = size() - 1;\n return popCard(i);\n }",
"public Card removeCard(){\n Card temp = pile[0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__BoolValue__ValueAssignment" $ANTLR start "rule__ProcessDataDef__PropertiesAssignment_3" InternalDsl.g:36797:1: rule__ProcessDataDef__PropertiesAssignment_3 : ( ruleProcessPropertyDef ) ; | public final void rule__ProcessDataDef__PropertiesAssignment_3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:36801:1: ( ( ruleProcessPropertyDef ) )
// InternalDsl.g:36802:2: ( ruleProcessPropertyDef )
{
... | [
"public final void rule__ProcessDataDef__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:14706:1: ( ( ( rule__ProcessDataDef__PropertiesAssignment_3 )* ) )\n // InternalDsl.g:14707:1: ( ( rule__Process... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a value of property Comments given as an instance of java.lang.String | public static void removeComments(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {
Base.remove(model, instanceResource, COMMENTS, value);
} | [
"public void removeComments(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), COMMENTS, value);\r\n\t}",
"public void setComments(java.lang.String value);",
"public String removeStringProperty(String propertyName);",
"public void removeComments( org.ontoware.rdf2go.model.node.Node v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form PlayerNamesCapture | public PlayerNamesCapture(java.awt.Frame parent, boolean modal) {
super(parent, modal);
names = new ArrayList();
initComponents();
this.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exi... | [
"public PlayerNamesCapture(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n this.addWindowListener (new WindowAdapter() {\n @Override\n public void windowClosing (WindowEvent e) {\n System.exit(0);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pds.registerObserver((PlayerListObserver) this); pds.registerObserver((EntityListObserver) this); ls.registerObserver((LeaderboardObserver) this); this.leaderboardSocket = new LeaderboardSocket(); this.notificationSocket = new NotificationSocket(); this.playerDataSocket = new PlayerDataSocket(); this.chatSocket = new C... | @PostConstruct
@EventListener(ApplicationReadyEvent.class)
public void init() {
this.players = new HashMap<>();
this.entities = new HashMap<>();
this.leaderBoard = new LeaderBoard();
this.playerDataSocket.registerObserver((PlayerListObserver) this);
this.playerDataSocket... | [
"private static void initObservers() {\n observers.add(new GameObserver());\n observers.add(new PlayerObserver());\n observers.add(new MoveObserver());\n }",
"public interface InProtocolObserver {\n\t/**\n\t * Server sent \"Kulami?\" Connection was successfully established. Continue\n\t * ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets the instance and sets all the keys to false. | public void reset() {
keys = new boolean[255];
mouseButtons = new boolean[3];
} | [
"protected void reset()\r\n {\r\n synchronized (keyFile)\r\n {\r\n clearMemoryMap();\r\n saveKeys();\r\n }\r\n }",
"public void reset() {\n\t\t\tthis._keyState = STATE_NONE;\n\t\t\tthis._mods = Key.ModKey.NONE.getValue();\n\t\t}",
"public void reset() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List of folders and/or jars that contain the merged java resources. FileCollection because of the legacy Transform API. | @Classpath
@Incremental
public abstract ConfigurableFileCollection getJavaResourceFiles(); | [
"SortedSet<String> getResourcePaths();",
"private List<String> findResourcesToMerge(HttpServletRequest request) {\n \n String contextPath = request.getContextPath();\n \n String requestURI = request.getRequestURI(); //w/o hostname, starts with context. eg. /context/path/subpath/a,b,/anotherpath/c.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Data Structure Definitions < a qb:DataStructureDefinition ; | public void addDataStructureDefinition(Resource dataStructure, String label, String comment, Set<Resource> components){
dataCubeModel.add(dataStructure, RDF.type, QB.DataStructureDefinition);
dataCubeModel.add(dataStructure, RDFS.label, label);
dataCubeModel.add(dataStructure, RDFS.comment, comment);
for(Resour... | [
"DataDefinition createDataDefinition();",
"public AutomataStructure createAutomataStructure();",
"AdlDefinition createAdlDefinition();",
"abstract public DefinitionList getDefinitions();",
"Structure createStructure();",
"definitions createdefinitions();",
"BElementStructure createBElementStructure();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form PlaceOrderForm | public PlaceOrderForm() {
initComponents();
try {
ctrlCustomer = (CustomerController) ControllerFactory.getInstance().getController(ControllerFactory.ControllerTypes.CUSTOMER);
ctrlItem = (ItemController) ControllerFactory.getInstance().getController(ControllerFactory.Controller... | [
"public formOrderParts() {\n initComponents();\n }",
"public SMplace_order() {\n initComponents();\n table();\n }",
"public NewOrderController() {\r\n\t\tnewOrderForm = new MyOrder();\r\n\t\tcurrentTerm = new TerminiDiConsegna.Entry();\r\n\t\tcurrentFrItem = new FreightItem();\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Fn Def'. | Fn_Def createFn_Def(); | [
"FunctionDefinition createFunctionDefinition();",
"Funcs createFuncs();",
"Functional createFunctional();",
"ClassDescriptor make_class() {\n\n String superClassName = getSuperclassName();\n if(!getFn().getTypes(\"extends\").isEmpty())\n superClassName = getFn().getTypes(\"extends\").... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Activates the insert channelepisode template | private void action_insert_channelEpisode(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
TemplateResult result = new TemplateResult(getServletContext());
if (SecurityLayer.checkSession(request) != null) {
User user =... | [
"private void action_insert_channel(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n try {\n TemplateResult result = new TemplateResult(getServletContext());\n if (SecurityLayer.checkSession(request) != null) {\n User user... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_jAcceptActionPerformed Cancels the booking corresponding with the booking number entered | private void jCancelBookingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCancelBookingActionPerformed
if(bookingNr != -1)
bm.cancel(bookingNr);
} | [
"public void cancelBooking() throws Exception {\n element(\"ag.cancel\").click();\n }",
"@Override\n\tpublic void cancelBooking(Integer bookingId) throws Exception{\n\t\tbookingRecord.remove(bookingId);\n\t\t\n\t}",
"private void processCancelReservation() {\n System.out.println(\"Which reserva... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the decompressor for a file name. This checks the file against all known and supported file extensions. Returns null if there is no decompressor for this file name. | @Nullable
public static InflaterInputStreamFactory<?> getDecompressorForFileName(String fileName) {
for (final Map.Entry<String, InflaterInputStreamFactory<?>> entry :
DECOMPRESSORS.entrySet()) {
if (fileName.endsWith(entry.getKey())) {
return entry.getValue();
... | [
"@Nullable\n public static InflaterInputStreamFactory<?> getDecompressorForExtension(String extension) {\n return DECOMPRESSORS.get(extension);\n }",
"public static Decompressor of(InputStream input, Suffix suffix, String filename) {\n switch (suffix) {\n case EXE:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
29. Write a program in Java to display the multiplication table of a given integer. | public static void MultiplicationTable(int num)
{
for (int i=1; i<=10; i++)
{
System.out.println(num + "X" + i + "=" + (num*i));
}
} | [
"public void printMultiplicationTable() {\n for(int i = 1;i <= 12;i++) {\n for(int j = 1;j <= 12;j++) {\n //prints out the result each time\n //use %4 to create the columns\n System.out.printf(\"%5d\", multiplicationFunction(i, j));\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XOrExpression__RightOperandAssignment_1_1" $ANTLR start "rule__XAndExpression__FeatureAssignment_1_0_0_1" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12203:1: rule__XAndExpression__FeatureAssignment_1_0_0_1 : ( ( ruleOpAnd ) ) ; | public final void rule__XAndExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12207:1: ( ( ( ruleOpA... | [
"public final void rule__XAndExpression__FeatureAssignment_1_0_0_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:3043... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ 'default' enter sequence for state Stopped | private void enterSequence_main_region_digitalwatch_ChronoTicker_Stopped_default() {
nextStateIndex = 0;
stateVector[0] = State.main_region_digitalwatch_ChronoTicker_Stopped;
} | [
"private void enterSequence_main_region_Failed_default() {\n\t\tnextStateIndex = 0;\n\t\tstateVector[0] = State.main_region_Failed;\n\t}",
"State getStateStart();",
"private void enterSequence_main_region_digitalwatch_Light_Wait_default() {\n\t\tentryAction_main_region_digitalwatch_Light_Wait();\n\t\tnextStateI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Es el metodo que adiciona las caracterisiticas del vector caracteristicasescal a la escala de nombre que recibe como parametro. | public void adicionarCaracteristicasEscala(String nombredigitado)
{
Escala existeescala = null;
try
{
Conector conectora = new Conector();
conectora.iniciarConexionBaseDatos();
existeescala = EscalaBD.buscarNombre(nombredigitado, conectora);
conectora.terminarConexionBaseDatos();
}
cat... | [
"public void prepararCaracterisiticaEscala(Caracteristica nuevacaracter)\r\n\t{\r\n\t\tcaracteristicasescal.add(nuevacaracter);\r\n\t}",
"protected CaracteristicaKT ()\r\n\t{\r\n\t\t\r\n\t}",
"private VectorArit CasteoVectores(VectorArit v, TipoPrimitivo t) {\r\n switch (t) {\r\n case STRING:\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the stack size (in 32bitunits) needed for the method arguments. The instance ('this' object) is not counted. | int argStackSize()
{
return (new TArgs (signature)).words();
} | [
"int getStackFrameSize();",
"public int getSize() {\n\t\treturn stackSize;\n\t}",
"int size() {\n return stackSize;\n }",
"public int getSize()\n {\n return stack.size();\n }",
"public int size(){\n\n return stack.size();\n\n }",
"public static int getStackSizeKB()\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the billing zip of this book order. | @Override
public java.lang.String getBillingZip() {
return _bookOrder.getBillingZip();
} | [
"public java.lang.Object getBillToZipCode() {\n return billToZipCode;\n }",
"@Override\n\tpublic java.lang.String getShippingZip() {\n\t\treturn _bookOrder.getShippingZip();\n\t}",
"@Override\n\tpublic java.lang.String getBillingStreet() {\n\t\treturn _bookOrder.getBillingStreet();\n\t}",
"public In... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string arrivalAirport = 4; | public Builder setArrivalAirport(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
arrivalAirport_ = value;
onChanged();
return this;
} | [
"java.lang.String getArrivalAirport();",
"java.lang.String getTransitAirport();",
"java.lang.String getArrivalAirportCode();",
"java.lang.String getDepartureAirport();",
"java.lang.String getArrivalAirportCity();",
"public String getDestinationAirport() {\r\n return destinationAirport;\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saving the Drawing as .ser file on desktop. (Save drawing) | @Override
public boolean save(Drawing drawing) {
try {
File outputFile = new File("C:\\Users\\Ken\\Desktop\\" + drawing.getName() + ".ser");
System.out.println("Drawing at:" + outputFile.getAbsolutePath());
FileOutputStream streamOutFile = new FileOutputStream(outputFi... | [
"@Override\n public void save() {\n graphicsEnvironmentImpl.save(canvas);\n }",
"public void save() {\n if (this.whiteBoardClientGUI.canvas != null) {\n try {\n String PATH = \"./data\";\n\n File directory = new File(PATH);\n if (! direct... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Onmouseover' attribute. If the meaning of the 'Onmouseover' attribute isn't clear, there really should be more of a description here... | String getOnmouseover(); | [
"public final String getOnMouseOverAttribute() {\n return getAttributeValue(\"onmouseover\");\n }",
"public final String getOnMouseOverAttribute() {\n return getAttributeValue(\"onmouseover\");\n }",
"final public String getOnmouseover()\n {\n return ComponentUtils.resolveString(getPro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an array of a 4byte integer fields. | protected int[] getInt4Array(String fieldName, int size) {
int[] intArray = new int[size];
APIInt4FieldDescription field = getInt4FieldDescription(fieldName);
for (int i = 0; i < size; i++) {
intArray[i] = getInt4Converter().toInt(bytes, field.getOffset() + i * 4);
}... | [
"public int[] readAllInts(){\n\t\tString[] fields=readAllStrings();\n\t\tint[] vals=new int[fields.length];\n\t\tfor (int i=0;i<fields.length;i++){\n\t\t\tvals[i]=Integer.parseInt(fields[i]);\n\t\t}\n\t\treturn vals;\n\t}",
"int[] getFieldValues();",
"int getFieldIdArray(int index);",
"public int read_int4() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Permutation of the 8 nonmiddle slice edges (8! = 40320). | public int getNonMiddleSliceEdgePermutation() {
return Combinatorials.permutationToOrdinal(edgeCubiePermutations, 0, 8);
} | [
"public int getMiddleSliceEdgePermutation() {\n return Combinatorials.permutationToOrdinal(edgeCubiePermutations, FIRST_MIDDLE_SLICE_EDGE_CUBIE, 4);\n }",
"public Permutation(byte[] enc)\n {\n if (enc.length <= 4)\n {\n throw new IllegalArgumentException(\"invalid encoding\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the accountDescriptionCampusCode attribute. | public String getAccountDescriptionCampusCode() {
return accountDescriptionCampusCode;
} | [
"public String getCode()\r\n {\r\n return course.getCourseCode();\r\n }",
"public String getAccountPhysicalCampusCode() {\n return accountPhysicalCampusCode;\n }",
"public String getCampusCode() {\n return campusCode;\n }",
"public String getCompany_code_desc() {\r\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DML Functions public boolean insertion(String, String[], String[]) For DML Insertion Insert row into certain table | public boolean insertion(String table, String[] columns, String[] values) throws SQLException {
if (pks.containsKey(table) && checkExisitingPK(table, values[0]))
return false;
insert(tables.get(table), conditionFormator(columns),
conditionFormator1(table, Arrays.asList(columns), values));
return true;
} | [
"public void insert(final ITable table, final IColumn[] columns, final DatabaseValue[] values);",
"public synchronized void insertIntoTable(String tableName,String values[]) throws SQLiteException{ //tested OK\n\t\tString query = \"insert into \"+tableName+\" values(\";\n\t\tquery = buildQuery(query,values);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method: addPlayerProfiles Creates three new players with the userinputted names and creates the player boxes on the canvas. | private void addPlayerProfiles() { //Creates new players
playerOne = new Player(readLine("Player 1's name: "));
playerTwo = new Player(readLine("Player 2's name: "));
playerThree = new Player(readLine("Player 3's name: "));
canvas.addPlayerBoxes(playerOne.getName(), playerTwo.getName(), playerThree.getName());
... | [
"public void createPlayer(){\n\t\tfor(int i=0;i<_numberOfPlayers;i++){\n\t\t\t\t//Create new players and add them into ArrayList.\n\t\t\t_playerList.add(new Player());\n\t\t\t\t//put players into playerColorMap.\n\t\t\t_playerList.get(i).setColor(_colorList.get(i));\n\t\t\t\t//set name\n\t\t\t_playerList.get(i).set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |