query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Tests if the tableSchema has been altered and checks if a new index has been created. Since the foreign key name is absent, and so checks if the first column name has been used to construct the index name.Then, tests if createForeignKeyIndexes property has been set to "yes".
public void testAddingNewIndexWithoutIndex() throws Exception { PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap("MYSQL", "mysql", null); ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap); PSJdbcTableSchema tableSchema = createTableSchema(coldefs); setPrimaryKey(tableSchema); PSJdbcForeignKey fk = createForeignKey(tableSchema); Document doc = PSXmlDocumentBuilder.createXmlDocument(); Element el = tableSchema.toXml(doc); PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap); Iterator<?> itIndex = tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE); PSJdbcIndex index = (PSJdbcIndex) itIndex.next(); String IndexName = index.getName(); String fkcolname = fk.getForeignKeyColumnNames().get(0); // Makes sure if the table schema has changed assertFalse((tableSchema.equals(tableSchema2))); // Makes sure if a new index definition of non unique have been added to // table schema. assertFalse((tableSchema.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext()); assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext()); // Makes sure if the index name has taken the first foreign key column name. assertTrue((StringUtils.equalsIgnoreCase(IndexName, "IX_" + fkcolname))); // Makes sure if the createForeignkeyIndexes attribute for mysql. assertTrue(dataTypeMap.isCreateForeignKeyIndexes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testAddingNewIndexWhenFKContainsIndexColumns() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcT...
[ "0.7079521", "0.69653547", "0.68708163", "0.633233", "0.61390465", "0.57541347", "0.5741634", "0.56046915", "0.5460524", "0.542107", "0.53962594", "0.53808594", "0.5380457", "0.5379791", "0.53791106", "0.53550667", "0.52735114", "0.5259221", "0.5258828", "0.52588207", "0.5248...
0.6793436
3
Tests if the tableSchema has been altered. Tests, If the columns of new index are same set as the columns of the foreign key. Lastly, checks if the index is unique.
public void testAddingNewIndex() throws Exception { PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap("MYSQL", "mysql", null); ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap); coldefs.add(new PSJdbcColumnDef(dataTypeMap, "col3", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null, true, null)); PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs); setPrimaryKey(tableSchema1); PSJdbcForeignKey fk = createForeignKey(tableSchema1); List<String> indexCols = new ArrayList<String>(); indexCols.add("col3"); PSJdbcIndex index1 = new PSJdbcIndex("IX_col1", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE); tableSchema1.setIndex(index1); Document doc = PSXmlDocumentBuilder.createXmlDocument(); Element el = tableSchema1.toXml(doc); PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap); PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next(); // Makes sure if the table schema has changed assertFalse((tableSchema1.equals(tableSchema2))); // Makes sure if a new index definition of non unique have been added to // table schema. assertFalse((tableSchema1.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext()); assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext()); // Makes sure if the number of foreign key columns and eqal to that of // index columns. assertTrue(fk.getForeignKeyColumnNames().size() == newIndex.getIndexColumnNames().size()); // Makes sure if the new index that got created has the same set of // columns as foreign key. assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames())); // Makes sure if the index name of newly created index has a unique name. assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testAddingNewIndexWhenFKContainsIndexColumns() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcT...
[ "0.71919197", "0.7002079", "0.6791824", "0.63272125", "0.62744164", "0.61724097", "0.6158381", "0.5888472", "0.5812017", "0.5706525", "0.57018316", "0.56014", "0.5600295", "0.55111545", "0.55053467", "0.5492475", "0.54780895", "0.5472829", "0.5414531", "0.5404089", "0.5403455...
0.696573
2
Tests if the table schema has been altered when list of foreign key columns has the same columns or is super set of columns of index. Tests, If the columns of new index are same set as the columns of the foreign key. Lastly, checks if the index is unique.
public void testAddingNewIndexWhenFKContainsIndexColumns() throws Exception { PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap("MYSQL", "mysql", null); ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap); coldefs.add(new PSJdbcColumnDef(dataTypeMap, "col3", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null, true, null)); PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs); setPrimaryKey(tableSchema1); List<String[]> fkCols = new ArrayList<String[]>(); String[] fcol1 = {"col1", "etable", "ecol1"}; fkCols.add(fcol1); String[] fcol2 = {"col2", "etable", "ecol1"}; fkCols.add(fcol2); PSJdbcForeignKey fk = new PSJdbcForeignKey(fkCols.iterator(), PSJdbcTableComponent.ACTION_DELETE); List<PSJdbcForeignKey> fks = new ArrayList<>(); fks.add(fk); tableSchema1.setForeignKeys(fks,true); List<String> indexCols = new ArrayList<String>(); indexCols.add("col2"); PSJdbcIndex index1 = new PSJdbcIndex("IX_Name", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE); tableSchema1.setIndex(index1); Document doc = PSXmlDocumentBuilder.createXmlDocument(); Element el = tableSchema1.toXml(doc); PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap); PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next(); // Makes sure if the table schema has changed assertFalse((tableSchema1.equals(tableSchema2))); // Makes sure if a new index definition of non unique have been added to // table schema. assertFalse((tableSchema1.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext()); assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext()); // Makes sure if the new index that got created has the same set of // columns as foreign key. assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames())); // Makes sure if the index name of newly created index has a unique name. assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testAddingNewIndexWhenIndexContainsFKColumns() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcT...
[ "0.71137047", "0.6588567", "0.6468293", "0.6255889", "0.6250267", "0.60014284", "0.59191793", "0.57337946", "0.5672452", "0.56272215", "0.5613036", "0.55572855", "0.5511816", "0.55060685", "0.55028325", "0.5473783", "0.5460439", "0.54543436", "0.54466504", "0.54281926", "0.53...
0.7396974
0
Tests if the tableSchema has been altered.Lastly, checks if the index is unique when the index contains all foreign key columns.
public void testAddingNewIndexWhenIndexContainsFKColumns() throws Exception { PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap("MYSQL", "mysql", null); ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap); coldefs.add(new PSJdbcColumnDef(dataTypeMap, "col3", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null, true, null)); PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs); setPrimaryKey(tableSchema1); List<String[]> fkCols = new ArrayList<String[]>(); String[] fcol1 = {"col1", "etable", "ecol1"}; fkCols.add(fcol1); PSJdbcForeignKey fk = new PSJdbcForeignKey(fkCols.iterator(), PSJdbcTableComponent.ACTION_DELETE); List<PSJdbcForeignKey> fks = new ArrayList<>(); fks.add(fk); tableSchema1.setForeignKeys(fks,true); List<String> indexCols = new ArrayList<String>(); indexCols.add("col1"); indexCols.add("col2"); PSJdbcIndex index1 = new PSJdbcIndex("IX_Name", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE); tableSchema1.setIndex(index1); Document doc = PSXmlDocumentBuilder.createXmlDocument(); Element el = tableSchema1.toXml(doc); PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap); PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes().next(); // Makes sure if the table schema has not changed assertTrue((tableSchema1.equals(tableSchema2))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testAddingNewIndexWhenFKContainsIndexColumns() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcT...
[ "0.67170423", "0.6598666", "0.642817", "0.6288761", "0.6283439", "0.6167025", "0.5961361", "0.57914317", "0.5681375", "0.56437457", "0.55479074", "0.55291593", "0.55182546", "0.5483488", "0.548336", "0.54681796", "0.54411346", "0.54363894", "0.5378152", "0.53729427", "0.53475...
0.6481573
2
Tests if the tableSchema has been altered. Also, checks if the index is unique.
public void testAddingNewIndexWithFKName() throws Exception { PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap("MYSQL", "mysql", null); ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap); coldefs.add(new PSJdbcColumnDef(dataTypeMap, "col3", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null, true, null)); PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs); setPrimaryKey(tableSchema1); String foreignKeyName = "FK_Name"; List<String[]> fkCols = new ArrayList<String[]>(); String[] fcol1 = {"col1", "etable", "ecol1"}; fkCols.add(fcol1); PSJdbcForeignKey fk = new PSJdbcForeignKey(foreignKeyName, fkCols.iterator(), PSJdbcTableComponent.ACTION_DELETE); List<PSJdbcForeignKey> fks = new ArrayList<>(); fks.add(fk); tableSchema1.setForeignKeys(fks,true); List<String> indexCols = new ArrayList<String>(); indexCols.add("col2"); PSJdbcIndex index1 = new PSJdbcIndex("IX_Name", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE); tableSchema1.setIndex(index1); Document doc = PSXmlDocumentBuilder.createXmlDocument(); Element el = tableSchema1.toXml(doc); PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap); PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next(); // Makes sure if the table schema has changed. assertFalse((tableSchema1.equals(tableSchema2))); // Makes sure if the new index that got created has the same set of // columns as foreign key. assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames())); // Makes sure if the index name of newly created index has a unique name. assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean updateInformationSchemaTable(){\n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\t\tboolean isFound = false;\n\t\ttry {\n\t\t\tRandomAccessFile tablesTableFile = new RandomAccessFile(\"information_schema.table.tbl\", \"rw\")...
[ "0.6738777", "0.6579158", "0.63278824", "0.60570306", "0.5916652", "0.59026754", "0.58619064", "0.58175814", "0.57330894", "0.5716345", "0.5694839", "0.56937826", "0.56533074", "0.5652727", "0.56332856", "0.55999595", "0.5542954", "0.55359966", "0.5527097", "0.5513357", "0.55...
0.0
-1
Sets a foreign key for a given table schema
private PSJdbcForeignKey createForeignKey(PSJdbcTableSchema tableSchema) throws PSJdbcTableFactoryException { List<String[]> fkCols = new ArrayList<String[]>(); String[] fcol1 = {"col1", "etable", "ecol1"}; fkCols.add(fcol1); String[] fcol2 = {"col2", "etable", "ecol1"}; fkCols.add(fcol2); PSJdbcForeignKey fk = new PSJdbcForeignKey(fkCols.iterator(), PSJdbcTableComponent.ACTION_DELETE); List<PSJdbcForeignKey> fks = new ArrayList<>(); fks.add(fk); tableSchema.setForeignKeys(fks,true); return fk; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ForeignKey createForeignKey();", "public static void addForeignKeyConstraint(Connection c, String tableName, Field fkeyField, String refTableName, Field refField) throws SQLException {\r\n\t\tStringBuffer sqlBuf = new StringBuffer();\r\n\t\tsqlBuf.append(\"alter table \");\r\n\t\tsqlBuf.append(quote(tableName));...
[ "0.61179215", "0.6070849", "0.59320307", "0.59094924", "0.578827", "0.55602", "0.5286165", "0.5267864", "0.52284414", "0.52020174", "0.51919514", "0.5053145", "0.5051633", "0.5015761", "0.5014416", "0.50035113", "0.49900585", "0.49550414", "0.49206182", "0.48933262", "0.48915...
0.6577065
0
Sets a primary key for a given table schema
private void setPrimaryKey(PSJdbcTableSchema tableSchema) throws PSJdbcTableFactoryException { List<String> pkcols = new ArrayList<String>(); pkcols.add("col1"); PSJdbcPrimaryKey pk = new PSJdbcPrimaryKey(pkcols.iterator(), PSJdbcTableComponent.ACTION_REPLACE); tableSchema.setPrimaryKey(pk); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrimaryKey(String primaryKey);", "public void setPrimaryKey(String primaryKey);", "public void setPrimaryKey(String primaryKey);", "public void setPrimaryKey(int primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setP...
[ "0.66115427", "0.66115427", "0.66115427", "0.658445", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", "0.64532065", ...
0.82981545
0
Creates a table schema from column definitions
private PSJdbcTableSchema createTableSchema(ArrayList<PSJdbcColumnDef> colDefs) throws PSJdbcTableFactoryException { PSJdbcTableSchema tableSchema = new PSJdbcTableSchema("myTable", colDefs.iterator()); tableSchema.setCreate(false); tableSchema.setAlter(true); tableSchema.setDelOldData(true); return tableSchema; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void creatTable(String tableName,LinkedList<String> columnsName,LinkedList<String> columnsType );", "public String createTable() {\n\n String statement = \"CREATE TABLE \" + tableName + \"( \";\n\n //go through INTEGER, FLOAT, TEXT columns\n Iterator iterator = Iterables.filter(column...
[ "0.69956666", "0.674916", "0.65002304", "0.6351621", "0.62813365", "0.6225361", "0.6168944", "0.61508733", "0.6120187", "0.60614645", "0.60235107", "0.59705573", "0.5941136", "0.5937128", "0.59017634", "0.58998686", "0.58518577", "0.5848033", "0.5816203", "0.5805711", "0.5787...
0.7270593
0
Creates a column definition from a dataTypeMap
private ArrayList<PSJdbcColumnDef> createColumnDef(PSJdbcDataTypeMap dataTypeMap) { ArrayList<PSJdbcColumnDef> coldefs = new ArrayList<PSJdbcColumnDef>(); coldefs.add(new PSJdbcColumnDef(dataTypeMap, "col1", PSJdbcTableComponent.ACTION_REPLACE, Types.CHAR, "10", true, null)); coldefs.add(new PSJdbcColumnDef(dataTypeMap, "col2", PSJdbcTableComponent.ACTION_CREATE, Types.DATE, "15", true, null)); return coldefs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Column createColumn(JavaTypeMapping mapping, String javaType, ColumnMetaData colmd);", "Column createColumn(JavaTypeMapping mapping, String javaType, int datastoreFieldIndex);", "Column createColumn();", "ColumnMapping createColumnMapping(JavaTypeMapping mapping, Column column, String javaType);", "Column ...
[ "0.72379893", "0.70849633", "0.62657696", "0.6243347", "0.6067343", "0.5909384", "0.56877655", "0.5600475", "0.55831254", "0.55751914", "0.555839", "0.5505542", "0.5473226", "0.54486495", "0.5439348", "0.5419993", "0.5409501", "0.53928334", "0.5388946", "0.53841263", "0.53810...
0.7672172
0
collect all tests into a TestSuite and return it
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(new PSJdbcTableSchemaTest("testDef")); return suite; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Test suite() {\n\t\treturn new AllTests();\n\t}", "public AllTests() {\n\t\taddTest(new TestSuite(TestSuiteTest.class));\n\t}", "private Test createSuite()\n {\n //Let's discover what tests have been scheduled for execution.\n // (we expect a list of fully qualified test class na...
[ "0.79069537", "0.79050183", "0.76042265", "0.75443435", "0.7535021", "0.7465995", "0.74595445", "0.7454134", "0.7428263", "0.7390817", "0.7389065", "0.73406917", "0.73297006", "0.72656107", "0.72634894", "0.72402936", "0.718845", "0.7171925", "0.71493524", "0.7129913", "0.707...
0.66890246
49
Creates a new link with the primary key. Does not add the link to the database.
public static com.agbar.intranet.quienesquien.model.Link createLink( java.lang.String linkId) { return getService().createLink(linkId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Link createLink();", "LINK createLINK();", "SimpleLink createSimpleLink();", "boolean insertLink(Link link);", "LinkRelation createLinkRelation();", "public Link add(Link link);", "public void AddLink() {\n snake.add(tail + 1, new Pair(snake.get(tail).GetFirst(), snake.get(tail).GetSecond())); /...
[ "0.7000445", "0.6596873", "0.640495", "0.6384855", "0.6350831", "0.63016653", "0.60604864", "0.6052167", "0.5961352", "0.5847823", "0.5783241", "0.5781342", "0.5743992", "0.5717143", "0.5686656", "0.55895394", "0.55715305", "0.5543079", "0.5513427", "0.5444837", "0.54367685",...
0.62025386
6
Deletes the link with the primary key from the database. Also notifies the appropriate model listeners.
public static com.agbar.intranet.quienesquien.model.Link deleteLink( java.lang.String linkId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService().deleteLink(linkId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int deleteByPrimaryKey(Integer linkid);", "@Override\n\tpublic void deleteLinkmanById(long id) {\n\t\tmapper.deleteByPrimaryKey(id);\n\t}", "boolean delete(String linkId);", "public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}", "@O...
[ "0.745229", "0.6906505", "0.6686327", "0.6627534", "0.66001767", "0.6559533", "0.652253", "0.6496213", "0.6429544", "0.64253545", "0.62847406", "0.62837034", "0.6223532", "0.6209698", "0.6203437", "0.61650115", "0.6129735", "0.6105818", "0.6084764", "0.6081497", "0.6075164", ...
0.0
-1
Deletes the link from the database. Also notifies the appropriate model listeners.
public static com.agbar.intranet.quienesquien.model.Link deleteLink( com.agbar.intranet.quienesquien.model.Link link) throws com.liferay.portal.kernel.exception.SystemException { return getService().deleteLink(link); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int deleteByPrimaryKey(Integer linkid);", "boolean delete(String linkId);", "@Override\n\tpublic int delLink(Link link) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void deleteLinkmanById(long id) {\n\t\tmapper.deleteByPrimaryKey(id);\n\t}", "public void deletelink(Integer linkId);", "public void deleteL...
[ "0.70211613", "0.6989883", "0.69579357", "0.66845834", "0.6662762", "0.6660646", "0.64067096", "0.63903385", "0.6365558", "0.630691", "0.6117441", "0.6077293", "0.60496455", "0.60152954", "0.5967163", "0.59420145", "0.588578", "0.5874397", "0.5847716", "0.5831544", "0.5819856...
0.64161223
6
Performs a dynamic query on the database and returns the matching rows.
@SuppressWarnings("rawtypes") public static java.util.List dynamicQuery( com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) throws com.liferay.portal.kernel.exception.SystemException { return getService().dynamicQuery(dynamicQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;", "public Cliente[] findByDyna...
[ "0.7039451", "0.6869426", "0.6854438", "0.67997193", "0.675506", "0.6705203", "0.67030275", "0.6669432", "0.65296555", "0.64960545", "0.64750344", "0.6344762", "0.6338596", "0.63130784", "0.6290955", "0.6276857", "0.6232485", "0.6220232", "0.6211511", "0.6207937", "0.6198829"...
0.0
-1
Returns the number of rows that match the dynamic query.
public static long dynamicQueryCount( com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) throws com.liferay.portal.kernel.exception.SystemException { return getService().dynamicQueryCount(dynamicQuery); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getRowsCount();", "@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)\n\tpublic long dynamicQueryCount(DynamicQuery dynamicQuery);", "public int selectRowCount (final String sql) throws DataAccessException;", "public long dynamicQueryCount(\n\t\tcom.liferay.portal.kernel.dao.orm.DynamicQ...
[ "0.72462654", "0.72056246", "0.7177561", "0.7133431", "0.7091408", "0.70823574", "0.70776063", "0.7060437", "0.705862", "0.7013256", "0.6983294", "0.6960493", "0.69587326", "0.6958094", "0.69572556", "0.69308513", "0.693003", "0.6921807", "0.69071466", "0.6876162", "0.6875529...
0.6676359
47
Returns the link with the primary key.
public static com.agbar.intranet.quienesquien.model.Link getLink( java.lang.String linkId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService().getLink(linkId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TLinkman selectByPrimaryKey(Integer linkid);", "long getAccountLinkId();", "public abstract DBResult getLink(int linkId) throws SQLException;", "public Integer getLinkid() {\n return linkid;\n }", "TempletLink selectByPrimaryKey(String id);", "public long getLink_id() {\r\n\t\treturn link_id;\r...
[ "0.7099214", "0.6720046", "0.6694779", "0.65652376", "0.6534011", "0.64636344", "0.6428613", "0.6423769", "0.6409965", "0.63090116", "0.6305035", "0.61642987", "0.6093091", "0.59898776", "0.5940949", "0.5897791", "0.5891807", "0.5805533", "0.5780847", "0.57440305", "0.572802"...
0.0
-1
Returns the number of links.
public static int getLinksCount() throws com.liferay.portal.kernel.exception.SystemException { return getService().getLinksCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getLinksCount();", "@java.lang.Override\n public int getLinksCount() {\n return links_.size();\n }", "public int countLink() {\n\t\tint count = 0;\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT coun...
[ "0.93000114", "0.8662071", "0.8651447", "0.8538876", "0.8229182", "0.81272435", "0.7957018", "0.7871972", "0.7685835", "0.76516557", "0.75163484", "0.7467138", "0.7340729", "0.72144794", "0.71141917", "0.7047874", "0.70032614", "0.6998072", "0.6961893", "0.6938102", "0.693698...
0.7987956
6
Updates the link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
public static com.agbar.intranet.quienesquien.model.Link updateLink( com.agbar.intranet.quienesquien.model.Link link) throws com.liferay.portal.kernel.exception.SystemException { return getService().updateLink(link); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLink(java.lang.String newLink) {\n\t\tif (instanceExtension.needValuesOnMarkDirty())\n\t\t\tinstanceExtension.markDirty(1,getLink(),newLink);\n\t\telse\n\t\t\tinstanceExtension.markDirty(1);\n\t\tdataCacheEntry.setLink(newLink);\n\t}", "public Link add(Link link);", "public boolean updateLink(St...
[ "0.61685884", "0.61556715", "0.61374134", "0.60790724", "0.6001908", "0.59160393", "0.5911635", "0.5887334", "0.58723545", "0.5772075", "0.57684976", "0.5714675", "0.5685302", "0.5658294", "0.5571989", "0.5541351", "0.55409384", "0.5539378", "0.5533099", "0.5524589", "0.55063...
0.62502635
0
Returns the Spring bean ID for this bean.
public static java.lang.String getBeanIdentifier() { return getService().getBeanIdentifier(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static java.lang.String getBeanIdentifier() {\n return getService().getBeanIdentifier();\n }", "public static java.lang.String getBeanIdentifier() {\n return getService().getBeanIdentifier();\n }", "public static java.lang.String getBeanIdentifier() {\n return getService().get...
[ "0.8218848", "0.8218848", "0.8218848", "0.8218848", "0.8218848", "0.7810215", "0.7757243", "0.7632713", "0.748587", "0.74818814", "0.74818814", "0.74818814", "0.73971653", "0.7265513", "0.717723", "0.71664697", "0.7084225", "0.70497847", "0.70097995", "0.6987446", "0.69093156...
0.82252425
3
Sets the Spring bean ID for this bean.
public static void setBeanIdentifier(java.lang.String beanIdentifier) { getService().setBeanIdentifier(beanIdentifier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBeanIdentifier(java.lang.String beanIdentifier);", "@Override\n public void setBeanIdentifier(String beanIdentifier) {\n _beanIdentifier = beanIdentifier;\n }", "@Override\n public void setBeanIdentifier(String beanIdentifier) {\n _beanIdentifier = beanIdentifier;\n }",...
[ "0.73001695", "0.6894381", "0.6894381", "0.6894381", "0.664812", "0.6621329", "0.6578381", "0.65493035", "0.6548348", "0.6495965", "0.64489466", "0.64489466", "0.64489466", "0.64489466", "0.64489466", "0.64489466", "0.63313663", "0.63125855", "0.6295864", "0.62330645", "0.621...
0.636182
20
Controlla che l'evento inserito non sia successivo ad un evento di tipo decesso e vv
private void checkInseribilitaEvento(Long idSoggetto, DecorsoForElenco decorso) { if(idSoggetto == null || idSoggetto <= 0) { log.info("Decorso senza idSoggetto"); return; } if(decorso == null || decorso.getIdTipoEvento() == null) { log.info("ID Tipo Evento obbligatorio"); return; } //recupero gli eventi del soggetto List<DecorsoForElenco> listDecorsi = decorsoMapper.selectForElencoByIdSoggetto(idSoggetto); //se l'evento che si vuole inserire è DECESSO if(decorso.getIdTipoEvento().intValue() == ID_TIPO_EVENTO_DECEDUTO_COVID || decorso.getIdTipoEvento().intValue() == ID_TIPO_EVENTO_DECEDUTO_NON_COVID) { for(DecorsoForElenco dfe : listDecorsi) { //verifico che non ci sia già un altro decesso inserito if(dfe.getIdTipoEvento()!=null && (dfe.getIdTipoEvento().intValue() == ID_TIPO_EVENTO_DECEDUTO_COVID || dfe.getIdTipoEvento().intValue() == ID_TIPO_EVENTO_DECEDUTO_NON_COVID)) { log.info("Impossibile inserire decesso per soggetto "+idSoggetto+". Un evento decesso è già presente per questo soggetto."); throw new WebApplicationException( Response.status(Status.BAD_REQUEST) .entity(new Message("Impossibile inserire decesso per soggetto "+idSoggetto+". Un evento decesso è già presente per questo soggetto.")).build()); } //controllo che non ci siano eventi con inizio successivo al decesso if(dfe.getDataDimissioni()!=null && dfe.getDataDimissioni().after(decorso.getDataDimissioni()) ) { log.info("Impossibile inserire decesso per soggetto "+idSoggetto+". Esistono altri decorsi con data di inizio successiva al decesso."); throw new WebApplicationException( Response.status(Status.BAD_REQUEST) .entity(new Message("Impossibile inserire decesso per soggetto "+idSoggetto+". Esistono altri decorsi con data di inizio successiva al decesso.")).build()); } } } //se l'evento che si vuole inserire NON è un decesso if(decorso.getIdTipoEvento().intValue() != ID_TIPO_EVENTO_DECEDUTO_COVID && decorso.getIdTipoEvento().intValue() != ID_TIPO_EVENTO_DECEDUTO_NON_COVID) { for(DecorsoForElenco dfe : listDecorsi) { //verifico che non ci sia già un decesso inserito if(dfe.getIdTipoEvento()!=null && (dfe.getIdTipoEvento().intValue() == ID_TIPO_EVENTO_DECEDUTO_COVID || dfe.getIdTipoEvento().intValue() == ID_TIPO_EVENTO_DECEDUTO_NON_COVID)) { log.info("Impossibile inserire decorso per soggetto "+idSoggetto+". Un evento decesso è presente per questo soggetto."); throw new WebApplicationException( Response.status(Status.BAD_REQUEST) .entity(new Message("Impossibile inserire decorso per soggetto "+idSoggetto+". Un evento decesso è presente per questo soggetto.")).build()); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void controlloEventiInserimento() {\n\t\t/**\n\t\t * Riempimento form informativo riguardo\n\t\t * all'ultima quota inserita per un determinato\n\t\t * tipo di socio\n\t\t */ \n\t\tviewInserimento.getCmbbxTipologia().addItemListener(new ItemListener() {\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(I...
[ "0.66848654", "0.6665184", "0.65570533", "0.63249445", "0.6319753", "0.6280859", "0.6271571", "0.6106591", "0.61010134", "0.6098708", "0.60985345", "0.60754955", "0.6067817", "0.60564315", "0.604424", "0.60211134", "0.60127646", "0.60123026", "0.5935305", "0.5932429", "0.5931...
0.7036793
0
Do efficient sorting in nlogn
@Override public void sort(int[] input) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static long[] radixsort(int arr[], int n)\r\n\r\n {\n\r\n int m = getMax(arr, n);\r\n\r\n long st = System.nanoTime();\r\n\r\n\r\n\r\n for (int exp = 1; m/exp > 0; exp *= 10)\r\n\r\n countSort(arr, n, exp);\r\n\r\n \r\n\r\n long et = System.nanoTime();\r\n\r\n threeVals[2] = et - st;\r\n\r\n return threeVals;\r\n\...
[ "0.65026385", "0.649021", "0.64399767", "0.64062655", "0.6400479", "0.6281908", "0.62660694", "0.62201893", "0.6197222", "0.6197222", "0.61789507", "0.6150784", "0.6137076", "0.6133111", "0.6126536", "0.6116723", "0.61157405", "0.60861146", "0.6055663", "0.60529184", "0.60529...
0.0
-1
Pass in a Runnable to be called from UI thread when Tango is ready, this Runnable will be running on a new thread. When Tango is ready, we can call Tango functions safely here only when there is no UI thread changes involved.
@Override public void run() { try { TangoConfig config; config = mTango.getConfig(TangoConfig.CONFIG_TYPE_DEFAULT); mTango.connect(config); fullUuidList = mTango.listAreaDescriptions(); Collections.reverse(fullUuidList); ArrayList<String> adfNames = new ArrayList<String>(); for(String uuid: fullUuidList){ adfNames.add(new String(mTango.loadAreaDescriptionMetaData(uuid).get("name"))); } adapter = new ArrayAdapter<String>(StartActivity.this, android.R.layout.simple_list_item_single_choice,adfNames); lstView = (ListView)findViewById(R.id.listView); runOnUiThread(new Runnable() { @Override public void run() { lstView.setAdapter(adapter); lstView.setItemChecked(0, true); } }); } catch (TangoErrorException e) { Log.e("OnStart", getString(R.string.exception_tango_error), e); } catch (SecurityException e) { Log.e("OnStart", getString(R.string.permission_motion_tracking), e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void runOnUiThread(Runnable runnable);", "@Override\n public void runOnUiThread(Runnable r) {\n }", "public abstract void postToMainThread(@NonNull Runnable runnable);", "public OnMainThread() {\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected...
[ "0.6498385", "0.6294677", "0.6182145", "0.6075752", "0.60705525", "0.6061746", "0.6035189", "0.5914957", "0.58836687", "0.5829212", "0.57822305", "0.5765743", "0.57531613", "0.56698847", "0.56698847", "0.5662404", "0.56563324", "0.5651615", "0.5643132", "0.56168103", "0.56143...
0.5781328
11
root pane for the organizer / constructor instantiates the game and quit panes sets up the visual of the scene
public PaneOrganizer() { _root = new BorderPane(); // new border pane Label score = new Label("Score: 0"); // score label score.setTextFill(Color.WHITE); // text color Label lives = new Label("Lives: 3"); // lives label lives.setTextFill(Color.WHITE); // text color Game game = new Game(score, lives); // game pane HBox hbox = new HBox(); // hbox to organize the quit button Button quit = new Button("Quit"); // Creating quit button quit.setOnAction(new QuitHandler()); // add the quit handler quit.minHeight(Constants.QUIT_HEIGHT); // sizing hbox.getChildren().addAll(quit, score, lives); // add components to hbox hbox.setSpacing(20); _root.setCenter(game); // set the game pane _root.setBottom(hbox); // set the hbox _root.setStyle("-fx-background-color: black"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PaneOrganizer() {\n\t\t\n\t\t_root = new BorderPane();\n\t\t_game = new Game(_root);\n\t\tthis.setupButton();\n\t\t\n\t}", "void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be con...
[ "0.83009183", "0.7386353", "0.7298489", "0.727892", "0.7233841", "0.7206853", "0.7196934", "0.7186085", "0.7151207", "0.70997894", "0.70628613", "0.7062524", "0.6980823", "0.6965964", "0.6959012", "0.69562227", "0.6911355", "0.6888113", "0.6848366", "0.6839557", "0.6832982", ...
0.8004029
1
/ Gets the border pane Used by the App class
public BorderPane getRoot() { return _root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BorderPane getPane() {\n bigField = new BigField(); // Create a Field model\n view = new BigFieldView(bigField); // Create a pane view\n BorderPane pane = new BorderPane();\n pane.setCenter(view);\n\n return pane;\n }", "BorderPane getRoot();", "private BorderPane ...
[ "0.7581952", "0.7271004", "0.6710299", "0.65629333", "0.6518437", "0.6518364", "0.6511272", "0.6473428", "0.62986684", "0.62528896", "0.6246917", "0.62265384", "0.6182324", "0.6123297", "0.6077443", "0.60196185", "0.60175395", "0.60080314", "0.5993288", "0.5989582", "0.598309...
0.65671575
4
43way connection syn 53way connection synack 63way connection ack
public boolean connect(DatagramChannel channel, Selector selector, InetAddress host, int portNumber) throws IOException { SocketAddress router = new InetSocketAddress(AddressPorts.routerAddress, AddressPorts.routerPort); Packet packet = new Packet.Builder().setType(4).setSequenceNumber(0L).setPeerAddress(host) .setPortNumber(portNumber).setPayload("".getBytes()).create(); channel.send(packet.toBuffer(), router); channel.configureBlocking(false); selector.select(AddressPorts.timeout); Set<SelectionKey> keys = selector.selectedKeys(); if (keys.isEmpty()) { logger.error("No response after timeout"); return false; } keys.clear(); ByteBuffer buf = ByteBuffer.allocate(Packet.MAX_LEN); channel.receive(buf); buf.flip(); Packet resp = Packet.fromBuffer(buf); if (resp.getType() == 5) { Packet out = resp.toBuilder().setType(6).create(); channel.send(out.toBuffer(), router); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendAck(DatagramPacket p, long timeStamp,int flag, boolean lastPacket) throws IOException{\r\n\t\tnumPackets++;\r\n\t\tclientIp = p.getAddress();\r\n\t\tclientPort = p.getPort();\r\n\r\n\t\t//Create a message buffer of MTU size\r\n\t\tbyte[] data = new byte[20];\r\n\t\tByteBuffer bb = ByteBuffer.wrap(d...
[ "0.60046184", "0.5884143", "0.5861988", "0.58148867", "0.5773643", "0.57501715", "0.5673534", "0.56071115", "0.5604217", "0.55994636", "0.5588236", "0.55708903", "0.55639875", "0.5516631", "0.5510512", "0.5492781", "0.5468844", "0.54683614", "0.54575187", "0.54502547", "0.543...
0.0
-1
Clearly reference the second:
@Test public void findRightDefinition() { assertTrue(createNamedTokens("out", "in", "in").parse(env(stream(21, 42))).isPresent()); assertTrue(createNamedTokens("out", "in", "in").parse(env(stream(21, 21, 42))).isPresent()); assertTrue(createNamedTokens("out", "in", "in").parse(env(stream(21, 21, 21, 42))).isPresent()); // Clearly reference the first: assertTrue(createNamedTokens("in", "out", "in").parse(env(stream(21, 42))).isPresent()); assertTrue(createNamedTokens("in", "out", "in").parse(env(stream(21, 42, 21, 42))).isPresent()); // Reference the first: assertTrue(createNamedTokens("in", "in", "in").parse(env(stream(21, 42))).isPresent()); assertTrue(createNamedTokens("in", "in", "in").parse(env(stream(21, 42, 21, 42))).isPresent()); // So that this will fail: assertFalse(createNamedTokens("in", "in", "in").parse(env(stream(21, 21, 42))).isPresent()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public B second() {\n return second;\n }", "public T2 _2() {\n return _2;\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "public S second() {\n return this.second;\n }", "public B getSecond() {return second; }", "public int getSecond() { return this.second; }", "@Override\n...
[ "0.6025632", "0.5896518", "0.5856767", "0.5764515", "0.5739945", "0.56705886", "0.56662095", "0.56396604", "0.56396604", "0.56007767", "0.5534692", "0.55291843", "0.55176735", "0.54945654", "0.5472901", "0.5468423", "0.5407546", "0.5383211", "0.53764975", "0.53693396", "0.536...
0.0
-1
Euclidean algorith eg. GCD for 1071 and 462 1071 % 462 = 147 462 % 147 = 21 147 % 21 = 0 21 % 0 =.... always ensure that a>=b
public static int gcd(int a, int b){ int tmp = a; a = Math.max(a,b); b = Math.min(tmp,b); //write GCD int remainder; do{ remainder = a%b; a = b; b = remainder; } while(remainder !=0); return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int gcd(int a, int b){\r\n int r, temp;\r\n if( a<b ){ temp = a; a = b; b = temp; }\r\n while( b!=0 ){ r = a%b; a = b; b = r; }\r\n return a;\r\n }", "private static int gcd (int a, int b) {\n int m = Math.max (Math.abs (a), Math.abs (b));\n if (m == 0) throw new Arithmeti...
[ "0.7761767", "0.77432656", "0.76671684", "0.7604551", "0.7570399", "0.7512615", "0.74972236", "0.7449779", "0.73526263", "0.73299336", "0.729515", "0.72877276", "0.7241153", "0.72353816", "0.7215515", "0.72134066", "0.7189988", "0.71820724", "0.71481025", "0.7105572", "0.7038...
0.7671817
2
Create a card for a game according to values of Color and Value.
@Override public Card createCard(Color color, Value label) { Card newCard = new Card(color, label); return newCard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card()\r\n {\r\n rand = new Random();\r\n value = rand.nextInt(28); \r\n // Assigning value\r\n if (value >= 14) // Check if value is greater than 14 then value = value - 14;\r\n value -= 14;\r\n // Assigning color\r\n rand = new Random();\r\n /...
[ "0.75065386", "0.72804546", "0.7227315", "0.7017095", "0.6964271", "0.6942226", "0.687378", "0.65879023", "0.64475286", "0.6446733", "0.6414818", "0.6361248", "0.6356004", "0.6315552", "0.628499", "0.6264635", "0.6246333", "0.6237767", "0.6180514", "0.6175409", "0.6173347", ...
0.73592037
1
This constructor creates some dummy values to populate our messages database. Since we're not using an actual SQL database, we're storing them in the static HashMap defined by the DatabaseClass.
public MessageService() { messages.put(1L, new Message(1, "Hello World!", "Marc")); messages.put(2L, new Message(2, "Hello Embarc!", "Kevin")); messages.put(3L, new Message(3, "Hello Luksusowa!", "Sid")); messages.put(4L, new Message(4, "I think Sid might have a bit too much blood in his alcohol-stream...", "Craig")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SimpleDataStore () {\n\t\tmessageMap = new HashMap<String , List<Message>>() ;\n\t}", "public MessageClackData() {\n super();\n this.message = DEFAULT_MESSAGE;\n }", "public MessageManager() {\n this.messageList = new HashMap<>();\n }", "public Message() {\n message =...
[ "0.68970805", "0.6395004", "0.62860835", "0.62016153", "0.60889965", "0.60426635", "0.6006249", "0.5991894", "0.5978601", "0.5960926", "0.5947159", "0.5834259", "0.5810679", "0.5781042", "0.57682896", "0.57606345", "0.57525665", "0.57469773", "0.5745765", "0.5740023", "0.5737...
0.62531465
3
This method returns an ArrayList of all the messages in the messages HashMap
public List<Message> getAllMessages() { return new ArrayList<>(messages.values()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Message> returnValues() {\r\n return new ArrayList<Message>(messageMap.values());\r\n }", "public static Map<Long,Message> getMessages(){\r\n\t\treturn messages;\r\n\t\t\r\n\t}", "public List<ChatMessage> getChatMessages() {\n logger.info(\"**START** getChatMessages \");\n ...
[ "0.77170926", "0.74299335", "0.73897177", "0.73699045", "0.7320187", "0.71221954", "0.71040165", "0.7066512", "0.7065684", "0.704966", "0.6967535", "0.69650596", "0.6956348", "0.6912731", "0.6890164", "0.6890164", "0.6890164", "0.6890164", "0.6890164", "0.6874503", "0.6870205...
0.78082305
0
This method returns the message with the given id, if that message exists. Else, it returns null.
public Message getMessage(long id) { Message message = messages.get(id); if(message == null) throw new DataNotFoundException("Message with ID " + id + " not found!"); return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Message findOneMessage(long id) {\n\t\treturn null;\n\t}", "public Message getMessageById(int id) {\n for (Message m : allMessage) {\n if (m.getId() == id) {\n return m;\n }\n }\n return null;\n }", "public TransportMessage findMe...
[ "0.8382253", "0.83521485", "0.8350327", "0.820482", "0.8141664", "0.81163275", "0.8113328", "0.80498177", "0.78715795", "0.78464043", "0.77157", "0.74706376", "0.7402586", "0.7330154", "0.73273736", "0.71442056", "0.7085551", "0.6879538", "0.6853425", "0.6842688", "0.67778784...
0.7906708
8
This method adds a Message to the messages HashMap. It also generates a UUID for the message upon insertion.
public Message addMessage(Message message) { message.setId(messages.size() + 1); messages.put(message.getId(), message); return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Message addMessage(Message p);", "public void addMessage(String msg){messages.add(msg);}", "protected void addMessage(IDBSMessage pMessage){\n\t\twMessages.add(pMessage);\n\t}", "abstract void addMessage(Message message);", "public synchronized void addMessage(Message message) {\n\t\tif (message == ...
[ "0.68737364", "0.6743876", "0.672614", "0.6670663", "0.66540146", "0.66243786", "0.6551413", "0.6509522", "0.6472606", "0.64697915", "0.64583546", "0.64337975", "0.63270384", "0.6289837", "0.62865627", "0.6238017", "0.62260854", "0.6161897", "0.61272717", "0.6108811", "0.6103...
0.65973943
6
This method updates the contents of a Message in messages if it already exists and creates a new one if it does not.
public Message updateMessage(Message message) { if(message.getId() <= 0) throw new MessageNotFoundException("The message ID " + message.getId() + " is invalid."); messages.put(message.getId(), message); return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Message update(Message message) {\n if (message.getIdMessage()!= null) {\n Optional<Message> tmpMessage = messageRepository.getMessage(message.getIdMessage());\n if (!tmpMessage.isEmpty()) {\n if (message.getMessageText()!= null) {\n tmpMessage....
[ "0.6618706", "0.6482309", "0.64132446", "0.64066184", "0.63980746", "0.63252366", "0.62866086", "0.61450434", "0.61427927", "0.61158764", "0.60769135", "0.6008662", "0.5978582", "0.5958494", "0.59558564", "0.5909587", "0.5883033", "0.58749825", "0.58697593", "0.5863088", "0.5...
0.67193687
0
Removes message by id
public Message removeMessage(long id) { return messages.remove(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Message remove(String id) {\r\n return messageMap.remove(id);\r\n }", "@Override\n\tpublic void delMessage(String id) {\n\t\t messageDAO.deleteMessage(id);\n\t\n\t}", "public String deleteMessage(Integer id ){\n repo.deleteById(id);\n return \"Mensaje Eliminado\" + id;\n }"...
[ "0.82720673", "0.8146725", "0.8124439", "0.80011463", "0.79537195", "0.78328204", "0.77514005", "0.77180314", "0.744058", "0.71886563", "0.71662664", "0.71429056", "0.71429056", "0.71429056", "0.71219385", "0.7057101", "0.705024", "0.7035788", "0.7015886", "0.7011902", "0.697...
0.83641744
0
todo how to collect tags correctly?
@Override public List<ServiceEndpoint> listServiceEndpoints() { return new ArrayList<>(serviceEndpoints.values()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UniqueTagList getTags();", "java.lang.String getTag();", "java.lang.String getTag();", "public TagInfo[] getTags() {\n/* 164 */ return this.tags;\n/* */ }", "public List getTags();", "public abstract String getTag();", "Map<String, String> tags();", "Map<String, String> tags();", "Map<Str...
[ "0.67794883", "0.6719913", "0.6719913", "0.6684313", "0.6649116", "0.66261995", "0.6588299", "0.6588299", "0.6588299", "0.6588299", "0.6588299", "0.6588299", "0.6588299", "0.6588299", "0.6587833", "0.65708524", "0.65511155", "0.65442604", "0.64271235", "0.6317634", "0.6317611...
0.0
-1
Constructor for objects of class HotelTidakDitemukanException
public HotelTidakDitemukanException(int hotel_input) { // initialise instance variables super("Hotel dengan ID : "); hotel_error = hotel_input; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RoomTidakDitemukanException(Hotel hotel_input,String room_input){\n super(\"Kamar yang terletak di : \");\n hotel_error=hotel_input;\n room_error=room_input;\n }", "public DatumException(String boodschap) {\n super(boodschap);\n }", "public ItemInvalidoException() {\r\n...
[ "0.73082215", "0.71613145", "0.71260786", "0.6989169", "0.6975541", "0.6969059", "0.6936371", "0.69065696", "0.688086", "0.6816975", "0.68141407", "0.68137425", "0.6810059", "0.6793387", "0.67875046", "0.6786786", "0.6780743", "0.67685497", "0.67675155", "0.67012274", "0.6695...
0.687869
9
Method untuk menampilkan pesan exception
@Override public String getPesan() { return super.getMessage() + hotel_error + " tidak ditemukan"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void falschesSpiel(SpielException e);", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "public void Excepti() throws Exception{ \n throw new Exception(\"El dato especificado NO existe en la lista!!!\"); \n }", "public void registraEexibe(Throwable ex) ...
[ "0.7458298", "0.7078122", "0.6751759", "0.6748239", "0.6699466", "0.66959953", "0.6692002", "0.66707474", "0.66257554", "0.6524973", "0.65123916", "0.6494676", "0.6489117", "0.64696413", "0.6428481", "0.64227235", "0.6421859", "0.6377972", "0.63617975", "0.63308984", "0.63276...
0.6181146
31
function for money extraction
public static void extract_money(){ TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getMoney();", "int getMoney();", "org.adscale.format.opertb.AmountMessage.Amount getExchangeprice();", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();", "int getMoneyValue();", "int getMoneyValue();", "org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();",...
[ "0.72644234", "0.67166334", "0.6635433", "0.6560038", "0.6507585", "0.6507585", "0.6405043", "0.6337073", "0.6294002", "0.62611556", "0.6237723", "0.6235883", "0.61604285", "0.6090783", "0.6074039", "0.6048514", "0.6044309", "0.6044309", "0.6044309", "0.60438687", "0.6034063"...
0.72110814
1
function for money deposit
public static void deposit(){ TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deposit(int money) {\n\t\t\n\t}", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "public void deposit();", "@Override\r\n\tpublic void deposit(int amount) {\n\t\t\r\n\t}", "void deposit(int value)//To deposit money from the account\n {\n balance += valu...
[ "0.84503424", "0.81446844", "0.8041489", "0.8016655", "0.79906946", "0.7937551", "0.7759919", "0.77363825", "0.77323383", "0.77072644", "0.77025765", "0.766027", "0.76593167", "0.7620292", "0.7603597", "0.7571591", "0.75545067", "0.7549106", "0.7528685", "0.7516698", "0.75164...
0.8055777
2
function for the fundation
public static void fundation(){ Scanner keyboard = new Scanner(System.in);//Keyboard input initializer String STR; //string for yes or no System.out.println("Would you like to donate to LDJ bank? (y/n)"); System.out.println(); System.out.printf(">"); STR = keyboard.next(); //the user inputs y or n in order to say if they want to donate or not if(STR.equals("y")){ //if they want to donate System.out.println(); System.out.println("Insert the amount to donate"); System.out.println(); System.out.printf("> $"); FUNDATION = keyboard.nextInt(); //the promt is printed and the amount is requested if(FUNDATION <= BALANCE){//if the amount to donate is minor to the balance you can donate FUNDATIONM = FUNDATIONM + FUNDATION; //the fundation money plus the amount to be donated BALANCE = BALANCE - FUNDATION; //the user balance minus the fundation money System.out.println("Thank you for donating!"); } else { System.out.println("Insufficient Balance"); } } else if(STR.equals("n")){ //if n then prints blank System.out.println(); } System.out.println("We'll continue with the operation"); System.out.println(); System.out.println("Done"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mutualFund(){\n\t\tSystem.out.println(\"HSBC BANK :: MUTUAL FUND\");\n\t}", "public void mutualFund() {\n\t\tSystem.out.println(\"HSBC--Mutual Fund--from Brazil Bank\");\n\t}", "public void mutualFund(){\r\n\t\tSystem.out.println(\"HSBC ---mutualFund method called from Interface BrazilBank\");\r\n...
[ "0.688959", "0.6730342", "0.66677654", "0.6655922", "0.6542607", "0.65024686", "0.6483717", "0.6436907", "0.63814515", "0.6340895", "0.6306716", "0.62814987", "0.6278131", "0.62301105", "0.62159944", "0.61816007", "0.6107354", "0.60510385", "0.6042967", "0.6039531", "0.602935...
0.6186924
15
function for closing the cashier
public static void close(){ System.out.println("Thank you for choosing our Bank"); System.out.println(); if(CLIENT.length() == 16 && PASSWORD.length() == 4){ //if the user lenght is equal to 16 and password lenght to 4 (if they are valid) then the user closes by saying the account number System.out.println("Farewell user " +CLIENT); //farewell for the client } else{ //if the account or password isnt valid then the following is displayed System.out.println("PLEASE CONTACT THE BANK FOR ASSISTANCE IF NEEDED"); } System.exit(0); //the system forces the exit of the program }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeCashDrawer(CashDrawer cd);", "public void closeCashDrawer(String campusCode);", "public void closeAccount() {}", "public void closeAccount() {}", "void close(Order order);", "private void exit() {\n if (otherCost != null) {\n otherCost = null;\n }\n this....
[ "0.7485519", "0.69901836", "0.68650824", "0.68650824", "0.6815237", "0.67930377", "0.6443661", "0.63700914", "0.63461524", "0.6340582", "0.63162386", "0.62399054", "0.6215752", "0.6200966", "0.6190124", "0.6178803", "0.61712855", "0.61474663", "0.61418235", "0.61418235", "0.6...
0.60795915
68
If available add build tag. When running under Jenkins BUILD is automatically set. You can set this manually on manual runs.
@BeforeClass public static void setupClass() { build = System.getenv("BUILD"); File logFile = new File(LOG_FILE); if(!logFile.exists()) { System.out.println("Creating log file"); try { logFile.createNewFile(); System.out.println("Created log file: " + logFile.getPath()); } catch (IOException e) { System.out.println(e.getMessage()); //e.printStackTrace(); } } try { FileHandler fileHandler = new FileHandler(logFile.getPath()); fileHandler.setFormatter(new LogFormatter()); LOGGER.addHandler(fileHandler); } catch (SecurityException e) { System.out.println(e.getMessage()); //e.printStackTrace(); } catch (IOException e) { System.out.println(e.getMessage()); //e.printStackTrace(); } LOGGER.setUseParentHandlers(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateTagsWithBuildInformation(String repository, List<Tag> tags, Tool tool) {\n try {\n final List<QuayBuild> builds = buildApi.getRepoBuilds(repository, null, Integer.MAX_VALUE).getBuilds();\n\n // Set up tags with build information\n for (Tag tag : tags) {\n ...
[ "0.5670145", "0.5577925", "0.5478548", "0.5396534", "0.5343891", "0.5341125", "0.53358567", "0.5308266", "0.52972", "0.5296803", "0.5288293", "0.5261438", "0.52586", "0.5243055", "0.52231497", "0.5222103", "0.5169739", "0.5167774", "0.5151716", "0.513379", "0.5103569", "0.5...
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Cdrbrdta)) { return false; } Cdrbrdta other = (Cdrbrdta) object; if ((this.cdrbrdtaPK == null && other.cdrbrdtaPK != null) || (this.cdrbrdtaPK != null && !this.cdrbrdtaPK.equals(other.cdrbrdtaPK))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
The generated OpenLR(tm) location references need to be checked whether all criteria are met. Currently this includes the check for the maximum distance between two successive location reference points. If the distance exceeds such a maximum then additional intermediate location reference points will be inserted. Additionally it will be checked whether the location reference path covers the location completely. This is the last check of the data and should never fail if the generation process was successful.
public abstract void adjustLocationReference( final OpenLREncoderProperties properties, final LocRefData locRefData) throws OpenLRProcessingException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final boolean checkMaxDistances(\n\t\t\tfinal OpenLREncoderProperties properties,\n\t\t\tfinal LocRefData locRefData) throws OpenLRProcessingException {\n\t\t/*\n\t\t * check for the maximum distance between two successive LRP \n\t\t */\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"check location r...
[ "0.70031077", "0.6639299", "0.63708764", "0.5823343", "0.57750785", "0.5753438", "0.5671137", "0.5671137", "0.56415457", "0.56059575", "0.55900776", "0.5543352", "0.5434986", "0.5415882", "0.5347929", "0.53166586", "0.52943105", "0.5280449", "0.5259457", "0.5256686", "0.52118...
0.4864707
61
Check and adjust offsets. This method checks of there are offsets defined in the current state of the location reference data that are invalid. Invalid offsets are such that are greater than the route(s) between the LRPs, for the negative offset this means backwards into the location reference. In such case the "overleaped" LRPs are removed and the offsets are trimmed accordingly.
protected final List<LocRefPoint> checkAndAdjustOffsets( final LocRefData lrd, final OpenLREncoderProperties properties) throws OpenLRProcessingException { List<LocRefPoint> checkedAndAdjusted = lrd.getLocRefPoints(); Location location = lrd.getLocation(); ExpansionData expansion = lrd.getExpansionData(); int startLength = checkedAndAdjusted.get(0).getDistanceToNext(); int totalPosOff = location.getPositiveOffset() + expansion.getExpansionLengthStart(); while (totalPosOff > startLength) { if (expansion.hasExpansionStart()) { if (!expansion.modifyExpansionAtStart(checkedAndAdjusted.get(0) .getRoute())) { throw new OpenLREncoderProcessingException( EncoderProcessingError.OFFSET_TRIMMING_FAILED); } } else { lrd.addToReducedPosOff(startLength); } checkedAndAdjusted.remove(0); if (checkedAndAdjusted.size() < 2) { throw new OpenLREncoderProcessingException( EncoderProcessingError.OFFSET_TRIMMING_FAILED); } startLength = checkedAndAdjusted.get(0).getDistanceToNext(); totalPosOff = location.getPositiveOffset() + expansion.getExpansionLengthStart() - lrd.getReducedPosOff(); } int endLength = checkedAndAdjusted.get(checkedAndAdjusted.size() - 2) .getDistanceToNext(); int totalNegOff = location.getNegativeOffset() + expansion.getExpansionLengthEnd(); while (totalNegOff > endLength) { if (expansion.hasExpansionEnd()) { if (!expansion.modifyExpansionAtEnd(checkedAndAdjusted.get( checkedAndAdjusted.size() - 2).getRoute())) { throw new OpenLREncoderProcessingException( EncoderProcessingError.OFFSET_TRIMMING_FAILED); } } else { lrd.addToReducedNegOff(endLength); } // remove last LRP checkedAndAdjusted.remove(checkedAndAdjusted.size() - 1); if (checkedAndAdjusted.size() < 2) { throw new OpenLREncoderProcessingException( EncoderProcessingError.OFFSET_TRIMMING_FAILED); } LocRefPoint oldLastLRP = checkedAndAdjusted.get(checkedAndAdjusted .size() - 1); LocRefPoint prevLRP = checkedAndAdjusted.get(checkedAndAdjusted .size() - 2); LocRefPoint newLastLRP; if (oldLastLRP.isLRPOnLine()) { newLastLRP = new LocRefPoint(oldLastLRP.getLine(), oldLastLRP.getLongitudeDeg(), oldLastLRP.getLatitudeDeg(), properties, true); } else { newLastLRP = new LocRefPoint(prevLRP.getLastLineOfSubRoute(), properties); } checkedAndAdjusted.remove(checkedAndAdjusted.size() - 1); prevLRP.setNextLRP(newLastLRP); checkedAndAdjusted.add(newLastLRP); endLength = checkedAndAdjusted.get(checkedAndAdjusted.size() - 2) .getDistanceToNext(); totalNegOff = location.getNegativeOffset() + expansion.getExpansionLengthEnd() - lrd.getReducedNegOff(); } return checkedAndAdjusted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final boolean checkLRPCoverage(final LocRefData locRefData) {\n\t\tList<LocRefPoint> locRefPoints = locRefData.getLocRefPoints();\n\t\tList<Line> locRoute = ExpansionHelper.getExpandedLocation(locRefData);\n\t\tint lrpLength = 0;\n\t\tList<Line> lrpRoute = new ArrayList<Line>();\n\t\tfor (LocRefPoint lrd...
[ "0.5705803", "0.56255186", "0.55042565", "0.5457336", "0.5162206", "0.50820225", "0.50016576", "0.4983099", "0.49430558", "0.49415526", "0.493285", "0.49296188", "0.4928105", "0.49264398", "0.4908832", "0.49029455", "0.48741117", "0.4872062", "0.48699105", "0.47951838", "0.47...
0.72394985
0
Checks if the LRPs are on a valid node. It logs a warning if the corresponding node is invalid.
protected final void checkNodeValidity(final List<LocRefPoint> locRefPoints) { int total = locRefPoints.size(); for (int i = 0; i < total; i++) { LocRefPoint lrp = locRefPoints.get(i); Node lrpNode = lrp.getLRPNode(); if (!NodeCheck.isValidNode(lrpNode)) { LOG.warn("location reference point (" + (i + 1) + " is located on an invalid node)"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean isNodeValid() {\n\t\treturn (SKILLS.HITPOINTS.getActualLevel() >= 25\r\n\t\t\t\t&& SKILLS.THIEVING.getActualLevel() >= 28\r\n\t\t\t\t&& Inventory.getCount(\"Coins\") >= 30 && (Location.karamjaFirstStepCheck.atLocation(Player.getPosition()) ||Location.karamjaBoatLandTile.equals(Player....
[ "0.6626752", "0.6408197", "0.62815577", "0.6024499", "0.5824462", "0.57608116", "0.57456416", "0.5700569", "0.5697331", "0.56510824", "0.5648719", "0.56448424", "0.5607354", "0.55516195", "0.5532908", "0.5509797", "0.55055416", "0.549698", "0.545368", "0.54504925", "0.5442282...
0.69460094
0
Checks if the distance between two consecutive location reference points exceeds the maximum allowed distance.
protected final boolean checkMaxDistances( final OpenLREncoderProperties properties, final LocRefData locRefData) throws OpenLRProcessingException { /* * check for the maximum distance between two successive LRP */ if (LOG.isDebugEnabled()) { LOG.debug("check location reference (maximum distance check)"); } final List<LocRefPoint> locRefPoints = locRefData.getLocRefPoints(); int maxDistance = properties.getMaximumDistanceLRP(); boolean dnpsAreVAlid = true; for (LocRefPoint lrPoint : locRefPoints) { // check the distance limit if (!lrPoint.isLastLRP() && lrPoint.getDistanceToNext() > maxDistance) { // limit is exceeded LOG.error(String .format("maximum distance between two LRP is exceeded (LRP #: %s, distance: %s)", lrPoint.getSequenceNumber(), lrPoint.getDistanceToNext())); dnpsAreVAlid = false; break; } } return dnpsAreVAlid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean maxLocationsReached() {\n Query q = new Query(\"Location\");\n int numOfEntities = ds.prepare(q).countEntities();\n return (numOfEntities >= MAX_LOCATIONS);\n }", "private static boolean isDistanceOK(double[] diff) {\n\t\tfor (double d : diff) {\n\t\t\tif (Math.abs(d) > MAX_PIXEL_DISTAN...
[ "0.62669474", "0.6230729", "0.5758029", "0.56947464", "0.56204283", "0.5584992", "0.5507532", "0.54831314", "0.54161006", "0.5413168", "0.5410061", "0.53808814", "0.53752166", "0.5375108", "0.5371675", "0.53715765", "0.5351426", "0.535012", "0.53483826", "0.5335077", "0.53212...
0.73088527
0
Checks if the path of the location reference covers the expanded location. The check includes checking the identity and order of the lines in both paths and the comparison of the location path length and the accumulated length of the location reference paths.
protected final boolean checkLRPCoverage(final LocRefData locRefData) { List<LocRefPoint> locRefPoints = locRefData.getLocRefPoints(); List<Line> locRoute = ExpansionHelper.getExpandedLocation(locRefData); int lrpLength = 0; List<Line> lrpRoute = new ArrayList<Line>(); for (LocRefPoint lrd : locRefPoints) { if (lrd.getRoute() != null) { if (!lrd.isLRPOnLine()) { // Added by DLR e.V. (RE) if (locRefData.getLocationType() == LocationType.CLOSED_LINE && lrd == locRefPoints.get(locRefPoints.size() - 1)) { List<Line> route = lrd.getRoute(); route.add(locRefPoints.get(0).getRoute().get(0)); lrpRoute.addAll(route); route.remove(route.size() - 1); } else { // original code lrpRoute.addAll(lrd.getRoute()); } // } // Added by DLR e.V. (RE) if (locRefData.getLocationType() == LocationType.CLOSED_LINE && lrd == locRefPoints.get(locRefPoints.size() - 1)) { List<Line> route = lrd.getRoute(); route.add(locRefPoints.get(0).getRoute().get(0)); lrpLength += PathUtils.getLength(route); route.remove(route.size() - 1); } else { // original code lrpLength += lrd.getDistanceToNext(); } // } } // check for the same amount of lines if (locRoute.size() != lrpRoute.size()) { LOG.error("number of lines are different"); LOG.error("location: " + locRoute.size() + " - locRef: " + lrpRoute.size()); return false; } int locationLength = 0; int count = locRoute.size(); // check if the lines are equal and in the same order for (int i = 0; i < count; ++i) { Line next = locRoute.get(i); if (next.getID() != lrpRoute.get(i).getID()) { // if a line is missing or in an incorrect order, then fail LOG.error("paths are different"); LOG.error("location line: " + next.getID() + " - locRef line: " + lrpRoute.get(i).getID()); return false; } locationLength += next.getLineLength(); } // check that the location length and location reference path length are // equal if (locationLength != lrpLength) { LOG.error("lengths are different"); LOG.error("location: " + locationLength + " - locRef: " + lrpLength); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean containsLocation(Location p) {\n\t\tint r = p.getRow();\n\t\tint c = p.getCol();\n\t\tint offR = r - topLeft.getRow();\n\t\tint offC = c - topLeft.getCol();\n\t\treturn 0 <= offR && offR < length && 0 <= offC && offC < width;\n\t}", "boolean hasLocation();", "boolean hasLocation();", "protecte...
[ "0.5617752", "0.5610868", "0.5610868", "0.5480846", "0.54692733", "0.54377115", "0.54067343", "0.5370187", "0.53482693", "0.5345773", "0.5279845", "0.52794427", "0.52686924", "0.5225385", "0.5205876", "0.51210666", "0.5120118", "0.51140684", "0.5073114", "0.50643694", "0.5054...
0.5909318
0
Every field must be present and not null.
public Workout(WorkoutName workoutName, List<Exercise> workoutExercises) { logger.info(String.format("Creating new Workout called %s", workoutName.fullName)); requireAllNonNull(workoutName, workoutExercises); this.workoutName = workoutName; this.workoutExercises.addAll(workoutExercises); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FieldValidator anyButNull() {\n return isNotNull();\n }", "private void fillMandatoryFields() {\n\n }", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") || function.equals(\"\") || protagonist.equals(\"\")\n ...
[ "0.72859174", "0.7104176", "0.7035953", "0.69024074", "0.6828938", "0.6793402", "0.67538154", "0.6689033", "0.64973384", "0.6482917", "0.64742625", "0.6390421", "0.63801885", "0.63404965", "0.63065755", "0.62949306", "0.6275777", "0.6256196", "0.6253335", "0.6230312", "0.6218...
0.0
-1
Returns true if both workouts of the same workoutName. This defines a weaker notion of equality between two workouts.
public boolean isSameWorkout(Workout otherWorkout) { if (otherWorkout == this) { return true; } return otherWorkout != null && otherWorkout.getWorkoutName().equals(getWorkoutName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Workout)) {\n return false;\n }\n\n Workout otherWorkout = (Workout) other;\n return otherWorkout.getWorkoutName().equals(getWork...
[ "0.7466231", "0.5986328", "0.58049977", "0.5643313", "0.56339157", "0.5537099", "0.5536941", "0.5528327", "0.5505919", "0.53238237", "0.5300269", "0.5297436", "0.52942073", "0.52936435", "0.52608997", "0.5251305", "0.5243784", "0.5211109", "0.5211001", "0.52052635", "0.520468...
0.81050664
0
Replace an exercise in the workout with another exercise.
public void setExercise(Exercise target, Exercise editedExercise) { logger.info("Setting exercise"); int index = workoutExercises.indexOf(target); if (index != -1) { workoutExercises.set(index, editedExercise); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void doExercise2() {\n // TODO: Complete Exercise 2 Below\n\n }", "public void testExercises() {\n\t\tSystem.out.println(\"Exercise 2:\");\n\t\tSATSolver solver = get2Solver();\n\t\tshowClauses(solver);\n\t\ttestLiterals(solver);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Exerci...
[ "0.58352804", "0.5825838", "0.5715318", "0.5708023", "0.56788737", "0.56636405", "0.5650764", "0.56443614", "0.5463299", "0.5321265", "0.5171608", "0.5170207", "0.513947", "0.51384276", "0.5098851", "0.5096049", "0.5085545", "0.50556725", "0.5039275", "0.5033961", "0.5032714"...
0.6396513
0
Deletes an exercise from the workout.
public void deleteExercise(Exercise exercise) { logger.info("Deleting exercise"); while (workoutExercises.contains(exercise)) { workoutExercises.remove(exercise); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DELETE\n\t@Path(\"/{exerciseId}\")\n\t@Nonnull\n\tString deleteExerciseById(@Nonnull @PathParam(\"exerciseId\") Long exerciseId);", "@DELETE\n\t@Path(\"/{exerciseId}\")\n\t@Nonnull\n\tResponse deleteExerciseById(@Nonnull @PathParam(\"exerciseId\") Long exerciseId);", "public void deleteExercise(User user) {\n...
[ "0.68071467", "0.6791635", "0.6781785", "0.67760825", "0.6729912", "0.660803", "0.6567122", "0.6534002", "0.6532042", "0.6523048", "0.64839464", "0.64630663", "0.6432776", "0.6425393", "0.63570267", "0.63281083", "0.631746", "0.6297717", "0.6255009", "0.6251452", "0.6246809",...
0.83449954
0
Returns true if both workouts have the same identity and data fields. This defines a stronger notion of equality between two workouts.
@Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof Workout)) { return false; } Workout otherWorkout = (Workout) other; return otherWorkout.getWorkoutName().equals(getWorkoutName()) && otherWorkout.getWorkoutExercises().equals(getWorkoutExercises()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSameWorkout(Workout otherWorkout) {\n if (otherWorkout == this) {\n return true;\n }\n\n return otherWorkout != null\n && otherWorkout.getWorkoutName().equals(getWorkoutName());\n }", "boolean hasSameAs();", "@Override\r\n public boolean equ...
[ "0.68401927", "0.6710233", "0.6543764", "0.6282951", "0.6273265", "0.6200938", "0.61262554", "0.6007103", "0.59781224", "0.5946098", "0.588895", "0.5840104", "0.5820604", "0.5818884", "0.57784873", "0.575229", "0.5739253", "0.57303023", "0.5717945", "0.57151043", "0.57142353"...
0.7036001
0
Creates a CarrierShape object with default values for state.
public CarrierShape() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CarrierShape(int x,int y)\n {\n super(x,y);\n }", "public CarrierShape(int x, int y, int deltaX, int deltaY, int width, int height)\n {\n super(x,y,deltaX,deltaY,width,height);\n }", "public CarrierShape(int x,int y, int deltaX, int deltaY)\n {\n super(x,y,deltaX,delt...
[ "0.66708755", "0.6614537", "0.6580606", "0.64141375", "0.63780713", "0.63269484", "0.62129587", "0.6160331", "0.5952743", "0.5931473", "0.5836315", "0.5782703", "0.56991965", "0.56599474", "0.55803514", "0.55759263", "0.5568376", "0.5562197", "0.5557003", "0.5534227", "0.5513...
0.77189606
0
Creates a CarrierShape object with specified location values, default values for other state items.
public CarrierShape(int x,int y) { super(x,y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CarrierShape()\n {\n super();\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public CarrierShape(int x,int y, int deltaX, int deltaY)\n {\n super(x,y,deltaX,deltaY);\n }", "public CarrierShape(int x, int y, int deltaX, int deltaY, int width, int height)\n {\n ...
[ "0.67155224", "0.58628356", "0.5726172", "0.57203335", "0.5515024", "0.5508745", "0.5508745", "0.5475866", "0.5444532", "0.5438724", "0.5421157", "0.5418265", "0.5336858", "0.5336858", "0.5336858", "0.5306673", "0.52673656", "0.5255338", "0.5224718", "0.5219581", "0.5219581",...
0.6015299
1
Creates a CarrierShape with specified values for location, velocity and direction. Nonspecified state items take on default values.
public CarrierShape(int x,int y, int deltaX, int deltaY) { super(x,y,deltaX,deltaY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CarrierShape()\n {\n super();\n }", "public CarrierShape(int x, int y, int deltaX, int deltaY, int width, int height)\n {\n super(x,y,deltaX,deltaY,width,height);\n }", "public CarrierShape(int x,int y)\n {\n super(x,y);\n }", "public Shape() {\n\t\tthis(DEFAULT_...
[ "0.67069906", "0.62288076", "0.60195994", "0.5528595", "0.5476098", "0.5387612", "0.5289101", "0.528633", "0.52688724", "0.5263944", "0.5254553", "0.52351487", "0.52299", "0.52194256", "0.52067804", "0.51935977", "0.51689255", "0.5133426", "0.5119253", "0.5097608", "0.5078193...
0.6166932
2
Creates a CarrierShape with specified values for location, velocity, direction, width and height.
public CarrierShape(int x, int y, int deltaX, int deltaY, int width, int height) { super(x,y,deltaX,deltaY,width,height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CarrierShape()\n {\n super();\n }", "public CarrierShape(int x,int y, int deltaX, int deltaY)\n {\n super(x,y,deltaX,deltaY);\n }", "public CarrierShape(int x,int y)\n {\n super(x,y);\n }", "public static Cylinder buildRobotCylinder() {\n Cylinder robotCyl...
[ "0.6857908", "0.66116333", "0.645827", "0.56662345", "0.56494534", "0.5601818", "0.5596808", "0.5541067", "0.5470996", "0.5447411", "0.54436946", "0.543823", "0.5422802", "0.54119885", "0.5409426", "0.5407364", "0.5404499", "0.53972846", "0.53927815", "0.5370651", "0.5364122"...
0.7138867
0
Moves a CarrierShape object (including its children) within the bounds specified by arguments width and height
@Override public void move(int width, int height) { // First move the CarrierShape itself then its children super.move(width,height); // Moving each child of the CarrierShape for(Shape child : children) { child.move(_width,_height); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void moveShape(double lon, double lat);", "public void move()\n {\n xPosition = xPosition + xSpeed;\n yPosition = yPosition + ySpeed;\n draw();\n if (xPosition >= rightBound - diameter)\n {\n xSpeed = -(xSpeed);\n\n }\n else\n ...
[ "0.6460167", "0.62100387", "0.6124861", "0.6080849", "0.5968549", "0.59076256", "0.5871997", "0.5864288", "0.5856382", "0.5771377", "0.57500184", "0.5665404", "0.5659385", "0.56480706", "0.5636107", "0.5635643", "0.56028247", "0.5599041", "0.55914164", "0.5574708", "0.556174"...
0.8003776
0
Paints a CarrierShape object by drawing a rectangle around the edge of its bounding box. The carrierShape object's children are then painted
@Override public void paint(Painter painter) { // Drawing the outline of the CarrierShape painter.drawRect(_x,_y,_width,_height); // Translating the origin to x and y point to the top left corner // of the CarrierShape to be able to paint its children relative to that point painter.translate(_x,_y); // Painting each child relative to the top left corner of the CarrierShape for(Shape child : children) { child.doPaint(painter); } // Translating the origin back to x = 0 y = 0 painter.translate(-_x,-_y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Car(int x, int y) {\n // ASSIGN ALL PARAMETERS TO THE CAR CLASS GLOBAL VARIABLES HERE\n xCord = x;\n yCord = y;\n targetCord = 0;\n // CREATE CAR PSHAPE HERE\n // ATTEMPT TO CREATE A CAR-LOOKING-THING USING YOUR OWN VERTICES\n\n //front of car\n //let's slam a bunch of vertices down and hop...
[ "0.6417776", "0.62739086", "0.6269183", "0.6176413", "0.6140831", "0.6103594", "0.6045207", "0.6024411", "0.6021884", "0.6015456", "0.60031843", "0.5999638", "0.5984055", "0.59786314", "0.5976341", "0.59508455", "0.5895048", "0.5894885", "0.5881939", "0.5859646", "0.5846518",...
0.69023865
0
Attempts to add a shape to a CarrierShape object. if successful, a twoway link is established between the CarrierShape and the newly added Shape.
void add(Shape shape) throws IllegalArgumentException { // Checking if the shape is already part of the children list or if the // shape already has a parent if(contains(shape) || shape.parent()!=null) { // Then throw an error throw new IllegalArgumentException(); } // If the shape to add is outside of the CarrierShape bounds // then throw an error if(shape._width+shape._x>_width || shape._height+shape._x>_height) { throw new IllegalArgumentException(); } // Otherwise the shape is added to the children list children.add(shape); // The parent of the shape is set to this CarrierShape // to establish a two-way connection shape.setParent(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addShape(Shape shape)\n {\n shapes.add(shape);\n }", "public void addShape(PhysicsShape shape) {\n\t\tshapes.add(shape);\n\t}", "void addShape(IShape shape);", "void add(Shape aShape);", "public void Add( TopoDS_Shape aShape) {\n OCCwrapJavaJNI.ShapeFix_EdgeConnect_Add__SWIG_1(swig...
[ "0.69034415", "0.6543182", "0.6493281", "0.6423435", "0.64096326", "0.63473445", "0.6126632", "0.6038267", "0.5943519", "0.58745855", "0.58607167", "0.57726175", "0.56756943", "0.5651652", "0.55777043", "0.5545396", "0.5447683", "0.54103667", "0.5403687", "0.5390754", "0.5369...
0.64926094
3
Removes a particular Shape from a CarrierShape instance. Once removed, the twoway link between the CarrierShape and its former child is destroyed.
void remove(Shape shape) { // If the children list contains the shape // then remove it and set its parent to null // breaking the two-way connection if(contains(shape)) { children.remove(shape); shape.setParent(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeShape(RetainedShape shapePeer) {\r\n\t\tshapePeer.vboHandle.delete();\r\n\t}", "public void remove()\n {\n ShapeParent parent = getShapeParent();\n \n if (parent != null)\n {\n parent.remove(this);\n }\n }", "public void removeShape(PhysicsS...
[ "0.75715786", "0.75011736", "0.73434675", "0.6746174", "0.6674173", "0.65840006", "0.6546244", "0.6270835", "0.6210016", "0.6086938", "0.58299136", "0.56888264", "0.5666231", "0.5486179", "0.54847467", "0.5405297", "0.5390172", "0.5315475", "0.53039855", "0.5272626", "0.52636...
0.7291183
3
Returns the Shape at a specified position within a CarrierShape. If the position specified is less than zero or greater than the number of children stored in the CarrierShape less one this method throws an IndexOutOfBoundsException.
public Shape shapeAt(int index) throws IndexOutOfBoundsException { // Return the child at index return children.get(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RMShape getChild(int anIndex) { return null; }", "public int indexOf(Shape shape)\n {\n // returns the index of the child\n return children.indexOf(shape);\n }", "public Glyph child(int position) throws OperationNotSupportedException, IndexOutOfBoundsException {\n throw new O...
[ "0.6205783", "0.57146335", "0.56358194", "0.552743", "0.5520827", "0.5471326", "0.53949106", "0.53704923", "0.5356335", "0.52941537", "0.52818763", "0.52077353", "0.5136284", "0.5122578", "0.51195985", "0.51111746", "0.51074135", "0.51069695", "0.51021653", "0.5088014", "0.50...
0.680287
0
Returns the number of children contained within a CarrierShape object.
public int shapeCount() { // return the number of children in the list return children.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int countChildren() {\n return this.children.size();\n }", "public int countChildren() {\n return this.children.size();\n }", "public int childrenSize()\r\n\t{\r\n\t\treturn this.children.size();\r\n\t}", "public int getChildCount() {\n return this.children.size();\n }", "pub...
[ "0.75545174", "0.7537611", "0.74665964", "0.74335116", "0.7387874", "0.73713654", "0.73667383", "0.73587817", "0.7354208", "0.7344913", "0.72993845", "0.7247279", "0.7233962", "0.7211405", "0.7124048", "0.71062946", "0.7096887", "0.7002838", "0.69753355", "0.6965795", "0.6933...
0.80864286
0
Returns the index of a specified child within a CarrierShape object. If the Shape specified is not actually a child of the CarrierShape this method returns 1.
public int indexOf(Shape shape) { // returns the index of the child return children.indexOf(shape); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int indexOf( ChildType child );", "@Override\r\n\tpublic int getIndexOfChild(Object parent, Object child) {\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "default int childIndex() {\n // XXX this is expensive\n SemanticRegion<T> parent = parent();\n if (parent != null) {\n return par...
[ "0.7146632", "0.6975465", "0.6955815", "0.6849277", "0.68133044", "0.67321193", "0.6657407", "0.65980226", "0.6562176", "0.6451628", "0.63032204", "0.6243837", "0.62216395", "0.6161749", "0.61367714", "0.6135944", "0.60315955", "0.6017169", "0.598659", "0.58487135", "0.578382...
0.7839134
0
Returns true if the Shape argument is a child of the CarrierShape object on which this method is called, false otherwise.
public boolean contains(Shape shape) { // checks if the child is in the children list return children.contains(shape); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDescendant(RMShape aShape) { return aShape!=null && aShape.isAncestor(this); }", "public boolean isAncestor(RMShape aShape) { return aShape==_parent || (_parent!=null && _parent.isAncestor(aShape)); }", "public boolean isRenderInsideShape() {\n return this.renderInsideShape;\n }", ...
[ "0.72735476", "0.696145", "0.68928987", "0.6668119", "0.6659528", "0.64538485", "0.63948035", "0.6325992", "0.6313944", "0.6304136", "0.6301128", "0.6148301", "0.613894", "0.6126105", "0.6116799", "0.60991156", "0.60952115", "0.60688007", "0.60688007", "0.60585856", "0.600713...
0.7186672
1
Created by MSI on 05/02/2016.
public interface ShippingMethodManageDelegate { public void updateShippingMethod(ShippingMethod shippingMethod); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "private stendhal() {\n\t}", "public void mo4359a() {\n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void perish() {\n...
[ "0.60864156", "0.5950731", "0.583413", "0.5753487", "0.5742597", "0.57265115", "0.5722586", "0.57216996", "0.57216996", "0.57216996", "0.57216996", "0.57216996", "0.57216996", "0.57216996", "0.5712105", "0.5704246", "0.5677251", "0.5665085", "0.5650391", "0.5631768", "0.56182...
0.0
-1
Method findFiles find files by pattern
private void findFiles(Path file) throws InterruptedException { Path name = file.getFileName(); if (name != null && matcher.matches(name)) { System.out.println(String.format("Put file [%s] to files queue", file)); files.put(file.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> getFiles(String path, String searchPattern) throws IOException;", "List<String> getFiles(String path, String searchPattern, String searchOption) throws IOException;", "private void FindFiles(Path findPath)\n {\n\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(findPath)...
[ "0.7982194", "0.77173847", "0.65023583", "0.63722837", "0.63686997", "0.6324052", "0.6185669", "0.6130546", "0.61295116", "0.6081613", "0.6075998", "0.6067654", "0.6067046", "0.59677446", "0.5949341", "0.5933173", "0.5886607", "0.58808166", "0.5820879", "0.57797295", "0.57571...
0.55998814
32
start the department's UDP server for interdepartment communication the UDP server is started on a new thread
private static void startUDPServer(EnrollmentInterface instance, int portNo) { new Thread(() -> { ((EnrollmentImpl) instance).UDPServer(portNo); }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startUDPTask() {\r\n \tif(isRunning){\r\n \t\tsetChanged();\r\n \t\tnotifyObservers(isRunning);\r\n \t}\r\n \telse {\r\n \t\tUDPServerThread = new Thread(this);\r\n \t\tUDPServerThread.start();\r\n \t}\r\n }", "private void startThread() {\n\t\tif(receivethread != null && r...
[ "0.773213", "0.7493611", "0.74499", "0.73600674", "0.6837048", "0.66639036", "0.6620209", "0.6462085", "0.64509296", "0.64406884", "0.64148265", "0.6407993", "0.632109", "0.630303", "0.62967837", "0.6269242", "0.62307817", "0.6223212", "0.62001777", "0.6161096", "0.6109969", ...
0.74764967
2
if node is present in current dfs path then it comes in a cycle
boolean dfs(int node, Map<Integer, List<Integer>> graph, boolean[] visited, Set<Integer> dfsPath) { if(dfsPath.contains(node)) return false; // If this node is already visited via some other source node then avoid checking further again if(visited[node]) return true; dfsPath.add(node); visited[node] = true; for(int adjVertex : graph.get(node)) { if(!dfs(adjVertex, graph, visited, dfsPath)) { return false; } } dfsPath.remove(node); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Boolean checkCycle() {\n Node slow = this;\n Node fast = this;\n while (fast.nextNode != null && fast.nextNode.nextNode != null) {\n fast = fast.nextNode.nextNode;\n slow = slow.nextNode;\n if (fast == slow) {\n ...
[ "0.66852736", "0.65577304", "0.64687943", "0.64000195", "0.6378341", "0.6343138", "0.63238287", "0.6321543", "0.6304642", "0.621122", "0.61591196", "0.6157242", "0.6135419", "0.6117737", "0.61017233", "0.6078618", "0.6072186", "0.60667145", "0.60464305", "0.60382825", "0.6035...
0.62900484
9
Scan the annotation target to determine whether any annotations from the Bean Validation package (javax.validation.constraints) are present.
public boolean hasConstraints(AnnotationTarget target) { return Annotations.getAnnotations(target) .stream() .map(AnnotationInstance::name) .anyMatch(CONSTRAINTS::contains); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasParameterCheckAnnotations(Annotation annotation) {\n\t\tfor (Annotation anno : annotation.annotationType().getAnnotations()) {\n\t\t\tClass<? extends Annotation> annotationType = anno.annotationType();\n\t\t\tif (annotationType.isAnnotationPresent(ParameterCheck.class)) {\n\t\t\t\treturn true;\n...
[ "0.58645165", "0.56475514", "0.56229365", "0.5592546", "0.54239947", "0.5389035", "0.5377193", "0.53613394", "0.535462", "0.53491414", "0.5243232", "0.5223137", "0.51870054", "0.5179969", "0.5159952", "0.5120845", "0.5091859", "0.5091859", "0.5070145", "0.50489885", "0.503332...
0.62702435
0
to test this after it is being exposed through the op sequence list.
void testBP() { try { init(); accessComplete.reset(); FormTestID(TestNo,SubNo++,"FUN"); op1 = sequance.new Operation(); addOpSequenceBP(op1,ACCESS_OPERATION_CODE.ACCESS_OPERATION_BLOCK_PERMALOCK ); psLog.println("\n<br><a>TestCase No:"+TestID+"</a> <br>"); psLog.println("\n<b>Description</b>:"+logText+" "+ACCESS_OPERATION_CODE.ACCESS_OPERATION_BLOCK_PERMALOCK); psLog.println("\n<b> Expected: Block permalock memory Bank"+"</b><br>"); psLog.println("\n<b> Actual Result is :</b><br>"); // //access sequence perform. // byte[] tp = { (byte)0xBE,(byte)0xDD}; // // accessfilter.TagPatternA.setTagPattern(tp); reader.Actions.TagAccess.OperationSequence.performSequence(accessfilter, tInfo, antInfo); accessComplete.waitOne(); int successCount[] = new int[1];int failureCount[] = new int[1]; reader.Actions.TagAccess.getLastAccessResult(successCount, failureCount); reader.Actions.TagAccess.OperationSequence.delete(op1); if( successCount[0] == 0 ) { psLog.println("\n Test Result :PASS"); psResult.println(TestID+" "+logText+" :PASS"); } else { psLog.println("\n Test Result :FAIL"); psResult.println(TestID+" "+logText+" :FAIL"); } if( ReadMemory() ) { psLog.println("\n Test Result :PASS"); psResult.println(TestID+" "+logText+" :PASS"); // successCount++; } else { psLog.println("\n Test Result :FAIL"); psResult.println(TestID+" "+logText+" :FAIL"); // failureCount++; } } catch(InvalidUsageException exp) { System.out.print("\nInvalidUsageException"+exp.getInfo()+exp.getVendorMessage()); } catch(OperationFailureException exp) { CleanupPendingSequence(); System.out.print("\nOperationFailureException"+exp.getMessage()+exp.getStatusDescription()); } catch(InterruptedException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void presentShowcaseSequence() {\n }", "@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}", "public void sampleOperation() {\n\t}", "@Override\n public void onSequenceFinish() {\n // Yay\n }", "public final void mo51373a() {\n ...
[ "0.6113698", "0.5911143", "0.5845151", "0.5807539", "0.5720353", "0.56908274", "0.5568001", "0.5543579", "0.5507277", "0.5507201", "0.54513675", "0.5343686", "0.5336844", "0.5334811", "0.53186727", "0.5308453", "0.5300764", "0.52849996", "0.5284426", "0.5266406", "0.52621406"...
0.509118
63
Creates new form LOADIUNG
public LOADIUNG() { initComponents(); load(); timer.start(); HOME home = new HOME(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "FORM createFORM();", "public FormInserir() {\n initComponents();\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "public void loadForm() {\n if (!selectedTip...
[ "0.7151756", "0.69728386", "0.6956894", "0.6569257", "0.65294546", "0.6502673", "0.6394237", "0.63627857", "0.63603157", "0.6310059", "0.6249613", "0.62072587", "0.6106737", "0.61043555", "0.6104215", "0.6092207", "0.60742295", "0.60574156", "0.6020678", "0.60195565", "0.6015...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jProgressBar1 = new javax.swing.JProgressBar(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); one = new javax.swing.JPanel(); two = new javax.swing.JPanel(); three = new javax.swing.JPanel(); four = new javax.swing.JPanel(); five = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(42, 82, 134)); jLabel1.setFont(new java.awt.Font("Haettenschweiler", 0, 48)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("LOADING"); one.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout oneLayout = new javax.swing.GroupLayout(one); one.setLayout(oneLayout); oneLayout.setHorizontalGroup( oneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE) ); oneLayout.setVerticalGroup( oneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 22, Short.MAX_VALUE) ); two.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout twoLayout = new javax.swing.GroupLayout(two); two.setLayout(twoLayout); twoLayout.setHorizontalGroup( twoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE) ); twoLayout.setVerticalGroup( twoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 22, Short.MAX_VALUE) ); three.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout threeLayout = new javax.swing.GroupLayout(three); three.setLayout(threeLayout); threeLayout.setHorizontalGroup( threeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE) ); threeLayout.setVerticalGroup( threeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 22, Short.MAX_VALUE) ); four.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout fourLayout = new javax.swing.GroupLayout(four); four.setLayout(fourLayout); fourLayout.setHorizontalGroup( fourLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE) ); fourLayout.setVerticalGroup( fourLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 22, Short.MAX_VALUE) ); five.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout fiveLayout = new javax.swing.GroupLayout(five); five.setLayout(fiveLayout); fiveLayout.setHorizontalGroup( fiveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 81, Short.MAX_VALUE) ); fiveLayout.setVerticalGroup( fiveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 22, Short.MAX_VALUE) ); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(one, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(two, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(three, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(four, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(five, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1) .addGap(167, 167, 167)) ); jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {five, four, one, three, two}); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(100, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(40, 40, 40) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(four, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(three, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(one, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(two, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(five, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(37, 37, 37)) ); jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {five, four, one, three, two}); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73185146", "0.7290127", "0.7290127", "0.7290127", "0.7285798", "0.7247533", "0.7214021", "0.720785", "0.71952385", "0.71891224", "0.7184117", "0.7158779", "0.7147133", "0.70921415", "0.70792264", "0.7055538", "0.6986984", "0.6976409", "0.6955238", "0.69525516", "0.69452786...
0.0
-1
usar este metodo quando se quer colocar 1 acessorio a nivel especifico por exemplo quando se guarda o acessorio em formato de texto e se tem de recrealo
public void setLvl(int lvl) { for(int i = this.nivelArma; i < lvl; i++) { statsLvlUp(); nivelArma += 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int darContador(String texto)\r\n{\r\n\t\r\n\tif(texto.equals(TablaMonas.textoLamEsp1))\r\n\t{\r\n\t\treturn dataSource.darContador(TablaMonas.laminaEspecial1);\r\n\t}\r\n\telse if(texto.equals(TablaMonas.textoLamEsp2))\r\n\t{\r\n\t\treturn dataSource.darContador(TablaMonas.laminaEspecial2);\r\n\t\t\r\n\t}\...
[ "0.6389973", "0.6260331", "0.6170931", "0.6122653", "0.60203266", "0.5994697", "0.5959609", "0.5928066", "0.5871694", "0.5856987", "0.5844106", "0.5836253", "0.5832479", "0.5830067", "0.58155274", "0.5813706", "0.57696533", "0.575728", "0.5752135", "0.5730706", "0.57079846", ...
0.0
-1
Based on the node parameters passed in generate an expected node id. This is used in an attempt to match a registration request with an open registration.
public String selectNodeId(Node node, String remoteHost, String remoteAddress);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String generateNodeId(Node node, String remoteHost, String remoteAddress);", "public String openRegistration(String nodeGroupId, String externalId);", "void nodeCreate( long id );", "public String myNodeId() {\n\t\tif (nodeId == null) {\n\t\t\tnodeId = UUID.randomUUID();\n\t\t\tLOG.debug(\"My node id=...
[ "0.67174625", "0.57720965", "0.57704425", "0.562647", "0.5602287", "0.5588385", "0.5585687", "0.55449814", "0.5433456", "0.5426059", "0.54001665", "0.53904366", "0.53751844", "0.53620154", "0.53561383", "0.5346861", "0.53389275", "0.5304788", "0.5285853", "0.5271432", "0.5243...
0.5499716
8
Based on the node parameters passed in generate a brand new node id.
public String generateNodeId(Node node, String remoteHost, String remoteAddress);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void nodeCreate( long id );", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \...
[ "0.6797455", "0.6363375", "0.6292691", "0.61381984", "0.608147", "0.6069643", "0.60413224", "0.600703", "0.60049736", "0.5984671", "0.5915889", "0.5863276", "0.58598447", "0.58432484", "0.5831643", "0.58255684", "0.58161545", "0.58086985", "0.5796462", "0.5783904", "0.5778634...
0.7058321
0
Generate a password to use when opening registration
public String generatePassword(Node node);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String createPassword()\r\n\t{\r\n\t\treturn getRandomPwd(4);\r\n\t}", "public static String generatePass(){\r\n \r\n String password = new Random().ints(10, 33, 122).collect(StringBuilder::new,\r\n StringBuilder::appendCodePoint, StringBuilder::append)\r\n .toString();\...
[ "0.80584383", "0.7939237", "0.7838014", "0.75623053", "0.7503725", "0.748054", "0.7371486", "0.7371486", "0.7371486", "0.7371486", "0.7371486", "0.7371486", "0.7371486", "0.73623127", "0.73623127", "0.73623127", "0.73623127", "0.73623127", "0.73623127", "0.73623127", "0.73623...
0.74621654
6
Constructs new BoardInterface object, with it's state set to display player number interface.
public BoardInterface(){ setupLayouts(); setPlayerChoice(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Board() {\n this.cardFactory = new CardFactory(this);\n }", "public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}", "public AIPlayer(Board board) {\n cells = board.squares;\n }", "Board() {\n this(INITIAL_PIECES, BLACK);\n _co...
[ "0.6536741", "0.6495384", "0.6355888", "0.62999785", "0.6290782", "0.6278643", "0.62710863", "0.6251652", "0.6197875", "0.6178131", "0.6173477", "0.61513853", "0.6106572", "0.6101797", "0.610062", "0.60851735", "0.6074352", "0.6069213", "0.60426766", "0.60398185", "0.6033839"...
0.7340934
0
Registers an EventHandler for all house buttons.
public void setHouseHandler(EventHandler<ActionEvent> handler){ for(Node hB : housePane.getChildren()){ ((Button) hB).setOnAction(handler); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void registerEvents() {\n MouseEventHandler handler = new MouseEventHandler();\n setOnMousePressed(handler);\n setOnMouseReleased(handler);\n setOnMouseMoved(handler);\n setOnMouseEntered(handler);\n setOnMouseExited(handler);\n\n }", "public void setup...
[ "0.6793966", "0.5842726", "0.58295584", "0.58024573", "0.57665044", "0.57602054", "0.5732861", "0.57143486", "0.5698574", "0.56731766", "0.5616381", "0.56097364", "0.5576631", "0.551848", "0.5437179", "0.5425958", "0.54148865", "0.53857017", "0.5332545", "0.53148055", "0.5314...
0.6959631
0
Registers an EventHandler for all player selection buttons.
public void setPlayerOptionHandler(EventHandler<ActionEvent> handler){ for(Node pO : playerChoice.getChildren()){ ((Button) pO).setOnAction(handler); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic synchronized void registerEventListeners() {\n\t\tif (eventListeners != null) // already called\n\t\t\treturn;\n\t\teventListeners = EventListenerManagers.wrap(this);\n\t\tSelectionUpdateListener selectionUpdateListener = new SelectionUpdateListener();\n\t\tselectionUpdateListener.setHandler(th...
[ "0.606553", "0.60145724", "0.5981948", "0.59519386", "0.5918695", "0.5840311", "0.58090144", "0.57250434", "0.57076555", "0.56021833", "0.54531604", "0.5444522", "0.54360455", "0.54264414", "0.5421532", "0.54204273", "0.5378906", "0.53775936", "0.5360308", "0.5325134", "0.530...
0.6734185
0
Registers an EventHandler for all game option buttons.
public void setGameOptionHandler(EventHandler<ActionEvent> handler){ for(Node gO : gameOptions.getChildren()){ ((Button) gO).setOnAction(handler); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPlayerOptionHandler(EventHandler<ActionEvent> handler){\n\t\tfor(Node pO : playerChoice.getChildren()){\n\t\t\t((Button) pO).setOnAction(handler);\n\t\t}\n\t}", "private void registerEvents() {\n MouseEventHandler handler = new MouseEventHandler();\n setOnMousePressed(handler);\n ...
[ "0.6479091", "0.5902568", "0.5821146", "0.58059114", "0.5568816", "0.55453277", "0.5507636", "0.5409208", "0.5372282", "0.535258", "0.5322723", "0.5306182", "0.53055096", "0.52880317", "0.5261999", "0.52528006", "0.52456313", "0.5237016", "0.52276653", "0.5222336", "0.5207701...
0.71204215
0
Switched interface to display player count buttons.
public void setPlayerChoice(){ this.setAlignment(Pos.CENTER); this.getChildren().clear(); this.getChildren().add(playerChoice); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayCount() {\n\t\tlabel.setText(String.format(\"%2d\", game.getCount()));\n\t}", "public void showPlayerStats(Player player) {\n pIcon = new JLabel(player.getName() + \"'s turn\");\n pIcon.setBackground(Color.white);\n pIcon.setBorder(BorderFactory.createEtchedBorder(0));\n ...
[ "0.6451867", "0.6273314", "0.61497295", "0.6084768", "0.5966025", "0.5957491", "0.59543556", "0.5948017", "0.59142697", "0.5891198", "0.58748096", "0.5842087", "0.58316875", "0.5823107", "0.5810831", "0.57885104", "0.5783432", "0.57484937", "0.5729939", "0.57259", "0.5725116"...
0.0
-1
Switched interface to display main game buttons.
public void setGameInterface() { this.setAlignment(Pos.TOP_LEFT); this.getChildren().clear(); this.getChildren().addAll(housePane, gameOptions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void IngameMenuComponents() {\n\t\tInterface.continueGame.setPreferredSize(Interface.dim);\n\t\tInterface.continueGame.setIcon(new ImageIcon(Interface.Button));\n\t\tInterface.continueGame.setHorizontalTextPosition(JButton.CENTER);\n\t\tInterface.continueGame.setVerticalTextPosition(JButton.CENTER);\...
[ "0.7054297", "0.6954864", "0.6810024", "0.67499536", "0.6735211", "0.6727187", "0.66524565", "0.6645534", "0.66163474", "0.66131365", "0.661122", "0.6605985", "0.6593117", "0.65767145", "0.6568482", "0.6558132", "0.6553289", "0.6545505", "0.6524839", "0.65174", "0.6501839", ...
0.0
-1
Returns the value of the 'Body Condition' reference. An optional Constraint on the result values of an invocation of this Operation.
Constraint getBodyCondition();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Reference condition() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_CONDITION);\n }", "public OverallCondition getCondition() {\n return condition;\n }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "OclExpressionCS getBodyExpression();...
[ "0.6470697", "0.63480246", "0.62707776", "0.6223649", "0.6179908", "0.6146748", "0.60452276", "0.6039146", "0.6027502", "0.5953349", "0.5923145", "0.591051", "0.58827215", "0.5881892", "0.58646077", "0.5853012", "0.58462006", "0.5788474", "0.56860757", "0.5681358", "0.5674455...
0.8054843
0
Returns the value of the 'Is Ordered' attribute. Specifies whether the return parameter is ordered or not, if present. This information is derived from the return result for this Operation.
boolean isIsOrdered();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean getOrdered() { \n\t\treturn getOrderedElement().getValue();\n\t}", "@objid (\"fcf73d01-d406-41e9-9490-067237966153\")\n boolean isIsOrdered();", "public boolean isOrdered() {\n return mOrdered;\n }", "public boolean getAlwaysOrdered();", "public Boolean getOrderStatus() {\n ...
[ "0.74485123", "0.7420027", "0.7352531", "0.69248056", "0.65354997", "0.6515219", "0.6452844", "0.63355505", "0.6332093", "0.6332093", "0.6296782", "0.62264", "0.6178587", "0.6160249", "0.6081853", "0.6048618", "0.6048618", "0.60477644", "0.6029188", "0.60210407", "0.6000964",...
0.6501536
6
Returns the value of the 'Is Query' attribute. The default value is "false". Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false).
boolean isIsQuery();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean isSetQuery() {\n return this.query != null;\n }", "public boolean hasQuery() {\n return fieldSetFlags()[8];\n }", "public Boolean is...
[ "0.685487", "0.68275636", "0.68275636", "0.6821204", "0.6551866", "0.6435035", "0.6422818", "0.63939536", "0.61242497", "0.6123526", "0.610616", "0.6089558", "0.60783964", "0.6053552", "0.6051527", "0.60019135", "0.595225", "0.58648956", "0.5791925", "0.57699263", "0.57670826...
0.72451717
0
Returns the value of the 'Is Unique' attribute. Specifies whether the return parameter is unique or not, if present. This information is derived from the return result for this Operation.
boolean isIsUnique();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();", "boolean isUniqueAttribute();", "public boolean isUnique();", "boolean isUnique();", "public boolean isSetUnique() {\n\t\treturn this.unique != null;\n\t}", "public boolean supportsUnique() {\n \t\treturn true;\n \t}", "publ...
[ "0.7889372", "0.7196054", "0.7159913", "0.6939921", "0.65206766", "0.6459439", "0.6385741", "0.6372542", "0.6310686", "0.6282991", "0.62482554", "0.62283885", "0.6122457", "0.6104251", "0.5984628", "0.5984628", "0.5984628", "0.5984628", "0.5984628", "0.5984628", "0.5984628", ...
0.7079417
3
Returns the value of the 'Lower' attribute. Specifies the lower multiplicity of the return parameter, if present. This information is derived from the return result for this Operation.
int getLower();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getLowerValue() {\n return this.lowerMeasure.getValue();\n }", "public double lower()\n\t{\n\t\treturn _dblLower;\n\t}", "public int getLower() {\n return lower;\n }", "public String getLower() {\n return lowerBound;\n }", "public Measure<?, ?> getLowerMeasure() ...
[ "0.7444828", "0.7438728", "0.7005664", "0.6826432", "0.667006", "0.65929836", "0.64250076", "0.639799", "0.6389194", "0.6347974", "0.6240097", "0.6175143", "0.6172557", "0.61063", "0.6077571", "0.5972503", "0.59578365", "0.5946807", "0.59186697", "0.5875698", "0.5849525", "...
0.64315134
6
Returns the value of the 'Type' reference. The return type of the operation, if present. This information is derived from the return result for this Operation.
Type getType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public type getType() {\r\n\t\treturn this.Type;\r\n\t}", "Type getReturnType () { return return_type; }", "public Type getType() {\n return this.mType;\n }", "public Type getType() {\n\t\treturn this.type;\n\t}", "public int getType() {\n return theType;\n }", "public String ...
[ "0.74724615", "0.74237156", "0.72339743", "0.718156", "0.7178071", "0.7165903", "0.7164913", "0.71600896", "0.71465886", "0.7143439", "0.7127979", "0.7124161", "0.7124161", "0.7124161", "0.7124161", "0.7124161", "0.71234363", "0.7119222", "0.7115031", "0.71057487", "0.7105748...
0.0
-1
Returns the value of the 'Upper' attribute. The upper multiplicity of the return parameter, if present. This information is derived from the return result for this Operation.
int getUpper();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double upper()\n\t{\n\t\treturn _dblUpper;\n\t}", "public int getUpper() {\n return upper;\n }", "public int getUpperValue() {\n return getValue() + getExtent();\n }", "public double getUpperValue() {\n return this.upperMeasure.getValue();\n }", "public String getUpper(...
[ "0.78445613", "0.77203864", "0.76665676", "0.756197", "0.73450214", "0.6933816", "0.6801393", "0.6704486", "0.65475196", "0.6468039", "0.6382952", "0.63707924", "0.63259584", "0.6272429", "0.62657756", "0.62164325", "0.6169102", "0.61445934", "0.6136357", "0.61276686", "0.609...
0.71251094
5
If this operation has a return parameter, isOrdered equals the value of isOrdered for that parameter. Otherwise isOrdered is false.
boolean isOrdered();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@objid (\"fcf73d01-d406-41e9-9490-067237966153\")\n boolean isIsOrdered();", "public boolean isOrdered() {\n return mOrdered;\n }", "public Boolean getOrdered() { \n\t\treturn getOrderedElement().getValue();\n\t}", "boolean isIsOrdered();", "public boolean getAlwaysOrdered();", "public void set...
[ "0.72394204", "0.7171511", "0.69400114", "0.68953085", "0.6744739", "0.6632385", "0.6308974", "0.60870725", "0.5972768", "0.59380245", "0.59130234", "0.59117925", "0.58913195", "0.5820917", "0.5754473", "0.57518464", "0.5739811", "0.5718203", "0.5712138", "0.5691956", "0.5691...
0.6862702
5
If this operation has a return parameter, isUnique equals the value of isUnique for that parameter. Otherwise isUnique is true.
boolean isUnique();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();", "public boolean isUnique();", "boolean isIsUnique();", "public boolean supportsUnique() {\n \t\treturn true;\n \t}", "public boolean isUniqueA() {\n return true;\n }", "public boolean isExplicitUniqueCheckRequired();...
[ "0.7760032", "0.727982", "0.72230643", "0.6626676", "0.65379804", "0.6500002", "0.6438629", "0.61371404", "0.6068796", "0.6029579", "0.5911313", "0.5867743", "0.58049804", "0.5801076", "0.5786832", "0.5786832", "0.5786832", "0.5786832", "0.5786832", "0.5786832", "0.5786832", ...
0.7164589
3
If this operation has a return parameter, lower equals the value of lower for that parameter. Otherwise lower has no value.
int lower();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double lower()\n\t{\n\t\treturn _dblLower;\n\t}", "public Point getLowerPoint() {\n return lower;\n }", "public void setLowerPoint(Point lower) {\n this.lower = lower;\n }", "protected abstract D getLower(R range);", "public double getLowerValue() {\n return this.lowerMeas...
[ "0.64314353", "0.62973255", "0.6085753", "0.5964287", "0.59485185", "0.5934905", "0.58037084", "0.57696986", "0.57205784", "0.57173365", "0.570732", "0.5683727", "0.5669658", "0.55954456", "0.55422354", "0.55051726", "0.54826105", "0.5473859", "0.54568565", "0.54382473", "0.5...
0.48577508
85
The query returnResult() returns the set containing the return parameter of the Operation if one exists, otherwise, it returns an empty set
EList<Parameter> returnResult();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Result getResult();", "@Override\r\n\tpublic List<T> getResult() {\n\t\treturn null;\r\n\t}", "@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}", "public QueryResult<T> getResult();", "@Nullable\n Result getResult();", "public Object getResult() {\n if (result == null) {\n ...
[ "0.6744331", "0.665054", "0.6535483", "0.6431847", "0.6414629", "0.6355224", "0.635294", "0.6349377", "0.63356626", "0.6282438", "0.6225218", "0.6224377", "0.6213139", "0.6213139", "0.6210887", "0.6204988", "0.6193512", "0.6122859", "0.6122859", "0.607914", "0.6073083", "0....
0.6944827
0
If this operation has a return parameter, type equals the value of type for that parameter. Otherwise type has no value.
Type type();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Type getReturnType () { return return_type; }", "Type getReturnType();", "public Type getReturnType() {\n/* 227 */ return Type.getReturnType(this.desc);\n/* */ }", "TypeDescription getReturnType();", "public getType_result(getType_result other) {\n __isset_bitfield = other.__isset_bitfield;\...
[ "0.66139793", "0.6323144", "0.6051553", "0.6000833", "0.59541684", "0.59475416", "0.5883352", "0.5830687", "0.58015805", "0.5786459", "0.56840295", "0.5673158", "0.56437045", "0.56425476", "0.56425476", "0.56425476", "0.56425476", "0.56425476", "0.56425476", "0.56425476", "0....
0.0
-1
If this operation has a return parameter, upper equals the value of upper for that parameter. Otherwise upper has no value.
int upper();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double upper()\n\t{\n\t\treturn _dblUpper;\n\t}", "public int getUpper() {\n return upper;\n }", "public void setUpperPoint(Point upper) {\n this.upper = upper;\n }", "public Point getUpperPoint() {\n return upper;\n }", "public String getUpper() {\n return upper...
[ "0.6649024", "0.63667023", "0.62584364", "0.620781", "0.6163541", "0.612789", "0.6064864", "0.6032989", "0.594465", "0.5836784", "0.58148664", "0.5671704", "0.55501956", "0.5494553", "0.5474655", "0.5370937", "0.53381", "0.52842164", "0.5185183", "0.5173586", "0.51236916", ...
0.5905808
9
Finds the regular pattern of indices of each row.
public String convert(String s, int numRows) { if (numRows == 1) { return s; } int len = s.length(); StringBuilder builder = new StringBuilder(); // Each 2*numRows-2 as a group int step = 2 * numRows - 2; // the 1st row, one element each group for (int i = 0; i < len; i += step) { builder.append(s.charAt(i)); } // the jth row, 0 < j < numRows-1, two elements each group for (int j = 1, end = numRows - 1; j < end; j++) { // the difference between the two elements int dif = 2 * (numRows - 1 - j); for (int i = j; i < len; i += step) { builder.append(s.charAt(i)); int second = i + dif; if (second < len) { builder.append(s.charAt(second)); } } } // the last row for (int i = numRows - 1; i < len; i += step) { builder.append(s.charAt(i)); } return builder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int[] computeTemporaryArray(String pattern)\r\n\t{\r\n\t\t// Temp array is of the same size of the pattern.\r\n\t\t// Every point tells us what is the longest suffix length which is also the prefix in this temp array.\r\n\t\tint [] lps = new int[pattern.length()];\r\n\t\t\r\n\t\t// First point is al...
[ "0.564526", "0.5532494", "0.53799134", "0.53524274", "0.53051627", "0.52592206", "0.5234606", "0.5209951", "0.5178482", "0.5165294", "0.51637083", "0.511227", "0.5064555", "0.50464934", "0.5008107", "0.5000367", "0.5000367", "0.49521992", "0.49381173", "0.4930207", "0.4929922...
0.0
-1
Do some work here
@Override public boolean onStartJob(JobParameters job) { new Thread(new Runnable() { @Override public void run() { Log.d("lkj noti ready", "noti ready"); if (mUser != null) { mDatabase.child("users").child(mUser.getUid()).child("uploadContent").addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { //내가 게시한 투표 리스트 가져오기 Map<String, Object> uploadContents = (Map<String, Object>) dataSnapshot.getValue(); final ArrayList<String> contentList = new ArrayList<>(); try { for (Map.Entry<String, Object> entry : uploadContents.entrySet()) { if (entry.getValue().equals("true")) { contentList.add(entry.getKey()); } } } catch (Exception e) { e.printStackTrace(); } //가져온 리스트와 전체 리스트 비교하기 mDatabase.child("user_contents").addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { Iterator<DataSnapshot> listIterator = dataSnapshot.getChildren().iterator(); while (listIterator.hasNext()) { final ContentDTO contentDTO = listIterator.next().getValue(ContentDTO.class); for (int i = 0; i < contentList.size(); i++) { if (contentDTO.contentKey.equals(contentList.get(i))) { //가져온 리스트와 전체 리스트 비교해서 알람에 설정된 카운트 가져오기 //continueCount는 n번째마다 알람 //oneCount는 n번 mDatabase.child("user_contents").child(contentList.get(i)).child("alarm").addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { try { String tmp = dataSnapshot.toString(); int index = tmp.indexOf("C");//ContinueCount String temp = tmp.substring(index, tmp.length() - 2); int index_ = temp.indexOf("O");//OneCount // int continueCount = Integer.parseInt(temp.substring(1, index_)); int oneCount = Integer.parseInt(temp.substring(index_ + 1, temp.length())); // if (oneCount != 0) { if (contentDTO.contentHit >= oneCount) { notificationShow(contentDTO.title, contentDTO.contentHit, contentDTO.contentKey, contentDTO.pollMode, contentDTO.itemViewType); mDatabase.child("user_contents").child(contentDTO.contentKey).child("alarm").setValue("C0O0"); Log.d("lkjJobTest1", "JOBTESTTTTT???????????TT"); Log.d("lkjJobTest2", String.valueOf(contentDTO.contentHit)); Log.d("lkjJobTest3", String.valueOf(oneCount)); } } } catch (Exception e) { e.printStackTrace(); } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } } } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); Log.d("lkjJobTest", "JOBTESTTTTTTTTTTTTTTTT"); } } }).start(); return true; // Answers the question: "Is there still work going on?" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void work() {\n\t}", "public void work() {\n\t}", "protected abstract void work();", "protected void internalRun() {\n work();\n }", "@Override\n\t\t\tpublic void worked(int work) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}", "protected void a...
[ "0.6861782", "0.6861782", "0.68450105", "0.67839974", "0.6637291", "0.66014254", "0.6564242", "0.65337396", "0.6358516", "0.635033", "0.6297575", "0.6286126", "0.62814736", "0.62483114", "0.6189935", "0.6182168", "0.61724293", "0.6169617", "0.61407185", "0.61198825", "0.61125...
0.0
-1
public void drawOverview(List stacks)
public void drawOverview() { stackRows = (int)Math.ceil(stacks.size()/9.f); for(int y = 0; y < 6; y++) { for(int x = 0; x < 9; x++) { int slotIndex = x+9*y; int stackIndex = x+9*(y+scrollOffset); //System.out.println(slotIndex); Slot slot = new Slot(inventory,slotIndex, x*24, y*18); this.addSlotToContainer(slot); if(stackIndex < stacks.size()) slot.putStack(stacks.get(stackIndex)); else slot.putStack(null); } } /*int i =0; for(ItemStack stack : stacks) { this.inventorySlots.get(i).putStack(stack); i++; }*/ //this.inventoryItemStacks = stacks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showStacksVisualization() {\n\t\tsetVisualization(new StackVisualization(rootComposite, controller, checklist));\n\t}", "public void displayStacks(ArrayList<ArrayList<PositionInBoard>> listOfStacks){\n\n for(int i = 0; i< listOfStacks.size(); i++){\n stackPanels[i].removeAll();\n ...
[ "0.66720635", "0.6424056", "0.6320613", "0.60204744", "0.586969", "0.5782391", "0.5757913", "0.57501626", "0.5668527", "0.55840385", "0.55824065", "0.55247325", "0.55231816", "0.55219585", "0.5514599", "0.55001575", "0.5497182", "0.54935086", "0.5489878", "0.54781157", "0.546...
0.80861753
0