query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Normalize data in a sequence to a floatarray2D with range from 0 to 1
final static public FloatArray2D SequenceToFloatArray2DNormalize(final Sequence seq) { FloatArray2D fa = SequenceToFloatArray2D(seq); FloatArray2D fa_normalized = fa.clone(); List<Float> list = Arrays.asList(ArrayUtils.toObject(fa.data)); float min = Collections.min(list); float max = Collections.max(li...
[ "double[] normalize(double[] data);", "final static public void normalize( final float[] data )\n\t{\n\t\tfloat sum = 0;\n\t\tfor ( final float d : data )\n\t\t\tsum += d;\n\n\t\tfor ( int i = 0; i < data.length; ++i )\n\t\t\tdata[ i ] /= sum;\n\t}", "int[][][] normalize(int[][][] img, int maxImg, int minImg);"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Search the tree for the shortest matching word
public TreeNode findShortest(String word) { return findShortest(word, 0); }
[ "public Node search(String word)\r\n { \r\n Node temp = root.getNext();\r\n \r\n for (int count = 0; count < size; count++)\r\n {\r\n if (temp.getWord().equals(word))\r\n {\r\n return temp;\r\n }\r\n \r\n temp = t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reconstructs a message from the given JSONArray.
public static Message fromJSON(JSONArray json){ String message = (String) json.get(0); long creationTime = (long) json.get(1); long visibleTime = (long) json.get(2); long id = (long) json.get(3); return new Message(message, visibleTime, creationTime, id); }
[ "public static List<Message> parseMessageJson(String messageJson) throws JSONException {\n List<Message> msgList = new ArrayList<>();\n if(messageJson != null){\n JSONArray arr = new JSONArray(messageJson);\n //Log.e(\"MESSAGE\", String.valueOf(arr));\n for (int i = 0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the type of Walker this is.
public final Type getWalkerType() { return walkerType; }
[ "protected abstract Class<? extends TreeStructure> getTreeType();", "public DrawerType getType() {\n\t\treturn mType;\n\t}", "public TargetType getType();", "public String type() {\n return getClass().getSimpleName();\n }", "public DijkstraType getType()\n\t{\n\t\treturn binding != null ? binding....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Perform the FVA optimization associated with FBA using the same SolverComponent
public void FVA( ArrayList< Double > objCoefs, Double objVal, ArrayList< Double > fbasoln, ArrayList< Double > min, ArrayList< Double > max, SolverComponent component ) throws Exception;
[ "private void optimize()\r\n\t{\r\n\t\tthis.alphaoptimize();\r\n\t\tthis.betaoptimize();\r\n\t}", "private void refreshObjectiveFunction(boolean ... bUpdateBest) throws SolutionFoundException{\n //DO NOT DELETE THESE LINES\n //<<\n //totalEvals++;\n totalRefEvals += this.vals_.size();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build call for getP2POrderMessageAttachmentURL
public com.squareup.okhttp.Call getP2POrderMessageAttachmentURLCall(Long id, Long fileId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map...
[ "protected String makeUrl() {\n\n String result = \"https://api.vk.com/method/\" + this.method + \"?\";\n\n Iterator it = this.params.entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry item = (Map.Entry) it.next();\n result += item.getKey() + \"=\" + item.getVal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the gestSource() method when the source property is defined in a hierarchical configuration.
@Test public void testGetSourceHierarchical() { setUpSourceTest(); assertEquals("Wrong source configuration", config .getConfiguration(CHILD1), config.getSource(TEST_KEY)); }
[ "@Test\n public void testGetSourceNonHierarchical()\n {\n setUpSourceTest();\n assertEquals(\"Wrong source configuration\", config\n .getConfiguration(CHILD2), config.getSource(\"another.key\"));\n }", "@Test(expected = IllegalArgumentException.class)\n public void testGet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Search for the value in the float array and return the index of the first occurrence from the end of the array.
public static int searchLast(float[] floatArray, float value, int occurrence) { // If the occurrence is less or equal to 0 or greater than the size of the array if(occurrence <= 0 || occurrence > floatArray.length) { throw new IllegalArgumentException("Occurrence must be greater or equal to...
[ "public static int search(float[] floatArray, float value) { \n // Search for the first occurrence in the array\n return LinearSearch.search(floatArray, value, 1);\n }", "public static int searchLast(float[] floatArray, float value) { \n // Search for the first occurrence in the array from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a ISearchResultChangedListener. Has no effect when the listener hasn't previously been added.
void removeListener(ISearchResultListener l);
[ "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public void removeChangeListener(ChangeListener listener) { _changeListeners.remove(listener); }", "void removeChangeListener(@NonNull ChangeListener listener);", "@Override\n public void removeListener() {\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Force Y' attribute. If the meaning of the 'Force Y' attribute isn't clear, there really should be more of a description here...
float getForceY();
[ "public double getYForce() {\n return netForceY;\n }", "String getForceYAsString();", "public double getYComponent()\r\n\t{\r\n\t\treturn this.m_Force.y;\r\n\t}", "public double getY() {\r\n return yValue;\r\n }", "@Test\n\tpublic void testGetY_Force() {\n\t\tassertEquals(yForce, message...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Truck by license list.
@GetMapping("/truck/license") List<TruckModel> truckByLicense(@RequestParam String license) { return truckRepository.findByLicenseOrderByTsDesc(license); }
[ "List<RawLicense> getRawLicenses();", "java.util.List<java.lang.String> getLicensesList();", "java.lang.String getLicenses(int index);", "@SuppressWarnings(\"unchecked\")\n public List<License> getAllLicensesConcise() {\n final Query<License> query = pm.newQuery(License.class);\n query.getFet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Function for loading in all the session data from a text file
public List<Session> loadSessionData() { List<Session> tempSessions = new ArrayList<Session>(); List<String[]> loadedData = new ArrayList<String[]>(); for (int i = 0; i < 12; i++) { String[] tempArr = loadFile("sessions" + i + ".txt"); loadedData.add(...
[ "public static Sessions loadSessions(String filePath){\n\t\ttry{\n\t\t\tJAXBContext jct = JAXBContext.newInstance(org.svv.acmate.model.sessions.ObjectFactory.class.getPackage().getName()\n\t\t\t\t\t, org.svv.acmate.model.sessions.ObjectFactory.class.getClassLoader());\n\t\t\tUnmarshaller m = jct.createUnmarshaller(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scan through org.w3c.dom.Element named statuses.
void visitElement_statuses(org.w3c.dom.Element element) { // <statuses> // element.getValue(); org.w3c.dom.NodeList nodes = element.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { org.w3c.dom.Node node = nodes.item(i); switch (node.getNodeType()) { ...
[ "void visitElement_status(org.w3c.dom.Element element) { // <status>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the allowable values.
public DocumentationAllowableValues getAllowableValues() { return allowableValues; }
[ "public String getAllowedValues () {\n return allowedValues;\n }", "@Schema(description = \"The allowed values, if applicable.\")\n public List<String> getAllowedValues() {\n return allowedValues;\n }", "public List<Integer> GetPossibleValues()\n {\n return this._valuesToPut;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column CTSTRS_HISTORY.FACILITY_REF
public BigDecimal getFACILITY_REF() { return FACILITY_REF; }
[ "public BigDecimal getFACILITY_REF()\r\n {\r\n\treturn FACILITY_REF;\r\n }", "public void setFACILITY_REF(BigDecimal FACILITY_REF)\r\n {\r\n\tthis.FACILITY_REF = FACILITY_REF;\r\n }", "public BigDecimal getFACILITY_NUMBER()\r\n {\r\n\treturn FACILITY_NUMBER;\r\n }", "private String getFacili...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add steps made out of metal plates leading to end of world.
private void addMetalPlateSteps() { // How many plates total? final int COUNT_OF_METAL_PLATES = 20; final int PLATES_PER_GROUP = 4; // Add groups of plates for (int i = 0; i < COUNT_OF_METAL_PLATES / PLATES_PER_GROUP; i += 1) { // Group of four metal plat...
[ "@Override\n\tprotected void end() {\n\t\tmyLowerArm.set(0.0);\n\t}", "public static void worldTimeStep() {\n\t\tlookingAfterDoTimeStep = false;\n\t\tregisterOldCoordinates();\n\t\tfor (Critter c : CritterWorld.getLivingCritters()) {\n\t\t\tc.doTimeStep();\n\t\t}\n\t\tlookingAfterDoTimeStep = true;\n\t\t\n\t\tpop...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para crear un nuevo paciente mediante los datos recibidos en el frontend
@Override public Paciente create(Paciente paciente) { return this.pacienteRepository.save(paciente); }
[ "Compuesta createCompuesta();", "OperacionColeccion createOperacionColeccion();", "public void crearCuentaAdmin() {\n if (todos().isEmpty()) {\n PersonaServicio persona = new PersonaServicio();\n persona.getPersona().setNombre(\"Franz Flores\");\n persona.getPersona().set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notification when a subpartition is released.
void onConsumedSubpartition(int subpartitionIndex) { if (isReleased.get()) { return; } int refCnt = pendingReferences.decrementAndGet(); if (refCnt == 0) { partitionManager.onConsumedPartition(this); } else if (refCnt < 0) { throw new IllegalStateException("All references released."); } LOG...
[ "public void onNoteReleased(Note note);", "Builder addReleasedEvent(PublicationEvent value);", "void onReleased(Session session);", "public void releaseClaim() throws CloudnameException {\n scheduler.shutdown();\n zkClient.deregisterListener(this);\n\n while (true) {\n final Tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column lz_dialset.Odds6
public void setOdds6(BigDecimal odds6) { this.odds6 = odds6; }
[ "public BigDecimal getOdds6() {\r\n return odds6;\r\n }", "public void setOdds5(BigDecimal odds5) {\r\n this.odds5 = odds5;\r\n }", "@Override\n public void setSym6(java.lang.Object sym6) throws G2AccessException {\n setAttributeValue (SYM_6_, sym6);\n }", "public void setOdds(Double ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds the passed metadata object to the cell with cellID cid. logs errors if the cell does not exist or the metadata type has not been registered. Calls metadataModification to alert listeners of change.
void addMetadata(CellID cid, Metadata metadata){ db.addMetadata(cid, metadata); metadataModification(cid, metadata); }
[ "void modifyMetadata(MetadataID mid, CellID cid, Metadata metadata){\n db.removeMetadata(mid);\n db.addMetadata(cid, metadata);\n metadataModification(cid, metadata);\n }", "<E extends CtElement> E putMetadata(String key, Object val);", "protected void cellAdded(ICell cell) {\n if (cell...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ ori: 1 2 3 4 5 number items to rotate: 2 expected result: 3 4 5 1 2
@Test public void rotateArray_rotateLeftTwoItems() { int[] nums = prepareInputArray(5); int[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 2); assertThat(rotatedArray[0], equalTo(3)); assertThat(rotatedArray[1], equalTo(4)); assertThat(rotatedArray[2], equalTo(5)); assertThat(rotatedArray[3], equalTo...
[ "public void rotate(ArrayList<ArrayList<Integer>> a) {\n int n=a.size();\n for(int i=0; i<n/2; i++) {\n for(int j=0; j<Math.ceil(n/2.0); j++) {\n int temp = a.get(i).get(j);\n a.get(i).set(j, a.get(n-1-j).get(i));\n a.get(n-1-j).set(i, a.get(n-1-...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XClosure__Group_1_0_0__0__Impl" $ANTLR start "rule__XClosure__Group_1_0_0__1" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8033:1: rule__XClosure__Group_1_0_0__1 : rule__XClosure__Group_1_0_0__1__Impl ;
public final void rule__XClosure__Group_1_0_0__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8037:1: ( rule__XClosure__Gr...
[ "public final void rule__XClosure__Group_1_0_0__1__Impl() 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:8048:1: ( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Patch a Genesys Cloud user's presence The presence object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the PURECLOUD source as the user's primary presence source. Option 2: Provide the presenceDefinition value. The 'id' is the only value required within the presenceDefin...
public ApiResponse<UserPresence> patchUserPresencesPurecloud(ApiRequest<UserPresence> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<UserPresence>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<UserPresence> re...
[ "public ApiResponse<UserPresence> patchUserPresence(ApiRequest<UserPresence> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<UserPresence>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPresence>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EventDef__Group__6" $ANTLR start "rule__EventDef__Group__6__Impl" InternalDsl.g:25663:1: rule__EventDef__Group__6__Impl : ( '}' ) ;
public final void rule__EventDef__Group__6__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:25667:1: ( ( '}' ) ) // InternalDsl.g:25668:1: ( '}' ) { // InternalDsl.g:25668:1: ( '}' ) // ...
[ "public final void rule__EventDef__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:25656:1: ( rule__EventDef__Group__6__Impl )\n // InternalDsl.g:25657:2: rule__EventDef__Group__6__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor given callId and a comparator.
public MessageLogList(String callId, Comparator<TracesMessage> comp) { super(comp); }
[ "public VoucherSorter(Comparator<TravelVoucher> comparator){\n this.comparator = comparator;\n }", "public SortCommand(Comparator<Record> comparator) {\n requireNonNull(comparator);\n this.comparator = comparator;\n }", "private MessageIDComparator() {}", "public SelectionSorter(Com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column perms.perms_t_staff_role.cl_blockup
public Short getClBlockup() { return clBlockup; }
[ "public Long getnBlockUserId() {\n return nBlockUserId;\n }", "public Long getBlockroomid()\n {\n return blockroomid; \n }", "public Byte getCustRole() {\n return custRole;\n }", "public Long getSdetBuserModify() {\n\t return sdetBuserModify;\n\t }", "public String getOi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This returns the constant prefix to denote whether Util.readAll() should read from a JAR or read from the file system. (The reason we made this into a "method" rather than a constant String is that it is used by Util.canon() which is called by many static initializer blocks... so if we made this into a static field of ...
public static String jarPrefix() { return File.separator + "$alloy4$" + File.separator; }
[ "String getResourceName() {\n if (!resourceNameKnown) {\n // The resource name of a classfile can only be determined by\n // reading\n // the file and parsing the constant pool.\n // If we can't do this for some reason, then we just\n // make the resourc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the value associated with the column: recipientDeletedFlag
@Column(name = "recipient_deleted_flag") public Boolean isRecipientDeletedFlag() { return this.recipientDeletedFlag; }
[ "public void setRecipientDeletedFlag(final Boolean recipientDeletedFlag) {\n\t\tthis.recipientDeletedFlag = recipientDeletedFlag;\n\t}", "public String getDeletedFlag() {\n return deletedFlag;\n }", "java.lang.String getDeleted();", "public BigDecimal getDeleteFlag() {\r\n return deleteFlag;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modify SampleIndex configuration. Automatically submit a job to rebuild the sample index.
public OpenCGAResult<Job> configureSampleIndex(String studyStr, SampleIndexConfiguration sampleIndexConfiguration, boolean skipRebuild, String token) throws CatalogException, StorageEngineException { return secureOperation("configure", studyStr, new...
[ "private void indexExperiment() {\n \n \t\tsynchronized(fIndexing) {\n \t\t\tif (fIndexing) {\n \t\t\t\t// An indexing job is already running but a new request came\n \t\t\t\t// in (probably due to a change in the trace set). The index\n \t\t\t\t// being currently built is therefore already invalid.\n \t\t\t\t// TO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reverseLookupUser1_ID Reverse Lookup JP_Line_User1_ID
private boolean reverseLookupJP_Line_User1_ID() throws Exception { int no = 0; StringBuilder sql = new StringBuilder ("UPDATE I_DataMigrationJP i ") .append("SET JP_Line_User1_ID=(SELECT C_ElementValue_ID FROM C_ElementValue p") .append(" WHERE i.JP_Line_UserElement1_Value=p.Value AND i.AD_Client_ID=p...
[ "private boolean reverseLookupJP_Line_User2_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t.append(\"SET JP_Line_User2_ID=(SELECT C_ElementValue_ID FROM C_ElementValue p\")\r\n\t\t\t.append(\" WHERE i.JP_Line_UserElement2_V...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form TelaSecundaria
public TelaSecundaria() { initComponents(); ArrayTexto(); btpara.setVisible(false); btresposta.setVisible(false); }
[ "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public frm_tutor_subida_prueba() {\n }", "public frm_registro_admision_ingreso_registro() {\n }", "public RazredForma() {\n initComponents();\n obrada = new ObradaRazred();\n setTitle(Aplikacij...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the element in the list which matches the object
private <T> T findActual(T matchingObject, List<? extends T> list) { T actual = null; for (T check : list) { if (check.equals(matchingObject)) { actual = check; } } return actual; }
[ "public E find(E obj){\n \t//calls contains to save from writing same code.\n \tif (contains(obj))\n\t return obj;\n\telse\n\t return null;\n\t}", "public static Object find (Object aObject, java.util.List aList)\n\t{\n\t\tint theIndex = indexOf(aObject, aList);\n\t\tif (theIndex == -1) return null;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ To do: implement sendRRequest method
public void sendRRequests() { }
[ "public Response sendRequest(Request r){\n int currTries = 0;\n Response response = null;\n ByteBuffer dataBuf = ByteBuffer.allocate(2000);\n Serializer.serializeObject(r, dataBuf);\n\n while (currTries < this.maxTries){\n currTries += 1;\n System.out.println...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the last added MenuHeader to the given header
private void setLastAddedHeader(MenuHeader header) { this.lastAddedHeader = header; }
[ "void addMenuHeader(MenuHeader menuHeader) {\r\n\t\tthis.getMenuBar().addMenuHeader(menuHeader);\r\n\t\tthis.setLastAddedHeader(menuHeader);\r\n\t}", "void addMenuItemToLastAddedHeader(MenuItem item) {\r\n\t\tif (this.getLastAddedHeader() != null) {\r\n\t\t\tthis.lastAddedHeader.getDropDownMenu().addMenuItem(item...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a custom JavaFx node example
@SuppressWarnings("checkstyle:magicnumber") private Parent createCustomExample() { Parent node; StackPane nodePane = new StackPane(); nodePane.setId("node"); nodePane.setStyle("-fx-background-color: white;"); StackPane pane = createColoredStackPane(); List<Node> paneChildren = pane.getChildren(); ...
[ "Node createNode();", "@FXML\n\tpublic void CreateNode(ActionEvent e) {\n\t\tgraph.node=true;\n\t\tgraph.edge=false;\n\t}", "TNode createTNode();", "VEXNode createVEXNode();", "private Node getExampleView() {\n Node base = new Node();\n base.setRenderable(exampleLayoutRenderable);\n Con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for property expSignStr.
public String getExpSignStr() { return expSignStr; }
[ "public void setExpSignStr(String expSignStr) {\n\t\tthis.expSignStr = expSignStr;\n\t}", "public Integer getExpSign() {\n\t\treturn expSign;\n\t}", "java.lang.String getSign();", "public String getSign() {\n return sign;\n }", "public String getWavesSignStr() {\n\t\treturn wavesSignStr;\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update last modified in local copy
protected void updateLocalFileLastModified() { if (lastModified != null) { File file = new File(getLocalPath()); file.setLastModified(lastModified.getTime()); } }
[ "public void updateDateModified() {\n dateModified = DateTime.now();\n }", "long getLastModifyTime();", "public long getLastModified();", "void setLastUpdatedTime();", "public void updateLastModified() {\n Context context = getContext();\n try {\n Date lastModified = new j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an empty file.
private File createEmptyFile() throws IOException { File file = new File(this.filePath); file.getParentFile().mkdirs(); file.createNewFile(); file.setExecutable(true, false); file.setReadable(true, false); file.setWritable(true, false); return file; }
[ "public static FilePath empty() {\n return EMPTY;\n }", "public File createEmptyFile(File n) {\n\t\t try {\r\n\t\t\t\t//System.out.println(nodeToString(node));\r\n\t\t\t\tPrintWriter writer = new PrintWriter(n, \"UTF-8\");\r\n\t\t\t\t//System.out.println(f.getAbsolutePath());\r\n\t\t\t\t\r\n\t\t\t\twrit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds an user from a given userId
public User findUserFromId(String userId){ return null; }
[ "public Account findUserID(int userId);", "UserAccount loadUserByUserId(String userId) throws UsernameNotFoundException;", "public UserEntity findByPrimaryKey(String userId) throws FinderException;", "public Users queryUserById(String userId);", "Users findByUserId(long id);", "User find(long id);", "Us...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ scaleIntensityData scaleIntensityData() the gene normalization operating on gene mid for sampleIdx where the data is ether extracted here or from the resetPipeline preanalysis. If the normalization is inoperative, then just return 0.0. The mid must be >=0 since 1 indicates an illegal gene. The midOK[mid] must be true...
public float scaleIntensityData(float rawIntensity, float rawBkgrd, int mid, int gid, int sampleNbr) { /* scaleIntensityData */ float val= 0.0F; /* [GNPP] you may comment out if not debugging. */ //val= gnpp.scaleIntensityData(rawIntensity, rawBkgrd, mid, gid, sampl...
[ "public float scaleIntensityData(float rawIntensity, int mid, int gid, int sampleNbr)\n { /* scaleIntensityData */\n float val= 0.0F;\n \n /* [GNPP] you may comment out if not debugging. */\n //val= gnpp.scaleIntensityData(rawIntensity, mid, gid, sampleNbr);\n \n return(val);\n }", "public abs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets accommodation offering search pipeline manager.
@Required public void setAccommodationOfferingSearchPipelineManager( final AccommodationOfferingSearchPipelineManager accommodationOfferingSearchPipelineManager) { this.accommodationOfferingSearchPipelineManager = accommodationOfferingSearchPipelineManager; }
[ "protected AccommodationOfferingSearchPipelineManager getAccommodationOfferingSearchPipelineManager()\n\t{\n\t\treturn accommodationOfferingSearchPipelineManager;\n\t}", "public void setParkManager(Employee employee) {\r\n\t\t\tint thisyear = Calendar.getInstance().get(Calendar.YEAR);\r\n\t \tint thismonth=Cal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete the caseType by id.
public void delete(Long id) { log.debug("Request to delete CaseType : {}", id); caseTypeRepository.delete(id); }
[ "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete TypeVehicule : {}\", id);\n typeVehiculeRepository.deleteById(id);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete LessonType : {}\", id);\n lessonTypeRepository.delete(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send a document to the treasury.
String sendDocument(String uniqueId, String type, byte[] document) throws XRoadServiceConsumptionException;
[ "public IppResponse sendDocument(URI printerURI, Path path, int jobId, boolean lastDocument) {\n CupsClient printerClient = new CupsClient(printerURI);\n return printerClient.sendDocument(printerURI, path, jobId, lastDocument);\n }", "DocumentServer publish(DocumentServerLogic logic, DocumentDeta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use SCLootMapGameEnterLevel.newBuilder() to construct.
private SCLootMapGameEnterLevel(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private CSLootMapGameEnter(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private SCLootMapReadyEnter(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the delete action.
public Action getDeleteAction () { return deleteAction; }
[ "ForeignKeyAction getDeleteAction();", "@SuppressWarnings(\"serial\")\r\n private Action getDeleteAction() {\r\n if (this.deleteAction == null) {\r\n String actionCommand = bundle.getString(DELETE_NODE_KEY);\r\n String actionKey = bundle.getString(DELETE_NODE_KEY + \".action\");\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getCandidateLists method. Method used to get and pass back a reference to the data class that holds the candidates that were considered to be frequent itemsets.
final public CandidateList getCandidateLists(){ return cl; }
[ "private Itemsets findCandidateItemsets() {\n\t\t\tItemsets candidateItemsets = new Itemsets();\n\t\t\tItemset[] frequentItemsetsArr = frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t\t\n\t\t\tfor (int i = 0; i < frequentItemsetsArr.length - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j < f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Relay GL beats to EP, GMs and joining LCs
void relayGLBeats(SnoozeMsg m) { // Get timestamp String gl = (String) m.getOrigin(); if ((glHostname == "" || glDead) && !gl.isEmpty()) { glHostname = gl; glDead = false; Logger.err("[MUL.relayGLBeats] GL initialized: " + glHostname); } if (gl...
[ "void relayGMBeats(GroupManager g, double ts) {\n String gm = g.host.getName();\n RBeatGMMsg m = new RBeatGMMsg(g, AUX.glInbox(glHostname)+\"-gmPeriodic\", gm, null);\n// m.send();\n// Test.gl.handleGMInfo(m);\n Logger.imp(\"[MUL.relayGMBeats] \" + m);\n\n // Send to LCs\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the y inicio.
public float getyInicio() { return yInicio; }
[ "public int y() {\r\n\t\treturn yCoord;\r\n\t}", "public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}", "public double getY() {\n return Y;\n }", "double getEndY();", "public static int getMinY() { return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the active workbench page.
public WorkbenchPage getPage() { return my_page; }
[ "public static IWorkbenchPage getActivePage() {\n\t\tIWorkbench wb = PlatformUI.getWorkbench();\t\t\n\t\tif(wb != null) {\n\t\t\tIWorkbenchWindow win = wb.getActiveWorkbenchWindow();\t\t\t\n\t\t\tif(win != null) {\n\t\t\t\tIWorkbenchPage page = win.getActivePage();\t\t\t\t\n\t\t\t\tif(page != null) {\n\t\t\t\t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
runs the reservation server process This process, get reservation requests, processes them and return results to clients Clients are servers that wishes to make book reservation on this server.
public void startReservationServer(LibraryServerImpl libraryServer, DatagramSocket reservationSocket) { try { new Thread(new ReservationServer(libraryServer, reservationSocket)).start(); } catch (SocketException e) { e.printStackTrace(); } this.logger.info("startReservationServer for " + institution ); }
[ "private static void reservationsPage() {\n System.out.println(\"\");\n System.out.println(\"==================\");\n System.out.println(\"* RESERVED BOOKS *\");\n System.out.println(\"==================\");\n resUI.reservations(sessionId);\n String input = \"\";\n w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'DEAL_PNT_FEAT_LN_CMNT_TXT' field.
public java.lang.CharSequence getDEALPNTFEATLNCMNTTXT() { return DEAL_PNT_FEAT_LN_CMNT_TXT; }
[ "public java.lang.CharSequence getDEALPNTFEATLNCMNTTXT() {\n return DEAL_PNT_FEAT_LN_CMNT_TXT;\n }", "public java.lang.CharSequence getPRPSLLNCMNTTXT() {\n return PRPSL_LN_CMNT_TXT;\n }", "public java.lang.CharSequence getPRPSLLNCMNTTXT() {\n return PRPSL_LN_CMNT_TXT;\n }", "public java.lang.C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a list of potential Relationship Types given a typeName and attempts to match the given targetType and originType to a Relationship Type in the list.
private void validateTypesByTypeByTypeName(Context c, String targetType, String originType, String typeName, String originRow) throws MetadataImportException { try { RelationshipType foundRelationshipType = null; List<RelationshipTyp...
[ "private RelationshipType matchRelationshipType(List<RelationshipType> relTypes,\n String targetType, String originType, String originTypeName) {\n return RelationshipUtils.matchRelationshipType(relTypes, targetType, originType, originTypeName);\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all the field values in the given test object with their corresponding field names.
protected Map<Object, String> getFieldValuesAndNames(Object testedObject) { Map<Object, String> result = new IdentityHashMap<Object, String>(); if (testedObject == null) { return result; } Set<Field> fields = getAllFields(testedObject.getClass()); for (Field fie...
[ "java.lang.String getFields();", "Map<String, String> getFields();", "public List<PropertyField> getFields(String key);", "private static <T> Field[] getFieldsObject(T object) {\n\t\treturn object.getClass().getDeclaredFields();\n\t}", "java.util.List<edu.stanford.slac.archiverappliance.PB.EPICSEvent.FieldV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setPersonalDetail method.
@Test public void testSetPersonalDetail() { instance.setPersonalDetail(personalDetail4); assertEquals(personalDetail4, instance.getPersonalDetail()); }
[ "@Test\r\n public void testGetPersonalDetail() {\r\n\r\n assertEquals(personalDetail, instance.getPersonalDetail());\r\n assertNull(instance15.getPersonalDetail());\r\n assertNull(instance16.getPersonalDetail());\r\n assertEquals(personalDetail, instance17.getPersonalDetail());\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the designated parameter to a Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.
public void setInt(int parameterIndex, int x) throws java.sql.SQLException { wrappedStatement.setInt(parameterIndex, x); saveQueryParamValue(parameterIndex, new Integer(x)); }
[ "void setInt(int parameterIndex, int x) throws SQLException;", "public void setInt(int parameterIndex, int x) throws SQLException {\n currentPreparedStatement.setInt(parameterIndex, x);\n\n }", "public void setInt(String name, Integer value) {\n parameters.get(name).setValue(value);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a node into a specyfic father, return the number of the new child, if the number is less that zero, then any child has been added.
public int addChild(DefaultMutableTreeNode father, DefaultMutableTreeNode child){ if( (father==null)||(child==null)) return -1; int count = father.getChildCount(); mModel.insertNodeInto(child, father, count); return count; }
[ "public void setfather(Person f) {\r\n\tif (this.father() != null) {\r\n\t\tPerson a= this.father();\r\n\t\ta.setnumChildren(a.numChildren()-1);\r\n\t}\r\n\tfather= f;\r\n\tf.setnumChildren(f.numChildren()+1);\r\n}", "int getChildCount();", "@Override\r\n public int attachChild(Spatial child) {\r\n ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to get how many songs are there
public int getSongCount() { return mSongs.size(); }
[ "public int getNumberOfSongs()\n {\n return songs.size();\n }", "public int getNumberOfSongs() {\n return numberOfSongs;\n }", "public int size()\n\t{\n\t\treturn numOfSongs;\n\t}", "public int numberOfSongs(){\n\t\tint i = 0;\n\t\tfor(Playable ele : this.playableList){\n\t\t\tif(ele in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new TSRowKeyToTSUID
public TSRowKeyToTSUID() { super(PVarchar.INSTANCE, "TSUID"); }
[ "public TSRowKeyToBytes() {\n\t\t\tsuper(PVarbinary.INSTANCE, \"TSUIDBYTES\");\n\t\t}", "public TSRowKeyToTSUID(final List<Expression> children) {\n\t\t\tsuper(PVarchar.INSTANCE, \"TSUID\", children);\n\t\t}", "java.lang.String getNewKeyUid();", "PrimaryKey createPrimaryKey();", "public abstract EntityId fr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the specified page with the associated permissions. Will acquire a lock and may block if that lock is held by another transaction. The retrieved page should be looked up in the buffer pool. If it is present, it should be returned. If it is not present, it should be added to the buffer pool and returned. If the...
public Page getPage(TransactionId tid, PageId pid, Permissions perm) throws TransactionAbortedException, DbException { Page ret = pageMap.get(pid); if (ret == null) { if (pageMap.size() == pageNumber) evictPage(); ret = Database.getCatalog().getDatabaseFile(pid.getTableId...
[ "public Page getPage(TransactionId tid, PageId pid, Permissions perm)\n throws TransactionAbortedException, DbException {\n // some code goes here\n if (bufferPool.containsKey(pid)) {\n return bufferPool.get(pid);\n } else {\n Page page = Database.getCatalog()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Generated Class Name' attribute. The default value is "software.amazon.awscdk.services.ec2.AmazonLinuxImage".
String getGeneratedClassName();
[ "public String getClassnameToUse()\r\n {\r\n return getSemanticObject().getProperty(bsc_classnameToUse);\r\n }", "@Override\n public com.gensym.util.Symbol getClassNameForClass() throws G2AccessException {\n java.lang.Object retnValue = getStaticAttributeValue (SystemAttributeSymbols.CLASS_NAME_)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DBServer__Group_12__0__Impl" $ANTLR start "rule__DBServer__Group_12__1" InternalMyDsl.g:12776:1: rule__DBServer__Group_12__1 : rule__DBServer__Group_12__1__Impl ;
public final void rule__DBServer__Group_12__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:12780:1: ( rule__DBServer__Group_12__1__Impl ) // InternalMyDsl.g:12781:2: rule__DBServer__Group_12__1__Impl { ...
[ "public final void rule__DBServer__Group_12__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12753:1: ( rule__DBServer__Group_12__0__Impl rule__DBServer__Group_12__1 )\n // InternalMyDsl.g:12754:2: rule__DBServer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Discovers client connectors in the classpath.
private void discoverClientConnectors(ClassLoader classLoader) throws IOException { registerHelpers(classLoader, classLoader .getResources(DESCRIPTOR_CLIENT_PATH), getRegisteredClients(), Client.class); }
[ "private void discoverConnectors() throws IOException {\n // Find the factory class name\n final ClassLoader classLoader = org.restlet.util.Engine\n .getClassLoader();\n\n // Register the client connector providers\n discoverClientConnectors(classLoader);\n\n // Reg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the current value of firePeriod from preferences
public double getFirePeriod() { firePeriod = firePeriodPrefAdapter.getDouble(); return firePeriod; }
[ "public void setFirePeriod(double firePeriod) {\n double oldFirePeriod = getFirePeriod();\n this.firePeriod = firePeriod;\n firePeriodPrefAdapter.setDouble(firePeriod);\n firePropertyChange(PROPERTYNAME_FIREPERIOD, oldFirePeriod, firePeriod);\n }", "long getPeriod();", "public int getConfiguredPeri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the composition of the function sin(10t) .
public static void main(String[] args) { SlingFunction f = new Sin( new Arithmetic('*', new Point(0, 10), new T())); System.out.println(f); }
[ "private static void sinPressed(String input) {\n\n Double tempValue = valueOf (input);\n System.out.println (tempValue);\n convertDecimalToString (Math.sin (tempValue));\n }", "E sin(final E n);", "public double sine()\n {\n return Math.sin( result );\n }", "public double...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface of operations that an object that owns a log can perform on that log. Really just a convenience method for looking up the classlevel logger.
public interface LogOwner { Logger getLogger(); }
[ "protected abstract Logger getMachineLog();", "public interface Logger {\n\n /**\n * Logs a message string at the specified severity level.\n * \n * @param level This is the severity level at which the message should be\n * logged.\n * @param msg This is the message string which should be included in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
public static native long KeysInterface_sign_invoice(long this_arg, byte[] invoice_preimage);
[ "Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage);", "public Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage) {\n\t\tlong ret = bindings.KeysInterface_sign_invoice(this.ptr, invoice_preimage);\n\t\tif (ret < 1024) { return null; }\n\t\tResult_RecoverableSignatureNoneZ r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieve metadata from frame handle \param[in] frame handle returned from a callback \param[in] frame_metadata the rs2_frame_metadata whose latest frame we are interested in \param[out] error if nonnull, receives any error that occurs during this call, otherwise, errors are ignored \return the metadata value Original s...
long rs2_get_frame_metadata(Realsense2Library.rs2_frame frame, int frame_metadata, PointerByReference error);
[ "int rs2_supports_frame_metadata(Realsense2Library.rs2_frame frame, int frame_metadata, PointerByReference error);", "Pointer rs2_get_frame_data(Realsense2Library.rs2_frame frame, PointerByReference error);", "PointerByReference rs2_get_frame_stream_profile(Realsense2Library.rs2_frame frame, PointerByReference ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an aliased public.member table reference
public Member(Name alias) { this(alias, MEMBER); }
[ "private static TableRef createAliasedTableRef( final TableMeta table,\n final String alias ) {\n return new TableRef() {\n public String getColumnName( String rawName ) {\n return alias + \".\" + rawName;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows to user all synonyms of a given word.
public String showSearchSynonym(String searchWord, ArrayList<String> words) { StringBuilder stringBuilder = new StringBuilder("Your word \"" + searchWord + "\" has " + words.size() + (words.size() == 1 ? " synonym:\n" : " synonyms:\n")); for (int i = 0; i < words.size(); i++) { ...
[ "public final ArrayList getSynonyms(final String word) {\n System.setProperty(\"wordnet.database.dir\", \"/commons/student/2014-2015/\"\n + \"Thema11/Mkslofstra/WordNet-3.0/dict\");\n ArrayList synonyms = new ArrayList<String>();\n if (word != null) {\n // Concatenate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assigns rating to app given by a user.
public void rate(User user, short rating) throws IllegalArgumentException{ Iterator<AppRating> ratedApps = appRating.iterator(); //checks is the user has already rated the app while(ratedApps.hasNext()) { AppRating thisApp = ratedApps.next(); if(thisApp.getApp().equals(this)) { if(thisApp.getUser().equ...
[ "public void setUserRating(String userRating) {\n this.userRating = userRating;\n }", "public static void addRatingToUser(User user, double rating) {\n user.updateRating(rating);\n }", "public void addRating(int userIndex, double rating) {\n if (!this.usersRatings.add(userIndex, rating))\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the list of team member IDs
public List<String> getTeamMembers() { return teamMembers; }
[ "private List<Integer> getHuntersMemberId(final int gameid, final int memberid) {\n if (gameid < 1) {\n throw new IllegalArgumentException(\"Game id is incorrect\");\n }\n\n List<Integer> members = null;\n try {\n members = templGame.queryForList(sql71, new Object[] { gameid, memberid }, Integ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ scenario : success scenario , customer list of same city returned successfully input : mock List class , stubbed list expectation : customer list having same city will be x displayed in postman
@Test public void test_allCustomerByLocation() { String city="Panji"; List<Customer> customerList = mock(List.class); when(customerService.viewCustomerList(city)).thenReturn(customerList); List<CustomerDetails> desiredList = mock(List.class); when(util.toDetailList(customerList)).thenReturn(desiredList); L...
[ "@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleLocation() {\n\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"bus\", \"A/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the scene to the register cars form/menu
@FXML private void loadRegisterView() throws Exception{ Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("registerCar.fxml")); Scene scene = new Scene(root); getPrimaryStage().setTitle("Welcome"); getPrimaryStage().setScene(scene); }
[ "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "private void doEncounter() {\n ApplicationController.changeScene(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns List of anomalies when 1. There is no usage of nozzles 2. There is no refuels on tanks. 3. There is delta on TotalCounter 4. There is delta on tankmeasures 5. if tankDelta == totalCounterDelta
public Map<Integer, Map<Date, Double>> checkPipes() { systemOutputFile.println("*************************************"); systemOutputFile.println("Checking system leakages..."); systemOutputFile.println("*************************************"); Map<Integer, HashMap<Date, Double>> totalCounterVolumeChanges...
[ "public Map<Integer, Map<Times, Double>> checkNozzles() {\r\n\t\tnozzleOutputFile.println(\"*************************************\");\r\n\t\tnozzleOutputFile.println(\"Checking nozzles\");\r\n\t\tnozzleOutputFile.println(\"*************************************\");\r\n\t\tMap<Integer, HashMap<Times, Double>> nozzleU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all the added emitters.
public List<Emitter> getEmitters() { return Collections.unmodifiableList(allEmitters); }
[ "public Enumeration getAllAppenders() {\n synchronized (myAppenders) {\n return myAppenders.getAllAppenders();\n }\n }", "public synchronized List<EventListener> getListeners() {\n \treturn listeners;\n }", "public Enumeration getAllListeners() {\r\n return this.elements...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new Additional models converter.
public AdditionalModelsConverter(ObjectMapperProvider springDocObjectMapper) { this.springDocObjectMapper = springDocObjectMapper; }
[ "@Bean\n\t@Lazy(false)\n\tAdditionalModelsConverter additionalModelsConverter() {\n\t\treturn new AdditionalModelsConverter();\n\t}", "public UserConverter() {\n }", "public ArtifactTechnologyConverter() {\n }", "public CategoryConverter() {\r\n }", "public IntegrationConverter() {\n entity ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the booelan value tapped to true. Units and Heroic support cards that are tapped cant interact this round.
public void tap() { tapped = true; }
[ "void setBrake(boolean isOn);", "public void setBallTouched(Ball ball)\n {\n ballTouched = ball;\n }", "public void setB(boolean bButton){\n\t\tif(Robot.getState() == State.AUTON)\n\t\t\tautonB = bButton;\n\t}", "private void isKarakterBonusable() {\n try {\n Bonusable bonusable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
List triples = client.triples("test", 10);
@Test public void test() { List<Triple> triples2 = client.triplesSubject("wiki", "hossein", null, null, 10000); }
[ "List<StringTriple> provideTriples(String propertyIri, int numberOfTriples);", "ArrayList<Triple> getTriplesByType(String type);", "public List<Tripulante> obtenerTripulantes();", "public abstract String viewTrips(List<Trip> tripList);", "default List<T> cloneTriples(List<T> triples) {\n var list = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles expiring the session.
private void onExpire() { if (isOpen()) { LOGGER.debug("Expired session: {}", id); this.id = 0; this.state = State.EXPIRED; closeListeners.forEach(l -> l.accept(this)); } }
[ "void sessionExpired();", "void expire(Session session);", "void sessionInactivityTimerExpired(DefaultSession session, long now);", "protected void processExpires() {\n\t\tlong timeNow = System.currentTimeMillis();\n\t\tString[] keys = null;\n\n\t\tif (!started) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tkeys ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets feature extraction parameters vector
public final void setFeatureExtractionParams(Vector oParams) { setParams(oParams, FEATURE_EXTRACTION); }
[ "public synchronized final void setFeatureExtractionParams(Vector poParams) {\n setParams(poParams, FEATURE_EXTRACTION);\n }", "public synchronized final void addFeatureExtractionParams(Vector poParams) {\n addParams(poParams, FEATURE_EXTRACTION);\n }", "public final void addFeatureExtractio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the set of colors for the middle arc of the WiFi icon
private Color[] getMiddleArcColors() { return getColorsForState(this.iconPartStates[1]); }
[ "private Color[] getInternalArcColors()\n {\n return getColorsForState(this.iconPartStates[2]);\n }", "private Color[] getExternalArcColors()\n {\n return getColorsForState(this.iconPartStates[0]);\n }", "private Color[] getCircleColors()\n {\n return getColorsForState(this.i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a collection of dudge.db.Language objects to a collection of String objects.
static public Collection<String> convertCollection(Collection<Language> langs) { Collection<String> stringCollection = new ArrayList<>(); for (Language l : langs) { stringCollection.add(l.getName()); } return stringCollection; }
[ "public static <T> List<String> stringList(Collection<? extends T> original ){\r\n\t\tList<String> rList = new ArrayList<String>();\r\n\t\tfor ( T t : original )\r\n\t\t\trList.add( t.toString() );\r\n\t\t\r\n\t\treturn rList;\t\t\r\n\t}", "public List<String> getLtrLanguages();", "@SuppressWarnings({ \"rawtype...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ addEdible Adds an edible to the db Parameters:
String addEdible(Edible edible);
[ "String updateEdible(String edibleToUpdate, Edible edible);", "public void addEducation(Education e) {\n ed.add(e);\n}", "private void addArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tQuotationDetailsDTO detail = new QuotationDetailsDTO();\n\t\ttry {\n\t\t\tdetail = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add correct answer to the array list
public void correctAnswers(String answer) { correctAnswers.add(answer); }
[ "private void addAnswer(){\n experts.get(experts_turn).add(current_question,channel.getAnswer());\n\n }", "public void addAnswer(Answer ans) {\n // TODO implement here\n }", "public void answerQuestion(int answer)\n {\n answers[index] = answer;\n }", "public abstract void addP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter method for the COM property "ColorSynchronizationEditability"
@DISPID(1611006095) //= 0x6006008f. The runtime will prefer the VTID if present @VTID(171) void colorSynchronizationEditability( boolean oActivated);
[ "@DISPID(1611006095) //= 0x6006008f. The runtime will prefer the VTID if present\n @VTID(170)\n boolean colorSynchronizationEditability();", "@DISPID(1611006091) //= 0x6006008b. The runtime will prefer the VTID if present\n @VTID(166)\n boolean colorSynchronizationMode();", "public boolean getColor2EditStat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the classes to be merged are in the same package, then we have no problem.
private boolean isSafeAccessAfterMerge(SootClass to, SootClass from){ if(to.getPackageName().equals(from.getPackageName())){ return true; } //Is the class to be merged package-private? if(SootUtils.isPackagePrivate(from)){ return false; } //Are a...
[ "public void testMPSModulesAreNotLoadingSameClasses() throws InvocationTargetException, InterruptedException {\n final MPSProject project = loadProject(MPS_CORE_PROJECT);\n assertNotNull(\"Can't open project \" + MPS_CORE_PROJECT, project);\n waitForEDTTasksToComplete();\n\n final MultiMap<String, LoadE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .estafette.ci.manifest.v1.EstafetteRelease releases = 7;
public java.util.List<? extends com.estafette.ci.manifest.v1.EstafetteReleaseOrBuilder> getReleasesOrBuilderList() { return releases_; }
[ "public java.util.List<com.estafette.ci.manifest.v1.EstafetteRelease> getReleasesList() {\n return releases_;\n }", "public com.estafette.ci.manifest.v1.EstafetteRelease.Builder addReleasesBuilder() {\n return getReleasesFieldBuilder().addBuilder(\n com.estafette.ci.manifest.v1.EstafetteRelease....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the model (document) region that is covered by the paint event's clipping region. If event is null, the model range covered by the visible editor area (viewport) is returned.
private IRegion computeClippingRegion(PaintEvent event) { if (event == null) { // trigger a repaint of the entire viewport int vOffset= getInclusiveTopIndexStartOffset(); if (vOffset == -1) return null; // http://bugs.eclipse.org/bugs/show_bug.cgi?id=17147 int vLength= getExclusiveBotto...
[ "public IRectangleBound getClipBound();", "public Rectangle getClipBounds(){\n Shape c = getClip();\n if (c==null) {\n return null;\n }\n return c.getBounds();\n }", "@Implement(VertexView.class)\r\n public Rectangle getRectangle ()\r\n {\r\n return section...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GENFIRST:event_jLabel19KeyPressed TODO add your handling code here:
private void jLabel19KeyPressed(java.awt.event.KeyEvent evt) { }
[ "private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {\n \n }", "private void jLabel83MousePressed(java.awt.event.MouseEvent evt) {\n }", "private void txtDniKeyReleased(java.awt.event.KeyEvent evt) {\n }", "private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new TestRow RecordBuilder by copying an existing Builder
public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder(org.apache.gora.cascading.test.storage.TestRow.Builder other) { return new org.apache.gora.cascading.test.storage.TestRow.Builder(other); }
[ "public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder(org.apache.gora.cascading.test.storage.TestRow other) {\n return new org.apache.gora.cascading.test.storage.TestRow.Builder(other);\n }", "public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder() {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints a table displaying specified columns, and checks the expected number of rows.
private void printTable(String table, String cols, String where, int expected) throws SQLException { int rows = 0; ResultSet rs = stmt.executeQuery("SELECT " + cols + " FROM " + table + " " + where); ResultSetMetaData rsmd = rs.getMetaData(); St...
[ "public void printTable() {\n System.out.println(formatForPrint(Arrays.toString(conditionNames)));\n for (int row = 0; row < rowCount; row++) {\n System.out.println(formatForPrint(Arrays.toString(inputMatrix[row])) + \" | \" + resultArray[row]);\n }\n }", "@Test\n public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the list item id for file by server relative url.
public ListenableFuture<String> getListItemIdForFileByServerRelativeUrl(String serverRelativeUrl) { final SettableFuture<String> result = SettableFuture.create(); String getListUrl = getSiteUrl() + "_api/Web/GetFileByServerRelativeUrl('%s')/ListItemAllFields?$select=id"; getListUrl = String.format(getListUrl...
[ "public long getIDfromItemwithURL(String url);", "public long getFileId();", "public int getIdFile()\n {\n return this.idFile;\n }", "String getURL(FsItem f);", "long getFileId(FileSystem fs, String path) throws IOException;", "public int GetLocalLittleIdofActionitem(){\r\n\t\tint action_id =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Binds the right click event handler.
private native void bindEventHandler(ComponentRightClickListener self, Element target) /*-{ target.oncontextmenu = function(event) { self.@twisted.client.events.ComponentRightClickListener::handleEvent(Lcom/google/gwt/dom/client/NativeEvent;)(event); return(false); }; }-*/;
[ "public void handleRightClick() {\r\n\t\tgetMatch().handleRightClickNear(player);\r\n\t\tuseRight();\r\n\t}", "public abstract void onRightClick(double x, double y, boolean release);", "abstract void onRightClick(int x, int y, boolean down);", "public void rightClick();", "default public void clickRight() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PropertyValueConstraint__ValueAssignment_2" $ANTLR start "rule__ConcreteType__TypeAssignment" ../org.iobserve.rac.constraint.ui/srcgen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5073:1: rule__ConcreteType__TypeAssignment : ( ( RULE_ID ) ) ;
public final void rule__ConcreteType__TypeAssignment() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5077:1: ( ( ( RULE_ID ...
[ "public final void ruleConcreteType() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:662:2: ( ( ( rule__ConcreteT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback to notify that kernal is about to stop.
public void onKernalStop(boolean cancel);
[ "protected void on_stop()\n {\n }", "@Override\n protected void onStop() {\n super.onStop();\n\n this.cb.onStop(this);\n }", "void stop() throws ListenerException;", "private void internalStop()\n {\n if (log.isDebugEnabled())\n {\n log.debug(m_logPrefix +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets only the image filename (without the directory path)
public String getImageFilename() { return imageFile.getName(); }
[ "public String getImageFileName()\r\n\t\t{\r\n\t\t\treturn imageFile.getFile().getName();\r\n\t\t}", "private String getImageFileName()\n\t{\n\t\t// TODO test if we can use titles because of spacing and possible unicode input from users.\n\t\t// POI currentPoi = this.blogs.getCurrent();\n\t\t// if (currentPoi.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the rules property: The rules of the web application firewall rule group.
public List<ApplicationGatewayFirewallRule> rules() { return this.rules; }
[ "public ArrayList<NetworkSecurityRule> getRules() {\n return this.rules;\n }", "public List<Rule> getRules() {\n return rules;\n }", "public Collection<OpenstackSecurityGroupRule> rules() {\r\n return Collections.unmodifiableCollection(rules);\r\n }", "public List<String> getRule...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the booking reference
@Override public BookingEvent getReference() { return this.reference; }
[ "public java.lang.String getBookingReference() {\r\n return bookingReference;\r\n }", "String getCustomerName(String bookingRef);", "public void setBookingReference(java.lang.String bookingReference) {\r\n this.bookingReference = bookingReference;\r\n }", "String getCcNr(String bookingRef)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of dropColumn method, of class Dataframe.
@Test (expected = BadArgumentException.class) public void testDropColumnBadArgumentExeption() throws Exception { emptyDf.dropColumn(0); }
[ "@Test\n public void testDropColumn_String() throws Exception {\n Column col1 = new Column(\"testCol1\",\"Integer\", Arrays.asList(1, 2));\n Column col2 = new Column(\"testCol2\",\"Integer\", Arrays.asList(1, 2));\n \n emptyDf.insertColumn(col1);\n emptyDf.insertColumn(col2);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a drawable from the book covers cache, identified by the specified id. If the drawable does not exist in the cache, it is loaded and added to the cache. If the drawable cannot be added to the cache, the specified default drwaable is returned.
public static FastBitmapDrawable getCachedCover(String id, FastBitmapDrawable defaultCover) { FastBitmapDrawable drawable = null; SoftReference<FastBitmapDrawable> reference = sArtCache.get(id); if (reference != null) { drawable = reference.get(); } if (drawable == ...
[ "private @Nullable Drawable getDrawableFromCache(@Nullable String key) {\n if (getDrawableLruCache() == null || key == null) {\n return null;\n }\n\n return getDrawableLruCache().get(key);\n }", "public Bitmap get(String id) {\r\n Log.v(TAG, \"get() id = \" + id);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }