query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Play the workout over effect. | public void playWorkoutOver() {
playEffect(WORKOUT_OVER_INDEX);
} | [
"public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }",
"public void playWorkouts(){\n mFabPlay.setIcon(R.mipmap.ic_pause_white_24dp);\n mIsPlay = true;\n mCirclePageIndicator.setCurren... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
merge entities if one fully contains the other (except the larger one contains 'und' or 'oder') | public Map<ExtractionUnit, Map<InformationEntity, List<Pattern>>> mergeInformationEntities(
Map<ExtractionUnit, Map<InformationEntity, List<Pattern>>> extractions) {
for (ExtractionUnit ieunit : extractions.keySet()) {
Map<InformationEntity, List<Pattern>> merged = new HashMap<InformationEntity, List<Pattern>>(... | [
"private List<Company_mst_suggest> merge(final List<Company_mst_suggest> one, final List<Company_mst_suggest> two) {\n final Set<Company_mst_suggest> oneSet = new HashSet<>(one);\n for (Company_mst_suggest item : two) {\n if (!oneSet.contains(item)) {\n one.add(item);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build a QName from a combined name | public static QName buildQName(Element element, String combinedName)
{
if (combinedName == null)
return null;
int colonIndex = combinedName.indexOf(":");
if (colonIndex < 0)
return new QName(combinedName);
String prefix = combinedName.substring(0, colonIndex);
String... | [
"public static QName buildQName(String element) {\n\t\tQName qName = null;\n\t\ttry {\n\t\t\tqName = new QName(element);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn qName;\n\t}",
"public static QName createQName(Element element, String qualifiedName) {\n int index = qualifie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__IfStmt__Group_4__0" $ANTLR start "rule__IfStmt__Group_4__0__Impl" InternalGo.g:8032:1: rule__IfStmt__Group_4__0__Impl : ( 'else' ) ; | public final void rule__IfStmt__Group_4__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalGo.g:8036:1: ( ( 'else' ) )
// InternalGo.g:8037:1: ( 'else' )
{
// InternalGo.g:8037:1: ( 'else' )
... | [
"public final void rule__S_If__Group_4__0__Impl() throws RecognitionException {\n int rule__S_If__Group_4__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 377) ) { return ; }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /bandpruebas : get all the bandPruebas. | @GetMapping("/band-pruebas")
@Timed
public ResponseEntity<List<BandPrueba>> getAllBandPruebas(BandPruebaCriteria criteria) {
log.debug("REST request to get BandPruebas by criteria: {}", criteria);
List<BandPrueba> entityList = bandPruebaQueryService.findByCriteria(criteria);
return Respo... | [
"public List<Band> getAllBands();",
"@GetMapping(\"/band-pruebas/{id}\")\n @Timed\n public ResponseEntity<BandPrueba> getBandPrueba(@PathVariable Long id) {\n log.debug(\"REST request to get BandPrueba : {}\", id);\n BandPrueba bandPrueba = bandPruebaService.findOne(id);\n return Respon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Step 63 Insert in grp dim relation tables | private ArrayList insertGrpDimRel(String dimId, ArrayList queries, HashMap memIdMap, String grpId, String dbDimId) {
PbDb pbdb = new PbDb();
String getQryDimRelQuery = "select description, is_default, rel_name, rel_id from prg_qry_dim_rel where dim_id=" + dbDimId;
PbReturnObject retObj = null... | [
"private boolean insertDimensionGrp(String tabId, String dimtabId, String dimIds, String elementId, String dbDimId, String dbDimTabId) {\r\n boolean flag = false;\r\n String finalQuery = \"\";\r\n ArrayList queries = new ArrayList();\r\n Object[] Obj = null;\r\n HashMap dimTabMap ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleDeclareNode" $ANTLR start "ruleDeclareNode" InternalAst.g:462:1: ruleDeclareNode : ( ( rule__DeclareNode__Group__0 ) ) ; | public final void ruleDeclareNode() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAst.g:466:2: ( ( ( rule__DeclareNode__Group__0 ) ) )
// InternalAst.g:467:2: ( ( rule__DeclareNode__Group__0 ) )
{
// InternalA... | [
"public final void ruleDeclare() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:441:2: ( ( ( rule__Declare__Group__0 ) ) )\n // InternalAst.g:442:2: ( ( rule__Declare__Group__0 ) )\n {\n // Inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int32 threshold = 2; | int getThreshold(); | [
"int getTreshold();",
"public int getThreshold() {\n return threshold; \n }",
"@Test\n public void testGettingThreshold() {\n final ThresholdCircuitBreaker circuit = new ThresholdCircuitBreaker(threshold);\n assertEquals(\"Wrong value of threshold\", Long.valueOf(threshold), Long.valueOf(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .CEconItem_Action actions = 10; | SteammessagesEconSteamclient.CEconItem_Action getActions(int index); | [
"java.util.List<SteammessagesEconSteamclient.CEconItem_Action> \n getActionsList();",
"SteammessagesEconSteamclient.CEconItem_Action getMarketActions(int index);",
"SteammessagesEconSteamclient.CEconItem_Action getOwnerActions(int index);",
"public void setActions(java.lang.Integer actions) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Will prompt the user to enter a user token at this stage. This token will be used to authenticate all request to facebook. It WILL also accept invalid / stale tokens without throwing an exception; those will only be caught later. AuthorizationFailedException will only be thrown when the input is less than 1 character l... | public void reauthenticate() throws AuthorizationFailedException {
// Takes care of authentication. At the moment user needs to input a valid user
// token manually, due to issues with automatically obtaining such a token from
// within a desktop application.
String manualToken = JOptionPane.showInp... | [
"String getValidAccessToken();",
"RequestToken getOAuthRequestToken() throws MoefouException;",
"AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;",
"private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the webforms list. | @GetMapping("/listAll")
List<WebformMetabaseVO> getListWebforms(); | [
"@Override\n @HystrixCommand\n @GetMapping(\"/listAll\")\n @PreAuthorize(\"isAuthenticated()\")\n @ApiOperation(value = \"Gets a list with all the webforms\", hidden = true)\n public List<WebformMetabaseVO> getListWebforms() {\n return webformService.getListWebforms();\n }",
"ReferenceList getListForms( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Editar EncuestasDatosPartoBB existente en la base de datos | public boolean editarEncuestasDatosPartoBB(EncuestaDatosPartoBB encuestaDatosPartoBB) {
ContentValues cv = EncuestaDatosPartoBBHelper.crearEncuestaDatosPartoBBContentValues(encuestaDatosPartoBB);
return mDb.update(EncuestasDBConstants.ENCUESTA_PARTOBB_TABLE, cv, EncuestasDBConstants.participante + "="
... | [
"public static void desbloquearBienesInventario() throws Exception{\r\n String sSQL= \"UPDATE BIENES_INVENTARIO SET BLOQUEADO=?\";\r\n\r\n PreparedStatement ps= null;\r\n Connection conn= null;\r\n\t\ttry {\r\n conn= CPoolDatabase.getConnection();\r\n conn.setAutoCommit(fa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setPer_email method, of class Persona. | @Test
public void testSetPer_email() {
System.out.println("setPer_email");
String per_email = "";
Persona instance = null;
instance.setPer_email(per_email);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.... | [
"@Test\r\n public void testSetEmail() {\r\n\r\n }",
"@Test\n public void testGetPer_email() {\n System.out.println(\"getPer_email\");\n Persona instance = null;\n String expResult = \"\";\n String result = instance.getPer_email();\n assertEquals(expResult, result);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the ManagementInfo if this implementation is managed or null. | public ManagementInfo getManagementInfo() {
return managementInfo;
} | [
"public Map<String, Object> getManagementInformation() {\n return this.managementInfo;\n }",
"public AddressInfo getManagementInterface() {\r\n return managementInterface;\r\n }",
"public String getManagementClass() {\n return managementClass;\n }",
"public MBeanInfo getMBeanInfo() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Queries the stats model. | public void query(Map<String, String> queryElements) {
stats = statsModel.query(queryElements);
} | [
"public void queryStats()\r\r\n throws Exception\r\r\n {\r\r\n assertNotNull(this.beginTime,\r\r\n \"beginTime is null, it needs to be initialized.\");\r\r\n assertNotNull(this.endTime,\r\r\n \"endtime is null, it needs to be initialized.\");\r\r\n assertNotNull(this.refr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the "Next question" Button | public void clickedNextQuestion(View nextButton) {
mQuestionIndex = (mQuestionIndex+1) % mQuiz.size();
displayQuestion(mQuiz.getQuestions().get(mQuestionIndex));
} | [
"public void goOnToNextQuestion(){\n\t\tbtnConfirmOrNext.setText(\"Next Question\");\n\t\tenableAllButtons();// need to be able to click to proceed\n\t\tquizAccuracy.setText(\": \"+spellList.getLvlAccuracy()+\"%\");\n\t\t// if user got answer correct move on immediately, else let user look at the correct answer fir... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all rows from the certificado_digital table that match the criteria ''. | public CertificadoDigital[] findAll() throws CertificadoDigitalDaoException; | [
"public CertificadoDigital[] findWhereNoCertificadoEquals(String noCertificado) throws CertificadoDigitalDaoException;",
"public CertificadoDigital[] findWhereNombreKeyEquals(String nombreKey) throws CertificadoDigitalDaoException;",
"public CertificadoDigital[] findWhereIdCertificadoDigitalEquals(int idCertifi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A Generic interface of Data stored in a partitioned matter. | public interface PartitionedDataCollection<E> {
/**
* Returns true if the element is used in the crossword or false
* otherwise.
* @param elem An element from the partitioned collection.
* @return True if the element is used in the crossword or false
* otherwise.
*/
public boolean isUsed(E el... | [
"public interface DataPartitioner extends Serializable\n{\n /**\n * Method to partition the given Object into a List of BigInteger partition elements given its type identifier.\n * <p>\n * If the Object does not have/need a specific type identifier, use null.\n */\n List<Byte> toPartitions(Object object, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of PagosBean | public PagosBean() {
} | [
"public FinPagamentosListagemBean()\n {\n }",
"public PersonaBean() {\n domicilio = new Domicilio();\n telefono = new Telefono();\n correoElectronico = new CorreoElectronico();\n persona = new Persona();\n this.tipoOperacion = \"Alta\";\n\n }",
"public PruebaBean() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new stack frame large enough to hold a given number of local variables, for which no stack frame map is available. This is used in particular when evaluating match patterns of template rules. | public void openStackFrame(int numberOfVariables) {
stackFrame = new StackFrame(new SlotManager(numberOfVariables),
SequenceTool.makeSequenceArray(numberOfVariables));
} | [
"void resetMaxLocals();",
"@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }",
"int getNumberOfLocals();",
"public void setMaxLocals(int maxLocals);",
"public int maxLocals();",
"public void reset... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value(s) for constraint (ElementDefinition.constraint) Definition: Formal constraints such as cooccurrence and other constraints that can be computationally evaluated within the context of the instance | public ElementDefinitionDt setConstraint(java.util.List<Constraint> theValue) {
myConstraint = theValue;
return this;
} | [
"public void setConstraint(ConOp lc);",
"public void setConstraints(Object constraints)\n {\n this.constraints = constraints;\n }",
"public void setConstraint(int constraint) {\n mConstraint = constraint;\n }",
"void visitConstraintValue(ConstraintValue value);",
"private void applyCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove a message kind from the list of those ignored from now on. | public void dontIgnore (IMessage.Kind kind) {
if (null != kind) {
ignoring.remove(kind);
}
} | [
"public void ignore (IMessage.Kind kind) { \n \t\t\tif ((null != kind) && (!ignoring.contains(kind))) {\n \t\t\t\tignoring.add(kind);\n \t\t\t}\n \t\t}",
"public void removeClasses(ArrayList<String> ignore)\n {\n int i = 0;\n while(i < marks.size())\n {\n TimeMarker tm = marks.get(i);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a marker position to a value. | protected double markerPositionToValue(int v) {
int w;
if (HORIZONTAL == getOrientation()) {
w = getWidth();
} else {
w = getHeight();
}
double pos = v / ((double) w - getMarkerLength());
return (1.0 - pos) * getScaleStart() + pos * getScaleEnd();
} | [
"@Nullable\n public VT getMarkerValue() {\n if (!this.hasMarkerValue) throw new IllegalStateException(this.toString() + \" does not have a marker value\");\n return this.markerValue;\n }",
"protected int getMarkerPosition() {\n\t\treturn valueToMarkerPosition(getValue());\n\t}",
"@Override\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the max of the given array. | public static double max(double[] array) {
if (array.length==0) return Double.NEGATIVE_INFINITY;
double re = array[0];
for (int i=1; i<array.length; i++)
re = Math.max(re, array[i]);
return re;
} | [
"public static double max(double[] array){\n double max = array[0];\n for(double each: array) {\n max= Math.max(each, max);\n }\n return max;\n }",
"public static int max(int[] array){\n int max = array[0];\n for(int each: array) {\n max= Math.ma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if the range1 contains range2 | private boolean contains(int from1, int to1, int from2, int to2) {
return from2 >= from1 && to2 <= to1;
} | [
"private boolean intersects(int from1, int to1, int from2, int to2) {\n\t\treturn from1 <= from2 && to1 >= from2 // (.[..)..] or (.[...]..)\n\t\t\t\t|| from1 >= from2 && from1 <= to2; // [.(..]..) or [..(..)..\n\t}",
"boolean overlap(Interval otherInterval);",
"@Test\n public void isOverlap_interval1ContainW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To create the next bigger string than all strings with the same prefix, take the prefix and increment the value of the last character by one. | private static String incrementStringByOne(String prefix) {
StringBuilder end = new StringBuilder(prefix);
int lastPos = end.length() - 1;
// This is basically end[lastPos] += 1
end.setCharAt(lastPos, Chars.checkedCast(end.charAt(lastPos) + 1));
return end.toString();
} | [
"private int nextSuffix() {\r\n\t\t\tint unsignedByte = suffixes[index] & 0xFF;\r\n\r\n\t\t\tint suffix = unsignedByte + 1;\r\n\t\t\tsuffix += (256 * (offset));\r\n\r\n\t\t\tif (index < 255) {\r\n\t\t\t\tindex++;\r\n\t\t\t} else {\r\n\t\t\t\tindex = 0;\r\n\t\t\t\toffset++;\r\n\t\t\t}\r\n\t\t\treturn suffix;\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a EmptyMailboxThread object | public EmptyMailboxThread(Mailbox mailbox, List<User> users) {
this.mailbox = mailbox;
this.users = users;
} | [
"MessageQueue createInbox();",
"abstract protected Inbox createInbox(int _initialLocalQueueSize);",
"public Mailbox createMailbox(final Mailbox mailbox) throws Exception;",
"public void createThread() {\n }",
"public IThread createThread() throws IllegalWriteException, BBException;",
"public MessageRea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads all usage for the incidents. | public void readIncidentUsage() {
try {
incidentUsage = dalRead.readUsage();
} catch (SQLException ex) {
BLLError.getInstance().readUsageError();
}
} | [
"private void ReadInAccounts() {\n\t\tLog.d(\"SelectAccountActivity.ReadInAccounts\", \"checking for file\" + AccountMan.CheckForFile());\n\t\taccounts = AccountMan.GetAccounts();\n\t\t//Comment out this line and uncomment the line above after purging the excess accounts\n\t\t//accounts = AccountMan.PurgeDuplicateA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print out some help information. Here we print some stupid, cryptic message and a list of the command words. | private void printHelp() {
System.out.println("You are lost. You are alone. You wander");
System.out.println("around the island.");
System.out.println();
System.out.println("Your command words are:");
parser.showCommands();
} | [
"private void printHelp()\n {\n System.out.println(\"The disease is spreading...\");\n System.out.println(\"It countless lives have already been lost..\");\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"looking for a cure.\");\n System... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a batch download is stopping. This might give your editor a chance to emit something at the end of the batch download. For example, the ASM Hydrasynth requires that a header sysex command be sent before a stream of patch downloads. You can determine if a batch download is occurring during parse() by calling... | public void stoppingBatchDownload(Model firstPatch, Model finalPatch)
{
} | [
"public void stopDownloads() {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n if (DownloadWatchDog.this.stateMachine.isFinal() || DownloadWatchDog.this.stateMachine.isStartState()) {\r\n /* not downloading */\r\n return;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/// Awaiting Invoice On RCTI Link | public boolean verifyAwaitingInvoiceOnRCTI() {
boolean status = new VerificationHelper(driver).isDisplayed(AwaitingInvoice_Link_RCTI);
return status;
} | [
"public void clickAwaitingInvoiceOnRCTI() {\r\n\t\tAwaitingInvoice_Link_RCTI.click();\r\n\t}",
"public void clickPaidInvoicesOnRCTI() {\r\n\t\tPaidInvoices_Link_RCTI.click();\r\n\t}",
"public void clickAwaitingDeliveryPartnerConfirmationOnRCTI() {\r\n\t\tAwaitingDeliveryPartnerConfirmation_Link_RCTI.click();\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The scan has been cancelled by the user. | private void userCancelScan() {
new AlertDialog.Builder(this)
.setMessage("Scan Canceled by user")
.show();
closeScanner();
} | [
"public void cancel() {\n this.cancelled = true;\n }",
"public void cancel() {\n mCanceled = true;\n }",
"private void cameraErrorCancelScan(@Nullable final Throwable cause) {\n Log.e(Config.getLogTag(), \"Canceling scan due to camera error\", cause);\n new AlertDialog.Builder(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate a list of random person objects | public static List<Person> getPeople(int num)
{
List<Person> p = new LinkedList<Person>();
Random r = new Random();
for (int i = 0; i < num; i++)
{
p.add(new Person(StringGenerator.generateRandomString(-1)
, StringGenerator.generateRandomString(-1)
, r.nextInt(99) + 1));
}
return p;
} | [
"public static ArrayList<Person> genListOfPeople()\n {\n Integer counter = 0;\n\n ArrayList<Person> rList = new ArrayList<Person>();\n\n rList.add(genPerson(\"Jared\", \"Mallas\", 42));\n rList.add(genPerson(\"Laura\", \"Mallas\", 45));\n rList.add(genPerson(\"Romanie\", \"Mall... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reset groups of servers | public OperationFuture<List<Server>> reset(GroupFilter groupFilter) {
return serverService().reset(
getServerSearchCriteria(groupFilter)
);
} | [
"public OperationFuture<List<Server>> reset(Group... groups) {\n return serverService().reset(\n getServerSearchCriteria(groups)\n );\n }",
"public void resetServers() {\n EventHandlerService.INSTANCE.reset();\n UserRegistryService.INSTANCE.reset();\n }",
"public void reset() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles packets that includes item elements. Depending on the item's attributes the interpretation of the request may differ. For example, an item that only contains the "affiliation" attribute is requesting the list of participants or members. Whilst if the item contains the affiliation together with a jid means that ... | private void handleItemsElement(MUCRole senderRole, List<Element> itemsList, IQ reply)
throws ForbiddenException, ConflictException, NotAllowedException, CannotBeInvitedException {
String affiliation;
String roleAttribute;
boolean hasJID = itemsList.get(0).attributeValue("jid") != nu... | [
"abstract protected Object getSingleResponseObject(Item item, final HttpServletRequest request);",
"private Item parseItem (Node item) {\n Element el = (Element) item;\n String type = el.getAttributeNode(\"Type\").getValue(); // BUG: Throws NullPointerException\n \n // returns null early if the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
compares two lists of students and returns the common students (or set intersection) | public ArrayList<Student> intersection(Student[] class1,Student[] class2){
ArrayList<Student> list = new ArrayList<>();
//alter this method to conform to the expected test result in AdministrationTest in the case of an empty list
for (Student stud1: class1){
for (Student stu... | [
"public ArrayList<Student> intersection(Student[] class1,Student[] class2){\r\n ArrayList<Student> list = new ArrayList<>();\r\n //TODO: alter this method to conform to the expected test result in AdministrationTest in the case of an empty list\r\n \r\n if(class1 == null || class2 == nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds one or more guards to this operation. Equivalent to calling: builder.guards().append(value); | public Builder guards(RestGuard...value) {
guards().append(value);
return this;
} | [
"@SafeVarargs\n\t\tpublic final Builder guards(Class<? extends RestGuard>...value) {\n\t\t\tguards().append(value);\n\t\t\treturn this;\n\t\t}",
"public RestGuardList.Builder guards() {\n\t\t\tif (guards == null)\n\t\t\t\tguards = createGuards(beanStore(), resource());\n\t\t\treturn guards;\n\t\t}",
"public fin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Export field schemas legacy test. | @Test
public void exportFieldSchemasLegacyTest() throws EEAException, IOException {
dataSchemaControllerImpl.exportFieldSchemasLegacy(new ObjectId().toString(), 1L,
new ObjectId().toString());
Mockito.verify(dataschemaService, times(1)).exportFieldsSchema(Mockito.any(), Mockito.any(),
Mockito... | [
"@Test\n public void exportFieldSchemasFromDatasetLegacyTest() throws EEAException, IOException {\n dataSchemaControllerImpl.exportFieldSchemasFromDatasetLegacy(1L);\n Mockito.verify(dataschemaService, times(1)).exportZipFieldSchemas(Mockito.anyLong());\n }",
"@Test\n public void importFieldSchemasLegacy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draw the X tick. | private void drawXTick(Graphics graphics) {
// draw tick labels
final int imax = ticks.getMajorCount();
for (int i = 0; i < imax; i++) {
if (ticks.isVisible(i)) {
graphics.drawText(ticks.getLabel(i), ticks.getLabelPosition(i), 0);
}
}
} | [
"private void drawXAxis(final Graphics2D g2D) {\n\t\tCharts p = getParent();\n\t\tg2D.drawLine(0, p.getGraphHeight(),\n\t\t\t\tp.getGraphWidth(),\n\t\t\t\tp.getGraphHeight());\n\t\tg2D.drawString(getxAxisTitle(),\n\t\t\t\tp.getGraphWidth() / 2,\n\t\t\t\tp.getGraphHeight() + X_AXIS_TITLE_OFFSET); \n \t\t\n\t\tfor (i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
true if hw writes or affects the field value | public boolean hwChangesValue() {
return isHwWriteable() || hasHwWriteControl() || isInterrupt() || isCounter();
} | [
"public boolean swChangesValue() {\n\t\treturn isSwWriteable || isRclr() || isRset();\n\t}",
"public boolean isWrite() {\n\t\treturn (initProt & SegmentConstants.PROTECTION_W) != 0;\n\t}",
"boolean getFieldactualchange();",
"public boolean isSetField() {\r\n return this.field != null;\r\n }",
"boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the hotel offers based on the selected filtration using Expedia API | public Deals getHotelOffers(String destinationName, LocalDate startDate, LocalDate endDate, Integer days, Integer rating) {
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(URI.OFFERS);
MultiValueMap<String, String> parameters = getHotelOffersRequestParameters(destinationName, startDate, e... | [
"@Override\n public List<HotelMinimalResponseDTO> getHotelsByFilter(HotelFilterRequestDTO hotelFilterRequest) {\n List<Hotel> hotels = hotelRepository.findByLocationIgnoreCaseAndDeletedFalse(hotelFilterRequest.getCity());\n boolean filterByRooms = !ObjectUtils.isEmpty(hotelFilterRequest.getNumberOf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if p is an endpoint of this | public boolean hasEndpoint(Point p) {
return this.getP1().equals(p)||this.getP2().equals(p);
} | [
"public boolean hasEndpoint2() { return true; }",
"public boolean isP2p()\n {\n return isInactive() && getEndpointCount() == 2;\n }",
"public boolean isSetEndpointLocation() {\n return ((this.endpointLocation != null) && (!this.endpointLocation.isEmpty()));\n }",
"public boolean equalsProxied... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for grouping documents by doc block. This constructor can only be used when documents belonging in a group are indexed in one block. | public GroupingSearch(Query groupEndDocs) {
this(null, groupEndDocs);
} | [
"public VoltexGroup(Content c) {\r\n\t\tthis(c.getCurrent());\r\n\t}",
"public GroupingSearch(String groupField) {\n this(new TermGroupSelector(groupField), null);\n }",
"public VoltexGroup(final Content c) {\n\t\tthis(c.getCurrent());\n\t}",
"public final void rule__Document__Group__0() throws Recognitio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get tgtInfo from packet | public static String[] getTgtInfo(byte[] data) {
try {
return Serializer.deserialize(data).tgtInfo;
} catch (Exception e) {
e.printStackTrace();
}
return null;
} | [
"@Experimental\n @Returns(\"targetInfo\")\n TargetInfo getTargetInfo();",
"public static String[] getTgtInfo(DatagramPacket recPack) {\n\t\treturn Packet.getTgtInfo(recPack.getData());\n\t}",
"abstract void GetInfoPacket() ;",
"public byte[] getTargetInformation() {\n return targetInformation;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void setOnOrientationChange(boolean) saves orientation change status of Activity | public void setOnOrientationChange(boolean changed){
//orientation change flag
mOrientationChange = changed;
} | [
"public void onOrientationChanged(int orientation);",
"public void onDeviceOrientationChanged();",
"public boolean getOrientationChanged(){ return mOrientationChange; }",
"public void onLayoutOrientationChanged(boolean isLandscape);",
"public void setOrientationChanged(boolean orientationChanged) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List testList = new ArrayList(Arrays.asList("serifefires".split(""))); Set result = archive.getUniqueTricks(testList); boolean checking = result.stream() .collect(Collectors.groupingBy(Function.identity(), Collectors.counting())) .entrySet() .stream() .allMatch(e > e.getValue() == 1); Assertions.assertTrue(checking); | @Test
void getUniqueTricks() {
List<String> tricks = Arrays.asList("move", "dance", "move");
Set<String> unique = archive.getUniqueTricks(tricks);
Set<String> expected = new HashSet<>(Arrays.asList("move", "dance"));
Assertions.assertEquals(expected, unique);
} | [
"@Test\n public void testGetAllDuplicates() {\n DuplicateFinder instance = new DuplicateFindFromID3();\n System.out.println(\"getAllDuplicates\");\n \n Set<MediaItem> allMediaItems = TestHelper.getStandardSet();\n allMediaItems.add(TestHelper.billEvans1b());\n allMediaI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Posts a EmailFileAssessmentRequest with a new object | EmailFileAssessmentRequest put(final EmailFileAssessmentRequest newEmailFileAssessmentRequest) throws ClientException; | [
"EmailFileAssessmentRequest post(final EmailFileAssessmentRequest newEmailFileAssessmentRequest) throws ClientException;",
"void post(final EmailFileAssessmentRequest newEmailFileAssessmentRequest, final ICallback<? super EmailFileAssessmentRequest> callback);",
"EmailFileAssessmentRequest patch(final EmailFile... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of adicao method, of class Operacoes. | @Test
public void testAdicao() {
System.out.println("adicao");
int a = 0;
Operacoes instance = new Operacoes();
int expResult = 0;
int result = instance.adicao(a);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default c... | [
"@Test\n public void testExecutarAcao() {\n try {\n SBCore.configurar(new ConfiguradorCoreShortMessageService(), SBCore.ESTADO_APP.DESENVOLVIMENTO);\n ItfResposta resposta = FabIntegracaoSMS.ENVIAR_MENSAGEM.getAcao(\"+5531971125577\", \"Teste\").getResposta();\n Assert.not... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called repeatedly when this Command is scheduled to run / So, what is this mess? That's a good question. If one carefully reads the if statements, they should get a good idea of when each block will run, so I won't go into that. However, one will notice that the first and third blocks contain "calculatePowerHyperbolic"... | protected void execute() {
// TODO check the limit switches FIRST!!!
double encoderPos = Math.abs(Robot.liftSubsystem.readEncoderInInches());
if(encoderPos > requestedEncoderPos || Robot.liftSubsystem.isTopLimitDepressed() == true) {
weAreDoneSenor = true;
System.out.println("We're done");
... | [
"@Override\n protected void execute() \n {\n // I moved this all to the initialize command so they don't run a bunch of times - Marco 2/10 \n System.out.println(\"TIME: \" + java.lang.System.currentTimeMillis());\n RobotMap.hatchTalon.feed();\n if(isRaised)\n {\n System.out.println(\"1 - Hatch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Attribute List Deletion'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseAttributeListDeletion(AttributeListDeletion object) {
return null;
} | [
"public T caseAttributeCollectionDeletion(AttributeCollectionDeletion object) {\n\t\treturn null;\n\t}",
"public T caseAssociationListDeletion(AssociationListDeletion object) {\n\t\treturn null;\n\t}",
"public T caseCompositionListDeletion(CompositionListDeletion object) {\n\t\treturn null;\n\t}",
"public T c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Static method. Given an array of vectors, returns the centre of them all. For example, the 8 vertices of a cube will return the centre point of the cube. | public static Vector3d getCentre(Vector3d[] vectors)
{
Vector3d centre = new Vector3d();
for (int i = 0; i < vectors.length; i++)
{
centre = centre.add(vectors[i]);
}
centre = centre.divScalar(vectors.length);
return centre;
} | [
"public static VectorIntf getCenter(Collection vectors) {\r\n if (vectors==null || vectors.size()==0)\r\n throw new IllegalArgumentException(\"null argument or empty set\");\r\n Iterator it = vectors.iterator();\r\n VectorIntf res = null;\r\n int n = 0;\r\n double[] arr = null;\r\n while (it.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /controldetailsInfo/search : get qmsControlDetails. | @GetMapping("/control-details/search")
@Timed
public ResponseEntity<List<QmsControlDetails>> getControlDetails(HttpServletRequest request, Pageable pageable) {
log.debug("REST request to get a page of qmsControlDetails");
String itemCd = request.getParameter("itemCd");
String inspectionI... | [
"@RequestMapping(value = \"/_search/contactDetailss/{query}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<ContactDetails> searchContactDetailss(@PathVariable String query) {\n return StreamSupport\n .stream(contactDetails... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data repository for the Inventory entity. | @SuppressWarnings("unused")
@Repository
public interface InventoryRepository extends JpaRepository<Inventory, Long> {
} | [
"public interface InventoryRepository extends MongoRepository<Inventory, String> {\n\t\n\tpublic Inventory findBySku(String sku);\n}",
"public Inventory getInventoryById(Long inventoryId);",
"@Repository\npublic interface ItemRepository extends CrudRepository<Item, Integer> {\n\n\tItem findByItemName(String ite... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Epstein function. This function, describe in section 2.5.1 of the reference document, is used as a basis analytical function in NeQuick for the construction of the ionospheric layers. | private T epst(final T x, final T y,
final T z, final T w) {
final T ex = clipExp(w.subtract(y).divide(z));
final T opex = ex.add(1.0);
final T epst = x.multiply(ex).divide(opex.multiply(opex));
return epst;
} | [
"static double erf(double z) {\r\n double t = 1.0 / (1.0 + 0.5 * Math.abs(z));\r\n\r\n // use Horner's method\r\n double ans = 1 - t * Math.exp( -z*z - 1.26551223 +\r\n t * ( 1.00002368 +\r\n t * ( 0.37409196 +\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test getPre without left child lr: left rotate rr: right rotate LR: LeftRight LL: LeftLeft (A)LL 4 (B)balance 4 / \ / \ 3 5 rr 2 5 / => / \ > 2 1 3 / 1 | @Test
public void testGetPreWithoutLeftChild() {
AVLTree<Integer, Integer> avlTree = new AVLTree<>();
int[] elements = new int[]{4, 3, 5, 2, 1};
for (int element : elements) {
avlTree.put(element, element);
}
Assert.assertEquals("42135", avlTree.toPreOrderString(... | [
"@Test\n public void testGetPreWithLeftChild() {\n AVLTree<Integer, Integer> avlTree = new AVLTree<>();\n int[] elements = new int[]{8, 6, 9, 4, 5};\n for (int element : elements) {\n avlTree.put(element, element);\n }\n\n Assert.assertEquals(\"85469\", avlTree.toPre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For supported URLs that include a username and password, the username is either the first parameter after the first semicolon, or a parameter that starts with u= For example: | private static String usernameFromURL(String url) {
String str = url;
if( str.indexOf(';') == -1 ) {
return null;
}
String params = str.substring(str.indexOf(';')+1); // get everything after the first semicolon
String[] parts = params.split(";");
if( p... | [
"String getUsernameParam();",
"private static String passwordFromURL(String url) {\r\n String str = url;\r\n if( str.indexOf(';') == -1 ) {\r\n return null;\r\n }\r\n String params = str.substring(str.indexOf(';')+1); // get everything after the first semicolon \r\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the mutable parameter map of the current request. | public Map<String, List<String>> getMutableParameterMap() {
if (mutableParameterMap == null) {
mutableParameterMap = new HashMap<>();
for (String name : list(super.getParameterNames())) {
mutableParameterMap.put(name, new ArrayList<>(asList(super.getParameterValues(name))));
}
}
return mutab... | [
"public Map getParameterMap()\r\n {\r\n Map copyMap = new HashMap(this.parameters.size());\r\n copyMap.putAll(this.parameters);\r\n return copyMap;\r\n }",
"public Map<String, String[]> getParameterMap() {\n \t\treturn Collections.unmodifiableMap(parameters);\n \t}",
"public Map<Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The character that represents this occupation. | public abstract char getOccupationRepresentation(); | [
"public String getCharacter()\n\t\t{\n\t\t\treturn characterName;\n\t\t}",
"public char getDrawableCharacter() { return single_character_representation_; }",
"public AStarCharacter getMyCharacter()\r\n\t{\r\n\t\treturn theGridView.getMyCharacter();\r\n\t}",
"public int getCharacter() {\n return getStat(cha... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create InputStream with URL | private void createInputStream() {
InputStream is = null;
try {
is = url.openStream();
} catch (IOException e) {
Log.e(DownloadMain.LOGTAG, e.toString());
}
this.in = new BufferedInputStream(is);
} | [
"public InputStream getInputStream() throws IOException {\n return url.openStream();\n }",
"private InputStream getInputStream(URL url) {\n try {\n return url.openConnection().getInputStream();\n } catch (IOException e) {\n e.printStackTrace();\n return nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all predecessors of the node | public List<CFGNode> getPredecessors() {
return Collections.unmodifiableList(preds);
} | [
"public int[] getPredecessors(int node) {\n\t\treturn predecessors[node];\n\t}",
"Set<? extends IRBasicBlock> getPredecessors(IRBasicBlock block);",
"Collection getAllPossiblePredecessors(Object amessage);",
"public List<Integer> getPredecessors(int v);",
"Vertex getPredecessor();",
"public Collection<Flo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if is macth all skill tag. | public boolean isMacthAllSkillTag() {
return macthAllSkillTag;
} | [
"public void setMacthAllSkillTag(boolean macthAllSkillTag) {\n\t\tthis.macthAllSkillTag = macthAllSkillTag;\n\t}",
"public boolean isAllTags() {\n return isAllTags;\n }",
"public void setAllTags (boolean allTags) {\n\t\tthis.allTags = allTags;\n\t}",
"public boolean hasSkill() {\n \n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ get name without the url prefix | private String getRelativeName(String name) throws NamingException {
// We suppose that all names must be prefixed as this
if (!name.startsWith(URL_PREFIX)) {
throw new NameNotFoundException("Invalid name:" + name);
}
name = name.substring(URL_PREFIX.length());
return name;
} | [
"public String getName() {\n String path = _request.getPathInfo();\n int index = path.lastIndexOf(\".\");\n String name = path.substring(1, index); //don't include leading \"/\"\n return name;\n }",
"public static String extractNameFromURI(String uri){\t\t\n\t\tint i = uri.lastIndex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Boleto object When you initialize a Boleto, the entity will not be automatically sent to the Stark Bank API. The "create" function sends the objects to the Stark Bank API and returns the list of created objects. All parameters are passed in a HashMap object. Parameters: amount [integer]: Boleto value in cents. Minimum ... | public Boleto(Integer amount, String name, String taxId, String streetLine1, String streetLine2,
String district, String city, String stateCode, String zipCode, String due, Double fine,
Double interest, Integer overdueLimit, String[] tags, List<HashMap<String, Object>> descriptions,
... | [
"public Boleto(HashMap<String, Object> data) {\n super(null);\n this.amount = (Integer) data.get(\"amount\");\n this.name = (String) data.get(\"name\");\n this.taxId = (String) data.get(\"taxId\");\n this.streetLine1 = (String) data.get(\"streetLine1\");\n this.streetLine2 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve un valor tipo Bool indicando si hay o no conectividad del dispositivo con alguna red de internet. | private boolean Conectividad(){
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) {
return true;
... | [
"public boolean tieneConexionInternet() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n if (networkInfo != null && networkInfo.isConnected()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates movies files showing each mode of shape variation by adjusting the each mode of variation to +/ 'range' times in 2'step'+1 steps. | public boolean ShapeMovie(String filename, final int nbModes,
final double range, final int steps, final boolean whiteBackground) {
boolean success = true;
double min, max, pVal;
int nbAllModes = m_pModel.ShapePCA().NParameters();
CDVector b_s = new CDVector(nbAllModes);
CDVector c = new CDVector()... | [
"public boolean CombinedMovie(final String filename, final int nbModes,\r\n\t\t\tfinal double range, final int steps, final boolean whiteBackground) {\r\n\r\n\t\tboolean success = true;\r\n\t\tdouble min, max, pVal;\r\n\t\tint nbAllModes = m_pModel.CombinedPCA().NParameters();\r\n\t\tCDVector c = new CDVector(nbAll... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests getTextFromHeading() with a matching example. | @Test
public void getTextFromHeadingMatching() {
browseTo("/getTextFromHeading-1.html", "getTextFromHeading - 1");
assertEquals("Should find matching text",
"Span 1Span 2Span 3", driverWrapper.getTextFromHeading("Heading Text"));
} | [
"@Test\n public void getTextFromHeadingNotMatching() {\n browseTo(\"/getTextFromHeading-1.html\", \"getTextFromHeading - 1\");\n assertEquals(\"Should not find matching text\", \"\",\n driverWrapper.getTextFromHeading(\"Other Text\"));\n }",
"@Test\n public void getRelativeTe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int64 requester_id = 7; | @java.lang.Override
public long getRequesterId() {
return requesterId_;
} | [
"@java.lang.Override\n public long getRequesterId() {\n return requesterId_;\n }",
"int getReqId();",
"java.lang.String getReqId();",
"public int set_request_id(){\n int birth_id=id;\n id++;\n return birth_id;\n }",
"public String getRequestorId() {\n String requestor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the job description | public void setJobDesc(String jobDesc)
{
this.jobDesc = Toolbox.trim(jobDesc, 4);
} | [
"public void setJobDescription(String jobDescription) {\r\n this.jobDescription = jobDescription;\r\n }",
"public void setSrcJobDescription(String value) {\r\n setAttributeInternal(SRCJOBDESCRIPTION, value);\r\n }",
"public void setDescription(String desc){\n\n description = desc;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Give each player 2 coins | @Test
void a_new_game_starts_with_two_coins_per_player() {
// when
gameEngine.startGame();
// then
Assertions.assertEquals(2, gameEngine.player(1).wallet().coins());
Assertions.assertEquals(2, gameEngine.player(2).wallet().coins());
} | [
"public void betCoin(){\n if (credits > 0){\n betCredits++;\n nettedCredits++;\n credits--;\n }\n }",
"public int generateCoins() {\n\t\n Entity e = new Coin();\n\t\n int c = rand.nextInt(6) + 1;\n int r = rand.nextInt(c) + 1;\n\n int w... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the itemId list. | public void setItemIdList(List<String> itemIdList) {
this.itemIdList = itemIdList;
} | [
"public void setItemIDs() {\n int idCounter = 0;\n ArrayList<Item> items = getAvailableItems();\n for (int i=0; i<items.size(); i++) {\n items.get(i).setID(idCounter);\n idCounter++;\n }\n }",
"public void doSetItemId(int itemId) {\n this.itemId = itemId;\n }",
"public void setItemId(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that the display string includes the position of the object. | @Test
public void test_MovementObjectSimple_DisplayStringIncludesCoordinates() {
final Movement movement = new MovementObjectSimple();
final String actual = movement.createDisplayString();
final String expected = "A simple object to demonstrate movement [2, 4]";
assertEquals("Tests that the display string i... | [
"String getPositionStr();",
"public void testToString()\r\n {\r\n Rectangle rect1 = new Rectangle(\"Hello World!\", 0, 0, 10, 10);\r\n assertFuzzyEquals(\"0, 0, 10, 10\", rect1.toString());\r\n }",
"java.lang.String getPositionStr();",
"public void testPosition() {\n System.out.prin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Among the arguments find the furthest beginningPosition if any of the argument is not in simple name form or any of it's assignment cannot be found between the range it's supposed to be in, then an exception will be raised | private void setStartPositionByTheFurthestArgument(MethodInvocation methodInvocation) throws CloseMethodArgumentNotAllInSimpleNameFormException{
detectionStartPoint = methodInvocation.getStartPosition();
List<Expression> arguments = methodInvocation.arguments();
for (Expression eachArgument : arguments) {
if ... | [
"@Test\n\tpublic void minPosMinStringTest() {\n List<String> listString = Arrays.asList(\"apple\",\"mariachi\",\"zebra\");\n int result = minPos(listString);\n assertTrue(result == 0);\n\t}",
"@Override\n public void onRangeStart(String s, int i, int i1) {\n }",
"Posit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor of a two stage flight, inputs are the origin and the final destination | public TwoStageFlights (String origin, String destination) {
this.origin = origin;
this.destination = destination;
} | [
"public Flight (String origin, String dest, int depHour, int depMinute, int durTimeMinutes, int noOfPass, int price)\n {\n _origin = origin;\n _destination = dest;\n _departure = new Time1 (depHour, depMinute);\n setFlightDuration(durTimeMinutes);\n\n if(noOfPass >= MAX_CAPACIT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column CTSTELLER.SIGNED_ON_STATUS | public String getSIGNED_ON_STATUS() {
return SIGNED_ON_STATUS;
} | [
"public void setSIGNED_ON_STATUS(String SIGNED_ON_STATUS) {\r\n this.SIGNED_ON_STATUS = SIGNED_ON_STATUS == null ? null : SIGNED_ON_STATUS.trim();\r\n }",
"public java.sql.Timestamp getStatusdate()\n {\n return statusdate; \n }",
"public java.sql.Timestamp getStatusDate() {\n return st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter of running time in days for interface implementation. | @Override
public Long getRunningTimeInDays() {
return null;
} | [
"@DISPID(52)\r\n\t// = 0x34. The runtime will prefer the VTID if present\r\n\t@VTID(50)\r\n\tint actualCPUTime_Days();",
"public long elapsedDays(){\n if(isRunning){\n return ((System.currentTimeMillis() - t0) / 86400000L);\n }else{\n return ((t1 - t0) / 86400000L);\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ private String description; private double probability; private double consequence; | public Risk(){
description="";
probability=0;
consequence=0;
} | [
"String getProb();",
"public String toString(){\n\t\treturn \"Bernouli distribution [probability = \" + getProbability() + \"]\";\n\t}",
"private void getExplanation()\n {\n \n }",
"public double getProbability() {\n return probability;\n }",
"double getTransProb();",
"public double ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Approach 2: TwoPass Hash Table Time Complexity: O(n) Space Complexity: O(n) Description: Loop through the list and store each value as a key and its index in the list as the value in an empty HashMap Calculate the complement of the target when reaching a key x in the map, complement = target x Loop through the list aga... | private static int[] twoSumMap(int[] nums, int target){
Map<Integer, Integer> map = new HashMap<>(); //the size of the map expanded as
//the input take place
for (int i = 0; i < nums.length; i++){
map.put(nums[i], i);
}
fo... | [
"public static int[] twoSumHash(int [] nums ,int target){\r\n\t\tHashMap<Integer, Integer> map = new HashMap<Integer,Integer>();\r\n\t\tint[] res = new int[2];\r\n\t\tfor(int i = 0 ; i < nums.length ; i++){\r\n\t\t\tint compliment = target - nums[i];\r\n\t\t\tif(map.containsKey(compliment)) {res[0] = map.get(compli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves all of the reCaseReportRegs | public List getReCaseReportRegs(ReCaseReportReg reCaseReportReg); | [
"public ReCaseReportReg getReCaseReportReg(final String id);",
"public List<Register> getRegisters();",
"@GetMapping(\"/reset-registries\")\n @Timed\n public List<ResetRegistry> getAllResetRegistries() {\n log.debug(\"REST request to get all ResetRegistries\");\n return resetRegistryReposito... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tries to determine the names of the content package(s) (images) on this Talking Book. Looks first in the deployment.properties file. If that is not found, checks in tbstats structure for image name. If not found, will then look in the TalkingBook's system directory for a file with a ".pkg" extension. If there is exactl... | private List<String> getPackageNames() {
if (packageNames.size() == 0) {
String packageNameProperty = getProperty(PACKAGE_PROPERTY);
String src = "properties";
// Get the package(s) from the properties, if we can.
if (!packageNameProperty.equalsIgnoreCase(TBLoade... | [
"java.lang.String getPackaging();",
"java.lang.String getPackageImageURL();",
"public String getPackaging();",
"String getPackager();",
"private static String getLoadedPackageNames(Context appContext) {\n try {\n Method getAssignedPackageIdentifiers =\n AssetManager.clas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if that command is on the restricted commands list | public boolean commandIsRestricted(CPlayer player, String command) {
// !!!! NOTE: this MUST NOT check for permissions!!!
// Check that in the implementation!
// This is to avoid stack overflows!
// if(player.hasPermission("cuboids.super.admin")) {
// return false;
// }
... | [
"public String[] getRestrictedCommands();",
"public boolean areCommandsAllowed()\n {\n return allowCommands;\n }",
"public boolean hasPermission(String commandName) {\n HashSet<String> acceptableCommands = new HashSet<>();\n\n acceptableCommands.add(\"arrive\");\n acceptableCom... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
handler which remove note from routes | public void removeNoteHandler1(ActionEvent actionEvent) {
try {
int routeIndex = Integer.valueOf(routeIndexTextField.getText()); //if meet problem then exception is worked
int noteIndex = Integer.valueOf(noteIndexTextField1.getText()); //if meet problem then exception is worked
... | [
"void removeNote(T note);",
"public void setRouteClear();",
"public void removeNote(Note note){\n this.notes.remove(note);\n this.listView.getItems().remove(note);\n try{\n TagBrowserLayout.createTagTree();\n }catch(Exception e){}\n }",
"public int deleteRoute(RouteEn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column public.ControlledLists.text_c | public String getTextC() {
return textC;
} | [
"public String getValue_Text() \n {\n return text;\n }",
"java.sql.Clob getAClobDataSourceValue();",
"String getTextColumn();",
"String getClobField();",
"public String getTextList() {\n\t\treturn jertfTextList.getText();\n\t}",
"public String getValue_CleanText() \n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates all Preference objects that the program will use. Feels somewhat hacked together at the moment. Can be run more than once without repercussion. | public static synchronized void init() {
for (Preference.TYPES pTypes : Preference.TYPES.values()) {
getPreferenceObject(pTypes);
}
getPreferenceObject(Preference.TYPES.LAST_NOTIFICATION_ID).setForceSave();
getPreferenceObject(Preference.TYPES.SAVE_PREFS).setForceSave();
} | [
"public void initiateTemplatePrefs(){\n defaultPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext());\n if(tempPref.isChecked()) {\n getPreferenceScreen().addPreference(tempRange);\n }if(precipPref.isChecked()) {\n getPreferenceScreen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ bool Resize (const int pSize) | public static native boolean Resize(long lpjFbxArrayVector2, int pSize); | [
"abstract void resize(int size);",
"public boolean resizeBy(Point delta)\n {\n return false;\n }",
"private void resize(int newSize) {\r\n Item[] a = (Item[]) new Object[newSize];\r\n System.arraycopy(arr, 0, a, 0, size);\r\n arr = a;\r\n }",
"public boolean isResized() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a policy on how to deal with stale references. | public void setStaleReferencePolicy(CDOStaleReferencePolicy policy); | [
"@Override\n public void setStalePolicy(final CacheStalePolicy<K, V> stalePolicy) {\n this.stalePolicy = stalePolicy;\n }",
"public void setPolicy(PO newPolicy);",
"public void cacheSetConflictPolicy(int policy);",
"public void setPolicy(Policy policy) {\n this.policy = policy;\n \n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstInitialize__Group_6__1" $ANTLR start "rule__AstInitialize__Group_6__1__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:13907:1: rule__AstInitialize__Group_6__1__Impl : ( ( rule__AstInitialize__GuardsAssignment_6_1 ) ) ; | public final void rule__AstInitialize__Group_6__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:13911:1: ( ( ( rule__AstInitialize__Guar... | [
"public final void rule__AstInitialize__Group_6_2__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:14004:1: ( ( ( rule__AstIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new guava event bus service. | public GuavaEventBusService(final boolean asyncExecution) {
if (asyncExecution) {
// The event bus should handle async event processing.
threadPoolTaskExecutor = Executors.newCachedThreadPool();
eventBus = new AsyncEventBus(threadPoolTaskExecutor);
} else {
... | [
"EventBus init(EventBusOptions eventBusOptions);",
"public EventBus build() {\n return new EventBus(this);\n }",
"private static com.google.common.eventbus.EventBus getEventBus() {\n final Injector injector = Guice.createInjector(getModule()); //TODO\n\n if (eventBus == null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks to see if the game is over by seeing if the kill ring has another person | public boolean gameOver() {
return (killRing.next == null);
} | [
"public boolean isGameOver() {\n return frtKill.next == null;\n }",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"private void checkIfGameOver() {\n\t\tboolean gameWon = true, gameLost = true;\n\t\t// Check if any firetrucks are still alive\n\t\tfor (Firetruck firetruck : this.firetruck... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'OriginID' field. Identify the originating senderID of a transaction across multiple changes in entities and commands. If a change in an entity is done as a consequence of a change in another entity partition or a command the senderID is copyed from that record. Otherwise same value as in senderID... | public java.lang.CharSequence getOriginID() {
return OriginID;
} | [
"public java.lang.CharSequence getOriginID() {\n return OriginID;\n }",
"public String getOriginatorId() {\n return originatorId;\n }",
"public String getOriginatorID() {\n return this.originatorID;\n }",
"public String getOrigin() {\n if (originId == null) {\n Utilit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the XttObj object | public XttObj(GdhrGetXttObj obj, Gdh gdh, JopEngine en)
{
this.name = obj.name;
this.fullName = obj.fullName;
this.description = obj.description;
this.className = obj.className;
this.objId = obj.cdhrObjId;
this.classId = obj.cdhrClassId;
this.sts = obj.sts;
this.hasChildren = obj.hasCh... | [
"public XttObj(String dummystring)\n {\n this.name = dummystring;\n }",
"public XMLObject() {\n }",
"public ObjectX () {\n\n\t}",
"public TranxInfo() {\n }",
"public XTYHQXUtil() {\n\t}",
"public CCXMLIO(){\n\t}",
"public CNodeObject(){\n super();\n }",
"public TcTercero() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void setPhysicalHierarchyContainerType(int) Sets the value of field 'userAccountType'. | public void setUserAccountType(int userAccountType)
{
this._userAccountType = userAccountType;
this._has_userAccountType = true;
} | [
"public void setUserType(Integer userType) {\n this.userType = userType;\n }",
"public void setPhysicalHierarchyContainerType(int physicalHierarchyContainerType)\r\n {\r\n this._physicalHierarchyContainerType = physicalHierarchyContainerType;\r\n this._has_physicalHierarchyContainerType... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new GetterSetterInliner. | public GetterSetterInliner(CodeAttrInfoEditor codeAttrInfoEditor,
boolean allowAccessModification)
{
this.codeAttrInfoEditor = codeAttrInfoEditor;
this.allowAccessModification = allowAccessModification;
} | [
"public Method getSetter(Method getter);",
"public static Setter Setter() {\n return new Setter();\n }",
"public JMethod getSetter();",
"public String getSetter() {\n return \"set\" + getCapName();\n }",
"public Value makeGetter() {\n Value r = new Value(this);\n r.getters = obje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executed on invoke of the requested proxy. Used to gather a list of wrapped WebElements. | @Override
public Object invoke(Object o, Method method, Object[] paras) throws Throwable {
List<Object> wrappedElements = new ArrayList<Object>();
Constructor<?> cons = implementtingType.getConstructor(WebDriver.class, WebElement.class);
List<WebElement> elements = null;
int timeout;... | [
"@SuppressWarnings(\"unchecked\")\n\tprotected List<WebElement> proxyForListLocator(ClassLoader loader,\n\t\t\tElementLocator locator) {\n\t\tInvocationHandler handler = new LocatingElementListHandler(locator);\n\n\t\tList proxy = (List) Proxy.newProxyInstance(loader,\n\t\t\t\tnew Class[] {List.class }, handler);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensure that the duration that this action will run is not longer than durationMillis. In addition to adjusting the duration itself, this ensures that the repeat count also will not make it run longer than the given time. | public Action restrictDuration(long durationMillis) {
// If we start after the duration, then we just won't run.
if (mStartOffset > durationMillis) {
mStartOffset = durationMillis;
mDuration = 0;
mRepeatCount = 0;
return this;
}
lo... | [
"public void SetDuration(int duration)\n {\n TimerMax = duration;\n if (Timer > TimerMax)\n {\n Timer = TimerMax;\n }\n }",
"private boolean durationValidation(int duration){\n return duration < 300 && duration >10;\n }",
"Long getCleanUpDelayTime();",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of public samples where the submitter ID IS equal the specified submitter ID. | List<Sample> retrieveSamplesBySubmitter(String submissionAccountId); | [
"List<Sample> retrievePublicSamplesWithoutSubId(long submitterId);",
"List<Sample> retrieveAllPublicSamples();",
"List<Sample> retrieveOrderedPublicSamplesWithoutSubId(long submitterId, String propertyName, boolean isDescendingOrder);",
"public ch.ivyteam.ivy.scripting.objects.List<java.lang.String> getSubmit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Slowly increases oldTriggerL to newTriggerVal | double accelerateL(double newTriggerVal) {
oldTriggerL = 0.09516 * newTriggerVal + 0.9048 * oldTriggerL;
return oldTriggerL;
} | [
"double accelerateR(double newTriggerVal) {\n oldTriggerR = 0.09516 * newTriggerVal + 0.9048 * oldTriggerR;\n return oldTriggerR;\n }",
"short ps2000_set_trigger(short handle, short source, short threshold, short direction, short delay, short auto_trigger_ms);",
"public void setLowTrigger(doubl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks to see if player has enough cargo space to buy the good | public boolean enoughSpaceToBuy(Player p, int numGoods) {
// check size of cargoArr
return numGoods <= p.getShip().numOpenSlots();
} | [
"public boolean spaceAvailable(Cargo cargo) {\n final List<Cargo> ts = tCopy();\n final int newSpace = cargo.getTransportable().getSpaceTaken();\n\n for (int i = ts.size()-1; i >= 0; i--) {\n if (ts.get(i).getSpaceLeft() < newSpace) return false;\n }\n return true;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column USER_PROFILE_VIEW.HIDE_NNID_FLAG | public void setHideNnidFlag(Boolean hideNnidFlag) {
this.hideNnidFlag = hideNnidFlag;
} | [
"public void setHidePsnFlag(Boolean hidePsnFlag) {\n\t\tthis.hidePsnFlag = hidePsnFlag;\n\t}",
"public Boolean getHideNnidFlag() {\n\t\treturn hideNnidFlag;\n\t}",
"public void getGroupHideColumn() {\r\n\t\tString showHide = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(Wsr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Base constructor allows the specification of the insertBefore predicate, although leaves the subspliters empty. Subclasses would call insert repeatedly to populate their instances. | protected Blenderator(
final BiPredicate<Subspliter<T>, Subspliter<T>> insertBefore)
{
this.subspliters = Link.<Subspliter<T>> managedChain();
this.insertBefore = insertBefore;
} | [
"protected void insert(Spliterator<T> spliterator) {\r\n\r\n final Iterator<T> cracked = Spliterators.iterator(spliterator);\r\n if (cracked.hasNext()) {\r\n // not exhausted\r\n final T item = cracked.next();\r\n final Subspliter<T> subspliter = new Subspliter<T>(item... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the tarifarioOutroRef value for this AlterarStatusTarifarioRequest. | public void setTarifarioOutroRef(br.com.lemontech.selfbooking.wsselfbooking.beans.fornecedor.TarifarioFornecedorOutroRef tarifarioOutroRef) {
this.tarifarioOutroRef = tarifarioOutroRef;
} | [
"public void setTarifarioCarroRef(br.com.lemontech.selfbooking.wsselfbooking.beans.fornecedor.TarifarioFornecedorCarroRef tarifarioCarroRef) {\n this.tarifarioCarroRef = tarifarioCarroRef;\n }",
"public br.com.lemontech.selfbooking.wsselfbooking.beans.fornecedor.TarifarioFornecedorOutroRef getTarifarioO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |