query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
$ANTLR end "ruleTypeLit" $ANTLR start "entryRuleArrayType" InternalGo.g:479:1: entryRuleArrayType : ruleArrayType EOF ; | public final void entryRuleArrayType() throws RecognitionException {
try {
// InternalGo.g:480:1: ( ruleArrayType EOF )
// InternalGo.g:481:1: ruleArrayType EOF
{
if ( state.backtracking==0 ) {
before(grammarAccess.getArrayTypeRule());
... | [
"public final void entryRuleArrayType() throws RecognitionException {\n try {\n // InternalBasicAttributes.g:294:1: ( ruleArrayType EOF )\n // InternalBasicAttributes.g:295:1: ruleArrayType EOF\n {\n before(grammarAccess.getArrayTypeRule()); \n pushFoll... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether save the result directly to repository or pass it back to caller. Default to false for backward compatibilities. bool save_to_repo = 3; | boolean getSaveToRepo(); | [
"public boolean getSaveToRepo() {\n return saveToRepo_;\n }",
"public Builder setSaveToRepo(boolean value) {\n \n saveToRepo_ = value;\n onChanged();\n return this;\n }",
"public boolean save() {\n\t\treturn save(_file);\n\t}",
"public boolean saveInStore() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Included Procedure to DBLink | protected void setupProcedureToDBLinkIncluded(List<DfProcedureMeta> procedureList) {
if (_procedureToDBLinkDataSource == null) {
return;
}
final DfProcedureNativeTranslatorOracle translator = new DfProcedureNativeTranslatorOracle(
_procedureToDBLinkDataSource);
... | [
"SQLCall createSQLCall();",
"public String getProcedureSQL();",
"public void demo1() {\n\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = DbUtils.getConnection();\n\n\t\t\tCallableStatement cs = con.prepareCall(\"CALL p1()\");\n\t\t\tcs.execute();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will create a namespace base on the prefix and URI provided | public GNNamespace newNamespace(String prefix, String uri)
throws XMLException
{
try
{
return GNXMLDocumentUtility.newNamespace(prefix, uri);
}
catch (Exception ex)
{
Logger.warn("[XMLServiceHandler.newNamespace]",
"Unable to create namespace", ex);
throw new... | [
"Namespace createNamespace();",
"private Namespace(final String prefix, final String uri) {\n this.prefix = prefix;\n this.uri = uri;\n }",
"public void namespaceAdded(String prefix, String uri);",
"public abstract SOAPElement addNamespaceDeclaration(String prefix,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'accumulatingAmount' field has been set | public boolean hasAccumulatingAmount() {
return fieldSetFlags()[6];
} | [
"public boolean isSetAmount() {\n return this.amount != null;\n }",
"public boolean hasOldAccumulatingAmount() {\n return fieldSetFlags()[7];\n }",
"public boolean isSetAmount() {\n return this.amount != null;\n }",
"public boolean isSetTotalAmt() {\n return EncodingUtils.testBit(__isse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the object with the settings used for calls to createHcxActivationKey. | public OperationCallSettings<CreateHcxActivationKeyRequest, HcxActivationKey, OperationMetadata>
createHcxActivationKeyOperationSettings() {
return createHcxActivationKeyOperationSettings;
} | [
"public UnaryCallSettings.Builder<GetHcxActivationKeyRequest, HcxActivationKey>\n getHcxActivationKeySettings() {\n return getHcxActivationKeySettings;\n }",
"public UnaryCallSettings<CreateHcxActivationKeyRequest, Operation>\n createHcxActivationKeySettings() {\n return createHcxActivation... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ordena una lista de Estados por nombre | public void ordenarEstado(List<DatoBasico> estadoLista) {
Collections.sort(estadoLista, new Comparator() {
public int compare(Object o1, Object o2) {
DatoBasico estado1 = (DatoBasico) o1;
DatoBasico estado2 = (DatoBasico) o2;
return estado1.getNombre().compareToIgnoreCase(... | [
"public List<Solicitud> obtenerSolicitudesPorEstado(String estado);",
"public Collection getListaEstornos()\n\t{\n\t return this.listaEstornos;\n\t}",
"public void ordenaPorNome() {\n\t\tCollections.sort(this.cenarios, new NomeComparator());\n\t}",
"public List<Estados> buscaEstados() {\n\t\tString jpql = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cancels the job by setting the state accordingly. | public synchronized void cancel() {
this.executionState = JobExecutionState.CANCELLED;
this.finished = Instant.now();
} | [
"void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }",
"void cancel(JobType type);",
"@Override\n public synchronized void cancel() {\n endDate = new Date();\n logger.fine(\"Orchard job \\\"\" + id + \"\\\": Finished/canceled\");\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
String sql = "select from usuario where usuario ='"+ auth.usuario + "'and senha = '"+ auth.senha+"'"; | public boolean authCO(Usuario auth) throws SQLException {
String sql = "select * from usuario where usuario = ? and senha = ?";
PreparedStatement prepareStatement = connection.prepareStatement(sql);
prepareStatement.setString(1, auth.usuario);
prepareStatement.setString(2,auth.senha);
... | [
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"public boolean CRUD_busca(Usuario usuario) {\n \n con = Conexao.Criar_conexao();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'blockNumber' field. | public void setBlockNumber(java.lang.Long value) {
this.blockNumber = value;
} | [
"public void setBlocknum(int blocknum) {\n this.blocknum = blocknum;\n }",
"public abstract void setBlockNumber(int blockNumber);",
"public void setBlockNum(int blockNum){this.blockNum = blockNum;}",
"public void setBlockNo(String blockNo) {\n this.blockNo = blockNo;\n }",
"public void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checkWeightFormat Description: Checks the weight input against a regex and reports its success. | protected boolean checkWeightFormat(String weight){
//regex: 1-3 digits
Pattern regex = Pattern.compile("\\d+");
Matcher matcher = regex.matcher(weight.trim());
if(!weight.equals("")){
return matcher.matches();
}
//the user is allowed to enter an empty weight
... | [
"protected boolean processWeightTextField()\n {\n String text = weightTextField.getText();\n try\n {\n // If parsing causes no errors, then return true.\n float x = Float.parseFloat(text);\n\n // probably should use a better float comparison\n Bool... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Column__Group_6__0" $ANTLR start "rule__Column__Group_6__0__Impl" InternalMyDsl.g:10520:1: rule__Column__Group_6__0__Impl : ( 'title' ) ; | public final void rule__Column__Group_6__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:10524:1: ( ( 'title' ) )
// InternalMyDsl.g:10525:1: ( 'title' )
{
// InternalMyDsl.g:10525:1: ( 'title'... | [
"public final void rule__Action__Group_6__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:9795:1: ( ( 'columnTitle' ) )\n // InternalMyDsl.g:9796:1: ( 'columnTitle' )\n {\n // Internal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if there is collision, there is only collision when the hatch is closed. Which means that you wont fall through it only when it is closed. | @Override
public boolean isCollision(double x, double y, double z) {
if(hatchstatus==HatchState.CLOSED){
return y<0 && y> -1 && x>locationX && x<locationX+Mazerunner.SQUARE_SIZE && z>locationZ && z<locationZ+Mazerunner.SQUARE_SIZE;
}
return false;
} | [
"public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "primary" $ANTLR start "identifierSuffix" Java.g:846:1: identifierSuffix : ( ( '[' ']' )+ '.' 'class' | ( '[' expression ']' )+ | arguments | '.' 'class' | '.' explicitGenericInvocation | '.' 'this' | '.' 'super' arguments | '.' 'new' innerCreator ); | public final void identifierSuffix() throws RecognitionException {
int identifierSuffix_StartIndex = input.index();
try { dbg.enterRule(getGrammarFileName(), "identifierSuffix");
if ( getRuleLevel()==0 ) {dbg.commence();}
incRuleLevel();
dbg.location(846, 1);
try {
... | [
"public final void superSuffix() throws RecognitionException {\n int superSuffix_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"superSuffix\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(898, 1);\n\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set an access code received from an OAuth request. | public void setOAuthAccessCode(String code, String clientId, String clientSecret, String redirectURI) throws OnshapeException {
WebTarget target = client.target("https://oauth.onshape.com/oauth/token");
MultivaluedMap<String, String> formData = new MultivaluedHashMap<>();
formData.add("grant_typ... | [
"public void setAccessCode(final String accessCode) {\r\n\t\tthis.accessCode = accessCode;\r\n\t}",
"public void setAuthorizationCode(int authorizationCode);",
"private void setAuthCodeFromIntent(Uri returnUrl) {\n authCode = returnUrl.getQueryParameter(\"code\");\n Log.d(TAG, \"Auth Code set to \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
POSTs data on the server at specified path and return results as string. | public String post(String path, String data) throws IOException {
return toString(doHTTP(path, data, "POST", null));
} | [
"public String post(String path,\n String data) throws IOException, URISyntaxException {\n URL url = new URL(rootUrl + path);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setDoOutput(true);\n con.getOutputStream().write(data.toString().getBytes());\n c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets this order as "PaidInvoice" | Order setInvoicePaidStatus(Order order, User user); | [
"private void setInvoice() {\n\t\tString id = account.getID();\n\t\tthis.invoiceNumber = id;\n\t}",
"public void setPaid() {\n isPaid = true;\n }",
"public void setIsPaid(java.lang.Object isPaid) {\n this.isPaid = isPaid;\n }",
"public void setPaidStatus(int paidStatus) {\n this.pai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Addition__Group__0__Impl" $ANTLR start "rule__Addition__Group__1" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7680:1: rule__Addition__Group__1 : rule__Addition__Group__1__Impl ; | public final void rule__Addition__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7684:1: ( rule__Addition__Group__1__Impl )
//... | [
"public final void rule__Addition__Group_1__0__Impl() throws RecognitionException {\n int rule__Addition__Group_1__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 723) ) { retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns color in an array of three ints: R, G, and B | public int[] getColor() {
int[] retVal = new int[3];
retVal[0] = r;
retVal[1] = g;
retVal[2] = b;
return retVal;
} | [
"public int[] getColor() {\n int[] retVal = new int[3];\n retVal[0] = r;\n retVal[1] = g;\n retVal[2] = b;\n return retVal;\n }",
"int[] getPossibleColors();",
"public Color[] getColors();",
"public int[] getColorIndices();",
"public static int[] getPixelData(int argb) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AgileSet Constructor with a specified initial current size. Creates an empty AgileSet with the specified current size value. | public AgileSet(double initialCurrentSize) {
currentSize = initialCurrentSize;
} | [
"public AgileSet() {\n currentSize = 0.0;\n }",
"public HeapSet (int initialCapacity) {\r\n\t\tsuper (initialCapacity);\r\n\t}",
"public IdentityHashSet(int initialCapacity) {\r\n this(initialCapacity, DEFAULT_LOAD_FACTOR);\r\n }",
"public OpenHashSet(int capacity) {\n this(capacity... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
must return a instance of ServerIL or else throw an Exception. | public ServerIL getServerIL()
throws Exception; | [
"public interface ServerILFactory {\n\n /**\n * Constant used to identify the property that holds the ServerILFactor class name\n */\n public final static String SERVER_IL_FACTORY_KEY = \"ServerILFactory\";\n /**\n * Constant used to identify the property that holds the ClientILService class name\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove an existing child Container from association with this parent Container. | public void removeChild(Container child); | [
"public void removeChildContainer(GateContainer child) {\r\n\tif (childs != null) {\r\n\t childs.remove(child);\r\n\t}\r\n }",
"void removeContainedBy(@Nonnull final Transaction tx, final FedoraId parent, final FedoraId child);",
"public void removeFromParent();",
"public void removeChild( ChildType chi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check filtering functionality of monitoring exporter for appending configuration with filter. | @Test
@DisplayName("Test appending configuration with filter.")
void testAppendConfigWithFilter() throws Exception {
logger.info("Testing appending configuration containing filters ");
List<String> checkIncluded = new ArrayList<>();
checkIncluded.add("app=\"myear1\"");
List<String> checkExcluded = n... | [
"private void updateFilterExportPossible() {\n ExportLevels exportLvl = (ExportLevels)comboExportLevel.getSelectedItem();\n ExportFormats exportFormat = (ExportFormats)comboExportFormat.getSelectedItem();\n boolean filterEnabled = true;\n\n // check, which format and levels are selected ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Conjunto de testes extras para gets e sets. | @Test
public void testesExtras() {
minitElimBai_1.setNome("Disc 1");
Assert.assertEquals("Erro em setNome()", "Disc 1",
minitElimBai_1.getNome());
minitElimBai_1.setQtdProvas(10);
Assert.assertEquals("Erro em setQtdProvas()", 10,
minitElimBai_1.getQtdProvas());
minitElimBai_1.setQtdProvasJaRealizadas... | [
"@Test\n public final void testParseWhereExtraValue() throws Exception {\n\n try (InputStream is = this.getClass()\n .getResourceAsStream( \"/data/loader/expression/experimentalDesignTestExtra.txt\" )) {\n\n experimentalDesignImporter.importDesign( ee, is );\n }\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field70' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField70() {
field70 = null;
fieldSetFlags()[70] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField1070() {\n field1070 = null;\n fieldSetFlags()[1070] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField141() {\n field141 = null;\n fieldSetFlags()[141] = false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new snooze alarm | public void snoozeAlarm() {
AlarmHelper ah = new AlarmHelper();
ah.snoozeAlarm();
stopAlarmService();
} | [
"Alarm createAlarm();",
"private void scheduleNextSnooze(Context context, Alarm alarm) {\n int day = Calendar.getInstance().getTime().getDay();\n\n Intent alertIntent = new Intent(context, AlarmReceiver.class); //When timer ends, check with receiver\n alertIntent.putExtra(ALARM_NAME, alarm.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of all client titles which were displayed on clients page. | public List<String> getListOfClientNames() throws Exception {
if (isNotAt()) {
goTo();
}
return getTableDataByColumn(clientsTable, 0);
} | [
"public List<String> getTitles() {\n List<String> list = new ArrayList<>(((List<Entry>) Router.callRouter(this.entries, Entries.class, \"getEntry\", null, null)).size());\n for (Entry entry : this.entries.getEntry()) {\n list.add(entry.getTitle());\n }\n return list;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find by reference: country | public List<Location> findByCountry(Country country); | [
"@Override\n\tpublic String findCountry(){\n\t\treturn \"Canada\";\n\t}",
"Country getAvailableCountryById(int countryId);",
"public Country getCountry(int CountryID);",
"Country getOneCountryByCode(String code);",
"Country getCountry();",
"public IForvoCountry findClosestCountry(Set<IForvoCountry> countr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the node color according to the DFS alogorithm | private int setNodeColorDFS(int k) {
do{
Vertex cur = graph.getVertex(k);
int color = (cur.getColor() + 1) % (numColors + 1);
cur.setColor(color);
nodesExplored++;
/* Tried all the colors, and none of them worked! */
if(color == 0){
return 0;
}
if(validColor(color, cur))
return color;
... | [
"private void colorNode(NodeImpl node) {\n nodeColorizer.color(node);\n }",
"public void nodeColor(String str) { setSelected(node_colors, str); }",
"public void dfsColor(Graph graph, int node){\n marked[node] = true;\n for(int neigh: graph.adj[node]){\n if(!marked[neigh])... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the slider tick1. | public ImageIcon getSliderTick1()
{
return getImage(IMGS_ROOT+"/slider_tick1.png");
} | [
"int getFirstTick();",
"public long getTick()\r\n {\r\n return ((Long) tickSpinner.getValue()).longValue();\r\n }",
"public static int getTick()\n\t{\n\t\treturn tick;\n\t}",
"public int getTick() {\n return tick;\n }",
"public int getTick() {\r\n return tick;\r\n }",
"public in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
See the cue property definition in CSS2. | public void setCue(String cue) throws DOMException; | [
"public String getCue();",
"public String getCueAfter();",
"public String getCueBefore();",
"public CssCueBefore() {\n }",
"public void playCueSound() {\n playSound(cueSound);\n }",
"public boolean hasCue() {\r\n\t\treturn hasCue;\r\n\t}",
"public void setCueBefore(String cueBefore) throws ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find all mpo enlisted employee of current institute | @RequestMapping(value = "/instEmployees/current/mpoEnlisted",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public List<InstEmployee> getMpoEnlistedEmployeesOfCurrent()
throws URISyntaxException {
log.debug("Inst titute employeee for institute>>>... | [
"public List<Incidencia> getIncidenciaByOrigen(Empleado e) throws XMLDBException;",
"@SuppressWarnings( \"unchecked\" )\n public List<Employment> getEmployments() {\n return (List<Employment>) CollectionUtils.select(\n getQueryService().findAllEmploymentsWithKnownActors(),\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all rows from the EXIT_QUESTIONS_MAP table that match the criteria 'EXIT_QUESTION_ID = :exitQuestionId'. | public ExitQuestionsMap[] findWhereExitQuestionIdEquals(Integer exitQuestionId) throws ExitQuestionsMapDaoException {
return findByDynamicSelect(SQL_SELECT + " WHERE EXIT_QUESTION_ID = ? ORDER BY EXIT_QUESTION_ID", new Object[] { exitQuestionId });
} | [
"public ExitQuestionsMap[] findByExitQuestions(Integer exitQuestionId) throws ExitQuestionsMapDaoException {\n\t\treturn findByDynamicSelect(SQL_SELECT + \" WHERE EXIT_QUESTION_ID = ?\", new Object[] { exitQuestionId });\n\t}",
"public ExitQuestionsMap[] findWhereExitIdEquals(Integer exitId) throws ExitQuestionsM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the critical voltage value. Under this value the GoPiGo will be flagged as "halted". | public void setCriticalVoltage(double value) {
debug.log(Debug.INFO, "Setting criticalVoltage to " + Double.toString(value));
criticalVoltage = value;
} | [
"public void setVoltage (double v) {\r\n if (v < validFinalMin && v > validFinalMax)\r\n voltage = validFinalMin;\r\n else\r\n voltage = v;\r\n VINJTextField.setText (\"\" + voltage);\r\n }",
"public void setVoltage(double voltage) {\n\t\tfire(voltage / 12);\n\t}",
"public void setCriticalOn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get the maximum file size. | public long getMaxFileSize(); | [
"public static int getMaximumFilesize() {\n\ttry {\n\t return Integer.parseInt(\n\t\t properties.getProperty(\"situationHandler.network.MaximumFileSize\")) * 1_000_000;\n\t} catch (NumberFormatException e) {\n\t return 15_000_000;\n\t}\n }",
"public int getMaxSize() {\n\t\tif (app_properties != null) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor taking errorMessage ,wrappedEx and errorCode as parameter | public UnAuthorisedException(String errorCode, String errorMessage, Throwable wrappedEx)
{
super(errorCode, errorMessage, wrappedEx);
} | [
"public RavelloException(int status, Object errorCode, Object errorMessage) {\n this.status = status;\n this.errorCode = errorCode;\n this.errorMessage = errorMessage;\n }",
"public UnAuthorisedException(String errorCode, Throwable wrappedEx)\r\n\t{\r\n\t\tsuper(errorCode, wrappedEx);\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EPolicyType__Group__4__Impl" $ANTLR start "rule__EPolicyTypeBody__Group__0" InternalAADMParser.g:8727:1: rule__EPolicyTypeBody__Group__0 : rule__EPolicyTypeBody__Group__0__Impl rule__EPolicyTypeBody__Group__1 ; | public final void rule__EPolicyTypeBody__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAADMParser.g:8731:1: ( rule__EPolicyTypeBody__Group__0__Impl rule__EPolicyTypeBody__Group__1 )
// InternalAADMParser.g:8732:2: rule__EP... | [
"public final void rule__EPolicyTypeBody__Group_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8866:1: ( rule__EPolicyTypeBody__Group_1_0__0__Impl rule__EPolicyTypeBody__Group_1_0__1 )\n // InternalAAD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transform the given client delta against the known delta history. | public WaveletDelta onClientDelta(WaveletDelta delta) throws TransformException {
if (delta.getTargetVersion().getVersion() > deltaHistory.getCurrentVersion()) {
throw new TransformException("Client has a newer version than server knows. client: "
+ delta.getTargetVersion() ... | [
"private WaveletDelta transformSubmittedDelta(WaveletDelta submittedDelta)\n throws OperationException, InvalidHashException {\n HashedVersion targetVersion = submittedDelta.getTargetVersion();\n HashedVersion currentVersion = getCurrentVersion();\n Preconditions.checkArgument(!targetVersion.equals(cu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
It accepts admin details and validates, if exist in database returns admin name else returns null. | public static String loginVerificationDAO(AdminDetails adminDetails) {
Connection connection = null;
PreparedStatement pst = null;
ResultSet result = null;
String name = null;
try {
// Get Connection
connection = ConnectionUtil.getConnection();
System.out.println("Connection established");
// Sql... | [
"java.lang.String getAdmin();",
"public String getAdminname() {\n return adminname;\n }",
"public String getAdminName()\n {\n return adminName;\n }",
"public void setAdminName(String adminName)\n {\n this.adminName = adminName;\n }",
"public String getAdminName() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set up the list of flights with recycler view | private void setUpListOfFlightView(RecyclerView flightList) {
FlightAdapter flightAdapter = new FlightAdapter(getApplicationContext());
flightList.setAdapter(flightAdapter);
flightList.setLayoutManager(new LinearLayoutManager(this));
flightList.addItemDecoration(new DividerItemDecoration... | [
"private void setListView() {\n if (mFlightList != null && mFlightList.size() > 0) {\n\n mFlightListAdapter = new FlightListAdapter(this, mFlightList);\n\n lvFlights.setVisibility(View.VISIBLE);\n tvFlightHeader.setVisibility(View.VISIBLE);\n rlSortContainer.setVis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the name of the noise file | public String getNoiseFilename(){
return m_noiseFile.getName();
} | [
"public static String getFileName() {\n\t\tString fileNameRandom = getCharacterAndNumber();\n\t\treturn fileNameRandom;\n\t}",
"public String getNameWithoutExtension() {\n String name = fileToWrite.getName();\n return name.substring(0, name.length() - 4);\n }",
"java.lang.String getFileName();"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the amplitude of the angle between two vectors with given origin. | public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin); | [
"public static double calculateAngleOfPoints(float[] origin, float[] destination)\n {\n float[] vector = moveVectorToOrigin(origin, destination);\n float[] tmpDest = vector;\n double tangent = Math.abs(tmpDest[1]) / Math.abs(tmpDest[0]);\n double angle = Math.atan(tangent);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return default repository name to open a WCM session. | String getDefaultRepository(); | [
"String getRepositoryName();",
"String getDefaultWorkspace();",
"public static String getRepositoryPersistenceDefaultUser() {\n return REPOSITORY_PERSISTENCE_CONNECTION_USERNAME_DEFAULT;\n }",
"String getDefaultRemote(String _default_) throws GitException, InterruptedException;",
"void setDefaultR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy Constructor: Creates a deep copy of the specified Precaution object. | public Precaution(Precaution precaution)
{
this(precaution.name_, precaution.modifier_);
} | [
"public Precaution()\n {\n this(\"New Precautionary Measure\", 0.0f);\n }",
"public Substitution copy()\n {\n Substitution copy = new Substitution();\n copy.contents.putAll(contents);\n return copy;\n }",
"@Override\n\tpublic TemplateEffect copy() {\n\t\treturn new TemplateEffect(labelTe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EInt__Group__1" $ANTLR start "rule__EInt__Group__1__Impl" InternalActivityDiagram.g:6769:1: rule__EInt__Group__1__Impl : ( RULE_INT ) ; | public final void rule__EInt__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:6773:1: ( ( RULE_INT ) )
// InternalActivityDiagram.g:6774:1: ( RULE_INT )
{
// InternalActivit... | [
"public final void rule__EInt__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:435... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for number of ham toppings. | public int getNumberOfHam() {
return this.ham;
} | [
"public int getHats() {\n return totalHats;\n }",
"public static int getNoOfHospitals(){\n return noOfHospitals;\n }",
"public int getNumHeads() {\n return numHeads;\n }",
"@Override\n\tpublic int getCauHinhThuTienTetsCount() {\n\t\treturn _cauHinhThuTienTetLocalService.getCauHin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The sources and tuples maps get populated by this method, mapping integer ids of the sources/tuples to their string descriptions. tupleTruthsAll is populated to include all tuple truth values (while only 1 holdoutFraction of those are put into the model). Samples sampleFraction fraction of the sources, and only conside... | static ModelInstance createModelInstance(Double sampleFraction, Double holdoutFraction, List<String> sources, List<String> tuples, Map<Integer, Boolean> tupleTruthsAll) throws IOException {
Map<String, Set<String>> sourceOutputStrings = new HashMap<String, Set<String>>();
Set<String> trueTuples = new HashSet<String... | [
"static void parseData(Map<String, Set<String>> sourceOutputStrings, Set<String> trueTuples) throws IOException{\n\t\tBufferedReader dataFile = new BufferedReader(new FileReader(DATAFILE));\n\t\t\n\t\tSet<String> bookSet = new HashSet<String>();\n\t\tSet<String> authorSet = new HashSet<String>();\n\t\tSet<String> t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides a callback handler, invoked after the transaction manager logs the confirmation and compensation handlers. The handler is registered via the org.jboss.narayana.compensations.api.TxLogged annotation. The 'success' flag indicates whether the logging was successful. 'Success' indicates that the application will l... | public interface TransactionLoggedHandler {
/**
* Notification that the transaction has been logged
*
* @param success indicates whether the log was succesful or not.
*/
public void transactionLogged(boolean success);
} | [
"public void transactionLogged(boolean success);",
"void notifyTransactionCompleted(GlobalTransaction transaction, boolean successful, InvocationContext ctx);",
"@Override\n public void onSuccess(final Void result) {\n if (transactionInError.get()) {\n LOG.warn(\"Tra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds to queue netsted namespaces, which names should be adjusted to the new package name/path | public static void handleMovedPackageNamespaces(@NotNull RenameRefactoringQueue queue, VirtualFile file, String oldPath)
{
Project project = queue.getProject();
VirtualFile newInnermostRoot = PerlUtil.getFileClassRoot(project, file);
if (newInnermostRoot != null)
{
String newRelativePath = VfsUtil.getRelat... | [
"private QName importNamespace(final QName qname) {\n String prefix = qname.getPrefix();\n final String namespace = qname.getNamespaceURI();\n boolean prefixInUse = false;\n boolean namespaceInUse = false;\n\n // check if prefix is in use\n if (prefix != null && !prefix.isE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Supplies additional spacing between items along the layout axis of the group | @Nullable
@Generated
@Selector("interItemSpacing")
public native NSCollectionLayoutSpacing interItemSpacing(); | [
"protected static void updateGroupSpacing(Group group) {\n\t\tGridLayout layout = (GridLayout) group.getLayout();\n\t\tGridData data = (GridData) group.getLayoutData();\n\t\tlayout.marginWidth = 5;\n\t\tlayout.marginHeight = 5;\n\t\tdata.verticalIndent = 20;\n\t}",
"private void addSpace()\n {\n \tint rowNu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Album Ratings Fetch average rating for this album | public int fetchAlbumAverageRating(long userid, long albumId); | [
"public double getRatingAverage() {\n return average;\n }",
"public abstract double getMediaAvgRating();",
"public double getAverageRating() {\n\t\t// sum of ratings / no of ratings given \n\t\tdouble avgRating = 0; \n\t\tdouble sum = 0; \n\t\tint numRatings = this.appRating.size();\n\t\tif (numRatings == 0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method adds the custom javadoc tag for. You may do nothing if you do not wish to include the Javadoc tag however, if you do not include the Javadoc tag then the Java merge capability of the eclipse plugin will break. | protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *");
StringBuilder sb = new StringBuilder();
sb.append(" * ");
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete... | [
"public interface Javadoc extends JavaTool {}",
"public void addDocumentationElement(Element docEl);",
"public void addDocumentation(InvDocumentation doc) {\n tm.addDocumentation(doc);\n hashCode = 0;\n }",
"public void saveBeforeJavadoc() { }",
"JavadocTag setText(String text);",
"JavadocTag setVa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .DGUsage usage = 1; | DGUsage getUsage(); | [
"DGUsageOrBuilder getUsageOrBuilder();",
"public Builder setUsage(DGUsage value) {\n if (usageBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n usage_ = value;\n onChanged();\n } else {\n usageBuilder_.setMess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the prompt string defined by the getBshPrompt() method in the global namespace. This may be from the getBshPrompt() command or may be defined by the user as with any other method. Defaults to "bsh % " if the method is not defined or there is an error. | private String getBshPrompt() {
try {
return (String) eval("getBshPrompt()");
} catch ( Exception e ) {
return "bsh % ";
}
} | [
"private String getCmdPromptString()\n {\n String prompt = currentUser.getName() + '@' + HOST_NAME + ':';\n prompt += currentUser.getHomeDir().getName().equals(currentUser.getCurrentDirectory().getName())\n ? '~'\n : currentUser.getCurrentDirectory().getName();\n\n prom... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("player is intersecting " + other.getId() + " " + collider.intersects(other.getCollider().getBounds2D())); | @Override
public boolean intersects(GameObject other)
{
return getCollider().intersects(other.getCollider().getBounds2D());
} | [
"public abstract Vector3f doesIntersect(Vector3f ownPosition, Vector3f otherPosition, Collider other);",
"public void collide(){\n //The following keep the player in bounds\n if (getBounds().x < 0){\n x = 0;\n }\n if (getBounds().y < 0){\n y = 0;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column FreeHost_Product_VPS.HourMBin14 | public Integer getHourmbin14() {
return hourmbin14;
} | [
"public Integer getHourmb14() {\r\n return hourmb14;\r\n }",
"public void setHourmbin14(Integer hourmbin14) {\r\n this.hourmbin14 = hourmbin14;\r\n }",
"public void setHourmb14(Integer hourmb14) {\r\n this.hourmb14 = hourmb14;\r\n }",
"public Integer getHourmbin7() {\r\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return list of all install sessions owned by the calling app. | public @NonNull List<InstallSessionInfo> getMySessions() {
try {
return mInstaller.getMySessions(mInstallerPackageName, mUserId);
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
}
} | [
"public @NonNull List<InstallSessionInfo> getAllSessions() {\n try {\n return mInstaller.getAllSessions(mUserId);\n } catch (RemoteException e) {\n throw e.rethrowAsRuntimeException();\n }\n }",
"public List<ISession> getSessions();",
"java.util.List<com.google.span... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a version of the given string, where for every star () in the string the star and the chars immediately to its left and right are gone. So "abcd" yields "ad" and "abcd" also yields "ad". starOut("abcd") > "ad" starOut("abcd") > "ad" starOut("smeilly") > "silly" | public static String starOut(String str) {
StringBuilder sb = new StringBuilder("");
for(int i = 0; i < str.length(); i++) {
int left = (i >= 1) ? i - 1 : i;
int right = (i < str.length() - 1) ? i + 1 : i;
if(str.charAt(left) != '*' && str.charAt(right) != '*' && str.charAt(i) != '*') {
... | [
"private String asteriskStrip(String pre)\n {\n RE asteriskRegexp = null;\n String post = null;\n String sRet = null;\n\n try\n {\n asteriskRegexp = new RE(asteriskRegexpString);\n if ( asteriskRegexp.match(pre) )\n {\n post = ast... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of items displayed in the Object 2D view, they may be simulated or received from the vision system. | public List<PhysicalItem> getObjectViewOutputItems() {
if (null != object2DViewJInternalFrame) {
return object2DViewJInternalFrame.getOutputItems();
}
throw new IllegalStateException("object2DViewJInternalFrame is null");
} | [
"public List<PhysicalItem> getObjectViewItems() {\n if (null != object2DViewJInternalFrame) {\n return object2DViewJInternalFrame.getItems();\n }\n throw new IllegalStateException(\"object2DViewJInternalFrame is null\");\n }",
"public List<PhysicalItem> getSimItemsData() throws ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/method evaluated the input expr each expr contains two numbers and one function | private String evaluateExpr(String expr){
//bigdecimal used for long user inputs
BigDecimal num1, num2, ans, temp = new BigDecimal("0");
int check = 1;
//find the position of function
while(Character.isDigit(expr.charAt(check)) || expr.charAt(check) == '.')
check++;
//extract numbers from expression
nu... | [
"public static Double eval(String expression) {\n\n// Этап 1\n// На данном этапе преобразуем нашу строку в список строк, через совмещение цикла for-each и метода split(),\n// также используем метод trim(), чтобы избавиться от пробелов по краям.\n// Обратите внимание, что каждым вторым элементом я добавляю \" \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether the field is text searchable. For Oracle this means that the associated column has an interMedia (or ConText) index and therefore may use the contains operator. The default implementation returns false. | public boolean isFieldTextSearchable(String fieldName) {
return false;
} | [
"public boolean isSearchable() {\n return (rawData != null && !rawData.optBoolean(Constants.HIDDEN_FIELD)\n && rawData.optBoolean(Constants.SEARCHABLE_FIELD));\n }",
"public boolean isTextValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_TEXT);\n }",
"public final boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the num that <target start, end: the range for search. tgt: the target num that search for. | public int bSearch(int[] arr,int start, int end, int tgt){
if(tgt>arr[end]) return end;
if(tgt<arr[start]) return start;
if(end==start) return start;
if(arr[(start+end)/2]<=tgt&&arr[(start+end)/2+1]>=tgt) return (start+end)/2;
if(tgt>arr[(start+end)/2]){
return bSearch(arr, (start+end)/2+... | [
"private static boolean checkInRange(double start, double stop, double target) {\n return target >= start && target <= stop;\n }",
"public int search(int[] nums, int target) {\n int start = 0;\n int end = nums.length;\n while (start < end) {\n int mid = start + (end - start) / ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a DataBoundAdapter with the given item layout | public DataBoundAdapter(@LayoutRes int layoutId,Object... items) {
mLayoutId = layoutId;
Collections.addAll(mItemList, items);
} | [
"public DataBoundAdapter(@LayoutRes int layoutId) {\n mLayoutId = layoutId;\n }",
"public static DataBoundViewHolder create(@NonNull ViewGroup parent,\n @LayoutRes int layoutId) {\n ViewDataBinding binding = DataBindingUtil.inflate(LayoutInflater.from(p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns string "foobar" with illegal characters interspersed. | private String getFoobarWithNonChars() {
char illegalChar = '\uffff';
StringBuilder builder = new StringBuilder();
builder.append(illegalChar).append(illegalChar).append("foo").append(illegalChar)
.append(illegalChar).append("bar").append(illegalChar).append(illegalChar);
return builder.toString()... | [
"private String filterInvalidChars(String raw) {\n int lraw = raw.length();\n StringBuffer sb = new StringBuffer(lraw);\n char ch;\n for (int i = 0; i < lraw; i++) {\n switch ((ch = raw.charAt(i))) {\n case ' ' :\n sb.append('_');\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets if an attach requirement is selected | public boolean isAttachRequirement()
{
return attachRequirement.getSelection();
} | [
"boolean hasSelectFlg();",
"boolean hasHaveAttachment();",
"boolean isAttachmentActive(ProtocolAttachmentProtocolBase attachment);",
"boolean hasSelectedTransport()\n {\n for(JCheckBoxMenuItem item : transportMenuItems.values())\n {\n if(item.isSelected())\n return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column CULSITE.ES_SHOPPING_CART_ITEM.SHOPPING_CART_ITEM_ID | public String getShoppingCartItemId() {
return shoppingCartItemId;
} | [
"public long getItemShopBasketId();",
"public int getCartItemId() {\n\t\treturn cartItemId;\n\t}",
"public long getShopBasketId();",
"@Id @GeneratedValue(strategy = GenerationType.IDENTITY)\n\tpublic int getIdItem() {\n\t\treturn idItem;\n\t}",
"public int getID(OrderItem oi){\n int id;\n id=f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true, if the audio device is opened, false otherwise. | public boolean isOpened(); | [
"public boolean isOpened()\n {\n \n boolean retVal = isOpened_0(nativeObj);\n \n return retVal;\n }",
"public boolean isOpen()\r\n\t{\r\n\t return (fd != null);\r\n\t}",
"public boolean microphoneOn() {\n if (microphone.getAudioFormat() == null) {\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the given child status to the provided multi status. | public static void addStatus(MultiStatus status, IStatus childStatus) {
if (status != null && childStatus != null) {
status.add(childStatus);
}
} | [
"boolean mergeStatus(MultiStatus multiStatus, IStatus newStatus) {\n\t\t\tif (!newStatus.isOK()) {\n\t\t\t\tmultiStatus.add(newStatus);\n\t\t\t\treturn !UIBindingsUtils.isFatalError(multiStatus);\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"protected void addStatus(String status) {\n mOldStatus = mOldStatus + st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a student in a course | public void addStudentInCourse(Course course, Student student){
String statement = ADD_STUDENT_IN_COURSE;
data.makeUpdateStatement(statement,new Object[]{(Object)course.getId(),(Object)student.getId()});
data.closeConnections(data.ps, data.conn);
} | [
"public void addStudent(Student s){\n\t\tstudents.add(s);\n\t}",
"void addCourse(Course course);",
"public Integer addCourseStudent(Integer openId, Integer studentId);",
"private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the active internal register for Slave 4. | public void setSlave4Register(byte reg) {
I2Cdev.writeByte(MPU6050_Registers.MPU6050_RA_I2C_SLV4_REG, reg);
} | [
"void setBaseRegister(int base_reg);",
"private void setRegToMax(int register) {\r\n\t\tsim40.memory[register] = 1024;\r\n\t\tswitchOnFlag(2);\r\n\t}",
"void setRegister(int ref, Register reg) throws IllegalAddressException;",
"public void setSlaveRegister(byte num, byte reg) {\n if (num > 3) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of DasherViewSquare, and, if they are present, informs it of our current Input Filter and Screen. This ought to respond to the LP_VIEW_ID parameter, but since at present there is only one, it is ignored for now. | public void ChangeView() {
// TODO: Actually respond to LP_VIEW_ID parameter (although there is
// only one view at the moment)
if (m_DasherScreen != null && m_DasherModel != null) {
m_DasherView = null;
m_DasherView = new CDasherViewSquare(m_EventHandler,
m_SettingsStore, m_DasherScreen);
... | [
"public void drawSquareView() {\r\n \tview.updateSquare();\r\n \tview.drawSquare();\r\n }",
"private void setupSquareCameraView(){\r\n\t\tint size = this.getResources().getDisplayMetrics().widthPixels;\r\n\t\tcameraViewHolder.getLayoutParams().width = size;\r\n\t\tcameraViewHolder.getLayoutParams().heigh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load all ip filters. | public final void loadIPFilter() {
DBUtil.select(
"select ip, false as type from "
+ ConfigUtil.getAntiFraudDatabaseSchema()
+ ".ip_whitelist union "
+ " select ip, true as type from "
+ ConfigUtil.ge... | [
"private void initFilters()\r\n\t{\r\n\t\tlpf = new LowPassFilter();\r\n\t\tlpf.setTimeConstant(this.lpfTimeConstant);\r\n\r\n\t\tmeanFilter = new MeanFilter();\r\n\t\tmeanFilter.setTimeConstant(this.meanFilterTimeConstant);\r\n\t}",
"private void load() {\n for (Map.Entry<String, UserFilter> entry : mFilt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Does not automatically close the given source stream. Works only on the immediate host to which this agent logged into. If you would like to transfer data that are one or more network hops away (i.e. recursive ssh calls), then you will need to upload to the immediate host, then scp to the destination host, and then del... | boolean upload(
InputStream source, String remoteFileName); | [
"public interface StreamSource {\n\n /**\n * Gets new streams. This should be called only if one of the streams \n * is dead. \n * @throws TransportException\n */\n void connect() throws TransportException;\n \n /**\n * Closes streams and underlying connections. \n * @throws T... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1. Write a Java program to create a new array list, add some colors (string) and print out the collection | public static void main(String[] args) {
ArrayList<String> colors = new ArrayList<String>();
colors.add("White");
colors.add("Red");
colors.add("Black");
colors.add("Yellow");
colors.add("Green");
System.out.println("1. Create a new array list, add some colors (st... | [
"private void fillTheColorList()\n\t{\n\t\tcolorList.add(R.color.uglyRed);\n\t\tcolorList.add(R.color.white);\n\t\tcolorList.add(R.color.uglyGreen);\n\t\tcolorList.add(R.color.otherBlack);\n\t}",
"private static void addColorsToSet() {\n /* The search colors we support in our application : */\n colo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the envelopeDateTime value for this TradingNetworks. | public void setEnvelopeDateTime(java.lang.String envelopeDateTime) {
this.envelopeDateTime = envelopeDateTime;
} | [
"public void xsetDateTime(org.apache.xmlbeans.XmlDateTime dateTime)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDateTime target = null;\n target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(DATETIME$0, 0);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Default exit sequence for state ConstToVarCompareSucceeded | private void exitSequence_main_region_ConstToVarCompareSucceeded() {
nextStateIndex = 0;
stateVector[0] = State.$NullState$;
} | [
"private void exitSequence_main_region_VarToConstCompareSucceeded() {\n\t\tnextStateIndex = 0;\n\t\tstateVector[0] = State.$NullState$;\n\t}",
"private void exitSequence_main_region_VarToVarCompareSucceeded() {\n\t\tnextStateIndex = 0;\n\t\tstateVector[0] = State.$NullState$;\n\t}",
"private void react_main_reg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Twosample chisq test. Given the arrays bins1 and bins2, containing two sets of binned data, and given one constraint, a small value of pvalue indicates a significant difference between the distributions. | public static ChiSqTest test(int[] bins1, int[] bins2) {
return test(bins1, bins2, 1);
} | [
"public static ChiSqTest test(int[] bins1, int[] bins2, int constraints) {\r\n if (bins1.length != bins2.length) {\r\n throw new IllegalArgumentException(\"Input vectors have different size\");\r\n }\r\n\r\n int nbins = bins1.length;\r\n int df = nbins - constraints;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the internal mount point for the directory. | public InternalMountPoint getInternalMountPoint() {
return this.mInternalMount;
} | [
"public String getMountBaseDir();",
"java.lang.String getMountPath();",
"public long getMountId() {\n return mountId_;\n }",
"public long getMountId() {\n return mountId_;\n }",
"public static String getMountPointOfFile(final File file) throws IOException {\n final Set<String> mountPoints... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get expanded state of a card. | public synchronized boolean isCardExpanded( final Object key )
{
final Card card = cards.get( key );
return card != null && card.isExpanded();
} | [
"private String getExpandedState() {\n return expandedState;\n }",
"public int getExpandState(){\n return mCurrState;\n }",
"public boolean isExpanded() {\r\n return expanded;\r\n }",
"public final boolean isExpanded() {\n return expanded;\n }",
"public boolean isExpanded() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Interface__Group__1" $ANTLR start "rule__Interface__Group__1__Impl" ../org.waml.w3c.webidl.ui/srcgen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5229:1: rule__Interface__Group__1__Impl : ( 'interface' ) ; | public final void rule__Interface__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5233:1: ( ( 'interface' ) )
// ... | [
"public final void rule__InterfaceDef__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:20430:1: ( ( 'interface' ) )\n // InternalDsl.g:20431:1: ( 'interface' )\n {\n // InternalDs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end synpred52_InternalInstances $ANTLR start synpred53_InternalInstances | public final void synpred53_InternalInstances_fragment() throws RecognitionException {
// ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:4043:2: ( rule__XEqualityExpression__Group_1__0 )
// ../org.xtext.lwc.instances.ui/src-gen/org/xt... | [
"public final boolean synpred53_InternalInstances() {\n state.backtracking++;\n int start = input.mark();\n try {\n synpred53_InternalInstances_fragment(); // can never throw exception\n } catch (RecognitionException re) {\n System.err.println(\"impossible: \"+re);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns shortest trace to state (vector of Strings) | @Override
public Vector<String> getTraceToState(byte[] from, byte[] to) {
if (StateCodec.equals(from, to))
return new Vector<>();
int ret = analizeState(true, true, from, to);
if (ret == LTSConstants.FOUND) {
Vector<String> v = new Vector<>();
v.addAll(trace);
return v;
}
if (ret == LTS... | [
"public String getStrStartState() {\r\n\t\tString state = \"\";\r\n\r\n\t\tfor (int a = 0; a < start.length; a++) {\r\n\t\t\tfor (int b = 0; b < start[0].length; b++) {\r\n\t\t\t\tstate += start[a][b] + \" \";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn state.substring(0, state.length() - 1);\r\n\t}",
"public PuzzleSta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Divide the current value by the value of the parameter. | Value divide(Value value) throws TechnicalException; | [
"public void divide(MyDouble val) {\n this.setValue(this.getValue() / val.getValue());\n }",
"public int divide(int v){\n\t\treturn set(get()/v);\n\t}",
"void div(double val) {\r\n\t\tresult = result / val;\r\n\t}",
"public void divide (E scalar);",
"public ShaderVar divide(ShaderVar value)\n\t\t{... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calcula el total de la comanda | public void calcularTotal(){
//Recorre la JTable tomando el total de cada detalle y lo agrega a un acumulador
float acum = 0;
for(int cont = 0; cont < jtDetalles.getRowCount(); cont++){
acum += (Float)jtDetalles.getValueAt(cont, 3);
}
//Guarda el total en la ... | [
"private void calcularTotal() {\n ZebraJTable vuelos = (ZebraJTable) this.ventana.getScrollVuelos().getViewport().getView();\n ZebraJTable viajes = (ZebraJTable) this.ventana.getScrollViajOrg().getViewport().getView();\n ZebraJTable hoteles = (ZebraJTable) this.ventana.getScrollHoteles().getVie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the host name of HBase zookeeper quorum. Default is "hadarscdhmaster.host.com". | String zookeeperQuorum(); | [
"public String getHost() {\n return m_database.getConfiguration().getHost();\n }",
"public static String getMasterHostName() throws MalformedURLException {\n\t\tString rootUrl = Hudson.getInstance().getRootUrl();\n\t\tif (rootUrl == null)\n\t\t\treturn \"localhost\";\n\t\tURL url = new URL(rootUrl);\n\t\tretu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse multiple Source objects from a catalogue file. | static void parseSources(List<Source> sources, File catalogue) throws IOException
{
// Sanity checks on catalogue file...
if(!catalogue.exists()) throw new RuntimeException("Catalogue file "+
catalogue.getPath()+" not found!");
if(!catalogue.canRead()) throw new Runt... | [
"public List<Source> processSource(SourceConfig config);",
"public static Vector<InformationSource> parseInformationSourceList( File inFile ) throws FileNotFoundException\r\n {\r\n /* SET UP INPUT AND PARSING STUFF */\r\n Parser parser = new Parser( inFile );\r\n int linesSkipped;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the o g c service layers where uuid = &63; and companyId = &63;. | public java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> findByUuid_C(
java.lang.String uuid, long companyId)
throws com.liferay.portal.kernel.exception.SystemException; | [
"@Override\n public de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer getOGCServiceLayerByUuidAndCompanyId(\n java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes the Scatter Plot Chart button | public void MakeScatter() {
ScatterButton = new JButton(
new ImageIcon(getClass().getResource(
GetScatterPlotChartImage())));
ScatterButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
GetHost().instructionText.setVisible(false);
GetHost().ExportEnabled(... | [
"@Override\n public void onScatterPlot()\n {\n }",
"private void addGraphButton()\n {\n _graphButton = _toolkit.createButton(_buttonsComposite, BUTTON_GRAPH, SWT.PUSH | SWT.CENTER);\n _graphButton.setFont(ApplicationRegistry.getFont(FONT_BUTTON));\n GridData gridData = new GridDat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use this API to add dnssrvrec. | public static base_response add(nitro_service client, dnssrvrec resource) throws Exception {
dnssrvrec addresource = new dnssrvrec();
addresource.domain = resource.domain;
addresource.target = resource.target;
addresource.priority = resource.priority;
addresource.weight = resource.weight;
addresource.port =... | [
"public static base_responses add(nitro_service client, dnssrvrec resources[]) throws Exception {\n\t\tbase_responses result = null;\n\t\tif (resources != null && resources.length > 0) {\n\t\t\tdnssrvrec addresources[] = new dnssrvrec[resources.length];\n\t\t\tfor (int i=0;i<resources.length;i++){\n\t\t\t\taddresou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to load the transactions in cards | public void loadTransactions() {
try {
new GetRecents().execute().get();//first we get the transactions from the database
for (final TransactionModel model : Alltransactions) {
final View cardView = getLayoutInflater().inflate(R.layout.transaction_card, null, false);
... | [
"public static void load() {\r\n\t\ttransList = new ArrayList<Transaction>();\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"loading all trans...\");\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"src/transaction.csv\"));\r\n\t\t\treader.readLine();\r\n\t\t\tString line = null;\r\n\t\t\twhile ((li... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the shortest path between the two fields set as starting and ending field. | abstract public LinkedList<Field> getShortestPath(); | [
"private static ArrayList<String> findPath(Graph g, ArrayList<Edge> bfsPaths, String p1, String p2)\n\t{\n\t\tArrayList<String> shortest = new ArrayList<>();\n\n\t\tint start = g.map.get(p1);\n\t\tint ptr = bfsPaths.size() - 1;\n\t\tint search = g.map.get(p2);\n\t\t\n\n\t\twhile (ptr >= 0) {\n\t\t\tif (bfsPaths.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
metodo chiamato quando si riceve un messaggio udp | protected void onMessageUdpReceived(byte data[], int id)
{
} | [
"protected void listen(){\n\t\t\n\t\t// Cas ou la socket aurait deja ete utilisee et que l'on relance le programme\n\t\tif (!socket.equals(null) && socket.isClosed()){\n\t\t\ttry {\n\t\t\t\tsocket = new DatagramSocket(this.getPortEcoute());\n\t\t\t\tthis.setStateListen(true);\n\t\t\t} catch (SocketException e) {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Normal invoke with authentication. Credentials are required and may be overriden at the request level. | private <X, Y extends AmazonWebServiceRequest> Response<X> invoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
ExecutionContext executionContext) {
executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), a... | [
"public void invoke(Request request, Response response, ValveContext context) \n throws IOException, ServletException {\n if (_authValve != null) {\n _authValve.invoke(request, response, context);\n } else {\n context.invokeNext(request, response);\n }\n }",
"private HttpResponse executeWit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds argument object's weight to the object which called the method. Uses .toOunces() method to make the math easier then normalizes the result. | public void addTo(Weight wt) {
Weight param = wt;
param.toOunces();
this.toOunces();
this.ounces += param.ounces;
this.normalize();
} | [
"public Weighted(Double weight, T object) {\n\t\tthis.weight = weight;\n\t\tthis.object = object;\n\t}",
"public void add(Object object, double weight) {\n if (completed)\n throw new IllegalStateException(\"distribution is closed - cannot add\");\n if (object == null) {\n LOGGE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set names of menus that are available to current user. | public void setAvailableMenus(ArrayList<AppMenu> menus) {
availableMenus = menus;
} | [
"public abstract void setMenuName(String name);",
"void setMenuTitle(String name);",
"private void chooseUsersMenuByStatus() {\n if (currentUser.getAccessLevel().toString().equals(\"USER\"))\n new UserMenu(new Viewer(userController, currentUser)).simpleUserMenu();\n else if (currentUser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to insert a new key generated used the brainkey derivation scheme. | public void insertKey(BrainKey brainKey) {
ContentValues contentValues = new ContentValues();
contentValues.put(SCWallDatabaseContract.BaseTable.COLUMN_CREATION_DATE, (System.currentTimeMillis() / 1000));
contentValues.put(SCWallDatabaseContract.AccountKeys.COLUMN_BRAINKEY, brainKey.getBrainKey(... | [
"public String generateNewKey();",
"public void addKey() {\n this.save();\n }",
"public org.w3.x2001.xmlSchema.Keybase addNewKey()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.w3.x2001.xmlSchema.Keybase target = null;\n target = (org.w3... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
+ Creates a Costumer Screen for the provided costumer | public CostumerScreen(Costumer costumer){
this.costumer = costumer;
} | [
"private void getCostumer() {\n String customer = TestConfig.getInstace().getCustomer();\n if (customer != null) {\n GeneralUtils.printToConsole(\"Adding customer \" + customer + \" to scenario properties\");\n report.setContainerProperties(0, \"Customer\", customer);\n } ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generate read C++ code for a specified C++ variable and C++ type | private String genReadCode(String name, String type) {
if (type.equals("char")) {
return INSTREAM_VAR_NAME + ".readChar( " + name + " );";
} else if (type.equals("short")) {
return INSTREAM_VAR_NAME + ".readShort( " + name + " );";
} else if (type.equals("int")) {
... | [
"public Var\ngenerateVar( Type pType );",
"private void bindCType(String rwtype_name, IEditorPart IEditorPart, IFile ifile){\n \t\tISelection iselection = IEditorPart.getEditorSite().getSelectionProvider().getSelection();\n\t\tif(iselection != null){\n\t\t\tif(iselection instanceof ITextSelection){\n\t\t\t\tIText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///////////////////////////////////////////////////////////// byte[] > OutputStream Copy bytes from a byte[] to an OutputStream. | public static void copy( final byte[] input, final OutputStream output )
throws IOException
{
copy( input, output, DEFAULT_BUFFER_SIZE );
} | [
"public static void copy(byte[] in, OutputStream out) throws IOException {\n if (in == null) throw new IllegalArgumentException(\"No input byte array specified\");\n if (out == null) throw new IllegalArgumentException(\"No OutputStream specified\");\n out.write(in);\n }",
"public static vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the functionality of the getFullPhotos() method. Ensure that expected photo objects are returned with nonnull bitmap (where applicable). | public void testGetFullPhotos()
{
dbm = ResultsDbManager.getInstance(this.getContext());
if (dbm == null) {
fail("failed to get an instance of ResultsDbManager");
}
Bitmap bitmap = BogoPicGen.generateBitmap(100, 100);
assertTrue("Generated bitmap should be non-null -- BogoPicGen failure.", bitmap != nu... | [
"public void testGetRecipesPhotos()\n\t{\n\t\tRecipe recipe = Recipe.generateRandomTestRecipe();\n\t\tdbm = ResultsDbManager.getInstance(this.getContext());\n\t\tif (dbm == null) {\n\t\t\tfail(\"failed to get an instance of ResultsDbManager\");\n\t\t}\n\t\tdbm.insertRecipe(recipe);\n\t\tBitmap bitmap = BogoPicGen.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |