query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Test8: " "Value before correct symbols in "username" field | @Test
public void spaceValueBeforeUserNameAnalLoginTest() throws Exception {
$(analUserNameField).setValue(" user");
enterValidPassword();
clickLoginButton();
checkInvalidUserNamePassword();
System.out.println("spaceValueBefore (username) Test - PASSED");
} | [
"@Test\n public void specificSymbolValueUserNameAnalLoginTest() throws Exception {\n $(analUserNameField).setValue(\"!@'#$%'&?*-+/{}[]\");\n enterValidPassword();\n clickLoginButton();\n checkInvalidUserNamePassword();\n System.out.println(\"specificSymbolValue (username) Test ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create and initialize the OT extender. | void createOTExtender() throws IOException {
// Start DefaultOTExtenders for both players.
otExtender0 = new DefaultOTExtender(k, m, lowWaterMark, highWaterMark,
0);
otExtender1 = new DefaultOTExtender(k, m, lowWaterMark, highWaterMark,
1);
otExtender0.setParameters(lClientChannel, playerRand[... | [
"protected abstract EXT createExtension();",
"public TWBotExtension() {\n }",
"private void createExtensions() {\n\t\tList<AgentExtensionConfig> extensions = this.config.getExtensions();\n\t\tif (extensions != null && extensions.size()>0) {\n\t\t\t//System.out.println(\"[CubeAgent] creating cube agent extens... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert char to float | public static float charToFloat(char input) {
return (float) input;
} | [
"protected float toFloat(String s){\n return Float.parseFloat(s);\n }",
"private static float toFloat (String string) {\n return Float.valueOf(string).floatValue();\n }",
"public static Float parseFloat(String input) {\n //sanity check\n if (Utils.isEmpty(input)) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the flag indicating whether or not client authentication is enabled | public void setClientAuthEnabled(Boolean val) throws InvalidAttributeValueException, MBeanException; | [
"public void setWantClientAuth(boolean flag)\n {\n wantClientAuth = flag;\n }",
"public void setNeedClientAuth(boolean flag)\n {\n needClientAuth = flag;\n }",
"public boolean getWantClientAuth()\n {\n return wantClientAuth;\n }",
"public Boolean getClientAuthEnabled();"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add to the existing Auto price method. This decorator will override this Auto method, extending the functionality by adding it's own custom version which will add the price of this auto option to the existing Auto base price. | @Override
public double getPrice() {
return auto.getPrice() + AC_ADDITIONAL_CHARGE;
} | [
"public void setPrice(double price);",
"public abstract void setTotalPrice();",
"@Override\r\n\tpublic Double givePrice() {\r\n\t\treturn Price;\r\n\t}",
"public void setPrice(double price)\n {\n setPriceOrder(price);\n }",
"protected void updateOptionPrice(String optionName, float price)\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Disposes the tab. This is the last method called on the ObjectTab. There is no guarantee that createTabContent() has been called, so the tab controls may never have been created. Within this method a tab may release any resources, fonts, images, etc. held by this tab. It is also very important to deregister all listene... | public void dispose() {
if (tabImage != null) {
tabImage.dispose();
tabImage = null;
}
} | [
"public void destroy() {\n mTabModel.removeObserver(mTabModelObserver);\n int tabCount = mTabModel.getCount();\n for (int i = 0; i < tabCount; i++) {\n mTabModel.getTabAt(i).removeObserver(this);\n }\n }",
"public void closeTab() {\n this.tabPaneTestCampaign.getTab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public int fixDeleteDoubleBlack(RBNode doubleBlackNode) fixes the issue that the subtree under doubleBlackNode has a black depth lower by one than any of it's relatives. | private int fixDeleteDoubleBlack(RBNode doubleBlackNode)
{
// if this is the root with the double black issue.
if (-1 == doubleBlackNode.parent.key)
{
// in this case there is no actual problem.
return 0;
}
if (doubleBlackNode.is_red)
{
doubleBlackNode.is_red = false;
return 1;... | [
"private void remedyDoubleBlack(Position<Entry<K, V>> p) {\n Position<Entry<K, V>> z = parent(p);\n Position<Entry<K, V>> y = sibling(p);\n if (isBlack(y)) {\n if (isRed(left(y)) || isRed(right(y))) { // Case 1: trinode restructuring\n Position<Entry<K, V>> x = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of maxRetryAttempt. | public Integer getMaxRetryAttempt() {
return maxRetryAttempt;
} | [
"public int getMaxErrorRetry() {\n return maxErrorRetry;\n }",
"public long getMaximumRetryWaitTime() {\r\n return configuration.getMaximumRetryWaitTime();\r\n }",
"public int getMaxNumberOfRetries() {\n return maxNumberOfRetries;\n }",
"public static int getMaxTries() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns id of the problem | public int getProblemId() {
return problemId;
} | [
"public String getProblemId() {\n return this.problemId;\n }",
"public void setProblemId(String id) {\n this.problemId = id;\n }",
"int getErrorId();",
"public Problem getProblemByID(int id) {\n\t\ttry (Statement stmt = conn.createStatement()) {\n\t\t\tResultSet rs = stmt.executeQuery(\"SE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method Name: addState Purpose of Method: adds a "Employee_State_Certification_Data" object to the vector of states Arguments: a Employee_State_Certification_Data object Returns: void Precondition: object's internal data set, ready to be added to vector Postcondition: object added to vector | public void addState(Employee_State_Certification_Data tempData)
{
// add object to vector
stateList.add(tempData);
// resort vector to ensure correct format
sortStateList();
// tell listmodel that the internal vector has changed for display
// purposes
... | [
"public void addState(Employee_State_Certification_Data tempData)\n {\n // add object to vector\n stateList.add(tempData);\n\n // resort vector to ensure correct format\n sortStateList();\n\n // tell listmodel that the internal vector has changed for display\n // ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AddressEntity list map to AddressDTO list Test | @Test
public void givenAListOfAddressEntity_whenMapToAddressDTO_thenReturnAddressDTO()
throws Exception {
LOGGER.info("Start test: AddressEntity list mapping to AddressDTO list.");
// GIVEN
// WHEN
List<AddressDTO> resultList = addressMapping.convertToAddressDTO(add... | [
"@Test\r\n public void givenAListOfAddressDTO_whenMapToAddressEntity_thenReturnAddressEntityList()\r\n throws Exception {\r\n LOGGER.info(\"Start test: AddressDTO list mapping to AddressEntity list.\");\r\n // GIVEN\r\n // WHEN\r\n AddressEntity result = addressMapping.conv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ARN of the CW log group to which the vended log data will be published. | public String getLogGroupArn() {
return this.logGroupArn;
} | [
"public String getCloudWatchLogGroupArn() {\n return this.cloudWatchLogGroupArn;\n }",
"String getArn();",
"String getTopicArn();",
"public String getFeatureGroupArn() {\n return this.featureGroupArn;\n }",
"public void setLogGroupArn(String logGroupArn) {\n this.logGroupArn = log... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleEDataTypeBody" $ANTLR start "entryRuleEDataTypeName" InternalAADMParser.g:590:1: entryRuleEDataTypeName : ruleEDataTypeName EOF ; | public final void entryRuleEDataTypeName() throws RecognitionException {
try {
// InternalAADMParser.g:591:1: ( ruleEDataTypeName EOF )
// InternalAADMParser.g:592:1: ruleEDataTypeName EOF
{
if ( state.backtracking==0 ) {
before(grammarAccess.getEDa... | [
"public final EObject entryRuleEDataTypeName() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEDataTypeName = null;\n\n\n try {\n // InternalRMParser.g:786:54: (iv_ruleEDataTypeName= ruleEDataTypeName EOF )\n // InternalRMParser.g:787:2: iv_rule... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Factory an concrete AbstractAddAdapterRule instance | protected AbstractAddAdapterRule createTestableRule() {
return new AddAdapterRule();
} | [
"Rule createRule();",
"RuleDescrBuilder extendsRule( String name );",
"RuleCatalog createRuleCatalog();",
"public AbstractAddAdapterRuleTestCase(String name) {\n super(name);\n }",
"protected abstract Adapter createAdapter();",
"public RuleFactory() {\n this(new DefaultGenerationConfig(),... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the primary symbol at the specified address. This method will always return null if the address specified is neither a Memory address nor an External address. | public Symbol getPrimarySymbol(Address addr); | [
"private Object lookupSymbol(Address addr) {\n\t\tExternalReference ref = getExternalReference(addr);\n\t\tif (ref != null) {\n\t\t\treturn ref;\n\t\t}\n\t\tFunction func = getFunctionContaining(addr);\n\t\tif (func != null) {\n\t\t\treturn func;\n\t\t}\n\t\tRegister reg = program.getRegister(addr);\n\t\tif (reg !=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert the HigherKindedType definition for a Optional into | public static <T> java.util.Optional<T> narrowOptional(final Higher<OptionalType.µ, T> optional) {
return Guava.asMaybe(narrow(optional)).toOptional();
} | [
"public static <T> Optional<T> narrow(final Higher<OptionalType.µ, T> maybe) {\n if (maybe instanceof Optional)\n return (Optional) maybe;\n //this code should be unreachable due to HKT type checker\n final OptionalType<T> type = (OptionalType<T>) maybe;\n return type.boxed;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find the appointment funding from the given appointment funding collection, which has the same key information as the specified vacant appointment funding | public PendingBudgetConstructionAppointmentFunding findVacantAppointmentFunding(List<PendingBudgetConstructionAppointmentFunding> appointmentFundings, PendingBudgetConstructionAppointmentFunding vacantAppointmentFunding); | [
"public PendingBudgetConstructionAppointmentFunding findAppointmentFunding(List<PendingBudgetConstructionAppointmentFunding> appointmentFundings, PendingBudgetConstructionAppointmentFunding appointmentFunding);",
"public PendingBudgetConstructionAppointmentFunding vacateAppointmentFunding(List<PendingBudgetConstr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new ResourceManager with the specified GraphicsConfiguration. | public ResourceManager(GraphicsConfiguration gc) {
this.gc = gc;
loadTileImages();
loadCreatureSprites();
loadItemSprites();
} | [
"public ResourceManager(GraphicsConfiguration gc) {\n this.gc = gc;\n loadTileImages();\n loadCreatureSprites();\n loadPowerUpSprites();\n }",
"private GraphicsManager() {\r\n }",
"public void createGame(GameConfiguration configuration)\n {\n //set game configuration\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This accessor method sets the passenger limit for the CruiseShip. | public static void SetMaxPassengers(double inLimit)
{
if (inLimit > 0)
{
maxPassengers = inLimit;
}
else
{
maxPassengers = 0;
}
} | [
"public void setMaximumPassengers(int value) {\n this.maximumPassengers = value;\n }",
"private void setPassengerCapacity(int passengerCapacity) {\n\t\tboolean validPasengerCapcity = passengerCapacity >= MINIMUM_PASSENGER_CAPACITY\n\t\t\t\t&& passengerCapacity < MAXIUM_PASSENGER_CAPACITY;\n\n\t\tif (val... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Randomly choose the food to get from the foods available | public void actGetFoodFromFridge() {
ArrayList<Integer> foodOptions = new ArrayList<Integer>();
for (int i = 0; i < Food.getNumberOfFoods(); i++) {
if (foodInventory[i] > 0) {
foodOptions.add(i);
}
}
if (foodOptions.size() > 0) {
state = State.goingToGetFoodFromFridge;
this.actVisitLoc(locFridge... | [
"@Override\n public void eatFood(String foodName) {\n String[] foodAvail = new String[4];\n Random random = new Random();\n foodAvail[0] = \"grain\";\n foodAvail[1] = \"meat\";\n foodAvail[2] = \"bugs\";\n foodAvail[3] = \"fish\";\n String foodPicked = \"grain\";\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleEntities" $ANTLR start "ruleEntities" ../com.mguidi.soa.ui/srcgen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:265:1: ruleEntities : ( ( rule__Entities__Alternatives ) ) ; | public final void ruleEntities() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:269:2: ( ( ( rule__Entities__Alternatives ) ) )
// ../com.mguidi.soa.... | [
"public final void rule__Entities__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:643:1: ( ( ruleEntity ) | ( ruleEnum ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of all downloadable object by their status. CURRENT: currently installed DELETED: to be deleted INSTALLED: to be installed | protected List<DownloadableInfo> getDownloadableListByStatus(PluginStatus Status) {
return this.getDownloadableContent(trackerDoc.getRootElement().getChild(Status.getTagName()));
} | [
"public static List<DownloadInfo> getAllDownloadList() {\n return PumpFactory.getService(IDownloadManager.class).getAllDownloadList();\n }",
"public List<DownloadInfo> getDownloads()\r\n\t{\r\n\t\tString[] pathParams = { ConnectorConstants.DOWNLOAD_NAME };\r\n\t\t\r\n\t\tJAXRSConnector<JAXBElement<Downl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Waits for the expected number of events and returns them. | private ListMap<String> finishSync(long waitForExpectedCountMs) {
final long startTime = SystemClock.uptimeMillis();
// Event strings with '/' separating the sequence and the event.
ArrayList<String> rawEvents;
while (true) {
rawEvents = mLauncher.getTestInfo(TestProtocol.RE... | [
"public long numEventsWaiting() {\n return simulation.waiting(this, Simulation.ANY_EVT);\n }",
"long getReceivedEventsCount();",
"@Test\n void receivesNumberOfEvents() {\n // Arrange\n final int numberOfEvents = 10;\n when(amqpReceiveLink.getCredits()).thenReturn(numberOfEvents... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
boolean isDuplicate(Dvd dvd) throws DvdStoreException; Adds the new purchase order | PurchaseOrder addPurchaseOrder(PurchaseOrder purchaseOrder) throws DvdStoreException; | [
"public static boolean testAddOccurrencesOfDuplicateItems() {\n\t \n\t boolean testPassed = false; \n\t \n\t String[] cart = new String[10];\n\t \n\t int count = 0;\n\t \n\t \n\t for (int i=0; i<1; ++i) {\n\t\t \n\t ShoppingCart.add(5, cart, count);\n\t \n\t }\n\t \n\t if (ShoppingCart.occurrencesOf(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a custom mapper to the client scope with id "id" and put "attributescopes" inside the custom mapper | @Override
public void createAttributeScopeToResourceScope(Long id, Set<String> attributeScopes) {
if (attributeScopes == null) return;
log.debug("ADD mapper to client scope");
String attributeScopeId = buildAttributeScopeId(id);
ClientScopeResource clientScope = realmResource.clientS... | [
"public void addMapper(Mapper mapper);",
"@Mapper(componentModel = \"spring\", uses = {ClientMapper.class})\npublic interface ClientLocationMapper extends EntityMapper<ClientLocationDTO, ClientLocation> {\n\n @Mapping(source = \"client.id\", target = \"clientId\")\n ClientLocationDTO toDto(ClientLocation cl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the in call timeout See linphone_core_set_in_call_timeout() for details. | public int getInCallTimeout(); | [
"int getInCallTimeout();",
"void setInCallTimeout(int timeout);",
"public void setInCallTimeout(int seconds);",
"int getIncomingTimeout();",
"public Long inactivityTimeout() {\n return inactivityTimeout;\n }",
"int getSipTransportTimeout();",
"public int getSimpleProductCallTimeoutRead()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of isNullOrBlank method, of class GeneralUtils. | @Test
public void testIsNullOrBlank() {
System.out.println("isNullOrBlank");
assertTrue(GeneralUtils.isNullOrBlank(null));
assertTrue(GeneralUtils.isNullOrBlank(""));
assertTrue(GeneralUtils.isNullOrBlank(" "));
assertFalse(GeneralUtils.isNullOrBlank("test"));
} | [
"private static boolean isNull(String value) {\n\t\treturn (value!=null) && (value.trim().equalsIgnoreCase(\"null\"));\n\t}",
"public static boolean isNullOrBlank(String input) {\n\t\tif (input == null || input.isEmpty()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean is... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test when select two pictures at different position ,the WallPaper should not be the same | public void testCase1_selectGallery() throws Throwable {
Object mLoader;
// select one pictrue
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
mWallpaperChooserFragment.onItemSelected(null, null, FIRST_PICTURE_SELECTED, 0)... | [
"private void findDrawList() {\n\t\tPanImageEntry chosenPanImage = null;\n\t\tfor (int n=0; n < panImageList.length; n++) {\n\t\t\tPanImageEntry panImage = panImageList[n];\n\t\t\tif (!panImage.imageListEntry.enabled) {\n\t\t\t\tpanImage.draw = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ((chosenPanImage == null) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the time that the first page was requested from the server. | public static long getFirstPageHitTime() {
return _serverStarted;
} | [
"public long getPageRenderTime() {\n final HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();\n return response instanceof FxResponseWrapper ? System.currentTimeMillis() - ((FxResponseWrapper) response).getCreatedAt() : 0;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a real number from a Gaussian distribution with given mean and standard deviation | public static double gaussian( double mean, double stddev ) {
return mean + stddev * gaussian();
} | [
"public static float getGaussianDensity(float x, float mean, float stdev) {\r\n\r\n double exponent = ( -1 * Math.pow( (x - mean), 2) / (2 * Math.pow(stdev, 2)));\r\n double denom = (Math.sqrt(2 * Math.PI * Math.pow(stdev, 2)));\r\n double coeff;\r\n\r\n coeff = 1 / denom;\r\n\r\n if (Double.isNaN(co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "RULE_LINEBREAK" $ANTLR start "RULE_NEWLINE" | public final void mRULE_NEWLINE() throws RecognitionException {
try {
int _type = RULE_NEWLINE;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalParser.g:30020:14: ( RULE_LINE_END )
// InternalParser.g:30020:16: RULE_LINE_END
{
mRULE_LINE_E... | [
"public final void mRULE_NEWLINE() throws RecognitionException {\n try {\n int _type = RULE_NEWLINE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalDSL.g:16725:14: ( ( '\\\\r' | '\\\\n' )+ )\n // InternalDSL.g:16725:16: ( '\\\\r' | '\\\\n' )+\n {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ProcessPropertyDef__Group__4" $ANTLR start "rule__ProcessPropertyDef__Group__4__Impl" InternalDsl.g:14864:1: rule__ProcessPropertyDef__Group__4__Impl : ( ( rule__ProcessPropertyDef__Group_4__0 ) ) ; | public final void rule__ProcessPropertyDef__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:14868:1: ( ( ( rule__ProcessPropertyDef__Group_4__0 )* ) )
// InternalDsl.g:14869:1: ( ( rule__ProcessPropertyDef__Group... | [
"public final void rule__ProcessPropertyDef__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:14964:1: ( rule__ProcessPropertyDef__Group_4__1__Impl )\n // InternalDsl.g:14965:2: rule__ProcessPropertyDef__Gr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that writes to server. | public void writeToServer() throws IOException {
serverBuffer.writeTo(serverChannel);
if (serverBuffer.isReadyToWrite()) {
register();
}
} | [
"public abstract void writeData(GameServer server);",
"protected void writeToServer(char[] request, int bytesToWrite)\n throws IOException\n {\n streamToServer.write(request, 0, bytesToWrite);\n streamToServer.flush( );\n }",
"private void writeToServer(String request) throws IOEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Selects an application in the view pager. | public void selectApplication(int position) {
if (mApplicationsPagerAdapter != null) {
mApplicationsPagerAdapter.setCurrentPosition(position);
mApplicationsPager.setCurrentItem(position);
mApplicationsPageIndicator.setCurrentItem(position);
}
} | [
"public void selectApplication() {\n select(Tab.APPLICATION, applicationAvatar, networkAvatar);\n }",
"public void selectPage(String page){\n\t\tthis.cardLayout.show(this.pages, page);\n\t\tswitch(page){\n\t\tcase \"SPLASH\":\n\t\t\tthis.splashScreen.requestFocus();\n\t\t\tbreak;\n\t\tcase \"MENU\":\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
precondition: this is not null postcondition: returns a SinglyLinkedPolynomial that is the derivative of this and is in highest to lowest exponent order | public Polynomial derivative()
{
Pd5GuoJonathanSinglyLinkedPolynomial copy = new Pd5GuoJonathanSinglyLinkedPolynomial(head);
ListNode <Term> temp = copy.getHead();
Term term;
for(temp = temp; temp!=null; temp = temp.getNext())
{
term = new Term (temp.getValue().getExpone... | [
"Polynomial derivative();",
"public Polynomial derivative(){\n if(front == null) throw new IllegalStateException();\n String term = \"\" + front.coefficient * front.exponent + \" \" + --front.exponent;\n Polynomial newPoly = new Polynomial(term);\n derive(this.front.next, newPoly);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as attribute value for APPROVED_BY using the alias name ApprovedBy | public void setApprovedBy(String value) {
setAttributeInternal(APPROVEDBY, value);
} | [
"public void setAPPROVED_BY(String APPROVED_BY)\r\n {\r\n\tthis.APPROVED_BY = APPROVED_BY == null ? null : APPROVED_BY.trim();\r\n }",
"public String getAPPROVED_BY() {\r\n return APPROVED_BY;\r\n }",
"public String getApproveBy() {\r\n return approveBy;\r\n }",
"public void setAPPRO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "LastInstanceElapsedRunTime" | @DISPID(17)
// = 0x11. The runtime will prefer the VTID if present
@VTID(23)
java.lang.String lastInstanceElapsedRunTime(); | [
"public double getElapsedTime()\n\t{\n\t\treturn elapsedTime;\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }",
"long getRunTimeOfLastExecutedCommand();",
"public long... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get rides. If there are no ride request it returns a new hash set of ride requests. | public Set<RideRequest> getRides() {
if (this.rides == null) {
return new HashSet<RideRequest>();
}
return rides;
} | [
"public ResponseEntity<List<RideDefinition>> getRides() {\n\n LOG.info(\"Get rides\");\n\n List ridesList = repository.findAll();\n\n return new ResponseEntity<>(ridesList, HttpStatus.OK);\n }",
"Collection<Ride> getRides() {\n return this.rides.values();\n }",
"@GetMap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct EDFTable using a TableModel | public EDFTable(TableModel tableModel) {
super(tableModel);
this.stripTable(tableOddRowClr, null, tableEvenRowClr, null);
this.getTableHeader().setReorderingAllowed(false);
} | [
"public TableDefinition(Class<T> model){\n this.singleton = this;\n this.model = model;\n try {\n OBJECT = Class.forName(model.getName());\n createTableDefinition();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public TableModel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
identifiers will have to have field and indicators matched | private void handleIdentifiers(Record record, Set<ItemIdentifier> identifiers)
{
for(ItemIdentifier identifier : identifiers)
{
List<IdentifierTypeSubFieldMapper> mappers = identifierTypeSubFieldMapperService.getByIdentifierTypeId(identifier.getIdentifierType().getId());
if( mappers.size() > 0 )
... | [
"public static Map<String, Set<String>> identParse(String fastaIdentifierString, String wholeHeader)\n {\n Map<String, Set<String>> identifiers = new HashMap<>();\n if (fastaIdentifierString == null) return identifiers;\n if (fastaIdentifierString.contains(\" \")) fastaIdentifierString = fas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the total number of hosts | int totalHosts(); | [
"public int getTotalActiveHosts(){\r\n return ohpool.get_total_ativos();\r\n }",
"public int sizeOfHostArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(HOST$4);\r\n }\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_jButton2ActionPerformed Importer un certificat | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
filter1 = new FileNameExtensionFilter("pem, crt, cer, der",
new String[] { "pem","crt","cer", "der" });
CertChooser(jTextField2, filter1);
} | [
"public PesquisarCertificados() {\n initComponents();\n Atualizar.doClick();\n }",
"private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed\n String ext1=\".p7b\", ext2=\".p7c\";\n SaveCert(jTextField4, ext1, ext2); \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test to check if caller number is valid | @Test
public void invalidCallerNumber(){
PhoneCall call = new PhoneCall("ABCD", "345-876-3456", "", "1:00 am", "01/01/2020", "1:00 am");
assertThat(call.getCaller(), not(nullValue()));
} | [
"void showAlertForInvalidNumber();",
"private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column w_payrecord.CREATE_AUTHOR | public void setCreateAuthor(String createAuthor) {
this.createAuthor = createAuthor;
} | [
"public String getCreateAuthor() {\n return createAuthor;\n }",
"public void setAuthor(String author){\n\t\tthis.author=author;\n//\t\tupdateTimestamp();\n\t}",
"public void setAuthor(String value) {\n setAttributeInternal(AUTHOR, value);\n }",
"org.apache.xmlbeans.XmlString addNewAuthor()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Rabin hash value of a ByteBuffer. | public long hash(final ByteBuffer A) {
return hash(A.asLongBuffer());
} | [
"int computeHashCode(byte val);",
"protected String hashBuffer(Buffer buffer) {\n\t\treturn FileUtils.generateSha512Sum(buffer);\n\t}",
"@Override\n public int hashCode() {\n return BufferHelper.hashCode(buffer, base, size);\n }",
"long getHash();",
"com.google.protobuf.ByteString getChunkHash(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Source file locations: compilers can pinpoint the uses of a dependency. repeated .blaze_deps.SourceLocation location = 3; | @java.lang.Override
public java.util.List<com.google.devtools.build.lib.view.proto.Deps.SourceLocation> getLocationList() {
return location_;
} | [
"com.google.devtools.build.lib.view.proto.Deps.SourceLocation getLocation(int index);",
"com.google.devtools.build.lib.view.proto.Deps.SourceLocationOrBuilder getLocationOrBuilder(\n int index);",
"java.util.List<com.google.devtools.build.lib.view.proto.Deps.SourceLocation> \n getLocationList();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The class to set on elements when selected. JavaScript Info: | public String getSelectedClass() {
return getPolymerElement().getSelectedClass();
} | [
"public Class getSelectedClass() {\n return this.selectedClass;\n }",
"public void setSelectedClass( final Class value ) {\n final Class oldValue = this.selectedClass;\n if ( oldValue != value ) {\n this.selectedClass = value;\n firePropertyChange( \"selectedCla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the License List object in this form and as a side affect also set the total pages based on the list. | public void setLicenseList(OrderLicenses licenses) {
this.orderLicenseList = licenses;
// Save totalPages for access later by calling class
int count = licenses.getTotalRowCount();
this.displayItems = licenses.getDisplayRowCount();
int resultsPerPage = spec.getResultsPerPage();
this.totalPages = count / re... | [
"public void setLicenses(int value) {\n this.licenses = value;\n }",
"public ListForm() {\n initComponents();\n \n setMyList();\n }",
"public void setLicenseChoice() {\n licenseChoice.removeAllItems();\n licenseChoice.addItem(\" \");\n for (Vehicle vehicle:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value associated with the column: mouth_washed | public java.lang.String getMouthWashed () {
return mouthWashed;
} | [
"public void setMouthWashed (java.lang.String mouthWashed) {\n\t\tthis.mouthWashed = mouthWashed;\n\t}",
"public int getMouthPosition()\n {\n return (mouthPosition);\n }",
"public Integer getMouthCount() {\n return mouthCount;\n }",
"public Winner whoWins(){\r\n\r\n /* transfer t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns list of hosts that a) match all hosting requirements and b) have the same WTP server annotations as the srcUnit | public List getPossibleHosts(Unit srcUnit, Annotation annotation) {
List possibleHosts = getPossibleHosts(srcUnit);
List results = new ArrayList();
for (Iterator it = possibleHosts.iterator(); it.hasNext();) {
Unit candidate = (Unit) it.next();
List annotations = candidate.getAnnotations();
for (It... | [
"public List getPossibleHosts(Unit srcUnit) {\r\n\r\n\t\tList results = new ArrayList();\r\n\r\n\t\t//IDeployResolutionContext context = new DeployResolutionContext( null, null );\r\n\t\t//DeployValidatorService dvs = context.getDeployValidatorService();\r\n\t\tDeployValidatorService dvs = new DeployValidatorServic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct the feature model for script analysis given the specified set of required analyzers. It is by design that the language and script models are essentially identical. This allows for the best reuse of analyzer output and feature data between the language/script phases. | public static FeatureModel<Script> getScriptModel(Set<AnalyzerId> requiredAnalyzers) {
FeatureModel<Script> model = new FeatureModel<>(newScriptFeature(SCRIPT_OUTPUT));
model.addInputFeature(new IntegerFeature(BINARY_SIZE));
model.addInputFeature(newEncodingFeature(DETECTED_ENCODING));
a... | [
"public static FeatureModel<Language> getLanguageModel(Set<AnalyzerId> requiredAnalyzers) {\n FeatureModel<Language> model = new FeatureModel<>(newLanguageFeature(LANGUAGE_OUTPUT));\n model.addInputFeature(new IntegerFeature(BINARY_SIZE));\n model.addInputFeature(newEncodingFeature(DETECTED_ENC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches the RelationshipDefinition for the attribute with the given name within the given class | @Deprecated
public RelationshipDefinition getDictionaryRelationship(Class<?> dataObjectClass, String attributeName); | [
"public Relation getRelation(String relationName);",
"private Relation getAssociatedClassRelation(IClass associatedClass) {\r\n\t\tif (associatedClass.existsInheritance()) {\r\n\t\t\treturn associatedClass.inheritanceRelation();\r\n\t\t} else {\r\n\t\t\treturn associatedClass.relation();\r\n\t\t}\r\n\t}",
"E ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates JavaFile based on Uri | public static JavaFile fromUri(Uri uri) {
return fromString(uri.getPath());
} | [
"FileURI createFileURI();",
"@Test\n public void createFile(){\n try\n {\n URI uri = new URI(\"http://www.yu.edu/documents/doc390\");//given the complete uri\n String path = uri.getAuthority() + this.disectURI(uri);//get the Path which is www.yu.edu\\documents\n File file = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the log type. | public String getLogType() {
return logType;
} | [
"public String getLogType()\n\t{\n\t\treturn logType;\n\t}",
"public String getLogType() {\n return logType;\n }",
"public Integer getLogtypeid() {\r\n\t\treturn logtypeid;\r\n\t}",
"public String logFileType() {\n return this.logFileType;\n }",
"long getLogtypeid();",
"public long get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
load visualisation api ... before loading any panels.. | private void loadVisualisationApi() {
VisualizationUtils.loadVisualizationApi(new Runnable() {
public void run() {
// EventLogger.logEvent("org.wwarn.surveyor.client.Surveyor", "onModuleLoad", "begin");
// ensure that data provider onload is called as early as possible... | [
"public static void runVisualization(){\n window.initializeVisualization();\n }",
"public ImportGermplasmVisualPanel1() {\n initComponents();\n }",
"protected void refreshVisuals() {\n super.refreshVisuals();\n refreshVisibility();\n }",
"public DataVisualizerPanel() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize this ATMMaintenanceRole with a username, a bank, and a privilege factory. | public ATMMaintenanceRole(String username, Bank bank, PrivilegeFactory privilegeFactory) {
super(name, username, bank, privilegeFactory);
} | [
"public ATM() {\n usuarioAutenticado = false; // al principio, el usuario no está autenticado\n numeroCuentaActual = 0; // al principio, no hay número de cuenta\n pantalla = new Pantalla(); // crea la pantalla\n teclado = new Teclado(); // crea el teclado\n dispensadorEfectivo = n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column usercontroller_ebay_account.ebay_token | public void setEbayToken(String ebayToken) {
this.ebayToken = ebayToken == null ? null : ebayToken.trim();
} | [
"public String getEbayToken() {\r\n return ebayToken;\r\n }",
"void setSecretToken(String secretToken);",
"public void setPaymentMethodToken(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, PAYMENTMETHODTOKEN,value);\n\t}",
"public void setToken(){\n final Authenticati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function, for each reference address, returns the closest of the interest addresses. Info for each address is displayed in infoWindows | public static void pinClosestAddress(HashMap<String, Object> argVals,HashMap<String, Object> retVals){
LinkedList<String> referenceAddresses = (LinkedList<String>)argVals.get("referenceAddress");
LinkedList<String> interestAddresses = (LinkedList<String>)argVals.get("address");
LinkedList<String> comments = (L... | [
"public ArrayList<Record> near()\n {\n int count = 0;\n ArrayList<Record> closest = new ArrayList<>();\n System.out.println(\"Community Centres that are 5km or less to your location are: \");\n for(Record i: cCentres)\n {\n //latitude and longitude for each centre\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
By default, feature files will have an extension of ".feature" | public String getFeatureExtension() {
if (featureExtension == null) {
featureExtension = ".feature";
}
if (!featureExtension.startsWith(".")) {
featureExtension = "." + featureExtension;
}
return featureExtension;
} | [
"public void setFeatureExtension(String featureExtension) {\n this.featureExtension = featureExtension;\n }",
"Feature feature(String featureName);",
"public interface FeatureFileUtils {\n\n\t/**\n\t * @param path The path to check for feature files\n\t * @param featureGroup The name of the feature ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
static method which buuild a list fo cert info skipping the none cert aliases. | static private List<CertificateInfoRestModel> getCertificateInfoRestModels(ArtifactWebstartAddon webstartAddon) {
List<CertificateInfoRestModel> certs = Lists.newArrayList();
try {
KeyStore keyStore = webstartAddon.getExistingKeyStore();
if (keyStore != null) {
En... | [
"java.util.List<yandex.cloud.api.iot.devices.v1.DeviceOuterClass.DeviceCertificate> \n getCertificatesList();",
"public synchronized Vector getX509CertList() throws GeneralSecurityException {\n\tif (certList == null) {\n certList = \n PureTLSUtil.certificateChainToVector(getCertif... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tests the method testMoveDir(). | @Test
public void testMoveDir() {
int yExpected = this.element.getPosition().getY()+1;
this.element.move(Direction.Down);
Assert.assertEquals(yExpected, this.element.getPosition().getY());
} | [
"public void testMove()\n {\n //TODO\n }",
"@Test\n public void testMoveFolder() {\n System.out.println(\"moveFolder\");\n String folderToMove = \"\";\n String destinationFolder = \"\";\n FileSystemStorage instance = null;\n instance.moveFolder(folderToMove... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the final element of the list of hops in this route, or null, if the list of hops is empty. | public TCSObjectReference<Point> getDestinationPoint() {
if (hops.isEmpty()) {
return null;
}
else {
return hops.get(hops.size() - 1);
}
} | [
"public AccessPointAdvertisement getLastHop() {\n return hops.isEmpty() ? null : hops.lastElement();\n }",
"private RecipeIngredient getBitteringHops() {\n\t\t//TODO verify the boil time is the longest, not just return first hops\n\t\tfor (RecipeIngredient ri : m_ingredientList) {\n\t\t\tif (ri.getIngre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new WorkerCoordinatorListenerSupport using the specified Executor to notify its listeners of events. | public static WorkerCoordinatorListenerSupport newListenerSupport(
Executor notificationExecutor) {
return new WorkerCoordinatorListenerSupport(notificationExecutor);
} | [
"public CoordinatorConfig withExecutor(Executor executor) {\n setExecutor(executor);\n return this;\n }",
"protected EventExecutorFactory getExecutorFactory() {\n\t\treturn executorFactory;\n\t}",
"public abstract java.util.concurrent.Executor getExecutor();",
"public ExecutorProxy(final ExecutorServic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the modified date of this content holder. | @Override
public java.util.Date getModifiedDate() {
return _contentHolder.getModifiedDate();
} | [
"public Date getMODIFIED_DATE() {\r\n return MODIFIED_DATE;\r\n }",
"public String getDatemodified() {\n\t\treturn datemodified;\n\t}",
"public java.lang.String getModifiedDate() {\r\n return modifiedDate;\r\n }",
"@Override\n\tpublic java.util.Date getModifiedDate() {\n\t\treturn _ext_inf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get I2C Master interrupt status. This bit automatically sets to 1 when an I2C Master interrupt has been generated. For a list of I2C Master interrupts, please refer to Register 54. The bit clears to 0 after the register has been read. | public boolean getIntI2CMasterStatus() {
buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_INT_STATUS, MPU6050_Registers.MPU6050_INTERRUPT_I2C_MST_INT_BIT);
return buffer[0] == 1;
} | [
"public boolean getIntI2CMasterEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_INT_ENABLE, MPU6050_Registers.MPU6050_INTERRUPT_I2C_MST_INT_BIT);\n return buffer[0] == 1;\n }",
"public boolean getInterruptLatch() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Reg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new ClientStatus, a new id will be generated for it. | public ClientStatus createClientStatus(ClientStatus status) throws ClientManagerException {
String method = "createClientStatus(ClientStatus status)";
Helper.logEntranceInfo(getLog(), CLASSNAME, method, new String[] {"clientStatus"}, new String[] {Helper
.formatClientStatus(status)}... | [
"public OauthClientsRecord(UInteger id, UByte status, String name, String clientId, String clientSecret, String template, String ip, String url, String scope) {\n super(OauthClients.OAUTH_CLIENTS);\n\n set(0, id);\n set(1, status);\n set(2, name);\n set(3, clientId);\n set(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Write a program that asks user to enter 3 int numbers Then, find average of those 3 numbers Test Data: 5 25 60 Expected result: Average of 5, 25 and 60 is = 30 PSEUDO CODE: 1.Create a Scanner Object to get input from user 2.Ask user to enter numbers and store those answers in proper variables 3.Find average of given ... | public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Please enter 3 numbers: ");
int num1 = scanner.nextInt(), num2 = scanner.nextInt(), num3 = scanner.nextInt();
System.out.println("Average of " + num1 + ", " + num2 + ", and " + num3 ... | [
"public static void average(){\r\n\t\t//create a sccanner for input\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tdouble numInput,numTotal=0;\r\n\t\tint numNums=0;\r\n\t\t//ask the user for a number until they enter 0\r\n\t\twhile (true){\r\n\t\t\t//create ask the user for the amount\r\n\t\t\tSystem.out.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XReturnExpression__Group__0" $ANTLR start "rule__XReturnExpression__Group__0__Impl" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15831:1: rule__XReturnExpression__Group__0__Impl : ( () ) ; | public final void rule__XReturnExpression__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:15835:1: ( ( () )... | [
"public final void rule__XReturnExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:10416:1: ( rule__XReturn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Code describing the language used in the generated markup for this component. | @Attribute(passThrough = true,
description = @Description(
value = "Code describing the language used in the generated markup for this component.",
displayName = "Language Code"))
String getLang(); | [
"java.lang.String getLanguage();",
"protected String getLanguage() {\r\n switch (language) {\r\n case XPATH:\r\n return \"XPath\";\r\n case XSLT_PATTERN:\r\n return \"XSLT Pattern\";\r\n case SEQUENCE_TYPE:\r\n return \"SequenceT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the hash code of the given map. The hash code of the given map is calculated as the sum of its entries. The hash code of an entry is calculated as the hash code of the following string: hash_of_key>hash_of_value. The substrings hash_of_key and hash_of_value are calculated as regular objects. | private static int getHashOfMap(
HashSet<Class> pre, Object mapObj, int prevDepth) {
if (!(mapObj instanceof Map)) {
logger.error("The given object (" + mapObj + ") of class " +
mapObj.getClass() + " is not a map.",
new IllegalStateException());
Runtime.getRuntime()... | [
"public int hashcode();",
"@Override\n public int hashCode() {\n int hash = size;\n for (byte key : keys) {\n // 0 can be a valid key or unused slot, but won't impact the hashcode in either case.\n // This way we can use a cheap loop without conditionals, or hard-to-unroll o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get WAN IP address of this computer | public static String getWANIP() {
URL whatismyip = null;
BufferedReader in = null;
try {
whatismyip = new URL("http://checkip.amazonaws.com");
in = new BufferedReader(new InputStreamReader(whatismyip.openStream()));
String ip = in.readLine();
return i... | [
"private String getWifiIP()\n {\n WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);\n @SuppressWarnings(\"deprecation\")\n String ip = Formatter.formatIpAddress(wm.getConnectionInfo().getIpAddress());\n return ip;\n }",
"private String getWifiIPAddress() {\n\t\tWifiM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getShortTitle get locale specific short title for menu element from metadata | public String getShortTitle(Locale locale)
{
// return definition short title for preferred locale
String title = definition.getShortTitle(locale);
if (title != null)
{
return title;
}
// return node or default short title for preferred locale
ret... | [
"public String getTitleAndShortname() {\n StringBuilder sb = new StringBuilder();\n if (eml != null) {\n sb.append(eml.getTitle());\n if (!shortname.equalsIgnoreCase(eml.getTitle())) {\n sb.append(\" (\").append(shortname).append(\")\");\n }\n }\n return sb.toString();\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a part of a draft that should be sent is too big. The syncer will continue syncing the other requested items. | public abstract void draftPartTooBig(long convId, @NonNull DraftPart part, long currentSize, long maxSize); | [
"private void checkSize() {\n if (currentStream == null) {\n throw new IllegalStateException(\"The stream is closed and cannot be written to.\");\n }\n if (currentStream.size() > partSize) {\n ConvertibleOutputStream newStream = currentStream.split(partSize, getStreamAllocatedSize());\n uplo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "totalResults" attribute | public boolean isSetTotalResults()
{
synchronized (monitor())
{
check_orphaned();
return get_store().find_attribute_user(TOTALRESULTS$4) != null;
}
} | [
"boolean isSetNumberOfResults();",
"public boolean isSetResults() {\n return this.results != null;\n }",
"public boolean hasResults()\n\t\t{\n\t\t\tfor(Object value : values)\n\t\t\t\tif(! (value instanceof HasResults))\n\t\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}",
"public Long getTotalResults() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the id business. | public void setIdBusiness(String idBusiness) {
this.idBusiness = idBusiness;
} | [
"public void setIdBusiness( Long idBusiness ) {\n this.idBusiness = idBusiness;\n }",
"public void setId() {\n this.id = id;\r\n }",
"public void setBusinessId(Integer businessId) {\n this.businessId = businessId;\n }",
"public void setId(Long id) ;",
"public void asigneIDColabolador... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /serviceformfields : get all the serviceFormFields. | @GetMapping("/service-form-fields")
@Timed
public List<ServiceFormFieldDTO> getAllServiceFormFields() {
log.debug("REST request to get all ServiceFormFields");
return serviceFormFieldService.findAll();
} | [
"public Set<FormField> getFormFields() {\n return formFieldSet.getFormFields(tabName);\n }",
"public TicketFieldList getTicketFields();",
"public ResourceFieldSchema[] getFields() {\n return fields;\n }",
"public DialogFields getFields() {\r\n return fields;\r\n }",
"public Lis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var201' field. | public java.lang.Double getVar201() {
return var201;
} | [
"public java.lang.Double getVar201() {\n return var201;\n }",
"public java.lang.CharSequence getField201() {\n return field201;\n }",
"public java.lang.CharSequence getField201() {\n return field201;\n }",
"public java.lang.CharSequence getVar198() {\n return var198;\n }",
"public ja... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AbstractValue__Alternatives" $ANTLR start "superSingleValue__Alternatives" InternalCommunicationObject.g:901:1: superSingleValue__Alternatives : ( ( ( superSingleValue__Group_0__0 ) ) | ( ( superSingleValue__Group_1__0 ) ) | ( ( superSingleValue__Group_2__0 ) ) | ( ( superSingleValue__Group_3__0 ) ) |... | public final void superSingleValue__Alternatives() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCommunicationObject.g:905:1: ( ( ( superSingleValue__Group_0__0 ) ) | ( ( superSingleValue__Group_1__0 ) ) | ( ( superSingleValue__Group_2__0 ) ) | ... | [
"public final void rule__SingleValue__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCommunicationObject.g:779:1: ( ( ( rule__SingleValue__Group_0__0 ) ) | ( superSingleValue ) )\n int alt3=2;\n al... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the previously loaded axiom by id so that it can be removed from the set of axioms on the concept | public void removeAxiom(String referencedComponentId, String id) {
OWLAxiom owlAxiomToRemove = axiomsById.remove(id);
if (owlAxiomToRemove != null) {
conceptAxiomMap.get(parseLong(referencedComponentId)).remove(owlAxiomToRemove);
}
} | [
"Concept getConcept(String id);",
"@Override\n public void removeGeneralConceptAxiom(Long id) throws Exception {\n Logger.getLogger(getClass()).debug(\"Content Service - remove axiom \" + id);\n\n removeComponent(id, GeneralConceptAxiomJpa.class);\n\n }",
"public void removeAIObject(String id) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define o atributo numAvisoSacado | public void setNumAvisoSacado(Integer numAvisoSacado) {
this.numAvisoSacado = numAvisoSacado;
} | [
"public void setAno(int ano) {\n this.ano = ano;\n }",
"public void setNumeroAgencia(int value) {\n this.numeroAgencia = value;\n }",
"public void setAnioNacimiento(int AnioNacimiento)\r\n {\r\n this.AnioNacimiento = AnioNacimiento;\r\n }",
"public void setTotaleAnni(i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the PremOpsELPOverride field. ELP Override | @gw.internal.gosu.parser.ExtendedProperty
public java.math.BigDecimal getPremOpsELPOverride(); | [
"@java.lang.Override\n public java.lang.String getIpOverride() {\n java.lang.Object ref = ipOverride_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the listPrestacao value for this TItemRetornoVendaDia. | public com.bonsucesso.servipa.ws.TPrestacao[] getListPrestacao() {
return listPrestacao;
} | [
"public void setListPrestacao(com.bonsucesso.servipa.ws.TPrestacao[] listPrestacao) {\n this.listPrestacao = listPrestacao;\n }",
"public List<Tarefa> getListaTarefasPorPrioridade() {\n return lista.listaTarefasPorPrioridade();\n }",
"public int getNrPrestacao() {\n return nrPrestacao... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Main method that carries out all the methods from the MeasurementConverter class when called. | public static void main (String [] args)
{
// Variables stated that will be used in the methods below.
double inAmount;
char menuChoice;
// A new object called myMeasurement is created for this driver and then
// a instance of the no-args constructor from MeasurementConv... | [
"public static void main(String[] args) {\n DataConverter dc = new DataConverter();\n }",
"public static void main(String[] args) {\n\t\t// create the object and GUI\n\t\tUnitConverter unit = new UnitConverter();\n\t\tConverterUI converterUI = new ConverterUI(unit);\n\t\tconverterUI.run();\n\t}",
"public st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cannot depend on ICar which is defined in CarService, so handle binder call directly instead. | private void sendBinderCallToCarService(Parcel data, int callNumber) {
IBinder carService;
synchronized (mLock) {
carService = mCarService;
}
try {
carService.transact(IBinder.FIRST_CALL_TRANSACTION + callNumber,
data, null, Binder.FLAG_O... | [
"public interface ICarService extends IService<Car> {\n\n long createCar(HashMap<String, String> parameters, long id);\n\n /**\n * This method return all cars\n *\n * @return List of object-typed Car\n */\n List<Car> getAll();\n\n /**\n * This method return last added 4 cars\n *\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ SRS_QUERY_SPECIFICATION_BUILDER_21_007: [If the `groupBy` is not null or empty, the createSqlQuery shall add the clause `group by` with its value in the sql query.] | @Test
public void createSqlQueryWithGroupBySucceed()
{
// arrange
// act
QuerySpecification querySpecification = new QuerySpecificationBuilder("*", QuerySpecificationBuilder.FromType.ENROLLMENTS).groupBy("validGroupBy").createSqlQuery();
// assert
Helpers.assertJson(quer... | [
"private String getGroupBySubquery() {\n List<String> cols = jam.getQuotedDimensionColumns(paramsWithoutData.getDimensions());\n\n addUnique(cols, quote(ANALYTICS_TBL_ALIAS, OU));\n\n return \" group by \" + join(\",\", cols);\n }",
"@Test\n public void groupByStoreSucceed()\n {\n // arrang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for WETRN.IMG_IMPRT_DATA_MAPG.TO_VAL_TXT. The value that the Data will be changed to. | public String getToValTxt() {
return (String) getValue(3);
} | [
"public String getFromValTxt() {\n\t\treturn (String) getValue(2);\n\t}",
"public String getValue_Text() \n {\n return text;\n }",
"java.lang.String getVal();",
"public void setToValTxt(String value) {\n\t\tsetValue(3, value);\n\t}",
"public String getValueText() {\n return value... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the precedence level of the expression. The smaller the value, the higher the priority. | public int getPrecedence(){
return precedence;
} | [
"public int precedence() {\n return precedence;\n }",
"int precedence() {\n return (op < opPrecedence.length) ? opPrecedence[op] : 100;\n }",
"public Precedence precedence() {\n\treturn this.precedence;\n }",
"public int getPrecedence() {\n switch (operator) {\n case... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use ResponseContext.newBuilder() to construct. | private ResponseContext(final Builder builder)
{
super(builder);
} | [
"private HelloResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"protected abstract TResponse createResponseInstance();",
"private CallResponse() {\n initFields();\n }",
"private Response(com.google.protobuf.GeneratedMessage.Builder builder) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column tp_goods.is_on_sale | public void setIsOnSale(Boolean isOnSale) {
this.isOnSale = isOnSale;
} | [
"public void setSalestatus(Boolean salestatus) {\n this.salestatus = salestatus;\n }",
"public Boolean getIsOnSale() {\n return isOnSale;\n }",
"public void setSale(int sale) {\n\t\tthis.sale = sale;\r\n\t}",
"public void setSaleid(Long saleid) {\r\n this.saleid = saleid;\r\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a typeName for given indexName and typeName | boolean deleteType(String indexName, String typeName); | [
"boolean deleteIndex(String indexName);",
"public void deleteBy(final String indexName, final Object... args);",
"@Override\n public void deleteIndex(String indexName, String type, String docId) throws Exception {\n DeleteResponse response = client.prepareDelete(indexName, type, docId)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the row at the specified index. The table will be automatically expanded, when the given index is outside of the original table. | public Row getRowByIndex(int index) {
if (index < 0) {
throw new IllegalArgumentException("index should be nonnegative integer.");
}
// expand row as needed.
int lastIndex = getRowCount() - 1;
if (index > lastIndex) {
appendRows(index - lastIndex);
}
int result = 0;
Row row = null;
fo... | [
"static UncheckedRow getByRowIndex(NativeContext context, Table table, long index) {\n long nativeRowPointer = table.nativeGetRowPtr(table.getNativePtr(), index);\n return new UncheckedRow(context, table, nativeRowPointer);\n }",
"private TableViewRowProxy getRowByIndex(int index)\n\t{\n\t\tfor (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the StatisticsPanel class | public StatisticsPanel()
{
// Adds the check boxes to the button group
group.add(MINIMUM);
group.add(MAXIMUM);
group.add(AVERAGE);
// Adds the check boxes to the panel
statisticsPanel.add(label);
statisticsPanel.add(MINIMUM);
statisticsPanel.add(AVERA... | [
"public StatisticsWindow() {\n initComponents();\n }",
"public HistogramPanel() {\r\n initComponents();\r\n }",
"public Statistics()\n\t{\n\t}",
"public Statistics() {\n }",
"public GlobalStats()\n {\n initComponents();\n }",
"public StatisticsJFrame() {\n initComponen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the file address by the fileName (which contains the queryNum, fileNum and passNum) eg. temp/externalsort/exSortscanname1/S_A_S_B_S_C_passNum_fileNum_queryNum | private String getFileAddress(String fileName) {
StringBuilder sb = new StringBuilder();
sb.append(tempAddress);
sb.append('/');
sb.append(fileName);
return sb.toString();
} | [
"public void setFileName(java.lang.String fileName) {\n synchronized (monitor()) {\n check_orphaned();\n\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue) get_store()\n .find... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method returns the value of the database column V_RP_DY_SGSN_OVERVIEW_3G.INTER_PP_RAU_SUCR_3G | public Float getInterPpRauSucr3g() {
return interPpRauSucr3g;
} | [
"public Float getIntraPpRauSucr3g() {\r\n return intraPpRauSucr3g;\r\n }",
"public Float getInterPpRauSucrDropCau3g() {\r\n return interPpRauSucrDropCau3g;\r\n }",
"public Float getIntraPpRauSucrDropCau3g() {\r\n return intraPpRauSucrDropCau3g;\r\n }",
"public Float getIntraRauSu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Annotation__FqnAssignment_1" $ANTLR start "rule__Annotation__AnnotationParamatersAssignment_2" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:9466:1: rule__Annotation__AnnotationParamatersAssignment_2 : ( ruleAnnota... | public final void rule__Annotation__AnnotationParamatersAssignment_2() 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/InternalFracta... | [
"public final void rule__Annotation__Group__2__Impl() 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/InternalFractal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Add a list of categories from the api into database. | public Flowable<List<Category>> addCategories(List<Category> categories) {
return executeTransaction((bgRealm, subscriber) -> {
bgRealm.copyToRealmOrUpdate(categories);
});
} | [
"private void updateCategories() {\n\n ArrayList<Category> categories=categoriesController.getAllCategories();\n\n if(categories!=null){\n\n if(categories.size()>0){\n\n deleteAllCategories(); // delete table info if there is new data\n\n for(int i=0; i<categor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize a new trafficlight with an id and how many lights the trafficlight has. | public TrafficLight(int id, int numberOfLights) {
this.id = id;
this.numberOfLights = numberOfLights;
//random light color
setCurrentColor(createRandomNumber(3) + 1);
} | [
"public TrafficLight(int id, int numberOfLights) {\n this.id = id;\n this.lightAmount = numberOfLights;\n }",
"public void addLight(int id) {\n\tif(!lights.containsKey(id)) {\n\t lights.put(id, true);\n\t GL11.glEnable(id);\n\t}\n }",
"public Light(int i) {\r\n this(i, DEFAULT_POSIT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res); | public static native void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(long _res); | [
"public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long _res);",
"public static native void CResult_CVec_SignatureZNoneZ_free(long _res);",
"public static native void CResult_SignatureNoneZ_free(long _res);",
"public static native void CVec_SignatureZ_free(byte[][] _res);",
"public static nat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Se definen los atributos del boss | public void initBoss(){
this.setHP(200);
this.setCreated(false);
} | [
"private void setAtributos(){\n\t\tBanco.setBanco(banco.getText());\n\t\tBanco.setPorta(porta.getText());\n\t\tBanco.setHost(host.getText());\n\t\tBanco.setUsuario(usuario.getText());\n\t\tBanco.setSenha(senha.getText());\n\t}",
"private void setBossTraits() {\n\t\tif (name.equals(\"Tristan\")) {\n\t\t\tspecialAt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ amplification of io.protostuff.TailDelimiterTesttestEmptyFoo | @org.junit.Test(timeout = 10000)
public void testEmptyFoo_add21626() throws java.lang.Exception {
java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();
foos.add(new io.protostuff.Foo());
foos.add(new io.protostuff.Foo());
java.io.ByteArrayOutputS... | [
"@Test\n void tailingSeparator() {\n Assertions.assertEquals(1, \"a \".split(\" \").length);\n }",
"public void testIsAtEnd() {\n assertTrue(test1.isAtEnd());\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertFalse(test1.isAtEnd())... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |