query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Handles user update requests when the user form is submitted by modifying the currently authenticated user's entry with the values in the form.
@RequestMapping(value = "/user", method = RequestMethod.POST, consumes = APPLICATION_FORM_URLENCODED_VALUE) public String updateUser(@RequestParam Map<String, String> parameters, Model model) { String username = SecurityContextHolder.getContext().getAuthentication() .getName(); ...
[ "void updateUser(User user);", "public void updateUser(LoginDetails loginDetails) {\n //update the user and his login details\n thisUser = Requests.instance.loginRequest(loginDetails);\n\n //update the field values on the homepage dashboard\n circleProfile.setFill(new ImagePattern(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Board/PaintingBoardOperations.java . Generated by the IDLtoJava compiler (portable), version "3.2" from Board.idl Wednesday, April 17, 2013 3:31:24 PM CEST
public interface PaintingBoardOperations { Board.Figure createFigure (String type, Board.Parameters params) throws Board.FigureNameNotExists, Board.FigureWrongParameters; Board.Figure removeFigure (Board.Figure figure) throws Board.FigureNotExists; void register (String name, Board.Listener listener) throws Boar...
[ "void drawBoard(Board board);", "void paintBoard(Graphics g, Component component, int x, int y, int width, int height);", "public interface InteractiveBoard extends BasicComponent,\n BoardListener, MainClientListener {\n\n /** Board id */\n public final int BOARD_ID = -100;\n\n /** Delta between...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Output the structure of notepad (notes) into Stream
public void showNotes(PrintStream outputStream) { for (int i = 0; i < _notes.length; i++) { if (_notes[i] != null) outputStream.println((i + 1) + "\t" + _notes[i].getNoteField().toString()); } outputStream.close(); }
[ "public static void displayTextNotes()\n\t{\n\t\tArrayList<TextNote> textNotes=getAllTextNotes();\n\t\tint counter=1;\n\t\tSystem.out.println(\".............\");\n\t\tfor(TextNote i:textNotes)\n\t\t{\n\t\t\tSystem.out.println(\"Text Note \"+(counter++)+\": \" +i.getText());\n\t\t}\n\t\tSystem.out.println(\"...........
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of deleteRepair method, of class RMAbuddyModel.
@Test public void testDeleteRepair() { System.out.println("deleteRepair"); int aId = 0; RMAbuddyModel instance = new RMAbuddyModel(); instance.deleteRepair(aId); // TODO review the generated test code and remove the default call to fail. fail("The test case is ...
[ "@Test\r\n public void testDeleteClient() {\r\n System.out.println(\"deleteClient\");\r\n RMAbuddyModel instance = new RMAbuddyModel();\r\n instance.deleteClient();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
stack: [0] getStackTrace [1] render [2] metodo que llamo a render
protected void render() { String accion = Thread.currentThread().getStackTrace()[2].getMethodName(); render(accion); }
[ "protected void render(){}", "@Override\n public void render(WebResponse<T> model, HttpServletRequest request, HttpServletResponse response) throws Exception {\n renderHeader(model, request, response);\n renderBody(model, request, response);\n }", "String render();", "void render(HttpServletRequest re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unlike a given photo. This removes the photo as favorite in database and sends a post to unsplash api.
public static void unlikePhoto(Context context, String photoId) { Intent intent = new Intent(context, PhotoManagement.class); intent.setAction(ACTION_UNLIKE_PHOTO); intent.putExtra(EXTRA_PHOTO_ID, photoId); context.startService(intent); }
[ "private void handleUnlikePhoto(String photoId) {\n // get api service\n UnsplashAPI api = UnsplashService.create(UnsplashAPI.class, this);\n Call<ResponseBody> call = api.unlikePhoto(photoId);\n try {\n Response response = call.execute();\n if (response.isSuccessfu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of all versions of the resource located at the given path. Version paths are returned in the form /projects/resource?v=12
String[] getVersions(String path) throws RepositoryException;
[ "List<OcflVersionInfo> listVersions(final String resourceId);", "@GET(\"glossary/versions\")\n Call<List<GlossaryVersion>> versions();", "public ArrayList<Version> getListVersions(String pathFs)\n\t{\n\t\tArrayList<Version> versions = new ArrayList<Version>();\n\t\tPreparedStatement ps = null;\n\t\tResultSet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
History Date : 2019. 2. 15. Developer : devmrko create JWT refresh token
public String generateJwtRefreshToken() { logger.debug("### ### ### generateJwtRefreshToken"); Claims claims = Jwts.claims(); claims.put("refreshTokenId", UUID.randomUUID().toString()); return Jwts.builder().setClaims(claims).signWith(SignatureAlgorithm.HS512, JWT_SECRET).compact(); }
[ "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.................................. Construct a new DInt32.
public DInt32 newDInt32() { return new asciiI32(); }
[ "public DInt32 newDInt32(String n) {\n return new DInt32(n);\n }", "public DUInt32 newDUInt32() {\n return new DUInt32();\n }", "public DInt32 newDInt32(String n) {\n return new asciiI32(n);\n }", "IntValue createIntValue();", "public DUInt32 newDUInt32() {\n return new asciiUI32();\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ if the user name has been found, it would reset the game stats of the user.
public void resetPlayerStats(String userName) { int exist = searchPlayer(userName); if (exist < CommonConstant.NOTFOUND) { System.out.println(ErrorMessage.NOTEXIST); } else { playerTable[exist].setGamePlayed(CommonConstant.RESET); playerTable[exist].setGameWon(CommonConstant.RESET); playerTable[exist]...
[ "public void setUsername(String name)\r\n {\r\n int index = -1;\r\n //Check if the new username is not already taken before setting the new username\r\n if(usernamesTaken.indexOf(name) == -1)\r\n {\r\n index = usernamesTaken.indexOf(this.username);\r\n usernamesT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Simplified method form for invoking the GetTemplateSummary operation.
java.util.concurrent.Future<GetTemplateSummaryResult> getTemplateSummaryAsync();
[ "@GET\n\t\t\t@Path(\"/{id}/summary\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getDifficulttasksSummaryRows() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new DifficulttasksDao(uriInfo,header).getDifficulttasksSummaryRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of parsePathNodeSet method, of class PathNodeSet.
@Test public void testFromString() { System.out.println(); System.out.println("* PathNodeSetTest: testFromString()"); String _string = "628:1.8|625:0.1|624:0.3|623:0.6"; PathNodeSet instance = PathNodeSet.fromString(_string); assertNotNull(instance); System.out.printl...
[ "@Test\n public void testAddNode() {\n System.out.println();\n System.out.println(\"* PathNodeSetTest: testAddNode()\");\n String _string = \"628:1.8|625:0.1|623:0.6|620:0.4\";\n PathNodeSet instance = PathNodeSet.fromString(_string);\n assertNotNull(instance);\n System....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the contract ID for the specified point in time.
public T getContractID(long timeStamp) { for (ContractPeriod contractPeriod : contractPeriods) { if (contractPeriod.covers(timeStamp)) { return contractPeriod.getContractID(); } } return null; }
[ "public Long getContractId() {\n return contractId;\n }", "Optional<Integer> getId(Point coordinate);", "public int getContractId() {\n return contractId;\n }", "public Integer getContractId() {\n return contractId;\n }", "@Override\n\tpublic java.lang.String getContractId() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configure how the mini fluo will run.
private FluoConfiguration createFluoConfig() { final FluoConfiguration config = new FluoConfiguration(); config.setMiniStartAccumulo(false); config.setAccumuloInstance(instanceName); config.setAccumuloUser(clusterInstance.getUsername()); config.setAccumuloPassword(clusterInst...
[ "public static void configure(){\r\n\t\t// Finalize FancyMotors\r\n\t\tshooterAngleMotor.setPositiveLimit(RobotSensors.limitShooterB);\r\n\t\tclimbWinch.setPositiveLimit(RobotSensors.limitWinchA);\r\n\t\t\r\n\t\t// Relays\r\n\t\tcompressor.setDirection(Relay.Direction.kForward);\r\n\t\tclimbWinchSolenoid.setDirecti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Write a program that reads a twodimensional array of integers and determines whether it is a magic square (that is, whether the sum of all rows, all columns, and the diagonals is the same). Accept lines of input that you break up into individual integers, and stop when the user enters a blank line. For example, with ...
public static void Task14() throws IOException { Scanner in = new Scanner(System.in); String input = null; int size = 0; int counter = 0; int counter2 = 0; int [] arr; int [][] arrAll = null; while (in.hasNextLine() ) { inpu...
[ "public boolean magic() {\n for (int x = 0; x < square.length; x++) {\n if (sumRow(x) != sumRow(0)) {\n return false;\n }\n if (sumCol(x) != sumCol(0)) {\n return false;\n }\n }\n if (sumMainDiag() != sumOtherDiag()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies meeting attributes into builder.
public MeetingBuilder(Meeting meetingToCopy) { this.title = meetingToCopy.getTitle(); this.description = meetingToCopy.getDescription(); this.from = meetingToCopy.getFrom(); this.to = meetingToCopy.getTo(); this.contacts = meetingToCopy.getContacts(); this.location = meet...
[ "@NotNull public static MeetingRoom.Builder meetingRoom() { return new MeetingRoom.Builder(new HashMap<String,Object>()); }", "public MeetingBuilder() {\n this.title = new Title(DEFAULT_TITLE);\n this.description = new Description(DEFAULT_DESCRIPTION);\n this.from = new From(DEFAULT_FROM);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an entry in the cache if it exists and hasn't expired. Otherwise returns null.
public T getEntry(String key) { InMemoryCacheItem<T> value = cache.get(key); if ( value != null ) { if ( value.time_added + time_to_live_ms > System.currentTimeMillis() ) { stats.hits++; logger.trace(getCacheStats()); return value.item; } else { //timed out stats.removals++;...
[ "public Object get(String key) {\n\n CacheObject cacheObject = cache.get(key).get();\n if (!cacheObject.isExpired()) {\n cacheObject.updateUseTime();\n return cacheObject.getValue();\n } else {\n cache.remove(key);\n queue.add(cacheObject);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the file offset of the end of central directory record.
private long getCentralDirectoryEndOffset() throws IOException { long fileSize = dataInputSource.getSize(); byte[] signature = ZipUtil.intToLittleEndian(EndOfCentralDirectoryRecord.SIGNATURE); byte[] buffer = new byte[(int) Math.min(64, fileSize)]; int readLength = buffer...
[ "long getFileOffset();", "private long recNoToLocationInFile(int recNo) {\n long offset = 70;\n offset += (recNo - 1) * DBRecord.RECORD_LENGTH;\n\n if (offset > databaseLength) {\n\n offset = -1;\n }\n\n return offset;\n }", "public long getLast() {\r\n\t\tlong b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column Obsr_NewBorn_BirthProcessSummary.LastModifier_Code
public String getLastmodifierCode() { return lastmodifierCode; }
[ "public void setLastmodifierCode(String lastmodifierCode) {\n this.lastmodifierCode = lastmodifierCode == null ? null : lastmodifierCode.trim();\n }", "public Date getLastChanged() {\n return (Date) jdbcTemplate.query(\"select max(a) as last_edited from (select max(plat.last_edited) as a from nmd...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.google.protobuf.BoolValue are_system_messages = 4;
com.google.protobuf.BoolValueOrBuilder getAreSystemMessagesOrBuilder();
[ "com.google.protobuf.BoolValue getAreSystemMessages();", "boolean hasAreSystemMessages();", "com.whiuk.philip.mmorpg.shared.Messages.ClientMessage.SystemDataOrBuilder getSystemDataOrBuilder();", "@java.lang.Override\n public boolean getIsSystemMessage() {\n return isSystemMessage_;\n }", "boole...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start SAM worker task.
void startSAMWorkerTask();
[ "public synchronized void start() {\n\n if (task.isDone()) {\n task = scheduler.submit(runnable);\n }\n }", "Boolean startTask(TaskDef task) throws OpenXDataException;", "public void start() {\n // logger.info(\"Starting\");\n control.currentTask = control.subTasks.get(0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A basename is the final component of a pathname. If a java program is run from a jar, the classpath is the pathname of the jar.
static String get_jarname () { String jarpath = getProperty ("java.class.path"); int lastslash = jarpath.lastIndexOf ('/'); if (lastslash < 0) return jarpath; return jarpath.substring (lastslash + 1); }
[ "protected static String findJarName(String fileName, String[] classpath) {\n if (classpath == null) {\n return new File(fileName).getName();\n }\n fileName = fileName.replace(File.separatorChar, '/');\n\n // longest match comes first\n SortedMap<String, String> matches...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads all keywords related to this frequent item to the keyword related list
public void loadKeywordsRelated(ArrayList<String> allkeywords){ ArrayList<String> keywordList; int equalKeys = 0, i=0; Keyword kwRelated; if (!allkeywords.isEmpty()) for (String keyword : allkeywords){ keywordList = processWord(keyword, " "); for (...
[ "public void mapFrequentItem(ArrayList<String> allKeywords, OntologyInteractionImpl oi) {\n ArrayList<String> freqItLst, keyWrdLst;\n Keyword kw = new Keyword(\"\");\n \n // get all concepts related to this frequent item\n \n // compare frequent item with all keyword list t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Has to return all the types generated by partition scanner. The SourceViewer will ignore doubleclicks and any other configuration behaviors inside any partition not declared here
@Override public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) { return new String[] { IDocument.DEFAULT_CONTENT_TYPE, IPilarPartitions.PILAR_SINGLELINE_COMMENT, IPilarPartitions.PILAR_MULTILINE_COMMENT, IPilarPartitions.PILAR_MULTILINE_STRING, IPilarPartitions.PILAR_SINGLELINE_STRING1,...
[ "@Override\n\tpublic String[] getConfiguredContentTypes(final ISourceViewer sourceViewer)\n\t{\n\n\t\treturn new String[] {IDocument.DEFAULT_CONTENT_TYPE,\n\t\t\tAPIPartitionScanner.API_COMMENT, APIPartitionScanner.API_KEYWORD};\n\t}", "@Override\n\tpublic String[] getConfiguredContentTypes(ISourceViewer sourceVi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called for each header message
public abstract void onHeader(String headerName, AMFData data);
[ "private void setupHeader(Message msg) throws MessagingException {\n }", "private static void parseHeader(Message msg, Vector header)\r\n\t{\r\n\t\theader = foldHeader(header);\r\n\t\t\r\n//\t\tLog.info(\"******folded header******\");\r\n//\t\tfor(int x = 0; x < header.size(); x++)\r\n//\t\t{\r\n//\t\t\tLog.in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles StaticImage input verification and returns the appropriate StaticImage object based on the input. xPos AND yPos must be positive or will default to 0 for both, hitWidth and hitHeight must be positive or will default to 0 for both. Null or empty string for image path will result in a default image being used.
public static StaticImage makeImage(int xPos, int yPos, int hitWidth, int hitHeight, String imgPath, boolean testing){ if(imgPath != null && imgPath.length() > 0){ if(xPos >= 0 && yPos >= 0){ if(hitWidth >= 0 && hitHeight >= 0) return new StaticImage(x...
[ "private void checkImage()\n {\n if(this.c.isVisible())\n {\n switch(this.c.getValue())\n {\n case 0:\n this.image = EMPTY;\n break;\n case 1:\n this.image = ONE;\n break;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleComparison" $ANTLR start "ruleComparison" ../emfviews.dsl.ui/srcgen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:321:1: ruleComparison : ( ( rule__Comparison__Group__0 ) ) ;
public final void ruleComparison() throws RecognitionException { int stackSize = keepStackSize(); try { // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:325:2: ( ( ( rule__Comparison__Group__0 ) ) ) // ../emfviews.dsl.ui...
[ "public final void ruleComparison() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blase...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An audience attribute defined by a gender. .google.ads.googleads.v14.common.GenderInfo gender = 2;
com.google.ads.googleads.v14.common.GenderInfo getGender();
[ "com.google.ads.googleads.v0.common.GenderInfo getGender();", "com.google.ads.googleads.v14.common.GenderInfoOrBuilder getGenderOrBuilder();", "com.madhouse.media.momo.MomoExchange.BidRequest.User.Gender getGender();", "public Gender(String gender) {\n this.gender = gender;\n }", "public void setG...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the BiggerThanZero constraint of 'Measure'.
public boolean validateMeasure_BiggerThanZero(Measure measure, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate(MusicMetamodelPackage.Literals.MEASURE, measure, diagnostics, context, "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "BiggerThanZero", MEASURE__BIGGER_THAN_ZER...
[ "public boolean equalsZero(){\r\n\t\treturn lengthSquared() > minFloat;\r\n\t}", "private static boolean containsMinMaxZero(MolecularNode molNode) {\n\t\tboolean min = false;\n\t\tboolean max = false;\n\t\tNodeSet nodeSet;\n\t\tDownCable dCable = molNode.getDownCableSet().getDownCable(\"min\");\n\t\tif (dCable !=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for an embedded collection of PC objects.
public void testEmbeddedCollection() throws Exception { if (!storeMgr.getSupportedOptions().contains(StoreManager.OPTION_ORM_EMBEDDED_COLLECTION)) { return; } try { PersistenceManager pm = pmf.getPersistenceManager(); Trans...
[ "public void testEmbeddedPCObject() \r\n throws Exception\r\n {\r\n if (!storeMgr.getSupportedOptions().contains(StoreManager.OPTION_ORM_EMBEDDED_PC))\r\n {\r\n return;\r\n }\r\n\r\n try\r\n {\r\n PersistenceManager pm = pmf.getPersistenceManager();\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Artefact__Group__4" $ANTLR start "rule__Artefact__Group__4__Impl" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10833:1: rule__Artefact__Group__4__Impl : ( ( rule__Artefact__Group_4__0 )? ) ;
public final void rule__Artefact__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10837:1: ( ( ( rule__Artefact__Group_4...
[ "public final void rule__Artefact__Group_4__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10990:1: ( rule__Artefact...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 market_marketable_restriction = 24;
boolean hasMarketMarketableRestriction();
[ "int getMarketMarketableRestriction();", "int getMarketTradableRestriction();", "@java.lang.Override\n public int getMarketMarketableRestriction() {\n return marketMarketableRestriction_;\n }", "@java.lang.Override\n public int getMarketMarketableRestriction() {\n return marketMarketabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the number of servants.
public int getNumberOfServants(int numberOfServants) { return numberOfServants; }
[ "public int getNumberOfServings() { return numberOfServings; }", "public int getServings() {\n return mServings;\n }", "@Override\n\tpublic int getWeathersCount() {\n\t\treturn _weatherLocalService.getWeathersCount();\n\t}", "public int getNumTenters(){\n\n\t\t//return the number of tents\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form SettingsMainView
public SettingsMainView() { initComponents(); Adaptation.automaticallySetRuntime(this); Adaptation.automaticallyAdapt(this); selecteButton(generalButton); showPanel(new AdaptableGeneralSettingsView()); }
[ "public StartSettingsView() {\n\n super();\n super.setTitle(\"Settings\");\n\n this.createPatientsComboBox();\n this.createButtons();\n\n super.setLayouts(0.2f, 0.2f,0,0.6f);\n\n\t}", "public MainView(IMainController controller, ISettingsModel model) {\n\n mMainController...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delegate the current mode to get the strategy to choose a next hut token according to the current game mode.
public MINextHutTokenStrategy getNextHutIdStrategy() { return modeState.getNextHutIdStrategy(); }
[ "public SwerveMode nextMode() {\n return values()[(ordinal() + 1) % values().length];\n }", "public IGetNextIdStrategy getNextHutTokenIdToFaceUpStrategy() {\n return modeState.getNextHutTokenIdToFaceUpStrategy();\n }", "public MINextForestTokenStrategy getNextForestTokenStrategy(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests getNames(). Tests with no registered APIs. Everything else is tested along with other methods.
public void testGetNames() { String[] names = ram.getNames(); assertNotNull("getNames() should not return null", names); assertEquals("Did not expect any APIs to be registered", 0, names.length); }
[ "@Test\n\tvoid testGetAllByName() {\n\t\tList<Plant> plant = service.getAllByName(\"Tulsi\");\n\t\tString name = plant.get(0).getName();\n\t\tassertEquals(\"Tulsi\", name);\n\t}", "public void testGetNames() throws Exception {\r\n\r\n insertDefaultUsers();\r\n\r\n // Compare the actual names to an e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the wrapper type used by the plugin
public PlayerPluginWrapperType getWrapperType() { return wrapperType; }
[ "public static String getWrapType(Wrap wrap) {\n return wrap.getWrapName();\n }", "public String getWrapperManagerClassName();", "Class getWrappedClass();", "String getWidgetType();", "public ItemPlugin getItemPlugin() {\r\n return getConfiguration(\"wrapper\", null);\r\n }", "public b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the most visited destination
public Destination recommendMostVisitedDestination(){ return this.destinationStatistics.entrySet().stream().max((entry1, entry2) -> entry1.getValue().get(0) > entry2.getValue() .get(0)? 1: -1).get().getKey(); }
[ "public Destination recommendMostDesiredDestination(){\n return this.destinationStatistics.entrySet().stream().max((entry1, entry2) ->\n entry1.getValue().get(1) > entry2.getValue()\n .get(1)? 1: -1).get().getKey();\n }", "public Road getDestination(){\n\t\treturn this.route.getLast();\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a string, return true if "bad" appears starting at index 0 or 1 in the string, such as with "badxxx" or "xbadxx" but not "xxbadxx". The string may be any length, including 0.
public boolean hasBad(String str) { String word = "bad"; int indexOf = str.lastIndexOf(word); return indexOf == 0 || indexOf == 1; }
[ "public boolean hasBad(String str) {\n return str.indexOf(\"bad\") == 0 || str.indexOf(\"bad\") == 1;\n }", "public boolean hasBad(String str) {\n if (str.length() < 3) return false;\n if (str.length() == 3 && !(str.substring(0).equals(\"bad\"))) return false;\n return (str.substring(0,3).equals(\"bad\") |...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function shall store current states of nodes of all layers at the last element of a history array.
public abstract void storeNodesHistory();
[ "public abstract void getNodesHistory(layer_type_E layer_type, double[][] history);", "public abstract void getNodesHistory(int idx_element, layer_type_E layer_type, double[] storage);", "private void copyStateToLast(){\n \tint numC = manager.getNumConditions();\n \tfor(int c=0; c<numC; c++){\n \t\tfor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compare model from XML with target mode from DB, including sub model only existing DB.
private static ConflictResultModel compareModel(Object entity, Context context, ConflictResultModel result, boolean isSave) { //Entity already exist comparing result, it can be reused. if (result.getResult() != null) { return result; } Map<Object, Map<String, List<?>>> sourceTargetGroup = (Map<Object, Map...
[ "private void compare(Model model1, Model model2) {\n if(model1.score != model2.score) return;\n Article article1 = model1.article;\n Article article2 = model2.article;\n \n Meta meta1 = article1.getMeta();\n Meta meta2 = article2.getMeta();\n \n String hlTitle1 = meta1.getPropertyValue(\"hl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assigns all volunteers to breaks, avoiding the first two shifts of the day and the last where possible Pre: stationToIndex contains a key "br" representing the break indices schedule is not already filled TODO: Eventually add support for volunteers working full days, giving them two breaks before the end
public void scheduleBreaks() { TreeSet<Volunteer> volTree = new TreeSet<Volunteer>(); for (Volunteer v : volunteers) { volTree.add(v); } Iterator<Volunteer> vols = volTree.iterator(); TreeSet<Integer> breakSet = stationToIndex.get("br"); ArrayList<Integer> breakIndices = new ArrayList<Integer>(breakSet)...
[ "public void schedule () {\n\t\t// Step 1: Set up a priorityQueue of volunteers\n\t\tPriorityQueue<Volunteer> vols = new PriorityQueue<Volunteer>(volToId.keySet());\n\t\tHashSet<Volunteer> volsOnBreak = new HashSet<Volunteer>(); // Volunteers on break to be ignored for a loop\n\t\t\n\t\t// Now, for each row in the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find a set of beans by query.
public List<RapidBean> findBeansByQuery(final String queryString) { return new Query(queryString).findBeans(this); }
[ "public List<RapidBean> findBeansByQuery(final Query query) {\n\t\treturn query.findBeans(this);\n\t}", "public RapidBean findBeanByQuery(final String squery) {\n\t\treturn new Query(squery).findBean(this);\n\t}", "public RapidBean findBeanByQuery(final Query query) {\n\t\treturn query.findBean(this);\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of findById method, of class CardDao.
@Test public void testFindById() { Card newCard = new Card(); newCard.setQuestion("This is the question."); newCard.setAnswer("This is the answer."); cardDao.save(newCard); Card fromDao = cardDao.findById(newCard.getId()); assertEquals(fromDao, newCard); }
[ "@Test\r\n public void testFindById() {\r\n System.out.println(\"findById\");\r\n EmpresaDAO instance = new EmpresaDAO();\r\n Empresa expResult = null;\r\n Empresa result = instance.findById(3);\r\n }", "@Test\n\tpublic void f_findByIdTest() {\n\t\tSystem.out.println(\"**********...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the battery cell object with the initialized voltage.
public DJIBatteryCell (int voltage) { _voltage = voltage; }
[ "public Battery getBattery();", "public Byte getBattery() {\n return battery;\n }", "public FuelCell() {\n fuelCellMot = new VictorSPX(fuelCellConstants.fuelCellMot);\n raiseHopper = new Solenoid(driveConstants.PCM, fuelCellConstants.raiseHopper);\n lowerHopper = new Solenoid(driveConstants.P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set max bytes per second
public GuavaThrottleImpl setMaxBytesPerSecond(long maxBytesPerSecond) { checkMaxBytesPerSecond(maxBytesPerSecond); this.maxBytesPerSecond = maxBytesPerSecond; rateLimiter = RateLimiter.create(maxBytesPerSecond); return this; }
[ "public void setBytesReadPerSecondMax(Double bytesReadPerSecondMax) {\n this.bytesReadPerSecondMax = bytesReadPerSecondMax;\n }", "public void setMaxDownloadSpeed(long maxDownloadSpeed);", "public void setMaxUploadSpeed(long maxUploadSpeed);", "public void setBytesBackupPerSecondMax(Double bytesBackupPerS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a list of all variables in this object. TODO: must override in RubyModule to pick up constants
public List<Variable<Object>> getVariableList() { Map<String, RubyClass.VariableAccessor> ivarAccessors = getMetaClass().getRealClass().getVariableAccessorsForRead(); ArrayList<Variable<Object>> list = new ArrayList<Variable<Object>>(); for (Map.Entry<String, RubyClass.VariableAccessor> entry...
[ "public List<String> getVariableNameList() {\n Map<String, RubyClass.VariableAccessor> ivarAccessors = getMetaClass().getRealClass().getVariableAccessorsForRead();\n ArrayList<String> list = new ArrayList<String>();\n for (Map.Entry<String, RubyClass.VariableAccessor> entry : ivarAccessors.e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a collection of SkillControllers wrapping the given employee's skills.
private void buildSkillControllers(Collection<SkillAssociation> employeeSkills) { if (!visitorConnected || visitor.getId() != employee.getId()) { buildControllerUpdaters(employeeSkills); } else { // Otherwise, using a controller remover. buildControllerRemovers(employ...
[ "List<AssociateSkillDTO> findAssociateSkills(Long associateId);", "public List<Employee> findEmployeesForServiceBySkills(Set<EmployeeSkill> skills) {\n Set<EmployeeSkill> employeeSkills = skills;\n List<Employee> employeeAvailable = new ArrayList<>();\n\n List<Employee> allEmployees = employe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ToEdit.setEnabled(false); ToEdit.setText("No Network"); converterText1.setText("No Network...");
@Override protected void onCancelled() { flipText("No Network..."); converterSourceText.setText(""); converterDateText.setText(""); converterProgress1.setVisibility(View.INVISIBLE); FromSpinner.setEnabled(true); ToSpinner.setEnabled(true); swapImage.setEnabled(tru...
[ "private void disableOtherTipEditText()\n {\n // etOtherTip = (EditText)findViewById(R.id.etOtherTip);\n etOtherTip.setEnabled(false);\n etOtherTip.setInputType(InputType.TYPE_NULL);\n etOtherTip.setFocusableInTouchMode(false);\n etOtherTip.setText(\"\");\n etOtherTip.cle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clicks Alert confirm button
public void clickJsConfirmButton() { clickElement(btnJsAlertConfirm); }
[ "public void clickOnConfirmButton() {\n\t\ttry{\n\t\tobjAndroidGenericMethods.clickOnAndroidElement(getConfirmButton(), \"ConfirmButton\");}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"'One Size' product\");\n\t\t}\n\t}", "public void alertOk()\n {\n Base.driver.switchTo().alert().accept();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "stat_seq" cs4240_team1/Tiger.g:205:1: stat_seq : ( stat )+ ;
public final TigerParser.stat_seq_return stat_seq() throws RecognitionException { TigerParser.stat_seq_return retval = new TigerParser.stat_seq_return(); retval.start = input.LT(1); CommonTree root_0 = null; ParserRuleReturnScope stat70 =null; try { // cs4240_team1/Tiger.g:206:5: ( ( stat )+ ) // cs...
[ "public final void prog() throws RecognitionException {\n try {\n // Expr.g:3:5: ( ( stat )+ )\n // Expr.g:3:9: ( stat )+\n {\n // Expr.g:3:9: ( stat )+\n int cnt1=0;\n loop1:\n do {\n int alt1=2;\n int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new WriteBluetoothNfc.
public WriteBluetoothNfc(@Nullable TaskCallback taskCallback, @NotNull OpCallback opCallback, @NotNull NfcWriteUtility nfcWriteUtility) { super(taskCallback, opCallback, nfcWriteUtility); }
[ "public WriteBluetoothNfc(TaskCallback taskCallback) {\n super(taskCallback);\n }", "public WriteBluetoothNfc(@Nullable TaskCallback taskCallback, @NotNull OpCallback opCallback) {\n super(taskCallback, opCallback);\n }", "Characteristic createCharacteristic();", "private void createNfcMan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the running parameter so the game knows if this screen should be displayed
private void setRunning(boolean run) { running = run; }
[ "public void setGameRunning()\n {\n gameStatus = GameStatus.GAME_RUNNING;\n }", "public void setRunning(boolean value) {\r\n this.running = value;\r\n }", "private void setRunning(PImage proc) {\n\t\tcurrentPID = proc.getPID();\n\t\tproc.setState(2);\n\t}", "private void setRunning(bool...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the address line 2.
public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; }
[ "public void setAddressLine2(String addressLine2) {\n this.addressLine2 = addressLine2;\n }", "public void setAddressLine2(String value) {\n setAttributeInternal(ADDRESSLINE2, value);\n }", "public void setAddressline2(String addressline2) {\n this.addressline2 = addressline2;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO refactor all code into DBHelper Seeds database with all pokemon: having 0 candies and their static candies to evo amount
private void seed(){ int[] candiesToEvoList = c.getAllCandiesToEvo(); // complete list from res for (int i = 0; i < 151; i++){ mydb.insertEntry(ALL_POKEMON[i],0,candiesToEvoList[i]); } }
[ "public int putPokemons(int numPokemon) {\n\n Pokemon currentP = null;\n List<PokemonMove> pMoves = null;\n int pWeight = -1, accuracy = -1, stored = 0;\n List<PokemonType> pTypes = null;\n Move currentM = null;\n\n System.out.println(String.format(\"INFO: Request to store ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the VAT percentage for this product
public void setVat(double vat) { this.vat = vat; }
[ "public void setVAT_PERCENTAGE(BigDecimal VAT_PERCENTAGE) {\r\n this.VAT_PERCENTAGE = VAT_PERCENTAGE;\r\n }", "public BigDecimal getVAT_PERCENTAGE() {\r\n return VAT_PERCENTAGE;\r\n }", "Float getVatPercentage();", "public void setTaxPercentage(double newTax) {\n tax = newTax;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Decrypts the encrypted content of the given EnvelopedData object for the recipient identified by its recipient certificate.
public byte[] getEnvelopedData(byte[] enc, Key key, X509Certificate recipientCert) throws CMSException, IOException { ByteArrayInputStream bais = new ByteArrayInputStream(enc); EnvelopedData enveloped_data = new EnvelopedData(bais); System.out.println("Information about the encrypted data:"); ...
[ "public byte[] getEnvelopedData(byte[] enc, Key key, KeyIdentifier recipientID) \r\n throws CMSException, IOException {\r\n ByteArrayInputStream bais = new ByteArrayInputStream(enc);\r\n EnvelopedData enveloped_data = new EnvelopedData(bais);\r\n\r\n System.out.println(\"Information about the encrypted ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the float hw1_1000000LOC26method7(short,byte,String) method test.
@Test public void testHw1_1000000LOC26method7_2() throws Exception { short var0 = (short) 1; byte var1 = (byte) 1; String var2 = ""; float result = hw1_1000000LOC26.hw1_1000000LOC26method7(var0, var1, var2); // add additional test code here // An unexpected exception was thrown in user code while execu...
[ "@Test\n\tpublic void testHw1_1000000LOC26method7_1()\n\t\tthrows Exception {\n\t\tshort var0 = (short) 1;\n\t\tbyte var1 = (byte) 1;\n\t\tString var2 = \"\";\n\n\t\tfloat result = hw1_1000000LOC26.hw1_1000000LOC26method7(var0, var1, var2);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first dm history goods in the ordered set where goodsItemCode = &63;.
@Override public DmHistoryGoods findByGoodsItemCode_First(String goodsItemCode, OrderByComparator orderByComparator) throws NoSuchDmHistoryGoodsException, SystemException { DmHistoryGoods dmHistoryGoods = fetchByGoodsItemCode_First(goodsItemCode, orderByComparator); if (dmHistoryGoods != null) { return...
[ "public Item fetchFirstWornItem(long wornCode);", "@Override\n\tpublic DmHistoryGoods fetchByGoodsItemCode_First(String goodsItemCode,\n\t\tOrderByComparator orderByComparator) throws SystemException {\n\t\tList<DmHistoryGoods> list = findByGoodsItemCode(goodsItemCode, 0, 1,\n\t\t\t\torderByComparator);\n\n\t\tif...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Records a value for the histogram
public void value(long value) { client.histogram(name, value, tags); }
[ "public void value(double value) {\n client.histogram(name, value, tags);\n }", "private void histogramScore() {\r\n View.histogram(score, 0, this.getSize().width + 15, 0);\r\n }", "void recordMetric(DataVertical dataType, String tag, int value);", "public void addValue(int v) {\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Purchase some quantity of the item
public void purchase(int qty) { quantity = quantity + qty; total = quantity * price; }
[ "void createPurchase(int itemCode, int PurchaseQuantity) {\n\t\t\n\t}", "public static void purchaseItem(String itemName, int quantity) {\r\n\t\ttry {\r\n\t\t\tStatement purchaseItemsStmt = conn.createStatement();\r\n\t\t\tString purchaseItemsQuery = \"UPDATE ClothesInventory SET quantity = ((SELECT quantity FROM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check to see if a specific event is currently running.
public boolean isEventRunning() { return isEventRunning; }
[ "public static boolean isEventThread()\n {\n ensureAlive(USER);\n return Thread.currentThread()==_thread[USER] || Thread.currentThread()==_thread[SECURITY];\n }", "public boolean isRunning() {\n\t\treturn (fSystemEventHandler != null);\n\t}", "public boolean isSelfMessageProcessingEvent();", "@objid (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove the first Node in the list and return its element.
public Object removeFirst() { if (head == null) return null; Object o = this.head.getElement(); this.head = this.head.getNext(); return o; }
[ "public Tree removeFirst() {\r\n\t\tif (size() == 0) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t}\r\n\t\treturn remove(0);\r\n\t}", "public E removeFirst() {\n\t\tif (head == null)\n\t\t\treturn null;\n\t\tE temp = head.data;\n\t\tif (head == tail)\n\t\t\thead = tail = null;\n\t\telse\n\t\t\thead = hea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Combine multiple RuleSets into one RuleSet.
@Nonnull public static RuleSet combine( @Nonnull final RuleSet... ruleSets ) { final List<Rule> rules = Arrays.stream( ruleSets ) .flatMap( ruleSet -> Stream.concat( ruleSet.getOmitRules().stream(), ruleSet.getKeepRules().stream() ) ) .collect( Collectors.toList() ); return new RuleSet( rules );...
[ "public void addAll(RuleSet rs) {\n \t\trules.putAll(rs.rules);\n \t}", "RuleSetsClient getRuleSets();", "IRuleset add(IRuleset...rules);", "public RuleSet buildRules(Set<OWLAxiom> axioms);", "public LALRRuleSet(Set<Rule> rules)\n {\n super(rules);\n }", "public ArrayList<RuleSet> getRuleSets() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This class is used to subclass a CommandResult.
protected ObjectResponse(final CommandResult result) { this(result.getResult()); }
[ "public CommandResult(String result) {\n this.result = result;\n }", "public CommandResult(String message) {\n this.message = message;\n }", "public abstract CommandResult execute();", "public interface Command<Ttarget,Tcontext,Tresult>\n{ \n \n /**\n * Execute the Command\n */\n v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move selection to end of line
public void moveSelectionEnd(){ int line = mCursor.getLeftLine(); setSelection(line, getText().getColumnCount(line)); }
[ "public void processEndOfSelectionManipulation();", "public void moveCursorToEnd();", "public void moveSelectionDown(){\n if(mACPanel.isShowing()) {\n mACPanel.moveDown();\n return;\n }\n Cursor c = getCursor();\n int line = c.getLeftLine();\n int column ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
byte that distinguished ID Scan is Nonregulated
@ApiModelProperty(value = "byte that distinguished ID Scan is Non-regulated") @Size(max=1) public String getIdentityScanRegulated() { return identityScanRegulated; }
[ "java.lang.String getMalid();", "public DIGReasonerIdentity getIdentity();", "@MemberGetter public static native int INVALID_UNICHAR_ID();", "java.lang.String getSadid();", "boolean getBinaryCharacteristicIdNull();", "@MemberGetter public static native byte INVALID_UNICHAR(int i);", "void receivedIdenti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Same tail and head vertices equals same hash code.
@Test public void undirectedEdgeWithSymmetricVerticesSameHashCode() throws Exception { Vertex head2 = new Vertex(HEAD_ID); DirectedEdge thirdEdge = new DirectedEdge(tail, head2); assertEquals(edge.hashCode(), thirdEdge.hashCode()); // Symmetric DirectedEdges have different hash codes. DirectedEdge...
[ "@Override\n public int hashCode() {\n if(startVertex.hashCode() > endVertex.hashCode())\n return startVertex.hashCode() + endVertex.hashCode();\n else\n return endVertex.hashCode() + startVertex.hashCode();\n }", "public int equalHashCode() {\n { PropertyList self = this;\n\n { int code...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enter Account Number Textbox
public void enterAccountNumber(String accountNumber) { waitForControl(driver, LiveGuru99.WithdrawallPage.ACCOUNT_NUMBER_TEXTBOX, timeWait); type(driver, LiveGuru99.WithdrawallPage.ACCOUNT_NUMBER_TEXTBOX, accountNumber); sleep(1); }
[ "public void setNacNumberTextField(String value) { nacNumberTextField.setText(value); }", "public void Enter_number(String num) {\n\t\tnumber.sendKeys(num);\n\t}", "public void IDNumber(String number) {\r\n\tpages.Utill().input_text(\"ctl00_ContentPlaceHolder1_txtCreditIdNumber\", number);\r\n\t}", "java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluation of (multiple) condition coverage Returns Hash with test cases for simple condition coverage keys = indices of matrix row, values = test case
public HashMap<Integer, ArrayList> conditionCoverage() { HashMap<String, ArrayList> toggledConditions = new HashMap<>(); Set<Boolean> toggledConditionsResult = new LinkedHashSet<>(); Set<Integer> indicesOfTestCases = new LinkedHashSet<>(); for (String condition : conditionNames) { ...
[ "public static void main(String[] args) throws Exception {\n String[] alternatives = new String[]{\r\n \"IIA1\", \"IIA2\", \"IIA3\", \"IIA4\", \"IIB1\",\r\n \"IIB2\", \"IIB3\", \"IIB4\", \"IIC1\", \"IIC2\",\r\n \"IIC3\", \"IIC4\", \"ZERO\"\r\n };\r\n\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Processes method declaration and returns it as in List of Ast nodes.
@Override public List<Ast> visitMethodDecl(JavaliParser.MethodDeclContext ctx) { String name = ctx.Ident().getText(); String returnType = "void"; if(ctx.type() != null) returnType = ctx.type().getText(); List<String> paramTypes = new ArrayList<String>(); List<String> paramNames = new ArrayList<String...
[ "private void parseMethodDecls()\r\n {\r\n while (current.kind == Kind.TOKEN_PUBLIC) {\r\n parseMethod();\r\n }\r\n return;\r\n }", "private ArrayList<Declaration> addmethoddeclarations(GNode n){\n \t\t// cast to a node\n \t\tNode node = n;\n \t\t//declare a virutal arraylist<Declaration>\n \t\tfi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the polyhedral boundary of the CSG (constructive solid geometry) union of two meshes.
public PolygonalMesh findUnion ( PolygonalMesh mesh0, PolygonalMesh mesh1) { ContactInfo cinfo = findContoursAndRegions ( mesh0, RegionType.OUTSIDE, mesh1, RegionType.OUTSIDE); return createCSGMesh (cinfo); }
[ "public static List<Polygon> splitPolygons(\n List<Polygon> ps1,\n List<Polygon> ps2,\n Bounds b1, Bounds b2) {\n\n System.out.println(\"#ps1: \" + ps1.size() + \", #ps2: \" + ps2.size());\n\n if (ps1.isEmpty() || ps2.isEmpty()) return Collections.EMPTY_LIST;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a key pair generated by the CA, in case the client request such keys (protocol dependent).
void setServerGenKeyPair(KeyPair serverGenKeyPair);
[ "void setServerKey(Key serverKey);", "void setAuthInfoKey(Object key);", "public void setTlsKey(String key);", "public void setTlsKeyPath(String path);", "public void setKey(String key);", "public final void setKeyPair(KeyPair pair)\n throws InvalidParameterException, KeyException\n { }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns Batsman with highest batting average
public Batsman getBatsmanWithHighestAverage() throws IPLAnalyserException { checkEmptyList(batsmanList); Comparator<Batsman> batsmanComparator = Comparator.comparing(Batsman::getAverageScore).reversed(); return sortList(batsmanComparator, batsmanList).get(0); }
[ "public Batsman getBatsmanWithMaximumRunsAndBestAverage() throws IPLAnalyserException {\n checkEmptyList(batsmanList);\n Comparator<Batsman> batsmanComparator = Comparator.comparing(Batsman::getRuns, Comparator.reverseOrder())\n .thenComparing(Batsman::getAverageScore, Comparator.revers...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /ocConfigurations > Create a new ocConfiguration.
@RequestMapping(value = "/ocConfigurations", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void create(@RequestBody OcConfiguration ocConfiguration) { log.debug("REST request to save OcConfiguration : {}", ocConfiguration); ocConfigurationRepository.save(ocConfiguration);...
[ "public com.google.longrunning.Operation createApiConfig(com.google.cloud.apigateway.v1.CreateApiConfigRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateApiConfigMethod(), getCallOptions(), request);\n }", "Configuration createConfiguration();", "o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This API is used to fetch upload request records in Correspondence Action Item based on specified filter and pagination related information.
public SearchResult<CorrespondenceRecordDTO> fetchUploadRequestRecords(CorrespondenceRecordsFilter filter, PaginationInfo pageInfo);
[ "public SearchResult<CorrespondenceRecordDTO> fetchUpdateRequestRecords(CorrespondenceRecordsFilter filter,\n\t\t\tPaginationInfo pageInfo);", "List getFileUploads(HttpServletRequest request) throws ValidationException;", "public static String mediaItemsRequest(MediaItemFilter mediaItemFilter) {\n if (me...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overwrites the data in the hashmap containing TwitterObjects to the given attribute.
public void setTwitter(TwitterObject[] data) { clearTwitter(); for (int i=0; i<data.length; i++) { this.twitterDB.put(data[i].getId(), data[i]); } }
[ "void setDictionaryObjectEntry(String dictionaryObjectEntry);", "public void setAttributes(twitter.AttributesDetails value) {\n this.attributes = value;\n }", "@Override\n protected void setStoredValueForAttribute(Object value, String attribute) {\n LOG.info(\"setStoredValueForAttribute: '\" + attribute...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the contest prefix. It will be used mainly for the jsp path but could be used for other purposes as well. Example: tco07, tccc07, etc.
protected abstract String getContestPrefix();
[ "String getPrefix();", "public String getPrefix() {\n return getPrefix(portletID.getPortletApplicationName(), portletID.getPortletName());\n }", "String getPrefix(Control control);", "public String getPrefix() {\n\t\t//prefix cannot start with 0 or 1, and <= 742\n\t\treturn Integer.toString(rand.nex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the images if the image was saved but the game was not
public void deleteUnusedImages() { File images_folder = new File(System.getProperty("user.dir") + File.separator + "screenshots"); List<File> images = Arrays.asList(images_folder.listFiles()); for (File file : images) { boolean found = false; for (LeaderBoardRow row : l...
[ "private void deleteCurrentImages() {\n\n\t\t/* images can be deleted safely */\n\t\tFile file = new File(pathToImages + prefixCorrectImage + correctPictureID + \".\" + postfixImage);\n\t\tif (file.exists()) {\n\t\t\tfile.delete();\n\t\t}\n\t\tfile = new File(pathToImages + prefixIncorrectImage + incorrectPictureID...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the string to print the gridMap and the minimap
private String midRenderer(){ StringBuilder sb = new StringBuilder(); for (int i = 0; i < gridAndMapArray.length; i++){ // concatenate the string of gridMapAndArray which represente the gridMap and minimap sb.append(gridAndMapArray[i]); if (i>27 && i%2 !=0 && (!gridAndM...
[ "public String printGrid() {\n String s = \"KEY: \\n- (sea) = no boat not shot\"\n + \"\\nM (miss) = no boat SHOT \"\n +\" \\nB (boat) = boat not shot\"\n + \"\\nH (hit) = boat SHOT\"\n + \"\\n***********************************************************\\n\";\n for (int i = 0; i < GRID_DIME...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pauses the timelines when required.
private void pauseTimelines(){ snakeTimeline.pause(); coinTimeline.pause(); blockTimeline.pause(); magnetTimeline.pause(); shieldTimeline.pause(); destructTimeline.pause(); omtimeline.pause(); }
[ "public void pause() {\n timelines.forEach(Timeline::pause);\n }", "public void pause() {\n timeline.pause();\n }", "public void pauseTimeline() {\n\t\tif (timeline != null) {\n\t\t\ttimeline.pause();\n\t\t}\n\t}", "public void pause()\n {\n timer.stop();\n }", "public void pause(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Net Weight Measure' containment reference. BBIE Consignment. Net_ Weight. Measure Total net weight (mass) of all the goods items referred to as one consignment. 0..1 Consignment Net Weight Measure Measure. Type
NetWeightMeasureType getNetWeightMeasure();
[ "public NetNetWeightMeasureType getNetNetWeightMeasure() {\r\n\t\treturn (netNetWeightMeasure == null) ? new NetNetWeightMeasureType()\r\n\t\t\t\t: netNetWeightMeasure;\r\n\t}", "public NetWeightMeasureType getNetWeightMeasure() {\r\n\t\treturn (netWeightMeasure == null) ? new NetWeightMeasureType()\r\n\t\t\t\t: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the criteria for the match
void setCriteria(Criteria criteria);
[ "public void setCriteria(String criteria)\r\n {\r\n _criteria = criteria;\r\n }", "public void setMatched() {\n state.setMatched(true);\n setEnabled(false);\n\n }", "public void setMatchRule(String matchRule);", "void setPartialMatch(Match partialMatch);", "Set<Match> getCriter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set accessor for persistent attribute: valor2
public void setValor2(java.lang.String newValor2);
[ "public abstract void setValor2(java.lang.String newValor2);", "public abstract void setValor1(java.lang.String newValor1);", "public void setValor1(java.lang.String newValor1);", "public abstract void setValor3(java.lang.String newValor3);", "public abstract void setValor4(java.lang.String newValor4);", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables reindexing of an application in a zone.
private HttpResponse enableReindexing(String tenantName, String applicationName, String instanceName, String environment, String region, HttpRequest request) { ApplicationId id = ApplicationId.from(tenantName, applicationName, instanceName); ZoneId zone = requireZone(environment, region); contro...
[ "private HttpResponse disableReindexing(String tenantName, String applicationName, String instanceName, String environment, String region, HttpRequest request) {\n ApplicationId id = ApplicationId.from(tenantName, applicationName, instanceName);\n ZoneId zone = requireZone(environment, region);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set method for struct member 'idname_fallback'. Field Documentation Blender Source Code Optionally use these when not interacting directly with the primary tools gizmo.
public void setIdname_fallback(CArrayFacade<Byte> idname_fallback) throws IOException { long __dna__offset; if ((__io__pointersize == 8)) { __dna__offset = 80; } else { __dna__offset = 72; } if (__io__equals(idname_fallback, __io__address + __dna__offset)) { return; } else if (__io__same__encoding...
[ "void setIDLName(String idlName)\n {\n super.setIDLName(idlName);\n\n // If the first char is an uppercase letter and the second char is not\n // an uppercase letter, then convert the first char to lowercase.\n if (idlName.charAt(0) >= 0x41 && idlName.charAt(0) <= 0x5a \n && (idlName....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pause replication. The operation to initiate pause replication of the item.
@ServiceMethod(returns = ReturnType.SINGLE) MigrationItemInner pauseReplication( String resourceName, String resourceGroupName, String fabricName, String protectionContainerName, String migrationItemName, PauseReplicationInput pauseReplicationInput);
[ "@ServiceMethod(returns = ReturnType.SINGLE)\n MigrationItemInner pauseReplication(\n String resourceName,\n String resourceGroupName,\n String fabricName,\n String protectionContainerName,\n String migrationItemName,\n PauseReplicationInput pauseReplicationInput,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Patient Discovery method for correlating patients for initiator scenarios (Candidate as Initiator)
public abstract PDEntityResponseType correlatePatient(String endpointURL, String localHCID, List remoteHCIDList1, String testcaseConfig, String initiatorPatientId);
[ "public abstract PDEntityResponseType correlatePatient(String endpointURL,\n\t\t\tString localHCID, List remoteHCIDList1, String testcaseConfig);", "public interface CoDiscoveryParticipant {\n\n /**\n * Inform discovery participant that a new CANopen node is found.\n *\n * @param bridgeUID The bridge (thin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change priority for task
public void setPriority(DoitTaskPriority priority) { this.priority = priority; }
[ "public void setTaskPriority(String taskPriority) {\n this.taskPriority = taskPriority;\n }", "public GenerationTaskPriority(double priority) {\n this.priority = priority;\n }", "void setPriority(int priority);", "public void setPriority(Priority priority);", "public void renice(int task...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HttpHeaders containing the raw property values. Creates an instance of ContainersGetAccountInfoHeaders class.
public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String xMsAccountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); if (xMsAccountKind != null) { this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); } ...
[ "private HttpHeaders constructResponseHeaders() {\n var headers = new HttpHeaders();\n var authHeader = \"\"; // Construct the auth header for response\n headers.put(HttpHeaders.AUTHORIZATION, List.of(authHeader));\n return headers;\n }", "private HttpHeaders createBasicAuthHeaders(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ We shouldn't visit the base. If you have x.f.g = t, the only field that is becoming nonfinal is g.
@Override public Object visitExprField(ExprField ef) { Type tb = getType(ef.getLeft()); String struct = tb.toString(); Finality f = getFieldFinality(struct, ef.getName()); if (f == Finality.UNKNOWN) { setFieldFinality(struct, ef.getName(), Finality...
[ "@Test\n\tpublic void testFinalFields() throws Exception {\n\t\tString whatItShouldBe = new TestClassFinalField().str;\n\t\t\n\t\tTestClassFinalField obj = (TestClassFinalField)testWith(new TestClassFinalField());\n\t\tassertTrue(obj.str.equals(whatItShouldBe));\n\t\t\n\t\tobj = (TestClassFinalField)testWith(new Te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Salva um novo endereco
Endereco Salvar(Endereco endereco);
[ "public void cadastrarEndereco(Endereco endereco) {\n\t\t\n\t}", "public void setEndereco(java.lang.String endereco) {\r\n this.endereco = endereco;\r\n }", "public void setEndereco(java.lang.String endereco) {\n this.endereco = endereco;\n }", "public void setEndereco(Endereco endereco) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transformer Postcondition Sets pawn 1 of player
public void setPawn1(Pawn pawn1) { this.pawn1 = pawn1; }
[ "public void PromotePawn() {\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t\n\t\t\t// if pawn in enemy territory\n\t\t\tif (chessBoard[7][i] != null)\n\t\t\t\tif (chessBoard[7][i].getType().equals(\"p\"))\n\t\t\t\t\tchessBoard[7][i] = (ChessPiece) new Queen(2); // change it to queen\n\t\t\t\t\t\n\t\t\tif (chessBoard[0]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Splits up a spritesheet (all fields are required except imagesPerRow). Returns an array of image names that can be used in Sprite or SpriteAnimation.
public String[] split() { if (name == null) { throw new IllegalStateException("invalid name"); } if (sourceImage == null) { throw new IllegalStateException("invalid sourceImage"); } if (imageCount == null || imageCount <= 0) { throw new Illegal...
[ "public List<Image> splitSprite()\n {\n int[][] spriteSheetCoordinates = {{0, 0, 32, 32}, {32, 0, 32, 32}, {64, 0, 32, 32},\n {0, 32, 32, 32}, {32, 32, 32, 32}, {64, 32, 32, 32},\n {0, 64, 32, 32}, {32, 64, 32, 32}, {64, 64, 32, 32},\n\n {0, 96, 32, 32}, {32, 9...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is the cached code category current?
boolean isCachedCodeCategoryCurrent(UUID id) throws DAOException;
[ "private Boolean isCacheCurrent(String url) {\n Boolean isCurrent = false;\n Long now = System.currentTimeMillis();\n \n if (lastChecked.containsKey(url) && (now - lastChecked.get(url)) < cacheTimeoutInMilliseconds) {\n isCurrent = true;\n }\n logger.debug(\"isCa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
naturalSizeAvailable fired when the natural size is available
void naturalSizeAvailable(JavaScriptObject source, JavaScriptObject naturalSize, JavaScriptObject type, JavaScriptObject globalPoint, JavaScriptObject y, JavaScriptObject x);
[ "public Long getSizeAvailable() { return this.sizeAvailable; }", "protected void notifySizeChanged() {\n\t\tnotifyParents(dt -> dt.dataTypeSizeChanged(this));\n\t}", "public interface TitaniumMediaVideoPlayerNaturalSizeAvailableHandler {\n\t/**\n\t * <b>naturalSizeAvailable</b>\n\t * <p>\n\t * fired when the na...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Checks for LAST or LASTsuffix. Returns the LAST name with .JMX replaced by suffix.
private String processLAST(final String jmlogfile, final String suffix) { if (USE_LAST_JMX.equals(jmlogfile) || USE_LAST_JMX.concat(suffix).equals(jmlogfile)){ String last = LoadRecentProject.getRecentFile(0);// most recent if (last.toUpperCase(Locale.ENGLISH).endsWith(JMX_SUFFIX)){ ...
[ "String getSuffix();", "DirectDeclaratorLastSuffix getLastSuffix();", "public String getSuffixName() {\n return suffixName;\n }", "public String getSuffix() {\n return (suffix);\n }", "private String getSuffix() {\n String ret = \"\";\n if (file.getName().lastIndexOf(\".\") != -1) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Medication Prescription Substitution'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseMedicationPrescriptionSubstitution(MedicationPrescriptionSubstitution object) { return null; }
[ "public T caseMedicationPrescription(MedicationPrescription object) {\n\t\treturn null;\n\t}", "public T caseVisionPrescription(VisionPrescription object) {\n\t\treturn null;\n\t}", "public T caseMedicationDispenseSubstitution(MedicationDispenseSubstitution object) {\n\t\treturn null;\n\t}", "public T caseMed...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Viewing a single product
@RequestMapping(value = "/show/{id}/product") public ModelAndView showSingleProduct(@PathVariable int id) throws ProductNotFoundException { ModelAndView mv = new ModelAndView("page"); Product product = productDAO.get(id); if(product == null) throw new ProductNotFoundException(); // update the view...
[ "void viewProductById(long id);", "Product getProductById(Integer productId);", "public Product getProductByID(int id);", "Product getProductById(Long id);", "public String view() {\n ProductModel.getProduct(idCurrentProduct);\n return SUCCESS;\n }", "@RequestMapping(value = \"/show/{id}/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an open cached connection or create if it does not exist.
public Connection getConnection(ConstructContext context, ConnectionInfo info) throws ConnectionFailedException { synchronized (connectionCache) { Connection connection = getOpen(context); // Check if the connection info is different if (connection != null) { ...
[ "public Connection getCachedConnection (CConnection connection);", "CompletableFuture<Http2Connection> getConnectionFor(HttpRequestImpl req) {\n URI uri = req.uri();\n InetSocketAddress proxy = req.proxy();\n String key = Http2Connection.keyFor(uri, proxy);\n\n synchronized (this) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }