query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
provides access to severity
public int getSeverity() { return severity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getSeverity();", "public Type getSeverity() {\n return severity;\n }", "int getSeverityValue();", "public java.lang.String getSeverity() {\n return severity;\n }", "public java.lang.String getSeverity() {\n return severity;\n }", "org.apache.calcite.avatica.proto.Common.Sever...
[ "0.839455", "0.81622314", "0.78517294", "0.7795058", "0.76768345", "0.76616853", "0.7647593", "0.7508637", "0.7409767", "0.73473674", "0.7244981", "0.7201349", "0.7172199", "0.71610963", "0.71449673", "0.7084321", "0.7006098", "0.6998123", "0.69746363", "0.68603396", "0.66701...
0.8045171
3
provides access to moderation
public int getModeration() { return moderation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void grantModerator(String nickname);", "List<Moderator> getModerators();", "private void checkAdminOrModerator(HttpServletRequest request, String uri)\n throws ForbiddenAccessException, ResourceNotFoundException {\n if (isAdministrator(request)) {\n return;\n ...
[ "0.679996", "0.6329394", "0.63014245", "0.6183691", "0.60106575", "0.59729004", "0.59248006", "0.5883345", "0.58567667", "0.5837052", "0.5807433", "0.5800699", "0.5757531", "0.5734203", "0.5715413", "0.56905025", "0.5670601", "0.5643749", "0.561722", "0.5606772", "0.5584786",...
0.6651868
1
provides access to votes
public int getVotes() { return votes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getVotes() {\n return this.votes;\n }", "public Integer getVotes();", "public void setVotes(int votes) {\n this.votes = votes;\n }", "public void addVote() {\n this.votes++;\n }", "public static void doVote() {\n }", "void votedOnPoll(String pollId);", "public Ratio getV...
[ "0.7344513", "0.7323857", "0.725002", "0.7222429", "0.7097811", "0.70492965", "0.68760246", "0.6718004", "0.67031044", "0.6664692", "0.6635202", "0.6628517", "0.6491623", "0.6486452", "0.6451216", "0.6376229", "0.6361033", "0.6320346", "0.6315991", "0.631554", "0.62776", "0...
0.732839
2
provides access to content
public String getContent() { return content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object getContent();", "private void LoadContent()\n {\n \n }", "public void LoadContent(){\n }", "public String getContent();", "public Content createContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java.lang.String getContent();", "java...
[ "0.73915917", "0.6954169", "0.6903335", "0.68262815", "0.6734295", "0.66965425", "0.66965425", "0.66965425", "0.66965425", "0.66965425", "0.66965425", "0.6666957", "0.65536267", "0.6553395", "0.6522019", "0.65198326", "0.65182227", "0.65092057", "0.64502686", "0.64493155", "0...
0.6007643
85
provides access to proposal
public String getProposal() { return proposal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ClaimOrConcession(int proposal) {\n this.proposal = proposal;\n }", "public Path getProposalPath() { return proposalPath; }", "public void setProposalPath(Path proposalPath) { this.proposalPath = proposalPath; }", "public String getProposalId() {\n return this.proposa...
[ "0.6828151", "0.6645016", "0.618081", "0.6153358", "0.614606", "0.6061523", "0.6035048", "0.5980169", "0.5967961", "0.5864461", "0.57265437", "0.5578671", "0.55212325", "0.5521159", "0.5509722", "0.5509143", "0.5504637", "0.54968303", "0.54966986", "0.5459093", "0.5457306", ...
0.71799135
0
returns title of the problem
public String getTitle() { return title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBugTitle() {\n\t\treturn bugTitle;\n\t}", "public Problem title(String title) {\n this.title = title;\n return this;\n }", "String title();", "String title();", "public String getProblemName() {\n return this.problemName;\n }", "IDisplayString getTitle();", "static Str...
[ "0.7295806", "0.7288577", "0.7208971", "0.7208971", "0.70517397", "0.6891445", "0.68542117", "0.68080586", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971", "0.679971",...
0.0
-1
provides access to problemActivities
public List<ProblemActivity> getProblemActivities() { return problemActivities; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Issue> getUserProjectActiveIssue(User user, Project project);", "public interface ProblemInfo {\n}", "Activity getConflictCheckMappingActivity();", "protected ScllActivity iGetActivity() {\n\t\treturn (ScllActivity) getActivity();\n\t}", "int getProblemCategory();", "public ProblemList getPro...
[ "0.58308345", "0.5575855", "0.54960144", "0.54007816", "0.53866255", "0.53103626", "0.53067553", "0.52809155", "0.5266447", "0.52513695", "0.5176857", "0.51420814", "0.5130328", "0.5101156", "0.509285", "0.5088939", "0.50865734", "0.50708723", "0.50597656", "0.5053903", "0.50...
0.7094887
0
provides access to photos
public List<Photo> getPhotos() { return photos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fotos(){}", "List<Photo> homePagePhotos();", "public void getPhoto() {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //for startActivityForResult, the second parameter, requestCode is used to identify this particular intent\n startActiv...
[ "0.7258191", "0.6811539", "0.6635939", "0.6572377", "0.6442383", "0.6430226", "0.6387549", "0.63810897", "0.63670355", "0.63652086", "0.63280165", "0.6327501", "0.63242286", "0.63099056", "0.63079524", "0.6287416", "0.6278328", "0.6254995", "0.62534136", "0.6252953", "0.62503...
0.65052074
4
returns date of the last data loading from server
public String getLastUpdate() { return lastUpdate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date getLastServerUpdate();", "long getLastFetchTimeMs();", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "default long getLastFetchTimeMs() {\n return 0;\n }...
[ "0.70720005", "0.69080085", "0.67112595", "0.6616576", "0.6526778", "0.64294493", "0.63879806", "0.6318847", "0.62857324", "0.62469816", "0.6228559", "0.62085015", "0.6206835", "0.61702096", "0.6169272", "0.616797", "0.6153777", "0.61329234", "0.605944", "0.60417503", "0.6033...
0.59037966
39
no not check parameters
public void checkParameters() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateInputParameters(){\n\n }", "private void checkForEmptyLine() throws OutmatchingParametersToMethodCall {\n if (this.params.isEmpty() && method.getParamAmount() != 0) {\n throw new OutmatchingParametersToMethodCall();\n } else if (method.getParamAmount() == 0 && !thi...
[ "0.6637809", "0.61247027", "0.60731965", "0.6062472", "0.60473776", "0.60427004", "0.60159206", "0.5991197", "0.5966438", "0.59577364", "0.5955091", "0.59387887", "0.5915402", "0.58858204", "0.58741397", "0.5870773", "0.58670956", "0.58637524", "0.5849069", "0.58276176", "0.5...
0.69343275
0
build the URL with user preferences
public static String getUrlMovie(Context context) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); return CommonConstants.MOVIE_URL_PREFIX.replace("#size#", sharedPreferences.getString(context.getString(R.string.key_pref_size), CommonConstants.THEMOVIEDB_SIZE_W185) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "private URL createURLaddUser() {\n ...
[ "0.6475864", "0.63547844", "0.63289493", "0.62744504", "0.62160456", "0.61953235", "0.61698204", "0.61419415", "0.6135551", "0.6078034", "0.6069312", "0.6031199", "0.60159034", "0.5973115", "0.5944241", "0.5944043", "0.58508277", "0.5846201", "0.58171284", "0.5811259", "0.580...
0.0
-1
build the URL with user preferences and actual page
public static String getUrlList(Context context) { return CommonConstants.THEMOVIEDB_URL_LIST .replace("#sort#", PreferenceManager.getDefaultSharedPreferences(context).getString( context.getString(R.string.key_pref_sort), CommonConstants.THEMOVIEDB_SORT_POPULARITY_DES) ) .replace("#page#", String.valueOf(((MainActivity) context).mPage)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String buildURL(String[] components) {\n\t\tfinal String BASE_URL = \"http://www.campusdish.com/en-US/CSMA/WilliamMary/Menus/\";\n\t\tfinal String ORG_ID = \"&OrgID=231624\";\n\t\tfinal String STATIC_PARAMS = \"&ShowPrice=False&ShowNutrition=True\";\n\t\t\n\t\tHashMap<String, String> location_map = new Has...
[ "0.6304108", "0.6258693", "0.6159047", "0.6066027", "0.5935755", "0.58911484", "0.58466995", "0.58135444", "0.5787581", "0.57514447", "0.57011676", "0.56885743", "0.56731063", "0.56653684", "0.56645995", "0.56635267", "0.56093603", "0.55765224", "0.5565709", "0.55390316", "0....
0.0
-1
Sets whether this provider is currently enabled or not. Note that this is specific to the provider only, and is not related to global location settings. This is a hint to the Location Manager that this provider will generally be unable to fulfill incoming requests. This provider may still receive callbacks to onSetRequest while not enabled, and must decide whether to attempt to satisfy those requests or not. Some guidelines: providers should set their own enabled/disabled status based only on state "owned" by that provider. For instance, providers should not take into account the state of the location master setting when setting themselves enabled or disabled, as this state is not owned by a particular provider. If a provider requires some additional user consent that is particular to the provider, this should be use to set the enabled/disabled state. If the provider proxies to another provider, the child provider's enabled/disabled state should be taken into account in the parent's enabled/disabled state. For most providers, it is expected that they will be always enabled.
public void setEnabled(boolean enabled) { synchronized (mBinder) { if (mEnabled == enabled) { return; } mEnabled = enabled; } ILocationProviderManager manager = mManager; if (manager != null) { try { manager.onSetEnabled(mEnabled); } catch (RemoteException | RuntimeException e) { Log.w(mTag, e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setEnabled(Context context, boolean enabled);", "@Override public void setEnabled(boolean enabled) {\n super.setEnabled(enabled);\n\n m_globalEnabled = enabled;\n checkEnabled();\n }", "public void setEnabled(boolean value) {\n m_Enabled = value;\n }", "public void ...
[ "0.6709732", "0.6626273", "0.6509627", "0.6473704", "0.6425163", "0.63837606", "0.6369306", "0.6321361", "0.62503976", "0.62428075", "0.62276155", "0.6212615", "0.6200915", "0.6199663", "0.61584514", "0.6113469", "0.6113469", "0.6105584", "0.6101369", "0.6073249", "0.60696065...
0.7290461
0
Sets the provider properties that may be queried by clients. Generally speaking, providers should try to avoid changing their properties after construction.
public void setProperties(ProviderPropertiesUnbundled properties) { synchronized (mBinder) { mProperties = properties.getProviderProperties(); } ILocationProviderManager manager = mManager; if (manager != null) { try { manager.onSetProperties(mProperties); } catch (RemoteException | RuntimeException e) { Log.w(mTag, e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProvider(String value) { _provider = value; }", "public void setProvider(String provider) {\n\t\tthis.provider = provider;\n\t}", "public void setProvider(String provider) {\n\t\tthis.provider = provider;\n\t}", "protected void setProvider() {\n fs.getClient().setKeyProvider(cluster.getName...
[ "0.675546", "0.6341913", "0.6341913", "0.63372344", "0.6077239", "0.59981495", "0.5997269", "0.59463626", "0.5922124", "0.58850753", "0.58549875", "0.58365", "0.58341265", "0.5787949", "0.57530427", "0.57474303", "0.5701231", "0.5682339", "0.5646244", "0.5634562", "0.5584947"...
0.6820161
0
Sets a list of additional packages that should be considered as part of this location provider for the purposes of generating locations. This should generally only be used when another package may issue location requests on behalf of this package in the course of providing location. This will inform location services to treat the other packages as location providers as well.
public void setAdditionalProviderPackages(List<String> packageNames) { synchronized (mBinder) { mAdditionalProviderPackages.clear(); mAdditionalProviderPackages.addAll(packageNames); } ILocationProviderManager manager = mManager; if (manager != null) { try { manager.onSetAdditionalProviderPackages(mAdditionalProviderPackages); } catch (RemoteException | RuntimeException e) { Log.w(mTag, e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPackages(final String... packageNames) {\n packages = transformToUnique(packageNames);\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.019 -0500\", hash_original_method = \"E5A69925BDA73DD9E81D8A1F8F42F257\", hash_generated_m...
[ "0.60418355", "0.59564054", "0.5919794", "0.5806557", "0.56579196", "0.5630494", "0.55973256", "0.55614847", "0.5456344", "0.54517", "0.5317131", "0.5299748", "0.52898705", "0.5278419", "0.52496195", "0.5239673", "0.5223749", "0.51969576", "0.5131879", "0.5107708", "0.5086962...
0.78680736
0
Returns true if this provider has been set as enabled. This will be true unless explicitly set otherwise.
public boolean isEnabled() { return mEnabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public boolean isEnabled() {\n return enabledType!=ENABLED_NONE;\n }", "public boolean isEnabled()\n {\n return mSettings.getBoolean(ENABLED, true);\n }", "public boolean isEnable() {\n return _enabled;\n }", "public Boolean isEnable() {\n\t\treturn enable;\n\t}", "public boole...
[ "0.7733411", "0.75985646", "0.7498483", "0.7472427", "0.74616647", "0.7440103", "0.7377633", "0.7361547", "0.7324868", "0.7308171", "0.7308171", "0.7295568", "0.7282895", "0.7265551", "0.7230315", "0.71823835", "0.71736526", "0.71449494", "0.71092117", "0.7097016", "0.7095424...
0.69190866
51
Reports a new location from this provider.
public void reportLocation(Location location) { ILocationProviderManager manager = mManager; if (manager != null) { try { manager.onReportLocation(location); } catch (RemoteException | RuntimeException e) { Log.w(mTag, e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveLocation(Location newLocation) {\n FileOutputStream outputStream = null;\n Log.d(\"debugMode\", \"writing new location to memory\");\n byte[] writeLine = (\"\\n\"+ newLocation.returnFull()).getBytes();\n try {\n outputStream = openFileOutput(\"Locations.txt\",...
[ "0.6424591", "0.63641703", "0.6307821", "0.6272385", "0.62704176", "0.6203512", "0.6157715", "0.614938", "0.61415035", "0.6118279", "0.60678905", "0.60585713", "0.604057", "0.60389614", "0.60278225", "0.60278225", "0.6015524", "0.5972525", "0.59724146", "0.59688276", "0.59685...
0.70749074
0
call once so that providers designed for APIs preQ are not broken
protected void onInit() { onEnable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onProviderInstalled() {\n }", "private void requestBucks() {\n\n\t}", "protected void onFirstUse() {}", "protected Provider() {}", "public interface ProviderRepoxRestClient {\n /**\n * Creates a provider in Repox and assigns it to...
[ "0.57637477", "0.5714664", "0.5709221", "0.5659692", "0.55559695", "0.5532933", "0.5445306", "0.5387648", "0.5386671", "0.53703326", "0.5356937", "0.533573", "0.53276443", "0.532357", "0.5313189", "0.5307628", "0.5289031", "0.5265886", "0.5260403", "0.52542835", "0.52506477",...
0.0
-1
Implements location provider specific custom commands. The return value will be ignored on Android Q and above.
protected boolean onSendExtraCommand(@Nullable String command, @Nullable Bundle extras) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean sendExtraCommand(String provider, String command, Bundle extras) {\n checkPermissionsSafe(provider);\n // and check for ACCESS_LOCATION_EXTRA_COMMANDS\n if ((mContext.checkCallingPermission(ACCESS_LOCATION_EXTRA_COMMANDS)\n != PackageManager.PERMISSION_GRANTED)) {...
[ "0.63090014", "0.63052756", "0.6033582", "0.5956299", "0.59519506", "0.59454703", "0.59011406", "0.5864944", "0.58593625", "0.5844429", "0.58232915", "0.5761106", "0.57592154", "0.5732133", "0.57271075", "0.57249916", "0.5634948", "0.56288725", "0.562216", "0.5616608", "0.561...
0.0
-1
RTKTODO: launch app view DebugHelper.dump("onHandleClickIntent "+getClassName());
@Override public void onHandleClickIntent(Context c) { c.sendBroadcast(new Intent(ConstantsDef.LAUNCH_APP_CUSTOMIZED_PAGE_INTENT)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void onHandleIntent(Intent arg0) {\n\t\t\n\t}", "void mo21580A(Intent intent);", "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\n\t}", "@Override\n protected void onHandleIntent(Intent intent) {\n\n }", "@Override\n protected void onHandleIntent(Intent workIn...
[ "0.69495386", "0.6948937", "0.6898266", "0.686478", "0.6710177", "0.648903", "0.6351326", "0.633338", "0.63175124", "0.62764925", "0.6254319", "0.62395036", "0.6237234", "0.6201771", "0.6183463", "0.61820287", "0.61733305", "0.6159055", "0.61486423", "0.61485827", "0.6147788"...
0.6642029
5
No args constructor for use in serialization
public Region() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MyEncodeableWithoutPublicNoArgConstructor() {}", "public ObjectSerializationEncoder() {\n // Do nothing\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "defaultConstructor(){}", "public Data() {}", "private SerializerFactory() {\n ...
[ "0.74630904", "0.7387007", "0.7210724", "0.7029566", "0.7018587", "0.6977819", "0.69339114", "0.6881743", "0.6739828", "0.6727297", "0.6717886", "0.67169136", "0.669586", "0.669586", "0.66750634", "0.66246814", "0.6604095", "0.6532946", "0.65235436", "0.6500072", "0.6466648",...
0.0
-1
Get a readonly map with all context values.
public static Map<String, String> getMapping() { return data.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Object> context() {\n return unmodifiableMap(context);\n }", "Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }", "Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }", "public final Map<Strin...
[ "0.7852539", "0.6702883", "0.6702883", "0.668971", "0.66003", "0.64448905", "0.641207", "0.6361862", "0.63534254", "0.6234397", "0.61816967", "0.6136481", "0.6093967", "0.60763216", "0.6068179", "0.6057902", "0.6049152", "0.6010305", "0.59783137", "0.59741706", "0.59640115", ...
0.5553904
79
Put a new context value.
public static void put(final String key, final Object value) { Map<String, String> map = new HashMap<String, String>(data.get()); if (value == null) { map.remove(key); } else { map.put(key, value.toString()); } data.set(Collections.<String, String> unmodifiableMap(map)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void putContext(String key, String value) {\n context.get().put(key, value);\n }", "public void addContextData( String key,\n String value );", "public abstract void setValue(ELContext context, Object value);", "public static void put(String key,Object value){\n ...
[ "0.7971816", "0.68549347", "0.66925126", "0.66729563", "0.6639439", "0.6483358", "0.6379533", "0.62048084", "0.61738133", "0.6161076", "0.61524445", "0.605999", "0.60394377", "0.60067695", "0.6005029", "0.59965456", "0.5964303", "0.5956682", "0.5951199", "0.5915999", "0.58962...
0.0
-1
Remove a context value if existing.
public static void remove(final String key) { Map<String, String> map = new HashMap<String, String>(data.get()); map.remove(key); data.set(map.isEmpty() ? Collections.<String, String> emptyMap() : Collections.<String, String> unmodifiableMap(map)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public V remove(K key, V value) {\n if (get(root, key) == value) {\n return delete(root, key).val;\n }\n return null;\n }", "public void removeContext(LoggerContext context) {\n/* 86 */ for (Map.Entry<String, AtomicReference<WeakReference<LoggerContext>>> e...
[ "0.62733376", "0.6225391", "0.61636686", "0.6034623", "0.5972314", "0.5936324", "0.5897838", "0.58686435", "0.58138686", "0.57999843", "0.57183725", "0.57161456", "0.57021916", "0.5686105", "0.55454874", "0.55454874", "0.5492868", "0.54778427", "0.54548264", "0.5407586", "0.5...
0.0
-1
Remove all existing context values.
public static void clear() { data.set(Collections.<String, String> emptyMap()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void clearContext() {\n log.debug(\"Clearing the current HTTP Request Headers context\");\n context.remove();\n }", "public void removeVars(){\n this.values = new HashMap<>();\n }", "@Override\n public void removeAllValues() {\n Map<String, ?> map = preference...
[ "0.6809294", "0.6513132", "0.64969534", "0.63810915", "0.63729113", "0.6193308", "0.6185488", "0.61840457", "0.60609365", "0.60284036", "0.60163075", "0.6004637", "0.6003392", "0.6001635", "0.59944725", "0.5988579", "0.5980323", "0.59563726", "0.59459656", "0.59280723", "0.59...
0.0
-1
Set the directory where package lists for offline linking are stored. The directory will contain a directory for each library that will be linked offline. In each library directory will be the package list and a file named url that contains the URL where the documentation is hosted.
public Javadoc packageLists(File directory) { this.packageLists = directory; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPackageUrl(String packageUrl);", "public static void setDownloadDirectory(String downloadDirectory) {\n DownloadManager.downloadDirectory = downloadDirectory;\n }", "void setDirectory(File dir);", "void setAppRootDirectory(String rootDir);", "public void setRootDir(String rootDir);...
[ "0.5674875", "0.5631675", "0.5570044", "0.54970586", "0.546472", "0.54085296", "0.53197724", "0.52714103", "0.51997834", "0.5157272", "0.5110308", "0.51017123", "0.5074944", "0.50389165", "0.5037633", "0.50318784", "0.502074", "0.5007591", "0.5005353", "0.5000449", "0.4999790...
0.64642507
0
Fill in layout id
@Override protected int getLayoutId() { return R.layout.activity_smart_router; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getLayoutId();", "public abstract int layoutId();", "public abstract int getLayoutId();", "public abstract int getLayoutId();", "public abstract int getLayoutId();", "@LayoutRes\n protected abstract int getLayoutId();", "@Override\n\tpublic int getLayoutId() {\n\t\treturn 0;\n\t}", "protected ...
[ "0.7929002", "0.7805487", "0.7734229", "0.7734229", "0.7734229", "0.766309", "0.7336715", "0.7260923", "0.7173747", "0.71210617", "0.69382876", "0.69193274", "0.6882463", "0.68714875", "0.6797015", "0.67045546", "0.6649391", "0.6633429", "0.66094595", "0.66085696", "0.6596171...
0.60598236
39
Initialize the view in the layout
@Override protected void initViews(Bundle savedInstanceState) { this.recyclerView = this.findView(R.id.recycler_view); this.recyclerView.addItemDecoration( new EasyDividerItemDecoration(this, EasyDividerItemDecoration.VERTICAL_LIST)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initView() {\n\n }", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "void initView();", "public void initView(){}", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "@Override\n public void initView() {\n }", "...
[ "0.8457629", "0.8331588", "0.8331588", "0.8288165", "0.82718277", "0.82694733", "0.8258238", "0.82422584", "0.8233692", "0.8233692", "0.82140875", "0.82140875", "0.81440884", "0.81440884", "0.8111374", "0.811104", "0.8084093", "0.8083335", "0.80680656", "0.8024109", "0.799325...
0.0
-1
Initialize the View of the listener
@Override protected void initListeners() { this.adapter.setOnItemClickListener((view, i) -> { final String className = classes.get(i).getSimpleName(); if (SmartRouterSampleActivity.class.getSimpleName().equals(className)) { SmartRouters.start(this, MainApplication.getScheme() + "://" + "router-0x01?" + "char=z&" + "byte=x&" + "short=2&" + "int=233&" + "float=233.233&" + "double=2333.2333&" + "long=2333&" + "boolean=true&" + "boxedCharacter=Z&" + "boxedByte=u&" + "boxedShort=3&" + "boxedInteger=1233&" + "boxedFloat=1233.233&" + "boxedDouble=12333.2333&" + "boxedLong=12333&" + "boxedBoolean=true&" + "boxedString=CaMnter" ); } else if (CustomRouterActivity.class.getSimpleName().equals(className)) { /* * In Application: * * SmartRouters.register(new Router<CustomRouterActivity>() { * * @Override * public void register(@NonNull Map<String, Class<? extends Activity>> routerMapping) { * routerMapping.put(SmartRouters.getScheme() + "://" + "router-0x02", * CustomRouterActivity.class); * } * * * @Override * public void setFieldValue(@NonNull CustomRouterActivity activity) { * final Intent intent = activity.getIntent(); * final Uri uri = intent.getData(); * if (uri == null) return; * * activity.exampleBoxedString = uri.getQueryParameter("boxedString"); * } * * }); */ SmartRouters.start(this, MainApplication.getScheme() + "://" + "router-0x02?" + "boxedString=CaMnter" ); } else if (RouterCenterActivity.class.getSimpleName().equals(className)) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("smart-routers://router-0x02?boxedString=CaMnter"))); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() {\n initView();\n setListener();\n }", "private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }", "private void initView() {\n\n }", "@Override\n public void initView() {\n }", ...
[ "0.8122137", "0.8094609", "0.7743935", "0.766224", "0.76592815", "0.76239616", "0.76239616", "0.7587915", "0.7579989", "0.7515585", "0.751415", "0.7512075", "0.7512075", "0.7509346", "0.75064003", "0.74623364", "0.74623364", "0.7399842", "0.73957646", "0.73957646", "0.7346904...
0.0
-1
Initialize the Activity data
@Override protected void initData() { this.classes = new ArrayList<>(); this.classes.add(SmartRouterSampleActivity.class); this.classes.add(CustomRouterActivity.class); this.classes.add(RouterCenterActivity.class); this.adapter = new MenuRecyclerViewAdapter(); this.adapter.setList(classes); this.recyclerView.setAdapter(adapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initData() {\n\t\tIntent intent = getIntent();\n\t\tjob = (Job) intent.getSerializableExtra(\"job\");\n\t\tedt_content.setText(job.getJobContent());\n\t\tedt_course.setText(job.getCourseName());\n\t}", "@Override\n\tprotected void initData() {\n\t\tisSearch = (boolean) getIntent().getExtras().getBoo...
[ "0.736409", "0.71585214", "0.7155287", "0.7144059", "0.71399045", "0.7095835", "0.7072963", "0.7068005", "0.70294726", "0.68826747", "0.6868106", "0.68151057", "0.67813116", "0.67808056", "0.67519146", "0.67519146", "0.6745095", "0.6720896", "0.6683679", "0.6653883", "0.66444...
0.6862317
11
Add your action code here.
public void act() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act(...
[ "0.740863", "0.7375899", "0.7375899", "0.72850144", "0.72850144", "0.72850144", "0.72850144", "0.72850144", "0.72850144", "0.72850144", "0.72850144", "0.7282202", "0.7282202", "0.7282202", "0.7191179", "0.67611897", "0.6731473", "0.6724928", "0.669374", "0.6676553", "0.662367...
0.0
-1
Randomize the plain array to make the key
public static String randomize(char[] list) { for (int j = 0; j < list.length; j++) { int index = (int) (Math.random() * list.length); char temp = list[j]; list[j] = list[index]; list[index] = temp; } String randomKey = ""; for (int x = 0; x < list.length; x++) { randomKey += (list[x]); } return randomKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void scrambleArray(Integer[] a, boolean randomize) {\n\t\tfor (int k = 0; k < a.length; k++)\n\t\t\ta[k] = k;\n\t\tif (randomize) {\n\t\t\tRandom gen = new Random();\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, gen.nextInt(a.length));\n\t\t\t}\n\t\t} else {\n\t\t\tint cell = (int)...
[ "0.6716895", "0.66939765", "0.6522732", "0.6499561", "0.64854234", "0.6485137", "0.6427569", "0.6416528", "0.6368836", "0.63670135", "0.636344", "0.6356678", "0.6285415", "0.6250004", "0.62452275", "0.6234803", "0.6230099", "0.6207968", "0.61968374", "0.617841", "0.6154631", ...
0.6567969
2
This test verifies that FootstepData can be sent and received using our current message passing utilities
@Test public void testPassingFootstepData() throws IOException { Random random = new Random(5642769L); // setup comms NetworkPorts port = NetworkPorts.createRandomTestPort(random); // QueueBasedStreamingDataProducer<FootstepData> queueBasedStreamingDataProducer = new QueueBasedStreamingDataProducer<FootstepData>("FootstepData"); PacketCommunicator tcpServer = createAndStartStreamingDataTCPServer(port); FootstepDataConsumer footstepDataConsumer = new FootstepDataConsumer(); PacketCommunicator tcpClient = createStreamingDataConsumer(FootstepDataMessage.class, footstepDataConsumer, port); ThreadTools.sleep(SLEEP_TIME); // queueBasedStreamingDataProducer.startProducingData(); // create test footsteps ArrayList<Footstep> sentFootsteps = createRandomFootsteps(50); for (Footstep footstep : sentFootsteps) { FootstepDataMessage footstepData = HumanoidMessageTools.createFootstepDataMessage(footstep); tcpServer.send(footstepData); // queueBasedStreamingDataProducer.queueDataToSend(footstepData); } ThreadTools.sleep(SLEEP_TIME); tcpClient.disconnect(); tcpServer.disconnect(); // verify received correctly ArrayList<Footstep> receivedFootsteps = footstepDataConsumer.getReconstructedFootsteps(); compareFootstepsSentWithReceived(sentFootsteps, receivedFootsteps); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testF() {\r\n\t\t\r\n\t\tObjectHandshake h = new ObjectHandshake();\r\n\t\th.setUuid( UuidTool.getOne() );\r\n\t\t\r\n\t\tRunProtocol run = null;\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A, 100, 200, true, false);\r\n\t\tassertTrue(run.beginA());\r\n\t\t\r\n\t\trun = new Ru...
[ "0.6641773", "0.63488084", "0.6276477", "0.62407184", "0.6237182", "0.62033784", "0.6148747", "0.6092132", "0.60837424", "0.6068657", "0.6043825", "0.60282475", "0.5960788", "0.5955825", "0.5914987", "0.5904903", "0.59017384", "0.5889577", "0.5888334", "0.58638465", "0.584812...
0.8081721
0
TODO write your implementation code here:
@WebMethod(operationName = "Suma") public Integer Suma(@WebParam(name = "num1") Integer num1, @WebParam(name = "num2") Integer num2) { return num1+num2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n...
[ "0.61942655", "0.5894476", "0.58358824", "0.5829639", "0.58132845", "0.5806423", "0.57288736", "0.5647916", "0.5627548", "0.5618902", "0.5595637", "0.55871207", "0.5572917", "0.55537754", "0.55461985", "0.5530198", "0.5530198", "0.5517781", "0.5517781", "0.5515668", "0.550305...
0.0
-1
TODO write your implementation code here:
@WebMethod(operationName = "Resta") public Integer Resta(@WebParam(name = "num1") Integer num1, @WebParam(name = "num2") Integer num2) { return num1-num2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n...
[ "0.61942655", "0.5894476", "0.58358824", "0.5829639", "0.58132845", "0.5806423", "0.57288736", "0.5647916", "0.5627548", "0.5618902", "0.5595637", "0.55871207", "0.5572917", "0.55537754", "0.55461985", "0.5530198", "0.5530198", "0.5517781", "0.5517781", "0.5515668", "0.550305...
0.0
-1
mozliwosc dodania recznego danych do congfig podczas pierwszego rozruchu programu
Config(InfoHandler info){ this.info = info; config_list = new ArrayList<>(); File test = new File(config_path); if(test.exists()){ //plik istnieje info.mode=1; //wlaczenie trybu dla obslugi pliku konfiguracyjnego //tutaj pobieranie informacji z pliku konfiguracyjnego //do ciała funkcji config_file = new DictReader(config_path,info); //tutaj dodajemy funkcjonalnosci config_list.add(config_file.szukaj("%imie")); config_list.add(config_file.szukaj("%dict_path")); config = get_config(); info.mode=0; is_alive = true; } else{ config = new ArrayList<>(); config_file = new DictReader(config_path,info); first_start = 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getGUIconfigData(){\n String zlgcnfg=null;\n try {\n // get connected to Rserve\n //String RSERVE_HOST = \"vdc-build.hmdc.harvard.edu\";//\"140.247.115.232\"\n //int RSERVE_PORT = 6311;\n RConnection c = new RConnection(RSERVE_HOST, RSE...
[ "0.65560496", "0.585607", "0.57898897", "0.56741756", "0.5559647", "0.5516202", "0.55006015", "0.5496913", "0.5474694", "0.5455539", "0.5443659", "0.53857183", "0.53639984", "0.5331417", "0.53306854", "0.53225857", "0.529146", "0.5272007", "0.5270845", "0.5261678", "0.5251584...
0.5049155
57
pobieranie zawartosci pliku konfiguracyjnego
ArrayList<ArrayList<String>> get_config(){ return config_file.r_wartosci(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSpremiKonfiguraciju() throws Exception {\n System.out.println(\"spremiKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.spremiKonfiguraciju();\n assertTrue(datKonf.exists());\n }", "public String getDescri...
[ "0.5513576", "0.53826153", "0.53546745", "0.53510493", "0.5345537", "0.5238124", "0.51832074", "0.5161903", "0.5158369", "0.5152805", "0.5152211", "0.5149017", "0.5118898", "0.5118898", "0.5115913", "0.5107539", "0.51043314", "0.50984496", "0.5063698", "0.50571704", "0.505499...
0.0
-1
/WeCodeModel weCodeModel=new WeCodeModel(); WeClass weClass=weCodeModel.createClass("com.test.jc"); WeBlock clzBlock=weClass.body(); WeVar p1=clzBlock.declare(WeMod.PUBLIC,"","",""); p1.init(null); clzBlock.declare(WeMod.PUBLIC,"","",""); WeMethod weMethod=weClass.createMethod(WeMod.PUBLIC,"methodName"); WeBlock methodBlock=weMethod.body(); methodBlock.declare("","",""); weCodeModel.build();
public void main(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public String _class_globals() throws Exception{\n_nativeme = new anywheresoftware.b4j.object.JavaObject();\n //BA.debugLineNum = 7;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "CodeType createCodeType();", "BOpMethod createBOpMethod();", "publi...
[ "0.66862863", "0.6232548", "0.60719204", "0.5990177", "0.595375", "0.5911663", "0.5910171", "0.5897931", "0.5883455", "0.58529204", "0.5832868", "0.582639", "0.58224857", "0.58042353", "0.5803472", "0.5798016", "0.5754048", "0.5751809", "0.572214", "0.5719824", "0.57168084", ...
0.0
-1
Private constructor of this factory
IntStrategyFactory() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Factory() {\n\t\tsuper();\n\t}", "private Instantiation(){}", "private PerksFactory() {\n\n\t}", "private ObjectFactory() { }", "public CommonsFactoryImpl() {\n\t\tsuper();\n\t}", "private StickFactory() {\n\t}", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "Reproducible newIn...
[ "0.7890318", "0.77736104", "0.7527702", "0.75129366", "0.7493356", "0.74726397", "0.74553454", "0.7430518", "0.7417765", "0.73841", "0.7365888", "0.73500407", "0.73412097", "0.7336717", "0.7332506", "0.7320623", "0.7315528", "0.7287492", "0.72833794", "0.726964", "0.72692263"...
0.0
-1
VARIABLE SELECTORS (nonexhaustive list) Selects the first noninstantiated variable, to branch on it.
public static VariableSelector<IntVar> lexico_var_selector() { return new InputOrder<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static VariableSelector<IntVar> minDomainSize_var_selector() {\n return new FirstFail();\n }", "IntVar selectVariable(IntVar[] v) {\r\n\r\n if (v.length != 0) {\r\n int index = 0;\r\n int smallestDomain = Integer.MAX_VALUE;\r\n for(int i = ...
[ "0.6273803", "0.6046351", "0.5988261", "0.5907913", "0.58938324", "0.58509344", "0.5668354", "0.5622567", "0.56205857", "0.56205857", "0.56205857", "0.5547056", "0.5475111", "0.5420171", "0.53305864", "0.5313075", "0.53089666", "0.52877694", "0.5276816", "0.5244032", "0.52369...
0.60790676
1
Selects randomly a noninstantiated variable to branch on
public static VariableSelector<IntVar> random_var_selector(long SEED) { return new Random<>(SEED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}", "private static Option pickRandom() {\n\t\treturn Option.values()[rand.nextInt(3)];\n\t}", "private void random() {\n\n\t}", "private void assuerNN_random() {\n ...
[ "0.66364324", "0.6471506", "0.63834554", "0.63469917", "0.6326578", "0.62978286", "0.62180054", "0.61365366", "0.61124545", "0.61078393", "0.6062286", "0.60357714", "0.6029924", "0.60248274", "0.6024618", "0.60108507", "0.6000782", "0.5995677", "0.5986535", "0.5985708", "0.59...
0.6860366
0
Selects the noninstantiated variable of smallest domain, to branch on it. This heuristic is sometimes called FirstFail.
public static VariableSelector<IntVar> minDomainSize_var_selector() { return new FirstFail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static VariableSelector<IntVar> maxDomainSize_var_selector() {\n return new AntiFirstFail();\n }", "IntVar selectVariable(IntVar[] v) {\r\n\r\n if (v.length != 0) {\r\n int index = 0;\r\n int smallestDomain = Integer.MAX_VALUE;\r\n for(int ...
[ "0.57804465", "0.54749465", "0.5394625", "0.52655816", "0.5200865", "0.51678723", "0.5130778", "0.5125643", "0.51256037", "0.5125349", "0.5101134", "0.5080856", "0.5071061", "0.50672233", "0.5052197", "0.50130326", "0.49961555", "0.4957893", "0.49476606", "0.49395028", "0.492...
0.6604398
0
Selects the noninstantiated variable of largest domain, to branch on it. This heuristic is sometimes called AntiFirstFail.
public static VariableSelector<IntVar> maxDomainSize_var_selector() { return new AntiFirstFail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static VariableSelector<IntVar> minDomainSize_var_selector() {\n return new FirstFail();\n }", "public int chooseVTD(){\n int min=0;\n //this loop is used to avoid a bug\n for(int i=0;i<heuristicArrayTD.length;i++){\n if(heuristicArrayTD[i]< heuristicArrayTD[min])...
[ "0.62522143", "0.56476456", "0.5603983", "0.5517984", "0.53899246", "0.5273627", "0.52450544", "0.5169853", "0.51596713", "0.5128026", "0.5124575", "0.50679564", "0.50634456", "0.5050384", "0.50209534", "0.4999194", "0.49909446", "0.4963009", "0.49442112", "0.49412882", "0.49...
0.677643
0
Selects the noninstantiated variable with the largest difference between the two smallest values in its domain, to branch on it.
public static VariableSelector<IntVar> maxRegret_var_selector() { return new MaxRegret(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static double getMax(double a, double b) {\n\t\treturn (a > b) ? a : b;\n\t}", "static int findGreatestValue(int x, int y) {\r\n\t\t\r\n\t\tif(x>y)\r\n\t\t\treturn x;\r\n\t\telse\r\n\t\t return y;\r\n\t}", "E maxVal();", "public int chooseVTD(){\n int min=0;\n //this loop is used to avoid a b...
[ "0.6123842", "0.58621913", "0.5848", "0.5831816", "0.5791033", "0.5791033", "0.5736742", "0.5730677", "0.565944", "0.56228095", "0.55951464", "0.5590598", "0.5583589", "0.55713695", "0.5537532", "0.5535816", "0.5516024", "0.5514065", "0.54829735", "0.5482869", "0.5475708", ...
0.0
-1
VALUE SELECTORS Selects the variable lower bound
public static IntValueSelector min_value_selector() { return new IntDomainMin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int selectValue(IntVar v) {\r\n int c = (v.max() + v.min())/2;\r\n return c;\r\n }", "public void setParamValueRange(String label, Object minValue, Object maxValue);", "public void setParamValueRange(String label, double minValue, double maxValue);", "Range controlLimits();", "...
[ "0.59119636", "0.5879761", "0.5868148", "0.57209325", "0.56939006", "0.5650895", "0.56147593", "0.56061965", "0.5547528", "0.55462146", "0.55350655", "0.55113053", "0.5358328", "0.53522074", "0.53303295", "0.5320855", "0.5306986", "0.52927244", "0.5276541", "0.52742636", "0.5...
0.54368955
12
Selects a value at the middle between the variable lower and upper bounds BEWARE: this should not be used within assignments and/or value removals if variables have a bounded domain.
public static IntValueSelector mid_value_selector(boolean floor) { return new IntDomainMiddle(floor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getRangeCenter(int lowerBound, int upperBound) {\n return (lowerBound + upperBound) / 2.0;\n }", "public static double inInterval(double lowerBound, double value, double upperBound) {\n/* 67 */ if (value < lowerBound)\n/* 68 */ return lowerBound; \n/* 69 */ if (upperBound < value...
[ "0.63003737", "0.61946565", "0.6170874", "0.6164327", "0.59495455", "0.5918012", "0.58724725", "0.58511114", "0.5753205", "0.5714184", "0.56825817", "0.559125", "0.55894375", "0.5516301", "0.5506817", "0.5487519", "0.5472665", "0.5395303", "0.53667486", "0.53566957", "0.53534...
0.52222985
34
Selects the variable upper bound
public static IntValueSelector max_value_selector() { return new IntDomainMax(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpperBound(String upper) {\n upperBound = upper;\n }", "public int getUpperBound() {\r\n return upperBound;\r\n }", "public void setUpperBound(final int upperBound) {\r\n this.upperBound = upperBound;\r\n }", "public int getUpperBound() {\n\t\treturn upperBound;\n...
[ "0.70329005", "0.68754476", "0.68164694", "0.6741833", "0.6658067", "0.6605872", "0.65912724", "0.65516484", "0.65268", "0.6462147", "0.64512956", "0.64073503", "0.6257749", "0.6238858", "0.62370235", "0.61465704", "0.6087217", "0.60842407", "0.60773474", "0.6055799", "0.6048...
0.0
-1
Selects randomly a value in the variable domain. Takes an arbitrary value in [LB,UB] BEWARE: this should not be used within assignments and/or value removals if variables have a bounded domain.
public static IntValueSelector random_value_selector(long SEED) { return new IntDomainRandom(SEED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static IntStrategy random_value(IntVar[] VARS, long SEED) {\n for (IntVar v : VARS) {\n if (!v.hasEnumeratedDomain()) {\n throw new UnsupportedOperationException(\"Some variables have bounded domains, \" +\n \"please use random heuristic instead\");\n ...
[ "0.6533772", "0.6392203", "0.6176287", "0.59378076", "0.5850717", "0.57747996", "0.57593465", "0.5666234", "0.5662626", "0.5608057", "0.5546634", "0.54710555", "0.54633904", "0.54434216", "0.54359055", "0.5430481", "0.5413953", "0.5384175", "0.5382783", "0.53729206", "0.53698...
0.59742326
3
OPERATORS Assign the selected variable to the selected value e.g. X = 42 If this decision fails, it is automatically negated (i.e. X != 42)
public static DecisionOperator<IntVar> assign() { return DecisionOperator.int_eq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean setValue(Value value, boolean asAssignment);", "private Term parseAssign(final boolean required) throws ParseException {\n Term t1 = parseConditional(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '=') {\n ...
[ "0.625886", "0.61275274", "0.6055575", "0.6035663", "0.59372294", "0.5850144", "0.58119243", "0.57949996", "0.5786715", "0.5784666", "0.5780048", "0.57748014", "0.57537925", "0.57079256", "0.5700202", "0.56849134", "0.5681147", "0.5651876", "0.56489456", "0.5633338", "0.56287...
0.67291635
0
Remove the selected value from the selected variable domain e.g. X != 42 If this decision fails, it is automatically negated (i.e. X = 42)
public static DecisionOperator<IntVar> remove() { return DecisionOperator.int_neq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unsetValue();", "void unsetValue();", "@Override\r\n\tpublic void unsetGiveValue() {\n\t\t\r\n\t}", "public void unsetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(VALUE$12);\n }\n ...
[ "0.6752722", "0.6752722", "0.603682", "0.60153204", "0.59725773", "0.57589924", "0.57453215", "0.5644882", "0.5617004", "0.5603162", "0.55952615", "0.5586926", "0.5551954", "0.5529937", "0.55114746", "0.54830694", "0.5467119", "0.5464284", "0.5448762", "0.5443723", "0.542264"...
0.6147173
2
Split the domain of the selected variable at the selected value, by updating the upper bound. e.g. X 42)
public static DecisionOperator<IntVar> split() { return DecisionOperator.int_split; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update_domain(int value, int lowerBound, int upperBound) {\n domain_history.push(domain.copy());\n domain.getDomain().remove((Integer) value);\n domain.getDomain().removeIf(d -> d > upperBound || d < lowerBound);\n }", "R visitBoundVariable(Formula f, int deBruijnIdx);", "pu...
[ "0.59866685", "0.57537043", "0.57494843", "0.56120414", "0.55461705", "0.5348587", "0.5314673", "0.52857125", "0.52325666", "0.52240455", "0.521972", "0.51883084", "0.51837367", "0.5181925", "0.5112545", "0.5107502", "0.50887024", "0.5081893", "0.50739723", "0.5061396", "0.50...
0.0
-1
Split the domain of the selected variable at the selected value, by updating the lower bound. e.g. X >= 42 If this decision fails, it is automatically negated (i.e. X < 42)
public static DecisionOperator<IntVar> reverse_split() { return DecisionOperator.int_reverse_split; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLowerBound (int lowerBound) throws ModelException;", "public void update_domain(int value, int lowerBound, int upperBound) {\n domain_history.push(domain.copy());\n domain.getDomain().remove((Integer) value);\n domain.getDomain().removeIf(d -> d > upperBound || d < lowerBound)...
[ "0.6363244", "0.5898049", "0.5883437", "0.567404", "0.55894274", "0.55749536", "0.5555223", "0.5552252", "0.54938185", "0.54913557", "0.5488306", "0.5477715", "0.54672337", "0.5425025", "0.54107875", "0.538686", "0.5354183", "0.5337943", "0.52592", "0.5236651", "0.5229846", ...
0.0
-1
CUSTOM STRATEGIES Builds your own search strategy based on binary decisions.
public static IntStrategy custom(VariableSelector<IntVar> VAR_SELECTOR, IntValueSelector VAL_SELECTOR, DecisionOperator<IntVar> DEC_OPERATOR, IntVar... VARS) { return new IntStrategy(VARS, VAR_SELECTOR, VAL_SELECTOR, DEC_OPERATOR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Solution<T> search(Searchable<T> s);", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public st...
[ "0.5818995", "0.54974973", "0.53989065", "0.53488696", "0.52969927", "0.5278454", "0.52701354", "0.52508426", "0.5218992", "0.52141446", "0.5195207", "0.519495", "0.5171149", "0.51686406", "0.5125354", "0.5051217", "0.5044495", "0.50286084", "0.50212765", "0.5005991", "0.5003...
0.0
-1
Builds your own assignment strategy based on binary decisions. Selects a variable X and a value V to make the decision X = V. Note that value assignments are the default decision operators. Therefore, they are not mentioned in the search heuristic name.
public static IntStrategy custom(VariableSelector<IntVar> VAR_SELECTOR, IntValueSelector VAL_SELECTOR, IntVar... VARS) { return custom(VAR_SELECTOR, VAL_SELECTOR, assign(), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static DecisionOperator<IntVar> assign() {\n return DecisionOperator.int_eq;\n }", "@Override\n\tpublic List<Component> caseExprBinary(ExprBinary expr) {\n\t\tint sizeInBits = assignTarget.getVariable().getType().getSizeInBits();\n\t\t// Get the Variables\n\t\tVar e1 = ((ExprVar) expr.getE1()).g...
[ "0.6307793", "0.58135945", "0.57461715", "0.56529677", "0.55622643", "0.5556349", "0.55516815", "0.54682255", "0.5460991", "0.5388767", "0.5376197", "0.5307139", "0.52690524", "0.5233299", "0.5212639", "0.5168921", "0.51659596", "0.5161488", "0.5108355", "0.50666404", "0.5030...
0.4629025
63
Create a search strategy which selects the variables to branch on with VAR_SELECTOR, then select the value closest to the middle value of its domain, and split its domain into two intervals (binary decisions will be used). If LOWERFIRST is set to true, the domain is restricted to the left interval first. If LOWERFIRST is set to false, the domain is restricted to the right interval first.
public static IntStrategy dichotomic(VariableSelector<IntVar> VAR_SELECTOR, boolean LOWERFIRST, IntVar... VARS){ if(LOWERFIRST){ return custom(VAR_SELECTOR, ISF.mid_value_selector(LOWERFIRST), DecisionOperator.int_split, VARS); }else{ return custom(VAR_SELECTOR, ISF.mid_value_selector(LOWERFIRST), DecisionOperator.int_reverse_split, VARS); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setComparedHeuristics (VariableSelector variableSelector, IntValueSelector valueOrder){\n\t\tIntValueSelector valueSelector = valueOrder;\n\t\t\n\t \n\t\tkb.getModelKB().getSolver().setSearch(Search.intVarSearch(\n \n\t\t\t\tvariableSelector,\n // selects the smallest ...
[ "0.58519685", "0.5177944", "0.5082667", "0.49668336", "0.4884741", "0.47133583", "0.46993124", "0.4664217", "0.4629112", "0.46021008", "0.45906734", "0.45747724", "0.45600218", "0.44943342", "0.445107", "0.43898678", "0.43589196", "0.43472672", "0.43437177", "0.4334192", "0.4...
0.6208901
0
Builds your own search strategy based on unary decisions, that is, decisions can be applied but not refuted.
public static IntStrategy once(VariableSelector<IntVar> VAR_SELECTOR, IntValueSelector VAL_SELECTOR, DecisionOperator<IntVar> DEC_OPERATOR, IntVar... VARS){ return new Once(VARS, VAR_SELECTOR, VAL_SELECTOR, DEC_OPERATOR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Search createSearch(String searchText)\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder(searchText);\n\t\t\ttrim(sb);\n\t\t\tSearch current = null;\n\t\t\twhile(sb.length() > 0)\n\t\t\t{\n\t\t\t\tboolean not = false;\n\t\t\t\tif(sb.length() > 1 && lower(sb.charAt(0)) == 'o' && lower(sb.charAt(1)) == 'r')\...
[ "0.5723581", "0.5592949", "0.54952425", "0.5487554", "0.5461776", "0.53680944", "0.5366077", "0.5312419", "0.5312415", "0.5250675", "0.5246214", "0.52376837", "0.5211201", "0.5203409", "0.5158546", "0.51551116", "0.5139134", "0.50980085", "0.5059312", "0.5038648", "0.5014733"...
0.0
-1
Builds your own assignment strategy based on unary decisions, that is, decisions can be applied but not refuted. Selects a variable X and a value V to make the decision X = V. Note that value assignments are the default decision operators. Therefore, they are not mentioned in the search heuristic name.
public static IntStrategy once(VariableSelector<IntVar> VAR_SELECTOR, IntValueSelector VAL_SELECTOR, IntVar... VARS){ return new Once(VARS, VAR_SELECTOR, VAL_SELECTOR, assign()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static DecisionOperator<IntVar> assign() {\n return DecisionOperator.int_eq;\n }", "@Override\n public Void visit(AssignmentExpression nd, SuccessorInfo i) {\n if (\"&&=\".equals(nd.getOperator()) || \"||=\".equals(nd.getOperator()) || \"??=\".equals(nd.getOperator())) {\n if (\"&...
[ "0.63113034", "0.5930139", "0.58747274", "0.5586384", "0.5560579", "0.5512583", "0.54280734", "0.5423264", "0.53979903", "0.539607", "0.5390928", "0.53856564", "0.53527546", "0.53042865", "0.5279831", "0.5270075", "0.52665377", "0.5246666", "0.5234831", "0.5224159", "0.522033...
0.0
-1
SOME EXAMPLES OF STRATEGIES YOU CAN BUILD Assigns the first noninstantiated variable to its lower bound.
public static IntStrategy lexico_LB(IntVar... VARS) { return custom(lexico_var_selector(), min_value_selector(), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLowerBound ();", "@Override\n\tprotected void setLowerBound() {\n\t\t\n\t}", "public int getLowerBound() {\r\n return lowerBound;\r\n }", "public V getLowerBound();", "public void setLowerBound (int lowerBound) throws ModelException;", "public void setLowerBound(String lower) {\n ...
[ "0.64422303", "0.64204246", "0.62325317", "0.6195147", "0.6169089", "0.61403984", "0.60196924", "0.58673537", "0.58543575", "0.56957626", "0.5625129", "0.5563599", "0.5546278", "0.54507804", "0.54012406", "0.53939486", "0.5373368", "0.5348131", "0.5338412", "0.53317523", "0.5...
0.50984377
46
Removes the lower bound value from the domain of the first noninstantiated variable
public static IntStrategy lexico_Neq_LB(IntVar... VARS) { return custom(lexico_var_selector(), min_value_selector(), remove(), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected double getLowerBound() {\n\t\treturn 0;\n\t}", "public void setLowerBound (int lowerBound) throws ModelException;", "public double getDomainMin1() throws IllegalStateException {\n\treturn -Double.MAX_VALUE;\n }", "public V getLowerBound();", "public T removeMin ();", "@Override\...
[ "0.62962407", "0.6256597", "0.6129022", "0.60399014", "0.59879094", "0.5932331", "0.593132", "0.58774483", "0.58774483", "0.57875687", "0.5774897", "0.5772342", "0.56470925", "0.56275684", "0.55812275", "0.5575049", "0.5554826", "0.55239576", "0.5520796", "0.5497395", "0.5493...
0.0
-1
Splits the domain of the first noninstantiated variable in the middle and branch first on the left interval
public static IntStrategy lexico_Split(IntVar... VARS) { return dichotomic(ISF.lexico_var_selector(), true, VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void divideDomain(){\n \tfor (int i = 0 ; i < getBoardSize() ; i++)\n \t\tfor (int j = 0 ; j < getBoardSize() ; j++){\n\t\t\tgetPoint(i, j).setHolder(GoPlayer.UNKNOWN);\n\t\t}\n\n \t\tfor (int i = 0 ; i < getBoardSize() ; i++)\n \t\tfor (int j = 0 ; j < getBoardSize() ; j++){\n if (getPoin...
[ "0.5811586", "0.5416447", "0.52763224", "0.52257663", "0.51041096", "0.5039043", "0.5028468", "0.4985596", "0.49839246", "0.49310657", "0.4910619", "0.48373452", "0.4821575", "0.48185533", "0.47635597", "0.47423702", "0.47423702", "0.47388655", "0.47239152", "0.4704735", "0.4...
0.4435933
48
Assigns the first noninstantiated variable to its upper bound.
public static IntStrategy lexico_UB(IntVar... VARS) { return custom(lexico_var_selector(), max_value_selector(), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpperBound(String upper) {\n upperBound = upper;\n }", "public void setUpperBound(final int upperBound) {\r\n this.upperBound = upperBound;\r\n }", "public void setHighestVariable(int v) {\n\t\tHighestVariable = (HighestVariable + v);\n\t}", "public int getUpperBound() {\r\...
[ "0.6040425", "0.59285706", "0.570044", "0.5587151", "0.55197084", "0.5488147", "0.5481018", "0.54661644", "0.544405", "0.54438883", "0.5352405", "0.5262978", "0.5236659", "0.5201994", "0.51689166", "0.5165874", "0.5161796", "0.51480126", "0.51218575", "0.5119139", "0.5101716"...
0.49605384
30
Assigns the noninstantiated variable of smallest domain size to its lower bound.
public static IntStrategy minDom_LB(IntVar... VARS) { return custom(minDomainSize_var_selector(), min_value_selector(), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLowerBound (int lowerBound) throws ModelException;", "public void setLowerBound(final int lowerBound) {\r\n this.lowerBound = lowerBound;\r\n }", "public void setLowerBound(String lower) {\n lowerBound = lower;\n }", "public int getLowerBound() {\r\n return lowerBoun...
[ "0.6604706", "0.63143456", "0.62544096", "0.6254404", "0.5967962", "0.5946686", "0.5940829", "0.5891488", "0.584639", "0.5778068", "0.57638174", "0.57580847", "0.57380635", "0.569202", "0.5681723", "0.56486565", "0.5623933", "0.5621599", "0.56170124", "0.5611931", "0.5595616"...
0.54432017
32
Assigns the noninstantiated variable of smallest domain size to a value at the middle of its domain.
public static IntStrategy minDom_MidValue(boolean floor, IntVar... VARS) { return custom(minDomainSize_var_selector(), mid_value_selector(floor), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static VariableSelector<IntVar> minDomainSize_var_selector() {\n return new FirstFail();\n }", "@Override\n public Expression assign(String var, Expression expression) {\n return new Minus(getExpression1().assign(var, expression), getExpression2().assign(var, expression));\n }", "...
[ "0.5165434", "0.51501155", "0.4936752", "0.49239764", "0.48818427", "0.48681837", "0.48418492", "0.4801046", "0.47878015", "0.47866282", "0.47722945", "0.4725808", "0.47209722", "0.47203887", "0.4704475", "0.4690621", "0.46855113", "0.46779945", "0.466965", "0.46683824", "0.4...
0.45833895
29
Splits the domain of the variable of largest domain
public static IntStrategy maxDom_Split(IntVar... VARS) { return dichotomic(maxDomainSize_var_selector(), true, VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Variable useHeuristic(Deque<Variable> deque) {\n Variable highDomain = deque.getFirst();\n for (Variable var : deque){\n if (var.getDomain().size() > highDomain.getDomain().size()){\n highDomain = var;\n }\n }\n return highDomai...
[ "0.5231829", "0.51654905", "0.513158", "0.5115658", "0.50935596", "0.5074795", "0.49770278", "0.49417087", "0.4925437", "0.4904337", "0.49038664", "0.4894424", "0.486725", "0.48064697", "0.48052612", "0.4772556", "0.47667062", "0.47528046", "0.4739733", "0.4720487", "0.470644...
0.6544626
0
Assigns the noninstantiated variable of smallest domain size to its upper bound.
public static IntStrategy minDom_UB(IntVar... VARS) { return custom(minDomainSize_var_selector(), max_value_selector(), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpperBound(String upper) {\n upperBound = upper;\n }", "public void setUpperBound(final int upperBound) {\r\n this.upperBound = upperBound;\r\n }", "@Override\n\tprotected void setUpperBound() {\n\t\t\n\t}", "public int getUpperBound() {\r\n return upperBound;\r\n ...
[ "0.6164166", "0.6161353", "0.58765846", "0.5845968", "0.5731805", "0.55900913", "0.55453485", "0.55312574", "0.55041265", "0.5499343", "0.5484886", "0.5457605", "0.5431549", "0.5423194", "0.5419346", "0.5419218", "0.5381126", "0.53786534", "0.5289421", "0.5270844", "0.5182853...
0.5169303
21
Assigns the noninstantiated variable of maximum regret to its lower bound.
public static IntStrategy maxReg_LB(IntVar... VARS) { return custom(maxRegret_var_selector(), min_value_selector(), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != Inter...
[ "0.67291915", "0.6275249", "0.62166077", "0.61767554", "0.61490995", "0.61477387", "0.6119975", "0.6115725", "0.60964465", "0.60697633", "0.6038798", "0.60330784", "0.60156906", "0.597816", "0.59277755", "0.59142303", "0.5881163", "0.58649856", "0.58474594", "0.57695234", "0....
0.59277403
15
A branching strategy over the objective variable. It is activated on the first solution, and iterates over the domain in decreasing order (upper bound first).
public static ObjectiveStrategy objective_bottom_up(IntVar OBJECTIVE){ return new ObjectiveStrategy(OBJECTIVE, OptimizationPolicy.BOTTOM_UP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean solveBranchingModel(BranchingConstraintSet targetSet) {\n for (BranchingConstraint branching : targetSet.branchingConstraints) {\n Map<String, Double> terms = new HashMap<>();\n terms.put(branching.branchingVarName, 1.0);\n\n if (branching.branchingType == Constraint...
[ "0.6532016", "0.6333603", "0.601618", "0.5930575", "0.57526636", "0.55287653", "0.54776955", "0.54425335", "0.5397903", "0.5322019", "0.53130996", "0.52919954", "0.5252964", "0.5232906", "0.52197635", "0.5217513", "0.5203705", "0.51882565", "0.5183038", "0.5136579", "0.512196...
0.5204975
16
A branching strategy over the objective variable. It is activated on the first solution, and iterates over the domain in increasing order (lower bound first).
public static ObjectiveStrategy objective_dichotomic(IntVar OBJECTIVE){ return new ObjectiveStrategy(OBJECTIVE, OptimizationPolicy.DICHOTOMIC); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean solveBranchingModel(BranchingConstraintSet targetSet) {\n for (BranchingConstraint branching : targetSet.branchingConstraints) {\n Map<String, Double> terms = new HashMap<>();\n terms.put(branching.branchingVarName, 1.0);\n\n if (branching.branchingType == Constraint...
[ "0.63835996", "0.63371944", "0.59438556", "0.57977563", "0.55225116", "0.54932874", "0.5455123", "0.54264396", "0.5381514", "0.52528524", "0.5244702", "0.5241957", "0.5231297", "0.52132004", "0.5212568", "0.52029264", "0.5181315", "0.51636714", "0.5123564", "0.511486", "0.509...
0.46900728
58
A branching strategy over the objective variable. It is activated on the first solution, and splits the domain into two parts, and evaluates first the lower part in case of minimization and the upper part in case of maximization.
public static ObjectiveStrategy objective_top_bottom(IntVar OBJECTIVE){ return new ObjectiveStrategy(OBJECTIVE, OptimizationPolicy.TOP_DOWN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean solveBranchingModel(BranchingConstraintSet targetSet) {\n for (BranchingConstraint branching : targetSet.branchingConstraints) {\n Map<String, Double> terms = new HashMap<>();\n terms.put(branching.branchingVarName, 1.0);\n\n if (branching.branchingType == Constraint...
[ "0.6501858", "0.6393468", "0.5674571", "0.55683774", "0.55303216", "0.53782505", "0.52537394", "0.51536113", "0.5127492", "0.5117436", "0.5063634", "0.50391483", "0.5037537", "0.5014491", "0.5000715", "0.49896395", "0.4988179", "0.49822438", "0.49528265", "0.49511242", "0.494...
0.47076163
52
Randomly selects a variable and assigns it to a value randomly taken in the domain. This is dedicated to enumerated domains. In case some variables have bounded domains, please use random_valueOrBound instead
public static IntStrategy random_value(IntVar[] VARS, long SEED) { for (IntVar v : VARS) { if (!v.hasEnumeratedDomain()) { throw new UnsupportedOperationException("Some variables have bounded domains, " + "please use random heuristic instead"); } } return custom(random_var_selector(SEED), random_value_selector(SEED), VARS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static VariableSelector<IntVar> random_var_selector(long SEED) {\n return new Random<>(SEED);\n }", "public static IntValueSelector random_value_selector(long SEED) {\n return new IntDomainRandom(SEED);\n }", "public static IntStrategy random_value(IntVar[] VARS) {\n return ra...
[ "0.67254245", "0.60778046", "0.6073251", "0.59034437", "0.58460224", "0.57522106", "0.573453", "0.5711045", "0.56790596", "0.5651266", "0.56435764", "0.5638646", "0.5584586", "0.55803186", "0.5576803", "0.5575311", "0.5563564", "0.55625933", "0.55356985", "0.5530434", "0.5522...
0.7006382
0
Randomly selects a variable and assigns it to a value randomly taken in [LB,UB] Uses fixed seed 0 by default
public static IntStrategy random_value(IntVar[] VARS) { return random_value(VARS, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public static VariableSelector<IntVar> random_var_selector(long SEED) {\n return new Random<>(SEED);\n }", "private void assuerNN_random() {\n //Check, if the variable is null..\n if (this.random == null) {\n ...
[ "0.69449776", "0.6926617", "0.6477849", "0.6454419", "0.64329934", "0.63625187", "0.6350151", "0.6341969", "0.6325854", "0.6322893", "0.63221467", "0.6273126", "0.624961", "0.62266773", "0.6225272", "0.6220012", "0.6212924", "0.6204961", "0.61750424", "0.6170502", "0.6168174"...
0.6542965
2
Build a sequence of AbstractStrategy. The first strategy in parameter is first called to compute a decision, if possible. Otherwise, the second strategy is called, ... And so on, until the last one.
public static AbstractStrategy sequencer(AbstractStrategy... strategies) { return new StrategiesSequencer(strategies); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Strategy<S, Integer> buildStrategy() {\n\t\tStrategy<S, Integer> result = new Strategy<S, Integer>();\n\n\t\tSet<S> winningStates = this.getWinningStates();\n\n\t\tfor (S state : losingStates) {\n\t\t\tStrategyState<S, Integer> source = new StrategyState<S, Integer>(\n\t\t\t\t\tstate, DUMMY_GOAL);\n\t\t\tSe...
[ "0.6603482", "0.62123626", "0.6133704", "0.5684679", "0.55793077", "0.53002936", "0.5235674", "0.5092276", "0.5089059", "0.5088102", "0.50613475", "0.5017439", "0.49868894", "0.49702", "0.49668357", "0.49094096", "0.49091187", "0.48771828", "0.48695397", "0.4845127", "0.48382...
0.62448126
1
BLACKBOX STRATEGIES Assignment strategy which selects a variable according to DomOverWDeg[1] and assign it to the selected value. [1]: F. Boussemart, F. Hemery, C. Lecoutre, and L. Sais, Boosting Systematic Search by Weighting Constraints, ECAI04.
public static AbstractStrategy<IntVar> domOverWDeg(IntVar[] VARS, long SEED, IntValueSelector VAL_SELECTOR) { return new DomOverWDeg(VARS, SEED, VAL_SELECTOR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalcul...
[ "0.54541487", "0.54541165", "0.54268086", "0.5363662", "0.5139273", "0.51299816", "0.50211334", "0.49928814", "0.49697408", "0.49278936", "0.4913931", "0.48900968", "0.48634642", "0.48374373", "0.48354882", "0.48272762", "0.4821405", "0.48106626", "0.48092085", "0.4801111", "...
0.0
-1
Assignment strategy which selects a variable according to DomOverWDeg and assign it to its lower bound
public static AbstractStrategy<IntVar> domOverWDeg(IntVar[] VARS, long SEED) { return domOverWDeg(VARS, SEED, min_value_selector()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void mapValueToWithinBounds() {\n if (getAllele() != null) {\n \tFloat d_value = ( (Float) getAllele());\n if (d_value.isInfinite()) {\n // Here we have to break to avoid a stack overflow.\n // ------------------------------------------------\n return;\n }\n // I...
[ "0.5821441", "0.5722975", "0.5494405", "0.54634297", "0.5317111", "0.53041244", "0.52647215", "0.5264227", "0.5213511", "0.5198714", "0.5195604", "0.51628375", "0.51413417", "0.5131053", "0.5123687", "0.5113732", "0.5035264", "0.50170094", "0.5015844", "0.5015413", "0.5006216...
0.5446483
4
Create an Activity based search strategy. "ActivityBased Search for BlackBox Constraint Propagramming Solver", Laurent Michel and Pascal Van Hentenryck, CPAIOR12.
public static AbstractStrategy<IntVar> activity(IntVar[] VARS, double GAMMA, double DELTA, int ALPHA, int FORCE_SAMPLING, long SEED) { return new ActivityBased(VARS[0].getSolver(), VARS, GAMMA, DELTA, ALPHA, FORCE_SAMPLING, SEED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void searchConstraintHit (Search search);", "public interface SearchAlgorithm {\n\t/**\n\t * Searches the state space for a solution.\n\t * @param root\n\t * The root state to begin search from.\n\t * @param expanded_list\n\t * The expanded list in order of expansion. Filled by function.\n\t * @param goal\n\t * ...
[ "0.52946687", "0.527225", "0.5213", "0.51759475", "0.51393485", "0.5127181", "0.5095412", "0.5073466", "0.5050859", "0.5026429", "0.5019733", "0.50138354", "0.49985436", "0.4988133", "0.49828264", "0.4951299", "0.49107626", "0.4895628", "0.48912436", "0.48783162", "0.48756802...
0.4705325
37
Create an Activity based search strategy. "ActivityBased Search for BlackBox Constraint Propagramming Solver", Laurent Michel and Pascal Van Hentenryck, CPAIOR12. Uses default parameters (GAMMA=0.999d, DELTA=0.2d, ALPHA=8, RESTART=1.1d, FORCE_SAMPLING=1)
public static AbstractStrategy<IntVar> activity(IntVar[] VARS, long SEED) { return activity(VARS, 0.999d, 0.2d, 8, 1, SEED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static AbstractStrategy<IntVar> activity(IntVar[] VARS, double GAMMA, double DELTA, int ALPHA,\n int FORCE_SAMPLING, long SEED) {\n return new ActivityBased(VARS[0].getSolver(), VARS, GAMMA, DELTA, ALPHA, FORCE_SAMPLING, SEED);\n }", "public sta...
[ "0.56993335", "0.53794134", "0.5057677", "0.49996108", "0.4962604", "0.4953406", "0.4951781", "0.49510032", "0.49344614", "0.4930517", "0.49074614", "0.489001", "0.48649526", "0.48624158", "0.485608", "0.4853347", "0.48473144", "0.4819053", "0.48024717", "0.48007995", "0.4790...
0.0
-1
Create an Impactbased search strategy. "ImpactBased Search Strategies for Constraint Programming", Philippe Refalo, CP2004.
public static AbstractStrategy<IntVar> impact(IntVar[] VARS, int ALPHA, int SPLIT, int NODEIMPACT, long SEED, boolean INITONLY) { return new ImpactBased(VARS, ALPHA, SPLIT, NODEIMPACT, SEED, INITONLY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AsgStrategy {\n void apply(AsgQuery query, AsgStrategyContext context);\n}", "Association findAssociation(World w, BlockPos pos, String strategy);", "Strategy createStrategy();", "void searchConstraintHit (Search search);", "GoalSpecification createGoalSpecification();", "Algorithm cr...
[ "0.5600892", "0.55532825", "0.5539226", "0.5356957", "0.5310415", "0.525517", "0.5254404", "0.5184143", "0.50807065", "0.5051167", "0.5050741", "0.50353324", "0.5016568", "0.49579072", "0.48308253", "0.47939587", "0.47931963", "0.47796646", "0.47731557", "0.47697252", "0.4766...
0.51966447
7
Create an Impactbased search strategy. "ImpactBased Search Strategies for Constraint Programming", Philippe Refalo, CP2004. Uses default parameters (ALPHA=2,SPLIT=3,NODEIMPACT=10,INITONLY=true)
public static AbstractStrategy<IntVar> impact(IntVar[] VARS, long SEED) { return impact(VARS, 2, 3, 10, SEED, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static AbstractStrategy<IntVar> impact(IntVar[] VARS, int ALPHA, int SPLIT, int NODEIMPACT, long SEED, boolean INITONLY) {\n return new ImpactBased(VARS, ALPHA, SPLIT, NODEIMPACT, SEED, INITONLY);\n }", "ParameterRefinement createParameterRefinement();", "OperationalizingSoftgoal createOperati...
[ "0.6241232", "0.52751094", "0.51124996", "0.51055866", "0.50654763", "0.5047742", "0.5002073", "0.49921173", "0.49887985", "0.4981936", "0.49684337", "0.49608532", "0.4937287", "0.4910856", "0.49068347", "0.4873534", "0.48559028", "0.4815395", "0.48090896", "0.4805954", "0.48...
0.0
-1
Use the last conflict heuristic as a pluggin to improve a former search heuristic STRAT
public static AbstractStrategy lastConflict(Solver SOLVER) { return lastConflict(SOLVER, SOLVER.getStrategy()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static LinkedList<Integer> localSearch2Opt(File fileNameWithPath, int kNeighborHood ) throws Exception{\n\t\t\n\t\tString traceString = \"\";\n\t\tdouble bestCost = Double.POSITIVE_INFINITY;\n\t\tLinkedList<Integer> bestTspList = null;\n\t\tdouble bestCycleTime = Double.POSITIVE_INFINITY;\n\n\t\tif (Projec...
[ "0.5802915", "0.5674299", "0.56610936", "0.5640925", "0.55954564", "0.5537333", "0.5531402", "0.55253565", "0.55212694", "0.5518381", "0.54757524", "0.544788", "0.54435074", "0.53933764", "0.5392995", "0.5391413", "0.5371845", "0.5362997", "0.53625464", "0.5352009", "0.532777...
0.4903609
85
Use the last conflict heuristic as a pluggin to improve a former search heuristic STRAT
public static AbstractStrategy lastConflict(Solver SOLVER, AbstractStrategy STRAT) { return lastKConflicts(SOLVER, 1, STRAT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static LinkedList<Integer> localSearch2Opt(File fileNameWithPath, int kNeighborHood ) throws Exception{\n\t\t\n\t\tString traceString = \"\";\n\t\tdouble bestCost = Double.POSITIVE_INFINITY;\n\t\tLinkedList<Integer> bestTspList = null;\n\t\tdouble bestCycleTime = Double.POSITIVE_INFINITY;\n\n\t\tif (Projec...
[ "0.5803704", "0.5674495", "0.56615466", "0.56404454", "0.5595784", "0.5538583", "0.55328065", "0.5521278", "0.5519174", "0.5475558", "0.5448433", "0.5442656", "0.5394064", "0.53936714", "0.53917956", "0.5371264", "0.5364015", "0.5363394", "0.53520894", "0.53278446", "0.529147...
0.5524736
7
Use the last conflict heuristic as a pluggin to improve a former search heuristic STRAT Considers the K last conflicts
public static AbstractStrategy lastKConflicts(Solver SOLVER, int K, AbstractStrategy STRAT) { return new LastConflict(SOLVER, STRAT, K); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static AbstractStrategy lastConflict(Solver SOLVER, AbstractStrategy STRAT) {\n return lastKConflicts(SOLVER, 1, STRAT);\n }", "private static LinkedList<Integer> localSearch2Opt(File fileNameWithPath, int kNeighborHood ) throws Exception{\n\t\t\n\t\tString traceString = \"\";\n\t\tdouble bestCo...
[ "0.606467", "0.5997865", "0.5506397", "0.5497924", "0.5480012", "0.5439806", "0.5428522", "0.53820896", "0.5378801", "0.5334904", "0.5329491", "0.5325683", "0.5321939", "0.53028", "0.52919763", "0.52783275", "0.52646327", "0.525842", "0.5253377", "0.5236611", "0.52284735", ...
0.6220721
0
TODO: This isn't quite working correctly, fix it
public static void updateActions() { jEdit.removeActionSet(apiCommands); apiCommands.removeAllActions(); StringTokenizer tokenizer = new StringTokenizer( jEdit.getProperty("options.javadoc.path", ""), File.pathSeparator); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); try { apiCommands.addAction(ApiAction.create(token)); } catch (IllegalArgumentException e) { e.printStackTrace(); } } jEdit.addActionSet(apiCommands); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void strin() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void kk12() {\n\n\t}", "private stendhal() {\n\t}", "@Override\n ...
[ "0.5486575", "0.54781866", "0.54389036", "0.5331759", "0.531981", "0.52878004", "0.5265696", "0.52620476", "0.525224", "0.52393687", "0.51752925", "0.51589763", "0.5149204", "0.5070705", "0.5062188", "0.5036297", "0.50121593", "0.50061184", "0.49948013", "0.49720284", "0.4971...
0.0
-1
Searches the list for the given unqualified class name, displaying it in InfoViewer if found
public static void search(final View view, final String name) { view.getStatus().setMessage("Searching ... "); new Thread() { public void run() { String path = jEdit.getProperty("options.javadoc.path", ""); StringTokenizer tokenizer = new StringTokenizer(path, File.pathSeparator); ArrayList<String> pathList = new ArrayList<String>(); while (tokenizer.hasMoreTokens()) { String dir = tokenizer.nextToken(); Buffer packageList = jEdit.openTemporary(view, dir, "package-list", false); if (packageList == null || packageList.isNewFile()) { Log.log(Log.ERROR, JavadocPlugin.class, "Invalid API root: "+dir); continue; } for (int i = 0; i<packageList.getLineCount(); i++) { String pkg = packageList.getLineText(i).replace(".", File.separator); File pkgDir = new File(dir, pkg); File cls = new File(pkgDir, name+".html"); if (cls.exists()) { pathList.add(cls.getPath()); } } } if (pathList.size() == 0) { view.getStatus().setMessageAndClear("Class "+name+" not found"); return; } String chosenDoc = null; if (pathList.size() > 1) { chosenDoc = (String) JOptionPane.showInputDialog(view, jEdit.getProperty("msg.javadoc.resolve-class.message"), jEdit.getProperty("msg.javadoc.resolve-class.title"), JOptionPane.QUESTION_MESSAGE, null, pathList.toArray(), pathList.get(0)); } else { chosenDoc = pathList.get(0); } if (chosenDoc != null) { InfoViewerPlugin.openURL(view, new File(chosenDoc).toURI().toString()); } view.getStatus().setMessage(""); } }.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cmdInfoClass(String classname) throws NoSystemException {\n MSystem system = system();\n MClass cls = system.model().getClass(classname);\n if (cls == null)\n Log.error(\"Class `\" + classname + \"' not found.\");\n else {\n MMVisitor v = new MMPrintVi...
[ "0.6010866", "0.5922186", "0.5857921", "0.58287317", "0.5791355", "0.5784733", "0.56219566", "0.5581239", "0.5526898", "0.5473631", "0.5411254", "0.5373969", "0.53597623", "0.532379", "0.5291808", "0.5245768", "0.52152526", "0.5202312", "0.51913244", "0.51734084", "0.51707244...
0.56735605
6
Extracts the title of an api from its index.html file
public static String getApiName(String path) { Buffer buffer = jEdit.openTemporary(jEdit.getActiveView(), path, "index.html", false); if (buffer == null || buffer.isNewFile()) { return null; } int start = -1, end = -1; for (int i = 0; i<buffer.getLineCount(); i++) { String line = buffer.getLineText(i).toLowerCase(); int j = line.indexOf("<title>"); if (start == -1 && j != -1) { start = buffer.getLineStartOffset(i)+j+7; } j = line.indexOf("</title>"); if (start != -1 && end == -1 && j != -1) { end = buffer.getLineStartOffset(i)+j; } if (start != -1 && end != -1) { break; } } return buffer.getText(start, end-start).trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "Str...
[ "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.6394291", "0.63686657", "0.63686657", "0.63686657", "0.63686657", "0.63686657", "0.6116935"...
0.78092515
0
Adds an api root to the list only if it is not already added
public static void addApi(String api) { String path = jEdit.getProperty("options.javadoc.path", ""); if (path.indexOf(api) != -1) { return; } if (path.length() > 0) { path += File.pathSeparator; } path += api; jEdit.setProperty("options.javadoc.path", path); jEdit.propertiesChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void add(MockAPI mockAPI);", "public API addAPI(API api) throws APIManagementException {\n validateApiInfo(api);\n String tenantDomain = MultitenantUtils\n .getTenantDomain(APIUtil.replaceEmailDomainBack(api.getId().getProviderName()));\n validateResourceThrottlingTiers(api, t...
[ "0.57344973", "0.5680629", "0.5402149", "0.52780384", "0.5270391", "0.5215971", "0.5165126", "0.5085126", "0.50109136", "0.50022346", "0.49852368", "0.49655905", "0.49377394", "0.49288", "0.4921596", "0.49128735", "0.49042353", "0.4896888", "0.48832503", "0.488034", "0.485038...
0.5723216
1
Removes an api root from the list
public static void removeApi(String api) { String path = jEdit.getProperty("options.javadoc.path", ""); int index; if ((index = path.indexOf(api)) == -1) { return; } String sep = File.pathSeparator; path = path.substring(0, index)+path.substring(index+api.length()); path = path.replace(sep+sep, sep); jEdit.setProperty("options.javadoc.path", path); jEdit.propertiesChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteAPIFromDB(API api) throws APIManagementException {\n\n APIIdentifier apiIdentifier = api.getId();\n int tenantId = APIUtil.getTenantId(APIUtil.replaceEmailDomainBack(apiIdentifier.getProviderName()));\n String tenantDomain = APIUtil.getTenantDomainFromTenantId(tenantId);\n ...
[ "0.5842663", "0.56422967", "0.56210226", "0.55404323", "0.5386737", "0.53554773", "0.52969956", "0.5260641", "0.52572453", "0.5191444", "0.5191202", "0.5174363", "0.5161104", "0.5135001", "0.511257", "0.50964785", "0.50724643", "0.5071274", "0.5046286", "0.5046286", "0.502705...
0.6275631
0
Gets the first available itinerary pricing info.
protected ItineraryPricingInfoData getFirstAvailableItineraryPricingInfo(final PricedItineraryData pricedItinerary) { for (final ItineraryPricingInfoData itineraryPricingInfoData : pricedItinerary.getItineraryPricingInfos()) { if (itineraryPricingInfoData.isAvailable()) { final boolean isAvailable = itineraryPricingInfoData.getBundleTemplates().stream() .allMatch(TravelBundleTemplateData::isAvailable); if (isAvailable) { return itineraryPricingInfoData; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Pricing getPricingForId(int productId);", "public PricingModel getPricingModel()\r\n\t{\r\n\t\treturn pricingModel;\r\n\t}", "String getPrice();", "public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.2...
[ "0.6373123", "0.6075667", "0.603325", "0.59958726", "0.5817294", "0.58155", "0.580836", "0.5734114", "0.5734114", "0.5734114", "0.5666113", "0.56507486", "0.5650464", "0.5650084", "0.56328654", "0.5631699", "0.5629045", "0.55982494", "0.55848956", "0.5578759", "0.5568804", ...
0.69588566
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72461367", "0.7201596", "0.7195268", "0.7177002", "0.71069986", "0.7039653", "0.70384306", "0.70115715", "0.7010647", "0.69803435", "0.6945406", "0.69389313", "0.6933442", "0.69172275", "0.69172275", "0.6890826", "0.6883689", "0.687515", "0.6874831", "0.68615955", "0.68615...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79042757", "0.7805287", "0.7766401", "0.7727273", "0.7631789", "0.76227075", "0.75850916", "0.75309587", "0.74881005", "0.74574566", "0.74574566", "0.7438689", "0.74217546", "0.7403555", "0.73919356", "0.738709", "0.7379311", "0.73706394", "0.73631936", "0.7356187", "0.734...
0.0
-1
12/16 and 3/15, you should return "Winter 3/16 and 6/15, you should return "Spring 6/16 and 9/15, you should return"Summer 9/16 and 12/15, you should return "Fall gets month and day then returns season
public static void season(int month, int day) { if (month >= 12 && month <= 3 && day <= 16 && day <= 15) { System.out.println("Winter"); } if (month >= 3 && month <= 6 && day <= 16 && day <= 15) { System.out.println("Spring"); } if (month >= 6 && month <= 9 && day <= 16 && day <= 15) { System.out.println("Summer"); } if (month >= 9 && month <= 12 && day <= 16 && day <= 15) { System.out.println("Fall"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String season(int month, int day) {\r\n\r\n//\tInitialize return String as empty\r\n\t\t\r\n\t String sea=\"\";\r\n\t \r\n//\tIf/Else-if statement to analyze date and month ints. Due to the requirements\r\n//\tof the day being mid-month for the cut off between seasons, each IF has\r\n//\t3 cond...
[ "0.7655565", "0.7211569", "0.67672503", "0.61081666", "0.60641205", "0.5794692", "0.56441164", "0.56143063", "0.5607019", "0.5561227", "0.5548002", "0.5543026", "0.551675", "0.5510733", "0.54876554", "0.5473736", "0.54500234", "0.54475754", "0.5444624", "0.5420178", "0.541274...
0.69412535
2
Instantiates a new customer. A customerId is assigned from the CustomerIdServer.
public Customer(String name, String address, String phoneNumber) { super(name, address, phoneNumber); super.setId(CUSTOMER_STRING + (IdServer.instance().getId())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CustomerNew (\n\t\t Long in_id\n ) {\n\t\tthis.setId(in_id);\n }", "private Customer createCustomerInstanceWithId(String name, String email, String phoneNumber) {\n Customer customer = new Customer();\n customer.setId(1000L);\n customer.setName(name);\n customer.setEm...
[ "0.7072647", "0.693424", "0.6931106", "0.6931106", "0.6931106", "0.6931106", "0.68226296", "0.6792855", "0.6729079", "0.6705097", "0.6674054", "0.6645948", "0.6584689", "0.6584017", "0.6517943", "0.6502102", "0.64876914", "0.64636135", "0.6462136", "0.6457149", "0.64166766", ...
0.6677523
10
Gets the customer id.
public String getCustomerId() { return getId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public final String getCustomerId() {\n\t\treturn customerId;\n\t}", "public long getCustomerId() {\n\t\treturn customerId;\n\t}", "public String getCustomerId()\n\t{\n\t\treturn customerId;\n\t}", "public Number getCustomerId() {\...
[ "0.8864921", "0.8864921", "0.8738213", "0.85787255", "0.85650635", "0.8548407", "0.8469353", "0.8456901", "0.8456901", "0.8401053", "0.8401053", "0.83955944", "0.8352961", "0.83431536", "0.8332763", "0.83272725", "0.8281025", "0.8275612", "0.8259888", "0.81980133", "0.8198013...
0.8689196
3
Adds the credit card.
public void addCreditCard(CreditCard creditCard) { creditCards.add(creditCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String addNewCreditCard(CreditCard creditCard) {\n\t\t\n\t\tCreditCard newCreditCard = new CreditCard();\n\t\tnewCreditCard.setCardNumber(creditCard.getCardNumber());\n\t\tnewCreditCard.setAccountHolderName(creditCard.getAccountHolderName());\n\t\tnewCreditCard.setCreditLimit(creditCard.getCred...
[ "0.7154", "0.70711917", "0.70017266", "0.6910564", "0.69089293", "0.6773439", "0.6721009", "0.6718366", "0.666996", "0.6629028", "0.6617708", "0.6609613", "0.66049755", "0.65911674", "0.6583996", "0.6566925", "0.6559688", "0.65542024", "0.65379286", "0.64850575", "0.6472452",...
0.795205
0
Removes the credit card. If a customer only has one credit card, it will not be removed.
public void removeCreditCard(String cardNumber) { if (searchCard(cardNumber) == null) { System.out.println("The card number entered does not exist for the customer " + getCustomerId()); } else { if (creditCards.size() == 1) { System.out.println("This is the only card associated with this account and cannot be removed. "); } else { CreditCard creditCard = searchCard(cardNumber); creditCards.remove(creditCard); System.out.println("The credit card: " + creditCard.cardNumberFormatter(creditCard.getCardNumber()) + " has been removed from customer " + getCustomerId()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int deleteCard() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn CreditCardDA.deleteCard(id);\r\n\t}", "public void removePresentCard() {\n storageCards.remove();\n }", "public void removeCustomer(){\n String message = \"Choose one of the Customer to remove it\";\n if (...
[ "0.67274755", "0.663868", "0.65881544", "0.64882296", "0.64221036", "0.6397054", "0.6381519", "0.62916875", "0.6266102", "0.6245316", "0.6225305", "0.62199277", "0.61707205", "0.61673504", "0.61524457", "0.6138137", "0.6129098", "0.60931516", "0.6062215", "0.6048515", "0.6038...
0.72662735
0
Search for a credit card.
public CreditCard searchCard(String cardNumber) { for (Iterator<CreditCard> iterator = creditCards.iterator(); iterator.hasNext();) { CreditCard creditCard = iterator.next(); if ((creditCard.getCardNumber()).equals(cardNumber)) { return creditCard; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CreditCard search(int donorID, String ccNumber) {\n for (Object creditCardObject : creditCardNumbers) {\n CreditCard creditCard = (CreditCard) creditCardObject;\n if (creditCard.getCreditCardId().equals(ccNumber) && creditCard.getDonorId()==donorID) {\n return cre...
[ "0.712283", "0.71188897", "0.66834134", "0.6614198", "0.6584979", "0.62899476", "0.61743367", "0.59824836", "0.59551024", "0.5879975", "0.57998645", "0.57896864", "0.5758934", "0.57419115", "0.5721543", "0.57016855", "0.56614935", "0.5657727", "0.56471145", "0.5620198", "0.56...
0.6726925
2
Displays information about the customer.
public String toString() { return super.display() + "\n" + listAllCards() + "Purchased tickets: \n" + listAllTickets() + "___________________________________________"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }", "@Override\n public void showCust...
[ "0.78255105", "0.78009003", "0.7797142", "0.77256966", "0.7671319", "0.7167723", "0.7140272", "0.7115539", "0.68262047", "0.6809014", "0.6775935", "0.6773554", "0.675795", "0.6753867", "0.6723381", "0.6708607", "0.6700111", "0.66716814", "0.6658632", "0.66559845", "0.6639602"...
0.0
-1
TODO Autogenerated method stub
public List<NameValuePair> userCreationObject(String phone_number,String company_name,String latitude,String longitude,String locationVal,String fullAddress,String active_status,String download_status,String user_name) { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); try { nameValuePairs.add(new BasicNameValuePair("phone_number",phone_number)); nameValuePairs.add(new BasicNameValuePair("Name",user_name)); nameValuePairs.add(new BasicNameValuePair("company_name",company_name)); nameValuePairs.add(new BasicNameValuePair("latitude",latitude)); nameValuePairs.add(new BasicNameValuePair("longitude",longitude)); nameValuePairs.add(new BasicNameValuePair("location",locationVal)); nameValuePairs.add(new BasicNameValuePair("fullAddress",fullAddress)); nameValuePairs.add(new BasicNameValuePair("is_active",active_status)); nameValuePairs.add(new BasicNameValuePair("app_download_status",download_status)); } catch (Exception e) { //TODO e.printStackTrace(); } return nameValuePairs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public List<NameValuePair> addDriverPhone(String driver_phone_number,String owner_phone_number) { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); try { nameValuePairs.add(new BasicNameValuePair("driver_phone_number",driver_phone_number)); nameValuePairs.add(new BasicNameValuePair("vehicle_owner_phone_number",owner_phone_number)); } catch (Exception e) { //TODO e.printStackTrace(); } return nameValuePairs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public List<NameValuePair> SaveTripId(String trip_id ,String owner_phone_number) { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); try { nameValuePairs.add(new BasicNameValuePair("vehicleTripId",trip_id)); nameValuePairs.add(new BasicNameValuePair("phone_number",owner_phone_number)); } catch (Exception e) { //TODO e.printStackTrace(); } return nameValuePairs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public List<NameValuePair> getDriverPhone(String owner_phone_number) { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); try { nameValuePairs.add(new BasicNameValuePair("vehicle_owner_phone_number",owner_phone_number)); } catch (Exception e) { //TODO e.printStackTrace(); } return nameValuePairs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1