query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Removes a render listener. | public void removeRenderListener(RenderListener listener); | [
"@Override\n public void removeListener() {\n this.listener = null;\n }",
"@Override\n public void removeListener() {\n this.mListener = null;\n }",
"public void removeListener();",
"public synchronized void removeListener( PropsViewPanel.Listener listener )\r\n\t{ listeners.remove( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This plays a selected song from our PlaylistSongs table. The play button also changes, depending on whether the song is playing or not. | @FXML
private void playSelectedSong() throws UnsupportedAudioFileException, IOException
{
if (song == null)
{
song = ViewSongsOnPlaylist.getSelectionModel().getSelectedItem();
song1 = tblViewLibrary.getSelectionModel().getSelectedItem();
setMusicPlaye... | [
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n playe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends the specified Set to the end of this List (or adds the value to this Set it depends on the type of this node). Sample code: Tree node = new Tree(); Tree array = node.putList("path.to.array"); Tree map1 = array.addSet().add(1).add(2); Tree map2 = array.addSet().add("a").add("b"); | public Tree addSet() {
return addObjectInternal(new LinkedHashSet<Object>());
} | [
"public void addAll(Set<E> target);",
"void addAllTo(NumberSet x);",
"void addAll(NumberSet x);",
"public void store(final Collection<HPListGraph<NodeType, EdgeType>> set) {\n\t\tset.add(getHPlistGraph());\n\t}",
"public void addAll(NodeSet nodeSet)\r\n\t{\r\n\t\tfor(int i=0;i<nodeSet.size();i++)\r\n\t\t{\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the specified certificate. | public yandex.cloud.api.operation.OperationOuterClass.Operation update(yandex.cloud.api.organizationmanager.v1.saml.CertificateServiceOuterClass.UpdateCertificateRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateMethod(), getCallOptions(), request);
} | [
"public void update(yandex.cloud.api.organizationmanager.v1.saml.CertificateServiceOuterClass.UpdateCertificateRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleFullJvmFormalParameter" $ANTLR start "ruleFullJvmFormalParameter" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:1394:1: ruleFullJvmFormalParameter : ( ( rule__FullJvmFormalParameter__Group__0 ) ) ; | public final void ruleFullJvmFormalParameter() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:1398:2: ( ( ( rule__FullJvmFormalParameter__Group__0 ) ) )
... | [
"public final void ruleFullJvmFormalParameter() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1508:2: ( ( ( rule__FullJvmFor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lookups (or initialises) the metadata for the entity with the parsed id | private Representation lookupMetadata(Yard entityhubYard, String entityId, boolean init) throws YardException {
Representation metadata;
//TODO: check the asumption that the Metadata always use the
// extension ".meta"
String metaID = entityId+".meta";
metadata = entityhubYa... | [
"public abstract Map<String, String> getItemMetadata(String identifier);",
"public static Object parseEntityId(String entityName, String entityId) {\n if (!StringUtils.isEmpty(entityId) && !StringUtils.isEmpty(entityId)) {\n Metadata metadata = AppBeans.get(Metadata.NAME);\n MetaClass... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will be used to select channel by selecting type and name of channel | public void selectTestChannel(String channelType, String channelName) {
selectHelper.selectUsingVisibleText(channelTypeField1, channelType);
log.info("User is waiting for visiblity of channel type field....");
waitHelper.waitForElementClickable(filterBtn, 120);
filterBtn.click();
... | [
"int getSelectedChannel();",
"String getChannelType();",
"public Channel getChannel(String name) {\n for (Channel c : channels) {\n if (c.getName().equals(name)) {\n return c;\n }\n }\n return null;\n }",
"public abstract String channelType()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the amount of time to yield for other processes, this is an implicit method that automatically generates values for lower priority connections | protected int getYield() {
if (priority > PRIORITY_NORMAL) {
return -1;
}
if (priority == PRIORITY_NORMAL) {
return 20;
}
return 40;
} | [
"protected int getYield()\n\t{\n\t\tif (priority > PRIORITY_NORMAL)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\tif (priority == PRIORITY_NORMAL)\n\t\t{\n\t\t\treturn 20;\n\t\t}\n\t\treturn 40;\n\t}",
"protected long getSleepTime() {\r\n \treturn (long) this.randomizer.nextInt(MAX_VALUE_IN_MILISECS);\r\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the default start time, specified using the Java Date type. Note that this assumes that the value returned from the getTime method starts at zero... i.e. the date part of the date/time value has not been set. | public void setDefaultStartTime(Date defaultStartTime)
{
m_defaultStartTime = defaultStartTime;
} | [
"public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }",
"public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }",
"public Date getDefaultStartTime()\r\n {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do not modify addRestResourceClasses() method. It is automatically populated with all resources defined in the project. If required, comment out calling this method in getClasses(). | private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(albo.comics.library.ws.ServicesResource.class);
} | [
"private void addRestResourceClasses(Set<Class<?>> resources) {\n resources.add(service.SpriteFacadeREST.class);\n }",
"private void addRestResourceClasses(Set<Class<?>> resources) {\n resources.add(com.capgemini.contacts.services.ContactService.class);\n }",
"private void addRestResourceCla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
c.operatorJoystick.getBackPyramidButton().whenPressed(new SetIntakePositionCommand(105)); c.operatorJoystick.getFrontPyramidButton().whenPressed(new SetIntakePositionCommand(80)); c.operatorJoystick.getCloseButton().whenPressed(new SetIntakePositionCommand(45)); c.operatorJoystick.getShootButton().whenPressed(new SetIn... | public static void setupOperationMap(ControlBoard c) {
c.operatorJoystick.intakeUpSwitch.whenPressed(
new IntakeRaiseCommand(IntakeRaiseCommand.INTAKE_UP));
c.operatorJoystick.intakeUpSwitch.whenReleased(
new IntakeRaiseCommand(IntakeRaiseCommand.INTAKE_OFF));
c.operatorJoystick.intak... | [
"private OI() {\n\t\t\n\t\tJoystickButton intakeIn = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_INTAKE);\n\t\tJoystickButton intakeOut = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_REVERSE_INTAKE);\n\t\tJoystickButton pivotOut = new JoystickButton(//gunner,\t\t\t\tThese create officially ea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to add a value in the tree. If value to added 1. Is equal to current node's value, it means a node already exists. In this case, do not create duplicate node. 2. Is less than current node's value, go to its left subtree. While traversing left, if there exists a node whose left node is null it means it is a leaf ... | private boolean add(int value) {
if (value == this.value) {
return false;
} else if (value < this.value) {
if (this.left == null) {
left = new BNode(value);
return true;
} else {
return th... | [
"public boolean insert(T key, E value) {\r\n\t\t// Creating a Node\r\n\t\tRBNode<T, E> insertedNode = createRBNode(key, value);\r\n\t\t// First Node will be the Root\r\n\t\tif (checkSize(this.size)) {\r\n\t\t\tthis.root = insertedNode;\r\n\t\t\tinsertedNode.leftChild = nillLeaf;\r\n\t\t\tinsertedNode.rightChild = n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Original PL/SQL code for Prog Unit AUDIT_TRAIL_3_0_B2K PROCEDURE AUDIT_TRAIL_3_0_B2K IS AUDIT TRAIL: 3.0 INIT DATE 1. Enhancements for Banner2000 upgrade. These include SQ 01/01/97 adding an object group which contains the objects for the toolbar, adding an object group which highlights the active record within a blo... | public void auditTrail30B2k()
{
} | [
"public void auditTrail40B2k()\n\t\t{\n\t\t}",
"public static String _btnbooked_click() throws Exception{\nanywheresoftware.b4a.keywords.Common.StartActivity(processBA,(Object)(mostCurrent._booking.getObject()));\n //BA.debugLineNum = 128;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"public void auditTrail84()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End call on particular subId or go to the Home screen | boolean endCallForSubscriber(int subId); | [
"void answerRingingCallForSubscriber(int subId);",
"public void onUaCallClosed(UserAgent ua)\n { if (ua.ua_profile.call_to!=null) exit();\n else readyToReceive(); \n }",
"public void callEnded(CallEvent event)\n {\n Call sourceCall = event.getSourceCall();\n \n // S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Allergy Intolerance'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseAllergyIntolerance(AllergyIntolerance object) {
return null;
} | [
"public T caseAllergyIntoleranceType(AllergyIntoleranceType object) {\n\t\treturn null;\n\t}",
"public T caseAllergyIntoleranceStatus(AllergyIntoleranceStatus object) {\n\t\treturn null;\n\t}",
"public T caseAllergyIntoleranceSeverity(AllergyIntoleranceSeverity object) {\n\t\treturn null;\n\t}",
"public T cas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the WorldModel using the class loader set to the simulation data path. | public Class<? extends BaseWorldModel> getWorldModelClass() {
if(map != null && !map.isEmpty() ){
return map.get("WorldModel");
}else {
try {
return Class.forName(simulationConfig
.getString("models.worldmodel"), true, classLoader).asSubclass(BaseWorldModel.class);
} catch (Exception e) {
thr... | [
"WorldModel getWorldmodel();",
"public WorldLoader getWorldLoader() {\n\t\treturn loader;\n\t}",
"public WorldModel<? extends Entity> getWorldModel() {\n\t\treturn worldModel;\n\t}",
"public static void loadWorld() {\n try {\n String path = System.getProperty(\"user.home\");\n Str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the target position for movement on the map. | public Position getTargetPosition() {
return targetPosition;
} | [
"public int getTargetPos() {\n return targetPos_;\n }",
"int getTargetPos();",
"public int getTargetPos() {\n return targetPos_;\n }",
"SSIT.proto.Unetmgr.PBVector3 getTargetPos();",
"public Point getTarget() {\n\t\treturn _target;\n\t}",
"public int[] getTarget() {\n int[] wakaLo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method to roll for a combat drop | public void rollCombatDrop() {
Random r=new Random();
int x=r.nextInt(3);
Item i=combatDrops.get(x);
addItem(i.getName());
events.appendText("You find an "+i.getName()+" after defeating the "+e.getName()+"!\n"); // Infrom player
} | [
"@Override\r\n public int attack() {\r\n return dexterity/dice.roll();\r\n }",
"public void roll(){\n\t\tvalue=(int) (Math.random()*SIDES_ON_DICE)+1;\n\t}",
"public void roll() {\r\n\t\t// Create a random object.\r\n\t\tRandom rand = new Random();\r\n\t\t\r\n\t\t// Get a random value for the die.\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the id_applicazione of this autorizzazione dir. | @Override
public long getId_applicazione() {
return _autorizzazioneDir.getId_applicazione();
} | [
"@Override\n\tpublic void setId_applicazione(long id_applicazione) {\n\t\t_autorizzazioneDir.setId_applicazione(id_applicazione);\n\t}",
"public Integer getApp_id() {\n return app_id;\n }",
"@Override\n\tpublic long getId_autorizzazione() {\n\t\treturn _autorizzazioneDir.getId_autorizzazione();\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column S_CONTROL.SMART_OPTION3 | public void setSMART_OPTION3(BigDecimal SMART_OPTION3) {
this.SMART_OPTION3 = SMART_OPTION3;
} | [
"public void setSMART_OPTION_TEXT3(BigDecimal SMART_OPTION_TEXT3) {\r\n this.SMART_OPTION_TEXT3 = SMART_OPTION_TEXT3;\r\n }",
"public void setOPTION3_SMART_DEFAULT(BigDecimal OPTION3_SMART_DEFAULT) {\r\n this.OPTION3_SMART_DEFAULT = OPTION3_SMART_DEFAULT;\r\n }",
"public BigDecimal getSMART_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the vehicle form for edit | @RequestMapping(value = "/editVehicle")
public ModelAndView editVehicle(@RequestParam("id") int id) {
ModelAndView mav = new ModelAndView(ApplicationConstants.MASTER_PAGE);
mav.addObject("vehicle", vehicleDAO.get(id));
mav.addObject(ApplicationConstants.TITLE, ApplicationConstants.VEHICLE);
mav.addObject(... | [
"@RequestMapping(value = \"/{id}/edit.html\", method = RequestMethod.GET)\n public String provideForm(@PathVariable(\"id\") Long id, Model model) \n throws Exception {\n FixtureModel fixture = fixtureService.findFixtureById(id); \n model.addAttribute(\"fixture\", fixture);\n return FORM_VIEW_NAME;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the AddressTypeInternal field. Type of this address record. | @gw.internal.gosu.parser.ExtendedProperty
public typekey.AddressType getAddressTypeInternal() {
return (typekey.AddressType)__getInternalInterface().getFieldValue(ADDRESSTYPEINTERNAL_PROP.get());
} | [
"public AddressType getType() {\n return type;\n }",
"public String getAddressType()\n\t{\n\t\treturn addressType;\n\t}",
"java.lang.String getAddressType();",
"public void setAddressType(String addressType) {\n this.addressType = addressType;\n }",
"public ContactType getType() {\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column student.userid | public void setUserid(Long userid) {
this.userid = userid;
} | [
"public void setUserid(long userid)\n {\n this.userid = userid;\n }",
"public void setUserid(java.lang.String value) {\n this.userid = value;\n }",
"@Override\n public void setUserid(String userid) {\n\t\tproperties.setValue(USERID_KEY, userid);\n\t}",
"public void setUserid(Integer userid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//GENEND:|175getter|2| //GENBEGIN:|177getter|0|177preInit Returns an initiliazed instance of backCommand7 component. | public Command getBackCommand7() {
if (backCommand7 == null) {//GEN-END:|177-getter|0|177-preInit
// write pre-init user code here
backCommand7 = new Command("Back", Command.BACK, 0);//GEN-LINE:|177-getter|1|177-postInit
// write post-init user code here
}//GEN-BEGIN:|177... | [
"public Command getBackCommand1 () {\nif (backCommand1 == null) {//GEN-END:|39-getter|0|39-preInit\n // write pre-init user code here\nbackCommand1 = new Command (\"Back\", Command.BACK, 0);//GEN-LINE:|39-getter|1|39-postInit\n // write post-init user code here\n}//GEN-BEGIN:|39-getter|2|\nreturn backCommand1;\n}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Answer the total number of fields in enclosing types of a given type | static int numberOfEnclosingFields(ReferenceBinding type){
int count = 0;
type = type.enclosingType();
while(type != null) {
count += type.fieldCount();
type = type.enclosingType();
}
return count;
} | [
"@Override\n public int getTotalNumberOfFields() {\n return objClass.getDeclaredFields().length;\n }",
"public int getFieldCount()\r\n {\r\n Iterator it = getFields();\r\n int count = 0;\r\n while(it.hasNext())\r\n {\r\n count ++;\r\n it.next();\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates and returns a new Movie object based on user input. | private Movie getMovieForAddShowing(){
Scanner scanner = new Scanner(System.in);
System.out.println("Please enter the title of the movie you wish to add a showing for...");
String title = scanner.next();
Movie movieToBeReturned=null;
for(Movie movie:movies){
if(movie.... | [
"private Movie createNewMovie(String movieName, String directorName, String act1, String act2, String act3, int star)\n {\n Movie clip = new Movie(movieName, directorName, act1, act2, act3, star);\n return clip;\n }",
"private Movie constructMovie(MovieRtDTO movieDTO){\n\t\tMovie movie = new M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method communicates with the User Model get or compute the knowledge and progress levels of the user in all the content items of the course. The contentList hashmap provides a finite list of content available to the course and each content specify it's provider. For different providers, the implementation of this ... | public HashMap<String, double[]> getContentSummary(
String usr, String grp, String sid, String cid, String domain,
HashMap<String, String[]> contentList, HashMap<String,String[]> providers,
ArrayList<String> options); | [
"public Item2Vector<UserProgressEstimator> getUserKnowledgeLevels()\r\n\t{\r\n\t\treturn user_knowledge_levels;\r\n\t}",
"List<UserContentAccess> findContentAccess();",
"public List<CourseSection> getViewableSectionsForCurrentUser();",
"public interface PrivacyManager \n{\n\tpublic static final String SYSTEM_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EMaxLength__Group__1" $ANTLR start "rule__EMaxLength__Group__1__Impl" InternalAADMParser.g:18769:1: rule__EMaxLength__Group__1__Impl : ( ( rule__EMaxLength__ValAssignment_1 ) ) ; | public final void rule__EMaxLength__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAADMParser.g:18773:1: ( ( ( rule__EMaxLength__ValAssignment_1 ) ) )
// InternalAADMParser.g:18774:1: ( ( rule__EMaxLength__ValAssignme... | [
"public final void rule__EMaxLength__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:18762:1: ( rule__EMaxLength__Group__1__Impl )\n // InternalAADMParser.g:18763:2: rule__EMaxLength__Group__1__Impl\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
isRight method finds if object is right triangle | public boolean isRight () {
if (((Math.pow(startSide1, 2) + Math.pow(startSide2, 2) == Math.pow(startSide3, 2)) ||
(Math.pow(startSide2, 2) + Math.pow(startSide3, 2) == Math.pow(startSide1, 2)) ||
(Math.pow(startSide3, 2) + Math.pow(startSide1, 2) == Math.pow(startSide2, 2)))
&& isTriangle () == true &&... | [
"public abstract boolean isRight();",
"public boolean isRightAngled()\r\n\t{\r\n\t\tint[] sides = new int[] { side1, side2, side3 };\r\n\r\n\t\treturn sides[2]\r\n\t\t\t== Math.sqrt((long) sides[0] * sides[0] + (long) sides[1] * sides[1]);\r\n\t}",
"boolean hasHingeOnRightSide() throws RuntimeException;",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a format ID this will check whether the format represents an internal excel date format or not. | public static boolean isInternalDateFormat(int format) {
switch(format) {
// Internal Date Formats as described on page 427 in
// Microsoft Excel Dev's Kit...
case 0x0e:
case 0x0f:
case 0x10:
case 0x11:
... | [
"public static boolean isCellInternalDateFormatted(Cell cell) {\r\n if (cell == null) return false;\r\n boolean bDate = false;\r\n\r\n double d = CellUtils.getNumericCellValue(cell);\r\n if ( DateUtil.isValidExcelDate(d) ) {\r\n long i = CellUtils.getNumberFormatIndex(cell);\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a test service from OSGi container for testing of general service functionality. | private ServiceReference getTestService() throws Exception {
Bundle bundle = getTestBundle();
ServiceReference[] servicesReferences = bundle.getServicesInUse();
// for testing there is only one service used by this bundle
ServiceReference reference = servicesReferences[0];
return reference;
} | [
"public String simpleTestService(String name);",
"private BookableService createTestService(){\n try {\n\n String serviceName = SERVICE_NAME_2;\n BookableService createdService = repairShopService.createService(\"Place holder\", COST, DURATION);\n createdService... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column rabbit_house.ammonia | public void setAmmonia(Double ammonia) {
this.ammonia = ammonia;
} | [
"public void setAdb(AreaDataBase adb) {\n this.adb = adb;\n if( adb != null ) {\n Player p = adb.game.getPlayer();\n }\n }",
"public void setBd_ma_code(int Bd_ma_code) {\r\n this.Bd_ma_code = Bd_ma_code;\r\n }",
"public Value.Builder setJamMulai(long value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Goes to the order list screen. | public void navigateToOrderList() {
this.navigator.navigateToOrderList(this);
finish();
} | [
"private void showOrder() {\n order.printOrderItems();\n }",
"public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the given Inventory contains the dragon egg. Also returns false if the provided inventory is null. | public static boolean hasOnlyEgg(Inventory inventory) {
if (inventory == null) {
return false;
}
return inventory.contains(Material.DRAGON_EGG);
} | [
"public static boolean hasEgg(Inventory inventory) {\n if (inventory == null) {\n return false;\n }\n return hasEgg(inventory.getContents());\n }",
"public static boolean hasEgg(PlayerInventory inventory) {\n if (inventory == null) {\n return false;\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove the node after a given node | private E removeAfter(Node<E> node)
{
Node<E> temp = node.next;
if(temp != null)
{
node.next = temp.next;
// if we've removed the last element, update the tail
if(node.next == null)
{
tail = node;
}
size--;
return temp.data;
}
else
{
return null;
}
} | [
"public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }",
"public void removeNodeAfter( ) \n {\n link = link.link;\n }",
"public void removeNodeAfter(){\n link = link.link;\n }",
"public E removeAfter(Node<E> node) {\n if(node.next!=null)\n {\n Nod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an iterator over all the additional elements contained in the EncryptionMethod. | Iterator<Element> getEncryptionMethodInformation(); | [
"public interface EncryptionMethod {\n /**\n * Returns the algorithm applied to the cipher data.\n *\n * @return the encryption algorithm.\n */\n String getAlgorithm();\n\n /**\n * Returns the key size of the key of the algorithm applied to the cipher\n * data.\n *\n * @retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data JPA repository for the Scheme entity. | @SuppressWarnings("unused")
@Repository
public interface SchemeRepository extends JpaRepository<Scheme,Long> {
List<Scheme> findSchemeByDriver(Driver driver);
} | [
"@Repository\npublic interface RackRepository extends JpaRepository<Rack, Long> {\n\n}",
"@Repository\npublic interface CurvePointRepository extends JpaRepository<CurvePoint, Integer> {\n\n}",
"@Repository\npublic interface DataSourceConfigRepository extends JpaRepository<DataSourceConfig, Long> {\n \n}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field noteStatuses is set (has been assigned a value) and false otherwise | public boolean isSetNoteStatuses() {
return this.noteStatuses != null;
} | [
"public boolean isSetStatuses() {\n return this.statuses != null;\n }",
"public boolean isSetNote() {\n return this.note != null;\n }",
"public boolean isSetSquareNoteStatus() {\n return this.squareNoteStatus != null;\n }",
"public boolean is_set_status() {\n return this.status != null;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AddNoiseToKick this can be used to vary the accuracy of a player's kick. Just call it prior to kicking the ball using the ball's position and the ball target as parameters. | Vector2D AddNoiseToKick(Vector2D BallPos, Vector2D BallTarget) {
double displacement = (Math.PI - Math.PI * Prm.PlayerKickingAccuracy) * Utilities.RandomClamped();
Vector2D toTarget = BallTarget.subtractToCopy(BallPos);
toTarget.RotateAroundOrigin(displacement);
return toTarget.add(Ba... | [
"@EventHandler\n public void ballKickEvent(BallKickEvent event) {\n final Game game;\n if ((game = this.controller.getGameFromBall(event.getBall())) != null) {\n game.playBallKickEffects(event.getPlayer());\n }\n }",
"private void kick() {\n\t\tif(!source.getName().equals(kic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field names is set (has been assigned a value) and false otherwise | public boolean isSetNames() {
return this.names != null;
} | [
"public boolean is_set_fields() {\n return this.fields != null;\n }",
"public boolean isSetFields() {\n return this.fields != null;\n }",
"protected boolean hasFields() {\n return fields != null && ! fields.isEmpty();\n }",
"boolean hasAFieldName();",
"public boolean isSetColumnNames() {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TagTemplate provides the templates for the code snippets for the private members and the methods. Takes a Node for computing css locators. Using the node as the starting point to traverse up the parent tree. | TagDescriptor(TagTemplate tagTemplate, Node node) {
// I could get the tag from either the Node or the template. I'm choosing the Template since it's
// working and I might have to change the string if I get it from the Node.
this.tag = tagTemplate.getTag();
this.memberCode = new Stri... | [
"Node getTemplateTextNode();",
"void tag4() \n\t{\n\t\t/** javadoc_single_style_tag: This is a JavaDoc single style tag.\n\t}\n\t\n\t/** Test a JavaDoc multi style comment in souce code.\n\t * \n\t */\n\tvoid tag5() \n\t{\n\t\t/** \n\t\t * javadoc_multi_style_tag: This is a JavaDoc multi style tag.\n\t\t */\n\t}\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Resource'. | Resource createResource(); | [
"ObjectResource createObjectResource();",
"public Resource() {\n }",
"ResourceAPI createResourceAPI();",
"public GenericResource() {\n }",
"public Resource() {\r\n this(null);\r\n }",
"public GenericResource() {\r\n }",
"public RequerimientoResource() {\r\n }",
"protected abstract R cr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate the message with specified prefix and messages | protected String getMessage(String prefix, Object... objects) {
StringJoiner joiner = new StringJoiner(" ");
for(Object o : objects) {
joiner.add(String.valueOf(o));
}
return TerminalColors.RESET + "" + TerminalColors.WHITE + logDate() + " " + prefix + " " + TerminalColors.WH... | [
"private static TextComponent prefixMessage(TextComponent message) {\n return TextComponent.builder()\n .append(\n TextComponent.of(\"[\")\n .color(TextColor.GOLD)\n )\n .append(\n TextComponent.of(\"DriveBa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleXBooleanLiteral" $ANTLR start "entryRuleXNullLiteral" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1467:1: entryRuleXNullLiteral : ruleXNullLiteral EOF ; | public final void entryRuleXNullLiteral() throws RecognitionException {
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1468:1: ( ruleXNullLiteral EOF )
// ../org.xtext.example.helloxcore.ui/src-gen/org... | [
"public final void entryRuleXNullLiteral() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1664:1: ( ruleXNullLiteral EOF )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method required for adding horse | Horse addHorse(Horse horse); | [
"public void addSeaHorse()\n {\n /*\n add a new SeaHorse to the aquarium, randomizing the position and passing a random object\n */\n\n // INSTANTIATE new SeaHorse, passing the global Random instance, a random point inside the bounds of the aquarium and the size of the aquarium to... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get nonsupercharger MASC mounted on this mech | public Mounted getMASC() {
for (Mounted m : getMisc()) {
MiscType mtype = (MiscType) m.getType();
if (mtype.hasFlag(MiscType.F_MASC) && m.isReady() && !mtype.hasSubType(MiscType.S_SUPERCHARGER)) {
return m;
}
}
return null;
} | [
"public Mounted getSuperCharger() {\n for (Mounted m : getMisc()) {\n MiscType mtype = (MiscType) m.getType();\n if (mtype.hasFlag(MiscType.F_MASC) && m.isReady() && mtype.hasSubType(MiscType.S_SUPERCHARGER)) {\n return m;\n }\n }\n return null;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Substring. Given a string, return a new string where "not " has been added to the front. However, if the string already begins with "not", return the string unchanged. Note: use .equals() to compare 2 strings. You can use startsWith(), but if you are not allowed to use it, you need to check how long the original string... | public String notString(String str) {
// if (str.startsWith("not")) {
// return str;
// }
// Note that end in substring(start, end) is index of one char after
// something you want. Not length!
if (str.length() >= 3 && str.substring(0, 3).equals("not")) {
return str;
} else {
... | [
"public String notString(String str) {\n if (str.length() >= 3 && str.substring(0,3).equals(\"not\")){\n return str;\n }\n \n return (\"not \" + str);\n}",
"public String notString(String str)\r\n\t{\r\n\t\t// If its not even long enough to have \"not\", just add \"not\"\r\n\t\t// This part is necessary so... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to calculate the tradeoffs for each vertex along with its associated smallest cost edge. | private Edge getMinTradeOff() {
int[] tradeOffs = new int[this.graph.vertex.size()];
Edge[] edges = new Edge[this.graph.vertex.size()];
for(Vertex v : this.graph.adjList.keySet()){
if(v.equals(this.graph.vertex.get(5)) || v.equals(this.graph.vertex.get(12))
|| v.equal... | [
"private void computePaths(Vertex source, Vertex target, ArrayList<Vertex> vs)\n {\n \tfor (Vertex v : vs)\n \t{\n \t\tv.minDistance = Double.POSITIVE_INFINITY;\n \t\tv.previous = null;\n \t}\n source.minDistance = 0.;\t\t// distance to self is zero\n IndexMinPQ<Vertex> vertexQueue =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of addMinutes method, of class DateTime. | @Test
public void testAddMinutes()
{
System.out.println("-----------------------------------------------");
System.out.println("addMinutes()");
Date _currentDate = DateTime.now();
Date _tenMinutesAfter = DateTime.addMinutes(_currentDate, 10);
Date _tenMinutesBefore... | [
"DateTime plusMinutes( int minutes );",
"@Test\r\n public void testAddSeconds()\r\n {\r\n System.out.println(\"-----------------------------------------------\");\r\n System.out.println(\"addSeconds()\");\r\n Date _currentDate = DateTime.now();\r\n Date _twoMinutesAfter = DateTim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Request a deviceList update from contact contact. | public void requestDeviceListUpdateFor(BareJid contact) throws SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException {
getOmemoService().refreshDeviceList(this, contact);
} | [
"public void updateDeviceList(Collection<DeviceInfo> deviceList){\n this.devices.clear();\n this.devices.addAll(deviceList);\n }",
"private void updateContactList()\r\n {\r\n try\r\n {\r\n SimpleCursorAdapter adapter = (SimpleCursorAdapter) getListAdapter();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the ribbon container. | public void setRibbonContainer(JRibbonContainer ribbonContainer)
{
this.ribbonContainer = ribbonContainer;
} | [
"public void setRibbonComponent(IRibbonComponent ribbonComponent)\n\t{\n\t\tthis.ribbonComponent = ribbonComponent;\n\t}",
"public JRibbonContainer getRibbonContainer()\n\t{\n\t\treturn ribbonContainer;\n\t}",
"public void setCrayon(RibbonCrayon c)\n { this.crayon = c; }",
"public void setRibbonIcon(Icon r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Process Definition' attribute. If the meaning of the 'Process Definition' attribute isn't clear, there really should be more of a description here... | String getProcessDefinition(); | [
"public com.sforce.soap.enterprise.sobject.ProcessDefinition getProcessDefinition() {\n return processDefinition;\n }",
"public String getProcessDefinition()\n\t{\n\t\tString processDefinitionDirectory = this.getProcessDirectory();\n\t\tString processDefinition = null;\n\t\t\n\t\tif(processDefinitionDir... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback launched immediately after job execution in the Job Thread. Default implementation is empty. | protected void afterJobExecution() {
} | [
"void onJobFinished(Job job) {}",
"void onJobFinished(Job job);",
"public void jobFinished() { }",
"void onJobSuccess(Job job);",
"void onJobStarted(Job job) {}",
"void executeJob( Runnable job );",
"Worker(Handler.Callback callbalk) {\n mCallback = callbalk;\n }",
"public void jobSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
move Widget_Info FROM this container | @Override
public void moveAfter(JavaInfo child, ObjectInfo oldParent, JavaInfo newParent)
throws Exception {
if (isActiveOnContainer(oldParent) && child instanceof WidgetInfo && newParent != oldParent) {
onWidgetRemoveAfter((WidgetInfo) child);
}
// move Widget_Info TO ... | [
"@Override\n public void moveBefore(JavaInfo child, ObjectInfo oldParent, JavaInfo newParent)\n throws Exception {\n if (isActiveOnContainer(oldParent) && child instanceof WidgetInfo && newParent != oldParent) {\n WidgetInfo widget = (WidgetInfo) child;\n onWidgetRemoveBefore(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests if process Files return only paths excluding marker directories Cleaner, Rollback and compactionscheduling logic was recursively processing all subfolders including that of ".hoodie" when looking for partitionpaths. This causes a race when they try to list all folders (recursively) but the marker directory (that ... | @Test
public void testProcessFiles() throws Exception {
// All directories including marker dirs.
List<String> folders =
Arrays.asList("2016/04/15", "2016/05/16", ".hoodie/.temp/2/2016/04/15", ".hoodie/.temp/2/2016/05/16");
folders.forEach(f -> {
try {
metaClient.getFs().mkdirs(new P... | [
"private /*static*/ boolean checkForOrphanedFiles (Path folder) //throws Exception\n\t{\n\t\tCollection<String> datBaseNames = new ArrayList<String> ();\n\t\tCollection<String> jpgBaseNames = new ArrayList<String> ();\n\t\tCollection<String> otherNames = new ArrayList<String> ();\n\n\t\tFilenamePatternFilter datPat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of OpenLdapAclValueWithContext. | public OpenLdapAclValueWithContext( IBrowserConnection connection, IEntry entry, int precedence, String aclValue )
{
this.connection = connection;
this.entry = entry;
this.precedence = precedence;
this.aclValue = aclValue;
try
{
aclItem = parser.p... | [
"public OpenLdapAclDialog( Shell parentShell, OpenLdapAclValueWithContext context )\n {\n super( parentShell );\n super.setShellStyle( super.getShellStyle() | SWT.RESIZE );\n this.context = context;\n context.setAclDialog( this );\n }",
"public String getAclValue()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method: getRank(decade) Returns the rank associated with an entry for a particular decade. The decade value is an integer indicating how many decades have passed since the first year in the database, which is given by the constant START_DECADE. If a name does not appear in a decade, the rank value is 0. | public int getRank(int decade) {
int decadeScore = ranks.get(decade);
return decadeScore;
} | [
"public int getRank(int decade) {\n return rank[decade];\n }",
"public int getRank(int decade) {\n\t\tif (decade < 0 || decade > (NDECADES - 1)) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn this.ranksOfName[decade];\n\t}",
"public int getRank(int decade) {\n\t\tint rank = rankList[decade - 1][1];\n\t\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the fragment's "more fragments" bit to true, put it in the queue, and allocate a new bbwi. | public void overflow (ByteBufferWithInfo bbwi)
{
// Set the fragment's moreFragments field to true
MessageBase.setFlag(bbwi.buf, Message.MORE_FRAGMENTS_BIT);
// Enqueue the previous fragment
queue.enqueue(bbwi);
// Create a new bbwi
ByteBufferWithInfo newBbwi = new ... | [
"private void addFragment() {\n\t\tfragment = MyPlanFeedbackFragment.newInstance(models);\n\t\taddFragment(fragment);\n\t}",
"public void newQueue(){\r\n\t\tgenerateQueue();\r\n\t\trefreshLeft = true;\r\n\t}",
"public void add( boolean bit ) {\n\t\tif ( ( ( this.head + 1 ) & ( ( this.buffer.length << 3 ) - 1 ) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the filename of the Properties file. This is just the file name and not the path! | public static String getPropertyFilename() {
if (propertyFileName == null) {
setPropertyFilename("");
}
return propertyFileName;
} | [
"public static String getPropertyFilename() {\n return propfilename;\n }",
"public String getPropertyFileName()\r\n\t{\r\n\t\treturn propertyFileName;\r\n\t}",
"public static String getAttemptedPropertiesFileName() {\r\n\t\tString serverName = ConfigurationHelper.getServerName();\r\n\r\n\t\tStringBuffer sb ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
on verification failed i display a toast message which displays error happened there | @Override
public void onVerificationFailed(FirebaseException e) {
emailVerificationProgressBar.setVisibility (View.GONE);
Toast.makeText (getContext (), e.getMessage (), Toast.LENGTH_LONG).show ();
} | [
"void failedSignUpToast(String text) {\r\n Toast.makeText(getApplicationContext(), text, Toast.LENGTH_LONG).show();\r\n }",
"@Override\n\t\t\tpublic void onVerificationFailed(FirebaseException e) {\n\t\t\t\tLog.w(TAG, \"onVerificationFailed\", e);\n\n\t\t\t\tif (e instanceof FirebaseAuthInvalidCredentia... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
builds list of queries for field specific criteria from the search criteria | private List<QueryBuilder> getCriteriaQueries(List<Terminology> terminologies,
SearchCriteria searchCriteria) {
List<QueryBuilder> queries = new ArrayList<>();
// concept status
QueryBuilder conceptStatusQuery = getConceptStatusQueryBuilder(searchCriteria);
if (conceptStatusQuery != null) {
q... | [
"CampusSearchQuery generateQuery();",
"private Criteria combineCriteria(List<ContentSearch<?>> searchFields, Criteria... extraCriteria) {\n\n var criteria = searchFields.stream()\n .map(ContentSearch::getCriteria)\n .toArray(Criteria[]::new);\n var allCriteria = ArrayUt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
user quit conference, however positive or negative | private void quit() {
Intent i = new Intent();
i.putExtra("gid", conf.getId());
setResult(0, i);
// if bound, then conference service is initialized. Otherwise not.
if (mServiceBound) {
updateAllRemoteDevice(TAG_CLOSE_DEVICE);
// close local camera
closeLocalCamera();
}
VideoRecorder.VideoPrevi... | [
"public void terminateConference();",
"void terminateConference();",
"public void leaveConference();",
"private void quit()\n\t{\n\t\t/**\n\t\t * This message is given out if the answer is goodbye.\n\t\t */\n\t\tappView.displayInformation(\"goodbye cruel user :'(\");\n\t\tSystem.exit(0);\n\t}",
"@Test\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the default SMTP 'sendpartial' flag | public void setSendPartial(boolean V)
{
this.setSendPartial(V?"true":"false");
} | [
"public void setSendPartial(String V)\n { // [2.6.5-B16]\n this.smtpProps.removeProperties(KEY_SEND_PARTIAL);\n V = StringTools.trim(V).toLowerCase();\n if (ListTools.contains(SENDPARTIAL_OPTIONS,V)) {\n this.smtpProps.setString(KEY_SEND_PARTIAL[0], V);\n }\n }",
"@ZAt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computing the weighted score of the producer prodInd is the index of the producer | private int computeWSC(Product product, int prodInd) throws Exception { //, int prodInd
int wsc = 0;
boolean isTheFavourite;
int meScore, score, k, p, numTies;
for (int i = 0; i < CustomerProfiles.size(); i++) {
for (int j = 0; j < CustomerProfiles.get(i).getSubProfiles().si... | [
"int computeNutritionalScore(Map<String, Object> product);",
"private int computeWSC_SA(Product product, int productIndex) throws Exception {\n int wsc = 0;\n boolean isTheFavourite;\n int meScore, score, k, p, numTies;\n\n for (int i = 0; i < CustomerProfiles.size(); i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send a screen view to GoogleAnalytics on which home screen is started on app startup | public static void homeScreenUsed(Activity context, String screenName) {
// Get tracker
Tracker tracker = ((GlobalEntity) context.getApplicationContext())
.getTracker(TrackerName.APP_TRACKER);
if (tracker == null) {
return;
}
// Set screen name
... | [
"private void fireAnalyticsScreenView(String sessionTitle) {\n if (!mAnalyticsScreenViewHasFired) {\n // ANALYTICS SCREEN: View the Session Details page for a specific session.\n // Contains: The session title.\n AnalyticsHelper.sendScreenView(\"Session: \" + sessionTitle);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__TgtScript__Group__0" $ANTLR start "rule__TgtScript__Group__0__Impl" InternalTest.g:291:1: rule__TgtScript__Group__0__Impl : ( ( rule__TgtScript__PreShellAssignment_0 ) ) ; | public final void rule__TgtScript__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalTest.g:295:1: ( ( ( rule__TgtScript__PreShellAssignment_0 ) ) )
// InternalTest.g:296:1: ( ( rule__TgtScript__PreShellAssignment_0 ) )
... | [
"public final void rule__TgtScript__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTest.g:283:1: ( rule__TgtScript__Group__0__Impl rule__TgtScript__Group__1 )\n // InternalTest.g:284:2: rule__TgtScript__Group__0_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes Counter with the given counterID. | public Response removeCounter(int counterID, String authHeader){
try{
system.checkPassword(authHeader);
return Response.status(Response.Status.OK).entity(CounterDBConnector.removeCounter(counterID)).build();
}catch(UnauthorizedExcpetion e){
return Response.status(Response.Status.UNAUTHORIZED).build();
}... | [
"public void deleteCounter(Counter aCounter)\n\t{\n\t\tArrayList<Counter> list = counterList.getCounterList();\n\t\tlist.remove(aCounter);\n\t}",
"public void stopAddCounter(E counterId) {\n lengths[counterId.ordinal()] += System.currentTimeMillis() - starts[counterId.ordinal()];\n }",
"public void st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns a point that is a google pixel reference for the particular lat/lng and zoom assumes tiles are 256x256. | public static Point toZoomedPixelCoords(double lat, double lng, int zoom) {
Point normalised = toNormalisedPixelCoords(lat, lng);
double scale = (1 << (17 - zoom)) * TILE_SIZE;
return new Point((int) (normalised.x * scale), (int) (normalised.y * scale));
} | [
"public static GoogleTiles.XY getPixelXY(double lon, double lat, int zoom) {\n\t\t// Number of tiles in each axis at zoom level\n\t\tdouble tiles = Math.pow(2, zoom);\n\n\t\t// Circumference in pixels\n\t\tdouble circumference = TILE_SIZE * tiles;\n\t\tdouble radius = circumference / (2 * Math.PI);\n\n\t\t// Use ra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Infer a species tree from a collection of unrooted gene trees with single allele sampled per species | public Tree inferSpeciesTreeUnrooted(List<MutableTuple<Tree,Double>> trees, int percentage){
double size = 0;
Set<String> taxalist = new HashSet<String>();
for(MutableTuple<Tree,Double> tr: trees){
for (TNode node : tr.Item1.postTraverse()) {
if (node.isLeaf()) {... | [
"public Tree inferSpeciesTreeUnrooted(List<MutableTuple<Tree,Double>> trees, Map<String,String> taxonMap, int percentage){\r\n List<String> temp1 = new LinkedList<String>();\r\n\t\tList<String> temp2 = new LinkedList<String>();\r\n\t\tfor (String s : taxonMap.keySet()) {\r\n\t\t\ttemp1.add(s);\t// Gene tree ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a bidirectional map of BattleUnits and Tiles. | public BiMap<BattleUnit, Hex> getUnitMap() {
return new BiMap<>(unitMap);
} | [
"public HashMap<Territory, ArrayList<Integer>> getUnitMap() {\n HashMap<Territory, ArrayList<Integer>> map = new HashMap<>();\n for (Territory t : territories) {\n ArrayList<Integer> bonus = new ArrayList<>();\n for (Unit u : t.getUnits()) {\n bonus.add(u.getBonus());\n }\n map.put(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Inicialice los elementos: linea e image view, basandose en clase Policia | public void inicializarElementos(){
imagenEsposa= new ImageView(new Image(ARCHIVO_IMAGEN));
imagenEsposa.setFitHeight(80);
imagenEsposa.setFitWidth(80);
} | [
"public void visualiserPartie(){\n \n }",
"private void dibujarPoligono(Poligono poligono,Canvas canvas){\n /*float limit1=poligono.getAlto()/2;\n float limit2=poligono.getAncho()/2;\n canvas.save();\n canvas.scale(limit1, limit2);\n\n Path trazo = new Path();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
7.3 Spreadsheet Column Encoding: Convert id into A, B,...,Z, AA, AB,..., AZ,..., ZZ ,AAA, AAB,... | public String spreadsheetEncoding(int id) {
if (id < 0)
return null;
StringBuilder sbEncoding = new StringBuilder();
char[] alphabetEnc = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int alphabetSize = alphabetEnc... | [
"private static String normalizeID(String id) {\r\n\t\tint hashcode = id.hashCode();\r\n\t\tboolean positive = hashcode >= 0;\r\n\t\tlong longcode = positive ? (long) hashcode : -(long) hashcode;\r\n\t\tStringBuffer hexstring = new StringBuffer(Long.toHexString(longcode));\r\n\t\twhile (hexstring.length() < 8) {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an unmodifiable set of wildcard URI patterns that this modifier is activated for | @ManagedAttribute(description="Wildcard URI patterns that this modifier is activated for")
public Map<String, String> getWildcardUriMappings() {
Map<String, String> map = new HashMap<String, String>(handlers.size());
for(Map.Entry<String, HttpRequestHandler> entry: uriWildcardRoutes.entrySet()) {
map.put(entry.... | [
"@ManagedAttribute(description=\"URI patterns that this modifier is activated for\")\n\tpublic Map<String, String> getUriMappings() {\n\t\tMap<String, String> map = new HashMap<String, String>(handlers.size());\n\t\tfor(Map.Entry<String, HttpRequestHandler> entry: uriRoutes.entrySet()) {\n\t\t\tmap.put(entry.getKey... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an individual resource associated with this archiver, by index. | public Resource getResource(int anIndex) { return _resources.get(anIndex); } | [
"public PageObject getObject(int index) {\r\n return pageObjects.get(index);\r\n //TODO Index error handling? \r\n }",
"public Object get( final int index ) {\n\t\treturn this.fetchList().get( index );\n\t}",
"public Recipe getRecipe(int index) {\r\n if (index > mRecipeBook.length) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contexts: record_section returns record_section Constraint: (identifiers=identifier_list type=type) | protected void sequence_record_section(ISerializationContext context, record_section semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.RECORD_SECTION__IDENTIFIERS) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatu... | [
"protected void sequence_record_section(ISerializationContext context, record_section semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.RECORD_SECTION__IDENTIFIERS) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnos... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int stream contains extra useful methods such as sum, min or max | private static void test_7() {
int sum = IntStream.of(1, 2, 3, 4).sum();
System.out.println(sum);
List<Integer> list = asList(-1, -2, -3, -4);
// sum = list.stream().sum(); // doesn't compile, not an int stream
sum = list.stream().mapToInt(x -> x).sum();
System.out.print... | [
"public static void main( String[] args ) {\n List<Dog> dogs = DogGenerator.generate( 1000 );\n\n /*\n dogs.stream() //Stream<Dog>\n .filter( dog -> dog.getBreed().equals( Dog.BREED.PUG ) )//Stream<Dog>\n .map( Dog::getWeight )//Stream<Integer> boxing :(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses a service template from the given input string if possible. The input template must be in the form storage:prefix/name prefix/name (in this case the storage of the template will be the local storage) Note: the returned service template only contains data actually given to the method, therefore the priority of th... | public static @Nullable ServiceTemplate parse(@NonNull String template) {
// check if the template contains a storage-name splitter
var parts = template.split(":");
if (parts.length == 0 || parts.length > 2) {
return null;
}
// read the storage and name path
var path = parts.length == 2 ? ... | [
"StringTemplate createStringTemplate();",
"ServiceTemplate createServiceTemplate();",
"public static Template parse(String input) {\n return new Template(input);\n }",
"public @NonNull ServiceTemplate build() {\n Preconditions.checkNotNull(this.name, \"no name given\");\n Preconditions.che... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the set of errors encountered when discovering contract tests. | public List<Throwable> getErrors() {
final List<Throwable> retval = new ArrayList<Throwable>();
for (final TestInfo testInfo : contractTestMap.listTestInfo()) {
retval.addAll(testInfo.getErrors());
}
return retval;
} | [
"Set<ExpectedErrorConfig> getExpectedErrors();",
"private final Set<String> errorsInWorkspace() {\n try {\n return getErrorMarkers().stream()\n .map(it -> {\n try {\n return it.getAttribute(IMarker.MESSAGE).toString();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates and adds a new suppression into the suppression database based on the values in an AddEntry form object | public static int addSuppression ( AddEntry data_form, int ptimezone_offset ) throws IOException, SQLException, ClassNotFoundException
{
Calendar calendar_start = null;
Calendar calendar_end = null;
Statement stmt = Toolkit.getSuppressionDatabaseStatement();
Resul... | [
"public void addRep() {\n @SuppressLint(\"WrongViewCast\") EditText descr = findViewById(R.id.descr);\n String des = descr.getText().toString();\n\n Date date = Calendar.getInstance().getTime();\n Report r = new Report(des,fieldId,uId,date,null);\n\n mDatabase.createReport(r);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ calculate sum of odd and even numbers from 1 to 50 | public static void main(String[] args) {
int sumEven = 0 ,sumOdd=0;
for(int i=0;i<=50;i+=2) {
sumEven +=i;
}
System.out.println("Sum of Even number less then 50 is "+sumEven);
for(int i=1;i<=50;i+=2) {
sumOdd+=i;
}
System.out.println("Sum of Even number less then 50 is "+sumOdd);
Syste... | [
"public static long evenSum(int first, int last) {\r\n\t\tlong som = 0;\r\n\t\tfor (int i = first; i <= last; i++) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tsom += i;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn som;\r\n\r\n\t}",
"public static void main(String[] args) {\n\n\t\tint sumEven = 0;\n\t\tint sumOdd = 0;\n\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new path object given by multiple path components. | public Path(
String[] components
){
this(components.length, XRISegment.valueOf(components));
} | [
"public Path(\n XRISegment... components\n ){\n \tthis(components.length, components);\n }",
"public PathFragment(PathFragment first, PathFragment second, PathFragment... more) {\n // TODO(bazel-team): The handling of absolute path fragments in this constructor is unexpected.\n this.segments... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a circle with radius r given two points p and q in its perimeter | public Circle(Point p, Point q, double r) {
// TODO: Question 2.1
} | [
"Circle(Point p, double r) {\n\t\tcenter = new Point(p.getX(), p.getY());\n\t\tradius = r;\n\t}",
"public Circle(Point o, double r) {\n origin = new Point(o);\n radius = r;\n }",
"Circle(double x, double y, double r) {\n\t\tcenter = new Point(x, y);\n\t\tradius = r;\n\t}",
"public Circle(double r) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
is the orb placed on a pillar? pick orb from a pillar | public void pickOrb(){
onPillar = false;
} | [
"public void placeOrb(){\n onPillar = true;\n }",
"public boolean getOrbStatus() { return onPillar;}",
"private boolean isCropsNearby(World par1World, int par2, int par3, int par4)\n {\n byte b0 = 0;\n\n for (int l = par2 - b0; l <= par2 + b0; ++l)\n {\n for (int i1 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the handle to the Microsoft Solitaire Collection window, so other actions can be performed on it. | private WinDef.HWND getHWND() {
String[] windowNames = {
"Solitaire & Casual Games",
"Solitaire Collection"
};
for (String windowName : windowNames) {
WinDef.HWND hwnd = User32.INSTANCE.FindWindow("ApplicationFrameWindow", windowName);
if (... | [
"private void launchCollectionChooserDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n ArrayAdapter<String> collectionsDialogAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1);\n\n collectionsDialogAdapter.addAll(collectionTitles);\n\n builder.setTitle(\"Co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor calls method that sets up a 3x3 grid map, later it might be able to set up different maps depending on user input. | public Map() {
setup3x3Map();
} | [
"public MapGrid(){\n\t\tthis.cell = 25;\n\t\tthis.map = new Node[this.width][this.height];\n\t}",
"public void initialize() {\n\t\tnumRows = gridConfig.getNumRows();\n\t\tnumCols = gridConfig.getNumCols();\n\t\tgridCellCount = numRows * numCols;\n\t\tcreateMaps();\n\t\tsetCurrSimulationMap();\n\t\tcellWidth = SIZ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The following while loop keeps this window in front of other windows for the time that the window is visible. Without the repeated calls to toFront, other windows can cover it up. | public void run()
{
int sleepTime = 10; // milliseconds (tune this value accordingly)
int totalTimeShown = 0;
while(keepGoing)
{
// Force ... | [
"public void moveToFront() { mainWindow.toFront(); }",
"public void windowBecameFront() \n {\n return; \n }",
"public void windowBecameFront() { }",
"private void toFront(){\n\t\tsetVisible(true);\n\t\trequestFocus();\n\t}",
"public void toFront() {\n\t\ttry {\n\t\t\tthis_stage.toFront(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if the given ShortMessage is a MIDI NOTE OFF message. Note that the MIDI specification says that a NOTE ON with velocity=0 is equivalent to a NOTE OFF. | public static boolean isNoteOff(ShortMessage sm) {
final int command = sm.getCommand();
return command == ShortMessage.NOTE_OFF ||
(command == ShortMessage.NOTE_ON && sm.getData2() == 0);
} | [
"public static boolean isNoteOn(ShortMessage sm) {\n return sm.getCommand() == ShortMessage.NOTE_ON && sm.getData2() > 0;\n }",
"private void sendNoteOff(int noteNumber, long timestamp)\n {\n //System.out.println(\"NOTE OFF received\");\n // recover channel the note is sounding on\n // and mark th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end MenuChoice This function will take in a string caleld line and then compute the average It will do this by adding the wins and losses and then dividing wins by the total gamesPlayed | public static double getAvg(String line){
String[] parts = line.split("\t");
double gamesPlayed = (Integer.parseInt(parts[1])) + (Integer.parseInt(parts[2]));
double avg = (Integer.parseInt(parts[1])) / gamesPlayed;
return avg;
} | [
"private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
size of the location lst | public int size() {
return this.locationLst.size();
} | [
"public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}",
"long getListSize();",
"int sizeOfListArray();",
"public int sizeDesenhavelList();",
"public int getSize()\n {\n return pList.size();\n }",
"public static int getLength ()\n {\n return List.size();\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
While released is called every loop while the button is unpressed | @Override
public void whileReleased() {
// Wil be run while the button is unpressed
} | [
"@Override\n public void whilePressed() {\n // Will be run while the button is held\n }",
"@Override\n public void onReleased() {\n // Will be run right after the button is released\n }",
"public void release() {\n clicked = false;\n }",
"public void trigger() {\n bu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column identity_card.id_code | public void setIdCode(String idCode) {
this.idCode = idCode;
} | [
"public void setCard_code(Integer card_code) {\n this.card_code = card_code;\n }",
"public void setCodeId(Integer codeId) {\r\n this.codeId = codeId;\r\n }",
"public void setIdCardNo(String idCardNo) {\n this.idCardNo = idCardNo;\n }",
"public void setCodeid(Integer codeid) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
implement word scoring scheme | public void scoreWord() {
this.wordScore = 0;
for ( int i=0; i<word.length(); i++ ) {
Letter letter = WWF.getAlphabet().get( word.substring(i,i+1) );
this.wordScore += letter.getScoreValue();
}
} | [
"@Override\n\tpublic int countScore(String word) {\n\t\t\n\t\tif(inWordTable(word)) {\n\t\t\tint result = 0;\n\t\t\t\n\t\t\t// split the string\n\t\t\tString[] StringTokens = word.toLowerCase().split(\"\");\n\t\t\t\n\t\t\t// get the length of the word\n\t\t\tint wordLength = StringTokens.length;\n\t\t\t\n\t\t\t// c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for method listByCatalog(String). Ensures it filters out hidden price lists if flag is set to false. | @DirtiesDatabase
@Test
public void testListByCatalogCode() {
createHiddenAndNonHiddenPLA();
assertEquals(TOTAL_NUMBER_OF_PLAS_IN_SYSTEM_SHOULD_BE_2, 2,
plaService.listByCatalog(CATALOG_CODE, true).size());
assertEquals(ONLY_1_NON_HIDDEN_PLA, 1,
plaService.listByCatalog(CATALOG_CODE, false).size());... | [
"List<PriceListDescriptorDTO> listByCatalog(final Catalog catalog, final boolean includeHidden);",
"@DirtiesDatabase\n\t@Test\n\tpublic void testListByCatalogAndPriceListName() {\n\t\tcreateHiddenAndNonHiddenPLA();\n\t\t\n\t\tassertEquals(TOTAL_NUMBER_OF_PLAS_IN_SYSTEM_SHOULD_BE_2, 2, \n\t\t\t\tplaService.listByC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the metadata factory for a particular plugin. In particular, getMetadataFactory("Fem") returns this. | Object getMetadataFactory(String prefix); | [
"DatastoreMetadataFactory<EntityMetadata, Discriminator> getMetadataFactory();",
"MetaDataManager getMetaDataManager();",
"public MetadataResourceFactory getMetadataResourceFactory(String mime) \n\tthrows MetadataConfigurationException {\n\t\tString key = mime.toLowerCase();\n\t\treturn getFactoryInstance(null,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests linebyline if two files are equal. If one file contains extra blank lines at the end of the file, the two are still considered equal. This test will pass even if the files are generated from different base directories, and hence have slightly different absolute paths. | public static boolean testFiles(Path path1, Path path2) {
Charset charset = java.nio.charset.StandardCharsets.UTF_8;
try (
BufferedReader reader1 =
Files.newBufferedReader(path1, charset);
BufferedReader reader2 =
Files.newBufferedReader(path2, charset);
) {
String line1 = reader1.readLine();
... | [
"void assertFilesIdentical(File file1, File file2) throws Exception {\n\n // this asserts the file was created\n file2 = new File(file2.getAbsolutePath());\n Assert.assertTrue(file2.exists());\n\n // now assert contents are byte-wise identical\n FileInputStream localFis, remoteFis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: takeRole Parameter(s): Method takes a Role which will be the players new role. Responsibilities: Method is responsible for setting players role and role taken boolean. Return(s): nothing | public void takeRole(Role currentRole){
roleTaken = true;
playerRole = currentRole;
} | [
"public void tryTakeRole() {\n if (currentPlayer.isEmployed() == false) {\n if(currentPlayer.getLocation().getName() == \"office\" || currentPlayer.getLocation().getName() == \"trailer\"){\n view.showPopUp(currentPlayer.isComputer(), \"You are currently in the \" + currentPlayer.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first dm history enterrise in the ordered set where enterpriseCode = &63;. | public static vn.dtt.duongbien.dao.vrcb.model.DmHistoryEnterrise findByEnterpriseCode_First(
java.lang.String enterpriseCode,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
vn.dtt.duongbien.dao.vrcb.NoSuchDmHistoryEnterriseExcepti... | [
"public static vn.dtt.duongbien.dao.vrcb.model.DmHistoryEnterrise fetchByEnterpriseCode_First(\n\t\tjava.lang.String enterpriseCode,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence()\n\t\t\t\t .fe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends a chunk to the process log. Automatically calculates the chunk's range. | public PgIntRange append(ProcessKey processKey, byte[] data) {
UUID instanceId = processKey.getInstanceId();
Timestamp createdAt = processKey.getCreatedAt();
ProcessLogsRecord r = txResult(tx -> tx.insertInto(PROCESS_LOGS)
.columns(PROCESS_LOGS.INSTANCE_ID,
... | [
"private void addChunk(Invoker chunk) {\n chunks.add(chunk);\n }",
"public void appendData(byte[] chunk) throws ProgramException {\n state.set(addrDataTail, chunk);\n addrDataTail += chunk.length;\n }",
"void log(byte[] buffer, int start, int count) throws IOException;",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resend Signup code Failure | private Response.ErrorListener signUpCodeResendErrorListener(final ReSendSignUpCodeListener reSendSignUpCodeListener) {
return new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
if (reSendSignUpCodeListener != null) {
... | [
"public void resendOTP() {\n alertDialog.dismiss();\n showSnackbar(\"Resending OTP\");\n\n PhoneAuthOptions authOptions = PhoneAuthOptions.newBuilder(mFirebaseAuth)\n .setPhoneNumber(getString(R.string.country_code) + userInfo.getPhone())\n .setTimeout(60L, TimeUni... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "TimeCode" element | public void setTimeCode(com.microsoft.schemas.crm._2011.contracts.TimeCode.Enum timeCode)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TI... | [
"public void xsetTimeCode(com.microsoft.schemas.crm._2011.contracts.TimeCode timeCode)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.crm._2011.contracts.TimeCode target = null;\r\n target = (com.microsoft.schemas.crm._2011.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |