query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Calculates cleanup time in days
public long calculateCleanupTimeInDays(AdministrationAutoCleanupConfig config) { if (config == null) { LOG.warn("Given auto cleanup configuration was null! So use fallback configuration with defaults"); config = new AdministrationAutoCleanupConfig(); } CleanupTime time = ...
[ "public int elapsedTimeDays() {\n\t\treturn (int)((System.currentTimeMillis() - checkedOutTime) / DURATION_DAY);\n\t}", "private double getTimeRemainingInUTCDay(){\n\t\tdouble daysLeftInDay;\n\n\t\tInstant origin = Instant.ofEpochMilli (cur_mainshock.getOriginTime());\n\t\tZonedDateTime zdt = ZonedDateTime.ofInst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ponto Tests // Test constructor with no arguments
@Test public void testPontoConstructor0() { Assert.assertEquals("(0.00, 0.00)", new Ponto().toString()); }
[ "@Test\n public void constructor(){\n /**Positive tests*/\n Road road = new Road(cityA, cityB, 4);\n assertEquals(road.getFrom(), cityA);\n assertEquals(road.getTo(), cityB);\n assertEquals(road.getLength(), 4);\n }", "public PilotoEstrellaTest()\n {\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get one configData by id.
@Override @Transactional(readOnly = true) public ConfigData findOne(Long id) { log.debug("Request to get ConfigData : {}", id); return configDataRepository.findOne(id); }
[ "@Override\n @Transactional(readOnly = true)\n public Optional<KeyConfigDTO> findOne(Long id) {\n log.debug(\"Request to get KeyConfig : {}\", id);\n return keyConfigRepository.findById(id)\n .map(keyConfigMapper::toDto);\n }", "public IConfiguration getConfiguration(String id);"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo que devuelve un objeto de tipo Usuario buscado mediante un parametro cedula
@Override public Usuario buscarUsuario(String cedula) { for(Usuario usuario: getUsuarios()) { if(usuario.getCedula().compareToIgnoreCase(cedula)==0) { System.out.println("Usuario encontrado en ON "+usuario.getNombre()); return usuario; } } return null; }
[ "public Usuario buscarUsuario(String cedula) {\n\n usuario = usuarioDAO.read(cedula);\n\n return usuario;\n\n }", "public Usuario getUsuario(String username);", "public Usuario(int id,String nombre, String cuenta,String clave){\n this.id=id;\n this.nombre=nombre;\n this.cue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a snapshot associated with the provided version.
SMRSnapshot<S> getSnapshot(@NonNull ViewGenerator<S> viewGenerator, @NonNull VersionedObjectIdentifier version);
[ "FlowSnapshotEntity getFlowSnapshot(String flowIdentifier, Integer version);", "public int getSnapshotVersion() {\n return snapshotVersion;\n }", "@Path(\"{version}\")\n public VersionResource getVersionResource(@PathParam(\"version\") String version) {\n if (!VersionUtils.isVersion(version)) {\n W...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compares two photographs by caption alphabetically in photograph if caption the same, compares by rating in descending order
public int compare(Photograph a, Photograph b) { int returnVal = a.getCaption().compareTo(b.getCaption()); if (returnVal != 0) { return returnVal; } returnVal = b.getRating() - a.getRating(); return returnVal; }
[ "@Override\n\tpublic int compare(Photograph photo1, Photograph photo2) {\n\t\tif (photo1.getRating() == photo2.getRating()) {\n\t\t\t\n\t\t\t//if the captions are equals, then it returns 0\n\t\t\tif (photo1.getCaption().equals(photo2.getCaption())){\n\t\t\t\treturn 0;\n\t\t\t\t\n\t\t\t//if they aren't equal, then w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
eval(Map symtab) This eval method is required as part of the abstract class ASTNode. Eval uses the abstract syntax tree to get values and compute correct values. It uses a HashMap as a backing store for key, value pairs. This method returns the value that is to be added to the hashtable.
public double eval(Map<String, Double> symtab) { return this.value; }
[ "public static Integer eval(Object exp) {\n\t\ttry {\n\t\t\tif (exp instanceof Integer) {\n\t\t\t\treturn (Integer)exp;\n\t\t\t}\n\t\t\tif (exp instanceof String) {\n\t\t\t\tif (BINDINGS.containsKey((String)exp)) {\n\t\t\t\t\treturn BINDINGS.get((String)exp);\n\t\t\t\t}\n\t\t\t\tthrow new Exception(\"Invalid symbol...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Triggered when the user changes the body of a method
private void onMethodBodyChanged(JTextField edContents, ObjectBag.Slot slot) { if ( !this.beingBuilt ) { final Method mth = slot.getMethod(); final String mthName = mth.getName(); final String newContents = edContents.getText().trim(); if ( !( mth.getM...
[ "void updateMethod(Method method);", "public void onMethodNameChangedEvent(Method method){\r\n\t\tSystem.out.println(\"Synchroniser : Detected Method Name Change\");\r\n\t\t\r\n\t\tEclipseEditorTag deco = (EclipseEditorTag) method.tag(EclipseEditorTag.NAME_TAG);\r\n\t\t//for (int i = 0; i < deco.length; i++) {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Function: SetRandomMovieString() Description: Takes a JSONObject and converts it to a string, storing it in the SharedPrefereneces. Parameters : JSONObject movieDetails The JSONObject containing details pertaining to a random movie. Return: : N/A
public void SetRandomMovieString(JSONObject movieDetails) { sharedPreferences.edit().putString("RandomMovie", movieDetails.toString()).commit(); }
[ "public void SetLatestMoviesString(JSONObject latestMovies)\n {\n sharedPreferences.edit().putString(\"UpcomingMovies\", latestMovies.toString()).commit();\n }", "private String getNewMovie() {\n int random = (int) (Math.random() * movies.size()) + 1;\n return movies.get(random);\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test iface down holddown rules.
@Test public void testIfaceDownHolddownRules() throws Exception { testIfaceDownHolddownRules("interfaceDownHolddownRules"); }
[ "private void testIfaceDownHolddownRules(String engineName) throws Exception {\r\n\r\n getAnticipator().reset();\r\n\r\n // In the end, we expect to see a down-past-holddown-time event only for interface 1.1.1.1\r\n EventBuilder bldr = new EventBuilder( IFACE_DOWN_PAST_HOLDDOWN_UEI, \"Drools\" ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter method for the COM property "AverageCPUTime_Hours"
@DISPID(68) // = 0x44. The runtime will prefer the VTID if present @VTID(66) int averageCPUTime_Hours();
[ "@DISPID(63)\r\n\t// = 0x3f. The runtime will prefer the VTID if present\r\n\t@VTID(61)\r\n\tint averageRunTime_Hours();", "@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(51)\r\n\tint actualCPUTime_Hours();", "public double asHours() {\n\t\treturn asNanoseconds() / HOUR;\n\t}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
i represents length of binary strings the pattern between length of binary strings i and number of binary strings n is finobacci function
public static int countBinaryStrings(int i) { if (i==1) //f1 { return 2; } if (i==2) //f2 { return 3; } return countBinaryStrings(i-1) + countBinaryStrings(i-2); //fn= fn-1 + fn-2 }
[ "BigInteger findFibonacciNumber(int digit);", "public long fibonacciFunction(int n){\n\t\tif(n==0){\n\t\t\treturn 0;\n\t\t}\n\t\telse if(n>1){\n\t\t\tlong a, b = 1; \n n--; \n a = n & 1; \n n /= 2; \n while (n-- > 0) { \n a += b; \n b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
N Deals Rasl case investopedia
@Test public void test_PNL_NDeals_Investopedia_GRPN(){ pa.addTransaction(new Trade(new Date(), new Date(), "", 19.99, GRPN, 10.21, 1200.00)); pa.addTransaction(new Trade(new Date(), new Date(), "", 19.99, GRPN, 7.39, 300.00)); pa.addTransaction(new Trade(new Date(), new Date(), "", 19.99, GRPN, 6.08, 2000.00)); ...
[ "@Test\n\tpublic void test_PNL_NDeals_BOTH_R(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 19.99, GRPN, 10.00, 100.00));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 19.99, GRPN, 15.00, 500.00));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 19.99, GRPN, 18.00,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get movie lists by the prefix
public List<Movie> getMovieList(String prefix){ return getMovieList(prefix, Integer.MAX_VALUE); }
[ "public List<Movie> getMovieList(String prefix, int num){\r\n List<Movie> movieList = Cache.getCache().getMovieList();\r\n List<Movie> list = new ArrayList<Movie>();\r\n int i = 0;\r\n for (Movie m : movieList){\r\n if (m.getTitle().toLowerCase().startsWith(prefix.toLowerCase(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
void setSzCdContactPurpose(java.lang.String) Sets the value of field 'szCdContactType'.
public void setSzCdContactType(java.lang.String szCdContactType) { this._szCdContactType = szCdContactType; }
[ "public void setSzCdContactPurpose(java.lang.String szCdContactPurpose)\r\n {\r\n this._szCdContactPurpose = szCdContactPurpose;\r\n }", "public java.lang.String getSzCdContactPurpose()\r\n {\r\n return this._szCdContactPurpose;\r\n }", "public java.lang.String getSzCdContactType()\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleID0" $ANTLR start "ruleID0" InternalMyDsl.g:287:1: ruleID0 : ( 'ID' ) ;
public final void ruleID0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:291:2: ( ( 'ID' ) ) // InternalMyDsl.g:292:2: ( 'ID' ) { // InternalMyDsl.g:292:2: ( 'ID' ) // InternalMyDsl.g:293:...
[ "public final void entryRuleID0() throws RecognitionException {\n try {\n // InternalMyDsl.g:279:1: ( ruleID0 EOF )\n // InternalMyDsl.g:280:1: ruleID0 EOF\n {\n before(grammarAccess.getID0Rule()); \n pushFollow(FOLLOW_1);\n ruleID0();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use Login_S2C.newBuilder() to construct.
private Login_S2C(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private Login_C2S(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\r\n super(builder);\r\n this.unknownFields = builder.getUnknownFields();\r\n }", "private C2S_Login(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n this.unknownField...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the macro data to the supplied list of macro definitions
protected void setMacroData(List<String[]> macros) { this.macros = new ArrayList<String[]>(macros); // Reinitialize the expanded macro value array clearStoredValues(); }
[ "public void buildMacroList() {\n \t\tString macroProposalsPaths = Activator.getDefault()\n \t\t\t\t.getPreferenceStore().getString(\n \t\t\t\t\t\tPreferenceConstants.P_MACRO_PROPOSALS_FILESPATH);\n \t\tString[] paths = macroProposalsPaths.split(\";\");\n \t\t// paths must be reversed because the last value added\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the Guard properties.
public static void setGuardProps() { /* * Guard PDP-x connection Properties */ PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_URL, "http://localhost:6669/policy/pdpx/v1/decision"); PolicyEngine.manager.setEnvironmentProperty(org.onap.p...
[ "void _properties(int properties) {\n this.properties = 0;\n }", "private void setProperties() {\n AppState appState = AppState.getInstance();\n appState.difficultyPropertyProperty().setValue(appState.getGameMode().getName());\n appState.lvlPropertyProperty().setValue(appState.getCu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility for copy an property from model to DTO, applying the appropriate transformation
void copyPropertyFromModelToDTO(Object model, Object dto, TransferParams param) { checkNotNull(model, "Model cant be null for copying."); checkNotNull(dto, "DTO cant be null for copying."); checkNotNull(param, "Copy params cant be null"); try { final String modelProperty = p...
[ "@Override\n public T assemble(Object model, Class<T> dtoClass) {\n checkNotNull(model, \"Model assembled can not be null\");\n\n T dto = instantiateDTO(dtoClass);\n\n Collection<TransferParams> params = loadPropertyTransferParams(dtoClass);\n for(TransferParams param : params)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compute the inner product of vector i and vector j
private double k(double[] i, double[] j) { int sum = 0; for (int m = 0; m < i.length; m++) sum += i[m] * j[m]; return sum; }
[ "public static double innerProduct(VectorIntf x, VectorIntf y) {\r\n if (x==null) throw new IllegalArgumentException(\"1st arg is null\");\r\n if (y==null) throw new IllegalArgumentException(\"2nd arg is null\");\r\n final int n = x.getNumCoords();\r\n if (n!=y.getNumCoords())\r\n throw new Illegal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for active status.
public Boolean getActive() { return this.active; }
[ "public int getActiveStatus() {\n return activeStatus;\n }", "public String getActive() {\n return this.active;\n }", "public String getActive() {\n\t\treturn this.active == null ? \"Y\" : this.active;\n\t}", "public Integer getIsActive() {\n return isActive;\n }", "public Bool...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Go out one level, printing a message.
public static void traceOut(String msg) { setLevel(level - 1); tracePrint(msg); }
[ "public void levelOneMethod() {\n\t\tSystem.out.println(\"level one method\");\n\t}", "public void print() \r\n\t{\r\n\t\tfor (int i = 0; i < levels.length; i++) \r\n\t\t{\r\n\t\t\tSystem.out.print(\"Level\" + i + \": \");\r\n\t\t\tlevels[i].print();\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\t\tSystem.out.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the inner datatype being referred to by an offset from a relative/shifted pointer. Generally we expect the base of the relative pointer to be a structure and the offset refers to a (possibly nested) field. In this case, we return the datatype of the field. Otherwise return an "undefined" datatype.
public static DataType findPointerRelativeInner(DataType base, int offset) { if (base instanceof TypeDef) { base = ((TypeDef) base).getBaseDataType(); } while (base instanceof Structure) { DataTypeComponent component = ((Structure) base).getComponentContaining(offset); if (component == null) { break;...
[ "public static int offset_dataType() {\n return (0 / 8);\n }", "public abstract Pointer<T> offset(long offset);", "public int memoryBitOffset ( TypeSpec baseType, int bitOffset, int bitWidth )\n{\n if (LITTLE_ENDIAN)\n return bitOffset;\n else // big endian\n return baseType.width - bitOffset ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replace, but do not delete this. Really used to insert a node in front of this. Does graphstructure changes, making pointerstothis point to nnn. Changes neither 'this' nor 'nnn'. Does not enforce any monotonicity nor unification.
public void insert( Node nnn ) { if( _uses._len>0 ) unelock(); // Hacking edges while( _uses._len > 0 ) { Node u = _uses.del(0); // Old use u.replace(this,nnn); // was this now nnn nnn._uses.add(u); } }
[ "private void replaceNodeSafe(Node old_n, Node new_n) {\n Couple<Edge, Edge> old_1_edges = null; //n-1\n Couple<Edge, Edge> old_edges = null;\n Couple<Edge, Edge> old_2_edges = null; //n+1\n Node n1,n2;\n try {\n if (old_n.equals(_lastNode)) {\n _lastNo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ returns true if the flight is full and false along with the number of seats remaining if it has seats left
public boolean full() { if (remainingSeats == 0) { System.out.println("No more seats"); return true; } System.out.println(remainingSeats + "seats remaining"); return false; }
[ "protected boolean isFlightFull(BitSet seats) {\n assert(FULL_FLIGHT_BITSET.size() == seats.size());\n return FULL_FLIGHT_BITSET.equals(seats);\n }", "public boolean isSeatAllReserved() {\n return airplane.isFull();\n }", "public int numSeatsAvailable() {\r\n\t\tfor (int i=0; i < h...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String zonedDateTime = ZonedDateTime.now(ZoneId.of("UTC")).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); long epochMilli = ZonedDateTime.parse(zonedDateTime).toInstant().toEpochMilli(); String rouplexDateTime = TimeUtils.convertMillisToIsoInstant(epochMilli, 0); // 20170723T11:13:38.197Z Assert.assertTrue(rouplexDate...
@Test public void testConvertIsoInstantToMillis() throws Exception { }
[ "@Test\n public void testConvertIsoInstantToMillis1() throws Exception {\n }", "@Test\n public void pythonUtcNow() {\n String date = \"2019-01-30 15:31:05.234778\";\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss.SSSSSS\");\n LocalDateTime localDateT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "BroadcastId" element
void unsetBroadcastId();
[ "void setBroadcastId(long broadcastId);", "public void clearBroadcastBy() {\n checkState(getConfidenceType() != ConfidenceType.PENDING);\n broadcastBy.clear();\n lastBroadcastTime = null;\n }", "void xsetBroadcastId(org.apache.xmlbeans.XmlLong broadcastId);", "public void remBroadcast(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests remove method Offering a int/char object and checking if my assertEquals returns the correct char/int after using the remove method. Checking if the Exception is thrown by removing now another object. After that I offer 2 more char/int and use the remove method which should return the first char/int Object. After...
@Test @DisplayName("Testing remove method") public void testRemove() { integerQ.offer(1); assertEquals(1, integerQ.remove()); assertThrows(NoSuchElementException.class, ()-> {integerQ.remove();}); integerQ.offer(2); integerQ.offer(3); assertEquals(2, integerQ.remo...
[ "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n int i = 0;\n Pit instance = new Pit();\n Pebble expResult = null;\n Pebble result = instance.remove(i);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to generate RandomValue instances according the type parameter.
public RandomValue createRandomInstance(String type, int lowerBound, int upperBound) throws IllegalArgumentException { if (type == null || type.isEmpty()) { throw new IllegalArgumentException("RandomValue instance must hava a type."); } if ("RealRandom".equals(type)) { return new Real...
[ "public static Object getRandomValue(final Class type) {\n\n /*\n * String and Character types\n */\n if (type.equals(String.class)) {\n return RandomStringUtils.randomAlphabetic(10);\n }\n if (type.equals(Character.TYPE) || type.equals(Character.class)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of ExtensionLength.
public void setExtensionLength(Integer extensionLength) { this.extensionLength = extensionLength; }
[ "public Integer getExtensionLength() {\r\n return extensionLength;\r\n }", "public void setLength(int value) {\r\n this.length = value;\r\n }", "public void setLength(long length);", "public void setLengthOverride(int length) throws CodeUnitInsertionException;", "public void setLength (d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces text in a translation
public static void replaceText(Translation translation, TextBean textBean) { Language language = translation.getLanguage(textBean.getLanguage()); List<TextBean> textBeans = language.getType(textBean.getType()); int textIndex = language.getIndex(textBeans, textBean); replaceText(language, textBean, textIndex); ...
[ "String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;", "protected abstract void handleTransliterate(Replaceable text,\n Position pos, boolean incremental);", "String translate(LanguageEnum language, String text);", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This data encapsulation method returns the questionNumber which the lifeline was used for
public int getQuestionNumber() { return questionNumber; }
[ "public int getQuestionNumber() {\r\n\t\treturn questionNumber;\r\n\t}", "public int getQuestionNumber() {\n return questionNumber;\n }", "public final int getQuestionNum() {\n return questionNum;\n }", "private Integer currentQuestion() {\r\n\t\tString questionNum = lblQuestionNumber.getText();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field lastDayIncome is set (has been assigned a value) and false otherwise
public boolean isSetLastDayIncome() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LASTDAYINCOME_ISSET_ID); }
[ "public boolean isSetFamilyIncome() {\n return EncodingUtils.testBit(__isset_bitfield, __FAMILYINCOME_ISSET_ID);\n }", "public boolean isSetEndMoney() {\n return EncodingUtils.testBit(__isset_bitfield, __ENDMONEY_ISSET_ID);\n }", "public boolean hasIncomeLevel() {\n return fieldSetFlags()[12];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the skipMatch value for this PmRule.
public java.lang.Short getSkipMatch() { return skipMatch; }
[ "public java.lang.Short getSkipNotMatch() {\r\n return skipNotMatch;\r\n }", "public Long getSkip() {\n\t\treturn _skip;\n\t}", "public void setSkipMatch(java.lang.Short skipMatch) {\r\n this.skipMatch = skipMatch;\r\n }", "public long getSkipCount() {\n return nSkip_;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the builder for the settings used for calls to encryptVolumes.
public UnaryCallSettings.Builder<EncryptVolumesRequest, Operation> encryptVolumesSettings() { return encryptVolumesSettings; }
[ "public com.google.cloud.gkemulticloud.v1.AzureConfigEncryption.Builder\n getConfigEncryptionBuilder() {\n bitField0_ |= 0x00000040;\n onChanged();\n return getConfigEncryptionFieldBuilder().getBuilder();\n }", "public UnaryCallSettings<EncryptVolumesRequest, Operation> encryptVolumesSett...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the field selectedApps.
public void setSelectedApps(ch.ivyteam.ivy.scripting.objects.List<ch.ivyteam.ivy.application.IApplication> _selectedApps) { selectedApps = _selectedApps; }
[ "public ch.ivyteam.ivy.scripting.objects.List<ch.ivyteam.ivy.application.IApplication> getSelectedApps()\n {\n return selectedApps;\n }", "public void setApplications(List<Application> apps)\n {\n _apps.clear();\n\n if (apps != null) {\n _apps.addAll(apps);\n\n for (Application ap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the category of this instance. This defines the category of the TypeDef that determines its properties.
public TypeDefCategory getTypeDefCategory() { return typeDefCategory; }
[ "public Byte getCategoryType() {\n return categoryType;\n }", "@ApiModelProperty(value = \"The (class) type of this category\")\n\n\n public String getType() {\n return type;\n }", "public String getCategotyType() {\r\n\t\treturn categotyType;\r\n\t}", "public String getCat_class() {\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get delegated session service.
protected abstract SessionService getSessionService();
[ "public SessionService getSessionService() {\n\t\treturn this.sessionService;\n\t}", "private GameSession getDelegate() {\n if( delegate == null ) {\r\n // Look it up\r\n this.delegate = rmiService.getRemoteObject(GameSession.class);\r\n log.debug(\"delegate:\" + delegate);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieve the pokemon from the PC based on its name and box number
public Pokemon retrievePokemon(String pokemonName, int boxNum) { if(pokemonBoxes.get(boxNum).isInTheBox(pokemonName)) { return pokemonBoxes.get(boxNum).getPokemon(pokemonName); }else { System.out.println(pokemonName + " is not inside box " + boxNum); return null; } }
[ "public Pokemon getPokemonByName(String name) {\n\n\t\tswitch (name.toUpperCase()) {\n\t\tcase \"MAGIKARP\":\n\t\t\treturn magikarp;\n\t\tcase \"CYNDAQUIL\":\n\t\t\treturn cyndaquil;\n\t\tcase \"RHYDON\":\n\t\t\treturn rhydon;\n\t\tcase \"DIGLETT\":\n\t\t\treturn diglett;\n\t\tcase \"SIMISAGE\":\n\t\t\treturn simis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a hard constraint on the kth cost: sum_i,a (x_ia C_k(i,a)) = HLB).
public static void addHardCostConstraint(int costFuncIndex, NonStrictConstraint hardConstraint, ExplicitMDP explicitMDP, GRBVar[][] xVars, GRBModel model) throws GRBException { addCostConstraint(costFuncIndex, hardConstraint, explicitMDP, xVars, null, model); }
[ "private static void addCostConstraint(int costFuncIndex, NonStrictConstraint constraint, ExplicitMDP explicitMDP,\n\t\t\tGRBVar[][] xVars, GRBVar vVar, GRBModel model) throws GRBException {\n\t\t// Expression: sum_i,a (x_ia * C_k(i,a))\n\t\tGRBLinExpr constraintLinExpr = createCostTerm(costFuncIndex, explicitMDP, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional float stability = 23;
@java.lang.Override public float getStability() { return stability_; }
[ "public Builder setStability(float value) {\n bitField0_ |= 0x00008000;\n stability_ = value;\n onChanged();\n return this;\n }", "public void setStability(int stability) {\r\n\tthis.stability = stability;\r\n }", "float getTestFloat();", "public void setStability(int stability) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRulePackageRefCS" $ANTLR start "rulePackageRefCS" ../org.eclipse.qvto.examples.xtext.qvtoperational/srcgen/org/eclipse/qvto/examples/xtext/qvtoperational/parser/antlr/internal/InternalQVTOperational.g:2587:1: rulePackageRefCS returns [EObject current=null] : ( ( (lv_uriCS_0_0= ruleStringLiteralExpCS ) ...
public final EObject rulePackageRefCS() throws RecognitionException { EObject current = null; EObject lv_uriCS_0_0 = null; EObject lv_pathNameCS_1_0 = null; EObject lv_uriCS_2_0 = null; enterRule(); try { // ../org.eclipse.qvto...
[ "public final EObject entryRulePackageRefCS() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_rulePackageRefCS = null;\r\n\r\n\r\n try {\r\n // ../org.eclipse.qvto.examples.xtext.qvtoperational/src-gen/org/eclipse/qvto/examples/xtext/qvtoperational/parser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes the gui by adding the gamepanel and buttonpanel to the content pane Adds a menu bar and creates the sound objects
public void makeGUI() { buttonPanel = new ButtonPanel(this,ship,planet); gamePanel = new GamePanel(this,ship,planet); JMenuBar menubar = new JMenuBar(); JMenu menuHelp = new JMenu("Help"); helpItem = new JMenuItem("Help"); menuHelp.add(helpItem); menubar.add(menuHelp); setJMenuBar(menubar); sounds ...
[ "@Override\r\n public void initGUIControls()\r\n {\r\n // WE'LL USE AND REUSE THESE FOR LOADING STUFF\r\n BufferedImage img;\r\n float x, y;\r\n SpriteType sT;\r\n Sprite s;\r\n\r\n // FIRST PUT THE ICON IN THE WINDOW\r\n PropertiesManager props = PropertiesMan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the x position of a TilePanel in the grid of the GridBagLayout.
private int getGridX(TilePanel t) { return gbl.getConstraints(t).gridx; }
[ "public int getTileGridXOffset();", "public int getPanelXLocation() {\n\t\treturn panel.getX();\n\t}", "public int getTileX()\n\t{\n\t\treturn this.tileX;\n\t}", "public int getTileX() {\r\n return this.tileX;\r\n }", "public int getXGridOfElement(float wx) {\r\n\t\tfloat tx = -wx + (s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is responsible for translating service properties into attribute constraints.
public static List<Constraint> getAttributeConstraints(ServiceReference reference) { String keys[] = reference.getPropertyKeys(); List<Constraint> attConstraints = new ArrayList<Constraint>(); for (String key : keys) { if (key != null && key.toLowerCase().startsWith(Attribute.SERVICE_CONSTRAINT) || key.toLower...
[ "ServiceProperty createServiceProperty();", "private void generalizeCSARequirements(){\n\t\tArrayList<ServiceTemplate> comps = new ArrayList<ServiceTemplate>() ;\n\t\tArrayList<Requirement> reqs = new ArrayList<Requirement>() ;\n\t\t\n\t\tcomps = this.data.getServiceTemplates();\n\t\treqs = this.data.getRequireme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method checks whether left diagonal is occupied by a symbol
private boolean checkLeftDiagonal(Board board, char symbol) { for (int i = 0; i < size; i++) if (board.array[i][i] != symbol) return false; return true; }
[ "private boolean testLeftDiagonal(Board board, char symbol)\n {\n for (int i = 0; i < size; i++)\n if (board.array[i][i] != symbol && board.array[i][i] != EMPTY)\n return false;\n return true;\n }", "private boolean testRightDiagonal(Board board, char symbol)\n {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to reconcile overlaps along a ray trace. The Partitions are sorted according to their distance along the ray.
public SortedSet<Partition> handleOverlaps( SortedSet<Partition> parts, Ray ray );
[ "private void checkOverlaps() {\r\n final ArrayList<Vertex> overlaps = new ArrayList<Vertex>(3);\r\n final int count = getOutlineNumber();\r\n boolean firstpass = true;\r\n do {\r\n for (int cc = 0; cc < count; cc++) {\r\n final Outline outline = getOutline(cc);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update metadata for a DOI
public void update(DOI doiRow) { DSpaceObject dso = doiRow.getDSpaceObject(); if (Constants.ITEM != dso.getType()) { throw new IllegalArgumentException("Currently DSpace supports DOIs for Items only."); } try { provider.updateMetadataOnline(context, dso, ...
[ "public void updateData(String identifier, String owner, Object metadata) ;", "void updateArtifactMetaData(String groupId, String artifactId, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, RegistryStorageException;", "public abstract boolean update(String identifier, Map<String,String> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column k8order_helm.helm_name
public void setHelmName(String helmName) { this.helmName = helmName == null ? null : helmName.trim(); }
[ "public String getHelmName() {\n return helmName;\n }", "public void setCurrentShelter(DatabaseReference currentShelter) {\n this.currentShelter = currentShelter;\n }", "public void setHelmet(String helmet)\n {\n this.items.put(\"Helmet\", helmet);\n this.draw();\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/De giai quyet thuat toan thi phai sap xep cac tien trinh theo burstTime tang dan tu be den lon nhung phai thoa man arrivalTime be hon thi tien hanh truoc. Sau do chi don gian ap dung FCFS
void timThoiGianTrungBinh(Process[] processes) { //sap xep tien trinh theo arrival time for (int i = 0; i < processes.length-1; i++) { for (int j = i+1; j < processes.length; j++) { if(processes[i].getArrivalTime() > processes[j].getArrivalTime()) { Process temp = processes[i]; processes[i] = proce...
[ "public long getBurstTime() {return burst;}", "public int getOriginalBurst_time(){\n \n return this.originalBurst_time;\n }", "public double ProcessArrivalTime()\r\n\t{\r\n\t\tdouble U = Math.random();\r\n\t\t//double lambda = 0.04;\r\n\t\tdouble lambda = 0.01;\r\n\t\tdouble V = ( -1 * (Math.log(1.0 - U)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Dedicated for iOS device. This field indicates the IDFA (Identifier for Advertising) corresponding to the service subscriber. IDFA, a string of hexadecimal 32 characters including numbers and letters, is provided by Apple Inc. to identify the user. Note: Since the iOS14 update in 2021, Apple Inc. has allowed users ...
public void setIDFA(String IDFA) { this.IDFA = IDFA; }
[ "void setDeviceID(String id);", "void setDPID(java.lang.String dpid);", "public void setDID(java.lang.String DID) {\r\n this.DID = DID;\r\n }", "public Builder setDFId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an aliased WETRN.MRKT_PERD_SKU_PRC table reference
public MrktPerdSkuPrc(String alias) { this(alias, MRKT_PERD_SKU_PRC); }
[ "public MrktPerdSkuPrc() {\n\t\tthis(\"MRKT_PERD_SKU_PRC\", null);\n\t}", "@Override\n\tpublic void addPRUser(long pk, long prUserPK) throws SystemException {\n\t\tprRegistrationToPRUserTableMapper.addTableMapping(pk, prUserPK);\n\t}", "public String createTableRepresentationQueryTableColumn (QueryTable queryTa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the default value of the m flag. If it is set to true, then the MFlag will be on for any regex search executed.
public static void setDefaultMFlag(boolean mFlag) { defaultMFlag = mFlag; }
[ "public static boolean getDefaultMFlag() {\r\n return defaultMFlag;\r\n }", "public void setDefaultFlag(Integer defaultFlag) {\n this.defaultFlag = defaultFlag;\n }", "public char getDefaultFlag()\n {\n return m_default;\n }", "private void setNumWithDefault(int value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of construct method, of class Huffman.
@Test public void testConstruct() { System.out.println("construct"); Huffman instance = new Huffman("ab"); Vector<Arbol> result = instance.decode(); instance.construct(); char expResult = 'a'; assertEquals(expResult, instance.getQueue().elementAt(0).getLeft().g...
[ "@Test\r\n public void testCreateTree() {\r\n HuffmanCompressor h = new HuffmanCompressor(\"testInputFile\", \"testOutputFile\");\r\n\r\n }", "@Test\n public void testGenerarCodigo() {\n System.out.println(\"generarCodigo\");\n Nodo miNodo = null;\n String cadena = \"\";\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the hardness of the block at the passedin point.
public float getBlockHardness(Point3d position){ BlockPos pos = new BlockPos(position.x, position.y, position.z); return world.getBlockState(pos).getBlockHardness(world, pos); }
[ "public int breakBlock() {\r\n\t\tif (hardness > 0)\r\n\t\t\thardness -= 1;\r\n\t\treturn hardness;\r\n\t}", "@NonNegative float blockHardness();", "float getHardness();", "Double getHardness();", "public float getBlockHardness(World var1, int var2, int var3, int var4)\n {\n int var5 = var1.getBlo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method creates the Pagination Helper should none exist and then returns it for use throughout the class.
public PaginationHelper getPagination() { if (pagination == null) { pagination = new PaginationHelper(3) { @Override public int getItemsCount() { return searchResults.size(); } @Override public DataModel<ProductItem> createPageDataModel() { try { return new ListDataMod...
[ "private PaginationUtils(){\n\t\tsuper();\n\t}", "private void createPaginationPageFactory() {\n pdfViewer.setPageFactory(pageNumber -> {\n if (currentFile.get() == null) {\n return null ;\n } else {\n if (pageNumber >= currentFile.get().getNumPages() || ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The DL9000 can calculate certain parameters. This method allows to query these parameters from the scope. The 'Param' function must be enabled on the scope or else the parameters are not available.
@AutoGUIAnnotation( DescriptionForUser = "Queries the specified parameter calculated by the scope.", ParameterNames = {"Trace", "Area", "ParameterName"}, ToolTips = {"Which waveform should be used to calculate the parameter? Can be 1-4", "Over which area (time span) should the pa...
[ "private void params()\r\n {\r\n curToken = getToken();\r\n\r\n // Implement the \"int ID param-1 param-list-1\" production.\r\n if(curToken.getToken().equals(\"int\"))\r\n {\r\n removeToken();\r\n curToken = getToken();\r\n\r\n if(curToken.getTokenTyp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a stochastic random variable
@Test public void testRandomVariableStochastic() { RandomVariable randomVariable2 = randomVariableFactory.createRandomVariable(0.0, new double[] {-4.0, -2.0, 0.0, 2.0, 4.0} ); // Perform some calculations randomVariable2 = randomVariable2.add(4.0); randomVariable2 = randomVariable2.div(2.0); // The ran...
[ "public StochasticVar(Store store, String name, int seed, boolean StochasticConstant, int size, int minVal, int maxVal) {\n\t\t\n\t\tRandom gen = new Random(seed);\n\t\tDecimalFormat form = new DecimalFormat(\"#.#\");\n\n\t\tint[] values = new int[size];\n\t\tProbabilityRange[] ProbRanges = new ProbabilityRange[siz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback for when the website has been pressed. Opens a website if the device is connected to the internet.
public void onPressWebsite(View view) { if (!WebsiteHelper.openLocalWithConnection(this, event.homePage)) showToast(getString(R.string.event_website_failed_to_open_internet), Toast.LENGTH_LONG); }
[ "private void goToWebsite(){\n\t\t NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\t \n\t if (networkInfo != null && networkInfo.isConnected()) {\n\t \n\t\t\n\t \t if(webCounterName==\"Shyamoli Paribahan\"){\n\t \t\t Uri uriUrl = Uri.parse(\"http://www.shyamolipar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
hyphens replaced with underscore to create a valid db name
private String getUniqueDbName() { return java.util.UUID.randomUUID().toString().replaceAll("-","_"); }
[ "DbObjectName createDbObjectName();", "public static void setDatabaseNameSuffix(String name){\n databaseNameSuffix = name;\n }", "public static String fmtSqlIdentifier(String toClean) {\n\t\tString regex = \"[^0-9a-zA-Z_]+\";\n\t\tString ret = toClean.replaceAll(regex, \"_\");\n\t\tif(ret.length() > 5...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated int32 forward_feature_mapping = 2;
int getForwardFeatureMappingCount();
[ "int getForwardFeatureMapping(int index);", "java.util.List<java.lang.Integer> getForwardFeatureMappingList();", "int getBackwardFeatureMapping(int index);", "int getBackwardFeatureMappingCount();", "java.util.List<java.lang.Integer> getBackwardFeatureMappingList();", "public static native void RouteHop_s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch the content of a site. This has a dependency on wikipedia.org, which makes this not a unit test.
@Test public void TestFetchWebsite() { try { String content = WebsiteFetcher.FetchContent("https://www.wikipedia.org/"); assert(content != null); } catch (IOException ex) { assert(false); } }
[ "String crawlArticleContent(String url);", "@Test\n public void testGivenUrl_GetPageContent_returnsContent() {\n String url = \"http://www.google.com\";\n String html = webCrawlerService.getPageContent(url);\n assertTrue(html.toLowerCase().contains(\"google\"));\n }", "public CrawledP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "RULE_SEMICOLON" $ANTLR start "RULE_ARG_OR_CHARSET"
public final void mRULE_ARG_OR_CHARSET() throws RecognitionException { try { int _type = RULE_ARG_OR_CHARSET; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalUniMapperGenerator.g:5137:21: ( ( RULE_ARG_ACTION | RULE_LEXER_CHAR_SET ) ) // InternalUniMapperGenerator...
[ "public final void mRULE_CHARSET_ID() throws RecognitionException {\n try {\n int _type = RULE_CHARSET_ID;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../com.dubture.editor.sass.ui/src-gen/com/dubture/editor/sass/ui/contentassist/antlr/internal/InternalSass.g:2233:17: ( '@ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
factory method to create a shallow copy MoneyAttribute
public static MoneyAttribute of(final MoneyAttribute template) { MoneyAttributeImpl instance = new MoneyAttributeImpl(); instance.setName(template.getName()); instance.setValue(template.getValue()); return instance; }
[ "@Override\n\t\tpublic Money clone() {\n\t\t\treturn new Money(this.dollars, this.cents);\n\t\t}", "@Nullable\n public static MoneyAttribute deepCopy(@Nullable final MoneyAttribute template) {\n if (template == null) {\n return null;\n }\n MoneyAttributeImpl instance = new Money...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set default times and date.
private void setDefaultTimes() { // Set default date to today's date LocalDate date = LocalDate.now(); datePicker.setValue(date); // Set default start time to current time, or the closest open hour int startHour = LocalTime.now().getHour(); if (startHour < openTime) { ...
[ "void setDefaultTime(String defaultTime);", "public void setDEFAULT_TIME(Date DEFAULT_TIME) {\r\n this.DEFAULT_TIME = DEFAULT_TIME;\r\n }", "@SuppressLint(\"SimpleDateFormat\")\n private void initValuesDefaults() {\n date = new Date();\n\n // date\n this.dateFormat = new Simple...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Primary__LeftAssignment_5_2" $ANTLR start "rule__Primary__OpAssignment_5_3" InternalGaml.g:19301:1: rule__Primary__OpAssignment_5_3 : ( ( ',' ) ) ;
public final void rule__Primary__OpAssignment_5_3() throws RecognitionException { int rule__Primary__OpAssignment_5_3_StartIndex = input.index(); int stackSize = keepStackSize(); try { if ( state.backtracking>0 && alreadyParsedRule(input, 1155) ) { return ; } ...
[ "public final void rule__Primary__Group_5__3__Impl() throws RecognitionException {\n int rule__Primary__Group_5__3__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 841) ) { return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Expression for this VariableDefinition.
public void setExpression(Expression expressionIn) { this.expression = expressionIn; }
[ "public void setExpression(Object expression);", "public void define(Expression expression) {\n\t\tthis.expression = expression;\n\t}", "public void setExpression(Expression expression) {\n if (expression == null) {\n throw new IllegalArgumentException();\n }\n ASTNode oldChild =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ends game by reseting all game and peer parameters
public void endGame() { this.opponent = null; this.haveGame = false; this.isTurn = false; for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++) { board[i][j] = 0; } } }
[ "public void endGame() {\n\t\twaitingPlayers.addAll(players);\n\t\tplayers.clear();\n\t\tfor(ClientThread player: waitingPlayers) {\n\t\t\tplayer.points = 0;\n\t\t\tplayer.clientCards.clear();\n\t\t}\n\t\twinners = 0;\n\t\tlosers = 0;\n\t\tpassCounter = 0;\n\t\tdeck.init();\n\t\tview.changeInAndWait(players.size(),...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caches the CRM Contact in the entity cache if it is enabled.
@Override public void cacheResult(CrmContact crmContact) { entityCache.putResult( CrmContactModelImpl.ENTITY_CACHE_ENABLED, CrmContactImpl.class, crmContact.getPrimaryKey(), crmContact); finderCache.putResult( _finderPathFetchByUUID_G, new Object[] {crmContact.getUuid(), crmContact.getGroupId()}, c...
[ "@Override\n\tpublic void cacheResult(CRM_Trn_Contact crm_Trn_Contact) {\n\t\tEntityCacheUtil.putResult(CRM_Trn_ContactModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\tCRM_Trn_ContactImpl.class, crm_Trn_Contact.getPrimaryKey(),\n\t\t\tcrm_Trn_Contact);\n\n\t\tFinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_CONTACTID,\n\t\t\tn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns number of "AlternateName" element
public int sizeOfAlternateNameArray() { synchronized (monitor()) { check_orphaned(); return get_store().count_elements(ALTERNATENAME$0); } }
[ "public int getInner_name_index() { return inner_name_index&0xFFFF; }", "public int getIndex(String rawName)\n {\n \n for (int i = 0; i < getAttrCount(); i++)\n {\n AttrImpl attr = getChildAttribute(i);\n \n if (attr.getNodeName().equals(rawName))\n return i;\n }\n \n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructeur d'une figure coloree de type polygone
public Polygone() { super(); this.p = new Polygon(); }
[ "public Poligono() {\n geometria = new Polygon();\n }", "Polygon createPolygon();", "public Polygon() { }", "public CliqueClass(GraphClass gc){\n super();\n setBase(gc);\n }", "public OvalShape() { super(); }", "public Lienzo2D() {\n initComponents();\n lienzoEven...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Edits the font sizes of textViews according to settings It changes the font sizes of intexts
public void editInTextFont(TextView text){ SharedPreferences sp = getApplicationContext().getSharedPreferences("inTextPref", MODE_PRIVATE); String inTextFontSize = sp.getString("inTextFontSize",""); if (inTextFontSize.equals(SMALL)) { text.setTextSize(10); } i...
[ "private void setFontSizes() {\n int numberSizeOne = this.currentNumberPair.getFontSizeOne();\n int numberSizeTwo = this.currentNumberPair.getFontSizeTwo();\n theView.getLeftOption().setFont(new Font(\"Tahoma\", numberSizeOne));\n theView.getRightOption().setFont(new Font(\"Tahoma\", num...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the numeric identifier of the function call block object that can be used to store associations between objects.
public int getFunctionCallBlockID() { return _functionCallBlockID; }
[ "int getBlockId();", "public String getFunctionCallBlockName()\n\t{\n\t\tString id = \"JCFunctionCallBlock\" + _functionCallBlockID;\n\t\t\n\t\treturn id;\n\t}", "String getBlockId();", "public Integer getBlockID() {\n this.next_id++;\n return this.next_id;\n }", "public int sourceBlockNumb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Relationship Type'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseRelationshipType(RelationshipType object) { return null; }
[ "protected abstract RelationshipType getRelationshipType();", "public String getRelationshipType()\n {\n return mRelationshipType;\n }", "public java.lang.String getRelationshipType() {\n return relationshipType;\n }", "public T caseRelationshipOperationType(RelationshipOperationType object) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column equipment_in_storage.in_voucher
public Integer getInVoucher() { return inVoucher; }
[ "public void setInVoucher(Integer inVoucher) {\n this.inVoucher = inVoucher;\n }", "@Accessor(qualifier = \"voucherCode\", type = Accessor.Type.GETTER)\n\tpublic String getVoucherCode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(VOUCHERCODE);\n\t}", "public int getItVatInvoice() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Atom ID of the acceptor atom of the interaction.
public int getAcceptor() { return acceptor; }
[ "@Override\n public int getFirstTargetAtom() {\n return acceptor;\n }", "java.lang.String getAoisId();", "public double getAcceptorAngle() {\n return acceptorAngle;\n }", "public PaxosAcceptor getAcceptor()\n {\n return m_acceptor;\n }", "String getActorId();", "AtomID ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column XUYU_CONTENT_CARD_INFO_RECORD.OWNER_PLACE
public void setOwnerPlace(String ownerPlace) { this.ownerPlace = ownerPlace == null ? null : ownerPlace.trim(); }
[ "public String getOwnerPlace() {\r\n return ownerPlace;\r\n }", "public void setOwnerId(int tmp) {\n this.ownerId = tmp;\n }", "public void setOwner(String newOwner){\n owner = newOwner;\n }", "public void setOwner(CasOwner aCasOwner) {\n mOwner = aCasOwner;\n }", "public void se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use ReqGetDevoteRank.newBuilder() to construct.
private ReqGetDevoteRank(com.tshang.peipei.protocol.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "private RspGetDevoteRank(com.tshang.peipei.protocol.protobuf.GeneratedMessage.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t\tthis.unknownFields = builder.getUnknownFields();\n\t\t}", "private GetRankListReq(Builder builder) {\n super(builder);\n }", "private stockRank_req(com.google.protobuf.Gener...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an aliased information_schema.ALL_PLUGINS table reference
public AllPlugins(String alias) { this(DSL.name(alias), ALL_PLUGINS); }
[ "public PluginSchema() {\n dropSqls = new ArrayList<String>();\n createSqls = new ArrayList<String>();\n this.dbName = DaoConfig.DEFAULT_DB_NAME;\n }", "Collection<PluginDefinition> getAllPlugins();", "Map<String, String> getTableAliasMap();", "public AllPlugins(Name alias) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Checks if 2 JsonObject have the same skeleton (all the same attributes, no matter their values).
private static boolean haveSameSkeleton(JsonObject object1, JsonObject object2){ boolean res = (object1.entrySet().size() == object2.entrySet().size()); System.err.println(res); if (res){ for(java.util.Map.Entry<String, JsonElement> entry : object1.entrySet()){ if (!object2.has(entry.getKey())) return fals...
[ "public static boolean compareJSON(JsonElement first, JsonElement second){\n\n boolean isEqual = true;\n // Check whether both jsonElement are not null\n if(first !=null && second !=null) {\n\n // Check whether both jsonElement are JSONobjects\n if (first.isJsonObject() &&...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch data for input data spec
public InputData fetchData(InputDataSpec inputDataSpec) { Map<MetricSlice, DataFrame> timeseries = provider.fetchTimeseries(inputDataSpec.getTimeseriesSlices()); Map<MetricSlice, DataFrame> aggregates = provider.fetchAggregates(inputDataSpec.getAggregateSlices(), Collections.<String>emptyList()); Multimap<A...
[ "protected Object fetchFieldData()\n {\n return getReadTransformer().transform(fetchHandler().getData());\n }", "KinesisDataFetcher getDataFetcher();", "public void readDataSpec(String cmdLineArg) {\n\n // create a collection of xls files to pass to the XLSDataSpecReader.\n final Coll...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the button was just pressed on the last cycle
public boolean wasJustPressed() { return (mNow && (!mLast)); }
[ "boolean wasJustPressed();", "public boolean wasButtonJustPressed(int playerNum) {\r\n if (button.clicked) {\r\n button.clicked = false;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@SuppressWarnings(\"unused\")\n\tprivate boolean wasAny...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call on power switch change.
void onPowerSwitchChange(String _switch, State state);
[ "protected void onPowerChange( final boolean isPowered )\n\t{\n\t}", "void onApPowerStateChange(PowerState state);", "@Override\r\n\t\tpublic void switchChanged(long switchId) \r\n\t\t{ /* Nothing we need to do */ }", "@Override\n\tpublic void switchChanged(long switchId) \n\t{ /* Nothing we need to do */ }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//======================================================================================== // DEBUG //======================================================================================== Prints the MotionEvent and whether or not it was handled.
private void printMotionEvent(final MotionEvent ev, final boolean handled) { // String message; // switch (ev.getActionMasked()) { // case MotionEvent.ACTION_DOWN: // message = "DOWN"; // break; // case MotionEvent.ACTION_MOVE: // message = "MOVE"; // break; // case MotionEvent.ACTION_UP: // message = "U...
[ "public boolean onCapturedPointerEvent(android.view.MotionEvent event) { throw new RuntimeException(\"Stub!\"); }", "public boolean dispatchCapturedPointerEvent(android.view.MotionEvent event) { throw new RuntimeException(\"Stub!\"); }", "public boolean onCapturedPointer(android.view.View view, android.view.Mot...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function that returns true if line segment 'p1q1' and 'p2q2' intersect.
static boolean doIntersect(Point p1, Point q1, Point p2, Point q2) { // Find the four orientations needed for // general and special cases int o1 = orientation(p1, q1, p2); int o2 = orientation(p1, q1, q2); int o3 = orientation(p2, q2, p1); ...
[ "public boolean isIntersectLine(Point p1, Point p2) {\n\t\t// Find the four orientations needed for general and special cases\n\t\tint o1 = orientation(firstPoint, secondPoint, p1);\n\t\tint o2 = orientation(firstPoint, secondPoint, p2);\n\t\tint o3 = orientation(p1, p2, firstPoint);\n\t\tint o4 = orientation(p1, p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add self link for game.
private static void addSelfLink(GameDto gameDto) { Link selfLink = linkTo(methodOn(GameController.class).getGameById(gameDto.get_id())).withSelfRel(); gameDto.add(selfLink); }
[ "Link getSelfLink();", "public String selfLink() {\n return this.selfLink;\n }", "public void AddLink() {\n snake.add(tail + 1, new Pair(snake.get(tail).GetFirst(), snake.get(tail).GetSecond())); //Set the new link to the current tail link\n tail++;\n new_link = true;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This adds a property descriptor for the Base Table Catalog Name feature.
protected void addBaseTableCatalogNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AddForeignKeyConstraintType_baseTableCatalogName_feature"), ...
[ "protected void addBaseTableSchemaNamePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_AddForeignKeyConstraintType_baseTab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the oid property.
public void setOid(long value) { this.oid = value; }
[ "public void setOID(java.lang.String oid)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(OID$12);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'lemma' field has been set
public boolean hasLemma() { return fieldSetFlags()[1]; }
[ "public boolean isSetLemma() {\n return this.lemma != null;\n }", "public void setLemma(java.lang.CharSequence value) {\n this.lemma = value;\n }", "default String getLemma() {\n return meta(\"nlpcraft:nlp:lemma\");\n }", "public Term.Builder setLemma(java.lang.CharSequence value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AtomicDomainSpecificEvent__Group_7__0" $ANTLR start "rule__AtomicDomainSpecificEvent__Group_7__0__Impl" ../org.gemoc.gel.xtext.ui/srcgen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:2737:1: rule__AtomicDomainSpecificEvent__Group_7__0__Impl : ( ( rule__AtomicDomainSpecificEvent__Executio...
public final void rule__AtomicDomainSpecificEvent__Group_7__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:2741:1: ( ( ( rule__AtomicDomainSpecific...
[ "public final void rule__AtomicDomainSpecificEvent__Group_7__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:2798:1: ( ( ( rule__AtomicDo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'challenges' field.
public java.util.List<java.lang.CharSequence> getChallenges() { return challenges; }
[ "public java.util.List<java.lang.CharSequence> getChallenges() {\n return challenges;\n }", "public String getChallenge() {\n\t\treturn mChallenge;\n\t}", "public void setChallenges(java.util.List<java.lang.CharSequence> value) {\n this.challenges = value;\n }", "public int getChallengesPoints() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
edit the station in the database.
public Station edit(Station station) { Session session = HibernateUtil.createSessionFactory(); session.beginTransaction(); session.update(station); session.getTransaction().commit(); session.close(); return station; }
[ "private void editStationAction(){\n\t\ttry {\n\t\t\tstationsTable.editStationParameters();\n\t\t} catch (Exception e) {\n\t\t\tLog.error(e.getMessage());\n\t\t\tnew CustomDialogBox(e.getMessage(), Language.okString);\n\t\t}\n\t}", "public void editStationRequested() {\n getEditStationUI().init(model_.getS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a Semaphore that allows only thread to be in the critical section at once.
public Semaphore() { this(1,1); }
[ "public Semaphore() {\n m_available = true;\n }", "public Semaphore()\n {\n this(0);\n }", "private void createSemaphore(TransactionReference reference) {\n\t\tif (semaphores.putIfAbsent(reference, new Semaphore(0)) != null)\n\t\t\tthrow new IllegalStateException(\"repeated request\");\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NOSONAR Nonthrowing functional interface (lambda) LLongFunction for Java 8. Type: function Domain (lvl: 1): long a Codomain: R
@FunctionalInterface @SuppressWarnings("UnusedDeclaration") public interface LLongFunction<R> extends LongFunction<R>, MetaFunction, MetaInterface.NonThrowing, Codomain<a<R>>, Domain1<aLong> { // NOSONAR String DESCRIPTION = "LLongFunction: R apply(long a)"; @Nullable // R apply(long a) ; default R apply(long a) ...
[ "public long evaluateAsLong();", "R applyX(long a) throws Throwable;", "DataFrame<R,C> mapToLongs(ToLongFunction<DataFrameValue<R,C>> mapper);", "private void functionalInterfacesForDoubleIntLong() {\n double d = 1.0;\n DoubleToIntFunction f1 = x -> 1;\n f1.applyAsInt(d);\n\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Basic interface for all DependenceAgeDistanceDAO
public interface DependenceAgeDistanceDAO { /** * Returns a dependence with the given age and distance * * @param age * @param distanceId * @return DependenceAgeDistanceDTO */ public DependenceAgeDistanceDTO findDependenceByAgeDistanceId(int age, int distanceId); }
[ "public interface PriceRangeDAO extends DataAccessObject<PriceRange> {\n\n public PriceRange createPriceRange(Integer min, Integer max, Integer price) throws DataAccessException;\n\n /**\n *\n * @param id the id of the PraceRange to find in the db\n * @return a PraceRange object representing the r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Added basic items to itemStore directly as would expect this to be in a DB for ease of updating in a real world scenario
private void populateItemStore() { add(new Item("001", "Travel Card Holder", 9.25)); add(new Item("002", "Personalised cufflinks", 45.00)); add(new Item("003", "Kids T-Shirt", 19.95)); }
[ "public void storeItems(List<Item> items);", "public Long addToItemStore(String itemKey, Item item);", "public void addStoredItem(Item e){\n storedItems.add(e);\n }", "Item addItem(Item item);", "public List<Long> addToItemStore(Map<String, Item> itemMap);", "protected void addItem() {\n\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the lookup of data when its added and deleted in with current time
@Test public void testLookupRealTime() { //create data set final LastWriteWinSet<String> lastWriteWinSet = new LastWriteWinSet<>(); lastWriteWinSet.add("java"); lastWriteWinSet.add("scala"); lastWriteWinSet.add("php"); lastWriteWinSet.add("python"); try { T...
[ "@Test\n public void testLookup() {\n \t\n \t//create data set\n final LastWriteWinSet<String> lastWriteWinSet1 = new LastWriteWinSet<>();\n\n lastWriteWinSet1.add(time1, \"java\");\n lastWriteWinSet1.add(time1, \"php\");\n lastWriteWinSet1.add(time1, \"python\");\n lastW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find which guest is currently occupying given parcel
Guest findCurrentGuestOnParcel(Parcel parcel);
[ "Parcel findCurrentParcelOfGuest(Guest guest);", "public static Parcel findWorkLocation(ResidentTB resident) {\r\n\t\tParcel p = null;\r\n\t\tif (resident.getMyBusinessEmployer() != null) {\r\n\t\t\tp = resident.getMyBusinessEmployer().getStructure().getParcel();\r\n\t\t} else if (resident.getMyHealthFacilityEmpl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display histogram values in console
public void display(Histogram h);
[ "public void histogram(){\r\n if (this.allNumbers==null){ //there is no data to analyse\r\n UI.println(\"No data to plot histogram\");\r\n return;\r\n }\r\n UI.clearGraphics();\r\n\r\n // draw axes\r\n UI.setColor(Color.black);\r\n UI.drawLine(this.GRA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }