query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Creates a new FeatureTypeSchema_Impl object.
public FeatureTypeSchema_Impl() { schema = XMLTools.create(); }
[ "SchemaType createSchemaType();", "SchemaDefinition createSchemaDefinition();", "public FeatureTypeSchema_Impl(org.w3c.dom.Document schema) throws Exception {\r\n setSchema(schema);\r\n }", "public FeatureTypeSchema_Impl(org.w3c.dom.Element schema) throws Exception {\r\n this();\r\n se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of UnresolvableReferenceException without detail message.
public UnresolvableReferenceException() { }
[ "public UnresolvableReferenceException(String msg) {\n super(msg);\n }", "public ReferenciaNoDisponibleException() {\n }", "public LocalizedException(MessageResolvable resolvable) {\n super(null, null);\n this.resolvable = resolvable;\n }", "public ReferenceModelNullException(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/< Holds iItineraryComponent instance to be decorated ! Constructor
protected ItineraryDecorator(iItineraryComponent componentToDecorate) { this.componentToDecorate = componentToDecorate; }
[ "public CustomComponent() {\n \t}", "public SecretaryInterface() {\n initComponents();\n }", "public Decorator() {\n }", "ContainerSuppliedInterceptorFactory(PicoContainer pico, Object interceptorComponentKey) {\n this.pico = pico;\n this.interceptorComponentKey = interceptorCompone...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method manages the multiple selection of your current objects. You should change the parameter type of your array of Objects to manage your specific selection
@Inject @Optional public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) Object[] selectedObjects) { }
[ "protected void setSelectedObjects() {\r\n\t\tint index, arrayLength;\r\n\t\tVector oldObjects = (Vector) getSelectedObjects().clone();\r\n\t\tgetSelectedObjects().removeAllElements();\r\n\t\tint[] intArray = table.getSelectedRows();\r\n\t\tarrayLength = intArray.length;\r\n\t\tfor (int i = 0; i < arrayLength; i++)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if any of the rights represented by the rights argument has been granted on the database object identified by the dbobject argument. This is done by checking that a mapping exists in the rights map from the dbobject argument for at least one of the rights contained in the rights argument. Does not consider...
boolean isDirectlyAccessible(Object dbobject, int rights) throws HsqlException { if (isAdministrator) { return true; } if (dbobject instanceof String) { if (((String) dbobject).startsWith("org.hsqldb.Library") || ((St...
[ "boolean isAccessible(Object dbobject, int rights) throws HsqlException {\n\n /*\n * The deep recusion is all done in getAllRoles(). This method\n * only recurses one level into isDirectlyAccessible().\n */\n if (isDirectlyAccessible(dbobject, rights)) {\n return tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of idSmsAgendaDestModified
public boolean isIdSmsAgendaDestModified() { return idSmsAgendaDestModified; }
[ "public void setIdSmsAgendaDestModified(boolean idSmsAgendaDestModified)\r\n\t{\r\n\t\tthis.idSmsAgendaDestModified = idSmsAgendaDestModified;\r\n\t}", "public java.lang.Long getIdUsuarioDestino() {\r\n return idUsuarioDestino;\r\n }", "String getDest_id();", "public boolean isIdSmsAgendaGrupoModifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the message part in the message structure.
public static Part findPart(Message message, String name) { Part result = null; if (message != null) { result = (Part) message.getPart(name); } return result; }
[ "@java.lang.Override\n public net.runelite.client.party.Party.Part getPart() {\n if (msgCase_ == 2) {\n return (net.runelite.client.party.Party.Part) msg_;\n }\n return net.runelite.client.party.Party.Part.getDefaultInstance();\n }", "private static Message getMessage(Part p) throws M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interprets the lowest 8 bits of the specified value as an unsigned integer number and renders that number as a twodigit hex string.
public static String unsignedByteToString(int value) { return String.format("%02x", value & 0xff); }
[ "public static String unsignedWordToString(int value) {\n\t\treturn String.format(\"%08x\", value);\n\t}", "public static String unsignedHalfwordToString(int value) {\n\t\treturn String.format(\"%04x\", value & 0xffff);\n\t}", "public static String hex(int value) { return Integer.toHexString(value).toUpperCase(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Requires: any valid double value. Modifies: modifies the accountBalance by adding the value to the accountBalance. Can use negative values.
public void addAccountBalance(double value){ accountBalance += value; }
[ "void addBalance(double amount) {\n\t\tbalance += amount;\n\t}", "public void addToBalance(double amountToAdd) {\n balance+=amountToAdd;\n\n }", "public double addToBalance(double addAmount){\r\n\t\tbalance +=addAmount;\r\n\t\treturn balance;\r\n\t}", "public void increaseBalance(final double balance) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the correction for a certain symbol.
public String correct(String symbol) { return correct("",symbol,"","",getLinkBandwidth()); }
[ "public String getCorrectionWord(String misspell);", "public List<AnalyzerSymbol> getCorrections(String symbol) {\n\t\tList<AnalyzerSymbol> r = new ArrayList<AnalyzerSymbol>();\n\t\tif (getKnownSymbols().containsKey(symbol)) {\n\t\t\tAnalyzerSymbol s = new AnalyzerSymbol();\n\t\t\ts.symbol = symbol;\n\t\t\ts.prob...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a film from the database by uniqueid
public void removeFilm(int uniqueid){ // Cycle through all the films stored and compare the uniqueid for(Film current_film : this.cinema_film_list){ if(current_film.getID() == uniqueid){ // Remove film if found this.cinema_film_list.remove(current_film)...
[ "public void deleteFilm(String id);", "boolean remove(Film film);", "public boolean deleteFilm(Film film);", "public void removeFilm(Film film){\r\n\t\t// Make sure the film actually exists in the database\r\n\t\tif(cinema_film_list.contains(film)){\r\n\t\t\t// Remove the film from the internal database\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Specifies the requirement for each tools. map&lt;string, .tensorflow.ToolRequestOptions&gt; tool_options = 8;
java.util.Map<java.lang.String, tensorflow.TpuProfiler.ToolRequestOptions> getToolOptionsMap();
[ "tensorflow.TpuProfiler.ToolRequestOptions getToolOptionsOrThrow(\n java.lang.String key);", "public Builder putToolOptions(\n java.lang.String key,\n tensorflow.TpuProfiler.ToolRequestOptions value) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new client to invoke service methods on AWSLambda using the specified AWS account credentials. All service calls made using this new client object are blocking, and will not return until the service call completes.
public AWSLambdaClient(AWSCredentials awsCredentials) { this(awsCredentials, new ClientConfiguration()); }
[ "public AWSLambdaClient() {\n this(new DefaultAWSCredentialsProviderChain(), new ClientConfiguration());\n }", "public AWSLambdaClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) {\n super(adjustClientConfiguration(clientConfiguration));\n \n this.awsCred...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate a int array with length , and the scope of the element
public static int[] generateRandomIntArray(int length, int scope) { int[] tempIntArray = new int[length]; int i = 0; while (i < length) { tempIntArray[i] = (int) (Math.random() * scope); } return tempIntArray; }
[ "private int[] genArray(int x) {\n\t\tint[] result = new int[x];\n\t\tfor(int i=0; i<x; i++) {\n\t\t\tresult[i] = i;\n\t\t}\n\t\treturn result;\n\t}", "static int[] populateArray(int lenght) {\n\t\tint[] A = new int[lenght];\n\t\t\n\t\tfor(int i=0; i < A.length; i++) {\n\t\t\tA[i] = (int)(Integer.MAX_VALUE * Math...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the reciprocal of this rational number
public RationalNumber reciprocal() { return new RationalNumber(denominator, numerator); }
[ "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "private Rational reciprocal() {\n return new Rational(denominator, numerator);\n }", "public Fraction reciprocal()\n {\n int newNumerator = this.getDenominator();\n int newDenominator = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the described property event.
public void handleEvent(SimplePropertyEvent<S, D> event);
[ "public void handleProperty(String property) {\n\t propertyName = property;\n\t}", "@Override\n protected void handlePropertyChange(int propertyId) {\n super.handlePropertyChange(propertyId);\n }", "public void valueChange(Property.ValueChangeEvent event);", "@Override\n public void propert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
for(GameObject g: world)if (g instanceof Net)return (Net)g;
Net findNet(){ Iterator iterator = gc.getIterator(); while(iterator.hasNext()){ GameObject g = iterator.getNext(); if (g instanceof Net)return (Net)g; } return nullNet; }
[ "GameObject findSeaweed(){\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Seaweed)return g;\r\n\t\t}\r\n\treturn nullSeaweed;\r\n\t}", "public Net getNet(String name) {\n return netMap.get(name);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the policy for a certificate. Set appropriate members in the certificatePolicy that must be updated. Leave others as null.
public CertificatePolicy updateCertificatePolicy(UpdateCertificatePolicyRequest updateCertificatePolicyRequest) { return updateCertificatePolicy(updateCertificatePolicyRequest.vaultBaseUrl(), updateCertificatePolicyRequest.certificateName(), updateCertificatePolicyRequest.certificatePolicy()); ...
[ "L3Policy update(String l3PolicyId,L3Policy l3Policy);", "public void updatePolicy(CompanyPolicy cP ) {\n\t\tTransaction tx = session.beginTransaction();\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, cP.getPolicyNo());\n\t\t//Update fields which are allowed to modify\n\t\tcPolicy.se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .in.trujobs.proto.PreScreenSalaryObject salary = 10;
public in.trujobs.proto.PreScreenSalaryObject getSalary() { return salary_ == null ? in.trujobs.proto.PreScreenSalaryObject.getDefaultInstance() : salary_; }
[ "public in.trujobs.proto.PreScreenSalaryObjectOrBuilder getSalaryOrBuilder() {\n return getSalary();\n }", "public void setSalary(double salary){\r\n this.salary = salary;\r\n }", "public void setSalary(double salary) {\n this.salary = salary;\n }", "public void setSalary(double salary);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This tests the situation when the state is asked to be set, but the properties file does not yet exist. The implementation should create the properties file, and then set the state.
@Test public void setStateWhenFileNotExistTest() { try { deleteFile(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename()); // Perform the operation runtimeConfigDAOPropertiesFile.setState(new State(State.DISABLED)); Assert.assertTrue(runtimeCo...
[ "@Test\r\n public void setStateWhenFileCannotExistTest() {\r\n try {\r\n deleteFile(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n // make a directory by the same name as the properties file. This will result in a FNFException when trying to open it as a file\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the class of one declared object for rule constructDeeperUnderstanding03_PATH_2_GOAL_7_COMPONENT_txtParcela2_21.
private Class getDeclaredClass_constructDeeperUnderstanding03_PATH_2_GOAL_7_COMPONENT_txtParcela2_21(int index) { switch (index) { case 0: return module.entity.Action.class; case 1: return module.entity.MERFunction.class; case 2: return module.entity.RuleToHuman.class; ...
[ "private Class getDeclaredClass_constructDeeperUnderstanding03_PATH_1_GOAL_1_COMPONENT_txtParcela1_2(int index) {\r\n switch (index) {\r\n case 0: return module.entity.Action.class;\r\n case 1: return module.entity.MERFunction.class;\r\n case 2: return module.entity.RuleToHum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.lvl6.proto.UserQuestJobProto userQuestJobs = 4; if this quest job is the last one for the quest and the user finishes it, then the boolean above, isComplete, would also be set
public java.util.List<? extends com.lvl6.proto.QuestProto.UserQuestJobProtoOrBuilder> getUserQuestJobsOrBuilderList() { if (userQuestJobsBuilder_ != null) { return userQuestJobsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(user...
[ "public java.util.List<? extends com.lvl6.proto.QuestProto.UserQuestJobProtoOrBuilder> \n getUserQuestJobsOrBuilderList() {\n return userQuestJobs_;\n }", "public com.lvl6.proto.QuestProto.UserQuestJobProto.Builder addUserQuestJobsBuilder() {\n return getUserQuestJobsFieldBuilder().addBuilde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find want to generate aidl list with cache
public static List<String> findWantToGenerateAidlListWithCache(List<String> sourceDirectoryList, Properties cacheProperties) { return FileUtil.findFileListWithCache(sourceDirectoryList, cacheProperties, Constants.Symbol.DOT + Constants.File.AIDL, true); }
[ "boolean hasCache(int listType);", "List<Link> findLinkByCache();", "protected void createLookupCache() {\n }", "void initListRemainingId();", "protected abstract void setIdListToCache(List<Long> inActivityIds, StreamView inCompositeStream, long inUserId);", "public void cacheResult(java.util.List<Agen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
init params of SpeechRecognizer
public void initparams(Intent intent) { //settting the hint sound when start, end, succuss, error, cancel intent.putExtra(ASRHelper.EXTRA_SOUND_START, R.raw.bdspeech_recognition_start); intent.putExtra(ASRHelper.EXTRA_SOUND_END, R.raw.bdspeech_speech_end); intent.putExtra(ASRHelper.E...
[ "private void setRecognizerParam(SettingParams params) {\n if (mRecognizer == null)\n return;\n //清空所以参数\n mRecognizer.setParameter(SpeechConstant.PARAMS, null);\n //设置听写引擎\n mRecognizer.setParameter(SpeechConstant.ENGINE_TYPE, SpeechConstant.TYPE_CLOUD);\n //设置返...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
signal stop to all worker threads.
public void stop() { for(int i=0; i < numWorkers; i++) { workers[i].shutdown(); } }
[ "void stop() {\n\t\tif (worker != null){\r\n//\t\t\tSystem.out.println(\"stopping worker...\");\r\n\t\t\tworker.cancel();\r\n\t\t\tworker = null;\r\n\t\t}\r\n\r\n\t}", "public void stop() {\n stopped.set(true);\n for (Thread thr : taskThreads) {\n try {\n \t thr.join();// wait fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve an injector by its socket.
public abstract SocketInjector waitSocketInjector(Socket socket);
[ "public abstract SocketInjector peekSocketInjector(SocketAddress address);", "Object getSocket();", "public abstract void setSocketInjector(SocketAddress address, SocketInjector injector);", "Socket getSocket();", "@Nullable\n abstract Object getSocket();", "public Injector getInjector() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleTransition" $ANTLR start "entryRuleActionsDecl" ../br.ufpe.cin.Tupi/srcgen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:784:1: entryRuleActionsDecl returns [EObject current=null] : iv_ruleActionsDecl= ruleActionsDecl EOF ;
public final EObject entryRuleActionsDecl() throws RecognitionException { EObject current = null; EObject iv_ruleActionsDecl = null; try { // ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:785:2: (iv_ruleActionsDecl= ruleActionsDecl EOF ) ...
[ "public final EObject entryRuleTransition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTransition = null;\n\n\n try {\n // ../org.eclipse.xtext.example.fowlerdsl/src-gen/org/eclipse/xtext/example/fowlerdsl/parser/antlr/internal/InternalStatemachine.g:3...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find field schema id by id.
String findFieldSchemaIdById(@DatasetId Long datasetId, String idField);
[ "private String getTableSchemaIdFromIdFieldSchema(DataSetSchema schema, String idFieldSchema) {\n String tableSchemaId = \"\";\n Boolean locatedTable = false;\n for (TableSchema table : schema.getTableSchemas()) {\n for (FieldSchema field : table.getRecordSchema().getFieldSchema()) {\n if (fiel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[Call Log Account Filter] when enabled, allow user to filter out call logs from specific account
public static boolean isCallLogAccountFilterEnabled() { String operatorSpec = SystemProperties.get("persist.operator.optr", ""); // Return true on OP01 or OP02 if (operatorSpec.equals("OP01") || operatorSpec.equals("OP02")) { return true; } return false; }
[ "public void setAccountFilter(Filter<Account> accountFilter) {\n this.accountFilter = accountFilter;\n }", "public void setCallLogsFriend(String account, String device);", "public AccountFilterRecord() {\n super(AccountFilter.ACCOUNT_FILTER);\n }", "LoginFilter() {\n mAppendInvalid ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of FacturaBean
public FacturaBean() { }
[ "public DetalleFacturaBean() {\r\n facturaDetalle = new DetalleFactura();\r\n }", "public FichaBean() {\n\t}", "public Factura() {\r\n }", "public FacturaCabecera(){\r\n }", "public CadCategoriaBean() {\n }", "public FuncionarioBean() {\n }", "public ClasificacionBean() {\r\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XRelationalExpression__Group_1_0__0" $ANTLR start "rule__XRelationalExpression__Group_1_0__0__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4554:1: rule__XRelationalExpression__Group_1_0__0__Impl : ( ( rule__XRelationa...
public final void rule__XRelationalExpression__Group_1_0__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4558:1: ( (...
[ "public final void rule__XRelationalExpression__Group_1_1_0__0() 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:476...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find addresses by polygon
public Multi<Address> findByPolygon(String afterId, String polygon, String crs, String status) { SqlAddress qry = new SqlAddress(); qry.polygon(); List lst = new ArrayList(4); lst.add(CoordConverter.makeWktPolygon(polygon, crs)); where(lst, qry, "a.status", status); paginate(lst, qry, NsConverter.addre...
[ "List<GeoPoint> findGeoIntersections(Ray ray);", "private Map<String, Set<org.locationtech.jts.geom.Geometry>> sliceGeometry(\n final Geometry geometry, final Set<PreparedPolygon> countryBoundaryPolygons,\n final long identifier)\n {\n final Set<Geometry> filteredPieces = new HashS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Borrando el producto del servidor
private void borrandoProducto() { try { productoMI.remove(productoSelecionado.getId().toString()); getAllProductos(); } catch (ErrorServerException ex) { LOG.log(Level.SEVERE, "ErrorServerException"); alert = new Alert(AlertType.ERROR); alert...
[ "public void sendProduct(final Product product) throws Exception;", "private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.siz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Order confirmation page(?controller=orderconfirmation) is opened
public OrderVerifyController orderConfirmationPageIsDisplayedSuccessfully() { assertTrue(Driver.getCurrentUrl().contains("controller=order-confirmation")); return this; }
[ "public void do_confirm_order() {\r\n\t\ttry {\r\n\t\t\tclick(confirm_order);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t}", "public void confirmOrder() {\r\n\t\tlogger.info(\"Confirming The Order Starts::::::\");\r\n\r\n\t\ttry {\r\n\r\n\t\t\tUser loggedInUser = loginManager.getUserObj...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for snake square
public int getSnakeSquare() { return snakeSquare; }
[ "public Snake getSnake() {\n return snake;\n }", "public int getSnakeStartLength();", "public List<Pair> GetSnake() {\n return snake;\n }", "public int getSnakeScore() {\n return snakeScore;\n }", "public Directions getSnakeDirection() {\n return snakeDirection;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a BoundingBox for a List of Points
@Nullable private static BoundingBox pointsBox(@Nullable BoundingBox result, @NonNull List<Point> points) { for (Point q : points) { result = expand(result, q); } return result; }
[ "List<GeographicBoundingBox> getBoundingBoxes();", "private static void computeBoundingBox() {\r\n\t\txmax = xmin = input_verts.get(0).x;\r\n\t\tymax = ymin = input_verts.get(0).y;\r\n\t\tzmax = zmin = input_verts.get(0).z;\r\n\t\t\r\n\t\tfor (int i = 1; i < input_verts.size(); i ++) {\r\n\t\t\txmax = Math.max(xm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert from aiproj.slider.Move to this move representation.
public static Move fromAiProjMove(aiproj.slider.Move from) { Move to; Direction convertedDirection; if (from.d == aiproj.slider.Move.Direction.DOWN) convertedDirection = Direction.DOWN; else if (from.d == aiproj.slider.Move.Direction.LEFT) convertedDirection = Direction.LEFT; els...
[ "public static aiproj.slider.Move toAiProjMove(Move from) {\n aiproj.slider.Move to;\n aiproj.slider.Move.Direction convertedDirection;\n if (from.getDirection() == Direction.DOWN) convertedDirection = aiproj.slider.Move.Direction.DOWN;\n else if (from.getDirection() == Direction.LEFT) c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
In the race for the best Internet browser, there's now a new contender for it, this browser is called the: "The Semantic MindReader!" After its promo on the world wide web, everyone's been desperately waiting for the browser to be released. And why shouldn't they be curious about it, after all, it's the new project of ...
public static void browserMain(String args[] ) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); int t = Integer.parseInt(line); //System.out.println("Hello World!"); for(int i=0;i<t;i++){ S...
[ "private String readWebpage(PrintWriter writer) {\n\n\t\t// create new userAgent (headless browser)\n\t\tUserAgent userAgent = new UserAgent();\n\n\t\t// visit a url\n\t\ttry {\n\t\t\tuserAgent.visit(url);\n\n\t\t\ttitle = userAgent.doc.findFirst(\"<title>\").getText();\n\n\t\t\t// prints all text with \"span\" hea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last moi delete documents in the ordered set where uploadedDate = &63;.
public MOIDeleteDocuments fetchByUploadedDate_Last( Date uploadedDate, com.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments> orderByComparator);
[ "public java.util.List<MOIDeleteDocuments> findByUploadedDate(\n\t\tDate uploadedDate);", "public MOIDeleteDocuments findByUploadedDate_Last(\n\t\t\tDate uploadedDate,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<MOIDeleteDocuments>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchMOIDeleteDocumentsExcept...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
procemiento llamado agregarPublicacion agregado de publicacion
public void agregarPublicacion(Publicacion p) { PublicacionDAOImp publicacionDAOImp = new PublicacionDAOImp(); publicacionDAOImp.add(p); }
[ "public void aprobarPublicacion (PublicacionMascota publi) {\n if (publi.getTipoPublicacion().equals(TipoPublicacion.PENDIENTE)){\n publi.setTipoPublicacion(TipoPublicacion.APROBADA);\n EntityManagerHelper.beginTransaction();\n EntityManagerHelper.entityManager().merge(publi)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Takes a set of paths and returns a list of tokenized poems. If words are marked by the word, "eol", it should have a line separator character following it.
public static Set<List<String>> loadPoems(Set<Path> paths) throws IOException { Set<List<String>> result = new HashSet<>(); for (Path p : paths) { List<String> wordsSource = Tokenizer.tokenize(p); List<String> wordsProcessed = new ArrayList<>(); // process the string...
[ "private static String[] split(String paths) {\n String pathSeparator = System.getProperty(\"path.separator\"); //$NON-NLS-1$\n StringTokenizer pathElems = new StringTokenizer(paths, \n pathSeparator);\n String[] pathElements = new String[pathElems.countTokens()];...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a process to this node and sets it as Full
public void allocateNode(int processId){ this.processId = processId; this.full = true; }
[ "public void addProcess(PCB process) {\r\n if(getSize() < MAX_SIZE) {\r\n readyQueue.offer(process);\r\n }\r\n }", "void addProcess(IveProcess process);", "public boolean addProcess(Process p){\n\t\tioQueue.insert(p);\n\t\tstats.maxIOQueueSize = Math.max(stats.maxIOQueueSize, ioQueue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets ith "abstract" element
public void setAbstractArray(int i, edu.umich.icpsr.ddi.AbstractType xabstract) { synchronized (monitor()) { check_orphaned(); edu.umich.icpsr.ddi.AbstractType target = null; target = (edu.umich.icpsr.ddi.AbstractType)get_store().find_element_user(ABSTRACT$2, i); ...
[ "public void setElement(Object e) {\n element = e;\n }", "public void setElement(Object e) {\n element = e;\n }", "public void setAbstract(String abstractText);", "public abstract void setElem(int bank, int i, int val);", "public void setElement(T e) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Manipulation methods Sets the "selected" state of the given nodes or edges to the given value.
public static void setSelectedState(CyNetwork network, Collection<? extends CyIdentifiable> nodesOrEdges, boolean value) { for (CyIdentifiable foo: nodesOrEdges) { network.getRow(foo).set(CyNetwork.SELECTED, value); } }
[ "@Messages({\n \"EXC_NodeCannotBeNull=Cannot use null for node selection.\",\n \"EXC_NoElementOfNodeSelectionMayBeNull=No element of a node selection may be null.\"\n })\n public final void setSelectedNodes(final Node[] value)\n throws PropertyVetoException {\n class AtomicSetSelectedN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add code to print out the key hash
private void printKeyHash() { try { PackageInfo info = getPackageManager().getPackageInfo("com.sar.biteit", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signatu...
[ "public void printHashKey() {\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\n \"com.t.classified\",\n PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDiges...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the smallest cost matching using the Hungarian algorithm. For verification purposes.
public double verifyHungarian() { HungarianAlgorithm test = new HungarianAlgorithm(costMatrix); int[] tester = test.execute(); double totalCost = 0; for (int i = 0; i < tester.length; i++) { totalCost += costMatrix[i][tester[i]]; } return totalCost; }
[ "float minH6(char[] y,// [6],\n\t\t\tfloat[] charwts,// [6],\n\t\t\tfloat[][] mus)// [6][4])\n\t{\n\n\t\t// locate least reliable\n\t\tfloat leastreliablewt = charwts[0];\n\t\tchar leastreliablechar = 0;\n\n\t\tif (charwts[1] > leastreliablewt) {\n\t\t\tleastreliablewt = charwts[1];\n\t\t\tleastreliablechar = 1;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
percentage threshold for domain aggregate quota warnings
@ZAttr(id=1330) public void unsetDomainAggregateQuotaWarnPercent() throws com.zimbra.common.service.ServiceException { HashMap<String,Object> attrs = new HashMap<String,Object>(); attrs.put(Provisioning.A_zimbraDomainAggregateQuotaWarnPercent, ""); getProvisioning().modifyAttrs(this, attrs);...
[ "@ZAttr(id=1330)\n public int getDomainAggregateQuotaWarnPercent() {\n return getIntAttr(Provisioning.A_zimbraDomainAggregateQuotaWarnPercent, 80);\n }", "@Override\n public abstract float calculaQuota(float quotaBase) throws ExcepcioClub;", "@ZAttr(id=1330)\n public void setDomainAggregateQu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides an interface specifying a generic type of developer.
public interface Developer { /** * Performs development work. */ public void develop(); }
[ "public User getDeveloper() {\n\t\treturn this.developer;\n\t}", "public interface Generified {\n\n\n /**\n * @return The information about this entity generification.<br>\n * The generics metadata for this element\n */\n Generics generic();\n\n}", "public interface TypedSupplierAdmin\n\textends TypedSu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the singleton instance of the ObservationHandler. This method implements the double locking pattern to ensure that this singleton is thread safe.
public static ObservationHandler getInstance(){ if(instance == null){ synchronized (lock){ if(instance == null){ instance = new ObservationHandler(); } } } return instance; }
[ "public static DatabaseHandler getInstance() {\n return singleton;\n }", "public static AuctionFileHandler getSingletonInstance()\n {\n return auctionFileHandler;\n }", "public static API getInstance() {\n return singleton;\n }", "public static IngestInformationServiceLocal ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes all measured timings
public void clear() { timings.clear(); this.reset(); }
[ "public void clearTimes();", "public void deleteTicks(){\n ZonedDateTime timer = ZonedDateTime.now(ZoneOffset.UTC);\n cleanup(timer, tickRecords, true);\n cleanup(timer, minTicks, false);\n cleanup(timer, maxTicks, false);\n }", "public void removeAllTime() {\r\n\t\tBase.removeAll...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the main course description of a meal
public String getMainCourse() { return this.mainCourse; }
[ "public String getCourseDesc() {\n return courseDesc;\n }", "public String getColonyDesc(){\r\n \t// Initialize the String\r\n \tString col = \"\";\r\n \tfor (Ant a : this.colony){\r\n \t\t// Puts all the ants in a neat String\r\n \t\tcol = col + a.getDesc() + \" - Life: \" + a.getLife() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the contract details
public void setContractDetails(String details) { assert (details != null); if(details != null) this.contractDetails = details; }
[ "void setContract(int contract) {\r\n\t\tif (contract == 24 || contract == 30 || contract == 36) {\r\n\t\t\tthis.contract = contract;\r\n\t\t}\r\n\t}", "public void setContractNo(java.lang.String contractNo) {\r\n this.contractNo = contractNo;\r\n }", "public void setContractID(int value) {\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets if the additional nonKerberos authentication mechanism is in place ("true") or not ("false"). If it's "true" means that a login authentication form is displayed to the user in order to get username and password, right after the kerberos credentials were obtained silently. This is associated to the tag krbAdditiona...
public String isKrbAdditionalAuthN() { return krbAdditionalAuthN; }
[ "public boolean isKerberosAuthenticationEnabled() {\n return kerberosAuthenticationEnabled;\n }", "public String isKerberos() {\r\n return isKerberos;\r\n }", "public void setIsKerberos(String isKerberos) {\r\n this.isKerberos = isKerberos;\r\n }", "public boolean isKerberosConfigured(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Constructor Creates a new method signature matcher with a given name regex and a list of expected parameters as strings.
private MethodSignatureMatcher(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parameters) { this.namePattern = Pattern.compile(nameRegex); if (parameters == null) { this.parameters = new String[0]; } else { this.parameters = parameters; } ...
[ "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements String... parameters) {\n return new MethodSignatureMatcher(nameRegex, parameters);\n }", "public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElement...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For work week entry [x] returns the intercept [b] for linear equation y= m(x) + b using the middle 2/3 of the data contained in the database.
public double givenWorkWeeksEstimateIncomeGetInterceptMiddleTwoThirds(){ return formatReturnValue(workWeeksFindIncome.getInterceptMiddleTwoThirds()); }
[ "public double givenWorkWeeksEstimateIncomeMiddleTwoThirds(double workWeeks){\n\t\treturn formatReturnValue((workWeeks * givenWorkWeeksEstimateIncomeGetSlopeMiddleTwoThirds()) + givenWorkWeeksEstimateIncomeGetInterceptMiddleTwoThirds());\n\t}", "public double givenWorkWeeksEstimateIncomeMiddleTwoThirds(int workWe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
addRoad method Connect road to intersection
public void addRoad(Road r) { this.roads.add(r); }
[ "public void placeRoad(IRoad road, EdgeLocation edge);", "public void addRoad(int x, int y)\n {\n tradeNetwork.setTradeNetwork(this, x, y, true);\n }", "@Override\n\tpublic boolean addRoad(String town1, String town2, int weight, String roadName) {\n\t\tTown source = this.getTown(town1);\n\t\tTown d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads the Vulkan shared library, using the default library name.
public static void create() { SharedLibrary VK; switch (Platform.get()) { case LINUX: VK = Library.loadNative(VK.class, "org.lwjgl.vulkan", Configuration.VULKAN_LIBRARY_NAME, "libvulkan.so.1"); break; case WINDOWS: VK = Library.load...
[ "@Override\n\t\tpublic void load(String libraryName) {\n\t\t\tsynchronized (SharedLibraryLoader.class) {\n\t\t\t\tif (isLoaded(libraryName)) return;\n\t\t\t\tif (libraryPath != null) {\n\t\t\t\t\tString platformName = mapLibraryName(libraryName);\n\t\t\t\t\tString absolutePath = libraryPath.resolve(platformName).to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the average speed of the shooter
public double getShooterSpeed() { return (shooterEncoder1.getVelocity() + shooterEncoder2.getVelocity()) / 2.0; }
[ "public double getAvgSpeed(){\n\t\treturn (int)(totalSpeed/prevGameTime * 10) / 10.0; //return average with one decimal point (*10 / 10.0)\n\t}", "public double avgSpeed();", "public float getAvgSpeed() {\n return (Math.round(avgSpeed * 10f) / 10.0f);\n }", "public double calculateAverageWindSpeed( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column t_data_schema.db_vip
public void setDbVip(String dbVip) { this.dbVip = dbVip == null ? null : dbVip.trim(); }
[ "public void setVipflag(Integer vipflag) {\r\n\t\tthis.vipflag = vipflag;\r\n\t}", "public String getDbVip() {\n return dbVip;\n }", "public void setVip(Boolean vip) {\n this.vip = vip;\n }", "public void setVip(Short vip) {\n\t\tthis.vip = vip;\n\t}", "public void setVIP(boolean VIP);",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return Optional.ofNullable( ( prdctRepo.getProductsById(buId, productId)) .map(maprUtil::convertToDto) .orElse(null) );
public Optional<ProductDto> getProductById(Long buId,Long categoryId, Long productId){ return null; }
[ "public Optional<Product> buscarPorId(int id) throws Exception;", "private ProductDTO convertToDTO(Product product) {\n \treturn modelMapper.map(product, ProductDTO.class);\n }", "Product productDtoToProduct(ProductDTO productDTO);", "public Optional<PlataformaDTO> findOne(String id) {\n log.debu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the MapBlock to an event block or turn it off
public void setEvent(boolean isEvent) { byte d = data[MapBlock.BLOCK_SIZE - 1]; data[MapBlock.BLOCK_SIZE - 1] = isEvent ? (byte) (d | this.eventBit) : (byte) (d & (-1 ^ this.eventBit));; }
[ "public void setBlock(Boolean setOpposite)\n\t{\t\t\n\t\t_blocked = true;\n\t\tif (setOpposite && _oppositeDirection != null) {\n\t\t\t((MapEdge)_oppositeDirection).setBlock(false);\n\t\t}\n\t}", "public abstract void setBlock(Block block, int x, int y, EnumEventType eventType);", "public void setBlock(Block bl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a single person
public Person get( Integer id ) { // Retrieve existing person Person person = (Person) entityManager.createQuery("FROM Person p where p.id = :id") .setParameter("id", id).getSingleResult(); return person; }
[ "Person getPerson(Long id);", "Person getPersonById(long id);", "public Person getPerson(long id){\n return personRepository.findOne(id);\n }", "public Person getPersonById(Long id);", "protected Person getPerson(String personID) {\n Person person = null;\n PersonDAO pDao = db.getPer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a SVM from a model.
public SVM(final svm_model theModel) { this.model = theModel; this.params = model.param; this.inputCount = 0; // determine the input count for (final svm_node[] element : this.model.SV) { for (int col = 0; col < element.length; col++) { this.inputCoun...
[ "public SVMClassifier(){\n\n\t\tthis.classifier = new LibSVM();\n\t\tString[] options;\n\t\ttry {\n\t\t\toptions = weka.core.Utils.splitOptions(\"-S 0 -K 0 -C 425 -M 40.0 -W 1 -seed 1\");\n\t\t\tthis.classifier.setOptions(options);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Wrong input...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private Class effectMethodClass; private Method effectMethod; private List parameters; private List> parameterTypes; private Class returnType;
EffectTypeFunction(String methodName) { }
[ "private static String getMethodSignature(Class[] paramTypes, Class retType) {\n StringBuffer sbuf = new StringBuffer();\n sbuf.append('(');\n for (int i = 0; i < paramTypes.length; i++) {\n sbuf.append(getClassSignature(paramTypes[i]));\n }\n sbuf.append(')');\n sbuf.append(getClassSignature...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new cube at the specified position using the specified rotation, scale and color.
public Cube(Vector3f position, Quaternionf rotation, float scale, Color color) { super(); Mesh mesh = new Mesh(CUBE_POSITIONS, CUBE_TEXTURE_COORDINATES, CUBE_NORMALS, CUBE_INDICES); Material mat = new Material(); mat.setAmbientColor(color.toVector4f()); mat.setDiffuseColor(colo...
[ "public Cube(Vector3f position, Quaternionf rotation, float scale) {\n super();\n\n Mesh mesh = new Mesh(CUBE_POSITIONS, CUBE_TEXTURE_COORDINATES, CUBE_NORMALS, CUBE_INDICES);\n Material mat = new Material();\n\n mesh.setMaterial(mat);\n setMesh(mesh);\n\n setPosition(posit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
view a help record.
@Action(value = "view") public String viewRecord(){ helpRecord = helpRecordManager.readOneById(helpRecordId); return "view"; }
[ "View openView(Record recordInstance) throws JDOException;", "public void getHelpRecordList(){\r\n\t\tpage = Methods.correctPage(page);\r\n\t\t\r\n\t\tunhandleRecordList = helpRecordManager .readSomeByStatus(StatusOfRecord.VERIFYING, page);\r\n\t\tcountVerifying = helpRecordManager.readCountByStatus(StatusOfRecor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a HelpDisplayBuilder instance.
public static HelpDisplayBuilder builder() { return new HelpDisplayBuilder(); }
[ "public HelpDisplay build() {\n return new HelpDisplay(commands, delimiter);\n }", "Help createHelp();", "private CMenu createHelpMenu() {\n CMenu menu = new CMenu(\"Help\");\n menu.add(helpHandler);\n return menu;\n }", "Help createHelp(String helpTag);", "private void displayHe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the Milliseconds since 70 GMT for the file expiration
public void setFileExpiration(long v) { expiration = v; }
[ "public long getFileExpiration() { return expiration; }", "public void setExpiration(double timeout) {\n drive.setExpiration(timeout);\n }", "void setExpiryTime(Long expiryTimeMs);", "void setExpiresAt(long expiresAt);", "void setExpiration(long time)\n {\n expiration = time;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the next status, or null if no more statuses.
public Status next() throws IOException { Status nxt = null; String raw = null; while (nxt == null) { raw = br.readLine(); // Check to see if we've reached end of file. if (raw == null) { return null; } try { nxt = TwitterObjectFactory.createStatus(raw); ...
[ "List<PendingAccountStatus> next(int count);", "int getPreviousStatuses();", "@Override\n\tpublic Status getFirstStatus() {\n\t\tStatus status = null;\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tQuery query = em.createQuery(\"SELECT s FROM Status AS s WHERE s.reference = \\\"S1\\\"\");\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Read until the first StartElement tag that matches the provided fragmentRootElementName. Because there may be any number of tags in between where the reader is now and the fragment start, this is done in a loop until the element type and name match.
private void readToStartFragment() throws XMLStreamException { while (true) { XMLEvent nextEvent = eventReader.nextEvent(); if (nextEvent.isStartElement() && ((StartElement) nextEvent).getName().getLocalPart().equals(fragmentRootElementName)) { return; } } }
[ "boolean readUntilStart(Reader pReader,\n String pElement) throws Exception;", "public void testFragmentWrapping() throws XMLStreamException {\n\t\t\n\t\tassertTrue(fragmentReader.hasNext());\n\t\tmoveCursorBeforeFragmentStart();\n\n\t\tfragmentReader.markStartFragment(); // mark the fragment\n\t\tassertTrue(E...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return the string value stored in the epTitle component in each Episode object
public String epTitleGetValue(){ return epTitle; }
[ "public String getEpisodeTitle() {\n\t\treturn episodeTitle;\n\t}", "public String titleGetValue(){\r\n\t\t\r\n\t\treturn title;\r\n\t}", "@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _events.getTitle();\n\t}", "public String getEventTitle() {\n\t\treturn title;\n\t}", "public void setEpiso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form createsessions
public createsessions() { initComponents(); loadlec(); loadlec2(); // subcode() ; loadsubname(); loadsubname1(); loadtag(); loadtag2(); loadgrpid(); loadgrpid2(); loadsubgrpid1(); loadsubgrpid2(); }
[ "@POST\n public Response createSession(Session session) throws URISyntaxException {\n log.debug(\"REST request to save Session : {}\", session);\n sessionRepository.create(session);\n return HeaderUtil.createEntityCreationAlert(Response.created(new URI(\"/resources/api/session/\" + session.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resize the camera preview texture from the camera preview size. The aspect ratio is kept.
private void resizeCameraPreviewTexture() { try { Camera.Size previewSize = mCamera.getParameters().getPreviewSize(); // Valid values are 0, 90, 180, and 270 (0 = landscape) if ((mCameraOrientation == 90) || (mCameraOrientation == 270)) { int tmp = previewSi...
[ "@Override\n public void resize(int width, int height) {\n camera.viewportWidth = width/25;\n camera.viewportHeight = height/25;\n camera.update();\n }", "private void resizeFramebufferTexture() {\n glDeleteTextures(tex);\n createFramebufferTexture();\n }", "@Override...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Migrates all records from the given fromTable to the target toTable. This method is invoked as a last step of an export run where the staging is used to collect data before pushing it into the target table.
public void migrateData(String fromTable, String toTable) throws SQLException { throw new UnsupportedOperationException(); }
[ "private void promoteSourceSchemaChangesToDestination()\n throws SQLException {\n List<JsonNode> describeTable = database.queryJsons(format(\"DESCRIBE %s.%s\", quotedSchemaName, quotedDestTableName));\n LOGGER.info(\"[Stream {}] Existing table structure for {}.{} table is {}\", streamName, schemaName, qu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the message branches 20 x 4A
public String getMessageBranches() { return messageBranches; }
[ "public String buildTreeFromMessage(){\n parseMsg();\n if(printOCCTable)printTable();\n constructTree();\n reconstructTree();\n if(printHuffTree)\n printTree();\n return printBFSTree();\n }", "public void dumpBranches() {\t\t\r\n\t\tSystem.out.println(\"\\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .google.protobuf.Duration lockable_durations = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:&92;"lockable_durations&92;"", (.gogoproto.stdduration) = true];
java.util.List<com.google.protobuf.Duration> getLockableDurationsList();
[ "java.util.List<? extends com.google.protobuf.DurationOrBuilder> \n getLockableDurationsOrBuilderList();", "public java.util.List<? extends com.google.protobuf.DurationOrBuilder> \n getLockableDurationsOrBuilderList() {\n if (lockableDurationsBuilder_ != null) {\n return lockableD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Idea hold map with content as key and matched paths as values (list). Iterate and fill the map, then put to result those values where size >= 2
public List<List<String>> findDuplicate(String[] paths) { List<List<String>> res = new ArrayList(); int N = paths.length; if (N == 0) return res; Map<String, List<String>> m = new HashMap(); for (String path : paths) { String[] pathParts = path.split(" ");...
[ "public List<List<String>> findDuplicate(String[] paths) {\r\n List<List<String>> res = new ArrayList<>();\r\n HashMap<String, List<String>> map = new HashMap();\r\n if (paths.length==0) return res;\r\n for (String path : paths){\r\n String[] file = path.split(\"\\\\s+\");\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Estimated custody order fees.
public java.math.BigDecimal getEstimatedFees() { return mEstimatedFees; }
[ "public BigDecimal getEstimatedFees() {\n return estimatedFees;\n }", "public double calculateFees(){\n switch (reservation.getRouter().getModel()) {\n case \"Huawei310\":\n fees = (reservation.numberOfRentingDays)*2;\n break;\n case \"Huawei330...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the boolean value of the element at the given index.
@Override public final Boolean getBooleanElement(int index) { return (Boolean)this.invokeFunction("getProperty", this.jsObject, index); }
[ "public Boolean getBoolean(final int index) {\n Object returnable = this.get(index);\n if (returnable instanceof String) {\n returnable = Boolean.valueOf((String) returnable);\n }\n return (Boolean) returnable;\n }", "@Override\n public final boolean isBooleanElement(int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The algorithm short description: 1. Fill water inside rain range 2. If during that ground found then stop and exit 3. Find nearest bigger wall and extend rainRange 4. Repeat from step 1
@Override public int solve(int[] walls, int[] rainRange) { water = new int[walls.length]; int leftIndex, rightIndex; boolean leftGround, rightGround; boolean groundFound = false; while (!groundFound) { for (int i = rainRange[0]; i <= rainRange[1]; i = rightInde...
[ "public int trapRainWater_spill(int[][] heightMap) {\n\t\tif (heightMap.length == 0)\n\t\t\treturn 0;\n\t\t\n\t\tint[][] wetMap = new int[heightMap.length][heightMap[0].length];\n\t\tint sum = 0;\n\n\t\t/*\n\t\t * Step 1, Make it rain. We add a big number to simulate that we had a heavy\n\t\t * rain\n\t\t */\n\t\tf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field Handle_ID is set (has been assigned a value) and false otherwise
public boolean isSetHandle_ID() { return this.Handle_ID != null; }
[ "public boolean isSetAm_handle() {\n return this.am_handle != null;\n }", "public boolean isSetHandles() {\n return this.handles != null;\n }", "public boolean isValid() {\n return handle > 0;\n }", "public boolean isValid() {\n return m_handle != 0;\n }", "public boolean hasID() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description: Check for expired file and delete its local data file and indexing entity
public final synchronized ArrayList<DataFileMetaData> autoCheckForExpiredFile( SystemManager manager) { ArrayList<DataFileMetaData> deleteMetaData = new ArrayList<DataFileMetaData>(); ArrayList<DataFileMetaData> allMetaData = this.getAllMetaData(manager); for (int index = INDEX_ZERO;...
[ "public void removeExpiredFiles() {\n \t\n \tsetCurrentTimeNow();\n\n File dir = new File(fsResource.getPath());\n File[] list = dir.listFiles(this);\n for (File file : list) {\n \tlogger.info(\"Auto expire file removed: {}\", file.getName());\n \tfile.delete();\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try to extend stream profile to an extension type \param[in] mode input stream profile \param[in] type extension type, for example RS2_EXTENSION_VIDEO_STREAM_PROFILE \param[out] error if nonnull, receives any error that occurs during this call, otherwise, errors are ignored \return nonzero if profile is extendable to s...
int rs2_stream_profile_is(PointerByReference mode, int type, PointerByReference error);
[ "int rs2_is_stream_profile_default(PointerByReference mode, PointerByReference error);", "int rs2_is_frame_extendable_to(Realsense2Library.rs2_frame frame, int extension_type, PointerByReference error);", "int rs2_is_device_extendable_to(Realsense2Library.rs2_device device, int extension, PointerByReference err...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Drop stats of every goalie depending on their stamina >Drops everytime stamina drops
public static void dropGoalieStats(Team teamA, Team teamB) { teamA.getGoalie().dropGoalieStats(teamA.getGoalie().getStaminaBar()); teamB.getGoalie().dropGoalieStats(teamB.getGoalie().getStaminaBar()); }
[ "public static void dropPlayerStamina(Team teamA, Team teamB) {\n playerDrops = playerDrops++;\n\n for(int i = 0; i < 5; i++) {\n teamA.getOnIce(i).dropPlayerStamina(playerDrops);\n }\n\n for(int i = 0; i < 5; i++) {\n teamB.getOnIce(i).dropPlayerStamina(playerDrops...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
accessor functions: return Point 1
public Point getPoint1() { return p1; }
[ "public Point getP1(){\n return this.p1;\n }", "public Point getPoint2()\r\n {\r\n return point2;\r\n }", "public double getPoint() {\r\n return point;\r\n }", "public Point2D getPoint();", "double getX() { return this.point.x; }", "public Point getPoint() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move the pixel position of the Piccolo component of CIC cellId in the Intention View to x, y. Does not contact the server.
public void moveCellLocal(long cellId, double x, double y) { cells.get(cellId).setLocation(x, y); IntentionGraphController.getInstance().localUpdateAttachedArrows(cellId, x, y); }
[ "public void moveCell(long cellId, double x, double y)\n\t{\n\t\tCalicoPacket packet = new CalicoPacket();\n\t\tpacket.putInt(IntentionalInterfacesNetworkCommands.CIC_MOVE);\n\t\tpacket.putLong(cellId);\n\t\tpacket.putInt((int) x);\n\t\tpacket.putInt((int) y);\n\n\t\tpacket.rewind();\n\t\tPacketHandler.receive(pack...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A convenience constructor equivalent to Parser(inputStream,null,null).
public Parser(InputStream inputStream) { this(new InputStreamReader(inputStream), (PrintWriter) null, null); }
[ "public Parser() {}", "public Parser() {\n this(System.in);\n }", "public Parser(InputStream inputStream, OutputStream errorStream) {\n\t\tthis(new InputStreamReader(inputStream), new PrintWriter(errorStream,\n\t\t\t\ttrue), null);\n\t}", "public Parser() {\n }", "private Parser() {}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Edita um itemLivro no banco de dados.
public void editaItemLivro(ItemLivro itemLivro) { itemLivroDAOBD.atualizar(itemLivro); }
[ "public void editaLivro(Livro livro) {\n itemLivroDAOBD.editarLivro(livro);\n }", "protected abstract void editItem();", "public void prepararEdicaoItem(ActionEvent event) {\n\t\titemCrudEdit = (Item) event.getComponent().getAttributes().get(\"itemSelecionado\");\r\n\t\tSystem.out.println(\"item que v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ class com.polidea.rxandroidble2.internal.scan.ScanSettingsEmulator.AnonymousClass7 / Return type fixed from 'io.reactivex.Observable' to match base method
@Override // io.reactivex.ObservableTransformer public ObservableSource<RxBleInternalScanResult> apply(Observable<RxBleInternalScanResult> observable) { return observable.publish(new Function<Observable<RxBleInternalScanResult>, Observable<RxBleInternalScanResult>>() { /* class com.p...
[ "@Override // io.reactivex.ObservableTransformer\n public ObservableSource<RxBleInternalScanResult> apply(Observable<RxBleInternalScanResult> observable) {\n return observable.take((long) i, TimeUnit.MILLISECONDS, ScanSettingsEmulator.this.scheduler).repeatWhen(new Function<Observable<Obje...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test NetvidsDatabase isEmpty method
public void testIsEmpty() { // check if an empty data structure is empty assertTrue(database.isEmpty()); // and if a non-empty data structure is empty. database.addMovie(testMovie); assertFalse(database.isEmpty()); }
[ "@Test\n public void testIsEmpty() throws Exception {\n DatabaseProperties prop = cveDb.getDatabaseProperties();\n assertNotNull(prop);\n //no exception means the call worked... whether or not it is empty depends on if the db is new\n //assertEquals(expResult, result);\n }", "@Te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method starts the appium server depending on your OS.
public void startAppiumServer(String os) throws ExecuteException, IOException, InterruptedException { if (os.contains("windows")) { CommandLine command = new CommandLine("cmd"); command.addArgument("/c"); command.addArgument("C:/Program Files/nodejs/node.exe"); co...
[ "public void appiumStart() throws IOException, InterruptedException {\n // Execute command string to start appium server.\n p = Runtime.getRuntime().exec(cmd);\n // Provide wait time of 10 mins to start appium server properly.\n // If face any error(Could not start a new session...) then Increase\n // this tim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the line loc refers to or null if an I/O error occurs while attempting to read the line in. Precondition: loc is a regular location (e.g., not a wholefile location). No error is reported if an I/O error occurs.
private static String getLine(int loc) { InputStream i = getFile(loc); if (i==null) return null; try { /* * skip to the start of the line in question: */ long charsLeft = (Location.toOffset(loc)-1) - Location.toColumn(loc); while ((charsLeft -= i.skip(charsLeft))>0) { ...
[ "private static InputStream getFile(int loc) {\n\ttry {\n\t return Location.toFile(loc).getInputStream();\n\t} catch (IOException e) {\n\t return null;\n\t}\n }", "int getLineOffset(int line) throws BadLocationException;", "private int getLineNumber() {\n int line = 0;\n if (_locator != n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
business Fetches the server information from the settings for the specified host.
public void configureByServer(final String host) { final Server server = settings.getServer(host); if (server != null) { if (userName == null) { userName = settings.getServer(host).getUsername(); } if (password == null) { password = decrypt(settin...
[ "public Server get_server(String host) {\n return servers.get(host);\n }", "public void setHost(String host);", "private void getHost(){\n\t\tif (this.getParameter(\"hostname\")!= null)\n\t\t hostname =this.getParameter(\"hostname\");\n\t\telse\n\t\t\thostname = \"localhost\";\n\t}", "public void setHos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if location departure and arrival are in the vehicle's operation range.
public boolean canRide(Location departure, Location arrival) { double xc1 = departure.getLocationX(); double yc1 = departure.getLocationY(); double xc2 = arrival.getLocationX(); double yc2 = arrival.getLocationY(); // checks whether departure and arrival locations are in vehicle's operation range and retur...
[ "public boolean inRange() {\n\t\treturn getDistance() <= api.getSettings().getFortSettings().getInteractionRangeInMeters();\n\t}", "public boolean overlap(Trip otherTrip)\r\n {\r\n \tif (!this._departureDate.after(otherTrip._returningDate) && // the current trip departure date is between\r\n \t\t\t!this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
"1" lineNb and "null" line in call to errListener.onLine(int lineNb, StringBuffer line) means that the ExternalProcess has been destroyed
public synchronized void setErrListener(LineListener errListener) { this.errListener = errListener; }
[ "public interface ProcessListener {\n /**\n * The Process has gone away and the input stream was closed.\n */\n public void processEnded(Process p, String name);\n\n /**\n * The Process has gone away and this is the exitValue\n */\n public void processExitValue(Process p, int exitValue, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets the entire linked list's isSelected variable to be false.
public void setNextUnselected() { if(next!=null){ next.setNextUnselected(); } isSelected=false; }
[ "public void setUnselected()\n {\n isSelected = false;\n }", "public void setSelected()\n {\n //System.out.println(this+\" isSelected\");\n isSelected = true;\n setNextSelected();\n }", "public void isSelected() {\n\t\tselected = this;\n\t}", "public void toggle(){\n\t\tsetSelected...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gathers and combines all the outgoing bytes from all the enabled Options and our own internal output buffer for writing to the socket.
private byte[] outgoingBytes() { // collect all options outgoing bytes. for (Option o : options) { outWriter.write(o.outgoing(outStream, this)); } // Convert to byte[] array for writing. byte[] out = outStream.toByteArray(); outStream.reset(); return out; }
[ "protected void flushOutput(){\n\t\tif(bufLength != 0){\n\t\t\tostrm.write(new String(outputBuffer,0,bufLength));\n\t\t\tbufLength = 0;\n\t\t}\n\t\tostrm.flush();\n\t}", "@Override\n public BufferOptions getOptions() {\n return new BufferOptions();\n }", "void doOption(Option<T> opt) {\r\n\t\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a reducer returning the minimum of two long elements, using the given comparator.
public static LongReducer longMinReducer (final LongComparator comparator) { return new LongReducer() { public long op(long a, long b) { return (comparator.compare(a, b) <= 0) ? a : b; } }; }
[ "public static <T> Reducer<T> minReducer\n (final Comparator<? super T> comparator) {\n return new Reducer<T>() {\n public T op(T a, T b) {\n return (a != null &&\n (b == null || comparator.compare(a, b) <= 0)) ? a : b;\n }\n };\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the idVozilo property.
public void setIdVozilo(long value) { this.idVozilo = value; }
[ "public long getIdVozilo() {\n return idVozilo;\n }", "public void setIdVehiculo(String idVehiculo) {\n this.idVehiculo = idVehiculo;\n }", "public void setIdVenta(Integer idVenta) {\r\n this.idVenta = idVenta;\r\n }", "public synchronized void setIdVoo(int idVoo){\r\n nFl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get healthy state to player
public String getHealthState() { return healthState; }
[ "public PlayerState getPlayerState();", "private void checkHealth() {\n\t\tif (player.getHealth() == 0 || opponent.getHealth() == 0) {\r\n\t\t\tstate = GameState.GameOver;\r\n\t\t}\r\n\t}", "public int showHealth() {\r\n return health;\r\n }", "boolean getHealthy();", "@Override\n public int getCurre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }