query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Get the list of all registered forks | public String[] getForkList() throws RemoteException; | [
"public List<SessionFile> getRoots() {\n List<SessionFile> result = Factory.newArrayList();\n for (SharedFile shared : fileSystem.getRoots())\n result.add(getOrCreateFile(shared));\n return result;\n }",
"public List<JFrogPlatformInstance> getJfrogInstances() {\n return RepositoriesUtils... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Size of column with the most nonzeros. | int maxColSize() {
int max = Integer.MIN_VALUE;
for (IntSet col : this.cols) {
if (col.size() > max) {
max = col.size();
}
}
return max;
} | [
"int getNumOfColumns();",
"int minColSizeAboveZero() {\n int min = Integer.MAX_VALUE;\n for (IntSet col : this.cols) {\n if (col.size() > 0 && col.size() < min) {\n min = col.size();\n }\n }\n return min;\n }",
"protected int getRealColumnCount() {\n return Math.max(getColumnCou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The constructor of ShopServlet. | ShopServlet() {
// TODO may add more things here
products = new ArrayList<ProductServlet>();
} | [
"public EchoServlet()\n {\n super();\n\n // Create a logging instance\n this.log = Logger.getLogger(EchoServlet.class.getName());\n\n log.info(\"Constructed new EchoServlet\");\n }",
"public AppointmentBookServlet() {\n }",
"public ORCIDServlet() { }",
"public AbstractServlet()\n {\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of deleteMessage method, of class FileSystemStorage. | @Test
public void testDeleteMessage() {
System.out.println("deleteMessage");
String message = "";
FileSystemStorage instance = null;
instance.deleteMessage(message);
// TODO review the generated test code and remove the default call to fail.
fail("The test case... | [
"public void deleteMessageTest(){\n\t\tint messageId = 102;\n\t\tgiven()\n\t\t\t.pathParam(\"messageId\", messageId)\n\t\t.when()\n\t\t\t.delete(\"/message/{messageId}\")\n\t\t.then()\n\t\t\t.statusCode(200)\n\t\t\t.body(\"message\", is(\"Message Deleted \"+messageId));\n\t}",
"@Test\n public void testMoveMe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required string AttachmentStatus = 13 [(.validation.regex) = ""]; | public java.lang.String getAttachmentStatus() {
java.lang.Object ref = attachmentStatus_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
... | [
"public Builder setAttachmentStatus(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00002000;\n attachmentStatus_ = value;\n onChanged();\n return this;\n }",
"java.lang.String getA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the doctorVisit by id. | public void delete(Long id) {
log.debug("Request to delete DoctorVisit : {}", id);
doctorVisitRepository.delete(id);
} | [
"public void deleteVisit(Long id) {\n dentistVisitDao.deleteVisit(id);\n }",
"@Transactional\r\n\tpublic void deleteVisit(Visit visit) {\r\n\t\tvisitDAO.remove(visit);\r\n\t\tvisitDAO.flush();\r\n\t}",
"@DeleteMapping(\"/doctors/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDoctor(@PathVa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ write a program that can validate if the web address is valid must starts with www. must ends with .com, .edu, .net or .gov | public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Please enter the web address that you'd like to validate");
String webAddress = input.next();
webAddress = webAddress.toLowerCase();
boolean validStart = webAddress.startsWith(... | [
"private boolean validWebsite(String website) {\n String url_regex = \"(http://|https://)(www.)?([a-zA-Z0-9]+).[a-zA-Z0-9]*.[a-z]{3}.?([a-z]+)?\";\n Pattern pattern = Pattern.compile(url_regex);\n Matcher matcher = pattern.matcher(website);\n return matcher.matches();\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This adds a property descriptor for the Profile Path feature. | protected void addProfilePathPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_WebsphereServerTask_profilePath_feature"),
getString("_UI_PropertyDescriptor... | [
"public void setProfile_path(String v) {\n\t\tthis.profile_path = v;\n\t}",
"protected void addProfilePropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResour... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the isbn value for this Deal. | public java.lang.String getIsbn() {
return isbn;
} | [
"public String getIsbn() {\n return isbn;\n }",
"public ISBN getIsbn() {\n return this.isbn;\n }",
"public String getBookISBN ( )\n { return isbnNumber.getISBN ( ) ;\n }",
"public String getISBN() {\r\n return super.getUniqueID();\r\n }",
"public String getISBN( )\n { return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ConditionElement ::= (ConditionElement1) OR CondTerm | public void visit(ConditionElement1 conditionElement1) {
// if a != 0, jmp true1
Code.loadConst(0);
Code.put(Code.jcc+Code.ne);
Code.put2(11);
// if b != 0, jmp true2
Code.loadConst(0);
Code.put(Code.jcc + Code.ne);
Code.put2(8);
// false: put 0,jmp next
Code.loadConst(0);
Code.put(Code.... | [
"public ExpressionNode getCondition();",
"public void addToConditions(entity.ClassificationCondition element);",
"public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}",
"public void addToConditions(entity.GL7SublineTypeCond element);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all the holders for the account with the matching account number. | static SearchResult<AccountHolder> getHolders(String no) throws RecordSearchException {
String condition = "AccountNo = '" + no + "'";
LinkedList<Record> records = AccountHolderTable.getInstance().read(condition);
if (records == null || records.size() == 0) {
throw new RecordSearchException();
}... | [
"public ArrayList<AccountHolder> getAccountHolder() {\n return accountHolder;\n }",
"public Account getAccount(Long number);",
"public Account getAccount(int accountNumber)\r\n {\r\n for(Account ac : accounts) // for each Account object\r\n {\r\n if(ac.getAccountNumber() == accou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove the reference from the specified SubsetImpl to this TableSliceElementImpl, removing this TableSliceElementImple from the specified subset, if it has not already been removed. Returns true if the specified SubsetImpl was successfully removed | @Override
protected boolean remove(SubsetImpl r)
{
if (r != null) {
/*
* if the subset contains the element, use the subset method to do all the work
* TableSliceElementImpl.remove will be called again to finish up
*/
if (r.contains(thi... | [
"public boolean removeSubstitutionSet(SubstitutionSet obj)\n {\n return _objSubstitutionSet.remove(obj);\n }",
"public boolean removeToAssociation(Association assoc) {\n \t\treturn toAssociations.remove(assoc);\n \t}",
"public boolean removeChildPart( T part ) {\r\n\t\treturn _parts.remove( part );\r\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extracts the token from the provided request | public static String extractToken(HttpServletRequest request) {
String header = request.getHeader(HttpHeaders.AUTHORIZATION);
if (header != null && header.toLowerCase().startsWith("basic")) return header.substring(6);
else return null;
} | [
"public Token getRequestToken();",
"private String getToken(HttpServletRequest request){\n String header = request.getHeader(\"Authorization\");\n if(header != null && header.startsWith(\"Bearer\"))\n \t// Sacamos al bearer del token\n return header.replace(\"Bearer \", \"\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for debugger address property. | public void setDebuggerAddressProperty(final String debuggerAddressProperty)
{
this.debuggerAddressProperty = debuggerAddressProperty;
} | [
"public void setDebugAddress(final String debugAddress)\n {\n this.debugAddress = debugAddress;\n }",
"public void setAddress(String myAddress) {\n address = myAddress;\n }",
"public void setAddress(String address) {\r\n this.address = address; // set the address\r\n }",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helpermethod to build an array over language ids | public static String[] getLangIDs() {
HashMap<String, String> ges = getLangs();
String[] names = new String[ges.size()];
int i = 0;
// add all
for (String key : ges.keySet()) {
names[i] = key;
i++;
}
return names;
} | [
"LanguageEnum[] getAllLanguages();",
"public static String[] getLanguageList() {\n return languageList;\n }",
"String getLangId();",
"java.util.List<java.lang.Long> getCourseidsList();",
"java.util.List<java.lang.Long> getCodeIdsList();",
"public abstract String[] getAvailableLanguages();",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read the next chunk of audio data at the given position. The buffer's size or channel count should not be modified. If anything is read at all, the implementation should fill the entire buffer and return true. If not the entire buffer can be filled, fill up with silence. If nothing was written to the buffer, return fal... | public boolean read(long samplePos, FloatSampleBuffer buffer, int offset,
int sampleCount); | [
"private int readNextAudioBlock() throws IOException {\n\t\tassert floatOverlap < audioFloatBuffer.length;\n\t\t\n\t\t// Is this the first buffer?\n\t\tboolean isFirstBuffer = (bytesProcessed ==0 || bytesProcessed == bytesToSkip);\n\t\t\n\t\tfinal int offsetInBytes;\n\t\t\n\t\tfinal int offsetInSamples;\n\t\t\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fills each result item image view with image of glass for given drink | @SuppressLint("DefaultLocale")
private void setGlassPicture(View listItems, Drink drink) {
ImageView glassImageView = (ImageView) listItems.findViewById(R.id.result_glass_image);
int imageID = getResources().getIdentifier("com.onedrinkaway:drawable/" + drink.image, null, null);
if(imageID == 0) {
Str... | [
"@SuppressLint(\"DefaultLocale\")\r\n\tprivate void setGlassPicture(View listItems, Drink drink) {\r\n\t\tImageView glassImageView = (ImageView) listItems.findViewById(R.id.common_drink_image);\r\n\r\n\t\tint imageID = getResources().getIdentifier(\"com.onedrinkaway:drawable/\" + drink.image, null, null);\r\n\t\t\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse the xml to convert into Imaging actions. | @SuppressWarnings("unchecked")
private static void parseActions() throws DataConversionException {
logger.info("Parsing actions !");
imagingActions = new ArrayList<ImagingAction>();
SAXBuilder sxb = new SAXBuilder();
Document document = null;
try {
... | [
"protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }",
"void processAction(TagAction tagAction);",
"protected void init_actions()\n {\n action_obj = new CUP$FractalParser$actions(this);\n }",
"private void parseXML(InputStream is) throws ArxFrameExcep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copies a repository from one project to another one. The project can be the same. | VcsRepositoryUrl copyRepository(String sourceProjectKey, String sourceRepositoryName, String targetProjectKey, String targetRepositoryName) throws VersionControlException; | [
"public String clone(RepositoryDTO repo, File targetDir) throws Exception;",
"public void cloneGitRepo() {\n\t\tFile repoLocal = new File(\"repositorio\");\n\t\tif (repoLocal.exists())\n\t\t\ttry {\n\t\t\t\tdelete(repoLocal);\n\t\t\t} catch (IOException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\ttry {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 templateSmsSize = 13; | int getTemplateSmsSize(); | [
"public int getTemplateSmsSize() {\n return templateSmsSize_;\n }",
"public int getTemplateSmsSize() {\n return templateSmsSize_;\n }",
"boolean hasTemplateSmsSize();",
"public Builder setTemplateSmsSize(int value) {\n bitField0_ |= 0x00001000;\n templateSmsSize_ = value;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the subject distinguished name for the given dss certificate identifier. | public String getCertificateDN(final String dssCertificateId) {
CertificateWrapper certificate = getUsedCertificateByIdNullSafe(dssCertificateId);
return certificate.getCertificateDN();
} | [
"public String getCertificateIssuerDN(final String dssCertificateId) {\n\t\tCertificateWrapper certificate = getUsedCertificateByIdNullSafe(dssCertificateId);\n\t\treturn certificate.getCertificateIssuerDN();\n\t}",
"public static String getDSSFilename(String dsdfile) {\r\n\t\treturn dsdfile.substring(0, dsdfile.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Action listener invoked when the user presses the "Open" button after having selected a remote microarray. The listener will attempt to get the microarray data from the remote server and load them in the application. | private void openRemoteFile_action(ActionEvent e) {
// If there are multiple parents in the paths, it means user tries
// to select arrays from different experiments, it's not allowed.
TreePath[] paths = remoteFileTree.getSelectionPaths();
HashSet set = new HashSet();
for (TreePath treePath : paths) {
... | [
"@FXML private void handleOpenButton(ActionEvent event) throws IOException {\n\t\t\n\t\tif(albumList.getSelectionModel().getSelectedIndex() < 0 || albumList.getSelectionModel().getSelectedIndex() >= observableAlbums.size()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// **go to OpenedAlbumDisplay stage\n\t\tStage stage = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a Move Resource from the move collection. | OperationStatus delete(
String resourceGroupName, String moveCollectionName, String moveResourceName, Context context); | [
"OperationStatus delete(String resourceGroupName, String moveCollectionName, String moveResourceName);",
"void deleteResource(final String resourceId);",
"public void removeMovie(Movie movie) { this.movies.remove(movie); }",
"public void delete()\n throws ROSRSException {\n this.rosrs.dele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The RightsManagementInterface supports the management of licences associated with assets. | public interface RightsManagementInterface
{
} | [
"License createLicense();",
"Builder addLicense(CreativeWork value);",
"public void setLicenses(int value) {\n this.licenses = value;\n }",
"public licenseTypes getLicence() {\r\n return licence;\r\n }",
"io.bloombox.schema.licensure.Licensure.LicensingAuthorityOrBuilder getAuthorityOrBu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To fill in the credentials drop down list which's field is 'credentialsId'. This method's name works with tag . | public ListBoxModel doFillCredentialsIdItems(@AncestorInPath Item project,
@QueryParameter String credentialsId) {
if (project == null || !project.hasPermission(Item.CONFIGURE)) {
return new StandardUsernameListBoxModel().includeCurrentVal... | [
"private void fillCredentialsPage(){\n driver.findElement(By.xpath(\"//*[@id=\\\"username\\\"]\")).sendKeys(USERNAME_DEFAULT);\n driver.findElement(By.xpath(\"//*[@id=\\\"password\\\"]\")).sendKeys(PASSWORD_DEFAULT);\n driver.findElement(By.xpath(\"//*[@id=\\\"InternalAgentLoginForm\\\"]/div/ta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if a stage supported by the current home server can be handle by the app | public boolean hasNonSupportedStage() {
return !VECTOR_SUPPORTED_STAGES.containsAll(mSupportedStages);
} | [
"boolean isApplicable(IStage stage);",
"public boolean supportStage(final String stage) {\n return mSupportedStages.contains(stage);\n }",
"private boolean isStageRequired(final String stage) {\n return mRegistrationResponse != null\n && isRequired(stage)\n && !isC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process Log File creating one database registry for each line | private void processFile() {
try (Stream<String> stream = Files.lines(Paths.get(logFile))) {
stream.map(line -> line.split("\\|")).forEach(values -> {
try {
accessLogService.register(LOG_DATE_FORMAT.parse(values[0]), values[1], values[2],
Integer.parseInt(values[3]), values[4]);
// System.out.... | [
"@Override\n public void readAndCreate() {\n try {\n //Declare a scanner to parse the file\n Scanner scanner = new Scanner(file);\n //While there is another line in the file\n while (scanner.hasNextLine()) {\n //Read that line and tokenize it\n String[] l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the user is viewing his profile. | public boolean currentProfile()
{
if (getCurrentUser() != null)
{
if (getProfile().getName().equals(getCurrentUser().getName()))
{
return true;
}
else
{
return false;
}
}
... | [
"public boolean isProfile() {\n return (hasOption(PROFILE_DOMAIN, \"nicknames\")\n || hasOption(PROFILE_DOMAIN, \"nickname\"))\n && hasOption(PROFILE_DOMAIN, \"realname\");\n }",
"public boolean isProfilesViewable();",
"protected boolean isDiffUser() {\r\n\t\tString p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to find all shift from the database into a list | @Override
public List<Shift> findAll() throws DataAccessException {
ResultSet rs;
try {
rs = this.findAllPS.executeQuery();
} catch (SQLException e) {
// e.printStackTsrace();
throw new DataAccessException(DBMessages.COULD_NOT_READ_RESULTSET, e);
}
List<Shift> res = buildObjects(rs);
return res;
... | [
"@Override\n public List<Shift> retrieveAllShifts() {\n return this.shiftList.stream().filter(shift -> !shift.getShiftType().equals(\"\")).collect(Collectors.toList());\n }",
"public List<EmpEachShift> getAll(){\n\t\treturn empEachShiftList;\n\t}",
"public List<ShiftBean> getAllShift() throws Class... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query that returns any string from database given certain table constraints | public ArrayList<String> selectArrayList(String field, String table, String constraintField1, String constraintValue1, String constraintField2, String constraintValue2, String constraintField3, String constraintValue3) {
ArrayList<String> strings = new ArrayList<>();
StringBuil... | [
"public String selectString(String field, String table, String constraintField1, String constraintValue1, String constraintField2, String constraintValue2, String constraintField3, String constraintValue3) {\n\n StringBuilder query = new StringBuilder();\n\n if (!constraintValue3.equals(\"\")) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the schema of the fields for the time model instance. | StructType getSchema(); | [
"ImmutableList<SchemaOrgType> getTimeRequiredList();",
"public TimeType getTimeType() {\n return updateRule.getTimeType();\n }",
"public String getStartTimeField();",
"@Override\n\tpublic Fields getSchema() {\n\t\treturn schema;\n\t}",
"java.lang.String getField1724();",
"com.sagas.meta.model.Me... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getters and Setters Sets the hasChildren property to a given boolean | public void setHasChildren(boolean hasChildren) {
this.hasChildren = hasChildren;
} | [
"boolean hasChildren();",
"boolean getIsChild();",
"public boolean getAllowsChildren()\n {\n return true;\n }",
"public abstract boolean getRendersChildren();",
"public Boolean getIsChild() {\n return isChild;\n }",
"public final boolean hasChildren() {\n\t\treturn this._children.si... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Activity__NodesAssignment_6_2" $ANTLR start "rule__Activity__NodesAssignment_6_3_1" InternalActivityDiagram.g:7199:1: rule__Activity__NodesAssignment_6_3_1 : ( ruleActivityNode ) ; | public final void rule__Activity__NodesAssignment_6_3_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:7203:1: ( ( ruleActivityNode ) )
// InternalActivityDiagram.g:7204:1: ( ruleActivityNode )
{
... | [
"public final void rule__Activity__NodesAssignment_6_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:7188:1: ( ( ruleActivityNode ) )\n // InternalActivityDiagram.g:7189:1: ( ruleActivityNode )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Adapter is responsible for displaying each item in the list. This method will set the right adapter for the user selected option. | private void setAdapter() {
switch (mShowOption) {
case Constants.SHOW_FAVORITES:
mRecyclerView.setAdapter(mFavoritesAdapter);
break;
case Constants.SHOW_POPULAR:
case Constants.SHOW_TOP_RATED:
mRecyclerView.setAdapter(mTmdbList... | [
"@Override\n public ObjectAdapter getAdapter() {\n return new ObjectAdapter<>(\n Arrays.asList(choices), getActivity()\n );\n }",
"private void assignAdapter () {\r\n \t\t\t\t\r\n \t\tpeople= 0;\r\n \t\tif (peopleMap != null) {\r\n \t\t\tpeopleMap.clear();\t// Reset ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns class name from a qualified name (packageName.classname). | private String getClassName(String qualifiedName) {
int lastPeriodPos = qualifiedName.lastIndexOf('.');
return qualifiedName.substring(lastPeriodPos + 1);
} | [
"String getFullQualifiedClassName();",
"protected String packageQualifiedClassName (String umlQualifiedName, int pkgDepth) {\n String[] parts = umlQualifiedName.split (\"::\");\n int depth = Math.min(parts.length, pkgDepth);\n if (parts.length > depth) {\n StringBuilder sb = new St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the OlderVehiclesFilter class. | public OlderVehiclesFilter(Vehicle vehicle1, Vehicle vehicle2, Vehicle vehicle3){
this.vehicles.add(vehicle1);
this.vehicles.add(vehicle2);
this.vehicles.add(vehicle2);
} | [
"public OlderVehicleFilter(List<Vehicle> vehicles) {\n this.vehicles = vehicles;\n }",
"public OlderVehiclesFilter(List<Vehicle> vehicles) {\n this.vehicles = vehicles;\n }",
"public OlderVehicleFilter(Vehicle vehicle1, Vehicle vehicle2, Vehicle vehicle3) {\n this.vehicles.add(vehicle1);\n this.ve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Used to initialize the logger variable if it hasn't been before and gives the calling function the instance for the logger. This is used opposed to the one above if you weren't provide with the verbose and log flag or you know getInstance() has already been called and you don't want to pass args in. | public static Logger getInstance() {
if(logger == null) {
logger = new Logger(false, false);
}
return logger;
} | [
"LoggerCaller getLoggerCaller();",
"private static Logger getLogger() {\n if (logger == null) {\n new LoggerWrapper();\n }\n return logger;\n }",
"private static Logger getInstance() {\n\t\tif (instance == null)\n\t\t\tinstance = new Logger();\n\n\t\treturn instance;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether the placement is possible | public boolean isPlacementPossible(Placement placement) {
int row = placement.getAnchorPosition().getRow();
int column = placement.getAnchorPosition().getColumn();
int maxRow = row + placement.getOrientation().getHeight() - 1;
int maxColumn = column + placement.getOrientation().getWi... | [
"boolean needPlacement();",
"public boolean needsPlacement() {\n\t\treturn needsPlacement;\n\t}",
"boolean isPlaced();",
"public boolean placementDone() {return placedShips == 4;}",
"public boolean isPlaced() {\n return placed;\n }",
"public boolean isPlaceable() {\n\t\tlong now = Calendar.getIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The token created for this authentication is a CasToken containing the CAS service ticket received on the CAS service url (on which the filter must be configured). | @Override
protected AuthenticationToken createToken(ServletRequest request,
ServletResponse response) throws Exception {
HttpServletRequest httpRequest = (HttpServletRequest) request;
String ticket = httpRequest.getParameter(TICKET_PARAMETER);
return new CasToken(ticket);
} | [
"public Token getRequestToken();",
"@Override\r\n public T getCredentials() {\r\n return token;\r\n }",
"public Token toScribeToken() {\n return new Token(oauthToken, oauthTokenSecret);\n }",
"@O2BearerToken\n @GET\n @Path(\"/token\")\n public Response bearerAuthorizedGet(@Cont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
columns from city table | public interface cityColumns{
public static final String ID = "_id";
public static final String CITY = "city";
public static final String PROVINCE_ID = "province_id";
public static final String FLAG = "flag";
} | [
"private void fillCitiesTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(INIT.GET_CITY.toString())) {\n if (!rs.next()) {\n try (PreparedStatement ps =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Associations handling Returns an iterator on all known file associations. | private static Iterator<CommandAssociation> associations() {return associations.iterator();} | [
"List<Association> getAssociations();",
"public List getAssociationFiles();",
"void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a list of additional packages that should be considered as part of this location provider for the purposes of generating locations. This should generally only be used when another package may issue location requests on behalf of this package in the course of providing location. This will inform location services t... | public void setAdditionalProviderPackages(List<String> packageNames) {
synchronized (mBinder) {
mAdditionalProviderPackages.clear();
mAdditionalProviderPackages.addAll(packageNames);
}
ILocationProviderManager manager = mManager;
if (manager != null) {
... | [
"public abstract void setLocationExtraPackagesProvider(PackagesProvider provider);",
"public abstract void setLocationPackagesProvider(PackagesProvider provider);",
"public abstract void setSimCallManagerPackagesProvider(PackagesProvider provider);",
"public void registerCustomPackages()\n {\n @S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
comparator, nulls lower (analysisEndUtcTs) // | public JwComparator<AcCandidateRouteAnalysisRequest> getAnalysisEndUtcTsComparatorNullsLower()
{
return AnalysisEndUtcTsComparatorNullsLower;
} | [
"public JwComparator<AcItem> getLastResultUtcTsComparatorNullsLower()\n {\n return LastResultUtcTsComparatorNullsLower;\n }",
"public JwComparator<AcItemMovementVo> getLastHandledUtcTsComparatorNullsLower()\n {\n return LastHandledUtcTsComparatorNullsLower;\n }",
"public JwComparator<A... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a testing set for the model | @Override
public TestingSet createTestingSet(int individuals)
{
return TestingSet.createSingleTrialForAllIndividuals(individuals);
} | [
"public static void makeTestTrainSets() {\n\n List<Instance> instances = new ArrayList<>();\n\n for (Instance instance: allInstances) {\n instances.add(instance);\n }\n Collections.shuffle(instances);\n\n int cutoff = (int) (instances.size() * PERCENT_TRAIN);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the index representing the action | public void setActionIndex(int actionIndex) {
this.actionIndex = actionIndex;
} | [
"void setIndex(int index);",
"public void setIndex(int index) { this.index = index; }",
"private void setIndex(int index){\n\t\tthis.index = index;\n\t}",
"public void setIndex() {\r\n index = (opcode & 0x0FFF);\r\n pc += 2;\r\n }",
"void setCurrentOperationIndex(int index);",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true iff this parser handles the given command token. | public boolean handlesToken(String token) {
return getToken().equals(token);
} | [
"public boolean isCommand(String command){\n if (Arrays.asList(isWordCommand).contains(command)){\n return true;\n }\n return false;\n }",
"boolean matches(String command) {\n return this.commandString.equals(command);\n }",
"public abstract boolean canHandle... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new direct message with attachments. Each attachment have an ID which is unique among the other attachments in this message. | public DirectMessage(String message, boolean autoResponse,
Attachment... attachments) {
this(message, autoResponse, new LinkedHashSet<Attachment>(
Arrays.asList(attachments)));
} | [
"void addAttachment(String id, DataHandler content);",
"void addAttachmentObject(String id, Attachment content);",
"private void importAttachments(File[] files)\n {\n if (!isEditable)\n {\n /*\n * This typically shouldn't happen if we've done our calculations\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if the given GeneralLedgerPendingEntry represents offsets to cash | @Override
public boolean isOffsetToCash(GeneralLedgerPendingEntry generalLedgerPendingEntry) {
if (generalLedgerPendingEntry.isTransactionEntryOffsetIndicator()) {
final Chart entryChart = chartService.getByPrimaryId(generalLedgerPendingEntry.getChartOfAccountsCode());
if (!Objec... | [
"protected boolean isAdvancePendingEntry(GeneralLedgerPendingEntry glpe) {\n return StringUtils.equals(glpe.getFinancialDocumentTypeCode(), TemConstants.TravelDocTypes.TRAVEL_AUTHORIZATION_CHECK_ACH_DOCUMENT) ||\n StringUtils.equals(glpe.getFinancialDocumentTypeCode(),TemConstants.TravelDocTyp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert all namespaces names from JAMWiki to MediaWiki local representation. | private String convertToMediawikiNamespaces(String text) {
StringBuilder builder = new StringBuilder(text);
String jamwikiNamespace, mediawikiNamespace, mediawikiPattern, jamwikiPattern;
int start = 0;
for (Integer key : MediaWikiConstants.MEDIAWIKI_NAMESPACE_MAP.keySet()) {
// use the JAMWiki namespace... | [
"String[] getNamespaces();",
"List<String> getNamespaces();",
"Collection<String> getNamespacesRet();",
"public static String mungeNamespace (String name) {\r\n\t\treturn name.replaceFirst(\"^([^:]*):\", \"_$1_\");\r\n\t}",
"private static String normalizeNameSpace(String orig) {\n return orig.replac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will print all the cars with a certain year | public void viewSpecificYearInInventory(int year) {
// Variable declaration
boolean foundYear = false; // Boolean to determine whether a year was found
// Print heading
printInventoryHeading();
// Make sure there is at least one car
if (getNumCarsInInventory() < 1)... | [
"public void searchYear()\r\n\t{\r\n\r\n\t\tSystem.out.print(\"Please provide a year: \");\r\n\t\tint year = scan.nextInt();\r\n\t\tboolean display = false;\r\n\t\tboolean found = false;\r\n\t\tfor (int i = 0; i < actualSize; i++)\r\n\t\t{\r\n\r\n\t\t\tif (year == data[i].getYear())\r\n\t\t\t{\r\n\t\t\t\tif (displa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column u_code.SSTATE | public void setSstate(Long sstate) {
this.sstate = sstate;
} | [
"public void setStateCode(String stateCode) {\r\n\t\tthis.stateCode = stateCode;\r\n\t}",
"public void setStateCode(java.lang.String stateCode) {\n this.stateCode = stateCode;\n }",
"public void setSUState(String suName, SUStates state);",
"public void setStateCode(String value) {\n setAttrib... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end sepInst / returns the integar value of the string variable passed and take into account indirect address modes | private static int getVar(int initInd, String var)throws Exception{
int num;
int perInd;
char addMode;
String[] inst;
try{//tries to retrieve relative field
num = Integer.parseInt(var);
}catch(Exception e){//if not relative then seperates the address mode
... | [
"int getStartingAddress(String literal);",
"private String extract(final int begin, final int end) {\r\n return binary.substring(begin, end + 1);\r\n }",
"ACD getStr();",
"java.lang.String getPreAddress2();",
"public abstract DevAddr guessAddr(String str) ;",
"java.lang.String getNum2();",
"ja... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback method while file rename failed. | @Override
public void renameFailed() {
unbindSpecifiedService(rename_service_connection);
DebugLog.w("File rename failed.");
} | [
"public int handleRenameError(String source, String target, int errCode, String errMsg);",
"@Override\n public void onFileRename(String new_file_name) {\n\n // If new file's name is the same as the old one, then return.\n DropboxAPI.Entry selected_entry = filter_dbx_file_list.get(selected_file_in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
doModelSpecificAdjustments computeDiseaseDeltas. This method calculates the delta changes for each disease state depending on disease parameters and mixing factors | public abstract StandardDiseaseModelLabelValue computeDiseaseDeltas(
final STEMTime time,
final StandardDiseaseModelLabelValue currentState,
final StandardDiseaseModelLabel diseaseLabel,
final long timeDelta,
DiseaseModelLabelValue returnValue); | [
"public void calculateDelta(STEMTime time, long timeDelta, EList<DynamicLabel> labels) {\n \t\t// Iterate through each of the labels we need to update.\t\t\n \t\t// Place holders to keep delta values. \n \t\t\n \t\tDiseaseModelLabelValue migrationDelta = this.createDiseaseModelLabelValue();\n \t\tDiseaseModelLabelV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize a MultiKMSMasterKeyProvider. For encrypt, KMS in all regions must be available. For decrypt, KMS in at least one region must be available. | public static MasterKeyProvider<KmsMasterKey> initializeKeyProvider(
List<String> cmkArns, Region currentRegion) {
List<MasterKeyProvider<KmsMasterKey>> providers = new ArrayList();
List<String> arnList = getSortedArnListByCurrentRegion(cmkArns, currentRegion);
providers.add(KmsMasterKeyProvider.build... | [
"public static MasterKeyProvider<KmsMasterKey> initializeKeyProvider(\n String cmkArns, Region currentRegion) {\n return initializeKeyProvider(splitArns(cmkArns), currentRegion);\n }",
"public void test_getInstanceLjava_lang_StringLjava_security_Provider03() throws IllegalArgumentException, NoSuchAlgorit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fim de nPr() /[07] Permutacoes de n a r com repeticao de elementos | private static long nPr(int[] frequency, int i, int n, int r)
{
//nao ha mais posicoes disponiveis para incluir elementos de permutacao
if (r == 0) return 1;
//retornara o calculo de nPr
long npr = 0;
//numero de elementos que ainda sobrarao... | [
"public static long nPr(int n, int r) {\n if(r > n)\n return 0;\n if(r == 0)\n return 1;\n\n return nPr(n-1, r) + r * nPr(n-1, r-1);\n }",
"static int nCrModp(int n, int r, int p) \n { \n int C[]=new int[r+1]; \n Arrays.fill(C,0); \n \n C[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds all NHSChoices conditions | public List<ConditionLinkJson> getAllConditions() {
List<ConditionLinkJson> allConditions = new ArrayList<>();
// request parameters
List<NameValuePair> parameters = new ArrayList<>();
parameters.add(new BasicNameValuePair(PARAM_SYNONYMS, "false"));
// run from A-Z to get all ... | [
"public ArrayList<Criterion> getPossibleCriteria();",
"String[] getChoices();",
"public List<Choice> getAllChoices() {\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n List<Choice> rval = new ArrayList<>();\n\n try {\n conn = Drive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an array of all Worlds in this LevelPack. | public World[] getAllWorlds() {
return levels.toArray(new World[levels.size()]);
} | [
"public static List<World> getWorlds() {\n\t\treturn worlds;\n\t}",
"@NotNull\n public Collection<MultiverseWorld> getWorlds() {\n return Collections.unmodifiableCollection(this.worldsMap.values());\n }",
"public List<String> getWorlds() {\n return worlds;\n }",
"public Set<World> getWo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Retrieve the place ID of the selected item from the Adapter. The adapter stores each Place suggestion in a AutocompletePrediction from which we read the place ID and title. | @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
final AutocompletePrediction item = mAdapter.getItem(position);
final String placeId = item.getPlaceId();
final CharSequence primaryText = item.getPrimaryText(null);
// L... | [
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final AutocompletePrediction item = mAdapter.getItem(position);\n final String placeId = item.getPlaceId();\n final CharSequence primaryText = item.getPrimaryText(null);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes the current player skip the next round | public void makePlayerSkipNextRound() {
current.setSkipNextRound(true);
} | [
"void skipNextPlayer() {\n endTurn();\n }",
"void skipTurn();",
"void skipGame() {\r\n finishGame(null);\r\n }",
"public void cantPlayGoNext() {\n\t switchTurn();\n }",
"public void goToNextLevelSkip(){\n\n if (LevelNumber== 3 ){\n cheat.play();\n System.o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test to see if all articles returned as json | @Test
@DisplayName("GET /api/article - Success")
public void testGetAllArticles() throws Exception {
mockMvc.perform(get("/api/article/"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.article.length").value(2));
} | [
"@Override\n\tpublic JSONObject getArticleByContent(JSONObject jsonObject) {\n\t\tList<JSONObject> list = articleDao.getArticleByContent(jsonObject);\n\t\tSystem.out.println(\"list.size():\"+list.size());\n\t\tif(list.size() >= 1){\n\t\t\treturn CommonUtil.successJson(\"fail\");\n\t\t}\n\t\telse{\n\t\t\treturn Comm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The constructor, constructs FrankTheTank by calling the Zombie class with a super method. | public FrankTheTank() {
super(STRENGTH, FULL_HEALTH, "FrankTheTank");
} | [
"public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}",
"public ConeHat(Zombie zombie) {\n\t\tsuper(zombie);\n\t}",
"Zombie() {\n health = 100;\n\n }",
"public Fox() {\n super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends a message that the organizer wants to send to all the speakers | public void sendMessageToAllSpeakers() {
sendMessageToAllTool("Speaker");
} | [
"private void messageAllSpeakers() {\n op.printMessageContentPrompt();\n String messageContent = sc.nextLine();\n if (cancelRequested(messageContent)) return;\n if (mm.sendMessageToAllSpeakers(um, um.getCurrentUser(), messageContent) == null) {\n op.printMessageNotSent();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
EFFECTS: increments the number of notifications this class has received from observables by 1. | @Override
public void update(Observable observable, Object arg) {
numNotificationsReceived++;
} | [
"public int countObservers() {\n return observers.size();\n }",
"public static Observable<Integer> countExample(){\n log.info(\"countExample\");\n return Observable.empty();\n }",
"public void increment() {\n frequency++;\n }",
"public void bumpOccurrences() {\n this.occu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the object use to access to bukkit events data used by the pipeline system | public abstract BukkitEventsData getBukkitEventsData(); | [
"@SuppressWarnings(\"unchecked\")\n\tpublic synchronized G getEvent(){\n\t\ttry{\n\t\t\tG g = (G) GameEventFactory.readFromStream(this.toClient.getInputStream());\n\t\t\treturn g;\n\t\t} catch(IOException e){\n\t\t\tSystem.err.println(\"cannot read event from client\");\n\t\t\te.printStackTrace();\n\t\t\treturn nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inserts and returns a new empty value (as xml) as the ith "Parcels" element | public org.landxml.schema.landXML11.ParcelsDocument.Parcels insertNewParcels(int i)
{
synchronized (monitor())
{
check_orphaned();
org.landxml.schema.landXML11.ParcelsDocument.Parcels target = null;
target = (org.landxml.schema.landXM... | [
"public org.landxml.schema.landXML11.ParcelsDocument.Parcels addNewParcels()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.ParcelsDocument.Parcels target = null;\r\n target = (org.landxml.sche... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle a Page Fault for UserProcess handle missing page in physical memory | public static TranslationEntry handlePageFault(int pid, int vpn, LoaderForCoff loader)
{
printDebug(UThread.currentThread().getName() + ": handleTLB miss exception, page fault: " + vpn);
/*
* Now that pages are being moved to and from memory and disk, you need to ensure that
* one ... | [
"private void handlePageFault(int vpn) {\n\t int ppn;\n\n\t // there has available page in memory, we can directly get one\n\t if (VMKernel.freePagesNum() != 0) {\n\t ppn = VMKernel.getPage();\n\t allocatePage(vpn, ppn, false);\n }\n\n // there is no available page in memory, we... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ 1.To show ItemMultipart JSP Page | @GetMapping("/show")
public String showMultipartPage() {
return "ItemMultipart";
} | [
"private String getThumbMarkup(HttpServletRequest hrq, Item item)\n throws JspException\n {\n Bundle[] original = null;\n \n try\n {\n \toriginal = item.getBundles(\"ORIGINAL\");\n }\n catch(SQLException sqle)\n {\n \tthrow new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new WebRequestHandlerInterceptorAdapter for the given WebRequestInterceptor. | public WebRequestHandlerInterceptorAdapter(WebRequestInterceptor requestInterceptor) {
Assert.notNull(requestInterceptor, "WebRequestInterceptor must not be null");
this.requestInterceptor = requestInterceptor;
} | [
"public SELF useRequestInteceptor(final RequestInterceptor requestInterceptor) {\n this.requestInterceptors.add(Objects.requireNonNull(requestInterceptor));\n return (SELF) this;\n }",
"void addInterceptor(int pos, Interceptor interceptor);",
"void addInterceptor(Interceptor interceptor);",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtiene Lista todas los Muestra de un codigo | public ArrayList<ni.org.ics.estudios.appmovil.domain.muestreoanual.Muestra> getListaMuestras(Integer codigo) throws SQLException {
Cursor muestras = null;
ArrayList<ni.org.ics.estudios.appmovil.domain.muestreoanual.Muestra> mMuestras = new ArrayList<ni.org.ics.estudios.appmovil.domain.muestreoanual.Mues... | [
"private void atualizarListaDeCodigosDePeca(){\n ArrayList<String> itemsDaListView = new ArrayList<String>();\n Repositorio repositorio = new Repositorio(getApplicationContext());\n\n for (String codigoPeca : codigosDePeca){\n itemsDaListView.add(codigoPeca + \" : \" + repositorio.li... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the color to use for the bottom border | public void setBottomBorderColor(short color)
{
format.setBottomBorderPaletteIdx(color);
} | [
"public String getBorderBottomColor();",
"public void setBorderBottomColor(String borderBottomColor) throws DOMException;",
"public String getBottomColor() {\r\n\t\treturn bottomColor;\r\n\t}",
"public void setBottomBorder(int bottomBorder) {\n\t\tthis.bottomBorder = bottomBorder;\n\t}",
"public void setBrc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create marked region with start, multiple ends and weaving region. | public MarkedRegion(AbstractInsnNode start,
List<AbstractInsnNode> ends, WeavingRegion weavingRegion) {
super();
this.start = start;
this.ends = ends;
this.weavingRegion = weavingRegion;
} | [
"public MarkedRegion(AbstractInsnNode start, AbstractInsnNode end) {\n this.start = start;\n this.ends = new LinkedList<AbstractInsnNode>();\n this.ends.add(end);\n }",
"public MarkedRegion(AbstractInsnNode start, List<AbstractInsnNode> ends) {\n this.start = sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET : get all the profiles. | @Timed
@Operation(summary = "get all the profiles")
@APIResponse(responseCode = "200", description = "OK")
@GET
@Produces(MediaType.APPLICATION_JSON)
@Timeout
public List<Profile> getAllProfiles() {
log.debug("REST request to get all Profiles");
List<Profile> profiles = profileRe... | [
"public List<UserProfile> getAll();",
"@Override\n public List<Profile> getProfiles() throws Exception {\n return profileDao.findAll();\n }",
"ProfilesClient getProfiles();",
"@GET(API_SUFFIX + \"profiles\")\n Call<SystemProfiles> getProfiles();",
"@Override\n @NonNull\n public List<Profil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search the Binaryfile of the RDFFile with the given title. | private static byte[] findBinaryFile(String title) {
if(title.equals(KIWI1PNG)) {
return kiwi1;
} else if(title.equals(KIWIS_IN_PRAGUE4JPG)) {
return kiwis_in_prague;
} else if(title.equals(KIWI_ESWC08DOC)) {
return kiWi_ESWC08DOC;
} else if(title.... | [
"public void browseTitle(String title) {\n for (int i = 0; i < libraryDatabase.getMediaDatabase().size(); i++) {\n String MediaTitle = (libraryDatabase.getMediaDatabase().get(i)).getTitle();\n\n if (MediaTitle.equalsIgnoreCase(title)){\n System.out.println(libraryDatabase... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'bm_space_id' field. | public void setBmSpaceId(java.lang.CharSequence value) {
this.bm_space_id = value;
} | [
"public iodine.avro.TapRecord.Builder setBmSpaceId(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this.bm_space_id = value;\n fieldSetFlags()[0] = true;\n return this; \n }",
"public java.lang.CharSequence getBmSpaceId() {\n return bm_space_id;\n }",
"public jav... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Drawable interface with draw method | public interface Drawable
{
// set location method
public void draw( Graphics g);
} | [
"public interface Drawable {\n\n /**\n * Draw the component onto the graphics context.\n * @param g the graphics context to draw to\n */\n void draw(Graphics g);\n \n}",
"public interface Drawable {\n\n /**\n * Method that is called when an object needs to be drawn on the grid panel.\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column goods_type.gt_name | public String getGtName() {
return gtName;
} | [
"public String getGoodsTypeName() {\n return goodsTypeName;\n }",
"public void setGtName(String gtName) {\n this.gtName = gtName == null ? null : gtName.trim();\n }",
"public String getTypeName() {\r\n return typeId.getSQLTypeName();\r\n }",
"public String getName(){\r\n\t\tStrin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Example student marks Array is a datastructure useful to store value of similar datatypes. 10 integer value 5 float value. 10 char value. syntax datatype arrayname[]=new dataype[size]; | public static void main(String[] args) {
int size[]= {1,2,3,4,5,6};//this is hardcoading the value.
int marks[]=new int[6];//iam telling aaray to please store 6 value of similar datatypes.
System.out.println(marks[0]);
marks[0]=20;
System.out.println(marks[0]);
marks[1]=21;
System.out.println(marks[1]);
... | [
"public static void main(String[] args) {\n\n int[] age = {2, 5, 1, 34, 12};\n// double[] marks = {1.0, 3.14,2.9};\n// \n// marks[1] = 4.56;\n// \n// System.out.println(marks[1]);\n\n for(int i = 0; i < age.length; i++) {\n System.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Implementation of changeSlot() for packages. | @Override
public int changeSlot(SlotDetails details) {
int result = slotMgr.changeSlot(details);
if (result == ErrorCode.OK) {
notifyListeners(details.ownerId, IPackageMgrListener.CHANGED_SLOT);
}
return result;
} | [
"public void onSlotChange() {}",
"private void setSlot(int slot) {\n\t}",
"public void setSlot( int slot, Slot s );",
"public void setSlot (Slot slot)\r\n {\r\n this.slot = slot;\r\n }",
"public void setSlot(int slot) {\r\n this.slot = slot;\r\n }",
"public void setSlot(int slot){\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called by blueprint to for store initialization (i.e., add initial IDM data). | public void initializeStore() {
try {
if (store != null) {
LOG.info("IIDMStore service {} was found", store.getClass().getName());
new StoreBuilder(store).init();
}
} catch (final IDMStoreException e) {
LOG.error("Failed to initialize d... | [
"public void init() {\n LOG.info(\"Initializing side input stores.\");\n\n initializeStoreDirectories();\n }",
"public void init(String store) throws GadgetException {\n try {\n JSONObject json = new JSONObject(store);\n Iterator<?> iter = json.keys();\n String container;\n while (it... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get all producers for a table within the named vdb. This is the only real user call on the registry | public synchronized List<ProducerTableEntry> getAllProducersForTable(String tableName, boolean canForward, String vdbName) throws RGMAPermanentException,
RGMATemporaryException, RGMAPermanentException {
checkOnline();
String vdbNameUpper = vdbName.toUpperCase();
if (vdbName.equals("")) {
vdbName = vdbNameUp... | [
"public Iterator getAllProducers() {\n return producers.values().iterator();\n }",
"List<Producer> getAll();",
"public Iterator getProducers() {\n return this.producers.values().iterator();\n }",
"@RequestMapping(value = \"/producers\",\n method = RequestMethod.GET,\n produce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if a field's value is in a List of enum choices | @SuppressWarnings("rawtypes")
public static boolean isLegalResult(HtmlField f, List<Enum> choices) {
try {
for (Enum c : choices) {
if (c.ordinal() == Integer.parseInt(f.getValue()))
return true;
}
}
catch (Exception e) {
return false;
}
return false;
} | [
"public void testListEnum() {\n \t\tList<RadioBand> enumValueList = Arrays.asList(RadioBand.values());\n\n\t\tList<RadioBand> enumTestList = new ArrayList<RadioBand>();\n\t\tenumTestList.add(RadioBand.AM);\n\t\tenumTestList.add(RadioBand.FM);\n\t\tenumTestList.add(RadioBand.XM);\n\n\t\tassertTrue(\"Enum value list ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets this view's gallery model to the value of the model passed in. | public void setGalleryModel(IGalleryModel model) {
mGalleryModel = model;
} | [
"public IGalleryModel getGalleryModel() {\n return mGalleryModel;\n }",
"void setModel(IEasyAnimatorViewer model) {\n this.model = model;\n Rectangle r = model.getDimensions();\n this.setSize(new Dimension(r.width, r.height));\n }",
"void setModel(Model model);",
"public void setModel(Cont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an HttpClient for handling HTTPS request. | private DefaultHttpClient createHttpsClient() throws HttpException {
DefaultHttpClient client = new DefaultHttpClient();
SSLContext ctx = null;
X509TrustManager tm = new TrustAnyTrustManager();
try {
ctx = SSLContext.getInstance("TLS");
ctx.init(null, new TrustMan... | [
"static HttpClient newHttpClient() throws NoSuchAlgorithmException, KeyManagementException {\r\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\r\n sslContext.init(null, trustAllCerts, new SecureRandom());\r\n return HttpClient.newBuilder().sslContext(sslContext).build();\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The reference value of the controller that is the preferred manager of the volume. The preferred manager is tracked independent of the current manager, since the current manager may be switched dynamically as a result of hostbase multipath transitions. Later, when the error conditions that cause a multipath transition ... | public Volume preferredManager(String preferredManager) {
this.preferredManager = preferredManager;
return this;
} | [
"int getController() {\n \t return owner;\n }",
"public ManagedObjectReference\n getDvSwitchManager()\n {\n ManagedObjectReference mor = null;\n ServiceInstance mServiceInst =\n new ServiceInstance(super.getConnectAnchor());\n mor = mServiceInst.getSC().getDvSwitchManager();\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the documentLineId value for this DocumentLineDetail. | public void setDocumentLineId(long documentLineId) {
this.documentLineId = documentLineId;
} | [
"public void setLineId(Integer lineId) {\n this.lineId = lineId;\n }",
"public void setLineId(String lineId) {\n this.lineId = lineId;\n }",
"public void setDocumentLineDetailId(long documentLineDetailId) {\n this.documentLineDetailId = documentLineDetailId;\n }",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the test context. | public TestCtx getTestCtx() {
return this.testCtx;
} | [
"public TestContext getTestContext() {\n return context;\n }",
"public ITestContext getTestContext() {\n return testContext;\n }",
"@Override\n public ITestContext getTestContext() {\n return testContext;\n }",
"public Context getContext() {\n return context;\n }",
"public sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of employee_banned_list_query | public employee_banned_list_query() {
myReturnString = new String();
} | [
"public BankEmployeeList() {\n }",
"public void createEmployees() {\n employees = (ArrayList<Employee>) daoEmployee.findAll();\n }",
"public AllEmployees(){\n allEmployees = new ArrayList<Employee>();\n }",
"public GazetteerQuery createNewQuery() { \r\n\t\treturn new GazetteerQue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use FetchId.newBuilder() to construct. | private FetchId(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"public FetchByIdRequest(Integer fetchId)\r\n\t{\r\n\t\tthis.fetchId = fetchId;\r\n\t}",
"public Builder setFetch(com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.BuildEventId.FetchId value) {\n if (fetchBuilder_ == null) {\n if (value == null) {\n throw new NullPoi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleVarReference" $ANTLR start "ruleVarReference" InternalBrowser.g:212:1: ruleVarReference : ( ( rule__VarReference__ValAssignment ) ) ; | public final void ruleVarReference() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalBrowser.g:216:2: ( ( ( rule__VarReference__ValAssignment ) ) )
// InternalBrowser.g:217:2: ( ( rule__VarReference__ValAssignment ) )
{
... | [
"public final void rule__VarReference__ValAssignment() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:4211:1: ( ( ( RULE_ID ) ) )\n // InternalBrowser.g:4212:2: ( ( RULE_ID ) )\n {\n // Inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the ignore null. | public void setIgnoreNull(boolean ignoreNull) {
this.ignoreNull = ignoreNull;
} | [
"public void setIgnoreNull(int ignoreNull);",
"boolean getIgnoreNull();",
"public static void ignore(boolean b) {\n\t\tsetIgnore(b);\n\t}",
"public CommonDataServiceForAppsSink setIgnoreNullValues(Object ignoreNullValues) {\n this.ignoreNullValues = ignoreNullValues;\n return this;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets media container model qualifier. | public String getMediaContainerModelQualifier()
{
return getProperty(CONFIG_KEY_MEDIA_CONTAINER_MODEL_QUALIFIER);
} | [
"@Accessor(qualifier = \"jobMedia\", type = Accessor.Type.GETTER)\n\tpublic ImpExMediaModel getJobMedia()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(JOBMEDIA);\n\t}",
"public String getQualifier() {\r\n\t\treturn (getAttributeValue(QUALIFIER_NAME));\r\n\t}",
"public PosSymbol getQualifier() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleProperty" $ANTLR start "ruleProperty" ../de.jevopi.mitra2/srcgen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:447:1: ruleProperty returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= KEYWORD_15 ( (lv_value_2_0= RULE_STRING ) ) ) ; | public final EObject ruleProperty() throws RecognitionException {
EObject current = null;
int ruleProperty_StartIndex = input.index();
Token lv_name_0_0=null;
Token otherlv_1=null;
Token lv_value_2_0=null;
enterRule();
try {
if ( state.... | [
"public final EObject entryRuleProperty() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleProperty = null;\r\n\r\n\r\n try {\r\n // InternalNestDsl.g:438:49: (iv_ruleProperty= ruleProperty EOF )\r\n // InternalNestDsl.g:439:2: iv_ruleProper... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a JVM CFA exception assumption edge. Also sets it as the entering and leaving edge of the source and target nodes. | public JvmAssumeExceptionCfaEdge(JvmCfaNode source, JvmCfaNode target, boolean isCaught, int catchType)
{
super(source, target);
this.isCaught = isCaught;
this.catchType = catchType;
} | [
"Edge createEdge();",
"public void crossEdge(Edge e) {}",
"private TestbedEdge newEdge(Agent src, Agent sink, JungAdapterGraph caller) {\n if (caller.getInnerGraph() instanceof cu.repsystestbed.graphs.FeedbackHistoryGraph) {\n try {\n return new SimFeedbackEdge(src, sink);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To extract all the PKs of the liveVars referenced by on of the fuzzyjoin branch branch. | private List<LogicalVariable> findPrimaryKeysInSubplan(Collection<LogicalVariable> liveVars,
IOptimizationContext context) {
Collection<LogicalVariable> primaryKeys = new HashSet<>();
for (LogicalVariable var : liveVars) {
List<LogicalVariable> pks = context.findPrimaryKey(var);
... | [
"private void generateCanonicalDBVarMap() {\n\n List<BodyElement> bodyElements = query.getBody().getBodyElements();\n\n IntStream.range(0, bodyElements.size())\n .forEach( i -> {\n if (bodyElements.get(i) instanceof Atom) {\n Atom a = (Atom) bod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ConstantDefinitionBegin__Group__0__Impl" $ANTLR start "rule__ConstantDefinitionBegin__Group__1" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:2540:1: rule__ConstantDefinitionBegin__Group__1 : rule__ConstantDefiniti... | public final void rule__ConstantDefinitionBegin__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:2544... | [
"public final void ruleConstantDefinitionBegin() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///////////////////////////////////////////////////////////for all consequent clauses which refer to this goalVar //////////////////////////////////////////////////////////////////try to find goalVar value via a rule being true /////////////////////////////////////////////////////////////if rule is true then pop, assig... | public void backwardChain(String goalVarName)
{
RuleVariable goalVar = (RuleVariable)variableList.get(goalVarName);
Enumeration<Clause> goalClauses = goalVar.clauseRefs.elements() ;
while (goalClauses.hasMoreElements()) {
Clause goalClause = (Clause)goalClauses.nextElement() ;
if (goalClause.... | [
"private RuleResult checkValues(Rule thisRule, Stack<ChildParentPair> matchedPairs)\n\t\t{\n\t\t\tRuleResult ruleResult = new RuleResult();\n\n\t\t\t// build the list of variables\n\t\t\tfor (Criterium thisCriterium : thisRule.getCriteria())\n\t\t\t{\n\t\t\t\t// check and add first variable name, and handle constan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert an encoded NetBIOS name to a normal name string | public static String DecodeName ( byte[] buf, int off) {
// Convert the RFC NetBIOS name string to a normal NetBIOS name string
String convstr = "ABCDEFGHIJKLMNOP";
StringBuffer nameBuf = new StringBuffer ( 16);
int idx = 0;
char ch1, ch2;
while ( idx < 32) {
// Get the current encoded cha... | [
"public static String DecodeName ( String encnam) {\n\n\t // Check if the encoded name string is valid, must be 32 characters\n\n\t if ( encnam == null || encnam.length () != 32)\n\t \treturn \"\";\n\n\t // Convert the RFC NetBIOS name string to a normal NetBIOS name string\n\n\t String convstr = \"ABCDEFGHI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create xml element that represents keystroke modifiers: ctrl, alt, meta, alt_graph | private static Element createXML(Document doc, int keymodifiers) {
Element modifiers = doc.createElement("modifiers");
if ((keymodifiers & KeyEvent.ALT_GRAPH_MASK) != 0) {
Element mod = doc.createElement("modifier");
mod.appendChild(doc.createTextNode("ALT_GRAPH"));
modifiers.appendChild(mod);
modifier... | [
"private static Element createXML(Document doc, KeyStroke keystroke) {\n\t\tElement e = doc.createElement(\"keystroke\");\n\t\tif (keystroke != null) {\n\t\t\tElement mod = createXML(doc, keystroke.getModifiers());\n\t\t\tElement keytext = doc.createElement(\"keytext\");\n\n\t\t\tkeytext.appendChild(doc.createTextN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests generic empty array creation with generic type. | @Test
public void testEmptyArrayCreation() {
final String[] array = ArrayUtils.<String>toArray();
assertEquals(0, array.length);
} | [
"public void createEmptyArray();",
"@Test\n public void testIndirectEmptyArrayCreation() {\n final String[] array = ArrayUtilsTest.<String>toArrayPropagatingType();\n assertEquals(0, array.length);\n }",
"@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |