query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
$ANTLR end "rule__AddExp__RightAssignment_1_2" $ANTLR start "rule__MultExp__OpAssignment_1_1" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10366:1: rule__MultExp__OpAssignment_1_1 : ( ( rule__MultExp__OpAlternatives_1_1_0 ) ) ;
public final void rule__MultExp__OpAssignment_1_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10370:1: ( ( ( rule__Mult...
[ "public final void rule__AddExp__OpAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10339:1: ( ( (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the probability, according to the model, of the specified sentence. This is the product of the probabilities of each word in the sentence (including a final stop token).
public double getSentenceProbability(List<String> sentence) { List<String> stoppedSentence = new ArrayList<String>(sentence); stoppedSentence.add(0, START); stoppedSentence.add(0, START); stoppedSentence.add(STOP); double probability = 1.0; for (int index = 2; index < stoppedSentence.size(); index++) { proba...
[ "public double getSentenceProbability(List<String> sentence) {\n List<String> stoppedSentence = new ArrayList<String>(sentence);\n stoppedSentence.add(0, START);\n stoppedSentence.add(STOP);\n double logProb = 0.0;\n for (int index = 1; index < stoppedSentence.size(); index++) {\n logProb += Mat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a diagnosis to this problem. Optionally, add the diagnosis to the konsusltation
private void addDiagnose(IDiagnose dg, boolean addToKonsultation){ /* * No more required, since Episode stores it in a list of ids String diagnoseId = * j.queryString("SELECT ID FROM DIAGNOSEN WHERE KLASSE = " + * JdbcLink.wrap(dg.getClass().getName()) + " AND DG_CODE = " + * JdbcLink.wrap(dg.getCode()));...
[ "public void addDiagnosis(String code, String diagnosis) throws IOException {\n\t\tICDCode toManipulate = manipulate(code);\n\t\ttoManipulate.addDiagnosis(diagnosis);\n\t\t\n\t\tclearAndRepopulateDictionary();\n\t}", "public boolean insertDiagnosis(Diagnosis diagnosis) throws ApplicationException;", "public voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the gas meter type description.
public String getGasMeterTypeDescription() { return gasMeterTypeDescription; }
[ "public String getMeterType()\n {\n return meterType;\n }", "public String description() {\n return type.description();\n }", "public String getTypeDesc() {\r\n return typeDesc;\r\n }", "public String getTypeDesc() {\n return typeDesc;\n }", "public Gas getGas() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configuration to build stages. Currently does not support the ConfigBuilder interface (possible future work). Stages are able to set a StageExecutionMode which determines what behavior will occur when an exception is thrown by a stage implementation. If the stageExecutionMode is not set explicitly, Brigade will use the...
public interface StageConfig extends Config<StageConfig> { /** * Get the name of the stage * @return Name of the stage */ String getStageName(); /** * Get the fully-qualified class the stage is an instance of * @return */ String getStageClass(); /** * Get name for the St...
[ "public PipelineConfig() {\n super();\n }", "public com.estafette.ci.manifest.v1.EstafetteStage.Builder addStagesBuilder() {\n return getStagesFieldBuilder().addBuilder(\n com.estafette.ci.manifest.v1.EstafetteStage.getDefaultInstance());\n }", "public ClassificationCompositeStage(fin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resets the state of the data structures holding the boxes, the main character and the box generator.
public void reset(){ boxPositions = new HashMap<>(); boxWeights = new ArrayList<Stack<Box>>(); for(int i = 0; i < 16; i++) { boxPositions.put(i*40, i); } for ( int i = 0; i < 16; i++){ boxWeights.add( new Stack< Box >()); } boxGen = new BoxGenerator(); timeCounter = 100; ...
[ "public void reset() {\n for(Shape shape : shapes) {\n shape.x = 0;\n shape.y = 0;\n }\n board = new Board(height, width);\n }", "private void resetGame()\n\t{\n\t\t//Attempt to clear the value of every cell on the board\n\t\tfor(int i=1; i<=9; i++)\n\t\t\tfor(int j=1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maximum input channels for the device.
public static native int DeviceInfo_getMaxInputChannels(long deviceInfo);
[ "public int maxChannel() {\n\t\tint c = 0;\n\t\tif(getValue(c) < getValue(1)) c=1;\n\t\tif(getValue(c) < getValue(2)) c=2;\n\t\treturn c;\n\t}", "@SuppressWarnings(\"unused\")\n @UsedByNative\n int getMaxChannels() {\n // The aac audio decoder on this platform will switch its output from 5.1\n // to stere...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines the rector for the university
public void setRector(String first, String last){ //TODO: to be implemented this.firstName = first; this.lastName = last; this.rectorName = firstName + " " + lastName; }
[ "public String getRector(){\r\n\t\t\t//TODO: to be implemented\r\n\t\t\treturn this.rectorName;\r\n\t\t}", "protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}", "public void setRectangle (Rectangle rect) {\n rectangle = rect;\n }", "public static void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
starts tokenizing the source
public List<Token> tokenize(){ // loop through the string till the end while (!sourceEnd()){ tokstart = cursor; tokenizeNext(); } // add an EOF token after the whole file tokenList.add(new Token(TokenType.END_OF_FILE, "\0", null, line, cursor)); re...
[ "private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }", "private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }", "void beginBacktrack() throws TokenizerException;", "public ParseToken getStartToken() { return _startToken; }", "private void parse() {\r\n for (int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
procesa paquete con informacio para procesar el turno adecuado
private void procesaTurno(String msg) { //este es para todos los escuchas // System.out.println("proceso turno>: " + msg); msg = msg.substring(7, msg.length()); int turnoCliente = ScrabbleUtils.StringToInt(msg.charAt(0)); int indice = msg.indexOf("|"); ...
[ "Turno consultarTurno();", "@Override\n public void ejecutaProceso() {\n vProcesoRecarga = true;\n \n //1. Procesa pedido virtual\n if (VariablesCaja.vIndPedidoConProdVirtual)\n { \n //ERIOS 31.01.2014 Verifica la conexion en cada intento.\n //DUBILLUZ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Keep probability for dropout optional float dropout_keep_probability = 6 [default = 0.8];
float getDropoutKeepProbability();
[ "public Builder setDropoutKeepProbability(float value) {\n bitField0_ |= 0x00000004;\n dropoutKeepProbability_ = value;\n onChanged();\n return this;\n }", "@java.lang.Override\n public float getDropoutKeepProbability() {\n return dropoutKeepProbability_;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the minimum number of rotations to reach the second direction from the given first direction.
public static int getRotationsCount(int d1, int d2) { return Math.min(Math.abs(d1 - d2), 2); }
[ "public int minkeys() {\n\t\tint min = 0;\n\t\tif (parentref == null) {\n\t\t\treturn 1;\n\t\t}\n\t\tmin = (int)Math.ceil((degree) / 2.0) - 1;\n\t\t//min = (int)Math.ceil(degree / 2.0);\n\t\treturn Math.max(min, 0);\n\t}", "public int getNumberOfRingsInHopper() {\n\n int currentDistance = (int) hopperRange...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build the JSON structure which holds the client side validation.
protected String buildClientSideValidation() { final JSONObject validatedFieldsJSON = getValidationService().buildValidatedFieldJSONObject(getCommandClass(), getAllowedFields()); return validatedFieldsJSON.toString(); }
[ "public String getValidationJson() {\n\t\treturn validationJson;\n\t}", "public JsonObject exportValidationNotices() {\n return exportJson(validationNotices);\n }", "private List<Map<String, Object>> buildValidCreateResultMap() {\n List<Map<String, Object>> results = new ArrayList<>();\n Map<S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__LineChart__ColorGridLinesXAxesAssignment_8_2" $ANTLR start "rule__LineChart__LabelStringYAxesAssignment_9_2" InternalMyDsl.g:14656:1: rule__LineChart__LabelStringYAxesAssignment_9_2 : ( ruleEString ) ;
public final void rule__LineChart__LabelStringYAxesAssignment_9_2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:14660:1: ( ( ruleEString ) ) // InternalMyDsl.g:14661:2: ( ruleEString ) { // InternalM...
[ "public final void rule__BarChart__LabelStringYAxesAssignment_9_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:14863:1: ( ( ruleEString ) )\n // InternalMyDsl.g:14864:2: ( ruleEString )\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function which handles the output job sequence
public void handleOutputJobs() { for (Job j : problem.getOutputJobSequence()) { // First, get item and find slot from item Item i = problem.getItems().get(j.getItem().getId()); //System.out.println(i.getId()); Slot pickupSlot = i.getSlot(); // Second r...
[ "void completedOutput(TestResult tr, Section section, String outputName);", "protected abstract OutputEvent getNextOutputEvent();", "public CompressJob(){\n\t\tthis.name = \"output\";\n\t}", "@Override\n public void binaryOutputDuring() {\n }", "@Override\n public void binaryOutputFinish() {\n }", "bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This returns a string representation of the URL to lookup the associated ontology term iri in EBI OLS.
@JsonIgnore public String getIriOls() { //TODO move this to service layer if (iri == null || iri.size() == 0) return null; String displayIri = iri.first(); //check this is a sane iri try { UriComponents iriComponents = UriComponentsBuilder.fromUriString(displayIri).build(true); if (iriComponents.ge...
[ "public String getOntologyURI();", "public String getOutputOntologyIRIInString() {\n\t\treturn OUTPUT_ONTOLOGY_IRI_IN_STRING;\n\t}", "private static String getMirrorPathOfOntologyIRI(IRI iri) {\n String iriString = iri.toString();\n iriString = iriString.replaceFirst(\"http://\", \"\").replaceFirs...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates or finds a SourceDataStoreType from its string representation.
@JsonCreator public static SourceDataStoreType fromString(String name) { return fromString(name, SourceDataStoreType.class); }
[ "public static Type Type(String str) {\n\t\ttry {\n\t\t\tJavaIdentifierInputStream jin = new JavaIdentifierInputStream(str);\n\t\t\tBinaryInputStream bin = new BinaryInputStream(jin);\n\t\t\tBinaryAutomataReader reader = new BinaryAutomataReader(bin,\n\t\t\t\t\tTypes.SCHEMA);\n\t\t\tAutomaton automaton = reader.rea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The value of the DocumentsMetadataConfiguration property for this object.
@Updatable public KendraDocumentsMetadataConfiguration getDocumentsMetadataConfiguration() { return documentsMetadataConfiguration; }
[ "public JsonObject convertDocumentConfig() {\n return convertDocumentConfig;\n }", "public RavenJObject getMetadata() {\n return metadata;\n }", "@Schema(description = \"Id of content metadata\")\n public Long getContentMetadataId() {\n return contentMetadataId;\n }", "public Long getFieldconfigu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return (this.unique_desc.equals(other.unique_desc)); return Objects.equals(this.unique_desc, new String(other.unique_desc));
public boolean equal(Object other){ if (other == null) return false; if (other == this) return true; if (!(other instanceof MasterJaguar)) return false; MasterJaguar o = (MasterJaguar) other; return o.unique_desc.equals(this.unique_desc); }
[ "@Override\r\n public boolean equals(Object other) {\r\n \tif (other instanceof NewString) \r\n \t\treturn s.equals(other);\r\n \telse\r\n \t\treturn false;\r\n }", "@Test\n public void testEqualsDifferentDescription() {\n final ConcreteDocumentation other = new ConcreteDocumentation(S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column Obsr_NewBorn_BirthProcessSummary.GestationalWeeks
public void setGestationalweeks(Integer gestationalweeks) { this.gestationalweeks = gestationalweeks; }
[ "public Integer getGestationalweeks() {\n return gestationalweeks;\n }", "public void setWeekNum(Integer week_num);", "public void setGestationaldays(Integer gestationaldays) {\n this.gestationaldays = gestationaldays;\n }", "boolean getWeek7();", "boolean getWeek6();", "public void se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unit test of method HarvestDocumentation.documentHarvest(). For simplicity, this test only covers the normal case; error cases are tested by the method below. Verifies that after calling the method, a new ARC file is created with the appropriate name (see getMetadataARCFileName()). Verifies that this ARC file contains ...
public void testDocumentHarvestOrdinaryCase() throws IOException { /* Run the method on a working-dir that mirrors * TestInfo.METADATA_TEST_DIR. */ TestInfo.WORKING_DIR.mkdirs(); TestFileUtils.copyDirectoryNonCVS( TestInfo.METADATA_TEST_DIR, ...
[ "public void testDocumentHarvestExceptionalCases() {\n try {//Dir does not exist\n IngestableFiles ingestablesWithNonexistingCrawlDir = new IngestableFiles(filesWithNonexistingDir);\n HarvestDocumentation.documentHarvest(ingestablesWithNonexistingCrawlDir);\n fail(\"Should ha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Funcion que ejecuta el query "Buscar por 'ce_secuencial' en la tabla 'Tb_contactos_empresas'
public TbContactosEmpresas buscarPorId(Integer ce_secuencial) { Query query = em.createNamedQuery("TbContactosEmpresas.findByCeSecuencial", TbContactosEmpresas.class).setParameter("ejCodigo", ce_secuencial); TbContactosEmpresas contactoByCodigo = (TbContactosEmpresas) (query.getResultList().get(0)); ...
[ "private static void consulta02() {\n\r\n\t\tvalores = odb.getValues(\r\n\t\t\t\tnew ValuesCriteriaQuery(Empleado.class, Where.equal(\"departamento.dparNombre\", \"contabilidad\"))\r\n\t\t\t\t\t\t.field(\"empleNombre\").field(\"emplePuesto\").field(\"empleSalario2\")\r\n\t\t\t\t\t\t.field(\"departamento.deparNombre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the WeatherConversion with a Bar Recommendation
@Override public String getWeather(WeatherConversion temp) { String str; return null; }
[ "int getWeatherBoostedConditionValue();", "public WeatherResponse convert(Weather weather) {\n return WeatherResponse.builder()\n .description(weather.getDescription())\n .temperature(String.valueOf(weather.getTemperature()))\n .windSpeed(String.valueOf(weather.getWindSpeed()))\n .b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
onSensorChanged checks of collision, set the circle position
@Override public void onSensorChanged(SensorEvent sensorEvent) { // new position for circle circleX = circleX + sensorEvent.values[1] * 2.0f; circleY = circleY + sensorEvent.values[0] * 2.0f; // collision check if(circleX <= marginRectangle + radius + 1) { circle...
[ "@Override\n public void onUpdate()\n {\n if (this.motionX != 0 || this.motionY != 0 || this.motionZ != 0) //TODO replace zero with range check to prevent rounding issues\n {\n reduceMotion();\n correctMotion();\n updateBoundsForMotion();\n }\n\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the fragment is visible to the user and actively running. We registers there shared preference change listener
@Override public void onResume() { super.onResume(); getPreferenceScreen().getSharedPreferences() .registerOnSharedPreferenceChangeListener(this); }
[ "@Override\n public void onFragmentBecomeVisible() {\n if (fragmentLaid.get()) {\n refreshSystemInfo();\n }\n }", "@Override\n public void onStart() {\n super.onStart();\n getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If we failed to get license info for the lead image, just share the text
@Override public void failure(@NonNull Call<MwQueryResponse> call, @NonNull Throwable caught) { PreviewDialog.shareAsText(fragment.getContext(), title, selectedText, funnel); L.e("Error fetching image license info for " + ...
[ "String licenseTextLink();", "public void verifyLicenseInfo() {\r\n\t\tlicenseDetails = SetUp.getDriver().findElement(By.xpath(\"html/body/div[1]/center[2]/div/ul/li[1]\"));\r\n\t\tlicenseDetailstext = licenseDetails.getText();\r\n\t\tif (licenseDetailstext.contains(\"No valid Altimeter license found\")) {\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests to insure incorrect Pin with Card1 fails Tests to insure incorrect Pin with Card2 fails
@Test public void CheckValidAccountIncorrectPin() { setup(); assertFalse(_bank.validate(card1, 1235)); assertFalse(_bank.validate(card2, 6781)); }
[ "@Test\n public void testFalseIfCardNotExists() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // generate a valid card which doesn't exist in the shop\n String nonExistentCard = \"123456789\";\n char lastDigit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a turnAway event to operationSet at the current time turnAway method is dependent on arrival time and cashiercustomer ratio shows overflow as well cusNo refers to number of people in original queue
private int turnAway( double lamda, int s ) { //instantiate customer queue Operations op = new Operations( userNum, turnAwayTime, Operations.TurnedAway); operationSet.add( op ); int custNo = arrCust.size(); int cusTurnedAwayCnt = 0; double at = arriving( lamda ); ...
[ "public void onAway(OnAwayEvent e);", "void reachedCashierAt(int time) {\n reachedCashier = true;\n timeSpentInQueue = time - timeCreated;\n }", "public void action() {\n store.readNextArrival();\n Employee employee = (Employee)this.getActor();\n checkout = store.firstUnmannedCheckout(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a stop and add it to the stops list.
public Stop(int id, String name, double latitude, double longitude, boolean addToList) { this.id = id; this.name = name; this.latitude = latitude; this.longitude = longitude; if (addToList) { addStop(this); } }
[ "public void addToStopList(Stop s){ this.stopList.add(s); }", "public void addToStopList(String stopID, String stopName, String weekTimes, String satTimes\n , String sunTimes, float latitude, float longitude) {\n Stop s = new Stop(stopID, stopName, weekTimes, satTimes,sunTimes, latitude, longitu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the businessStatus value for this BusinessStatusChangedEventArgs.
public localhost.MeetingBrokerServices.BusinessStatus getBusinessStatus() { return businessStatus; }
[ "public java.lang.String getBookingStatus() {\n return bookingStatus;\n }", "public void setBusinessStatus(localhost.MeetingBrokerServices.BusinessStatus businessStatus) {\n this.businessStatus = businessStatus;\n }", "public Integer getBoRepayStatus() {\n return boRepayStatus;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the remote file path of the remote zip artifact.
public String getRemoteFilePath() { return mRemoteFilePath; }
[ "public String getRemotePath() {\n return remotePath;\n }", "public java.lang.String getRemotePath() {\r\n return remotePath;\r\n }", "String getArtifactPath();", "public String getRemoteFileName() {\n\t\treturn this.reader.getRemoteFileName();\n\t}", "public Path getRemoteRepositoryBase...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method takes boolean as an input and executes the selectByStatus query. It returns an ArrayList containing Course objects initialized with Course data from each row in the courses table (database)
public ArrayList<Course> getAllByStatus(boolean status){ ArrayList<Course> results = null; ResultSet resultSet = null; try { resultSet = selectByStatus(status); //Execute the selectByStatus query. resultSet contains the rows returned by the query results = new ArrayList<Course>(); while(...
[ "private ArrayList<String> activeCoursesFromCourses() throws SQLException {\n\n\t\tString sql = \"select course_id, coursename from Courses where courseStatus = 1\";\n\t\treturn activeCoursesList = DatabaseSchemas.idListFromTable(sql, activeCoursesList);\n\t}", "public ArrayList<Course> getAllCourses(){\r\n\t\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor takes no arguments, and sets up file reading and writing. The main proponent is the while loop, which says sets the String fileLine to the next line ready to be read from, and while it is not null, set the array (of size 3) to the number corresponding to each line in the file. Line 1: the positive prime num...
public GF1() throws IOException { String fileLine = null; int arrayCounter = 0; try { br = new BufferedReader(new FileReader(INPUT_FILE)); fw = new FileWriter(OUTPUT_FILE); while ((fileLine = br.readLine()) != null) { // takes the string numbe...
[ "private static void loadPrimes() {\n try {\n BufferedReader reader = new BufferedReader(new FileReader(PRIMES_LOCATION));\n String line = reader.readLine();\n while (line != null) {\n primes.add(Integer.valueOf(line));\n line = reader.readLine()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getting the sales for a certain month
public double getSales(int month, int year) { double total = 0.0; try { String sql = "SELECT SUM(ro_amount) FROM Rental WHERE ro_date LIKE '" + month + "%' AND ro_date LIKE '%" + year + "'"; stmt = conn.prepareStatement(sql); rset = stmt.executeQuery(); if (rset.next()) { total...
[ "public Map<String, Object> salesByMonthInfo();", "public double getSales(int month, int year)\r\n\t{\r\n\t\tdouble total = 0.0;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString sql = \"SELECT SUM(so_amount) FROM Sales WHERE so_date LIKE '\"+month+\"%' AND so_date LIKE '%\" + year + \"'\";\r\n\t\t\tstmt = conn.prepareStatemen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update all drop targets rather than just this target In order for a drop target to recognise a custom format, the format must be registered and the transfer type added to the list of transfers that the target accepts. This must happen before the drag and drop operations starts or the drop target will not accept the for...
static void updateDropTarget() { Update all drop targets rather than just this target // // In order for a drop target to recognise a custom format, // the format must be registered and the transfer type added // to the list of transfers that the target accepts. This // must hap...
[ "private void refreshTargetDropDown() {\n ITargetPlatformService service = getTargetPlatformService();\n if (service != null) {\n ITargetHandle[] targets = service.getTargets(null);\n targetDefinitions = new ArrayList();\n for (int i = 0; i < targets.length; i++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get method "getPosition" to return the Position2D "position"
public Position2D getPosition() { return position; }
[ "Point2D getPosition();", "public Vector2 getPosition();", "public Vector2D getPosition() {\n return metaData.getPosition();\n }", "public Point2D getPosition() {\n \treturn (Point2D)((Point2D)getValue()).clone();\n }", "@Override\n public Position2D getPosition() {\n return this.shape.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts the activities to initialize and update partnerlinks bindings by an array of possible bindings.
protected void insertBindingUpdateActivities(String plink, Map<String,Binding> addyMap, Node addInitHere, Node addUpdateHere){ if (addyMap.containsKey(plink)){ Binding bind = addyMap.get(plink); addInitHere.appendChild(initArrayVar(bind, bind)); addUpdateHere.appendChild(getNextBinding(plink)); for (Strin...
[ "public void installBindings(TableRep bindings) throws RemoteException, Error;", "InterceptorConfigurator addBindings(Set<Annotation> bindings);", "private void generateActivities(int nbrActivities, Element parent) {\n\t\tlog.debug(\"Entering generateActivities(int nbrActivities, Element parent)\");\n\t\tlog.de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds an external force contribution to the node
public synchronized void addExternalForce(Matrix param) { external_force.set(0, 0, external_force.get(0, 0) + param.get(0, 0)); external_force.set(1, 0, external_force.get(1, 0) + param.get(1, 0)); external_force.set(2, 0, external_force.get(2, 0) + param.get(2, 0)); force.set(0, 0, ...
[ "public synchronized void addExternalMoment(Matrix param) {\r\n external_force.set(3, 0, external_force.get(3, 0) + param.get(0, 0));\r\n external_force.set(4, 0, external_force.get(4, 0) + param.get(1, 0));\r\n external_force.set(5, 0, external_force.get(5, 0) + param.get(2, 0));\r\n fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Program__Group__0" $ANTLR start "rule__Program__Group__0__Impl" InternalWh.g:352:1: rule__Program__Group__0__Impl : ( ( rule__Program__FunctionAssignment_0 ) ) ;
public final void rule__Program__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalWh.g:356:1: ( ( ( rule__Program__FunctionAssignment_0 ) ) ) // InternalWh.g:357:1: ( ( rule__Program__FunctionAssignment_0 ) ) ...
[ "public final void rule__Program__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:344:1: ( rule__Program__Group__0__Impl rule__Program__Group__1 )\n // InternalWh.g:345:2: rule__Program__Group__0__Impl rule__...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Wenn der Thread gestartet wird, wartet das Auto eine bestimmte Startzeit und versucht dann, in das Parkhaus zu fahren. Wenn das Parkhaus frei ist, wird geparkt und eine bestimmte Zeit gewartet, bis hinausgefahren wird.
public void run() { try { Thread.sleep(startzeitInMilliSekunden); } catch (InterruptedException ex) { System.out.println("Fehler: Thread Sleep abgebrochen"); } synchronized(parkhaus){ if( parkhaus.freieParkplaetze() == 0) System.out.printl...
[ "public void start(){\n //t.run();\n t.start();\n // if (t==null){\n // t = new Thread(this, stationName);\n // //t.start();\n // t.run();\n // }\n }", "public void start(){ //cria e inicia a thread auxiliar e muda para executando. Retorna caso ao atendent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method to instantiate EquipmentObserver
public void setEquipmentObserver(EquipmentObserver pobserver) { if (pobserver == null && observer != null) { EquipmentManager.getInstance().unregisterObserver(observer); observer = null; } else { if (EquipmentManager.getInstance() != null) { Equipment...
[ "public void registerObserver(FoodObserver o);", "public interface NewEquipmentAdded {\n void onNewEquipmentAdded();\n}", "public static MaintainEquipment getInstance() {\n\t\tif ( instance == null ) {\n\t\t\tlogger.trace( \"There is any instance of an equipment\" );\n\t\t\tinstance = new MaintainEquipment()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
recupera uma lista de Vendas return ArrayList
public ArrayList<ModelVenda> getListaVendasDAO(){ ArrayList<ModelVenda> listamodelVendas = new ArrayList(); ModelVenda modelVendas = new ModelVenda(); try { this.conectar(); this.executarSQL( "SELECT " + "codigo_venda," ...
[ "public List getVigencias();", "public List<Vendedor> listarVendedor();", "public ArrayList<Voto> listaDeiVoti() {\n\n\t\tDB db = getDB();\n\t\tMap<Integer, Voto> map = db.getTreeMap(\"voti\");\n\t\t\n\t\tArrayList<Voto> voti = new ArrayList<Voto>();\n\t\t\n\t\tSet<Integer> keys = map.keySet();\n\t\tfor (int ke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 10 / 1 covered goal: 1 org.apache.commons.collections4.IteratorUtils.unmodifiableIterator(Ljava/util/Iterator;)Ljava/util/Iterator;: rootBranch
@Test public void test10() throws Throwable { fr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1330,"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test10"); HashMap<String, StringTokenizer>[] hashMapArray0 = (HashMap<String, StringTokenizer>[]) Array.newInstance(HashMap.class, 3); ...
[ "@Test\n public void test12() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1332,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test12\");\n MapIterator<Class<StringTokenizer>, StringTokenizer> mapIterator0 = IteratorUtils.emptyMapIterator();\n MapIterato...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the sculptures array list.
public static List<Sculpture> getSculptures() { return sculptures; }
[ "public List<Scaler> getScalerList() {\n return Collections.unmodifiableList(scalerList);\n }", "public String[] getApertureList() {\n ArrayList<String> apertures = new ArrayList<String>();\n int index = 0;\n \n for (index = 0; index < APERTURE_VALUE_LIST.length; index++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end getGameID Method to set the game ID
public void setGameID(String gameID) { //assign the value of the passed variable to the global scope variable this.gameID = gameID; }
[ "public void setGameId(long gameId);", "public void setGameId(String gameId);", "long getGameid();", "public static int getGameID() {\r\n\t\treturn gameID;\r\n\t}", "public String getGameId();", "public void setGameId(Integer gameId) {\n this.gameId = gameId;\n }", "public int getGameId() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reinitializes the random number generator with the given seed parameter value
public static void resetRandomGen(int seed) { randomGen = new Random(seed); }
[ "public void setRNG(long seed);", "public static void resetAlgorithmRandomGen(int seed) {\r\n\t\talgorithmRandomGen = new Random(seed);\r\n\t}", "public static void init(long seed)\n\t{\n\t\tgenerator = new PseudoRandom(seed);\n\t}", "void reSeed(long seed);", "public void reSeedGenerator(long newSeed) { ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
C++: double get(int propId) javadoc: VideoCapture::get(propId)
public double get(int propId) { double retVal = get_0(nativeObj, propId); return retVal; }
[ "@DISPID(2649)\n @PropGet\n double getPictureUnit2();", "@DISPID(162)\n @PropGet\n int getPictureUnit();", "public double getDouble(String property);", "double getPropertyDouble(String key, double def);", "int getMediaValue();", "public int getVideoDscp();", "double getDouble(String propertyName);",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the message destination link.
public void setMessageDestinationLink(final String messageDestinationLink) { this.messageDestinationLink = messageDestinationLink; }
[ "@Override\n public void setLink(java.lang.String link) {\n _messagingRedirectLink.setLink(link);\n }", "public String getMessageDestinationLink() {\n return this.messageDestinationLink;\n }", "public void setLink(Object value) {\n this.link = value;\n }", "public void setDestinatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility method for adding a mesh to your OpenGL instance
public void addMesh(Mesh m, int meshNum) { MeshData md = m.getMeshData(); if (md == null) return; System.out.println(md.toString()); // Provide colors to color buffer Shader s = m.getShader(); if (s instanceof Lambertian) { // TODO#PPA1 Get the diffuse color values from the shader ...
[ "GLMesh(BindStates bindStates, IOpenGL opengl)\n {\n this.bindStates = bindStates;\n this.opengl = opengl;\n }", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write data to the slave standard input of the pseudo terminal.
@Fluent Pty write(String data);
[ "TerminalOutput write(CharSequence text) throws NativeException;", "TerminalOutput write(char ch) throws NativeException;", "private void sendText() {\n String str = txtInput.getText();\n // TODO: Build a history for recalling later.\n \n // Append the newline.\n if (chkCRLF.i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/\ Public Methods \ Enable or disable the underlying implementation's debug flag, if there is one. Debug messages are to be written to the supplied PrintStream.
public void setDebug(boolean debug, PrintStream out) { session.setDebug(debug); if (debug) session.setDebugOut(out); }
[ "public void enableDebug() {\n this.debug = true;\n }", "public void toggleDebug() {\n\t\tdebug = !debug;\n\t}", "public void setDebugging(boolean debug) {\n this.debug = debug;\n }", "private void setDebug(boolean debug) {\n \n this.debug = debug;\n }", "public static v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update the histo tabs if visible.
public void updateHistoTabs(int recordOrdinal, boolean isWithUi) { DataExplorer.this.histoSet.getTrailRecordSet().setPoints(recordOrdinal); DataExplorer.this.updateHistoTabs(RebuildStep.F_FILE_CHECK, isWithUi); // ET rebuilds the graphics only if new files have been found this.updateHistoGraphicsWindow(false);...
[ "public synchronized void setupHistoWindows() {\r\n\t\tif (log.isLoggable(Level.INFO)) log.log(Level.INFO, String.format(\"started\")); //$NON-NLS-1$\r\n\t\tthis.histoSet = HistoSet.getInstance();\r\n\t\tthis.histoSet.initialize();\r\n\r\n\t\tif (this.histoGraphicsTabItem != null) this.resetGraphicsWindowHeaderAndM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the email verification view.
private void showEmailVerificationView(String email) { ConstraintLayout lytSignIn = findViewById(R.id.lytSignIn); ConstraintLayout lytSignUp = findViewById(R.id.lytSignUp); ConstraintLayout lytEmailVerification = findViewById(R.id.lytEmailVerification); TextView tvInfo = findViewById(R.i...
[ "public void displayVerifyProfileEmailDialog(final Long emailId) {\n final Data input = new Data(1);\n input.set(VerifyEMailAvatar.DataKey.EMAIL_ID, emailId);\n setInput(AvatarId.DIALOG_PROFILE_VERIFY_EMAIL, input);\n displayAvatar(WindowId.POPUP, AvatarId.DIALOG_PROFILE_VERIFY_EMAIL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate the value for a SQL Server Instance.
public FormValidation doCheckKbDbServerInstance(@QueryParameter String value) { return FormValidation.ok(); }
[ "boolean verifyInstanceType(String sourceName,\n String instanceTypeGUID,\n List<String> subtypeGUIDs,\n InstanceHeader instance);", "public abstract Value validateValue(Value value);", "public abstract v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
displayUrl() shortens long urls for readability
private String displayUrl() { int maxLength = 50; if (url.length() > maxLength) return url.substring(0, maxLength) + "... "; return url + ":" + " ".repeat(maxLength - url.length() + 3); }
[ "public String getShortUrl(String longUrl) throws MalformedURLException;", "public static String shortenURLForDisplay(final URL u) {\r\n \t\tassert(u != null);\r\n \t\tString host = u.getHost();\r\n \t\tif (host != null && host.length() > 0)\r\n \t\t\treturn u.toString();\r\n \t\tString proto = u.getProtocol();\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Contexts: OptionalInputs returns OptionalInputs Constraint: inputs+=Input+
protected void sequence_OptionalInputs(ISerializationContext context, OptionalInputs semanticObject) { genericSequencer.createSequence(context, semanticObject); }
[ "public int getNumOptionalInputs();", "InputConstraint createInputConstraint();", "public abstract V addInput(@Nullable V value, IN input) throws Exception;", "void addAppliedSolverHasInput(Physical_Attribute newAppliedSolverHasInput);", "Collection<? extends Physical_Attribute> getAppliedSolverHasInput();"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find a property path in the graph from startRoot
public static <T> Path<?> findPropertyPath(String propertyPath, Path startRoot, EntityManager entityManager, BuilderTools misc) { String[] graph = propertyPath.split("\\."); Metamodel metaModel = entityManager.getMetamodel(); ManagedType<?> classMetadata = metaModel.managedType(star...
[ "NamespacedProperty getSourceXPath();", "private static <E> Path<?> getPropertyPath(Path<E> root, String propertyPath) {\n\t\tString[] pathItems = StringUtils.split(propertyPath, \".\");\n\n\t\tPath<?> path = root.get(pathItems[0]);\n\t\tfor (int i = 1; i < pathItems.length; i++) {\n\t\t\tpath = path.get(pathItem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the JavaFX to show guess number
public void run() { stage.show(); showNumber(); }
[ "public void launchGuessNumber() {\n\t\tGuessNumberGame gameGuessNumberGame = new GuessNumberGame(this);\n\n\t}", "private void guess()\n {\n String guess = Greenfoot.ask(\"What do you guess?\");\n guesses.addGuess();\n if (Integer.parseInt(guess) > random)\n {\n text.set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the testing_date value for this RiskCheckPersonRequestType.
public void setTesting_date(java.lang.String testing_date) { this.testing_date = testing_date; }
[ "public void setTestDate(Date testDate) {\n this.testDate = testDate;\n }", "public final void settest_date(String test_date)\n\t{\n\t\tsettest_date(getContext(), test_date);\n\t}", "public void setTestingStartDate(java.util.Calendar testingStartDate) {\n this.testingStartDate = testingStartDat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Divides the current object with the passed argument RatNum.
public RatNum div(RatNum ratNum) throws ArithmeticException { if (ratNum.numerator == 0) throw new ArithmeticException("division_by_zero"); return new RatNum(numerator * ratNum.denominator, denominator * ratNum.numerator, true); }
[ "public abstract Resultat division(Resultat res);", "public RationalNumber divide(RationalNumber other){\n RationalNumber x = new RationalNumber(\n numerator * other.getDenominator(), denominator * other.getNumerator());\n x.reduce();\n return x;\n }", "public RatNum sub(RatNum ratNum) {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build WifiRadioUsage proto A snapshot of Wifi statistics in Batterystats is obtained. Due to reboots multiple correlated logs may be uploaded in a day. Server side should analyze based the ratio of collected properties over the total logging duration (ie. |scanTimeMs| / |loggingDurationMs|) This proto contains addition...
public WifiRadioUsage buildWifiRadioUsageProto() { WifiRadioUsage m = new WifiRadioUsage(); WifiBatteryStats stats = getStats(); if (stats != null) { m.loggingDurationMs = stats.getLoggingDurationMillis(); m.scanTimeMs = stats.getScanTimeMillis(); } return...
[ "public WifiPowerStats buildProto() {\n WifiPowerStats m = new WifiPowerStats();\n WifiBatteryStats stats = getStats();\n if (stats != null) {\n m.loggingDurationMs = stats.getLoggingDurationMillis();\n m.energyConsumedMah = stats.getEnergyConsumedMaMillis()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column TMP_PASTDUE.YIELD
public void setYIELD(BigDecimal YIELD) { this.YIELD = YIELD; }
[ "public void setEXPECTED_YIELD(BigDecimal EXPECTED_YIELD) {\r\n this.EXPECTED_YIELD = EXPECTED_YIELD;\r\n }", "@Before\n\tpublic void setUps() throws SQLException\n\t{\n\t\tinstr_list = new InstructorList();\n\t}", "public void setShielded(boolean shielded) {\n this.shielded = shielded;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the set of interfaces configured on the given port.
Set<Interface> getInterfacesByPort(ConnectPoint port);
[ "Collection<NetworkInterface> getAllNetworkInterfaces();", "public int[] getInterfaces() {\n return interfaces;\n }", "Set<Interface> getInterfaces();", "@Named(\"server:getPortInterfaces\")\n @GET\n @Path(\"/{id}/os-interface\")\n @SelectJson(\"interfaceAttachments\")\n @Fallback(Fallbacks.EmptyS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updateSubmissionStatus: Updates the given submission status in the persistence. The id of the submissionStats can not be UNSET_ID, and all other fields needed for persistence must also be assigned. Exception Handling: Any SqlException or DBConnectionException should be wrapped in a UploadPersistenceException. Implement...
public void updateSubmissionStatus(SubmissionStatus submissionStatus) throws UploadPersistenceException { DeliverableHelper.checkObjectNotNull(submissionStatus, "submissionStatus"); if (!submissionStatus.isValidToPersist()) { throw new IllegalArgumentException("submissionStatus is not valid ...
[ "public void updateSubmissionStatus(SubmissionStatus submissionStatus) throws UploadPersistenceException {\n LOGGER.log(Level.INFO, new LogMessage(\"SubmissionStatus\", getIdFromEntity(submissionStatus), null,\n \"Update SubmissionStatus.\"));\n\n assertEntityNotNullAndValidToPersist(su...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The embedding token for this frame to its parent. Every frame other than the main frame should have a nonzero value here. required optional uint64 embedding_token_low = 1;
@java.lang.Override public long getEmbeddingTokenLow() { return embeddingTokenLow_; }
[ "@java.lang.Override\n public long getEmbeddingTokenLow() {\n return instance.getEmbeddingTokenLow();\n }", "long getEmbeddingTokenLow();", "@java.lang.Override\n public long getEmbeddingTokenHigh() {\n return embeddingTokenHigh_;\n }", "@java.lang.Override\n public long getEm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new test for sounds
public SoundTest() { super("Sound And Music Test"); }
[ "Sound createSound();", "@Test\n public void testYesButtonSound()\n {\n // Initialising a mainMenuChecker class\n MainMenuChecker mainMenuChecker = new MainMenuChecker(mGame);\n mGame.getScreenManager().addScreen(mainMenuChecker);\n\n // Initialising the sound file\n Sound...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a BasicAction whose execute method calls the specified method on every object in the specified list. Assumes that all the objects in the list are of the same class. The method should take no arguments.
static public BasicAction createActionForEach(List list, String methodName) { BasicAction ba = null; try { ba = ByteCodeBuilder.generateBasicActionForList(list, methodName); } catch (GeneratorException ex) { SimUtilities.showError("Error creating action for list: " + methodName, ex); ...
[ "static public BasicAction createActionForEach(List list, Class superClass,\n String methodName)\n\n {\n BasicAction ba = null;\n try {\n ba = ByteCodeBuilder.generateBasicActionForList(list,\n\t\t\t\t\t\t methodName, superClass,\n\t\t\t\t\t\t false);\n } catch (GeneratorException ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the new semester.
@FXML void AddNewSemester(ActionEvent event) throws InterruptedException { int flag2=0; try { Integer.parseInt(SemesterY.getText()); } catch(NumberFormatException e) { flag2=1; MessageInfo("Semester Year Must Be an Integer!!!"); SemesterY.clea...
[ "public Result addSemester() {\n\t\tUser user = Application.getLoggedUser();\n\t\tif (user == null || user.userType != UserType.ADMIN) {\n\t\t\treturn unauthorized(message.render(\"Please log in to the system as administrator\"));\n\t\t}\n\t\tForm<Semester> semesterForm = Form.form(Semester.class);\n\t\tFormatters....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query DB table f_capital_appropriation_apply_receipt for records. The sql statement for this operation is select from f_capital_appropriation_apply_receipt where (form_id = ?)
public FCapitalAppropriationApplyReceiptDO findByFormId(long formId) throws DataAccessException;
[ "public List<FCapitalAppropriationApplyReceiptDO> findByCondition(FCapitalAppropriationApplyReceiptDO FCapitalAppropriationApplyReceipt, long limitStart, long pageSize) throws DataAccessException;", "public FCapitalAppropriationApplyReceiptDO findById(long id) throws DataAccessException;", "public RecordSet loa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ResumeItems__Group__6__Impl" $ANTLR start "rule__TimeSpecifier__Group__0" InternalLPDSL.g:2394:1: rule__TimeSpecifier__Group__0 : rule__TimeSpecifier__Group__0__Impl rule__TimeSpecifier__Group__1 ;
public final void rule__TimeSpecifier__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalLPDSL.g:2398:1: ( rule__TimeSpecifier__Group__0__Impl rule__TimeSpecifier__Group__1 ) // InternalLPDSL.g:2399:2: rule__TimeSpecifie...
[ "public final void ruleTimeSpecifier() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalLPDSL.g:516:2: ( ( ( rule__TimeSpecifier__Group__0 ) ) )\r\n // InternalLPDSL.g:517:2: ( ( rule__TimeSpecifier__Group__0 ) )\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XBlockExpression__Group__3" $ANTLR start "rule__XBlockExpression__Group__3__Impl" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:11322:1: rule__XBlockExpression__Group__3__Impl : ( '}' ) ;
public final void rule__XBlockExpression__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:11326:1: ( ( '}' ) ) // ...
[ "public final void rule__XBlockExpression__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12223:1: ( ( '}' )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ create cache with properties
private void createCache(Properties props) throws Exception { DistributedSystem ds = getSystem(props); cache = CacheFactory.create(ds); assertNotNull(cache); }
[ "CacheProperties createCacheProperties();", "Cache createCache();", "private void makeCache() {\n if (propertyCache == null) {\n propertyCache = new PropertyCache(globals.getConfig());\n\n // Preload any keys, if needed.\n String[] preloadKeys = globals.getConfig().getPreloadedProperties();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds ActivityListener to the activity
void addActivityListener(ActivityListener listener);
[ "public static void registerListener( ActivityListener listener ) {\n listeners.add(listener);\n }", "@Override\n public void onActivityStarted(Activity activity) {\n }", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n if (callbackManager != ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method gets chosen item from the spinner and transform it to string format and send it to CoordinatesOfCities class.
@Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { String city = adapterView.getItemAtPosition(i).toString(); // Return coordinates of cities from CoordinatesOfCities class: CoordinatesOfCities coordinatesofcities = new CoordinatesOfCities(); ...
[ "private void getCityFromSpinner(){\n\n ctSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n ct_selected = ctSpinner.getAdapter().getItem(i).toStri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for upgrade menu. UpgradeMenu both displays description text for each tower, as well as a "Sell Tower" button when a tower on the board is selected.
private UpgradeMenu() { description = "Please select a tower"; background = TowerDefenseGUI.loadImage("StickyNote3.jpg", 250, 200); this.setPreferredSize(new Dimension(250, 200)); this.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 150)); //Sell-Tower button is invisible when a tower is not selected ...
[ "public ToolsMenu() {\n\t\tsuper(\"Tools\");\n\t}", "public UpgradePanel(BrainCell brain) {\n\t\tsetLayout(new GridLayout(3, 4));\n\t\tthis.brain = brain;\n\t\tupgrades.add(new Upgrade(\"Flip Phone\", \"These are ancient, do you even know what they are?\", 1, 10));\n\t\tupgrades.add(new Upgrade(\"Nokia Phone\", \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Database Access Object interface to access Subject table in database
public interface SubjectDAO { //add subject in database public void register(String subjectName, String uid) throws Exception; //update subject in database public void modify(int subjectCode, String subjectName) throws Exception; //select subjectName in database for student public List<SubjectVO> listStudent(St...
[ "List<Staff> getAllBySubject(Subject subject) throws DataAccessException;", "void loadSubjectDetails() {\n sbjDetails = adminOps.getSubjectDetails(); // retrieving the array list from the backend\n SubjectDetails sbj = new SubjectDetails(sbjDetails); /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the storageAccounts property: The storage accounts for this resource.
public List<StorageAccount> storageAccounts() { return this.storageAccounts; }
[ "public StorageAccount storageAccount() {\n return this.storageAccount;\n }", "public abstract List<StorageAccount> listStorageAccounts();", "public String storageAccount() {\n return this.storageAccount;\n }", "public String storageAccountId() {\n return this.storageAccountId;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Minimal ordered Groebner basis.
public List<GenPolynomial<C>> minimalGB(List<GenPolynomial<C>> Gp) { if ( Gp == null || Gp.size() <= 1 ) { return Gp; } // remove zero polynomials List<GenPolynomial<C>> G = new ArrayList<GenPolynomial<C>>( Gp.size() ); for ( Gen...
[ "java.math.BigDecimal getWagerMinimum();", "@gw.internal.gosu.parser.ExtendedProperty\n public gw.pl.currency.MonetaryAmount getBasisGNP() {\n return (gw.pl.currency.MonetaryAmount)__getInternalInterface().getFieldValue(BASISGNP_PROP.get());\n }", "public static Double minimaleWeglänge(GewichteterGraph G, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the contacts of named address book.
public List<Contact> getAllContacts(String name, int max) { List<Contact> contacts = new ArrayList<>(); String addressBookName = doNameCheckOrUseDefault(name); for (AddressBook addressBook : addressBooks) { if (addressBookName.equals(addressBook.getName())) { contacts = addressBook.getAllContacts(max); ...
[ "@Test\n\tpublic void getContactsInAdressBookTest() {\n\t\tSet<Contact> contacts = bookService.getContacts(\"friends\");\n\t\tassertTrue(contacts.contains(new Contact(\"Nikhita\")));\n\t\tassertTrue(contacts.contains(new Contact(\"Arun\")));\n\t\tassertTrue(contacts.contains(new Contact(\"Swati\")));\n\n\t\tcontact...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "InboundCallConfigurationType" element
com.callfire.api.data.InboundType.Enum getInboundCallConfigurationType();
[ "com.callfire.api.data.InboundType xgetInboundCallConfigurationType();", "boolean isSetInboundCallConfigurationType();", "com.callfire.api.data.NumberConfigurationDocument.NumberConfiguration.InboundCallConfiguration getInboundCallConfiguration();", "void setInboundCallConfigurationType(com.callfire.api.data....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adds a property descriptor for the Evidence Type feature.
protected void addEvidenceTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkProduct_evidenceType_feature"), getString("_UI_PropertyDescri...
[ "protected void addProgrammeTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Programme_programmeType_feature\"),\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This tests that a inner 'public final class' can be modified to drop the final modifier. Fixes .
@Test public void finalInnerClassesShouldBecomeNonFinal() throws Exception { MockClassLoader mockClassLoader = new MockClassLoader(new String[] { MockClassLoader.MODIFY_ALL_CLASSES }); mockClassLoader.setMockTransformerChain(Collections.<MockTransformer> singletonList(new MainMockTransformer())); ...
[ "@Test\n public void staticFinalInnerClassesShouldBecomeNonFinal() throws Exception {\n MockClassLoader mockClassLoader = new MockClassLoader(new String[] { MockClassLoader.MODIFY_ALL_CLASSES });\n mockClassLoader.setMockTransformerChain(Collections.<MockTransformer> singletonList(new MainMockTrans...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We don't want to run all webservices together first HomeFragment, second SearchFragment and last UserFragment
@Override public void run() { if (((MyApplication) getApplication()).isUserCreated) { if (footerBusiness) { fm.beginTransaction() .show(fm.findFragmentById(R.id.frag_user_businesses)) .hide(fm.findFra...
[ "private void loadHomeFragment() {\n }", "private void setUpFragments(){\n homeFragment = new HomeFragment();\n historyFragment = new HistoryFragment();\n configFragment = new ConfigurationsFragment(this);\n aboutFragment = new AboutFragment();\n\n currentFragment = homeFragm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
remove the current first line of text
public void removeFirstLine() { Document doc = _textPane.getDocument() ; Element root = doc.getDefaultRootElement() ; int children = root.getElementCount() ; if ( children > 1 ) { Element firstLine = root.getElement(0) ; try { int length = firstLine.getEndOffset() - ...
[ "public String removeFirst() {\n\t\treturn removeAt(0);\n\t}", "private void removeFirst()\r\n\t\t{\r\n\t\t\tinput = input.substring(1);\r\n\t\t}", "public void remove() {\n\t\t// remove text\n\t}", "public void delete(){\n if(currentText != null) {\n //The saved character index should no lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This checkFirstname method will check the user input according to the pattern. for this operation i have imported regex module. added custom exceptions.
public static boolean checkFirstName(String firstName) throws UserRegistrationException { check = Pattern.compile("[A-Z]{1}[a-z]{2,}").matcher(firstName).matches(); if (check) { return true; } else { throw new UserRegistrationException("Enter Valid Fir...
[ "protected void validateFirstName(){\n Boolean firstName = Pattern.matches(\"[A-Z][a-z]{2,}\",getFirstName());\n System.out.println(nameResult(firstName));\n }", "public static void firstName(){\n\n\t\tString firstNameRegex = \"^[A-Z]{1}[a-z]{2,}\";\n\t\tScanner sc = new Scanner(System.in);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates or finds a GroupsSelect from its string representation.
@JsonCreator public static GroupsSelect fromString(String name) { return fromString(name, GroupsSelect.class); }
[ "Enum<? extends ICommandGroupType> fromString(String value);", "private Group makeGroupFromJSON(String json) {\n GsonBuilder b = new GsonBuilder();\n Gson gson = b.create();\n return gson.fromJson(json, GroupImpl.class);\n }", "@JsonCreator\n public static CapabilityGroup fromString(S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ReactApp__FuncAssignment_3_1" $ANTLR start "rule__ReactApp__DirAssignment_4_1" InternalMyDsl.g:14126:1: rule__ReactApp__DirAssignment_4_1 : ( ( RULE_ID ) ) ;
public final void rule__ReactApp__DirAssignment_4_1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:14130:1: ( ( ( RULE_ID ) ) ) // InternalMyDsl.g:14131:2: ( ( RULE_ID ) ) { // InternalMyDsl.g:14131:2...
[ "public final void rule__Action__DirAssignment_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:14886:1: ( ( ( RULE_ID ) ) )\n // InternalMyDsl.g:14887:2: ( ( RULE_ID ) )\n {\n // InternalMyD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the maximum number of ambulances based on the number of patients.
public static long getMaximumNumberOfAmbulances(long patients) { return patients; }
[ "public static long getMinimumNumberOfAmbulances(long patients) {\n return (patients + MAXIMUM_NUMBER_OF_PATIENTS - 1) / MAXIMUM_NUMBER_OF_PATIENTS;\n }", "@ApiModelProperty(value = \"Maxinum number of patient count allowed in this consultationHour\")\n public Integer getMaxPatientCount() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the "now" line color.
public int getNowLineColor() { return config.nowLineColor; }
[ "public int getNowLineDotColor() {\n return config.nowLineDotColor;\n }", "public int getLineColor() {\r\n return LineColor;\r\n }", "public void setNowLineColor(int nowLineColor) {\n config.nowLineColor = nowLineColor;\n invalidate();\n }", "public int getLineColo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a detached, initialised SelectBurdenData6Record
public SelectBurdenData6Record(String country, Integer year, BigDecimal value1, BigDecimal value2, BigDecimal value3, BigDecimal value4, BigDecimal value5, BigDecimal value6) { super(SelectBurdenData6.SELECT_BURDEN_DATA6); set(0, country); set(1, year); set(2, value1); set(3, va...
[ "public SelectBurdenData6Record() {\n super(SelectBurdenData6.SELECT_BURDEN_DATA6);\n }", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "DataFields createDataFields();", "public StockdetalleRecord() {\n\t\tsuper(Stockdetalle.STOCKD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to validate Content circulation Article One Image is displayed
public Boolean contentCirculationArticleOneImageIsDisplayed() { WebPageLoaded.isDomInteractive(); getDriver().findElement(byContentCirculationArticleOneImage).syncVisible(); return getDriver().findElement(byContentCirculationArticleOneImage).isDisplayed(); }
[ "public boolean validImageContent() {\n\t\treturn input.validFile(list);\n\t}", "private void checkImage()\n {\n if(this.c.isVisible())\n {\n switch(this.c.getValue())\n {\n case 0:\n this.image = EMPTY;\n break;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column T_IM_MANUFACTURERECBILLENTRY.FPROJECTID
public String getFprojectid() { return fprojectid; }
[ "public Long getProjectID() {\r\n RemoteCustomFieldValue[] values = this.issue.getCustomFieldValues();\r\n\r\n for (RemoteCustomFieldValue value : values) {\r\n if (value.getCustomfieldId().trim().toLowerCase().equals(ConfigUtils.getIssueTrackingConfig().getProjectIDField().trim().toLowerCa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates a hazard level between 0 and 100. Indicates the hazard level in a location based on information available from multiple hazard sensors at the location.
int evaluateHazardLevel();
[ "@Override\n\tpublic int getHazardLevel()\n\t{\n\t\t/* Get current reading from the sensor */\n\t\tint reading = super.getCurrentReading();\n\t\t\n\t\tif(reading >= 0 && reading <= 999)\n\t\t\treturn 0;\t//return 0 as hazard level\n\t\telse if(reading >= 1000 && reading <= 1999)\n\t\t\treturn 25;\t\t//return 25 as ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets known X12TimeFormat values.
public static Collection<X12TimeFormat> values() { return values(X12TimeFormat.class); }
[ "protected DateFormatSymbols getSymbols() {\n\t\treturn formatData;\n\t}", "private String getTimeFormat() {\r\n return mData.getConfiguration(\"x-labels-time-format\", \"yyyy-MM-dd\");\r\n }", "public Integer getHour12() {\r\n return hour12;\r\n }", "public short[] getValues() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Moves to next lane
public void nextLane() {laneId++;}
[ "public void move()\n {\n stop++;\n if (stop >= STOPS[route].length)\n {\n stop = TERMINAL; // -1 means we are at the terminal\n route = (route + 1) % ROUTES.length;\n }\n }", "private void laneMove() {\r\n \t\tcounter++;\r\n \t\tif (counter % (PART_WIDTH/amplitude) == 0) {\t// reset lane ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the e s f entity state where className = &63; and classPK = &63; from the database.
public it.ethica.esf.model.ESFEntityState removeByESFEntityStateC_PK( java.lang.String className, long classPK) throws com.liferay.portal.kernel.exception.SystemException, it.ethica.esf.NoSuchEntityStateException;
[ "public it.ethica.esf.model.ESFEntityState removeByAllESFEntityStateClassName_ClassPK(\n\t\tjava.lang.String className, long classPK)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tit.ethica.esf.NoSuchEntityStateException;", "public it.ethica.esf.model.ESFEntityState removeByESFEntityStat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the nombre status clave.
public String getNombreStatusClave() { return nombreStatusClave; }
[ "public int getIdEstatusClave() {\r\n\t\treturn idEstatusClave;\r\n\t}", "public void setNombreStatusClave(String nombreStatusClave) {\r\n\t\tthis.nombreStatusClave = nombreStatusClave;\r\n\t}", "public java.lang.String getNomeStatus() {\r\n return nomeStatus;\r\n }", "public String getbvStatus() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the saved password
public void removePassword() { setPassword(""); fetchPassword(); }
[ "public void testRemoveSavedPassword()\n {\n // remove the saved password\n credentialsService.removePassword(accountPrefix);\n\n // try to load the password\n String loadedPassword = credentialsService.loadPassword(accountPrefix);\n assertNull(\"Password was not removed\", loa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the affiliate credential.
public AffiliateCredential getAffiliateCredential() { return credential; }
[ "public CredentialReference getCredential() {\n return this.credential;\n }", "public Object getCredential()\n {\n return this.credential;\n }", "public Credential getCredential() {\n return credential;\n }", "Credential getCredential() {\n return credential;\n }", "public Datab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OnItemSelectedListener listener; This event fires 1st, before creation of fragment or any views The onAttach method is called when the Fragment instance is associated with an Activity. This does not mean the Activity is fully initialized.
@Override public void onAttach(Context context) { super.onAttach(context); if(context instanceof OnItemSelectedListener){ // context instanceof YourActivity this.listener = (OnItemSelectedListener) context; // = (YourActivity) context } else { throw new ClassCast...
[ "public void addListenerOnStrTensionSpinnerItemSelection(){\n spinnerStrTension = (Spinner) findViewById(R.id.stringTensionSpinner);\n spinnerStrTension.setOnItemSelectedListener(new CustomOnItemSelectedListener());\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, V...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }