query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Creates a new test analysis. | public TestAnalysis(@NonNull Configuration config) {
super(config);
} | [
"public static void createTestCase(String testName) {\n\t\t// Make sure we initialize the report before moving on\n\t\tif (!initialized) {\n\t\t\tinitializeReport();\n\t\t}\n\n\t\t// Return the new test case\n\t\textentTest = extent.createTest(testName);\n\n\t}",
"TestSuite createTestSuite();",
"com.jarden.test... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Util method to get authorization header according to the authentication method specified | public static String getAuthorizationHeader() {
if (enableOAuth) {
return "Bearer " + oauthAccessToken;
}
return getBase64EncodedBasicAuthHeader(userName, password);
} | [
"private String getFromHeader(ThreadContext threadContext) {\n String header = threadContext.getHeader(\"Authorization\");\n if (Strings.hasText(header) && header.regionMatches(true, 0, \"Bearer \", 0, \"Bearer \".length())\n && header.length() > \"Bearer \".length()) {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a gene, where gene name and official gene symbol is set to gene symbol(from file) and official name is set to geneName(from file). The gene description is set to a message indicating that the gene was imported from an external file and the associated uniprot id. If the gene already exists, then it is not modifi... | private Gene createGene( String[] fields, Taxon taxon ) {
assert fields.length > 1;
String geneSymbol = fields[0];
String geneName = fields[1];
String uniProt = "";
if ( fields.length > 2 )
uniProt = fields[2];
Gene gene;
// need at least the gene sy... | [
"protected Gene createGene(String a_geneClassName,\n String a_persistentRepresentation)\n throws Exception {\n Class geneClass = Class.forName(a_geneClassName);\n Constructor constr = geneClass.getConstructor(new Class[] {Configuration.class});\n Gene gene = (Gene) constr.ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this device is supported. It needs to be running Android KitKat (4.4) or higher and has a step counter and step detector sensor. This check is useful when an app provides an alternative implementation or different functionality if the step sensors are not available or this code runs on a platform versio... | private boolean isKitkatWithStepSensor() {
// BEGIN_INCLUDE(iskitkatsensor)
// Require at least Android KitKat
int currentApiVersion = android.os.Build.VERSION.SDK_INT;
// Check that the device supports the step counter and detector sensors
PackageManager packageManager = getActi... | [
"public boolean HasGotSensorCaps()\n {\n PackageManager pm = context.getPackageManager();\n\n // Require at least Android KitKat\n\n int currentApiVersion = Build.VERSION.SDK_INT;\n\n // Check that the device supports the step counter and detector sensors\n\n return currentApiV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this source location contains components. | boolean isComponentSource(); | [
"public boolean hasContent() {\n\t\treturn markers != null && markers.size() > 0 || paths != null && paths.size() > 0;\n\t}",
"public boolean contains(Component component);",
"boolean isComponentsRegistered();",
"public boolean hasLocation()\n {\n return targetLocation != null;\n }",
"public bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleSignedConstant" $ANTLR start "entryRuleIntegerTerm" InternalJsonParser.g:1981:1: entryRuleIntegerTerm returns [EObject current=null] : iv_ruleIntegerTerm= ruleIntegerTerm EOF ; | public final EObject entryRuleIntegerTerm() throws RecognitionException {
EObject current = null;
EObject iv_ruleIntegerTerm = null;
try {
// InternalJsonParser.g:1981:52: (iv_ruleIntegerTerm= ruleIntegerTerm EOF )
// InternalJsonParser.g:1982:2: iv_ruleIntegerTerm= ru... | [
"public final EObject entryRuleIntegerTerm() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleIntegerTerm = null;\n\n\n try {\n // InternalAgreeParser.g:9637:2: (iv_ruleIntegerTerm= ruleIntegerTerm EOF )\n // InternalAgreeParser.g:9638:2: iv_ruleI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the albums before and after the current album in the ordered set of albums that the user has permission to view where groupId = &63;. | public org.liferay.jukebox.model.Album[] filterFindByGroupId_PrevAndNext(
long albumId, long groupId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
org.liferay.jukebox.NoSuchAlbumException; | [
"public org.liferay.jukebox.model.Album[] findByGroupId_PrevAndNext(\n long albumId, long groupId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n org.liferay.jukebox.NoSuchAlbumException;",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used by factory methods to create a Spring. | protected Spring() {} | [
"SpringImplementation createSpringImplementation();",
"@Bean\n public SpringBean springBean() {\n return new SpringBean();\n }",
"private SpringApplicationContextProvider() {\r\n\t}",
"@Override\n\tpublic SpringSupplierExtension createService(ServiceContext context) throws Throwable {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get bank routing number. | public String getRoutingNumber() {
return this.routingNumber;
} | [
"public java.lang.String getBankRoutingNumber() {\r\n return bankRoutingNumber;\r\n }",
"public String getRoutingNo();",
"public String getRoutingNumber() {\n return routingNumber;\n }",
"public Integer getRoutingId() {\n return routingId;\n }",
"public java.lang.String getRouteNumbe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the member variable suit, an enum of type Suit. | public Suit getSuit () {
return suit;
} | [
"public int getSuitInt()\r\n {\r\n return suit;\r\n }",
"public String getSuit() {\n return suit;\n }",
"public char getSuit()\n\t{\n\t\treturn suit;\n\t}",
"public int getSuit() {\n return suit;\n }",
"public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/*... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string doctor_req_cd = 12; | public java.lang.String getDoctorReqCd() {
java.lang.Object ref = doctorReqCd_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toString... | [
"java.lang.String getDoctorReqCd();",
"public Builder setDoctorReqCd(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n doctorReqCd_ = value;\n onChanged();\n return this;\n }",
"public java.lan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Asigna el valor al campo longitudMinutos. | public void setLongitudMinutos(String longitudMinutos) {
this.longitudMinutos = longitudMinutos;
} | [
"public void setLongitud(String aLongitud) {\n longitud = aLongitud;\n }",
"public void setLonguitud(String longuitud) {\r\n this.longuitud = longuitud;\r\n }",
"long getLongValue();",
"public void setLongitud(String longitud);",
"public void setLong(long l) {\n longValue = l;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the JPA entity for Perspective into a DTO. A reference to the organization will be added to the DTO. | public static PerspectiveDTO toDTO(Perspective perspective) {
return toDTO(perspective, false);
} | [
"public static Perspective toJPA(PerspectiveDTO perspectiveDTO, boolean lazyFetching) {\n Perspective perspective = new Perspective();\n\n perspective.setId(perspectiveDTO.getId());\n perspective.setCode(perspectiveDTO.getCode());\n perspective.setDescription(perspectiveDTO.getDescriptio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data Elasticsearch repository for the Club entity. | public interface ClubSearchRepository extends ElasticsearchRepository<Club, Long> {
} | [
"public interface ClotureSearchRepository extends ElasticsearchRepository<Cloture, Long> {\n}",
"public interface OrganizationCategorySearchRepository extends ElasticsearchRepository<OrganizationCategory, Long> {\n}",
"public interface CirculationSearchRepository extends ElasticsearchRepository<Circulation, Lon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the hasRole method to ensure it properly returns the expected boolean value for this user. Partiton: A user with the Author Role. | @Test
public void testHasRoleForUserWithAuthorRole() {
assertTrue(testUserWithAuthorRole.hasRole(testConference1, new Author(testConference1), testUserWithAuthorRole));
} | [
"@Test\r\n\tpublic void testHasRoleForUserWithReviewerRole() {\r\n\t\tassertTrue(testUserWithReviewerRole.hasRole(testConference1, new Reviewer(testConference1), testUserWithReviewerRole));\r\n\t}",
"@Test\r\n\tpublic void testFindAuthorRole() {\r\n\t\tassertFalse(testUserWithAuthorRole.findAuthorRole().equals(nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the tweet text for media links and provides a list of URL pairs of thumbnail and full size URLs | public List<Pair<URL, URL>> getMediaList() {
List<Pair<URL, URL>> result = new ArrayList<Pair<URL, URL>>();
if (entities == null) {
return result;
}
if (entities.media == null) {
return result;
}
for (Media media : entities.media) {
try {
Pair<URL, URL> urls = new Pair<URL, URL>(new URL(
... | [
"public List<String> getUrlMedia(List<String> Urls) throws IOException {\n List<String> enlacesList = new ArrayList<String>(); //Recibe como parametro los url de descarga \r\n for (String url : Urls) {\r\n Document var = Jsoup.connect(url).get();\r\n Elements tags ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get number of female kangaroos in a point | public int numberOfFemale(){
int female=0;
for (int i=0;i<kangaroosInPoint.size();i++){
if(kangaroosInPoint.get(i).getGender()=='F'){
female++;
}
}
return female;
} | [
"public int getFatiguePoints() {\n return fatiguePoints;\n }",
"public static int howManyFemales(){\r\n\t\treturn totalFemales;\r\n\t}",
"int getSizeByGender(Gender gender);",
"public int countLevelbyPoints() {\n int temp = points / 200;\n if (level < temp) {\n level = temp;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to get version info from PMA.control instance running at pmacontrolURL | public static JSONObject getVersionInfoPmaControl(String pmaControlURL) {
// Get version info from PMA.control instance running at pmacontrolURL
// why? because GetVersionInfo can be invoked WITHOUT a valid SessionID;
// _pma_api_url() takes session information into account
String url = PMA.join(pmaControlURL, ... | [
"public String getServerVersion();",
"String getProxyVersion();",
"private void getVersion() {\n\t\t\n\t\tfinal AsyncTask<Void, Void, Short> task = new AsyncTask<Void, Void, Short>(){\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tLog.d(TAG, \"getOnboardingVersion: onPreExecute\");\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates a trimmed mean of a list of numbers. | static double trimmedMean(final ArrayList<Double> arr_list, final int percent) {
double[] arr = ArrayUtils.toPrimitive(arr_list.toArray(new Double[arr_list.size()]));
final int n = arr.length;
final int k = (int)Math.round(n * (percent / 100.0) / 2.0);
final DoubleArrayList list = new D... | [
"public double mean(List<Integer> list) {\n double sum = 0;\n for (Integer i : list)\n sum += i;\n return Math.round(sum / list.size());\n }",
"public double getMean(List<Integer> list) {\n\t\tint sum = 0;\n\t\tfor (Integer i : list) {\n\t\t\tsum += i;\n\t\t}\n\n\t\treturn (doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encodes a nonnull Short. | @Override
public void encodeShort(Short att) throws IllegalArgumentException, MALException {
EncodingHelper.checkForNull(att);
internalEncodeAttributes(Constants.SHORT, att.toString());
} | [
"public Buffer putShort(short value);",
"@Override\n public void encodeNullableShort(Short att) throws MALException {\n internalEncodeNullableAttribute(att, Constants.SHORT, () -> encodeShort(att));\n }",
"BigByteBuffer putShort(short value);",
"public Buffer putShort(int index, short value);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an enhanced combo field to the form section. The enhanced combo field contains a "limited" set of options to choose from in a popdown menu. It also contains a button to popup a dialog to select from a "complete" set of options. | public EnhancedComboField addEnhancedComboField(final Property property, final Object[] someOptions,
final Object[] allOptions) {
return addEnhancedComboField(property.getKey(), someOptions, allOptions);
} | [
"public EnhancedComboField addEnhancedComboField(final String key, final Object[] someOptions,\n final Object[] allOptions) {\n String label = key;\n EnhancedComboField comboField = addEnhancedComboField(key, label);\n comboField.setOptions(someOptions, allOptions);\n return comboField;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return a free position | private Position getFreePos() {
Position pos;
int ranX = 0 + (int) (Math.random() * 19);
int ranY = 0 + (int) (Math.random() * 19);
pos = new Position(ranX, ranY);
for (int i = 0; i <= positions.size() - 1; i++) {
if (pos.getY() == positions.get(i).getX() && pos.getX(... | [
"protected int freeSlot() {\n for (int i = nextPos; i < entities.length; i++) {\n if (entities[i] == null) {\n nextPos = i;\n return i;\n }\n }\n for (int i = 0; i < nextPos; i++) {\n if (entities[i] == null) {\n next... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve list of features based on a predicate | @GetMapping("/features")
@Timed
public ResponseEntity<List<FeatureDTO>> getFeatures(@QuerydslPredicate(root = Feature.class) Predicate predicate,
FeatureRequestParams featureRequestParams) {
Predicate pred = Optional.ofNullable(featureRequestParams.getView()).map(
x -> QFeature.feature.datasource.eqAny(JPAEx... | [
"List<Feature> getFeatures();",
"Iterable<JvmFeature> findAllFeaturesByName(String simpleName);",
"public List<Feature> readProfileFeatures();",
"Map<String, Boolean> getFeatures();",
"java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();",
"public IDataSet extractFeatures... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests constructor ExpenseEntryManager when the persistence class name is empty string in configuration. Expect ConfigurationException. | public void testExpenseEntryManagerClassEmpty() throws Exception {
configManager.add("classempty.xml");
try {
new ExpenseEntryManager(NAMESPACE);
fail("The persistence class name is empty string, should throw ConfigurationException.");
} catch (ConfigurationException e) ... | [
"public void testExpenseEntryManagerClassNotPersistence()\n throws Exception {\n configManager.add(\"notpersistence.xml\");\n\n try {\n new ExpenseEntryManager(NAMESPACE);\n fail(\"The class is not a persistence class, should throw ConfigurationException.\");\n } ca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compute the total energy of the system. | double totalEnergy() {
// Compute the total kinetic energy of the system.
double kinetic_energy = 0.0;
// Add in the kinetic energy of each valid planet.
for (PlanetIter Pptr = _planets.first();
!Pptr.isPastEnd();
Pptr.advance()) {
Planet p = Pptr.element();
kinetic_energy += 0.5 * p.mass... | [
"double energy() {\n\n // brightness values\n double brU = 0;\n double brD = 0;\n double brR = 0;\n double brL = 0;\n double brDR = 0;\n double brTR = 0;\n double brDL = 0;\n double brTL = 0;\n if (this.up != null) {\n brU = this.up.brightness;\n }\n if (this.down != null) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sign the xml string using enveloped signatures. | public java.lang.String signXML(java.lang.String xmlString,
java.lang.String certAlias,
java.lang.String algorithm,
java.lang.String id)
throws XMLSignatureException {
if (xmlStri... | [
"Element sign(DigestMethod digestMethod, String signatureMethod, PublicKey pubKey, PrivateKey privKey) throws SAMLException ;",
"Element sign(DigestMethod digestMethod, String signatureMethod, X509Certificate cert, PrivateKey privKey) throws SAMLException ;",
"Element sign(DigestMethod digestMethod, String sign... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
display player's information in the status bar | public void displayPlayerInfo(Player player) {
idStatus.setText(" " + player.getPlayerId());
nameStatus.setText(" " + player.getPlayerName());
pointStatus.setText(String.valueOf(" " + player.getPoints()));
} | [
"public void displayPlayerInfo()\r\n\t{\r\n\t\tcurrentPlayerName.setText(currentPlayer.getName());\r\n\t\tplayerOneInfo.setText(player1.getName() + \": \" + player1.getScore());\r\n\t\tplayerTwoInfo.setText(player2.getName() + \": \" + player2.getScore());\r\n\t}",
"private void displayStatus()\r\n {\r\n\t\t//... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of store defs as a map | private HashMap<String, StoreDefinition> makeStoreDefinitionMap(List<StoreDefinition> storeDefs) {
HashMap<String, StoreDefinition> storeDefMap = new HashMap<String, StoreDefinition>();
for(StoreDefinition storeDef: storeDefs)
storeDefMap.put(storeDef.getName(), storeDef);
return sto... | [
"public List<String> getStateStoreNames() {\n return new ArrayList<>();\n }",
"boolean getStoreNames();",
"public Map<String,Set<DocumentStorage>> getDocumentStorages(Set<Feature> features) {\n Map<String,Set<DocumentStorage>> map = new HashMap<String,Set<DocumentStorage>>();\n if ( feat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new virtual machine instance in the list vms | public void addVirtualMachine(VirtualMachine vm){
vms.add(vm);
} | [
"void addVirtualMachine(IVirtualMachine vm);",
"public void addVM(VM v) {\n\t\tload += v.getCpu();\n\t\tvms.add(v);\n\t\tv.setHost(this);\n\t}",
"@Override\n public ArrayList<VirtualMachineInformation> createInstances(int vmNumber) throws Exception {\n ArrayList<VirtualMachineInformation> vmInfoList =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if this given lib file in the given lib set. | protected boolean isDependentLib(File libFile, Set<String> libs) {
if (libFile.getName().contains("grinder-3.9.1.jar")) {
return false;
}
// Replace release types (-SNAPSHOT, -GA, -p1, ...)
String name = replaceLast(libFile.getName(), "-[a-zA-Z][a-zA-Z1-9]+\\.", ".");
final int libVersionStartIndex = name... | [
"private boolean usesLibrary(String libraryName) {\r\n\t\tboolean usesLibrary = false;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(filename));\r\n\t\t\tString line = in.readLine();\r\n\t\t\twhile (line != null && !usesLibrary) {\r\n\t\t\t\tif (line.contains(libraryName)) {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configuration of findings limit given for specified infoTypes. repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; | com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(
int index); | [
"java.util.List<com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit>\n getMaxFindingsPerInfoTypeList();",
"java.util.List<\n ? extends com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder>\n getMaxFindingsPerInfoTypeOrBuilderList();",
"public java... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the integer is acceptable in a prime or not. It checks the value to only contain zeroes 0, one time a 1, two times a 2 and so on. | public static boolean isUsablePrimeCandidate(Integer value) {
String str = value.toString();
int[] array = new int[10];
for (int i = 0; i < str.length(); i++) {
Character c = str.charAt(i);
switch (c) {
case '0':
return false;
... | [
"static int check_prime(int number)\n {\n for(int i = 3; i * i <= number; i += 2)\n {\n if(number % i == 0)\n {\n return 0;\n }\n }\n return 1;\n }",
"public static boolean isPrime(int input){\n return LongStream.range(2,input)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A random normal distribution with mean and sd | public RandomNormal(double mean, double sd)
{
this.mean = mean;
this.sd = sd;
} | [
"public float STD( final float mean, final float sigma )\n\t{\n\t\treturn mean + sigma * (float) random.nextGaussian();\n\t}",
"public static double generateNextNormalDistributedDouble(Random generator, double mean, double stddev, double min){\n\t\tdouble result = (generator.nextGaussian()*stddev+mean);\n\t\t\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns if message is new | public boolean isMessageNew() {
return isMessageNew( getMessage() );
} | [
"public boolean hasNewMessage() throws RemoteException {\r\n return !messages.isEmpty();\r\n }",
"public java.lang.Boolean getHasNewMessage()\n {\n return hasNewMessage;\n }",
"public boolean isSetNewMessage() {\n\t\treturn this.newMessage != null;\n\t}",
"public void setHasNewMessage(java.lang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new People or update an existing one | public People savePeople(People people); | [
"public void updatePeople(People aPeople) throws NoSuchPeopleException, MappingException, ModelException;",
"void lookupAndSaveNewPerson();",
"public void addPeople(People newPeople) throws MappingException;",
"boolean updatePerson(Person person);",
"@RequestMapping(value = \"/people\", method = RequestMeth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
API Method to access the 'firehose' method of the Twitter Streaming API. from twitter: Returns all public statuses. The Firehose is not a generally available resource. Few applications require this level of access. Creative use of a combination of other resources and various access levels can satisfy nearly every appli... | public static TwitterStream firehose(TwitterStreamConfiguration tws,
TwitterStreamHandler handler) throws IOException, OAuthException {
//build get params
HttpParams getParams = new BasicHttpParams();
if (tws.getCount() != null) getParams.setIntParameter("count", tws.getCou... | [
"@GET\n\t@Path(\"/getSensorAlerts\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getSensorAlerts() {\n\t\tQuery usrQuery = new Query(\"FireHistory\");\n\t\tList<Entity> qRes = datastore.prepare(usrQuery).asList(FetchOptions.Builder.withDefaults());\n\t\tif(qRes.isEmpty()) {\n\t\t\treturn Response.ok... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test packfile scanning while a gc is done from the outside (different process or different Repository instance). This situation occurs e.g. if a gerrit server is serving fetch requests while native git is doing a garbage collection. The test shows that when core.trustfolderstat==true jgit may miss to detect that a new ... | @Test
public void testScanningForPackfiles() throws Exception {
ObjectId unknownID = ObjectId
.fromString("c0ffee09d0b63d694bf49bc1e6847473f42d4a8c");
GC gc = new GC(db);
gc.setExpireAgeMillis(0);
gc.setPackExpireAgeMillis(0);
// the default repo db is used to create the objects. The receivingDB
// re... | [
"boolean isBareRepository(String GIT_DIR) throws GitException, InterruptedException;",
"boolean isBareRepository() throws GitException, InterruptedException;",
"@Test\n\tpublic void testInitBadFilesSecond() throws Exception {\n\t\tFile.createTempFile(\"SomeClass\", \".class\", directory);\n\t\tFile.createTempFi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the current read_ts, this is called by wtxns | public static long read_ts() {
return read_ts;
} | [
"public Date getReadTime() {\n return readTime;\n }",
"@Nullable\n public Timestamp getReadTime() {\n return readTime;\n }",
"java.lang.String getReadTime();",
"public Date getLastReadTime() {\n return lastReadTime;\n }",
"public long getReadingTime() {\r\n\t\treturn readingTime;\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Max number of findings that will be returned for each item scanned. When set within `InspectJobConfig`, the maximum returned is 2000 regardless if this is set higher. When set within `InspectContentRequest`, this field is ignored. int32 max_findings_per_item = 1; | @java.lang.Override
public int getMaxFindingsPerItem() {
return maxFindingsPerItem_;
} | [
"@java.lang.Override\n public int getMaxFindingsPerItem() {\n return maxFindingsPerItem_;\n }",
"@java.lang.Override\n public int getMaxFindingsPerRequest() {\n return maxFindingsPerRequest_;\n }",
"@java.lang.Override\n public int getMaxFindingsPerRequest() {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add overlays for DC (potentially wards if that information surfaces...). | public void addDcOverlay() {
final Cache.DcOutlineQuery dcOutlineQuery = new Cache.DcOutlineQuery(getContext()) {
@Override
public void useData(final String wardName, final List<LatLng> wardOutline,
final Map<String, String> wardStatistics) {
... | [
"protected void drawOverlays()\n\t{\n\t\tthis.mapOverlays.clear();\n\t\tthis.mapOverlays.add(this.lineOverlay);\n\t}",
"public void updateOverlays() {\n OverlayManager om = mapView.getOverlayManager();\n om.clear();\n om.addAll(tubeLineOverlays);\n om.add(stnClusterer);\n om.add... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
read the input file, parse the line into objects then publish the object item into broker | @Override
public void run() {
JsonParser parser = new JsonParser();
try(BufferedInputStream stream = new BufferedInputStream(new FileInputStream(new File(input)));
BufferedReader reader = new BufferedReader(new InputStreamReader(stream, "ISO-8859-1"), 10 * 1024 * 1024)){
//test if the reading file i... | [
"public void read(){\n assert(inputStream.hasNext());\n\n while(inputStream.hasNextLine()){\n String line = inputStream.nextLine();\n String[] fields = line.split(\";\");\n\n //If Line is address line\n if(fields.length >= 4){\n Address adr = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List webhook deliveries Returns the 10 most recent delivery attempts for a single webhook. | @Test
public void webhooksGetWebhookDeliveriesTest() throws IdfyException, Exception {
Integer id = 123;
WebhookDeliveryDto response = api.webhooksGetWebhookDeliveries(id);
assertNotNull(response);
} | [
"@Test\n public void webhooksListWebhooksTest() throws IdfyException, Exception {\n WebhookDto[] response = api.webhooksListWebhooks();\n assertNotNull(response);\n }",
"public int getNbDeliveries() {\n\t\treturn nbDeliveries;\n\t}",
"@RequestMapping(path = \"/last24hDeliveredItems\", method... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the table reference that should act as the RHS for this table space whenever we join to into it. | public Table getJoinIntoTable(); | [
"Table getReferencedTable();",
"TableReference getTableReference();",
"java.lang.String getReferencesTableName();",
"public String getTargetTable() {\n return targetTable;\n }",
"public String getTarget_table() {\n return target_table;\n }",
"public String getSelfReferencingColumnName(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the encumbrance balance type codes for the given fiscal year | protected List<String> getEncumbranceBalanceTypes(Integer fiscalYear) {
SystemOptions options = optionsService.getOptions(fiscalYear);
List<String> balanceTypes = new ArrayList<String>();
balanceTypes.add(options.getExtrnlEncumFinBalanceTypCd());
balanceTypes.add(options.getIntrnlEncumF... | [
"protected List<String> getBudgetBalanceTypes(Integer fiscalYear) {\n SystemOptions options = optionsService.getOptions(fiscalYear);\n\n List<String> balanceTypes = new ArrayList<String>();\n balanceTypes.add(options.getBudgetCheckingBalanceTypeCd());\n balanceTypes.add(options.getBaseBu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//////////////////////////////////////////////////// evaluate N DDs //////////////////////////////////////////////////// | public static double[] evalN(DD[] dds, int[][] config) {
DD[] restrictedDds = OP.restrictN(dds, config);
double[] values = new double[dds.length];
for (int i = 0; i < dds.length; i++) {
values[i] = restrictedDds[i].getVal();
}
return values;
} | [
"public void calculateNrDrD()\n\t{\n\t\tnr = new int[seedDocumentIndices.length];\n\t\tDr = new GVector[seedDocumentIndices.length];\n\t\tCr = new GVector[seedDocumentIndices.length];\n\t\t\n\t\tcalculateNr();\n\t\tcalculateDr();\n\t\tcalculateD();\t\n\t}",
"protected void evaluate(Netlist netlist){\n\t\tSinkDFS<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/////////////////////// TestCase 1 API call= GET Description= Search for repositories with "github" in the name and sort it by the highest combined number of reactions and comments and order decreasingly Validation= Status code validation, Name validation ////////////////////// | @Test
public void getRepoGithub() throws ClientProtocolException, IOException{
apiUrl =prop.getProperty("searchGithubURL");
url = serviceUrl + apiUrl;
restClient = new RestClient();
closableHttpResponse = restClient.get(url);
int statusCode = closableHttpResponse.getStatusLine().getStatusCode();
Syste... | [
"@Test\n void retrieveDataFromGitHub() {\n g.retrieveDataFromGitHub();\n GitHubSearchResponse r = g.getResponse();\n assertNotNull(r.getItems(), \"Results cannot be null\");\n assertEquals(r.getTotalCount(), r.getItems().size(),\n \"Unequal total results count and actual number of results\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notification the the given symbol was set as the primary symbol. | public void primarySymbolSet(SourceType symbol); | [
"public void setSymbol(Symbol symbol) {\r\n\t\tthis.symbol = symbol;\r\n\t}",
"public void setSymbolId(String symbolId);",
"public void setCurrentPlayerSymbol(Symbol symbol) throws IllegalArgumentException;",
"public void editSymbol(String symbol) {\n this.symbol = symbol;\n }",
"abstract void set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Group the underlying readStatesByAlignmentStart into a list of list of alignment state machines, where each list contains machines with a unique genome site. The outer list is ordered by alignment start. For example, if the flat list has alignment starts [10, 10, 11, 12, 12, 13] then the resulting grouping will be [[10... | @Ensures("result != null")
private List<LinkedList<AlignmentStateMachine>> groupByAlignmentStart() {
final LinkedList<LinkedList<AlignmentStateMachine>> grouped = new LinkedList<LinkedList<AlignmentStateMachine>>();
AlignmentStateMachine last = null;
for ( final AlignmentStateMachine stateM... | [
"@Ensures(\"result != null\")\n private LinkedList<AlignmentStateMachine> flattenByAlignmentStart(final List<LinkedList<AlignmentStateMachine>> grouped) {\n final LinkedList<AlignmentStateMachine> flat = new LinkedList<AlignmentStateMachine>();\n for ( final List<AlignmentStateMachine> l : grouped ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
View for command toolbar. | public interface CommandToolbarView extends View<CommandToolbarView.ActionDelegate> {
AcceptsOneWidget getCommandsPanelContainer();
AcceptsOneWidget getProcessesListContainer();
AcceptsOneWidget getPreviewUrlsListContainer();
void addButton(MenuPopupButton button);
interface ActionDelegate {
... | [
"public ToggleToolBarAction() {\n putValue(NAME, \"Show Toolbar\");\n putValue(MNEMONIC_KEY, KeyEvent.VK_T);\n putValue(SHORT_DESCRIPTION, \"Show the toolbar.\");\n }",
"protected GLDToolBar createToolBar() {\n \treturn new EditToolBar(this);\n }",
"JToolBar getToolBar(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the scat_seq_num. Creation Date Wed Aug 31 19:08:02 CDT 2005 | public void setScat_seq_num(final java.lang.String scat_seq_num) {
this.scat_seq_num = scat_seq_num;
} | [
"public void setSeqNum(int seqNum) {\n doSetSeqNum(seqNum);\n }",
"public void set_seqNum(int value) {\n setUIntBEElement(offsetBits_seqNum(), 16, value);\n }",
"public void setSeqNum(long value) {\n this.seqNum = value;\n }",
"void setSequenceNumber(int sequenceNumber);",
"public fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes ScrollView's background depending on anketa's type | private void initEditScrollBackround(View page, int index) {
ScrollView scroll = (ScrollView) page.findViewById(R.id.scroll);
scroll.setBackgroundResource((intervalType[index] == dbStructure.RENT) ? R.drawable.anketa_background_gradient_rent : R.drawable.anketa_background_gradient_book);
} | [
"private void initViewScrollBackround(View page, int index) {\n\t\tScrollView scroll = (ScrollView) page.findViewById(R.id.scroll);\n\t\tscroll.setBackgroundResource((intervalType[index] == dbStructure.RENT) ? R.drawable.anketa_background_gradient_rent : R.drawable.anketa_background_gradient_book);\n\t}",
"privat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subtract a thread from the thread pool. | protected synchronized void subtractThread() {
Worker wo = workerList.poll();
if (wo != null) {
wo.setWorking(false);
// This worker is now end of service, we clear it from worker list.
--currentPoolSize;
} else {
LOG.warn("There is no more thread ... | [
"public static void decrementThreadCounter() {\r\n\t\tthreadCounter--;\r\n\t}",
"public Object pop() {\r\n Object o = null;\r\n while (o == null) {\r\n try {\r\n throttle.increment();\r\n o = pool.remove(0);\r\n } catch (Exception e) {\r\n // thread collision detected, retry\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setter for iLastGameCard member | private StrategyLearning setLastGameCard(int iLastGameCard) {
this.iLastGameCard = iLastGameCard;
return this;
} | [
"public Card getLastPlayedCard() {\n return lastPlayedCard;\n }",
"public void setLastMove(long lastMove)\r\n {\r\n mLastMove = lastMove;\r\n }",
"protected Card getLastDrawnCard() {\n return lastDrawnCard;\n }",
"private int getLastOppDiff(int iOppLastCard) {\r\n\t\treturn th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check to see if the achievement has already been achieved | public boolean achievementExists(int achievement_id){
open();
Cursor cursor = myDatabase.rawQuery("Select * from user_achievements where achievement_id = " + achievement_id, null);
if(cursor.getCount() <= 0){
cursor.close();
return false;
}
cursor.close();... | [
"public void checkAchievements() {\n \t\tif (duration >= 1000*Achievements.LOCAL_SLOW_LONG_TIME) {\n \t\t\tAchievements.unlockLocalAchievement(Achievements.localSlowLongTime);\n \t\t}\n \t}",
"private void checkAchievements() {\r\n \t\tif (dashNumAffectedAsteroids > Achievements.LOCAL_DESTROY_ASTEROIDS_NUM_1) {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true, if player was kicked. | public boolean isKicked() throws RemoteException {
return kicked;
} | [
"public abstract boolean kickPlayer();",
"public boolean canKick(SagaPlayer sagaPlayer) {\n\t\treturn true;\n\t}",
"private void kick() {\n\t\tif(!source.getName().equals(kickPlayer.getName())) {\r\n\t\t\t\r\n\t\t\t//if the user is below the player\r\n\t\t\tif(role.getPlace() > roleOther.getPlace()) {\r\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Static XMI Serializer methods for convenience Serializes a CAS to an XMI stream. | public static void serialize(CAS aCAS, OutputStream aStream) throws SAXException {
serialize(aCAS, null, aStream, false, null);
} | [
"private void _testConversions(CAS aCAS) throws IOException, ParserConfigurationException,\n SAXException, ResourceInitializationException, CASRuntimeException {\n CasData casData = new CasDataImpl();\n XCasToCasDataSaxHandler handler = new XCasToCasDataSaxHandler(casData);\n XCASSerializer xcasSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets baseID. Should only be used if no parent controller has been given to the constructor. | public void setBaseID(int baseID) {
if (parentController != null)
throw new AssertionError("Illegal to specify baseID and parentController!"); //$NON-NLS-1$
this.baseID = baseID;
} | [
"public void setBaseId(Integer baseId) {\r\n this.baseId = baseId;\r\n }",
"public void setBaseId(String baseId) {\n this.baseId = baseId;\n }",
"public void setBaseId(Long baseId) {\n this.baseId = baseId;\n }",
"void setBaseGlobalId(String baseGlobalId);",
"public void setBas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field isMaterialized is set (has been assigned a value) and false otherwise | public boolean isSetIsMaterialized() {
return EncodingUtils.testBit(__isset_bitfield, __ISMATERIALIZED_ISSET_ID);
} | [
"@Override\n\tpublic boolean isFullyMaterialized() {\n\t\t\n\t\treturn fullyMaterialized;\n\t}",
"public boolean isSetTotalFilesMaterializedCount() {\n return EncodingUtils.testBit(__isset_bitfield, __TOTALFILESMATERIALIZEDCOUNT_ISSET_ID);\n }",
"@Override\n\tpublic void setFullyMaterialized(boolean fullyMa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'isTelnyxBillable' | @Test
public void isTelnyxBillableTest() {
// TODO: test isTelnyxBillable
} | [
"public boolean isBillable() {\n return account.isBillable();\n }",
"public boolean isBillable() {\n\t\treturn billable;\n\t}",
"public boolean isSetTelefono() {\n return this.telefono != null;\n }",
"public boolean isSetTelephone() {\n return this.telephone != null;\n }",
"public java.lan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'var299' field. | public void setVar299(java.lang.Boolean value) {
this.var299 = value;
} | [
"public com.dj.model.avro.LargeObjectAvro.Builder setVar299(java.lang.Boolean value) {\n validate(fields()[300], value);\n this.var299 = value;\n fieldSetFlags()[300] = true;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar298(java.lang.Integer value) {\n v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether to use/generate pathstyle or hoststyle URIs. | public boolean isUsePathStyleUris() {
return usePathStyleUris;
} | [
"public boolean isPathStyle() {\n return isPathStyle;\n }",
"public boolean isUri() {\n return isUri;\n }",
"public boolean isGenericURI() {\n // presence of the host (whether valid or empty) means\n // double-slashes which means generic uri\n return (m_host != null);\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
size of the uncompressed data in bytes | public long uncompressedSize() { int o = __offset(12); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } | [
"long getUncompressedSize();",
"public long compressedSize() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }",
"int getDataSize();",
"public int numberOfBytes()\n {\n return this.data.size();\n }",
"public static int size_infos_size_data() {\n return (8 / 8);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the layout of the dashboard. | @Nested
public DashboardLayout getLayout()
{
return fLayout;
} | [
"public String getLayout();",
"protected SpringLayout getLayout() {\n\t\treturn (SpringLayout) window.getContentPane().getLayout();\n\t}",
"public String getPageLayout() {\n\t\treturn layout.getText();\n\t}",
"@Override\n\tpublic java.lang.String getLayout() {\n\t\treturn _scienceApp.getLayout();\n\t}",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
java Ddbt.logging=DEBUG Ddbt.config="C:\\dbtconfig.properties" jar dbt.properties: dbt.sql = select 2 as "default" from dual | public static void main(String[] args) {
try {
log.debug("Starting");
printVersion();
String configFile = System.getProperty("dbt.config");
String defaultConfigLocation = "dbt-config.properties";
configFile = configFile == null || configFile.isEmpty() ? defaultConfigLocation : configFile;
// ... | [
"public static void main(String[] args) throws Exception {\n\n Properties pro=new Properties();\n pro.load(new FileReader(\"D:\\\\Git\\\\cangku\\\\demo_study\\\\Demojava\\\\src\\\\druid.properties\"));\n\n DataSource ds = DruidDataSourceFactory.createDataSource(pro);\n Connection conn=ds... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the SaveState from the file specified with name. | public static State loadGameInfo(String name) throws IOException, ClassNotFoundException {
State s = null; // Eclipse complaining if not initializing here....
FileInputStream file = new FileInputStream(name);
ObjectInputStream pump = new ObjectInputStream(file);
s = (State) pump.readObject();
pump.close()... | [
"void loadOriginalGameState(String saveName, int level) throws IOException;",
"LevelInitialized loadOriginalGameState(String saveName, int level) throws IOException;",
"void restoreState(java.io.File file);",
"public boolean restoreState (String fileName) throws FileNotFoundException, IOException\n {\n\tFi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Create App Step'. | CdapCreateAppStep createCdapCreateAppStep(); | [
"CdapCreateAppWithConfigStep createCdapCreateAppWithConfigStep();",
"CdapStartAppStep createCdapStartAppStep();",
"CdapDeployAppStep createCdapDeployAppStep();",
"ManufacturingStep createManufacturingStep();",
"public CreateAppPanel ()\n {\n addStyleName(\"createApp\");\n AppUtil.addNameBox... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unregisters an object that is federated from an external dataClay instance. | public void unregisterExternalObject(final ObjectID objectID) {
metadataDB.deleteExternalObject(objectID);
} | [
"private void unregister() {\n\t\tgetLocalInstance().setData(null);\n\t\tmodule.getEntityProvider().removeData(this);\n\t\tsetNotDummy(false);\n\t}",
"public boolean unfederateObjectWith(final ObjectID objectID, final DataClayInstanceID dataClayID) {\n\n\t\t// Check object exists\n\t\tfinal ObjectMetaData objectM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/GL11.glEnable(GL11.GL_LIGHT1); // Enable Light1 GL11.glEnable(GL11.GL_LIGHTING); // Enable Lighting GL11.glLight(GL11.GL_LIGHT1, GL11.GL_POSITION, light_position ); // Set Light1 Position GL11.glLight(GL11.GL_LIGHT1, GL11.GL_AMBIENT, light_ambient ); // Set Light1 Ambience GL11.glLight(GL11.GL_LIGHT1, GL11.GL_DIFFUSE,... | public void enable() {
GL11.glEnable( glLightTable[glLightId] ); // Enable Light1
GL11.glEnable( GL11.GL_LIGHTING ); // Enable Lighting
GL11.glLight( glLightTable[glLightId], ... | [
"private void setupLighting() {\n\t\tByteBuffer temp = ByteBuffer.allocateDirect(16);\n\t\ttemp.order(ByteOrder.nativeOrder());\n\t\tglLightModel(GL_LIGHT_MODEL_AMBIENT, (FloatBuffer)temp.asFloatBuffer().put(new float[]{0.0f, 0.0f, 0.0f, 1.0f}).flip());\n\t\tglLight(GL_LIGHT0, GL_POSITION, (FloatBuffer)temp.asFloat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When sending data to a user that joined the room through FMUC (when the user is a user that is local to a remote chatroom that joined our room as a 'joining FMUC node'), then we'll need to add an 'fmuc' element to all data that we send it. The data that is to be added must include the 'from' address representing the FM... | default void augmentOutboundStanzaWithFMUCData( @Nonnull Packet packet )
{
if ( !isRemoteFmuc() ) {
Log.trace( "Recipient '{}' is not in a remote FMUC room. No need to augment stanza with FMUC data.", this.getUserAddress() );
return;
}
Log.trace( "Sending data to reci... | [
"public void addMucOccupantToRoom(Presence presence){\n JID clientJID = presence.getFrom();\n JID mucOccupantJID = presence.getTo();\n logger.info(\"adding new muc occupant with occupant JID: \" + mucOccupantJID\n + \" from fullJID: \" + clientJID);\n mucOccupantToNick.put... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all JmiAssocEdges representing associations incoming to any class vertex returned by getAllSuperclassVertices(vertex). | public Set<JmiAssocEdge> getInheritedIncomingAssocEdges(
JmiClassVertex vertex)
{
return getClassAttributes(vertex).inheritedIncomingAssocEdges;
} | [
"public Set<JmiAssocEdge> getAllIncomingAssocEdges(JmiClassVertex vertex)\n {\n return getClassAttributes(vertex).allIncomingAssocEdges;\n }",
"public Set<JmiAssocEdge> getInheritedOutgoingAssocEdges(\n JmiClassVertex vertex)\n {\n return getClassAttributes(vertex).inheritedOutgoingA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__MultiOpExp__Group__0__Impl" $ANTLR start "rule__MultiOpExp__Group__1" InternalOCLlite.g:4850:1: rule__MultiOpExp__Group__1 : rule__MultiOpExp__Group__1__Impl ; | public final void rule__MultiOpExp__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalOCLlite.g:4854:1: ( rule__MultiOpExp__Group__1__Impl )
// InternalOCLlite.g:4855:2: rule__MultiOpExp__Group__1__Impl
{
... | [
"public final void rule__MultiOpExp__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:4865:1: ( ( ( rule__MultiOpExp__Group_1__0 )* ) )\n // InternalOCLlite.g:4866:1: ( ( rule__MultiOpExp__Group_1__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
NonJSAPI method returns a unique 32bit id for the specified rule | public int getRuleID(String rname) {
GRule r = (GRule)rules.get(stripRuleName(rname));
if (r == null) {
return -1;
}
return r.hashCode();
} | [
"int getRuleId();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getRuleUID();",
"int getSymbolicId();",
"public String getRuleId() {\r\n return (String) getAttributeInternal(RULEID);\r\n }",
"public String ruleId() {\n return this.ruleId;\n }",
"public int get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns order id from request. | private String getOrderId(DynamoHttpServletRequest request) {
String result = request.getParameter(ORDER_ID_PARAMETER);
if ( null == result || 0 == result.trim().length() ) {
Object shoppingCartParameter = request.getObjectParameter(SHOPPING_CART_PARAMETER);
if (shoppingCartParam... | [
"UUID getOrderID();",
"public void readOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n Object orderIdParam = session.getAttribute(\"orderId\");\n orderId = null;\n if(orderIdPar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor of the temperature inputed by the user. | public double getInputTemperature() throws NumberFormatException {
return inputPanel.getTemperature();
} | [
"public double getTemperature() {return temperature;}",
"public double getTemperature(){\r\n\t\treturn temperature;\r\n\t}",
"public double getTemperature() {\r\n temperature += Math.random() - 0.5;\r\n return ((int)(temperature*10))/10.0;\r\n }",
"public static int getTemperature() {\n\t\t\n\t\tSystem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Amazon Resource Name (ARN) of your function. | public String getFunctionArn() {
return this.functionArn;
} | [
"public String getFunctionARN() {\n return this.functionARN;\n }",
"public String getFunctionname() {\n return functionname;\n }",
"public void setFunctionARN(String functionARN) {\n this.functionARN = functionARN;\n }",
"@Override\n public StructuredQName getFunctionQName... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method: metersToFeetConversion() Description: Converts the units of a length measurement from meters to feet Input: double valueInMeters the length measurement in metric units Output: None Returns: double valueInFeet the length measurement in imperial units | private double metersToFeetConversion(double valueInMeters){
double valueInFeet;
valueInFeet = valueInMeters * FEET_TO_METER_SCALAR;
return valueInFeet;
} | [
"private double feetToMetersConversion(double valueInFeet){\n double valueInMeters;\n valueInMeters = valueInFeet / FEET_TO_METER_SCALAR;\n return valueInMeters;\n }",
"static double convert_feet2meters(double feet) {\n\n double inches;\n double meters;\n\n inches = 12... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the maxSemiCreditCardOverdueAmount value for this DetailedPbocStatisticsInfo. | public void setMaxSemiCreditCardOverdueAmount(java.lang.Double maxSemiCreditCardOverdueAmount) {
this.maxSemiCreditCardOverdueAmount = maxSemiCreditCardOverdueAmount;
} | [
"public void setMaxCreditCardOverdueAmount(java.lang.Double maxCreditCardOverdueAmount) {\n this.maxCreditCardOverdueAmount = maxCreditCardOverdueAmount;\n }",
"public java.lang.Double getMaxSemiCreditCardOverdueAmount() {\n return maxSemiCreditCardOverdueAmount;\n }",
"public java.lang.Doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extracts the anonymous value that is defined by this class (type and type handler) from the given result set. | @SuppressWarnings("unchecked")
public T getAnonymousValue(DsResultSet rs)
{
return (T) rs.getAnynomousObject(this);
} | [
"T extractFromResultSet(ResultSet resultSet) throws SQLException;",
"public abstract T getTuple(ResultSet result);",
"public abstract T getDataFromResultSet(ResultSet set, String fieldName) throws SQLException;",
"Optional<T> extractItem(ResultSet resultSet) throws SQLException;",
"private static ResultSetH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creating the method to disable "true" and "false" buttons after one of them is clicked. | protected void disableButtons() {
if (mFalseButton.isPressed() || mTrueButton.isPressed())
mFalseButton.setEnabled(false);
mTrueButton.setEnabled(false);
} | [
"private void disableButtons()\r\n {\r\n }",
"protected void disableButton()\r\n\t\t{\r\n\t\tthis.launch.setEnabled(false);\r\n\t\tthis.cancel.setEnabled(false);\r\n\t\t}",
"public void disableBtns() {\n\t\tanswer1.setEnabled(false);\n\t\tanswer2.setEnabled(false);\n\t\tanswer3.setEnabled(false);\n\t}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks the current total money in the pot. | public double checkPot(){
return totalPot;
} | [
"public boolean enoughMoney() {\n return this.getMoney() > 100;\n }",
"public void checkAmount() {\n Money m = getAmount();\n if (m.getNumFive() < 20) { warning(\"Five\"); }\n if (m.getNumTen() < 20) { warning(\"Ten\"); }\n if (m.getNumTwenty() < 20) { warning(\"Twenty\"); }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test which tries to submit announcement with wrong address. Wrong address is when Google Map service can't provide latitude and longitude. We input non existing address and try to submit it. Then we check if toaster is presented and if error message is correct. | @Test
public void wrongAddress() {
LoginUtil.login(ADVERTISER_USERNAME, ADVERTISER_PASSWORD, driver, wait);
final WebElement addAnnouncementLink = driver.findElement(ADD_ANNOUNCEMENT_LINK);
addAnnouncementLink.click();
// Check if we're on right URL (Adding Announcement Form)
... | [
"private static void testValidate(String address, String expected) {\n }",
"@Test\n public void testRequestInvalidStreetNameInput() {\n System.out.println(\"requestInvalidStreetNameInput\");\n String testInput = \"\\n\" // Empty input is invalid\n + \"Teststraatnaam\"; // End wi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of HTTP/HTTP/1.1 connection upgrader. | Http1Upgrader create(T config, ProtocolConfigs configs); | [
"public HttpConnection() {}",
"Observable<HttpConnection> buildUpon(String uri);",
"@Override\n public void connect(URI uri, WsListener listener) {\n\n byte[] nonce = new byte[16];\n RANDOM.get().nextBytes(nonce);\n String secWsKey = B64_ENCODER.encodeToString(nonce);\n\n Http1Cli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a mouse wheel listener to the drawing panel | public void addMouseWheelListener(MouseWheelListener mouseWheelListener); | [
"void addGraphicsNodeMouseWheelListener(GraphicsNodeMouseWheelListener l);",
"void mouseWheelEvent(int x, int y, int count, boolean mod1, boolean mod2);",
"public abstract void mouseWheel(MouseWheelEvent mouseWheelEvent);",
"public void mouseWheelMoved() {\n \t}",
"public void registerMouseWheelListener(IMo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the external blob adapter registered for given prefix. | ExternalBlobAdapter getExternalBlobAdapterForPrefix(String prefix); | [
"ExternalBlobAdapter getExternalBlobAdapterForUri(String uri);",
"public URL findAdapterResource(String name) {\n Class adapterClass = this.getClass();\n\n while (adapterClass != null\n && JdbcAdapter.class.isAssignableFrom(adapterClass)) {\n\n String path = Util.getPackagePath... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all the entries added into Item. | public PutItemRequest clearItemEntries() {
this.item = null;
return this;
} | [
"public void clear() {\n items.clear();\n }",
"public void clearItems() {\n }",
"public void deleteAllItineraryItems() {\n\t\tmEditor.clear();\n\t\tmEditor.commit();\n\t}",
"public void removeAllItems() {\r\n\t\titems.clear();\r\n\t\tgetState().getRootItems().clear();\r\n\t}",
"void clearAllItems... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rulelogicalXor" $ANTLR start "entryRulelogicalAnd" InternalMASL.g:6281:1: entryRulelogicalAnd returns [EObject current=null] : iv_rulelogicalAnd= rulelogicalAnd EOF ; | public final EObject entryRulelogicalAnd() throws RecognitionException {
EObject current = null;
EObject iv_rulelogicalAnd = null;
try {
// InternalMASL.g:6281:51: (iv_rulelogicalAnd= rulelogicalAnd EOF )
// InternalMASL.g:6282:2: iv_rulelogicalAnd= rulelogicalAnd EOF
... | [
"public final EObject entryRuleLogicalAndExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleLogicalAndExpression = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setActiva method, of class Categoria. | @Test
public void testSetActiva() {
System.out.println("setActiva");
boolean activa = false;
Categoria instance = new Categoria();
instance.setActiva(activa);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototyp... | [
"@Test\n public void testGetActiva() {\n System.out.println(\"getActiva\");\n Categoria instance = new Categoria();\n boolean expResult = false;\n boolean result = instance.getActiva();\n assertEquals(expResult, result);\n // TODO review the generated test code and remov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: splitEachArrayElementAndCreateMap(String array[], String delimiter, String removeCharacters) | @Test
public void testSplitEachArrayElementAndCreateMap() throws Exception {
} | [
"public static Map<String, String> convertDataIntoMap(String inputData, String delimiter, String[] header) {\n String[] input = CommonUtils.split(inputData, delimiter);\n if(input == null || input.length == 0 || input.length != header.length) {\n log.error(\"the wrong input data, {}\", inpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated method Adds value to seasons. | public void addToSeasons(final SessionContext ctx, final Season value)
{
addLinkedItems(
ctx,
true,
SslCoreConstants.Relations.DBS2SEASONRELATION,
null,
Collections.singletonList(value),
false,
false,
Utilities.getMarkModifiedOverride(DBS2SEASONRELATION_MARKMODIFIED)
);
} | [
"public void addToSeasons(final Season value)\r\n\t{\r\n\t\taddToSeasons( getSession().getSessionContext(), value );\r\n\t}",
"public void addToSeasonGroups(final SeasonGroup value)\r\n\t{\r\n\t\taddToSeasonGroups( getSession().getSessionContext(), value );\r\n\t}",
"public void setSeasonId(int value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a value to property gtin13. | Builder addGtin13(String value); | [
"Builder addGtin13(Text value);",
"Builder addGtin12(Text value);",
"Builder addGtin12(String value);",
"DefinedProperty nodeAddProperty( long nodeId, int propertyKey, Object value );",
"public void setAttribute13(Number value) {\n setAttributeInternal(ATTRIBUTE13, value);\n }",
"Builder addGtin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Nombre de metodo: EditarDepartamento Parametros: ActionEvent event Retorno: Ninguno Descripcion: Llama al metodo para editar el departamento seleccionado | @FXML
private void EditarDepartamento(ActionEvent event) {
Departamento departamento = tblDepartamentos.getSelectionModel().getSelectedItem();
if(departamento != null){
if(!txtNombreDepartamento.getText().equals("")){
E.EditarDepartamento(departamento, txtNombreDepar... | [
"public void prepararEdicaoItem(ActionEvent event) {\n\t\titemCrudEdit = (Item) event.getComponent().getAttributes().get(\"itemSelecionado\");\r\n\t\tSystem.out.println(\"item que vem da tela: \" + itemCrudEdit);\r\n\t\t\r\n\t\tordemServico = itemCrudEdit.getOs();\r\n\t\t\r\n\t\t//ItemDAO idao = new ItemDAO();\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start the `life timer`. | private void startTimer() {
lifeTimer = new Thread(lifeTimerHandler);
lifeTimer.start();
} | [
"public ExtraLife() {\n\t\tsuper(EXTRA_LIFE_PATH, 0, 0, 0, true, new String[] {Sprite.EXTRA_LIFE});\n\t\tvisible = false;\n\t\trelativeX = 0;\n\t\tstartTimer = new Timer();\n\t\t\n\t\t// start the loop\n\t\tstartTimer(getStartSeconds() * 1000, LOOP_PERIOD_MILLISECOND);\n\t}",
"public final void setStartingLife(fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Todo: read from shared preferences and save to file | public void saveToFile(){
String rewardlist = HandleSharedPreferences.getStringFromSharedPreferences(HandleSharedPreferences.REWARD_LIST_KEY);
String weekdaylist = HandleSharedPreferences.getStringFromSharedPreferences(HandleSharedPreferences.WEEKDAY_LIST_KEY);
String points = "" + HandleSharedP... | [
"protected void savePreferences() {\n // Create or retrieve the shared preference object.\n int mode = Activity.MODE_PRIVATE;\n android.content.SharedPreferences mySharedPreferences = getSharedPreferences(MYPREFS, mode);\n // Retrieve an editor to modify the shared preferences.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column CTSTRS_HISTORY.MT103_FIELD70_4 | public String getMT103_FIELD70_4() {
return MT103_FIELD70_4;
} | [
"java.lang.String getField1260();",
"java.lang.String getField1393();",
"java.lang.String getField1460();",
"java.lang.String getField1360();",
"java.lang.String getField1371();",
"java.lang.String getField1571();",
"java.lang.String getField1463();",
"java.lang.String getField1349();",
"java.lang.S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the ThreadLocal Session instance. Lazy initialize the SessionFactory if needed. | public static Session currentSession() throws HibernateException {
Session s = (Session) threadLocal.get();
if (s == null) {
try {
if (getInterceptor() != null) {
log.debug("Using Interceptor: " + getInterceptor().getClass());
s = sessionFactory.openSession(getInterceptor());
... | [
"public static Session getSession() {\n Session session = (Session) threadLocal.get();\n \n\t\tif (session == null || !session.isOpen()) {\n//\t\t\tif (sessionFactory == null) {\n//\t\t\t\trebuildSessionFactory();\n//\t\t\t}\n\t\t\tiniSessfac();\n\t\t\tsession =getSessionSync();\n\t\t\tthreadLocal.set(s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Quantity' attribute. If the meaning of the 'Quantity' attribute isn't clear, there really should be more of a description here... | public String getQuantity() {
return quantity;
} | [
"public Number getQuantity() {\n return (Number) getAttributeInternal(QUANTITY);\n }",
"java.lang.String getQuantity();",
"public java.lang.Integer getQuantity() {\n return quantity;\n }",
"public Integer getQuantity() {\r\n return this.quantity;\r\n }",
"public Integer getQuan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated: Get procedure for DataCenter | public String getDataCenter() {
return this.dataCenter;
} | [
"java.lang.String getDataCenter();",
"public String getDataCenter() {\n return dataCenter;\n }",
"java.lang.String getServiceCmd();",
"public String getDataCenterName() {\n return dataCenterName;\n }",
"public java.lang.String getDataCenterId() {\r\n return dataCenterId;\r\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmFormalParameter__Group__0__Impl" $ANTLR start "rule__JvmFormalParameter__Group__1" InternalDroneScript.g:12758:1: rule__JvmFormalParameter__Group__1 : rule__JvmFormalParameter__Group__1__Impl ; | public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDroneScript.g:12762:1: ( rule__JvmFormalParameter__Group__1__Impl )
// InternalDroneScript.g:12763:2: rule__JvmFormalParameter... | [
"public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:12735:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\r\n // ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attaches a temporary blob to this container. | public void attachTemporaryBlob(String blobKey) {
if (owner.isNew()) {
throw Exceptions.handle()
.to(StorageUtils.LOG)
.withSystemErrorMessage(
"Layer 2: Cannot attach an object for a non-persistent entity of... | [
"public org.hl7.fhir.Base64Binary addNewBlob()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Base64Binary target = null;\n target = (org.hl7.fhir.Base64Binary)get_store().add_element_user(BLOB$2);\n return target;\n }\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify the color of Cool or heat label. | boolean labelColor(String mode); | [
"void testFindColor(Tester t) {\r\n this.initData();\r\n t.checkExpect(new FindColor().apply(c1, 60, 30), true);\r\n t.checkExpect(new FindColor().apply(c1, 160, 30), false);\r\n t.checkExpect(new FindColor().apply(c1, 60, 130), false);\r\n t.checkExpect(new FindColor().apply(c1, 160, 130), false);\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |