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 |
|---|---|---|---|---|---|---|
Intent intent= new Intent(tutorial3.this,Preference.class); | public void onClick(View v) {
Log.d("test", "Bengali Unicode" + type);
try
{
String str="";
//str = edit.getText().toString();
//str = StringEscapeUtils.unescapeJava(str);
//txt1.setText(d);
str= "\u0017\u0016\u0007";//"\u0986\u09AE\u09Bf";
String Fname= "fonts/Siyamrupali_1_01.ttf";
txt1.setTypeface(Typeface.createFromAsset(getAssets(),Fname));
Log.d("data","data:::::"+str);
txt1.setText(str);
}
catch(Exception ex)
{
txt1.setText("font cannot load: "+ ex.toString() );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void preferences() {\n\tstartActivity (new Intent(getApplicationContext(), PushPreferencesActivity.class));\n}",
"public void go_to_setting(){\n Intent i=new Intent(LoginSelection.this, Configuration.class);\n startActivity(i);\n }",
"@Override\n public void onClick(DialogIn... | [
"0.75789887",
"0.7313483",
"0.73047924",
"0.71833915",
"0.70170856",
"0.6931952",
"0.68623227",
"0.6827274",
"0.66953164",
"0.6686735",
"0.66802883",
"0.6630417",
"0.6626554",
"0.6619819",
"0.6611802",
"0.66095567",
"0.6596027",
"0.6576148",
"0.6556962",
"0.65321064",
"0.6485... | 0.0 | -1 |
The cache size will be measured in kilobytes rather than number of items. | @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1)
@Override
protected int sizeOf(String key, Bitmap bitmap) {
final int bitmapSize = bitmap.getByteCount() / 1024;
return bitmapSize == 0 ? 1 : bitmapSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getCacheSize();",
"public int getCacheSize(){ return Integer.parseInt(cacheSize.getText()); }",
"int getCacheSizeInMiB();",
"@Override\n public int getCacheSize() {\n return 4 + 20 * 88;\n }",
"@Override\n public int getCacheSize() {\n return 4 + 20 * (... | [
"0.8148039",
"0.81001985",
"0.8051682",
"0.79875827",
"0.79755473",
"0.79708457",
"0.78806233",
"0.78768337",
"0.78429884",
"0.78264433",
"0.77172804",
"0.76785934",
"0.76757085",
"0.7636559",
"0.76053137",
"0.7605307",
"0.75497484",
"0.73752487",
"0.7315802",
"0.7309797",
"0... | 0.0 | -1 |
No existing ImageCache, create one and store it in RetainFragment | public static MemoryCache getInstance(MemoryCacheParams params) {
if (instance == null) {
instance = new MemoryCache(params);
}
return instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createImageCache(){\n ImageCacheManager.getInstance().init(this,\n this.getPackageCodePath()\n , DISK_IMAGECACHE_SIZE\n , DISK_IMAGECACHE_COMPRESS_FORMAT\n , DISK_IMAGECACHE_QUALITY\n , ImageCacheManager.CacheType.MEMORY... | [
"0.7423115",
"0.66353047",
"0.66269124",
"0.6527049",
"0.64503986",
"0.6422067",
"0.6398751",
"0.63531715",
"0.63327247",
"0.6328142",
"0.63157374",
"0.63098836",
"0.62888104",
"0.62873703",
"0.6271446",
"0.6248368",
"0.62177545",
"0.6117458",
"0.60816485",
"0.604662",
"0.603... | 0.0 | -1 |
Adds a bitmap to both memory cache. | public void addBitmapToMemCache(String data, Bitmap value) {
if (data == null || value == null) {
return;
}
if (getBitmapFromMemCache(data) == null) {
mMemoryCache.put(data, value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addBitmapToCache(String url, Bitmap bitmap) {\n if (bitmap != null) {\n synchronized (sHardBitmapCache) {\n sHardBitmapCache.put(url, bitmap);\n }\n }\n }",
"private void addBitmapToLruCache(String path, Bitmap bm) {\r\n if (getBitmapFromL... | [
"0.7144699",
"0.68242174",
"0.6671486",
"0.6632754",
"0.63273144",
"0.6325237",
"0.6191164",
"0.6013285",
"0.5874658",
"0.5861296",
"0.5808189",
"0.5756337",
"0.57393295",
"0.5697736",
"0.5673916",
"0.566904",
"0.563054",
"0.5523281",
"0.54835427",
"0.5479536",
"0.5475023",
... | 0.6956738 | 1 |
Get from memory cache. | public Bitmap getBitmapFromMemCache(String data) {
Bitmap memValue = null;
memValue = mMemoryCache.get(data);
if (BuildConfig.DEBUG && memValue != null) {
Log.d(TAG, "Memory cache hit");
}
return memValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic V retrieve(K key) {\n\t\tcheckNullKey(key);\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.get(key);\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"private CacheObject<K, V> getCacheObject(K key){\n return this.cache.get(key);\n }",
"public Object get(String key) ... | [
"0.73673993",
"0.7224297",
"0.71980244",
"0.7147583",
"0.7145398",
"0.7106226",
"0.7105263",
"0.70430547",
"0.7006276",
"0.6834099",
"0.6792625",
"0.6769704",
"0.67644686",
"0.6702528",
"0.66976553",
"0.666791",
"0.6638705",
"0.6629129",
"0.6627202",
"0.6627202",
"0.65698814"... | 0.6314069 | 38 |
Sets the memory cache size based on a percentage of the max available VM memory. Eg. setting percent to 0.2 would set the memory cache to one fifth of the available memory. | public void setMemCacheSizePercent(float percent) {
if (percent < 0.01f || percent > 0.8f) {
throw new IllegalArgumentException("setMemCacheSizePercent - percent must be "
+ "between 0.01 and 0.8 (inclusive)");
}
memCacheSize = Math.round(percent * Runtime.getRuntime().maxMemory() / 1024);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCurrentMemoryFailoverResourcesPercent(int currentMemoryFailoverResourcesPercent) {\r\n this.currentMemoryFailoverResourcesPercent = currentMemoryFailoverResourcesPercent;\r\n }",
"public void setMaxIdleTimeoutPercent(float percent) {\n if (initialized)\n throw new Illeg... | [
"0.632179",
"0.6249181",
"0.6249152",
"0.62106633",
"0.6177097",
"0.60246587",
"0.59542394",
"0.5758965",
"0.5691169",
"0.5684162",
"0.5637075",
"0.56105155",
"0.555131",
"0.5513002",
"0.5472681",
"0.5427938",
"0.54101527",
"0.5408252",
"0.5407912",
"0.54069114",
"0.5377022",... | 0.82679117 | 0 |
Return the byte usage per pixel of a bitmap based on its configuration. | private static int getBytesPerPixel(Bitmap.Config config) {
if (config == Bitmap.Config.ARGB_8888) {
return 4;
} else if (config == Bitmap.Config.RGB_565) {
return 2;
} else if (config == Bitmap.Config.ARGB_4444) {
return 2;
} else if (config == Bitmap.Config.ALPHA_8) {
return 1;
}
return 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static int m61449a(Bitmap bitmap) {\n return bitmap.getByteCount();\n }",
"public static int getBitmapSize(Bitmap bitmap){\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {\n return bitmap.getByteCount();\n }\n // Pre HC-MR1\n return... | [
"0.6267382",
"0.6241848",
"0.6193201",
"0.619268",
"0.61269486",
"0.6121833",
"0.60896295",
"0.6081027",
"0.6081027",
"0.6081027",
"0.60530883",
"0.6017993",
"0.6000483",
"0.59930944",
"0.59813833",
"0.5914934",
"0.59116805",
"0.577801",
"0.5735929",
"0.5657247",
"0.5590471",... | 0.6914714 | 0 |
Modifica la informacion de una productora. | @PUT
@Path("{id: \\d+}")
public CategoriaDetailDTO editarProductora(@PathParam("id") Long id, CategoriaDetailDTO categoria) throws BusinessLogicException {
LOGGER.log(Level.INFO, "CategoriaResource editarCategoria: input: id: {0} , categoria : {1}", new Object[]{id, categoria});
categoria.setId(id);
if (categoriaLogic.getCategoria(id) == null) {
throw new WebApplicationException("El recurso /categorias/" + id + " no existe.", 404);
}
CategoriaDetailDTO detailDTO = new CategoriaDetailDTO(categoriaLogic.editarCategoria(id, categoria.toEntity()));
LOGGER.log(Level.INFO, "CategoriaResoruce editarCategoria: output: {0}", detailDTO);
return detailDTO;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void modificar() {\r\n\r\n ModificaProducto modprodu = new ModificaProducto(vista, true);//C.P.M instanciamos la forma de modificar producto en modo modal y le mandamos al vista \r\n int Opcion = vista.jTbuscar.getSelectedRow();//C.P.M obtenemos los datos de la fila la cual este seleccionada\... | [
"0.67191887",
"0.6344984",
"0.6338284",
"0.62509537",
"0.6135967",
"0.612931",
"0.60474384",
"0.60274035",
"0.6020184",
"0.6016745",
"0.6016424",
"0.59915155",
"0.598893",
"0.59842694",
"0.59583175",
"0.59269685",
"0.5919425",
"0.5914767",
"0.5875464",
"0.5858356",
"0.5854755... | 0.0 | -1 |
Elimina una Categoria por su id. | @DELETE
@Path("{id:\\d+}")
public String eliminarProductora(@PathParam("id") Long id) throws BusinessLogicException {
LOGGER.log(Level.INFO, "ProdcutoraResource eliminarcategoria: input: {0}", id);
CategoriaEntity entity = categoriaLogic.getCategoria(id);
if (entity == null) {
throw new WebApplicationException("El recurso /productoras/" + id + " no existe.", 404);
}
categoriaLogic.borrarCategoria(id);
LOGGER.info("ProduccionResource eliminarProduccion: output: void");
return "Se borro exitosamente la categoria con id: " + id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void delete(Long id) {\n log.debug(\"Request to delete Categoria : {}\", id);\n categoriaRepository.delete(id);\n }",
"void deleteCategory(Integer id);",
"void deleteCategory(long id);",
"public void deleteCategorie(Categorie c);",
"public void delete(Integer id) {\n\t\tfindById(id)... | [
"0.7649723",
"0.75711036",
"0.7324628",
"0.72436476",
"0.7092475",
"0.7078615",
"0.7047785",
"0.69991636",
"0.69147867",
"0.6894455",
"0.68071604",
"0.66805685",
"0.664833",
"0.660873",
"0.6602789",
"0.6599745",
"0.657016",
"0.65564877",
"0.65459657",
"0.6513476",
"0.6470381"... | 0.63154626 | 27 |
Convierte una lista de CategoriaEntity a una lista de CategoriaDetailDTO. | private List<CategoriaDetailDTO> listEntity2DTO(List<CategoriaEntity> entityList) {
List<CategoriaDetailDTO> list = new ArrayList<>();
for (CategoriaEntity entity : entityList) {
list.add(new CategoriaDetailDTO(entity));
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<CategoriaDTO> obtenerCategorias(String estado);",
"public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }",
"public static List<Categorias> obtenerCategorias(){\n List<Categorias> categorias = new ArrayList<>();\... | [
"0.66435206",
"0.63863873",
"0.637549",
"0.6375099",
"0.63025135",
"0.6255224",
"0.62516344",
"0.61995834",
"0.6124381",
"0.6115788",
"0.6101917",
"0.6097112",
"0.606829",
"0.60651875",
"0.60029477",
"0.5989916",
"0.5985994",
"0.59469193",
"0.59098685",
"0.5905767",
"0.585579... | 0.77322924 | 0 |
Check whether type of given object and attributes of given object equals to this object. | @Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (object == null || getClass() != object.getClass()) {
return false;
}
CTLAPI CTLAPIPayload = (CTLAPI) object;
return Objects.equals(this.Name, CTLAPIPayload.Name) && Objects.equals(this.Id, CTLAPIPayload.Id)
&& Objects.equals(this.Context, CTLAPIPayload.Context)
&& Objects.equals(this.LifeCycleStatus, CTLAPIPayload.LifeCycleStatus)
&& Objects.equals(this.Provider, CTLAPIPayload.Provider)
&& Objects.equals(this.Version, CTLAPIPayload.Version);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equ... | [
"0.68100286",
"0.642197",
"0.63789964",
"0.63331866",
"0.63127494",
"0.6309165",
"0.6293894",
"0.6291706",
"0.6281246",
"0.62612134",
"0.6247626",
"0.6227874",
"0.61878604",
"0.6155949",
"0.6154153",
"0.61541104",
"0.61277705",
"0.6127534",
"0.6124393",
"0.6124393",
"0.612439... | 0.0 | -1 |
Convert the given object to string with each line indented by 4 spaces (except the first line). | private String toIndentedString(Object object) {
if (object == null) {
return EndpointCentralConstants.NULL_STRING;
}
return object.toString().replace(EndpointCentralConstants.LINE_BREAK,
EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }",
"private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n... | [
"0.7549383",
"0.7497253",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
"0.74617267",
... | 0.7884413 | 0 |
a proxy support could be set via these parameters note: proxy properties must be set via "D" startup parameters | @Bean
public CloseableHttpClient closeableHttpClient(HttpClientBuilder builder) {
builder.useSystemProperties();
return builder.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void applyWebProxySettings() {\n boolean settingsChanged = false;\n boolean enablingProxy = false;\n Properties sysprops = System.getProperties();\n if (proxyHost != null) {\n settingsChanged = true;\n if (proxyHost.length() != 0) {\n traceSet... | [
"0.71497965",
"0.6927181",
"0.69176155",
"0.6809556",
"0.67424995",
"0.665683",
"0.6653077",
"0.66021484",
"0.6491939",
"0.64740986",
"0.6371633",
"0.6365249",
"0.63361984",
"0.6333499",
"0.6325094",
"0.6321481",
"0.62968713",
"0.62863696",
"0.62818015",
"0.62814176",
"0.6278... | 0.0 | -1 |
Simple implementation of getNamespaces() method. Returns empty array. | public List<Namespace> getNamespaces(String string)
throws UnknownLanguageException, ClassDataLoaderConfigurationException {
return new ArrayList<Namespace>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList getNamespaces() {\n return m_namespaces;\n }",
"public final String[] getNamespaces() {\n return m_uris;\n }",
"public java.util.Map<String,String> getNamespaces() {\n return (_namespaces);\n }",
"public Map<String,String> getNamespaces() {\n return names... | [
"0.84430546",
"0.80714655",
"0.783132",
"0.76413757",
"0.7556401",
"0.7439236",
"0.73440474",
"0.692655",
"0.6727082",
"0.6720408",
"0.6619448",
"0.6619448",
"0.6619448",
"0.6619448",
"0.6619448",
"0.654747",
"0.6494254",
"0.64730954",
"0.6438551",
"0.636841",
"0.6360714",
... | 0.6619825 | 10 |
Create a new collection value | public AbstractCollectionMetaData()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"CollectionItem createCollectionItem();",
"CollectionReferenceElement createCollectionReferenceElement();",
"protected abstract Collection createCollection();",
"<C> CollectionItem<C> createCollectionItem();",
"public void push(Object value) {\n this.collection.add(value);\n }",
"CollectionParam... | [
"0.70509213",
"0.66064197",
"0.6580178",
"0.63278085",
"0.6142232",
"0.6053858",
"0.60056794",
"0.5953073",
"0.5928205",
"0.5919749",
"0.587059",
"0.5799771",
"0.57562464",
"0.57166445",
"0.56902397",
"0.5690011",
"0.56839997",
"0.5683702",
"0.5666643",
"0.5644354",
"0.562396... | 0.0 | -1 |
Get the element type | public String getElementType()
{
return elementType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"TypeElement getTypeElement();",
"public String getElementType() {\n\t\treturn (element_type);\n\t}",
"ElementType getElementType();",
"Type getElementType();",
"public TypeElement getTypeElement() {\n return this.te;\n }",
"public Class getType(ElementList element) {\r\n return element.... | [
"0.8668463",
"0.83262014",
"0.81759083",
"0.8125392",
"0.78262824",
"0.76541674",
"0.7593652",
"0.7325844",
"0.72412825",
"0.723121",
"0.7115017",
"0.70720375",
"0.70713043",
"0.7037132",
"0.703177",
"0.7024206",
"0.6979006",
"0.6962662",
"0.6962662",
"0.6962662",
"0.6962662"... | 0.7198435 | 10 |
Set the element type | @XmlAttribute(name="elementClass")
public void setElementType(String elementType)
{
this.elementType = elementType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setElementType(String element_type) {\n\t\tthis.element_type = element_type;\n\t}",
"public final void setElementType(solarpowerconversioncalculator.proxies.ElementType elementtype)\n\t{\n\t\tsetElementType(getContext(), elementtype);\n\t}",
"public final void setElementType(com.mendix.systemwidein... | [
"0.8078184",
"0.7673909",
"0.73294044",
"0.7273801",
"0.6969495",
"0.6969495",
"0.6969495",
"0.695037",
"0.67810184",
"0.67404276",
"0.6719028",
"0.67055917",
"0.66913617",
"0.66814864",
"0.66776514",
"0.6642004",
"0.6629654",
"0.66251594",
"0.66108185",
"0.6598584",
"0.65844... | 0.6625378 | 17 |
This method was generated by MyBatis Generator. This method corresponds to the database table girl_info | int deleteByPrimaryKey(Integer id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BaseTableInfo info() {\n return info;\n }",
"@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }",
"GirlInfo selectByPrimaryKey(Integer id);",
"ResultSet getGeneralInfo() {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \t\t... | [
"0.56877774",
"0.5585806",
"0.5460726",
"0.5428934",
"0.5407207",
"0.5362366",
"0.5336765",
"0.5334818",
"0.52486897",
"0.52254975",
"0.5216251",
"0.5173856",
"0.5155965",
"0.51307267",
"0.5106142",
"0.5097099",
"0.5090775",
"0.5077372",
"0.50720805",
"0.5063526",
"0.50599873... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table girl_info | int insert(GirlInfo record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BaseTableInfo info() {\n return info;\n }",
"@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }",
"GirlInfo selectByPrimaryKey(Integer id);",
"ResultSet getGeneralInfo() {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \t\t... | [
"0.5687458",
"0.5584085",
"0.5461206",
"0.54287654",
"0.54066455",
"0.5362312",
"0.5335768",
"0.53355366",
"0.5247664",
"0.5225035",
"0.52163434",
"0.5172487",
"0.51557827",
"0.5131258",
"0.5104857",
"0.50975364",
"0.50908273",
"0.50768244",
"0.50726014",
"0.5064885",
"0.5059... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table girl_info | int insertSelective(GirlInfo record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BaseTableInfo info() {\n return info;\n }",
"@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }",
"GirlInfo selectByPrimaryKey(Integer id);",
"ResultSet getGeneralInfo() {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \t\t... | [
"0.5685485",
"0.55820286",
"0.5461696",
"0.5428449",
"0.5405064",
"0.5360673",
"0.5335233",
"0.53341687",
"0.52471906",
"0.5223161",
"0.52173954",
"0.51712567",
"0.5155304",
"0.5129311",
"0.5104327",
"0.50960326",
"0.50907195",
"0.50757074",
"0.5071812",
"0.50656956",
"0.5056... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table girl_info | GirlInfo selectByPrimaryKey(Integer id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BaseTableInfo info() {\n return info;\n }",
"@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }",
"ResultSet getGeneralInfo() {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \t\tString query = \"SELECT ID, Name, Type1Name, T... | [
"0.56877774",
"0.5585806",
"0.5428934",
"0.5407207",
"0.5362366",
"0.5336765",
"0.5334818",
"0.52486897",
"0.52254975",
"0.5216251",
"0.5173856",
"0.5155965",
"0.51307267",
"0.5106142",
"0.5097099",
"0.5090775",
"0.5077372",
"0.50720805",
"0.5063526",
"0.50599873",
"0.5054799... | 0.5460726 | 2 |
This method was generated by MyBatis Generator. This method corresponds to the database table girl_info | int updateByPrimaryKeySelective(GirlInfo record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BaseTableInfo info() {\n return info;\n }",
"@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }",
"GirlInfo selectByPrimaryKey(Integer id);",
"ResultSet getGeneralInfo() {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \t\t... | [
"0.56877774",
"0.5585806",
"0.5460726",
"0.5428934",
"0.5407207",
"0.5362366",
"0.5336765",
"0.5334818",
"0.52486897",
"0.52254975",
"0.5216251",
"0.5173856",
"0.5155965",
"0.51307267",
"0.5106142",
"0.5097099",
"0.5090775",
"0.5077372",
"0.50720805",
"0.5063526",
"0.50599873... | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table girl_info | int updateByPrimaryKey(GirlInfo record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BaseTableInfo info() {\n return info;\n }",
"@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }",
"GirlInfo selectByPrimaryKey(Integer id);",
"ResultSet getGeneralInfo() {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \t\t... | [
"0.5687458",
"0.5584085",
"0.5461206",
"0.54287654",
"0.54066455",
"0.5362312",
"0.5335768",
"0.53355366",
"0.5247664",
"0.5225035",
"0.52163434",
"0.5172487",
"0.51557827",
"0.5131258",
"0.5104857",
"0.50975364",
"0.50908273",
"0.50768244",
"0.50726014",
"0.5064885",
"0.5059... | 0.0 | -1 |
Set the global Number | public void showDialog() {
if (productsItem.getPrice() != null)
priceOfRate = Double.valueOf(productsItem.getPrice().replace(",", ""));
binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.item_order_product_selection, null, false);
binding.tvProductName.setText( productsItem.getName());
binding.tvProductPrice.setText(String.format(Locale.ENGLISH,"%,.2f", priceOfRate));
binding.tvProductStock.setText(String.format(Locale.ENGLISH,"%,.2f", Double.parseDouble(productsItem.getStock())));
if (selectedProductHelper != null) {
if(!selectedProductHelper.isFree()) {
binding.etProductQty.setText(selectedProductHelper.getProductQuantity());
binding.tvTotalPrice.setText(String.format(Locale.ENGLISH, "%,.2f", Double.valueOf(binding.tvProductPrice.getText().toString().replace(",", "")) * Double.valueOf(binding.etProductQty.getText().toString())));
try {
List<TradePromoionData> tradePromoionData = mDatabaseHandler.getTradePromoion(productsItem.getId());
if (tradePromoionData.size() > 0) {
binding.tvOfferName.setText("Free: " + tradePromoionData.get(0).getFreeProductName());
binding.tvOfferQty.setText(String.format(Locale.ENGLISH, "%,.2f", (Integer.parseInt(binding.etProductQty.getText().toString()) / Integer.parseInt(tradePromoionData.get(0).getPromoionValue())) * Integer.parseInt(tradePromoionData.get(0).getFreeProductQty())));
}
} catch (NumberFormatException e) {
Log.d("tareq_test", "Eroor while reloading Product Selection Dialog: " + e.getMessage());
}
}
}
binding.etProductQty.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
discount = 0.0;
binding.tvOfferName.setText("");
binding.tvOfferQty.setText("");
binding.tvDiscount.setText((String.format(Locale.ENGLISH, "%,.2f", discount)));
binding.tvGrandTotal.setText(String.format(Locale.ENGLISH, "%,.2f", totalPrice));
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
//Price Variation
List<PriceVariationStartEnd> priceVariationList = mDatabaseHandler.getpriceVariationStartEndEprice(productsItem.getId(), outletType, Integer.parseInt(productsItem.getVariantRow()));
List<TradePromoionData> tradePromoionData = mDatabaseHandler.getTradePromoion(productsItem.getId());
String outletTypeName = outletType;
int size = priceVariationList.size();
try {
String inputPrice = s.toString();
double inputFinalPrice = Double.valueOf(inputPrice);
if (!inputPrice.equals(""))
for (int i = 0; i < size; i++) {
if (Math.max(priceVariationList.get(i).getStartRange(), inputFinalPrice) == Math.min(inputFinalPrice, priceVariationList.get(i).getEndRange())) {
//binding.tvProductPrice.setText(String.valueOf(priceVariationList.get(i).getPriceRange()));
priceOfRate = priceVariationList.get(i).getPriceRange();
//binding.tvProductPrice.setText(String.valueOf(priceOfRate));
break;
} else {
priceOfRate = Double.valueOf(productsItem.getPrice());
}
}
binding.tvProductPrice.setText(String.format(Locale.ENGLISH, "%,.2f", priceOfRate));
//binding.tvTotalPrice.setText(String.format("%.2f", Double.valueOf(binding.tvProductPrice.getText().toString().replace(",", "")) * Double.valueOf(binding.etProductQty.getText().toString())));
binding.tvTotalPrice.setText(String.format(Locale.ENGLISH, "%,.2f", Double.valueOf(binding.tvProductPrice.getText().toString().replace(",", "")) * Double.valueOf(binding.etProductQty.getText().toString())));
totalPrice = Double.valueOf(String.valueOf(binding.tvTotalPrice.getText()).replace(",", ""));
if (tradePromoionData.size() > 0){
if (Double.valueOf(tradePromoionData.get(0).getPromoionValue()) <= inputFinalPrice && !inputPrice.equals("")) {
int countOfferNumber = (int) (inputFinalPrice / Double.valueOf(tradePromoionData.get(0).getPromoionValue()));
double offerValue = Double.valueOf(tradePromoionData.get(0).getOfferValue());
switch (tradePromoionData.get(0).getOfferType()) {
case "Percentage":
discount = (totalPrice * offerValue) / 100;
binding.tvOfferName.setText(tradePromoionData.get(0).getPromoionTitle());
binding.tvOfferQty.setText(tradePromoionData.get(0).getOfferType());
binding.tvDiscount.setText((String.format(Locale.ENGLISH, "%,.2f", discount)));
break;
case "Flat":
discount = offerValue * countOfferNumber;
binding.tvOfferName.setText(tradePromoionData.get(0).getPromoionTitle());
binding.tvOfferQty.setText(tradePromoionData.get(0).getOfferType());
binding.tvDiscount.setText((String.format(Locale.ENGLISH, "%,.2f", discount)));
break;
case "Qty":
discount = 0.0;
binding.tvOfferName.setText("Free: " + tradePromoionData.get(0).getFreeProductName());
binding.tvOfferQty.setText(String.valueOf((Integer.parseInt(binding.etProductQty.getText().toString()) / Integer.parseInt(tradePromoionData.get(0).getPromoionValue())) * Integer.parseInt(tradePromoionData.get(0).getFreeProductQty())));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
binding.layoutSelect.setBackground(context.getDrawable(R.color.background));
}
binding.tvDiscount.setText((String.valueOf(discount)));
break;
default:
discount = 0.0;
break;
}
//Changing for specific option
/* binding.tvOffer.setText(tradePromoionData.get(0).getPromoionTitle());
binding.tvDiscountName.setText(tradePromoionData.get(0).getOfferType());
binding.tvDiscount.setText((String.valueOf(discount)));*/
/*
if(tradePromoionData.get(0).getOfferType().equals("Percentage")){
double totalPrice = Double.valueOf(String.valueOf(binding.tvTotalPrice.getText()));
discount = (totalPrice*offerValue) / 100 ;
}
else if(tradePromoionData.get(0).getOfferType().equals("Flat")){
discount = offerValue * countOfferNumber;
}
binding.tvOffer.setText(tradePromoionData.get(0).getPromoionTitle());
binding.tvDiscountName.setText(tradePromoionData.get(0).getOfferType());
binding.tvDiscount.setText((String.valueOf(discount)));
*/
}
}
} catch (Exception e) {
e.printStackTrace();
}
binding.tvGrandTotal.setText(String.format(Locale.ENGLISH, "%,.2f", totalPrice - discount));
}
@Override
public void afterTextChanged(Editable s) {
}
});
binding.btnSelectProduct.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!binding.etProductQty.getText().toString().equals("")) {
if (!binding.etProductQty.getText().toString().equals("0")) {
List<TradePromoionData> tradePromoionData = mDatabaseHandler.getTradePromoion(productsItem.getId());
SelectedProductHelper selectedOrderProduct = new SelectedProductHelper(
String.valueOf(productsItem.getId()),
productsItem.getName(),
binding.etProductQty.getText().toString(),
//productsItem.getPrice(),
binding.tvProductPrice.getText().toString(),
binding.tvTotalPrice.getText().toString(),
productsItem.getVariantRow() == null ? "0" : productsItem.getVariantRow(),
binding.tvDiscount.getText().toString() == null ? "0" : binding.tvDiscount.getText().toString(),
binding.tvGrandTotal.getText().toString() == null ? "0" : binding.tvGrandTotal.getText().toString(),
false,
binding.tvOfferName.getText().toString().length()>0? binding.tvOfferName.getText().toString()+" - "+binding.tvOfferQty.getText().toString():"PromotionalDiscount"
);
List<SelectedProductHelper> selectedProductHelperList= new ArrayList<>();
selectedProductHelperList.add(selectedOrderProduct);
try {
if(tradePromoionData.size()>0) {
SelectedProductHelper selectedFreeProduct = new SelectedProductHelper(
String.valueOf(tradePromoionData.get(0).getFreeProductId()),
tradePromoionData.get(0).getFreeProductName(),
//Dividing total quantity by promotion value then multiplied by the free quantity
String.valueOf((Integer.parseInt(binding.etProductQty.getText().toString()) / Integer.parseInt(tradePromoionData.get(0).getPromoionValue())) * Integer.parseInt(tradePromoionData.get(0).getFreeProductQty())),
"0",
"0",
"0",
"0",
"0",
true
);
selectedProductHelperList.add(selectedFreeProduct);
}
} catch (NumberFormatException e) {Log.e("tareq_test" , "Free Product not found");
}
Log.d("tareq_test" , "Slected "+new Gson().toJson(selectedProductHelperList));
mOnDialogSelectListener.onOrderSelect(selectedProductHelperList);
// orderProductRecyclerAdapter.onSetSelectedProduct(selectedProduct);
alertDialog.dismiss();
Toast.makeText(context, "Product added successfully", Toast.LENGTH_SHORT).show();
} else {
View view = binding.etProductQty;
binding.etProductQty.setError("0 should not be apply");
view.requestFocus();
}
} else {
View view = binding.etProductQty;
binding.etProductQty.setError(context.getString(R.string.error_field_required));
view.requestFocus();
}
}
});
binding.btnCancel.setOnClickListener(v -> alertDialog.dismiss());
alertDialog.setView(binding.getRoot());
alertDialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}",
"void set_num(ThreadContext tc, RakudoObject classHandle, double Value);",
"public static void SetNewNumber () {\n number = (int)(Math.random() * 9.1);\r\n\r\n // PROMPT THE USER\r\n System.out.println(\"A new number has been chosen.\... | [
"0.68987876",
"0.67771626",
"0.6716476",
"0.6591181",
"0.6589375",
"0.65857685",
"0.655454",
"0.655454",
"0.6534489",
"0.65256983",
"0.64025384",
"0.6339641",
"0.63281035",
"0.63266736",
"0.62942594",
"0.6246421",
"0.62124383",
"0.62035584",
"0.61939085",
"0.6180494",
"0.6155... | 0.0 | -1 |
create a linked list | public static void main(String args[]) {
LinkedList list = new LinkedList();
// add elements to the linked list
list.add("M");
list.add("A");
list.add("N");
list.add("is");
list.add("#");
list.addLast("1");
list.addFirst("A");
list.add(0, "A2");
System.out.println("The contents of the linked list are: " + list);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public linkedList() { // constructs an initially empty list\r\n\r\n }",
"public static <T> LinkedList<T> createLinkedList() {\n \t\treturn new LinkedList<T>();\n \t}",
"private void createNodes() {\n head = new ListNode(30);\n ListNode l2 = new ListNode(40);\n ListNode l3 = new ListNod... | [
"0.749157",
"0.74696577",
"0.72483957",
"0.7230346",
"0.71294373",
"0.7033085",
"0.70051867",
"0.6951693",
"0.69363004",
"0.6932975",
"0.69294286",
"0.68638206",
"0.68371",
"0.6830975",
"0.6829318",
"0.682508",
"0.6824437",
"0.67976785",
"0.6795462",
"0.6793856",
"0.6790482",... | 0.0 | -1 |
Finds the visible VDB Editor for the supplied VDB If an editor is NOT open for this vdb, then null is returned. | public VdbEditor getVdbEditor(final IFile vdb) {
final IWorkbenchWindow window = UiPlugin.getDefault()
.getCurrentWorkbenchWindow();
if (window != null) {
final IWorkbenchPage page = window.getActivePage();
if (page != null) {
VdbEditor editor = findEditorPart(page, vdb);
if( editor != null ) {
return editor;
}
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private VdbEditor findEditorPart(final IWorkbenchPage page, IFile vdbFile) {\n \t\tfinal IEditorReference[] editors = page.getEditorReferences();\n \t\tfor (int i = 0; i < editors.length; ++i) {\n \n \t\t\tfinal IEditorPart editor = editors[i].getEditor(false);\n \t\t\tif (editor instanceof VdbEditor) {\n \t\t\t\t... | [
"0.75510246",
"0.60944176",
"0.6056197",
"0.58349127",
"0.57790464",
"0.57669604",
"0.57573414",
"0.56758195",
"0.5588624",
"0.5584678",
"0.54064244",
"0.53981817",
"0.5353835",
"0.5265627",
"0.52384406",
"0.5219849",
"0.51855797",
"0.51855797",
"0.5173053",
"0.5139602",
"0.5... | 0.7714439 | 0 |
look through the open editors and see if there is one available for this model file. | private VdbEditor findEditorPart(final IWorkbenchPage page, IFile vdbFile) {
final IEditorReference[] editors = page.getEditorReferences();
for (int i = 0; i < editors.length; ++i) {
final IEditorPart editor = editors[i].getEditor(false);
if (editor instanceof VdbEditor) {
final VdbEditor vdbEditor = (VdbEditor) editor;
final IPath editorVdbPath = vdbEditor.getVdb().getName();
if (vdbFile.getFullPath().equals(editorVdbPath))
return vdbEditor;
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasEditor()\n\t{\n\t\treturn true;\n\t}",
"private boolean stillOpenElsewhere(IFile file)\n\t{\n\t\tSaveable[] openModels = getSaveableService().getOpenModels();\n\t\tfor (Saveable saveable: openModels)\n\t\t{\n\t\t\t// temporary solution until we will have the same unit of\n\t\t\t// saveability i... | [
"0.7043741",
"0.62238085",
"0.58248764",
"0.5772534",
"0.57292724",
"0.57228947",
"0.56810015",
"0.5679113",
"0.5658565",
"0.5608303",
"0.5607497",
"0.5585481",
"0.55772173",
"0.5560249",
"0.5480647",
"0.54004663",
"0.5397294",
"0.5382105",
"0.5367723",
"0.53511584",
"0.53470... | 0.5571646 | 13 |
Return current Meal that is displayed in catalogEditID text field | public Meal getCurrentMeal(){
if(launching)
return new Meal(false, R.theOrigionalMeal);
try {
boolean found=false;
for(int i=0; i<Catalog.size(); i++){
if(Catalog.get(i).getID()== getCatalogEditIDEntry()){
found=true;
return Catalog.get(i);
}
}
if(!found){
alert.error("***Meal not found in Catalog - "+Integer.toString(getCatalogEditIDEntry())+" - getCurrentMeal()***");
alert.error("**-> Returning theOrigionalMeal:");
R.theOrigionalMeal.print();
return new Meal(false, R.theOrigionalMeal);
}
} catch(NumberFormatException exe) {
exe.printStackTrace();
alert.error("***Meal not found in Catalog - "+Integer.toString(getCatalogEditIDEntry())+" - getCurrentMeal()***");
alert.error("Input is not a valid integer - getCurrentMeal()");
alert.error("***Retrivied from catalogEditID.getText() - "+Integer.toString(getCatalogEditIDEntry())+" - getCurrentMeal()***");
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMealCode() {\n return mealCode;\n }",
"public int getAddEditMenuText();",
"public String getMealName() {\n return name.getText().toString();\n }",
"public String getMetaversalID();",
"String getEditore();",
"public String getSelected()\n\t{\n\t\treturn _current.ID;\n\... | [
"0.6215578",
"0.59982836",
"0.5985156",
"0.5656415",
"0.5463809",
"0.5460961",
"0.53909457",
"0.53864425",
"0.5335492",
"0.53229064",
"0.53223526",
"0.53073645",
"0.5281818",
"0.5263863",
"0.52618474",
"0.5243297",
"0.52239716",
"0.52161276",
"0.51889986",
"0.5173532",
"0.514... | 0.67902756 | 0 |
Convert editID text to Integer | public int getCatalogEditIDEntry(){
int entry = 0;
try{
if(Integer.parseInt(catalogEditID.getText()) > 0)
entry = Integer.parseInt(catalogEditID.getText());
else {
entry = 0;
//if(!errorOverride)
// alert.error("Input is not a valid integer - catalogEditID is zero or less than - getCatalogEditIDEntry()"); //caught elsewhere unneeded
}
} catch(NumberFormatException ex) {
entry = 0;
// if(!errorOverride)
alert.error("Input is not a valid integer - NumberFormatException - getCatalogEditIDEntry()");
alert.error("getCatalogEditIDEntry() - Entry: >"+catalogEditID.getText()+"<");
}
return entry;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int getInt(EditText et) {\n String text = getText(et);\n return convertToInt(text);\n }",
"public int toInt(){\n\t\tString s = txt().trim();\n\t\tint i;\n\t\ttry{\n\t\t\ti = Integer.parseInt(s);\n\t\t}catch(NumberFormatException exp){\n\t\t\texp.printStackTrace();\n\t\t\treturn 0;\... | [
"0.6621606",
"0.6322119",
"0.6265973",
"0.583268",
"0.5820928",
"0.57852286",
"0.57776785",
"0.57398796",
"0.5718141",
"0.571296",
"0.5710311",
"0.56793505",
"0.5656629",
"0.5625095",
"0.5589244",
"0.5581941",
"0.555642",
"0.55526996",
"0.55320746",
"0.5482108",
"0.54755837",... | 0.69447255 | 0 |
Created by Limuyang on 2016/12/9. | public interface IBingPresenter {
void getUrlInfo(List<String> IMAGES);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r... | [
"0.61023057",
"0.59644306",
"0.587211",
"0.5815701",
"0.5809306",
"0.5809306",
"0.57971185",
"0.5761371",
"0.5742755",
"0.5685529",
"0.56648815",
"0.5660394",
"0.5657991",
"0.56394756",
"0.56339383",
"0.5625925",
"0.56214786",
"0.559814",
"0.55930984",
"0.5589832",
"0.5586878... | 0.0 | -1 |
Helper method I made up one day, to work around the lack of documentation about font sizes in Android. This function is only "partially debugged" and I do not guarantee its accuracy. | public static float findThePerfectFontSize(float lowerThreshold) {
float fontSize = 1;
Paint p = new Paint();
p.setTextSize(fontSize);
while (true) {
float asc = -p.getFontMetrics().ascent;
if (asc > lowerThreshold) {
break;
}
fontSize++;
p.setTextSize(fontSize);
}
return fontSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getFontSize();",
"public float getFontSize();",
"private static void loadTextSizes(Context context)\n\t{\n\t\tDisplayMetrics metrics = context.getResources().getDisplayMetrics();\n\t\tTEXT_SIZE = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 14, metrics);\n\t\tTEXT_SIZE_BIG = (int)Type... | [
"0.7470713",
"0.73779166",
"0.7142127",
"0.6919711",
"0.6906408",
"0.6892034",
"0.68852466",
"0.6862815",
"0.68244874",
"0.6808746",
"0.6686933",
"0.66774446",
"0.66736394",
"0.6605325",
"0.6546584",
"0.650483",
"0.64807945",
"0.64797235",
"0.64729476",
"0.6458243",
"0.640221... | 0.6176634 | 38 |
TODO override onDestroy, and stop the background music. | @Override
public void onDestroy() {
super.onDestroy();
music.release();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (mMediaPlayer.isPlaying()) {\n\t\t\tmMediaPlayer.stop();\n\t\t}\n\t}",
"@Override\n protected void onStop() {\n super.onStop();\n stopMusic();\n }",
"public void stopBackgroundMusic()\n {\n background.stop()... | [
"0.8293998",
"0.8289883",
"0.8227618",
"0.8128878",
"0.80895054",
"0.80842054",
"0.78227645",
"0.7806463",
"0.77840024",
"0.7764928",
"0.7743231",
"0.7683803",
"0.7648199",
"0.76461565",
"0.76195574",
"0.75817996",
"0.75001925",
"0.7489135",
"0.74425",
"0.7425725",
"0.7404521... | 0.8641552 | 0 |
Given the loaded Data from the default schema.sql and data.sql | @Test
public void whenFindById_thenReturnSdlcSystem() throws Exception {
SdlcSystem newSdlcSystem = (SdlcSystem)appendDates(getSdlcSystem("https://java.itunufatoki.com"));
newSdlcSystem = entityManager.merge(newSdlcSystem);
entityManager.flush();
// When
SdlcSystem sdlcSystem = sdlcSystemRepository.findById(newSdlcSystem.getId()).get();
// Then
assertThat(sdlcSystem.getId()).isEqualTo(newSdlcSystem.getId());
assertThat(sdlcSystem.getBaseUrl()).isEqualTo(newSdlcSystem.getBaseUrl());
assertThat(sdlcSystem.getDescription()).isEqualTo(newSdlcSystem.getDescription());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void importDefaultData()\n {\n LOG.info(\"Importing Data\");\n Session session = HibernateUtil.currentSession();\n Transaction tx = session.beginTransaction();\n Session dom4jSession = session.getSession(EntityMode.DOM4J);\n\n SAXReader saxReader = new SAXReader();\n... | [
"0.64185447",
"0.63177365",
"0.6157045",
"0.6093784",
"0.6033812",
"0.59122944",
"0.59074265",
"0.5884914",
"0.58197623",
"0.5811842",
"0.5811842",
"0.5727671",
"0.5717864",
"0.57050675",
"0.56748277",
"0.56563205",
"0.56563205",
"0.56489706",
"0.5619291",
"0.56055456",
"0.56... | 0.0 | -1 |
Validates the agent values after initializing the default constructor | public void testEmptyConstructor() {
Agent agent = new Agent();
assertNull(agent.getName(), "Agent name should have not been initialized.");
assertNull(agent.getVersion(), "Agent version should have not been initialized.");
assertEquals(agent.toString(), "", "Agent display representation should not be valid.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testConstructor() {\n String name = \"moo\";\n String version = \"1.5\";\n\n Agent agent = new Agent(name, version);\n\n assertEquals(agent.getName(), name, \"Unexpected agent name.\");\n assertEquals(agent.getVersion(), version, \"Unexpected agent version.\");\n ... | [
"0.6300563",
"0.61675054",
"0.6131758",
"0.6091594",
"0.6041405",
"0.598475",
"0.596037",
"0.59183246",
"0.5826038",
"0.579244",
"0.57904714",
"0.57870716",
"0.57549214",
"0.5750004",
"0.57122105",
"0.5693419",
"0.56887025",
"0.56842446",
"0.5674261",
"0.56737614",
"0.5670056... | 0.6042375 | 4 |
Validates the agent values after initializing the main constructor | public void testConstructor() {
String name = "moo";
String version = "1.5";
Agent agent = new Agent(name, version);
assertEquals(agent.getName(), name, "Unexpected agent name.");
assertEquals(agent.getVersion(), version, "Unexpected agent version.");
assertEquals(agent.toString(), name + "/" + version, "Unexpected agent display representation.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initializeAgent() {\n if (Math.random() < PROBABILITY_START_WITH_AGENT) {\n agent = new SugarscapeAgent();\n }\n }",
"private void validate() {\n Validate.notNull(uriLocatorFactory);\n Validate.notNull(preProcessorExecutor);\n }",
"private void validateParameters... | [
"0.62526715",
"0.6069351",
"0.5994545",
"0.59797156",
"0.59701985",
"0.59652764",
"0.5954975",
"0.59029794",
"0.58794636",
"0.5802833",
"0.5781097",
"0.57424",
"0.5715985",
"0.57075727",
"0.5704958",
"0.5704676",
"0.56481934",
"0.56384265",
"0.5635752",
"0.56346196",
"0.56310... | 0.5820505 | 9 |
Validates the agent values after using the agent setters | public void testSetters() {
String name = "pop";
String version = "2.3";
Agent agent = new Agent("moo", "1.5");
agent.setName(name);
agent.setVersion(version);
assertEquals(agent.getName(), name, "Unexpected agent name.");
assertEquals(agent.getVersion(), version, "Unexpected agent version.");
assertEquals(agent.toString(), name + "/" + version, "Unexpected agent display representation.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void validate() throws Exception{\t\n\t\tsuper.validate();\n\t\tvalidateProperty(PROPERTY_KEY_USERNAME);\n\t}",
"@Override\n public void afterPropertiesSet() {\n validateProperties();\n }",
"private void validateInputParameters(){\n\n }",
"private void check()\n {\n Precond... | [
"0.5912037",
"0.5901056",
"0.5818946",
"0.5772689",
"0.5757928",
"0.5742319",
"0.57246643",
"0.5691682",
"0.56870574",
"0.56759167",
"0.56759167",
"0.56759167",
"0.5635271",
"0.5616466",
"0.5589546",
"0.5575645",
"0.55575305",
"0.5529436",
"0.55104095",
"0.54985434",
"0.54903... | 0.5238618 | 49 |
Obtenccion del certificado para poder trabajar con twitter | public static Twitter crearTwitter(){
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true)
.setOAuthConsumerKey("WX0FvnWENusasa09R8IVG6FFm")
.setOAuthConsumerSecret("Z6cXLTiqkU6NvlhqEHD7Br3S0jhmtUiLPvOPXCqLcrhQKFMYNr")
.setOAuthAccessToken("509341639-6R41f6i6WUAQn1xfzI8uNbPeyIhQvkMnXYaszNv6")
.setOAuthAccessTokenSecret("We08mCgnLMPXn6zl8UrKwGegac0Z4ksrI0LwhAbBoxp5q");
TwitterFactory tf = new TwitterFactory(cb.build());
return tf.getInstance();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void obtenerCertificado() {\n\n\t\tcertificado = generarCertificado(lasLlaves);\n\n\t\ttry {\n\n\t\t\tString cert = in.readLine();\n\t\t\tbyte[] esto = parseBase64Binary(cert);\n\t\t\tCertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n\t\t\tInputStream is = new ByteArrayInputStream(esto);\... | [
"0.5872696",
"0.5588093",
"0.54860216",
"0.5295017",
"0.5291987",
"0.5269178",
"0.5231261",
"0.5230404",
"0.5220373",
"0.51750135",
"0.51389754",
"0.5090379",
"0.50570047",
"0.4990562",
"0.4984492",
"0.49684584",
"0.49684584",
"0.49567136",
"0.49560887",
"0.49536005",
"0.4949... | 0.0 | -1 |
Obtenccion del certificado para poder trabajar con twitter | public static Twitter crearTwitter(String ConsumerKey, String ConsumerSecret, String AccessToken, String TokenSecret){
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true)
.setOAuthConsumerKey(ConsumerKey)
.setOAuthConsumerSecret(ConsumerSecret)
.setOAuthAccessToken(AccessToken)
.setOAuthAccessTokenSecret(TokenSecret);
TwitterFactory tf = new TwitterFactory(cb.build());
return tf.getInstance();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void obtenerCertificado() {\n\n\t\tcertificado = generarCertificado(lasLlaves);\n\n\t\ttry {\n\n\t\t\tString cert = in.readLine();\n\t\t\tbyte[] esto = parseBase64Binary(cert);\n\t\t\tCertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n\t\t\tInputStream is = new ByteArrayInputStream(esto);\... | [
"0.5872696",
"0.5588093",
"0.54860216",
"0.5295017",
"0.5291987",
"0.5269178",
"0.5231261",
"0.5230404",
"0.5220373",
"0.51750135",
"0.51389754",
"0.5090379",
"0.50570047",
"0.4990562",
"0.4984492",
"0.49684584",
"0.49684584",
"0.49567136",
"0.49560887",
"0.49536005",
"0.4949... | 0.0 | -1 |
Get the bootstrap environment including system environemtn and system properties | public static ConfigurableEnvironment getBootstrapEnvironment(ResourceLoader resourceLoader, String[] profiles) {
StandardEnvironment environment = new StandardEnvironment();
environment.setActiveProfiles(profiles);
List<String> locations = Arrays.stream(profiles)
.map(profile -> ResourceUtils.CLASSPATH_URL_PREFIX + "bootstrap-" + profile + ".properties")
.collect(Collectors.toList());
locations.add(ResourceUtils.CLASSPATH_URL_PREFIX + "bootstrap.properties");
ResourceLoader loader = resourceLoader == null ? new DefaultResourceLoader() : resourceLoader;
locations.forEach(location -> addPropertiesFileToEnvironment(environment, loader, location));
return environment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Properties getEnvironment();",
"Properties getEnvironment();",
"public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIR... | [
"0.7881328",
"0.7881328",
"0.784955",
"0.7772044",
"0.73419636",
"0.7043866",
"0.69516045",
"0.6951044",
"0.6951044",
"0.69483334",
"0.6941335",
"0.682939",
"0.68187666",
"0.67414063",
"0.6711882",
"0.6679996",
"0.6674616",
"0.66155493",
"0.65828395",
"0.6563429",
"0.6558738"... | 0.6280571 | 31 |
Get a properties file and add to the environment | public static void addPropertiesFileToEnvironment(ConfigurableEnvironment environment, ResourceLoader resourceLoader, String location) {
String resolvedLocation = environment.resolveRequiredPlaceholders(location);
Resource resource = resourceLoader.getResource(resolvedLocation);
if (resource.exists()) {
try {
environment.getPropertySources().addLast(new ResourcePropertySource(resource));
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n ... | [
"0.72301894",
"0.7076613",
"0.702492",
"0.695232",
"0.69348",
"0.6874851",
"0.6851758",
"0.6807191",
"0.6754652",
"0.6694749",
"0.6676743",
"0.6673711",
"0.66619366",
"0.66590333",
"0.665756",
"0.66276896",
"0.65890336",
"0.6582575",
"0.65808505",
"0.6548083",
"0.6538095",
... | 0.0 | -1 |
Create bootstrap application context with the supplied active profiles | public static ConfigurableApplicationContext create(String[] profiles) {
AnnotationConfigApplicationContext bootstrapContext = new AnnotationConfigApplicationContext();
// Get bootstrap environment and add to a composite property source
ConfigurableEnvironment bootstrapEnvironment = getBootstrapEnvironment(bootstrapContext, profiles);
MutablePropertySources bootstrapPropertySources = bootstrapEnvironment.getPropertySources();
bootstrapPropertySources.remove(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME);
bootstrapPropertySources.remove(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME);
CompositePropertySource bootstrapPropertySource = new CompositePropertySource("bootstrap");
bootstrapPropertySources.forEach(bootstrapPropertySource::addPropertySource);
bootstrapContext.getEnvironment().getPropertySources().addLast(bootstrapPropertySource);
ClassLoader classLoader = bootstrapContext.getClassLoader();
List<String> names = SpringFactoriesLoader
.loadFactoryNames(BootstrapConfiguration.class, classLoader);
List<Class<?>> sources = new ArrayList<>();
for (String name : names) {
sources.add(ClassUtils.resolveClassName(name, classLoader));
}
AnnotationAwareOrderComparator.sort(sources);
bootstrapContext.setEnvironment(bootstrapEnvironment);
sources.forEach(bootstrapContext::register);
bootstrapContext.refresh();
return bootstrapContext;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PostConstruct\r\n\t public void initApplication() {\r\n\t log.info(\"Running with Spring profile(s) : {}\", Arrays.toString(env.getActiveProfiles()));\r\n\t Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());\r\n\t if (activeProfiles.contains(Constants.SPRING_PROFIL... | [
"0.62302846",
"0.6020415",
"0.59655446",
"0.5931502",
"0.5855035",
"0.5525925",
"0.5497527",
"0.5441762",
"0.53755563",
"0.53265935",
"0.5304426",
"0.52873814",
"0.52092105",
"0.50457644",
"0.49491674",
"0.49115357",
"0.4892114",
"0.48584235",
"0.48563382",
"0.48320454",
"0.4... | 0.7027807 | 0 |
This function is called at the start of each round You are required to return the Move your player will play before the timeout. | @Override
public Move stateMachineSelectMove(long timeout) throws TransitionDefinitionException, MoveDefinitionException, GoalDefinitionException
{
long start = System.currentTimeMillis();
List<Move> moves = getStateMachine().findLegals(getRole(), getCurrentState());
// Legal gamer always selects the 0-indexed move from the move list
Move selection = (moves.get(0));
long stop = System.currentTimeMillis();
notifyObservers(new GamerSelectedMoveEvent(moves, selection, stop - start));
return selection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void makeRandonMove() {\r\n\t\tif (randPlayer.getPlayerNumber() == game.getState().getTurn() && !game.getState().isFinished()) game.execute(randPlayer.requestAction(game.getState()));\r\n\t}",
"@Override\n public PlayerMove move() {\n\n return null;\n }",
"public void play() ... | [
"0.68440574",
"0.65614563",
"0.6495794",
"0.6494684",
"0.648468",
"0.6475611",
"0.6397357",
"0.63531834",
"0.63480324",
"0.6331621",
"0.6309658",
"0.6302896",
"0.6271269",
"0.6245397",
"0.6233656",
"0.6226943",
"0.62181",
"0.6213627",
"0.61843675",
"0.617221",
"0.61541736",
... | 0.0 | -1 |
in this case we take the center of the image | @Override
public boolean isCollided(SpaceShip invader, Rocket rocket) {
//(posX + width) /2 , (posY + height) /2
int spaceshipCenterX = (int)(invader.getPosition().getX() + invader.getSize().getWidth()) / 2;
int spaceshipCenterY = (int)(invader.getPosition().getY() + invader.getSize().getHeight()) / 2;
Point spaceshipCenter = new Point(spaceshipCenterX, spaceshipCenterY);
if (spaceshipCenter == rocket.getPosition())
return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Point2D.Double getImageCenter();",
"private double centerX() {\n return (piece.boundingBox().getWidth() % 2) / 2.0;\n }",
"public Point getCenter() {\n \treturn new Point(x+width/2,y+height/2);\n }",
"public Point getCenterPx(){\n\t\tint centerX = images[0].getWidth()/2;\n\t\tint centerY = ima... | [
"0.79027",
"0.7355608",
"0.7320047",
"0.72759384",
"0.7183184",
"0.70432806",
"0.70432806",
"0.6992719",
"0.69481826",
"0.69337815",
"0.6924803",
"0.6923621",
"0.69144505",
"0.688769",
"0.6883937",
"0.6878905",
"0.685506",
"0.6852654",
"0.681547",
"0.6804136",
"0.67690724",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
@Transactional
public long createJob(Job job) {
return 0;
} | {
"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 | @Override
@Transactional
public Job updateJob(Job job) {
return null;
} | {
"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 | @Override
@Transactional
public void deleteJob(String jobId) {
} | {
"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 |
This method is used to calculate shortest distance between nodes via Dijkstra algorithm | @Override
public Double calculateShortestPathFromSource(String from, String to) {
Node source = graph.getNodeByName(from);
Node destination = graph.getNodeByName(to);
source.setDistance(0d);
Set<Node> settledNodes = new HashSet<>();
PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));
unsettledNodes.add(source);
while (unsettledNodes.size() != 0) {
Node currentNode = unsettledNodes.poll();
for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {
Node adjacentNode = adjacencyPair.getKey();
Double distance = adjacencyPair.getValue();
if (!settledNodes.contains(adjacentNode)) {
calculateMinimumDistance(adjacentNode, distance, currentNode);
unsettledNodes.add(adjacentNode);
}
}
settledNodes.add(currentNode);
}
return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\... | [
"0.77123165",
"0.76504457",
"0.7581474",
"0.7530163",
"0.7478594",
"0.7407208",
"0.7403974",
"0.7391489",
"0.73838466",
"0.73834026",
"0.73091626",
"0.724805",
"0.7216066",
"0.7155141",
"0.7149885",
"0.71219414",
"0.71182835",
"0.7108804",
"0.7096276",
"0.70859367",
"0.707904... | 0.73703194 | 10 |
This method is used to get graph | @Override
public Graph getGraph() {
return graph;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Graph getGraph();",
"@RequestMapping(value=\"/async/graph\", method=RequestMethod.GET)\n\tpublic @ResponseBody GraphPojo getGraph() {\n\t\tList<Collection> collections = collectionService.findAllCurrent();\n\t\tList<Agent> agents = agentService.findAllCurrent();\n\t\tList<NodePojo> nodes = new ArrayList<N... | [
"0.83648586",
"0.77198213",
"0.7700829",
"0.75268734",
"0.7476194",
"0.73836154",
"0.73490924",
"0.73268193",
"0.7249127",
"0.72162807",
"0.7168627",
"0.71456784",
"0.714078",
"0.7136925",
"0.7098937",
"0.70934206",
"0.7017096",
"0.69850737",
"0.6974522",
"0.69349635",
"0.688... | 0.7940244 | 1 |
Set the submit URI | public void setSubmit(String submit) {
this.submit = submit;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRequestURI(URI requestURI);",
"java.lang.String getFormUri();",
"@Override\n\tpublic void setSubmitArgs(String submitArgs) {\n\t\tmodel.setSubmitArgs(submitArgs);\n\t}",
"public void setFormUri(Uri formUri) {\r\n mFormUri = formUri;\r\n }",
"public void setReqUri(java.lang.String... | [
"0.6286817",
"0.60050726",
"0.5954646",
"0.59294736",
"0.58182204",
"0.5629855",
"0.5579027",
"0.5504695",
"0.54170835",
"0.54083735",
"0.54077023",
"0.5355907",
"0.5348242",
"0.5348242",
"0.53420234",
"0.5337878",
"0.5262516",
"0.5219",
"0.52044654",
"0.5201532",
"0.5191985"... | 0.6225346 | 1 |
Set the page context | public void setContext(PageContext context) {
this.context = context;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void setPageContext(PageContext arg0) {\n \n }",
"public void setPageContext(PageContext pageContext) {\n this.pageContext = pageContext;\n }",
"@Override\r\n\tpublic void setPageContext(PageContext arg0) {\n\t\tthis.pageContext = arg0;\r\n\t}",
"@Override\n\tpublic ... | [
"0.8174901",
"0.79849285",
"0.7978655",
"0.7972399",
"0.6953741",
"0.69438297",
"0.6920521",
"0.68922806",
"0.67189246",
"0.671735",
"0.6710666",
"0.6704506",
"0.6667293",
"0.6660024",
"0.6651163",
"0.6598036",
"0.643424",
"0.64249426",
"0.6379164",
"0.635315",
"0.63345057",
... | 0.84021145 | 0 |
Set the "dialogMap" object [of the host JSP] | public void setDialogMap(Map dialogMap) {
this.dialogMap = dialogMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setGuiHashMap() {\n\n gameMap.setGetGuiHashMapParameter(\"author\",\"Default authorName\");\n gameMap.setGetGuiHashMapParameter(\"warn\",\"Default warning\");\n gameMap.setGetGuiHashMapParameter(\"image\",\"Default image\");\n gameMap.setGetGuiHashMapParameter(\"wrap\",\"Def... | [
"0.57514375",
"0.54437166",
"0.5373724",
"0.53679633",
"0.53125805",
"0.530364",
"0.52881855",
"0.52755064",
"0.5252825",
"0.5245053",
"0.5233707",
"0.5215079",
"0.52065945",
"0.51986986",
"0.5098378",
"0.5098378",
"0.5091073",
"0.50670534",
"0.5048051",
"0.5043892",
"0.50438... | 0.7441334 | 0 |
Collect data from the RDC layer and post it into the viewsMap according to the RDCstruts interface contract | public void doTag()
throws IOException, JspException, JspTagException {
JspWriter out = context.getOut();
if (!RDCUtils.isStringEmpty(namelist)) {
// (1) Access/create the views map
Map viewsMap = (Map) context.getSession().
getAttribute(ATTR_VIEWS_MAP);
if (viewsMap == null) {
viewsMap = new HashMap();
context.getSession().setAttribute(ATTR_VIEWS_MAP, viewsMap);
}
// (2) Populate form data
Map formData = new HashMap();
StringTokenizer nameToks = new StringTokenizer(namelist, " ");
while (nameToks.hasMoreTokens()) {
String name = nameToks.nextToken();
formData.put(name, context.getAttribute(name));
}
// (3) Store the form data according to the RDC-struts
// interface contract
String key = "" + context.hashCode();
viewsMap.put(key, formData);
context.getRequest().setAttribute(ATTR_VIEWS_MAP_KEY, key);
}
if (!RDCUtils.isStringEmpty(clearlist)) {
// (4) Clear session state based on the clearlist
if (dialogMap == null) {
throw new IllegalArgumentException(ERR_NO_DIALOGMAP);
}
StringTokenizer clearToks = new StringTokenizer(clearlist, " ");
outer:
while (clearToks.hasMoreTokens()) {
String clearMe = clearToks.nextToken();
String errMe = clearMe;
boolean cleared = false;
int dot = clearMe.indexOf('.');
if (dot == -1) {
if(dialogMap.containsKey(errMe)) {
dialogMap.remove(errMe);
cleared = true;
}
} else {
// TODO - Nested data model re-initialization
BaseModel target = null;
String childId = null;
while (dot != -1) {
try {
childId = clearMe.substring(0,dot);
if (target == null) {
target = (BaseModel) dialogMap.get(childId);
} else {
if ((target = RDCUtils.getChildDataModel(target,
childId)) == null) {
break;
}
}
clearMe = clearMe.substring(dot+1);
dot = clearMe.indexOf('.');
} catch (Exception e) {
MessageFormat msgFormat =
new MessageFormat(ERR_CANNOT_CLEAR);
log.warn(msgFormat.format(new Object[] {errMe}));
continue outer;
}
}
if (target != null) {
cleared = RDCUtils.clearChildDataModel(target,
clearMe);
}
}
if (!cleared) {
MessageFormat msgFormat =
new MessageFormat(ERR_CANNOT_CLEAR);
log.warn(msgFormat.format(new Object[] {errMe}));
}
}
}
// (5) Forward request
try {
context.forward(submit);
} catch (ServletException e) {
// Need to investigate whether refactoring this
// try to provide blanket coverage makes sense
MessageFormat msgFormat = new MessageFormat(ERR_FORWARD_FAILED);
// Log error and send error message to JspWriter
out.write(msgFormat.format(new Object[] {submit, namelist}));
log.error(msgFormat.format(new Object[] {submit, namelist}));
} // end of try-catch
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface WaterAndSandDetailsView extends BaseView {\n void successData(Map<String, String> data);\n\n}",
"@LogMethod\r\n private void publishDataToVisitBasedStudy()\r\n {\r\n log(\"Prepare visit map to check PTID counts in study navigator.\");\r\n\r\n navigateToFolder(getProjectNam... | [
"0.5898399",
"0.5816825",
"0.55566466",
"0.5527435",
"0.54994375",
"0.5499295",
"0.54386485",
"0.54283804",
"0.54217315",
"0.53734016",
"0.53731287",
"0.53606766",
"0.53503686",
"0.5323135",
"0.5307524",
"0.5285106",
"0.5273416",
"0.52401227",
"0.5232822",
"0.5230522",
"0.522... | 0.0 | -1 |
Retrieve data posted to viewsMap for this request according to the RDCstruts interface contract, and populate the ActionForm using this data. | public static void populate(ActionForm formBean, HttpServletRequest req,
ActionErrors errors) {
Map viewsMap = (Map) req.getSession().getAttribute(ATTR_VIEWS_MAP);
Map formData = (Map) viewsMap.get(req.getAttribute(ATTR_VIEWS_MAP_KEY));
try {
BeanUtils.populate(formBean, formData);
} catch (IllegalAccessException iae) {
log.error(ERR_ILLEGAL_ACCESS);
errors.add(ERR_POP_FORM_BEAN, new ActionMessage(ERR_ILLEGAL_ACCESS));
} catch (InvocationTargetException ite) {
log.error(ERR_ILLEGAL_INVOC);
errors.add(ERR_POP_FORM_BEAN, new ActionMessage(ERR_ILLEGAL_INVOC));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PostConstruct\n\tpublic void view() {\n\t\tif (log.isDebugEnabled()) {\n log.debug(\"Entering 'ConsultaHIPCuentaCorrientesAction - view' method\");\n }\n\t\tMap<String, String> parametros = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();;\n\t\tthis.parametrosPant... | [
"0.5290527",
"0.5242913",
"0.5170634",
"0.5165535",
"0.5119865",
"0.5051311",
"0.50394064",
"0.5035321",
"0.5002642",
"0.5002406",
"0.49894032",
"0.49887493",
"0.49750638",
"0.49667946",
"0.49600244",
"0.49389374",
"0.4938133",
"0.49346793",
"0.4928017",
"0.49091488",
"0.4899... | 0.5390947 | 0 |
Attempt to add log to batch, and suppress exceptions thrown in case of failure | void tryAddLogToBatch(TelemetryData log); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addLogToBatch(TelemetryData log) throws IOException;",
"@Override\r\n\tpublic void addLog(Log log) throws RuntimeException {\n\t\tlogMapper.addLog(log);\r\n\t}",
"void addLogEntry(LogEntry entry) throws LogEntryOperationFailedException;",
"private void addLog(String log) {\n LogHelper.addIdentifi... | [
"0.7397246",
"0.6475702",
"0.60127354",
"0.57387733",
"0.57323337",
"0.5667867",
"0.5647763",
"0.55810136",
"0.5577284",
"0.5568325",
"0.55555254",
"0.551045",
"0.54716986",
"0.54678875",
"0.5446003",
"0.5406738",
"0.5338274",
"0.53247523",
"0.53093004",
"0.52667135",
"0.5266... | 0.82406634 | 0 |
Attempt to add log to batch, and suppress exceptions thrown in case of failure | void addLogToBatch(TelemetryData log) throws IOException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void tryAddLogToBatch(TelemetryData log);",
"@Override\r\n\tpublic void addLog(Log log) throws RuntimeException {\n\t\tlogMapper.addLog(log);\r\n\t}",
"void addLogEntry(LogEntry entry) throws LogEntryOperationFailedException;",
"private void addLog(String log) {\n LogHelper.addIdentificationLog(log);\... | [
"0.8241152",
"0.647484",
"0.60118645",
"0.5739178",
"0.5731129",
"0.56676114",
"0.5646765",
"0.55795276",
"0.5575603",
"0.5568036",
"0.555553",
"0.5509932",
"0.5469999",
"0.5465553",
"0.5445959",
"0.5407703",
"0.5336798",
"0.5324981",
"0.5310355",
"0.52663493",
"0.52648664",
... | 0.73989594 | 1 |
Close telemetry connector and send any unsubmitted logs | void close() throws IOException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void disconnect() {\n connector.disconnect();\n // Unregister from activity lifecycle tracking\n application.unregisterActivityLifecycleCallbacks(activityLifecycleTracker);\n getEcologyLooper().quit();\n }",
"public static void close()\n {\n if(!info) return;\n deb... | [
"0.60290575",
"0.59553194",
"0.59367967",
"0.5917388",
"0.5888458",
"0.5882708",
"0.58756137",
"0.5817929",
"0.58078325",
"0.5801313",
"0.5782931",
"0.5759714",
"0.5686659",
"0.5661905",
"0.56561524",
"0.5654497",
"0.5637187",
"0.5634642",
"0.5628979",
"0.5605145",
"0.5595177... | 0.0 | -1 |
Send all cached logs to server | boolean sendBatch() throws IOException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void logAllMessages() {\r\n HistoricalMessage message;\r\n SessionProvider provider = SessionProvider.createSystemProvider();\r\n while (!logQueue.isEmpty()) {\r\n message = logQueue.poll();\r\n if (message != null) {\r\n this.addHistoricalMessage(message, provider);\r\n }\r\... | [
"0.598744",
"0.5859029",
"0.5826784",
"0.5796279",
"0.5725679",
"0.5705878",
"0.56872237",
"0.5684448",
"0.5675174",
"0.56162435",
"0.55781674",
"0.5574809",
"0.55294055",
"0.5477848",
"0.5472668",
"0.5432303",
"0.54209465",
"0.54000854",
"0.53962964",
"0.5346015",
"0.5295627... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
int[] a1 = {1,2,3,4,5,6,7,8,9};
System.out.println(containsDuplicates(a1));
int[] a2 = {1,2,3,4,6,6,7,8,9};
System.out.println(containsDuplicates(a2));
} | {
"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 |
Json string to object | public static <T> T parse(String value, Class<T> clz){
if (StringUtils.isEmpty(value)) {
return null;
}
try {
return mapper.readValue(value, clz);
}
catch (Exception e) {
throw new IllegalStateException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"T fromJson(Object source);",
"public native Object parse( Object json );",
"<T> T fromJson(String json, Class<T> type);",
"public static <T> T string2Object(String source, Class<T> type){\n\t\treturn JSON.parseObject(source, type);\n\t}",
"public static final <V> V toObject(String json, Type type) {\n ... | [
"0.71494097",
"0.7062762",
"0.70175093",
"0.69727683",
"0.69477737",
"0.6932658",
"0.68742764",
"0.68595517",
"0.67602444",
"0.6724088",
"0.66787654",
"0.6669467",
"0.6604954",
"0.657764",
"0.6540441",
"0.6539313",
"0.6532676",
"0.65253866",
"0.65149105",
"0.6502414",
"0.6500... | 0.0 | -1 |
Created by CodeGenerator on 2018/11/04. | public interface ISystemUpdateHistoryService extends IBaseService<SystemUpdateHistory> {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n p... | [
"0.60661477",
"0.6056204",
"0.60023725",
"0.59618723",
"0.59618723",
"0.5921887",
"0.584636",
"0.58240503",
"0.58086663",
"0.5758939",
"0.575788",
"0.5727575",
"0.57261026",
"0.57195747",
"0.57195747",
"0.57195747",
"0.57195747",
"0.57195747",
"0.57195747",
"0.5700906",
"0.56... | 0.0 | -1 |
set the data into each viewHolder (ie. place what each emotion has into the view) | @Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.title.setText(problems.getProblem(position).getTitle());
holder.date.setText(problems.getProblem(position).getDate());
holder.description.setText(problems.getProblem(position).getDescription());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void populateViews() {\n TextView songName = findViewById(R.id.songName);\n songName.setText(songs.getSongName());\n TextView albumName = findViewById(R.id.albumPlayerAlbumName);\n albumName.setText(songs.getAlbumName());\n TextView artistName = findViewById(R.id.albumPla... | [
"0.671597",
"0.6614927",
"0.6609814",
"0.64849424",
"0.6343432",
"0.6333869",
"0.63174284",
"0.6283455",
"0.6262721",
"0.6251692",
"0.6246769",
"0.62404364",
"0.62311316",
"0.6212745",
"0.61719453",
"0.6169424",
"0.61564815",
"0.61474866",
"0.6144732",
"0.6135087",
"0.6125161... | 0.0 | -1 |
set onClick listener for each problem, so they can be edited | @Override
public void onClick(View v) {
int position = getAdapterPosition();
FragmentManager manager = adapter.activity.getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
Log.d("ProblemAdapter", "we are on index: " + position);
RecordsFragment fragment = RecordsFragment.newInstance(position);
transaction.addToBackStack(null);
transaction.replace(R.id.content, fragment);
transaction.commit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ProblemPostAdapter(List<Problem> problemSet, PostProblemViewHolder.OnClickListener onClickListener) {\n mDataSet = problemSet;\n this.onClickListener = onClickListener;\n }",
"protected void onClick() {\n for(Runnable action : onClick) action.run();\n }",
"private void setClic... | [
"0.66873264",
"0.61740285",
"0.61695665",
"0.6134984",
"0.6028738",
"0.5950286",
"0.59229606",
"0.5857231",
"0.5839922",
"0.5827",
"0.5812425",
"0.57884055",
"0.5765075",
"0.5745176",
"0.5745176",
"0.5745176",
"0.5742281",
"0.573374",
"0.5731646",
"0.5727194",
"0.5723694",
... | 0.0 | -1 |
This constructs an instance from a factory and a notifier. | public tzpropOptionalItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Factory() {\n this(getInternalClient());\n }",
"public Factory() {\n\t\tsuper();\n\t}",
"private VerifierFactory() {\n }",
"public InternalFloaterFactory() {\n super();\n }",
"public static Factory factory() {\n return ext_h::new;\n }",
"public ObjectifyFa... | [
"0.6554377",
"0.6267452",
"0.6110438",
"0.6079239",
"0.60466135",
"0.604489",
"0.60234535",
"0.59148544",
"0.5899164",
"0.58979696",
"0.5893641",
"0.58793443",
"0.5844335",
"0.58347386",
"0.58312017",
"0.5821703",
"0.58199847",
"0.5806926",
"0.5787606",
"0.57490224",
"0.57250... | 0.0 | -1 |
This returns the property descriptors for the adapted class. | @Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addCommentPropertyDescriptor(object);
addRdatePropertyDescriptor(object);
addTznamePropertyDescriptor(object);
addX_propPropertyDescriptor(object);
addIana_propPropertyDescriptor(object);
}
return itemPropertyDescriptors;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PropertyDescriptor[] getPropertyDescriptors () {\n return desc;\n }",
"public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }",
"@Override\n public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }",
"public L... | [
"0.74827915",
"0.7437152",
"0.73936653",
"0.71689236",
"0.69981146",
"0.68416893",
"0.6700892",
"0.65058213",
"0.64298385",
"0.640673",
"0.6359638",
"0.62749296",
"0.62353",
"0.6228872",
"0.6227949",
"0.6221954",
"0.612216",
"0.6121374",
"0.6098768",
"0.6050726",
"0.602448",
... | 0.59914875 | 22 |
This adds a property descriptor for the Comment feature. | protected void addCommentPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_tzpropOptional_comment_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_tzpropOptional_comment_feature",
"_UI_tzpropOptional_type"),
ICalPackage.Literals.TZPROP_OPTIONAL__COMMENT, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@PropertySetter(role = COMMENT)\n\t<E extends CtElement> E addComment(CtComment comment);",
"protected void addCommentParameterPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactor... | [
"0.72966826",
"0.6857188",
"0.643844",
"0.62430817",
"0.6183959",
"0.61592454",
"0.61569417",
"0.6147983",
"0.6147983",
"0.6073705",
"0.6052217",
"0.6017692",
"0.5994992",
"0.5987984",
"0.5985355",
"0.5957962",
"0.5956307",
"0.5940941",
"0.5925374",
"0.59130305",
"0.59130305"... | 0.70787305 | 1 |
This adds a property descriptor for the Rdate feature. | protected void addRdatePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_tzpropOptional_rdate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_tzpropOptional_rdate_feature",
"_UI_tzpropOptional_type"),
ICalPackage.Literals.TZPROP_OPTIONAL__RDATE, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void addEndDatePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Cell_endDate_feature\"),\n\t\t\t\t getString(\"... | [
"0.6259528",
"0.6254648",
"0.5924112",
"0.58753467",
"0.57869214",
"0.5717808",
"0.56971186",
"0.5676654",
"0.55817485",
"0.5561366",
"0.5548997",
"0.5529211",
"0.5458951",
"0.54352105",
"0.5427226",
"0.54066825",
"0.53900105",
"0.53808063",
"0.5376204",
"0.53533703",
"0.5353... | 0.76828873 | 0 |
This adds a property descriptor for the Tzname feature. | protected void addTznamePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_tzpropOptional_tzname_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_tzpropOptional_tzname_feature",
"_UI_tzpropOptional_type"),
ICalPackage.Literals.TZPROP_OPTIONAL__TZNAME, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void addProperty(String name) {\n\t}",
"protected void addPropNames()\n{\n addPropNames(\"Visible\", \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\",\n \"Font\", \"TextColor\", \"FillColor\", \"StrokeColor\", \"URL\");\n}",
"protected void addNamePropertyDesc... | [
"0.62219626",
"0.58382046",
"0.5769936",
"0.5757638",
"0.57225806",
"0.5684749",
"0.56766665",
"0.56345695",
"0.56281227",
"0.55953044",
"0.5501439",
"0.5479812",
"0.5457997",
"0.54553473",
"0.5414763",
"0.54099727",
"0.5406617",
"0.5381468",
"0.53631395",
"0.5361119",
"0.534... | 0.6606824 | 0 |
This adds a property descriptor for the Xprop feature. | protected void addX_propPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_tzpropOptional_x_prop_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_tzpropOptional_x_prop_feature",
"_UI_tzpropOptional_type"),
ICalPackage.Literals.TZPROP_OPTIONAL__XPROP, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void addProperty(String name) {\n\t}",
"public DataModelDescriptorBuilder property(PropertyDescriptor descriptor) {\n this.properties.add(descriptor);\n return this;\n }",
"@Test\n\tpublic void addProperty() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\t\tXMLTagParser.e... | [
"0.609432",
"0.5848612",
"0.57622784",
"0.5740059",
"0.5549108",
"0.55419797",
"0.55215657",
"0.5450417",
"0.5448511",
"0.5428899",
"0.54245806",
"0.53932846",
"0.53371054",
"0.53304225",
"0.52967095",
"0.5277628",
"0.52430147",
"0.5241103",
"0.522851",
"0.52138627",
"0.51905... | 0.6655927 | 0 |
This adds a property descriptor for the Iana prop feature. | protected void addIana_propPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_tzpropOptional_iana_prop_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_tzpropOptional_iana_prop_feature",
"_UI_tzpropOptional_type"),
ICalPackage.Literals.TZPROP_OPTIONAL__IANA_PROP, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DataModelDescriptorBuilder property(PropertyDescriptor descriptor) {\n this.properties.add(descriptor);\n return this;\n }",
"@Override\n\tpublic void addProperty(IProperty property) {\n\t\t\n\t}",
"@Override\n\tpublic void addProperty(String name) {\n\t}",
"protected void addNoteProp... | [
"0.6541521",
"0.6520563",
"0.6421468",
"0.6156312",
"0.60090524",
"0.59274834",
"0.59273595",
"0.5903976",
"0.58758545",
"0.5826888",
"0.572815",
"0.56910837",
"0.5671027",
"0.5668951",
"0.56500363",
"0.5646619",
"0.5616501",
"0.5611384",
"0.55966306",
"0.5596315",
"0.5591524... | 0.7152885 | 0 |
This returns the label text for the adapted class. | @Override
public String getText(Object object) {
String label = ((tzpropOptional) object).getTzname();
return label == null || label.length() == 0 ? getString("_UI_tzpropOptional_type")
: getString("_UI_tzpropOptional_type") + " " + label;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLabelText();",
"java.lang.String getLabel();",
"public java.lang.String getLabel();",
"public abstract String getLabelText();",
"public String getLabel() {\r\n\t\tif (label != null)\r\n\t\t\treturn label;\r\n\t\tif (classSimpleName==null)\r\n\t\t\treturn null;\r\n\t\treturn classSimpleName... | [
"0.7866285",
"0.7862631",
"0.780615",
"0.78000176",
"0.76271594",
"0.755294",
"0.755294",
"0.755294",
"0.755294",
"0.7546993",
"0.7546993",
"0.745652",
"0.7416987",
"0.7279132",
"0.7279132",
"0.7279132",
"0.725332",
"0.7239711",
"0.7218232",
"0.7210016",
"0.72058916",
"0.72... | 0.0 | -1 |
Return the resource locator for this item provider's resources. | @Override
public ResourceLocator getResourceLocator() {
return ICalEditPlugin.INSTANCE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public ResourceLocator getResourceLocator ()\n {\n return ( (IChildCreationExtender)adapterFactory ).getResourceLocator ();\n }",
"public ResourceLocator getResourceLocator() {\r\n\t\treturn MARTE_sbEditPlugin.INSTANCE;\r\n\t}",
"@Override\n\tpublic ResourceLocator getResourceLocato... | [
"0.6168166",
"0.5996649",
"0.58934015",
"0.58934015",
"0.58934015",
"0.58934015",
"0.58662295",
"0.5846616",
"0.56440914",
"0.56411844",
"0.5633014",
"0.562223",
"0.5604277",
"0.55716634",
"0.54827195",
"0.54813886",
"0.5466805",
"0.5464909",
"0.5442891",
"0.54349494",
"0.539... | 0.5760625 | 8 |
Default implementation for the Locatable Service interface. | public void init() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LocationService(String name) {\n super(name);\n }",
"LocService getService() {\n return LocService.this;\n }",
"public interface LocativeService {\n public List<Locative> getAll();\n public Locative add(Locative locative);\n public Locative update(Locative locative);... | [
"0.6663774",
"0.6575904",
"0.63524884",
"0.6333118",
"0.6292695",
"0.62860775",
"0.62397325",
"0.61685383",
"0.61359906",
"0.60618687",
"0.6009254",
"0.59766734",
"0.5940879",
"0.5919353",
"0.5892152",
"0.5791034",
"0.5772796",
"0.57422185",
"0.57357955",
"0.5733061",
"0.5725... | 0.0 | -1 |
Default implementation for the Locatable Service interface. | public void destroy() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LocationService(String name) {\n super(name);\n }",
"LocService getService() {\n return LocService.this;\n }",
"public interface LocativeService {\n public List<Locative> getAll();\n public Locative add(Locative locative);\n public Locative update(Locative locative);... | [
"0.6663774",
"0.6575904",
"0.63524884",
"0.6333118",
"0.6292695",
"0.62860775",
"0.62397325",
"0.61685383",
"0.61359906",
"0.60618687",
"0.6009254",
"0.59766734",
"0.5940879",
"0.5919353",
"0.5892152",
"0.5791034",
"0.5772796",
"0.57422185",
"0.57357955",
"0.5733061",
"0.5725... | 0.0 | -1 |
B U S I N E S S M E T H O D S P E R S I S T E N C E M E T H O D S Adds a new student to the database. | public sust.paperlessexm.entity.Student addStudent(sust.paperlessexm.entity.Student model) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
hibernateTemplate.save(model);
return getStudent(model.getPrimaryKey());
} finally {
log.debug("finished addStudent(sust.paperlessexm.entity.Student model)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.ge... | [
"0.85572225",
"0.79773647",
"0.7834838",
"0.7805763",
"0.77334374",
"0.77181816",
"0.76648414",
"0.7653824",
"0.7571041",
"0.7563252",
"0.7506467",
"0.7506244",
"0.74813247",
"0.7441723",
"0.738382",
"0.7344547",
"0.7321687",
"0.7290842",
"0.7266156",
"0.7254962",
"0.71694165... | 0.73054415 | 17 |
Stores the Student in the database. | public void saveStudent(sust.paperlessexm.entity.Student model) throws GenericBusinessException {
// We have to create an object:
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
// Now update the data.
hibernateTemplate.update(model);
} finally {
log.debug("finished saveStudent(sust.paperlessexm.entity.Student model)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseD... | [
"0.8166532",
"0.7754946",
"0.7400576",
"0.73550487",
"0.73365563",
"0.7317525",
"0.7256458",
"0.7221687",
"0.71766317",
"0.7102481",
"0.7075663",
"0.70716375",
"0.702524",
"0.7016363",
"0.69550806",
"0.69513726",
"0.694395",
"0.6858928",
"0.68353087",
"0.6813173",
"0.68064225... | 0.6941977 | 17 |
Retrieves a data object from the database by its primary key. | public sust.paperlessexm.entity.Student getStudent(java.lang.Integer id) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
Student bean = (Student) hibernateTemplate.get(Student.class, id);
return bean;
} finally {
log.debug("finished getStudent(java.lang.Integer id)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"T get(PK id);",
"T getById(PK id);",
"public T get(int objectId) throws SQLException;",
"T getByPk(int key) throws PersistException;",
"T findById(long pk);",
"@SuppressWarnings(\"unchecked\")\r\n public DomainObject getRecordByPrimaryKey(KeyType id) {\r\n Session session = getSession();\r\n ... | [
"0.76658744",
"0.7487912",
"0.7421938",
"0.74134076",
"0.73507285",
"0.7342234",
"0.73308593",
"0.7302196",
"0.7267665",
"0.7212159",
"0.72092795",
"0.71708626",
"0.7167121",
"0.7143141",
"0.7102131",
"0.70786244",
"0.7072965",
"0.7067387",
"0.70472187",
"0.7041254",
"0.70098... | 0.0 | -1 |
Returns a list of all student instances. | public List getStudentList() throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished getStudentList");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<Student> getAllStudents() {\n\t\treturn studentRepository.findAll();\r\n\t}",
"List<Student> getAllStudents();",
"@Override\r\n\tpublic List<Student> getAllStudent() {\n\t\treturn sdao.getAllStudent();\r\n\t}",
"public List <Student> getAllStudents();",
"@Override\n\tpublic List<... | [
"0.7435255",
"0.735632",
"0.7302495",
"0.7272416",
"0.7233815",
"0.71994746",
"0.71855533",
"0.71575934",
"0.7135459",
"0.7124268",
"0.70958775",
"0.70415765",
"0.7011582",
"0.693926",
"0.6931916",
"0.6919689",
"0.6829478",
"0.68229836",
"0.6793494",
"0.6745023",
"0.6740324",... | 0.666703 | 24 |
Returns a subset of all student instances. | public List getStudentList(int startIndex, int endIndex) throws GenericBusinessException {
if (startIndex < 1) {
startIndex = 1;
}
if ( (endIndex - startIndex) < 0) {
// Just return an empty list.
return new ArrayList();
}
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
query.setFirstResult(startIndex - 1);
query.setMaxResults(endIndex - startIndex + 1);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished getStudentList(int startIndex, int endIndex)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Student> selectStudentAll() {\n\t\treturn this.studentMaper.selectStudentAll();\r\n\t}",
"@Override\r\n\tpublic Collection<Student> findAll() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<StudentVO> sellectAll() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Student> queryAll() {\n... | [
"0.7233161",
"0.66472125",
"0.65324795",
"0.64607304",
"0.63912207",
"0.6370366",
"0.63670915",
"0.6328522",
"0.6311719",
"0.6310734",
"0.6303769",
"0.6244064",
"0.6227889",
"0.6205398",
"0.61752486",
"0.61721206",
"0.6166066",
"0.6122661",
"0.6080879",
"0.60804814",
"0.60751... | 0.56953484 | 50 |
Obtains the total number of student objects in the database. | public int getStudentListSize() throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "select count(*) from " + Student.class.getName();
Query query = hibernateTemplate.createQuery(queryString);
List list = hibernateTemplate.list(query);
Integer countResult = (Integer) list.get(0);
return countResult.intValue();
} finally {
log.debug("finished getStudentListSize()");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int findTotalStudents() {\n\t\treturn students.size();\r\n\t}",
"int getStudentCount();",
"public int getStudentCount() {\n\t\t\treturn student_.size();\n\t\t}",
"public int getStudentCount() {\n\t\t\t\tif (studentBuilder_ == null) {\n\t\t\t\t\treturn student_.size();\n\t\t\t\t} else {\n\t\t\t\t\tretu... | [
"0.78461003",
"0.7481771",
"0.74776953",
"0.7453008",
"0.7439663",
"0.73855346",
"0.7313412",
"0.7313412",
"0.7143326",
"0.7097647",
"0.70702225",
"0.70595",
"0.70378006",
"0.700099",
"0.6943377",
"0.6927982",
"0.69041747",
"0.68900174",
"0.6867372",
"0.6834878",
"0.6828767",... | 0.8024453 | 0 |
Retrieves a list of data object for the specified studentId field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByStudentId(java.lang.Integer studentId) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.studentId like :studentId ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "studentId", studentId);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByStudentId(java.lang.Integer studentId)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(\"/students/{studentId}\")\n @ApiOperation(value = \"Search StudyClasses by its students\")\n public List<StudyClassDTO> findByStudentStudentId(\n @ApiParam(value = \"The student studentId\") @PathVariable String studentId) {\n return studyClassService.findByStudentStudentId(stu... | [
"0.72518843",
"0.695708",
"0.66644615",
"0.6656006",
"0.6650189",
"0.6571186",
"0.6549743",
"0.65193224",
"0.6510071",
"0.64951545",
"0.64502084",
"0.6445017",
"0.64373755",
"0.64212173",
"0.63933104",
"0.6378848",
"0.63445276",
"0.6342496",
"0.6341367",
"0.62423354",
"0.6237... | 0.73085433 | 0 |
Retrieves a list of data object for the specified registrationNo field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByRegistrationNo(java.lang.String registrationNo) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.registrationNo like :registrationNo ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "registrationNo", registrationNo);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByRegistrationNo(java.lang.String registrationNo)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<String> getSlotNumberForRegNumber(String registrationNumber) {\n List<String> retVal = new ArrayList<>();\n\n List<Slot> slots = getSlots();\n if (slots == null) {\n retVal.add(NOT_FOUND);\n return retVal;\n }\n\n String collect = ... | [
"0.59308314",
"0.54272836",
"0.52957904",
"0.52540153",
"0.5101665",
"0.50433683",
"0.50319433",
"0.49595279",
"0.49583966",
"0.49386644",
"0.49267736",
"0.48954943",
"0.48822242",
"0.4874038",
"0.48466808",
"0.4830871",
"0.48192245",
"0.48175353",
"0.4798003",
"0.4786475",
"... | 0.6614132 | 0 |
Retrieves a list of data object for the specified studentName field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByStudentName(java.lang.String studentName) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.studentName like :studentName ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "studentName", studentName);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByStudentName(java.lang.String studentName)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Student> searchStudent(String name) {\n List<Student> studentList = new ArrayList<>();\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Students WHERE name = ? \", new String[]{name});\n while (cursor.moveToNext()) {\n Student student = new Student(cursor.getStr... | [
"0.7028414",
"0.69212216",
"0.6885072",
"0.68388283",
"0.65465283",
"0.6489136",
"0.64687884",
"0.63748604",
"0.6355862",
"0.6276612",
"0.626698",
"0.6225903",
"0.6120366",
"0.61164665",
"0.61046827",
"0.6097532",
"0.6091439",
"0.609037",
"0.6088575",
"0.60883653",
"0.6065851... | 0.7525289 | 0 |
Retrieves a list of data object for the specified password field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByPassword(java.lang.String password) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.password like :password ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "password", password);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByPassword(java.lang.String password)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<PasswordCard> selectByExample(PasswordCardExample example);",
"protected BaseFilter<T> getPasswordFilter(String password) throws DataFault{\n\t\tLogger log = getContext().getService(LoggerService.class).getLogger(getClass());\n\t\tif( DatabasePasswordComposite.JAVA_HASH.isEnabled(getContext())){\n\t\t\tlog.... | [
"0.62844574",
"0.59994084",
"0.5817357",
"0.57773334",
"0.57633024",
"0.5757029",
"0.5708489",
"0.5698381",
"0.5697216",
"0.56490076",
"0.56285304",
"0.56285304",
"0.56285304",
"0.56285304",
"0.56285304",
"0.56285304",
"0.56285304",
"0.5627763",
"0.55508953",
"0.55508953",
"0... | 0.63113683 | 0 |
Retrieves a list of data object for the specified session field. To use a wildcard search, use a % in the query. | public java.util.List findStudentBySession(java.lang.Integer session) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.session like :session ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "session", session);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentBySession(java.lang.Integer session)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic <T, S> List<T> getRecords(S session) {\n\t\treturn null;\n\t}",
"public List<?> queryBySingleCriteria(String field, String value)\n throws DataAccessLayerException {\n return queryBySingleCriteria(field, value, \"=\");\n }",
"List<T> fetch(Session session);",
"@Overri... | [
"0.58541054",
"0.58134514",
"0.57182056",
"0.5445007",
"0.53934795",
"0.5334894",
"0.53262603",
"0.53181297",
"0.5236999",
"0.52123815",
"0.5195756",
"0.51613486",
"0.50874084",
"0.50712085",
"0.5044577",
"0.5042062",
"0.502518",
"0.5008124",
"0.49983832",
"0.497348",
"0.4959... | 0.5352553 | 5 |
Retrieves a list of data object for the specified emailAddress field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByEmailAddress(java.lang.String emailAddress) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.emailAddress like :emailAddress ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "emailAddress", emailAddress);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByEmailAddress(java.lang.String emailAddress)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List getByEmail(String email) throws DAOException {\n\t\treturn null;\n\t}",
"List<Email> selectByExample(EmailCriteria example);",
"@Path(\"lister/{email}\")\r\n @GET\r\n @Produces(MediaType.APPLICATION_XML)\r\n public Listings getEmail(@PathParam(\"email\") String email) throws J... | [
"0.64220124",
"0.6288473",
"0.61595494",
"0.61010027",
"0.5965217",
"0.5958336",
"0.58984596",
"0.5896319",
"0.5886043",
"0.58815134",
"0.58416307",
"0.5838915",
"0.583614",
"0.5820148",
"0.58154446",
"0.5776404",
"0.57763094",
"0.5760386",
"0.5736086",
"0.57016194",
"0.56960... | 0.6745593 | 0 |
Retrieves a list of data object for the specified contactNo field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByContactNo(java.lang.String contactNo) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.contactNo like :contactNo ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "contactNo", contactNo);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByContactNo(java.lang.String contactNo)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setContactNo(java.lang.String contactNo) {\r\n this.contactNo = contactNo;\r\n }",
"public Contact findContactByNumber(String number){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // prevent for prefix number\n String number2 = number;\n String number3 =... | [
"0.61496806",
"0.5870491",
"0.58418447",
"0.57900095",
"0.57900095",
"0.57900095",
"0.57900095",
"0.5789959",
"0.5733474",
"0.55813366",
"0.554135",
"0.5539651",
"0.55348164",
"0.5528128",
"0.55212754",
"0.5507167",
"0.5492298",
"0.5485426",
"0.5461699",
"0.54490376",
"0.5449... | 0.6531856 | 0 |
Retrieves a list of data object for the specified photo field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByPhoto(java.lang.String photo) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.photo like :photo ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "photo", photo);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByPhoto(java.lang.String photo)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void getPhotoList(String query){\n for(Photo p : photolist){\n for(String s : p.getLocationTaglist()){\n if(s.toLowerCase().contains(query)){\n searchResult.add(p);\n break;\n }\n }\n for(String s : ... | [
"0.5968841",
"0.5761362",
"0.5700725",
"0.5525773",
"0.5511129",
"0.55077934",
"0.55077934",
"0.5484401",
"0.541424",
"0.5401454",
"0.53964347",
"0.53734994",
"0.5353342",
"0.53262407",
"0.53123796",
"0.5298657",
"0.52915186",
"0.5241072",
"0.52270895",
"0.52076834",
"0.51977... | 0.53564614 | 12 |
Retrieves a list of data object for the specified departmentId field. To use a wildcard search, use a % in the query. | public java.util.List findStudentByDepartmentId(java.lang.Integer departmentId) throws GenericBusinessException {
sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();
try {
String queryString = "from " + Student.class.getName() + " e where e.departmentId like :departmentId ";
// Add a an order by on all primary keys to assure reproducable results.
String orderByPart = "";
orderByPart += " order by e.studentId";
queryString += orderByPart;
Query query = hibernateTemplate.createQuery(queryString);
hibernateTemplate.setQueryParameter(query, "departmentId", departmentId);
List list = hibernateTemplate.list(query);
return list;
} finally {
log.debug("finished findStudentByDepartmentId(java.lang.Integer departmentId)");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Department getDepartmentById(Integer id);",
"public List getDepartmentUserByDEpartment(int departmentId) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\... | [
"0.6798102",
"0.67003554",
"0.66092324",
"0.65395665",
"0.65380186",
"0.6525686",
"0.63917",
"0.63917",
"0.63917",
"0.6364419",
"0.6363853",
"0.6358602",
"0.6311483",
"0.62971467",
"0.62937146",
"0.62851226",
"0.62841743",
"0.6267056",
"0.62592244",
"0.62515795",
"0.6244582",... | 0.60013074 | 31 |
INTERFACE METHODS Interface LoaderCallbacks | @Override
public abstract Loader<List<E>> onCreateLoader( int id, Bundle args ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onLoaderLoading();",
"public interface Loader {\n\t\tpublic void load();\n\t}",
"public interface LoadCallback {\n\n void onPreLoad();\n void onProgressUpdate(long progress);\n void onLoadSucces();\n void onLoadFailed();\n void onLoadCancel();\n}",
"void onLoaderFinished();",
"public in... | [
"0.8058118",
"0.77050513",
"0.7667355",
"0.7585318",
"0.7325708",
"0.71059203",
"0.7047441",
"0.7035024",
"0.6994199",
"0.6982502",
"0.69439",
"0.6876542",
"0.6862439",
"0.68248427",
"0.6807169",
"0.6789679",
"0.6773383",
"0.67645437",
"0.6750539",
"0.67361724",
"0.6730369",
... | 0.69115144 | 11 |
OTHER METHODS Callback when a list view item is clicked | public void onListItemClick( ListView l, View v, int position, long id )
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onListItemClicked(int position) {\n\n }",
"void onListClick();",
"@Override\r\n public void onListItemClick(ListView l, View v, int position, long id) {\n }",
"@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }",
"@Over... | [
"0.81444204",
"0.796868",
"0.79662263",
"0.7941599",
"0.7851749",
"0.77773106",
"0.77665377",
"0.76652277",
"0.76551795",
"0.7648766",
"0.764225",
"0.7642143",
"0.7639294",
"0.7635471",
"0.7633131",
"0.7615163",
"0.7610137",
"0.760329",
"0.75851035",
"0.75851035",
"0.757142",... | 0.80753976 | 1 |
Refresh the fragment's list | public void refresh()
{
refresh( null );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void refreshFragment() {\n }",
"public void refreshFragment() {\n currentUser = ((HomeActivity)getActivity()).getCurrentUser();\n stock = ((HomeActivity)getActivity()).getTransferStock();\n selectAll(ORDER_NAME);\n }",
"@Override\n public void onRefre... | [
"0.7971656",
"0.7621725",
"0.7450382",
"0.742941",
"0.7424688",
"0.7408451",
"0.73266387",
"0.72735476",
"0.7250915",
"0.7184718",
"0.7154248",
"0.70952785",
"0.70615727",
"0.69874936",
"0.69848996",
"0.69488794",
"0.69300365",
"0.6895681",
"0.68836176",
"0.68613315",
"0.6837... | 0.6364581 | 83 |
Create adapter to display items | protected abstract SingleTypeAdapter<E> createAdapter( final List<E> items ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ItemsAdapter() {\n\n\n }",
"public OrderAdapter() {\n super(new ArrayList<MultiItemEntity>());\n addItemType(TYPE_HEAD, R.layout.item_order_head);\n addItemType(TYPE_CONTENT, R.layout.item_order_content);\n addItemType(TYPE_FOOTER, R.layout.item_order_foot);\n }",
"publ... | [
"0.6828687",
"0.6798184",
"0.6680938",
"0.64611936",
"0.64482516",
"0.64044476",
"0.63895905",
"0.6388192",
"0.6370206",
"0.63515687",
"0.6331986",
"0.62877196",
"0.6285825",
"0.62843186",
"0.6280349",
"0.6268814",
"0.62527424",
"0.62372476",
"0.6229482",
"0.6227141",
"0.6209... | 0.6611817 | 3 |
Get serializable extra from activity's intent | @SuppressWarnings("unchecked")
protected <V extends Parcelable> V getParcelableExtra( final String name )
{
return (V) getIntent().getParcelableExtra( name );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getExtra();",
"public static Object getExtraObject(Activity context, String key) {\n \tObject param = null;\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.get(key);\n \t}\n \treturn param;\n\t}",
"private Order getIntentData(Intent inten... | [
"0.69467705",
"0.6883244",
"0.66810733",
"0.65529597",
"0.64671904",
"0.6455423",
"0.64189523",
"0.6382253",
"0.63053024",
"0.6283679",
"0.62596154",
"0.62107587",
"0.61978716",
"0.6188643",
"0.61520505",
"0.61018366",
"0.6082934",
"0.6054927",
"0.6007873",
"0.59354573",
"0.5... | 0.6500313 | 4 |
TimePiece constructor all the gets | private String getType(){
return type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Time() {\n\t}",
"public Coursetime() {\n\t}",
"public Time(int hour, int minute, int second){ //method in the initializer block\n setHour(hour);\n setMinute(minute);\n setSecond(second);\n}",
"public Time4( int hour, int minute, int second )\r\n { \r\n this.setTime( hour, minute, se... | [
"0.7083223",
"0.7081501",
"0.70118374",
"0.69166607",
"0.67725646",
"0.67449105",
"0.6734955",
"0.6686562",
"0.6673179",
"0.66501087",
"0.65587825",
"0.6526012",
"0.650262",
"0.64904183",
"0.6483232",
"0.64563006",
"0.6385481",
"0.63796365",
"0.63770294",
"0.6361433",
"0.6355... | 0.0 | -1 |
getSeconds all the sets | protected void setType(String requiredType){
type = requiredType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getSeconds(){\r\n return Seconds;\r\n }",
"public int getSeconds()\n {\n return seconds;\n }",
"EDataType getSeconds();",
"public double getSeconds() {\n return seconds;\n }",
"public int getSeconds(){\n return (int) (totalSeconds%60);\n }",
"public int g... | [
"0.65334785",
"0.64546406",
"0.64187604",
"0.6368232",
"0.6323727",
"0.62721956",
"0.62294626",
"0.6188044",
"0.61776227",
"0.612974",
"0.6013764",
"0.59494793",
"0.5938161",
"0.58997494",
"0.58837765",
"0.5836871",
"0.58357275",
"0.5822593",
"0.58039826",
"0.57813025",
"0.57... | 0.0 | -1 |
setSeconds give the time | private void showTime(){
System.out.println(df.format(getHours()) + ":" + df.format(getMinutes()+ "\n"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSeconds(double seconds) {\n this.seconds = seconds;\n }",
"public void setSeconds(double seconds) {\n this.seconds = seconds;\n }",
"void setSeconds(int seconds) {\n this.seconds = seconds;\n notifyObservers();\n }",
"public final native double setSeconds(i... | [
"0.84071034",
"0.84071034",
"0.81793535",
"0.7949774",
"0.7938822",
"0.7879074",
"0.7734579",
"0.75650895",
"0.75356233",
"0.7463036",
"0.7191635",
"0.7190294",
"0.7187214",
"0.7163625",
"0.7087425",
"0.697322",
"0.6872084",
"0.67779577",
"0.67695034",
"0.67602134",
"0.675146... | 0.0 | -1 |
Dechiffrerar texten text och returnerar klartexten | String decrypt(String text) {
char letter;
String finalString = ""; // slutliga klartexten
int start = key.getStart(); // deklarerar nyckelns startläge
int k ; // variabel för bokstavens startläge i vanliga alfabetet
StringBuilder sb = new StringBuilder(); // skapar en stringbuilder som kan modifieras, bygger upp textsträngar av olika variabler
// loopen går igenom alla tecken i min krypterade text
for(int i = 0; i < text.length(); i++) { // for-loop för att gå igenom hela texten
letter = text.charAt(i); // ger bokstaven på platsen 0,1,2,3.....
if(letter == ' ') { // om det är ett blanktecken så ska det vara ett blanktecken
sb.append(' '); // sparar blanksteg i en stringBuilder
} else {
int index=0;
start=start%26; // vi behöver endast 26 värden
key.getStart();
while(index<26 &&(letter!=key.getLetter(index))) { // så länge som chiffret inte motsvarar förskjutningen
index++; // så fortsätter den leta
}
k=index-start;
if(k>=0)
letter=(char)('A'+k);
else letter=(char)('Z'-(start-1-index)); // räknar från index, om index mindre än start så räknar den bakåt
// så att det inte blir tokigt mellan Z och A.
sb.append(letter); //lagrar bokstav i stringBuilder
start++; //chiffret börjar om
}
}
return sb.toString(); // returnerar sluttexten
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"String getText();",
"String getText();",
"Strin... | [
"0.6349501",
"0.6349501",
"0.6349501",
"0.6349501",
"0.6349501",
"0.6349501",
"0.6349501",
"0.6349501",
"0.62149465",
"0.62149465",
"0.62149465",
"0.62149465",
"0.62149465",
"0.62149465",
"0.62149465",
"0.6198013",
"0.61076015",
"0.6059592",
"0.60514",
"0.6044204",
"0.6024098... | 0.56485105 | 55 |
non static and iteratively | public int sum2() {
int ans = 0;
for (ListNode<T> p = this; p != null; p = p.next) {
ans = ans + p.value; // fail!
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void iterator() {\n\t\t\r\n\t}",
"private void iterativeDataPropertyMetrics() {\n\t}",
"@Override\r\n\tpublic void iterateCount() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}",
"protected abstract void recombineNext();",
"@Override\n protected void runOneItera... | [
"0.67549074",
"0.58779633",
"0.5855645",
"0.5713079",
"0.5622387",
"0.55489516",
"0.5544647",
"0.55340505",
"0.5483751",
"0.54623765",
"0.54494923",
"0.53925943",
"0.5392018",
"0.53480005",
"0.5331759",
"0.5325155",
"0.5292152",
"0.52623534",
"0.52451295",
"0.5244268",
"0.524... | 0.0 | -1 |
FIXME(Leo_Roos;Aug 27, 2011) copied from DSLResourceHandlerreadResource | public static @CheckForNull
StringBuffer readResource(IFile resource) {
try {
String stringFromReader = IOUtils.toString(resource.getContents(), resource.getCharset());
return new StringBuffer(stringFromReader);
} catch (IOException e) {
logger.error("Failed to read resource.", e);
} catch (CoreException e) {
logger.error("Failed to obtain content of specified resource.", e);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Resource getResource();",
"public interface Resource { \n /**\n * @return the time, in <code>millis</code>, at which this resource was\n * last modified.\n */\n public long lastModified();\n\n /**\n * @return the URI that this resource corresponds to.\n */\n public String getURI();\n\n /**... | [
"0.6279344",
"0.6253881",
"0.6197031",
"0.6066555",
"0.6035578",
"0.59957135",
"0.5939492",
"0.58961153",
"0.588768",
"0.58722055",
"0.5866129",
"0.5821842",
"0.5820724",
"0.58138645",
"0.5807809",
"0.58056855",
"0.57685006",
"0.5755887",
"0.57374793",
"0.57355314",
"0.572585... | 0.0 | -1 |
Write your code here | public static List<Integer> reverseArray(List<Integer> a) {
int s=a.size();
List<Integer> list=new ArrayList<Integer>(s);
for(int i=s-1;i>=0;i--)
{
list.add(a.get(i));
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"public void logic(){\r\n\r\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"public void ganar() {\n // TODO implement here\n }",
"@Override\r... | [
"0.6385292",
"0.62825674",
"0.6094859",
"0.59705144",
"0.59174407",
"0.5879631",
"0.58751583",
"0.58699447",
"0.5869017",
"0.58553624",
"0.5826625",
"0.5825323",
"0.58233553",
"0.577183",
"0.576982",
"0.5769503",
"0.57691693",
"0.5748044",
"0.57379705",
"0.573767",
"0.5728572... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.