query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Resets the leaderboard through making it an empty list | public void reset(){
leaderBoard = new ArrayList<>();
} | [
"public void clear() {\n leaderboard = new ArrayList<>();\n }",
"public synchronized void clear() {\n leaderboard.clear();\n }",
"public void clearLeaderboard() {\n hm.clearScores();\n }",
"public void reset(){\n lifeSize = (players.get(0).getSize() / players.get(0).getLives()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setConf sets the configuration and then initializes for query only. Use this alone if usage does not require writing. For a writeable (store and delete) version of this, call this and then setMultiTableBatchWriter(), then call init() that is what the DAO does. | @Override
public void setConf(final Configuration conf) {
this.conf = conf;
if (!isInit) {
try {
initInternal();
isInit = true;
} catch (AccumuloException | AccumuloSecurityException | TableNotFoundException | TableExistsException e) {
... | [
"@Override\n public void setConf(Configuration conf) {\n this.conf = conf;\n if (!isInit) {\n try {\n init();\n isInit = true;\n } catch (NumberFormatException e) {\n logger.warn(\"Unable to initialize index. Throwing Runtime Excep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column T_MAIL_VERIFY.HCSX_ID | public void setHcsxId(String hcsxId) {
this.hcsxId = hcsxId;
} | [
"public String getHcsxId() {\n return hcsxId;\n }",
"void xsetClaimCheckNumber(org.apache.xmlbeans.XmlString claimCheckNumber);",
"void xsetClaimchecknum(org.apache.xmlbeans.XmlString claimchecknum);",
"void xsetClaimId(org.apache.xmlbeans.XmlString claimId);",
"public void setXH(java.lang.String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read from an input stream which is the format of the SPARQL result set format in SSE. | public static ResultSet fromSSE(InputStream in) {
Item item = SSE.parse(in);
Log.warn(ResultSet.class, "Reading SSE result set not full implemented");
// See SPARQLResult. Have a level of ResultSetFactory that does
// "get SPARQLResult".
// Or just boolean/result set because thos... | [
"public static ResultSet fromSSE(InputStream in)\n {\n Item item = SSE.parse(in) ;\n ALog.warn(ResultSet.class, \"Reading SSE result set not full implemented\") ;\n // See SPARQLResult. Have a level of ResultSetFactory that does \"get SPARQLResult\".\n // Or just boolean/result set b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for variable numberOfOutputs | public int getNumberOfOutputs()
{
return numberOfOutputs;
} | [
"int getOutputsCount();",
"public abstract int getNumberOfOutputParameters();",
"public void setNumberOfOutputs(int numberOfOutputs)\n {\n this.numberOfOutputs = numberOfOutputs;\n }",
"int getDelegatedOutputsCount();",
"public int getNumberOfConnectorsNetworkOutputs() { return numberOfConnecto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column S_TODO_DET.LAST_PROCESSED_DATE | public Date getLAST_PROCESSED_DATE() {
return LAST_PROCESSED_DATE;
} | [
"public void setLAST_PROCESSED_DATE(Date LAST_PROCESSED_DATE) {\r\n this.LAST_PROCESSED_DATE = LAST_PROCESSED_DATE;\r\n }",
"public Date getLastChanged() {\n return (Date) jdbcTemplate.query(\"select max(a) as last_edited from (select max(plat.last_edited) as a from nmdreference.platform plat uni... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end of NotcherGroup::shutDown NotcherGroup::loadCalFile This loads the file used for storing calibration information such as cut depth, cut speed, cut aggression, etc. Each child object is passed a pointer to the file so that they may load their own data. | private void loadCalFile(IniFile pCalFile)
{
// load any settings which apply to all Notchers here
// NO COMMON DATA CURRENTLY LOADED
// call each Notcher to load its own data
for (int i = 0; i < numberOfNotchers; i++) {
notchers[i].loadCalFile(pCalFile);
}
} | [
"private static void readCaledar() {\r\n\t\ttry\r\n\t {\r\n\t FileInputStream fileIn = new FileInputStream(fileCaledar);\r\n\t ObjectInputStream in = new ObjectInputStream(fileIn);\r\n\t myCalender = (Calendar) in.readObject();\r\n\t in.close();\r\n\t fileIn.close();\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: SYSTEM_CODE | public void setSystemCode (java.lang.String systemCode) {
this.systemCode = systemCode;
} | [
"public void setSystemCode(String systemCode) {\n this.systemCode = systemCode;\n }",
"public void setSystemCode(java.lang.String systemCode) {\n this.systemCode = systemCode;\n }",
"public void setSystemCode(String systemCode) {\n this.systemCode = systemCode == null ? null : systemC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enqueue incoming messages inside the mailbox | public synchronized void enqueue(T message) {
if (!alive)
throw new NoSuchActorException();
mailBox.enqueue(message);
if (!this.looping) start();
} | [
"void addToQueue(WebhookMessage msg);",
"public void enqueue(Message msg){\n\t\tqueue.add(msg);\n\t}",
"MessageQueue createInbox();",
"public void enqueue(Message message) {\n\t\tqueue.add(message);\n\n\t}",
"void deliverScheduledMessages() throws ActiveMQException;",
"public synchronized void enqueue(Mes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Describes how the package version was originally added to the domain. An INTERNAL origin type means the package version was published directly to a repository in the domain. An EXTERNAL origin type means the package version was ingested from an external connection. | public PackageVersionOrigin withOriginType(PackageVersionOriginType originType) {
this.originType = originType.toString();
return this;
} | [
"public PackageVersionOrigin withOriginType(String originType) {\n setOriginType(originType);\n return this;\n }",
"public static int version() { \n\t\treturn alma.CalDataOriginMod.version.value;\n\t}",
"com.exacttarget.wsdl.partnerapi.VersionInfoResponse getVersionInfo();",
"java.lang.String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the domain of this polynomial spline function | @Override
public double[] getDomain() {
return domain;
} | [
"public double getDomainMax() {\n\tif ((x[n-1]-x[0])> 0) return x[n-1];\n\telse return x[0];\n }",
"public double getDomainMin() {\n\tif (x[n-1]-x[0] > 0) return x[0];\n\telse return x[n-1];\n }",
"public double[] getDomainBounds() {\n double max=-1.0e307, min=1.0e307;\n\n if(seriesCollection.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a row to the flex table. | private void addRow(FlexTable flexTable) {
int numRows = flexTable.getRowCount() + 1;
flexTable.setText(numRows, 0, "TEST1");
flexTable.setText(numRows, 1, "TEST2");
flexTable.setText(numRows, 2, "TEST3");
flexTable.setText(numRows, 3, "TEST4");
flexTable.setText(numRows, 4, "TEST5");
// flexTable.getFle... | [
"public void addRow(TableViewRow row) {\n this.rows.add(row);\n }",
"public void addRow(RowModel row) {\n rows.add(row);\n }",
"public void addRow() {\n tableModel.insertRow(this.getRowCount(), new String[]{});\n this.setModel(tableModel);\n\n }",
"void addRow() {\n defaultTableModel.s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for variable reference. | public String getVariableReference() {
return variableReference;
} | [
"VariableReference getVariableReference();",
"public VariableReference getVariable() {\n\t\treturn variable;\n\t}",
"Variable getVariable();",
"public VariableReferenceExpression getVariableReference() {\r\n\t\treturn variableReference;\r\n\t}",
"VariableReference createVariableReference();",
"VarReferenc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field474' field. | public void setField474(java.lang.CharSequence value) {
this.field474 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField474(java.lang.CharSequence value) {\n validate(fields()[474], value);\n this.field474 = value;\n fieldSetFlags()[474] = true;\n return this; \n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField473(java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Publish a distributed layer into the cloud. | void publishDistributedLayer(Class<? extends LayerInterface> layerClass, String implName, String regex); | [
"public void publish();",
"public void publish() {\n\t\tconnectMongo();\n\t\ttry {\n\t\t\tpublishMongo(mongo, db, buildSensorKuraPayload());\n\t\t}\n\t\tcatch(UnknownHostException uhe) {\n\t\t\tSystem.out.println(\"Unknown Host\");\n\t\t}\n\t}",
"private void publish() {\n Log.i(TAG, \"Publishing\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Iterating over data rows without header information and blank lines | @Override
public Iterator<Row> dataIterator() {
// iterator data rows
Iterator<Row> nIter = new RowSetIterator(this::nextRow, true);
if (nIter.hasNext()) {
Row row = nIter.next();
if (header == null)
header = row.asHeader();
else row.setHr(... | [
"private void ignoreFirstRow()\n\t{\n\t\tif (this.iRows.hasNext())\n\t\t{\n\t\t\tthis.iRows.next();\n\t\t}\n\t}",
"@Override\n public Iterator<Space> iterator() {\n return row.iterator();\n }",
"private static void dataLoop() throws Exception {\n for(int i=startRow; i<= totalRows; i++, ci++)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function to check the maternity leave can be applied or not | public boolean checkForMaternityLeave(int employeeId) throws LeaveException {
List<LeaveRequest> leaveRequests = new ArrayList<>();
leaveRequests = getLeaveDetails();
int count = 0;
for (LeaveRequest temp : leaveRequests) {
if (temp.getEmployeeId() == employeeId && temp.getL... | [
"boolean hasLeaveGameReqeuest();",
"public boolean isLeave()\r\n { return type == LEAVE; }",
"private boolean hasValidData( )\n\t{\n validateData( );\n \n\t\treturn canLeave();\n\t}",
"boolean avail_leave(int no_of_leaves, char type_of_leave){\n\t\tif(no_of_leaves<total_leaves&&type_of_leave=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Plaid Institution ID associated with the Item. | @javax.annotation.Nullable
@ApiModelProperty(value = "The Plaid Institution ID associated with the Item.")
public String getInstitutionId() {
return institutionId;
} | [
"public Integer getInstitutionId() {\n\t\treturn institutionId;\n\t}",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"The Plaid Item ID. The `item_id` is always unique; linking the same account at the same institution twice will result in two Items with different `item_id` values. Like all Plaid ident... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "XMLBFactura" element | com.synergyj.cursos.webservices.ordenes.XMLBFactura getXMLBFactura(); | [
"void setXMLBFactura(com.synergyj.cursos.webservices.ordenes.XMLBFactura xmlbFactura);",
"public Object obtenerFrente(){\n \n Object element = null;\n\n if(!this.esVacia()){\n element = this.frente.getElemento();\n }\n return element;\n }",
"org.apache.xmlbeans.X... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Nombre de metodo: CargarDepartamentos Parametros: TableView table, Connection conexion, String busqueda Retorno: Ninguno Descripcion: Cargar en la tabla los departamentos que se pueden editar | private void CargarDepartamentos(TableView<Departamento> table, Connection conexion, String busqueda){
table.setItems(E.CargarDepartamentos(busqueda, conexion));
cargarColumnasDepartamentos(table);
} | [
"private void porDefectoDepartamentos(){\r\n MostrarParteDepartamentos(false);\r\n tblDepartamentos.getColumns().clear();\r\n CargarDepartamentos(tblDepartamentos, conexion, \"Ninguna\");\r\n }",
"private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form DeleteAdminClass | public DeleteAdminClass() {
initComponents();
} | [
"public delete() {\n initComponents();\n }",
"public DynamicDelete() {\n initComponents();\n }",
"public Deletion() {\n initComponents();\n }",
"private Delete() {}",
"void displayDeleteAccountForm(int type);",
"public void deleteClass(String label);",
"private void jButton... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deserializes a measured point. | public static RamseteInstantaneousPoint deserializeInstantaneousPoint(double[] aSerialized, Distance.Unit aDistanceUnit, Velocity.Unit aVelocityUnit)
{
int dataPtr = 0;
double time = aSerialized[dataPtr++];
double x = aSerialized[dataPtr++];
double y = aSerialized[dataPtr++];
... | [
"@Override\n public Double deserialize(MemoryReader reader) {\n return reader.readDouble();\n }",
"com.google.protobuf.ByteString getPoint();",
"MeasuringPoint getMeasuringPoint();",
"abstract PointStream getWrappedData();",
"@Override\n public Geometry deserialize(JsonElement json, Type typeO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
select user list where equal param pageDto | Page<User> pageByParam(PageDto pageDto); | [
"List<UserVo> selectUserVoPage(Map<String, Object> params);",
"List<UserDTO> getUsersBy(String term, Integer page);",
"@Override\n public Page<UserPojo> list(Page<UserPojo> page,String name){\n return page.setRecords(userDao.selectList(page,name));\n }",
"List<User> findUsersOnPage(int currentPag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
supportsLimitedOuterJoins JDBC API Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.) | public boolean supportsLimitedOuterJoins()
throws SQLException
{
// The SimpleText driver does not support outer joins
return false;
} | [
"public boolean supportsLimitedOuterJoins() throws SQLException {\n return true;\n }",
"public boolean supportsFullOuterJoins()\n throws SQLException\n {\n // The SimpleText driver does not support outer joins\n\n return false;\n }",
"public boolean supportsFullOuterJoins()\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set worker output directory | public static void setWorkOutputDir(TaskAttemptContext context)
throws IOException
{
Configuration conf = context.getConfiguration();
String outputPath = getOutputDir(conf);
// we need to do this to get the task path and set it for mapred
// implementation since it can't be done automatically beca... | [
"public void setOutputDirectory(String outputDirectory);",
"public TpAnimation setOutputDir(String outputDir) {\n if (isRendering) {\n System.err.println(\"Rendering in progress - setting outputDir not allowed.\");\n }\n else {\n if (outputDir.endsWith(\"/\") || outputDi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set method for struct member 'f_power'. Field Documentation Blender Source Code falloff The power law real gravitation is 2 (square). | public void setF_power(float f_power) throws IOException
{
if ((__io__pointersize == 8)) {
__io__block.writeFloat(__io__address + 44, f_power);
} else {
__io__block.writeFloat(__io__address + 44, f_power);
}
} | [
"public void setF_power_r(float f_power_r) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 56, f_power_r);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 56, f_power_r);\n\t\t}\n\t}",
"public void setPower(double power)\n {\n this.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the resource that will be loaded as the validation document. | @Required
public void setResource(final String filename) {
try {
this.validDocStr = ResourceUtil.getTextResource(
this.applicationContext, filename);
} catch (final IOException e) {
throw new RuntimeException("Loading of text resource failed: " + e);
}
} | [
"public void setResource(Resource resource) {\r\n this.resource = resource;\r\n }",
"public void setDocumentForValidation(Document documentForValidation) {\n this.documentForValidation = documentForValidation;\n }",
"@Override\n public void setResource(final Resource pResource) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
NAME:Clothing(String name, double price, int quantity, double weight) DESCRIPTION:Clothing Extends Item Clothing is a type of Item Relies on the superclass Item INPUTS:name price quantity weight OUTPUTSNone PROCESS : | public Clothing(String name, double price, int quantity, double weight)
{
super(name, price, quantity, weight);
} | [
"public Item(String description, double weight, String name)\n {\n this.description = description;\n this.weight = weight;\n this.name = name;\n }",
"public Produce(String itemID, String itemDescription,\n double pricePerPound, double weight)\n {\n super(itemID, itemDescripti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new RxTxMonitoringMsg of size 80. | public RxTxMonitoringMsg() {
super(DEFAULT_MESSAGE_SIZE);
amTypeSet(AM_TYPE);
} | [
"public RxTxMonitoringMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }",
"public RxTxMonitoringMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get valid user info on the condition | private User getUserInfo(String condition){
String sql="SELECT [user_id], [password], [group_id], [name1], [name2], [effective_date], [expiry_date], [enable] FROM [dbo].[user] " + condition ;
log.info("GetUser: " + sql);
List<Object> lsUsers = dbCommonUtil.query(sql, new ParseResultSetInterface(){
@Override
... | [
"private void checkUser() {\r\n \tlogger.debug(\"IN\");\r\n \ttry {\r\n \t\tUserProfile profile = this.getUserProfile();\r\n \t\tif (!profile.isAbleToExecuteAction(\"DatasetManagement\")) {\r\n \t\t\tthrow new SecurityException(\"User [\" + \r\n \t\t\t\t\t\"unique identifier: \" + profile.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new Program item dto. | public ProgramItemDTO(PersonalProgramDTO pp) {
this((TotaraProgramDTO) pp);
this.shared = true;
} | [
"public ProgramItemDTO(DiscoveryProgram discoveryProgram) {\n setDiscoveryProgramType(discoveryProgram.getType());\n setDiscoveryProgramText(discoveryProgram.getDiscoveryProgramText());\n }",
"public static ProgramItemDTO valueOf(PersonalProgramDTO p) {\n return ProgramItemDTO.builder().id... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all provider IDs for the given site. | public static List<String> getProviderIDsForSite(Site site)
{
List<String> providers = new ArrayList<>();
if (site != null)
{
providers.addAll(getAuthzGroupService().getProviderIds(site.getReference()));
}
return providers;
} | [
"public static Map<String, List<String>> getProviderIDsForSites(List<Site> sites) {\n\n\t\tif (sites.isEmpty()) {\n\t\t\treturn Collections.EMPTY_MAP;\n\t\t}\n\n\t\tList<String> realmIDs\n\t\t= sites.stream().map(s -> s.getReference()).collect(Collectors.toList());\n\n\t\treturn getAuthzGroupService().getProviderID... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Target Namespace' attribute. If the meaning of the 'Target Namespace' attribute isn't clear, there really should be more of a description here... | String getTargetNamespace(); | [
"public String getTargetNamespace() {\n return _targetNamespace;\n }",
"public String getTargetNamespace();",
"public void setTargetNamespace(String targetNamespace);",
"public String getXMLSchemaTargetNamespace() {\n String targetNamespace = getPreferenceStore().getString(CONST_DEFAULT_TARGET_N... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleNumber" $ANTLR start "entryRuleXState" InternalSitemap.g:6669:1: entryRuleXState returns [String current=null] : iv_ruleXState= ruleXState EOF ; | public final String entryRuleXState() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleXState = null;
try {
// InternalSitemap.g:6669:46: (iv_ruleXState= ruleXState EOF )
// InternalSitemap.g:6670:2: iv_ruleXState= ruleXState EOF
... | [
"public final String entryRuleNumber() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleNumber = null;\n\n\n try {\n // InternalSitemap.g:6626:46: (iv_ruleNumber= ruleNumber EOF )\n // InternalSitemap.g:6627:2: iv_ruleNumber= ruleNum... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert sink record to JMS message. | Message recordToMessage(Session session, SinkRecord record) throws JMSException; | [
"public interface JmsConverter {\n\t/**\n\t * Configure JMS message converter.\n\t *\n\t * @param properties Configuration properties.\n\t */\n\tvoid configure(Map<String, String> properties);\n\n\t/**\n\t * Convert sink record to JMS message.\n\t *\n\t * @param session Active JMS session.\n\t * @param record Conne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the top menu | private void createTopMenu() {
ArrayList<MenuItem> menu = this.fetchTopMenu();
if (menu != null) {
Iterator<MenuItem> it = menu.iterator();
this.menuTop = new ArrayList<MenuItem>();
while (it.hasNext()) {
MenuItem menuItem = it.next();
if (menuItem.getParentId() == 0) {
// LOG.debug("*... | [
"public void topMenuMaker() {\n\t\tfileMenu = new Menu(\"File\");\n\t\tviewMenu = new Menu(\"Garden Options\");\n\t\thelpMenu = new Menu(\"Help\");\n\t\t\n\t\tnewButton = new Button(\"New\");\n\t\tCustomMenuItem newItem = new CustomMenuItem(newButton);\n\t\tfileMenu.getItems().add(newItem);\n\n\t\tsaveButton = new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send a message of type msgType with a formatted body | private void sendMessage(String msgType, String body, String formattedBody, String format) {
Message message = new Message();
message.msgtype = msgType;
message.body = body;
if (null != formattedBody) {
// assume that the formatted body use a custom html format
m... | [
"private void sendMessage(String type, String argName, String arg) throws IOException {\n outToServer.writeBytes(EmailUtils.constructTcpMessage(type, argName, arg));\n }",
"public GameMessage(int type, String body) {\n this.type = type;\n this.body = body;\n }",
"public void setMsgType(Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated string fraudwarnings = 13; | java.lang.String getFraudwarnings(int index); | [
"public java.lang.String getFraudwarnings(int index) {\n return fraudwarnings_.get(index);\n }",
"public java.lang.String getFraudwarnings(int index) {\n return fraudwarnings_.get(index);\n }",
"int getFraudwarningsCount();",
"public com.google.protobuf.ByteString\n getFraudwarnin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column dh_counter_order.member_name | public String getMemberName() {
return memberName;
} | [
"protected String name() {\n return member.getName();\n }",
"public String getMembername() {\n\t\treturn membername;\n\t}",
"public String getMemberNo() {\n return memberNo;\n }",
"public final Identifier getName() {\n return getMemberImpl().getName();\n }",
"public Integer getMember... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets how many times to prompt. | public void setTimesToPrompt(int timesToPrompt) {
this.timesToPrompt = timesToPrompt;
} | [
"public void setTimesPrompted(int timesPrompted) {\n this.timesPrompted = timesPrompted;\n }",
"public int getTimesToPrompt() {\n return this.timesToPrompt;\n }",
"void askForRepeat();",
"public void setCurrentNumberofPlayers() {\n\t\tnoOfPlayers = noOfPlayers + 1;\n\t}",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Intialize list view with positive posts. | public void initPosPosts(){
dbAdapter = new DBAdapter(getActivity());
dbAdapter.open();
Cursor c = dbAdapter.getPosPosts();
SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(
getActivity(), R.layout.postitem, c, new String[] {
"titel", "dato", "beloeb" }, new int[] { R.id.titel,
R.id.d... | [
"public void initNegPosts(){\n\t\t\tdbAdapter = new DBAdapter(getActivity());\n\t\t\tdbAdapter.open();\n\t\t\tCursor c = dbAdapter.getNegPosts();\n\t\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\t\"titel\", \"dato\", \"b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column trading_item.CategoryMappingAllowed | public void setCategorymappingallowed(String categorymappingallowed) {
this.categorymappingallowed = categorymappingallowed == null ? null : categorymappingallowed.trim();
} | [
"public String getCategorymappingallowed() {\r\n return categorymappingallowed;\r\n }",
"public void setIsUseProductTaxCategory (boolean IsUseProductTaxCategory)\n\t{\n\t\tthrow new IllegalArgumentException (\"IsUseProductTaxCategory is virtual column\");\t}",
"public void setCutypeMapping(final Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use MsgUpdateAdminResponse.newBuilder() to construct. | private MsgUpdateAdminResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private MsgUpdateAdmin(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private AdminResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MsgClearAdminRes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of DemuxContactQuery. | public DemuxContactQuery(ContactQuery sourceQuery)
{
super(DemuxContactSource.this);
this.sourceQuery = sourceQuery;
sourceQuery.addContactQueryListener(this);
} | [
"public ContactQuery createContactQuery(Pattern query)\n {\n if(latestQuery != null)\n latestQuery.clear();\n\n latestQuery = new MsOutlookAddrBookContactQuery(this, query);\n\n return latestQuery;\n }",
"Query createQuery();",
"public ContactQuery getQuerySource()\n {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the front item from the deque. | public int getFront() {
if(isEmpty())
return -1;
else {
return queue[front];
}
} | [
"public int getFront() {\n if (isEmpty()) return -1;\n return cDeque[start];\n }",
"@Override\r\n\tpublic T getFront(){\r\n\t\treturn queue[front];\r\n\t}",
"public int getFront() {\n return isEmpty() ? -1 : queue[(front - 1 + len) % len];\n }",
"public int getFront() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
paint the Clapper Rail tutorial frame | private void paintCRTutorial(Graphics g) {
g.setFont(new Font("Serif", Font.PLAIN, FONT_30));
// CR: Background
g.drawImage(pic_water, 0, 0, this);
switch(tutorialLevel) {
case 5:
g.setColor(Color.RED);
g.drawImage(pic_food, frameWidth/2-300, frameHeight/2-300, CR_IMG_TUT, CR_IMG_TUT, this);
g.dra... | [
"private void showTutorial () {\n ShowcaseConfig config = new ShowcaseConfig();\n config.setDelay(400);\n final int[] numElemMostrati = {0};\n\n MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(this);\n sequence.setConfig(config);\n sequence.addSequenceItem(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Output only. The FAQ answer. .google.cloud.dialogflow.v2beta1.FaqAnswer faq_answer = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; | com.google.cloud.dialogflow.v2beta1.FaqAnswer getFaqAnswer(); | [
"com.google.cloud.dialogflow.v2beta1.FaqAnswerOrBuilder getFaqAnswerOrBuilder();",
"com.google.cloud.dialogflow.v2beta1.DialogflowAssistAnswer getDialogflowAssistAnswer();",
"public AnswerType getAnswer() {\n return answer;\n }",
"public Answer getAnswer(){\n\t\treturn answer; /** use relation -> De... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set special attribute: constraint : overwrite exiting value | void setConstraint(DapDataset dmr, CEConstraint ce) throws DapException {
if (ce == null)
return;
if (ce.isUniversal())
return;
DapAttribute a = dmr.findAttribute(DapUtil.CEATTRNAME);
if (a == null) {
a = new DapAttribute(DapUtil.CEATTRNAME, DapType.STRING);
dmr.addAttribute(a);
... | [
"public void setConstraint(ConOp lc);",
"protected abstract void bakeConstraint();",
"private void setRestrictiveConstraint (int restriction)\r\n\t{\r\n\t\t// Keep the modifiers.\r\n\t\tconstraints &= TextField.CONSTRAINT_MASK;\r\n\t\t\r\n\t\t// Set the restrictive value.\r\n\t\tconstraints |= restriction; \r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
New round, clears the board SUCCESSFULLY TESTED! | public void newRound() {
// TODO: implement winner of last round starts next
// then make a test for it.
round = 0;
player = 1;
gameBoard.clearBoard();
} | [
"public void clearBoard() {\n myScore = 0;\n\tmyMoves = 0;\n myWin = false;\n myLose = false;\n \n //4*4 could also be written as 16 this was just for readabilities sake in terms of grasping the 4 x 4 matrix \n mySquares = new Square[4 * 4];\n for (int i = 0; i < mySquares.length; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtain database date and time from specific database (Oracle) using a NAMED native query. Use NamedNativeQuery approach here because required to have native for vendorspecific query and use named native query rather than passing in SQL string. | public static String getDatabaseSystemDateTimeNNQ(EntityManager aEm)
{
return aEm.createNamedQuery("oracle-getDbDate").getSingleResult().toString();
} | [
"public static String getDatabaseSystemDateTime(EntityManager aEm)\n {\n String getDateString = \"SELECT sysdate FROM dual\";\n return aEm.createNativeQuery(getDateString).getSingleResult().toString();\n }",
"public String getDatastoreDateStatement()\n {\n return \"select tt_sysdate from d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scroll Up till Title of the page. | public void ScrollUp() throws IOException {
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("window.scrollTo(document.body.scrollHeight,0)");
Log.info("Windows is scrolled to up of page.");
} | [
"public void scrollUp() {\n JavascriptExecutor jse = (JavascriptExecutor)driver;\n jse.executeScript(\"window.scrollBy(0, -500)\", new Object[]{\"\"});\n }",
"public void scrollUp() {\n JavaScriptExecutor javaScriptExecutor = new JavaScriptExecutor();\n Long value = (Long) javaScrip... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sort from lo to hi...place a[i] in correct position | public static void sort(Comparable[] a, int lo, int hi) {
for (int i = lo; i <= hi; i++) {
for (int j = i; i > lo; i--) {
if (less(a[j], a[j-1])) exch(a, j, j-1);
else break;
}
}
} | [
"private static void sort(Comparable [] a, int lo, int hi){\n int v = hi;\n int lt = lo, eq = lo, gt = lo;\n if(hi <= lo) return;\n while(gt < hi){\n int c = a[gt].compareTo(a[v]);\n if(c <= 0){\n Insertion.exch(a, lt, gt);\n if(lt != e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column b_adverisement.slide_sort | public void setSlideSort(Integer slideSort) {
this.slideSort = slideSort;
} | [
"public Integer getSlideSort() {\n return slideSort;\n }",
"public void changeSortOrder();",
"@Override\n @Transient\n public void setupSortIndex(final Session hibernateSession) {\n final Object object = hibernateSession.getNamedQuery(ChangeRequestProduct.FIND_NEXT_INDEX_VALUE).uniqueResu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a new graph with Vertex matrix equaling [HEIGHT][WIDTH] Edges are randomly added between vertices 80% change for a horizontal connection 50% change for a vertical connection | public Graph generate() {
Random r = new Random();
Vertex[][] verts = new Vertex[HEIGHT][WIDTH];
List<Vertex> verts_l = new ArrayList<Vertex>();
List<Edge> edges_l = new ArrayList<Edge>();
for (int i = 0; i < verts.length; i++) {
for (int j =... | [
"private void makeGraph()\n {\n int startX, startY;\n int width, height;\n for (Room room : roomList)\n {\n startX = room.getStartX();\n startY = room.getStartY();\n width = room.getWidth() + startX;\n height = room.getHeight() + startY;\n\n for (int i = startY; i < height; i++... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy constructor for PizzaToppings | public PizzaTopping(PizzaTopping t)
{
this.name = t.name;
this.choice = t.choice;
this.isDoubleToppings = t.isDoubleToppings;
this.isPremiumTopping = t.isPremiumTopping;
} | [
"public Pizza(Pizza pizza) {\n this.pizzaSize = pizza.pizzaSize;\n this.cheeseToppings = pizza.cheeseToppings;\n this.pepperoniToppings = pizza.pepperoniToppings;\n this.veggieToppings = pizza.veggieToppings;\n }",
"public Pizza() {\n this.toppings = new ArrayList<>();\n this.price = 0;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Move the graph position to newPosition where newPosition is dictated by an x screen coordinate. | private void moveEntireGraphingPanel(final double newPosition) {
double move = -1.0;
if (zoomedOutBeyondOneToOne) {
move = newPosition * zoom;
} else {
move = newPosition / zoom;
}
if (graphPosition + move < getGraphPositionMax()) {
if (graphPosition + move < getGraphPositionMin()) {
resetGraphPo... | [
"public void moveGraph(int x, int y) {\r\n\t\tArrayList<Node> nodes = _graph.get_nodes();\r\n\t\tfor (Node n : nodes) {\r\n\t\t\tn.setX(n.getX() + x);\r\n\t\t\tn.setY(n.getY() + y);\r\n\t\t}\r\n\t}",
"public void moveGraph() {\r\n\r\n\t\tnew MoveGraphFrame(this);\r\n\t}",
"public void moveTo(int newX, int newY)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a submatrix of the given matrix, clamping the specified rectangle if necessary to be in a valid range. | static FloatMatrix2D createSubMatrixClamping(
FloatMatrix2D m, int r0, int c0, int r1, int c1)
{
return m.subMatrix(
Math.max(0, r0),
Math.max(0, c0),
Math.min(m.getNumRows(), r1),
Math.min(m.getNumColumns(), c1));
} | [
"public Matrix getSubMatrix(\n int minRow,\n int maxRow,\n int minColumn,\n int maxColumn );",
"static MutableFloatMatrix2D createSubMatrixClamping(\n MutableFloatMatrix2D m, int r0, int c0, int r1, int c1)\n {\n return m.subMatrix(\n Math.max(0, r0), \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Seperates Generic Lines from dialog pool | private void decoupleGenericLines(ArrayList<Dialog> lines) {
for(Dialog d : lines) {
if(d.getFlags().contains(DialogFlags.GENERIC)) {
this.genericDialog.add(d);
} else {
this.allLines.add(d);
}
}
} | [
"private JComponent newEntryLine(List lineContents) {\r\n JComponent result = new JPanel();\r\n result.setLayout(new BoxLayout(result, BoxLayout.X_AXIS));\r\n// result.setAlignmentX(0);\r\n boolean simpleLine = true;\r\n \r\n EntryStructure it = null;\r\n String attributeName = null;\r\n String object... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns sum of digits of the given number | public int getSumOfDigits(int number) {
int result = 0;
do {
result += number % 10;
}
while ((number /= 10) != 0);
return result;
} | [
"public static int sumOfDigits(int number) {\n\n int sum = 0;\n while (number != 0) \n { \n sum += (number % 10);\n number /= 10; \n } \n return sum;\n }",
"protected static int sumDigits(int number) {\n int total = 0;\n int todo = number;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the 'Coverage Type' literal with the specified integer value. | public static CoverageType get(int value) {
switch (value) {
case PATIENT_GENDER_VALUE: return PATIENT_GENDER;
case PATIENT_AGE_GROUP_VALUE: return PATIENT_AGE_GROUP;
case CLINICAL_FOCUS_VALUE: return CLINICAL_FOCUS;
case TARGET_USER_VALUE: return TARGET_USER;
case WORKFLOW_SETTING_VALUE: return WORKFL... | [
"int getCoverageTypeValue();",
"GetCoverageType createGetCoverageType();",
"public static MetadataTypeType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase TC211_VALUE: return TC211;\n\t\t\tcase FGDC_VALUE: return FGDC;\n\t\t\tcase OTHER_VALUE: return OTHER;\n\t\t}\n\t\treturn null;\n\t}",
"CoverageDescript... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A function which returns the total production amount of all workers currently working in the production building. | public int productionAmount() {
int sum = 0;
for(E e : workers) {
sum += e.productionAmount();
}
return sum;
} | [
"public int getTotalWorkerCount() {\n return this.workerCount;\n }",
"public double allProduction() {\n double total = 0;\n\n for (PowerPlant p : plants) {\n total += p.getTotalOutput();\n }\n\n return total;\n }",
"public void computeProductionCost() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the type of this object as a SixdmlXpathObjectType. | public SixdmlXpathObjectType getType() {
return this.type;
} | [
"@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}",
"public String getObjectTypeXML() {\n return this.objectTypeXML;\n }",
"public IType getElementPropertyGosuTy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
updateMounthFreezMoney updates user's money, payed for the periodical | public void updateMounthFreezMoney(String email, String periodical){
double currentAllPayedMoney = getPayedMoneyForPeriodical (email, periodical);
double monthPrice = getMonthPriceForPeriodical (email, periodical);
double newMoney;
if (currentAllPayedMoney >= monthPrice){
... | [
"User changeMoneyValueInWallet(User user, float transactionMoney, boolean adding);",
"public void updateMonthlyFee() {\n balance -= monthlyFee;\n checkAllowed();\n }",
"public void updateMoney() {\n Player teamsMe = Teams.getPlayersOfTeam(Teams.getMe());\n\t\tif (Teams.comparePlayers(teamsMe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds profile test/demo data which is also setup on the client application. | private static void addDemoProfiles( ServerProfileStore store, String realm ) throws NamingException
{
for ( int ii = 0; ii < ProfileTestData.PROFILES.length; ii++ )
{
ServerProfile profile = ProfileTestData.PROFILES[ii];
BaseServerProfileModifier modifier = new BaseServerPro... | [
"public void loadTestData() {\n profilepages.addAll(DefaultDataStore.getInstance().getAllProfiles());\n }",
"public void addProfile(FacePamphletProfile profile) {dataBase.put(profile.getName(),profile);}",
"public void addProfile (Profile profile)\n {\n addProfile(profile, false);\n }",
"org.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets array of all "precondition" element | public void setPreconditionArray(com.walgreens.rxit.ch.cda.POCDMT000040Precondition[] preconditionArray)
{
synchronized (monitor())
{
check_orphaned();
arraySetterHelper(preconditionArray, PRECONDITION$36);
}
} | [
"public void setPreconditionArray(int i, com.walgreens.rxit.ch.cda.POCDMT000040Precondition precondition)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.POCDMT000040Precondition target = null;\n target = (com.walgreens.rxit.ch.cda... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to extract the Patch supported products list from the affected products list. | protected List<Product> getPatchSupportedProducts(List<Product> affectedProductsList) {
List<Product> affectedPatchSupportedProductsList = new ArrayList<>();
List<Version> affectedPatchSupportedVersionList = new ArrayList<>();
Product affectedPatchSupportedProduct;
logger.debug("Extract... | [
"protected List<Product> getWUMProductsFromAffectedProducts(List<Product> affectedProductsList) {\n List<Product> affectedWUMProductsList = new ArrayList<>();\n List<Version> affectedWUMVersionList = new ArrayList<>();\n\n logger.debug(\"Extracting the affected WUM supported products\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the original element which has been used for the candidate creation. | public AbstractDNode getOriginalElement() {
return element;
} | [
"public static IJavaElement toOriginal(IJavaElement element) {\n \t\treturn element.getPrimaryElement();\n \t}",
"Element getElement() {\n\t\tElement result = element.clone();\n\t\tresult.setName(table.getName());\n\t\treturn result;\n\t}",
"public Element getElement() {\n return getNewElement();\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
makes the Apply/Close button panel, with the Apply button on the left and the Close button on the right. The panel is created and organised, but not applied anywhere. | protected JPanel makeApplyClosePanel() {
final JPanel applyClosePanel = new JPanel();
buildOKButton();
OKButton.setText("Apply");
// OKButton.setEnabled(false); // doesn't act correctly when open and then new image frame is added.
applyClosePanel.add(OKButton, BorderLayo... | [
"private void setButtonPanelComponents(){\n\t\tJPanel buttonPane = new JPanel();\n\t\tbuttonPane.setPreferredSize(new Dimension(-1,32));\n\t\tbuttonPane.setBackground(Constant.DIALOG_BOX_COLOR_BG);\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Set each element of the 2D double array to 1/a where a is the value of an element. | public static void div_one(double[][] A) {
int i,j;
for (i = 0; i < A.length; i++) {
for (j = 0; j < A[i].length; j++) {
A[i][j] = 1.0 / A[i][j];
}
}
} | [
"public static void add_one(double[][] A) {\r\n\tint i,j;\r\n\tfor (i = 0; i < A.length; i++) {\r\n\t\tfor (j = 0; j < A[i].length; j++) {\r\n\t\t\tA[i][j] = 1 + A[i][j];\r\n\t\t}\r\n\t}\r\n}",
"public void norm(){\r\n for (int y = 0; y < dimY; y++){\r\n int firstX = 0;\r\n while (Mat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the due date | public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
} | [
"public void setDueDate(Date due)\n {\n if (this.rented)\n this.due = due;\n }",
"public void setDueDate(Date d){dueDate = d;}",
"public void setDueDate(String dueDate) {\n }",
"public void setDueDate(final int dueDate) {\r\n this.dueDate = dueDate;\r\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Find the queries that authenticatedUser has access to by virtue of group affiliation. | public Collection getGroupQueries(AuthenticatedUser authenticatedUser) {
log.debug("getting group queries.");
if (!groupQueries.containsKey(authenticatedUser.getUsername())) {
this.addUserToQueue(authenticatedUser.getUser());
}
/*
* User names are guara... | [
"@Test\n\tvoid findAllForMyGroup() {\n\t\tinitSpringSecurityContext(\"mmartin\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"dig as\", null, newUriInfoAsc(\"id\"));\n\n\t\t// 4 users from delegate and 1 from my company\n\t\tAssertions.assertEquals(5, tableItem.getRecordsTotal());\n\t\tAsse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Centred differentiation method, generally most accurate | private double centredDifferentiation(int i){
if(i == 0 || i ==n) throw new IllegalArgumentException("Cannot use this method near endpoints!");
return (yS[i+1] - yS[i-1])/(2*h);
} | [
"public double det_6_10() {\n return x_6 * y_10 - y_6 * x_10;\n }",
"public void computeCenterDistance(){\r\n\r\n\t\tcenterDistances = new double[numBlocks][numBlocks];\r\n\t//\tSystem.out.println(\"************** Center Distance *****************\");\r\n\t\t\r\n\t\tfor(int i = 0; i < numBlocks - 1; i++){\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of fromValue method, of class StatusType. | @Test(expected = IllegalArgumentException.class)
public void testFromValueWithException() {
System.out.println("fromValue");
String value = "DELETED";
StatusType expResult = StatusType.DELETED;
StatusType result = StatusType.fromValue(value);
assertEquals(expResult, result);
... | [
"@Test\n public void testFromValue() {\n System.out.println(\"fromValue\");\n String[] values = {\"deleted\"};\n StatusType[] expResults = {StatusType.DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.fromValue(values[inde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getCategoryParentId method, of class Category. | @Test
public void testGetCategoryParentId() {
System.out.println("getCategoryParentId");
Category instance = new Category();
instance.setCategoryParentId(0);
int expResult = 0;
int result = instance.getCategoryParentId();
assertEquals(expResult, result);
} | [
"public int getCategoryParentId() {\n return categoryParentId;\n }",
"@Test\n public void testSetCategoryParentId() {\n System.out.println(\"setCategoryParentId\");\n int CategoryParentId = 0;\n Category instance = new Category();\n instance.setCategoryParentId(CategoryPar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Directly generate a patch from the difference between two buffers. This is just like `git_diff_buffers()` except it generates a patch object for the difference instead of directly making callbacks. You can use the standard `git_patch` accessor functions to read the patch data, and you must call `git_patch_free()` on th... | @Nullable
public static Patch fromBuffers(
@Nullable byte[] oldBuffer,
@Nullable String oldAsPath,
@Nullable byte[] newBuffer,
@Nullable String newAsPath,
@Nullable Diff.Options opts) {
Patch out = new Patch(false, 0);
Error.throwIfNeeded(
... | [
"void createPatch(@Nullable List<File> pFileToDiff, @Nullable ICommit pCompareWith, @NonNull OutputStream pWriteTo);",
"@Nullable\n public static Patch fromBlobAndBuffer(\n @Nullable Blob oldBlob,\n @Nullable String oldAsPath,\n @Nullable byte[] buffer,\n @Nullable S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a new Song queue. | public SongQueue()
{
this.queue = new LinkedList<>();
} | [
"public SongQueue() {\n\t\tuserFile = new File(\"saveFiles/SongQueue.txt\");\n\t\t//reads any possible save file if not it creates one\n\t\ttry {\n\t\t\tif(!userFile.createNewFile())\n\t\t\t\treadInput();\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tif(songs == null) {\n\t\t\tcreateNe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get an array of all the sensors in this LMS. | @Override
public Sensor[] getAllSensors() {
ArrayList<Sensor> sensorArray = new ArrayList<Sensor>();
for(Entry<String, ArrayList<Sensor>> entry : this.sensors.entrySet()) {
for(Sensor thisSensor : entry.getValue()) {
sensorArray.add(thisSensor);
}
}
// ArrayList.toArray() didn't want to play b... | [
"protected Sensor[] getSensorValues() { return sensors; }",
"public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }",
"public synchronized Sensor[] getSensorArray(){\n\t\treturn sensorArray;\n\t}",
"IrSeekerIndividualSensor[] getIndividualSensors();",
"protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use MaiDiBegin_xpbf.newBuilder() to construct. | private MaiDiBegin_xpbf(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private JiaoZhuBegin_xpbf(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private GameStart_xpbf(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a ResponseVariable with the given name and initial value, 0.0, over the range [Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY] | public ResponseVariable(ModelElement parent, String name) {
this(parent, 0.0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, name);
} | [
"public ResponseVariable(ModelElement parent, double initialValue, String name) {\n this(parent, initialValue, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, name);\n }",
"public ResponseVariable(ModelElement parent, double initialValue) {\n this(parent, initialValue, Double.NEGATIVE_INFINIT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends response to northbound component. | void sendNorthboundResponse(Message message); | [
"public void sendResponse() throws TransportBindingException;",
"public void startResponse()\n\t\t\t{\n\t\t\t\tsend(\"<response>\", false);\n\t\t\t}",
"void sendResponse(RSP_TYPE responseData);",
"public void sendResponse() {\n doSendResponse(flowResponse.toJson());\n }",
"public String receiveRes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fire the AjaxBehaviors for the given control set and return true if the page should continue processing, false otherwise. This method can be overridden if you need to customize the way AjaxBehaviors are fired. | protected boolean fireAjaxBehaviors(Context context, Set<Control> ajaxBehaviorSourceSet) {
boolean continueProcessing = true;
for (Iterator<Control> it = ajaxBehaviorSourceSet.iterator(); it.hasNext();) {
Control source = it.next();
// Pop the first entry in the set
... | [
"public boolean fireAjaxBehaviors(Context context) {\r\n\r\n if (!hasAjaxBehaviorSourceSet()) {\r\n return true;\r\n }\r\n\r\n return fireAjaxBehaviors(context, getAjaxBehaviorSourceSet());\r\n }",
"boolean hasAjaxBehaviorSourceSet() {\r\n if (ajaxBehaviorSourceSet == nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create a handshake requestof the current version from a feature code | public MaintenanceHandshakeRequest(byte featureCode)
{
this.featureCode = featureCode;
} | [
"public MaintenanceHandshakeRequest(byte[] message)\n {\n // check that it's the right length\n if (message.length != 4)\n {\n throw new IllegalArgumentException();\n }\n\n // unmarshall\n majorVersion = message[0];\n minorVersion = message[1];\n featureCode = message[2];\n }",
"co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates a new path by applying 2opt after the two given town indices. | public Path apply2opt(int afterIndex1, int afterIndex2)
{
// this ensures the starting point never changes (and makes the loops easier)
int i1, i2;
if (afterIndex1 < afterIndex2) {
i1 = afterIndex1;
i2 = afterIndex2;
} else {
i1 = afterIndex2;
i2 = afterIndex1;
}
// left and right ed... | [
"@Override\r\n public ArrayList<String> getPath(String town1, String town2) {\r\n return graph.shortestPath(new Town(town1),new Town(town2));\r\n }",
"private void twoOpt() {\n boolean improvement = true;\n while (improvement) {\n improvement = false;\n int n = tem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates the choice box used for selecting doors in the right panel. | private ChoiceBox createRightPanelDoorChoiceBox() {
doors = new ChoiceBox();
doors.getItems().add("Select Door");
setDefaultRightPanelChoiceBox();
doors.getSelectionModel().selectedIndexProperty().addListener(event -> {
System.out.println(doors.getSelectionModel().getSelecte... | [
"private void setDefaultRightPanelChoiceBox() {\n doors.setValue(\"Select Door\");\n }",
"private Popup createRightPanelPopup() {\n descriptionPane = createPopUp(600, 600, \"sample text\");\n descriptionPane.setAutoHide(true);\n descriptionPane.setOnAutoHide(event -> {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the list of gameEntities. | public List<GameEntity> getGameEntities() {
return gameEntities;
} | [
"public static List<Entity> getEntities() {\n return entities;\n }",
"List<Entity> getEntities();",
"public List<Entity> getEntities() {\n return entities;\n }",
"public java.util.List<io.cloudstate.protocol.EntityProto.Entity> getEntitiesList() {\n return entities_;\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end of onCreate() determines if we're adding a new assessment or updating an existing assessment | private void addOrUpdateAssessment() {
if (thisAssessmentId < 0) {
addNewAssessment();
} else {
updateAssessment();
}
} | [
"private void addNewAssessment() {\n //instantiate converters object for LocalDate conversion\n Converters c = new Converters();\n\n //get UI fields\n int courseId = thisCourseId;\n String title = editTextAssessmentTitle.getText().toString();\n LocalDate dueDate = c.stringT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compute the dependencies of an expression, as the union of the dependencies of its subexpressions. (This is overridden for path expressions and filter expressions, where the dependencies of a subexpression are not all propogated). This method should be called only once, to compute the dependencies; after that, getDepen... | @Override
public int computeDependencies() {
// Focus-dependency in the body is not relevant.
int dependencies = 0;
dependencies |= getHref().getDependencies();
dependencies |= getBody().getDependencies() & ~StaticProperty.DEPENDS_ON_FOCUS;
return dependencies;
} | [
"public int computeDependencies() {\r\n int dependencies = getIntrinsicDependencies();\r\n for (Iterator children = iterateSubExpressions(); children.hasNext();) {\r\n Expression child = (Expression)children.next();\r\n dependencies |= child.getDependencies();\r\n }\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define el valor de la propiedad fechaliq. | public void setFECHALIQ(int value) {
this.fechaliq = value;
} | [
"public void setFECHALIQ(int value) {\n this.fechaliq = value;\n }",
"public int getFECHALIQ() {\n return fechaliq;\n }",
"public int getFECHALIQ() {\n return fechaliq;\n }",
"public void setF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks validity of user given IP address | public static boolean validitycheck(String ip){
try{
String[] iparray = ip.split("\\.");
int[] ipintarray = new int[iparray.length];
for(int i = 0; i < iparray.length; i++){
ipintarray[i] = Integer.parseInt(iparray[i]);
}
if(ipintarray.length != 4){
throw new NumberForm... | [
"public boolean isValidIPAddress(String ipAddress);",
"private boolean validate(final String ip){\t\t \n \t Pattern pattern = Pattern.compile(IPADDRESS_PATTERN);\n\t Matcher matcher = pattern.matcher(ip);\n\t return matcher.matches();\t \t \n }",
"@Override\n\tpublic boolean validate(String ip) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ HashJoin10 / \ / \ Project11 Project13 | | HashToRandomEx12 HashToRandomEx14 | | Project20 Project30 | | Project21 Empty31 | Empty22 Fragment 2 | @Test
public void testConsideredOperators() {
EmptyValues secondFragmentLeaf = new EmptyValues(prop(2, 2), BatchSchema.SCHEMA_UNKNOWN_NO_DATA);
Project secondFragmentProject1 = new Project(prop(2, 1), secondFragmentLeaf, null);
Project secondFragmentProject0 = new Project(prop(2, 0), secondFragmentProjec... | [
"@Test\n\tpublic void testBuild() throws HashUtilException {\n\n\t\tshort sh = 121;\n\t\tbyte b = 14;\n\t\tboolean[] bool1 = null;\n\t\tint[] int1 = null;\n\t\tdouble[] dob = null;\n\t\tString[] str = null;\n\t\tbyte[] byt = null;\n\t\tshort[] sho = null;\n\t\tlong[] lon = null;\n\t\tfloat[] flo = null;\n\t\tchar[]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use SkillLevel.newBuilder() to construct. | private SkillLevel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"public interface SkillLevel {\n\n /**\n * @return the Skill that this skill level is in.\n */\n Skill getSkill();\n\n /**\n * @return information for player, suitable for passing to a client.\n */\n SkillLevelInfo getLevelInfo();\n\n /**\n * Called when the skill is used.\n *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "invoicePeriod" element | void setInvoicePeriod(au.gov.asic.types.fss.InvoiceType.InvoicePeriod invoicePeriod); | [
"void setPeriod(int period);",
"public void setPeriod(double value) {\n this.period = value;\n }",
"void setValuePeriod(org.hl7.fhir.Period valuePeriod);",
"public void setPolicyPeriod(entity.PolicyPeriod value);",
"void unsetInvoicePeriod();",
"au.gov.asic.types.fss.InvoiceType.InvoicePeriod ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accuracy test for the method setProjectId(long) . Expects no error occurs. | @Test
public void testSetProjectId() {
assertEquals("The initial value should be 0", 0, impl.getProjectId());
long expect = 56;
impl.setProjectId(expect);
assertEquals("The return value should be same as ", expect, impl.getProjectId());
} | [
"@Test\n public void testGetProjectId() {\n int expResult = 5;\n int result = pf1.getProjectId();\n assertEquals(expResult, result);\n }",
"@Test\r\n \tpublic void testProjectID() {\n \t\tassertNull(localProject.getGlobalProjectId());\r\n \t}",
"public void testSetProjectAccuracy() {\r\n Proje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCINT02SIG01_ARRAY getROWCINT02SIG01_ARRAY() Returns the value of field 'ROWCINV26SIG00_ARRAY'. | public gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCINV26SIG00_ARRAY getROWCINV26SIG00_ARRAY()
{
return this._ROWCINV26SIG00_ARRAY;
} | [
"public gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCINT02SIG01_ARRAY getROWCINT02SIG01_ARRAY()\r\n {\r\n return this._ROWCINT02SIG01_ARRAY;\r\n }",
"public gov.georgia.dhr.dfcs.sacwis.structs.input.ROWCINT02SIG00_ARRAY getROWCINT02SIG00_ARRAY()\r\n {\r\n return this._ROWCINT02SIG00_ARRAY;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "Success" element | public boolean getSuccess()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUCCESS$0, 0);
if (target == null)
{
... | [
"java.lang.String getSuccess();",
"public boolean getSuccess() {\n synchronized (monitor()) {\n check_orphaned();\n\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue) get_store()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the first note. | public Note getFirstNote()
{
if (getNotes() != null && !getNotes().isEmpty())
{
return getNotes().get(FIRST);
}
return null;
} | [
"public NoteElement getFirst() {\n return first;\n }",
"public boolean isFirstNote() {\n\t\treturn firstNote;\n\t}",
"@Override\n public Note getLowestNote() {\n List<Note> currentNotes = this.getNotes();\n int size = currentNotes.size();\n Note lowestNote = null;\n\n for (int i = 0; i < ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies the number of echo characters for each password character in password fields. | public static void setNumberOfPasswordEchoesPerCharacter(int echoCount) {
UIManager.put(RadianceSynapse.PASSWORD_ECHO_PER_CHAR, Integer.valueOf(echoCount));
} | [
"public static void setNumberOfPasswordEchoesPerCharacter(JPasswordField passwordField,\n int echoCount) {\n if (passwordField == null) {\n throw new IllegalArgumentException(\"Component scope APIs do not accept null components\");\n }\n passwordField.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a tokenString from the supplied tokens. | public TokenString(Token[] tokens) {
this.tokens = tokens;
} | [
"public static StringLiteral fromToken (String pToken)\n {\n return new StringLiteral (getValueFromToken (pToken));\n }",
"public static Sentence createSentenceFromTokens(List<Token> tokens) {\n Sentence s = new Sentence();\n tokens.stream()\n .filter(t -> !t.isEmpty())\n .forEach(t -> s.addT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Description: This method set the sanitary registration | public void setSanitaryRegistration(String sanitaryRegistration){
this.sanitaryRegistration = sanitaryRegistration;
} | [
"public String getSanitization(){return sanitization;}",
"public String getSanitaryRegistration(){\n return sanitaryRegistration;\n}",
"public void initializeSanitizer() {\n switch (world.maps.getLevel()) {\n case 1:\n world.sanitizers[0].setPosition(900, 690);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Time complexity:o(log n) Space complexity:o(1) Binary search function to find the last position of element in an array | static int findLastPosition(int[] nums, int target,int left,int right){
while(left<=right){
int mid=left+(right-left)/2;
//If the target found
if(nums[mid]==target){
//if this is the last target from right
if(mid==nums.length-1 ||nums[mid]<num... | [
"public static int findLast (int[] x, int y)\n{\n for (int i=x.length-1; i > 0; i--)\n {\n if (x[i] == y) \n {\n return i;\n }\n }\n return -1;\n}",
"public int searchLastLessValue(int[] arr, int target) {\n if(arr == null) return -1;\n \n int lo = 0;\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |