query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
get all cv thay denied by employer | @GetMapping("/list-denied/{EmployerId}")
@CrossOrigin(origins = "*")
public Page<Cv> listCvDenied(@PathVariable(name = "EmployerId") int EmployerId,
@PageableDefault(size = 5) Pageable pageable){
return cvService.listCvDenied(EmployerId, pageable);
} | [
"public Collection findOtherPresentationsUnrestricted(Agent owner, String toolId, String showHidden);",
"public Set<String> getAllDenied() {\n if (getPlot() != null) {\n return getPlot().denied().getAllPlayers().keySet();\n } else {\n return new HashSet<>();\n }\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the html file using the given list of words. The html file is printed to the provided PrintStream. | private static void generateHtml(DictionaryADT<KeyWord> words,
PrintStream out) {
String[] colors = {
"#CD5C5C", //INDIANRED
"#5F9EA0", //CADETBLUE
"#FA8072", //SALMON
"#E9967A", //DARKSALMON
"#FF69B4", //HOTPINK
"#FFA500... | [
"public static void createPage(SimpleWriter out, String word,\n Map<String, String> definitions, Set<String> allwords) {\n assert out.isOpen() : \"Violation of: out is not open\";\n assert word != null : \"Violation of: word is not null\";\n //this is just a random comment\n o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'field782' field has been set | public boolean hasField782() {
return fieldSetFlags()[782];
} | [
"public boolean hasField783() {\n return fieldSetFlags()[783];\n }",
"public boolean hasField786() {\n return fieldSetFlags()[786];\n }",
"public boolean hasField785() {\n return fieldSetFlags()[785];\n }",
"public boolean hasField779() {\n return fieldSetFlags()[779];\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the border (either none or normal). | public void setBorder(String border); | [
"void setBorder(Border border);",
"public void setBorder(int border) {\n this.border = border;\n this.border_set = true;\n }",
"public void setBorder(Border border);",
"void setBorder(boolean border);",
"public void setBorder(int border) {\r\n this.border = border;\r\n }",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_textoNivelPersonagemActionPerformed TODO add your handling code here: | private void textoNivelPersonagemActionPerformed(java.awt.event.ActionEvent evt) {
} | [
"private void jTextFieldNomeActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtNomenclaturaActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void campoMensajesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_campoMensajesActionPerformed\n \n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overridden to make this dialog resizable. | @Override
protected boolean isResizable() {
return true;
} | [
"@Override\n protected boolean isResizable() {\n return true;\n\n }",
"void setResizable(boolean resizable);",
"void setResizable(boolean resize);",
"public boolean getResizable() {\n return resizable;\n }",
"@JSProperty\n\tvoid setResizable(boolean resizable);",
"public void sizeDi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets scaled image with given size | public void setScaledImage(int size) {
scaledImage = image.getScaledInstance(size, size, Image.SCALE_SMOOTH);
} | [
"private void updateImageSize(float scale) {\n int w = (int) (mImageWidth * scale);\n int h = (int) (mImageHeight * scale);\n mCanvas.setCoordinateSpaceWidth(w);\n mCanvas.setCoordinateSpaceHeight(h);\n mCanvas.getContext2d().drawImage(ImageElement.as(image.getElement()), 0, 0, w,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Four experiments with randomQueue using 100,1000,10000 and 100,000 customers. | public static void main (String[] argv) {
randomQueue (100, 1, 0.8, 0.4);
randomQueue (1000, 1, 0.8, 0.4);
randomQueue (10000, 1, 0.8, 0.4);
randomQueue (100000, 1, 0.8, 0.4);
// Four experiments with shortest-Queue using 100,1000,10000 and 100,000 customers.
shortestQueue (100, 1, 0.8, 0.4);
... | [
"private void generateQueue(){\r\n\t\tqueue = new int[5];\r\n\t\tfor (int x = 0; x < queue.length; x++){\r\n\t\t\tqueue[x] = random.nextInt(9);\r\n\t\t}\r\n\t}",
"private static void addDataToQueue(Queue<Customer> customerPriorityQueue) {\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print a boolean and then terminate the line. Return a reference to Console to concatenate print methods. | public static Console println(boolean b)
{
if (_instanceCount == 0)
init();
_ps.println(b);
return _console;
} | [
"public static Console print(boolean b)\n {\n if (_instanceCount == 0)\n init();\n _ps.print(b);\n return _console;\n }",
"public void println(boolean v) throws IOException\n {\n print(v);\n println();\n }",
"public void setConsole( boolean console )\n {\n this.console = consol... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to check Email OTP page is loaded. | public boolean isEmailOTPPageloaded() throws Exception {
waitForElementPresent(loginPageLocators.get("EmailOTPVerification"), 3);
if (isElementPresent(getBy(loginPageLocators.get("EmailOTPVerification")))) {
logger.info("Loaded the Email OTP screen.");
return true;
} else... | [
"public boolean isMobileOTPPageloaded() throws Exception {\n waitForElementPresent(loginPageLocators.get(\"MobileOTPVerification\"), 3);\n if (isElementPresent(getBy(loginPageLocators.get(\"MobileOTPVerification\")))) {\n logger.info(\"Loaded the Mobile OTP screen.\");\n return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method : Close frame | public void closeFrame() {
if (frame != null)
frame.dispose();
} | [
"public void closeFrame()\n\t{\n\t\tthis.dispose();\n\t}",
"private void closeParentFrame(){\n //Get the parent frame and call its dispose method\n parentFrame.dispose();\n }",
"public void closeView() {\n\t\tframeSystem.dispose();\n\t}",
"@After\n\tpublic void closeMainFrame() {\n\t\tmf.clos... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the productSms by id. | public void delete(String id) {
log.debug("Request to delete ProductSms : {}", id);
productSmsRepository.deleteById(id);
} | [
"public Product deleteProductById(int id);",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete SysShoppingProduct : {}\", id);\n sysShoppingProductRepository.deleteById(id);\n }",
"void deleteProduct(Integer productId);",
"@Override\n public void delete(String i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the magnification for the 3D model used to create this parameter set. | public double getMagnification() {return magnification;} | [
"public float getMagnification() {\n \n return magnification;\n \n }",
"public Integer getMag() {\n return mag;\n }",
"public double getLimitingMag ( ) {\r\n\t\treturn limiting_mag;\r\n\t}",
"public final OECatalogParamsMags get_params_mags () {\n\t\treturn new OECatalogParam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Selection__NameAssignment_1" $ANTLR start "rule__Selection__SourceReferenceAssignment_2" ../org.iobserve.rac.constraint.ui/srcgen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:4588:1: rule__Selection__SourceReferenceAssignment_2 : ( ruleSourceReference ) ; | public final void rule__Selection__SourceReferenceAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:4592:1: ( ( ... | [
"public final void rule__Selection__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1649:1: ( ( (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Parameter__Group_0_1__1__Impl" $ANTLR start "rule__Parameter__Group_0_1__2" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1380:1: rule__Parameter__Group_0_1__2 : rule__Parameter__Group_0_1__2__Impl ; | public final void rule__Parameter__Group_0_1__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1384:1: ( rule__Parameter__Group_0_1__2__Impl )
... | [
"public final void rule__Parameter__Group_1_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1541:1: ( rule__Parameter__Group_1_0__2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Task Rejected is called when Task is rejected | public void RejectTask(int taskId){
TaskItem task = m_taskEngine.GetTaskItem(taskId);
m_taskEngine.ChangeTaskStatus(task, TaskStatus.Rejected);
TaskEvent taskEvent = new TaskEvent();
taskEvent.m_taskId = taskId;
taskEvent.m_inputType = InputType.TaskStatusChange.value();
taskEvent.m_eventType = TaskStatus.R... | [
"void onFailure(Task task, Exception e);",
"private void handleRejectTaskMessage(RejectTaskMessage message) {\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Check if this is the right task (i.e. it is not from the client)\n\t\t\t */\n\t\t\t\n\t\t\tfinal TaskReservation rejectedRequest = message.getReservation();\n\t\t\tfin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the Research Manager's Notes. | public String getResearchManagersNotes() {
return researchMgrNotes;
} | [
"public java.lang.String getNotes() {\n return notes;\n }",
"java.lang.String getEditorialNotes();",
"public String getNotes() {\r\n return notes;\r\n }",
"public List<Note> getNotes() {\n return notes;\n }",
"public String getNOTES()\r\n {\r\n\treturn NOTES;\r\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns y(t) = h(t)x(t), where denotes convolution. | private static float[] convolve(int nh, int kh, float[] h, float[] x) {
int nt = x.length;
float[] y = new float[nt];
convolve(nh,kh,h,x,y);
return y;
} | [
"public float[] applyH(int nh, int kh, float[] h, float[] f) {\n return convolve(nh,kh,h,f);\n }",
"final static public void convolveSeparable(\n\t\t\tfinal FloatProcessor input,\n\t\t\tfinal float[] h,\n\t\t\tfinal float[] v )\n\t{\n\t\tfinal int width = input.getWidth();\n\t\tfinal int height = input.getHei... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A method to compare 2 DOMObjectNodeModel objects to verify if 2 DOM Nodes have the same content. | @Override
public boolean equals(Object other){
if(other == null
|| !other.getClass().isAssignableFrom(this.getClass())){
return false;
}
DOMNodeObjectModel otherDOMNodeObjectModel = (DOMNodeObjectModel) other;
if(this.childrenDOMNodes.size() != otherDOM... | [
"public boolean equals(FCNSTreeNode another){\n if (another==null)\n return false;\n \n if (!this.element.equals(another.element))\n return false;\n \n if (this.firstChild==null){\n if (another.firstChild!=null)\n return false;\n }\n else if (!this.firstChild.equals(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extract a DevVarLongStringArray type from a CORBA Any object. | public DevVarLongStringArray extract_DevVarLongStringArray(Any in) throws DevFailed
{
DevVarLongStringArray data = null;
try
{
data = DevVarLongStringArrayHelper.extract(in);
}
catch (BAD_OPERATION ex)
{
throw_bad_type("DevVarLongStringArray");
}
return data;
} | [
"public long[] extract_DevVarLong64Array(Any in) throws DevFailed\n\t{\n\t\tlong[] data = null;\n\t\ttry\n\t\t{\n\t\t\tdata = DevVarLong64ArrayHelper.extract(in);\n\t\t}\n\t\tcatch (BAD_OPERATION ex)\n\t\t{\n\t\t\tthrow_bad_type(\"DevVarLong64Array\");\n\t\t}\n\t\treturn data;\n\t}",
"public String[] extract_DevV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a CurrencyComparator with the given type and locale. If the type is not a valid type, then the default comparison is done by displayName | public LogInfoComparator(int p_type, Locale p_locale)
{
super(p_type, p_locale);
} | [
"public TMProfileComparator(int p_type, Locale p_locale)\n\t{\n super(p_type, p_locale);\n\t}",
"public static JwComparator<AcUspsInternationalClaim> getContractTypeComparator()\n {\n return AcUspsInternationalClaimTools.instance.getContractTypeComparator();\n }",
"public static JwCompar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates (if necessary) and returns the singleton instance of the KingDataset | public static KingDataset instance() {
if (instance == null) {
instance = new KingDataset();
}
return instance;
} | [
"private KingDataset() {\r\n\t\tString filename = \"bin\" + File.separator + \"KingDataset.bin\";\r\n\t\t\r\n\t\t// Prepare our array based on the dataset filename\r\n\t\tvalues = new byte[(int)new File(filename).length()];\r\n\t\t\r\n\t\t// Read the king dataset\r\n\t\ttry {\r\n\t\t\tFileInputStream input = new Fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the total number of bytes received of the message class type given. | public static int countRecievedBytes(
Class<? extends TrackedMessage> messageClassType) {
return TrackedMessage.countReceivedBytes(messageClassType, -1);
} | [
"public static int countReceivedBytes(\n\t Class<? extends TrackedMessage> messageClassType, int messageType)\n\t throws NullPointerException {\n\tif (null == messageClassType)\n\t throw new NullPointerException(\"messageClassType cannot be null\");\n\n\treturn TrackedMessage.reduceMap(TrackedMessage.unmap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the audio port range from which is randomly chosen the UDP port used for audio streaming. | public Range getAudioPortsRange(); | [
"public void setAudioPortRange(int minPort, int maxPort);",
"void setAudioPortRange(int minPort, int maxPort);",
"String getPortRange();",
"int getUdpPort();",
"public Range getVideoPortsRange();",
"public abstract int getLocalRtpPort();",
"int getUdpServerPort();",
"private static int generateLocalUd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deserializes a LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS from a ByteBuffer. | public static LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
} | [
"public static org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder newBuilder(org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS other) {\n if (other == null) {\n return new org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tells if item has children | boolean hasChildren(); | [
"@Override\n public boolean hasChildren(Object itemId) {\n return ((Container.Hierarchical) items).hasChildren(itemId);\n }",
"public final boolean hasChildren() {\n\t\treturn this._children.size() > 0;\n\t}",
"public boolean hasChilds() {\n return childs != null && !childs.isEmpty();\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Switch context to Native App (Appium / Mobile only) | public void switchToNativeContext() throws java.util.NoSuchElementException, UnsupportedCommandException {
if (originalDriver instanceof AppiumDriver) {
((AppiumDriver) originalDriver).context("NATIVE_APP");
} else {
throw new UnsupportedCommandException("Switching context to WEB... | [
"private void intializeAppiumDriver() {\n File app = new File(\"src/main/resources\", CommonUtils.getCentralData(\"App\"));\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, CommonUtils.getCentralData(\"PlatformNam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the user's input for the number of double beds, also checks input is valid int | public void setNoOfDBeds(int index)
{
Scanner s = new Scanner(System.in);
System.out.println("Please enter the number of double beds in room " + index);
try//tries to turn the input string into an int
{
dBeds = Integer.parseInt(s.nextLine());
}
catch (N... | [
"public void setNoOfSBeds(int index)\n\t{\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter the number of single beds in room \" + index);\n\t\t\n\t\ttry//tries to turn the input string into an int\n {\n sBeds = Integer.parseInt(s.nextLine());\n \n }\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
builds status bean based on customer information | protected StatusBeanModel getStatusBean(BusIfc bus, CustomerIfc customer)
{
StatusBeanModel sModel = null;
sModel = UIUtilities.getStatusBean((AbstractFinancialCargo) bus.getCargo());
if (customer != null)
{
String[] vars = { customer.getFirstName(), customer.getLastName(... | [
"public void setCustomerStatus(CustomerStatus customerStatus) {\n\t\tthis.customerStatus = customerStatus;\n\t}",
"public CustomerStatus getCustomerStatus() {\n\t\treturn customerStatus;\n\t}",
"public void setCustmerStatusCustomerId(Integer custmerStatusCustomerId) {\n this.custmerStatusCustomerId = cus... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Expression_list__Group_1__0__Impl" $ANTLR start "rule__Expression_list__Group_1__1" ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/srcgen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:3857:1: rule__Expression_list__Group_1__1 : rule__E... | public final void rule__Expression_list__Group_1__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal... | [
"public final void rule__Expression_list__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/content... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Create a valid filename from a date, and the customer's name. Names may have characters that are not permitted in filenames, these must be removed or replaced. This is a very basic solution: remove all characters from customer name that are not AZ or az. This could definitely be improved. There are many names that wo... | public static String createFileName(String customer, Date date) {
String name = removeBannedCharacters(customer);
if (name.length() == 0) {
name = "Customer"; // Something, if there are no valid filename characters. Can you think of a better solution? Ask the user for a name?
... | [
"private String createFileName(String date, String name) {\n return date + \"-\" + name + \".log\";\n }",
"public String prepareFilename(String name);",
"public String generateFileName(){\r\n\t\tString timestamp = new SimpleDateFormat(\"yyyyMMdd_HHmmssSS\").format(new Date());\r\n\t\tString re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contexts: ActionParam returns StringParam StringParam returns StringParam Constraint: (key=EString value=EString) | protected void sequence_StringParam(ISerializationContext context, StringParam semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient((EObject) semanticObject, EcarulesPackage.Literals.ACTION_PARAM__KEY) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureVa... | [
"@Test\r\n public void testGetParameter_Action_String() {\r\n String parameter = ActionParameter.LOGIN.getName();\r\n String expResult = \"TEST\";\r\n String result = ArgUtils.getParameter(action, parameter);\r\n assertEquals(expResult, result);\r\n }",
"@Test\r\n public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the action property: Route policy action properties. | public StatementActionProperties action() {
return this.action;
} | [
"public ActionPropertyElements getActionPropertyAccess() {\n\t\treturn (pActionProperty != null) ? pActionProperty : (pActionProperty = new ActionPropertyElements());\n\t}",
"public GovernanceActionProperties getProperties()\n {\n return properties;\n }",
"public String policyDefinitionAction() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implementation for the CreateNdefMessageCallback interface | @Override
public NdefMessage createNdefMessage(NfcEvent event) {
// Get Networkdata
//HostageDBOpenHelper dbh = new HostageDBOpenHelper(this);
DaoSession dbSession = HostageApplication.getInstances().getDaoSession();
DAOHelper daoHelper = new DAOHelper(dbSession,this);
ArrayList<NetworkRecord> localNetworkIn... | [
"@Override\n public void onNdefPushComplete(NfcEvent event) {}",
"interface CreateNewNetCallback {\n\n /**\n * Method is called after the net was created successfully.\n */\n void onCreateNewNetSuccess();\n\n /**\n * Method is called after something went wrong with ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Description: Verify error message 'Your payment is not done yet' along with pay package button if you're not paid for the package | public void verifyErrorAlertwithPayPackageButtonifpackageamountisnotPaid() throws Exception {
CreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);
waitTill(3000);
OverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);
waitTill(3000);
LoginTradusPROPage loginPage = ne... | [
"public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }",
"public boolean fnVerifyPaymentPlan() throws Throwable\n\t{\n\t\tboolean blnStatus=true;\n\t\ttry\n\t\t{\n\t\t\t//Reporter.reportStep(\"Verifying Payment Plan\");\n\t\t\tString strMessag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo....:getAlertaPorValor Descricao.:Busca o valor do status do alarme baseado no valor do contador do ultimo evento | private String getAlertaPorValor(Evento ultimoEvento)
{
// O alerta padrao sera o status OK, dependendo do valor do atraso esse alerta pode ser modificado
String alerta = Alarme.ALARME_OK;
// Verifica se o contador classifica como alerta
double valor = ultimoEvento.getValorContador();
// Verifica se o conta... | [
"private String getAlertaPorStatusExecucao(Evento ultimoEvento)\n\t{\n\t\t// O alerta padrao sera o status atual do alarme, dependendo do valor do atraso esse alerta pode ser modificado\n\t\tString alerta = Alarme.ALARME_OK;\n\t\t// No caso de status de execucao, o alarme possui somente dois estados\n\t\t// Ok ou N... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Grouping of Job definition stages. | interface DefinitionStages {
/**
* The first stage of a Job definition.
*/
interface Blank extends GroupableResourceCore.DefinitionWithRegion<WithGroup> {
}
/**
* The stage of the Job definition allowing to specify the resource group.
*/
inter... | [
"interface DefinitionStages {\n /**\n * The first stage of a JobTargetGroup definition.\n */\n interface Blank extends WithJobAgent {\n }\n\n /**\n * The stage of the jobtargetgroup definition allowing to specify JobAgent.\n */\n interface WithJobAg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a change is triggered in the cache | public void update(CacheUpdateEvent e); | [
"public abstract void onAddedToCache();",
"public void onUsedCache() {}",
"private void pageCacheChanged() {\n // Ok to have a race here, see the field javadoc.\n if (!pageCacheChanged)\n pageCacheChanged = true;\n }",
"void notifyCacheEntryModified(Object key, Object value, boolea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleLog_expr" $ANTLR start "entryRuleOr_expr" PsiInternalStateConstraintTransition.g:1691:1: entryRuleOr_expr returns [Boolean current=false] : iv_ruleOr_expr= ruleOr_expr EOF ; | public final Boolean entryRuleOr_expr() throws RecognitionException {
Boolean current = false;
Boolean iv_ruleOr_expr = null;
try {
// PsiInternalStateConstraintTransition.g:1691:49: (iv_ruleOr_expr= ruleOr_expr EOF )
// PsiInternalStateConstraintTransition.g:1692:2: i... | [
"public final EObject entryRuleOr() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleOr = null;\r\n\r\n\r\n try {\r\n // ../de.nordakademie.mwi13a.team1.dependency/src-gen/de/nordakademie/mwi13a/team1/dependency/parser/antlr/internal/InternalDependency... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find compute offering by isActive. | List<ComputeOffering> findByIsActive(Boolean isActive, Long userId) throws Exception; | [
"List<ComputeOffering> findByDomainAndIsActive(Long domainId, Boolean isActive) throws Exception;",
"ComputeOffering findByName(String name);",
"Iterable<Tool> findByIsAvailable(boolean b);",
"List<Driver> findByActive(Boolean active);",
"Launcher findByNameAndIsActive(String name, Boolean isActive) throws ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should make the provided package/activity component the default settings application. | void setDefaultSettingsApp(String pkgName, String activity); | [
"private static void openSettingForPermission(Activity activity) {\n\n /*Intent intent = new Intent();\n intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\", mActivity.getPackageName(), null);\n intent.setData(uri);\n mActivity.sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method loginWithFb definition ends here.. Method loginWithInstagram definition | public void loginWithInstagram( String accessToken, final ObjectCallback<JSONObject> callback ){
/**
Call the onBefore event
*/
callback.onBefore();
//Definging hashMap for data conversion
Map<String, Object> hashMapObj... | [
"public void login() {\n String appId = \"404127593399770\";\n String redirectUrl = \"https://www.facebook.com/connect/login_success.html\";\n String loginDialogUrl = facebookClient.getLoginDialogUrl(appId, redirectUrl, scopeBuilder);\n Gdx.net.openURI(loginDialogUrl);\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the stop play method with multiple layers | @Test
public void testStopPlayMultipleLayers() {
array = new byte[3][];
array[0] = singleNote;
array[1] = multiNotes;
array[2] = maximum1Layer;
player.play(array);
player.stopPlay();
} | [
"@Test(timeout = 1000) // dont want it to take too long to play all the notes simultaneously, otherwise it will go out of sync!\r\n\tpublic void testStopPlayMaximumLayersAndNotes() {\r\n\t\tplayer.play(maximumLayersAndNotes); \r\n\t\tplayer.stopPlay();\r\n\t}",
"@Test\r\n public void testStop(){\r\n ass... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check to save account and password | void checkSavePwd(){
String acc = MyConstants.STR_BLANK;
String pwd = MyConstants.STR_BLANK;
if(cbox.isChecked()){
acc = edAccount.getText().toString();
pwd = edPassword.getText().toString();
}
Setting.getInstance().saveValue(MyConstants.ACC_KEY, acc, Setting.TYPE_STRING);
Setting.getInstance().save... | [
"private boolean verifyCredentials() {\n\n boolean bCredentialsValid = false;\n strUserMailID = strUserName = \"\";\n\n // Get the account information, if existing\n DatabaseHandler dbHandler = new DatabaseHandler(getApplicationContext());\n AccountInformation accInfo = dbHandler.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create array of contract jsons with data from a distributor's contract list | private List<Map<String, Object>> writeContracts(final Distributor distributor) {
// Create json array for contracts
List<Map<String, Object>> jsonContracts = new ArrayList<>();
// Convert each of the given distributor's contract objects to json objects
for (Contract contract : distribu... | [
"private List<Map<String, Object>> writeDistributors() {\n // Create json array for distributors\n List<Map<String, Object>> jsonDistributors = new ArrayList<>();\n Database database = Database.getInstance();\n\n // Convert each distributor object to json object\n for (Distributor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Disables the the factor (1 + pWrapper>getRetransmitCount()) from RTO calculation | public native void disableRetransmitCountFactorInRTO(); | [
"void unsetRateOfChangeOfCantDeficiencyOverTime();",
"public void depreciate(){\r\n float amountN = getAmount();\r\n float reduce = amountN*(rate/100);\r\n amountN = amountN - reduce;\r\n this.amount = amountN;\r\n }",
"void unsetRateOfChangeOfAppliedCantOverTime();",
"public vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enclose the name with quotation marks. | String applyQuote(String name); | [
"String getNameEscape();",
"public abstract String escapeName(String name);",
"private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\n }",
"private String quoteGaugeName(String name) {\n return name.replaceAll(\"\\\\W\", \"_\");\n }",
"public String ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
full_house_clicked: a method called when the fll house "button" is clicked | public void full_house_clicked(View view){
TextView full_house;
FrameLayout full_house_button;
if(is_player_one_turn){
full_house = (TextView) findViewById(R.id.player_one_full_house);
full_house_button = (FrameLayout) findViewById(R.id.full_house_button_one);
... | [
"public void ClickBuyHouseButton()\r\n\t{\r\n\t\tbuyHouse.doClick();\r\n\t}",
"void onTakeTourClick();",
"public void senstiveClick(int area);",
"@Override\n\t\t\tpublic void onClick(ClickEvent event)\n\t\t\t{\n\t\t\t\tif (mainAppDisplay.getToggleButtonCreateQuickBlipIsDown())\n\t\t\t\t{\n\t\t\t\t\tSystem.out... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENBEGIN:|5switchDisplayable|2| //GENEND:|5switchDisplayable|2| //GENBEGIN:|7commandAction|0|7preCommandAction Called by a system to indicated that a command has been invoked on a particular displayable. | public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction
// write pre-action user code here
if (displayable == list) {//GEN-BEGIN:|7-commandAction|1|58-preAction
if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|1|58-p... | [
"public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction\n // write pre-action user code here\n if (displayable == mainMenu) {//GEN-BEGIN:|7-commandAction|1|27-preAction\n if (command == exitCommand) {//GEN-END:|7-commandAction|1|... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an output descriptor with a key, output type, and description. | public OutputField(String key, String description, boolean isFixed, Class<?> outputType) {
super(key, description);
this.fixed = isFixed;
this.outputType = outputType;
} | [
"public static native long StaticPaymentOutputDescriptor_new(long outpoint_arg, long output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);",
"public Output withOutputKey(String outputKey) {\n this.outputKey = outputKey;\n return this;\n }",
"public static native long Delayed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used with the attack dialog to update the status of the dice count used, available buttons, etc | private void updateDiceDisplay(Text diceStatusDisplay, int currentDiceCount, int maxDiceCount, Button decBtn, Button incBtn) {
final String dieOrDice = currentDiceCount == 1 ? "die" : "dice";
diceStatusDisplay.setText("Rolling " + currentDiceCount + " "
+ dieOrDice + ".\n(" + maxDiceCoun... | [
"public void updateStatistics() {\n myInfectedHumans = 0;\n myHealthyHumans = 0;\n myInfectedBirds = 0;\n myHealthyBirds = 0;\n myDays = 0;\n \n for (AbstractEntity entity: myWorldPanel.getMyEntityList()) {\n if (entity instanceof Human) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Data'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseData(Data object) {
return null;
} | [
"public T caseData(Data object)\n {\n return null;\n }",
"public T caseDataType(DataType object) {\r\n\t\treturn null;\r\n\t}",
"public T caseDataType(DataType object) {\n\t\treturn null;\n\t}",
"public T caseInputData(InputData object)\r\n\t{\r\n\t\treturn null;\r\n\t}",
"public abstract Object getDat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__UserName__Group__2__Impl" $ANTLR start "rule__UserImport__Group__0" InternalDependency.g:314:1: rule__UserImport__Group__0 : rule__UserImport__Group__0__Impl rule__UserImport__Group__1 ; | public final void rule__UserImport__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDependency.g:318:1: ( rule__UserImport__Group__0__Impl rule__UserImport__Group__1 )
// InternalDependency.g:319:2: rule__UserImport__Group__... | [
"public final void ruleUserImport() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDependency.g:116:2: ( ( ( rule__UserImport__Group__0 ) ) )\n // InternalDependency.g:117:2: ( ( rule__UserImport__Group__0 ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invokes concrete method on the specified object with the specified arguments. | public abstract Object invoke(Object obj, Object... args) throws Throwable; | [
"public Object invoke(final Object object) {\n\t\treturn method.invoke(object, args);\n\t}",
"abstract protected Object invoke0 (Object obj, Object[] args);",
"@Override\n public Object exec(List arguments)\n throws TemplateModelException {\n try {\n return wrapper.invokeMethod(objec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private final String bucketPath; | public Bucket() {
// this.bucketPath = bucketPath;
keys = new Vector<>();
} | [
"public String getBucket() {\n return bucket;\n }",
"public String getBucket();",
"public String getBucket() {\n return bucket;\n }",
"public String getBucketName() {\n return bucket;\n }",
"java.lang.String getBucket();",
"@Override\n public String getBucketUri() {\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display information of a Compute Engine instance. .google.cloud.networkmanagement.v1beta1.InstanceInfo instance = 5; | @java.lang.Override
public com.google.cloud.networkmanagement.v1beta1.InstanceInfoOrBuilder getInstanceOrBuilder() {
if ((stepInfoCase_ == 5) && (instanceBuilder_ != null)) {
return instanceBuilder_.getMessageOrBuilder();
} else {
if (stepInfoCase_ == 5) {
return (com.google.cl... | [
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.InstanceInfo getInstance() {\n if (stepInfoCase_ == 5) {\n return (com.google.cloud.networkmanagement.v1beta1.InstanceInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.InstanceInfo.getDefaultInstance();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method gets the helmet | public String getHelmet()
{
return this.items.get("Helmet");
} | [
"public Helmet getHelmetSlot() { return this.helmet; }",
"boolean hasHasHelmet();",
"public String getHelmName() {\n return helmName;\n }",
"void setHelmet(Helmet helmet);",
"public void setHelmet(String helmet)\n {\n this.items.put(\"Helmet\", helmet);\n this.draw();\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
select from blogpostlikes where blogpost_id=? and user_username=? if user already liked the post, 1 object if user has not yet liked the post, null object | BlogPostLikes userLikes(BlogPost blogPost,User user); | [
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Likes> findLikesForUser(String username){\n\t\tList<Likes> likes = new ArrayList<Likes>();\n\t\tQuery query = em.createQuery(\"SELECT uc FROM Likes uc WHERE uc.username=:username\");\n\t\tquery.setParameter(\"username\", username);\n\t\ttry {\n\t\t\t\tlikes = (List<L... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an Enumeration of all the header names. | public Enumeration getHeaderNames (); | [
"public Enumeration getHeaders (String name);",
"Collection<String> getHeaderNames();",
"public Iterator getHeaderNames() {\n final Iterator iterator;\n if (headers == null) {\n iterator = Collections.EMPTY_LIST.iterator();\n } else {\n iterator = headers.keySet().iter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert the total time as a formatted string Reference: calculate time difference from milliseconds millisecondstostringformattedtimeinjava/1652092816520928 | public static String timeAsString(long totalTime) {
long second = totalTime / 1000 % 60;
long minute = totalTime / (1000 * 60) % 60;
long hour = totalTime / (1000 * 60 * 60);
return String.format("%02d:%02d:%02d", hour, minute, second);
} | [
"private static String timeElapsed(long timeinms){\n double s=(double)(System.currentTimeMillis()-timeinms)/1000;\n \n int h=(int)Math.floor(s/((double)3600));\n \n s-=(h*3600);\n \n int m=(int)Math.floor(s/((double)60));\n \n s-=(m*60);\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Action for cancel button, with window close. | public void cancelButtonClicked(){
closeWindow();
} | [
"public void onClickCancel() {exit();}",
"public void Cancel()\n\t{\n\t\tCancel.click();\n\t}",
"public void onClick$btCancel() {\n cancel();\n }",
"public void clickCancel()\n {\n click(CANCEL_BUTTON);\n }",
"void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new sure bet not found exception. | public SureBetNotFoundException() {
super();
} | [
"public SureBetNotFoundException(Exception exception) {\r\n\t\tsuper(exception);\r\n\t}",
"public SureBetNotFoundException(String message, Exception exception) {\r\n\t\tsuper(message, exception);\r\n\t}",
"public GameBuyException() {\n }",
"public SureBetNotFoundException(String message) {\r\n\t\tsuper(mes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDET_SWITCHED.INV_AC_CIF | public void setINV_AC_CIF(BigDecimal INV_AC_CIF) {
this.INV_AC_CIF = INV_AC_CIF;
} | [
"public void setINVESTMENT_ACC_CIF(BigDecimal INVESTMENT_ACC_CIF)\r\n {\r\n\tthis.INVESTMENT_ACC_CIF = INVESTMENT_ACC_CIF;\r\n }",
"public void setSWITCHED_CIF(BigDecimal SWITCHED_CIF)\r\n {\r\n\tthis.SWITCHED_CIF = SWITCHED_CIF;\r\n }",
"public void setACC_CIF(BigDecimal ACC_CIF)\r\n {\r\n\tthis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ methods to convert perunit on 100MVA base convert MW to perunit | public static float mw2pu(float mw) {return mw/100F;} | [
"public static float pu2mw(float pwr) {return pwr*100F;}",
"private Double convertMilliliters (Double quantity, String outUnit) {\n switch (outUnit) {\n case (\"ozfl\") : return (quantity * 0.033814);\n\n case (\"tsp\") : return (quantity * 0.202884);\n\n case (\"tbsp\") : ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for registrationItems4. | public void setRegistrationItems4(RegistrationItems aRegistrationItems4) {
registrationItems4 = aRegistrationItems4;
} | [
"public RegistrationItems getRegistrationItems4() {\n return registrationItems4;\n }",
"public void setRegistrationItems2(RegistrationItems aRegistrationItems2) {\n registrationItems2 = aRegistrationItems2;\n }",
"public void setRegistrationItems3(Set<RegistrationItems> aRegistrationItems3) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleAlmacenamiento" $ANTLR start "entryRuleServidorBD" InternalCeffective.g:328:1: entryRuleServidorBD : ruleServidorBD EOF ; | public final void entryRuleServidorBD() throws RecognitionException {
try {
// InternalCeffective.g:329:1: ( ruleServidorBD EOF )
// InternalCeffective.g:330:1: ruleServidorBD EOF
{
before(grammarAccess.getServidorBDRule());
pushFollow(FOLLOW_1);
... | [
"public final void ruleServidorBD() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:341:2: ( ( ( rule__ServidorBD__Group__0 ) ) )\n // InternalCeffective.g:342:2: ( ( rule__ServidorBD__Group__0 ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of CursorContratoListNull | public void setCursorContratoListNull(boolean CursorContratoListNull)
{
this.CursorContratoListNull = CursorContratoListNull;
} | [
"public boolean isCursorContratoListNull()\r\n\t{\r\n\t\treturn CursorContratoListNull;\r\n\t}",
"public void handleNullPointerExceptionForListFields() {\n if (this.textAreaList == null) {\n this.textAreaList = new ArrayList<>();\n }\n if (this.tableList == null) {\n thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "program" element | void setProgram(java.lang.String program); | [
"public void setProgram(Program program){\n\t\tthis.currentprogram = program;\n\t}",
"private void updateProgram() {\n tm.changeProgram(new Program(programArea.getText().trim()));\n }",
"public void setProgram(entity.RIProgram value) {\n __getInternalInterface().setFieldValue(PROGRAM_PROP.get(), va... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PRIVATE METHODS Given a key, return the index of the Bucket where the key should reside. | private int bucketIndex(K key){
return key.hashCode() % numberOfBuckets;
} | [
"private int findPairByKey(K key, Bucket<K, V> theBucket){\r\n int size = theBucket.size();\r\n\r\n for(int i = 0 ; i < size ; i++){\r\n Pair<K, V> pair = theBucket.getPair(i);\r\n\r\n if(key.equals(pair.key)) \r\n \treturn i;\r\n }\r\n return (-1);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the maximum value of the density function. | public double getMaxDensity(){
double mode = Math.floor(parameter);
return getDensity(mode);
} | [
"public double getMaxDensity(){\n\t\tdouble mode = Math.exp(location - scale * scale);\n\t\treturn getDensity(mode);\n\t}",
"public double getMaxDensity(){\n\t\tdouble mode;\n\t\tif (nDegrees == 1) mode = getDomain().getLowerValue();\n\t\telse mode = (double)((nDegrees - 2) * dDegrees) / (nDegrees * (dDegrees + 2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Main method of the class. Combines all classes together. 1. Taking input from user. 2. Checking whether leading zero had been cut off, if yes, adding leading zero to barcode and then checking correctness of barcode and type length. If hadn't been cut off, checking lengths without adding zero to barcode. 3.Returning tru... | public boolean analyzeBarcode(BarcodeInputInterface input) {
barcode = this.input.getBarcode();
barcodeType = this.input.getBarcodeType();
try{
this.checker.isNumeric(barcode);
}catch (NumberFormatException e){
e.printStackTrace();
return false;
... | [
"private static void checkDigit() {\n int checkSum = calcDigit();\n if (BARCODE.length() == 13) {\n if (checkSum == barcodeInt[12]) {\n System.out.println(\"This barcode (\" + BARCODE + \") is a valid barcode!\");\n } else {\n System.out.println(\"Th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column account.insert_time | public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
} | [
"public void setInsert_time(String insert_time) {\n this.insert_time = insert_time;\n }",
"public void setInsertTime(Date insertTime) {\n this.insertTime = insertTime;\n }",
"public Date getInsertTime() {\r\n return insertTime;\r\n }",
"public Date getInsertTime() {\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
trim up to max whitespace (\r, \n, space, \t) from the start of the given string | static String trimStart(String s, int max) {
StringBuilder sb = new StringBuilder(s);
int trimmed = 0;
while(sb.length() > 0 && Character.isWhitespace(sb.charAt(0)) && trimmed < max) {
sb.deleteCharAt(0);
++trimmed;
}
return sb.toString();
} | [
"static String trimStart(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(0) == '\\u005cr'\n || sb.charAt(0) == '\\u005cn'\n || sb.charAt(0) == '\\u005ct'\n || sb.charAt(0) == ' ')) {\n sb.deleteCharAt(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a list of all the productions in the database | public List<Production> getAllProduction() throws BrewDBException {
EntityManager em = DBUtil.getEmFactory().createEntityManager();
try {
List<Production> p = em.createNamedQuery("Production.findAll", Production.class).getResultList();
return p;
} catch (Ex... | [
"public ArrayList<Production> getAllProductions() {\n ArrayList<Production> productions = new ArrayList<>();\n try (PreparedStatement ps = connection.prepareStatement(\"SELECT * FROM getAllProductions()\")) {\n try (ResultSet resultSet = ps.executeQuery()) {\n while (resultSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the rain rate. | void setRainRate(double rate) {
this.rate_rain = rate;
} | [
"public void setRainTime(int time)\n {\n rainTime = time;\n }",
"public static void setRaining() {\n int chanceOfRain = new Random().nextInt(10);\n raining = chanceOfRain < 3;\n }",
"public WeatherView setRainTime(int rainTime) {\r\n this.mRainTime = rainTime >= 0 ? rainTime... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the line color. | public void setLineColor(Color lineColor) {
this.lineColor = lineColor;
} | [
"public void setLineColour(Color lineColour);",
"public void setLineColor(Color line) {\n\tlineColor = line;\n }",
"void setLineColor(Color color) { }",
"int LineSetColor(int id, NativeLong color);",
"@Override\n public void setColor(Color c) {\n if (c == Color.black) {\n _buffer.appen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert error to JSON in String form. | public String toJsonString() {
JSONObject json = toJson();
String jsonString;
if (json == null)
jsonString = "{\"message\":\"unknown server error\"}";
else
jsonString = toJson().toString();
return jsonString;
} | [
"protected String exceptionToJson(Exception ex) {\n return getJsonString(\"ErrorMsg\", ex.getMessage());\n }",
"public static String toErrorJsonString(BaseResponse base) {\n\t\treturn new Gson().toJson(base);\n\t}",
"private String exceptionToJson(Exception ex) {\n BasicThrowable basicThrowable = new Bas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get content disposition header or null if no such header exists. | public javax.sip.header.ContentDispositionHeader
getContentDisposition() {
return (ContentDispositionHeader)
this.getHeader(ContentDispositionHeader.NAME);
} | [
"String getContentDisposition();",
"public String getContentDisposition() {\n return this.contentDisposition;\n }",
"public String getContentDisposition() {\n\t\treturn contentDisposition;\n\t}",
"public String getContentDisposition() {\n\t\treturn _contentDisposition;\n\t}",
"private String creat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private void EndTurnActionPerformed(ActionEvent e) Fires an event to accommodate ending the player's turn. | private void EndTurnActionPerformed(ActionEvent e) {
Dice.getGameDice().resetDiceButtonAndLisners();
Dice.getGameDice().removeListener(dieListner);
fireEvent("endTurn");
this.setVisible(false);
revalidate();
repaint();
} | [
"public void handleEndTurn(ActionEvent event){\n sender.sendInput(\"end turn\");\n }",
"public void buttonEndTurn() {\n\t\tendTurn();\n\t\t}",
"private void endTurn() {\n currentTurn = getNextPlayer();\n }",
"public void ClickEndTurnButton()\r\n\t{\r\n\t\tEndTurn.doClick();\r\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the bitangent vector | public void setBitangent(Vector3f bitangent) {
this.bitangent = bitangent;
} | [
"public void tangent(Vec2 v) {\n\t\tset(v.y(), -v.x());\n\t}",
"public void tangent() {\n\t\ttangent(this);\n\t}",
"public void changeTanOriginal() {\n this.changeTan(aorg, borg, corg, dorg, yorg);\n }",
"public void setTangent(Vector3f tangent) {\n this.tangent = tangent;\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Ident Primary'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseIdentPrimary(IdentPrimary object)
{
return null;
} | [
"Identifier getPrimaryIdentifier();",
"public final Expr primary() throws RecognitionException {\n Expr result = null;\n\n int primary_StartIndex = input.index();\n\n Token Int1=null;\n Token Ident2=null;\n Expr x =null;\n\n\n try {\n if ( state.backtracking>0 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleDCID" $ANTLR start "ruleDCID" InternalSafetyParser.g:9870:1: ruleDCID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (this_ID_0= RULE_ID kw= ColonColon ) this_ID_2= RULE_ID ) ; | public final AntlrDatatypeRuleToken ruleDCID() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_ID_0=null;
Token kw=null;
Token this_ID_2=null;
enterRule();
try {
// InternalSafetyParser.g:9876:2: ( (... | [
"public final AntlrDatatypeRuleToken ruleDCID() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token this_ID_0=null;\n Token kw=null;\n Token this_ID_2=null;\n\n enterRule(); \n \n try {\n // Interna... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ParameterList__Group_1__0__Impl" $ANTLR start "rule__ParameterList__Group_1__1" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:5556:1: rule__ParameterList__Group_1__1 : rule__ParameterList__Group_1__1__Impl ; | public final void rule__ParameterList__Group_1__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:5560:1: ( ru... | [
"public final void rule__ParameterList__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFrac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field relation is set (has been assigned a value) and false otherwise | public boolean isSetRelation() {
return this.relation != null;
} | [
"boolean isSetRel();",
"boolean isSetRelatedPerson();",
"public boolean isSetField() {\r\n return this.field != null;\r\n }",
"public boolean isSetRel()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get request of trade | public TradeList getTradeRequests(){
TradeList tradesToReturn = new TradeList();
for(Trade aTrade : trades){
if (aTrade.getStatus().equals("Pending") && aTrade.getType().equals("Current Incoming")){
tradesToReturn.add(aTrade);
}
}
return tradesToRe... | [
"List<Trade> getMyTrades(MyTradeRequest request);",
"List<ContractMatchResult> getContractMyTrades(ContractMyTradeRequest request);",
"com.google.openrtb.OpenRtb.BidRequest getRequest();",
"com.bingo.server.msg.MoneyExchange.MoneyExchangeRequest getMoneyExchangeRequest();",
"com.tencent.angel.serving.apis.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of canSleepIn method, of class SleepingIn. | @Test
public void testCanSleepInisWeekdayonVacation() {
assertTrue(sleepingIn.canSleepIn(true, true));
} | [
"public boolean isInSleep() {\n\t\treturn isInSleep;\n\t}",
"public boolean isSleepingAllowed () {\n\t\treturn jniIsSleepingAllowed(addr);\n\t}",
"public boolean isSleeping() {\n\t\tif(sleeping == 4)\n\t\t\tisSleeping = false; \n\t\telse isSleeping = true;\n\t\treturn isSleeping;\n\t}",
"private boolean enoug... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configuration for a generic web service. .google.cloud.dialogflow.cx.v3.Webhook.GenericWebService generic_web_service = 4; | com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebServiceOrBuilder
getGenericWebServiceOrBuilder(); | [
"com.google.cloud.dialogflow.cx.v3.Webhook.GenericWebService getGenericWebService();",
"boolean hasGenericWebService();",
"public WebhookService webhookService() {\n\t\treturn webhookService;\n\t}",
"@Bean\n public WebServiceTemplate webServiceTemplate(){\n WebServiceTemplate webServiceTemplate = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
COPS2 WL TODO: Decide what to do with truncate truncate is a strongly consistent operation in cassandra option one is simply to modify to wait for all deps to be satisfied everywhere before truncating option two is to just truncate now and let ops pending to that CF do nothing (other than count for dep_checks) option t... | public void truncate(String cfname)
throws InvalidRequestException, UnavailableException, TimedOutException, TException
{
long returnTime = getAnyClient().truncate(cfname, clientContext.getDeps(), LamportClock.sendTimestamp());
LamportClock.updateTime(returnTime);
clientContext.clearDeps... | [
"@Test\n\tpublic void testCommitOverheadAfterEmptyDelete() {\n\t\tFile f = new File(TestTools.getDbFileName());\n\t\tlong len1 = f.length();\n\n\t\t//open session\n\t\tPersistenceManager pm = TestTools.openPM();\n\n\t\tDBStatistics dbs = ZooJdoHelper.getStatistics(pm);\n\t\tlong pwc0 = dbs.getStoragePageWriteCount(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the pixel array for the specified slice, were 1<=n<=nslices. The scale of the returned flat image for the Layer at index 'n1' will be defined by the LayerSet virtualization options. | @Override
public Object getPixels(final int n) {
if (n < 1 || n > layers.size()) return null;
return getProcessor(n).getPixels();
} | [
"public abstract Image getSlice(int i);",
"public BufferedImage getSlice();",
"public static int[][] rasterCPU(Slice slice, int numSlice) {\n\n\t\t\tBufferedImage image = new BufferedImage(Main.WIDTH, Main.HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D ctx = image.createGraphics();\n\t\t\tctx.clearRect(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the warehouseUid associated with inventory. | Long getWarehouseUid(); | [
"public java.lang.String getWarehouseUuid() {\n java.lang.Object ref = warehouseUuid_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method for selectionChanged(ModelElement)'.Valid model element is given, should perform successfully. | public void testSelectionChanged_Accuracy() {
handler.selectionChanged(modelElement);
assertEquals("The corresponded document tree node should be selected", (MAINFRAME.getDocumentTree()
.getSelectedTreeNodes())[0].getNodeObject(), graphNode);
} | [
"public void testFireSelectionChangeEvent() {\n ModelElementSelectionListenerMock listener = new ModelElementSelectionListenerMock();\n instance.addModelElementSelectionListener(listener);\n instance.fireSelectionChangeEvent(new GuardImpl());\n assertTrue(\"Failed to fire the event.\", l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of SystemGrantModuleManagedBean | public SystemGrantModuleManagedBean() {
super(SystemGrantModule.class);
} | [
"public abstract GrantContext create();",
"public CreatePromoManagedBean() {\n }",
"public RolePermissionManagedBean() {\n\n }",
"public AccountManagedBean() {\n }",
"public GenerosManagedBean() {\n }",
"public static PermissionBo newInstance(AppBo app) {\n final String appId = app.getI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new X837Pro_2010BB_N4_PayerCityStateZIPCode RecordBuilder by copying an existing X837Pro_2010BB_N4_PayerCityStateZIPCode instance | public static net.explorys.samhat.z12.r837.X837Pro_2010BB_N4_PayerCityStateZIPCode.Builder newBuilder(net.explorys.samhat.z12.r837.X837Pro_2010BB_N4_PayerCityStateZIPCode other) {
return new net.explorys.samhat.z12.r837.X837Pro_2010BB_N4_PayerCityStateZIPCode.Builder(other);
} | [
"public static net.explorys.samhat.z12.r837.X837Pro_2010BB_N4_PayerCityStateZIPCode.Builder newBuilder() {\n return new net.explorys.samhat.z12.r837.X837Pro_2010BB_N4_PayerCityStateZIPCode.Builder();\n }",
"public net.explorys.samhat.z12.r837.X837Pro_2010BB_N4_PayerCityStateZIPCode.Builder set2010BBN402PayerS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an InvalidHourlyPayRateException with no detail message. | public InvalidHourlyPayRateException() {} | [
"public InvalidHourlyPayRateException(final String s) {\n super(s);\n }",
"public InvalidAmountException(){\n\t\tsuper();\n\t}",
"public NotEnoughFundsException() {\n super(\"NotEnoughFundsException You cannot buy this instrument\"\n + \" due to insufficient funds!\");\n }",
"public N... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will block until the user presses enter | private void waitForUser() {
log(" >>>>>>>>>> Press Enter to Continue <<<<<<<<<<");
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
reader.readLine();
} catch (Exception e) {
log("Error while waiting for user input: " + e.getMes... | [
"private static void WaitForEnter(Scanner scn ){\n scn.nextLine();\n System.out.println(\"\\n\\nPress Enter key to continue . . .\");\n scn.nextLine();\n }",
"private static void pressEnter(){\n Scanner input = new Scanner(System.in);\n System.out.println(\"Press enter to continue\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmWildcardTypeReference__ConstraintsAssignment_2_1_1" $ANTLR start "rule__JvmUpperBound__TypeReferenceAssignment_1" InternalCsv.g:4081:1: rule__JvmUpperBound__TypeReferenceAssignment_1 : ( ruleJvmTypeReference ) ; | public final void rule__JvmUpperBound__TypeReferenceAssignment_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCsv.g:4085:1: ( ( ruleJvmTypeReference ) )
// InternalCsv.g:4086:2: ( ruleJvmTypeReference )
{
/... | [
"public final void rule__JvmWildcardTypeReference__ConstraintsAssignment_2_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/interna... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'field497' field has been set | public boolean hasField497() {
return fieldSetFlags()[497];
} | [
"public boolean hasField498() {\n return fieldSetFlags()[498];\n }",
"public boolean hasField597() {\n return fieldSetFlags()[597];\n }",
"public boolean hasField141() {\n return fieldSetFlags()[141];\n }",
"public boolean hasField543() {\n return fieldSetFlags()[543];\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
2.1) see if there is already an existing trac ticket for it (via the custom field "Syndie Bug URI") 2.1.1) if there isn't, create one using the thread's root | private int getThreadTicketId(ReferenceNode threadRoot) {
if ( (threadRoot == null) || (threadRoot.getURI() == null) ) return -1;
String uri = threadRoot.getURI().toString();
PreparedStatement stmt = null;
ResultSet rs = null;
try {
stmt = _tracCon.prepareStatem... | [
"public Ticket issueTicket(String username, String url){\n String id = generateID(username,url);\n Ticket ticket = new Ticket(id, url, username);\n tickets.addElement(ticket);\n return ticket;\n }",
"private SessionTicket createUniqueSessionTicket() {\n String ticket = UU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ variable for allergy yes or no if allergy is yes> we will check if pet allergy if peanut allergy if polen allergy if no allergy you are lucky | public static void main(String[] args) {
boolean allergy=true;
boolean petAllergy=false;
boolean peanatAllergy=true;
boolean pollenAllergy=false;
if (allergy) {
System.out.println("Lets do further check");
if (petAllergy) {
System.out.println("Please no cats or dogs in the house");
... | [
"public String checkForAllergy(Meal meal){\n boolean allergy = false;\n String allergicFood = \"\";\n for (Cafe.AllFood x: this.Allergies){\n for (Cafe.MainDish x1: meal.mainDish){\n if (x.toString().equals(x1.toString())){\n allergy = true;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Throws UnsupportedOperationException: Call handle(request, channel instead) | @Override
public HttpResponse handle(HttpRequest request) {
throw new UnsupportedOperationException("Call handle(request, channel) instead");
} | [
"Object handle(Object request);",
"public void handleRequest(Request req) {\n\n }",
"@Override\r\n public void handleRequestMessage(RequestMessage msg) {\n }",
"public void handleMessage(ClientMessage message);",
"void service(final AgiRequest request, final AgiChannel channel) throws AgiException;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |