anchor stringlengths 10 14.3k | positive stringlengths 10 14.9k |
|---|---|
Method.........................................getCred_IDByBean Author......................................................JLH This method retrieves the Credential ID based on the Credential Bean Return Value (int) cred_ID: Returns a credential ID, this is an int that is automatically incremented in the database when ... | public static synchronized int getCred_IDByBean(Credentials cred){
int cred_ID=0;
Connection connection;
PreparedStatement statement = null;
String preparedSQL = "Select Credentials_ID From credential Where Email = ? " +
"And Pass= ? And Role= ? And Validated= ? And RegKey= ?";
try{
connecti... |
TODO Autogenerated method stub | @Override
public List<Chitietdonhang> findByIdChiTietDonHangActive() {
return chiTietDonHangRepository.findByIdChiTietDonHangActive();
} |
TODO Autogenerated method stub | @Override
public boolean isLabelProperty(Object element, String property) {
return false;
} |
Time code is set at a given frequency | @Override
public void onLocalAudioStats(LocalAudioStats stats) {
if (timeCodeIndicator % TIME_CODE_FREQUENCY == 0) {
appointment.setTimeCode(new DatabaseUser(MainUser.getMainUser().getId()), System.currentTimeMillis());
}
timeCodeIndicator ... |
checks for all y controlPoint fields if they are in the interval 0..1 checks for all x controlPoint fields if they are in the interval 0..1 and if they form a increasing row. First controlPoints x has to be <= 2nds... If necessary tries to auto correct errors in the ordering. | private void testAndUpdateControlFields(int startFieldNr) {
boolean consistent = true;
//test and correct y
for (int i = 0; i < _controlPoints.length; i++) {
if (parseTextFieldValue(_controlPoints[i][1]) == -1.0f) {
consistent = false;
}
}
//test and correct x at startFieldNr and above
fo... |
Generated method Setter of the MyCustomer.firstName attribute. | public void setFirstName(final String value)
{
setFirstName( getSession().getSessionContext(), value );
} |
Returns the widget names as a list. This is an example of a safe get method. Instead of returning the reference to our private mutable data directly, it is first made unmodifiable. While code in this class will still be able to mutate the data, code outside of this class will not. | public static List<String> getNames() {
return Collections.unmodifiableList(widgetNames);
} |
Short alias or acronym of the owner of the node string owner = 3; | public Builder setOwnerBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
owner_ = value;
onChanged();
... |
TODO Autogenerated method stub | @Override
protected void onPause() {
super.onPause();
onPause = true;
} |
Produce internal log format and save to SD card. | private synchronized static void internalLog(StringBuilder msg) {
//add time header
String timeStamp = simpleDateFormat.format(new Date());
msg.insert(0, timeStamp);
byte[] contentArray = msg.toString().getBytes();
int length = contentArray.length;
int srcPos = 0;
... |
Run the void renderMergedOutputModel(Map,HttpServletRequest,HttpServletResponse) method test. | @Test(expected = java.io.UnsupportedEncodingException.class)
public void testRenderMergedOutputModel_5()
throws Exception {
RedirectView fixture = new RedirectView("", true, true);
fixture.setUrl("");
fixture.setEncodingScheme("");
Map model = new LinkedHashMap();
HttpServletRequest request = new JSecurity... |
"Decompresses" files that were previously "compressed" by this program | public int uncompress(InputStream in, OutputStream out) throws IOException {
int codeCount = 0;
int code = 0;
BitInputStream bitIn = new BitInputStream(in);
StringBuilder codeString = new StringBuilder(0);
// *** Bellow for building array of encoded values ****
// ****... |
List of case results. repeated .buf.validate.conformance.harness.CaseResult cases = 4 [json_name = "cases"]; | public Builder addCases(
int index, build.buf.validate.conformance.harness.CaseResult.Builder builderForValue) {
if (casesBuilder_ == null) {
ensureCasesIsMutable();
cases_.add(index, builderForValue.build());
onChanged();
} else {
casesBuilder_.addMessage(index, buil... |
IntStack no1 = new IntStack(); no1.push(10); no1.push(20); no1.push(30); no1.push(40); no1.push(50); System.out.println(no1.pop()); System.out.println(no1.pop()); System.out.println(no1.pop()); Output 50 40 30 | public static void main(String[] args) {
Person p1 = new Person("1", "Nishant");
Person p2 = new Person("2", "Nikhil");
PersonStack ps = new PersonStack();
ps.push(p1);
ps.push(p2);
System.out.println(ps.pop().toString());
System.out.println(ps.pop().toString());
} |
TODO Autogenerated method stub | @Override
@Transactional
public String addOrUpdateRole(ApplicationUserRole applicationUserRoleBean) {
String ex=null;
try
{
Session session = sessionFactory.getCurrentSession();
session.merge(applicationUserRoleBean);
}
catch(HibernateException e)
{
e.printStackTrace();
}
return ex;
} |
Created by JCM on 25.11.2018. | public interface Selectable
{
boolean isSelected();
void setSelected(boolean selected);
void setGroup(SelectionGroup group);
} |
/ renamed from: b | private void m20461b() {
this.f16556a.f16545b = 1;
this.f16556a.m20453f();
this.f16556a.m20444b(this.f16557b);
} |
Save the protected request | private void loginForm(HttpServletRequest req, HttpServletResponse res)
throws IOException {
String url = req.getRequestURI();
String query = req.getQueryString();
if (query != null) {
url = url + '?' +query;
}
ProtectedRequest target = new ProtectedRequest(url);
// Store in curren... |
final static String BASE_URL = " // BASE_URL to fetch movie data | public MainActivityFragment() {
} |
Create a new GREATER OR EQUALS specification for a Property using a named Variable. | @SuppressWarnings( {"raw", "unchecked"} )
public static <T> GeSpecification<T> ge( Property<T> property, Variable variable )
{
return new GeSpecification( property( property ), variable );
} |
string address = 2; | public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
addres... |
Compare the values in the specified block at the specified positions equal. | int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition); |
Creates the server socket. | private ServerSocket createServerSocket() throws IOException {
ServerSocket serverSocket = new ServerSocket(Constants.SERVER_PORT);
System.out.printf("Server for chatting started at %d\n", Constants.SERVER_PORT);
return serverSocket;
} |
Check the data validation | public boolean valid() {
if (newFlag) {
if (procNameText.getText() == null || StringUtil.isEmpty(procNameText.getText())) {
CommonUITool.openErrorBox(getShell(), Messages.errInputProcedureName);
return false;
}
if (!ValidateUtil.isValidIdentifier(procNameText.getText())) {
CommonUITool.openErrorB... |
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.is_del | public void setIsDel(Integer isDel) {
this.isDel = isDel;
} |
Returns whether the selection contains only projects. | private boolean containsOnlyProjects(IResource[] resources) {
int types = getSelectedResourceTypes(resources);
// note that the selection may contain multiple types of resource
return types == IResource.PROJECT;
} |
none / x509+sha256 / x509+sha1 optional string pki_type = 2 [default = "none"]; | java.lang.String getPkiType(); |
Find the year for an employee's absenteeism. | private AbsentYear findAbsentYear(Employee emp, LocalDate startDate) {
AbsentYear absentYear = absYearRepo.findByEmployeeAndYear(emp, (short)startDate.getYear());
if(absentYear == null) {
absentYear = createAbsentYear(emp, startDate);
}
return absentYear;
} |
JFormDesigner Component initialization DO NOT MODIFY //GENBEGIN:initComponents Generated using JFormDesigner Evaluation license Mariano Rajoy | private void initComponents() {
frame = new JFrame();
JPanel panel2 = new JPanel();
enrereButton = new JButton();
JLabel label1 = new JLabel();
JPanel panel3 = new JPanel();
textField1 = new JTextField();
JLabel label2 = new JLabel();
JPanel panel4 ... |
Index 0 of returned value is E[x]; Index 1 is E[x^2] (noncentral) | private static double[][] moments(double[][] data, int K) {
double[] expectedX = new double[K];
double[] expectedXSquared = new double[K];
for (double[] theta : data) {
if (theta.length != K) {
throw new IllegalArgumentException("Dimensions of data and alpha do not match!");
}
for (int k = 0; k < ... |
Load the configured parameters through the properties file. TODO: Move to XML instead of properties file | private void loadConfig() throws IOException {
final boolean hasPropertiesFile = configFile != null && configFile.exists()
&& configFile.canRead() && configFile.isFile();
if (hasPropertiesFile) {
Properties props = new Properties();
FileInputStream fis = nu... |
Returns the first interview schedule in the ordered set where vacancyCandidateId = &63;. | public vn.com.ecopharma.hrm.rc.model.InterviewSchedule findByVacancyCandidate_First(
long vacancyCandidateId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
vn.com.ecopharma.hrm.rc.NoSuchInterviewScheduleException; |
Generated method Getter of the BraintreeCustomerDetails.email attribute. | public String getEmail()
{
return getEmail( getSession().getSessionContext() );
} |
Find the minimum depth in the tree using recursion. | private static int minDepth(TreeNode node) {
if (node == null) return 0;
return 1 + Math.min(minDepth(node.left), minDepth(node.right));
} |
and csmi_update_time >= ? | public M csmiUpdateTimeStart(Object start){this.put("csmiUpdateTimeStart", start);return this;} |
Signed transactions that satisfy PaymentDetails.outputs repeated bytes transactions = 2; | public Builder addTransactions(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.addTransactions(value);
return this;
} |
Generated method Setter of the BraintreeCustomerDetails.phone attribute. | public void setPhone(final SessionContext ctx, final String value)
{
setProperty(ctx, PHONE,value);
} |
TODO Autogenerated method stub | public static void main(String[] args) throws IOException {
File file = new File("testeArquivo.txt");
file.createNewFile();
FileWriter writer = new FileWriter(file);
writer.write("Arquivo criado");
writer.flush();
writer.close();
FileReader fr = new FileReader(file);
char [] a = new char[50];
f... |
Find function cycle using HashSet | private static FunctionCycle findCycleWithHashingInternal(IntUnaryOperator func, int x0) {
IntHashSet detectedValues = new IntHashSet();
int curValue = x0;
while (!detectedValues.contains(curValue)) {
detectedValues.add(curValue);
curValue = func.applyAsInt(curValue);
... |
Fourth element default value for color (alpha), vertex (w) is '1', as specified w/ VertexAttributes (ES2/GL3). vec4 v = vec4(0, 0, 0, 1); vec4 c = vec4(0, 0, 0, 1); | private void countAndPadding(int type, int fill) {
if ( sealed ) return;
final Buffer dest;
final boolean dSigned;
final int e;
switch (type) {
case VERTEX:
dest = vertexArray;
dSigned = vDataTypeSigned;
... |
This interface defines the configuration for a view. | public interface IViewConfiguration {
/** Get the filter defining how to handle conditional directives */
IViewFilter getViewFilter();
/** Get the fixed macros (macro name or name=value).
* This array should not change after creation since this
* configuration is stored in a view.
*/
Collection<ID... |
Set the value related to the column: amc_contract | public void setAmcContract (java.lang.String amcContract) {
this.amcContract = amcContract;
} |
Gets string expression of the given signature for xadl. | private static String getXadlDirection(Direction direction) {
String strDirection = null;
switch (direction) {
case IN:
strDirection = "in";
break;
case OUT_MULTI:
case OUT_SINGLE:
strDirection = "out";
break;
default:
strDirection = "none";
}
return strDirection;
} |
Display the first 500 characters of the response string. | @Override
public void onResponse(String response) {
if (new CheckConnectivity().isConnected(context)) {
try {
prog.dismiss();
Log.e("Response : prince ", response);
... |
Has this action method been deprecated | public boolean isDeprecated() {
return isDeprecated;
} |
========= Operations ========= set callback called when buffers where synched to disk | public void setCallback(final CallbackSync callback) {
this.callback = callback;
} |
Returns a new object of class 'Text'. | Text createText(); |
Test case number: 57 /Coverage entropy=0.6931471805599453 | @Test(timeout = 4000)
public void test57() throws Throwable {
FBProcedureCall fBProcedureCall0 = new FBProcedureCall();
// Undeclared exception!
try {
fBProcedureCall0.addOutputParam((FBProcedureParam) null);
fail("Expecting exception: NullPointerException");
} catch(... |
string moodMessage = 5; | public Builder setMoodMessage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
moodMessage_ = value;
onChanged();
return this;
} |
This method was generated by Apache iBATIS ibator. This method sets the value of the database column V_RP_DY_ROUTE.DAY | public void setDay(Date day) {
this.day = day;
} |
input data validation resourse link implement the menu | public static void main(String[] args) {
final Scanner scanner = new Scanner(System.in);
boolean exit = false;
String select;
loadFromFile();
do {
System.out.println("Premier League Manager");
System.out.println("=================================");
... |
Verify the HHS Footer Link in LoginPage. | public void waitForVerifyHhsPage() {
verifyHHSPageElement.waitForState().enabled(30);
} |
Duration in seconds. The .9 should prevent flickering. | private static float getDefaultDuration(ResourceLocation effectId) {
return new ResourceLocation("night_vision").equals(effectId) ? 15.9f : 1.9f;
} |
Ensures that the Rmi tactic succeeds once on a goal | @Test
public void applyOnceGoal() {
assertSuccess(" ;H; ;S; x ∈ ℤ ;; y ∈ ℤ |- x↦y ∈ id", rm("", empty));
} |
Create an independent copy of this JSON member. | public JsonMember copy() {
return new JsonMember(name, value.copy());
} |
item_id int64 item_id = 9; | public Builder clearItemId() {
itemId_ = 0L;
onChanged();
return this;
} |
True if has "idVerificationResponseData" element | boolean isSetIdVerificationResponseData(); |
Called when the action bar initially shows the search entry field. | public void onSearchStarted(); |
display a specific club's statistics | private static void displayStatistics(){
Scanner scanner = new Scanner(System.in);
System.out.print("Please enter Club Name: ");
String clubName = scanner.nextLine();
leagueManager.displayStatistics(clubName);
} |
No further instances allowed | private Swiftbuy() {
super("swiftbuy");
} |
Gets the display name that identifies the family of ingest modules the factory creates. Autopsy uses this string to identify the module in user interface components and log messages. The module name must be unique. so a brief but distinctive name is recommended. | String getModuleDisplayName(); |
A method that takes in a BitInputStream and a PrintStream. Reads bits from the BitInputStream and translates them using the HuffmanTree and prints those characters to the PrintStream. | public void translate(BitInputStream input, PrintStream output) {
HuffmanNode node = this.front;
while (input.hasNextBit()) {
while (node.left != null && node.right != null) {
if (input.nextBit() == 0) {
node = node.left;
} else {
... |
113 use dfs recursive | public List<List<Integer>> pathSum(TreeNode root, int sum) {
if(root==null)
return res;
dfs(root, sum, new ArrayList<Integer>());
return res;
} |
System.setProperty("webdriver.ie.driver","F:\\IdeaProjectsWork\\selenium2\\drivers\\chromedriver.exe"); WebDriver wb = new InternetExplorerDriver(); | public void openIe(){
} |
method to print the movies with the 5 highest ratings | public void printTopRatingMovies() {
Collections.sort(this.dataList, new SortByRating());
int top = Math.min(5, getDataLength());
for (int i=0; i<top; ++i) {
System.out.println(this.dataList.get(i).toString());
}
Collections.sort(this.dataList);
} |
Carga la linea de un archivo Lista de Adyacencias dada en el Grafo dado. | private static void cargarLista(String linea, TraductorDesdeLista grafo)
throws IllegalArgumentException
{
int vertice = Integer.parseInt(linea.substring(0,1)); // Guarda el vertice
linea = linea.substring(3); // Guarda los vertices sucesores
String[] lista = linea.split(" "); // Almacena... |
set a rating for the item | public void setRating(int rating); |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
Intent intent = new Intent(GuideActivity.this,MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);
startActivity(intent);
MyApplication.getApp().getSysSpUtil().setIsFirstTime(false);
finish();
} |
Config the FontFamilySelector using the default values. All the system available font names are added to the combo box. | private void defaultConfig(Set<String> defaultFontFamilyNames) {
defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;
// the empty font name
addItem("");
// all the system font names to combo box
for (String defaultFontFamilyName : defaultFontFamilyNames) {
this.listFont... |
This code will create two variables to store the horizontal and vertical positions specified origin is (0,0) h= horizontal v=vertical | public static void main(String[] args) throws IOException {
int h = 0;
int v = 0;
InputStreamReader file = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(file);
//This string will be the iterable container
String directions = br.readLine();
//this code will check upp... |
Created by sandyr on 11/23/2017. | public interface SearchPresenter {
void onDestroy();
void loadNextPage();
void searchGithubRepos(String searchPhrase);
} |
method that allows to format the ru of the form with period and hyphen even if it is entered in different ways | public static String formatearRut(String rut){
int cont = 0;
String format;
rut= rut.replace(".", "");
rut = rut.replace("-", "");
format= "-" + rut.substring(rut.length()-1);
for(int i = rut.length()-2; i>=0;i--){
format=rut.substring(i,i+1)+format;
... |
Inner x = new Inner(); | private void demoInnerClass2() {
} |
krahason elementet e vektorit me nje vlere te caktuar | private boolean contains(int[] piket,int vlera){
for(int i=0; i<piket.length; i++){
if(piket[i]==vlera) return true; //eshte metode booleane spese kthen true ose false ne menyre qe te plotesohet if me lart
}
return false;
} |
Returns the current Player. | Player getCurrentPlayer(); |
the collection of ride lines Constructor for objects of class MyWorld. | public MyWorld()
{
// Create a new world with 800x600 cells with a cell size of 1x1 pixels.
super(800, 600, 1);
//could have as many RideLines as capasity dictates
rides = new RideLines[MAX_RIDES];
currentRide=0; //initially, we have 0 prisoners
//Crea... |
Success callback. Request is considered as successful when response code is between 200 and 299 | void onSuccess(int responseCode, int requestCode, Response<JsonElement> response); |
verify the conference When debug, delete the param "request" | @PostMapping("/Verify")
public ResponseEntity<String> verify(@RequestBody VerifyRequest request){
logger.debug("verify request");
String username = conferenceService.findConference(request.getId()).getOwner();
Conference conference = conferenceService.findConference(request.getId());
... |
Return the value associated with the column: excise_duty | public java.math.BigDecimal getExciseDuty () {
return exciseDuty;
} |
TODO: Double value of Defence Order | @Override
public void specialAbility() {
} |
TODO Autogenerated method stub | private String edit(String input_from_user, char[] input_array) {
System.out.println("Enter the number of positions you want to change the string"+input_from_user);
int user_input = in.nextInt();
String result = null;
for(int i=0; i <user_input; i++){
System.out.println("Enter the"+i+"th to edit in the "+inp... |
Returns a list of students objects from the search results | private List<Student> getStudentList(StudentSearchResponse srchResponse) {
List<Student> studentList = new ArrayList<Student>();
if (srchResponse != null && srchResponse.size() > 0) {
for (StudentSearchResult srchRes : srchResponse) {
Student std = new Student(srchRes.getInquiryId(),
srchRes.getSt... |
repeated .FileInfo files = 4; | public entities.Torrent.FileInfo.Builder addFilesBuilder(
int index) {
return getFilesFieldBuilder().addBuilder(
index, entities.Torrent.FileInfo.getDefaultInstance());
} |
HomeMembershipBoilerCoverHomeEmergencyAA: with specific test context and state. .title : Home Membership | Boiler Cover | Home Emergency | AA .class : Html.HtmlDocument .url : RegularExpression(homemembership) | protected DocumentTestObject homeMembership(TestObject anchor, long flags)
{
return new DocumentTestObject(
getMappedTestObject("homeMembership"), anchor, flags);
} |
Signed transactions that satisfy PaymentDetails.outputs repeated bytes transactions = 2; | public Builder addAllTransactions(
java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
copyOnWrite();
instance.addAllTransactions(values);
return this;
} |
Used to instruct the autoscaler to not try to synchronize this instance as an EC2 web server instance | public static String initLbInstanceId() {
try {
String url = "http://169.254.169.254/latest/meta-data/instance-id";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.b... |
Returns iterator in random order | public Iterator<Item> iterator() {
return new RandomArrayIterator();
} |
Return the name of the parameter that contains a locale specification in a locale change request. | public String getParamName() {
return this.paramName;
} |
Encodes the specified path segments as a path string | public static String toString(final Object[] segments) {
final StringBuilder builder = new StringBuilder();
for (final Object segment: segments) {
if (segment instanceof Integer) {
builder.append('[').append(segment).append(']');
} else if (segment == ANY_INDEX) {
builder.append(segment);
} ... |
/ ICS FORMATTING METHODS Write RRULE property of event given an UNTIL date The frequency of the recurrence is hardcoded to WEEKLY | private String makeEventRecurrence(LocalDateTime lastDay) {
return "RRULE:FREQ=WEEKLY;UNTIL=" + formatTimeToICS(lastDay) + "Z" + "\n";
} |
pour avoir position de l'appui Px sur segment | @Override
public double calPx() {
return this.n.getPx();
} |
Gets the value of the name property | public String getName()
{
return name;
} |
Create the note directory if it does not exist | private static void createNotesCollectionIfNotExists(UserRegistry registry) throws RegistryException {
if (!registry.resourceExists(NoteConstants.NOTE_LOCATION)) {
Collection collection = registry.newCollection();
registry.put(NoteConstants.NOTE_LOCATION, collection);
}
} |
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / | protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {
/* 126 */ String str1 = paramURL.getProtocol();
/* 127 */ String str2 = paramURL.getAuthority();
/* 128 */ String str3 = paramURL.getUserInfo();
/* 129 */ String str4 = paramURL.getHost();
/* 130 */ int i = par... |
Gets a Plan form DB with planName | public Plan getPlan(String planName); |
repeated .liubaninc.m0.pki.Certificate Certificate = 1; | public Builder addCertificate(liubaninc.m0.pki.CertificateOuterClass.Certificate value) {
if (certificateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCertificateIsMutable();
certificate_.add(value);
onChanged();
... |
Gets the current job title. | public StringFilter getCurrentJobTitle() {
return currentJobTitle;
} |
TODO implement this method | public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceResponse unSubscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceRequest parameters) {
throw new UnsupportedOperationException("Not implemented yet.");
} |
When mouse moves on the canvas In 3D, drop mouse position as it should not be displayed In 2D, store mouse position to overlay coordinates | @Override
public void mouseMoved(MouseEvent e) {
View view = getChart().getView();
//
if (getChart().getView().is3D()) {
mousePosition.event = null;
mousePosition.projection = null;
} else {
mousePosition.event = e;
mousePosition.projection = screenToModel(e);
}
view.s... |
Export script to a external XML file | protected void exportScriptToFile() {
try {
final MigrationConfiguration cfg = getMigrationWizard()
.getMigrationConfig();
prepare4SaveScript();
ExportScriptDialog.exportScript(cfg, isSaveSchema());
} catch (Exception e) {
// MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.