query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
$ANTLR end "rule__VarDefinition__Group_3__1__Impl" $ANTLR start "rule__SchedulerDataDef__Group__0" InternalDsl.g:21413:1: rule__SchedulerDataDef__Group__0 : rule__SchedulerDataDef__Group__0__Impl rule__SchedulerDataDef__Group__1 ;
public final void rule__SchedulerDataDef__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:21417:1: ( rule__SchedulerDataDef__Group__0__Impl rule__SchedulerDataDef__Group__1 ) // InternalDsl.g:21418:2: rule__SchedulerDa...
[ "public final void rule__SchedulerDataDef__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:21429:1: ( ( () ) )\n // InternalDsl.g:21430:1: ( () )\n {\n // InternalDsl.g:21430:1: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method untuk menampilkan data list siswa
public void viewSiswa(){ System.out.println("--- List Siswa ---"); System.out.println("ID \t Nama \t\t Alamat \t\t Status"); for (int i = 0; i < listSiswa.length; i++) { System.out.println(listSiswa[i].getIdSiswa() +" \t "+ listSiswa[i].getNama()+" \t\t "+ ...
[ "void requestListData();", "public void listMealList(){\n for (int i = 0; i < meallist.size(); i++) {\r\n //neco (meallist.get(i);)\r\n //vypis polozky do gui\r\n \r\n }\r\n \r\n \r\n }", "public static void displaydata(ArrayList l){\n for(int i ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Navigate to order selection page with given order type and user type
public void navigateToSelectionPageForZipCodeLookup(String orderType, boolean guestUser) { HashMap<String, String> order = new HashMap<>(); order.put("return_order", orderType); returnOrderDetails = Utils.getReturnOrders(order); if (returnOrderDetails == null) { Assert.fail("...
[ "public void navigateToSelectionPage(String orderType, boolean guestUser) {\n HashMap<String, String> order = new HashMap<>();\n order.put(\"return_order\", orderType);\n returnOrderDetails = Utils.getReturnOrders(order);\n if (returnOrderDetails == null) {\n Assert.fail(\"No ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
cipher_seed_mnemonic is a 24word mnemonic that encodes a prior aezeed cipher seed obtained by the user. This may have been generated by the GenSeed method, or be an existing seed. repeated string cipher_seed_mnemonic = 2;
public Builder addCipherSeedMnemonicBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureCipherSeedMnemonicIsMutable(); cipherSeedMnemonic_.add(value); onChanged(); return this; }
[ "public Builder addCipherSeedMnemonic(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCipherSeedMnemonicIsMutable();\n cipherSeedMnemonic_.add(value);\n onChanged();\n return this;\n }", "public java.lang.String getCipherSeedMn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set option value use key=value format. The log4j.properties file uses this to set options. See the log4j.properties for more details.
public void setOption(String key, String value) { if (key.equalsIgnoreCase("AppenderName")) { mAppenderName = value; } }
[ "public void set_log_options(LogOptions opt)\r\n {logOptions.set_log_options(opt);}", "public <E extends Enum<E>> void setMadkitProperty(E option, String value) { \n\t\tgetMadkitConfig().setProperty(option.name(), value);\t\n\t}", "public void setOption(java.lang.String option);", "void setOption(String na...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleDifferenceOperator" $ANTLR start "entryRuleInputOperator" ../de.hs_rm.cs.vs.dsm.flow/srcgen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:1270:1: entryRuleInputOperator returns [EObject current=null] : iv_ruleInputOperator= ruleInputOperator EOF ;
public final EObject entryRuleInputOperator() throws RecognitionException { EObject current = null; EObject iv_ruleInputOperator = null; try { // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:1271:2: (iv_ruleInputOperator= ruleInputOper...
[ "public final EObject entryRuleDifferenceOperator() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleDifferenceOperator = null;\n\n\n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:1176:2: (iv_ruleDiffer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this will become a reverse graph to g. the nodes of this graph are shallow copies of g nodes
public void reverseDGraph(graph g){ this.mod_count=this.E=this.next=0; this.edges=new HashMap<Integer, HashMap<Integer,edge_data>>(); this.nodes=new HashMap<Integer, node_data>(); for(node_data v1: g.getV()) { next=Math.max(next, v1.getKey()); nodes.put(v1.getKey(),v1); edges.put(v1.getKey(), new Ha...
[ "private Graph constructReversedGraph() {\n Graph Gt = new Graph(this.nodes.size());\n for (int i = 0; i < this.nodes.size(); i++) {\n // the from node in the original graph\n Node from = this.nodes.get(i);\n // set the finishing time from the original graph to the sam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize a default LockInfo instance
private LockInfo() { _record = new ZNRecord(ZNODE_ID); setLockInfoFields(DEFAULT_OWNER_TEXT, DEFAULT_MESSAGE_TEXT, DEFAULT_TIMEOUT_LONG); }
[ "private LockInfo() {\n setLockInfoFields(LockConstants.DEFAULT_USER_ID, LockConstants.DEFAULT_MESSAGE_TEXT,\n LockConstants.DEFAULT_TIMEOUT_LONG, LockConstants.DEFAULT_PRIORITY_INT,\n LockConstants.DEFAULT_WAITING_TIMEOUT_LONG, LockConstants.DEFAULT_CLEANUP_TIMEOUT_LONG,\n LockConstants.DEF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears all transient variables of this variable container (not touching the delegate).
public void clearTransientVariables() { this.transientVariables.clear(); }
[ "public void clearCvsVariables() {\n this.variables.clear();\n }", "public void clearVariables() {\n\t\tfVariableMap.clear();\n\t\tfBooleanVariables.clear();\n\t}", "public void removeAll()\n\t{\n\t\tint size = size();\n\t\t\n\t\twhile ( size > 0 )\n\t\t{\n\t\t\tremoveVariable( get(0) );\n\t\t\tsize--...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column org.uploadlimit
public Integer getUploadlimit() { return uploadlimit; }
[ "public String getLimit() {\r\n\t\treturn this.limit;\r\n\t}", "public Integer getLimitnumber() {\n return limitnumber;\n }", "public BigDecimal getLIMIT()\r\n {\r\n\treturn LIMIT;\r\n }", "public Limit getLimit() {\n \t\treturn limit;\n \t}", "public Integer getProjlimit() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Imprime un mapa SVG a partir de sus coordenadas de ancho y alto.
public void imprime() { mapa ="<svg width='" + x + "' height='" + y + "'><g>"; }
[ "public mapaSVG(int x, int y) {\n this.x = x;\n this.y = y;\n imprime();\n }", "public void setPosicionMapa() {\n\t\txmapa = mapaTile.getx();\n\t\tymapa = mapaTile.gety();\n\t}", "private void estructuraSVG() {\n int x = 0;\n int y = 100;\n for (int i = 0; i < elem; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the PROPERTY_ID value for this ABSTRACTHTML_PORTLET_PROPERTYType.
public java.lang.String getPROPERTY_ID() { return PROPERTY_ID; }
[ "public static String getPROPERTY_ID() {\n\t\treturn PROPERTY_ID;\n\t}", "public int getPropertyId() {\n\t\treturn propertyId;\n\t}", "public Object getPropertyId() {\n\t return propertyId;\n\t }", "public int getPropertyID() {\n return propertyID;\n }", "public int getPropertyID() {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the id_oggetto of this richiesta badge.
public void setId_oggetto(long id_oggetto);
[ "public void setIdSoggetto(Long idSoggetto) {\n this.idSoggetto = idSoggetto;\n }", "public void setIdTipoSoggetto(Integer idTipoSoggetto) {\n\t\tthis.idTipoSoggetto = idTipoSoggetto;\n\t}", "public void setGoId(int value) {\n this.goId = value;\n }", "public void setIdAspectoPedagogico(in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int64 uploadId = 1;
@java.lang.Override public long getUploadId() { return uploadId_; }
[ "long getUploadId();", "@java.lang.Override\n public long getUploadId() {\n return uploadId_;\n }", "public String getUploadId() {\n return uploadId;\n }", "public Integer getUploadId() {\n\t\treturn uploadId;\n\t}", "public FileUpload getFileUploadById(Long id) throws AppException;", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the user has the add permission or not on the given entity.
protected void checkAddPermission(T entity) { check(entity, "add"); }
[ "public boolean canAdd() {\n return hasOption(EntityControllerOption.ADD)\n && can(\"add\");\n }", "boolean isAdded(@Nonnull User user);", "public boolean allowAddAction(ResourceToolAction action, ContentEntity entity);", "private boolean validateAdd(Entity entityToAdd, List<Entity> l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert RPM to units/100ms for TalonSRX/TalonFX to use for ControlMode.Velocity.
public static double convertRPMToVelocity(int rpm, int tpr) { /* (RPM * TPR Units/Revolution / 600 100ms/min) */ return rpm * tpr / 600; }
[ "public double getVelocityRPM();", "private void calculateRPM() {this.rpm = 500+(throttle*(maxRPM-500));}", "public final double rpmToVelocity(double rpm) {\n return rpm * GEAR_RATIO * 2 * Math.PI * WHEEL_RADIUS / 60.0;\n }", "public double getSpeedInMPS(int rpm) {\n\n // this is 2 * pi * rad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column b_report.artificialRechargeMoney
public void setArtificialRechargeMoney(BigDecimal artificialRechargeMoney) { this.artificialRechargeMoney = artificialRechargeMoney; }
[ "public void setArtificialWithdrawMoney(BigDecimal artificialWithdrawMoney) {\n this.artificialWithdrawMoney = artificialWithdrawMoney;\n }", "public BigDecimal getArtificialRechargeMoney() {\n return artificialRechargeMoney;\n }", "public void setRechargeMoney(BigDecimal rechargeMoney) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of application_ entitlements associated with the entitlement.
public int getApplication_EntitlementsSize(long pk) throws com.liferay.portal.kernel.exception.SystemException;
[ "public int countBycae(long companyId, long applicationId, long entitlementId)\n throws com.liferay.portal.kernel.exception.SystemException;", "public int numberOfApplications(){\n return inbox.size();\n }", "public int getAllowedAppIdsCount() {\n return allowedAppIds_.size();\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of createThreadPool method, of class ParallelUtil.
public void testCreateThreadPool_int() { System.out.println( "createThreadPool" ); int numRequestedThreads = 0; ThreadPoolExecutor result = ParallelUtil.createThreadPool( ParallelUtil.OPTIMAL_THREADS ); ThreadPoolExecutor expected = ParallelUtil.createThreadPool( -1 ); assert...
[ "public void testCreateThreadPool_0args()\n {\n System.out.println( \"createThreadPool\" );\n ThreadPoolExecutor result = ParallelUtil.createThreadPool();\n ThreadPoolExecutor expected = ParallelUtil.createThreadPool(\n ParallelUtil.OPTIMAL_THREADS );\n assertEquals( expect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the MediaRouter needed to implement Google casting
private void initMediaRouter() { mMediaRouter = MediaRouter.getInstance(getApplicationContext()); mMediaRouteSelector = new MediaRouteSelector.Builder() .addControlCategory(CastMediaControlIntent.categoryForCast(getString(R.string.app_id))) .build(); mMediaRo...
[ "private void initGStreamer() {\n try {\n GStreamer.init(this);\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n }", "private void initCastError() {\r\n Toast toast = T...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For all the bonuses to assign, it assigns the bonus and notifies the player about the bonus earned
private void assignBonus(Game game) { ConnectedBuiltCityDiscover linkedCities=new ConnectedBuiltCityDiscover(); Emporium temporaryEmporium=game.getCurrentPlayer().removeEmporium(); this.selectedCity.addEmporium(temporaryEmporium); for (City city : linkedCities.getConnectedBuiltCities(game.getGameTable().get...
[ "public void bonusInvader(){\n invadersManager.createBonusInvader();\n }", "public void givePlayerLevelBonus() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\t\tp.addScore(5 * (currentLevel-1));\n\t\t\t}\n\t\t}\n\t\tserver.updateHighscoreList();\n\t\tserver.addTex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get item name for a given index
public String itemName(int index){ if(!this.dataEntered)throw new IllegalArgumentException("no data has been entered"); return this.itemNames[index-1]; }
[ "public String getnameByIndex(int index){\n\t\treturn name.get(index);\n\t}", "@Override\n\tpublic String getItemName(int index) { \n\t\treturn manItemNames.get(index);\n\t}", "public @AAFString String getElementName(\r\n\t\t\t@UInt32 int index) \n\t\tthrows IndexOutOfBoundsException;", "private String getNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rsanchez 20160203 ConfirmGenerico parametizable con el header generico
public void mostrarConfirmGenerico (String messageConfirmGenerico, String severityConfirmGenerico, String updateAceptarConfirmGenerico, String actionListenerAceptarConfirmGenerico, CommandButton bindingAceptarConfirmGenerico, String updateCancelarConfirmGenerico, String immediateCancelarC...
[ "public void mostrarConfirmGenerico (String messageConfirmGenerico, String headerConfirmGenerico, \n\t\t\t\t\t\t\t\t\t\tString severityConfirmGenerico,\tString updateAceptarConfirmGenerico, \n\t\t\t\t\t\t\t\t\t\tString actionListenerAceptarConfirmGenerico, CommandButton bindingAceptarConfirmGenerico,\n\t\t\t\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to get Type of Energy Object from Energy Objects window
public String getTypeOfEnergyObject() { return McsElement .getElementByXpath(driver, "//div[contains(@class,'"+DIALOG_ENERGY_OBJECT+"')]//input[@name='type']/following-sibling::input[@type='text']") .getAttribute("value"); }
[ "public short getObjtype() {\n\treturn objtype;\n}", "String getIEType() {\n return tp.getType();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}", "int getD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make the tree logically empty.
public void makeEmpty( ) { root = null; }
[ "public static void makeEmpty() {\r\n\t\ttree.clear();\r\n\t}", "public void makeEmpty() {\n\t\troot = null;\n\t}", "public void makeEmpty( )\r\n\t{\r\n\t\troot = null;\r\n\t}", "public void makeEmpty( ) {\n root = null;\n }", "@Override\n public void makeEmpty()\n {\n size = 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read packets on a UDP socket with a set timeout until a MapNotify is received and return it.
static MapNotify receiveMapNotify(DatagramSocket datagramSocket, int timeout) throws SocketTimeoutException { ByteBuffer packet = receiveSpecificPacketType(datagramSocket, timeout, MessageType.MapNotify); return MapNotifySerializer.getInstance().deserialize(packet); }
[ "static ByteBuffer receivePacket(DatagramSocket datagramSocket, int timeout) throws SocketTimeoutException {\n try {\n byte[] buffer = new byte[4096];\n DatagramPacket receivePacket = new DatagramPacket(buffer, buffer.length);\n LOG.trace(\"Waiting for packet from socket...\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Overrides toString method returning a formatted string composed of string formatted with the formatAppointmentBlock method
@Override public String toString() { return String.format("%-15s|%-24s|%-24s|%-24s|%-24s|%-24s|%-24s|%-24s|%-24s|%-24s\n", (dayOfMonth + " " + dayOfWeek), formatAppointmentBlock(8), formatAppointmentBlock(9), formatAppointmentBlock(10), formatAppointmentBlock(11), ...
[ "@Override\n\tpublic String toString() {\n\t\tDateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(\"dd-MM-uuuu HH\");\n\t\treturn \"Appointment{\" +\n\t\t\t\t\"startTime=\" + startTime.format(dateFormat) +\n\t\t\t\t\", endTime=\" + endTime.format(dateFormat) +\n\t\t\t\t\", room='\" + room + '\\'' +\n\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Confirms that user is logged in to twitter, if so opens up dialog for user to input story to publish, otherwise a prompt explaining that they must first log in.
private void publishToTwitter() { if (isTwitterLoggedInAlready()) { showTwitterDialog(); } else { Toast toast = Toast.makeText(this, "You must first log in to Twitter to share", Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); } }
[ "private void loginToTwitter() \n\t{\n\t\t// Check if already logged in\n\t\tif (!isTwitterLoggedInAlready())\n\t\t{\n\t\t\tConfigurationBuilder builder = new ConfigurationBuilder();\n\t\t\tbuilder.setOAuthConsumerKey(TWITTER_CONSUMER_KEY);\n\t\t\tbuilder.setOAuthConsumerSecret(TWITTER_CONSUMER_SECRET);\n\t\t\tConf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make approximate likelihoods for a diploid genotype without PLs. For a homref, as long as we have GQ we can make a very accurate QUAL calculation since the homvar likelihood should make a minuscule contribution
public static double[] makeApproximateDiploidLog10LikelihoodsFromGQ(Genotype g, int nAlleles) { Utils.validate(g.getPloidy() == 2, "This method can only be used to approximate likelihoods for diploid genotypes"); Utils.validate(g.hasGQ(), "Genotype must have GQ in order to approximate PLs"); fin...
[ "double assignHaplotypes(double alpha0, double alphaE, double lGA0, double lGA03AE, \n double[] priors, double[][] piHap) {\n double logLikelihood = 0.0;\n if (siteConserved) {\n for (int iTimePoint = 0; iTimePoint < nTimePoints; iTimePoint++) {\n for (int iStrand ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the square at the given position.
@Override public SquareT getSquareAt(Position position) throws IllegalArgumentException, NullPointerException, IllegalStateException { if(!hasSquareAt(position)) throw new IllegalArgumentException(); Dungeon<SquareT> subDungeon = getSubDungeonAt(position); return subDungeon.getSquareAt(position.subtract(ge...
[ "public Square getSquare(Position position)\n\t{\n\t\treturn this.squares[position.getNoRow()][position.getNoColumn()];\n\t}", "public Square getSquare(int position) {\n\t\tassert this.isValidPosition(position);\n\t\treturn squares.get(position - 1);\n\t}", "@Override\r\n\t@Basic\r\n\tpublic Square getSquareAt(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end buy Removes from this ledger any shares that were sold and computes the capital gain or loss.
public double sell(int sharesSold, int pricePerShare) { double saleAmount = sharesSold * pricePerShare; double totalCost = 0; while (sharesSold > 0) { StockPurchase transaction = ledger.removeFront(); double shareCost = transaction.getCostPerShare(); ...
[ "public void sell() {\n for (Company x : _market.getCompanies()) {\n if (x.getRisk() > _confidence || x.numLeft() < 3 || x.getRisk() < _confidence - 15){\n if (_stocks.get(x) == 1) {\n _stocks.remove(x);\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get frequency source priority
public int getFrequencySourcePriority() throws PsseModelException {return _list.getFrequencySourcePriority(_ndx);}
[ "public long requestCurrentSourceFrequency();", "public long requestMaxSourceFrequency();", "java.lang.String getFrequency();", "public int getPriority();", "int getFrequency();", "public SourceFrequency getSourceSampleFrequency()\n {\n return sourceSampleFrequency;\n }", "public int getPriorit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new modifica movimento gestione atto amministrativo converter.
public ModificaMovimentoGestioneAttoAmministrativoConverter() { super(ModificaMovimentoGestione.class, SiacTModifica.class); }
[ "public MovimentoGestioneStiloConverter() {\n\t\tsuper(MovimentoGestioneStilo.class, MovimentoGestione.class);\n\t}", "public abstract IHantoMover createPlaceMover(HantoCoordinate at);", "public abstract IHantoMover createWalkMover(HantoCoordinate from, HantoCoordinate to);", "public GeradorAcoesMov() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a default MappingRecordItemBuilder object.
static MappingRecordItemBuilder getDefaultMappingRecordItemBuilder(Eid eid, Rloc rloc) { return new MappingRecordItemBuilder() .withKey(new MappingRecordItemKey(LispAddressStringifier.getString(eid))) .setMappingRecord(getDefaultMappingRecordBuilder(eid, rloc).build()); }
[ "static MappingRecordBuilder getDefaultMappingRecordBuilder(Eid eid, Rloc rloc) {\n return getDefaultMappingRecordBuilder(eid, Arrays.asList(rloc));\n }", "public static MappableBuilder createMappableBuilder()\r\n {\r\n\r\n return new MappableBuilder( createMappableBuilderFactory() );\r\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
randomAge function to get random age.
public static int randomAge() { return random.nextInt(10); }
[ "private static int getRandomAge(){\n return r.nextInt(10)+1;\n }", "private int randomAge() {\n \tint low = 18;\n \tint high = 100;\n \tint offset = high - low;\n \tRandom r = new Random();\n \treturn r.nextInt(offset) + low;\n \t\n }", "public String getRandomAge() \n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invalidates the rooks ability to castle
public void noCastle(){ castle = false; }
[ "void rejects_invalid_racer() {\n }", "@RequiresLock(\"SeaLock\")\r\n protected void deponentInvalidAction(Drop invalidDeponent) {\r\n invalidate();\r\n }", "final void revokeVerification() {\n isVerified = false;\n }", "void discardLeaderCard() throws LeaderCardRequirementsNotSatisfiedExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set this to false to exploit the fact that EMF is created first so if we demand an EMFB we will ensure we have both EMF and EMFB
@Override public boolean needsEmfService() { return false; }
[ "@Before\n public void recreateEmf() {\n if (emf != null && emf.isOpen()) {\n emf.close();\n }\n emf = null;\n em = null;\n init();\n }", "public static void setEmf(EntityManagerFactory emf) {\n\t\tJPAEMFProvider.emf = emf;\n\t}", "@Test\n public void testS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a replacement subtree for the receiver node (which is to be removed). COMPLETION The replacement subtree is determined from the children of the node to be removed. HINT: There are several cases: node has no children => return null node has only one child => return the child node has two children => return the c...
private BSTNode<E> replacementSubtreeFromChildren(BSTNode<E> left, BSTNode<E> right) { if (left == null && right == null) return null; if (left != null && right == null) return left; if (left == null && right != null) return right; BSTNode<E> root = null; root = right; ...
[ "private BinarySearchTree deleteLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\t//this is the node we want. No left child\r\n\t\t\t//Right child might exist\r\n\t\t\t\r\n\t\t\treturn tree.getRightChild();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tBinarySearchTree replacement = delete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last p r user in the ordered set where groupId = &63; and lastName = &63;.
public static com.inkwell.internet.productregistration.model.PRUser findByG_LN_Last( long groupId, java.lang.String lastName, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.inkwell.internet.productregistration.NoSuchUserException, com.liferay.portal.kernel.exception.SystemExcept...
[ "public static com.inkwell.internet.productregistration.model.PRUser fetchByG_LN_Last(\n\t\tlong groupId, java.lang.String lastName,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this showstudents method does the same thing as the show teachers method
public void showstudents(){ for (int i=0; i<slist.size(); i++){ System.out.println(slist.get(i).getStudent()); } }
[ "@SuppressWarnings(\"Duplicates\")\n private static void viewStudents() {\n String leftAlignFormat = \"| %-2s | %-45s |%n\";\n System.out.format(\"\\n\\n+----+-----------------------------------------------+%n\");\n System.out.format(\"| ID | Student Names |%n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The CreateCacheParameterGroup operation creates a new cache parameter group. A cache parameter group is a collection of parameters that you apply to all of the nodes in a cache cluster.
public Future<CacheParameterGroup> createCacheParameterGroupAsync(CreateCacheParameterGroupRequest createCacheParameterGroupRequest) throws AmazonServiceException, AmazonClientException;
[ "CacheParameterGroup createCacheParameterGroup(CreateCacheParameterGroupRequest createCacheParameterGroupRequest);", "public Future<CacheParameterGroup> createCacheParameterGroupAsync(CreateCacheParameterGroupRequest createCacheParameterGroupRequest,\n AsyncHandler<CreateCacheParameterGroupRequest, Cac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the shoot command is being held
public boolean isShoot() { return KeyBindingManager.getKeyBindingManager().isValidCommand("shoot", true); }
[ "public boolean hasShoot()\n {\n return shoot;\n }", "public boolean isShooting() {\n return shooting;\n }", "public boolean canShoot() {\r\n\t\tif ((shootingTime + getWeapon().getDelay()) < System.currentTimeMillis()){\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the authentication method of this endpoint
public AuthMethod authMethod() { return authMethod; }
[ "public String getAuthMethod() {\n\t\tString method = options.getProperty(\"auth-method\");\n\t\tif(method == null) {\n\t\t\tmethod = options.getProperty(\"Authentication-Method\");\n\t\t}\n\t\treturn trimedValue(method);\n\t}", "public String getAuthMethod() {\n return AUTH_NAME;\n }", "public String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check the superset array to see if we need to change the color of any of the cells.
public void updateCells() { boolean[][] superSetArray = gameWindow.getGUI().getGame().getSupersetArray(); for ( int i = 0; i < 4; i++ ) { for ( int j = 0; j < 4; j++ ) { if ( superSetArray[ i ][ j ] ) { System.out.println( "True" ); cells[ i ][ j ].activate(); } else System.ou...
[ "public boolean checkIfAllCellsAreFilled()\n {\n int counter=0;\n for(int i=0; i < ColorAreaa.size(); i++)\n {\n if (ColorAreaa.get(i).getValue()>0)\n counter++;\n }\n counter++; //increasing the counter for 1\n if(counter==ColorAreaa.size()) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the next index for Carey picture.
private int nextCareyImageIndex() { careyImageIndex++; careyImageIndex = (careyImageIndex >= careyImages.size()) ? 0 : careyImageIndex; return careyImageIndex; }
[ "private Picture getNextPicture() {\n if (this.curImageIndex == this.pictures.size()) {\n this.curImageIndex = 0;\n }\n\n Picture nextPicture = this.pictures.get(this.curImageIndex);\n this.curImageIndex++;\n return nextPicture;\n }", "int nextIndex();", "private int getNext () {\n int r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws a textured rectangle Args: x, y, z, width, height, textureWidth, textureHeight
public static void drawModalRectWithCustomSizedTexture(int x, int y, int z, int width, int height, float textureWidth, float textureHeight) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0); f...
[ "public void drawTexturedModalRect(int x, int y, int textureX, int textureY, int width, int height)\n {\n float f = 0.00390625F;\n float f1 = 0.00390625F;\n Tessellator tessellator = Tessellator.getInstance();\n WorldRenderer worldrenderer = tessellator.getWorldRenderer();\n wo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construtor do elemento body da Nested Context Language (NCL).
public NCLBody() {}
[ "OclExpressionCS getBodyExpression();", "DSL_CEP_STATEMENT createDSL_CEP_STATEMENT();", "SubComponentPrimitiveBody createSubComponentPrimitiveBody();", "DSL_ECA_STATEMENT createDSL_ECA_STATEMENT();", "public void translateClassBody(GNode n) {\n\t\t\n\t// NOTE: ccNode is now nameed \"ClassBody\" and must use...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column rabbit_breeding.twentyOneDaysOldNestWeight
public Double getTwentyOneDaysOldNestWeight() { return twentyOneDaysOldNestWeight; }
[ "public void setTwentyOneDaysOldNestWeight(Double twentyOneDaysOldNestWeight) {\n this.twentyOneDaysOldNestWeight = twentyOneDaysOldNestWeight;\n }", "public Double getNewbornNestWeight() {\n return newbornNestWeight;\n }", "public void setNewbornNestWeight(Double newbornNestWeight) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
layout is handled here (temporary layout) This panel contains 2 panels. The top panel contains 4 labels and 4 textFields to enter user name,password, confirm password and email and 1 radio button. The bottom panel contains 2 buttons. one to register and one to cancel
public void initialize (Container container) { container.setLayout(new GridLayout(2,1)); container.setBackground(Color.WHITE); //Top Panel //create top panel (will contain 4 labels and 4textFields and 1 radio button) JPanel topPanel = new JPanel(); topPanel.setLayout(new GridBagLayout()); ...
[ "private void initializeLoginPanel() {//Start of Method\r\n\t\t// log info\r\n\t\tlogger.info(\"Initializing Login Panel\");\r\n\t\t// create layout\r\n\t\tGridBagLayout layout = new GridBagLayout();\r\n\t\tGridBagConstraints cBagConstraints =new GridBagConstraints();\r\n\t\t// add layout to the JPanel\r\n\t\tlogin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When you click on the button to add Subject
public void submitSubject() { final EditText editText = new EditText(this); editText.setHint(R.string.defaultNameSubject); new AlertDialog.Builder(this) .setTitle(R.string.titleAddSubject) .setMessage("") .setView(editText) .setPo...
[ "public void addSubject(Subject s) {\n // TODO implement here\n }", "public void addSubject(View subject) {\n if(subject == null) return;\n if(mSubjectList.size() >= SUBJECT_COUNT_MAX) return;\n\n /**\n * Assigns the OnClickListener for changing content\n */\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fills the week labels in the month view to an array list
public void addToMonthWeeks(){ this.weekList = new Label[]{week1, week2, week3, week4, week5, week6}; for (Label label: weekList){ this.monthWeeks.add(label); } }
[ "public TextView[] Weekdays(){\n Resources r = getResources();\n String name = getPackageName();\n String WeekDays[]={\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"};\n String DummyWeekDays[]={\"F1\",\"F2\",\"F3\",\"F4\",\"F5\",\"F6\",\"F7\"};\n TextView Weekdays[]=new Te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SchedulerDef__Group_5__1" $ANTLR start "rule__SchedulerDef__Group_5__1__Impl" InternalDsl.g:20074:1: rule__SchedulerDef__Group_5__1__Impl : ( ( rule__SchedulerDef__ParentAssignment_5_1 ) ) ;
public final void rule__SchedulerDef__Group_5__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:20078:1: ( ( ( rule__SchedulerDef__ParentAssignment_5_1 ) ) ) // InternalDsl.g:20079:1: ( ( rule__SchedulerDef__ParentAssign...
[ "public final void rule__SchedulerDef__Group_5__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:20067:1: ( rule__SchedulerDef__Group_5__1__Impl )\n // InternalDsl.g:20068:2: rule__SchedulerDef__Group_5__1__Impl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the locations where locationName = &63; from the database.
public static void removeByLocationName(java.lang.String locationName) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByLocationName(locationName); }
[ "public void DeleteLocations() {\n SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();\n sqLiteDatabase.delete(TABLE_NAME, null, null);\n }", "public void purgeLocation(Location location) throws APIException;", "public void unassignAllLocations() {\n for (Emplacement location : l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds first ancesor of the given class for the event. This method knows about the disjoint invoker containment when events are fired from menus.
public static Component ancestorForEvent(java.lang.Class<? extends Container> target, AWTEvent event) { if (event.getSource() instanceof Component) { Component source = (Component) event.getSource(); while (source != null) { if (target.isInstance(source)) { ...
[ "@SuppressWarnings(\"unchecked\") // Downcast from runtime check\n @Override\n public <X> X findComponent(Class<X> clazz)\n {\n if (clazz.isAssignableFrom(getClass()))\n { return (X) this;\n }\n else if (parent!=null)\n { return parent.<X>findComponent(clazz);\n }\n else\n { return null;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts a given server
public void startServer() { server.start(); }
[ "StartServerAction.Builder start(Server server);", "private void start() {\n if (Thread.currentThread().isDaemon()) {\n server.start();\n return;\n }\n\n Thread thread = THREAD_FACTORY.newThread(server::start);\n thread.start();\n try {\n thread.join();\n } catch (InterruptedExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The doQuickSort method sorts the array elements provided by quickSort. It partitions the array by calling the parition method and sorts the sublists recursively. It uses the divide and conquer concept.
private static void doQuickSort(Comparable[] userArray, int start, int end) { // Will hold the pivotPoint element. int pivotPoint; // If the starting element is less than the ending element (which is should be until the array is sorted). if(start < end) { // Get the pivotpoint pivotPoint = par...
[ "public void QuickSorting(int arr[], int start,int rear)\n {\n // middle is a variable name that hole the position of an array \n //that is returned by Partition Method after placing a element its correct position\n int middle;\n if(start<rear)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bind a This reference to a parent's namespace with the specified declaring interpreter. Also reinit the callstack. It's necessary to bind a This reference before it can be used after deserialization. This is used by the bsh load() command. This is a static utility method because it's used by a bsh command bind() and th...
public static void bind( This ths, NameSpace namespace, Interpreter declaringInterpreter ) { ths.namespace.setParent( namespace ); ths.declaringInterpreter = declaringInterpreter; ths.initCallStack( namespace ); }
[ "protected void bind() {\n Namespace.bind(this.namespaceName, this);\n }", "public Binding currentBinding(IRubyObject self, DynamicScope scope) {\n Frame frame = getCurrentFrame();\n return new Binding(self, frame, frame.getVisibility(), getRubyClass(), scope, backtrace[backtraceIndex].c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Abator for iBATIS. This method sets the value of the database column t_log_user_access.user_oprate_uri
public void setUserOprateUri(String userOprateUri) { this.userOprateUri = userOprateUri; }
[ "public String getUserOprateUri() {\n return userOprateUri;\n }", "public void setUriUserParam(java.lang.Short uriUserParam) {\r\n this.uriUserParam = uriUserParam;\r\n }", "public void setUserOperatpwd(String userOperatpwd) {\r\n this.userOperatpwd = userOperatpwd;\r\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test basic lock function requestLock, await, unlock.
@Test public void testEntityLock() throws Exception { final long procId = 100; final long workerSleepTime = 200; // in ms EntityLock lock = admin.namespaceLock("namespace", "description", null); lock.setTestingSleepTime(workerSleepTime); when(master.requestLock(any(), any())) .thenReturn(Lo...
[ "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "@Test\n public void updateLockTest() throws ApiException {\n RequestLock body = null;\n Integer id = null;\n AbstractRestResponse response = api.updateLock(body, id);\n\n // TODO: test validations\n }", "@Test\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the specified string to an object based upon the specified content type. Only base64 encoding is supported for Java objects.
protected Object convertToObject(String body, String contentType) throws /*IllegalObjectException,*/ ClassNotFoundException, IOException { Object o = null; if (!AbstractMessage.JAVA_BASE64_MIME_TYPE.equals(contentType)) { throw new NotImplementedException( "Su...
[ "public Object convertBase64ToObject(String string) {\n\t\tbyte[] data = Base64.getDecoder().decode(string);\n\t\tObjectInputStream objectInputStream;\n\t\tObject object = null;\n\t\ttry {\n\t\t\tobjectInputStream = new ObjectInputStream(new ByteArrayInputStream(data));\n\t\t\tobject = objectInputStream.readObject(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Glue back a period to the token if the token was an abbreviation. This does not included a check yet to see whether the abbreviation is sentence final.
private void restoreAbbreviations(Token coreToken, ArrayList<Token> puncts) { if (puncts.size() > 0 && puncts.get(0).isPeriod() && Abbreviations.ABBREVS.contains(coreToken.text + ".")) { coreToken.text = coreToken.text + "."; coreToken.endToken += 1; puncts.remove(0); } }
[ "private boolean isAbbreviation(String word) {\n\n boolean abbr = true;\n String[] parts = word.split(\"\\\\.\");\n for (String part : parts) {\n if (part.length() > 1 || !Pattern.matches(\"[a-zA-Z]\", part)) {\n abbr = false;\n break;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the common character code definition.
public interface CharCodes { /** * The line feed. */ public static final int LF = 0x0a; /** * The CR. */ public static final int CR = 0x0d; /** * The TAB. */ public static final int TAB = 0x09; /** * The white space. */ public static final int S...
[ "public abstract char getCodeChar();", "public interface Codes\r\n{\r\n public static char NUL = '\\u0000'; //byte 0\r\n public static char LF = '\\u0009' +1; //line feed - for some reason doesn't like 000a\r\n public static char CR = '\\u000c' +1; //doesn't like 000d either\r\n public st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the patchName attribute of the EnsoniqVFXBankDriver object
@Override public void setPatchName(Patch p, int patchNum, String name) { int oPatchStart = getPatchStart(patchNum); EnsoniqVFXSingleDriver.setPatchName(p.sysex, name, oPatchStart); }
[ "protected void setPatchName(Patch p, String name) {\n if (patchNameSize == 0) {\n ErrorMsg.reportError(\"Error\", \"The Driver for this patch does not support Patch Name Editing.\");\n return;\n }\n \n while (name.length() < patchNameSize)\n name = name +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A context for recording and retrieving messages for display.
public interface MessageContext { /** * Get all messages in this context. The messages returned should be suitable for display as-is. * @return the messages */ Message[] getAllMessages(); /** * Get all messages in this context for the source provided. * @param source the source associated with messages, ...
[ "public MessageContext createMessageContext();", "SubscriptionContext getContext();", "interface Context {\n\n /**\n * Retrieves the name of the user which invoked the command.\n *\n * @return a name.\n */\n @NonNull\n String getUserName();\n\n /**\n * Retrieves a formatted user ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the previousTotal field, that keeps track of the last total of elements
public void setPreviousTotal(int previousTotal) { this.previousTotal = previousTotal; }
[ "public void setPreviousUnitPrice(Float previousUnitPrice) {\n this.previousUnitPrice = previousUnitPrice;\n }", "public double getPrevCount()\n {\n\n return this.prevCount;\n }", "@Override\n public Object getPreviousValue() {\n Double num;\n this.setStepSize(getPrevious...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filippo brunelleschi effect test.
@Test public void filippoBrunelleschiEffectTest(){ Effect effect = new FilippoBrunelleschiEffect(); effect.applyEffect(player); assertTrue(player.getBonuses().isDiscountOccupiedTower()); }
[ "@Test\n\tpublic void lucreziaBorgiaEffectTest(){\n\t\tEffect effect = new LucreziaBorgiaEffect();\n\t\teffect.applyEffect(player);\n\t\tfor(FamilyMember f : player.getFamilyMembers().values()){\n\t\t\tassertEquals(player.getFamilyMembers().get(f.getColor()).getActionValueVariation(), 2);\n\t\t}\n\t}", "@Test\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the passive port.
public void setPassivePort(int passivePort) { ioSession.setAttribute(PASSIVE_PORT, passivePort); }
[ "public void setPassive(boolean passive) {\n this.passive = passive;\n }", "public void setPort(int port);", "public void setPort(int p) {\n\t\tport = p;\n\t}", "public void setPort(Port port);", "public void setPASSPORT(int value) {\r\n this.passport = value;\r\n }", "public void se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates empty member for deserialization purpose.
Member() {}
[ "public EpMember() {\n this(\"ep_member\", null);\n }", "public PersistenceMemberElement ()\n\t{\n\t\tthis(null, null);\n\t}", "public StructMember() { }", "public Member()\n {\n // initialise instance variables\n firstName = null;\n lastName = null;\n phoneNumber = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this whole procedure is 2x as fast as nextInt(255) + 1 or three times as fast as rng.nextInt(8) & 0xff.
protected int generateByte() { do { rng.nextBytes(bytes); } while (bytes[0] == 0); // the random byte must not be 0 return ((byte)(bytes[0] & 0xff) + 256) % 256; }
[ "@Test\n void secureRandom() throws NoSuchProviderException, NoSuchAlgorithmException {\n SecureRandom secureRandomGenerator = SecureRandom.getInstance(\"SHA1PRNG\", \"SUN\");\n\n // Get 128 random bytes\n byte[] randomBytes = new byte[128];\n secureRandomGenerator.nextBytes(randomBytes);\n System.o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the custom background paint that will be used instead of the predefined backgroundcolors like DARK_GRAY, BEIGE etc.
public java.awt.Paint getCustomBackground() { return this.customBackground; }
[ "public Paint getBackgroundPaint() {\n\t\treturn this.background.getPaint();\n\t}", "Color getBackground();", "public ColorModel getGeneralContainerBackground();", "public Color getBackground();", "protected Color createBackgroundColour() {\n\t\treturn null;\n\t}", "public Color getGraphBackground() {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Vigenere Method to encode a byte array using a byte array keyword The keyword is repeated along the message to encode The bytes of the keyword are added to those of the message to encode
public static byte[] vigenere(byte[] plainText, byte[] keyword, boolean spaceEncoding) { assert(plainText != null); byte[] cipherBytes = new byte[plainText.length]; int spaceAmount = 0; for (int i = 0; i < plainText.length; i++) { if (!spaceEncoding && plainText[i] == SPACE) { cipherBytes[i] = SPACE; ...
[ "public byte[] encode(byte[] data);", "void encode(ByteBuffer buffer, Message message);", "public abstract void encode(ByteBuffer byteBuffer);", "public static byte[] vigenere(byte[] plainText, byte[] keyword, boolean spaceEncoding) {\n\t\tassert (plainText != null);\n\t\tassert (keyword.length > 0 && keyword...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleChordParams" $ANTLR start "ruleChordParams" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:433:1: ruleChordParams : ( ( rule__ChordParams__Group__0 ) ) ;
public final void ruleChordParams() throws RecognitionException { int stackSize = keepStackSize(); try { // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:437:2: ( ( ( rule__ChordParams__Group__0 ) ) ) // ../...
[ "public final void rule__Chord__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2919:1: ( ( ruleChordParams ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Sets value as the attribute value for Attribute2
public void setAttribute2(String value) { setAttributeInternal(ATTRIBUTE2, value); }
[ "public void setAttribute2(String value) {\r\n setAttributeInternal(ATTRIBUTE2, value);\r\n }", "public void setAttribute2(String value) {\n setAttributeInternal(ATTRIBUTE2, value);\n }", "public void setAttr2 (String value, String name) {\n setAttr2(value, entryNames.indexOf(name));\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method removes allShort Films from the List of Shows.
private void removeShorts(List<Show> filteredShows, Map<Integer, CommonItem> shortsMap) { Iterator iter = filteredShows.iterator(); // Remove all ShortFilms from the list of Shows. while( iter.hasNext() ) { Show show = (Show)iter.next();...
[ "private void removeShow() {\n\t\tCinema cinemaToRemoveFrom = ConsoleBoundary.printRemoveShow();\n\t\tif(cinemaToRemoveFrom == null)\n\t\t\treturn;\n\t\tShow showToRemove = ConsoleBoundary.printShowList(cinemaToRemoveFrom);\n\t\tif(showToRemove == null)\n\t\t\treturn;\n\t\tcinemaToRemoveFrom.removeShow(showToRemove...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field555' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField555() { field555 = null; fieldSetFlags()[555] = false; return this; }
[ "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField123() {\n field123 = null;\n fieldSetFlags()[123] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField987() {\n field987 = null;\n fieldSetFlags()[987] = false;\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the side panels where the picks will be locked in
public void setupSidePanels() { URL url = getClass().getResource(".coredata/background/LeftTeam.png"); leftTeamIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url)); leftTeam = new JLabel(leftTeamIcon); url = getClass().getResource(".coredata/background/RightTeam.png"); rightTeamIcon = new ImageIcon...
[ "public void drawSidePanel() {\n\t\tSystem.out.println(\"Draw info panel\");\n\n\t\tsidePanel = new JPanel();\n\t\tsidePanel.setBounds(990, 10, 200, 760);\n\t\tsidePanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\tsidePanel.setBackground(Color.LIGHT_GRAY);\n\n\t\tsidePanel.setLayout(null);\n\t\t// ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given filter to the advancedtablecompositionOptionalProperty edition editor.
public void addFilterToAdvancedtablecompositionOptionalProperty(ViewerFilter filter);
[ "public void addFilterToAdvancedtablecompositionRequiredProperty(ViewerFilter filter);", "public void addBusinessFilterToAdvancedtablecompositionOptionalProperty(ViewerFilter filter);", "public void addBusinessFilterToAdvancedtablecompositionRequiredProperty(ViewerFilter filter);", "public void addFilterToCom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log a cache out.
public void logCacheOut( int gameid ) { writer.print( System.currentTimeMillis( ) ); writer.print( " O " ); writer.print( gameid ); writer.println( ); writer.flush( ); }
[ "private void logout(){\n cache.setLoggedIn(false);\n finish();\n }", "private void logout() {\n CacheManager.instance(Constants.userCacheOptions).clear();\n }", "private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the post arg in request header, if this argument is exist, modfiy this value.
public void addPostArg(String key, String value);
[ "private void addArg(String key, Object value) {\n\t\tif (requestArguments == null) {\n\t\t\trequestArguments = new Hashtable();\n\t\t}\n\t\tif (value == null || key == null) {\n\t\t\treturn;\n\t\t}\n\t\trequestArguments.put(key, value);\n\t}", "RequestBuilder addHeaderParameter(String key, String value);", "pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column lt_google_adwords_report_ad.is_negative
public void setIsNegative(String isNegative) { this.isNegative = isNegative; }
[ "public void setNegative(boolean negative) {\n this.negative = negative;\n }", "public void setNegativeFlag(String negativeFlag) {\n\t\tthis.negativeFlag = negativeFlag;\n\t}", "public void setAllowNegative(boolean allowNegative) {\n\t\tthis.allowNegative = allowNegative;\n\t\trequestRepaint();\n\t}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the moving flag.
public void setMoving(boolean moving) { this.moving = moving; }
[ "public void setMoved(boolean b)\r\n {\r\n moved = b;\r\n }", "public void moved(){\r\n\t\tisMoved = true;\r\n\t}", "public void moved(){\r\n moved = true;\r\n }", "public void setMoveState(boolean moveState) {\r\n this.moveState = moveState;\r\n }", "public void setDirectionMove(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deliberately fail the test case
@Test public void feelingLucky() { Assert.fail(); Assert.fail(); }
[ "@Test\n void fail_the_test() {\n }", "public void testFail19() throws Exception {\n }", "public void testSoThatTestsDoNotFail() {\n\n }", "private void FailTest() {\n passed = false;\n }", "public void fail( String reason );", "private static void testFail() throws Throwable {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialization function executed after dependency injection has finished. The MessageProcessor Singleton is added to the Map of MessageProcessors.
@PostConstruct public void init() { this.messageProcessorMap.addMessageProcessor(this.messageType, this); }
[ "@PostConstruct\n public void init() {\n this.iec61850RequestMessageProcessorMap.addMessageProcessor(this.messageType, this);\n }", "@PostConstruct\n public void init() {\n promulgationManager.registerPromulgationService(this);\n }", "protected void initProcessors() {\n addBodyProcessor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads data from the channel and passes it to the consumer. This method does not mutate the acutal data in the provided buffer, but makes it's own copy to pass to the consumer.
public int read( final ByteBuffer buffer) throws IOException { final int read = channel.read( buffer); for ( Consumer< ?> consumer : consumers.values()) consumer.consume(( ByteBuffer) buffer.duplicate().flip()); return read; }
[ "@Override\n public RECEIVER_RESULT receive(Channel channel, ByteBuf byteBuf) {\n compositeByteBuf.addComponent(true, byteBuf.retainedSlice()); // retain and should be released later\n subByteBufRef.set(byteBuf.readBytes(byteBuf.readableBytes()));\n return REC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new perspective for the given radius.
private WorldPerspectiveReference createPerspective(double radius) { World world = getWorld().buffer(radius); AbstractSpatialPathfinder spatialPathfinder = createSpatialPathfinder(); spatialPathfinder.setStaticObstacles(world.getStaticObstacles()); WorldPerspective perspective = new WorldPerspective(world, ...
[ "public WorldPerspectiveReference(double radius, WorldPerspective perspective) {\n\t\t\tthis.perspective = perspective;\n\t\t\tthis.radius = radius;\n\t\t}", "Perspective createPerspective();", "public void create(Perspective perspective) throws IllegalArgumentException, Exception;", "public RegionCreator rad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the future that can be used to determine when the current CRCL program is finished. Only useful for debugging.
public @Nullable XFuture<Boolean> getCrclRunProgramFuture() { if (null == crclClientJInternalFrame) { throw new IllegalStateException("CRCL Client View must be open to use this function."); } return crclClientJInternalFrame.getRunProgramFuture(); }
[ "public @Nullable\n XFuture<Boolean> getLastRunProgramFuture() {\n return lastRunProgramFuture;\n }", "long getFinished();", "public GridFinishedFuture() {\n res = null;\n resFlag = RES;\n }", "com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.BuildFinished ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'var258' field.
public java.lang.Integer getVar258() { return var258; }
[ "public java.lang.Integer getVar258() {\n return var258;\n }", "public java.lang.Integer getVar259() {\n return var259;\n }", "public java.lang.Integer getVar259() {\n return var259;\n }", "public java.lang.Integer getVar253() {\n return var253;\n }", "public java.lang.Integer getVar253(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new StatCollectorCondCSAMMVar.
public StatCollectorCondCSAMMVar(String name, boolean autoCollect) { this.name = name; this.autoCollect = autoCollect; }
[ "public StatCollectorCondCSAMMVar() {\n }", "public StatCollectorCondCSAMMVar(String name) {\n this(name, true);\n }", "com.google.protobuf.ByteString\n getInitCondBytes();", "public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get if weekend is showing
public boolean getShowWeekend() { return weekend; }
[ "public boolean getRunOnWeekends();", "public boolean isWeekend()\r\n {\r\n DayOfWeek dd=getDay(getDepartingDate());\r\n DayOfWeek rd=getDay(getReturningDate());\r\n if((dd==DayOfWeek.FRIDAY||dd==DayOfWeek.SATURDAY||dd==DayOfWeek.SUNDAY)||(rd==DayOfWeek.FRIDAY||rd==DayOfWeek.SATURDAY||...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts the connection reader and writer threads.
void start() throws Exception { if (logger.isLoggable(BasicLevel.DEBUG)) logger.log(BasicLevel.DEBUG, "TcpConnection.start()"); try { // TODO (AF): Cleans this code, a part of the initialization below should be done // in the constructor. if (ctx.isNoAckedQueue()) { ioctrl.setNoA...
[ "void startConnectionReader()\n {\n if (! synchronousMode)\n {\n connectionReader.start();\n }\n }", "private void startReader() {\n\t\tClientReader reader = new ClientReader();\n\t\tThread readerThread = new Thread(reader);\n\t\treaderThread.start();\n\t}", "public void start() {\n clien...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the MaxBox peer of this mxj instance.
public MaxBox getMaxBox() { if(_max_box == null) _max_box = new MaxBox(getParentPatcher(),_get_max_box()); return _max_box; }
[ "private Peer selectPeerToRequest() {\n\t\tif(blockchain.getPeers() != null && !blockchain.getPeers().isEmpty())\n\t\t\treturn blockchain.getPeers().stream().max(Comparator.comparing(Peer::getChainHeight)).get();\n\t\telse\n\t\t\treturn null;\n\t}", "public HyperPoint getPMax() {\n\t\treturn pMax;\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Affirms if this receiver has more combinations.
public boolean hasMoreCombination() { return cursor < combos.length; }
[ "@Override\n public boolean isCombinableWithOtherOffers() {\n return combinableWithOtherOffers;\n }", "protected boolean areThereMoreCoins() {\n \n return !this.getCoins().isEmpty();\n }", "public boolean isCombinable(){\r\n\t\tfor (int i=0; i<numItems; i++)\r\n\t\t\tif (MesquiteDo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find if a player has Legal Move
private boolean playerHasMove(){ for (int row = 0; row < rowBounds; row++) { for (int col = 0; col < columnBounds; col++) { if (playerHasLegalMove(row, col, "X")) { playerX = true; } if (playerHasLegalMove(row, col, "O")) { ...
[ "public boolean isLegalMove(M move);", "private boolean playerCanMove() \n {\n return ( isPlayerMovePossible(MoveDirection.NORTH)|| isPlayerMovePossible(MoveDirection.SOUTH)\n || isPlayerMovePossible(MoveDirection.EAST) || isPlayerMovePossible(MoveDirection.WEST));\n\n }", "public bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
uint64 arena_battle_id = 6;
public long getArenaBattleId() { return arenaBattleId_; }
[ "long getArenaBattleId();", "int getBattleId();", "long getGameid();", "long getPlayerid();", "long getSteamID();", "String getKilledUserSteamID();", "long getSteamid();", "long getPlayerId();", "public static int offset_moteId() {\n return (0 / 8);\n }", "public int getBattleId() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called to add radiation to the entity
public static void addRadiation(Entity entity, float value) { float current = getRadiation(entity); current += value; setRadiation(entity, current); //Rest remove timer, as it can only run if radiation is not being added NBTTagCompound data = getRadiationData(entity, true); ...
[ "Radian createRadian();", "public abstract void add(Field.RadioData radioData);", "public static void setRadiation(Entity entity, float value)\n {\n NBTTagCompound data = getRadiationData(entity, true);\n data.setFloat(NBT_RADS, value);\n }", "private void createShapeRadioButtons() {\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field84' field has been set
public boolean hasField84() { return fieldSetFlags()[84]; }
[ "public boolean hasField83() {\n return fieldSetFlags()[83];\n }", "public boolean hasField943() {\n return fieldSetFlags()[943];\n }", "public boolean hasField834() {\n return fieldSetFlags()[834];\n }", "public boolean hasField884() {\n return fieldSetFlags()[884];\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of where expressions.
public List getWhere() { return where; }
[ "public com.triniforce.pk.soap.WhereExpr[] getWhereExprs() {\n return whereExprs;\n }", "public Set<StatementPattern> getWherePatterns() {\n if (this.wherePatterns == null) {\n this.wherePatterns = this.whereExpr == null ? ImmutableSet.of() : ImmutableSet\n .copyOf(A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
grabs the registry names and mod names of the Registry.Entry objects
public void grabNames() { for(Registry.Entry e : this) { this.grabNames(e); } }
[ "Registry getRegistry( );", "public Set<String> getModuleNames() {\r\n return registry.keySet();\r\n }", "Registry getRegistry();", "public RegistryEntry[] getDescendants(RegistryEntry entry);", "Set<String> getRegistryKeys();", "public Enumeration getEntryNames() {\r\n\t\treturn _list.elements();\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method for checking if the index is within range. A TreeDictionary node can have at most 8 nodes, and a minimum of one, so it must hold true that 0 <= index <=7
public boolean rangeCheck(int index) { if (index >= 0 && index <= 7) { return true; } else { return false; } }
[ "private static final boolean checkShouldRaiseIndex(Index prevIndex,\n\t\t\tIndex nodeIndex, int bottomLevel) {\n\t\tIndex nextIndex = nodeIndex.right;\n\t\tif (prevIndex == null || nextIndex == null)\n\t\t\treturn false;\n\t\tNode prev = prevIndex.node, next = nextIndex.node;\n\t\treturn (prev.vars.topLevel - 1 <=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The estimated width of the palm when the hand is in a flat position. float handWidth = hand.palmWidth();
public float palmWidth() { return LeapJNI.Hand_palmWidth(this.swigCPtr, this); }
[ "public final double getGoalWidth() { return 140.0; }", "public float getWidth(){\n\t\treturn this.arm.width();\n\t}", "public int getWidth() {\n return width.intValue();\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}", "double getPrefWidth();", "public double getWidth(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }