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 |
|---|---|---|---|---|---|---|
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
Intent intent = new Intent(getApplicationContext(), Grafico.class);
if (id == R.id.llamadas) {
intent.putExtra("opcion", "llamadas");
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"void onDialogNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr... | [
"0.7882029",
"0.7235578",
"0.6987005",
"0.69458413",
"0.6917864",
"0.6917864",
"0.6883472",
"0.6875181",
"0.68681556",
"0.6766498",
"0.67418456",
"0.67207",
"0.6716157",
"0.6713947",
"0.6698189",
"0.66980195",
"0.66793925",
"0.66624063",
"0.66595167",
"0.6646381",
"0.6641224"... | 0.0 | -1 |
An injectable service that helps to create Kafka producers and consumers based on Bootique configuration and userprovided settings. | public interface KafkaClientFactory {
/**
* Creates and returns a {@link Consumer} by merging default Bootique configuration with settings provided in a
* {@link ConsumerConfig} argument. Uses default Kafka cluster connection information (default == single configuration
* found in Bootique; if none ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\r\n public ProducerFactory<String, Object> producerFactory() {\r\n return new DefaultKafkaProducerFactory<>(producerConfig());\r\n }",
"@ApplicationScoped\n @Produces\n public KafkaConsumer<MessageKey, MessageValue> createKafkaConsumer() {\n Properties props = (Properties) consume... | [
"0.6842741",
"0.68242806",
"0.6620153",
"0.64827174",
"0.63304234",
"0.6321935",
"0.6321279",
"0.63078755",
"0.62754047",
"0.6244242",
"0.61782074",
"0.6161908",
"0.6136226",
"0.6104257",
"0.6045802",
"0.6034322",
"0.6028503",
"0.6027876",
"0.60173434",
"0.5997477",
"0.587600... | 0.70728934 | 0 |
Sorts preferred before acceptable, and orders dialects by usen, usgb, then alphabetical | private void sortDialects()
{
if (dialects.size() > 1)
{
Collections.sort(dialects, new Comparator<RestDynamicSemanticVersion>()
{
@Override
public int compare(RestDynamicSemanticVersion o1, RestDynamicSemanticVersion o2)
{
//This is a semantic with a single nid column, which represents pref... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void DoOrderBy()\n\t{\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_nationkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_name\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_regionkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \... | [
"0.66486806",
"0.6075295",
"0.5989003",
"0.5873064",
"0.5786792",
"0.575877",
"0.5576743",
"0.5552388",
"0.5547131",
"0.54627603",
"0.5449284",
"0.5407427",
"0.53682923",
"0.53494596",
"0.53442425",
"0.5331625",
"0.5329707",
"0.5319091",
"0.52993613",
"0.5294628",
"0.52631587... | 0.71702 | 0 |
This is a semantic with a single nid column, which represents preferred or acceptable. The assemblage concept will be something like "US English Dialect" If preferred / acceptable is the same, sort on the dialects... | @Override
public int compare(RestDynamicSemanticVersion o1, RestDynamicSemanticVersion o2)
{
if (((RestDynamicSemanticNid)o1.dataColumns.get(0)).getNid() == ((RestDynamicSemanticNid)o2.dataColumns.get(0)).getNid())
{
if (o1.semanticChronology != null) //If one chronology is here, they both shou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sortDialects()\n\t{\n\t\tif (dialects.size() > 1)\n\t\t{\n\t\t\tCollections.sort(dialects, new Comparator<RestDynamicSemanticVersion>()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(RestDynamicSemanticVersion o1, RestDynamicSemanticVersion o2)\n\t\t\t\t{\n\t\t\t\t\t//This is a semantic with ... | [
"0.606678",
"0.5069716",
"0.48273158",
"0.48257756",
"0.47079918",
"0.47042522",
"0.46904588",
"0.46869257",
"0.46553138",
"0.46537745",
"0.46433982",
"0.4630099",
"0.4627438",
"0.46242198",
"0.46040392",
"0.4558841",
"0.45331177",
"0.4521931",
"0.4521931",
"0.4521878",
"0.44... | 0.54774964 | 1 |
Sort descriptions associated with the concept, sorted via many levels: level 1 by core types first (FSN, Regular Name, Definition) or if not a core type, grouped by associated core type, and then alphabetical by the description type within the group (fsn, regular name, definition). level 2 by language EN first, and the... | @Override
public int compareTo(RestSemanticDescriptionVersion o)
{
//This will handle native types, and the grouping of external types.
int coreTypeLeft = Frills.getDescriptionType(this.descriptionTypeConcept.nid.intValue(), null);
int coreTypeRight = Frills.getDescriptionType(o.descriptionTypeConcept.nid.intVa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sortDialects()\n\t{\n\t\tif (dialects.size() > 1)\n\t\t{\n\t\t\tCollections.sort(dialects, new Comparator<RestDynamicSemanticVersion>()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(RestDynamicSemanticVersion o1, RestDynamicSemanticVersion o2)\n\t\t\t\t{\n\t\t\t\t\t//This is a semantic with ... | [
"0.6283583",
"0.58150834",
"0.57715344",
"0.5588122",
"0.5393522",
"0.52002364",
"0.50423336",
"0.4968877",
"0.49512535",
"0.48574957",
"0.48520705",
"0.47867352",
"0.4774076",
"0.47691527",
"0.474272",
"0.47364464",
"0.4734602",
"0.47049162",
"0.4700175",
"0.46916983",
"0.46... | 0.601743 | 1 |
Register a listener for database DataChange events | synchronized public void addClientListener(ClientListener l)
{
if (listeners == null)
listeners = new ArrayList<ClientListener>();
listeners.add(l);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface DatabaseListener {\n\n void databaseChanged(DatabaseEvent databaseEvent);\n\n}",
"public interface OnDatabaseChangedListener {\n void onNewSJEntryAdded(String serviceNum);\n void onSJEntryRenamed(String fileName);\n void onSJEntryDeleted();\n }",
"public void dataCha... | [
"0.72413474",
"0.67053705",
"0.65601736",
"0.65558594",
"0.65233517",
"0.65057385",
"0.6458408",
"0.64223385",
"0.635724",
"0.62102777",
"0.6141264",
"0.6102984",
"0.6082341",
"0.59443927",
"0.5935123",
"0.588144",
"0.588144",
"0.5871354",
"0.58295965",
"0.5824578",
"0.582296... | 0.0 | -1 |
Remove a listener for server DataChange | synchronized public void removeClientListener(ClientListener l)
{
if (listeners == null)
listeners = new ArrayList<ClientListener>();
listeners.remove(l);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeOnDataChangedListener(OnDataChangedListener listener) {\n dataChangedListeners.remove(listener);\n }",
"public void removeAnalysisServerListener(AnalysisServerListener listener);",
"void removeDataCollectionListener(DataCollectionListener l);",
"@Override\n\tpublic void unregister... | [
"0.7465077",
"0.70285386",
"0.6948892",
"0.68024737",
"0.67392427",
"0.6635504",
"0.65044373",
"0.64583814",
"0.64374906",
"0.64374906",
"0.6433578",
"0.6419172",
"0.64183813",
"0.63803643",
"0.6377473",
"0.6372672",
"0.6344345",
"0.63418436",
"0.6338402",
"0.63346493",
"0.63... | 0.0 | -1 |
Fire a Data ChangedEvent to all registered listeners | @SuppressWarnings("unchecked")
protected void fireClientChanged(Object source, ClientType type, ClientEventType eventType, Object eventObject)
{
// if we have no listeners, do nothing...
if (listeners != null && !listeners.isEmpty())
{
// create the event object to send
ClientEvent ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onDataChanged()\n\t{\n\t\tfor (DataChangedCallbacks listener : this.dataChangedListeners)\n\t\t{\n\t\t\tlistener.onDataChanged();\n\t\t}\n\t}",
"private void notifyListeners(boolean dataChanged) {\n for (OnDataChangedListener listener : dataChangedListeners) {\n listene... | [
"0.8675861",
"0.7897095",
"0.7539681",
"0.74556226",
"0.743743",
"0.73405516",
"0.7271131",
"0.7008677",
"0.7001084",
"0.70006996",
"0.68570274",
"0.6847702",
"0.6833005",
"0.6810228",
"0.6802605",
"0.67710334",
"0.67710334",
"0.67303324",
"0.66985244",
"0.6686289",
"0.668393... | 0.0 | -1 |
May need to convert trailer to trailer DTO | public List<Trailer> getAllTrailers(){
return trailerDAO.getAllTrailers();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public IRecord procTrailer(IRecord r) {\n return r;\n }",
"@Override\n public IRecord procTrailer(IRecord r)\n {\n return r;\n }",
"protected HeaderGroup getResponseTrailerHeaderGroup() {\n return responseTrailerHeaders;\n }",
"private void parseTrailer()\n throws IOExceptio... | [
"0.64614385",
"0.6437639",
"0.56448686",
"0.5605034",
"0.5456261",
"0.5407685",
"0.5364071",
"0.5328699",
"0.5140405",
"0.5113734",
"0.5103364",
"0.50675726",
"0.4964559",
"0.49209002",
"0.49178302",
"0.49127492",
"0.48701513",
"0.48531088",
"0.48438236",
"0.48092481",
"0.480... | 0.47724453 | 23 |
Intent popupIntent = new Intent(getBaseContext(), PopupActivity.class) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); MainActivity.this.startActivity(popupIntent); setSamsungBadgeCount(onTunePushDefines.sTempCount); | public void onClick(View V){
onTunePushDefines.sTempCount++;
final LinearLayout linear = (LinearLayout)View.inflate(MainActivity.this, R.layout.phonenum, null);
EditText edPhoneNumber = (EditText)linear.findViewById(R.id.edPhoneNumber);
edPhoneNumber.s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendNotificationSample() {\n Intent notificationIntent = new Intent(GCMIntentService.this, AlertActivity.class);\n\n // Get a PendingIntent containing the entire back stack.\n int i = new Random().nextInt(100);\n PendingIntent notificationPendingIntent = PendingIntent.getAc... | [
"0.6971571",
"0.67585033",
"0.643622",
"0.640647",
"0.64015627",
"0.63968027",
"0.6308265",
"0.62977856",
"0.62790805",
"0.6211151",
"0.6192086",
"0.6128182",
"0.6123902",
"0.6068244",
"0.60599196",
"0.60560393",
"0.6043977",
"0.6021583",
"0.6016069",
"0.59938306",
"0.5989732... | 0.5909345 | 29 |
TODO Autogenerated method stub | @Override
public void onClick(DialogInterface dialog, int which) {
EditText edPhoneNumber = (EditText)linear.findViewById(R.id.edPhoneNumber);
String phoneNumber = edPhoneNumber.getText().toString();
... | {
"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 mtvPhoneNumber.setText("bbb"); | @Override
public void onClick(DialogInterface dialog, int which) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }",
"public void setText(int str) { this.editText.setText(str); }",
"public void setText(String str) { this.editText.setText(str); }",
"public void setPhone(String phone) {\r\n // Bouml preserved body begin 00041... | [
"0.68093944",
"0.65506303",
"0.65419954",
"0.63858724",
"0.63093185",
"0.6275385",
"0.6268945",
"0.6268064",
"0.6183844",
"0.6174651",
"0.617092",
"0.6148985",
"0.6148284",
"0.61396307",
"0.6130374",
"0.6129174",
"0.6115786",
"0.60832804",
"0.60823447",
"0.6070705",
"0.606694... | 0.0 | -1 |
int appVersion = getAppVersion(); Log.i("MainActivity.java | storeRegistrationId", "|" + "Saving regId on app version " + appVersion + "|"); | private void storeBadgeCount(String ABadgeCountStr)
{
PreferenceUtil.instance(getApplicationContext()).putBadgeCount(ABadgeCountStr);
//PreferenceUtil.instance(getApplicationContext()).putAppVersion(appVersion);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAppVersion() { return appVersion; }",
"private void setAppVersion() {\n try {\n String appVer = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;\n ServerSettingHelper.getInstance().setApplicationVersion(appVer);\n } catch (NameNotFoundExcepti... | [
"0.7117062",
"0.68637925",
"0.6844116",
"0.67778456",
"0.66612786",
"0.66600245",
"0.65212107",
"0.6512629",
"0.64977515",
"0.6497597",
"0.6473947",
"0.64180875",
"0.6361934",
"0.6360457",
"0.6335637",
"0.6264424",
"0.6219474",
"0.61807305",
"0.6159331",
"0.6136041",
"0.61223... | 0.0 | -1 |
Returns true if this is connected. | boolean isConnected(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isConnected() {\n if (mState == STATE_CONNECTED) {\n return true;\n }\n return false;\n }",
"public boolean isConnected(){\r\n\t\treturn connected;\r\n\t}",
"public boolean isConnected() {\n\t\tif (m == null) return false;\n\t\telse return true;\n\t}",
"publi... | [
"0.87278366",
"0.863024",
"0.8602664",
"0.86015975",
"0.8570297",
"0.8570297",
"0.85588217",
"0.85588217",
"0.85588217",
"0.85588217",
"0.85588217",
"0.85576785",
"0.85576785",
"0.85054135",
"0.84970874",
"0.8495917",
"0.8495917",
"0.8495917",
"0.8495917",
"0.8495917",
"0.849... | 0.8292769 | 46 |
Returns true if lis was added as a listener, false otherwise. | boolean addConnectionListener(LWSConnectionListener lis); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasListeners() {\n return !listeners.isEmpty();\n }",
"public boolean hasListeners() {\n return !listeners.isEmpty();\n }",
"protected boolean hasListeners()\n {\n // m_listenerSupport defaults to null, and it is reset to null when\n // the last listener ... | [
"0.70871407",
"0.70871407",
"0.6906439",
"0.6906439",
"0.68899035",
"0.68899035",
"0.6700943",
"0.6625737",
"0.6625737",
"0.66173905",
"0.65493333",
"0.6545577",
"0.6528238",
"0.6510604",
"0.6429086",
"0.6409654",
"0.6377985",
"0.6346649",
"0.63113236",
"0.62403774",
"0.61902... | 0.64738137 | 14 |
Returns true if lis was removed as a listener, false otherwise. | boolean removeConnectionListener(LWSConnectionListener lis); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean removeListener(ChipListener l) {\n return listeners.remove(l);\n }",
"public boolean removeListener(\n IListener listener\n )\n {return listeners.remove(listener);}",
"public boolean removeListener(ModifiedEventListener listener) {\n\t\treturn listeners.remove(listener);\n\t}",
... | [
"0.7426876",
"0.70169777",
"0.6946427",
"0.67211854",
"0.6675006",
"0.64755934",
"0.6306618",
"0.6306618",
"0.6294109",
"0.62708706",
"0.62316376",
"0.6219399",
"0.6212859",
"0.6198328",
"0.6198328",
"0.6136915",
"0.60669595",
"0.6006117",
"0.59978616",
"0.59488535",
"0.59358... | 0.6361404 | 6 |
Clears all the handlers. This is used mainly for testing. | void clearHandlers(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void clearEventHandlers() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ClearHandler() {\n\t\teventHandlers.clear();\n\t\t\n\t}",
"public void resetHandlers() {\r\n atRoot = true;\r\n path = \"/\";\r\n pathStack.clear();\r\n handlerStack.clear();\r\n handle... | [
"0.77290666",
"0.77266705",
"0.7628785",
"0.71370757",
"0.7034398",
"0.6934313",
"0.6888638",
"0.68825567",
"0.66342676",
"0.66099286",
"0.660778",
"0.6604793",
"0.6604793",
"0.65225345",
"0.63741493",
"0.63741493",
"0.6370881",
"0.6361821",
"0.6306459",
"0.62669224",
"0.6249... | 0.8681931 | 0 |
TODO Autogenerated method stub | public String[] readNext() {
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 |
ConsultarProdutos metodo utilizado para a consulta de produtos "cervejas" vigentes na base de dados o metodo recebe como parametro valores responsaveis por filtrar a consulta assim podendo retorna diferentes listas de produtos "cervejas" | public List<Produto> consultarProdutos(int consulta, String valor) {
ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB("routeexpress");
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
List<Produto> produtos = new ArrayList<>();
try {
c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void consultaProduto() throws Exception {\r\n boolean erro;\r\n int id;\r\n Produto p;\r\n Categoria c;\r\n System.out.println(\"\\t** Consultar produto **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID do produto a ser con... | [
"0.7230574",
"0.71158004",
"0.6817351",
"0.66422546",
"0.6603533",
"0.6595486",
"0.6485328",
"0.6441565",
"0.64228743",
"0.6422249",
"0.6398938",
"0.6314859",
"0.63143194",
"0.63047713",
"0.62884015",
"0.62704045",
"0.6267863",
"0.62636036",
"0.62333906",
"0.6231906",
"0.6230... | 0.7570636 | 0 |
Retorna um produto "cerveja" a parti da sua identificacao na base de dados esse metodo e usado na pagina de descricao do produto | public Produto consultarProduto(Produto produto) {
ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB("routeexpress");
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
Produto cerveja = null;
String sql = "SELECT TBL_CERVEJARIA.ID_CERVEJARIA,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getIdProduto() {\r\n\t\treturn idProduto;\r\n\t}",
"private static void consultaProduto() throws Exception {\r\n boolean erro;\r\n int id;\r\n Produto p;\r\n Categoria c;\r\n System.out.println(\"\\t** Consultar produto **\\n\");\r\n do {\r\n err... | [
"0.6218365",
"0.6195868",
"0.6070687",
"0.59163153",
"0.59023184",
"0.5900608",
"0.58797425",
"0.5878309",
"0.58523995",
"0.58352804",
"0.57927245",
"0.576316",
"0.57537204",
"0.5747506",
"0.5727239",
"0.5704286",
"0.5700399",
"0.5694638",
"0.5682588",
"0.56583303",
"0.564261... | 0.6112823 | 2 |
A component whose lifetime is the life of the application. | @Singleton // Constraints this component to one-per-application or unscoped bindings.
@Component(modules = ApplicationModule.class)
public interface ApplicationComponent {
// Field injections of any dependencies of the DemoApplication
void inject(FeelingApp application);
//Exposed to sub-graphs.
Appli... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AppComponent component(){\n return mComponent;\n }",
"@Singleton\n@Component( modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n //Exposed to sub-graphs\n Context context();\n\n ThreadExecutor threadExecutor();\n\n PostExecutionThread postExecutionThread(... | [
"0.6692922",
"0.65639746",
"0.647201",
"0.6398093",
"0.6315624",
"0.6306805",
"0.6265365",
"0.62042046",
"0.6174704",
"0.6134741",
"0.60497403",
"0.60382193",
"0.6022862",
"0.5998089",
"0.5998089",
"0.5998089",
"0.5998089",
"0.59979105",
"0.5984122",
"0.59684795",
"0.596813",... | 0.6160474 | 9 |
Field injections of any dependencies of the DemoApplication | void inject(FeelingApp application); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void inject(BaseApplication application);",
"void inject(MyMoneyApplication myMoneyApplication);",
"private void setup(){\n\n // menginisialisasi variabel component\n component = DaggerApplicationComponent.builder()\n .applicationModule(new ApplicationModule(this)).build();\n\n ... | [
"0.706479",
"0.69750094",
"0.6759345",
"0.6743867",
"0.6523624",
"0.6409587",
"0.6398414",
"0.6378415",
"0.6376643",
"0.63400584",
"0.6293077",
"0.6290087",
"0.6287861",
"0.62631434",
"0.6260128",
"0.6239555",
"0.6219793",
"0.62046266",
"0.6195358",
"0.6191309",
"0.617562",
... | 0.677523 | 2 |
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity. | public static Questions createEntity(EntityManager em) {
Questions questions = new Questions()
.formId(DEFAULT_FORM_ID)
.type(DEFAULT_TYPE)
.subType(DEFAULT_SUB_TYPE)
.description(DEFAULT_DESCRIPTION);
return questions;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Entity createEntity();",
"T createEntity();",
"protected abstract ENTITY createEntity();",
"void create(E entity);",
"void create(T entity);",
"E create(E entity);",
"E create(E entity);",
"protected abstract EntityBase createEntity() throws Exception;",
"TestEntity buildEntity () {\n TestEn... | [
"0.77234906",
"0.75053483",
"0.7488514",
"0.73619807",
"0.7314892",
"0.715663",
"0.715663",
"0.7150997",
"0.7150329",
"0.707783",
"0.70170516",
"0.68032324",
"0.675297",
"0.67404056",
"0.67404056",
"0.6712416",
"0.6681341",
"0.6665129",
"0.66405314",
"0.662522",
"0.66240084",... | 0.0 | -1 |
Create an updated entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity. | public static Questions createUpdatedEntity(EntityManager em) {
Questions questions = new Questions()
.formId(UPDATED_FORM_ID)
.type(UPDATED_TYPE)
.subType(UPDATED_SUB_TYPE)
.description(UPDATED_DESCRIPTION);
return questions;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Student createUpdatedEntity(EntityManager em) {\n Student student = new Student()\n .firstName(UPDATED_FIRST_NAME)\n .middleName(UPDATED_MIDDLE_NAME)\n .lastName(UPDATED_LAST_NAME)\n .studentRegNumber(UPDATED_STUDENT_REG_NUMBER)\n .dateOfB... | [
"0.6943711",
"0.67901313",
"0.67868626",
"0.6717226",
"0.6693232",
"0.66920424",
"0.6664151",
"0.663629",
"0.6621506",
"0.651395",
"0.6509064",
"0.6447006",
"0.6423055",
"0.6420765",
"0.64195627",
"0.641512",
"0.64126587",
"0.6409344",
"0.6403627",
"0.63938785",
"0.6390684",
... | 0.0 | -1 |
Create the Questions with an existing ID | @Test
@Transactional
void createQuestionsWithExistingId() throws Exception {
questions.setId(1L);
QuestionsDTO questionsDTO = questionsMapper.toDto(questions);
int databaseSizeBeforeCreate = questionsRepository.findAll().size();
// An entity with an existing ID cannot be create... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createQuestion(int sid,int qid,String qtype,String qtitle,String answer_a,String answer_b,String answer_c,String answer_d);",
"public void addTopicQuestion(int id, int tId, int qId){\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\... | [
"0.72533816",
"0.70812523",
"0.7005376",
"0.69787985",
"0.6930204",
"0.68079114",
"0.67934674",
"0.66462046",
"0.66007435",
"0.6545612",
"0.6447882",
"0.63988286",
"0.6358377",
"0.63307965",
"0.62715846",
"0.6265224",
"0.6214105",
"0.61567163",
"0.6150767",
"0.6147746",
"0.61... | 0.69241685 | 5 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jPanel3 = new java... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.7320782",
"0.72918797",
"0.72918797",
"0.72918797",
"0.728645",
"0.72498447",
"0.7214492",
"0.720934",
"0.7197145",
"0.71912014",
"0.71852076",
"0.7160113",
"0.71487373",
"0.70943654",
"0.70820624",
"0.7058153",
"0.69883204",
"0.6978216",
"0.69558746",
"0.6955715",
"0.6945... | 0.0 | -1 |
End of variables declaration//GENEND:variables | private void loadKeyListener() {
KeyboardFocusManager manger = KeyboardFocusManager.getCurrentKeyboardFocusManager();
manger.addKeyEventPostProcessor(new KeyEventPostProcessor() {
@Override
public boolean postProcessKeyEvent(KeyEvent e) {
if(e.getID()== KeyEvent.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n pu... | [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.5881482... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void keyPressed(KeyEvent typedKey)
{
if(typedKey.getID() == KeyEvent.VK_ENTER)
{
gatherInfo();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void keyReleased(KeyEvent arg0)
{
} | {
"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 |
Card associated with account | public void cardsAssociated(){
Scanner input = new Scanner(System.in);
System.out.print("Enter associated card: ");
cardAssociated = input.nextLine();
System.out.println("Associated card: " + cardAssociated);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCardNumber() {\n return this.account;\n }",
"Card getCard(UUID cardId);",
"public void addPartnerCard(Card card);",
"public Card getCard() {\n return this.card;\n }",
"public Card getCard() {\n return this.card;\n }",
"public de.uni_koblenz.jgralabtest.schemas.gre... | [
"0.7155004",
"0.6921156",
"0.6790602",
"0.67315984",
"0.66407627",
"0.663757",
"0.6528622",
"0.644414",
"0.64044315",
"0.6340787",
"0.6296873",
"0.62698823",
"0.6260192",
"0.624901",
"0.6246388",
"0.6217464",
"0.6215577",
"0.6205179",
"0.61956036",
"0.61787814",
"0.6138406",
... | 0.0 | -1 |
Requires minimum amount in account | public void lowCredit(){
if (getBalance() < minAmount){
System.out.println("Your current account is running low on credit");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMinAmount(int min) {\n _min = min;\n }",
"public int getMinAmount() {\n return minAmount;\n }",
"protected void imposeTransactionFee ()\n {\n if (getBalance () < minimumBalance)\n super.withdraw (transactionFee);\n }",
"public int getMinAmount() {\n ... | [
"0.7066626",
"0.6845851",
"0.66401434",
"0.6609423",
"0.65257716",
"0.63705397",
"0.6354063",
"0.6210831",
"0.6202264",
"0.6199206",
"0.61766666",
"0.6168882",
"0.6141158",
"0.6141129",
"0.60745937",
"0.60523885",
"0.6044942",
"0.60281575",
"0.6001876",
"0.59945154",
"0.59417... | 0.68042725 | 2 |
things concerning ShPrefs should be in separate class, | void removeAccessToken() {
SharedPreferences prefs = // because rest also needs token
context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);
prefs.edit()
.remove(KEY_ACCESS_TOKEN)
.apply();
// notification to all listeners
s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPrefs(GamePreferences prefs) {\n\t\tthis.prefs = prefs;\n\t}",
"SharedPreferences mo117960a();",
"public void handlePreferences() {\n displayPrefs ();\n }",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserPrefs getUserPrefs();",
"ReadOnlyUserP... | [
"0.6773953",
"0.6682362",
"0.653805",
"0.6450078",
"0.6450078",
"0.6450078",
"0.6450078",
"0.6442011",
"0.6440156",
"0.6407665",
"0.6374938",
"0.6364127",
"0.63118935",
"0.62254256",
"0.62092805",
"0.61672926",
"0.61577004",
"0.61533004",
"0.6152302",
"0.61442715",
"0.6130067... | 0.0 | -1 |
return super.onCreateView(inflater, container, savedInstanceState); | @Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.activity_forgot_password_verification, container, false);
extractArguments();
initViews(view);
setWizRocket();
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return super.onCreateView(inflater, container, savedInstanceState);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState... | [
"0.8520886",
"0.8520886",
"0.8470085",
"0.84399784",
"0.8238763",
"0.8238763",
"0.82017916",
"0.8171367",
"0.8142269",
"0.8109519",
"0.80197686",
"0.79594636",
"0.793347",
"0.7910684",
"0.79052544",
"0.790123",
"0.78920996",
"0.7887842",
"0.7887525",
"0.7875352",
"0.7838532",... | 0.0 | -1 |
Api call for login with username and password | private void verifyCode() {
com.explara_core.login.LoginScreenManager.getInstance().verifyCode(getActivity().getApplicationContext(), mCode, mEmail, new com.explara_core.login.LoginScreenManager.VerifyCodeListener() {
@Override
public void onCodeVerified(com.explara_core.login.login_dto.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GET(\"/login\")\n Call<LoginResponse> loginRequest(@Path(\"username\") String username\n , @Path(\"password\") String password);",
"RequestResult loginRequest() throws Exception;",
"private void login(String username,String password){\n\n }",
"@GetMapping(\"/user\")\n public User login(@... | [
"0.83100677",
"0.77972037",
"0.7758927",
"0.7620525",
"0.757486",
"0.7478169",
"0.7453212",
"0.7444127",
"0.7356364",
"0.73234415",
"0.73056644",
"0.7270182",
"0.72536254",
"0.72386557",
"0.7213041",
"0.72084063",
"0.72007513",
"0.70484585",
"0.6980499",
"0.6965086",
"0.69587... | 0.0 | -1 |
if (Constants.WIZ_ROCKET_API != null) Constants.WIZ_ROCKET_API.event.push(TAG); | public void setWizRocket() {
if (LoginScreenManager.getInstance().mAnalyticsListener != null) {
LoginScreenManager.getInstance().mAnalyticsListener.sendScreenName(getString(R.string.verification_code), getActivity().getApplication(), getContext());
}
//AnalyticsHelper.sendScreenName(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPushEvent();",
"public boolean hasPushEvent();",
"@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"Events: \", error.toString());\n\n Toast.makeText(context,\n ... | [
"0.6184982",
"0.5738616",
"0.5546473",
"0.5546473",
"0.5520843",
"0.54978114",
"0.5380214",
"0.5335049",
"0.5323172",
"0.5312438",
"0.5280938",
"0.5258079",
"0.52555025",
"0.5239534",
"0.51957357",
"0.5173001",
"0.516579",
"0.5149144",
"0.51482856",
"0.51423895",
"0.5135265",... | 0.0 | -1 |
What happends why listener receives a click | @Override
public void onClick(View v) {
switch (v.getId())
{
case R.id.bRegister: //Register button clicked
String username = etUsername.getText().toString();
String email = etEmail.getText().toString();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ClickListener(){\n System.out.println(\"I've been attached\");\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tlistener(v);\n\n\t\t}",
"public void onClicked();",
"private void assertStreamItemViewHasOnClickListener() {\n assertFalse(\"listener should have n... | [
"0.7196371",
"0.71776503",
"0.7054671",
"0.69351345",
"0.68766093",
"0.6791085",
"0.67683405",
"0.675258",
"0.6735415",
"0.6698541",
"0.66727525",
"0.66455597",
"0.6591304",
"0.65756935",
"0.6563104",
"0.6563104",
"0.6563104",
"0.654559",
"0.65415823",
"0.6540156",
"0.6533549... | 0.0 | -1 |
Store the user data in background | @Override
public void done(User returnedUser) {
startActivity(new Intent(Register.this, Login.class));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n P2PContext.getInstance().createShardProfilePreferences();\n String userId = P2PContext.getLoggedInUser();\n String deviceId = P2PContext.getCurrentDevice();\n DBSyncManager.getInstance(that).upsertUser(userId, ... | [
"0.66294515",
"0.6505734",
"0.65045375",
"0.6395841",
"0.6358658",
"0.63127446",
"0.6285636",
"0.6278978",
"0.6276975",
"0.6191232",
"0.61815673",
"0.6159901",
"0.61505497",
"0.6149969",
"0.6147485",
"0.6143553",
"0.6131233",
"0.6099808",
"0.6082955",
"0.60776514",
"0.6072212... | 0.0 | -1 |
Created by root on 11/25/16. | public interface listener_for_frag {
public void set_movie_model(movie_model s);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"private static void cajas() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
... | [
"0.59261405",
"0.58557004",
"0.5848866",
"0.5835963",
"0.5827452",
"0.57890546",
"0.5757426",
"0.57439864",
"0.5743312",
"0.5738614",
"0.57041633",
"0.57041633",
"0.57041633",
"0.57041633",
"0.57041633",
"0.56810004",
"0.5651616",
"0.5635587",
"0.562948",
"0.5610937",
"0.5604... | 0.0 | -1 |
create a new graph object | private static Graph fileToGraph(String fileName) throws IOException {
Graph graph = new Graph();
// line counter to help keep track of the first line in the array
// we will add those characters to a arrayList of characters
int lineCounter = 0;
ArrayList<Character> nodeArray = n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Graph() {\n }",
"public GraphInfo(){}",
"public Graph() {\r\n\t\tinit();\r\n\t}",
"public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }",
"@SuppressWarning... | [
"0.747292",
"0.7384809",
"0.7264467",
"0.7156339",
"0.7150749",
"0.71311",
"0.7042738",
"0.6980663",
"0.6899998",
"0.68902886",
"0.6847356",
"0.6814882",
"0.6778108",
"0.674538",
"0.67268586",
"0.67012674",
"0.6693443",
"0.6647704",
"0.66313285",
"0.6630923",
"0.66078913",
... | 0.0 | -1 |
check to see if it is a file | private static void fileToDirectDistance(String fileName, Graph graph) throws IOException {
if (new File(fileName).isFile()) {
Scanner scanner = new Scanner(new File(fileName));
// loop over each line in the file
while(scanner.hasNextLine()) {
String line = sc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isFile() { return true; }",
"boolean isFile() throws IOException;",
"public boolean isFile() { return false; }",
"@Override\n\tpublic boolean isFile() {\n\t\treturn true;\n\t}",
"boolean isFile(FsPath path);",
"public boolean isFile(String path);",
"boolean safeIsFile(FsPath path);",
... | [
"0.85381067",
"0.8339644",
"0.8253249",
"0.7958186",
"0.79543257",
"0.794079",
"0.79286766",
"0.78386945",
"0.74281955",
"0.6932908",
"0.6852711",
"0.66972256",
"0.66972256",
"0.66844267",
"0.6644685",
"0.65197283",
"0.6504495",
"0.6500503",
"0.6500503",
"0.64389414",
"0.6406... | 0.0 | -1 |
check all adjacent nodes to the start node | private static void shortestPath(Graph graph, Character startNode, int algorithm) {
Node currentNode = graph.getNode(startNode);
// keep track of the nodes visited
List<Character> nodesVisited = new ArrayList<>();
// add the current node
nodesVisited.add(currentNode.getName());... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Iterable<T> followNodeAndSelef(T start) throws NullPointerException;",
"public boolean reachable(Vertex start, Vertex end){\n\t\tSet<Vertex> reach = this.post(start); \n\t\treturn reach.contains(end);\n\t}",
"public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[f... | [
"0.6503708",
"0.6464634",
"0.6392925",
"0.6195343",
"0.6177544",
"0.6153977",
"0.6109894",
"0.60812926",
"0.6023968",
"0.6019568",
"0.5901867",
"0.5875108",
"0.586079",
"0.58559465",
"0.5810122",
"0.5768248",
"0.5764841",
"0.5753173",
"0.5741814",
"0.57325006",
"0.57240564",
... | 0.0 | -1 |
method to update the next method in algorithm 1 | private static Node updateNextNodeAlgo1(Node nextNode, Node destination) {
if (nextNode.getDistanceToZ() > destination.getDistanceToZ()) {
return destination;
}
return nextNode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void calculateNextFactor();",
"protected abstract void recombineNext();",
"@Override\n public WorkflowStep next() {\n this.boardChangeDetected = 0;\n this.missingFutures = 0;\n this.missingTetromino = 0;\n startCalculator(false);\n ... | [
"0.6714282",
"0.66268206",
"0.65343183",
"0.6484457",
"0.64673257",
"0.6219618",
"0.62090564",
"0.6201755",
"0.61920834",
"0.61733496",
"0.6157636",
"0.6118636",
"0.6115528",
"0.60841143",
"0.60812944",
"0.60664",
"0.60594857",
"0.60594857",
"0.6038111",
"0.60264385",
"0.6012... | 0.557019 | 66 |
method to update the node in algorithm 2 | private static NodeWithWeightDistanceTotal updateNextNodeAlgo2(Node nextNode, Edge edge, Integer weightDistanceTotal) {
if (edge.weight + edge.getDestination().getDistanceToZ() < weightDistanceTotal) {
weightDistanceTotal = (edge.weight + edge.getDestination().getDistanceToZ());
return n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void update(NetworkNode networkNode);",
"public void update(Packet p, Node node) {\n }",
"void nodeUpdated(Node n) throws RepositoryException;",
"void refreshNode(ChartNode node);",
"@Override\n public void setNodeStatesForUpdate(int iNode) {\n }",
"public void update() {\n\t\t\n\t}",
"... | [
"0.7385643",
"0.69577956",
"0.68651986",
"0.6720442",
"0.66493297",
"0.66396004",
"0.6624866",
"0.6624866",
"0.66091186",
"0.65708405",
"0.65708405",
"0.65708405",
"0.65708405",
"0.65263414",
"0.6524312",
"0.64950496",
"0.64950496",
"0.64950496",
"0.64439726",
"0.64439726",
"... | 0.0 | -1 |
Prevent other user create new Person2 object directly | private PrivatePerson(String name, int age) {
super(name, age);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public boolean create(Person person) {\n return false;\r\n }",
"@Override\r\n\tpublic void create(Person person) {\n\r\n\t}",
"@Override\r\n\tpublic void create(Person p) \r\n\t{\n\t\t\r\n\t}",
"Person createPerson();",
"private void loadExistingPerson() {\r\n\r\n\t\tSystem.out.p... | [
"0.6937202",
"0.62410724",
"0.61413133",
"0.60717875",
"0.6036145",
"0.6032061",
"0.6005502",
"0.5932953",
"0.58173513",
"0.57905924",
"0.57120997",
"0.56888086",
"0.5681965",
"0.56132746",
"0.5598604",
"0.5545052",
"0.5542349",
"0.5542349",
"0.5518318",
"0.5503342",
"0.54720... | 0.533119 | 26 |
Spring will scan to see if anything will return data Only if we put an annotation on it: If I get something from /api/books it will figure things out for me This mapping is called a route The 'api' here is just a prefix we're using. | @GetMapping("api/books")
public List<Book> getallBooks() {
return bookService.all().getPayload();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(\"/data\")\n public void testData() {\n }",
"public interface ApiService {\n\n @GET(\"datacatalog?format=json\")\n Call<Catalog> getTopCatalog();\n\n\n/* @GET(\"item/{storyid}.json\")\n Call<StoryResponse> getStoryDetails(@Path(\"storyid\") String storyid);\n\n @GET(\"autocomplete/... | [
"0.64259905",
"0.6421049",
"0.6390985",
"0.6311354",
"0.63020283",
"0.6294816",
"0.6265499",
"0.6254691",
"0.62496704",
"0.6232741",
"0.61959434",
"0.615705",
"0.6146646",
"0.6129279",
"0.6113402",
"0.6098971",
"0.60940284",
"0.606532",
"0.60647625",
"0.60594606",
"0.6044754"... | 0.6261387 | 7 |
Spring will take json objects and turn them into Java objects. Like magic! | @PostMapping("api/book")
public ResponseEntity<Book> addBook(@RequestBody Book book) {
Result<Book> result = bookService.save(book);
if (result.isSuccess()) {
return ResponseEntity.ok(book);
} else {
return ResponseEntity.noContent().build();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"T fromJson(Object source);",
"public interface JSONParserService extends Service {\r\n\r\n /**\r\n * Parses from json to map\r\n *\r\n * @param json data\r\n * @return Map<String, Object> or null, if json equals null\r\n */\r\n Map<String, Object> parseToMap(String json);\r\n\r\n /**... | [
"0.65850544",
"0.64309144",
"0.61834514",
"0.6177249",
"0.61021936",
"0.6002463",
"0.59867543",
"0.5970673",
"0.5946858",
"0.590812",
"0.58193195",
"0.5728247",
"0.5725588",
"0.5702162",
"0.56455666",
"0.5612233",
"0.5603683",
"0.55809355",
"0.5556744",
"0.5528739",
"0.552536... | 0.0 | -1 |
The HashMap is productId to count | public Buyer(String username, String password, String firstName, String lastName, String emailAddress, String phoneNumber) {
super(username, password, firstName, lastName, emailAddress, phoneNumber);
this.role = 1;
credit = 10000;
ProgramManager.getProgramManagerInstance().addAccountToLi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getProductCount();",
"@Override\n\tpublic int count(HashMap<String, Object> map) {\n\t\treturn paymentDao.count(map);\n\t}",
"@Override\n\tpublic int count(HashMap<String, String> map) {\n\t\treturn dao.count(map);\n\t}",
"@Override\n\t\tpublic int hashCode() {\n\t\t\treturn countMap.hashCode();\n... | [
"0.68146276",
"0.6790939",
"0.6675468",
"0.6671634",
"0.65927374",
"0.6589253",
"0.6502124",
"0.6499306",
"0.640343",
"0.6402965",
"0.63346493",
"0.6202151",
"0.6197269",
"0.6183564",
"0.61511433",
"0.61475116",
"0.61307245",
"0.6123642",
"0.61045784",
"0.6093298",
"0.6083605... | 0.0 | -1 |
Adds the product to this Buyer's buyBasket. Increases the count if the product is already in the buyBasket. | public void addProductToBuyBasket(Product product, int count) {
if (buyBasket.containsKey(product.getId()))
buyBasket.replace(product.getId(), buyBasket.get(product.getId() + count));
else
buyBasket.put(product.getId(), count);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addProductToBuyBasket(int productId, int count) {\n if (buyBasket.containsKey(productId))\n buyBasket.replace(productId, buyBasket.get(productId + count));\n else\n buyBasket.put(productId, count);\n }",
"public void addToBasket(Product product){\n\n Purc... | [
"0.77412117",
"0.744835",
"0.69609874",
"0.6747533",
"0.6683354",
"0.6633974",
"0.6584789",
"0.6555057",
"0.6521354",
"0.6402838",
"0.64014447",
"0.6397132",
"0.6362184",
"0.63392633",
"0.6327891",
"0.63256496",
"0.6310597",
"0.6277081",
"0.62590605",
"0.6224251",
"0.6201899"... | 0.7758881 | 0 |
Adds the product to this Buyer's buyBasket. Increases the count if the product is already in the buyBasket. | public void addProductToBuyBasket(int productId, int count) {
if (buyBasket.containsKey(productId))
buyBasket.replace(productId, buyBasket.get(productId + count));
else
buyBasket.put(productId, count);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addProductToBuyBasket(Product product, int count) {\n if (buyBasket.containsKey(product.getId()))\n buyBasket.replace(product.getId(), buyBasket.get(product.getId() + count));\n else\n buyBasket.put(product.getId(), count);\n }",
"public void addToBasket(Product... | [
"0.7759628",
"0.7449064",
"0.69608027",
"0.67480975",
"0.6684752",
"0.6634009",
"0.6586124",
"0.65555584",
"0.6521491",
"0.640355",
"0.6401774",
"0.63978547",
"0.63641346",
"0.63409054",
"0.6328765",
"0.63270277",
"0.6311989",
"0.6277597",
"0.6259772",
"0.62249523",
"0.620334... | 0.774172 | 1 |
TODO Autogenerated method stub | @Override
public void onLowMemory() {
if (mImageFetcher != null) {
mImageFetcher.setPauseWork(true);
mImageFetcher.setExitTasksEarly(true);
mImageFetcher.flushCache();
mImageFetcher.closeCache();
}
super.onLowMemory();
} | {
"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
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ImageCacheParams cacheParams = new ImageCacheParams(getActivity(),
Constants.IMAGE_CACHE_DIR);
cacheParams.setMemCacheSizePercent(0.25f); // Set memory cache to 25% of
// app memory
// The Imag... | {
"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
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {
mImageFetcher.setPauseWork(true);
} else {
mImageFetcher.setPauseWork(false);
}
} | {
"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
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
} | {
"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
public void onClick(View v) {
if (v.getId() == 100 + 0) {
URL = Constants.SERVER_URL + child.get(group[0]);
comNewsAdapter = null;
lsnb = null;
new AsyncLoadNews(lsnb, URL).execute();
} else if (v.getId() == 100 + 1) {
URL = Constants.SERVER_URL + child.get... | {
"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
public void onClick(View v) {
if (v.getId() == 100 + 0) {
URL = Constants.SERVER_URL + child.get(group[0]);
comNewsAdapter = null;
lsnb = null;
new AsyncLoadNews(lsnb, URL).execute();
} else if (v.getId() == 100 + 1) {
URL = Constants.SERVER_URL + child.get(... | {
"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
protected void onPreExecute() {
pd = ProgressDialogExtend.CreateSiglePDE(getActivity(), null);
pd.show();
} | {
"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
protected List<NewsBean> doInBackground(Void... params) {
synchronized (this) {
return new ParseXMLUtil().parseNewsXml(ls, url);
}
} | {
"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
protected void onPostExecute(final List<NewsBean> result) {
try {
pd.dismiss();
if (result != null && result.size() != 0) {
lsnb = result;
lsnb_temp.clear();
pageNum = result.get(0).getPageNum();
if (pageNum != null) {
pageSize = Integer.parseInt(pageNum);
}
... | {
"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
public synchronized void onRefresh() {
try {
// 此处可取当前时间,为刷新时间
curDate = new Date(System.currentTimeMillis());
sdf = new SimpleDateFormat("MM-dd HH:mm");
if (System.currentTimeMillis() - time > 500) {
URL = URL.substring(0, URL.lastIndexOf("_") + 1);
URL = URL + "1.xml";
if (lsnb !=... | {
"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
public synchronized void onLoadMore() {
try {
// 如果总页数大于当前页码数,加载更多
if (pageSize > curPage) {
URL = URL.substring(0, URL.lastIndexOf("_") + 1);
curPage++;
URL = URL + curPage + ".xml";
new AsyncLoadNews(lsnb, URL).execute();
} else {
listView.setPullLoadEnable(false);
onLoad... | {
"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 |
Only change the selection display. This action will not trigger the actions defined in the Listener. | public void select(int index) {
indirect = true;
combo.select(index);
indirect = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showSelection () {\n checkWidget();\n if( selectedIndex != -1 ) {\n showItem( getSelection() );\n }\n }",
"private void doSelect() {\n this.setVisible(false);\n }",
"@Override\n\tpublic void selectionChanged(IAction action, ISelection selection) {\n\t}",
"@Override\r... | [
"0.7296136",
"0.7019872",
"0.7019793",
"0.6971958",
"0.69541943",
"0.6902064",
"0.6779351",
"0.6767216",
"0.67014503",
"0.667815",
"0.6666053",
"0.6662956",
"0.6652822",
"0.6612677",
"0.659442",
"0.659442",
"0.6551435",
"0.6387001",
"0.63714886",
"0.63426226",
"0.6338873",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
finish();
} | {
"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
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
downLoadApk();
//new DownLoadNewVer().execute();
//finish();
} | {
"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 |
Determines weather or not the device has Telephony capability | public static boolean HasTelephony(Context context){
PackageManager packageManager = context.getPackageManager();
if(packageManager == null){
return false;
}
return packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean hasTelephonyHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.telephony\")) {\n Log.d(\"HardwareFeatureTest\", \"Device can make phone calls\");\n return true;\n }\n return false;\n }",
"private bo... | [
"0.7540525",
"0.68971205",
"0.6819521",
"0.6802003",
"0.665245",
"0.6547293",
"0.6446512",
"0.6340952",
"0.63336885",
"0.6168149",
"0.61583644",
"0.61538893",
"0.6143716",
"0.6121797",
"0.6121797",
"0.60077065",
"0.5956055",
"0.5924581",
"0.5915969",
"0.5889738",
"0.5843085",... | 0.7801513 | 0 |
Renvoie l'objet Color correspondant a la String passee en parametre | public Color choixCouleur(String s) {
if(s.equals("ROUGE")) return Color.RED;
else if(s.equals("VERT")) return Color.GREEN;
else if(s.equals("BLEU")) return Color.BLUE;
else if(s.equals("ROSE")) return Color.PINK;
else if(s.equals("BLANC")) return Color.WHITE;
else if(s.equals("VIOLET")) return Color.PURPLE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setColor(String c);",
"public void set_color(String color){ color_ = GralColor.getColor(color.trim()); }",
"String getColor();",
"public String getColorString();",
"public java.awt.Color colorFromString(String s) {\n if (s.contains(\"RGB\")) {\n String[] parts = s.split(\"\\\\... | [
"0.73979235",
"0.73011035",
"0.7248116",
"0.72088754",
"0.7115448",
"0.7110303",
"0.707938",
"0.70585144",
"0.6966418",
"0.68594825",
"0.683967",
"0.67895025",
"0.6750269",
"0.6729635",
"0.66942334",
"0.66722894",
"0.6637339",
"0.66357714",
"0.66224813",
"0.6603873",
"0.65941... | 0.6320764 | 47 |
MODIFIES: this EFFECTS: spawn new enemy in the game | public void spawn(Integer spawnSize) {
for (Integer i = 0; i < spawnSize; i++) {
Enemy enemy = new Enemy(mainPlayerPosX, mainPlayerPosY);
enemies.put(i, enemy);
}
initEnemiesSpawned = spawnSize;
enemiesSize = spawnSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void enemy(){\n\t\tenemy = null;\n\t\twhile(enemy == null){\n\t\t spawnEnemy();\n\t\t}\n\t}",
"public void enemySpawner(){\n\t\tif (spawnFrame >= spawnTime){\n\t\t\tfor(int i =0;i<enemies.size();i++){\n\t\t\t\tif (!enemies.get(i).getInGame()){\n\t\t\t\t\tenemies.get(i).spawnEnemy(Map.enemy);... | [
"0.7059066",
"0.6955167",
"0.6876833",
"0.6762488",
"0.67242104",
"0.6659563",
"0.6637804",
"0.66267765",
"0.6586828",
"0.6557806",
"0.6549088",
"0.6524559",
"0.6458395",
"0.64501846",
"0.6445646",
"0.6439105",
"0.642568",
"0.6425154",
"0.6420435",
"0.64078677",
"0.64070624",... | 0.61265224 | 49 |
EFFECT: updates the ememies location | public void updateEnemies() {
for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {
entry.getValue().update(mainPlayerPosX, mainPlayerPosY);
if (entry.getValue().isDead()) {
enemiesSize--;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void update_location() throws Exception {\r\n\t\tif (children.size() == 1) {\r\n\t\t\tCLocation bloc = children.get(0).get_location();\r\n\t\t\tthis.location = bloc.get_source().get_location(bloc.get_bias(), bloc.get_length());\r\n\t\t} else if (children.size() > 1) {\r\n\t\t\tCLocation eloc = children.get... | [
"0.6861777",
"0.67472553",
"0.66451395",
"0.6483603",
"0.6475358",
"0.6456185",
"0.64536095",
"0.63089585",
"0.62418747",
"0.6203149",
"0.6196039",
"0.61919993",
"0.618857",
"0.6155635",
"0.61126286",
"0.60969734",
"0.609569",
"0.6044318",
"0.6026251",
"0.60257155",
"0.602571... | 0.0 | -1 |
EFFECTS: get number of dead enemies | public int getNumDead() {
int count = 0;
for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {
if (entry.getValue().isDead()) {
count++;
}
}
return count;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }",
"public int howManyHeroDead() {\r\n int count;\r\n count = 0;\r\n for (Hero h: team) {\r\n if (h.isDead()) {\r\n count = count + 1;\r\n }\r\n }\r\n return cou... | [
"0.7273743",
"0.7135253",
"0.6977248",
"0.67874664",
"0.66465956",
"0.66198313",
"0.6607794",
"0.65182245",
"0.6439028",
"0.64017934",
"0.63974607",
"0.6337892",
"0.633536",
"0.6307335",
"0.629436",
"0.6267729",
"0.6158437",
"0.6147029",
"0.61322856",
"0.6079326",
"0.60603076... | 0.7382205 | 0 |
EFFECTS: returns the number of enemies in initially spawned | public int initSize() {
return initEnemiesSpawned;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }",
"public int size() {\n return enemies.size();\n }",
"public int getTotalEnemies() {\n\t\treturn totalEnemies;\n\t}",
"@Override\n\tpublic int getEnemyCount() {\n\t\treturn 0;//enNum;\n\t}",
"public static int getEn... | [
"0.6914131",
"0.68801516",
"0.6689271",
"0.6522364",
"0.6411254",
"0.632378",
"0.6292524",
"0.5932288",
"0.58762866",
"0.5870363",
"0.58427584",
"0.5840926",
"0.581578",
"0.5810007",
"0.5794584",
"0.5778734",
"0.57177705",
"0.5706794",
"0.57060313",
"0.5701659",
"0.5694747",
... | 0.6470658 | 4 |
EFFECTS: returns the size of the enemy hashmap | public int size() {
return enemies.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int initSize() {\n return initEnemiesSpawned;\n }",
"@Override\n public int getSize() {\n return map.size();\n }",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
... | [
"0.6361611",
"0.6288397",
"0.62452424",
"0.6179455",
"0.6167093",
"0.6084939",
"0.60825646",
"0.6046665",
"0.60323566",
"0.6029023",
"0.60205793",
"0.6017073",
"0.6012406",
"0.60025257",
"0.5972114",
"0.59662724",
"0.59494627",
"0.5914757",
"0.59037817",
"0.5900467",
"0.58629... | 0.67830676 | 0 |
EFFECTS: kills all enemies currently spawned | public void killAll() {
for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {
if (!!!entry.getValue().isDead()) {
entry.getValue().setHealth(0);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void enemyoff(){\n getWorld().removeObject(this);\n }",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n ... | [
"0.7140298",
"0.68164104",
"0.67301136",
"0.66866076",
"0.6605781",
"0.6588345",
"0.6560742",
"0.6557921",
"0.65125316",
"0.64988357",
"0.64850706",
"0.64612585",
"0.6454234",
"0.64215887",
"0.64086246",
"0.64057624",
"0.6389588",
"0.6352056",
"0.6338028",
"0.632124",
"0.6314... | 0.72676075 | 0 |
MODIFIES: this EFFECTS: add enemy externally. | public void forceAddEnemy(Enemy enemy) {
enemies.put(enemiesSize, enemy);
enemiesSize++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addEnemySheild() {\n this.enemyShield += 1;\n }",
"public void addEnemy(Enemy enem)\r\n\t{\r\n\t\tenemy.add(new Enemy(enem));\r\n\t}",
"@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}",
"private void addEnemies() {\n\t\tred_ghost = new Enemy();\r\n\t\tthis.add(red_ghost);\r\... | [
"0.77380407",
"0.677207",
"0.6767409",
"0.67270523",
"0.6701463",
"0.6644148",
"0.66364187",
"0.6629106",
"0.6547814",
"0.6478757",
"0.6474177",
"0.6375186",
"0.6331196",
"0.6316957",
"0.6289465",
"0.6248551",
"0.6239078",
"0.62071395",
"0.6202856",
"0.61530143",
"0.61181563"... | 0.63786584 | 11 |
It is a default constructor which describes the class Mouse. | Mouse(){
System.out.println("This is Mouse class.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Mouse() {}",
"public Mouse() {\n\t\tthis(null);\n\t}",
"public MouseHandler()\n {\n // initialise instance variables:\n //INSTANTIATE listeners list:\n _listeners = new ArrayList<IMouseListener>();\n \n }",
"public MousePointer () {\n\t\tthis.loadPointer(MousePointer.... | [
"0.8927167",
"0.88085705",
"0.77284366",
"0.7562726",
"0.7197405",
"0.6973913",
"0.67527264",
"0.66988534",
"0.65822816",
"0.64842916",
"0.64747554",
"0.62979966",
"0.6221716",
"0.61643183",
"0.61335564",
"0.6102602",
"0.60532296",
"0.6051809",
"0.60245126",
"0.602183",
"0.59... | 0.833612 | 2 |
This describes the lifetime of Mouse. | @Override
public void lifeTime() {
System.out.println("Lifetime is around 5 years.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Mouse() {}",
"public Mouse getMouse() {\n return mouse;\n }",
"public long getLifetime() {\n return lifetime;\n }",
"public MouseHandler()\n {\n // initialise instance variables:\n //INSTANTIATE listeners list:\n _listeners = new ArrayList<IMouseListener>();... | [
"0.5903759",
"0.57952857",
"0.57940286",
"0.57504696",
"0.5740515",
"0.5705688",
"0.56899846",
"0.56700915",
"0.5659356",
"0.54957974",
"0.54957336",
"0.54064727",
"0.53232706",
"0.52835715",
"0.52540606",
"0.5174148",
"0.51073885",
"0.5062258",
"0.5052465",
"0.5038016",
"0.5... | 0.0 | -1 |
This describes about the food type(whether they are herbivorous or not). | @Override
public void food(){
System.out.println("They are Herbivorous in nature.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTypeOfFood()\n {\n return typeOfFood;\n }",
"public String getTypeOfFood(){\n return typeOfFood;\n }",
"@Override\n public String getFoodType() {\n return foodType;\n }",
"@Override\n public String getFoodType() {\n return foodType;\n }",
"public String getFood... | [
"0.7787209",
"0.774811",
"0.7612692",
"0.7612692",
"0.74855953",
"0.7224345",
"0.7178439",
"0.71424043",
"0.67441463",
"0.66478765",
"0.64070314",
"0.63955075",
"0.6381514",
"0.6241682",
"0.6240424",
"0.620248",
"0.61778337",
"0.6115762",
"0.5916852",
"0.5891055",
"0.58784735... | 0.5522303 | 49 |
This tells us about their habitat. | @Override
public void home() {
System.out.println("They live underground.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList getHabitant() {\n return habitant;\n }",
"private void meetWithHrForBenefitAndSalryInfo() {\n metWithHr = true;\n }",
"Habit getPassedHabit();",
"HabitEvent getPassedHabitEvent();",
"public void setHabitant(ArrayList habitant) {\n this.habitant = habitant;\n }... | [
"0.6210546",
"0.61484355",
"0.5805365",
"0.5794487",
"0.57838225",
"0.57324195",
"0.56804574",
"0.5634892",
"0.55643296",
"0.55642575",
"0.5492533",
"0.546613",
"0.54621905",
"0.5410985",
"0.5375948",
"0.5374336",
"0.53698885",
"0.5364904",
"0.5362774",
"0.535681",
"0.5350109... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246874",
"0.72017205",
"0.71953726",
"0.7177551",
"0.7107639",
"0.7040628",
"0.7038909",
"0.70122313",
"0.7010098",
"0.69809204",
"0.6946122",
"0.6940016",
"0.6934117",
"0.6917838",
"0.6917838",
"0.6891204",
"0.6883838",
"0.6875593",
"0.6874913",
"0.6862368",
"0.6862368",... | 0.0 | -1 |
Brute force solution. O(N^2). | public static int TwoSum_bruteForce(int[] a,int lo, int hi, int x)
{
int count = 0;
for (int i = lo; i < hi; ++i)
{
for (int j = i+1; j < a.length; ++j)
{
if (a[i]+a[j] == x)
{
System.out.println("Pair: (" + a[i] + "," + a[j] + ")");
++count;
}
}
}
return count;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int solve() {\n FactorizationSieve sieve = new FactorizationSieve(LIMIT + 1);\n int[] abundants = new int[LIMIT + 1];\n int k = 0;\n\n for (int n = 1; n <= LIMIT; n++)\n if (sieve.sigma(1, n) > n + n)\n abundants[k++] = n;\n\n // Sum pair o... | [
"0.66043943",
"0.64965016",
"0.6462854",
"0.63918704",
"0.6324118",
"0.6304337",
"0.6226967",
"0.6152146",
"0.6146216",
"0.61075544",
"0.60545206",
"0.6053729",
"0.6051144",
"0.60391474",
"0.60081697",
"0.5972351",
"0.59569865",
"0.59557855",
"0.5953613",
"0.5946184",
"0.5938... | 0.54997 | 63 |
Hash map solution, O(N) but with O(N) space. Find 2 items that sum to x. Store in a map xa[i] is the an a[j] such that a[j] + a[i] = x i.e. a[j] = x a[i] just look up the value. does not have to be sorted. | public static int TwoSum_hashed(int[] a, int x)
{
int count = 0;
HashMap<Integer, Integer> map = new HashMap<Integer,Integer>();
for (int i = 0; i < a.length; ++i)
{
int diff = x-a[i];
if (map.get(a[i]) != null) {
int v2 = map.get(a[i]);
System.out.println("Pair: (" + a[i] + "," + v2 + "... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String findSum2(int[] a, int x){\n\t\tMap<Integer, Integer> cache = new HashMap<Integer, Integer>();\r\n\t\tint delta;\r\n\t\tfor(int i = 0; i < a.length; i++) {\r\n\t\t\tdelta = x - a[i];\r\n\t\t\tif(cache.get(delta) != null) {\r\n\t\t\t\treturn delta + \" \" + a[i];\r\n\t\t\t}else{\r\n\t\t\t\tcache... | [
"0.6990336",
"0.6804154",
"0.6765138",
"0.67628163",
"0.6437653",
"0.63341427",
"0.6331134",
"0.62305784",
"0.6067332",
"0.60291183",
"0.60165",
"0.60066897",
"0.6006274",
"0.5961154",
"0.59226733",
"0.58876103",
"0.58835936",
"0.5836343",
"0.5827248",
"0.58133477",
"0.580741... | 0.80235684 | 0 |
O(N) solution but needs sorting. Sort the input aray. For each item a[i], check the ending element A[j] (j = n1 initially) if a[i] + a[j] == x, this is a solution. if a[i] + a[j] > x, then a[j] is larger, decreemnt j by 1 and try again. if a[i] + a[j] < x, then increment a[i] to increase the sum. | public static int TwoSum_scan(int[] a, int lo, int hi, int x)
{
int count = 0;
Arrays.sort(a);
for (int i = lo, j = hi-1; i < j ; )
{
if (a[i] + a[j] == x)
{
System.out.println("Pair: (" + a[i] + "," + a[j] + ")");
++i;
--j;
++count;
continue;
}
if (a[i] + a[j] > ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void pairSum(int[] input, int x){\n \tint n = input.length;\n\t\tint a, b;\n\t\tfor (int i = 0; i < n - 1; i++) { \n\t\t\tfor (int j = i + 1; j < n; j++) { \n\t\t\t\tif (input[i] + input[j] == x) {\n\t\t\t\t\tif(input[j] < input[i]) {\n\t\t\t\t\t\ta = input[j];\n\t\t\t\t\t\tb = input[i];\n\t\t\t... | [
"0.68279594",
"0.6675751",
"0.6644415",
"0.64335376",
"0.6419214",
"0.64130944",
"0.64076656",
"0.63990206",
"0.638475",
"0.6353726",
"0.63054144",
"0.62820214",
"0.6278798",
"0.6273713",
"0.62396866",
"0.6212821",
"0.62107474",
"0.61962384",
"0.61811936",
"0.616409",
"0.6132... | 0.61335826 | 20 |
Find if an array has elements that sum to 0. This algorithm takes cubic time. | public static void ThreeSum_cubic(int[] a)
{
for (int i = 0; i < a.length; ++i)
{
for (int j = i+1; j < a.length; ++j)
{
for (int k = j + 1; k < a.length; ++k)
{
if (a[i] + a[j] + a[k] == 0)
System.out.println("[" + a[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean checkZero(int[] count) {\n\t\tfor (int i = 0; i < count.length; i++) {\n\t\t\tif (count[i] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isZero()\r\n {\r\n boolean is = true;\r\n for (int i = 0; i < SIZE; i++)\r\n {\r\n if ( this.myA... | [
"0.73357826",
"0.7171955",
"0.70769614",
"0.6724334",
"0.6608179",
"0.6487638",
"0.6461739",
"0.6429311",
"0.64239866",
"0.6412211",
"0.64004177",
"0.6337407",
"0.6329434",
"0.62532806",
"0.6208304",
"0.6206468",
"0.62060815",
"0.6150434",
"0.60990816",
"0.60741186",
"0.60463... | 0.0 | -1 |
a N^2logn solution. sort the array at cost nlogn then for each tuple do a binary search for k. | public static void ThreeSum_binsearch(int[] a, int k)
{
// sort the array
Arrays.sort(a);
for (int i = 0; i < a.length; ++i)
{
for (int j = i+1; j < a.length; ++j)
{
int diff = k - (a[i] + a[j]);
int idx = Arrays.binarySearch(a, j+1, a.length, di... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean findComplimentaryPair_O_NlogN(int []a, int k, int[] basket){\n\t\tQuickSort.qSort(a, 0, a.length-1);\n\t\tint i = 0;\t\t//left pointer\n\t\tint j = a.length - 1; // right pointer\n\n\t\twhile( i <= j){\n\t\t int s = a[i] + a[j];\n\t\t if(s < k){\n\t\t ++i;\n\t\t }else if( s > k )... | [
"0.707936",
"0.64795977",
"0.6476309",
"0.646474",
"0.6462907",
"0.6391287",
"0.638839",
"0.6359801",
"0.62504834",
"0.62182754",
"0.6215921",
"0.6206116",
"0.6177642",
"0.6164281",
"0.6153437",
"0.6139607",
"0.6131052",
"0.61085945",
"0.6095488",
"0.60938084",
"0.608563",
... | 0.6456618 | 5 |
Clamps the elapsed time from the game loop / Without this, objects can possibly be led tunneling through other objects or getting out of bounds | public static int clamp(int var, int min, int max) {
// Clamping means literally in this instance.
//// it's used to restrict a value to a given range
if (var >= max) {
return var = max;
} else if (var <= min) {
return var = min;
} else {
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setTime(){\n gTime += ((float)millis()/1000 - millisOld)*(gSpeed/4);\n if(gTime >= 4) gTime = 0;\n millisOld = (float)millis()/1000;\n }",
"@Override\n public void timerTicked() {\n //subtracts one second from the timer of the current team\n if(state.getCurrentTeams... | [
"0.635507",
"0.61443275",
"0.6093528",
"0.603941",
"0.6018446",
"0.5987115",
"0.59154755",
"0.58732",
"0.58526516",
"0.58471936",
"0.5826568",
"0.582041",
"0.582041",
"0.582041",
"0.58132815",
"0.57842946",
"0.5746964",
"0.5732054",
"0.5728086",
"0.572084",
"0.5717954",
"0.... | 0.0 | -1 |
halts threads, ends the app | public synchronized void stop() {
try {
thread.join();
running = false;
} catch (InterruptedException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t\n\t\t\t while ( !bFinished ) {\n\t\t\t \ttry {\n\t\t\t\t\t\t\tThread.sleep(200);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t }\n\t... | [
"0.68404603",
"0.6688826",
"0.66159827",
"0.6559145",
"0.65109694",
"0.65019923",
"0.6470515",
"0.6463122",
"0.64492166",
"0.6448488",
"0.6445716",
"0.64182687",
"0.6410067",
"0.6396583",
"0.6389255",
"0.63674235",
"0.63615966",
"0.63591737",
"0.63509357",
"0.6348777",
"0.631... | 0.0 | -1 |
/ fps for the game that loops over the code research part: renders game as fast as it can resolves large amount of collisions per frame, dragging the performance. calls tick() at a steady frequency to make the game stable improvement: avoid using System.currentTimeMillis() it is susceptible to changing the system clock... | public void run() {
this.requestFocus();
long lastTime = System.nanoTime();
double amountOfTicks = 60.0;
double ns = 1000000000 / amountOfTicks;
double delta = 0;
long timer = System.currentTimeMillis();
int frames = 0;
while (running) {
long n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void run() {\n\t\tlong lastLoopTime = System.nanoTime();\n\t\tfinal int TARGET_FPS = 60;\n\t\tfinal long OPTIMAL_TIME = 1000000000 / TARGET_FPS;\n\n\t\t// keep looping round til the game ends\n\t\twhile (true) {\n\t\t\t// work out how long its been since the last update, this\n\t\t\t// will be used to calcu... | [
"0.73956114",
"0.71801716",
"0.7173075",
"0.7169436",
"0.71178067",
"0.70849466",
"0.70401657",
"0.70386857",
"0.69815797",
"0.6976942",
"0.6959786",
"0.6956818",
"0.6920461",
"0.6902019",
"0.6894856",
"0.688098",
"0.6821375",
"0.6798946",
"0.67979634",
"0.6760368",
"0.673239... | 0.6715751 | 21 |
updates the game at the rate specified in function run() | private void tick() {
handler.tick();
if (gameStart == GAME_STATE.Game) {
hud.tick();
menu.tick();
// determines player lives + game over
if (HUD.LIVES <= 0) {
HUD.LIVES = 5;
gameStart = GAME_STATE.GameOver;
} e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void startGame() {\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n update();\n }\n }, 0, 2);\n }",
"public void run() {\n\t\tlong lastLoopTime = System.nanoTime();\n\t\tfinal int TARGET_FPS = ... | [
"0.7722066",
"0.75045604",
"0.74930716",
"0.7491604",
"0.74515057",
"0.7433561",
"0.7369644",
"0.73596275",
"0.73313606",
"0.7319628",
"0.727864",
"0.72474337",
"0.7218437",
"0.71916753",
"0.71853805",
"0.7165349",
"0.712031",
"0.71158886",
"0.7099844",
"0.70953476",
"0.70901... | 0.0 | -1 |
renders background, game state | private void render() {
final int numBuffers = 3;
BufferStrategy bs = this.getBufferStrategy(); // starts value at null
if (bs == null) {
this.createBufferStrategy(numBuffers); // 3: buffer creations
return;
}
Graphics g = bs.getDrawGraphics();
g.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void render() {\n\t\t// Call update before anything gets drawn\n\t\tupdate();\n\n\t\t// Begin drawing operations - set projection matrix, grab frames, etc\n\t\tmBatch.setProjectionMatrix(mCamera.combined);\n\n\t\tGdx.gl.glClearColor(0, 0, 0.2f, 1);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);... | [
"0.75116986",
"0.7268553",
"0.72322595",
"0.7218686",
"0.7193849",
"0.71841717",
"0.71206886",
"0.7092217",
"0.7071911",
"0.7065334",
"0.7017937",
"0.70060897",
"0.6968182",
"0.69574803",
"0.6917063",
"0.68869984",
"0.6847646",
"0.68429697",
"0.6833158",
"0.68299764",
"0.6808... | 0.7013495 | 11 |
LET PLAYER PICK PLAYER CHARACTER | public Character pickPlayer()
{
System.out.println("\tChoose your fighter!\n");
for(int i = 0; i < characterList.size(); i++)
{
Character chara = characterList.get(i);
System.out.println("\t" + (i + 1) + ") " + chara.getFullName());
}
System.out.print(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Player getSelectedPlayer();",
"private void autoCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new MachinePlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unkno... | [
"0.682831",
"0.66388404",
"0.6572943",
"0.6377947",
"0.63494664",
"0.6347147",
"0.6284241",
"0.6238599",
"0.62268037",
"0.6168311",
"0.6161462",
"0.61359906",
"0.61206114",
"0.6113751",
"0.6098877",
"0.60913503",
"0.6080318",
"0.60690975",
"0.605454",
"0.6054275",
"0.6041663"... | 0.6952759 | 0 |
RANDOMLY PICK OPPONENT FROM REMAINING CHARACTERS | public Character pickOpponent()
{
int oppIndex = random.nextInt(characterList.size());
opponent = characterList.get(oppIndex);
return opponent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int getCombo() {\n return generator.nextInt(COMBOS) + 1;\n }",
"private int generatePiece()\n\t{\n\t\tint toReturn = 0;\n\t\tint max = 1;\n\t\tint min = -1;\n\t\t\n\t\twhile(toReturn == 0)\n\t\t{\n\t\t\ttoReturn = r.nextInt((max - min) + 1) + min;\n\t\t}\n\t\tSystem.out.println(toReturn)... | [
"0.5993484",
"0.57976913",
"0.57699513",
"0.5724601",
"0.5689949",
"0.56746066",
"0.565439",
"0.5636447",
"0.55990744",
"0.55891544",
"0.5581645",
"0.55457187",
"0.55179805",
"0.5498342",
"0.5494366",
"0.54646814",
"0.54584974",
"0.54532",
"0.54369056",
"0.540364",
"0.5383497... | 0.0 | -1 |
int number = 0; | public void optionsListMenu(int number) {
switch (number) {
case 1:
showFilterByMake();
break;
case 2:
showFilterByModel();
break;
case 3:
showFilterByBudget();
break;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int number() {\n return number;\n }",
"int getNumber () { return number; }",
"public void setNumber(int number)\n {\n Number = number;\n }",
"public int getNumber(){\n\treturn number;\n }",
"void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}",
"public int getNumber(){\n\t\tr... | [
"0.709438",
"0.70010084",
"0.6945177",
"0.6921187",
"0.6896732",
"0.68863595",
"0.6801239",
"0.6741993",
"0.6711298",
"0.6700403",
"0.66929173",
"0.66726977",
"0.66701293",
"0.6664574",
"0.66504157",
"0.6633711",
"0.6629753",
"0.66187906",
"0.66187906",
"0.66187906",
"0.66102... | 0.0 | -1 |
code for configuring the back button back button returns to submit_claim page | private void configureBackButton(){
Button backButton = (Button) findViewById(R.id.backButton);
backButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view){
//TODO add the code that erases saved login key
//o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}",
"private void setupBack() {\n\t\tmakeButton(\"Back\", (ActionEvent e) -> {\n\t\t\tchangeView(\"login\");\n\t\t});\n\t}",
"@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}",
"public void click_defineSetup... | [
"0.72859526",
"0.72294074",
"0.7199831",
"0.7175125",
"0.7059417",
"0.7039439",
"0.69342583",
"0.68973064",
"0.6880644",
"0.6876561",
"0.6870244",
"0.6853894",
"0.68410534",
"0.6837092",
"0.68353105",
"0.67959285",
"0.6795017",
"0.6777359",
"0.67662585",
"0.67655987",
"0.6759... | 0.70794064 | 4 |
TODO add the code that erases saved login key opens login page and closes home page stack | @Override
public void onClick(View view){
startActivity(new Intent(homePage.this, MainActivity.class));
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void configureBackButton(){\n Button backButton = (Button) findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view){\n //TODO add the code that erases saved login key\n\n ... | [
"0.7297911",
"0.65950435",
"0.64312124",
"0.6369084",
"0.6341829",
"0.6304316",
"0.6295123",
"0.6272485",
"0.62262183",
"0.6220683",
"0.6191103",
"0.61461914",
"0.6142239",
"0.61388725",
"0.6130377",
"0.61132383",
"0.60819054",
"0.60148317",
"0.6007417",
"0.6002883",
"0.59918... | 0.0 | -1 |
Establish a connection to the server | public boolean createConnection() throws CommunicationException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void establishConnection() {\n try {\n PropertiesLoader loader = new PropertiesLoader();\n String sshUser = loader.loadProperty().getProperty(\"sshUser\");\n String sshPassword = loader.loadProperty().getProperty(\"sshPassword\");\n String sshHost = ... | [
"0.72269607",
"0.7192324",
"0.70995027",
"0.69298446",
"0.69267154",
"0.6910459",
"0.6906998",
"0.6891465",
"0.68719083",
"0.686514",
"0.685363",
"0.68261755",
"0.6773468",
"0.6741133",
"0.6740053",
"0.67155755",
"0.670801",
"0.66845393",
"0.66841555",
"0.66636217",
"0.665658... | 0.0 | -1 |
Terminate the connection to the server | public boolean endConnection() throws CommunicationException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void terminate() {\n config.closeConnection();\n }",
"public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}",
"public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}",
"private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating ... | [
"0.7824423",
"0.73657155",
"0.72246987",
"0.71948093",
"0.71118265",
"0.7067122",
"0.6991871",
"0.69847125",
"0.6952128",
"0.68771064",
"0.68660796",
"0.6856094",
"0.6851165",
"0.68372047",
"0.68083847",
"0.67907614",
"0.67830336",
"0.6760978",
"0.6753863",
"0.673635",
"0.673... | 0.6810489 | 14 |
Initialize your data structure here. | public MovingAverage(int size) {
q = new LinkedList();
this.size = size;
sum = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initData() {\n }",
"private void initData() {\n\t}",
"private void initData() {\n\n }",
"public void initData() {\n }",
"public void initData() {\n }",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\... | [
"0.79946685",
"0.7973242",
"0.7808862",
"0.77763873",
"0.77763873",
"0.7643394",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.75553316",
"0.7543321",
"0.7543321",
"0.75426376",
"0.75426376",
"0.75426376",
"0.7532583",
"0.75228804",
"0... | 0.0 | -1 |
/ Your class should be named Solution. Read input as specified in the question. Print output as specified in the question. | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int row = scan.nextInt();
int col = scan.nextInt();
int[][] myArray = new int[row][col];
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
myArray[i][j] = scan.nextInt();
}
}
int i, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void solution() {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(solution());\r\n\t}",
"public static void main(String[] args) {\n\t\t\tSystem.out.println(Solution(5, 83));\n\t\t\t\n\t\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.i... | [
"0.76882386",
"0.73668814",
"0.7142821",
"0.70783526",
"0.7006539",
"0.70020896",
"0.69825906",
"0.69812477",
"0.6967007",
"0.69522285",
"0.6945805",
"0.693986",
"0.6850797",
"0.67872095",
"0.6781298",
"0.67670065",
"0.6760525",
"0.67463255",
"0.6735596",
"0.6735596",
"0.6731... | 0.0 | -1 |
Factory interface implemented by child classes System_Admin and Shopper | public interface Iuser extends Remote{
public String getUsername();
public String getPassword();
public void setPassword(String string);
public void setUsername(String string);
public void getItem(IItem item);
public void purchaseItems();
public int getIte... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract ProductFactory getFactory();",
"public abstract Product productFactory(String type);",
"public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the... | [
"0.6694276",
"0.6346458",
"0.63353413",
"0.62848383",
"0.6272549",
"0.6251851",
"0.6229818",
"0.62139666",
"0.6207645",
"0.61815786",
"0.6151189",
"0.61300427",
"0.6129285",
"0.60563284",
"0.6053874",
"0.6040586",
"0.6002199",
"0.598574",
"0.59818065",
"0.5977057",
"0.5969358... | 0.0 | -1 |
/ renamed from: Ux | public final MediaFormat mo41565Ux() {
AppMethodBeat.m2504i(12848);
C4990ab.m7416i("MicroMsg.VideoCodecConfig", "targetWidth:" + this.eTi + ", targetHeight:" + this.eTj + ", bitrate:" + this.bitrate + ", frameRate:" + this.eTk + ", colorFormat:" + this.eTl + ", iFrameInterval:" + this.eTm);
Medi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void xuat() {\n\n\t}",
"public void mo21879u() {\n }",
"abstract void uminus();",
"public abstract void mo20899UO();",
"protected Item func_146068_u() { return Item.func_150899_d(0); }",
"@Override\n\tpublic void xuat() {\n\t\tsuper.xuat();\n\t}",
"private USI_TRLT() {}",
"Uom getUom();",
... | [
"0.7054415",
"0.6365078",
"0.6262363",
"0.6097347",
"0.6023744",
"0.6014162",
"0.59930533",
"0.578568",
"0.5668617",
"0.5667812",
"0.56495655",
"0.5632418",
"0.5630484",
"0.55850714",
"0.5582077",
"0.5575835",
"0.5547519",
"0.554729",
"0.55384517",
"0.55242044",
"0.5517453",
... | 0.0 | -1 |
provides implementation for the nondefault method of the interface | @Override
public int method1() {
return 20;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void defaultMethod() {\n I4.super.defaultMethod();\n }",
"public default void defaultMethod(){\r\n System.out.println(\"This is a method from Other Interface and can be overriden.\");\r\n }",
"default void defaultMethod() {\n System.out.println(\"from InterfaceA... | [
"0.7249805",
"0.7235305",
"0.718721",
"0.70334166",
"0.7029502",
"0.6939642",
"0.6793762",
"0.6793507",
"0.67568094",
"0.6712841",
"0.6688373",
"0.66684514",
"0.666464",
"0.66397655",
"0.65871805",
"0.6584456",
"0.658187",
"0.6563336",
"0.6538833",
"0.6538833",
"0.65372545",
... | 0.0 | -1 |
Overriding the default method of MyInterface | public String displayGreeting() {
return "Hello from MyClass";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void myMethod() {\n\t\t\n\t}",
"public interface MyInterface2 {\n default void hello(){\n System.out.println(\"hello again\");\n }\n}",
"public default void defaultMethod(){\r\n System.out.println(\"This is a method from Other Interface and can be overriden.\");\r\n }... | [
"0.7033782",
"0.69619066",
"0.692019",
"0.6892254",
"0.68289286",
"0.6778242",
"0.6765848",
"0.66891307",
"0.65851414",
"0.65763605",
"0.64657754",
"0.64506704",
"0.637864",
"0.6360038",
"0.63535815",
"0.63369447",
"0.6324507",
"0.62997884",
"0.6285899",
"0.62815917",
"0.6238... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.