query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Handle a synchronization start message This consists of reading the uuid, host and port from the message sending a synchronize message of out own, with our own uuid, host and port and switching to state. | public void handleSynchronizeStartInStart(String input) throws LtsllcException, IOException {
logger.debug("entering handleSynchronizeStart with input = " + input);
pushState(state);
setState(SYNCHRONIZING);
Scanner scanner = new Scanner(input);
scanner.next();
scanner.... | [
"protected synchronized void handleStartStart(String input) throws IOException {\n logger.debug(\"entering handleStartStart\");\n Scanner scanner = new Scanner(input);\n scanner.next(); // START\n scanner.next(); // START\n\n uuid = UUID.fromString(scanner.next());\n regist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inserts an Activity to the looped items at the specified index | public void insertActivity(Activity a, int index) {
activities.insertActivity(a, index);
} | [
"private void insertItemAt(IItem item, int index) { \n // Iterate over array contents and shuffle elements down\n for(int i=index; i<this.contents.length; i++) {\n // If we find a null item, we can stop early. We're at the end of \n // the list of items\n if ( item ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the specified text to the status label. | public final void setStatusLabelText(final String text) {
statusLabel.setText(text);
} | [
"public void setStatusText(String text) {\r\n\t\tthis.status_text.setText(text);\r\n\t}",
"public void setStatusText(String s) {\n statusLabel.setText(s);\n }",
"public void setStatusText(String text);",
"private void updateStatus(String text)\n\t{\n\t\tlblStatusLine.setText( text );\n\t}",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last dict version in the ordered set where dictCollectionId = &63;. | public static org.opencps.datamgt.model.DictVersion findByDictCollectionId_Last(
long dictCollectionId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
org.opencps.datamgt.NoSuchDictVersionException {
return getPersistence()
... | [
"public static org.opencps.datamgt.model.DictVersion fetchByDictCollectionId_Last(\n\t\tlong dictCollectionId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fetchByDictCollectionId_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read an synchroize queue of mail need to sending Try to send. If do not success > re push to queue | public void mailingScheduler() {
LOGGER.info(IConsts.BEGIN_METHOD);
try {
boolean canContinue = true;
int count = 0;
while (canContinue && (count < maxMailPerCron)) {
if (mailProcessor.isEmpty()) {
canContinue = false;
... | [
"@Override\n\tpublic void waitMail() {\n\t\tif (Harness.TRACE)\n\t\t\tHarness.trace(String.format(\"[HarnessMailbox] WaitMail from %d, timeout %d\",\n\t\t\t\t\t\t\t\t\t\t(int)mailbox_number, timeout));\n\t\t\n\t\tif (mail_count[mailbox_number] > 0) {\n\t\t\twait_result = MSG_RECEIVED;\n\t\t\texecution_result = MSG_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether the stream encoded in the given bytes is plain XML. | private boolean isPlainXml(byte[] bytes) {
return !substring(bytes, ZIP_MAGIC.length()).equals(ZIP_MAGIC) &&
(substring(bytes, XML_MAGIC.length()).equals(XML_MAGIC) ||
substring(bytes, APP_MAGIC_DEPTH).contains(APP_MAGIC));
} | [
"public boolean XMLread( InputStream stream );",
"public boolean XMLread( InputStream stream )\n {\n return false;\n }",
"public static boolean isCorrectXML(String xml)\n {\n Document xmlDoc = null;\n try\n {\n // load the xml in the doc variable\n DocumentBuil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Editar EncuestasCasa existente en la base de datos | public boolean editarEncuestaCasa(EncuestaCasa encuestaCasa) {
ContentValues cv = EncuestaCasaHelper.crearEncuestaCasaContentValues(encuestaCasa);
return mDb.update(EncuestasDBConstants.ENCUESTA_CASA_TABLE, cv, EncuestasDBConstants.casa_chf + "='"
+ encuestaCasa.getCasa().getCodigoCHF() ... | [
"public boolean editarCasa(Casa casa) {\n\t\tContentValues cv = CasaHelper.crearCasaContentValues(casa);\n\t\treturn mDb.update(MainDBConstants.CASA_TABLE , cv, MainDBConstants.codigo + \"=\" \n\t\t\t\t+ casa.getCodigo(), null) > 0;\n\t}",
"public boolean editarEncuestaCasaSA(EncuestaCasaSA encuestaCasaSA) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
displays alert message in the form of a toast | private void displayToastAlert(String message) {
//cancel any outstanding toast before displaying a new one
cancelToast();
toast = Toast.makeText(this, message, Toast.LENGTH_SHORT);
toast.show();
} | [
"void displayToastMessage(String message);",
"void showToast(String message);",
"void showAlert(String message);",
"public void toaster(String message) {\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }",
"private void displayToast(String message) {\n Toast.makeText(getApplica... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds all possible task types. | ResponseEntity<List<Type>> findTaskTypes(); | [
"public Vector<String> getTaskTypes() {\r\n\t\tVector<String> v = new Vector<String>();\r\n\r\n\t\tfor (TaskType tt : taskTypes) {\r\n\t\t\tv.add(tt.name);\r\n\t\t}\r\n\r\n\t\treturn v;\r\n\t}",
"private ArrayList<Task> selectTasksByType(ArrayList<Task> allTask) throws Exception{\n\t\tArrayList<Task> selectedTask... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new Opportunity controller. | public OpportunityController(OpportunityRepository opportunityRepository, CityRepository cityRepository) {
this.opportunityRepository = opportunityRepository;
this.cityRepository = cityRepository;
} | [
"public OpportunityServiceImpl() {\r\n }",
"public void opportunityCreateTest() {\n final OpportunityCreateRequest request = new OpportunityCreateRequest()\n .withCampaignId(1L)\n .withClosedAt(System.currentTimeMillis() / 1000)\n .withProspectId(1L)\n .withNa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "HasDataLabels" | @DISPID(78)
@PropGet
boolean getHasDataLabels(); | [
"@DISPID(78)\n @PropPut\n void setHasDataLabels(\n boolean rhs);",
"boolean hasLabel();",
"@DISPID(157)\n @UseDefaultValues(paramIndexMapping = {}, optParamIndex = {0}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {\"80020004\"})\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public static final String TABLE_0 = "words_0"; public static final String TABLE_1 = "words_1"; public static final String TABLE_2 = "words_2"; public static final String TABLE_3 = "words_3"; public static final String TABLE_4 = "words_4"; public static final String TABLE_5 = "words_5"; public static final String TABLE... | static String getTableName(int index) {
return "words__" + index;
} | [
"@Override\n public void onCreate(SQLiteDatabase db) {\n String query = \"CREATE TABLE \" + TABLE_PLAYED + \"(\"\n + VIENGLISH + \" TEXT,\"+ VIMATHS + \" TEXT,\" + VISCIENCE + \" TEXT,\" + VISSC + \" TEXT,\" + VIGK + \" TEXT,\"\n + VIIENGLISH + \" TEXT,\" + VIIMATHS + \" TEXT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the CRM Contact where uuid = &63; and groupId = &63; or returns null if it could not be found, optionally using the finder cache. | @Override
public CrmContact fetchByUUID_G(String uuid, long groupId) {
uuid = Objects.toString(uuid, "");
Object[] finderArgs = new Object[] {uuid, groupId};
Object result = finderCache.getResult(
_finderPathFetchByUUID_G, finderArgs, this);
if (result instanceof CrmContact) {
CrmContact crmContact = ... | [
"@Override\n\tpublic CrmContact getCrmContactByUuidAndGroupId(String uuid, long groupId)\n\t\tthrows PortalException {\n\n\t\treturn crmContactPersistence.findByUUID_G(uuid, groupId);\n\t}",
"@Override\n\tpublic CrmContact fetchCrmContactByUuidAndGroupId(\n\t\tString uuid, long groupId) {\n\n\t\treturn crmContact... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves the motorarm back to default position(0), which is the position the arm was located at software bootup. This position must be set manually before bootup. | private void moveUltrasonicSensorToDefaultPosition() {
Motor.B.rotateTo(0);
} | [
"public void moveToInitialPosition()\n {\n toolAttachedToLBR.move(\n ptp(0., Math.PI / 180 * 30., 0., -Math.PI / 180 * 60., 0.,\n Math.PI / 180 * 90., 0.).setJointVelocityRel(0.1));\n /*\n * \n * Note: The Validation itself justifies, that in th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all org.semanticwb.social.PhotoIn with a determined PostInSocialNetwork | public static java.util.Iterator<org.semanticwb.social.PhotoIn> listPhotoInByPostInSocialNetwork(org.semanticwb.social.SocialNetwork value)
{
org.semanticwb.model.GenericIterator<org.semanticwb.social.PhotoIn> it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSub... | [
"public static java.util.Iterator<org.semanticwb.social.PhotoIn> listPhotoInByPostInSocialNetwork(org.semanticwb.social.SocialNetwork value,org.semanticwb.model.SWBModel model)\r\n {\r\n org.semanticwb.model.GenericIterator<org.semanticwb.social.PhotoIn> it=new org.semanticwb.model.GenericIterator... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reports a failure if the given value is not a valid time string. Otherwise, returns the given value. | @Override
protected String assertValidTime( String value)
{
return assertDate( value);
} | [
"public static boolean isTime(String value) {\n if (StringUtils.isEmpty(value)) {\n return false;\n }\n return isValueMatchingPattern(value, TIME_PATTERNS);\n }",
"public void testOutOfRangeHourInTimeStrReturnsFalse() throws Exception {\n String formatStr = \"hh24:mi:ss\";\n assertInv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write the record to the data page. | public abstract void write(DataPage buff) throws SQLException; | [
"public void write(GenericRecord record) {\n Preconditions.checkNotNull(datasetWriter_, \"open() must be called before writing\");\n datasetWriter_.write(record);\n }",
"abstract void writeRecord(E record);",
"public void write() {\n\t\ttry {\n\t\t\tcreateTable(this.tableName, this.attrContainer);\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convenience method to open an asset file | public static InputStream open(String path) {
checkReady();
try {
return assets.open(path);
} catch (IOException e) {
e.printStackTrace();
return null;
}
} | [
"InputStream getAsset(String asset) throws IOException;",
"public Savable loadAsset() {\n return file.loadAsset();\n }",
"Asset getAsAsset();",
"public static Asset createAsset(File file) throws IOException {\n \t\treturn new Asset(FileUtil.getNameWithoutExtension(file), FileUtils.readFileToByteArra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the dynamic app theme from the JSON string. | public @Nullable DynamicAppTheme getTheme(@Nullable String theme) {
return new Gson().fromJson(theme, DynamicAppTheme.class);
} | [
"java.lang.String getTheme();",
"String getTheme();",
"public DynamicAppTheme get() {\n return mLocalContext != null ? mLocalTheme : mApplicationTheme;\n }",
"public ThemeController() {\n\t\tparseJson();\n\t\tcurrent = themes.get(\"cactus\");\n\t}",
"public @NonNull DynamicAppTheme generateDefault... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve events count for specific request | EventsCountResponse getCount(EventsCountRequest request) throws RemoteException; | [
"long getReceivedEventsCount();",
"int getNumberOfEvents();",
"int getEventIdListCount();",
"int count(long eventId) throws DaoException;",
"public static int numberOfEvents() {\n List<Events> listOfEvents = retrieveEvents();\n if (listOfEvents != null) {\n return listOfEvents.size(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field590' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField590() {
field590 = null;
fieldSetFlags()[590] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField591() {\n field591 = null;\n fieldSetFlags()[591] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all values of property RecordingYear as an Iterator over RDF2Go nodes | public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRecordingYear_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.getAll_asNode(model, instanceResource, RECORDINGYEAR);
} | [
"public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRecordingYear_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), RECORDINGYEAR);\r\n\t}",
"public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllRecordingYear_asNode_() {\r\n\t\treturn Base.getAll_as(this.model,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch all the messages in the table | ReadResponseMessage fetchAllMessages(); | [
"public List<Message> findAllMessages() {\n List<Message> messages = new ArrayList<>();\n messageRepository.findAll().forEach(messages::add);\n// Return list of messages\n return messages;\n }",
"@Override\n public Iterable<ReplyMessage> findAll() {\n List<ReplyMessage> li... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a Home to a Machine. | public Home addHome(String machineId, Home newHomeRequest) throws ManagementException; | [
"abstract public void addHome(Warp home);",
"public void AddHome(Home home) throws Exception{\n\t\ttry {\n\t\t\t// verify if the home exists\n\t\t\texistHome(home);\n\t\t\t// add home\n\t\t\thouses.add(home);\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}",
"protected void createHome(ManagementClient ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the float[] RGBtoHSB(int,int,int,float[]) method test. | @Test
public void testRGBtoHSB_4()
throws Exception {
int red = 1;
int green = 1;
int blue = 1;
float[] hsb = new float[] {1.0f, 0};
float[] result = ColorUtils.RGBtoHSB(red, green, blue, hsb);
// add additional test code here
// An unexpected exception was thrown in user code while executing this te... | [
"@Test\n\tpublic void testRGBtoHSB_2()\n\t\tthrows Exception {\n\t\tint red = 1;\n\t\tint green = 1;\n\t\tint blue = 1;\n\t\tfloat[] hsb = new float[] {0.0f, 0};\n\n\t\tfloat[] result = ColorUtils.RGBtoHSB(red, green, blue, hsb);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a matcher that matches when the examined date is on the same hour as the reference date For example: assertThat(myDate, sameHourOfDay(new Date())) | public static ZonedTemporalMatcher<Date, ZoneId> sameHourOfDay(final Date date) {
return new IsHour<>(
new FieldDateWrapper(date, ChronoField.HOUR_OF_DAY),
(d, z) -> d.toInstant().atZone(z).get(ChronoField.HOUR_OF_DAY),
ZoneId.systemDefault()
);
} | [
"public static Matcher<LocalDateTime> sameHourOfDay(final LocalDateTime date) {\r\n\t\treturn isHour(date.getHour());\r\n\t}",
"public static ZonedTemporalMatcher<Date, ZoneId> sameMinuteOfHour(final Date date) {\r\n return new IsMinute<>(\r\n new FieldDateWrapper(date, ChronoField.MINUTE_OF_HOU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the filter designed by the given number. Null if not found. | public static ProteoWizardFilter getFilter(Integer number) {
for (ProteoWizardFilter proteoWizardFilter : values()) {
if (proteoWizardFilter.number == number) {
return proteoWizardFilter;
}
}
return null;
} | [
"Filter getFilter();",
"FilterCondition createFilterCondition(int clueNum);",
"@Override\n public FluentWebElement find(String selector, Integer number, final Filter... filters) {\n return find(selector, filters).index(number);\n }",
"pb.lyft.datacatalog.Datacatalog.IntFilter getVal();",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a default ini instance, with classloader issue workaround (141364) | private Ini createIni () {
return createIni(null);
} | [
"public Map<String,StringValue> getDefaultIni()\n {\n return _iniMap;\n }",
"private Ini createIni (File file) {\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n Thread.currentThread().setContextClassLoader(Mercurial.class.getClassLoader());\n try {\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for SyncKey, using the alias name SyncKey. | public Integer getSyncKey() {
return (Integer)getAttributeInternal(SYNCKEY);
} | [
"public String getKeyAlias() {\n return keyAlias;\n }",
"public String get( String key ){\n return mAttributeMap.get(key);\n }",
"public Object getSignalAttributeValueAt(String key) {\n\t\t return esaChannel.get(key);\n\t }",
"public String getSyncStr() {\n return (String)getAttribu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of the existed campaigns | public JSONArray getCompaignList() {
return campaignio.getCampaignList();
} | [
"public List<Document> getCampaigns() {\n\n // Get all the campaigns\n FindIterable<Document> findIterable = campaignCollection.find();\n MongoCursor<Document> mongoCursor = findIterable.iterator();\n\n List<Document> campaigns = new ArrayList<>();\n while (mongoCursor.hasNext()) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appending Columns Appends the given column specification to the builder's layout. | public final void appendColumn(ColumnSpec columnSpec) {
getLayout().appendColumn(columnSpec);
} | [
"IColumnBinding addColumn(SpecialBinding columnType, int width);",
"protected abstract void packColumns();",
"public final void appendColumn(String encodedColumnSpec) {\r\n appendColumn(ColumnSpec.decode(encodedColumnSpec));\r\n }",
"public void addColumns(Collection<ColumnDescription> columnsToAdd)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate the sql to insert users log | private String getUserLogSQL(String dataset, String operation, int userID) {
return "insert into users_log(userid, dataset, operation, operateTime) values ("
+ userID + ", '" + dataset + "', '" + operation + "', now())";
} | [
"public String generateInsertSql () {\n String questionMarks = String.join(\", \", Collections.nCopies(fields.length, \"?\"));\n String joinedFieldNames = Arrays.stream(fields).map(f -> f.name).collect(Collectors.joining(\", \"));\n return String.format(\"insert into %s (csv_line, %s) values (?... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Push all pending events. Event listeners will be called from the thread that calls this method. Events must be set to synchronous for this method to do anything, however it is not an error to call this method when normal event dispatch is in use. | public void pushEvents() {
AWTEvent e = null;
while ((e = event_queue.poll()) != null) {
try {
super.processEvent(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
} | [
"public synchronized void push()\n {\n if( null == m_target )\n {\n getErrorHandler().error( \"Can not push events to a null target\", null, null );\n return;\n }\n\n try\n {\n final int size = m_used;\n int base = m_index - m_used + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test les getters et les setters | @Test
public void validateSettersAndGetters() {
final PojoClass EcritureComptablePojo = PojoClassFactory.getPojoClass(EcritureComptable.class);
final Validator validator = ValidatorBuilder.create()
.with(new SetterTester(), new GetterTester())
.build();
valid... | [
"@Test\n public void testGettersAndSetters() {\n classUnderTest.setName(\"name\");\n classUnderTest.setDescription(\"description\");\n\n assertEquals(\"name\", classUnderTest.getName());\n assertEquals(\"name\", classUnderTest.getAuthority());\n assertEquals(\"description\", cl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleEString" $ANTLR start "ruleEString" InternalXModel.g:112:1: ruleEString : ( ( rule__EString__Alternatives ) ) ; | public final void ruleEString() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXModel.g:116:2: ( ( ( rule__EString__Alternatives ) ) )
// InternalXModel.g:117:2: ( ( rule__EString__Alternatives ) )
{
// Interna... | [
"public final void ruleEString() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTextEditor.g:116:2: ( ( ( rule__EString__Alternatives ) ) )\n // InternalTextEditor.g:117:2: ( ( rule__EString__Alternatives ) )\n {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new simple Query instance that selects the whole feature type. | public static Query create( QualifiedName typeName ) {
return new Query( null, null, null, null, null, new QualifiedName[] { typeName }, null,
null, RESULT_TYPE.RESULTS, -1, 0 );
} | [
"QueryType createQueryType();",
"public IQuery buildSimpleQuery()\n {\n return buildSimpleQuery( null, null, null );\n }",
"public IQuery buildSimpleQuery( FieldFilter filter )\n {\n return buildSimpleQuery( filter, null, null );\n }",
"public String getQueryType();",
"@java.lang.O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getNumLocais method, of class Mapa. | @Test
public void testGetNumLocais() {
mapa.adicionarLigacoes(ligacoes);
int expResult = 4;
int result = mapa.getNumLocais();
assertEquals(expResult, result);
Mapa other = new Mapa(new ArrayList<>());
assertEquals(0, other.getNumLocais());
} | [
"public int getNumberOfMaps();",
"@Test\n public void TEST_UR_MAP_OBJECT_COUNT() {\n Map[] maps = new Map[3];\n maps[0] = new Map(\"Map1/Map1.tmx\", 1000, \"easy\");\n maps[1] = new Map(\"Map1/Map1.tmx\", 1000, \"medium\");\n maps[2] = new Map(\"Map1/Map1.tmx\", 1000, \"hard\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get All Airports specified by name | List<AirportDTO> getAirportsByName(String name); | [
"@Override\n\tpublic List<Airport> searchAirports(String name) {\n\t\tList<Airport> airports = AirportDaoObject.searchAirports(name);\n\t\treturn airports;\n\t}",
"public List<Airport> allAirports() {\n\t\ttry {\n\t\t\tList<Airport> airPosrtList = airPortCache.get(FlightConstants.AIRPORT_KEY);\n\t\t\treturn airPo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//GENEND:|82getter|2| //GENBEGIN:|83getter|0|83preInit Returns an initiliazed instance of password component. | public TextField getPassword()
{
if (password == null)
{//GEN-END:|83-getter|0|83-preInit
// write pre-init user code here
password = new TextField("Password", null, 32, TextField.ANY | TextField.PASSWORD);//GEN-BEGIN:|83-getter|1|83-postInit
password.setLayout(Im... | [
"public void initPassword() {\n if (this.password == null) this.password = Codec.hexMD5(\"123456\");\n }",
"private void initKeyPassword() {\n try {\n Class cbh = this.loadClassSilent(this.keyPwd);\n if (cbh != null) {\n CallbackHandler hdlr = (CallbackHandler... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column T_IM_MANUFACTURERECBILLENTRY.FMATERIALID | public String getFmaterialid() {
return fmaterialid;
} | [
"public long getAbacus_mfi_Id();",
"public Integer getMaterial_id() {\n return material_id;\n }",
"public String getMaterialid() {\n return materialid;\n }",
"public Long getMfiId() {\n return mfiId;\n }",
"public java.lang.String getMATERIAL_GUID() {\r\n return MATERIAL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setup the data table header with current record set data | public void setupDataTableHeader() {
if (this.dataTableTabItem != null && !this.dataTableTabItem.isDisposed()) this.dataTableTabItem.setHeader();
} | [
"public HeaderData () {\n\t\tthis.columns = new ArrayList <> ();\n\t\tthis.listeners = new HashSet <> ();\n\t\tthis.file = null;\n\t\tthis.ml = new MessageLog ();\n\t}",
"private void setPOSHeadersToTable() {\r\n\t\tthis.selectedRow = -1;\r\n\t\tif(FileData.getFileModel(FileType.POS) != null) {\r\n\t\t\tColumnDat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints a warning message of a certain warning category with a warning number when it should be printed. | public synchronized void warning(int warningNumber,
String category, String message) {
if (shouldWarn(category)) {
putMessage(warningNumber, message);
}
} | [
"public synchronized void warning(String category, String message) {\n if (shouldWarn(category)) {\n putMessage(message);\n }\n }",
"public void printWarning(){\n if (hasWarning()){\n System.err.println(\"Warning in line \"+filterLineNumber);\n }\n }",
"public void warnin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Required. The ThreatLists to search in. Multiple ThreatLists may be specified. repeated .google.cloud.webrisk.v1.ThreatType threat_types = 2 [(.google.api.field_behavior) = REQUIRED]; | com.google.webrisk.v1.ThreatType getThreatTypes(int index); | [
"java.util.List<com.google.webrisk.v1.ThreatType> getThreatTypesList();",
"java.util.List<java.lang.Integer>\n getThreatTypesValueList();",
"public void setThreat(String threat) {\n this.threat = threat.toUpperCase();\n if (this.threat.equals(\"PENDING\")\n || this.threat.equals(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check how many times a pattern can be placed in a string. | public static int count (String str, String pattern){
// call to the overloading method with starting values.
return count(str, pattern, 0, 0, 0);
} | [
"private int countOccurences(String s, char pattern) {\n\t\tint count = 0;\n\t\tfor (char c : s.toCharArray()) {\n\t\t\tif (c == pattern) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"static int countMatches(Pattern pattern, String str) {\n int matches = 0;\n Matcher matcher = patte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all squares the pawn can make a attack move to | public List<Square> getAttackedSquaresAll(){
List<Square> attacked = new ArrayList<>();
int column = this.position.getColumn();
int row = this.position.getRow();
int plusOne = 1;
if (!white){
plusOne = - 1;
}
if (row < 8 && row > 1){
if (co... | [
"public List<Square> getAttackedSquaresAttacked(){\n List<Square> attacked = new ArrayList<>();\n int column = this.position.getColumn();\n int row = this.position.getRow();\n int plusOne = 1;\n if (!white){\n plusOne = - 1;\n }\n if (row < 8 && row > 1){\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method, which is similar to the method destroySelf(). If mEntityManager is defined call them to destroy element with ID mId. Else do nothing. | public void destroy() {
if (this.isManagerExist()) {
this.mEntityManager.destroy(this.mId);
}
/** Let's hide this entity. */
this.onDestroy();
} | [
"public void remove() {\n\t\tProps.getProps().getPropEntityManager().killManagedEntity(this);\n\t}",
"protected abstract void doDestroy() throws ManagedLifecycleException ;",
"public Entity removeEntity();",
"void removeEntityManager() {\n threadLocalEM.remove();\n }",
"protected void attemptDelet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
============================================================== PreferencesPanelSummer Constructor ============================================================== | public PreferencesPanelSummer()
{
// Class Instances
MyJSQLView_ResourceBundle resourceBundle;
String fileSeparator;
String[] fireFlyImageName = {"red_firefly.gif", "green_firefly.gif", "blue_firefly.gif",
"yellow_firefly.gif", "purple_firefly.gif", "white_f... | [
"public PreferencesPanel() {\n initComponents();\n }",
"public SettingsPanel() {\n initComponents();\n }",
"public SettingsPanel() {\r\n\t\tthis.initComponents();\r\n\t}",
"public SchedPrefView() {\n initComponents();\n }",
"MiscPanel(PreferencesContainer container)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if we have a valid Kafka producer | public static boolean isValidProducer(){
if(producer !=null) return true;
else {
init();
if(producer !=null) return true;
else return false;
}
} | [
"private void checkForProducerException() {\n if (producerException != null) {\n throw producerException;\n }\n }",
"boolean isProducerFromProvider() {\n return isProducerFromProvider;\n }",
"@Bean\n Producer producer() {\n\n Properties properties = new Properties();\n propertie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Select an action via the epsilongreedy method. | private int selectAction(int[] state) {
int action;
// Epsilon case: explore
if (Math.random() < epsilon)
// System.out.println( "Exploring ..." );
action = (int) (Math.random() * nActions);
// Greedy case: take best action
else
acti... | [
"public A chooseAction();",
"public abstract Action selectedAction();",
"public void toSelectingAction() {\n }",
"@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a unique CustomerOption by code | CustomerOption getByCode(MerchantStore store, String optionCode); | [
"public Option getOption(OptionKey key);",
"public static ClientOption get(String value){\n for(ClientOption code: ClientOption.values()){\n if(code.value.equals(value)){\n return code;\n }\n }\n return ClientOption.Error;\n }",
"public Promocodes get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface: ShopManageService Description: Author: Alan Min Createtime: 2019/1/9 | public interface ShopManageService {
//查询
Map<String, Object> selectAll(int offset, int limit);
Map<String, Object> selectAll();
Map<String, Object> selectBySID(int sid);
Map<String, Object> selectByPIC(String job, int offset, int limit);
Map<String, Object> selectShopName(String name, int ... | [
"public interface IShopManagerService {\n\t\n\t// --- returns list of all aids, weapons and armors into database ---\n\tList <Aid> getAllAids();\t\n\tList <Weapon> getAllWeapons();\t\n\tList <Armor> getAllArmors();\n\t// ---\t\n\t\n\t// --- allow to sell/buy items\n\tboolean sellWeaponsForUser(int uid, List<Integer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the information to the texts fields specifically for PlayerCharacters. | private void setPlayerCharacterTextInfo(PlayerCharacter clicked) {
texts[0].setText(clicked.getName()); //put the name in the first
texts[1].setText(clicked.getPosition().toString()); //set the position
texts[2].setText("Range: "+clicked.getCurrentWeapon().getParameters().get("Range"... | [
"public void updatePlayerTextFields() {\n playerName1.setText(playerList.get(playerId1).getName());\n playerName2.setText(playerList.get(playerId2).getName());\n }",
"private void setCharacterDetails() {\n\n\t\tint characterLevel = -1, starting_health = -1, armorClass = -1, strength = -9, dexteri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds commands for all association types which are accessible by the user to the specified command group. Used for "Retype" and workspace's "Assign Association Type" commands. References checked: 9.2.2005 (2.0b5) | public void addAssocTypeCommands(Commands commandsGroup, String command, String permissionMode, boolean usePluralName,
Session session, CorporateDirectives directives) {
String userID = session.getUserID();
BaseTopic defaultWorkspace = null;
String defaultWorkspaceID = null;
Vector types;
/... | [
"public void addTopicTypeCommands(Commands commandsGroup, String command, String permissionMode,\n\t\t\t\t\t\t\t\t\t\tboolean usePluralName, Session session, CorporateDirectives directives) {\n\t\tString userID = session.getUserID();\n\t\tBaseTopic defaultWorkspace = null;\n\t\tString defaultWorkspaceID = null;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Print Stmt'. | PrintStmt createPrintStmt(); | [
"PrintStatement createPrintStatement();",
"Print createPrint();",
"public PrintStatement(Tokenizer tokenizer) {\n\n // PRINT\n tokenizer.next();\n\n // Expression\n expression = Expression.getExpression(tokenizer);\n\n // SEMICOLON\n tokenizer.next(Token.Type.SEMICOLON)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets clients which match given filter. | public List<Client> searchClients(Filter filter) throws ClientManagerException {
return retrieveAllClients();
} | [
"public List<Client> searchClients(Filter filter) throws ClientManagerException {\r\n String method = \"searchClients(Filter filter)\";\r\n Helper.logEntranceInfo(getLog(), CLASSNAME, method, new String[] {\"filter\"}, new String[] {String\r\n .valueOf(filter)});\r\n\r\n try {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Preparation hook for HTTP GET requests. It allows setting custom headers such as "Accept: application/xml" to retrieve XML instead of JSON. | public void prepareGetRequest(HttpGet request); | [
"void get(String url, HashMap<String, String> headers, Callback handler);",
"protected void setRequestHeaders(ODataBasicRequestImpl<? extends ODataResponse, FORMAT> req, List<Pair<String, String>> headers) {\n if (headers != null && req != null) {\n for (Pair<String, String> header : headers) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Local interface for TestSessionBean. | public interface TestSessionBeanLocal
extends javax.ejb.EJBLocalObject
{
} | [
"SessionBean getSessionbean();",
"public interface TestingSessionRemote extends javax.ejb.EJBObject, test.TestingSessionRemoteBusiness {\n \n \n}",
"public SessionBean getSessionBean() {\n\treturn sessionBean;\n}",
"public SessionBean() {\n }",
"@Test\r\n public void testGetSession() {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleXCatchClause" $ANTLR start "ruleXCatchClause" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:3305:1: ruleXCatchClause : ( ( rule__XCatchClause__Group__0 ) ) ; | public final void ruleXCatchClause() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:3309:2: ( ( ( rule__XCatchClause__Group__0 ) ) )
... | [
"public final void ruleXCatchClause() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1676:2: ( ( ( rule__XCatchClau... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A book on google asset. .google.ads.googleads.v9.common.BookOnGoogleAsset book_on_google_asset = 10; | public Builder setBookOnGoogleAsset(
com.google.ads.googleads.v9.common.BookOnGoogleAsset.Builder builderForValue) {
if (bookOnGoogleAssetBuilder_ == null) {
assetData_ = builderForValue.build();
onChanged();
} else {
bookOnGoogleAssetBuilder_.setMessage(builderForValue.build... | [
"public Builder setBookOnGoogleAsset(com.google.ads.googleads.v9.common.BookOnGoogleAsset value) {\n if (bookOnGoogleAssetBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n assetData_ = value;\n onChanged();\n } else {\n bookOnG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the timestamp (in 1 hour intervals since epoch) at which the retention period starts. Example: If the retention period in the application properties is set to 14 days, then this function would return the timestamp for 14 days ago (from now) at 00:00 UTC. | private long getRetentionStartTimestamp() {
return LocalDate.now().minusDays(retentionDays).atStartOfDay()
.toEpochSecond(ZoneOffset.UTC) / ONE_HOUR_INTERVAL_SECONDS;
} | [
"public Long expirationTimestamp() {\n return expiresAt.timestamp();\n }",
"public long getTimestamp() {\n return year * 365 + (month - 1) * 30 + (day - 1);\n }",
"long getPreviousTimestamp();",
"com.google.protobuf.Timestamp getCurrentEpochStartTime();",
"private static long timestamp() {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required int32 maxEXP = 3; | int getMaxEXP(); | [
"public int getMaxEXP() {\n return maxEXP_;\n }",
"int getMaxExp();",
"public int getMaxEXP() {\n return maxEXP_;\n }",
"int getCurEXP();",
"public abstract byte getMaxExponentSize();",
"public abstract void setMaxExponentSize(byte maxExponentSize);",
"void calculateMaxExp();",
"DS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new listener based on the given game, adds it to the SessionListenerAdministration and finally initializes it with the given meta information. | public void addListener(UUID sessionId, IMetaInformation metaInformation) {
if (metaInformation == null || metaInformation.getGame() == null || metaInformation.getGame().isBlank()) {
logger.error(NiceString.make(
"Received invalid meta information {0}. Wont create listener instan... | [
"public GameStartListener() {\r\n\t\tEventHandler.registerListener(this);\r\n\t}",
"public void addGameStateListener(GameStateListener gameListener);",
"void addListener(GameEventListener listener);",
"void addSessionListener(SessionListener listener);",
"void addGameChangeListener(GameChangeListener listen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests addEntry when the modification user is not set. Expect InsufficientDataException. | public void testAddEntryModificationUserNull() throws Exception {
entry = new ExpenseEntry();
entry.setDescription("Description");
entry.setCreationUser("Create");
entry.setAmount(new BigDecimal(100.12));
entry.setBillable(true);
entry.setDate(TestHelper.createDate(2005, ... | [
"public void testUpdateEntryModificationUserNull() throws Exception {\n entry = new ExpenseEntry(5);\n entry.setDescription(\"Description\");\n entry.setCreationUser(\"Create\");\n entry.setAmount(new BigDecimal(100.12));\n entry.setBillable(true);\n entry.setDate(TestHelpe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists the Resolver rules that were created using the current Amazon Web Services account. | java.util.concurrent.Future<ListResolverRulesResult> listResolverRulesAsync(ListResolverRulesRequest listResolverRulesRequest); | [
"java.util.List<com.google.api.UsageRule> getRulesList();",
"java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();",
"List<RuleInfo> listRulesInfo() throws IOException;",
"public List<String> getRules() {\n return this.rules;\n }",
"public List<Rule> getRules() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Populates the recent folders according to the design. | private int uiPopulateRecentFolders(Uri uri) {
final Context context = getContext();
final String id = uri.getLastPathSegment();
final Uri[] recentFolders = defaultRecentFolders(id);
final int numFolders = recentFolders.length;
if (numFolders <= 0) {
return 0;
... | [
"private void initCurrentDirAndChilren() {\n Log.d(TAG, \"initCurrentDirAndChilren():\");\n // Update Current Dir to recive new List\n currentDir = new File(currentDir.getAbsolutePath());\n String[] children = currentDir.list();\n files.clear();\n\n // Add all files from li... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called whenever the composite data type editor state changes for whether or not to show undefined bytes in the editor. | public abstract void showUndefinedStateChanged(boolean showUndefinedBytes); | [
"public abstract void compositeEditStateChanged(int type);",
"public interface CompositeEditorModelListener extends CompositeViewerModelListener {\n // Definitions of the types of state changes that can occur.\n public static final int COMPOSITE_MODIFIED = 1;\n public static final int COMPOSITE_UNMODIFIE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create pane for backup properties | private JPanel createBackupPane() {
/* backup panel */
JPanel backupPane = new JPanel(new BorderLayout());
/* create titled border with inner and outer spacing */
backupPane.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createEmptyBorder(5, 5, 5, 5),
... | [
"public BackupNewView(Object obj, Backup back)\r\n\t{\r\n\t\tsuper(PrimeMain1.texts.getString(\"swNewBackupLabel\"));\r\n\r\n\t\t// Get the default toolkit\r\n\t\tToolkit toolkit = Toolkit.getDefaultToolkit();\r\n\r\n\t\t// Get the current screen size\r\n\t\tDimension scrnsize = toolkit.getScreenSize();\r\n\r\n\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves building block by building block type and code. | BuildingBlock findBuildingBlockByTypeAndCode(BuildingBlockConstant buildingBlockType, String code) throws BusinessException; | [
"BuildingBlock findBuildingBlockById(Long id) throws BusinessException;",
"public ProductionBlock getSpecificProductionBlock(int id);",
"cn.chain33.javasdk.model.protobuf.BlockchainProtobuf.BlockDetail getBlockdetail();",
"Block getBlock(String congName, String blockName, String blockNumber);",
"Collection<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create constructor setting the demand at 0 | public Demand(){
demand = 0;
} | [
"public Mortgage(){\n\t\tthis(0.0, 0.0, 0.0);\n\t}",
"public Mass(){\n\t\tthis(0);\n\t}",
"public ProductionPower(){\n this(0, new NumberOfResources(), new NumberOfResources(), 0, 0);\n }",
"public Constructor() {\n this(0, 0);\n }",
"public Acceleration() {\n super(0, 0);\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the pair and twoPair methods within the PokerHand class. | public void pairTwoPairTest()
{
System.out.println("\f");
Card c1=new Card ("red","diamonds",5,true);
Card c2=new Card ("red","spades",10,true);
Card c3=new Card ("red","spades",10,true);
Card c4=new Card ("red","clubs",13,true);
Card c5=new Card ("red","hearts",2,tru... | [
"public void testDifferentPair() {\n\t\tList<Card> Pair1 = hands.get(0).getDeck();\n\t\t\n\t\tList<Card> Pair2 = hands.get(1).getDeck();\n\t\t\n\t\tassertEquals(\"AIP wins.\", Tie.settle(2, Pair1, Pair2));\n\t}",
"public void highTwoPairTest()\n {\n System.out.println(\"\\f\");\n SimulateGame s=n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a reference to the Azureus plugin interface. | public PluginInterface getAzureusPluginInterface()
{
return pluginInterface;
} | [
"public interface Plugin\n{\n\tpublic String getPluginName();\n}",
"public static NKregion getPlugin()\n\t{\n\t\treturn plugin;\n\t}",
"Plugin getPlugin( );",
"public interface Plugin {\n\n\t/**\n\t * Returns a description of the plugin, to be shown as a tooltip and/or in the\n\t * help menu.\n\t * \n\t * @re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ApplicationViewLogic constructor to initialize the CRUD view object | public ApplicationViewLogic(ApplicationView simpleCrudView) {
view = simpleCrudView;
} | [
"public View() {\r\n\t\t\t\r\n\t\t}",
"public IC_DataModelView() {\n\t}",
"public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}",
"public ViewManageWsrd() {\r\n }",
"public ControleAcessosView() {\n initComponents();\n if (!Beans.isDesignTime()) {\n entityManager.getTransa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an example nonpremultiplied bitmap which has nontrivial alpha channel. | static Bitmap createRgbaBitmap() {
return createRgbaBitmap(ALPHA);
} | [
"static Bitmap createOpaqueRgbaBitmap() {\n return createRgbaBitmap(0xff);\n }",
"@Test\n @SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)\n public void testCreateScaledBitmapNonDestructiveColor() {\n Bitmap input = Bitmap.createBitmap(2000, 1200, Bitmap.Config.RGBA_F16);\n fillSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ListElement__Group__2__Impl" $ANTLR start "rule__ListElement__Group__3" InternalDsl.g:34481:1: rule__ListElement__Group__3 : rule__ListElement__Group__3__Impl ; | public final void rule__ListElement__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:34485:1: ( rule__ListElement__Group__3__Impl )
// InternalDsl.g:34486:2: rule__ListElement__Group__3__Impl
{
... | [
"public final void rule__ListDef__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:14397:1: ( rule__ListDef__Group__3__Impl )\n // InternalDsl.g:14398:2: rule__ListDef__Group__3__Impl\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This class implements IStudentLister interface | public interface IStudentLister
{
// This method clear all previous student records
public void clearStudents();
// This method adds student recods
public void addStudent(IStudent student);
} | [
"public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }",
"public PersonList getStudentList()\n {\n return studentList;\n }",
"List<Student> getAllStudents();",
"public void studentsList() \r\n\t{\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set number of milliseconds before a message is marked orphan. | public QueueApi setOrphanMessageThresholdMs(long orphanMessageThresholdMs) {
this.orphanMessageThresholdMs = orphanMessageThresholdMs;
return this;
} | [
"public long getOrphanMessageThresholdMs() {\n return this.orphanMessageThresholdMs;\n }",
"void setVoteFinalizeDelaySeconds(long voteFinalizeDelaySeconds);",
"public void markNoDelayDelete() throws JNCException {\n markLeafDelete(\"noDelay\");\n }",
"void setNilFounddatetime();",
"void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
undo the move postcondition: the display hint flag is turned off, chekers are deleted in the game | public void undo(){
if(waitingHint)
return;
setDisplayHint(false);
if(isAIMove)
return;
if(AIMode != 0) {
if(playerWon){
if(game.undo())
repaint();
playerWon = false;
} else {
if(game.undo())
repaint();
if(game.undo())
repaint();
}
} else if(game.undo())
... | [
"public void undo() {\n if (moveList.size() > 0) {\n int column = moveList.get(moveList.size()-1);\n int yCoordinate = getEmptyCount(column);\n if (yCoordinate == size)\n yCoordinate--;\n //calculates exact cell position from given x Coordinate\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the payment_account_seq value for this Order_item_select_responseOrder_item. | public void setPayment_account_seq(int payment_account_seq) {
this.payment_account_seq = payment_account_seq;
} | [
"public void setOrder_item_seq(int order_item_seq) {\n this.order_item_seq = order_item_seq;\n }",
"public int getPayment_account_seq() {\n return payment_account_seq;\n }",
"public void setAddon_to_order_item_seq(int addon_to_order_item_seq) {\n this.addon_to_order_item_seq = addon_t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sorted the field names of the method maps as the declared order of the object class | private static Map<String, Method> sortAsDeclaredOrder(Map<String, Method> unordered_mp, Object obj)
{
Map<String, Method> map = new LinkedHashMap<>();
for (Field field:obj.getClass().getDeclaredFields())
{
Method m = unordered_mp.get(field.getName());
if (m != null)... | [
"private static Map<String, Object> sortAsDeclaredOrder(Object obj, Map<String, Object> unordered_mp)\n {\n Map<String, Object> map = new LinkedHashMap<>();\n\n for (Field field:obj.getClass().getDeclaredFields())\n {\n Object m = unordered_mp.get(field.getName());\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getAvatarName method, of class Avatar. | @Test
public void testGetAvatarName() {
System.out.println("getAvatarName");
Avatar instance = this.avatar;
String expResult = TEST_AVATAR_NAME;
String result = instance.getAvatarName();
assertEquals(expResult, result);
} | [
"java.lang.String getAvatar();",
"java.lang.String getChromeosAvatar();",
"int getAvatar();",
"public int getAvatar(String username);",
"java.lang.String getChromeAvatar();",
"String avatarImage();",
"@Test\n public void getAvatarTest() throws QtestApiException {\n Long userId = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate subscribe will result in an error, when the channel moves to the FAILED state before the operation succeeds Spec: RTL7c | @Test
public void attach_implicit_subscribe_fail() throws AblyException {
AblyRealtime ably = null;
try {
ClientOptions opts = createOptions(testVars.keys[1].keyStr);
ably = new AblyRealtime(opts);
/* wait until connected */
new ConnectionWaiter(ably.... | [
"@Test\r\n\tpublic void aTestValidSubscribe() {\r\n\t\tbroker.subscribe(intSub);\r\n\t\tbroker.subscribe(unreadSub);\r\n\t\tbroker.subscribe(pIntSub);\r\n\t}",
"@Test\n\tpublic void testSubscribeTwice() {\n\t\tu1.subscribe(g1);\n\t\tassertFalse(u1.subscribe(g1));\n\t}",
"void onSubscriptionError(SubscriptionErr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last article in the ordered set where userId = &63;. | @Override
public Article fetchByArticleUserId_Last(long userId,
OrderByComparator orderByComparator) throws SystemException {
int count = countByArticleUserId(userId);
if (count == 0) {
return null;
}
List<Article> list = findByArticleUserId(userId, count - 1, count,
orderByComparator);
if (!list... | [
"public Todo fetchByUserId_Last(\n\t\tlong userId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Todo>\n\t\t\torderByComparator);",
"@Override\n\tpublic Article findByArticleUserId_Last(long userId,\n\t\tOrderByComparator orderByComparator)\n\t\tthrows NoSuchArticleException, SystemException {\n\t\tArticl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fills a map to be of size by calling grow() an appropriate number of times. | public static void fillMapToSize(Map<Integer, Integer> map, int size) {
if (map.size() < size) {
int addAmount = size - map.size();
for (; addAmount > 0; addAmount--) {
MapManipulator.grow(map);
}
logger.info("filled map size is now" + map.size());
}
} | [
"private void growMap() {\n\t\tshort chunkId;\n\n\t\t// Fill until full\n\t\twhile (end % STORED_CHUNKS != currChunk % STORED_CHUNKS || end == 0) {\n\t\t\tchunkId = (short) random.nextInt(chunks.length);\n\t\t\tmap[end % STORED_CHUNKS] = chunkId;\n\t\t\tchunks[chunkId].setupToStage(stage, end * MapChunk.WIDTH * til... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Right Exp' containment reference. If the meaning of the 'Right Exp' containment reference isn't clear, there really should be more of a description here... | TrgExpression getRightExp(); | [
"LogicExpression getRightExp();",
"public ExpressionNode getRight() {\n\t\treturn (this.right);\n\t}",
"public R getRight() { return right; }",
"public AST getRight() {\n\t\treturn right;\n\t}",
"public NodeExpr right()\n\t{\n\t\treturn _right;\n\t}",
"public Node getRight ()\n\t{\n\t\treturn right;\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if the given object is a NMS ItemStack. | @SuppressWarnings("unchecked")
public static boolean isItemStack(final Object value) {
return getItemStackClass().isAssignableFrom(value.getClass());
} | [
"@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isCraftItemStack(final Object obj) {\n \t\treturn getCraftItemStackClass().isAssignableFrom(obj.getClass());\n \t}",
"boolean isItemStack(int index);",
"public boolean hasTank(ItemStack me) {\n if (slot != 1) {\n return false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/////////////////////////////////////////////////////////////////// Test of EagerNoResultIntCaseMatchercaseIs(IntPredicate, Runnable) // /////////////////////////////////////////////////////////////////// | @Test
public void testCaseIsPredicateBool() {
AtomicBoolean success = new AtomicBoolean(false);
match(42L).caseIs(s -> true, () -> success.set(true));
assertTrue(success.get());
} | [
"@Test\n public void testCaseOfClassNotMatchingWithPredicate() {\n Object o = \"Boo\";\n match(o).caseOf(Integer.class, s -> {\n fail();\n return false;\n }, s -> fail());\n }",
"@Test\n public void testCaseOfIntFirstNoMatch() {\n long l = 42L;\n A... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read server matrix meta from input stream | public void read(DataInputStream input) throws IOException {
matrixId = input.readInt();
int size = input.readInt();
partMetas = new HashMap<>(size);
for (int i = 0; i < size; i++) {
MatrixPartitionMeta partMeta = new MatrixPartitionMeta();
partMeta.read(input);
partMetas.put(pa... | [
"private void readMetaData(int location) throws IOException {\n //Log.i(LOG_Task, \"/readMetaData\");\n long read = 0;\n String md = \"\"; // The metadata\n // Skipping stream until get to the metadata\n InputStream is = conn.getInputStream();\n whil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the paymentDate property. | public String getPaymentDate() {
return paymentDate;
} | [
"public String getPaymentDate() {\n return paymentDate;\n }",
"public java.util.Date getPaymentreceiptdate () {\r\n\t\treturn paymentreceiptdate;\r\n\t}",
"public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }",
"public void setPaymentDate(String value) {\n this.paymentDate = v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the BarColumnColor instance of the BarChart object. User can use it if the color schema should be changed. | public BarColumnColor getBarColumnColor() {
return bcColor;
} | [
"public BarColor getBarColor(){\r\n\t\treturn color;\r\n\t}",
"public BarChartApiBean getBarChart() {\n return barChart;\n }",
"public Color[] getBarColors(int barID) {\r\n\t\t// If the index is valid;\r\n\t\tif (barID >= 0 && barID < barCount) {\r\n\t\t\t// Create and send out a color array containin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
resizes the Font based on the resolution of the screen (to preserve correct formatting relationships) | private float resizeFont(float size) {
return (size * windowSize.height) / TEMPLATE_HEIGHT;
} | [
"public void resize_screen(){\r\n \tstop_scn_updates();\r\n \tscn_font_size = min_font_size+1;\r\n \twhile (scn_font_size < max_font_size){\r\n \t\tscn_font = new Font(tz390.z390_font,Font.BOLD,scn_font_size);\r\n \t\tcalc_screen_size();\r\n \t\tif (scn_image.getWidth() < m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method close expired trades (orders). | public synchronized void closeExpiredTrades(TradeSystem tradeSystem) {
provider.closeExpiredTrades(tradeSystem);
} | [
"public static void close() {\n HashMap<String, Transaction> map = instance.getTransactions();\n for (Transaction transaction : map.values()) {\n transaction.destroy();\n }\n map.clear();\n instance.transactions.remove();\n }",
"public synchronized void clos... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
lineDelineation() is a method that places points that land directly on the circumference of the circle (x^2 + y^2 = 1) inside the circle half of the time. This method differs from nolineDelineation() as it assigns points on the circumference to the inside/outside count evenly rather than placing all points that land on... | public static double lineDelineation()
{
int nTries = 0; //the number of tries (landing both inside and outside the circle)
int inCircle = 0; //the number of points that landed inside the circle
boolean lineBool = false; //flipped every time a point lands on the circumference
... | [
"public static double noLineDelineation() \n {\n int nTries = 0; //the number of tries (landing both inside and outside the circle)\n int inCircle = 0; //the number of points that landed inside the circle\n \n double x, y; //the x and y coordinates (random) of the point chosen\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .message.FigureData.FigureProperty property = 8; | public message.Figure.FigureData.FigureProperty getProperty() {
return property_;
} | [
"message.Figure.FigureData.FigureProperty getProperty();",
"public Builder setProperty(message.Figure.FigureData.FigureProperty value) {\n if (value == null) {\n throw new NullPointerException();\n }\n property_ = value;\n\n bitField0_ |= 0x00000080;\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///// Awaiting Claim Payment On Commercial | public void clickAwaitingCliamPaymentOnCommercial() {
AwaitingClaimPayment_Link_Commercial.click();
} | [
"public boolean verifyAwaitingClaimPaymentOnCommercial() {\r\n\t\tboolean status = new VerificationHelper(driver).isDisplayed(AwaitingClaimPayment_Link_Commercial);\r\n\t\treturn status;\r\n\t}",
"public void clickAwaitingClaimApprovalOnCommercial() {\r\n\t\tAwaitingClaimApproval_Link_Commercial.click();\r\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes player from entity list | @Override
public void removeEntity(Entity player) {
cache.clear();
entities.remove(player);
} | [
"public void removePlayer(Player player){\n playerList.remove(player);\n }",
"public void remove(){\r\n\t\tleave();\r\n\t\tcustomPlayers.remove(player);\r\n\t}",
"void removeObjectFromPlayer(Player player);",
"public void removePlayer(Player player){\n players.remove(player);\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a point to this matrix | public void addPoint(Point<Number> p) {
matrix[p.getX()][p.getY()] = p;
} | [
"public void addPoint(Point p) {\r\n line.add(p);\r\n }",
"private void addPoint(Point point) {\n points.add(point);\n }",
"public void addPoint(double[] point);",
"public void addPoint(Point point) {\r\n\t\t\r\n\t\tthis.listOfPoints.add(point);\r\n\t}",
"public void addPoint() {\n setP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if decision tree correctly learns simple XOR function. Should learn tree like this: x1 = true / \ yes No / \ x2 = true x2 = true / \ / \ yes No yes No / \ / \ LABEL_FALSE LABEL_TRUE LABEL_TRUE LABEL_FALSE | @Test
public void testTrainingXORFunction() {
DecisionTree tree = new DecisionTree.Builder().build();
String[] header = {"x1", "x2", "answer"};
SimpleDataSample data1 = SimpleDataSample.newSimpleDataSample("answer", header, Boolean.TRUE, Boolean.TRUE, BooleanLabel.FALSE_LABEL);
... | [
"public static void TestXOR() {\r\n\t\tDataSet Xor = new DataSet(\"2 1 %.0f %.0f %.3f;x1 x2 XOR;0 0 0;0 1 1;1 0 1;1 1 0\");\r\n\t\tMultiLayerNetwork MLN = new MultiLayerNetwork(2, 2, Xor, new SigmoidLayerNetwork(2, 1, Xor));\r\n\t\tMLN.setWeights(\"0.862518 -0.155797 0.282885 0.834986 -0.505997 -0.864449 0.036498 -... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to set the end of actions | public void setEndOfActions(int endOfActions) {
this.endOfActions = endOfActions;
} | [
"public void setEndAction(String anAction) { _endAction = anAction; }",
"public String getEndAction() { return _endAction; }",
"protected void generalActionEnding() {\n statusLabel.resetDefault();\n }",
"@Override\n public void endActionMode() {\n if (mActionMode != null) {\n mActio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
&47; The list of currently connected peers repeated .lnrpc.Peer peers = 1[json_name = "peers"]; | java.util.List<lightpay.lnd.grpc.Peer>
getPeersList(); | [
"java.util.List<com.vegvisir.network.datatype.proto.Peer> \n getActivePeersList();",
"lightpay.lnd.grpc.Peer getPeers(int index);",
"List<PeerInfoResult> getPeerInfo();",
"List<PeerId> listAlivePeers();",
"@GET\n @Path(\"peers\")\n @Produces(MediaType.APPLICATION_JSON)\n public Map<String, Lis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_resource_url.f_need_csrf | public Boolean getNeedCsrf() {
return needCsrf;
} | [
"public String getCsrfToken() {\n return csrfToken;\n }",
"String getCSRFToken();",
"public String getCSRFToken() {\n User user = ESAPI.authenticator().getCurrentUser();\n if (user == null) {\n return null;\n }\n return user.getCSRFToken();\n }",
"@ModelAttr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |