query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
We don't ever want to have a BookContract object so we give it an empty Constructor
private BookContract(){}
[ "public Book(){}", "public Book() {\n }", "public Book(){\r\n newBook();\r\n }", "private ClothesContract() {}", "public BookPBH(){}", "private WhatsGoodContract()\n {\n }", "public BookAuthor(){}", "public BookRecord() {\n super(Book.BOOK);\n }", "public Booking() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ArtifactMatchRestriction__Group__1__Impl" $ANTLR start "rule__ArtifactMatchRestriction__Group__2" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8115:1: rule__ArtifactMatchRestriction__Group__2 : rule__ArtifactMatc...
public final void rule__ArtifactMatchRestriction__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:8119:1:...
[ "public final void rule__ArtifactMatchRestriction__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/Interna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if this buffer can fit all elements in another buffer plus an additional elements. Will not exclude any duplicates.
public boolean fits(BBuffer<A> other, A additional) { int totDataBytes = other.getDataBytes() + getDataBytes() + codec.byteSize(additional); int totElements = other.getNumberOfElements() + getNumberOfElements() + 1; return reservedSpace + headerSize + totDataBytes + ((totElements) * ptrSize) <= capa...
[ "public boolean fits(BBuffer<A> other) {\n int totDataBytes = other.getDataBytes() + getDataBytes();\n int totElements = other.getNumberOfElements() + getNumberOfElements();\n return reservedSpace + headerSize + totDataBytes + (totElements * ptrSize) <= capacity;\n }", "public boolean addBufferAndCalcul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of the renderedOnUserRole property.
public void setRenderedOnUserRole(String renderedOnUserRole) { this.renderedOnUserRole = renderedOnUserRole; }
[ "public String getRenderedOnUserRole() {\r\n if (renderedOnUserRole != null) {\r\n return renderedOnUserRole;\r\n }\r\n ValueBinding vb = getValueBinding(\"renderedOnUserRole\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) : null;\r\n }", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a backup model that will be used to search nodes that can't be found in the ordinary source of this provider.
public void setBackup( int model, ProjectModel backup ) { if( backup == null ){ backups.remove( models ); } else{ backups.put( model, backup ); } if( model < models.size() ){ models.get( model ).backup = backup; } }
[ "public void setBackupProvider(ProtocolProviderService backupProvider)\n {\n this.backupProvider = backupProvider;\n }", "public void setBackupLocation(String backupLocation) {\n this.backupLocation = backupLocation;\n }", "BackupPolicyInner innerModel();", "public void setBackupTree1(TreeBui...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write the data in d to a mono wavefile.
public static void wavwrite(double[] d, int sr, String filename) { // try // { // AudioWriter aw = new AudioWriter(new File(filename), // new AudioFormat((int)sr, 16, 1, // true, false...
[ "public native int writeAudio(byte[] data, int offset, int length, long timestamp);", "private static void writeWavFile(String fileName, byte[] audioData, int sampleRate, int sampleSize, int numChannels) {\n }", "private static void writeAudioFile(String fileName, byte[] data) throws Exception {\n }", "void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fin de main Deje que el usuario juegue un juego de Blackjack, con el ordenador como repartidor. Devuelve true si el usuario gana el juego, false si el usuario pierde.
static boolean playBlackjack() { Deck mazo; // Un mazo de cartas. Una nueva baraja para cada juego. BlackjackHand manoRepartidor; // La mano del repartidor. BlackjackHand manoUsuario; // La mano del usuario. mazo = new Deck(); manoRepartidor = new BlackjackH...
[ "public boolean esmenor(){\n //este metodo no aplica en la resolución del caso de uso planteado\n //sólo sirve para determinar si el participante es menor de edad para \n //poner como obligatorio el campo nombreTutor de acuerdo a las reglas\n //del negocio.\n return false;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the sipMsgType value for this SmmCriteria.
public java.lang.Short getSipMsgType() { return sipMsgType; }
[ "public MsgType getMsgType() {\n return msgType;\n }", "com.cst14.im.protobuf.ProtoClass.MsgType getMsgType();", "public String getMsgtype() {\n return msgtype;\n }", "com.sanjin.bean.StockPoolGatewayProtos.GTMSGTYPE getMsgType();", "public String getMailMsgType();", "int getMsgType();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Messagetypespecific access methods appear below. /////////////////////////////////////////////////////// Accessor methods for field: dest Field type: short, unsigned Offset (bits): 0 Size (bits): 8 /////////////////////////////////////////////////////// Return whether the field 'dest' is signed (false).
public static boolean isSigned_dest() { return false; }
[ "public static boolean isSigned_dataType() {\n return true;\n }", "public static boolean typesAreEquivalent(int sourceType, int destType) {\n boolean result = false;\n if (sourceType == destType) {\n result = true;\n }\n if (sourceType == Types.DECIMAL && dest...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to create server connection for each port number input portNumber as int output ServerSocket as serverSocket.
public ServerSocket createConnection(int portNumber) throws MandelbrotSetException { ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(portNumber); } catch (Exception e) { throw new MandelbrotSetException(e.getMessage()); } return serverSocket; }
[ "public void createServerSocket(int portNumber) {\n try {\n this.serverSocket = new ServerSocket(portNumber);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ChatRoomServer(int portNumber){\n this.ClientPort = portNumber;\n }", "privat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtain the entities in this case: Lexical Entry instances. This method will create a cache.
private HashSet<String> getEntities(OntModel model) { File file = new File("./cache/dbnary_entities.txt"); if (file.exists()) { LOGGER.info("Cached file found. Obtaining entities from cache."); return readHashSetFromFile(file); } file.getParentFile().mkdirs(...
[ "public Collection<REntityEntry> getEntries();", "public static List<Entity> getEntities() {\n return entities;\n }", "List<Entity> getEntities();", "@Override\n \tpublic EntityEntry getEntry(Object entity) {\n \t\treturn entityEntries.get(entity);\n \t}", "protected synchronized void constructCac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column public.ControlledLists.cl_id
public void setClId(Integer clId) { this.clId = clId; }
[ "public void setClId(String clId) {\r\n this.clId = clId;\r\n }", "public void setContragentid(Long newVal) {\n if ((newVal != null && this.contragentid != null && (newVal.compareTo(this.contragentid) == 0)) || \n (newVal == null && this.contragentid == null && contragentid_is_initiali...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the tactics property: The tactics of the alert rule.
public NrtAlertRule withTactics(List<AttackTactic> tactics) { if (this.innerProperties() == null) { this.innerProperties = new NrtAlertRuleProperties(); } this.innerProperties().withTactics(tactics); return this; }
[ "public void setTactic(String tactic){\n\t\tthis.tactic = Tactic.valueOf(tactic);\n\t}", "public String getTactics() {\n\t\treturn this.tactics;\n\t}", "public List<AttackTactic> tactics() {\n return this.innerProperties() == null ? null : this.innerProperties().tactics();\n }", "public Tactic getTa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Begins a new transaction. If a transaction is already active, commits the changes and begin a new transaction. A transaction can be closed by a commit or rollback operation. When the transaction begins, the file is restored to a coherent state if needed.
public void beginTransaction() throws IllegalStateException, IOException { // if the last transaction hasn't been closed, commit it if (this.backup != null) { this.commit(); } // if needed, restore the file in its previous state restoreFile(); ...
[ "public void beginTransaction() {\n\t\tgetEntityManager().getTransaction().begin();\n\t}", "Transaction beginTx();", "@Override\n \tpublic void startTransaction() {\n \t\t/*\n \t\t * This method is called only when transactions are nested. The nested\n \t\t * transaction will call this method before it applies ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Gets the input HTML file name, start and end page of HTML and returns the text content using JSOUP API
String extractContentFromDocument(BotswanaCourtDocument bcd, String htmlfile,int startpage,int endpage){ //dom tree structured in two formats example for 1st format(47-98) USA.1947.002 and for 2nd format(1998.25 - 2013) USA.2000.003 Document document = null; File input = new File(htmlfile); String textContent =...
[ "private String getText(URL url){\n\tString parsedHtml=null;\n\ttry{\n\t\tHttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\t\tString line = null;\n\t\tStringBuilder tmp = new StringBuilder();\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\t\twh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overrides toString() for a market. Returns the sorted amount of each ingredient line by line.
@Override public String toString() { Map<String, Integer> sortMap = sortByQuantity(market); String materials = ""; int counter = 1; for (Map.Entry<String, Integer> entry : sortMap.entrySet()) { if (counter < 3) { materials += entry.getValu...
[ "@Override\n\tpublic String toString() {\n\t\treturn this.gems + \" gems for \" + this.amount + \" \" + this.goods.toString();\n\t}", "public String toString() {\n String result = \"\";\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // add \\n (line dow...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method checks if the password field has an error
@Override public boolean hasPasswordFieldError() { return (mETPassword == null || !TextUtils.isEmpty(mETPassword.getError()) || TextUtils.isEmpty(mETPassword.getText())); }
[ "public boolean validatePassword() {\r\n\t\tif (txtPassword.getValue() == null || txtPassword.getValue().length() == 0 || !txtPassword.getValue().equals(txtRetypePassword.getValue()))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "boolean hasPasswordRequired();", "private void validatePassword() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the operation corresponding to the DML script: ones = matrix(1, rows=1, cols=HoutWout) output = input + matrix(bias %% ones, rows=1, cols=FHoutWout) This operation is often followed by conv2d and hence we have introduced bias_add(input, bias) builtin function
public static void biasAdd(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException { int N = input.getNumRows(); int K = bias.getNumRows(); int PQ = input.getNumColumns() / K; ConvolutionParameters params = new ConvolutionParameters(N, PQ, -1, -1, K, -1, -1, -...
[ "public void calculate() {\n \n //set a default value\n this.outputBeforeActivation = 0.0;\n \n //if there are actual inputs and weights, sum all inputs, weights, bias\n if(numberOfInputs > 0) {\n \n if(input != null && weight != null) {\n \n for(int i = 0; i < numberOfInpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns DescLogicConcepts for a given criteria
private List getDescLogicConcepts(DescLogicConcept dlc,String vocabulary, int limit) throws Exception{ List results = new ArrayList(); String conceptName = null; String conceptCode = null; String vocab = null; int maxLimit = limit; int matchOption = 0; String matchType = ""; String searchValue = n...
[ "private List getDescLogicConcepts(String parameterList, DescLogicConcept dlc) throws Exception{\n List results = new ArrayList();\n List concepts = new ArrayList();\n String returnClassName = null;\n int limit = 0;\n String vocabularyName = null;\n if(parameterList.indexOf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the gray level equivalent of this color.
@Override public double getGray() { return getLevel(0); }
[ "public Color getBaseGColor() {\r\n return getBaseColor('G');\r\n }", "public Color getPitColor(){\n\t\treturn Color.GRAY;\n\t}", "public int getGreen()\n {\n return (int)(g * 255);\n }", "public Color getBaseNColor() {\r\n return getBaseColor('N');\r\n }", "public int[][] grayScale(){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that creating an index with duplicate name yields an error.
@Test public void testCreateIndexWithDuplicateName() { final IgniteCache<KeyClass, ValueClass> cache = cache(); cache.query(new SqlFieldsQuery("CREATE INDEX \"" + IDX_NAME_1_ESCAPED + "\" ON \"" + TBL_NAME_ESCAPED + "\"(\"" + FIELD_NAME_1_ESCAPED + "\" ASC)")); assertSqlExcepti...
[ "@Test\r\n public void testIndexesThatDuplicatesPrimaryIndex() {\r\n Schema schema = schema(\r\n table(\"SomeValidTableName\")\r\n .columns(\r\n column(\"column1\", DataType.STRING, 15).primaryKey()\r\n ).indexes(\r\n index(\"index1\").unique().columns(\"column1\")\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
insert image file to Excel workbook
public void insertImage(XSSFWorkbook book, XSSFSheet sheet, InputStream is) throws Exception { try { byte[] bytes = IOUtils.toByteArray(is); is.close(); int pictureIdx = book.addPicture(bytes, Workbook.PICTURE_TYPE_JPEG); Drawing<?> patriarch = sheet.createDrawingPatriarch(); XSSFClientAnchor anchor = ...
[ "public static void makeExcel(String photoFileName, String excelFileName){\n\t\t\n\t\t\n\t\t\n\t\tFileInputStream file = null;\n\t\t//File mainFile = null;\n\t\ttry {\n\t\t\tfile = new FileInputStream(photoFileName);\n\t\t\t//mainFile = new File(photoFileName);\n\t\t} catch (FileNotFoundException e2) {\n\t\t\t// TO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to select Random value from dropdown
public void Dropdownselection(WebElement ele) { Select dropdown = new Select(ele); //Get all options List<WebElement> dd = dropdown.getOptions(); int iCnt = dd.size(); Random num = new Random(); int iSelect = num.nextInt(iCnt); dropdown.selectByIndex(iSelect); System.out.println("Element ...
[ "private void selectRandom() {\n\n\t\tRandom randomise;\n\n\t\t// Select random char from Spinner only if it is enabled\n\t\tif (solo.getCurrentSpinners().get(0).isEnabled()) {\n\t\t\trandomise = new Random();\n\t\t\trandomCharPos = randomise.nextInt(solo.getCurrentSpinners().get(1)\n\t\t\t\t\t.getCount());\n\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
print list or export as pdf todo print list or export as pdf
public boolean exportOrPrint(){ Toast.makeText(getContext(),getString(R.string.exporting),Toast.LENGTH_SHORT).show(); String exportBody = null; StringBuilder exportBodyBuilder = new StringBuilder(); exportBody = getString(R.string.note_export_content_header); for(String data : se...
[ "public void print(){\n CSVWriter csvWriter = new CSVWriter();\n if(commandInfoCollection.getDisplay()) {\n System.out.println(csvWriter.columnNameWriter());\n if(commandInfoCollection.getShowIncomplete()) {\n for(Todo todo : todoList){\n if(!todo.getCompleted()) {\n Syste...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load a new routing table from a file.
public void loadRouteTable(String routeTableFile) { if (!routeTable.load(routeTableFile, this)) { System.err.println("Error setting up routing table from file " + routeTableFile); System.exit(1); } System.out.println("Loaded static route table"); System.out.println("----------------------------...
[ "private static void fillTableFromFile(HashTable table) {\n Scanner in;\n try {\n in = new Scanner(new FileInputStream(\"File.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File 'File.txt' not found\");\n return;\n }\n while ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all the shifts associated with a given company
@SuppressWarnings("unchecked") public static List<Work_Shift> getShifts(DynaValidatorForm form, String companyCode, int rowsperpage, int currpage) { Session sess = null; try { sess = HibernateWrapper.getSession().openSession(); Criteria cri = sess.createCriteria(Work_Shift.class); cri.createCriteria("comp...
[ "@SuppressWarnings(\"unchecked\")\n\tpublic static List<Work_Shift> getShifts(String companyCode, String locale, int rowsperpage, int currpage) {\n\t\tSession sess = null;\n\t\ttry {\n\t\t\tsess = HibernateWrapper.getSession().openSession();\n\t\t\tCriteria cri = sess.createCriteria(Work_Shift.class).add(Restrictio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the extension point registry used by this node.
public ExtensionPointRegistry getExtensionPointRegistry() { return runtime.getExtensionPointRegistry(); }
[ "public ExtensionRegistry getExtensionRegistry();", "public Map<String, String> getExtensions() {\n\t\treturn Collections.unmodifiableMap(this.extensions);\n\t}", "List<ExpressionBucket> getExtensionProviders();", "List<NavigatorExtension> getExtensions();", "public String extensionPoints() {\n read_if_n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the eastern boundary.
public void setEast(int east) { mEast = east; }
[ "public void setEast(Room neighbour) {\n this.east = neighbour;\n }", "public void setGoesEast(boolean goesEast) {\n this.goesEast = goesEast;\n }", "protected abstract void setBoundaries();", "public void xsetEastBL(org.apache.xmlbeans.XmlDouble eastBL)\n {\n synchronized (monit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the username of this registration.
@Override public void setUsername(String username) { _registration.setUsername(username); }
[ "public void setUsername(String value) {\r\n username = value;\r\n }", "public final void setUsername(final String value) {\n username = value;\n }", "void setUsername(String username);", "public void setUsername(String username);", "public void setUsername(String value) {\n setAt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates and add a new menu item to the popup menu.
private JMenuItem addMenuItem(String label, javax.swing.Icon icon) { JMenuItem menuItem = new JMenuItem(label, icon); menuItem.addActionListener(this); menuItems.add(menuItem); popupMenu.add(menuItem); return menuItem; }
[ "public void addMenuItem(JMenuItem item){\r\n\t\tpopupMenu.add(item);\t\t\r\n\t}", "ModPopupMenu addMenuItem(String label, Action action);", "public void createItemListPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(addMenuItem);\n\t\tadd(editMenuItem);\n\t\tadd(deleteMenuItem);\n\t\tadd(moveUpMenuItem);\n\t\tadd(mo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An imlementation of this insterface is provided as a link to the Corus server that started this VM.
public interface Implementation { /** * Returns the corus process identifier corresponding to the VM. * * @return the dymamo process ID of this VM, or <code>null</code> * if this VM was not started by a corus server. */ public String getCorusPid(); /** * Returns the corus distribution name o...
[ "public RmeRemoteObject() {\r\n\t\tjava.net.InetAddress a = null;\r\n\t\ttry {\r\n\t\t\ta = java.net.InetAddress.getLocalHost();\r\n\t\t} catch (java.net.UnknownHostException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tHostPortEpid epid = (HostPortEpid)OrbAccessor.getEpid();\r\n\t\tepid.setHostName(a.getHost...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if record identified by identifier exists in Amazon S3.
@Override public boolean exists(DataIdentifier identifier) throws DataStoreException { long start = System.currentTimeMillis(); String key = getKeyName(identifier); ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread...
[ "public boolean existsKeyInS3(String inKey);", "public boolean existsKeyInS3(String inBucket, String inKey);", "public boolean existsKey(String bucket, String inKey);", "private boolean listingKeysOfAllTheObject(AmazonS3 s3, String file) {\n try {\n for (int i = 0; i < 1; i++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes rows using a SampletypeBean template.
public int deleteUsingTemplate(SampletypeBean pObject) throws SQLException { if (pObject.isSampletypeidInitialized()) return deleteByPrimaryKey(pObject.getSampletypeid()); Connection c = null; PreparedStatement ps = null; StringBuffer sql = null; try ...
[ "@Override\n\tpublic void deleteSample(Long id) {\n\t\tQuery q = sessionFactory.getCurrentSession().createQuery(\"delete from Sample where sampleId in (:id) \");\n\t\tq.setLong(\"id\", id);\n\t\tq.executeUpdate();\n\t\t\n\t}", "void deleteTemplate(SourceBundle bundle) {\n\t\ts3Client.deleteObject(bundle.getBucket...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log the request automatically called by processRequest()
abstract protected void logRequest();
[ "private void writeToLog(Request request) {\n requestLogger.addLog(request.getRequestLine());\n }", "void enableRequestLogging();", "private void debugLogRequest(final Request request) throws IOException {\n final var requestCopy = request.newBuilder().build();\n final var buffer = new B...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column CTSTRS_EFF_PCS.TRS_NO
public void setTRS_NO(BigDecimal TRS_NO) { this.TRS_NO = TRS_NO; }
[ "public void setCTS_TRS_NO(BigDecimal CTS_TRS_NO) {\r\n this.CTS_TRS_NO = CTS_TRS_NO;\r\n }", "public void setSVC_SNO(String sVC_SNO) {\r\n\tSVC_SNO = sVC_SNO;\r\n}", "public void setSCRSNo(String sCRSNo) {\n this.sCRSNo = sCRSNo;\n }", "public void setSL_NO(BigDecimal SL_NO) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the angle of the robot as a Rotation2d.
public Rotation2d getAngle() { // Negating the angle because WPILib gyros are CW positive. return Rotation2d.fromDegrees(-RobotContainer.navx.getAngle()); }
[ "double angle(){\r\n\t\t//Math.atan2 The method Converts rectangular coordinates (x, y) \r\n\t\t//to polar coordinate (r, theta) and returns theta.\r\n\t\t\t\treturn Math.atan2(i,r);\r\n\t}", "public double getRotationAngle();", "public double getRotation() {\n return Degrees.atan2(y, x);\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DorogovtsevMendesGenerator gen = new DorogovtsevMendesGenerator(); Graph graph = new DefaultGraph("Prim Test");
public static void main(String... args) { GrafoMatriz graph = new GrafoMatriz(4, true); graph.agregarArista(0, 2, -2); graph.agregarArista(2, 3, 2); graph.agregarArista(3, 1, -1); graph.agregarArista(1, 0, 4); graph.agregarArista(1, 2, 3); Graph graphstre...
[ "public GraphGenerator(){\r\n\t}", "public Graph generate();", "public void buildGraph(){\n\t}", "public DirectedGraphTest()\r\n {\r\n }", "@Before\n public void setUp() {\n predSents = new AnnoSentenceCollection();\n goldSents = new AnnoSentenceCollection();\n AnnoSentence pre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
float to store radius of sphere
public Sphere(float radius) { this.radius = radius; }
[ "public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}", "public float getSphereRadius();", "public static double sphereVolume(double radius) \n {\n return 4.0 / 3.0 * Math.PI * Math.pow(radius, 3);\n }", "public double getEquivalentSphereRadius() {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "effectLst" element
public void setEffectLst(org.openxmlformats.schemas.drawingml.x2006.main.CTEffectList effectLst) { synchronized (monitor()) { check_orphaned(); org.openxmlformats.schemas.drawingml.x2006.main.CTEffectList target = null; target = (org.openxmlformats.schemas.drawing...
[ "public void setEffectLst(org.openxmlformats.schemas.drawingml.x2006.main.CTEffectList effectLst)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTEffectList target = null;\n target = (org.openxmlformats.sche...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if the reference to cart is null
@Test(expected = NullReferenceException.class) public void setCartIsNull() throws NullReferenceException { cartItem.setCart(null); }
[ "@Test\n public void addToCartAddNullToCart() {\n cart.addToCart(null);\n assertEquals(1, cart.viewCart().size());\n }", "@Test\n public void removeFromCartNull() {\n cart.addToCart(null);\n cart.removeFromCart(null);\n assertEquals(0,cart.viewCart().size());\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an aliased PackageDeals.RoomOfferingRateOverrides table reference
public Roomofferingrateoverrides(String alias) { this(alias, ROOMOFFERINGRATEOVERRIDES); }
[ "public Roomofferingrateoverrides() {\n this(\"RoomOfferingRateOverrides\", null);\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getProductWithdrawalExpensesAndLiabilityIncrdLimitTableAssignmentOverride();", "public void setProductWithdrawalExpensesAndLiabilityIncrdLimitT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for recdate
public void setRecdate(java.sql.Timestamp newValue) { this.recdate = newValue; }
[ "public void setDateRecruitment(Date dateRecruitment);", "public Date getRecdate() {\n return recdate;\n }", "public void setRecTime(Date recTime) {\n this.recTime = recTime;\n }", "public void setRemindDate(Date remindDate);", "public void setRegdate(java.sql.Timestamp newVal) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a Journal[] of all entries.
public Journal[] getAllEntriesAsArray(){ List<Journal> entries = getAllEntries(); Journal[] entryArray = new Journal[entries.size()]; for(int i=0 ; i<entries.size() ; i++){ Journal entry = entries.get(i); entryArray[i] = entry; } return entryA...
[ "public List<Journal> getAllEntries() {\n \n open();\n \n List<Journal> entryList = new ArrayList<Journal>();\n \n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_DATA;\n Cursor cursor = database.rawQuery(selectQuery, null);\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get mean of the raw data item ranges
public double rawMeanOfItemRanges(){ return rawItemRangesMean; }
[ "public double rawRangeOfItemMeans(){\n return rawItemMeansRange;\n }", "public double standardizedMeanOfItemRanges(){\n return standardizedItemRangesMean;\n }", "public double standardizedRangeOfItemMeans(){\n return standardizedItemMeansRange;\n }", "public double rawMeanOfItem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads line, constructs iris, adds to training set
private void parseLine(String line) { String[] s = line.split(" "); if (s.length != 5) { //System.err.println("Line is not parsable... skipping line..."); return; } double sl = Double.parseDouble(s[0]); double sw = Double.parseDouble(s[1]); double pl = Double.parseDouble(s[2]); double pw =...
[ "public void readTrainingFile() {\n\t\ttry {\n\t\t\tFile file = new File(trainingFile);\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tSystem.out.print(\"Read training data >>>\\t\");\n\t\t\t// read first line to get attribute names\n\t\t\tString line = reader.readLine();\n\t\t\t// ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
loads "Modify Part" form when the Modify button is pressed for parts if an item from the Parts table is selected
@FXML private void modifyPartAction() throws IOException { if (!partsTbl.getSelectionModel().isEmpty()) { Part selected = partsTbl.getSelectionModel().getSelectedItem(); partToMod = selected.getId(); generateScreen("AddModifyPartScreen.fxml", "Modify Part")...
[ "@FXML\n\tprivate void handleModifyPart() {\n\t\tPart existingPart = partTable.getSelectionModel().getSelectedItem();\n\t\tmainApp.showPartDialog(existingPart);\n\t}", "public void handleModifyParts()\n {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/UI/Views/parts.fxml\"));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the orientation of the figure should be persisted.
public boolean hasOrientation() { return orientation != DEFAULT_ORIENTATION; }
[ "@Override\n public boolean isKeepsOrientation() {\n return keepsOrientation;\n }", "public boolean isOrientationCorrected() {\n\t\treturn orientationCorrection;\n\t}", "boolean getNoOrientation();", "boolean preserveOrientationOnResize() {\n return mResizeMode == RESIZE_MODE_FORCE_RESIZAB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resets the value of blackScore
public void resetBlackScore() { blackScore = 0; }
[ "public void resetWhiteScore() {\n\t\twhiteScore = 0;\n\t}", "public void resetScore(){\n\t\t\tscore = 0;\n\t\t}", "public void resetScore(){\n score=0;\n }", "public void reset()\n {\n currentScore = 0;\n }", "public void reset() {\r\n currentScore = 0;\r\n }", "public void reset() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allows the statically defined flags to be controlled in a test. Returns a Replacer instance to be used with e.g. a trywithresources block. Within the block, the flags starts out as cleared. Flags can be defined, etc. When leaving the block, the flags from before the block is reinserted. NOT threadsafe. Tests using this...
public static Replacer clearFlagsForTesting(FlagId... flagsToKeep) { return new Replacer(flagsToKeep); }
[ "@Test\r\n\tpublic void testClearFlags_fixture18_1()\r\n\t\tthrows Exception {\r\n\t\tGamePieceSAN fixture = getFixture18();\r\n\r\n\t\tfixture.clearFlags();\r\n\r\n\t\t// add additional test code here\r\n\t}", "@Test\r\n\tpublic void testClearFlags_fixture28_1()\r\n\t\tthrows Exception {\r\n\t\tGamePieceSAN fixt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
true if they are the same scope, or if nick was requested and the scope is USER (because both have a nick...)
public boolean scope(Scope s) { return this.scope == s || ( s == Scope.NICK && this.scope == Scope.USER); }
[ "public boolean isOwner(Uuid user) {\r\n\tif(userLevels.get(user) != null) {\r\n\t return userLevels.get(user) >= 2;\r\n\t}\r\n\treturn defaultPermission >= 2;\r\n }", "@Override\n public String checkScopesPolicy(String scope) {\n LOGGER.debug(\"Checking scopes policy for: \" + scope);\n\n Scop...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Join to the JTA transaction. Note that the underlying meaning of joining in JTA environments is to register the RegisteredSynchronization with the JTA system
private void joinJtaTransaction() { if ( synchronizationRegistered ) { throw new TransactionException( "Hibernate RegisteredSynchronization is already registered for this coordinator" ); } jtaPlatform.registerSynchronization( new RegisteredSynchronization( getSynchronizationCallbackCoordinator() ) ); getSyn...
[ "private void joinSynchronization()\n throws IOException, TimeoutException, InterruptedException {\n Message sync = MessageBuilder.buildSyncHistory(persistence.getLatestZxid());\n sendMessage(this.electedLeader, sync);\n MessageTuple tuple =\n filter.getExpectedMessage(MessageType.SYNC_HISTORY_RE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses nextText as a Long.
public static Long nextLong(final XmlPullParser parser) throws XmlPullParserException, IOException { final String text = nextNillableText(parser); if (text == null) { return null; } return Long.valueOf(text); }
[ "public long nextLong()\r\n {\r\n if(st == null || !st.hasMoreTokens())\r\n newst();\r\n return Long.parseLong(st.nextToken());\r\n }", "public long nextLong()\r\n\t{\r\n\t\tif(st == null || !st.hasMoreTokens())\r\n\t\t\tnewst();\r\n\t\treturn Long.parseLong(st.nextToken());\r\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes jMenuItemPersonalizarReporte
private JMenuItem getJMenuItemPersonalizarReporte() { if (jMenuItemPersonalizarReporte == null) { jMenuItemPersonalizarReporte = new JMenuItem(); jMenuItemPersonalizarReporte.setText("Personalizar reporte"); jMenuItemPersonalizarReporte .addActionListener(new java.awt.event.ActionListener() { ...
[ "private JMenu getJMenuReportePersonalizado() {\r\n\t\tif (jMenuReportePersonalizado == null) {\r\n\t\t\tjMenuReportePersonalizado = new JMenu();\r\n\t\t\tjMenuReportePersonalizado.setText(\"Consulta Personalizadas\");\r\n\t\t\tjMenuReportePersonalizado.add(getJMenuItemConsultaPersonalizada());\r\n\t\t}\r\n\t\tretu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion region Intent handling Handle launch intent. If it is an UL intent then event will be dispatched to the JS side.
private void handleIntent(Intent intent) { if (intent == null) { return; } // read intent String action = intent.getAction(); Uri launchUri = intent.getData(); // if app was not launched by the url - ignore if (!Intent.ACTION_VIEW.equals(action) || l...
[ "protected void onLaunchIntentReceived(Intent in_intent) {}", "public void dangerousLaunchClicked(View view) {\n Intent myIntent = new Intent();\n myIntent.setAction(\"qa.edu.qu.cse.cmps497.implicitintentslave.ACTION_LAUNCH\");\n if (myIntent.resolveActivity(getPackageManager())!=null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for Translator.
public void setTranslator(String value) { setAttributeInternal(TRANSLATOR, value); }
[ "@Override\n\tpublic void setValue(String value) {\n\t\t_translation.setValue(value);\n\t}", "Builder addTranslator(String value);", "public void setTranslator(Translator translator)\r\n {\r\n this.translator = translator;\r\n }", "public void setbiboTranslationof(Document value) {\n\t\tBase.set(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an IdentityKernel and prints it on standard output.
public static void main(String[] argv) { int w = 3, h = 3; if (argv.length > 1) { w = Integer.parseInt(argv[0]); h = Integer.parseInt(argv[1]); } StandardKernel kernel = new IdentityKernel(w, h); kernel.write(new java.io.OutputStreamWriter(System.out)); }
[ "public IdentityKernel() {\n this(3, 3);\n }", "public IdentityKernel(int w, int h) {\n super(w, h, createKernelData(w, h), 0);\n }", "public void startNewKernel (String nodeId) {\n Runnable task = () -> {\n Kernel k = new Kernel(nodeId, this);\n\n kernels.put(nodeId...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column tbl_driver_base_info.emergency_contact_phone_number
public String getEmergencyContactPhoneNumber() { return emergencyContactPhoneNumber; }
[ "public java.lang.String getContactPhoneNumber()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTACTPHONENUMBER$0, 0);\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if this list contains a box that matches with (equals) a specific box object Returns true if this list contains findBox, false otherwise
public boolean contains(Box findBox) { LinkedBoxNode runner = head; while (runner != null) { if (runner.getBox().equals(findBox)) { return true; } runner = runner.getNext(); } return false; }
[ "private boolean contains(List<Box> boxes, int id){\n for(Box box : boxes){\n if(box.getId()==id){\n return true;\n }\n }\n return false;\n }", "private boolean containsObject(ArrayList<GameObject> objectList, GameObject object) {\n\n // Iterate ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the options pane as a OptionDialog, if the user chooses OK, verify that the file name for loading is not empty and corresponds to an existing file.
public boolean showOptionDialog() { MainFrame instance = MainFrame.getInstance(); theFile = null; while (true) { int returnValue = JOptionPane.showOptionDialog(instance, this, "Load/Import Ontology", JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, MainFrame.getIc...
[ "@FXML\n private void showOptionsDialog(ActionEvent event) {\n final var loader = new FXMLLoader(SlideshowFXController.class.getResource(\"/com/twasyl/slideshowfx/fxml/OptionsView.fxml\"));\n try {\n final Parent optionsView = loader.load();\n Themes.applyTheme(optionsView, Gl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleJvmTypeReference" $ANTLR start "ruleJvmTypeReference" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1878:1: ruleJvmTypeReference : ( ( rule__JvmTypeReference__Alternatives ) ) ;
public final void ruleJvmTypeReference() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:1882:2: ( ( ( rule__JvmTypeReference__Alternatives ) )...
[ "public final void ruleJvmTypeReference() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1770:2: ( ( ( rule__JvmTyp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
That method returns the list of intra users waiting to be accepted or rejected by the logged in intra user
@Override public int getIntraUsersWaitingYourAcceptanceCount() { //TODO: falta que este metodo que devuelva la cantidad de request de conexion que tenes try { if (getActiveIntraUserIdentity() != null){ return getIntraUsersWaitingYourAcceptance(getActiveIntraUserIdentity(...
[ "public User[] getMyRequestedInUsers() {\n List<FullUser> inUserRequestList;\n\n try {\n inUserRequestList = baseRepository.<FullUser>edgeRequestQueries().getToEdgeRequests(this.getUsername(), EdgeRequestQueries.CREATOR.TO);\n } catch (IOException e) {\n throw new ApiExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Skriver studenternas namn samt kursbetyg till filen betygsfil
public static void skrivBetygsfil (List < Student > list, File betygsfil) throws IOException { // skriv kod for filskrivning har //Skriver över filen med de nya betygen //Kollar ifall överskrivningen av filen går till korrekt try { BufferedWriter wr =...
[ "public void lesArkivFraFil(String filnavn) throws Exception {\n\t\tScanner fil = new Scanner(new File(filnavn));\n\n\t\t/*\n\t\t * Leser filen som en tilstandsmaskin med følgende gyldige tilstander:\n\t\t * \n\t\t * State 0: Leser navn, har ikke passert første bindestrek\n\t\t * State 1: Leser ett navn i forkant a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assigns a new resolution. This is a mutable operation that replaces existing state.
public void assignResolution(Optional<Resolution> resolution) { dimensions = dimensions.duplicateChangeResolution(resolution); }
[ "public void setResolution(java.lang.Object resolution) {\n this.resolution = resolution;\n }", "public void assignResolver(Staff resolver, Date deadline)\n {\n /* Assigns the local variables to the instance variables */\n this.resolver = resolver;\n this.deadline = deadline;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Send Private Message as Notification without event and require userId with message as Embed or String
public void sendPrivateNotificationById(String message, String userId) { configure(); jda.retrieveUserById(userId).queue(user -> { user.openPrivateChannel().queue(privateChannel -> { privateChannel.sendMessage(message).queue(); }); }); }
[ "public void sendPrivateNotification(String message, User user) {\n configure();\n user.openPrivateChannel().queue(privateChannel -> {\n privateChannel.sendMessage(message).queue();\n });\n }", "public void sendPrivateMessage(MessageEmbed message, PrivateMessageReceivedEvent eve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleComparativeExpr" $ANTLR start "ruleComparativeExpr" PsiInternalPaplj.g:1010:1: ruleComparativeExpr returns [Boolean current=false] : (this_AdditiveExpr_0= ruleAdditiveExpr ( ( ( () otherlv_2= '==' ) | ( () otherlv_4= '!=' ) | ( () otherlv_6= '<' ) ) ( (lv_right_7_0= ruleAdditiveExpr ) ) )? ) ;
public final Boolean ruleComparativeExpr() throws RecognitionException { Boolean current = false; Token otherlv_2=null; Token otherlv_4=null; Token otherlv_6=null; Boolean this_AdditiveExpr_0 = null; Boolean lv_right_7_0 = null; try { // PsiInterna...
[ "public final Boolean entryRuleComparativeExpr() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleComparativeExpr = null;\n\n\n try {\n // PsiInternalPaplj.g:1003:57: (iv_ruleComparativeExpr= ruleComparativeExpr EOF )\n // PsiInternalPaplj.g:1004...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs a specific repetition. This is for internal class use.
private Repetition runRepetition(int repetitionNumber) { // Housekeeping, get our random digits set up int[] randoms = randomSet.generate(); Repetition repetition = new Repetition(); // Run outcomes on each digit and increment each outcome's frequency if necessary for (int rando...
[ "Repetition createRepetition();", "public void run(int count) {\n for (int i = 0; i < count; i++) repetitions.add(runRepetition(i));\n }", "public void setRepetition(Integer repetition) {\n\t\tthis.repetition = repetition;\n\t}", "private void run() {\n switch (mode) {\n case FAST_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a program to print the area of a rectangle of sides 2 and 3 units respectively
public static void main(String[] args) { int side1=2,side2=3,area=0; //area of rectangle is side1*side2 area=side1*side2; System.out.println("Area of rectangle is: "+area+" Sq.Units"); }
[ "public static void printRectangle(int width, int height) {\n int rettangolo = 0;\n while (rettangolo < height) {\n printStars(width);\n rettangolo++;\n }\n System.out.println(); // linebreak\n }", "@Test\n public void testcalAreaRectangle1() {\n doub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if they mention a movie in their text
public boolean movieTitleChecker(String title) { for(Movie movieTitle: movieList) { if(title.toLowerCase().contains(movieTitle.getTitle().toLowerCase())) { return true; } } return false; }
[ "private boolean memeChecker(String currentText)\n\t{\n\t\tboolean foundAMeme = false;\n\t\tfor(String currentMeme: memeList);\n\t\t{\n\t\t\tCharSequence currentMeme = null;\n\t\t\tif(currentText.contains(currentMeme) || currentText.equalsIgnoreCase((String) currentMeme))\n\t\t\t{\n\t\t\t\tfoundAMeme = true;\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses a string as a processed string.
static public Expression parseString( String s, SourceLocation location ) { SourceReader in = SourceReaders.forString( s, location ); ProcessedStringTokenizer t = new ProcessedStringTokenizer( in, false ); return parsePString( t, location ); }
[ "protected abstract SimpleType doParseString(String s);", "ParseResult parseString(String code) throws ParserException, InvalidConfigurationException;", "public StringParser getStringParser();", "T parse(String s);", "public String process(String s);", "private void handleString() {\n while (peek()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set mapper with specific option.
public void setMapper(final ObjectMapper mapper) { this.mapper = mapper; }
[ "public abstract void setMapper(Mapper mapper);", "public void setMappingOption(String key, Object value) {\r\n options.put(key, value);\r\n }", "public void setMapper(Mapper mapper) {\n\t\n\t\t// Mise a jour du champ \"this.mapper\"\n\t\tthis.mapper = mapper;\n\t}", "@SuppressWarnings(\"unused\")\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__IntegerResource__Group__1" $ANTLR start "rule__IntegerResource__Group__1__Impl" ../hu.bme.mit.androtext.androres.ui/srcgen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1090:1: rule__IntegerResource__Group__1__Impl : ( '=' ) ;
public final void rule__IntegerResource__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:1094:1: ( ( '...
[ "public final void rule__IntegerResource__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:11...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assert that the two parameters are equal (in hashcode, equals and compareTo).
public static <T extends Comparable<T>> void comparedEqual(T a, T b) { if (a == null && b == null) { return; } else if (a == null || b == null) { fail("Not both null"); } else { boolean equals = a.equals(b); boolean hashCode = a.hashCode() == b.hashCode(); boolean compareTo = a...
[ "public void testEqualsMensajes_Diferentes_Nueva_Y_Clave_Mensaje_Mas_tres_parametros() {\n System.out.println(\"equals\");\n Object o = this.generarMensajeConClaveMensajeYTresParametros();\n Mensaje instance = new Mensaje();\n boolean expResult = false;\n boolean result = instance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get Contract effective End Date string
public static String getContractEffectiveEndDateString(Record record){ return record.getStringValue(CONTRACT_EFFECTIVE_END_DATE); }
[ "public static String getContractCommissionEndDateString(Record record){\r\n return record.getStringValue(CONTRACT_COMMISSION_EFFECTIVE_END_DATE);\r\n }", "public static String getEffectiveEndDateString(Record record){\r\n return record.getStringValue(EFFECTIVE_END_DATE);\r\n }", "public sta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor method for ID of Person B.
public int getPersonBID(){return personB.getID();}
[ "int getBId();", "public int getBId() {\n return BId;\n }", "public Integer getIdPerson() {\r\n return idPerson;\r\n }", "public Long getPersonaId();", "public Number getPersonId() {\n return (Number)getAttributeInternal(PERSONID);\n }", "public long getPersonId() {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the available sub classes.
private final Set<PlayerClass> getAvailableSubClasses(final L2PcInstance player) { int charClassId = player.getBaseClass(); if (charClassId >= 88) { charClassId = player.getClassId().getParent().ordinal(); } final PlayerRace npcRace = getVillageMasterRace(); final ClassType npcTeachType = getVilla...
[ "public Set<JClassType> getAllSubTypesOfClass() {\n\n Set<JClassType> result = new HashSet<>(directSubClasses);\n\n // Recursion stops, if the Set directSubClasses is empty\n for (JClassType directSubClass : directSubClasses) {\n result.addAll(directSubClass.getAllSubTypesOfClass());\n }\n\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ run: Read the orders from the specified file and process them.
private void run(String f) { int time = 0; Scanner scanner = null; // attempt to load file try { scanner = new Scanner(new File(f), "UTF-8"); } catch (NullPointerException e) { System.out.print("Bad file name."); System.exit(0); } cat...
[ "public static void main(String[] args) {\r\n\t\tnew OrderRecordUtility().processFile();\r\n\t}", "public static void main(String[] args) throws IOException \r\n\t {\r\n\t\t try {\r\n\t\t\t//Get ready to read the file specified in the args\r\n\t\t\t FileReader freader = new FileReader(args[0]);\r\n\t\t\t Buff...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shrink the local variable type info array.
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute) { localVariableTypeTableAttribute.u2localVariableTypeTableLength = shrinkArray(localVariableTypeTableAttribute.localVariableT...
[ "private int removeEmptyLocalVariableTypes(LocalVariableTypeInfo[] localVariableTypeInfos,\n int localVariableTypeInfoCount,\n int maxLocals)\n {\n // Overwrite all empty local...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assert that the specified listener has not received any event.
public void assertNoEventReceived(Identifiable listener) { assertNoEventReceived(listener.getId()); }
[ "public void assertNoEventReceived(String listenerId) {\n\t\tList<Object> events = this.content.getOrDefault(listenerId, Collections.emptyList());\n\t\tassertThat(events).as(\"Expected no events but got \" + events).isEmpty();\n\t}", "private void assertStreamItemViewHasNoOnClickListener() {\n assertFalse(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get saved sRectangle bound
public sRectangle getSavedSRectangleBound() { return savedSRectangleBound; }
[ "public void computeSRectangleBound()\n {\n this.savedSRectangleBound = getSRectangleBound();\n }", "public String getRectangleBounds() {\n checkAvailable();\n return impl.getRectangle();\n }", "public abstract Rectangle getSnapshotBounds();", "@Nullable\n Rectangle getCurrent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the prefix value for this RiskCheckPersonRequestType.
public java.lang.String getPrefix() { return prefix; }
[ "public String getPrefix() {\n return (String) getAttributeInternal(PREFIX);\n }", "@NotNull\n public String getPropertyPrefix ();", "public String getPrefix() {\n\t\treturn this.getNr().substring(0, Anacom.prefixLength);\n\t}", "String getPrefix();", "public String getPrefixString() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gdx.app.log("GameField::drawTowerUnderConstructionAndMarks()", " spriteBatch:" + /spriteBatch +/ " shapeRenderer:" + /shapeRenderer +/ " map:" + map + " templateForTower:" + templateForTower + " mainCell:" + mainCell + " startDrawCell:" + startDrawCell + " finishDrawCell:" + finishDrawCell);
private void drawTowerUnderConstructionAndMarks(SpriteBatch spriteBatch, ShapeRenderer shapeRenderer, int map, TemplateForTower templateForTower, Cell mainCell, GridPoint2 startDrawCell, GridPoint2 finishDrawCell) { TextureRegion textureRegion = templateForTower.idleTile.getTextureRegion(); int towerSiz...
[ "private void drawTowerUnderConstruction(SpriteBatch spriteBatch, ShapeRenderer shapeRenderer, int buildX, int buildY, TemplateForTower templateForTower, boolean enoughGold) {\n boolean drawFull = true;\n boolean canBuild = true;\n int towerSize = templateForTower.size;\n int startX = 0,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check billingResult process returned productDetailsList
public void onProductDetailsResponse(BillingResult billingResult, List<ProductDetails> productDetailsList) { if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) { if (!produc...
[ "public void onProductDetailsResponse(BillingResult billingResult,\n List<ProductDetails> productDetailsList) {\n if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a ManagementTemplateCollectionObject with a new object
@Nullable public ManagementTemplateCollectionObject post(@Nonnull final ManagementTemplateCollectionObject newManagementTemplateCollectionObject) throws ClientException { return send(HttpMethod.POST, newManagementTemplateCollectionObject); }
[ "@Nullable\n public ManagementTemplateCollectionObject put(@Nonnull final ManagementTemplateCollectionObject newManagementTemplateCollectionObject) throws ClientException {\n return send(HttpMethod.PUT, newManagementTemplateCollectionObject);\n }", "CollectionItem createCollectionItem();", "@Overri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method obtains the siblings and children of node and combines all these elements of similar degree recursively. It will also finds the "winner" amongst the nodes as determined by the compare() method and returns that node. This method restructures the tree.
protected Node<T> pairwiseCombine(Node<T> node) throws UnequalChildrenException { DoublyLinkedList<Node<T>> first = new DoublyLinkedList<Node<T>>(this.root); Node<T> returner = null; CustomVector<DoublyLinkedList<Node<T>>> commonDegrees = new CustomVector<DoublyLinkedList<Node<T>>>((Class<DoublyLinkedLis...
[ "private List<TrainingTreeNode> reorder_children(SeparatedChildren separatedChildren) {\n SortOrderComparator sortOrderComparator = new SortOrderComparator();\n if (separatedChildren.getCustomNodes() == null && separatedChildren.getDatabaseNodes() == null)\n return null;\n\n ArrayLis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the provided new node before the element selected by the xPath in the given node.
public static Node addBefore(final Node node, final String xPath, final Node newNode) throws Exception { Node after = selectSingleNode(node, xPath); assertNotNull("No node for xpath found [" + xPath + "]", after); Node parent = after.getParentNode(); parent.insertBefore(newNode, afte...
[ "public Node insertBefore(Node node);", "private Node insertBefore(E element, Node node) {\n \treturn new Node(node.pred, element);\n }", "public Node insertAfter(Node node);", "public void insertChildBefore(IRNode node, IRNode newChild, IRNode oldChild)\r\n throws IllegalChildException;", "void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the dataiList value for this MonthFeeQueryVO.
public void setDataiList(java.lang.Object[] dataiList) { this.dataiList = dataiList; }
[ "public void setDataList(ArrayList<Integer> dataList, int maxSize){\n this.dataList = dataList;\n this.mMaxSize = maxSize;\n }", "public void setFeeList(List<FeeComponent> feeList) {\r\n this.feeList = feeList;\r\n }", "public void setListDatentraeger( List<Datentraeger> listDatentrae...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the builds the.
public void setBuild(Build build) { this.build = build; }
[ "public void setBuild(int build)\r\n\t{\r\n\t\tthis.build = build;\r\n\t}", "private void setBuild(long value) {\n bitField0_ |= 0x00000004;\n build_ = value;\n }", "public synchronized void setBuildTo(int aBuildTo)\n {\n buildTo = aBuildTo;\n }", "public synchronized void setBuildFrom(i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds if PID is a program table.
public boolean isProgramTable(int pid) { boolean ret = programs.containsKey(pid); return ret; }
[ "boolean programExists(Id.Program id);", "public boolean isProgramActive(String programId);", "boolean isTable(int index);", "boolean hasHasPID();", "boolean isTableAvailable(String table);", "boolean hasStringTable();", "boolean hasWritingprogram();", "boolean hasApplicationProcessName();", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add a location given as parameter to the list of locations
public void addLocation(Location location) { locations.add(location); }
[ "public void addLocation(Location location)\n {\n locationLst.add(location);\n }", "void addLocation(String location);", "public void addLocations(List<Location> listOfLocation)\n {\n this.locationLst.addAll(listOfLocation);\n }", "public void addToLocations(entity.GL7Location elemen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .Protobuf.MonsterState Data = 2;
com.rpg.framework.database.Protocol.MonsterState getData(int index);
[ "java.util.List<? extends com.rpg.framework.database.Protocol.MonsterStateOrBuilder> \n getDataOrBuilderList();", "com.rpg.framework.database.Protocol.MonsterStateOrBuilder getDataOrBuilder(\n int index);", "com.protobuftest.protobuf.GameProbuf.Game.Ready getReady();", "com.zzsong.netty.protobuf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Navigates from an instance of PubDetailActivity to another of PubEventsActivity, passing the Pub object to look events by under PubEventsActivity.MODEL_KEY.
public static Intent fromPubDetailActivityToPubEventsActivity(final PubDetailActivity pubDetailActivity, @NonNull Pub pub) { Intent i = new Intent(pubDetailActivity, PubEventsActivity.class); i.putExtra(PubEventsActivity.MODEL_KEY, pub);...
[ "public static Intent fromEventPubsActivityToPubDetailActivity(final EventPubsActivity eventPubsActivity,\n @NonNull Pub pub) {\n\n Intent i = new Intent(eventPubsActivity, PubDetailActivity.class);\n i.putExtra(PubDetailActivity.PUB_MOD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds a new Criteria for the specified Alarm, and returns a Result object
@Security.Authenticated(Authenticate.class) public static Result postCriteria(Integer alarmId){ Query q= new Query(); RequestBody body= request().body(); ObjectNode obj = (ObjectNode) body.asJson(); if(alarmId == null) return badRequest("Invalid alarmId"); if(!instrumentCheck(alarmId, obj)) re...
[ "public boolean addAlarm(VAlarm newAlarm);", "void addAlarm(Alarm alarm);", "boolean addAlarm(WeatherAlarm alarm);", "void addAlarm(RecurringAlarm alarm) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ALERT_NAME, alarm....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
joiner = new JoinerPage(driver);
@Test(dataProvider = "JoinerData",dependsOnMethods ={"clicnNewJoinerButton"}) public void setupPersonalSection(String firstname,String lastname,String email,String username,String activateLicense,String jobtitle,String employmentStatus,String manager,String startDate,String contineousServiceDate,String addr1,String p...
[ "public KPAUIMemberServicesPage openMemberServicesPage() {\n sleep(1);\n getFooterLegalAndCustomerServiceContactUsLink().click();\n return new KPAUIMemberServicesPage(driver);\n}", "public KPAUIAwardsAndRecognitionPage openOurOrganizationAwardsAndRecognitionPage() {\n getFooterNavOurOr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Description: Verify visits per country data initally 'No data available' text displays
@Test(priority=9) public void verifyNodataAvailableunderVisitsperCountryInitially() throws Exception { OverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver); explicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement); Assert.assertTrue(getText(overviewObj.visitsPerCoun...
[ "private void checkManualVisit() {\n // scroll to number of visits\n onView(withId(R.id.tv_num_visits)).perform(scrollTo());\n // check number of visits is 1\n onView(withId(R.id.tv_num_visits)).check(matches(withText(String.valueOf(1))));\n\n checkLastVisitLabelAndText(date, time...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Simply checks if the given set of ValueType names contains a valid value type filter. Only aggregatable types are considered valid for this case.
public static void assertThatValueTypeFilterHasOnlyAggregatableTypes( Set<String> valueTypeNames, Set<String> filters) { if (CollectionUtils.isNotEmpty(valueTypeNames)) { List<String> aggregatableTypes = getAggregatables().stream().map(Enum::name).collect(toList()); for (String valueTyp...
[ "private boolean checkColumnTypes(ArrayList<String> types, ArrayList<Object> values) {\n boolean isType = true;\n for (int i = 0; i < values.size(); i++) {\n isType = this.isType(types.get(i), values.get(i));\n if (!isType) break;\n }\n return isType;\n }", "pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the user entered information to the FittingTraits and TraitWeights objects
private void saveToFile(){ ArrayList<Traits> theseTraits = new ArrayList<>(); ArrayList<Weights> traitWeights = new ArrayList<>(); ArrayList<ArrayList<Object>> cells = myTable.getTableCells(); ArrayList<String> columns = myTable.getColumns(); for(int r = 0; r<cel...
[ "private void saveFieldData() {\n pictureInfo.setDescription(descriptionJTextArea.getText());\n pictureInfo.setCreationTime(creationTimeJTextField.getText());\n pictureInfo.setImageLocation(new File(highresLocationJTextField.getText()));\n pictureInfo.setComment(commentJTextField.getText...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the unique identifier of the device. (e.g. MAC address)
void setDeviceID(String id);
[ "public void setIdmac(String value)\n {\n setAttributeInternal(IDMAC, value);\n }", "public abstract void setDeviceOwnerUid(int uid);", "void setIdentityGUID(String identity);", "public abstract void setUniqeIdentifier(int value);", "public String getDeviceUID();", "java.lang.String getDeviceid();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the content view to 0% opacity but visible, so that it is visible (but fully transparent) during the animation.
private void crossfade() { contentView.setAlpha(0f); contentView.setVisibility(View.VISIBLE); // Animate the content view to 100% opacity, and clear any animation // listener set on the view. contentView.animate() .alpha(1f) .setDuration(shortAnim...
[ "private void crossFade() {\n robotIv.setAlpha(0f);\n robotIv.setVisibility(View.VISIBLE);\n\n // Animate the content view to 100% opacity, and clear any animation\n // listener set on the view.\n robotIv.animate()\n .alpha(1f)\n .setDuration(1800)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluate x with the function
double evaluate(double x);
[ "public static double[] evaluateFunction(double[] x, Function<Double, Double> f) {\n\t\tdouble[] y = new double[x.length];\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\ty[i] = f.apply(x[i]);\n\t\t}\n\t\treturn y;\n\t}", "@Override\r\n\tpublic double eval(double x) {\t\t\r\n\t\treturn polySpline.value(x);\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Erzeugt einen InputStream aus der workflows.xml und der forms.xml aus dem gleichen Verzeichnis.
private InputStream getWorkflowsInputstream(File file) { //workflows aus dem gleichen Verzeichnis öffnen! String strFile = file.toString().substring( 0, file.toString().lastIndexOf("forms.xml")); strFile = strFile.concat("workflows.xml"); InputStream wfInputstream = null; try { wfIn...
[ "private InputStream getFormsInputstream(File file) {\r\n\r\n\t\t//forms aus dem gleichen Verzeichnis öffnen!\r\n\t\tString strFile =\r\n\t\t\tfile.toString().substring(\r\n\t\t\t\t0,\r\n\t\t\t\tfile.toString().lastIndexOf(\"workflows.xml\"));\r\n\r\n\t\tstrFile = strFile.concat(\"forms.xml\");\r\n\t\tInputStream f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }