query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
/ decipher text/char based on the key | char decipher(int charToDeCipher); | [
"public String decrypt(String key);",
"public String decipher(final String cipherText, final VigenereKey key) {\n int[] cipherTextInts = codingSystem.stringToIntArray(cipherText);\n int[] clearTextInts = new int[cipherText.length()];\n\n for (int i = 0; i < cipherTextInts.length; i++) {\n clearTextI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the presence property. | public int getPresence() {
return presence;
} | [
"public PresenceStatus getPresenceStatus()\n {\n return presenceStatus;\n }",
"PresenceStatus getPresenceStatus();",
"public PresenceStatus getPresenceStatus()\n {\n return currentStatus;\n }",
"public PresenceStatus getPresenceStatus()\n {\n return currentStatus;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the float array stored in the node specified by the parameter name. | public float[] getFloatArray(String name) {
DNNode node = getNode(name);
if (node == null) throw new NoSuchNodeException(NoSuchNodeException.NODE_NOT_FOUND);
if (node.length >= 0) {
if (node.typ == DNHelper.FLOAT) {
return (float[]) node.value;
} else {
throw new NoSuchNodeException(NoSuchNodeExcept... | [
"@Override\n public float[] getFloats(String name)\n {\n float[] result = null;\n String value[] = getParam(name);\n if (value != null)\n {\n result = new float[value.length];\n for (int i = 0; i < value.length; i++)\n {\n Number numb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates smallest power of number 2 bigger or equal to input value. If number is bigger than 2^30 or smaller than 1, an exception is thrown. | private int smallestPowerOf2BiggerOrEqualTo(int n) {
if (n < 1 || n > MAX_POWER_OF_2_FOR_INTEGER) {
throw new IllegalArgumentException();
}
n--;
int powerOfTwo = 1;
while (n != 0) {
n /= 2;
powerOfTwo *= 2;
}
return powerOfTwo;
} | [
"public static int findMinimumPowerOfTwo(final int num) {\r\n int ret = 1;\r\n while (ret < num) {\r\n ret <<= 1;\r\n }\r\n return ret;\r\n }",
"private static int getClosestPowerOf2(int value) {\n if (value <= 0)\n throw new IllegalArgumentException(\"Undefined f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply crossover to this child | public abstract void applyCrossover(int[] crossovers, int idx, AbstractGType parent1, AbstractGType parent2); | [
"public void setCrossover(Crossover crossover) {\n this.crossover = crossover;\n }",
"public void crossover() {\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n this.crossoverOX();\n } else {\n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the Secure Weakest Link (SWL) Primary Metric and its subceeded values in the csv file. | private void generateSWL() {
try {
// Primary Metric Secure Weakest Link (SWL)
csvWriter.append(",,Secure Weakest Link (SWL),,,");
// Project Level
csvWriter.append(String.valueOf(calc.getPrimaryMetrics().getSecureWeakestLink()) + ",");
csvWriter.append("\n");
// Generate the associated Seconda... | [
"private void generateGLP() {\n\t\ttry {\n\t\t\t// Primary Metric Grant Least Privilege (GLP)\n\t\t\tcsvWriter.append(\",,Data Access Metric (DAM),,,,\");\n\t\t\t// For each class in the project\n\t\t\tfor(String key: classNames) {\n\t\t\t\tcsvWriter.append(String.valueOf(calc.getPrimaryMetrics().getGrantLeastPrive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Eostoken'. | Eostoken createEostoken(); | [
"Bostoken createBostoken();",
"public Token() {\r\n\t}",
"public Token() {\n }",
"AbstractToken createAbstractToken();",
"public APIToken() {\n super();\n }",
"public TokenPO() {\n\t}",
"public Token newToken() {\r\n\t\tString value = UUID.randomUUID().toString();\r\n\t\treturn new Token(valu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for Renwal_Grace using the alias name RenwalGrace. | public Integer getRenwalGrace() {
return (Integer) getAttributeInternal(RENWALGRACE);
} | [
"public void setRenwalGrace(Integer value) {\n setAttributeInternal(RENWALGRACE, value);\n }",
"public java.lang.Integer getAward () {\n\t\treturn award;\n\t}",
"public String getWash() {\n return (String)getAttributeInternal(WASH);\n }",
"public java.lang.String getLiabilityApportionment(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for property moduleName. | public void setModuleName(java.lang.String moduleName) {
this.moduleName = moduleName;
} | [
"public void setModuleName (String moduleName)\n\n {\n\n // moduleName is set equal to moduleName.\n this.moduleName = moduleName;\n\n }",
"public void setModuleName(ModuleName moduleName) {\r\n this.moduleTypeInfo = owner.getPerspective().getMetaModule(moduleName).getTypeInfo();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field csbodyform is set (has been assigned a value) and false otherwise | public boolean isSetCsbodyform() {
return __isset_bit_vector.get(__CSBODYFORM_ISSET_ID);
} | [
"public boolean isSetBody() {\n return this.body != null;\n }",
"public boolean isSetFormKey() {\n return this.formKey != null;\n }",
"public boolean isFormField() {\n return isFormField;\n }",
"public boolean isForm();",
"public boolean isSetBatchForm() {\n return this.batchForm ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new stream specification given its name, a list of variables, and a list of functions. | public StreamSpec(FEContext context, int type, StreamType st,
String name, List params, List<FieldDecl> vars, List<Function> funcs)
{
this(context, type, st, name, params, vars, funcs, false);
} | [
"public StreamSpec(FEContext context, int type, StreamType st,\n String name, List params, List<FieldDecl> vars, List<Function> funcs, boolean stateful)\n {\n super(context);\n this.type = type;\n this.st = st;\n this.name = name;\n this.params = params;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should check valid php extensions. | @Test
public void shouldCheckDefaultValidPhpExtensions() {
Configuration configuration = mock(Configuration.class);
Php.PHP.setConfiguration(configuration);
when(configuration.getStringArray(PhpPlugin.FILE_SUFFIXES_KEY)).thenReturn(null);
assertTrue(Php.hasValidSuffixes("goodExtension.php"));... | [
"public boolean validExtension(String what) {\n String[] ext = getExtensions();\n for (int i = 0; i < ext.length; i++) {\n if (ext[i].equals(what)) return true;\n }\n return false;\n }",
"public void validateFileExtensions() {\n validFileExtensions.forEach((subDir, __) -> validateInDir(su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the branch count for the entire source code file. | public int getBranchCount() {
return this.branchCount;
} | [
"public int getBranchCount() { return _brcnt; }",
"int getSourceFileCount();",
"int getSourceLineCount();",
"public int getBranchGraphCount() {\n return symbolTable.getBranchGraphCount();\n }",
"public int getSourceLineCount() {return counts.sourceCount;}",
"int getPosCounter(long branchId);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read in a word component from the StreamTokenizer passed. Throws a StreamCorruptedException iff the token read in was not of type 'StreamTokenizer.TT_WORD'. | public static String parseWord(StreamTokenizer stok, String description)
throws IOException {
// 1. Get the next token
token = stok.nextToken();
// 2. Check whether it was of type WORD
if (token != StreamTokenizer.TT_WORD)
formatException("String value for " + description + " expected", stok);
... | [
"private String readNextWord(StreamTokenizer st)\n\t{\n\t\ttry\n\t\t{\n\t\t\tswitch (st.nextToken())\n\t\t\t{\n\t\t\tcase StreamTokenizer.TT_WORD:\n\t\t\t\treturn st.sval;\n\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Expecting a string in readNextWord().\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tcatch (IOEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get next item to play. | int nextItem(IPlaylist playlist, int itemIndex); | [
"private void playNext() {\n //Log.d(TAG, \"Play Next!\");\n if (mode == 0) {\n current++;\n current = current > (songList.size() - 1) ? 0 : current; // current trun to 0 position if current > max\n currentSongId = songList.get(current).getId();\n play(0);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.StoreChunk storeChunkMsg = 1; | edu.usfca.cs.dfs.StorageMessages.StoreChunk getStoreChunkMsg(); | [
"public boolean hasStoreChunkMsg() {\n return msgCase_ == 1;\n }",
"boolean hasStoreChunkMsg();",
"public boolean hasStoreChunkMsg() {\n return msgCase_ == 1;\n }",
"public boolean hasStoreChunkResponse() {\n return msgCase_ == 8;\n }",
"public boolean hasStoreChunkResponse() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invalidate the options menu on an activity | public static void invalidateOptionsMenu(Activity act)
{
try {
itsInvalidateOptionsMenuMeth.invoke(act);
}
catch (Exception e) {
PasswdSafeUtil.showFatalMsg(e, act);
}
} | [
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n menu.removeItem(R.id.action_settings);\n return super.onPrepareOptionsMenu(menu);\n }",
"private void resetUI() {\n mDeviceFragment.setContextMenuEnabled(true);\n mDeviceFragment.setCheckBoxesVisible(false);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rolls the multiplier die | public int rollMult(){
return dieClass.rollMultiplier();
} | [
"public void rollDie(){\r\n\t\tthis.score = score + die.roll();\r\n\t}",
"public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}",
"public void roll() {\r\n\t\t// Create a random object.\r\n\t\tRandom rand = new Random();\r\n\t\t\r\n\t\t// Get a random value for the die.\r\n\t\tvalue = rand... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 point32 = 52; | int getPoint32(); | [
"public int getPoint32() {\r\n return point32_;\r\n }",
"public int getPoint32() {\r\n return point32_;\r\n }",
"boolean hasPoint32();",
"public Point32() {\n\t\tthis(0, 0, 0);\n\t}",
"int getTestFixed32();",
"int getInt32Value();",
"public int getFixedPoint(int c);",
"int getTestS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getSfc method, of class Regime. | @Test
public void testGetSfc() {
System.out.println("getSfc");
Regime instance = r1;
double expResult = 8.2;
double result = instance.getSfc();
assertEquals(expResult, result, 0.0);
} | [
"@Test\n public void testSetM_sfc() {\n System.out.println(\"setM_sfc\");\n double sfc = 9.5;\n Regime instance = new Regime();\n instance.setM_sfc(sfc);\n double result=instance.getSfc();\n double expResult=9.5;\n assertEquals(expResult, result, 0.0);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensures that the following use case works as expected : We have a DAnalysis My.aird referencing a semantic resource with some hierarchy (A B C) and containing 3 representations (one on A, one on B, one on C); control B with representationB => test references and representation moving ; control C without its representat... | public void testControlBWithItsRepresentationAndThenControlC() throws Exception {
if (TestsUtil.shouldSkipUnreliableTests()) {
/*
* Can cause a timeout.
*/
return;
}
// Step 1 : opening a session on My.aird (referecing My.ecore)
openNonCo... | [
"public void testControlBAndThenCWithTheirRepresentations() throws Exception {\n // Step 1 : opening a session on My.aird (referecing My.ecore)\n openNonControlledSession();\n\n // Step 2 : we make sur that files My.ecore and My.aird exists\n // and that the aird has not be controled yet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dump an error message in a useful way | public void dumpErr(final String msg); | [
"public static String getErrorsAsString() {\n StringBuffer buffer = new StringBuffer();\n buffer.append(\"Hocket: \" + errors[0]);\n buffer.append(\"\\nDensity: \" + errors[1]);\n buffer.append(\"\\nSyncopation: \" + errors[2]);\n buffer.append(\"\\nBalance: \" + errors[3]);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests ObjectNodesetIsNameVisible(boolean) for accuracy. It verifies ObjectNodesetIsNameVisible(boolean) is correct. | public void testSetIsNameVisible() {
objectNode.setIsNameVisible(false);
assertFalse("Failed to set the name visible correctly.", objectNode.getIsNameVisible());
} | [
"public void testGetIsNameVisible() {\n assertTrue(\"Failed to get the name visible correctly.\", objectNode.getIsNameVisible());\n }",
"@Test\r\n public void testSetVisible() {\r\n System.out.println(\"setVisible\");\r\n boolean visible = false;\r\n Dragon instance = new Dragon(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method uses a nested forloop to go through all the location to find the first car that is leaving the garage. | private Car getFirstLeavingCar() {
for(int floor = 0; floor < getNumberOfFloors(); floor++) {
for(int row = 0; row < getNumberOfRows(); row++) {
for(int place = 0; place < getNumberOfPlaces(); place++) {
Location location = new Location(floor, row, place);
... | [
"public void findRide(Car car) {\n\n boolean rideFound = false; //initalise a boolean called ridefound, this will determine when we have found rides for our cars.\n Ride selectedRide = null; //initalise a Ride type that can.\n\n for (Ride ride : rideList) { //for each object of ride in the ride... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use HSAdventureBuyConditionRet.newBuilder() to construct. | private HSAdventureBuyConditionRet(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private HSAdventureBuyCondition(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private HSAdventureNewConditionRet(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unkn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A setter for class field adminusername | public void setAdminUsername(String adminUsername) {
this.adminUsername = adminUsername;
} | [
"public String getAdminUsername() {\n\treturn adminUsername;\n}",
"public void setAdmin (User admin) {\r\n this.admin = admin;\r\n }",
"public void setUsername(String value) {\r\n username = value;\r\n }",
"public void setUsername(String username);",
"public void setUsernameFieldName(fin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a new FolderDeploymentDescriptor. | public FolderDeploymentDescriptor(ComponentDeploymentManager cdm)
{
super(cdm);
} | [
"DeploymentDescriptor createDeploymentDescriptor();",
"Folder createFolder();",
"public DeploymentPlanArchive() {\n }",
"public InstallationPathDescriptor() {\n this(new InstallationPathIterator());\n }",
"private void createTabFolderComposite( Composite parent )\n {\n // Creating the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. | @Schema(required = true, description = "An identifier that is unique for the respective type within a VNF instance, but may not be globally unique. ")
public String getId() {
return id;
} | [
"String getTypeID();",
"UniqueType createUniqueType();",
"short uniqueAddressTypeId();",
"public interface UniqueIdentifier {\n\n /**\n * Every unique identifier must be scoped within the dataset key.\n *\n * @return the UUID of the dataset for the identified occurrence\n */\n UUID getDatasetKey();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new LYardDao with an attached configuration | public LYardDao(Configuration configuration) {
super(LYard.L_YARD, cn.vertxup.lbs.domain.tables.pojos.LYard.class, configuration);
} | [
"public LYardDao() {\n super(LYard.L_YARD, cn.vertxup.lbs.domain.tables.pojos.LYard.class);\n }",
"public LoanDao(Configuration configuration) {\n super(Loan.LOAN, com.klichota.jooqdemo.boundary.perstitence.tables.pojos.Loan.class, configuration);\n }",
"public RentalDao(Configuration config... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new local presence announcer service. | public LocalPresenceAnnouncerService() {
} | [
"public PresenceService createPresenceService(String id, PresenceBasicStatus basicStatus, String contact);",
"public interface PresenceService extends Service\r\n{\r\n /**\r\n * The module class ID for the Presence class of service.\r\n Module Class ID: urn:jxta:uuid-9B66496088724DA98139DABD163B635B05\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__InlineEnumerationType__Group__1" $ANTLR start "rule__InlineEnumerationType__Group__1__Impl" InternalCommunicationObject.g:2977:1: rule__InlineEnumerationType__Group__1__Impl : ( ( rule__InlineEnumerationType__ArrayAssignment_1 )? ) ; | public final void rule__InlineEnumerationType__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCommunicationObject.g:2981:1: ( ( ( rule__InlineEnumerationType__ArrayAssignment_1 )? ) )
// InternalCommunicationObject.g:... | [
"public final void rule__InlineEnumerationType__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:2409:1: ( ( ( rule__InlineEnumerationType__ArrayAssignment_1 )? ) )\n // InternalTaskDefinitio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads a specified number of unique random numbers in object Note: This method overwrites all data in the array up to the number of randoms requested Note: If requested number of randoms is greater than the array capacity, the array is resized Note: Size is set to number of random numbers requested Exceptional Condition... | public boolean loadUniqueRandoms ( int numRands, int lowLimit,
int highLimit )
{
int index;
int uniqueRandom;
double range = highLimit - lowLimit + 1;
// Testing the exceptional Condition.
if ( range >= numRands )
{
... | [
"public void generateRandomArray() {\n for (int i = 0; i < arraySize; i++) {\n // Random number 10 through 19\n theArray[i] = (int) (Math.random() * 10) + 10;\n }\n\n }",
"public Integer[] randomizeObject(int inputSize){\n Integer[] list = new Integer[inputSize];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Forwards collision detection query to associated shape. If one the shapes of one of the MovingEntity instances is null, returns false and prints error. Because of double dispatch pattern, Shape of the MovingEntity s passed in is the Shape who's collides algorithm is executed. Note: this is only collision detection, b... | public boolean collides(MovingEntity s) {
if (_shape != null && s.getShape() != null)
return _shape.collides(s.getShape());
return false;
} | [
"protected abstract boolean doHandleCollision(E movingEntity,\n Entity otherEntity,\n T game)\n throws CollisionException;",
"public boolean collidesWith(AnyShape shape2) {\n Shape collisionArea = Shape.i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Entrypoint is a template reference to the starting point of the workflow | public String getEntrypoint() {
return entrypoint;
} | [
"EntryPoint createEntryPoint();",
"public EntryPoint getEntryPoint() {\r\n\t\treturn entryPoint;\r\n\t}",
"public interface EntryPoint extends PrioritizedExtension, Startable, Stoppable {\n enum ContextEntries {\n ARGS,\n KERNEL, // may not always exist\n ENTRY_POINTS,\n RUNNING_ENTRY_POINTS,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the allowed Priviledges for all principals to the given list. Existing priviledges must be removed or updated as required so that the given list is the complete list for this resource | void setAccessControlList(Map<Principal, List<Priviledge>> privs); | [
"void setPolicies(List<Policy> policyList);",
"public void setPrivilegeList(List<Privilege> privilegeList) {\r\n this.privilegeList = privilegeList;\r\n }",
"public void setAllowlistedRestrictedPermissions(\n @NonNull List<String> allowlistedRestrictedPermissions) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the base of the current activity | public static Activity getBase() {
// TODO Auto-generated method stub
return null;
} | [
"public Activity getCurrentActivity() {\n return solo.getCurrentActivity();\n }",
"@Provides @PerActivity @SuppressWarnings(\"unused\")\n public BaseActivity provideBaseActivity() {\n return baseActivity.get();\n }",
"Intent getBaseIntent() {\n if (intent != null) return intent;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of HomeController | public HomeController() {
} | [
"public HomeController() {\r\n }",
"public Home() {\n\t}",
"Controllers createControllers();",
"public HomeController(Session s) {\n\t\t\ttheSession = s;\n\t\t\ttheModel = new HomeModel(s);\t\n\t\t}",
"public HomePage() {\n }",
"public HomeView() {\n }",
"public void newController(){\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assert that a request with an invalid header fails. | @Test
public void testInvalidAuthorizationHeader() {
Response r = target("/token")
.request()
.header(AUTHORIZATION, "Not A Valid header")
.get();
assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());
} | [
"@Test\n public void testInvalidBearerHeader() {\n Response r = target(\"/token\")\n .request()\n .header(AUTHORIZATION, \"Bearer some_secluded_rendezvous\")\n .get();\n\n assertEquals(Status.UNAUTHORIZED.getStatusCode(), r.getStatus());\n }",
"priv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove the request arc, return true if the arc is removed, false if not. | public boolean deleteArc(arc link) {
if (link.getStartNode() == this)
outcoming.remove(link);
else if (link.getEndNode() == this)
incoming.remove(link);
else
return false;
return true;
} | [
"public synchronized boolean removeFriendRequest(FriendRequest req) {\n \t\tint i = indexOfFriendRequest(req);\n \t\tif(i == -1) return false;\n \t\tgetFriendRequests().remove(i);\n \t\treturn true;\n \t}",
"boolean removeAgreement(HttpServletRequest req, HttpServletResponse resp) {\n String id = req.getPa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the statistics are valid. | public boolean statsValid() {
return this.statsValid;
} | [
"boolean hasStatsOk();",
"public boolean checkData()\n {\n boolean ok = true;\n int l = -1;\n for(Enumeration<Vector<Double>> iter = data.elements(); iter.hasMoreElements() && ok ;)\n {\n Vector<Double> v = iter.nextElement();\n if(l == -1)\n l =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Commit a transaction; invoke callback for each inserted or deleted record in each output relation. See ddlog.h: ddlog_transaction_commit_dump_changes() | public void transactionCommitDumpChanges(Consumer<DDlogCommand<DDlogRecord>> callback)
throws DDlogException {
this.checkHandle();
String onDelta = callback == null ? null : "onDelta";
this.deltaCallback = callback;
this.ddlog_transaction_commit_dump_changes(this.hprog, onDel... | [
"public void transactionCommit() throws DDlogException {\n this.checkHandle();\n DDlogAPI.ddlog_transaction_commit(this.hprog);\n }",
"public void transactionCommitDumpChangesToFlatbuf(FlatBufDescr fb) throws DDlogException {\n this.checkHandle();\n DDlogAPI.ddlog_transaction_commit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing generateSignedUUIDs(int n, JsonObject userData, String ticketId) | @Test
public void testPositiveGenerateSignedUUIDs_3() {
int i = 1;
for (RandomOrgClient roc : rocs) {
try {
String ticketId = roc.createTickets(1, true)[0].get("ticketId").getAsString();
HashMap<String,Object> o = roc.generateSignedUUIDs(10, userData, ticketId);
this.signedValueTester(ro... | [
"@Test\r\n\tpublic void testPositiveGenerateSignedUUIDs_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedUUIDs(10, identifier, null, userData, null);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, UUID[].class, true);\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether input data is validate. This function does the following checks: The indices array and values array are of the same size. vector indices are in valid range. vector indices are unique. This function works as expected only when indices are sorted. | private void validateSortedData() {
Preconditions.checkArgument(
indices.length == values.length,
"Indices size and values size should be the same.");
if (this.indices.length > 0) {
Preconditions.checkArgument(
this.indices[0] >= 0 && this.... | [
"private void checkIfIndexesAreValid() throws IllegalValueException {\n requireAllNonNull(targetStudentIndex, targetMilestoneIndex, targetTaskIndex);\n\n /* Check if student index is valid */\n List<Student> lastShownList = model.getFilteredStudentList();\n if (targetStudentIndex.getZero... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method takes as input a sorted array of integers called mySortedArray, the number of elements it contains, and the student ID number to look for It returns true if the array contains an element equal to ID, and false otherwise. | public static boolean myBinarySearch(int mySortedArray[], int numberOfStudents, int ID) {
int l = 0;
int r = numberOfStudents; //Set r to be one more than the value of the largest index in mySortedArray.
while(l+1<r){ //This avoids an off by one error.
int midPoint = (l+r)/2;
... | [
"public static boolean hasStudent(\r\n\t\tArrayList<Student> arrayList,\r\n\t\tint id) {\r\n\r\n\t\t/* PLACE YOUR CODE HERE */\r\n\t\tfor(Student student: arrayList){\r\n\t\t\tif(student.getId() == id){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false; // REMOVE; USED SO THIS FILE COMPILES\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if prerequisite simulation data is available in order to generate a script. | public boolean scriptGenerationAvailable() {
return scriptHistory == null && simConfigFile != null && simSpec != null;
} | [
"public abstract boolean promulgationDataDefined();",
"boolean hasHasInitialCondition();",
"boolean hasExecStep();",
"public boolean isSequenceDataReady () {\n if (readyPaSeqData) {\n readyPaSeqData = false;\n return true;\n }\n return false;\n }",
"boolean hasP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method used for catch Fattal error of SAXParseException and print it during xml validation | @Override
public void fatalError(SAXParseException e) throws SAXException
{
System.out.println("Fattal error: ");
printInfo(e);
} | [
"public SAXParseException getError();",
"public void error(SAXParseException exception) throws SAXException {\n SAXParseException e = addLineAndColumnInfoToMessage(exception);\n System.err.println(\"Error: \" + e);\n if (exceptions.size() > 98) {\n throw e;\n } else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if two material variants match. If this has no variant, matches any variant of the same material | default boolean matchesVariant(MaterialVariant other) {
return matchesVariant(other.getVariant());
} | [
"boolean matchesVariant(MaterialVariantId other);",
"public boolean matchesVariant(MaterialVariant variant) {\n return this.variant.matchesVariant(variant);\n }",
"default boolean matchesVariant(ItemStack stack) {\n return matchesVariant(IMaterialItem.getMaterialFromStack(stack));\n }",
"public boolea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates shadow width in actual pixels | private int calculateShadowWidth() {
float mShadowRadius = isShadowResponsiveEffectEnabled() ?
((ShadowResponsiveDrawer) shadowResponsiveDrawer).getMaxShadowRadius() : getShadowRadius();
int shadowWidth = hasShadow() ? (int) ((mShadowRadius + Math.abs(getShadowXOffset())) * 2) : 0;
LOGGER.trace("Calculated Ac... | [
"@Override\n public int getShadowSize() {\n\treturn Geometry.getW(shadow.getElement());\n }",
"public float getSoftShadowLength();",
"float getShadowStardustMultiplier();",
"private int calculateShadowHeight() {\n\t\tfloat mShadowRadius = isShadowResponsiveEffectEnabled() ?\n\t\t\t\t((ShadowResponsiveDr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default constructor for the Spartan class. | public Spartan(){
super("Spartan", 100, 100, 3, 2, 70, ROMAN_SWORD, ROMAN_SHIELD);
} | [
"public Salle() {\n }",
"public Salle(){}",
"public Sedan() {\r\n\t\tthis.description = \"Sedan\";\r\n\t}",
"public Sems() {\n }",
"public DefaultStamina() {\r\n }",
"public SlanjePoruke() {\n }",
"public LSS() {\n\t\t\n\t}",
"public Steganography() {}",
"public Steganography()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the roamingCreditLimitAsString value for this SubscriberMainBase. | public java.lang.String getRoamingCreditLimitAsString()
{
return roamingCreditLimitAsString;
} | [
"public void setRoamingCreditLimitAsString(java.lang.String roamingCreditLimitAsString)\n\t{\n\t\tthis.roamingCreditLimitAsString = roamingCreditLimitAsString;\n\t}",
"public java.lang.String getCreditAutoApprovalLimit() {\n return creditAutoApprovalLimit;\n }",
"public String getRtypLimitNumber() {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get inbox APIs for managing Inbox | public InboxApi inboxApi() {
if (inboxApi == null) {
inboxApi = new InboxApi(restApiClient);
}
return inboxApi;
} | [
"public void loadAccountInbox();",
"public List<Mailbox> listMailboxes() throws Exception;",
"public MailBox getInbox()\r\n\t{\r\n\t\tfor(MailBox m : mailBoxList)\r\n\t\t{\r\n\t\t\tif(m.getName().equals(\"Inbox\"))\r\n\t\t\t{\r\n\t\t\t\treturn m;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"java.util.Lis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Test 19: normalRate and discountRate is null | @Test
(expected = IllegalArgumentException.class)
public void normalRateAndDiscountRateIsNull() {
BigDecimal BD = null;
Rate RT = new Rate(CarParkKind.VISITOR, BD, BD, normalPeriods, discountPeriods);
} | [
"@Test\n (expected = NullPointerException.class)\n public void discountRateIsNull() {\n BigDecimal BD = null;\n Rate RT = new Rate(CarParkKind.VISITOR, new BigDecimal(12), BD, normalPeriods, discountPeriods);\n }",
"@Test\n (expected = NullPointerException.class)\n pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of this matrix to the sum of itself and matrix m1. | public final void add(CyMatrix3d m1)
{
this.m00 += m1.m00;
this.m01 += m1.m01;
this.m02 += m1.m02;
this.m10 += m1.m10;
this.m11 += m1.m11;
this.m12 += m1.m12;
this.m20 += m1.m20;
this.m21 += m1.m21;
this.m22 += m1.m22;
} | [
"public Matrix addAndSet(Matrix m) {\n if (this.rowCount != m.rowCount || this.columnCount != m.columnCount) {\n throw new IllegalArgumentException(\"Adding two matrices with different dimensions\");\n }\n\n if (this.columnCount == this.underlyingColumnCount && m.columnCount == m.und... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Converts a String to a LocalDateTime Object | private LocalDateTime getDateTimeFromString(String string) {
//Get startDate and startTime from JsonString
String [] segments = string.split("\"");
LocalDateTime ldt = LocalDateTime.parse(segments[3].substring(0, 16));
// Add one extra hour to correct for daylight savings (!!)
ld... | [
"public static LocalDateTime unmarshal(String dateTime) {\n \tDateTimeFormatter format = DateTimeFormatter.ISO_LOCAL_DATE_TIME;\n \treturn LocalDateTime.parse(dateTime, format);\n }",
"public static LocalDateTime toLocalDateTime(String value)\n\t{\n\t\tif ( value == null || value.isEmpty() || value.equal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getters & Setters Gets the jid. | public String getJid() {
return jid;
} | [
"public String getJobId() {\n\t\treturn this.jobId;\n\t}",
"public Jid getUserJabberId()\n {\n return userJabberId;\n }",
"public String getJobID() {\r\n \treturn jobID;\r\n }",
"public String getJobId() {\n return (String)getAttributeInternal(JOBID);\n }",
"public String getJobId() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns number of "StreetName" element | public int sizeOfStreetNameArray()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(STREETNAME$2);
}
} | [
"public int sizeOfStreetNumberTextArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(STREETNUMBERTEXT$0);\n }\n }",
"public int getStreetNumber()\n \t{\n \t\treturn this.streetNumber;\n \t}",
"int getAddressBookCont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Usage: The function will provide support for ASCII to HEX conversion. For Example: input = TEST will result in output = 54 45 53 54 For Example: input = test will result in output = 74 65 73 74 | private static String convertStringToHex(String input){
char[] chars = input.toCharArray();
StringBuffer hexOutput = new StringBuffer();
for(int i = 0; i < chars.length; i++){
hexOutput.append(Integer.toHexString((int)chars[i]));
}
return hexOutput.toString();
} | [
"private String convertHexToASCII(byte[] hex) {\r\n\t\tString hexString = HexString.hexify(hex).replace(\" \",\"\");\r\n\t\t StringBuilder output = new StringBuilder();\r\n\t\t for (int i = 0; i < hexString.length(); i+=2) {\r\n\t\t String str = hexString.substring(i, i+2);\r\n\t\t output.append(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form VVentasConsignacion | public VVentasConsignacion() {
initComponents();
this.setLocationRelativeTo(null);
dpFechaActual.setDateToToday();
inventario=null;
unaCuenta=null;
unUsuario=null;
usuario=null;
venta=null;
txtNoFactura.requestFocus();
clpdv = new... | [
"private void generarOTVenta()\r\n\t{\r\n\t\tif (ventaEncabezado == null)\r\n\t\t{\r\n\t\t\tventaEncabezado = new OTEVenta();\r\n\t\t}\r\n\t\tif (clienteSeleccionado != null)\r\n\t\t{\r\n\t\t\tventaEncabezado.setIdCliente(clienteSeleccionado.getIdCliente());\r\n\t\t\tventaEncabezado.setCliente(clienteSeleccionado.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add method used for type double. Creates a new Money object that is the combined value of the current Money object and the amount (both converted to doubles). | public void add(double amount) throws IllegalArgumentException {
if (amount < 0) {
throw new IllegalArgumentException("Cannot add a negative amount");
} else {
Money temp = new Money(this.toDouble() + amount);
this.dollars = temp.dollars;
this.cents = temp... | [
"public Money add(double money) {\n return new Money(amount + Math.round(money * 100.0D));\n }",
"public MutableDouble add(double value) {\n\t\tmDouble += value;\n\t\treturn this;\n\t}",
"public Money add(Money m) {\n return new Money(value + m.value);\n }",
"public Money add(Money money) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the exceptionhandling rules to those in the specified collection. | public void setExceptionRules(Collection<PatternActionRule> actionRules) {
this.patternActionRules.clear();
addExceptionRules(actionRules);
} | [
"public void setExceptionHandlers(Catch[] exceptions);",
"public void addExceptionRules(Collection<PatternActionRule> rules) {\n\t\tthis.patternActionRules.addAll(rules);\n\t\tCollections.sort(this.patternActionRules);\n\t}",
"public void setExceptionRules(PatternActionRule... actionRules) {\n\t\tthis.patternAc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Primes the cache with all entries that correspond to the specified partial key. | public void prime(Key partialKey) {
// Avoid priming the same key twice.
// This enables the caller to prime repeatedly
// without imposing superfluous data access.
if (primedKeys.contains(partialKey))
return;
// Read the physical data that corresponds
... | [
"public void cachePubKey (int key)\n\t{\n\t\tlog (\"public key \" + key + \" added to cache\");\n\t\tpubKeyCache.put (key);\n\t}",
"public interface PrimeCache {\n /**\n * Add all primes for the given range into the cache. Ignores the primes that are already in the cache.\n * The list must be ordered o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column IECS_OPERATE_INSTR_TRUCKS.OIS_CWP_ID | public void setOisCwpId(Long oisCwpId) {
this.oisCwpId = oisCwpId;
} | [
"public Long getOisCwpId() {\n return oisCwpId;\n }",
"public void setOisIycCntrid(Long oisIycCntrid) {\n this.oisIycCntrid = oisIycCntrid;\n }",
"public void setICID(int value) {\n this.icid = value;\n }",
"public void setCIId(int value) {\n this.ciId = value;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will club all sub types related to outward permit and return BctsJobHeader | private static BctsJobHeader consructOutJobHeader(OutwardPermitType outWPermit,BctsJobHeader bctsJobHeader) {
/*Construct Permit for outward payment*/
bctsJobHeader=PermitXmlConstructor.consructPermit(outWPermit,null,bctsJobHeader);
PermitType permitType=outWPermit.getPermit();
/*Construct Permit Conditions for... | [
"private static BctsJobHeader consructInJobHeader(InPaymentPermitType inPaymtPermit,BctsJobHeader bctsJobHeader) {\n\t\t/*Construct Permit for in payment*/\n\t\tbctsJobHeader=PermitXmlConstructor.consructPermit(null,inPaymtPermit,bctsJobHeader);\n\t\tPermitType permitType=inPaymtPermit.getPermit();\n\t\t/*Construct... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the angular velocity of this PhysicsRigidBody | public void setAngularVelocity(Vector3f vec) {
rBody.setAngularVelocity(Converter.convert(vec, tempVec));
rBody.activate();
} | [
"public double getAngularVelocity() {\n return this.angularVelocity;\n }",
"public synchronized void setAngularVelocity(float angularVelocity) {\n \t\tShipUpdateClientMessage message = (ShipUpdateClientMessage)this.messagePool.obtainMessage(FLAG_MESSAGE_CLIENT_SHIP_UPDATE);\n \t\tShip myShip = this.ship... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the number of times the target received a busy response from the source node. | public int getBusyResponses() {
return busyResponses;
} | [
"@Override\n public long getNumReadoutRequestsReceived()\n {\n return getNumRequestsReceived();\n }",
"@Generated\n @Selector(\"countOfResponseBodyBytesReceived\")\n public native long countOfResponseBodyBytesReceived();",
"long getReceivedEventsCount();",
"public int countReceivedInstru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the total dejittering statistics for this ''ServiceMonitoring'' main stream instance. | public DejitteringStats getDejitteringStats() {
return dejitteringStats;
} | [
"public long getStatsDuration() {\n return mStatsDurationMs;\n }",
"public org.openanzo.services.DynamicServiceStats getStatistics(){\r\n \treturn stats;\r\n }",
"Statistics getStatistics();",
"public httpdStatistics getStatistics() {\n return statistics;\n }",
"public Stats getSta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utility method for converting a trafficlight JSON string to TrafficLight object | public static TrafficLight asTrafficLight(String trafficLightJSON){
return (new Gson()).fromJson(trafficLightJSON, TrafficLight.class);
} | [
"public Object fromJson(String stringObject, Class<?> clazz);",
"<T> T toObject(final String json, final Class<T> clazz);",
"RouteFilter createRouteFilterFromJson(String jsonString);",
"public static DCCVlanInformation fromJsonString( String json ) {\n\t\treturn util.fromJsonString( DCCVlanInformation.class, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Enter App Notification Body /EnterAppNotificationBody | public void enterAppNotificationBody(String value) {
reportStep("About to enter the App notification Body " + value, "INFO");
if(enterTextInChrome(appNotificationBody,value)) {
reportStep("Successfully enter the App Notification body Text " + value, "PASS");
}else {
reportStep("Failed to... | [
"private void createNotification(String title, String body) {\n Context context = getBaseContext();\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Intent notificationIntent = new Intent(context, OffersActivity.class);\n PendingIntent contentIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the transactionPointOfSaleCode attribute. | public void setTransactionPointOfSaleCode(String transactionPointOfSaleCode) {
this.transactionPointOfSaleCode = transactionPointOfSaleCode;
} | [
"public String getTransactionPointOfSaleCode() {\n return transactionPointOfSaleCode;\n }",
"public void setPointCode(String pointCode) {\n this.pointCode = pointCode == null ? null : pointCode.trim();\n }",
"public void setSalePoint(String salePoint) {\n this.salePoint = salePoint;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add the lines from the annotation to the given set. | private void addLineNums(String code, Annotation annotation, Set<Integer> lines) {
int numLines = getNumLines(code, annotation);
for(int i = annotation.line; i < annotation.line + numLines; i++) {
lines.add(i);
}
} | [
"private void putAnnotationInSet(MAnnotation annotation, MAnnotationSet set) {\n\t\t\n\t}",
"private void putAnnotationSet(MAnnotationSet set) {\n\t\t_application.getLogger().debug(this, \"Updating annotation set \" + set.getUuid());\n\t\ttry {\n\t\t\tAjax.ajax(Ajax.createSettings()\n\t\t\t\t.setUrl(set.getIndivi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds a parameter to the list of parameters that will be passed to a class/object etc. that represents a module | public void addParameter( Parameter parameter ) {
parameterList.addParameter( parameter );
} | [
"private void addParameter(int param) {\r\n command_parameters.addInt(param);\r\n }",
"public void addParameter(Parameter param) {\n\t\tparameters.add(param);\n\t}",
"private void addParam(MethodBlock block) throws CompEx {\n Method met = IsDefinedM(this.curMethod);\n ArrayList<Type> param = m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints receipt and updates external systems. | public void printReceipt(){
sale.updateExternalSystems();
sale.printReceipt(totalCost, amountPaid, change);
} | [
"public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}",
"public static void printReceipt (Receipt receipt) {\n System.out.println(receipt.receiptPrintOut());\n }",
"public void printReceipt()\r\n {\r\n System.out.println(\"Item: \" + name);\r\n System.out.println(\"Total receiv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For each date, summarizedHR15val = (0 + 4 + 8) = 12 | @Test
void historicalPrecipitationDataSummarizerTestsForSummarizedHR15val() throws Exception {
assertEquals(12.0, main.HistoricalPrecipitationDataSummarizer.summarizeHistoricalPrecipitationData("src/example/Example Station 1.csv").get("02-26").get(1 + 6 * 15));
assertEquals(12.0, main.HistoricalPrecipitationDataSu... | [
"@Test\n\tvoid historicalPrecipitationDataSummarizerTestsForTotalCountOfValuesInSummarizedHR15val() throws Exception {\n\t\tassertEquals(3.0, main.HistoricalPrecipitationDataSummarizer.summarizeHistoricalPrecipitationData(\"src/example/Example Station 1.csv\").get(\"02-26\").get(4 + 6 * 15));\n\t\tassertEquals(3.0,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method sets the value of the database column YLJZN.CURRECT_CHRONIC.APRTIME3 | public void setAprtime3(Date aprtime3) {
this.aprtime3 = aprtime3;
} | [
"public Date getAprtime3() {\r\n return aprtime3;\r\n }",
"public void setAprtime1(Date aprtime1) {\r\n this.aprtime1 = aprtime1;\r\n }",
"public void setAprtime2(Date aprtime2) {\r\n this.aprtime2 = aprtime2;\r\n }",
"public void setAprresult3(Short aprresult3) {\r\n this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string stockExchangeName = 1; | java.lang.String getStockExchangeName(); | [
"String getStockName();",
"public String getStock(String stockNumber)\r\n\t{\r\n\treturn stockNumber;\r\n\t}",
"String getStockCode();",
"String getTickerName(int num);",
"public String getpStockExchange() {\r\n return (String) ensureVariableManager().getVariableValue(\"pStockExchange\");\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.google.protobuf.StringValue group = 3; | com.google.protobuf.StringValue getGroup(); | [
"com.google.protobuf.StringValueOrBuilder getGroupOrBuilder();",
"com.google.protobuf.StringValue getSourceGroup();",
"com.google.protobuf.StringValueOrBuilder getSourceGroupOrBuilder();",
"com.google.protobuf.StringValue getAdGroup();",
"com.google.protobuf.StringValueOrBuilder getAdGroupOrBuilder();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this bulb is switched on. Otherwise, returns false. | public boolean isSwitchedOn(){
return _switchedOn;
} | [
"public boolean switchOn(){\n if(this.is_Switched_On){\n return false;\n }\n this.is_Switched_On = true;\n return true;\n }",
"public boolean isOn( ) {\n for ( SwitchState state : currentStateMap.values( ) ) {\n if ( state.equals( SwitchState.ON ) ) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add nodes from under "dir" into curTop. Highly recursive. | private DefaultMutableTreeNode addNodes(DefaultMutableTreeNode curTop, File dir, String displayName) {
String curPath = dir.getPath();
String displayPath = dir.getName();
DefaultMutableTreeNode curDir = new DefaultMutableTreeNode(displayPath);
if (curTop != null) { // should onl... | [
"protected void addAdditionalNodes (Node dir) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException {\n\t\tfor (int i=0;i< OFFSET; i++) {\n\t\t\tString nodeName = \"\" + i;\n\t\t\tNode n = dir.addNode(nodeName,\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table reconciliation_detail | ReconciliationDetail selectByPrimaryKey(Integer rDetailId); | [
"BusinessRepayment selectByPrimaryKey(String id);",
"@Select({\n \"select\",\n \"TRANDATE, CHECKTYPE, ACCOUNTDATE, STATUS, TRANTIME, FILENAME, JNLNO, \",\n \"CHECKNL, ISHANDLED\",\n \"from B_CHECK_STATUS\",\n \"where TRANDATE = #{trandate,jdbcType=VARCHAR}\",\n \"and CH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This test check if the test is running from ALM, and if it is, it will write to the LeanFT report all the properties that AlmUtils support. | @Test
public void testAlmUtilsExample() throws GeneralLeanFtException, ReportException, IOException {
AlmRunInfo almRunInfo = AlmUtils.getAlmRunInfo();
if (almRunInfo != null){
// AlmUtils.getAlmRunInfo() returned object, the test is running from ALMreturn;
// Create a string... | [
"@Test\n public void testPrintSystemProperties() {\n System.out.println(\"printSystemProperties\");\n LogUtil.printSystemProperties();\n }",
"public void testEmmaReportCakupan() {\n\t \texpectLogContaining(\"emmaReportCakupan\", \"\");\r\n\t }",
"@Before\n\tpublic void setUp() {\n\t\tL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allows finding out which services are required by exported functions and constants | public interface RequiredServices {
/**
* Stop olives that use functions and constants when a service is throttled.
*
* <p>This does not affect actions!
*
* @return the services names needed
*/
default Stream<String> services() {
return Stream.empty();
}
} | [
"private void discoverServiceInjectionPoints(Set<InjectionPoint> ips) {\n for (Iterator<InjectionPoint> iterator = ips.iterator(); \n iterator.hasNext();) {\n InjectionPoint injectionPoint = iterator.next();\n Set<Annotation> qualifs = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
used to change dThreshMax. | public void setDThreshMax(int dMax) {
dThresh = null;
edge = null;
sketch = null;
dThreshMax = dMax;
} | [
"private void setMaxThreshold() {\n maxThreshold = value - value * postBoundChange / 100;\n }",
"public int getDThreshMax() {\n\t\treturn dThreshMax;\n\t}",
"protected void set_threshold_max(double threshold_max) {\n threshold_maxSlider.setValue((int)(threshold_max*threshold_maxSlider.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ImpliesOpExp__Group__1" $ANTLR start "rule__ImpliesOpExp__Group__1__Impl" InternalOCLlite.g:3916:1: rule__ImpliesOpExp__Group__1__Impl : ( ( rule__ImpliesOpExp__Group_1__0 ) ) ; | public final void rule__ImpliesOpExp__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalOCLlite.g:3920:1: ( ( ( rule__ImpliesOpExp__Group_1__0 )* ) )
// InternalOCLlite.g:3921:1: ( ( rule__ImpliesOpExp__Group_1__0 )* )
... | [
"public final void rule__ImpliesOpExp__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:3909:1: ( rule__ImpliesOpExp__Group__1__Impl )\n // InternalOCLlite.g:3910:2: rule__ImpliesOpExp__Group__1__Impl\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open blink(1) device by blink(1) numerical id (0getCount()). Id list is ordered by serial number. | public native int openById( int id ); | [
"void openBT() throws IOException {\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n mmSocket.connect();\n mmOutputStream = mmSocket.getOutputStream();\n mmInpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: UNAME | public void setUname (java.lang.String _uname) {
this._uname = _uname;
} | [
"public void setU_NAME( String U_NAME )\n {\n this.U_NAME = U_NAME;\n }",
"public void setu_name(String value) {\n setNamedWhereClauseParam(\"u_name\", value);\n }",
"public String getU_NAME()\n {\n return this.U_NAME;\n }",
"public void setNameRU(String nameRU) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmTypeReference__Group_0_1_0__1__Impl" $ANTLR start "rule__ArrayBrackets__Group__0" InternalCsv.g:1920:1: rule__ArrayBrackets__Group__0 : rule__ArrayBrackets__Group__0__Impl rule__ArrayBrackets__Group__1 ; | public final void rule__ArrayBrackets__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCsv.g:1924:1: ( rule__ArrayBrackets__Group__0__Impl rule__ArrayBrackets__Group__1 )
// InternalCsv.g:1925:2: rule__ArrayBrackets__Group__... | [
"public final void rule__JvmTypeReference__Group_0_1_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:1908:1: ( ( ruleArrayBrackets ) )\n // InternalCsv.g:1909:1: ( ruleArrayBrackets )\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the total enrolled for the evening section | protected int getTotalEnrolledEvening() {
return getEveningRoster().size();
} | [
"protected int getTotalEnrolled() {\n return getTotalEnrolledEvening() + getTotalEnrolledMorning();\n }",
"public int getTotalEnrollments() {\r\n int totalEnrollments = 0;\r\n for(Class item : runningClasses.getRunningClasses()) {\r\n if(item.getNumberStudentsEnrolled() > 0 ) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an instance of a clock, that returns the current time with the given offset added. | public static JodaClock startingIn(long offsetInMillis) {
return new FakeOffsetJodaClock(offsetInMillis);
} | [
"public static JodaClock startingIn(@Nonnull Duration offset) {\n Preconditions.checkNotNull(offset, \"offset may not be null\");\n return new FakeOffsetJodaClock(offset.getMillis());\n }",
"Clock fixed(ZoneId zone);",
"private ClockToken\nGetTimeZoneFromRawOffset(\n int rawOffset\t\t// an of... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of Voting Data transfer objects which each represent statistics of a voting category. The parameters is used to filter what data is used. | List<VotingDto> findVotingStatistics(final UserData userData, final Long pollingPlacePk, final long municipalityPk, final Long electionGroupPk,
final Date startDate, final Date endDate, final int votingNumberStart, final int votingNumberEnd, final boolean includeLateValidation,
final String[] votingCategories, fi... | [
"public List<SensorData> getData() {\n List<SensorData> data = new ArrayList<>();\n for(DataCategory dataCat: dataCats) {\n if(rand(0, 1) < RETURN_CHANCE) {\n data.add(new SensorData(dataCat.displayName, dataCat.shortName,\n rand(dataCat.min, dataCat.max), dataCat.decim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of the method "sedativo" | @Test
public void TestSedativo(){
Oggetto oggetto= Oggetto.SEDATIVO;
CartaEquipaggiamento equip = new CartaEquipaggiamento(oggetto);
equip.sedativo(umano);
Assert.assertTrue("The human can't apply the effect of sedativo",umano.hasSedativo());
} | [
"@Test\n public void testSpremiKonfiguraciju_String() throws Exception {\n System.out.println(\"spremiKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.spremiKonfiguraciju(datKonf.getName());\n assertTrue(datKonf.exists());\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleTemplate" $ANTLR start "entryRuleSetTemplate" InternalDsl.g:10277:1: entryRuleSetTemplate returns [EObject current=null] : iv_ruleSetTemplate= ruleSetTemplate EOF ; | public final EObject entryRuleSetTemplate() throws RecognitionException {
EObject current = null;
EObject iv_ruleSetTemplate = null;
try {
// InternalDsl.g:10277:52: (iv_ruleSetTemplate= ruleSetTemplate EOF )
// InternalDsl.g:10278:2: iv_ruleSetTemplate= ruleSetTemplat... | [
"public final void entryRuleSetTemplate() throws RecognitionException {\n try {\n // InternalDsl.g:3205:1: ( ruleSetTemplate EOF )\n // InternalDsl.g:3206:1: ruleSetTemplate EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getSetTemplat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleProcessDef" $ANTLR start "entryRuleParameterList" InternalDsl.g:1704:1: entryRuleParameterList : ruleParameterList EOF ; | public final void entryRuleParameterList() throws RecognitionException {
try {
// InternalDsl.g:1705:1: ( ruleParameterList EOF )
// InternalDsl.g:1706:1: ruleParameterList EOF
{
if ( state.backtracking==0 ) {
before(grammarAccess.getParameterListRu... | [
"public final void entryRuleParameterList() throws RecognitionException {\r\n try {\r\n // InternalGo.g:855:1: ( ruleParameterList EOF )\r\n // InternalGo.g:856:1: ruleParameterList EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy matrix B into this matrix at location (insertRow, insertCol). | public void insertIntoThis( int insertRow, int insertCol, T B ) {
convertType.specify(this, B);
B = convertType.convert(B);
// See if this type's need to be changed or not
if (convertType.commonType == getType()) {
insert(B.mat, mat, insertRow, insertCol);
} else {
... | [
"public T combine( int insertRow, int insertCol, T B ) {\n convertType.specify(this, B);\n T A = convertType.convert(this);\n B = convertType.convert(B);\n\n if (insertRow == SimpleMatrix.END) {\n insertRow = mat.getNumRows();\n }\n\n if (insertCol == SimpleMatri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display given text as info text. | public final void displayInfo(final String text)
{
display(text, Type.INFO);
} | [
"public String getInfoText();",
"public void setInfoText(String infoText);",
"void antsInfo(String text);",
"void displayInfo(String title, String message);",
"void displayInfoText(String info) {\n resultWindow.removeAll();\n JLabel label = new JLabel(info);\n label.setFont(resultFont);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for write data to the sheet | public static void writeData() throws IOException {
String path = System.getProperty("user.dir")+"//Book1.xlsx";
File xls = new File(path); //1. goto to the excel file for the read
FileInputStream fis = new FileInputStream(xls); // 2. to load the excel file here filenotfo... | [
"public void writeData() throws IOException{\r\n\t\tXSSFWorkbook workbook = new XSSFWorkbook();\r\n\t\tXSSFSheet sheet = workbook.createSheet(\"output\");\r\n\t\tXSSFRow row = sheet.createRow(0);\r\n\t\tXSSFCell cell =row.createCell(0);\r\n\t\tcell.setCellValue(\"S.No\");\r\n\t\tXSSFCell cell1 =row.createCell(1);\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine the skill tier of a spell | private SpellSkillTiers getSpellTier(SPEL s) {
MGEF m = null;
int maxSkillLevel = 0;
int currSkillLevel = 0;
for (MagicEffectRef mer : s.getMagicEffects()) {
m = (MGEF) SPDatabase.getMajor(mer.getMagicRef(), GRUP_TYPE.MGEF);
currSkillLevel = m.getSkillLevel();
if (currSkillLevel > maxSkillLevel) {
... | [
"int getSkillLevel();",
"public int getIntrinsicSkill(String skillname);",
"java.lang.String getSkill();",
"public static int getTier(String name) {\n String[] split = Arrays.copyOfRange(name.split(\" \"),\n 0, (name.toLowerCase().matches(\".*(shortbow|longbow... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return importance of given location. | public native static float importance(GameLocation oper1); | [
"Double importanceLookUp(WebPage s ) {\n\t\tif (importance.get(s)!=null) return importance.get(s);\n\t\telse return -1.0;\n\t}",
"public double getFoodIntensityOfLandUsed();",
"int getImportance();",
"double computeImportance() {\n assert rels[0] != null;\n RelSubset subset = volcanoPlanner.getS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes header and data and outputs to CSV file | private void outputAsCSV(String[] header, ArrayList<String[]> data, File f)
{
try {
CSVWriter writer = new CSVWriter(new FileWriter(f.getAbsolutePath(), false), ';');
writer.writeNext(header);
for (String[] row : data) {
for (int i = 0; i < row.length; i++) {
row[i] = row[i].replace(".", ",");
... | [
"public void createCSVfile(String[] header) throws IOException {\r\n\t\tclearCSVFile();\r\n\t\tappendRow(header);\r\n\t\tsaveCSV();\r\n\t}",
"public void exportToCSV();",
"CSV createCSV();",
"private void exportCSV() {\n\n\t\tList<String[]> csvData = new ArrayList<>();\n\t\tString path = \".\" + File.separato... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this value is maybe present as a getter/setter property. | public boolean isMaybePresentAccessor() {
checkNotUnknown();
if (isPolymorphic())
return (flags & PRESENT_ACCESSOR) != 0;
else
return getters != null || setters != null;
} | [
"public boolean isMaybeGetterOrSetter() {\n checkNotPolymorphicOrUnknown();\n return getters != null || setters != null;\n }",
"public boolean isMaybeGetter() {\n checkNotPolymorphicOrUnknown();\n return getters != null;\n }",
"public boolean isMaybeSetter() {\n checkNot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end synpred92_InternalInstances Delegated rules | public final boolean synpred53_InternalInstances() {
state.backtracking++;
int start = input.mark();
try {
synpred53_InternalInstances_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
... | [
"public final void synpred54_InternalInstances_fragment() throws RecognitionException { \n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:4258:2: ( rule__XRelationalExpression__Alternatives_1 )\n // ../org.xtext.lwc.instances.ui/s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |