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 |
|---|---|---|---|---|---|---|
Returns the project variable. | public VariableDeclaration getProject() {
return project;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static final String getProject() { return project; }",
"public static final String getProject() { return project; }",
"public String getProjectName() {\n\t\treturn project;\n\t}",
"public String getProjectno() {\r\n return projectno;\r\n }",
"public Project getProject(){\n\t\treturn this.p... | [
"0.7841279",
"0.7841279",
"0.7437907",
"0.7402754",
"0.7168444",
"0.7158657",
"0.7154943",
"0.71521616",
"0.71482575",
"0.7134434",
"0.7122274",
"0.71150815",
"0.7090505",
"0.70506215",
"0.7049244",
"0.7043786",
"0.7027792",
"0.7027792",
"0.70081276",
"0.70076734",
"0.7007673... | 0.7851586 | 0 |
Returns the version restriction. | public IVersionRestriction getVersionRestriction() {
return restriction;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getVersionConstraint() {\n return version;\n }",
"int getGvlSpecificationVersion();",
"public VersionRange getVersionRange()\n {\n return versionRange;\n }",
"public JkVersionRange versionRange() {\n return versionRange;\n }",
"java.lang.String getVersion();",... | [
"0.7384835",
"0.7116888",
"0.6629912",
"0.65701795",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6471489",
"0.6464322",
"0.6464322",
"0.6464322",
"0.6464322",
"0.6416677",
"0.6401403",
"0.63853705",
"0.63604003",
... | 0.8290775 | 0 |
real resolution happens at runtime! | @Override
public TypeDescriptor<?> inferType() throws VilException {
return TypeRegistry.voidType();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void doResolve() {\n\r\n\t}",
"public abstract void resolve();",
"void resolve();",
"public int resolution()\r\n\t{\r\n\t\treturn resolution;\r\n\t}",
"public abstract String resolve();",
"public java.lang.Object getResolution() {\n return resolution;\n }",
"@Override... | [
"0.64510477",
"0.6316267",
"0.6263442",
"0.61395866",
"0.59247655",
"0.5785859",
"0.5726155",
"0.5665617",
"0.56514484",
"0.55513686",
"0.55111897",
"0.5441065",
"0.53940654",
"0.5337164",
"0.53272784",
"0.53219175",
"0.5312047",
"0.5308",
"0.5308",
"0.5283128",
"0.5257138",
... | 0.0 | -1 |
A Source is the point at which a consumer may take items from a queue. This interface is compatable with java.util.Queue, in that any Queue implementation can also implement this interface with no further work. Source has been created as a seperate interface, to inroduce the possibility of a data structure that only exposes its Source, and hides the remainder of its operations. CRC Card Responsibilities Take elements from a queue. | public interface Source<E> {
/**
* Retrieves and removes the head of this queue, or <tt>null</tt> if this queue is empty.
*
* @return The head of this queue, or <tt>null</tt> if this queue is empty.
*/
E poll();
/**
* Retrieves, but does not remove, the head of this queue, returning <tt>null</tt> if this queue is empty.
*
* @return The head of this queue, or <tt>null</tt> if this queue is empty.
*/
E peek();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Source {\r\n\t\t\t\t\t\r\n\t/** A source needs to have funds or credit available so it can have money pulled from it for\r\n\t * whatever purpose the funds are needed. This is the predict loss implementation for use\r\n\t * with the prediction algorithm. It processes the loss for this source by up... | [
"0.5859741",
"0.584186",
"0.57918704",
"0.5723629",
"0.56689394",
"0.56689394",
"0.559569",
"0.5583339",
"0.5554082",
"0.55471087",
"0.55458647",
"0.5511629",
"0.55002654",
"0.5492428",
"0.5485996",
"0.5470539",
"0.5466456",
"0.5457353",
"0.5435347",
"0.54301417",
"0.5404505"... | 0.76857144 | 0 |
Retrieves and removes the head of this queue, or null if this queue is empty. | E poll(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }",
"public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r... | [
"0.73895794",
"0.73721313",
"0.72464776",
"0.72459537",
"0.72198725",
"0.72156656",
"0.7215039",
"0.720913",
"0.7177467",
"0.7168614",
"0.7074924",
"0.7068405",
"0.7067891",
"0.70604455",
"0.7059144",
"0.7037103",
"0.7027293",
"0.7021381",
"0.7020296",
"0.7016035",
"0.6981392... | 0.0 | -1 |
Retrieves, but does not remove, the head of this queue, returning null if this queue is empty. | E peek(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic T getHead()\r\n\t{\r\n\t\tif (isEmpty()) { throw new EmptyQueueException(); }\r\n\t\treturn head.element;\r\n\t}",
"@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }",
"public Object firstElement() {\n return _qu... | [
"0.77666205",
"0.7382134",
"0.73615354",
"0.73016363",
"0.72750646",
"0.7241076",
"0.7235833",
"0.72053677",
"0.71764535",
"0.7131121",
"0.711519",
"0.7103699",
"0.70913786",
"0.7021199",
"0.70099014",
"0.7001965",
"0.6989889",
"0.69879913",
"0.69529045",
"0.6949221",
"0.6948... | 0.0 | -1 |
Query values of a column. | public <T> List<T> queryColumn(String columnName, String sql, Object... params) throws SQLException {
logger.debug("SQL= \n" + sql);
// Print the parameters to the logger.
printParams(params);
ResultSetHandler<List<T>> h = new ColumnListHandler<T>(columnName);
return qr.query(conn, sql, h, params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getValue(String column, int row);",
"public T col(final String column) {\r\n\t\treturn op(ConditionValueType.COLUMN, column);\r\n\t}",
"private Collection getColumn(QueryResultIF queryResult, int column) {\n Collection retVal = new ArrayList();\n\n while (queryResult.next()) {\n retVal.add(qu... | [
"0.6545124",
"0.6360243",
"0.62612563",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5950703",
"0.5929683",
"0.5881344",
"0.5843093",
"0.58345294",
... | 0.57473844 | 36 |
Query values of a column. | public <T> List<T> queryColumn(String columnName, String sql) throws SQLException {
return queryColumn(columnName, sql, (Object[])null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getValue(String column, int row);",
"public T col(final String column) {\r\n\t\treturn op(ConditionValueType.COLUMN, column);\r\n\t}",
"private Collection getColumn(QueryResultIF queryResult, int column) {\n Collection retVal = new ArrayList();\n\n while (queryResult.next()) {\n retVal.add(qu... | [
"0.6544181",
"0.63583827",
"0.6259412",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.59494424",
"0.5927636",
"0.5879404",
"0.5843624",
"0.5834241",
"0.58253425"... | 0.5392021 | 57 |
Execute a batch of SQL INSERT, UPDATE, or DELETE queries. | public int[] batch(String sql, Object[][] params) throws SQLException {
logger.debug("SQL= \n" + sql);
// Print the parameters to the logger.
for (Object[] params1 : params) {
printParams(params1);
}
return qr.batch(conn, sql, params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int[] executeBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support executeBatch.\");\n }",
"public void executeTransaction(List<String> sql) throws SQLException {\n try (Connection connection = getConnection()) {\n\n Statement statement ... | [
"0.6829201",
"0.67995924",
"0.6562746",
"0.653758",
"0.6421389",
"0.61735845",
"0.61422724",
"0.61376405",
"0.6118946",
"0.6102745",
"0.6080274",
"0.60673916",
"0.60618436",
"0.6045459",
"0.5974389",
"0.59507215",
"0.5905923",
"0.58973795",
"0.5874647",
"0.5874014",
"0.585760... | 0.5584696 | 34 |
Execute a batch of SQL INSERT, UPDATE, or DELETE queries. | public int[] batch(String[] sqls) throws SQLException {
Statement st = null;
try {
st = conn.createStatement();
for (String sql : sqls) {
logger.debug("SQL= \n" + sql);
st.addBatch(sql);
}
return st.executeBatch();
} catch (SQLException e) {
throw e;
} finally {
if (st != null) {
st.close();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int[] executeBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support executeBatch.\");\n }",
"public void executeTransaction(List<String> sql) throws SQLException {\n try (Connection connection = getConnection()) {\n\n Statement statement ... | [
"0.6830634",
"0.6801027",
"0.65383136",
"0.6423163",
"0.61733323",
"0.61432344",
"0.61373323",
"0.6120234",
"0.6103101",
"0.6081416",
"0.6068444",
"0.60630196",
"0.6044496",
"0.5975602",
"0.5949901",
"0.59055126",
"0.58964396",
"0.5876068",
"0.5873981",
"0.585926",
"0.5851168... | 0.6565003 | 2 |
Commit the transaction. It's necessary to execute it at the end of a transaction. | public void commit() throws SQLException {
if (conn != null) {
conn.commit();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void commitTransaction() throws TransactionException {\n\t\t\r\n\t}",
"public void commit() {\n doCommit();\n }",
"@Override\n public void commit() throws SQLException {\n if (isTransActionAlive() && !getTransaction().getStatus().isOneOf(TransactionStatus.MARKED_ROLLBACK,\n ... | [
"0.78883636",
"0.7829532",
"0.78038925",
"0.7788969",
"0.77656907",
"0.756768",
"0.7559485",
"0.7483479",
"0.7449146",
"0.73750496",
"0.735533",
"0.73548824",
"0.73224795",
"0.7320827",
"0.7320827",
"0.7320827",
"0.7320827",
"0.7320827",
"0.73007727",
"0.7292561",
"0.7255648"... | 0.69492376 | 36 |
Close the session. It's necessary to execute it to release the connection after using the session. | public void close() {
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
logger.error("Failed to close the connection.");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeConnection() {\n this.session.close();\n }",
"public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}",
"void closeSession();",
"void closeSession();",
"public void close... | [
"0.81285024",
"0.78103065",
"0.7599634",
"0.7599634",
"0.7587901",
"0.7558285",
"0.75017774",
"0.7465489",
"0.74360937",
"0.7414471",
"0.72441643",
"0.72213227",
"0.7188291",
"0.71482414",
"0.71348476",
"0.7133386",
"0.69928163",
"0.6961766",
"0.69617337",
"0.68861955",
"0.68... | 0.6234938 | 57 |
Print the parameters to the logger. The text will be printed like this: PARAMETERS=[v1;v2;null;v3;]. | private void printParams(Object... params) {
if (params != null) {
String paramsStr = "";
for (Object o : params) {
if (o == null) {
paramsStr += "null;";
} else {
paramsStr += (o.toString() + ";");
}
}
logger.debug("PARAMETERS=[" + paramsStr + "]");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logParameters() {\n logWriter.add(\"Particle Swarm Optimization Algorithm\");\n logWriter.add(\"Parameters\");\n logWriter.add((String)(\"MAX_LENGTH/N: \"+MAX_LENGTH));\n logWriter.add((String)(\"STARTING_POPULATION: \"+pso.getParticleCount()));\n logWriter.add((Strin... | [
"0.7324834",
"0.67501515",
"0.62711763",
"0.6157992",
"0.6109514",
"0.60537094",
"0.601483",
"0.60146683",
"0.5995564",
"0.5908512",
"0.58178246",
"0.5811988",
"0.58067936",
"0.57518953",
"0.57357854",
"0.5718246",
"0.57033503",
"0.5688894",
"0.566537",
"0.56316125",
"0.56206... | 0.7492761 | 0 |
/ Call this from the main activity to send data to the remote device | public void envia4Pigor(String dadosEnviar) {
byte[] msgBuffer = dadosEnviar.getBytes();
try {
mmOutStream.write(msgBuffer);
} catch (IOException e) {
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }",
"void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) ... | [
"0.7219223",
"0.6992737",
"0.6954613",
"0.6896259",
"0.68340385",
"0.68223095",
"0.68116575",
"0.67750186",
"0.6758095",
"0.6715433",
"0.6714807",
"0.6684857",
"0.6610166",
"0.6603503",
"0.65610665",
"0.653047",
"0.64998686",
"0.64850265",
"0.6480271",
"0.6465811",
"0.6437269... | 0.0 | -1 |
An interface that must be implemented by all providers of Autopsy ingest modules. An ingest module factory is used to create instances of a type of data source ingest module, a type of file ingest module, or both. Autopsy will generally use the factory to create several instances of each type of module for each ingest job it performs. Completing an ingest job entails processing a single data source (e.g., a disk image) and all of the files from the data source, including files extracted from archives and any unallocated space (made to look like a series of files). The data source is passed through one or more pipelines of data source ingest modules. The files are passed through one or more pipelines of file ingest modules. Autopsy may use multiple threads to complete an ingest job, but it is guaranteed that there will be no more than one module instance per thread. However, if the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. An ingest module factory may provide global and per ingest job settings user interface panels. The global settings should apply to all module instances. The per ingest job settings should apply to all module instances working on a particular ingest job. Autopsy supports contextsensitive and persistent per ingest job settings, so per ingest job settings must be serializable. To be discovered at runtime by the ingest framework, IngestModuleFactory implementations must be marked with the following NetBeans Service provider annotation: | public interface IngestModuleFactory {
/**
* Gets the display name that identifies the family of ingest modules the
* factory creates. Autopsy uses this string to identify the module in user
* interface components and log messages. The module name must be unique. so
* a brief but distinctive name is recommended.
*
* @return The module family display name.
*/
String getModuleDisplayName();
/**
* Gets a brief, user-friendly description of the family of ingest modules
* the factory creates. Autopsy uses this string to describe the module in
* user interface components.
*
* @return The module family description.
*/
String getModuleDescription();
/**
* Gets the version number of the family of ingest modules the factory
* creates.
*
* @return The module family version number.
*/
String getModuleVersionNumber();
/**
* Queries the factory to determine if it provides a user interface panel to
* allow a user to change settings that are used by all instances of the
* family of ingest modules the factory creates. For example, the Autopsy
* core hash lookup ingest module factory provides a global settings panel
* to import and create hash databases. The hash databases are then enabled
* or disabled per ingest job using an ingest job settings panel. If the
* module family does not have global settings, the factory may extend
* IngestModuleFactoryAdapter to get an implementation of this method that
* returns false.
*
* @return True if the factory provides a global settings panel.
*/
boolean hasGlobalSettingsPanel();
/**
* Gets a user interface panel that allows a user to change settings that
* are used by all instances of the family of ingest modules the factory
* creates. For example, the Autopsy core hash lookup ingest module factory
* provides a global settings panel to import and create hash databases. The
* imported hash databases are then enabled or disabled per ingest job using
* ingest an ingest job settings panel. If the module family does not have a
* global settings, the factory may extend IngestModuleFactoryAdapter to get
* an implementation of this method that throws an
* UnsupportedOperationException.
*
* @return A global settings panel.
*/
IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();
/**
* Gets the default per ingest job settings for instances of the family of
* ingest modules the factory creates. For example, the Autopsy core hash
* lookup ingest modules family uses hash databases imported or created
* using its global settings panel. All of the hash databases are enabled by
* default for an ingest job. If the module family does not have per ingest
* job settings, the factory may extend IngestModuleFactoryAdapter to get an
* implementation of this method that returns an instance of the
* NoIngestModuleJobSettings class.
*
* @return The default ingest job settings.
*/
IngestModuleIngestJobSettings getDefaultIngestJobSettings();
/**
* Queries the factory to determine if it provides user a interface panel to
* allow a user to make per ingest job settings for instances of the family
* of ingest modules the factory creates. For example, the Autopsy core hash
* lookup ingest module factory provides an ingest job settings panels to
* enable or disable hash databases per ingest job. If the module family
* does not have per ingest job settings, the factory may extend
* IngestModuleFactoryAdapter to get an implementation of this method that
* returns false.
*
* @return True if the factory provides ingest job settings panels.
*/
boolean hasIngestJobSettingsPanel();
/**
* Gets a user interface panel that can be used to set per ingest job
* settings for instances of the family of ingest modules the factory
* creates. For example, the core hash lookup ingest module factory provides
* an ingest job settings panel to enable or disable hash databases per
* ingest job. If the module family does not have per ingest job settings,
* the factory may extend IngestModuleFactoryAdapter to get an
* implementation of this method that throws an
* UnsupportedOperationException.
*
* @param settings Per ingest job settings to initialize the panel.
*
* @return An ingest job settings panel.
*/
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);
/**
* Queries the factory to determine if it is capable of creating data source
* ingest modules. If the module family does not include data source ingest
* modules, the factory may extend IngestModuleFactoryAdapter to get an
* implementation of this method that returns false.
*
* @return True if the factory can create data source ingest modules.
*/
boolean isDataSourceIngestModuleFactory();
/**
* Creates a data source ingest module instance.
* <p>
* Autopsy will generally use the factory to several instances of each type
* of module for each ingest job it performs. Completing an ingest job
* entails processing a single data source (e.g., a disk image) and all of
* the files from the data source, including files extracted from archives
* and any unallocated space (made to look like a series of files). The data
* source is passed through one or more pipelines of data source ingest
* modules. The files are passed through one or more pipelines of file
* ingest modules.
* <p>
* The ingest framework may use multiple threads to complete an ingest job,
* but it is guaranteed that there will be no more than one module instance
* per thread. However, if the module instances must share resources, the
* modules are responsible for synchronizing access to the shared resources
* and doing reference counting as required to release those resources
* correctly. Also, more than one ingest job may be in progress at any given
* time. This must also be taken into consideration when sharing resources
* between module instances. modules.
* <p>
* If the module family does not include data source ingest modules, the
* factory may extend IngestModuleFactoryAdapter to get an implementation of
* this method that throws an UnsupportedOperationException.
*
* @param settings The settings for the ingest job.
*
* @return A data source ingest module instance.
*/
DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);
/**
* Queries the factory to determine if it is capable of creating file ingest
* modules. If the module family does not include file ingest modules, the
* factory may extend IngestModuleFactoryAdapter to get an implementation of
* this method that returns false.
*
* @return True if the factory can create file ingest modules.
*/
boolean isFileIngestModuleFactory();
/**
* Creates a file ingest module instance.
* <p>
* Autopsy will generally use the factory to several instances of each type
* of module for each ingest job it performs. Completing an ingest job
* entails processing a single data source (e.g., a disk image) and all of
* the files from the data source, including files extracted from archives
* and any unallocated space (made to look like a series of files). The data
* source is passed through one or more pipelines of data source ingest
* modules. The files are passed through one or more pipelines of file
* ingest modules.
* <p>
* The ingest framework may use multiple threads to complete an ingest job,
* but it is guaranteed that there will be no more than one module instance
* per thread. However, if the module instances must share resources, the
* modules are responsible for synchronizing access to the shared resources
* and doing reference counting as required to release those resources
* correctly. Also, more than one ingest job may be in progress at any given
* time. This must also be taken into consideration when sharing resources
* between module instances. modules.
* <p>
* If the module family does not include file ingest modules, the factory
* may extend IngestModuleFactoryAdapter to get an implementation of this
* method that throws an UnsupportedOperationException.
*
* @param settings The settings for the ingest job.
*
* @return A file ingest module instance.
*/
FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isFileIngestModuleFactory();",
"boolean isDataSourceIngestModuleFactory();",
"DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);",
"FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);",
"IFMLModule createIFMLModule();",
"publi... | [
"0.67414194",
"0.64813006",
"0.62432534",
"0.61516374",
"0.6131426",
"0.6033083",
"0.6014732",
"0.5997443",
"0.5837666",
"0.58284926",
"0.581421",
"0.5794963",
"0.5745069",
"0.5733257",
"0.5680674",
"0.5635299",
"0.5616043",
"0.5609423",
"0.56040126",
"0.559458",
"0.55400515"... | 0.86103445 | 0 |
Gets the display name that identifies the family of ingest modules the factory creates. Autopsy uses this string to identify the module in user interface components and log messages. The module name must be unique. so a brief but distinctive name is recommended. | String getModuleDisplayName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName()\n {\n return MODULE_NAME;\n }",
"private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePag... | [
"0.68989193",
"0.6840316",
"0.67794496",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6690251",
"0.66738135",
"0.6641019",
"0.6641019",
"0.66250163",
"0.66250163"... | 0.77081025 | 0 |
Gets a brief, userfriendly description of the family of ingest modules the factory creates. Autopsy uses this string to describe the module in user interface components. | String getModuleDescription(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getModuleDisplayName();",
"public String getModuleInfo () {\n\t\treturn \"<html> <head> </head> <body> Evalute this F1 population. </body></html>\";\n\t}",
"public String getModuleInfo() {\n\t\tString s =\n\t\t\t\"<p>Overview: Automatically discretize scalar data for the \"\n\t\t\t\t+ \"Naive... | [
"0.6605281",
"0.6478861",
"0.63647175",
"0.63324356",
"0.61512065",
"0.6090395",
"0.58874255",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.587425",
"0.5869822",
... | 0.6912049 | 0 |
Gets the version number of the family of ingest modules the factory creates. | String getModuleVersionNumber(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getVersionNum();",
"public int getVersionNumber() {\n return versionNumber;\n }",
"public int getVersion()\n {\n return info.getVersion().intValueExact();\n }",
"public int getLibVersionNumber();",
"long getVersionNumber();",
"Integer getVersion();",
"public int get... | [
"0.64304805",
"0.6389632",
"0.6353739",
"0.63511336",
"0.63164973",
"0.623685",
"0.62341654",
"0.62341654",
"0.62341654",
"0.62341654",
"0.62341654",
"0.6211659",
"0.6206364",
"0.61954236",
"0.6162571",
"0.6129348",
"0.6122109",
"0.6108706",
"0.60890394",
"0.6074906",
"0.6071... | 0.7191872 | 0 |
Queries the factory to determine if it provides a user interface panel to allow a user to change settings that are used by all instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest module factory provides a global settings panel to import and create hash databases. The hash databases are then enabled or disabled per ingest job using an ingest job settings panel. If the module family does not have global settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean hasGlobalSettingsPanel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasIngestJobSettingsPanel();",
"IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\... | [
"0.63689744",
"0.63166916",
"0.6135008",
"0.5756165",
"0.572142",
"0.5569447",
"0.5528568",
"0.5528568",
"0.548999",
"0.53551954",
"0.52402353",
"0.52253157",
"0.5213055",
"0.52127606",
"0.5194015",
"0.51439106",
"0.5136157",
"0.51306576",
"0.5051432",
"0.5050623",
"0.5028463... | 0.7000252 | 0 |
Gets a user interface panel that allows a user to change settings that are used by all instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest module factory provides a global settings panel to import and create hash databases. The imported hash databases are then enabled or disabled per ingest job using ingest an ingest job settings panel. If the module family does not have a global settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | IngestModuleGlobalSettingsPanel getGlobalSettingsPanel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in use... | [
"0.64327437",
"0.63908106",
"0.6152368",
"0.5810992",
"0.5707696",
"0.55727744",
"0.5538909",
"0.5512753",
"0.5489284",
"0.5408205",
"0.53163856",
"0.53133017",
"0.5299434",
"0.5296489",
"0.525288",
"0.5248772",
"0.5236396",
"0.5236396",
"0.5236396",
"0.5236396",
"0.5236396",... | 0.77404547 | 0 |
Gets the default per ingest job settings for instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest modules family uses hash databases imported or created using its global settings panel. All of the hash databases are enabled by default for an ingest job. If the module family does not have per ingest job settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns an instance of the NoIngestModuleJobSettings class. | IngestModuleIngestJobSettings getDefaultIngestJobSettings(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract ModularConfigurationModule<T> getDefaultModule();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and l... | [
"0.5742279",
"0.545401",
"0.494534",
"0.48997903",
"0.4874776",
"0.4790172",
"0.47687888",
"0.47385755",
"0.47380713",
"0.47294474",
"0.47000825",
"0.4685945",
"0.46763447",
"0.4664842",
"0.46468094",
"0.4645517",
"0.4643588",
"0.46142808",
"0.46133712",
"0.45948303",
"0.4567... | 0.7058834 | 0 |
Queries the factory to determine if it provides user a interface panel to allow a user to make per ingest job settings for instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest module factory provides an ingest job settings panels to enable or disable hash databases per ingest job. If the module family does not have per ingest job settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean hasIngestJobSettingsPanel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but dis... | [
"0.6661171",
"0.6336064",
"0.60922885",
"0.56839633",
"0.562231",
"0.55348456",
"0.5492083",
"0.51601744",
"0.51492155",
"0.5041124",
"0.5034224",
"0.5015344",
"0.49727216",
"0.4948723",
"0.4927582",
"0.49242643",
"0.49172634",
"0.48823768",
"0.486468",
"0.4854905",
"0.484039... | 0.67298925 | 0 |
Gets a user interface panel that can be used to set per ingest job settings for instances of the family of ingest modules the factory creates. For example, the core hash lookup ingest module factory provides an ingest job settings panel to enable or disable hash databases per ingest job. If the module family does not have per ingest job settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messa... | [
"0.7212739",
"0.6194618",
"0.6000896",
"0.59291816",
"0.58800334",
"0.5853814",
"0.57414323",
"0.57099354",
"0.56562024",
"0.5612246",
"0.55729896",
"0.5534054",
"0.5515975",
"0.54934245",
"0.54871356",
"0.5484615",
"0.5472537",
"0.5461643",
"0.54590124",
"0.54534054",
"0.544... | 0.7019964 | 1 |
Queries the factory to determine if it is capable of creating data source ingest modules. If the module family does not include data source ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean isDataSourceIngestModuleFactory(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isFileIngestModuleFactory();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name ... | [
"0.70413095",
"0.6264758",
"0.5736398",
"0.5510255",
"0.54023194",
"0.53843856",
"0.5161722",
"0.50769854",
"0.50246584",
"0.5023566",
"0.50193226",
"0.50193226",
"0.4949179",
"0.49303213",
"0.49068332",
"0.48738876",
"0.486978",
"0.48136598",
"0.48059565",
"0.47770983",
"0.4... | 0.8237383 | 0 |
Creates a data source ingest module instance. Autopsy will generally use the factory to several instances of each type of module for each ingest job it performs. Completing an ingest job entails processing a single data source (e.g., a disk image) and all of the files from the data source, including files extracted from archives and any unallocated space (made to look like a series of files). The data source is passed through one or more pipelines of data source ingest modules. The files are passed through one or more pipelines of file ingest modules. The ingest framework may use multiple threads to complete an ingest job, but it is guaranteed that there will be no more than one module instance per thread. However, if the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. modules. If the module family does not include data source ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but dis... | [
"0.69046336",
"0.6038869",
"0.5625045",
"0.5584488",
"0.54186594",
"0.54104656",
"0.51985157",
"0.5014326",
"0.48907024",
"0.48883158",
"0.4855216",
"0.47690868",
"0.4755281",
"0.47363868",
"0.47303647",
"0.47166926",
"0.47160622",
"0.470631",
"0.47059843",
"0.46780673",
"0.4... | 0.68936783 | 1 |
Queries the factory to determine if it is capable of creating file ingest modules. If the module family does not include file ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean isFileIngestModuleFactory(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isDataSourceIngestModuleFactory();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module... | [
"0.72566247",
"0.6108547",
"0.56065243",
"0.5457641",
"0.52594924",
"0.5169605",
"0.50695616",
"0.5018223",
"0.49601626",
"0.48936483",
"0.4893472",
"0.4880889",
"0.4879384",
"0.48738584",
"0.48540542",
"0.48403725",
"0.48363596",
"0.48014325",
"0.47677103",
"0.47625712",
"0.... | 0.8308917 | 0 |
Creates a file ingest module instance. Autopsy will generally use the factory to several instances of each type of module for each ingest job it performs. Completing an ingest job entails processing a single data source (e.g., a disk image) and all of the files from the data source, including files extracted from archives and any unallocated space (made to look like a series of files). The data source is passed through one or more pipelines of data source ingest modules. The files are passed through one or more pipelines of file ingest modules. The ingest framework may use multiple threads to complete an ingest job, but it is guaranteed that there will be no more than one module instance per thread. However, if the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. modules. If the module family does not include file ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but dis... | [
"0.65917975",
"0.61916184",
"0.61583006",
"0.5442266",
"0.52534217",
"0.5174526",
"0.51485205",
"0.50702834",
"0.49552587",
"0.48853454",
"0.48602837",
"0.48569635",
"0.4852117",
"0.48272717",
"0.48166317",
"0.47891685",
"0.47854957",
"0.47694215",
"0.47660825",
"0.47657692",
... | 0.72311765 | 0 |
Suche abbrechen, weil bereits ein Geraet ausgewaehlt wurde | @Override
public void onItemClick(final AdapterView<?> pAdapterView, final View pView, final int pPosition, final long pID) {
bt.stopDiscoverDevices();
// Die MAC-Adresse des Geraets herausfiltern
final String info = ((TextView) pView).getText().toString();
serverAddress = info.substring(info.length() - 17);
connectToServer(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);",
"public void aapneBomberOgFlagg() {\n brettTapt = true;\n if (trykketPaa) {\n return;\n }\n // Viser alle bomber som ikke er flagget\n if (bombe && !flagget) {\n setText(\"x\");\n setBa... | [
"0.6904469",
"0.6643108",
"0.6626903",
"0.65987295",
"0.6348882",
"0.6326519",
"0.63176674",
"0.6251324",
"0.6246032",
"0.6225909",
"0.6199401",
"0.61894304",
"0.61730444",
"0.61652935",
"0.6099588",
"0.60915387",
"0.6077525",
"0.6072442",
"0.6069975",
"0.6031116",
"0.6015905... | 0.0 | -1 |
Wird aufgerufen, wenn die Bluetooth Verbindung erfolgreich hergestellt wurde. Startet das Spiel. | public void startGame(){
Intent intent = new Intent(getApplicationContext(), AndroidLauncher.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.putExtra(Bluetooth.PRIMARY_BT_GAME, String.valueOf(false));
intent.putExtra(Bluetooth.SECONDARY_BT_GAME, String.valueOf(true));
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Bluetooth() {}",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getContext(), \"El dispositivo no soporta bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBt... | [
"0.734516",
"0.7179065",
"0.71123654",
"0.70780146",
"0.70543045",
"0.7039718",
"0.7028194",
"0.70156366",
"0.696991",
"0.6950624",
"0.6907578",
"0.6879099",
"0.68416685",
"0.6841497",
"0.68293387",
"0.68189996",
"0.6787125",
"0.6771664",
"0.6754256",
"0.67391413",
"0.6697913... | 0.0 | -1 |
Wird nach dem REQUEST_ENABLE_BT Dialog aufgerufen. Wertet die Eingabe des Benutzers aus. | public void onActivityResult(int RequestCode, int ResultCode, Intent Data) {
super.onActivityResult(RequestCode, ResultCode, Data);
if(RequestCode == Bluetooth.REQUEST_ENABLE_BT){
if(ResultCode == -1){
createAct();
}
else{
finish();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }",
"private void turnOnBT() {\n\t\tIntent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\tstartActivityForResult... | [
"0.7826947",
"0.77180916",
"0.77069044",
"0.75119114",
"0.7491346",
"0.74902856",
"0.74780715",
"0.7444379",
"0.7444185",
"0.74146473",
"0.74146473",
"0.74146473",
"0.74146473",
"0.74146473",
"0.739829",
"0.73917747",
"0.73885757",
"0.7298837",
"0.7216289",
"0.7196864",
"0.71... | 0.5926215 | 59 |
Baut die Activity weiter auf, wenn der Benutzer den REQUEST_ENABLE_BT Dialog positiv bestaetigt hat | private void createAct(){
try{
this.mPairedDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);
this.mNewDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);
final ListView pairedListView = (ListView) this.findViewById(R.id.pairedDevicesLV);
pairedListView.setAdapter(this.mPairedDevicesArrayAdapter);
pairedListView.setOnItemClickListener(this.mDeviceClickListener);
final ListView newDevicesListView = (ListView) this.findViewById(R.id.detectedDevicesLV);
newDevicesListView.setAdapter(this.mNewDevicesArrayAdapter);
newDevicesListView.setOnItemClickListener(this.mDeviceClickListener);
mReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(BluetoothDevice.ACTION_FOUND)) {
//Wenn ein neues Bluetooth Geraet gefunden wurde
final BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
if (device.getBondState() != BluetoothDevice.BOND_BONDED) {
VisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress());
bt.addPairedDevice(device);
}
} else if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) {
//Wenn die Suche nach neuen Geraeten abgeschlossen wurde
VisitMultiplayerGame.this.setProgressBarIndeterminateVisibility(false);
if (VisitMultiplayerGame.this.mNewDevicesArrayAdapter.getCount() == 0) {
VisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(getString(R.string.NoDevicesFound));
}
status.setText(getString(R.string.PleaseSelectADevice));
progress.dismiss();
}
}
};
//Event Handler registrieren, wenn Geraet gefunden wurde
IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
this.registerReceiver(this.mReceiver, filter);
//Event Handler registrieren, wenn Suche beendet wurde gefunden wurde
filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
this.registerReceiver(this.mReceiver, filter);
// Get a set of currently paired devices
final Set<BluetoothDevice> pairedDevices = bt.getPairedDevices();
if (pairedDevices.size() > 0) {
this.findViewById(R.id.pairedDevicesLV).setVisibility(View.VISIBLE);
for (final BluetoothDevice device : pairedDevices) {
this.mPairedDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress());
}
} else {
this.mPairedDevicesArrayAdapter.add(getString(R.string.NoPairedDevices));
}
}
catch(Exception ex){
ex.printStackTrace();
}
bt.getPairedDevices();
bt.discoverDevices();
progress = new ProgressDialog(this);
progress.setMessage(getString(R.string.SearchingForNewDevices));
progress.setIndeterminate(true);
progress.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ... | [
"0.7864922",
"0.7789979",
"0.7745773",
"0.7745773",
"0.7745773",
"0.7745773",
"0.7745773",
"0.7741102",
"0.7711032",
"0.7521694",
"0.7502534",
"0.74825144",
"0.7407414",
"0.7338485",
"0.7296828",
"0.7281017",
"0.72016007",
"0.7200899",
"0.71641296",
"0.71564585",
"0.7114936",... | 0.0 | -1 |
Erstellt eine VisitMultiplayerGame Activity | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_visit_multiplayer_game);
bt = new Bluetooth();
status = (TextView) findViewById(R.id.visit_game_status);
int btState = bt.blutoothOK();
if(btState == 1){
/*
* Geraet unterstuetzt kein Bluetooth
* Meldung ausgeben und zum vorheriger Activity wechseln
*/
Toast t = Toast.makeText(getApplicationContext(), getString(R.string.BluetoothNotAvailable), Toast.LENGTH_LONG);
t.show();
finish();
}
else if(btState == 2){
//Bluetooth ist nicht enabled
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, Bluetooth.REQUEST_ENABLE_BT);
}
else{
createAct();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void returnToGame(View view) {\n String gameGson = gson.toJson(game);\n Intent intent = new Intent(this, GameActivity.class);\n intent.putExtra(\"Game\", gameGson);\n intent.putExtra(\"CurrentPlayer\", Integer.toString(currentPlayer));\n startActivity(intent);\n }",
"... | [
"0.6642911",
"0.6641557",
"0.65951437",
"0.6458213",
"0.6378625",
"0.6377353",
"0.63070685",
"0.6294319",
"0.62593454",
"0.6237136",
"0.6234234",
"0.62008417",
"0.6193135",
"0.6188712",
"0.6163223",
"0.61567974",
"0.6145604",
"0.6132625",
"0.61300886",
"0.6126401",
"0.6100287... | 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.visit_multiplayer_game, 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.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.6862... | 0.0 | -1 |
Dieser Toast muss ueber den UI Thread ausgefuehrt werden, da er von ausserhalb aufgerufen wird | public void showToast(final String message){
runOnUiThread(new Runnable() {
public void run()
{
Toast.makeText(VisitMultiplayerGame.this, message, Toast.LENGTH_SHORT).show();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }",
"@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }",
"public void run() {\n To... | [
"0.7613293",
"0.761031",
"0.7561402",
"0.7467926",
"0.74063236",
"0.7374436",
"0.7349279",
"0.73385805",
"0.7251055",
"0.7221835",
"0.71759444",
"0.7124438",
"0.7109772",
"0.70803934",
"0.7049832",
"0.70428264",
"0.70309126",
"0.7020132",
"0.7020132",
"0.6997827",
"0.69915056... | 0.65247566 | 86 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.7905683",
"0.7805918",
"0.7766949",
"0.77280927",
"0.76328415",
"0.76229936",
"0.7585238",
"0.75312966",
"0.7488599",
"0.7458191",
"0.7458191",
"0.74387765",
"0.74228644",
"0.7403772",
"0.7392029",
"0.7387223",
"0.73796284",
"0.73707056",
"0.7362735",
"0.7356231",
"0.73459... | 0.0 | -1 |
Activity wird beendet BroadcastReceiver deregistrieren | @Override
protected void onDestroy() {
super.onDestroy();
if(mReceiver != null) unregisterReceiver(mReceiver);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onReceive(Context context, Intent intent) {\n\n gerarNotificacaoTomarRemedio(context, new Intent(context , MainActivity.class));\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), ... | [
"0.74602824",
"0.7256964",
"0.72048163",
"0.7175124",
"0.7175124",
"0.7175124",
"0.7159467",
"0.7159467",
"0.71184826",
"0.71173024",
"0.70962155",
"0.7088813",
"0.70595884",
"0.70221466",
"0.7009449",
"0.6999298",
"0.69851935",
"0.6951621",
"0.6941811",
"0.693865",
"0.691328... | 0.0 | -1 |
Constructor for objects of class deal | public deal()
{
player1Hand = 0;
player2Hand = 0;
dealerHand = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DingnedDealManager() {}",
"public Article() {\n\t}",
"public ShopArticle() {\r\n\t\tsuper();\r\n\t}",
"public Dealer()\n {\n\n\n }",
"public Item(){}",
"public Dealer() {\n dealerHand = new Deck();\n }",
"public Article() {\n }",
"private void __sep__Constructors__() {}",
... | [
"0.68551934",
"0.6225502",
"0.62197334",
"0.62044805",
"0.6144494",
"0.61251336",
"0.6119874",
"0.6119114",
"0.60698855",
"0.60393006",
"0.60004944",
"0.5992871",
"0.598906",
"0.5986169",
"0.59739655",
"0.5967056",
"0.59611017",
"0.594265",
"0.5936167",
"0.59074795",
"0.59074... | 0.0 | -1 |
Toggle the logging service | public static void toggleService(Context context, final boolean enabled){
invokeLoggerService(context, enabled ? MainPipeline.ACTION_ENABLE : MainPipeline.ACTION_DISABLE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void enableLogging();",
"public void setLogging(boolean logging);",
"public void setLogging(boolean logging){\n this.logging=logging;\n }",
"public void setLogging(boolean logging) {\n\t\tthis.isLogging = logging;\n\t}",
"public void disableLogging();",
"public boolean isLogging();",
"... | [
"0.7245382",
"0.71956176",
"0.69065416",
"0.65918845",
"0.63348323",
"0.63267136",
"0.6308786",
"0.63012654",
"0.6219475",
"0.6201889",
"0.62012905",
"0.61899793",
"0.6183358",
"0.61587495",
"0.61304826",
"0.611888",
"0.60830474",
"0.60772836",
"0.6061643",
"0.5987351",
"0.59... | 0.7216134 | 1 |
Ask to export the data from internal memory to SDcard | public static void exportData(Context context){
invokeLoggerService(context, MainPipeline.ACTION_ARCHIVE_DATA);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exportDB(){\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\n\t\tprgUserData.setMessage(getResources().getText(R.string.please_wait_data_dump) );\n\t\tprgUserData.show();\n\n\t\tint myDeviceId = prefs.getInt(\"my_device_id\", 0);\n\t\t// String c... | [
"0.6551028",
"0.6540627",
"0.63902515",
"0.62812",
"0.61417097",
"0.6074463",
"0.6047224",
"0.58736163",
"0.5822605",
"0.58029824",
"0.57753325",
"0.5758857",
"0.5610596",
"0.55828136",
"0.55776936",
"0.55739367",
"0.5546968",
"0.55360323",
"0.55250424",
"0.5497771",
"0.54962... | 0.0 | -1 |
Check if the logging is running | public static final boolean isRunning(Context context){
mIsRunning = MainPipeline.isEnabled(context);
return mIsRunning;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isLogging();",
"static public boolean isLogging()\n {\n return GetInstance().m_bLog;\n }",
"public boolean hasLog() {\r\n\t\treturn hasLog;\r\n\t}",
"private static final boolean isRunning() {\r\n /*\r\n * LogUtil.isRunning : shutdown detected : java.lang.Throwable at\r\n ... | [
"0.76012343",
"0.75634074",
"0.69980425",
"0.67798406",
"0.6749174",
"0.6723703",
"0.6603144",
"0.657219",
"0.6538202",
"0.6530271",
"0.64771765",
"0.6444357",
"0.6377551",
"0.63642925",
"0.6323985",
"0.6305862",
"0.6295134",
"0.6283867",
"0.6259069",
"0.6259069",
"0.6259069"... | 0.0 | -1 |
Notify the record framework that the data has been broadcast. | public static void sendEventBoradcast(Context context, final String actionPayload, final String data){
if(TextUtils.isEmpty(actionPayload)){
throw new IllegalArgumentException("Invalid action payload");
}
Intent intent = new Intent();
intent.setAction(CUSTOM_INTENT_ACTION);
intent.putExtra("APPLICATION_ACTION", actionPayload);
if(!TextUtils.isEmpty(data)){
intent.putExtra("APPLICATION_DATA", data);
}
context.sendBroadcast(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendEntryDataBroadcast() {\n Log.v(TAG, recordingEntry + \" == recordingENtry\");\n Intent i = new Intent();\n i.setAction(IntentFilterNames.ENTRY_DATA_RECEIVED);\n i.putExtra(IntentFilterNames.ENTRY_DATA, journalEntryController.getEntry());\n sendBroadcast(i);\n ... | [
"0.65055454",
"0.63334143",
"0.60673666",
"0.58997333",
"0.5821891",
"0.57698226",
"0.5692176",
"0.5679357",
"0.5643866",
"0.563834",
"0.56241536",
"0.561824",
"0.5603535",
"0.55947345",
"0.5571702",
"0.555141",
"0.55285126",
"0.55199987",
"0.54290724",
"0.5414342",
"0.539947... | 0.0 | -1 |
Fallback to the origin if the server is offline | @Override
public void onFailure(Call<JourneySearchResponse> call, Throwable t) {
Call<JourneySearchResponse> newCall = apiClient.getJourneys(apiQuery);
newCall.enqueue(new Callback<JourneySearchResponse>() {
@Override
public void onResponse(Call<JourneySearchResponse> call, Response<JourneySearchResponse> response) {
callback.onSuccess(response);
}
@Override
public void onFailure(Call<JourneySearchResponse> call, Throwable t) {
callback.onFailure(t);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ServerName getOrigin() {\n return origin;\n }",
"@Override\n\tprotected boolean sameOriginDisabled() {\n\t\treturn true;\n\t}",
"@Override\n public String getUrl() {\n return getOriginUrl();\n }",
"@Override\n public Origin getOrigin() {\n return Origin.unknown();\n }",
"@java.lang.Ove... | [
"0.5988459",
"0.5969303",
"0.58347535",
"0.58333206",
"0.58285",
"0.58285",
"0.56150246",
"0.56017387",
"0.5400882",
"0.5362816",
"0.53418237",
"0.53038317",
"0.52599597",
"0.52018166",
"0.52018166",
"0.5196723",
"0.5163721",
"0.51614225",
"0.5119541",
"0.51040816",
"0.509714... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onComplete(Bundle values) {
} | {
"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 onFacebookError(FacebookError e) {
} | {
"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 onError(DialogError e) {
} | {
"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 onCancel() {
} | {
"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 |
Called when the dialog has completed successfully | public void onComplete(Bundle values) {
final String postId = values.getString("post_id");
if (postId != null) {
Log.d("FB Sample App", "Dialog Success! post_id=" + postId);
mAsyncRunner.request(postId, new WallPostRequestListener());
} else {
Log.d("FB Sample App", "No wall post made");
}
Intent intent=new Intent(getActivity(), TelaPrincipal.class);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void successDialog() {\n AlertDialog dialog = _dialogFactory.createDialog(this, R.string.completed, R.string.success);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, ... | [
"0.74075675",
"0.72845674",
"0.66863084",
"0.66773325",
"0.6647824",
"0.6644251",
"0.66257477",
"0.65888816",
"0.6577075",
"0.6577075",
"0.6577075",
"0.65488374",
"0.65389895",
"0.64881825",
"0.646403",
"0.6461012",
"0.64556986",
"0.64404386",
"0.6431895",
"0.64236873",
"0.64... | 0.6120969 | 96 |
No special processing if dialog has been canceled | @Override
public void onCancel() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancelDialog() {dispose();}",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n can... | [
"0.7708512",
"0.76572424",
"0.7426453",
"0.73918",
"0.72855884",
"0.72563064",
"0.7255605",
"0.7219352",
"0.71857107",
"0.7180482",
"0.7155693",
"0.714779",
"0.714539",
"0.714539",
"0.712922",
"0.71282595",
"0.7112448",
"0.7105156",
"0.7101293",
"0.70869464",
"0.7073372",
"... | 0.6842158 | 86 |
No special processing if dialog has been canceled | @Override
public void onError(DialogError e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancelDialog() {dispose();}",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n can... | [
"0.7709884",
"0.7658516",
"0.74279463",
"0.73941255",
"0.72867745",
"0.7258502",
"0.72578984",
"0.72213316",
"0.7187679",
"0.7181683",
"0.715703",
"0.71499676",
"0.7146894",
"0.7146894",
"0.713083",
"0.7129805",
"0.7113891",
"0.71073025",
"0.7103589",
"0.7088845",
"0.7075153"... | 0.0 | -1 |
No special processing if dialog has been canceled | @Override
public void onFacebookError(FacebookError e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancelDialog() {dispose();}",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n can... | [
"0.77103364",
"0.7658541",
"0.74283814",
"0.7393809",
"0.72860175",
"0.72581613",
"0.7257494",
"0.7220073",
"0.7187767",
"0.7180745",
"0.7156052",
"0.7149053",
"0.7147468",
"0.7147468",
"0.713006",
"0.7129438",
"0.7112571",
"0.7106974",
"0.7102946",
"0.7088056",
"0.70750755",... | 0.0 | -1 |
Called when the wall post request has completed | public void onComplete(final String response) {
Intent intent=new Intent(getActivity(), TelaPrincipal.class);
startActivity(intent);
Log.d("Facebook-Example", "Got response: " + response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void facebookWallPost()\n\t{\n\t\tPreferences preferences = new Preferences(getActivity());\n\t\tString accessToken = preferences.getFacebookAccessToken();\n\t\tlong expiration = preferences.getFacebookAccessExpiration();\n\n\t\tif(accessToken != null) mFacebook.setAccessToken(accessToken);\n\t\tif(expirati... | [
"0.7157645",
"0.6978044",
"0.65840423",
"0.65661645",
"0.6547352",
"0.64997494",
"0.6352662",
"0.63516897",
"0.62220204",
"0.60813457",
"0.60791266",
"0.6028208",
"0.60248876",
"0.6021081",
"0.59905726",
"0.5985",
"0.59683084",
"0.5965598",
"0.58533967",
"0.58448654",
"0.5793... | 0.0 | -1 |
Ignore File not found errors | public void onFileNotFoundException(FileNotFoundException e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void handleFileNotFoundException() {\n System.out.println(\"\\tUnfortunately, I could not detect any files in the database!\");\n System.out.println(\"\\tBut don't worry sir.\");\n System.out.println(\"\\tI will create the files you might be needing later.\");\n Duke.jarvi... | [
"0.6842304",
"0.6735484",
"0.65035856",
"0.63973796",
"0.63890207",
"0.63792163",
"0.6374305",
"0.63126075",
"0.62014395",
"0.6199282",
"0.6066597",
"0.59963447",
"0.594404",
"0.586051",
"0.5851542",
"0.584431",
"0.58437175",
"0.57941514",
"0.57735527",
"0.57735527",
"0.57735... | 0.5400749 | 53 |
Ignore IO Facebook errors | public void onIOException(IOException e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onError(FacebookException exception) {\n }",
"@Override\n\t\t\tpublic void onFacebookError(FacebookError e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onFacebookError(FacebookError fberror) {\n\n\t\t\t\t\t\t}",
"@Override\r\n\t\tpu... | [
"0.64702576",
"0.6439135",
"0.6437884",
"0.64252186",
"0.6395685",
"0.639314",
"0.6317084",
"0.6311999",
"0.61553574",
"0.60991997",
"0.6070233",
"0.60419756",
"0.60060686",
"0.5905532",
"0.58971286",
"0.5880814",
"0.5843538",
"0.57671046",
"0.57141435",
"0.5600621",
"0.55314... | 0.4788 | 76 |
TODO Autogenerated method stub | @Override
public void onComplete(String response, Object state) {
} | {
"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 onIOException(IOException e, Object state) {
} | {
"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 onFileNotFoundException(FileNotFoundException e, Object state) {
} | {
"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 onMalformedURLException(MalformedURLException e, Object state) {
} | {
"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 onFacebookError(FacebookError e, Object state) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
This method takes in an ArrayList of Comparable objects and sorts them in descending order using a bubble sorting algorithm. | public void bubbleSort(ArrayList <Comparable> list){
steps += 2; //init, check condition
for (int i = list.size() - 1; i >= 0; i --){
steps += 2; //init, check condition
for (int j = 0; j < i ; j ++){
steps += 5;
if (list.get(j).compareTo(list.get(j + 1)) < 0){
steps += 2;
swap(list, j, j + 1);
steps += 5;
}
steps += 2;
}
steps += 2;
}
System.out.println();
System.out.println("Bubble Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void bubbleSort() {\n\t\tint n = data.size();\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tfor (int j = 1; j < n - i; j++) {\n\t\t\t\tif (data.get(j - 1) > data.get(j)) {\n\t\t\t\t\tswap(j, j - 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}",
"public static <T extends Comparable<? super T>> void bubbleSor... | [
"0.67808867",
"0.67381394",
"0.66713905",
"0.66199523",
"0.6606896",
"0.65431255",
"0.650932",
"0.64553446",
"0.63450646",
"0.63382345",
"0.6135303",
"0.61080134",
"0.6103676",
"0.6094335",
"0.60016483",
"0.5968577",
"0.5963827",
"0.59551454",
"0.5951832",
"0.59156966",
"0.59... | 0.7017459 | 0 |
This method takes in an ArrayList of Comparable objects and sorts it into ascending order using a selection sort algorithm | public void selectionSort(ArrayList <Comparable> list){
steps += 2;
for (int i = list.size() - 1; i >= 0; i--){
steps ++;
int biggest = 0;
steps += 2;
for (int j = 0; j < i; j++){
steps += 4;
if (list.get(j).compareTo(list.get(biggest)) > 0){
steps ++;
biggest = j;
}
steps += 2;
}
steps += 5;
swap(list, i, biggest);
steps += 2;
}
System.out.println();
System.out.println("Selection Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T extends Comparable<? super T>> void selectionSort(List<T> list){\n int size = list.size();\n if(size > 1){\n for(int i = 0; i < size; i++){\n int lowestIndex = i;\n for(int j = i; j < size; j++){\n if(list.get(lowestIndex).c... | [
"0.73516554",
"0.69924325",
"0.68247426",
"0.68078357",
"0.67747176",
"0.6644862",
"0.65355587",
"0.65083945",
"0.6501248",
"0.6498777",
"0.6478257",
"0.6444247",
"0.64246255",
"0.63986444",
"0.6385198",
"0.63604367",
"0.63436526",
"0.63313764",
"0.6260163",
"0.6259721",
"0.6... | 0.7651938 | 0 |
This method takes in an ArrayList of Comparable objects and sorts them in descending order using an insertion sorting algorithm. | public void insertionSort(ArrayList <Comparable> list){
steps += 2; //init, check condition
for (int i = 1 ; i < list.size(); i++){
steps ++; //=
int j = i;
steps += 7; //-, >, get(), compareTo(), get(), -, <
while ((j - 1 > 0) && (list.get(j).compareTo(list.get(j - 1)) > 0)){
steps += 3; // swap(), -, --
swap(list, j, j - 1);
steps += 5;
j--;
steps += 7; //-, >, get(), compareTo(), get(), -, <
}
steps += 2; //increment, check condition
}
System.out.println();
System.out.println("Insertion Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n ArrayList<Comparable> BestBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstSelection = new ArrayList... | [
"0.6804917",
"0.66623944",
"0.6644264",
"0.62033707",
"0.6199409",
"0.61849415",
"0.6167538",
"0.613623",
"0.60962623",
"0.6084473",
"0.60487604",
"0.6043973",
"0.6032392",
"0.60232896",
"0.6016598",
"0.59968626",
"0.59950775",
"0.5987428",
"0.5984121",
"0.59654385",
"0.59612... | 0.6486539 | 3 |
Takes in entire vector, but will merge the following sections together: Left sublist from a[first]..a[mid], right sublist from a[mid+1]..a[last]. Precondition: each sublist is already in ascending order | private void merge(ArrayList <Comparable> a, int first, int mid, int last){
steps += 5;
ArrayList<Comparable> temp = new ArrayList<Comparable>();
int firstInd = first;
int middle = mid + 1;
steps += 2;
while (firstInd <= mid && (middle) <= last) {
if (a.get(firstInd).compareTo(a.get(middle)) < 0) {
temp.add(a.get(firstInd));
firstInd ++;
steps += 7;
}else if (a.get(middle).compareTo(a.get(firstInd)) < 0){
temp.add(a.get(middle));
middle++;
steps += 7;
}else {
temp.add(a.get(middle));
middle++;
steps += 3;
}
}
if (firstInd >= mid + 1) {
steps += 4;
for (int i = middle; i <= last; i++) {
temp.add(a.get(i));
}
steps += 3;
}else {
steps += 2;
for (int i = firstInd; i <= mid; i++) {
temp.add(a.get(i));
}
steps += 3;
}
steps += 3;
int j = 0;
for (int i = first; i <= last; i++) {
a.set(i, temp.get(j));
j++;
steps += 4;
}
System.out.println();
System.out.println("Merge");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void merge(ArrayList<Integer> a, int left, int mid, int right) {\n\t\tint chunk1 = mid - left + 1;\r\n\t\tint chunk2 = right - mid;\r\n\t\tArrayList<Integer> tempArrLeft = new ArrayList<>();\r\n\t\tArrayList<Integer> tempArrRight = new ArrayList<>();\r\n\t\t//pipe data into temps\r\n\t\tfor (int i=0... | [
"0.6903027",
"0.6717959",
"0.6655416",
"0.65484333",
"0.6504774",
"0.64736646",
"0.6415312",
"0.6338936",
"0.63330144",
"0.63202274",
"0.6319257",
"0.63181657",
"0.63028103",
"0.6298898",
"0.62625927",
"0.62319183",
"0.62115467",
"0.619353",
"0.616535",
"0.6154862",
"0.614397... | 0.72128135 | 0 |
Recursive mergesort of an array of integers | public void mergeSort(ArrayList <Comparable> a, int first, int last){
if (last - first == 0) {
steps ++;
}else if (last - first == 1) {
steps += 4;
if (a.get(first).compareTo(a.get(last)) > 0) {
steps += 5;
swap(a, first, last);
}
}else {
steps += 3;
int mid = (last + first)/2;
steps += 4;
mergeSort(a, first, mid);
mergeSort(a, mid + 1, last);
merge(a, first, mid, last);
}
System.out.println();
System.out.println("Merge Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void mergesort(int[] array) {\n\t\t\n\t}",
"public static void mergesort(int[]data){\n if (data.length <= 1)\n return;\n mergesortH(data, 0, data.length - 1);\n \n }",
"private static int[] mergeSort(int numbers[]) {\n\n\t\tif (numbers.length <= 1) {\n\t\t\treturn numbers;\n\t\t}\n\n\t\t... | [
"0.77437156",
"0.76627284",
"0.7573673",
"0.7496878",
"0.747172",
"0.7395951",
"0.73645556",
"0.73607934",
"0.7345116",
"0.73440474",
"0.72652745",
"0.72646403",
"0.7261126",
"0.7228032",
"0.7222291",
"0.7189666",
"0.71270466",
"0.7105658",
"0.7092467",
"0.708895",
"0.7076245... | 0.0 | -1 |
Accessor method to return the current value of steps | public long getStepCount(){
return steps;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Double getStep();",
"int getStep();",
"int getStep();",
"int getStep();",
"public double getStep() {\n\t\treturn step;\n\t}",
"public Integer getStep() {\n return step;\n }",
"public int getStep() {\n return step;\n }",
"public int getSteps() {\n\t\treturn this.steps;\n\t}",
"p... | [
"0.80837345",
"0.8011761",
"0.8011761",
"0.8011761",
"0.7855403",
"0.7816976",
"0.78083503",
"0.7731867",
"0.770646",
"0.76708895",
"0.76467276",
"0.7572865",
"0.7572865",
"0.7572865",
"0.7525834",
"0.7512569",
"0.75052786",
"0.7468937",
"0.7418205",
"0.7418205",
"0.7418205",... | 0.72770125 | 21 |
Modifier method to set or reset the step count. Usually called prior to invocation of a sort method. | public void setStepCount(long stepCount){
steps = stepCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetStepCount() {\r\n\t\tstepCount = 500;\r\n\t}",
"public void setStepCount(long stepCount){\n steps = stepCount;\n }",
"public static void resetStepCounter() {\n logger.debug(\"The step counter was reset to 1\");\n threadStepNumber.set(1);\n }",
"@Override\n public void ste... | [
"0.74898314",
"0.71755546",
"0.6598937",
"0.65536684",
"0.6499915",
"0.6486114",
"0.64586294",
"0.63304114",
"0.6324068",
"0.6201179",
"0.61752266",
"0.6128118",
"0.61182016",
"0.6091395",
"0.6068469",
"0.6018931",
"0.60043085",
"0.59922594",
"0.596338",
"0.596338",
"0.595299... | 0.7005202 | 2 |
Interchanges two elements in an ArrayList | public void swap(ArrayList <Comparable> list, int a, int b){
Comparable temp = list.get(a);
list.set(a, list.get(b));
list.set(b, temp);
System.out.println();
System.out.println("Swap");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}",
"private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}",
"static void swap(List<CustomCharacter> list, ... | [
"0.6445739",
"0.6445739",
"0.63292384",
"0.6266192",
"0.62650967",
"0.6198205",
"0.6133181",
"0.6081563",
"0.60116553",
"0.59627163",
"0.5943907",
"0.58384424",
"0.58279544",
"0.57907045",
"0.57080704",
"0.5701544",
"0.56629115",
"0.565555",
"0.5631874",
"0.56278974",
"0.5613... | 0.599226 | 9 |
TODO Autogenerated method stub | @Override
public void Update() {
super.Update();
super.decisionRect.x=coordinate.x+(Global.GetGlobal().GetTreeImgRect().width-decisionRect.width)/2;
super.decisionRect.y=coordinate.y+(Global.GetGlobal().GetTreeImgRect().height-decisionRect.height)/2;
} | {
"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 Draw(Graphics g) {
super.Draw(g);
// g.drawRect(decisionRect.x,decisionRect.y,decisionRect. width, decisionRect.height);
} | {
"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 |
Created by Administrator on 2017/8/25. | public interface BasicConfig {
public static final String CONFIG_RREFIX = "atencn.netty";
public static final int PINGPONG_CMD = -16705;
public static final int PINGPONG_SUB = -50761;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@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\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Ov... | [
"0.63064265",
"0.6114075",
"0.5849247",
"0.5845641",
"0.58346254",
"0.5826698",
"0.5792644",
"0.57583886",
"0.5751052",
"0.5751052",
"0.57508814",
"0.57332253",
"0.5726226",
"0.5706651",
"0.5706191",
"0.5703412",
"0.5703412",
"0.5691554",
"0.5673844",
"0.56733227",
"0.5669347... | 0.0 | -1 |
/ algo 1. find the multiples of numbers in first array | public static void main(String[] args) {
int[] arr = {2,6};
for (int i = 0; i < arr.length; i++) {
int[] arrNew = null;
for (int j = 1; j < 100; j++) {
arrNew[j] = arr[i] *j ;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int countMults(int[] nums, int divisibility){\n int total = 0;\n for(int num : nums){\n if(num % divisibility == 0){\n total ++;\n }\n }\n// System.out.println(\"Should return 3 \" + total);\n return total;\n }",
"public sta... | [
"0.70221794",
"0.6601193",
"0.6558644",
"0.65371335",
"0.63925546",
"0.62746894",
"0.6239301",
"0.61548054",
"0.613332",
"0.6034907",
"0.60216653",
"0.60206425",
"0.60182697",
"0.6014917",
"0.6013201",
"0.5998308",
"0.5982253",
"0.5966691",
"0.595851",
"0.5954191",
"0.5944887... | 0.0 | -1 |
the hypotenuse is the side across from the right angle. calculate the value of c given legA and legB | public static void main(String[] args){
Pythagorean x=new Pythagorean();
double y=x.calculateHypotenuse(3,4);
System.out.println(y);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private final Point tangent2G1(Point a, Point b, Point c) {\n\t\t// horizontale volgorde: a ... b ... c\n\t\tif (a.X() < b.X() && c.X() > b.X()) {\n\t\t\tPoint temp = c.minus(a);\n\t\t\tdouble rico = temp.Y() / temp.X();\n\t\t\tdouble d1 = c.X() - b.X();\n\t\t\ttemp = new Point((int) Math.floor(d1), (int) Math.flo... | [
"0.6133746",
"0.5989298",
"0.5920655",
"0.5905336",
"0.5894575",
"0.58647317",
"0.58283466",
"0.58241165",
"0.58208036",
"0.5770422",
"0.5764666",
"0.5725655",
"0.57251143",
"0.5685992",
"0.56700736",
"0.56488186",
"0.562973",
"0.56069124",
"0.5603795",
"0.5597323",
"0.557863... | 0.0 | -1 |
have to make a check from ifpresent index | private static void fun2(List<String> ac1, List<List<String>> result, int index) {
String key = ac1.get(0);
for(int i=index;i<result.size();i++){
List<String> res=result.get(i);
if(res.get(0).equals(key)){
//check if any one of the value is repeated
boolean check=fun3(res,ac1);
if(check){
for(int j=1;j<ac1.size();j++){
res.add(ac1.get(i));
}
break;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }",
"private boolean validateIndex(int index)\n {\n return inde... | [
"0.64587075",
"0.64587075",
"0.64587075",
"0.64587075",
"0.64587075",
"0.64587075",
"0.63861084",
"0.63716495",
"0.6302915",
"0.61443377",
"0.59978783",
"0.5915434",
"0.5904636",
"0.5843986",
"0.5672349",
"0.5672349",
"0.5672349",
"0.5661562",
"0.56499326",
"0.5628023",
"0.55... | 0.0 | -1 |
TODO Autogenerated method stub | private static boolean fun3(List<String> res, List<String> ac1) {
HashSet<String> hs=new HashSet<String>();
for(int i=0;i<res.size();i++){
hs.add(res.get(i));
}
for(int i=0;i<ac1.size();i++){
if(hs.contains(ac1.get(i)))
return true;
}
return 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 | private static int fun(String key, List<List<String>> result) {
for(int i=0;i<result.size();i++){
List<String> ac=result.get(i);
if(ac.get(0).equals(key)){
return i;
}
}
return -1;
} | {
"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 |
super.insertString(offset, str.replaceAll(teclas, ""), attr); | public void replace(int offset, String str, AttributeSet attr)
throws BadLocationException{
String strFinal=str;
if (notRepeat != null){
String txt= super.getText(0, super.getLength());
JOptionPane.showMessageDialog(null, txt);
if ((txt.contains(notRepeat)) && (str.contains(notRepeat))){
strFinal= str.replaceAll("["+notRepeat+"]", "");
}
}
super.insertString(offset, strFinal.replaceAll(teclas, ""), attr);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\n\t\tsuper.insertString(offs, str.replaceAll(\"[^0-9]\", \"\"), a);\n\t}",
"public void insertString(int offset, String str, AttributeSet attr)\n throws BadLocationException {\n\n if (iMaxL... | [
"0.6765159",
"0.6682299",
"0.64529353",
"0.6426337",
"0.64239025",
"0.6266561",
"0.62535524",
"0.62475705",
"0.61312324",
"0.61267537",
"0.610506",
"0.59991586",
"0.5973234",
"0.5943664",
"0.59115213",
"0.58577085",
"0.5842501",
"0.57357544",
"0.57216895",
"0.57002085",
"0.56... | 0.73009306 | 0 |
rend le int maximum | public int getMax(){
return tab[rangMax()];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getRight(double max);",
"int getMax( int max );",
"int getMaximum();",
"int getMaxInt();",
"int getMax();",
"public abstract int getMaximumValue();",
"public int getMaxIntValue();",
"double getMax();",
"double getMax();",
"private long getAbsMax() {\n return Math.max(Math.abs(Visual... | [
"0.6990071",
"0.6945375",
"0.6851092",
"0.6837595",
"0.6803061",
"0.6607219",
"0.6510389",
"0.6504634",
"0.6504634",
"0.6481736",
"0.64492214",
"0.6421779",
"0.6311708",
"0.62616354",
"0.6223969",
"0.62073976",
"0.619563",
"0.61874455",
"0.6160926",
"0.61581963",
"0.61464125"... | 0.6242031 | 14 |
check code whether exist authority table , not exist create sql | public void checkCode(Set<String> codeOnlyOne, Writer w, String e) {
boolean exist = codeOnlyOne.contains(e);
if (!exist) {
try {
w.write(String.format("insert into authority (code) values ('%s' );", e));
w.write("\r\n");
} catch (IOException e1) {
e1.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createRolePermissionsTableIfNotExist() {\n Connection conn = null;\n PreparedStatement ps = null;\n String query = null;\n try {\n conn = getConnection();\n conn.setAutoCommit(false);\n query = queryManager.getQuery(conn, QueryManager.CREATE... | [
"0.61012924",
"0.598929",
"0.57923496",
"0.5630362",
"0.5597416",
"0.5584607",
"0.55739164",
"0.556999",
"0.5517309",
"0.54916495",
"0.5407553",
"0.53960603",
"0.53504485",
"0.5350113",
"0.5348258",
"0.53469604",
"0.5335947",
"0.53354913",
"0.5332317",
"0.53108835",
"0.530316... | 0.48194715 | 95 |
find the bigger string sizes | static String twoStrings(String s1, String s2) {
String bigstr = s1.length() > s2.length() ? s1 : s2;
String smallstr = s1.length() > s2.length() ? s2 : s1;
int bigstrSize = bigstr.length();
int smallstrSize = smallstr.length();
boolean string_check[] = new boolean[1000];
for (int i = 0; i < bigstrSize; i++) {
string_check[bigstr.charAt(i) - 'A'] = true;
}
// if at least one char is present in boolean array
for (int i = 0; i < smallstrSize; i++) {
if (string_check[smallstr.charAt(i) - 'A'] == true) {
return "YES";
}
}
return "NO";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n// String before1 = \"27e80000\";\n// String before1 = \"715b00000\";\n String before1 = \"715b00000\";\n\n long after1 = Long.parseLong(before1, 16);\n System.out.println(after1);\n\n// String before2 = \"28d80000\";\n// St... | [
"0.69153273",
"0.65342504",
"0.64890933",
"0.6442347",
"0.6427554",
"0.6388423",
"0.632903",
"0.6321123",
"0.62325484",
"0.62014854",
"0.62014854",
"0.6195878",
"0.61774725",
"0.615813",
"0.61435944",
"0.6142455",
"0.6141539",
"0.6124126",
"0.6108641",
"0.6098874",
"0.6096281... | 0.0 | -1 |
TODO: breakpoint command: toggle line breakpoint | public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testDeleteBreakpoint() throws Exception {\n startTest();\n openFile(\"debug.html\", LineDebuggerTest.current_project);\n EditorOperator eo = new EditorOperator(\"debug.html\");\n setLineBreakpoint(eo, \"window.console.log(a);\");\n\n openFile(\"linebp.js\", LineDebugg... | [
"0.6672009",
"0.6422396",
"0.63355625",
"0.6293484",
"0.62684536",
"0.6170853",
"0.613667",
"0.6080653",
"0.60534424",
"0.59284383",
"0.5863285",
"0.5838125",
"0.5750545",
"0.5740605",
"0.5740238",
"0.57322913",
"0.5692983",
"0.5690017",
"0.5675868",
"0.5656688",
"0.5649937",... | 0.68408483 | 0 |
TODO: breakpoint command: toggle watchpoint | public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void goOnBreak(){\n\tDo(\"Going on break\");\n\tstartedBreak = true;\n\tstateChanged();\n }",
"@Override\n\tpublic boolean supportsBreakpoint(IBreakpoint breakpoint) {\n\t\treturn false;\n\t}",
"private static void removeBreakPoint() {\n for (int i=1;i<=dvm.getSourceCodeLength();i++) {\n d... | [
"0.6393164",
"0.61881274",
"0.60498434",
"0.6004676",
"0.60037696",
"0.60005635",
"0.5974698",
"0.5948547",
"0.5926701",
"0.5893888",
"0.58596385",
"0.5824956",
"0.58114016",
"0.57724166",
"0.5709336",
"0.5698146",
"0.5682995",
"0.56127065",
"0.55681884",
"0.5535616",
"0.5525... | 0.59171736 | 9 |
Starting with a root class, get the entire tree of mapped objects including collections and references. Cycles are correctly handled. | public static Collection<String> getMappedTree(String rootClass, Collection<DescriptorRepository> descriptorRepositories) {
final Set<String> processed = new HashSet<String>();
getMappedTree(rootClass, descriptorRepositories, processed);
return processed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MappingRoot getRoot() { return _root; }",
"public ResultMap<BaseNode> listChildren();",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n ... | [
"0.6347875",
"0.60059",
"0.5981514",
"0.5981514",
"0.5981514",
"0.5925064",
"0.58882344",
"0.58882344",
"0.57694286",
"0.5519001",
"0.54629475",
"0.5450833",
"0.5450833",
"0.54314315",
"0.54072714",
"0.5336271",
"0.53321564",
"0.5299163",
"0.5297501",
"0.5295649",
"0.5272841"... | 0.59149003 | 6 |
Parses a repository file and populates an ojb datastructure representing the file. | public static DescriptorRepository readDescriptorRepository(String filename) {
LOG.info( "Processing Repository: " + filename);
try {
return (DescriptorRepository) buildRepository(filename, DescriptorRepository.class);
} catch (Exception e) {
LOG.error("Unable to process descriptor repository: " + filename);
LOG.error( e.getMessage() );
// Explicitly not logging the exception - it has already been dumped by earlier logging
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Repository fromXml(String file) {\n File xmlFile = new File(file);\n Repository repository = new Repository();\n Contracts contracts = null;\n JAXBContext jaxbContext;\n try {\n jaxbContext = JAXBContext.newInstance(Contracts.class);\n Unmarshaller jaxbUnmarshaller = jaxbContext.cre... | [
"0.5894255",
"0.5870675",
"0.5762605",
"0.5573224",
"0.54574233",
"0.53946483",
"0.53750676",
"0.53331983",
"0.53329766",
"0.5332889",
"0.5324538",
"0.53158563",
"0.53109",
"0.52934057",
"0.52804023",
"0.52112824",
"0.5144936",
"0.5081205",
"0.5077783",
"0.5065217",
"0.505934... | 0.55822533 | 3 |
Gets all the mapped classes | public static Set<String> mappedClasses(Collection<DescriptorRepository> descriptors) throws Exception {
final Set<String> mappedClasses = new HashSet<String>();
for (DescriptorRepository dr : descriptors) {
for (Map.Entry<String, ClassDescriptor> entry : ((Map<String, ClassDescriptor>) dr.getDescriptorTable()).entrySet()) {
final Collection<String> extents = entry.getValue().getExtentClassNames();
if (extents != null && !extents.isEmpty()) {
mappedClasses.addAll(extents);
} else {
mappedClasses.add(entry.getKey());
}
}
}
return mappedClasses;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Class<?>> getManagedClasses();",
"@Override\n public List<BaiseeClazz> findAllClazzInfo() {\n return claMapper.findAllClazzInfo();\n }",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepository.findAll();\n\t}"... | [
"0.70623314",
"0.70590377",
"0.7051123",
"0.6973965",
"0.68602693",
"0.6840855",
"0.6781583",
"0.6727318",
"0.6547823",
"0.65158933",
"0.65063274",
"0.6468416",
"0.6442242",
"0.64001197",
"0.6393223",
"0.62836903",
"0.62641406",
"0.62641406",
"0.62641406",
"0.62592703",
"0.62... | 0.6019778 | 37 |
Gets all the super classes & stopping when the super class matches a package prefix | public static Set<String> getSuperClasses(String clazzName, String packagePrefixToStop) throws Exception {
final Set<String> superClasses = new HashSet<String>();
Class<?> clazz = Class.forName(clazzName);
for (Class<?> sc = clazz.getSuperclass(); sc != null && sc != Object.class && !sc.getName().startsWith(packagePrefixToStop);) {
superClasses.add(sc.getName());
sc = sc.getSuperclass();
}
return superClasses;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);",
"java.util.List<org.jetbrains.r.classes.S4ClassInfo.S4SuperClass> \n getSuperClassesList();",
"org.jetbrains.r.classes.S4ClassInfo.S4SuperClass getSuperClasses(int index);",
"java.util.List<? extends org.jetbrains.r.classe... | [
"0.72849804",
"0.7212612",
"0.71914697",
"0.6493243",
"0.64917415",
"0.6360271",
"0.6314707",
"0.6206713",
"0.61490583",
"0.61488426",
"0.61482537",
"0.60955584",
"0.60662913",
"0.59664613",
"0.5948271",
"0.59382534",
"0.5937354",
"0.590416",
"0.5854536",
"0.58233905",
"0.581... | 0.78118145 | 0 |
get a xml reader instance: | private static Object readMetadataFromXML(InputSource source, Class target) throws ParserConfigurationException, SAXException, IOException {
SAXParserFactory factory = SAXParserFactory.newInstance();
LOG.debug("RepositoryPersistor using SAXParserFactory : " + factory.getClass().getName());
SAXParser p = factory.newSAXParser();
XMLReader reader = p.getXMLReader();
Object result;
if (DescriptorRepository.class.equals(target)) {
// create an empty repository:
DescriptorRepository repository = new DescriptorRepository();
// create handler for building the repository structure
org.xml.sax.ContentHandler handler = new RepositoryXmlHandler(repository);
// tell parser to use our handler:
reader.setContentHandler(handler);
reader.parse(source);
result = repository;
} else if (ConnectionRepository.class.equals(target)) {
// create an empty repository:
ConnectionRepository repository = new ConnectionRepository();
// create handler for building the repository structure
org.xml.sax.ContentHandler handler = new ConnectionDescriptorXmlHandler(repository);
// tell parser to use our handler:
reader.setContentHandler(handler);
reader.parse(source);
//LoggerFactory.getBootLogger().info("loading XML took " + (stop - start) + " msecs");
result = repository;
} else
throw new MetadataException("Could not build a repository instance for '" + target +
"', using source " + source);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static final XMLReader getXMLReaderInstance(Element config)\n throws ClassNotFoundException, NoSuchMethodException, InstantiationException,\n IllegalAccessException, java.lang.reflect.InvocationTargetException {\n String className = null;\n try {\n className = DOMUtils.getAttribute(con... | [
"0.72765034",
"0.72378093",
"0.7013392",
"0.67191696",
"0.65229076",
"0.6422814",
"0.6358376",
"0.62755007",
"0.62647253",
"0.6190638",
"0.61857975",
"0.61152816",
"0.6105634",
"0.6100399",
"0.60741675",
"0.6049782",
"0.6048438",
"0.60398287",
"0.60398287",
"0.60398287",
"0.6... | 0.0 | -1 |
j2ee compliant lookup of resources | private static URL buildURL(String repositoryFileName) throws MalformedURLException {
URL url = ClassHelper.getResource(repositoryFileName);
// don't be too strict: if resource is not on the classpath, try ordinary file lookup
if (url == null) {
try {
url = new File(repositoryFileName).toURL();
}
catch (MalformedURLException ignore) {
}
}
if (url != null) {
LOG.info("OJB Descriptor Repository: " + url);
} else {
throw new MalformedURLException("did not find resource " + repositoryFileName);
}
return url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ICodeBaseEntry lookupResource(String resourceName) throws ResourceNotFoundException;",
"protected URL convertedFindResource(String name) {\n ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());\n PackageAdmin packageAdmin = (PackageAdmin) ... | [
"0.6812382",
"0.65274274",
"0.641979",
"0.6348425",
"0.62689006",
"0.62072575",
"0.6192945",
"0.60888726",
"0.6069127",
"0.6025231",
"0.59732825",
"0.5896422",
"0.5888548",
"0.5882013",
"0.58715487",
"0.57987094",
"0.57842726",
"0.577802",
"0.5752816",
"0.575029",
"0.575014",... | 0.0 | -1 |
Ensure that the collection contains the specified element. | boolean add(T element); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean contains(E element);",
"@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}",
"public void contains(@Nullable Object element) {\n if (!Iterables.contains(getSubject(), element)) {\n failWithRawMessage(\"%s should have contained <%s>\", getDisplaySubject(), eleme... | [
"0.708101",
"0.7078828",
"0.7042143",
"0.6874107",
"0.66104937",
"0.65751845",
"0.65084577",
"0.6367538",
"0.6344534",
"0.63153434",
"0.63132805",
"0.6276149",
"0.6270169",
"0.62570655",
"0.6240116",
"0.6195575",
"0.61828405",
"0.613923",
"0.6057675",
"0.6035815",
"0.59720874... | 0.5428181 | 89 |
Removes all of the elements from this collection. | void clear(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void clear() {\n for (E e : this) {\n remove(e);\n }\n }",
"public void clear() {\n \tIterator<E> iterateSet = this.iterator();\n \t\n \twhile(iterateSet.hasNext()) {\n \t\t// iterate through and remove all elements\n \t\titerateSet.next();\n \t... | [
"0.81618583",
"0.80908865",
"0.78253204",
"0.7683906",
"0.76545054",
"0.7624773",
"0.759086",
"0.7581562",
"0.75649905",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"... | 0.0 | -1 |
Returns true if the collection contains the specified element. | boolean contains(T o); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean contains(E element);",
"public boolean contains(E element) {\r\n return items.contains(element);\r\n }",
"public boolean contains(T element);",
"public boolean contains(Object elem);",
"@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}",
"boolean conta... | [
"0.85872495",
"0.84302515",
"0.82469547",
"0.8096384",
"0.8004843",
"0.7909234",
"0.7890757",
"0.7812812",
"0.77004045",
"0.76992214",
"0.7604147",
"0.742124",
"0.7366658",
"0.73138434",
"0.7285779",
"0.7220307",
"0.7206529",
"0.7189345",
"0.7183099",
"0.71375984",
"0.7069103... | 0.6668688 | 55 |
Returns true if this collection contains no elements. | boolean isEmpty(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEmpty() {\n return collection.isEmpty();\n }",
"public boolean isEmpty() {\r\n\t\treturn objectCollection.isEmpty();\r\n\t}",
"public boolean isEmpty() {\n\t\treturn elements.isEmpty();\n\t}",
"public boolean isEmpty()\n\t{\n\t\treturn m_elements.isEmpty();\n\t}",
"public boolean... | [
"0.8591195",
"0.8336152",
"0.8313589",
"0.8298996",
"0.82628155",
"0.825473",
"0.82018393",
"0.8178353",
"0.8165435",
"0.81583506",
"0.815382",
"0.815382",
"0.81492275",
"0.81447953",
"0.8142044",
"0.8141508",
"0.8134206",
"0.8127273",
"0.8103136",
"0.8100414",
"0.8098371",
... | 0.0 | -1 |
Removes a single instance of the specified element from this collection, if it is present. | boolean remove(T o); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T remove(T element) throws EmptyCollectionException, ElementNotFoundException;",
"public T remove (T element);",
"public void remove(T element);",
"@Override\r\n\tpublic boolean remove(T element) {\n\t\treturn this._list.remove(element);\r\n\t}",
"public boolean remove(Object element) {\n\n\t\tif (e... | [
"0.757023",
"0.7315093",
"0.72026765",
"0.719113",
"0.6931258",
"0.6784871",
"0.6775838",
"0.67482483",
"0.6597251",
"0.6546017",
"0.6514391",
"0.6514391",
"0.6507571",
"0.6485189",
"0.64393187",
"0.6439168",
"0.64306575",
"0.64135003",
"0.63896185",
"0.6387849",
"0.63831115"... | 0.5922165 | 57 |
Return the number of elements in this collection. | int size(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int size() {\n\t\treturn collection.size();\n\t}",
"public int size() {\n return collection.size();\n }",
"public int size() {\n return this.collection.size();\n }",
"public int getLength() {\n return collection.size();\n }",
"public int size() {\n\n return eleme... | [
"0.83613634",
"0.83342963",
"0.8329733",
"0.81541604",
"0.81238216",
"0.8111901",
"0.8079235",
"0.80555505",
"0.80424064",
"0.8035467",
"0.80260897",
"0.8021569",
"0.7990283",
"0.7946151",
"0.7934801",
"0.7928729",
"0.79152304",
"0.7899844",
"0.789746",
"0.78927225",
"0.78644... | 0.0 | -1 |
Returns an array containing all of the elements in this collection. | Object[] toArray(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Object[] elements() {\n return elements.toArray();\n }",
"@Override\n public Object[] toArray() {\n Object[] result = new Object[size];\n int i = 0;\n for (E e : this) {\n result[i++] = e;\n }\n return result;\n }",
"public Object[] getElements() ... | [
"0.8187129",
"0.77107036",
"0.7686494",
"0.76073545",
"0.75347203",
"0.75344783",
"0.73327345",
"0.7251997",
"0.7214663",
"0.7196702",
"0.7159534",
"0.71417856",
"0.7127532",
"0.6997813",
"0.69710106",
"0.69336665",
"0.6933287",
"0.692959",
"0.68993104",
"0.6874461",
"0.68581... | 0.622044 | 100 |
onCreate() Is called on creation of activity. Override original implementation to add in Bluetooth scanning related initialization. | @Override
protected void onCreate(Bundle savedInstanceState) {
/**
* Load previously saved state and set the view for the
* activity. Set the title of the activity using the action
* bar and create a handlers to schedule messages and
* runnables/actions.
*/
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_device_scan);
//getActionBar().setTitle(R.string.title_devices);
mHandler = new Handler();
mListView = findViewById(R.id.list);
mListView.setOnItemClickListener(devicesClickListener);
/**
* Check whether BLE is supported on the device. You can then
* selectively disable BLE_related features. Display non-intrusive
* pop up message to indicate this and end activity.
*/
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();
finish();
}
/**
* Request access to dangerous permissions: ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION.
* These permissions have to be declared in the manifest file and explicitly requested
* (prompting the user for access).
*/
ActivityCompat.requestPermissions(this, mPermissions, REQUEST_APP_PERMISSIONS);
/**
* Initializes a Bluetooth adapter to handle BLE requests/tasks such as scanning,
* pairing, etc. Get the system level Bluetooth Service and acquire its bluetooth
* adapter.
*/
final BluetoothManager bluetoothManager =
(BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
mBluetoothAdapter = bluetoothManager.getAdapter();
/**
* Check if Bluetooth is supported on this device, i.e. no bluetooth adapter.
* If it isn't, display a short message and end activity.
*/
if (mBluetoothAdapter == null) {
Toast.makeText(this, R.string.bluetooth_not_supported,
Toast.LENGTH_SHORT).show();
finish();
return;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tbtAdapt = BluetoothAdapter.getDefaultAdapter(); //初始化藍牙\n\t\t// 用BroadcastReceiver來取得搜尋結果\n\t\tIntentFilter intent = new IntentFilter();\n\t\tintent.addAction(BluetoothDevice.ACTION_FOUND);\n\t\tintent.addAction(BluetoothDevice.ACTION_BOND_STA... | [
"0.7497008",
"0.7486211",
"0.723636",
"0.7224438",
"0.7205965",
"0.7199507",
"0.7173138",
"0.7015871",
"0.6979992",
"0.689895",
"0.68545556",
"0.6800616",
"0.676376",
"0.6750995",
"0.6724579",
"0.6708958",
"0.66873485",
"0.66632587",
"0.6632216",
"0.66092694",
"0.6586237",
... | 0.71238464 | 7 |
onCreateOptionsMenu() Is called when the user tries to display the options menu for the first time or when the menu has been changed with (if invalidateOptionsMenu() has been called. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
/**
* Instantiate the menu with an xml layout file. Display items from the menu
* depending on the scanning state of the scanner.
*/
getMenuInflater().inflate(R.menu.main, menu);
if (!mScanning) {
menu.findItem(R.id.menu_stop).setVisible(false);
menu.findItem(R.id.menu_scan).setVisible(true);
menu.findItem(R.id.menu_refresh).setActionView(null);
} else {
menu.findItem(R.id.menu_stop).setVisible(true);
menu.findItem(R.id.menu_scan).setVisible(false);
// menu.findItem(R.id.menu_refresh).setActionView(
// R.layout.actionbar_indeterminate_progress);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflate... | [
"0.79393864",
"0.7851638",
"0.77255666",
"0.77147686",
"0.77147686",
"0.77147686",
"0.7684993",
"0.76787245",
"0.76479983",
"0.7632385",
"0.75391024",
"0.753597",
"0.7508872",
"0.74993527",
"0.74946725",
"0.74701244",
"0.74692464",
"0.7448256",
"0.7437842",
"0.73957455",
"0.7... | 0.0 | -1 |
onPrepareOptionsMenu() Is always called right before the options menu is displayed, use this to dynamically update the contents of the options menu. | @Override
public boolean onPrepareOptionsMenu(Menu menu) {
/**
* Display items from the menu depending on the scanning state of the scanner.
*/
if (!mScanning) {
menu.findItem(R.id.menu_stop).setVisible(false);
menu.findItem(R.id.menu_scan).setVisible(true);
menu.findItem(R.id.menu_refresh).setActionView(null);
} else {
menu.findItem(R.id.menu_stop).setVisible(true);
menu.findItem(R.id.menu_scan).setVisible(false);
// menu.findItem(R.id.menu_refresh).setActionView(
// R.layout.actionbar_indeterminate_progress);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.optionsbar, menu);\n \treturn super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\treturn super.onPrepareOptionsMenu(menu);\n\n }",
"@Override\... | [
"0.78450644",
"0.779044",
"0.7734155",
"0.77249295",
"0.7700511",
"0.7700511",
"0.7679651",
"0.7674952",
"0.7487134",
"0.7290362",
"0.71573097",
"0.69928557",
"0.6975467",
"0.6781549",
"0.676724",
"0.6748984",
"0.6740636",
"0.67154646",
"0.6688017",
"0.664587",
"0.66369593",
... | 0.6506524 | 34 |
onOptionsItemSelected() Is called whenever an item from the options menu is selected/clicked. By default it will return false and handle events normally (either call the item's Runnable or send a message to its Handler). If true is returned those default events will not happen (will end events here). | @Override
public boolean onOptionsItemSelected(MenuItem item) {
/**
* Clear currently found BLE devices and rescan again or stop the scan.
*/
switch (item.getItemId()) {
case R.id.menu_scan:
mLeDeviceListAdapter.clear();
scanLeDevice(true);
break;
case R.id.menu_stop:
scanLeDevice(false);
break;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\treturn onMenuItemSelected(item.getItemId());\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n if (!menuMgr.handleMenuEvent(item))\n return super.onOptionsItemSelected(item);\n ... | [
"0.8222727",
"0.8095893",
"0.7897877",
"0.783357",
"0.78182095",
"0.7810666",
"0.7793751",
"0.77726877",
"0.77726877",
"0.77726877",
"0.77616745",
"0.77545375",
"0.7730296",
"0.7728226",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072"... | 0.0 | -1 |
onResume() Is called whenever the activity will start interacting with the user. Always followed by onPause(). | @Override
protected void onResume() {
/**
* Enable Bluetooth if it is not enabled. Create a new list of devices and attach
* it to the list view so it will be shown; then start scanning for devices.
*/
super.onResume();
if(!mBluetoothAdapter.isEnabled()) {
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
mLeDeviceListAdapter = new LeDeviceListAdapter();
mListView.setAdapter((mLeDeviceListAdapter));
scanLeDevice(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onResume() {\n }",
"public void onResume();",
"void onResume();",
"public void onResume() {\n super.onResume();\n }",
"public void onResume() {\n super.onResume();\n }",
"protected void onResume ()\n\t{\n\t\tsuper.onResume ();\n\t}",
"@Override\r\n\tpublic void onResu... | [
"0.8694794",
"0.8680215",
"0.8650069",
"0.8535418",
"0.8535418",
"0.85320616",
"0.8467872",
"0.8467872",
"0.8467872",
"0.8467872",
"0.84479356",
"0.84449106",
"0.84441864",
"0.84410465",
"0.8418006",
"0.8415304",
"0.8415304",
"0.84114295",
"0.8405824",
"0.8403869",
"0.8402074... | 0.0 | -1 |
User chose not to enable Bluetooth. | @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {
finish();
return;
}
super.onActivityResult(requestCode, resultCode, data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bl... | [
"0.7650261",
"0.7547091",
"0.7532929",
"0.75132984",
"0.74813044",
"0.7480912",
"0.74771357",
"0.7413806",
"0.74061507",
"0.73742604",
"0.73549414",
"0.7330556",
"0.72960126",
"0.7292119",
"0.7205935",
"0.7159179",
"0.7148495",
"0.7126613",
"0.70884466",
"0.7071646",
"0.70162... | 0.59774727 | 82 |
scanLeDevice() Scans for BLE devices only when scan is enabled. | private void scanLeDevice(final boolean enable) {
final ListView listView = findViewById(R.id.list);
/**
* Start scanning for a certain amount of time if scanning is enabled
* amount of time, else stop scanning.
*/
if (enable) {
// Stops scanning after a pre-defined scan period.
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
mScanning = false;
mBluetoothAdapter.stopLeScan(mLeScanCallback);
listView.setVisibility(View.VISIBLE);
}
}, SCAN_PERIOD);
mScanning = true;
listView.setVisibility(View.INVISIBLE);
mBluetoothAdapter.startLeScan(mLeScanCallback);
} else {
mScanning = false;
mBluetoothAdapter.stopLeScan(mLeScanCallback);
listView.setVisibility(View.VISIBLE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void scanLeDevice(boolean enabled) {\n\n if (enabled) {\n\n Log.v(TAG, \"SCANNING START\");\n\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n ... | [
"0.7551237",
"0.73364407",
"0.6999834",
"0.6997597",
"0.6875388",
"0.6831643",
"0.66943574",
"0.66730136",
"0.6629817",
"0.65267664",
"0.6503841",
"0.6436555",
"0.63836294",
"0.6286863",
"0.62645787",
"0.6132144",
"0.60748684",
"0.600032",
"0.5986813",
"0.59352607",
"0.591616... | 0.67469394 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.