query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Tests retrieval of public SourceSummary. Type: invalid credentials. | @Test(expected = NotAuthorizedException.class)
public void testPublicSourceBadAuth() throws WattDepotClientException {
// Shouldn't authenticate with invalid username or password
WattDepotClient client = new WattDepotClient(getHostName(), adminEmail, "foo");
client.getSourceSummary(defaultPublicSource);
... | [
"@Test\n public void testPublicSourceWithNonOwnerCredentials() throws WattDepotClientException {\n WattDepotClient client =\n new WattDepotClient(getHostName(), defaultNonOwnerUsername,\n defaultNonOwnerPassword);\n assertEquals(PUBLIC_SUMMARY_NOT_FOUND, client.getSourceSummary(defaultPubli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of ProcessingLogsSortOrder | public final void setProcessingLogsSortOrder(com.mendix.systemwideinterfaces.core.IContext context, interfaceconfiguration.proxies.SortOrder processinglogssortorder)
{
if (processinglogssortorder != null)
getMendixObject().setValue(context, MemberNames.ProcessingLogsSortOrder.toString(), processinglogssortorde... | [
"public final void setProcessingLogsSortOrder(interfaceconfiguration.proxies.SortOrder processinglogssortorder)\r\n\t{\r\n\t\tsetProcessingLogsSortOrder(getContext(), processinglogssortorder);\r\n\t}",
"public final interfaceconfiguration.proxies.SortOrder getProcessingLogsSortOrder()\r\n\t{\r\n\t\treturn getProc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Funcio que retorna el valor maxim de les dades del dia, mes o setmana. | private int maxValue(int[] dia) {
int[] aux = dia.clone();
Arrays.sort(aux);
return aux[aux.length - 1];
} | [
"Integer getCardinalidadeMaxima();",
"public int getDuracionMax() {\n return duracionMax;\n }",
"float getMax();",
"Number getMax();",
"public double getMaxValue() {\n\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return songs owned by this user | public List<Song> owned() {
return owned;
} | [
"@Override\n public User[] getUsersWhoListenedAllSongs(String artistName){\n String query = \"select u.userID from user u where not exists\"+ \n \" (select * from song s where not exists \"+\n \" (select l.songID from listen l where l.songID=s.songID and l.userID=u.userI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
path is a real windows path, but eclipse only uses / in it's .classpath files | private String getEclipsePathFromWindowsPath(String path) {
StringBuilder sbPath = new StringBuilder();
char [] chars = path.toCharArray();
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if (c == '\\') {
sbPath.append('/');
} else {
sbPath.append(c);
}
... | [
"private void addClasspath(String path)\n {\n if (classpath == null)\n {\n classpath = path;\n }\n else\n {\n classpath += File.pathSeparator + path;\n }\n }",
"Path getClasspath();",
"public String getProjectPath() {\n String path = n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the updateMZRZResult value for this UpdateMZRZResponse. | public org.tempuri.ReturnExComm getUpdateMZRZResult() {
return updateMZRZResult;
} | [
"public void setUpdateMZRZResult(org.tempuri.ReturnExComm updateMZRZResult) {\r\n this.updateMZRZResult = updateMZRZResult;\r\n }",
"public java.lang.String getGf_updateYktSjJsztResult() {\r\n return gf_updateYktSjJsztResult;\r\n }",
"public Boolean getMvrResult() {\n\t\treturn mvrResult;\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Change the status of the trip | public void postStatus(int status, String username, String password, String tripid) {
RequestParams params = new RequestParams();
params.add("tripstatus", String.valueOf(status));
params.add("tripid", tripid);
params.add("username", username);
params.add("password", password);
... | [
"void notifyTripStatusChanged(Trip trip);",
"public void setTripStrated(boolean value) {\n\t\tLog.i(TAG, \"*************************************\");\n\t\tLog.i(TAG, \"Setting trip status to \" + value);\n\t\tLog.i(TAG, \"*************************************\");\n\n\t\tsharedPreferences = context.getSharedPrefere... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the profile size of this timer. | public int profileSize() {
return size();
} | [
"public double getProfileLength()\n {\n\n return this.profileLength;\n }",
"public float getProfileLength(){\n\t\treturn profileLength;\n\t}",
"public static long getDuration() {\n StopwatchState state = getState().top();\n return state.duration;\n }",
"public String arrangementS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
builder factory method for ProductTypeChangeLocalizedEnumValueLabelAction | public static ProductTypeChangeLocalizedEnumValueLabelActionBuilder builder() {
return ProductTypeChangeLocalizedEnumValueLabelActionBuilder.of();
} | [
"public static ProductTypeChangeLocalizedEnumValueLabelActionBuilder builder(\n final ProductTypeChangeLocalizedEnumValueLabelAction template) {\n return ProductTypeChangeLocalizedEnumValueLabelActionBuilder.of(template);\n }",
"public static ProductTypeChangeLabelActionBuilder of() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the parent address, if this group belongs to a parent group | public void setParentAddress(final byte[] parentAddress) {
this.parentAddress = parentAddress;
} | [
"public void setParentGroupAssignment(FxGroupAssignment parent) {\n this.parentGroupAssignment = parent;\n }",
"public static void updateParentAddress(final FusionDictionaryBufferInterface buffer,\n final int groupOriginAddress, final int newParentAddress,\n final FormatOptions f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the configured UrlPathHelper or a default, shared instance otherwise. | protected UrlPathHelper getUrlPathHelperOrDefault() {
if (this.urlPathHelper != null) {
return this.urlPathHelper;
}
if (this.defaultUrlPathHelper == null) {
this.defaultUrlPathHelper = new UrlPathHelper();
}
return this.defaultUrlPathHelper;
} | [
"public UrlPathHelper getUrlPathHelper() {\n\t\treturn this.urlPathHelper;\n\t}",
"protected PathMatcher getPathMatcherOrDefault() {\n\t\tif (this.pathMatcher != null) {\n\t\t\treturn this.pathMatcher;\n\t\t}\n\t\tif (this.defaultPathMatcher == null) {\n\t\t\tthis.defaultPathMatcher = new AntPathMatcher();\n\t\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a presenterImport value. | public void delPresenterImport(String value){
((ViewDMO) core).delPresenterImport(value);
} | [
"public void delPresenterImport(Object value) throws DmcValueException {\n ((ViewDMO) core).delPresenterImport(value);\n }",
"void deleteImportName(ImportNameEntity importName);",
"public void delViewImport(String value){\n ((ViewDMO) core).delViewImport(value);\n }",
"void deleteImporter(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "parse_org_emftext_refactoring_tests_properties_StringValue" $ANTLR start "parse_org_emftext_refactoring_tests_properties_Value" Testproperties.g:851:1: parse_org_emftext_refactoring_tests_properties_Value returns [org.emftext.refactoring.tests.properties.Value element = null] : (c0= parse_org_emftext_refact... | public final org.emftext.refactoring.tests.properties.Value parse_org_emftext_refactoring_tests_properties_Value() throws RecognitionException {
org.emftext.refactoring.tests.properties.Value element = null;
int parse_org_emftext_refactoring_tests_properties_Value_StartIndex = input.index();
... | [
"public final org.emftext.refactoring.tests.properties.StringValue parse_org_emftext_refactoring_tests_properties_StringValue() throws RecognitionException {\r\n org.emftext.refactoring.tests.properties.StringValue element = null;\r\n\r\n int parse_org_emftext_refactoring_tests_properties_StringValue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get end vertex in name | public String getBeginVertexName(){
return beginStation;
} | [
"public String getEndVertexName(){ \r\n\t return endStation; \r\n\t }",
"public Vertex getEndVertex() { return endVertex; }",
"public int getEndVertexId(){ \r\n\t return endVertex; \r\n\t }",
"public Vertex getEnd() {\n return end;\n }",
"public int getEndVertex() {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create binding state with global variable names (at the very beginning of the CFA) | public BindState(Set<AccessPath> globalVariableNames) {
this.stateOnLastFunctionCall = null;
this.globalDefs =
addVariables(PathCopyingPersistentTree.<String, BindingPoint>of(), globalVariableNames);
this.localDefs = new PathCopyingPersistentTree<>();
} | [
"Map<Variable, Object> getBindingMap();",
"void bindGlobal(Symbol symbol, SExpression value);",
"Binding newDummyBinding(Variable var);",
"StateVariableDeclaration createStateVariableDeclaration();",
"private void setBinding( VarBindingDef binding)\n {\n binding_ = binding;\n }",
"Binding newBind... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a clone of this H261Format. | public Object clone() {
H261Format f = new H261Format();
f.copy(this);
return f;
} | [
"public H261Format() {\n \tsuper(ENCODING);\n }",
"public H261Encoder() throws QuickArrayException {\r\n super(\"h261/rtp\", new YUVFormat(new Dimension(352, 288), -1,\r\n Format.byteArray, -1, YUVFormat.YUV_420, -1, -1, -1, -1, -1));\r\n }",
"public com.maxpoint.cascading.avro.TestE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a Presentation Node that has Collectibles as direct descendants, this will return item details about those descendants in the context of the requesting character. | @Test
public void destiny2GetCollectibleNodeDetailsTest() {
Long characterId = null;
Long collectiblePresentationNodeHash = null;
Long destinyMembershipId = null;
Integer membershipType = null;
List<DestinyDestinyComponentType> components = null;
InlineResponse20043 r... | [
"public String getSubcollectionInfo () throws SDLIPException {\r\n XMLObject subcolInfo = new sdlip.xml.dom.XMLObject();\r\n tm.getSubcollectionInfo(subcolInfo);\r\n// return postProcess (subcolInfo, \"subcolInfo\", false);\r\n return subcolInfo.getString();\r\n }",
"public String[] findDescendants()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lister les photos du projet | public List<Photo> getPhoto() {
PhotoBDD pbdd = new PhotoBDD(ProjectOpenActivity.this); //Instanciation de PhotoBdd pour manipuler les photos de la base de données
pbdd.open(); //Ouverture de la base de données
List<Photo> lp = pbdd.getPhotos(project_id);
pbdd.close(); // Fermeture de la... | [
"List<Photo> homePagePhotos();",
"public void listPictures()\r\n {\r\n int index = 0;\r\n while(index >=0 && index < pictures.size()) \r\n {\r\n String filename = pictures.get(index);\r\n System.out.println(index + \": \"+ filename);\r\n index++;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column ddj_ckb.ckshdz | public String getCkshdz() {
return ckshdz;
} | [
"public String getCkqhdz() {\r\n\t\treturn ckqhdz;\r\n\t}",
"public void setCkshdz(String ckshdz) {\r\n\t\tthis.ckshdz = ckshdz;\r\n\t}",
"public String getcZzzjlsh() {\n return cZzzjlsh;\n }",
"public String getZcbh() {\n return zcbh;\n }",
"public String getcZjyysm() {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor for country view | public countryView(String countryName)
{
this.countryName = countryName;
} | [
"public Country(){}",
"public LCountry() {\n this(DSL.name(\"L_COUNTRY\"), null);\n }",
"public Country (String instanceName)\n {\n name = instanceName;\n }",
"public CountryFilter(SimpleData country) {\r\n super();\r\n\r\n this.country = country;\r\n }",
"public Abst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of aRo. | private void setARo(final String a) {
this.aRo = a;
} | [
"void setROIs(Object rois);",
"public void setRa(String ra) {\n String oldRa = this.ra;\n this.ra = ra;\n firePropertyChange(PROP_RA, oldRa, ra);\n }",
"public void setRua(String rua) {// Altera o nome da rua.\r\n\t\tthis.rua = rua;\r\n\t}",
"public abstract void setRoi(Roi realroi);",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a repository instance configured using given RepositoryConfiguration. This method will assign credentials as they are set in the given RepositoryConfiguration. | public SVNRepository getRepository(final RepositoryConfiguration configuration) throws SVNException {
return RepositoryFactory.INSTANCE.getRepository(configuration, ASSIGN_CREDENTIALS);
} | [
"RepositoryConfiguration getRepositoryConfiguration();",
"public static ObjectRepository getRepository() {\n\t\tif (_instance == null) {\n\t\t\tsynchronized (ObjectRepository.class) {\n\t\t\t\tif (_instance == null) {\n\t\t\t\t\t_instance = new ObjectRepository();\n\t\t\t\t\tif (config == null) {\n\t\t\t\t\t\ttry... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
You do not have to change any code below here. The code below here is related to Persistent Storage (Shared Preferences) and Menus. We have looked at persistent storage in the Build a Persistent Storage App in Android Studio project on Coursera. If you would like to know more about this you can go to that course. We ha... | public void loadPreferences() {
// Get the stored preferences
int mode = Activity.MODE_PRIVATE;
android.content.SharedPreferences mySharedPreferences = getSharedPreferences(MYPREFS, mode);
//When you see words in grey like key: and defValue: below they are tags put in by android
... | [
"protected void savePreferences() {\n // Create or retrieve the shared preference object.\n int mode = Activity.MODE_PRIVATE;\n android.content.SharedPreferences mySharedPreferences = getSharedPreferences(MYPREFS, mode);\n // Retrieve an editor to modify the shared preferences.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invoked when a tree has been loaded. | public void treeLoaded(); | [
"void initializeTree () {\n }",
"private void loadTree(){ \n PBarHelper.show();\n DataProvider.getTreeHierarchy(mScreenId, new DataProvider.AsyncCallback<ViewNodeJSO>() {\n @Override\n public void onError(Request r, Throwable t) {\n PBarHelper.hide();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generalGame.GameEnvironment accessor to game environment. | public GameEnvironment getEnvironment() {
return environment;
} | [
"public GameEnvironment getEnvironment() {\r\n return this.environment;\r\n }",
"public GameEnvironment getGameEnvironment() {\r\n return this.gameE;\r\n }",
"public Environment getEnvironment();",
"Environment getEnviroment();",
"public Environment environment()\n {\n return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .google.protobuf.Duration lockable_durations = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:&92;"lockable_durations&92;"", (.gogoproto.stdduration) = true]; | public java.util.List<com.google.protobuf.Duration> getLockableDurationsList() {
if (lockableDurationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(lockableDurations_);
} else {
return lockableDurationsBuilder_.getMessageList();
}
} | [
"java.util.List<? extends com.google.protobuf.DurationOrBuilder> \n getLockableDurationsOrBuilderList();",
"public java.util.List<? extends com.google.protobuf.DurationOrBuilder> \n getLockableDurationsOrBuilderList() {\n if (lockableDurationsBuilder_ != null) {\n return lockableD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GIVEN A user edits a certified product WHEN they view their pending products THEN they should see errors if any privacy and security framework values do not match one of "Approach 1", "Approach 2", "Approach 1;Approach 2" (Note: Validation should be generous with case and whitespace) | @Transactional
@Rollback(true)
@Test
public void test_updateCertifiedProductSearchDetails_privacyAndSecurityFramework_badValueShowsError() throws EntityRetrievalException, EntityCreationException, IOException, ValidationException {
SecurityContextHolder.getContext().setAuthentication(adminUser);
CertifiedProduct... | [
"private void validateUpdateProduct(Product product, Representative representative) {\n if (product == null) {\n throw new ProductException(\"Failed to update product. Product does not exist.\");\n } else if (!representative.getCompany().getId().equals(product.getCompany().getId())) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new Range by composing a Range that is reletive to this Range. | public Range compose(Range r) throws InvalidRangeException {
if ((length() == 0) || (r.length() == 0)) {
return EMPTY;
}
if (this == VLEN || r == VLEN) {
return VLEN;
}
/*
* if(false) {// Original version
* // Note that this version assumes that range r is
* // correct wit... | [
"abstract public Range createRange();",
"Range createRange();",
"RangeExpression createRangeExpression();",
"public static Mutator realRange() {\n return new MutatorRealRange();\n }",
"RangeOperation createRangeOperation();",
"CollectionRange createCollectionRange();",
"protected abstract R to... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This doesn't use ClassisAssignableFrom to avoid us needing to load AndroidX's Fragment class, which may not be on the classpath. | private boolean isFragmentSubclass(String internalType) {
try {
String binaryName = Type.getObjectType(internalType).getClassName();
Class<?> clazz = mClassLoader.loadClass(binaryName);
while (clazz != null) {
... | [
"@Override\n protected boolean isValidFragment(String fragmentName) {\n return SafeFragment1.class.getName().equals(fragmentName)\n || SafeFragment2.class.getName().equals(fragmentName)\n || SafeFragment3.class.getName().equals(fragmentName);\n }",
"private static Object... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add a newline and space for indent if required, and a simple whitespace otherwise. | private void newline() {
if (enableSplitting) {
if (out.length() != 0) {
out.append(System.lineSeparator());
}
out.append(" ".repeat(depth)); // two spaces indent is sufficient
} else {
out.append(" "); // just a separator between two tokens
}
} | [
"private void appendNewLine() {\n append(\"\\n\");\n for (int i = 0; i < indent; ++i) {\n append(\" \");\n }\n }",
"private void addIndent() {\r\n if (indentSpace.length() > 0) {\r\n for (int i = 0; i < indent; i++) {\r\n xml.append(indentSpace);\r\n }\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/SharedPreferences settings = context.getSharedPreferences(PREFS_NAME, 0); SharedPreferences.Editor prefEditor = settings.edit(); prefEditor.putLong(key, value); prefEditor.commit(); | public static void setValueLong(Context context, String key, long value){
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = settings.edit();
editor.putLong(key, value);
editor.commit();
} | [
"public void writeEncounterNumPreferences(long encounterNum){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putLong(mContext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column public.Quest14.col4radio | public String getCol4radio() {
return col4radio;
} | [
"public String getCol8radio() {\n return col8radio;\n }",
"public String getCol5radio() {\n return col5radio;\n }",
"public String getCol7radio() {\n return col7radio;\n }",
"public String getCol6radio() {\n return col6radio;\n }",
"public String getCol3radio() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
only use 1 variable instead of 2d array if column 0 should be set to 0 or not, yes if true, false otherwise | public void setZeroes1(int[][] matrix) {
boolean col00 = false;
int row, col;
int rows = matrix.length;
int cols = matrix[0].length;
for (row = 0; row < rows; ++row) {
for (col = 0; col < cols; ++col) {
if (matrix[row][col] == 0) {
... | [
"public boolean checkColumn(int x){\n boolean [] items = new boolean []{false, false, false, false,false, //array of booleans to check for duplicates \n false, false, false, false, false};\n \n for(int i = 0; i < 9; i++){ //iterates through 9 positions in the array (each colu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a mapping instance by discovering entities in the multiple XBRL documents, and the mapping will be serialized to the mapping file. | public Mapping createInstance(List<Document> xbrlDocuments, String fileName)
throws TransformerConfigurationException, FileNotFoundException {
Mapping mapping = buildXmlBasedMapping();
MappingDiscoverer discoverer = buildBasicDiscoverer(xbrlDocuments, mapping);
Transformer transform... | [
"public Mapping createInstance(List<Document> xbrlDocuments) {\n Mapping mapping = buildXmlBasedMapping();\n MappingDiscoverer discoverer = buildBasicDiscoverer(xbrlDocuments, mapping);\n discoverer.discoverMapping();\n return mapping;\n }",
"public Mapping createInstance(Document x... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implement the featurePressed callback so that we can update the density chart when a state is selected. | @Override
public void featurePressed(Feature f, Coord coord) {
super.featurePressed(f, coord);
selectedFeature = f;
densityChart.setRegion((String)f.getProperties().get("name"));
} | [
"public void featureChanged(Feature f) {\n\t\tredraw();\n\t}",
"@SuppressWarnings(\"unchecked\")\n public void mousePressed(MouseEvent e)\n {\n if (checkModifiers(e))\n {\n final VisualizationViewer<V, E> graphVisualizer = (VisualizationViewer<V, E>) e\n .getSourc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extract the token from authentication response. | public String getToken(JSONObject jsonResponse){
if ( jsonResponse != null ) {
if(jsonResponse.has("authentication")){
if(jsonResponse.getJSONObject("authentication").has("token")){
return jsonResponse.getJSONObject("authentication").getString("token");
}
}
}
return null;... | [
"private String getAuthTokenFromResponse(String result) {\n Map<String,Object> content = null;\n try {\n content = this.jsonMapper.readValue(result, Map.class);\n return (String) content.get(\"token\");\n } catch (JsonProcessingException e) {\n e.printStackTrace... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cleans the session data and operation data (if enabled) from the DB | public void removeExpiredSessionData() {
if (StringUtils.isBlank(sqlDeleteExpiredDataTask)) {
try {
sqlDeleteExpiredDataTask = getDBSpecificSessionDataRemovalQuery();
} catch (IdentityApplicationManagementException e) {
log.error("Error when initializing ... | [
"public void unsetLoginData() {\n Map<String, String> params = new HashMap<>();\n params.put(LOGIN_USER_ID, \"\");\n params.put(LOGIN_USER_NAME, \"\");\n params.put(LOGIN_USER_EMAIL, \"\");\n this.saveSession(params);\n }",
"void flushAndClearSession();",
"private void clea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The EC2 and RDS instance IDs. | public java.util.List<String> getInstanceIds() {
return instanceIds;
} | [
"String getAwsEc2instanceInstanceID();",
"public java.util.List<String> getReservedInstancesIds() {\n if (reservedInstancesIds == null) {\n reservedInstancesIds = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();\n reservedInstancesIds.setAutoConstruct(true);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
hard delete by business year and business cycle definition id | @Modifying
@Query("DELETE FROM BusinessCycle c where c.businessCycleDefinition.id = :id and c.businessYear=:businessYear")
void hardDeleteByCycleDefinitionIdAndBusinessYear(@Param("id") int id, @Param("businessYear") String businessYear); | [
"@Modifying\n\t@Query(\"UPDATE BusinessCycle c set c.isActive=false where c.businessCycleDefinition.id = :id and c.businessYear=:businessYear\")\n\tvoid softdeleteByCycleDefinitionIdAndBusinessYear(@Param(\"id\") int id, @Param(\"businessYear\") String businessYear);",
"public abstract boolean deleteBusiness(int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use outputstream to initialize response | public Response(OutputStream outputstream) {
this.outputstream = outputstream;
} | [
"OutputStream getResponseOutputStream();",
"private HTTPResponseWriter setOutput(ByteArrayOutputStream out) {\n return new HTTPResponseWriter(new PrintWriter(out));\n }",
"void getResponse(OutputStream outputStream) throws IOException;",
"public MyHTTPOutputStream(OutputStream os) {\n\t\tsuper(os);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test validation of Research EditText | @Test
public void researchEditTextInputTest() {
onView(withId(R.id.network_input_research))
.perform(typeText(INPUT_TEXT))
.check(matches(withText(INPUT_TEXT)));
} | [
"@Test\n public void shouldNameEditTextShowNoErrorWhenValidData() {\n onView(withId(R.id.txtName)).perform(click(), closeSoftKeyboard(), replaceText(\"test\"));\n onView(withId(R.id.txtName)).check(matches(hasErrorText(isEmptyOrNullString())));\n }",
"private void validadeFields() {\n\t\tboole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for the broadcast frequency | public void setBroadcastFrequency( Long broadcastFrequency )
{
this.broadcastFrequency = broadcastFrequency;
} | [
"public Long getBroadcastFrequency()\r\n {\r\n return broadcastFrequency;\r\n }",
"void setFrequency(long frequency);",
"public void setFreq(int freq){\n _frequency = freq;\n }",
"public void setFrequency(int freq) {\n mFrequency = freq;\n }",
"public void setFrequency(int value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Factor__Group_1__0__Impl" $ANTLR start "rule__Factor__Group_1__1" ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/srcgen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:3035:1: rule__Factor__Group_1__1 : rule__Factor__Group_1__1__Impl ; | public final void rule__Factor__Group_1__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/Internal... | [
"public final void rule__Factor__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/an... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns if the task can be planned. | boolean canBePlanned(); | [
"public boolean canRun() {\n\t\treturn taskState == TaskState.SCHEDULED;\n\t}",
"private boolean areTaskForcesPresent() {\n return baseGrid\n .getPort()\n .map(Port::areTaskForcesPresent)\n .orElse(false);\n }",
"public boolean isRunnable(){\n boolea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to save donor who donate for food | public void saveNewDonor(DonorRegForm myForm) throws ParseException {
// Date d = new Date();
DonorShelter inDonorShelter = new DonorShelter();
Donor inDonor = new Donor();
inDonor.setId(null);
inDonor.setDonorName(myForm.getFrmRegDonorName());
inDonor.setAmount(Integer.parseInt(myForm.getFrmRegAmount... | [
"private void saveUnsyncedDonor() {\n LocalDonor ldonor = LocalDonor.convert(donor,realm);\n realm.beginTransaction();\n realm.copyToRealmOrUpdate(ldonor);\n realm.commitTransaction();\n Toast.makeText(this, \"Donor record save.\", Toast.LENGTH_LONG).show();\n finish();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds animals to the cute Animals list | private void buildCuteAnimals()
{
cuteAnimalMemes.add("pupper");
cuteAnimalMemes.add("otter");
cuteAnimalMemes.add("kittie");
cuteAnimalMemes.add("FLOOFER");
} | [
"public static void addElementToAnimalCollection(List<? super Animal> animals) {\n animals.add(new Dog());\n animals.add(new Cat());\n animals.add(new Animal());\n }",
"private void breedAnimals() {\n Map<Vector2d, IAnimalCollection> mapAnimals = engineMap.getAnimals();\n Lin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CDAccount constructor Input: name of account holder, and PIN, and initial balance | public CDAccount( String name, String pin, double initial)
{
super(name, pin);
deposit(initial);
setRate(INTEREST_RATE);
} | [
"public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }",
"public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this.customerName = customerName;\n this.balance = balance;\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a binding representing the current call's state but with the specified visibility, scope, and self. For sharedscope binding consumers like for loops. | public Binding currentBinding(IRubyObject self, Visibility visibility, DynamicScope scope) {
Frame frame = getCurrentFrame();
return new Binding(self, frame, visibility, getRubyClass(), scope, backtrace[backtraceIndex].clone());
} | [
"public Binding currentBinding(IRubyObject self, Visibility visibility) {\n Frame frame = getCurrentFrame();\n return new Binding(self, frame, visibility, getRubyClass(), getCurrentScope(), backtrace[backtraceIndex].clone());\n }",
"public Binding currentBinding(IRubyObject self, DynamicScope ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Destory a gameobject in the scene | public final void Destroy(GameObject obj){
_objects.remove(obj);
obj.Destroy();
} | [
"public void destroy()\n {\n GeneticRobots.rmCollider(this.collider);\n GeneticRobots.rmObject(this);\n }",
"public void removeGameObjectToScene(GameObject gameObject)\n\t{\n\t\t_node.detachChildNamed(gameObject.getGeometry().getName());\n\t}",
"public void removeGameObj(GameObject obj){\n displa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'CAN_EDIT_IND' field. | public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder clearCANEDITIND() {
CAN_EDIT_IND = null;
fieldSetFlags()[16] = false;
return this;
} | [
"public void setCANEDITIND(java.lang.Long value) {\n this.CAN_EDIT_IND = value;\n }",
"public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setCANEDITIND(java.lang.Long value) {\n validate(fields()[16], value);\n this.CAN_EDIT_IND = value;\n fieldSetFlags... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Backup all tables to CSV files, one per table | public boolean backupAllTablesToCsv(Context ctx, SQLiteDatabase db, String suffix) {
boolean allSucceeded = true;
for (TableHelper table : getTableHelpers()) {
allSucceeded &= table.backup(db, ctx, suffix);
}
return allSucceeded;
} | [
"private void backup() throws IOException {\n long startTime = System.currentTimeMillis();\n\n this.backupTempDirPath = Files.createTempDirectory(BACKUP_TEMP_DIR_PREFIX).toString();\n Map<UUID, String> streamIdToTableNameMap = getStreamIdToTableNameMap();\n for (UUID streamId : streamsTo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the identifier of the "Ente". | public void setIdEnte(int idEnte) {
this.id = idEnte;
} | [
"public abstract void setEspe_id(java.lang.Integer newEspe_id);",
"public void setIdentificadorOde(java.lang.String identificadorOde);",
"public void setIdentificador(java.lang.String identificador);",
"void setIdAgente(int idAgente);",
"public void seteId(Integer eId) {\n this.eId = eId;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column atomdetails.atom_type | public void setAtom_type(String atom_type) {
this.atom_type = atom_type;
} | [
"public String getAtom_type() {\n return atom_type;\n }",
"@Override\n\tpublic void setType(int type) {\n\t\t_expandoColumn.setType(type);\n\t}",
"@Override\n\tpublic void setTypeSettings(java.lang.String typeSettings) {\n\t\t_expandoColumn.setTypeSettings(typeSettings);\n\t}",
"public void setMetaT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getExpiredMessageDirectory method, of class ConnectionManager. | @Test
public void testGetExpiredMessageDirectory() {
System.out.println("getExpiredMessageDirectory");
String expResult = TEST_EXPIRED_DIRECTORY;
String result = instance.getExpiredMessageDirectory();
assertEquals(expResult, result);
} | [
"@Test\n public void testGetMessageDirectory() {\n System.out.println(\"getMessageDirectory\");\n String expResult = TEST_MESSAGE_DIRECTORY;\n String result = instance.getMessageDirectory();\n assertEquals(expResult, result);\n }",
"protected abstract void initDirectory() throws ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configure Converter to be used. In our example, we need a converter to convert string values[Roles] to UserProfiles in newUser.jsp | @Override
public void addFormatters(FormatterRegistry registry) {
registry.addConverter(roleToUserProfileConverter);
} | [
"public UserConverter() {\n }",
"@Bean\n public ConversionBean converter(){\n return new ConversionBean();\n }",
"private PreferenceConverter() {\n // Spring instantiates converters - see converters.xml\n }",
"public void setConverter( ValueConverter valueConverter, Class... classesT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes transaction by deleting transaction journal and logs the error if transaction could not be closed. | protected void closeTransaction(DSTransaction transaction) throws DetailException
{
//if transaction has been failed its journal must not be deleted, so rollback can be done
if (transaction != null && !transaction.isFailed())
{
try
{
transaction.close();
}
catch (TransactionException e)
... | [
"public void closeTransaction(Transaction tran) throws SQLException;",
"public void close() throws RemoteException {\r\n tx.commit();\r\n }",
"void endTransaction();",
"abstract public void endTransaction() throws DAOException;",
"@Override\n\tpublic synchronized void close() {\n\t\tif (entityManager... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes the action part of the rule constructDeeperUnderstanding02_PATH_1_GOAL_4_COMPONENT_txtResp_9 | private void constructDeeperUnderstanding02_PATH_1_GOAL_4_COMPONENT_txtResp_9() {
module_entity_RuleToHuman_1.setDescription(module_entity_RuleToHuman_1.getDescription() + "Regra acionada para classificar a Função da MRE: constructDeeperUnderstanding02_PATH_1_GOAL_4_COMPONENT_txtResp_ \n");
module_entity_RuleToHu... | [
"private void constructDeeperUnderstanding03_PATH_1_GOAL_4_COMPONENT_txtResp_12() {\n\t\t\tmodule_entity_RuleToHuman_1.setDescription(module_entity_RuleToHuman_1.getDescription() + \"Regra acionada para classificar a Função da MRE: constructDeeperUnderstanding03_PATH_1_GOAL_4_COMPONENT_txtResp_ \\n\");\n\t\t\tmodul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the checked state of this switch is changed. | protected abstract boolean onCheckedChanged(boolean checked); | [
"@Override\r\n\t\tpublic void switchChanged(long switchId) \r\n\t\t{ /* Nothing we need to do */ }",
"@Override\n\tpublic void switchChanged(long switchId) \n\t{ /* Nothing we need to do */ }",
"@Override\n public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The type of longterm pricing option you want for the device, either 1year or 3year longterm pricing. | public String getLongTermPricingType() {
return this.longTermPricingType;
} | [
"public void setLongTermPricingType(String longTermPricingType) {\n this.longTermPricingType = longTermPricingType;\n }",
"public int getPricingType() {\n return pricingType;\n }",
"public String getLongTermPricingId() {\n return this.longTermPricingId;\n }",
"public DeviceOption... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves the calendar to the previous month | public void previousMonth() {
selectedMonth--;
calendar.add(Calendar.MONTH, -1);
totalDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
monthChange = true;
update();
} | [
"public void previousMonth() {\r\n\t\tcalendar.add(Calendar.MONTH, -1);\r\n\t\tselectedDate = calendar.getTime();\r\n\t\tchangeMade();\r\n\t}",
"private void onClick_cmdPreviousMonth(){\n \t\t// Adjust the month index backwards\n \t\tm_calDate.add(Calendar.MONTH, -1);\n \t\t\n \t\t// Display the new month's days\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function initialize the payment method choice box and date validation choice box. | public void initCreditCardFields() {
cbPaymentMethod.getItems().add("Choose type");
cbPaymentMethod.getItems().add("Cash");
cbPaymentMethod.getItems().add("Credit Card");
cbPaymentMethod.setValue(cbPaymentMethod.getItems().get(0));
cbCreditCardMonthValidation.getItems().add("Month:");
for (int i = 1; ... | [
"public PaymentOption() {\n initComponents();\n }",
"public GUIPayAgainstInvoice() {\n initComponents();\n initOthers();\n }",
"@PostConstruct\r\n private void init() {\n this.ccTypes = new ArrayList<SelectItem>();\r\n this.ccTypes.add(new SelectItem(CreditCardType.CA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Annotate the ontology with the annotation. | public static void addOntologyAnnotation(OWLOntology ontology, OWLAnnotation annotation) {
OWLOntologyManager manager = ontology.getOWLOntologyManager();
AddOntologyAnnotation addition = new AddOntologyAnnotation(ontology, annotation);
manager.applyChange(addition);
} | [
"AnnotateTo createAnnotateTo();",
"Annotation createAnnotation();",
"org.biocatalogue.x2009.xml.rest.ResourceLink addNewAnnotations();",
"public static void addAxiomAnnotation(\n OWLOntology ontology, OWLAxiom axiom, Set<OWLAnnotation> annotations) {\n OWLOntologyManager manager = ontology.getOWLOntol... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encodes a nonnull String. | @Override
public void encodeString(String att) throws IllegalArgumentException, MALException {
EncodingHelper.checkForNull(att);
internalEncodeAttributes(Constants.STRING, att);
} | [
"Value encodeNull();",
"java.lang.String getEncode();",
"public String encodeValue(String value) {\r\n\t\treturn (null == value) ? \"\" : JSONUtil.encodeString(value);\r\n\t}",
"public static String encode (String inputStr) {\n\t\t\n\t\t// input data check\n\t\tif( inputStr == null ) {\n\t\t\treturn inputStr;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test if moving a white pawn forward more than 1 space after its first move throws an exception | @Test
public void forwardMoveTest2(){
board = new Board();
//we will place this pawn at a2
pawn = new Pawn(WHITE, board.getSquareAt(A,TWO));
board.getSquareAt(A,TWO).occupySquare(pawn);
//now we will try to move it forward once, then make an illegal move forward..
try{
//first move should be legal
pa... | [
"@Test\n\tpublic void forwardMoveTest3(){\n\t\tboard = new Board();\n\t\t//we will place this pawn at a2\n\t\tpawn = new Pawn(WHITE, board.getSquareAt(A,TWO));\n\t\tboard.getSquareAt(A,TWO).occupySquare(pawn);\n\t\t//we will place a black piece in front of it (a3)\n\t\tobstruction = new Pawn(BLACK, board.getSquareA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines the default alignment for the given column. | public <T> EmfDataTableDivBuilder<R> setAlignment(IDataTableColumn<R, T> column, CssTextAlign alignment) {
config.getColumnSettings(column).setAlignment(alignment);
return this;
} | [
"void setColumnAlignment(Table.Column column, Table.ColumnAlignment alignment);",
"void setColumnalign(String columnalign);",
"void setColumnAlignment(String columnId, Table.ColumnAlignment alignment);",
"public void setDefaultAlign ( String defaultAlign ) {\r\n\t\tgetStateHelper().put(PropertyKeys.defaultA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool ownerSupportAR = 4; | boolean getOwnerSupportAR(); | [
"public boolean getOwnerSupportAR() {\n return ownerSupportAR_;\n }",
"public boolean getOwnerSupportAR() {\n return ownerSupportAR_;\n }",
"public Builder setOwnerSupportAR(boolean value) {\n \n ownerSupportAR_ = value;\n onChanged();\n return this;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get all options to hide | private void hide_search_course_options(){
CheckBox listA = (CheckBox) view.findViewById(R.id.list_a);
CheckBox listB = (CheckBox) view.findViewById(R.id.list_b);
CheckBox obligatory = (CheckBox) view.findViewById(R.id.obligatory);
CheckBox freeChoice = (CheckBox) view.findViewById(R.id.free_choice);
Spinner ... | [
"protected void hideOptions(){\n mOptionList.setClickable(false);\n mOptionList.setVisibility(View.INVISIBLE);\n }",
"public List<WebElement> getallOptions() { return se.getOptions(); }",
"List<WebElement> getAllOptions();",
"public void hideElements() {\n String[] allText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "parse_org_emftext_language_textAML3_Variable" $ANTLR start "parse_org_emftext_language_textAML3_ContainmentVariable" TextAML3.g:3667:1: parse_org_emftext_language_textAML3_ContainmentVariable returns [org.emftext.language.textAML3.ContainmentVariable element = null] : (a0= VARID ) a1= ':' (a2= REFERENCE ) ; | public final org.emftext.language.textAML3.ContainmentVariable parse_org_emftext_language_textAML3_ContainmentVariable() throws RecognitionException {
org.emftext.language.textAML3.ContainmentVariable element = null;
int parse_org_emftext_language_textAML3_ContainmentVariable_StartIndex = input.index(... | [
"public final org.emftext.language.textAML3.Variable parse_org_emftext_language_textAML3_Variable() throws RecognitionException {\n org.emftext.language.textAML3.Variable element = null;\n\n int parse_org_emftext_language_textAML3_Variable_StartIndex = input.index();\n\n Token a0=null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
need to check NfcAdapter for nullability. Null means no NFC support on the device | private boolean isNfcSupported() {
this.nfcAdapter = NfcAdapter.getDefaultAdapter(this);
return this.nfcAdapter != null;
} | [
"public static boolean supportNfc(@NonNull Context context) {\n return NfcAdapter.getDefaultAdapter(context) != null;\n }",
"public static int testNFC(Context context) {\n try {\n NfcAdapter adapter = NfcAdapter.getDefaultAdapter(context);\n if (adapter == null)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get one intrusionSet by id. | @Override
@Transactional(readOnly = true)
public Optional<IntrusionSetDTO> findOne(Long id) {
log.debug("Request to get IntrusionSet : {}", id);
return intrusionSetRepository.findById(id)
.map(intrusionSetMapper::toDto);
} | [
"@Override\n\t@Transactional\n\tpublic FlashcardSet findById(int id) {\n\t\treturn setRepo.findByFcSetId(id);\n\t}",
"DocumentSet findDocumentSet(String id);",
"@GetMapping(\"/user-exercise-instance-sets/{id}\")\n @Timed\n public ResponseEntity<UserExerciseInstanceSetDTO> getUserExerciseInstanceSet(@PathV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies the replicas count of the Search service. | Update withReplicaCount(int count); | [
"interface WithReplicaCount {\n /**\n * Specifies the replicas count of the Search service.\n *\n * @param count the replicas count; replicas distribute workloads across the service. You need 2 or more to support high availability (applies to Basic and Standard tiers only)\n * @return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Does this request has a body? | public Boolean hasBody() {
return body != null;
} | [
"public boolean hasMessageBody() { return body!=null; }",
"public boolean isExpectingBody() {\r\n\t\tif (Method.GET.equals(method)) return false;\r\n\t\tLong size = mime.getContentLength();\r\n\t\tif (size != null) {\r\n\t\t\tif (size.longValue() == 0) return false;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tString s ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Weave lists together in all possible ways. This algorithm works by removing the head from one list, recursing, and then doing the same thing with other list | void weaveLists(LinkedList<Integer> first, LinkedList<Integer> second,
ArrayList<LinkedList<Integer>> results, LinkedList<Integer> prefix)
{
// One list is empty. Add remainder to [a cloned] prefix and store result
if (first.size() == 0 || second.size() == 0) {
Linke... | [
"static void weaveLists(LinkedList<Integer> first, LinkedList<Integer> second, ArrayList<LinkedList<Integer>> results, LinkedList<Integer> prefix) {\n\t\t// One list is empty, add remainder to a cloned prefix and store the result.\n\t\tif (first.size() == 0 || second.size() == 0) {\n\t\t\tLinkedList<Integer> result... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print the start of the HTML table. | private ConfigurationHTMLPrinter startTable() {
return println("<table border='0' cellspacing='0' cellpadding='0'>").incrementIndent();
} | [
"private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called by the homeworkViewer when homework has changed completionstate | public void homeworkCompletionChanged(Homework homework) {
overview.updateHomeworkCompletionState(homework);
} | [
"public void setStateComplete() {state = STATUS_COMPLETE;}",
"public void setCompleted() {\n this.completed = true;\n }",
"public void completed() {\n isCompleted = true;\n }",
"@FXML\n public void completeCurrentInterview() {\n try {\n Interview selectedInterview = this.lis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new image model. | public ImageModel() {
this.inputImage = null;
} | [
"@SuppressWarnings(\"OverridableMethodCallInConstructor\")\n public Model(BufferedImage image) {\n this.image = image;\n resetcontrols();\n }",
"public Image() {\n\t\tsuper();\n\t\taddNewAttributeList(NEW_ATTRIBUTES);\n\t\taddNewResourceList(NEW_RESOURCES);\n\t}",
"public ImageController() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column r_industry_generate_history.invalid_name | public String getInvalidName() {
return invalidName;
} | [
"public static String Slave_InvalidConfig_NoName() {\n return holder.format(\"Slave.InvalidConfig.NoName\");\n }",
"@DefaultMessage(\"A record with this value already exists. Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueException\")\n String gen_fieldUniqueException();",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the beverageQty value for this Beverage. | public void setBeverageQty(int beverageQty) {
this.beverageQty = beverageQty;
} | [
"public void setQty(int value) {\n this.qty = value;\n }",
"public void setQty(java.math.BigDecimal qty) {\n\t\tthis.qty = qty;\n\t}",
"public void setBalQty(Number value) {\n setAttributeInternal(BALQTY, value);\n }",
"public int getBeverageQty() {\n return beverageQty;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return true if `color1' is equal to `color2'; false otherwise. APISince: 2.0 | @Generated
@CFunction
public static native boolean CGColorEqualToColor(@Nullable CGColorRef color1, @Nullable CGColorRef color2); | [
"private boolean checkSameColor(float[] c1, float[] c2) {\n return c1[0] == c2[0] && c1[1] == c2[1] && c1[2] == c2[2];\r\n }",
"private boolean isEqualRgb(int[] color1, int[] color2) {\n // Could use Arrays.equals(int[], int[]), but this is probably a little faster...\n return color1[0] ==... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform some validation on the kindGroup field values against the entity field definitions. | private static void validateEntity(KindGroup entity) throws ValidationException {
Validator.validateStringField("code", entity.getCode(), 10, true);
Validator.validateStringField("description", entity.getDescription(), 75,true);
Validator.validateBooleanField("isStandard", entity.isStandard(), true);
} | [
"protected ValidationResult validateFieldLevel()\n {\n return getSyntaxValidator().isValid(fetchHandler().getData());\n }",
"protected void validateEntity() {\r\n super.validateEntity();\r\n }",
"protected void validateEntity() {\n super.validateEntity();\n }",
"protected void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
enables entrance purchase and hotel building request | public void enableBuyEntrance(){
buyEntrance = true;
buildHotel = true;
} | [
"private void enableFunctionality(){\n ImplLogger.enterMethod();\n if (!pharmacyOrganization.getLincense().isIsLicenseValid()){\n ImplLogger.info(\"pharmacyOrganization lincense is not valid\");\n shopPharmaProduct.setEnabled(false);\n managePharmaProduct.setEnabled(fa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the varRepStartDigitPosition value for this PmRule. | public void setVarRepStartDigitPosition(java.lang.Short varRepStartDigitPosition) {
this.varRepStartDigitPosition = varRepStartDigitPosition;
} | [
"public java.lang.Short getVarRepStartDigitPosition() {\r\n return varRepStartDigitPosition;\r\n }",
"public void setVarRepParamStartPosition(java.lang.Short varRepParamStartPosition) {\r\n this.varRepParamStartPosition = varRepParamStartPosition;\r\n }",
"public void setStartDigitPosition(j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
data object for a creditcard | public CreditCard(int pin, String number, String holder, Date expiryDate, int cvc){
this.pin = pin;
this.number = number;
this.holder = holder;
this.expiryDate = expiryDate;
this.cvc = cvc;
} | [
"private JsonObject getCreditCard() {\r\n\t\tJsonObject json = new JsonObject();\r\n\t\tCustomer customer = (Customer) ObjectContainer.currentUserLogin;\r\n\t\tjson.addProperty(\"customerID\", customer.getCustomerId());\r\n\t\tMessage msg = new Message(MessageType.GET_CREDIT_CARD_DETAILS_BY_ID, json.toString());\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the deliveryDays value for this RoutingStop. | public java.lang.String getDeliveryDays() {
return deliveryDays;
} | [
"public java.lang.String getInternalDeliveryDays() {\n return internalDeliveryDays;\n }",
"public void setDeliveryDays(java.lang.String deliveryDays) {\n this.deliveryDays = deliveryDays;\n }",
"public String getDpReceiptDays() {\r\n\t\treturn dpReceiptDays;\r\n\t}",
"public String getMeet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
"Examines" the obstacle in front of the robot by turning on the light, taking a picture (if this action is one that takes pictures), and tilting the head. | private void examine(){
//turn on light
rov.setLight(true);
//take picture
if(takePics){
examImage = rov.takePicture(rov.state.getPan(),rov.state.getTilt(),320,240,true);
examImageTime = System.currentTimeMillis();
}
//tilt head to simulate... | [
"public void action() {\n\n /*\n * The commented out code is an attempt at turning at a junction, but seems\n * not to work particularly well due to the other behaviours taking over\n * as soon as their take control method returns true. If it worked, it\n * would turn the rob... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the given key from its channel's key set. This method must be invoked by the selector for each channel that it deregisters. | protected final void deregister(AbstractSelectionKey key) {
((AbstractSelectableChannel)key.channel()).removeKey(key);
} | [
"@Override\n public void remove(K key) {\n super.remove(key);\n keySet.remove(key);\n }",
"private void removeKeyAndSession(SelectionKey key) {\n\t\t\tSSLClientSession session = ((SSLClientSession)key.attachment());\n\t\t\tString username = session.getUsername();\n\t\t\t\n\t\t\topen_client_cha... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a recordReaderContext for FixedWidthRecords | protected ReaderContext<FSDataInputStream> createFixedWidthReaderContext()
{
ReaderContext.FixedBytesReaderContext<FSDataInputStream> fixedBytesReaderContext = new ReaderContext.FixedBytesReaderContext<FSDataInputStream>();
fixedBytesReaderContext.setLength(recordLength);
return fixedBytesReaderContext;
... | [
"@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n if (mode == RECORD_READER_MODE.FIXED_WIDTH_RECORD) {\n readerContext = createFixedWidthReaderContext();\n } else {\n readerContext = createDelimitedReaderContext();\n }\n }",
"protected ReaderContext<FSD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
> \brief \b DORMHR =========== DOCUMENTATION =========== Online html documentation available at > \htmlonly > Download DORMHR + dependencies > > [TGZ] > > [ZIP] > > [TXT] > \endhtmlonly Definition: =========== SUBROUTINE DORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C, LDC, WORK, LWORK, INFO ) .. Scalar Arguments .... | public void dormhr_(CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER ILO,INTEGER IHI,double[] A,INTEGER LDA,double[] TAU,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER INFO); | [
"public void dorghr_(INTEGER N,INTEGER ILO,INTEGER IHI,double[] A,INTEGER LDA,double[] TAU,double[] WORK,INTEGER LWORK,INTEGER INFO);",
"public void dorm22_(CHARACTER SIDE,CHARACTER TRANS,INTEGER M,INTEGER N,INTEGER N1,INTEGER N2,double[] Q,INTEGER LDQ,double[] C,INTEGER LDC,double[] WORK,INTEGER LWORK,INTEGER IN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Constructor File will be instantiated with UserLoginData.waldo This file will contain user login information (Encrypted) This file will be read from and written to when appropriate | public UserBase()
{
file = new File("UserLoginData.waldo");
pattern = Pattern.compile(EMAIL_PATTERN);
} | [
"public CryptFile(File file, CryptFile parentFile) {\n this.file = file;\n this.parentFile = parentFile;\n users = new Properties();\n }",
"private void writeAuthFile(String username, String password) {\n\n createDBFileFolder();\n\n String Os = System.getProperty(\"os.name\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup search view edit text and clear button listeners. | protected void setSearchView() {
if (getSearchViewClear() != null) {
Dynamic.setTooltip(getSearchViewClear());
getSearchViewClear().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (getSearc... | [
"private void setSearchPanel() {\n\t\tsearchET = (EditText) findViewById(R.id.searchET);\n\t\tImageButton searchBtn = (ImageButton) findViewById(R.id.searchBtn);\n\t\tsearchBtn.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n mAdapter.getF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contexts: Limit returns InitialPositionX InitialPosition returns InitialPositionX InitialPositionX returns InitialPositionX Constraint: (name='positionX' value=INT) | protected void sequence_InitialPositionX(ISerializationContext context, InitialPositionX semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.LIMIT__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(... | [
"public int getPositionX( ) {\n\n return defaultX;\n }",
"public float getInitialXPosition()\n {\n return initialXPosition;\n }",
"int getXMinPos();",
"public int getXLimitation() {\n return this.xLimitation;\n }",
"int getPositionX () {\r\n return this.nX_px;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find newly added guest OS mapping by ID | GuestOSHypervisor getAddedGuestOsMapping(Long guestOsHypervisorId); | [
"GuestOSHypervisor addGuestOsMapping(AddGuestOsMappingCmd addGuestOsMappingCmd);",
"GuestOS getAddedGuestOs(Long guestOsId);",
"GuestOSHypervisor updateGuestOsMapping(UpdateGuestOsMappingCmd updateGuestOsMappingCmd);",
"boolean removeGuestOsMapping(RemoveGuestOsMappingCmd removeGuestOsMappingCmd);",
"privat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string reducerjar = 10; | public java.lang.String getReducerjar() {
java.lang.Object ref = reducerjar_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
reducerjar_ = s;
... | [
"java.lang.String getReducerjar();",
"public java.lang.String getReducerjar() {\n java.lang.Object ref = reducerjar_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteStrin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function verify that WebElement title/hint is target string | public void verifyWebElementHaveTargetAttributeTitle(WebElement web_element, String target_text) {
if (web_element.getAttribute("title").replaceAll(" ", " ").equals(target_text.replaceAll(" ", " "))) {
System.out.println(target_text + " is displayed in title.");
ATUReports.add(time +" Target text is displa... | [
"public void verifyThatTheTextOfWebElemenetIsAsExpected(WebElement web_element, String target_text) {\r\n\t\tif (web_element.getText().equals(target_text)) {\r\n\t\t\tSystem.out.println(target_text + \" is displayed as expected.\");\r\n\t\t\tATUReports.add(\"Target text is displayed as expected.\", target_text, tar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the heartRate property. | public int getHeartRate() {
return heartRate;
} | [
"public static String getHeartRateValue() {\n return heartRateValue;\n }",
"public int getHeartRate() {\n if (extraCase_ == 5) {\n return (Integer) extra_;\n }\n return 0;\n }",
"int getHeartRate();",
"public void setHeartRate(int value) {\n this.hea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get number of peptides using identification id. This implementation will check cache first. | @Override
@SuppressWarnings("unchecked")
public int getNumberOfPeptides(Comparable identId) throws DataAccessException {
int cnt = 0;
List<Comparable> ids = (List<Comparable>) cache.get(CacheCategory.IDENTIFICATION_TO_PEPTIDE, identId);
if (ids != null) {
cnt = ids.size... | [
"@Override\r\n @SuppressWarnings(\"unchecked\")\r\n public int getNumberOfUniquePeptides(Comparable identId) throws DataAccessException {\r\n int cnt = 0;\r\n List<Comparable> ids = (List<Comparable>) cache.get(CacheCategory.IDENTIFICATION_TO_PEPTIDE, identId);\r\n if (ids != null && cach... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a Dataflavor to the Transferable | protected void addDataFlavor(DataFlavor flavor) {
//Check for Desktop Component Support
dataFlavors.add(flavor);
} | [
"public synchronized void addFlavor(DataFlavor flavor) {\r\n // add the flavor to the end of the list\r\n flavours.add(flavor);\r\n }",
"@Test\n public void testAddDataFlavor() throws ClassNotFoundException {\n System.out.println(\"addDataFlavor\");\n String classname = \"org.rib... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
changes label to display movie | public void setLabel(String movie)
{
displayMovie.setText(movie);
} | [
"private void createLabel() {\n createAvnFPSLabel();\n }",
"void setLabel(String labelNew);",
"@Override\n public void pressMovieButton() {\n System.out.println(\"Hulu Movies:\\n- Cars\\n- Cinderella\\n- Wall-E\\n- ET\\n\");\n \n }",
"void setLabel(String label);",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To support deep linking, we need to make sure that the client can get access to the last sent intent. The clients access this through a JNI api that allows them to get the intent set on launch. To update that after launch we have to manually replace the intent with the one caught here. | @Override
protected void onNewIntent(Intent intent) {
setIntent(intent);
} | [
"@Override protected void onNewIntent(Intent intent)\n {\n setIntent(intent);\n }",
"public void updateIntent(Intent intent) {\n clear();\n\n if (mContext == null || intent == null || !Intent.ACTION_VIEW.equals(intent.getAction())) {\n return;\n }\n\n mIsCustomT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return String.format("Plus[left=%s, right=%s]", left, right); | @Override
public String toString() {
return String.format("%s + %s", left, right);
} | [
"@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }",
"@Override\n\t\tpublic String toString() {\n\t\t\treturn String.format(\"%s = %s\", left, right);\n\t\t}",
"private static Expression createConcatenation(Expression left, Expr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |