query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Sets the value of the 'uncertainty' field. | public void setUncertainty(influent.idl.FL_Uncertainty value) {
this.uncertainty = value;
} | [
"public influent.idl.FL_Cluster.Builder setUncertainty(influent.idl.FL_Uncertainty value) {\n validate(fields()[3], value);\n this.uncertainty = value;\n fieldSetFlags()[3] = true;\n return this; \n }",
"public void setUncertainty(Double uncertainty);",
"public void setCertainty(Condition... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the setWeekHours with over 7 days in the paramater array | public boolean testSetWeekHours(){
timesheet = new Timesheet();
int[] week_hours = {1,2,3,4,5,6,7,8};
try {
timesheet.setWeekHours(week_hours);
} catch (InvalidParameterException ex) {
return true;
}
return false;
} | [
"boolean hasWeek7();",
"boolean getWeek7();",
"protected void checkWeekDay(){\n\t\t//Check if weekends should be skipped\n\t\tif(!skipDays.isEmpty()){\n\t\t\twhile(skipDays.contains(caseStartTime.get(Calendar.DAY_OF_WEEK))){\n\t\t\t\tincreaseOverallCaseTimeByOneDay();\n\t\t\t}\n\t\t}\n\t}",
"boolean hasWeek6(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Withdraw a fund from an account by traderId validate user input account == accountDao.findByTraderId accountDao.updateAmountById | public Account withdraw(Integer traderId, Double fund) {
if (!isValid(traderId, fund)) {
throw new IllegalArgumentException(
"Wrong input: traderId is null or not found, or fund is less than equal to 0");
}
Account account = accountDao.findByTraderId(traderId).get();
Double amount = acc... | [
"public Account deposit(Integer traderId, Double fund) {\n if (!isValid(traderId, fund)) {\n throw new IllegalArgumentException(\n \"Wrong input: traderId is null or not found, or fund is less than equal to 0\");\n }\n\n Account account = accountDao.findByTraderId(traderId).get();\n Double... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Conversion rate modifier estimated based on expected conversion rate changes. When this field is unset or set to 1.0 no adjustment will be applied to traffic. The allowed range is 0.1 to 10.0. double conversion_rate_modifier = 10; | @java.lang.Override
public double getConversionRateModifier() {
return conversionRateModifier_;
} | [
"@java.lang.Override\n public double getConversionRateModifier() {\n return conversionRateModifier_;\n }",
"public Builder setConversionRateModifier(double value) {\n\n conversionRateModifier_ = value;\n bitField0_ |= 0x00000200;\n onChanged();\n return this;\n }",
"public doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assigns the source to this account syncable, potentially initializing the initial fields. This method should only be called during create or merge. | public void assignToSource(entity.KeyableBean source) {
((gw.api.domain.account.AccountSyncable)__getDelegateManager().getImplementation("gw.api.domain.account.AccountSyncable")).assignToSource(source);
} | [
"public void assignToSource(entity.KeyableBean source) {\n ((gw.api.domain.account.AccountSyncable)__getDelegateManager().getImplementation(\"gw.api.domain.account.AccountSyncable\")).assignToSource(source);\n }",
"public void setSourceAccount(entity.Account value);",
"public void setSource(AppSyncSource so... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
NOTE: supports also loading HeapDumps to simplify implementation of Load button in Control Panel | private void loadSnapshot(final boolean handleHeapdumps) {
JFileChooser chooser = new JFileChooser();
if (importDir != null) {
chooser.setCurrentDirectory(importDir);
}
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooser.setMultiSelectionEnabled(true);
... | [
"@Override\n public void showLoad() {\n }",
"public void customDump() {\n //Same with StandardHeapDumper StripHprofHeapDumper\n new ForkJvmHeapDumper().dump(\"absolute-path\");\n }",
"public void initDumpDisplay(String content) {\n // clear tree\n dumpStore = new DumpStore()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Static methods ////////////////////////////////////////////////////////////// Checks whether a code indicates a request. | public static boolean isRequest(int code) {
return (code >= 1) && (code <= 31);
} | [
"private boolean CheckResponseCode(int code) throws IOException\r\n {\r\n String response = ReadFromServer();\r\n \r\n return response.startsWith(code + \" \");\r\n }",
"@Override\n\tprotected boolean isAuthorizationCodeCallbackRequest(HttpServletRequest req) {\n\t\tif (req==null)\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the project for release. | public List<ProjectModel> getProjectForRelease()
{
return projectForRelease;
} | [
"public static final String getProject() { return project; }",
"public static Project getProject() {\n int projNum = getUserInt(\"\\nPlease enter the project number: \");\n try {\n return projRepo.get(projNum);\n\n } catch (Exception e) {\n System.out.println(e.getMessag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays a sreen with available quests to pick. | public void showQuestsToPickScreen(){
try{
FXMLLoader loader = new FXMLLoader();
loader.setLocation(Game.class.getResource("view/QuestsToPickScreen.fxml"));
mainScreenController.getSecondaryScreen().getChildren().clear();
mainScreenController.getSecondaryScreen().... | [
"private static void displayQuestList(String[] questList){\r\n for(int i = 0; i < questList.length; i++){\r\n switch(questList[i]){\r\n case \"Kill Skeletons\":\r\n System.out.println((i + 1) + \") \" + questList[i]);\r\n break;\r\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the online status. | public String getOnlineStatus() {
return onlineStatus;
} | [
"public String getOnlineStatus() {\n return onlineStatus;\n }",
"public Integer getOnlineStatus() {\n return onlineStatus;\n }",
"public Integer getOnline() {\n return online;\n }",
"public boolean isOnline() {\n return this.online;\n }",
"public Integer getIsOnline()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Push docker image to the registry. | public String push(final PushParams params, final ProgressMonitor progressMonitor) throws IOException {
final String fullRepo = params.getFullRepo();
try (DockerConnection connection = connectionFactory.openConnection(dockerDaemonUri)
.method(... | [
"public void pushImage(String buildContextPath, String toolId)\n\t{\n\t\tExecutor exec = new DefaultExecutor();\n\t\texec.setWorkingDirectory(new File(buildContextPath));\n\t\tCommandLine cl = CommandLine.parse(\"/usr/bin/docker push bd2kbdds/\" + toolId);\n\t\tint execValue;\n\t\ttry {\n\t\t\texecValue = exec.exec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the count of agreed votes for this peer. | public abstract long getAgreedVotes(); | [
"public int getVoteCount() {\n return votes.size();\n }",
"public int getVoteCount() {\n return voteCount;\n }",
"public int getVoteCount(){\n\t\treturn voteCount;\n\t}",
"public int getVoteCount() {\n\t\treturn voteCount;\n\t}",
"public Integer getVoteCount() {\n return voteCount... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleParameterQualifier" $ANTLR start "rule__IdtFile__Alternatives_3" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1660:1: rule__IdtFile__Alternatives_3 : ( ( ( rule__IdtFile__ConstantAssignment_3_0 ) ) | ( ( rule__IdtFi... | public final void rule__IdtFile__Alternatives_3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1664:1: ( ( ( ... | [
"public final void ruleParameterQualifier() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:1646... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ends the challenge for the given hostname | boolean challengeStop (String pHostname); | [
"boolean challengeStart (String pHostname, String pValue);",
"void abortChallenge();",
"void acceptChallenge(int challengeId);",
"void declineChallenge(int challengeId);",
"public final void disposeChallenge() {\n this.challenge = null;\n }",
"void endServerPurePath();",
"private boolean delet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
displays a box without text with a shaded colour because of the mouse hovering over it | private void displayEmptyHover() {
if (strokeWeight == 0)
noStroke();
else
stroke(0, 0, 0);
strokeWeight(strokeWeight);
hoverFill(boxColour);
rect(x, y, w, h, 7);
} | [
"public void makeBox(String string, int X, int Y, int X2, int Y2, int xOffset, int highlight, Graphics g) {\n Point mouse = new Point(Bot.getClient().getMouse().x, Bot.getClient().getMouse().y);\n Rectangle hover = new Rectangle(X, Y - (16 * xOffset), X2, Y2);\n if (highlight == 1) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the WildUnit constructor. | @Test
public void constructorTest() {
WildUnit expectedChicken = new WildUnit("Chicken", 3, -1, -1, 1);
assertEquals(expectedChicken, chicken);
WildUnit expectedSeagull = new WildUnit("Seagull", 3, 1, -1, -1);
assertEquals(expectedSeagull, seagull);
} | [
"public WMETest()\n {\n }",
"public TesteUnit()\n {\n }",
"public StrandUnitTest()\n {\n }",
"@Test\n public void ConstructorTest() {\n assertNotNull(hunterPrey);\n }",
"@Test\r\n\tpublic void ConstructorTest() {\r\n\t\t//would wrap in try/catch, but this should be a compiler error.\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of hashCode method, of class Order. | @Test
public void testHashCode() {
System.out.println("hashCode");
Order instance = new Order();
int expResult = 0;
int result = instance.hashCode();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
... | [
"public void testHashCode() {\n System.out.println(\"hashCode\");\n Mensaje instance = generarMensajeConClaveMensajeYTresParametros();\n int expResult = generarMensajeConClaveMensajeYTresParametros().hashCode();\n int result = instance.hashCode();\n assertEquals(expResult, result)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This updates total number of lines that have been cleared. | private void updateLines(final int theNumLinesCleared) {
myLines += theNumLinesCleared;
myLinesLabel.setText(Integer.toString(myLines));
} | [
"public void resetClearedLines() {\n this.myClearedLines = 0;\n this.myLineCleared.setText(Integer.toString(this.myClearedLines));\n }",
"public static Integer getLinesCleared() {\n\n return linesCleared;\n }",
"public void resetCount() {\n\t\tresetCount(lineNode);\n\t}",
"private v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
log file identifier for logD int32 logId = 1; | int getLogId(); | [
"void setLogID(long logID);",
"public int getIdLog() {\r\n\t\treturn idLog;\r\n\t}",
"public int getLogId() {\n return logId.get();\n }",
"public void setLogId(Integer logId) {\n this.logId = logId;\n }",
"public Integer getLogId() {\n return logId;\n }",
"public void setIdLo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an observable sequence which is the result of invoking the selector on a connectable observable sequence that shares a single registration with the underlying source observable. This is a specialization of the multicast operator with a regular subject on U. | @Nonnull
public static <T, U> Observable<U> publish(
@Nonnull final Observable<? extends T> source,
@Nonnull final Func1<? super Observable<? extends T>, ? extends Observable<? extends U>> selector
) {
return multicast(source, new Func0<Subject<T, T>>() {
@Override
public Subject<T, T> invoke(... | [
"@Nonnull\r\n\tpublic static <T, U, V> Observable<V> multicast(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func0<? extends Subject<? super T, ? extends U>> subjectSelector,\r\n\t\t\t@Nonnull final Func1<? super Observable<? extends U>, ? extends Observable<? extends V>> selector... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Caches the employee proofs in the entity cache if it is enabled. | public static void cacheResult(
java.util.List<com.hrms.model.EmployeeProof> employeeProofs) {
getPersistence().cacheResult(employeeProofs);
} | [
"public static void cacheResult(com.hrms.model.EmployeeProof employeeProof) {\n\t\tgetPersistence().cacheResult(employeeProof);\n\t}",
"@Override\n public void cacheResult(Employee employee) {\n EntityCacheUtil.putResult(EmployeeModelImpl.ENTITY_CACHE_ENABLED,\n EmployeeImpl.class, employee.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'consolidatedAccountInformation' | @Test
public void consolidatedAccountInformationTest() {
// TODO: test consolidatedAccountInformation
} | [
"@Test\n\tpublic void testGetAccountFromCustomer() {\n\t\tAccount acc = CustomerUtility.getAccountFromCustomer(customer);\n\t\tassertTrue(acc.getAccountID().equals(customer.getAccountID()));\n\t}",
"@Test\n\tpublic void testGetAllAdminAccountsWithBusinessInformation() {\n\t\tBusinessInformation businessInformatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. .google.storage.v1.Bucket.Logging logging = 18; | com.google.storage.v1.Bucket.Logging getLogging(); | [
"com.google.storage.v1.Bucket.LoggingOrBuilder getLoggingOrBuilder();",
"@Test(enabled = false)\n public void loggingConfiguration() throws Exception {\n testInfo(this.getClass().getSimpleName() + \" - loggingConfiguration\");\n\n try {\n print(account + \": Fetching bucket logging configuration for \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a music.Track it returns all Albums where this track appears on | public List<Album> getAlbumsOfTrack(Track track) {
List<Album> result = new ArrayList<>();
for (Album album : albums) {
for (Track tr : album.tracks) {
if (tr.trackName.equals(track.trackName)) {
result.add(album);
}
}
}... | [
"public List<Album> getAlbumsOfArtist(Artist art) {\n List<Album> result = new ArrayList<>();\n for (Album album : albums) {\n if (album.artist.artistName.equals(art.artistName)) {\n result.add(album);\n }\n }\n return result;\n }",
"public List<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the user info. | public UserInfo getUserInfo() {
return userInfo;
} | [
"private void getUserInfo() {\n httpClient.get(API.LOGIN_GET_USER_INFO, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n callback.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Add a task to SYSTEM.TASK table which does a simple select query on SYSTEM.CHILD_LINK table. This should trigger the read repair step and verify any unverified rows. | private void addChildLinkScanTask() {
try {
PhoenixConnection conn = QueryUtil.getConnection(config).unwrap(PhoenixConnection.class);
Task.addTask(new SystemTaskParams.SystemTaskParamsBuilder()
.setConn(conn)
.setTaskType(PTable.TaskType.CHILD_LIN... | [
"@Test\n public void testLPADisabledParentTasks() throws Exception {\n\n // SETUP: Data Setup for running the Function\n SchedStaskTable lSchedStask = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 100 ) );\n lSchedStask.setPreventLinePlanningAutomation( true );\n lSchedStask.update();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the meta object for data type 'Integer'. | EDataType getInteger(); | [
"public java.lang.Integer getMetaId();",
"IntegerData createIntegerData();",
"public int getMetaDataInt() {\n\t\treturn this.metadataint;\n\t}",
"public Integer getIntegerAttribute();",
"IntegerValueType getIntegerValue();",
"IntegerValue createIntegerValue();",
"IntegerType createIntegerType();",
"co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the process of the current tcc execution. | Process getProcess(); | [
"public AtomicProcess getProcess();",
"public String getProcess() {\n\t\treturn process;\n\t}",
"public abstract Process getProcess();",
"public Class getProcess() {\n return process;\n }",
"public Process getProcess() {\n\t\tOperator parent = getParent();\n\t\tif (parent == null) {\n\t\t\treturn ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is created to get product details with all attributes. When this method is called, three new products are added in the InventoryList with details like Product id, Product name, UOM, Available quantity and Date. | @Override
public void getProduct() {
InventoryList.add(new Product("Prod1", "Shirt", "Each", 10.0, LocalDate.of(2021,03,19)));
InventoryList.add(new Product("Prod1", "Trousers", "Each", 20.0, LocalDate.of(2021,03,21)));
InventoryList.add(new Product("Prod1", "Trousers", "Ea... | [
"ProductInventory(Product pProduct)\n\t{\n\n\t\t// Initialize the Product Inventory Array List\n\t\tmyProductInventory = new ArrayList<Product>();\n\n\t\t// Add a user-defined Product to the inventory array\n\t\t// This Product object is placed in the first position\n\t\t// of the Product Inventory Array List\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds a step for creating the local working directory. | private Step createLocalWorkingDir() {
return stepBuilderFactory.get(STEP_CREATE_LOCAL_WORK_DIR)
.tasklet(createLocalWorkingDir)
.listener(new ExecutionContextPromotionListener() {
@Override
... | [
"private Step createHdfsWorkingDir() {\n return stepBuilderFactory.get(STEP_CREATE_HDFS_WORK_DIR)\n .tasklet(createHdfsWorkingDir)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if field handle class not equals default handle class then return field handle class else return common handle class (not need compare with default handle class) | private static Class<? extends CellStyleHandler> chooseHandleClass(CellStyle fieldCS, CellStyle commonCS) {
Class<? extends CellStyleHandler> fieldClass = chooseHandleClassFromSingleAnnotation(fieldCS);
return !fieldClass.equals(CellStyle.Value.Impl.defaultCellStyle().cellStyleHandlerClass()) ? fieldCla... | [
"protected Class getDefaultLockingFieldType() {\r\n return ClassConstants.LONG;\r\n\r\n }",
"public T caseFieldType(FieldType object)\n {\n return null;\n }",
"public T caseField(Field object)\n {\n return null;\n }",
"public Type getFieldClass() {\n return constant.getMyClass();\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the method is used to locate the computer playerhero in the map | public void locateTheComPlayer(){
for(int row=0; row<numRows;row++){
for(int col=0; col<numCols;col++){
if(map[row][col].getTileType()==TileType.HERO){
theComPlayer=map[row][col].getCharacters();
playerRow=row;
playerColumn=... | [
"protected void searchPlayer()\n\t{\n\n\t\tint boundryY = Environment.HEIGHT;\n\t\tint boundryX = Environment.WIDTH;\n\t\t\n\t\tint mY = monster.getyLocation();\n\t\tint mX = monster.getxLocation();\n\n\t\t// Checks for out of bounds exceptions and for player location\n\t\t// that are north of the monster\n\t\tif (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Examines and updates each account mapping for given loan product with changes passed in from the Json element | public void handleChangesToSavingsProductToGLAccountMappings(final Long savingsProductId, final Map<String, Object> changes,
final JsonElement element, final AccountingRuleType accountingRuleType) {
switch (accountingRuleType) {
case NONE:
break;
case CASH_BASED:
... | [
"private void updateAccountToHashMap(Account updatedAccount) {\n activity.getAccountHashMap().put(updatedAccount.getAccountId(), updatedAccount);\n }",
"void updateAccount(Account account);",
"public void updateAccount(Account accForUpdate);",
"public void updateAccounts(HashMap<String, Accounts> ac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the size in bytes of the specified primitive or structure data type | protected int getDataTypeSizeInBytes(String dataType)
{
int sizeInBytes = 0;
// Check if the data type is a primitive
if (dataTypeHandler.isPrimitive(dataType))
{
sizeInBytes = dataTypeHandler.getSizeInBytes(dataType);
}
// The data type isn't a primitive... | [
"public int typeSize() {\n if (isUnknown() || isPolymorphic())\n return 0;\n int c = 0;\n if (!isNotBool())\n c++;\n if (!isNotStr())\n c++;\n if (!isNotNum())\n c++;\n if (object_labels != null) {\n boolean is_function... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
POST /confirmaccountcode: API used for OTP authentication when registration. | @PostMapping("confirm-code-otp-register")
public ResponseEntity<ResponseData> confirmAccountOtp(@Valid @RequestBody ConfirmCodeForm confirmCodeForm) {
subscriberService.confirmCode(confirmCodeForm, false);
ResponseData responseData = ResponseData.ofSuccess(translate(Constants.SUCCESS));
retu... | [
"public void RequestConfirmationCode() {\n\n MultiValueMap<String, String> map = new LinkedMultiValueMap<>();\n map.add(\"email\", txtEmail.getText().toString());\n map.add(\"name\", txtName.getText().toString());\n map.add(\"phone\", txtPhone.getText().toString());\n map.add(\"password\",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of AdditionalIncludeDirectories children. | @Nonnull
List<GenericDomValue<String>> getAdditionalIncludeDirectorieses(); | [
"String[] getIncludedDirectories();",
"public List<File> getIncludeDirs()\n {\n return _includeDirs;\n }",
"public String[] getIncludedDirectories()\n {\n int count = dirsIncluded.size();\n String[] directories = new String[ count ];\n for( int i = 0; i < count; i++ )\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increase the count of the node with given Id or insert if it doesnt exist | private void increase(String[] arguments) {
try {
lastInsertedNode = null;
int ID = Integer.parseInt(arguments[1]);
int m = Integer.parseInt(arguments[2]);
Node curr = searchID(root, ID);
if(curr != null)
{
curr.count += m;
System.out.printf("%d\n", curr.... | [
"public void addNumNodes(){\n\n if (!dbManager.isKeyExist(NUM_OF_NODES)){\n dbManager.putJsonObject(NUM_OF_NODES,JsonConvertor.convertToJson(1));\n }\n else{\n int num = JsonConvertor.JsonToInt(dbManager.getJsonObject(NUM_OF_NODES));\n num++;\n dbMana... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o); | public static native long CResult_PaymentHashPaymentSendFailureZ_ok(byte[] o); | [
"public static native long CResult_PaymentHashPaymentSendFailureZ_err(long e);",
"public static native long CResult_NonePaymentSendFailureZ_err(long e);",
"public static native long CResult_PaymentHashPaymentSendFailureZ_clone(long orig);",
"public static native void CResult_PaymentHashPaymentSendFailureZ_fre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PredicateMultiplication__RightAssignment_1_2" $ANTLR start "rule__PredicateDivision__RightAssignment_1_2" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10006:1: rule__PredicateDivision__RightAssignment_1_2 : ( rulePredicatePrimary ) ; | public final void rule__PredicateDivision__RightAssignment_1_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10010:1: ( ( rulePredicatePrimary ) )
... | [
"public final void rule__PredicateMultiplication__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9995:1: ( ( rulePredicateDi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PLFM4270 is request to add support views with both files and tables. | @Test
public void testViewWithFilesAndTables() throws Exception{
// use the default columns for this type.
defaultSchema = tableManagerSupport.getDefaultTableViewColumns(ViewEntityType.entityview, ViewTypeMask.getMaskForDepricatedType(ViewType.file_and_table));
// Add a table to the project
TableEntity ta... | [
"@Test\r\n\tpublic void testPLFM_4366() throws Exception{\r\n\t\tcreateFileView();\r\n\t\t// wait for the view to be available for query\r\n\t\twaitForEntityReplication(fileViewId);\r\n\t\t// query the view as a user that does not permission\r\n\t\tString sql = \"select * from \"+fileViewId;\r\n\t\twaitForConsisten... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method converts their response to radians | public double convertNumber(double response) {
response = (response * Math.PI) / 180;
return response;
} | [
"public double radians() {\n return Math.toRadians(this.degrees);\n }",
"static double degLat2rad(String deg,boolean ForLatitude){\n//convertion deg \"ddmm.mmmm\"--->rad Latitude\nint i=3;\nif (ForLatitude) i=2;\nString dd= deg.substring(0,i);\nString mm=deg.substring(i,deg.length());\ndouble mmm=Doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AbstractClass__Group__3" $ANTLR start "rule__AbstractClass__Group__3__Impl" InternalMyDsl.g:5644:1: rule__AbstractClass__Group__3__Impl : ( ( rule__AbstractClass__AttributeAssignment_3 ) ) ; | public final void rule__AbstractClass__Group__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:5648:1: ( ( ( rule__AbstractClass__AttributeAssignment_3 )* ) )
// InternalMyDsl.g:5649:1: ( ( rule__AbstractClass__Attribu... | [
"public final void rule__Attribute__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:6473:1: ( rule__Attribute__Group__3__Impl )\n // InternalMyDsl.g:6474:2: rule__Attribute__Group__3__Impl\n {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /pmemployeesgoals/:id : get the "id" pmEmployeesGoals. | @GetMapping("/pm-employees-goals/{id}")
@Timed
public ResponseEntity<PmEmployeesGoalsDTO> getPmEmployeesGoals(@PathVariable Long id) {
log.debug("REST request to get PmEmployeesGoals : {}", id);
PmEmployeesGoals pmEmployeesGoals = pmEmployeesGoalsRepository.findOne(id);
PmEmployeesGoalsD... | [
"@DeleteMapping(\"/pm-employees-goals/{id}\")\n @Timed\n public ResponseEntity<Void> deletePmEmployeesGoals(@PathVariable Long id) {\n log.debug(\"REST request to delete PmEmployeesGoals : {}\", id);\n PmEmployeesGoals employeesGoal = pmEmployeesGoalsRepository.findOne(id);\n pmEmployeesG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the inner classes. | public List<InnerClass> getInnerClasses() {
return innerClasses;
} | [
"PsiClass @NotNull [] getAllInnerClasses();",
"@Override\n PsiClass @NotNull [] getInnerClasses();",
"private static void setupInnerClasses() {\n Class[] innerClasses = cls.getNestMembers();\n Class innerClass = null;\n\n for (int i = 0; i < innerClasses.length; i++) {\n innerClass = innerClasses[i];\n System.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
list of buildings attribute getter | public List<BuildingDto> getBuildings() {
return buildings;
} | [
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.Building[] getBuildings() {\n return (entity.Building[])__getInternalInterface().getFieldValue(BUILDINGS_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.Building[] getBuildings() {\n return (entity.Building[])__g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inserta nodo en los subarboles. | public void insertSubArbol(Nodo nodo) {
if(cont<5){
if(this.getRaiz() == null) {
this.setRaiz(nodo);
nodo.setClave(0);
return;
}
Nodo t = this.getRaiz();
boolean val = true;
while((t != null)&&(val)) {
if(t.getLeft() == null) {
t.setLeft(nodo);
cont++;
v... | [
"@Override\n public void insertar(Nodo<T> unNodo) {\n Nodo<T> actual;\n Nodo<T> siguiente;\n\n // Si la lista está vacía, lo defino como primero\n if (this.esVacia()) {\n this.setPrimero(unNodo);\n } else {\n // Valido que no exista ya el nodo\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Applies the given node to the given vizmapper | public boolean applyVizMap ( NodeView node_view, VisualStyle style ); | [
"public boolean applyVizMap ( NodeView node_view );",
"public abstract Node apply(Node node);",
"public boolean applyVizMap ( CyNode node );",
"public boolean applyVizMap ( CyNode node, VisualStyle style );",
"public boolean applyVizMap ( EdgeView edge_view );",
"boolean updateMapping(String nodeId, Mappi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies that isAsciiPrintable() considers an array of multiple printable bytes to be printable. | @Test
public void arrayWithMultiplePrintableBytesIsPrintable() {
assertTrue(StringUtil.isAsciiPrintable(new byte[]{'a', 'b'}));
} | [
"@Test\n public void arrayWithSinglePrintableByteIsPrintable() {\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{'a'}));\n }",
"@Test\n public void arrayWithSpaceIsPrintable() {\n assertTrue(StringUtil.isAsciiPrintable(new byte[]{' '}));\n }",
"@Test\n public void emptyArrayIsPr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ converts s[index] to integer, can do so up to 3 digits numbers | public static int getInteger(String s,int index){
int i = 0, acc = 0;
while(true){
int flag = Character.digit(s.charAt(index+i),10);
if( flag == -1) return acc;
acc = acc * 10;
acc += flag;
i++;
}
} | [
"private static int parseInteger(String s, int index)\n\t{\n\t\tString temp = \"\";\n\t\tint i = index;\n\t\twhile (Character.isDigit(s.charAt(i)))\n\t\t{\n\t\t\ttemp += s.charAt(i++);\n\t\t}\n\t\treturn Integer.parseInt(temp);\n\t}",
"@Override\n\tpublic int func1(String s) {\n\t\tfor(int i=0; i<=s.length()-1; i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convenience method for converting a time in millis to a DateStruct. | public static DateStruct convertToDate(long aTime)
{
boolean secured=ensureBaseline();
if(secured){
long diff=aTime-baselineMillis;
if(diff>0 && diff<MS_PER_DAY){
return baselineDateStruct2;
}
}
DateStruct result;
if (aTime != 0)
{
DateW... | [
"private static final TimeStruct getTimeStruct(long p_timeInMillis) {\n \n TimeStruct ts;\n long millisSinceMidnight;\n int millis, hr, min, sec, frac;\n \n millisSinceMidnight = p_timeInMillis - baselineMillis;\n \n if (millisSinceMidnight ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks whether this paintObject is inside the given selection rectangle _r. It checks every point in list of points | public abstract boolean isInSelectionImage(final Rectangle _r); | [
"public void selectArea(Rectangle r) {\n if (r != null)\n for (int i = 0; i < getSize(); i++) {\n GraphicVectorEntry gve = elementAt(i);\n Rectangle bb = gve.go.getBoundingBox();\n if (r.intersects(bb))\n // other possibility, for tot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the best score of all the PSMs for the ScoreModel given by the scoreName. | public Double getBestScore(String scoreName) {
ScoreModel bestScoreModel = getBestScoreModel(scoreName);
return (bestScoreModel == null) ? Double.NaN : bestScoreModel.getValue();
} | [
"public ScoreModel getBestScoreModel(String scoreName) {\n ScoreModel bestScoreModel = null;\n\n // get the best of the scores out of the list\n for (PSMReportItem psm : psmList) {\n ScoreModel newScoreModel = null;\n\n if ((psm instanceof ReportPSM) &&\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rearranging the main equation from the calculate() method yields the formulas for the methods below: Calculates the maximum achievable velocity given a maximum voltage supply, a position, and an acceleration. Useful for ensuring that velocity and acceleration constraints for a trapezoidal profile are simultaneously ach... | public double maxAchievableVelocity(double maxVoltage, double angle, double acceleration) {
// Assume max velocity is positive
return (maxVoltage - ks - Math.cos(angle) * kg - acceleration * ka) / kv;
} | [
"public float maxTorque();",
"public double maxAchievableAcceleration(double maxVoltage, double angle, double velocity) {\n return (maxVoltage - ks * Math.signum(velocity) - Math.cos(angle) * kg - velocity * kv) / ka;\n }",
"protected void calcVelocity()\n\t{}",
"public double getMaxVelocity() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for BUILDING_SUB_TYPE using the alias name BuildingSubType. | public String getBuildingSubType() {
return (String) getAttributeInternal(BUILDINGSUBTYPE);
} | [
"public long getSubType() {\n return subType;\n }",
"public String getSubType() {\n return subType;\n }",
"public void setBuildingSubType(String value) {\n setAttributeInternal(BUILDINGSUBTYPE, value);\n }",
"public String getSubSubType() {\r\n\t\treturn subSubType;\r\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form GUIPuzzleF | public GUIPuzzleF() {
initComponents();
} | [
"FORM createFORM();",
"public makingAPizzaForm() {\n initComponents();\n }",
"public NewProblemUI() {\n initComponents();\n }",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"@PostConstruct\n private void createForm() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method used to set the life or change the life of all animals and cap it at 300 | public void setLife(int health){
this.life+=health;
if (life>300){
this.life=300;
}
} | [
"public void setLife(int amount){\r\n\t\tthis.life = amount;\r\n\t}",
"public void setLife(int life) {\n this.life = life;\n if(this.life>1000){\n this.life = 1000;\n }\n }",
"public void setLife(int life) {\n if(life<0){ life = 0; }\n this.life = life;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the MonitorResource definition allowing to specify monitoringStatus. | interface WithMonitoringStatus {
/**
* Specifies the monitoringStatus property: Status of the monitor..
*
* @param monitoringStatus Status of the monitor.
* @return the next definition stage.
*/
WithCreate withMonitoringStatus(Moni... | [
"public StageStatus stageStatus() {\n return this.stageStatus;\n }",
"public int getStageStatus() {\n\t\treturn stageStatus;\n\t}",
"MonitoringStatus monitoringStatus();",
"public String getMonitorStatusName() {\r\n\t\treturn monitorStatusName;\r\n\t}",
"interface DefinitionStages {\n /** T... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method for addBlock(long, int). In this case, the game is not persisted. | public void testAddBlock_NoGame() throws Exception {
try {
dao.addBlock(1, 1);
fail("EntryNotFoundException expected");
} catch (EntryNotFoundException e) {
// should land here
}
} | [
"public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }",
"private void Management_Block(Block block){\n\t\t\n\t\t switch(block.BlockState){\n\t\t \n\t\t case 0: // player is not l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get accessor for persistent attribute: cod_perfil | public java.lang.String getCod_perfil() {
return dataCacheEntry.getCod_perfil();
} | [
"public Perfil getPerfilSesion(){\n return this.perfilSesion;\n }",
"public Perfil getPerfil() \n\t{\n\t\treturn perfil;\n\t\t}",
"public PanelPerfil getPerfil(){\n return perfil;\n }",
"com.obctech.growbe.proto.serre.SerreData.ControlBoardProfil getProfil();",
"public Integer getIdPerfil() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new user. | void create(User newUser); | [
"public void createUser(User user);",
"public com.vanban.model.user create(long userId);",
"public void createUser() {\r\n /*\r\n need to add to the loader list.\r\n */\r\n User u = new User();\r\n UserAccManager accM = new UserAccManager(u.getId());\r\n u.setAccManage... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of a AndCursor. It wraps an index cursor and the list of evaluators associated with all the elements connected by the And. | public AndCursor( PartitionTxn partitionTxn, Cursor<IndexEntry<V, String>> wrapped,
List<Evaluator<? extends ExprNode>> evaluators )
{
if ( IS_DEBUG )
{
LOG_CURSOR.debug( "Creating AndCursor {}", this );
}
this.wrapped = wrapped;
this.evaluators = optimiz... | [
"private Expr and() {\n Expr expr = equality();\n\n while (match(AND)) {\n Token operator = previous();\n Expr right = equality();\n expr = new Expr.Logical(expr, operator, right);\n }\n\n return expr;\n }",
"LogicalAndExpression createLogicalAndExpr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A "semi easy" sudoku | @Test
public void solveSemiEasySudoku() throws SetException {
sudoku.set(8, 1, 1);
sudoku.set(2, 2, 1);
sudoku.set(5, 7, 1);
sudoku.set(9, 9, 1);
sudoku.set(3, 2, 2);
sudoku.set(4, 3, 2);
sudoku.set(9, 4, 2);
sudoku.set(8, 8, 2);
sudoku.set(7, 9, 2);
sudoku.set(1, 1,... | [
"public SudokuPuzzle(int a1,int a2,int a3, int b1,int b2,int b3, int c1,int c2,int c3,\n int a4,int a5,int a6, int b4,int b5,int b6, int c4,int c5,int c6,\n int a7,int a8,int a9, int b7,int b8,int b9, int c7,int c8,int c9,\n int d1,int d2,int d3, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO make a static addition method TODO do XOR bitwise Computes the sum (XOR) of this and a given BinaryWord | public BinaryWord add(BinaryWord suplement) {
if (this.getLength() != suplement.getLength()) {
// TODO
System.err.println("MISSMATCH");
System.err
.println("You try to xor a " + this.getLength()
+ " bit word with a " + suplement.getLength()
+ " bit word");
}
long x1 = Long.parseLong(... | [
"public String addBinary(String a, String b) {\n // 1 1\n // 1010\n // 1011\n // 10101 \n // XOR = different 1, same 0\n String result = \"\";\n int i = a.length() - 1;\n int j = b.length() - 1;\n int carry = 0;\n while(i >= 0 || j >= 0) {\n int num1 = i >= 0 ? Character.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tell this ThreadController that one of the CPUs is no free and it can stop waiting | public synchronized void setCPUFree(int cpuNumber) {
// System.out.println("ThreadController has been notified that CPU "+cpuNumber+" is now free");
this.cpuStatus[cpuNumber] = true;
this.notifyAll();
} | [
"private synchronized void waitForBurglarThread() {\n\t\ttry {\n\t\t\t// System.out.println(\"ThreadController got no free cpus, waiting \"+Arrays.toString(cpuStatus));\n\t\t\tthis.wait();\n\t\t\t// System.out.println(\"NOTIFIED\");\n\t\t} catch (InterruptedException e) {\n\t\t\tLOGGER.log(Level.SEVERE, \"\", e);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
logger.log(Level.INFO, "PERFORMANCE START updateCopyToCs()"); Material restructure and quote_item delinkage. changed on 10 Apr 2014. | public void updateCopyToCs() {
String copyToCs = "";
String copyToCsName = "";
if (this.selectedCsList != null) {
for (User user : selectedCsList) {
copyToCs += user.getEmployeeId() + ";";
copyToCsName += user.getName() + ";";
}
}
rfqHeader.setCopyToCs(copyToCs);
rfqHeader.setCopyToCsName(copy... | [
"public boolean updAiccAu(Connection con, String domain, loginProfile prof, String aicc_crs_filename, String aicc_cst_filename, String aicc_des_filename, String aicc_au_filename, String aicc_ort_filename)\n throws IOException, SQLException, qdbException, qdbErrMessage, cwSysMessage {\n//System.out.println(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getArrayExp (2) getSubscriptExp getElemSizeExp (2) Get a component of a subscripted variable. "this" should be a node built by buildSubscriptedVar method. | Exp getArrayExp(); | [
"ArraySubscript createArraySubscript();",
"public final PythonParser.subscript_return subscript() throws RecognitionException {\n PythonParser.subscript_return retval = new PythonParser.subscript_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token d1=null;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compile the report if it has to be stored and invoke respective method either to store this as PDF or EXCEL. | public void compileReportToStore(ReportObject pReportObject, String fileName, String path) throws JRException, IOException {
isDebugEnabled("Compling Report To Store" + path);
String lDefaultFileName = getFileName(PropertyUtil.getProperty(pReportObject.getMReqName(), ReportConstants.REQJRXMLPROPSFILE));
String... | [
"public void compileReportToStore(ReportObject pReportObject, String fileName) throws JRException, IOException {\r\n\t\tisDebugEnabled(\"Compling Report To Store\");\r\n\t\tString lDefaultFileName = getFileName(PropertyUtil.getProperty(pReportObject.getMReqName(), ReportConstants.REQJRXMLPROPSFILE));\r\n\t\tString ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Blends some elements within the specified radius and creates a new list which consists of the blended stars. The R.A. and Decl., and (x,y) position must be set properly. | public StarList blend ( double search_radius ) {
return merge(search_radius, MERGE_BLEND);
} | [
"private StarList merge ( double search_radius, int mode ) {\r\n\t\tStarList new_list = new StarList();\r\n\r\n\t\tif (size() == 0)\r\n\t\t\treturn new_list;\r\n\r\n\t\tStar star1 = (Star)elementAt(0);\r\n\t\tStar star2 = null;\r\n\t\tfor (int i = 1 ; i < size() && star2 == null ; i++) {\r\n\t\t\tStar star = (Sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse dashboardpath (new webapp) from configuration. | static String parseDashboardPath() throws CruiseControlException {
final CruiseControlOptions config = CruiseControlOptions.getInstance();
final File dashboardPath = config.getOptionFile(CruiseControlOptions.KEY_DASHBOARD);
validateWebAppPath(dashboardPath, CruiseControlOptions.KEY_DASHBOARD);
... | [
"String parseWebappPath() throws CruiseControlException {\n final CruiseControlOptions config = CruiseControlOptions.getInstance();\n final File webappPath = config.getOptionDir(CruiseControlOptions.KEY_WEBAPP_PATH);\n // TODO: validate is useless, since conf.getOptionDir() already validates th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copies the properties from the specified card into the JSON object | private boolean setCardJsonWithCardProps(final JsonObject cardJson, final Card card) {
if (card == null) {
return false;
}
boolean changed = false;
final String name = getAsStringOrNull(cardJson, "name");
if (card.getName() != null && !card.getName().equals(name)) {
cardJson.addProperty("name", card.ge... | [
"private Card getCardFromJSON(byte[] payload_card_details){\n\n Card card = null;\n try{\n JSONObject cardJSON = new JSONObject(new String(payload_card_details));\n String logoPath = cardJSON.getString(\"logoPath\");\n String name = cardJSON.getString(\"name\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor of the ImageListPreference. Initializes the custom images. | public ImageListPreference(Context context, AttributeSet attrs) {
super(context, attrs);
} | [
"public ImageListPreference(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\t\n\t\tsetLayoutResource(R.layout.ico_pref);\n\n\t\tTypedArray typedArray = context.obtainStyledAttributes(attrs,\n\t\t\tR.styleable.ImageListPreference);\n\n\t\tString[] imageNames = context.getResources().getStringA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to tell whether to use two JVMs when running Electric. When using two JVMs, there is a client and a server, in separate memory spaces. The default is "false". | public static boolean isUseTwoJVMs() { return cacheUseTwoJVMs.getBoolean(); } | [
"public static void setUseTwoJVMs(boolean on) { cacheUseTwoJVMs.setBoolean(on); }",
"public static boolean isMSJVM() {\n\t\treturn (System.getProperty(\"java.vendor\").indexOf(\"Microsoft\") != -1);\n\t}",
"public boolean supportsMultipleServers();",
"public boolean is_dual_server () {\n\t\treturn param_set.i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should fail to ensure path for null input. | @Test
public void shouldFailToEnsurePathForNullInput() {
assertThatThrownBy(() -> PathService.ensurePath(null))
.isInstanceOf(IllegalArgumentException.class);
} | [
"@Test(description = \"Test incorrect path to file: null.\")\n public void testValidatePathOnNull() {\n boolean actual = fileValidator.validatePath(null);\n assertFalse(actual);\n }",
"@Test(description = \"Test incorrect path to file: empty string.\")\n public void testValidatePathOnEmptyS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check the validity of the IBAN. Algorithm followed from At present this function is used to validate the IBAN generated by our tool. Therefore assume that pattern of the iban is valid for the given country. Therefore pattern validation is not happening. | public boolean validateIBAN(String iban, String countryCode) {
if (isIBNSupportedCountry(countryCode)) {
CountryInfo cInfo = countryInfoMap.get(countryCode);
String bbnFormat = cInfo.getBbnFormat();
String bbnPattern = cInfo.getBbnPattern();
String[] bbnFormatArr ... | [
"public String generateIBAN(String countryCode) {\n String output = \"-1\"; //Country \" + countryCode + \" not supported. Currently only supported DE, AT , NL\";\n if (isIBNSupportedCountry(countryCode)) {\n String bbn = generateBBN(countryCode);\n String checkDigits = generateC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when TransactionManager wants to create new TransactionEvent Override this to use custom TransactionEvent's | protected TransactionEvent createTransactionEvent(String name)
{
return new TransactionEvent(this, name);
} | [
"@Override\n\tpublic void onTransactionStart() {}",
"public TransactionEvent() {\n this.local = true;\n }",
"private void addEvent() {\r\n\r\n\t\tTransactionEvent event = transaction.getEvent();\r\n\t\tif (event != null) {\r\n\t\t\tevent.add(this);\r\n\t\t}\r\n\t}",
"public void createTransaction(Transact... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the enabled state of the DnDJList. Also sets the drop target's active state. | @Override
public void setEnabled(boolean b) {
super.setEnabled(b);
getDropTarget().setActive(b);
} | [
"public void setDropEnabled(boolean enabled) { this.dropEnabled = enabled; }",
"protected void updateEnabledState()\n {\n int inx = orderList.getSelectedIndex();\n orderUpBtn.setEnabled(inx > 0);\n orderDwnBtn.setEnabled(inx > -1 && inx < orderModel.size()-1);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
register the bean, refer Spring GenericWebApplicationContext .registerBeanDefinition(String _beanName, BeanDefinition _definition) | void registerBeanDefinition(String _beanName, BeanDefinition _definition); | [
"void register(final Bean bean);",
"void register(String name, Object bean);",
"@Override\n public final void registerConfigBean(NamedInstance<CB> configBean) {\n Objects.requireNonNull(configBean);\n assertIsInitializing();\n\n Object prev = managedConfiguredServicesMap.put(configBean.n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column tbl_patient_request_xray.IOPA | public String getIopa() {
return iopa;
} | [
"public String getIATACarrierId() { return iataId; }",
"public String getIco() {\n return ico;\n }",
"public Long getANO_APROBACION() {\n return ANO_APROBACION;\n }",
"public StrColumn getIprId() {\n return delegate.getColumn(\"ipr_id\", DelegatingStrColumn::new);\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes the specified filter from the list of filters through which a node is passed when getFilteredSuccessorNodes is called. | public void removeNodeFilter (INodeFilter filter); | [
"public void removeFilter() {\r\n\t\tfilter = null;\r\n\t}",
"void removeMatching(MetricFilter filter);",
"public void removeFilter(@NotNull final SceneFilter filter) {\n filters.slowRemove(filter);\n }",
"void removeRecipeFilter(RecipeFilter recipeFilter);",
"public void removeFilter(LogFilter fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the maximum interval time | public synchronized Integer getMaxTimeForInterval() {
return maxTimeForInterval;
} | [
"public Integer getMaxTime() {\n return maxTime;\n }",
"public int getMaxTime() {\n\t\treturn this.maxTime;\n\t}",
"public int getMaxTime() { return _maxTime; }",
"long getMaxTimeMs();",
"public TimeSpan getOuterMaxTime() {\n return totalTimer.export(Math.max(outerMaxTime, currentOuterInterval... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs test case with 10 subscriber and publisher with 5 second ramp up time. | @Test(groups = {"1kb"}, priority = 4, enabled = true)
public void tenSubscriberTestCase() throws ConfigurationException, SAXException, ParserConfigurationException,
MBPerformanceException, IOException {
Utils.editThreadCount(super.publisher, "10");
Utils.editThreadCount(super.subscriber... | [
"@Test(groups = {\"1kb\"}, priority = 3, enabled = true)\n public void fiveSubscriberTestCase() throws ConfigurationException, SAXException, ParserConfigurationException,\n MBPerformanceException, IOException {\n\n Utils.editThreadCount(super.publisher, \"5\");\n Utils.editThreadCount(su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "EVERY" $ANTLR start "COUNT" | public final void mCOUNT() throws RecognitionException {
try {
int _type = COUNT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// C:\\Users\\JeanV\\Documents\\ETUDES\\GI05\\LO17\\projet\\LO17\\LO17Tomcat\\WEB-INF\\src\\lo17SqlGrammar.g:9:7: ( 'combien' | 'nombre' )
int alt2=2;
int LA2_0 = input.LA(1);
if (... | [
"public long getAllLiteralCount();",
"public int count(T instance, M matchCondition);",
"public final void function() throws RecognitionException {\r\n Token l=null;\r\n\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use Forward.newBuilder() to construct. | private Forward(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private DoForward(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }",
"private DoForward(Builder builder) {\n super(builder);\n }",
"private FeedForwardNetBase buildFeedForwardNet() {\n return new FeedForwardNetBase(this.structure, this.data);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the subnet int value | public void setSubnet(int s){
subnet = s;
} | [
"public static void setDefaultSubnetMask ( String subnet) {\n\t _subnetMask = subnet;\n\t}",
"@java.lang.Override\n public int getSubnetId() {\n return subnetId_;\n }",
"int getSubnetId();",
"public void setSubnetFull(String subnet){\n subnetFull = subnet;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate username/passwd and issue token | public String validateUser(String username, String encpasswd) {
String token = "";
//NOTE: passwd will be encrypted when saved in the database
//token = validate the username and password with database credentials and issue token;
return token;
} | [
"void validateCredentials(String username, String password);",
"boolean checkUser(String token);",
"boolean validateUserAndPassword(String username, String password);",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO(crbug.com/1227656): Add an extra check on IncognitoReauthManagercanAuthenticate method if needed here to tackle the case where a reauthentication might not be possible from the systems end in which case we should not show a reauth dialog. The method currently doesn't exists and may need to be exposed. | private void showDialogIfRequired() {
if (mIncognitoReauthCoordinator != null) return;
if (mLayoutStateProvider == null && mIsTabbedActivity) return;
if (!mIncognitoReauthPending) return;
if (!mTabModelSelector.isIncognitoSelected()) return;
if (mProfile == null) return;
... | [
"private void onTabStateInitializedForReauth() {\n mIncognitoReauthPending = mTabModelSelector.getModel(/*incognito=*/true).getCount() > 0\n && mIsIncognitoReauthPendingOnRestoreSupplier.get();\n showDialogIfRequired();\n }",
"private void reauth() {\n User user = Preference... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setter for visit id | public void setVisitID(long visitID) {
this.visitID = visitID;
} | [
"public void setVisitId(long visitId) {\n this.visitId = visitId;\n }",
"public void setVisitId(Integer visitId) {\n this.visitId = visitId;\n }",
"String getVisitId();",
"public long getVisitId() {\n return visitId;\n }",
"public Integer getVisitId() {\n return visitId;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the "New" menu item. It clicks the item and verifies that text is shown in current selection. | @Test
public void testMenuItem() {
selenium.click(LOC_FIRST_MENU_NEW);
Wait.failWith("Text shown in current selection.").until(new Condition() {
public boolean isTrue() {
return MSG_FIRST_CURRENT_SELECTION_NEW.equals(selenium.getText(LOC_FIRST_CURRENT_SELECTION));
... | [
"public void clickNewTasksItem() {\n newTaskItem.click();\n }",
"public void onNewMenuItemClickedHandler(ActionEvent actionEvent) {\n Alert alert = createAlertBox(UIText.ALERT_NEW_ITEM, AlertKind.INFO, Constants.LARGE_ALERT_WIDTH, Constants.DEFAULT_ALERT_HEIGHT, true);\n Optional<ButtonTyp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_RPT_COLLATERAL_STATUS.BRIEF_NAME_ENG | public void setBRIEF_NAME_ENG(String BRIEF_NAME_ENG) {
this.BRIEF_NAME_ENG = BRIEF_NAME_ENG == null ? null : BRIEF_NAME_ENG.trim();
} | [
"public void setBRIEF_NAME_ENG(String BRIEF_NAME_ENG)\r\n {\r\n\tthis.BRIEF_NAME_ENG = BRIEF_NAME_ENG == null ? null : BRIEF_NAME_ENG.trim();\r\n }",
"public String getBRIEF_NAME_ENG()\r\n {\r\n\treturn BRIEF_NAME_ENG;\r\n }",
"public String getBRIEF_NAME_ENG() {\r\n return BRIEF_NAME_ENG;\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the lowest floor button pushed inside lift | private Floor getLowestButPan(LiftButton[] bP){
int x=0;
while(x<numberOfFloors){
if(bP[x]==LiftButton.ACTIVE)return new Floor(x);
x++;
}
return new Floor(numberOfFloors-1);
} | [
"private Floor getHighestButPan(LiftButton[] bP){\r\n\t\t\r\n\t\tint x=numberOfFloors-1;\r\n\t\twhile(x>=0){\r\n\t\t\tif (bP[x]==LiftButton.ACTIVE) return new Floor(x);\r\n\t\t\tx--;\r\n\t\t}\r\n\t\treturn new Floor(0);\r\n\t}",
"private Button getLowestDistanceButton(){\n\t\tfinal List<Button> botButtons = table... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new executable that toggles the given executable. | public ToggleExecutable(Executable executable, String onParameter, String offParameter)
{
this.executable = executable;
this.onParameter = onParameter;
this.offParameter = offParameter;
} | [
"public void setIsExecutable(Short isExecutable)\n {\n this.isExecutable = isExecutable;\n }",
"public void setExecutable(boolean executable) {\n this.executable = executable;\n }",
"public void setExecutable(String executable);",
"void makeExecutable(Os os, Path binaryPath);",
"void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a WSDL SOAP service in Nuxeo | public String registerWSDLService(Service service) throws Exception{
logger.debug("[registerWSDLService()] --- Message url : " + service.getUrl().toString());
return registerService(service);
} | [
"private static void publishWebService() {\r\n Endpoint.publish(\"http://localhost:8083/TestService\", new TestServiceImpl());\r\n \r\n System.out.println(\"El Servicio esta en Linea.\");\r\n }",
"ServiceReference registerService(String name, Object service);",
"WebServiceBinding create... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the BatchPredictionName of a BatchPrediction. You can use the GetBatchPrediction operation to view the contents of the updated data element. | java.util.concurrent.Future<UpdateBatchPredictionResult> updateBatchPredictionAsync(UpdateBatchPredictionRequest updateBatchPredictionRequest); | [
"public JSONObject downloadBatchPrediction(final JSONObject batchPrediction,\n final String filename) {\n String resourceId = (String) batchPrediction.get(\"resource\");\n return downloadBatchPrediction(resourceId, filename);\n }",
"public void runBatch(String batchName);",
"java.uti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all the sprite that is of unit tile difference in a direction. | public List<Sprite> getNeighboringSprites(Direction dir) {
float x = this.getX();
float y = this.getY();
switch(dir) {
case UP:
--y; break;
case DOWN:
++y; break;
case LEFT:
--x; break;
case RIGHT:
++x; break;
case NONE: break;
}
return this.location.getSpritesAt(x, y);
} | [
"List<Tile> getTilesToDraw();",
"ArrayList<Tile> getTilesPlayerTwo() throws RemoteException;",
"ArrayList<Tile> getTilesPlayerOne() throws RemoteException;",
"public List<Tile> getTilesAtAbsoluteRect(AbsoluteRectangle rect) {\n List<Tile> tiles = new ArrayList<>();\n int tileWidth = tileMap.getT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to declare an ManyToMany association (n,n association) . No cascade delete is performed when father of association is erased. | public void manyToMany(String attribute) {
manyToMany(attribute, "");
} | [
"private void createManyToMany(ManyToMany manyToMany, Class umlClass, \n\t\t\tString className) {\n\t\tElementInRelationship currentElement = typeToMappedElement.get(umlClass);\n\t\tType targetType = this.customTypes.get(manyToMany.getTargetEntity().toLowerCase());\n\t\tElementInRelationship targetElement = this.ty... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
override exists(path, watch), so we can record all exists requests | @Override
protected boolean exists(final String path, final boolean watch) {
long startT = System.currentTimeMillis();
try {
boolean exists = retryUntilConnected(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return _connection.exists(path, watch);... | [
"public Stat exists(String path, boolean watch) throws KeeperException, InterruptedException {\n return exists(path, getDefaultWatcher(watch));\n }",
"public Stat exists(String path, Watcher watcher) throws KeeperException, InterruptedException {\n RetryCounter retryCounter = retryCounterFactory.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end method createUserInterface calculate and display sales and earnings | private void calculateEarnings()
{
// get user input
int items = Integer.parseInt( itemsSoldJTextField.getText() );
double price = Double.parseDouble( priceJTextField.getText() );
Integer integerObject =
( Integer ) commissionJSpinner.getValue();
int commissionRate = integerOb... | [
"public void calculateSale()\n {\n double total = 0.00;\n int numTimbits = 0;\n int numDoughnuts = 0;\n int smallCoffee = 0;\n int mediumCoffee = 0;\n int largeCoffee = 0;\n String order;\n \n for(int i = 0; salesItem[i] != null && i < salesItem.leng... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sends a GETALL message to server if successful | public void handleGetAll() {
MessageObject mo = new MessageObject();
mo.setTransactionType("GETALL");
try
{
out.writeObject(mo);
out.flush();
while(true)//wait for response from server
{
mo = (MessageObject)in.readObject();
... | [
"public AsyncResult<IQ> requestAllMessages() {\r\n return xmppSession.query(IQ.get(new OfflineMessage(true, false)));\r\n }",
"ReadResponseMessage fetchAllMessages();",
"private static void getAllNotifications() {\n String response = webTarget.path(\"/notifications/all\")\n .requ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to set the transformer to be used for the transformation. It reads the transformer from the passed xsltFile. | public void setXsltTransformer(final File xsltFile)
throws InvalidXsltException {
if (Objects.empty(xsltFile)) {
setXsltTransformer((InputStream) null);
} else {
try {
setXsltTransformer(new FileInputStream(xsltFile));
} catch (final FileNotFoundException e) {
throw new InvalidXsltException("The... | [
"public void setXsltFile(File xsltFile) {\n this.xsltFile = xsltFile;\n }",
"public void setXslt(Transformer _xslt) {\n xslt = _xslt;\n }",
"public XsltTransformator(String xsltFileName) throws FileNotFoundException,\r\n\t\t\tTransformerConfigurationException {\r\n\t\tInputStream xslStr = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Asking order number string. | String askingOrderNumber(); | [
"java.lang.String getOrderNumber();",
"java.lang.String getSupplyOrderNumber();",
"private int getOrderNumber()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast ordrenummer: \");\n return scanner.nextInt();\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |