query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Creates a new College from its name, population, tuition, rating and image name.
public College(String name, int population, double tuition, double rating, String imageName) { this(-1, name, population, tuition, rating, imageName); }
[ "public College(String name, int population, double tuition, double rating) {\n this(-1, name, population, tuition, rating, \"college.png\");\n }", "public College(int id, String name, int population, double tuition, double rating, String imageName) {\n mId = id;\n mName = name;\n m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The feerate paid per 1000weightunit in this commitment transaction.
public int feerate_per_kw() { int ret = bindings.CommitmentTransaction_feerate_per_kw(this.ptr); return ret; }
[ "public Double getTotalBuyFee() {\r\n return totalBuyFee;\r\n }", "float getReturnFee();", "public double calFee() {\n return weight * FEE + GiftBox.this.price;\n }", "public BigDecimal getwPrFee() {\n return wPrFee;\n }", "public double getFeeAmount() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all edit time.
public String getAllEditTime() { StringBuilder sb = new StringBuilder(); for (String date: editedTimeList) { sb.append(date + ", \n"); } return sb.toString(); }
[ "public Date getEditTime() {\n return editTime;\n }", "public String getEditTime() {\n return editTime;\n }", "public ArrayList<String> getEditedTimeList() {\n return editedTimeList;\n }", "public String getLastEditTime() {\n return editedTimeList.get(editedTimeList.size()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column lz_dialset.Dialid
public Integer getDialid() { return dialid; }
[ "public void setDialid(Integer dialid) {\r\n this.dialid = dialid;\r\n }", "public int getJP_BankDataLine_ID();", "public int getInternationalDialingCode() {\r\n return internationalDialingCode;\r\n }", "int getDoctorId();", "@Override\n\tpublic Integer getId() {\n\t\treturn getDiagnosis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The interface manage the connector of module.
public interface ModuleConnector { /** * Connection the reader through serial port. * @param port The serial port; * @param baud The baud rate; * @return if true connecting success,or failed. */ ReaderHelper connectCom(final String port, final int baud); /** * Connection the r...
[ "public interface Module extends javax.media.Controls\n{\n /**\n * A callback function denoting data was written to one of this Module input\n * Connectors. This function is needed in case of <b>Push</b> protocol\n * Typical reaction of the module is to process one frame in the calling\n * thread...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /mailgestionnaires/:id : delete the "id" mailGestionnaire.
@DeleteMapping("/mail-gestionnaires/{id}") @Timed public ResponseEntity<Void> deleteMailGestionnaire(@PathVariable Long id) { log.debug("REST request to delete MailGestionnaire : {}", id); mailGestionnaireRepository.deleteById(id); return ResponseEntity.ok().headers(HeaderUtil.createEnt...
[ "void deleteMail(Long idMail);", "void eliminarPresupuesto(Long id);", "@RequestMapping(value = \"/removerExercicio\", method = RequestMethod.GET, params = \"id\")\n\n public String delete(@RequestParam(\"id\") int id) {\n\n exercicioDao.remove(exercicioDao.findById(id));\n\n return \"redirect:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of "top_n".
public void setTopN(Integer topN) { this.topN = topN; }
[ "public void setTop(int top) {\n this.top = top;\n }", "public void setTopnum(String topnum) {\n this.topnum = topnum;\n }", "public int getTopN() {\n return topN_;\n }", "public int getTopN() {\n return topN_;\n }", "public void setTop(Integer top) {\n this.topBlock...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The idea is as follows, once we encounter the intersection with slow and fast pointer, we can count cycle length simply by moving the pointer until we encounter intersection again
public int findCycleLength(ListNode head) { ListNode slow = head; ListNode fast = head; ListNode intersection = head; while(fast.next != null && fast.next.next != null) { slow = slow.next; fast = fast.next.next; if(slow == fast) { int...
[ "@Unused\n@Original(version=\"2.38.0\", path=\"lib/pathplan/shortest.c\", name=\"intersects\", key=\"22a9ajg9t8ovqsigk3tyu3rkd\", definition=\"static int intersects(Ppoint_t * pap, Ppoint_t * pbp, \t\t Ppoint_t * pcp, Ppoint_t * pdp)\")\npublic static boolean intersects(ST_pointf pap, ST_pointf pbp, ST_pointf ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).
@javax.annotation.Nullable @ApiModelProperty(value = "The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).") public String getDateCreated() { return dateCreated; }
[ "public Date getCreated() {\n\t\treturn NdrUtils.parseNdrDateString(this.getCreatedDate());\n\t}", "public String getCreatedDate() {\n\t\treturn this.getProperty(\"fedora-view:createdDate\");\n\t}", "public String getFormattedCreatedDate() {\n if (this.createdDate == null) {\n return null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructing a new AlgorithmIterationEvent with the source algorithm and the number of iterations the algorithm has performed so far.
public AlgorithmIterationEvent(Object source, int iteration) { super(source); this.iteration = iteration; }
[ "public\nvoid\nfireIterationEvent(IterationEvent e)\n{\n if (listener_d != null)\n {\n listener_d.newIteration(e);\n }\n}", "IterationAccumulator createIterationAccumulator();", "@Override\n protected abstract void algorithmIteration();", "public void trainingIteration(LearningAlgorithm algorit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The primary file for the package.
@NotNull @ApiModelProperty(example = "y123456789", required = true, value = "The primary file for the package.") public String getPackageFile() { return packageFile; }
[ "public File getPrimaryFile() {\n return primaryFile;\n }", "public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }", "protected File getBundleFile() {\n \t\tgetGenerationDir(); /* create the generation dir if necessary */\n \n \t\tret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Jpa Test For findByNamedOfQuery
public void test_findByNamedOfQuery() { // step 1: List personList = this.persistenceService.findByNamedOfQuery(FIND_ALL_PERSON); assertNotNull(personList); assertEquals(ALL_PERSON_COUNT, personList.size()); // init again personList = null; // step 2: personList = this.persistenceService.fin...
[ "@Test\n public void testFindByNombre() {\n System.out.println(\"findByNombre\");\n query = mock(Query.class);\n String namedQuery = \"Componente.findByNombre\";\n Componente expected = new Componente();\n when(this.em.createNamedQuery(namedQuery)).thenReturn(query);\n w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'referenceId' field
public org.ga4gh.methods.SearchVariantsRequest.Builder setReferenceId(java.lang.CharSequence value) { validate(fields()[4], value); this.referenceId = value; fieldSetFlags()[4] = true; return this; }
[ "public void setReferenceId(java.lang.String referenceId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCEID$6, 0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This procedures creates the automata for the PRISM model
public void createAutomata () { // Calculate completion times for all nodes in LO and HI mode State s0 = new State(nbStates++, "Init", 0); s0.setCompTime(0); loSched.add(s0); Iterator<Vertex> in = d.getVertices().iterator(); while (in.hasNext()) { VertexScheduling n = (VertexScheduling) in.next()...
[ "public AutomataStructure createAutomataStructure();", "CellularAutomata createCellularAutomata();", "public static void main(String[] args) throws IOException {\n \n // set parameter set list\n ParameterSetListMaker maker = new ParameterSetListMaker(DefaultParameterRecipes.getDEFAULT_PARAM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "typeDeclaration" $ANTLR start "classOrInterfaceDeclaration" Java.g:198:1: classOrInterfaceDeclaration : classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration ) ;
public final void classOrInterfaceDeclaration() throws RecognitionException { int classOrInterfaceDeclaration_StartIndex = input.index(); try { dbg.enterRule(getGrammarFileName(), "classOrInterfaceDeclaration"); if ( getRuleLevel()==0 ) {dbg.commence();} incRuleLevel(); dbg.locat...
[ "public final void typeDeclaration() throws RecognitionException {\n int typeDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"typeDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(193, 1);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor intilizes the price, mouthPieceSize, sizeOfTrumpet, and mouthPieceSize
public Trumpet(double price, double mouthPieceSize, double sizeOfTrumpet, String typeOfMetal) { super(price, mouthPieceSize); this.sizeOfTrumpet = sizeOfTrumpet; this.typeOfMetal = typeOfMetal; }
[ "public Coffee(){\n size = \"\";\n count = 1;\n price = 0;\n }", "public Pizza(int size, int toppingCheese, int toppingPepperoni, int toppingMushroom)\n {\n this.size = size;\n this.toppingCheese = toppingCheese;\n this.toppingPepperoni = toppingPepperoni;\n this.top...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 'where' type_parameter ':' type_parameter_constraints
public static boolean type_parameter_constraints_clause(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "type_parameter_constraints_clause")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, "<type parameter constraints clause>"); r = consumeToken(b, "where"); r = r && type_parame...
[ "WhereParamsType getWhereParams();", "public final void mWHERE() throws RecognitionException {\n try {\n int _type = WHERE;\n // XQuery.g:324:8: ( 'where' )\n // XQuery.g:324:10: 'where'\n {\n match(\"where\"); \n\n\n\n }\n\n stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test get all patients. Purpose of the test: To check whether homepage is being loaded with ok response code. When: URL passed to check the page response code. Then: OK response code value should be returned for ok response.
@Test public void testGetAllPatients() { HttpHeaders headers = new HttpHeaders(); HttpEntity<String> entity = new HttpEntity<String>(null, headers); ResponseEntity<String> response = restTemplate.exchange(getRootUrl() + "/homepage",HttpMethod.GET, entity, String.class); assertEquals(200, response.getStatusCode...
[ "@Test\n\tpublic void getAirportsTest() {\n\t\twebTestClient.get().uri(\"/airports\").accept(MediaType.APPLICATION_JSON).exchange().expectStatus().isOk()\n\t\t\t\t.expectBody(Embedded.class)\n\t\t\t\t.consumeWith(res -> assertTrue(res.getResponseBody().getPage().getTotalPages() > 0));\n\t}", "@Test\n public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Time2 constructor: hour supplied, minute and second defaulted to 0
public Time2( int h ) { this( h, 0, 0 ); // invoke Time2 constructor with three arguments }
[ "public Time2(int hour, int minute) {\n this(hour, minute, 0); // invoke constructor with three arguments\n }", "public Time2(int hour) {\n this(hour, 0, 0); // invoke constructor with three arguments\n }", "public Time2(int hour, int minute, int second) {\n if (hour < 0 || hour >= 24...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test to see if containsMessageType will return true for super classes
@Test @Ignore //FIXME - is it worth fixing this? public void testContainsMessageTypeSuperClass() { messages.add(position); assertTrue(messages.containsMessageType(PositionMessage.class)); }
[ "@Test\n @Ignore //FIXME - is it worth fixing this?\n public void testContainsMessageTypeInterface() {\n messages.add(waterDepth);\n assertTrue(messages.containsMessageType(QuantitativeMessage.class));\n }", "public void expectedMessage(Class<? extends Message> aMessageType);", "public ab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method overload of verifyAndFetchOptionalProperty method.
public static boolean verifyAndFetchOptionalProperty(String key, boolean defaultValue, Properties prop) { String property; property = fetchProperty(key, prop); // Property should not be blank. if (property == null || (property != null && property.trim().isEmpty())) { return defaultValue; } r...
[ "public void testGetOptionalProperty() {\r\n\t\tPropertiesHelper props = TestHelper.readEntropyProperties(RESOURCES_DIR + \"testGetRequiredProperty.txt\");\r\n\t\t\t\r\n\t\t//Property exists, must return the current value\r\n\t\tAssert.assertEquals(props.getOptionalProperty(\"oneProp\", \"myDefault\"), \"ok\");\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table minidoctor_arrangement
int insert(MinidoctorArrangement record);
[ "MinidoctorArrangement selectByPrimaryKey(Long id);", "List<MinidoctorArrangement> selectByExample(MinidoctorArrangementExample example);", "B sortable(PROPERTY propertyId, boolean sortable);", "public String getSequence_SQL();", "List<Employee> sort(Sorting selectedSortColoumn) throws SQLException;", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the sorted list of the labels collected from the given combo data list.
private List<String> getSortedLabels(List<ComboData> comboDataList) { List<String> result = comboDataList.stream().map(ComboData::getLabel).sorted().collect(Collectors.toList()); return Collections.unmodifiableList(result); }
[ "public List<Label> getLabelOrder() {\n return Collections.unmodifiableList(labels);\n }", "ArrayList<String> getLabels();", "java.util.List<remote.RemoteStorage.LabelPair> \n getLabelsList();", "java.util.List<java.lang.String>\n getLabelFiltersList();", "public java.util.List<String>...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column TRSCIFLIMIT.APPROVE_STATUS
public String getAPPROVE_STATUS() { return APPROVE_STATUS; }
[ "int getApproveStatusValue();", "com.cfwf.cb.business_proto.ClientConnSchool.WeikeInfo.STATUS getApproveStatus();", "public void setAPPROVE_STATUS(String APPROVE_STATUS)\r\n {\r\n\tthis.APPROVE_STATUS = APPROVE_STATUS == null ? null : APPROVE_STATUS.trim();\r\n }", "public String getLIMIT_EXCEED_APPROVE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This "test" copies all issue descriptions and all comments into single HTML to verify the original markup exported from Jira.
@Test public void parseHtml() throws Exception { JAXBContext jaxb = JAXBContext.newInstance(Rss.class.getPackage().getName()); Unmarshaller u = jaxb.createUnmarshaller(); Properties props = new Properties(); try (FileReader fr = new FileReader("etc/application.properties")) { ...
[ "@Test\n public void parseMarkdownAndOriginalMarkup() throws Exception {\n JAXBContext jaxb = JAXBContext.newInstance(Rss.class.getPackage().getName());\n Unmarshaller u = jaxb.createUnmarshaller();\n\n Properties props = new Properties();\n try (FileReader fr = new FileReader(\"etc/a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a colour (1,1,1,1)
IColor createColor();
[ "Color createColor();", "public Colour() {\n this(0, 0, 0, 1);\n }", "IColor createColorInt(int r, int g, int b);", "private static Color newColor(int red, int green, int blue) {\n return new Color(red / 255.0, green / 255.0, blue / 255.0);\n }", "Color(){}", "private Color generateColor(int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the run number from the file name.
public static Integer getRunFromName(final File file) { final String name = file.getName(); final int startIndex = name.lastIndexOf("_") + 1; final int endIndex = name.indexOf("."); return Integer.parseInt(name.substring(startIndex, endIndex)); }
[ "public static int getIterationIndexFromName(String name) {\n if (name.indexOf(TaskId.iterationSeparator) == -1) {\n return 0;\n } else {\n String suffix = name.split(\"[\" + TaskId.iterationSeparator + \"]\")[1];\n return Integer.parseInt(suffix.split(\"[\" + TaskId.r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the current node's value to the specified BigDecimal. Sample code: Tree node = new Tree(); node.put("a.b.c", true); For change the value: node.get("a.b.c").set(BigDecimal.ONE);
public Tree set(BigDecimal value) { return setObjectInternal(value); }
[ "public Tree put(String path, BigDecimal value) {\r\n\t\treturn putObjectInternal(path, value, false);\r\n\t}", "public void set(BigDecimal value) {\n\t\t_value = value;\n\t}", "public Tree add(BigDecimal value) {\r\n\t\treturn addObjectInternal(value);\r\n\t}", "public void setNumericValue(java.math.BigDecim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the parameterDefinitionUnitId of this instance.
public long getParameterDefinitionUnitId() { return _model.getParameterDefinitionUnitId(); }
[ "public void setParameterDefinitionUnitId(long parameterDefinitionUnitId)\n {\n _model.setParameterDefinitionUnitId(parameterDefinitionUnitId);\n }", "public String getParamId() {\n return paramId;\n }", "public Long getUnitId() {\n\t\treturn unitId;\n\t}", "public Integer getUnitId() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the LiquorPremiumBasis field.
public void setLiquorPremiumBasis(java.lang.String value);
[ "public void setPollutionPremiumBasis(java.lang.String value);", "public void setRailroadPremiumBasis(java.lang.String value);", "public void setProductWithdrawalPremiumBasis(java.lang.String value);", "public void setUSTPremiumBasis(java.lang.String value);", "public void setPremOpsPremiumBasis(java.lang.S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method updates the entities movement logic based on what direction they are suppost to be going in
public void movement() { double moveSpeed; double maxMoveSpeed; double stopSpeed; double gravity; double maxGravity; double jumpStart; // a check to see if the entity is in a tile with water // if so then its maximum movement and acelleration are halved if (!swimming) { moveSpeed = this.mo...
[ "@Override\n\tpublic void update() {\n\n\t\t//Get current time\n\t\tdouble currentTime = System.currentTimeMillis();\n\t\tdouble movement = ((currentTime - previousTime) * movementSpeed) / 1000.0;\n\t\t\n\t\t//Create a translation vector\n\t\tVector translation = new Vector(2);\n\n\t\tboolean moving = false;\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that adds a courses into a sorted linked list (the course list is sorted on course code alphabetically)
public static void addCourseIntoSortedList(LinkedList<Course> l, Course c){ // Important: You are NOT allowed to use available sorting method to make // the list sorted. You can only use ListIterator to find a // suitable position to add a course into the list. You may...
[ "public void addCourses() {\n courses.add(new Course(0, \"History 101\", 600.00));\n courses.add(new Course(1, \"Mathematics 101\", 600.00));\n courses.add(new Course(2, \"English 101\", 600.00));\n courses.add(new Course(3, \"Chemistry 101\", 600.00));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove all traces of a folder entry.
void removeFolderEntry(FolderEntry entry) throws ROSRSException { this.rootResources = extractRootResources(folders.values(), resources.values()); this.rootFolders = extractRootFolders(folders.values()); }
[ "private static void maybePruneOldTraces(File tracesDir) {\n final long now = System.currentTimeMillis();\n final File[] traceFiles = tracesDir.listFiles();\n\n if (traceFiles != null) {\n for (File file : traceFiles) {\n if ((now - file.lastModified()) > DAY_IN_MILLIS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XSwitchExpression__Group_5__0__Impl" $ANTLR start "rule__XSwitchExpression__Group_5__1" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:9582:1: rule__XSwitchExpression__Group_5__1 : rule__XSwitchExpression__Group_5__1__Impl ru...
public final void rule__XSwitchExpression__Group_5__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:9586:1: ( rule__XSwitch...
[ "public final void rule__XSwitchExpression__Group_2_1_0__0__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:9...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines a "io.k8s.api.networking.v1.IngressClass" API object.
public KubeIngressClass(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable imports.k8s.KubeIngressClassProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);...
[ "public KubeIngressClass(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of outputMessage method, of class CourseworkClient. Pass
@Test public void testOutputMessage() { String message = "Test message"; port = 7777; CourseworkClient client = new CourseworkClient((String) server, port, username); client.outputMessage(message); }
[ "public void setOutputMessage(MessageInfo outputMessage)\n {\n this.outputMessage = outputMessage;\n }", "@Test\n \tpublic void testReceiveMessage() throws JMSException, InterruptedException, IOException {\n \t\tString msg = \"hello\";\n \n \t\tboolean sent = verifyJmsMessageReceivedOnOutputChannel(m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleFunction" $ANTLR start "entryRuleGoTo" ../org.xtext.example.browser/srcgen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:553:1: entryRuleGoTo returns [EObject current=null] : iv_ruleGoTo= ruleGoTo EOF ;
public final EObject entryRuleGoTo() throws RecognitionException { EObject current = null; EObject iv_ruleGoTo = null; try { // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:554:2: (iv_ruleGoTo= ruleGoTo EOF ) //...
[ "public final EObject entryRuleFunction() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleFunction = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:420:2: (iv_ruleFunction= ruleF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the centering flag; if true, text will be centered at mapped locations; if false, text will be to the right of mapped locations
public void setCenter(boolean c) throws VisADException, RemoteException { // abcd 5 February 2001 justification = Justification.CENTER; //center = c; changeControl(true); }
[ "public void centerText() {\r\n int theHeight = window.getGraphPanelHeight() / 2;\r\n int theWidth = window.getGraphPanelWidth() / 2;\r\n int writingHeight = textShape.getHeight() / 2;\r\n int writingWidth = textShape.getWidth() / 2;\r\n textShape.setY(theHeight - writingHeight);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the ClimbingFacilityOperator field. Climbing Facility Operator
@gw.internal.gosu.parser.ExtendedProperty public java.lang.String getClimbingFacilityOperator();
[ "public void setClimbingFacilityOperator(java.lang.String value);", "public java.lang.String getFacilityFlag() {\n return facilityFlag;\n }", "public String getCasePieceFlag()\n\t{\n\t\treturn getValue(StoragePlan.CASEPIECEFLAG).toString();\n\t}", "public String getCasePieceFlag()\n\t{\n\t\treturn g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests opening a file with O_WRONLY flag on nonexisting file.
@Test public void openWriteNonExisting() throws Exception { String testFile = "/openWriteNonExisting"; try (CloseableFuseFileInfo closeableFuseFileInfo = new CloseableFuseFileInfo()) { FuseFileInfo info = closeableFuseFileInfo.get(); info.flags.set(OpenFlags.O_WRONLY.intValue()); Assert.asse...
[ "@Test\n public void openWriteExistingWithoutTruncFlag() throws Exception {\n String testFile = \"/openWriteExistingWithoutTruncFlag\";\n try (CloseableFuseFileInfo closeableFuseFileInfo = new CloseableFuseFileInfo()) {\n FuseFileInfo info = closeableFuseFileInfo.get();\n createTestFile(testFile, i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of fingerprintPerturbation method, of class MarkovModelUtilities.
@Test public void testFingerprintPerturbation() { IDoubleArray M = null; IDoubleArray p0 = null; IDoubleArray observable = null; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.fingerprintPe...
[ "@Test\n public void fingerprintTest() {\n // TODO: test fingerprint\n }", "@Test\n public void testFingerprintCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n MarkovModelUtilities instance = new Marko...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EExtendedTriggerCondition__ConstraintAssignment_0_2" $ANTLR start "rule__EExtendedTriggerCondition__PeriodAssignment_1_1" InternalAADMParser.g:24888:1: rule__EExtendedTriggerCondition__PeriodAssignment_1_1 : ( RULE_STRING ) ;
public final void rule__EExtendedTriggerCondition__PeriodAssignment_1_1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:24892:1: ( ( RULE_STRING ) ) // InternalAADMParser.g:24893:2: ( RULE_STRING ) { ...
[ "public final void rule__EExtendedTriggerCondition__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:10227:1: ( ( ( rule__EExtendedTriggerCondition__PeriodAssignment_1_1 ) ) )\n // InternalAADM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For threaded loading data from the file specified in the filename
public static void threadloader() { Thread threadloadData = new Thread(){ public void run(){ try { loadData(inputFile1); } catch (Exception e) { System.err.println("Error in loading data: "+e.getMessage()); } } }; Thread threadloadPattern = new Thread(){ public void...
[ "private void loadReportFile(final String filename)\r\n\t{\r\n\t\tThreadedDefinitionProcessor tdp = new ThreadedDefinitionProcessor(reportConfigButton, filename);\r\n\t\ttdp.start();\r\n\t}", "public void fetchData() \n\t{\n\t\tfor(int i=0 ; i<urls.length ; i++) \n\t\t\tnew ParserThread(urls[i],fileNames[i]).star...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate our definition. Most of the validation actually occurs in the builder, but we do ensure that the renderer is not null. It would be cleaner to throw all errors here, but we would need to store the error message in the constructor which is a bit funky.
@Override public void validateDefinition() throws QuickFixException { super.validateDefinition(); if (renderer == null) { throw new InvalidDefinitionException("Renderer must implement the Renderer interface.", location); } }
[ "protected void buildRenderer() {\n if (rendererClass == null) {\n return;\n }\n\n List<Class<? extends Renderer>> interfaces = AuraUtil.findInterfaces(rendererClass, Renderer.class);\n if (!interfaces.isEmpty()) {\n try {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Erstellt fuer die GUI Version des Spiels eine Anzeige welcher Spieler gewonnen hat, wenn das Spiel zu Ende ist
public void initGui() { Spieler sieger = dasSpiel.getSieger(); PopupGUI siegerAnzeigen = new PopupGUI(dasSpiel); String anzeige = sieger.getName() + ", hat das Spiel gewonnen! Du kannst nun keine Aktionen mehr durchfuehren ausser dir die Karte anzuschauen."; for (int i = 0; i < dasSpiel.getSpielerListe().si...
[ "public abstract void guiModificata();", "public guiProntuarioVirtual() {\n initComponents();\n \n }", "public void modificaciones(){\n VentanaDibujo vi= (VentanaDibujo)Escritorio.getSelectedFrame();\n //Veamos si tenemos ventana seleccionada\n if(vi!=null){\n //Vemos q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column low_voltage_hitch_event.behitch_c_phase_voltage
public Integer getBehitchCPhaseVoltage() { return behitchCPhaseVoltage; }
[ "public Integer getBehitchBPhaseVoltage() {\n return behitchBPhaseVoltage;\n }", "public Integer getBehitchAPhaseVoltage() {\n return behitchAPhaseVoltage;\n }", "double getBatteryVoltage() {\n double result = Double.POSITIVE_INFINITY;\n for (VoltageSensor sensor : hardwareMap....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set a piece of metadata to the metadata container. Metadata container items are updated if the metadata name matches (caseinsensitive), the values differ (casesensitive), and not instructed to retain the container value. This method may be incapable of adding metadata configured to repeat.
public void setMetadataInContainer(MetaDataContainer mdContainer, String name, String value, boolean preferContainerValue) { if (mdContainer != null && StringUtils.isNotBlank(name) && value != null) { List<MetaDataItem> mdList = new ArrayList<MetaDataItem>(1); mdList.add(new MetaDataItem(name, val...
[ "void setMetadataValue(String name, String value) throws IOException;", "<E extends CtElement> E putMetadata(String key, Object val);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void setMetadata(Map<String, String> metadata) {\n setMetadataWithResponse(metadata, null, null, Context.NONE);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'user_id_type' field
public com.autodesk.ws.avro.Session.Builder setUserIdType(com.autodesk.ws.avro.UserIdType value) { validate(fields()[2], value); this.user_id_type = value; fieldSetFlags()[2] = true; return this; }
[ "public void setUserIdType(com.autodesk.ws.avro.UserIdType value) {\n this.user_id_type = value;\n }", "public void setUserTypeId(Integer userTypeId)\n {\n this.userTypeId = userTypeId;\n }", "public void setUserTypeId(final Integer userTypeId) {\n this.userTypeId = userTypeId;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the configuration of an event destination for a configuration set. In Amazon Pinpoint, events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive...
@Override public UpdateConfigurationSetEventDestinationResult updateConfigurationSetEventDestination(UpdateConfigurationSetEventDestinationRequest request) { request = beforeClientExecution(request); return executeUpdateConfigurationSetEventDestination(request); }
[ "Update withDestination(EventChannelDestination destination);", "@Override\n public CreateConfigurationSetEventDestinationResult createConfigurationSetEventDestination(CreateConfigurationSetEventDestinationRequest request) {\n request = beforeClientExecution(request);\n return executeCreateConfig...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form VolumeLayoutPanel
public VolumeLayoutPanel() { initComponents(); }
[ "private JSlider createVolumeSlider() {\n\t\tJSlider volumeSlider = new JSlider(JSlider.VERTICAL,\n VOLUME_MIN, VOLUME_MAX, VOLUME_INIT);\n\t\tvolumeSlider.addChangeListener(new ChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tsendCommand(\"volume \"+(int)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invites the list of selected contacts to the muc.
private void invite() { inviteToMucEvent.invite(mucList); clear(); // if (!mucList.isEmpty() && !mucName.getText().isEmpty()) { // MUCChat muc = new MUCChat(mucName.getText(), mucList); // inviteMUCEvent.getMUC(muc); // clear(); // } }
[ "public void setContacts(ArrayList<User> contacts){\r\n this.contacts = contacts;\r\n }", "private void inviteFriends() {\n\n // Get selected positions\n List<Integer> posSelected = new ArrayList<Integer>();\n\n int pos = 0;\n for (Boolean b : mSelectedPositions) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the message part enum.
public void setMessagePartEnum(MessagePartEnum messagePartEnum) { this.messagePartEnum = messagePartEnum; }
[ "public MessagePartEnum getMessagePartEnum() {\n return messagePartEnum;\n }", "public void setMessageEnum(IMessageEnum messageEnum) {\n this.messageEnum = messageEnum;\n }", "public void setPartEnumeration(String partEnumeration) {\r\n this.partEnumeration = partEnumeration;\r\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'orderCountRestaurant' field has been set.
public boolean hasOrderCountRestaurant() { return fieldSetFlags()[14]; }
[ "public java.lang.Long getOrderCountRestaurant() {\n return orderCountRestaurant;\n }", "public java.lang.Long getOrderCountRestaurant() {\n return orderCountRestaurant;\n }", "public boolean isSetRestaurants() {\n return this.restaurants != null;\n }", "public void setOrderCountRestaurant(jav...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstActorDeclaration__Group__0" $ANTLR start "rule__AstActorDeclaration__Group__0__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:5402:1: rule__AstActorDeclaration__Group__0__Impl : ( ( rule__AstActorDeclaration__NameAssignment_0 ) ) ;
public final void rule__AstActorDeclaration__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:5406:1: ( ( ( rule__AstActorDeclarat...
[ "public final void rule__AstActorDeclaration__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:5394:1: ( rule__AstActorDeclar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
build menu with all file types also track whether we need to add the current type (may be the case for types which we support but don't want to expose on the menu e.g. Rmd files when knitr isn't installed)
@Override public void onMouseDown(MouseDownEvent event) { boolean addCurrentType = true; final StatusBarPopupMenu menu = new StatusBarPopupMenu(); TextFileType[] fileTypes = fileTypeCommands_.statusBarFileTypes(); for (TextFileType type : fileTypes...
[ "private void buildFileMenu() {\r\n // generate the file menu\r\n fileMenu = AnimalTranslator.getGUIBuilder().generateJMenu(\"file\", null);\r\n\r\n // declare the local handler for events from this menu\r\n FileMenuController fileMenuController = new FileMenuController(\r\n animalInstance);\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
determine whether there is an active job for the given emplid on the specified position
public boolean isActiveJob(String emplid, String positionNumber, Integer fiscalYear, SynchronizationCheckType synchronizationCheckType);
[ "boolean isRunning(JobType type);", "public boolean isActiveJob() {\r\n\t\tboolean isActive = false;\r\n\t\tLocalDate currentDate = LocalDate.now();\r\n\t\tlong currToEnd = ChronoUnit.DAYS.between(this.endDate,\r\n\t\t\t\tcurrentDate);\r\n\t\tlong currToStart = ChronoUnit.DAYS.between(this.startDate,\r\n\t\t\t\tc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a reference to the presence operation set instance used by our source provider.
public OperationSetPersistentPresenceRssImpl getOpSetPersPresence() { return this.opSetPersPresence; }
[ "private <U extends OperationSet> U getOperationSet(Jid jid,\n Class<U> opsetClass,\n boolean online)\n {\n U opset = parentProvider.getOperationSet(opsetClass);\n\n if (opset == null)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of pushAction method, of class MatrixGraph.
@Test public void testPushAction() { System.out.println("pushAction"); Vertex2 vtx1 = null; Vertex2 vtx2 = null; GeneralGraph instance = null; boolean expResult = false; boolean result = instance.pushAction(vtx1, vtx2); assertEquals(expResult, result); ...
[ "@Test\n public void testTakeAction() {\n System.out.println(\"takeAction\");\n int Index = 0;\n GeneralGraph instance = null;\n boolean expResult = false;\n boolean result = instance.takeAction(Index);\n assertEquals(expResult, result);\n // TODO review the gener...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the next Token and updates the internal iterator so that the next call to nextToken will return the next token in the list. It is the callers responsibility to ensure that there is another Token. Precondition: hasTokens()
public Token nextToken() { return tokens.get(nextTokenPos++); }
[ "public static void getNextToken() {\n if (currPos < tokens.size()) {\n currToken = tokens.get(currPos);\n //TODO del \n // System.out.println(currToken);\n currPos++;\n } else {\n// System.out.println(\"end of tokens reached\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on enroll now button
public void clickOnEnrollNowButton() { if(enrollNowButton.isEnabled()) { waitAndClick(enrollNowButton); } }
[ "public void clickOnInvestYourIdleCashModal() {\n waitAndClick(investInGrowthAccountBtn, \"Invest In Growth Account button\");\n }", "public void clickOnAddInvestmentBtn() {\n waitAndClick(addInvestmentBtn, \"Add Investment Goal button\");\n }", "public void scrollDownThePageToFindTheEnrollN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
remove host or route and update dhcp relay record attributes.
private void removeHostOrRoute(boolean directConnFlag, ConnectPoint location, DHCP6 dhcp6Packet, Ethernet clientPacket, IPv6 clientIpv6, Interface clientInterface) { log.debug("removeHostOrRoute enters {}",...
[ "void removeDevice(int networkAddress);", "void removeAddress() throws Exception;", "private void hostRemoved(Host host) {\n hostRemoved(host, defaultServerInfoList);\n hostRemoved(host, indirectServerInfoList);\n }", "private void serviceVmRemoved(Host host) {\n if (host.annotations()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a range of all the lignes. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtilALL_POS will return...
@Override public java.util.List<eu.strasbourg.service.gtfs.model.Ligne> getLignes( int start, int end) { return _ligneLocalService.getLignes(start, end); }
[ "@Override\n\tpublic List<Arret> findAll(\n\t\tint start, int end, OrderByComparator<Arret> orderByComparator) {\n\n\t\treturn findAll(start, end, orderByComparator, true);\n\t}", "@Override\n\tpublic List<Nir> findAll(\n\t\tint start, int end, OrderByComparator<Nir> orderByComparator) {\n\n\t\tboolean pagination...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new empty ColumnBasedTableFilter
public ColumnBasedTableFilter(RowObjectTableModel<R> model) { this.model = model; this.name = null; }
[ "public FiltersTableModel() {\n filters = new Vector();\n }", "public Filter () {\n\t\tsuper();\n\t}", "public FilterDescriptor() {\n // create a empty instance.\n }", "@Override\n public SqlDatabaseTable filter(SqlDatabaseTable table, List<FilterRule> filterRules) {\n if (filterRules....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the list of keys for the available metadata values. The returned array must be an array with at least one key.
String[] getKeys();
[ "Set<String> getMetadataKeys();", "public K[] getKeys();", "public String[] getKeyArray() {\n Set<String> keys = headerMap.keySet();\n String[] keyArray = keys.toArray(new String[keys.size()]);\n return keyArray;\n }", "public String[] getKeysWithVariants() {\n Set keySet = new Has...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for f_PanelBody100 called 1 times. Type: DEFAULT. Build precedence: 4.
private org.gwtbootstrap3.client.ui.PanelBody get_f_PanelBody100() { return build_f_PanelBody100(); }
[ "private org.gwtbootstrap3.client.ui.PanelBody get_f_PanelBody93() {\n return build_f_PanelBody93();\n }", "private org.gwtbootstrap3.client.ui.PanelBody get_f_PanelBody111() {\n return build_f_PanelBody111();\n }", "private org.gwtbootstrap3.client.ui.PanelBody get_f_PanelBody122() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allocates and returns a pid ;returns 1 if unable to allocate a pid. if current amount of pid is equal to the size, return 1 immediately.
public int allocate_pid() { if (idnum == idSize) return -1; for (int i = 0; i < idSize; i++) { if (p_id[i] == 0) { p_id[i] = 1; idnum++; return i + MIN_PID; } } return -1; }
[ "public int allocate_pid()\n {\n int pid = 0;\n int size = MAX_PID - MIN_PID;\n //traverse untill we find a false value and pid vale is not equal to size \n while( pid!=size && pid_map[pid] != false )\n {\n pid++;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configure this type hierarchy by computing the supertypes only.
protected void buildSupertypes() { IType focusType = getType(); if (focusType == null) return; // get generic type from focus type IGenericType type; try { type = (IGenericType) ((JavaElement) focusType).getElementInfo(); } catch (JavaModelExceptio...
[ "protected abstract void registerSuperTypes();", "private static void setallSupertype(\n ModelElement modelElement\n ){\n // set supertypes of supertypes\n for(\n Iterator i = modelElement.supertypes.iterator();\n i.hasNext();\n ) {\n setallSupertype...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleInterface" $ANTLR start "entryRuleSignatureReference" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:537:1: entryRuleSignatureReference : ruleSignatureReference EOF ;
public final void entryRuleSignatureReference() throws RecognitionException { try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:538:1: ( ruleSignatureReference EOF ) // ../org.xtext.example.rmodp.ui/src-gen/org/xtext...
[ "public final void rule__Interface__SignatureReferencesAssignment_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column tbdevlog.nkeys
public void setNkeys(String nkeys) { this.nkeys = nkeys; }
[ "public void setKeys() {\r\n\r\n\t\tinit_FieldNo = fieldNo;\r\n\t}", "public String getNkeys() {\n return nkeys;\n }", "public void setNumOfKeys(byte numOfKeys) {\n\t\tthis.numOfKeys = numOfKeys;\n\t}", "private void initKeys()\n\t{\n\t\tResultSet result = null;\n\t\tString selectStmt = \"SELECT Ab_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "stmt" $ANTLR start "exp" /home/christoffergunning/workspace/miniJava/src/se/cgunning/java/Java.g:60:1: exp : exp1 ( exp2 ) ;
public final void exp() throws RecognitionException { try { // /home/christoffergunning/workspace/miniJava/src/se/cgunning/java/Java.g:61:5: ( exp1 ( exp2 )* ) // /home/christoffergunning/workspace/miniJava/src/se/cgunning/java/Java.g:61:7: exp1 ( exp2 )* { pushFollow(FOLLOW_exp1_in_exp410); exp1(); ...
[ "public final void exp2() throws RecognitionException {\n\t\ttry {\n\t\t\t// /home/christoffergunning/workspace/miniJava/src/se/cgunning/java/Java.g:77:5: ( op exp | LBRACK exp1 RBRACK | DOT 'length' | DOT ID RPAR expList LPAR )\n\t\t\tint alt15=4;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase ADD:\n\t\t\tcase AND:\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a TCP client channel. The channel does not try to connect until you add a stack.
Channel addTCPClient(String id, int levels, ChannelRetry retry, String address, String adapter, int port, ChannelListener listener) throws DNP3Exception;
[ "public static void addChannel(SocketChannel sc){\n\t\tchannelPool.put(sc.getChannelId(), sc);\n\t}", "Channel addTCPServer(String id, int levels, ChannelRetry retry, String endpoint, int port, ChannelListener listener) throws DNP3Exception;", "public void newClientConnection (ServerSocket client) {\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
given set points, find K min distance
public static void main(String[] args) { Set<Point> set = new HashSet<Point>(); set.add(new Point(1,1)); set.add(new Point(1,3)); set.add(new Point(3,1)); set.add(new Point(1,4)); set.add(new Point(1,5)); set.add(new Point(5,5)); List<Point> answ = minK(3, set); System.out.println(answ.toS...
[ "public static List<Point> findKNearestPointsSelection(final Point points[], final int k) {\n final int n = points.length;\n final double[] dist = new double[n];\n for (int i = 0; i < n; i++) {\n dist[i] = Math.sqrt(points[i].x * points[i].x + points[i].y * points[i].y);\n }\n final double kthMi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TEST: LIST MESSAGES WITH BLANK PARAMETERS
@Order(2) @Test public void listMessagesWithBlankParameters() throws IOException { boolean result = Requests.listMessagesBoolReturn("", ""); //expected: all messages are returned (list is a GET requests, hence result should be //similar to blank Get message request) assertTrue(result); }
[ "@Order(2)\n\t\t@TestFactory\n\t\tIterable<DynamicTest> listMessagesWithBlankFromParameter() throws IOException, ParseException {\n\t\t\t\n\t\t\tString toUser;\n\t\t\tCollection<DynamicTest> tests = new ArrayList<DynamicTest>();\n\t\t\t\n\t\t\t\n\t\t\tfor (HashMap.Entry<String, String> item : this.userMap.entrySet(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the URL for a specified service.
public String getUrl(String service) { return myServerUrls.get(service); }
[ "public String getServiceURL(String serviceName, String transport) {\n String servicesURL = getServicesURL(transport);\n return servicesURL + serviceName;\n }", "String serviceToUrl(String protocol, String serviceId, String tag, String requestKey);", "public String getServiceUrl() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Randomly selects a variable from a collection.
static Variable randomSelect(List<Variable> candidates) { int index = (int) (Math.random() * candidates.size()); return candidates.get(index); }
[ "static Variable randomSelect(Collection<Variable> candidates) {\n int num = (int) (Math.random() * candidates.size());\n for (Variable v: candidates) if (--num < 0) return v;\n throw new InternalError(); // Never happens\n }", "public void selectWord(){\n\t\tint index = new Random().nextI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associate the specified columnProperties to the property matching the key predicate and type predicate.
public final MF addColumnPropertyForType(Predicate<Type> typePredicate, Predicate<? super K> keyPredicate, UnaryFactory<K, Object> propertyFactory) { typedPredicatedPredicatedColunnPropertyFactories.add(new TypedPredicatedPredicatedColumnPropertyFactory<K>(typePredicate, new AbstractColumnDefinitionProvider.Predicate...
[ "public final MF addColumnPropertyForType(Type type, Predicate<? super K> keyPredicate, Object... properties) {\n\t\tfor(final Object property : properties) {\n\t\t\taddColumnPropertyForType(type, keyPredicate, new UnaryFactory<K, Object>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Object newInstance(K k) {\n\t\t\t\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "T__54" $ANTLR start "T__55"
public final void mT__55() throws RecognitionException { try { int _type = T__55; int _channel = DEFAULT_TOKEN_CHANNEL; // /Volumes/Lailson HD/Users/lailson/NetBeansProjects/Compilador/src/gramatica/Portugolv3.g:54:7: ( '-' ) // /Volumes/Lailson HD/Users/lailson/N...
[ "public final void mT__55() throws RecognitionException {\n try {\n int _type = T__55;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:123:7: ( '?' )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Font file filter. Currently searches for files with .ttf, .ttc, .otf, and .pfb extensions.
protected static IOFileFilter getFileFilter() { return FileFilterUtils.andFileFilter( FileFilterUtils.fileFileFilter(), new WildcardFileFilter( new String[] {"*.ttf", "*.otf", "*.pfb", "*.ttc"}, IOCase.INSENSITIVE) ); }
[ "private String getFontFile(){\n\t\tif (fontFile == null){\n\t\t\tfontFile = escapeForVideoFilter(ResourcesManager.getResourcesManager().getOpenSansResource().location);\n\t\t}\n\t\treturn fontFile;\n\t}", "private void loadFontNames()\n\t{\n\t\t// convert each font file to font\n\t\tfor (FileHandle fh : fontDirI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setters and getters Get resource
public Resource getResource(){ return res; }
[ "protected Resource getResource() {\n return resource;\n }", "public com.commercetools.api.models.common.Reference getResource() {\n return this.resource;\n }", "public BasicResource getResource(){\n\t\treturn BasicResource.getResource(this.getParameter(\"resource\").toString());\n\t}", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the name of the feed this news item belongs to
public String getFeedLabel() { return this.feedLabel; }
[ "public String getFeedName() {\n return this.feedName;\n }", "public String getName() {\n\t\t\t\treturn \"RSS Search: \" + feedURL;\n \t\t\t}", "@Override\n public String getTitle() {\n return combinedFeed.getName();\n }", "public String toString() {\n return this.feedLabel + \":...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string provenance = 1;
java.lang.String getProvenance();
[ "public Builder setProvenance(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n provenance_ = value;\n onChanged();\n return this;\n }", "public java.lang.String getProvenance() {\n java.lang.Object ref = provenan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Requires: NA Modifies: f Effects: Returns Username, Password and Role in one String f
public String toString(){ String f = "Username: " + Username + ", Password: " + Password + ", Role: " + role ; return(f); }
[ "public String toString(){\n\t\treturn name + \"|\" + password;\n\t}", "public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }", "int getUserRole();", "public UserVO getAdminEmailAndPW();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Skip tests if the properties file has not been configured.
@Before public void beforeMethod() { assumeTrue(ApiTesting.PROPERTIES_FILE_EXISTS); }
[ "@Test(expected = PropertyException.class)\n\tpublic void testPropertyException() throws PropertyException {\n\t\tnew Properties(mNotExistingFilePath).load();\n\t}", "public void testLoadProperties() throws IOException {\n\n File file = null;\n String fileName = \"sentinel-propertiesTest.properties\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a list of objects which recently left the network.
public List<OnlineObject> getOfflineObjects() { synchronized (this.onlineObjects) { return new ArrayList<OnlineObject>(this.recentlyRemovedObjects); } }
[ "public List<Event> getLastReceivedEvents();", "EList<Diff> getLeftDifferences();", "public List<OnlineObject> getNewObjects() {\n\t\tsynchronized (this.onlineObjects) {\n\t\t\treturn new ArrayList<OnlineObject>(this.recentlyAddedObjects);\n\t\t}\n\t}", "public List<Vertex> getPreviousNodes() {\n\t\treturn pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to get the number of slots used on the server for this job
public Integer getUsedSlots(Job job){ return usedSlots.get(job); }
[ "public abstract int getNumberOfFreeServers();", "public int getNoOfParkingSlots() {\r\n\t\t\treturn parkingSlots.size();\r\n\t\t}", "Integer taskSlotsPerNode();", "public int getSlotsCount() {\n return slotsCount;\n }", "public int getSlotCount() { \n return getSlotCount0();\n }", "in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface that makes it possible to replace the strategy for generating icons for items.
public interface IconFactory { /** * Get the icon for an item. * * @param object * Can be any class, but the implementation may place restrictions on valid types. */ public Icon getIcon(Object object); }
[ "B itemIconGenerator(ItemIconGenerator<ITEM> itemIconGenerator);", "public abstract String typeIcon();", "public interface IconSet {\r\n\r\n /**\r\n * @return the identifier of the icon set.\r\n */\r\n String getId();\r\n \r\n /**\r\n * @return the name of the icon set.\r\n */\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new DiskFileItem instance.
public DiskFileItem(final String fieldName, final String contentType, final boolean isFormField, final String fileName, final int sizeThreshold, final File repository, final IFileCleaner fileUploadCleaner) { this.fieldName = fieldName; this.contentType = contentType; this.isFormField = isFormField; this.fi...
[ "public static DiskFileItemFactory newDiskFileItemFactory(ServletContext servletContext) {\n FileCleaningTracker fileCleaningTracker = FileCleanerCleanup.getFileCleaningTracker(servletContext);\n DiskFileItemFactory factory = new DiskFileItemFactory(DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD, null);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the ExperienceNumberYearsRequired field.
public void setExperienceNumberYearsRequired(java.lang.Integer value);
[ "public void setExperienceNumberYearsRequired1(java.lang.Integer value);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getExperienceNumberYearsRequired();", "public void setYears(int years) {\n // Check that the number of years is a positive integer as\n // its not possi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks for the existence of a NPC.
public boolean verify(NPC npc) { return npc != null; }
[ "public static boolean isNPC(Player player) {\n return player.hasMetadata(\"NPC\");\n }", "public boolean isNPC(Entity entity);", "public boolean isNPC(Entity player){\r\n\t\tif(plugin.npcm.isNPC(player)){return true;}\r\n\t\treturn false;\r\n\t}", "public static boolean inspectNPCs(Player player) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor en donde se inicializa la cantidad de recursos disponibles para el Semaforo.
public Semaforo(int cantidadRecursos) { recursosDisponibles = cantidadRecursos; System.out.println("Iniciado el semaforo con valor " + cantidadRecursos); }
[ "@Override\n protected void init() {\n //setup for recursion\n super.name = \"Recursion\";\n long limit = super.size;\n long[] f = new long[]{1,3};\n initRecurse(limit,f); // recursion is redirected\n }", "private void init() {\n //Basic info\n s = grap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1 = single, 2 = double, 3 = triple, 4 = aromatic, 5 = amide. for now, aromatic and amide bonds (and any other unrecognized bond type) are constructed identically to single bonds.
public Bond (Atom a1, Atom a2, int type){ this.a1 = a1; this.a2 = a2; this.type = type; }
[ "@Test\r\n public void testGetBondType() {\r\n JniInchiBond bond = new JniInchiBond(atO, atT, INCHI_BOND_TYPE.DOUBLE);\r\n Assert.assertEquals(INCHI_BOND_TYPE.DOUBLE, bond.getBondType());\r\n bond = new JniInchiBond(atO, atT, INCHI_BOND_TYPE.SINGLE);\r\n Assert.assertEquals(INCHI_BOND...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the global transformation based on the given area of interest.
public AffineTransform getGlobalTransform(AreaOfInterestTransformable areaOfInterest) { AffineTransform global = new AffineTransform(); /* perform the scalign */ global.scale(areaOfInterest.getScaleX(), areaOfInterest.getScaleY()); /* perform the translation */ Rectangle2D bound...
[ "public AffineTransform getWorldToView();", "Transformation getTransformation() {\r\n toBody.setCoordinates(q0, q1, q2, q3);\r\n return toBody;\r\n }", "public Matrix4 getTransformation();", "Transformation getTransformation();", "public Transform getLocalTransform(){\r\n return localTransform...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getLongitude method, of class GeoCoord2D.
@Test public void testGetLongitude() { System.out.println("getLongitude"); GeoCoord2D instance = GeoCoord2D.fromDegrees(LAT_OXR, LON_OXR); Real expect = new Real(RealType.Longitude, LON_OXR); Real result = instance.getLongitude(); assertEquals(expect, result); ass...
[ "@Test\n public void testGetLongitudeDegrees()\n {\n System.out.println(\"getLongitudeDegrees\");\n GeoCoord2D instance = GeoCoord2D.fromDegrees(LAT_OXR, LON_OXR);\n double result = instance.getLongitudeDegrees();\n assertEquals(LON_OXR, result, 0.00000001);\n assertEquals(L...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updates an already saved case.
public void updateCase(ICase aCase, String info){ aCase.updateCase(currentUser.getIDNumber(),info); }
[ "void saveOrUpdate(Case theCase);", "@Override\n\t@Transactional\n\tpublic TXLCase update(TXLCase txlCase) {\n\t\tTXLCase dbObject = caseDao.findById(txlCase.getId());\n\n\t\tdbObject.setClientProfilePsnToBeResolved(txlCase.getClientProfilePsnToBeResolved());\n\t\tdbObject.setNumber(txlCase.getNumber());\n\t\tdbO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Save any pending saves if they are not already saved. It is safe to call this multiple times. Subsequent calls will be a noop.
private void save(Store store) { if (saved) { return; } if (saves.isEmpty()) { saved = true; return; } store.save(saves); saved = true; }
[ "public static void runSaveState() {\n for (GUISaveable s: saveables) {\n s.saveState();\n }\n }", "public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, fina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the port number of the remote host to which the client is connected.
public int getRemotePort() { return this._socket_.getPort(); }
[ "public int getPort() {\n if (state >= CONNECTED)\n return remotePort;\n else\n return 0;\n }", "public int getRemotePort() {\n return Integer.valueOf(m_remotePortField.getText());\n }", "public int getClientPort() {\n int clientPort = CLIENTSOCKET.getPort...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
hard time window ()(dropOffMedicalCentre=j)()()
private void settingTimeDropOffPatientParamedicSubJob(SubJobs dropOffMedicalCentre, Jobs j) { dropOffMedicalCentre.setTotalPeople(-2); // 5. Setting the total people (+) pick up (-) drop-off dropOffMedicalCentre.setloadUnloadTime(test.getloadTimePatient()); dropOffMedicalCentre.setloadUnloadRegistrationTime(t...
[ "public void tasserGrille(){\n for (int i = 0; i < 7; i++) {\r\n tasserColonne(i);\r\n }\r\n }", "private void settingTimePickUpPatientSubJob(SubJobs pickUpPatientHome, Jobs j) {\n\t\tpickUpPatientHome.setTotalPeople(1);\r\n\t\tpickUpPatientHome.setPatient(true);\r\n\t\tpickUpPatien...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Return the index of the left child of the node at pos
private int leftChild ( int pos ) { return -1; // replace this with working code }
[ "public int leftchild(int pos){\n\t\tassert pos < size/2 : \"Position has no left child\";\n\t\treturn 2 * pos + 1;\n\t}", "int leftChild(int pos) {\n return (2*pos)+1;\n }", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "public static int leftChildIdx(int nodeIdx) {\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if a given string is a valid birthdate.
public static boolean isValidBirthdate (String test) { try { LocalDate.parse(test); return isValidBirthdate(LocalDate.parse(test)); } catch (DateTimeParseException e) { return false; } }
[ "public static boolean isValidBirthday(String test) {\n return test.matches(BIRTHDAY_VALIDATION_REGEX);\n }", "public boolean checkBirth(String birthDate) {\n\t\tif (birthDate.length() != 10) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tString[] birthDateList = birthDate.split(\"-\");\n\t\t\tif (bir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'var210' field.
public com.dj.model.avro.LargeObjectAvro.Builder setVar210(java.lang.Double value) { validate(fields()[211], value); this.var210 = value; fieldSetFlags()[211] = true; return this; }
[ "public void setVar210(java.lang.Double value) {\n this.var210 = value;\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setVar213(java.lang.Integer value) {\n validate(fields()[214], value);\n this.var213 = value;\n fieldSetFlags()[214] = true;\n return this;\n }", "public voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }