query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Query log file list.
@RequestMapping(value = "/web/util/log/file/list", method = RequestMethod.POST, produces = ControllerUtil.CONTENT_TYPE, headers = ControllerUtil.HEADER) @ResponseStatus(HttpStatus.OK) @ResponseBody public String queryLogFileList(@RequestBody String json) { JSONObj...
[ "private void listFiles()\n {\n (new List(socketWriter, logWriter)).execute();\n }", "private void query() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Querying for files.\");\n\n mDriveServiceHelper.queryFiles()\n .addOnSuccessListener(fileL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adding custom swagger documentation for list all courses
@ApiOperation(value = "Return all Courses", response = Course.class, responseContainer = "List") @ApiResponses(value = {@ApiResponse(code = 200, message = "Course List Found", response = Course.class), @ApiResponse(code = 404, message = "Course Lis...
[ "@GET\n @Path(\"/viewCourse\")\n @Produces(MediaType.APPLICATION_JSON)\n public List<Course> viewCourse() {\n return adminHandler.viewCourse();\n }", "@RequestMapping(value=\"/courses\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Course> courseListRest() {\n\t\treturn (List<Course...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the legal fields.
@Override public List<LegalField> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "default List<String> getAllFields() {\n List<String> allFields = Stream.concat(getRequiredFieldsFlat().stream(), getOptionalFields().stream())\n .collect(Collectors.toList());\n\n return Collections.unmodifiableList(allFields);\n }", "protected Field[] allFields()\n {\n\t retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the attribute yangQosRuleAclOpType.
OnosYangOpType yangQosRuleAclOpType();
[ "QosRuleAclBuilder yangQosRuleAclOpType(OnosYangOpType yangQosRuleAclOpType);", "public String getAclValue()\n {\n return aclValue;\n }", "public Integer acl() {\n return this.acl;\n }", "interface ACL {\n /**\n * Acl with WRITE type grants write to group defined to resou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the name of the endpoint services that are to be installed for a given deployment unit
public static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) { final List<ServiceName> endpointServiceNames = new ArrayList<ServiceName>(); Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY); for (Endpoint ep : deployment.getService().getE...
[ "String getServiceName();", "@Override\n public String getServiceEndpoint(String serviceName) {\n return serviceEndpoints.get(serviceName);\n }", "public List getServiceNames();", "java.lang.String getDestServiceName();", "public String getDeploymentUnitName() {\n\t\treturn deploymentDesc[DEPLO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds "Workspaces" data field to all topic types.
@Override public void modifyTopicTypeHook(TopicType topicType, Map<String, String> clientContext) { // DataField workspacesField = new DataField("Workspaces", "reference"); workspacesField.setUri("de/deepamehta/core/property/Workspaces"); workspacesField.setRefTopicTypeUri("de/deepam...
[ "public void addWorkspaceTopicTypeCommands(Session session, CorporateDirectives directives) {\n\t\tString userID = session.getUserID();\n\t\tString defaultWorkspaceID = null;\n\t\tVector types;\n\t\t// --- add default types ---\n\t\tBaseTopic defaultWorkspace = as.getUsersDefaultWorkspace(userID, directives);\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the port type name.
public void setPortTypeName(String portTypeName) { this.portTypeName = portTypeName; }
[ "public void setPortPortType(QName ptName) {\n if (ptName != null) {\n super.setProperty(PORTTYPE_NAME,ptName.toString());\n }\n }", "public void setNametype(Integer nametype) {\r\n this.nametype = nametype;\r\n }", "public String getPortTypeName() {\n\t\treturn portTypeName;\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getTeachingAssistants method, of class TAData.
@Test public void testGetTeachingAssistants() { System.out.println("testGetTeachingAssistants()"); CSGData dataManager = TestSave.testLoad(); TAData data = dataManager.getTaData(); ObservableList<TeachingAssistant> tas=data.getTeachingAssistants(); System.out.println("testGet...
[ "@Test\r\n public void testGetTeacherId() {\r\n System.out.println(\"getTeacherId\");\r\n Markedworks instance = new Markedworks();\r\n Teachers expResult = null;\r\n Teachers result = instance.getTeacherId();\r\n assertEquals(expResult, result);\r\n // TODO review the g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleAtomic" $ANTLR start "ruleAtomic" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:1515:1: ruleAtomic : ( ( rule__Atomic__Alternatives ) ) ;
public final void ruleAtomic() throws RecognitionException { HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS"); int stackSize = keepStackSize(); try { // ../com.blasedef.onpa.ONPA.ui/src-gen/...
[ "public final void ruleAtomic() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:4817:2: ( ( ( rule__Atomic__Alternatives ) ) )\n // InternalDsl.g:4818:2: ( ( rule__Atomic__Alternatives ) )\n {\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to display High Score Position and name
public static void displayHighScorePosition(String name, int position){ System.out.println(name + " managed to get into position " + position + " on the high score table"); }
[ "public static void displayHighScorePosition ( String namePlayer, int position ){\n\n System.out.println( namePlayer + \" managed to get into the postion \" + position + \" on the high score table\");\n }", "public static void displayHighScorePosition(String playersName, int position){\n System.o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called whenever a sequence of gif pictures are to be placed after each other in a gif file. This method is a recursive method, which starts with creating a temporarily board of arraylists which is tempBoard. This temporarily board is initialized to be as big as the gifBoard, which is the board that the m...
public void gifStream(int counter, ArrayList<ArrayList<Boolean>> gifBoard) { //The end of the recursive method if (counter == 0) { try { gWriter.close(); }catch (IOException e) { dialogModel.setHeaderText("Gif stream fault"); ...
[ "public void generateBoard()\n {\n int count=0;\n boolean[][] nextboard=new boolean[this.dimensions][this.dimensions];\n List<Cell> nextCells=new ArrayList<Cell>();\n try {\n \n for(int i=0;i<liveCells.size();i++)\n {\n count=liv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests lyrics, which are lexed as one chunk.
@Test public void lyricsTest() { String input = "X: 3 \n T:Piece No.3 \n M:3/4 \n L:1/8 \n Q:1/8=100 \n K: C \n " + "z4 D2 | G4 BG |] \n w: * A 2 | ma-zing2 | \n "; verifyLexer(input, new String[] { "X: 3 \n", "T:Piece No.3 \n", "M:3/4 \n", "L:1/8 \n", "Q:1/8=100 ...
[ "@Test\n public void testSplitMusic() throws FileNotFoundException{\n File testFile = new File(\"sample_abc/piece1.abc\");\n assertTrue(SystemWrapper.splitMusic(testFile).get(1).toString()\n .equals(\"C C C3/4 D/4 E | E3/4 D/4 E3/4 F/4 G2 | (3ccc \"\n + \"(3GGG...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert Feedback to FeedbackView.
public static FeedbackView toView(Feedback feedback) { FeedbackView view = new FeedbackView(); view.setId(feedback.getId()); view.setCreatedAt(feedback.getCreatedAt()); view.setLastModifiedAt(feedback.getLastModifiedAt()); view.setVersion(feedback.getVersion()); view.setUserId(feedback.getUserI...
[ "public static List<FeedbackView> toView(List<Feedback> feedbackList) {\n List<FeedbackView> list = new ArrayList<>();\n\n feedbackList.stream().forEach(\n feedback -> list.add(toView(feedback))\n );\n\n return list;\n }", "protected ViewFeedback getViewFeedback() {\n\t\treturn _viewFeedback;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether the obj equals to this Pair.
public boolean equals(Object obj) { if (!(obj instanceof Pair)) { return false; } return ((Pair) obj).getFirst().equals(this.getFirst()) && ((Pair) obj).getSecond().equals(this.getSecond()); }
[ "public boolean equals(Object obj) {\n if (this == obj) return true;\n if (!(obj instanceof Pair<?, ?>)) return false;\n Pair<?, ?> p = (Pair<?, ?>) obj;\n return a.equals(p.a) && b.equals(p.b);\n }", "@Override\n public boolean equals(Object o) {\n if (o instanceof Pair) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of BooleanReadPass method, of class User.
@Test public void testBooleanReadPass() { System.out.println("BooleanReadPass"); String email = "admin@ms.com"; String input = "admin"; boolean expResult = true; boolean result = instance.BooleanReadPass(email, input); assertEquals(expResult, result); }
[ "@Test\n public void testBooleanReadUser() {\n System.out.println(\"BooleanReadUser\");\n System.out.println(\"Case 1 : User tidak ada\");\n String input1 = \"xyz@gmail.com\";\n boolean expResult1 = false;\n boolean result1 = instance.BooleanReadUser(input1);\n assertEqu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches the movies by a query
public void searchMoviesByQuery(String query) { disposeSearchMovie(); try { String encodeQuery = URLEncoder.encode(query, "UTF-8"); int resultPage = mResultPage + 1; mDisposable = mMediaRepository.searchMoviesByQuery(encodeQuery, resultPage) .subsc...
[ "private void getMovieSearch(String movieName){\n\t\t//api key for rotten tomatoes api\n\t\tString apiKey = \"t2m7kt6ccg644jte4fvfsaf7\";\n\t\t//base url for rottentomatoes api call\n\t\tString baseURL = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json\";\n\t\t//search specific string for api call\n\t\tS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the array faceNormals with the normals of all faces (triangles) of the mesh.
private void initFaceNormals(final double[] vertices) { faceNormals = new double[vertices.length / 3]; for (int i = 0; i * 9 < vertices.length; i++) { temp1.set(vertices[i * 9 + 0], vertices[i * 9 + 1], vertices[i * 9 + 2]); temp2.set(vertices[i * 9 + 3], vertices[i * 9 + 4], ve...
[ "public void setVertexNormalsToFaceNormals() {\n vertexNormals.clear();\n for (int i = 0; i < faces.size(); i++) {\n Vector3d faceNormal = faces.get(i)\n .getFaceNormal();\n addVertexNormal(faceNormal);\n faces.get(i)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string lobby_id = 1;
java.lang.String getLobbyId();
[ "public void setLobbyId(int id) { lobbyId = id; }", "public int getLobbyID() {\r\n return lobbyID;\r\n }", "public java.lang.String getLobbyId() {\n java.lang.Object ref = lobbyId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
rotation for rebalance after deletion when problem comes from right side pointers and changing pointers and ranks like in slide 57(symmetric case) in the presentation
private void rotateRightDel (WAVLNode z) { WAVLNode x = z.left; WAVLNode d = x.right; x.parent=z.parent; if(z.parent!=null) { if(parentside(z.parent, z).equals("left")) { z.parent.left=x; } else { z.parent.right=x; } } else { this.root=x; ...
[ "private void doubleRotateRightDel (WAVLNode z) {\n\t WAVLNode a = z.left.right;\r\n\t WAVLNode y = z.left;\r\n\t WAVLNode c = z.left.right.right;\r\n\t WAVLNode d = z.left.right.left;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method sets the no. of reinforcements the player has
public void setReinforcementArmies(int reinforcementArmies) { this.reinforcementArmies = reinforcementArmies; setChanged(); notifyObservers(); }
[ "public void setNewReinforcements(int value) {\n this.newReinforcements = value;\n }", "public void update_reinforcements()\n {\n int ypos;\n int alien_type;\n int aliens = 0;\n if (DIFFICULTY == \"normal\")\n {\n aliens = 3;\n }\n e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the treasure marker displayed on the map according to the treasures stored in "game". It uses the object "geoJsonSource_treasures_coordinates" which contains the treasure markers coordinates. If we modify it, the treasure markers on the map are updated.
public void updateMap() { // We need to check if it's "null" because it is initialized only when the map has fully loaded if (geoJsonSource_treasures_coordinates != null) { // creates a list containing the treasures coordinates extracted from game List<Feature> featu...
[ "public void updateMarkers() {\n\t\tArrayList<Parking> items = getMarkersForLocation();\n\t\tfor (Parking item : items) {\n\t\t\tint id = item.getParkingId();\n\t\t\tParking inHashItem = parkingsArray.get(id);\n\t\t\tparkingsArray.delete(id);\n\t\t\t// if the item already exists, update the position\n\t\t\tif (inHa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Cartridge__Group__1__Impl" $ANTLR start "rule__Cartridge__Group__2" InternalWorkflow.g:1150:1: rule__Cartridge__Group__2 : rule__Cartridge__Group__2__Impl ;
public final void rule__Cartridge__Group__2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalWorkflow.g:1154:1: ( rule__Cartridge__Group__2__Impl ) // InternalWorkflow.g:1155:2: rule__Cartridge__Group__2__Impl { ...
[ "public final void rule__Cartridge__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWorkflow.g:1127:1: ( rule__Cartridge__Group__1__Impl rule__Cartridge__Group__2 )\n // InternalWorkflow.g:1128:2: rule__Cartridge_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies the specified range of the supplied array to a new array, padding as necessary with (short)0 if to is greater than the length of the original array. from must be in the range zero to original.length and can not be greater than to. The initial element of the returned array will be equal to original[from], except ...
public static short[] copyOfRange(short[] original, int from, int to) { if (from > to) throw new IllegalArgumentException("The initial index is after " + "the final index."); short[] newArray = new short[to - from]; if (to > original.length) { System.arraycopy(original, from, newArray, 0, ...
[ "public static byte[] copyOfRange(byte[] original, int from, int to)\n {\n int newLength = getLength(from, to);\n byte[] copy = new byte[newLength];\n System.arraycopy(original, from, copy, 0, Math.min(original.length - from, newLength));\n return copy;\n }", "static int[] copyOf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables or disables memoization feature for this parser.
public final void setMemoable(boolean memoable) { this.memoable = memoable; }
[ "public final boolean isMemoable() {\n return memoable;\n }", "void setRecalculate(boolean recalculate);", "void setCached(boolean b);", "public void toggleAutomaticAdding() {\n\t\tdictionary.toggleAutomaticAdding();\n\t}", "public DBMaker enableWeakCache() {\n cacheType = DBCacheRef.WEAK;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all addresses which are referenced from the list of actions
public static Set<Long> getActionsAllRefs(List<Action> list) { Set<Long> ret = new HashSet<>(); for (Action a : list) { a.getRef(ret); } return ret; }
[ "public List<String> fetchWhiteListEndpoints(List<Action> actions){\n logger.info(\"Fetching whileListEndpoints..\");\n List<String> whiteList = new ArrayList<>();\n for(Object obj: actions){\n Action action = objectMapper.convertValue(obj, Action.class);\n if(action.getWh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the current content type that is being displayed. If the given content type differs from the currently displayed content type, then the fragment that is currently displayed is replaced.
private synchronized void setContentType(ContentType contentType) { // Check for null if (contentType == null) throw new IllegalArgumentException("Given ContentType can't be null"); // Check whether we're changing if (this.displayState != null && this.displayState.contentTy...
[ "private void updateContentType() {\n \t\tContentType contentType = null;\n \t\tContentTypeService cts = OsgiUtils.getService(ContentTypeService.class);\n \t\t\n \t\tif (getWizard().getProviderFactory() != null && targetFile.isValid()) {\n \t\t\tCollection<ContentType> types = getWizard().getProviderFactory().getSu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Here we test that specifying variation settings for fonts in XMLs works. We build typefaces from two families containing one font each, using the same font resource, but having different values for the 'wdth' tag. Then we measure the painted text to ensure that the tag affects the text width. The font resource used sup...
public void testGetFont_xmlFileWithVariationSettings() { Typeface typeface1 = mResources.getFont(R.font.sample_variation_settings_family1); assertNotNull(typeface1); Typeface typeface2 = mResources.getFont(R.font.sample_variation_settings_family2); assertNotNull(typeface2); asse...
[ "public void testGetFont_xmlFileWithTtc() {\n Typeface normalFont = mResources.getFont(R.font.sample_ttc_family);\n assertNotNull(normalFont);\n Typeface italicFont = Typeface.create(normalFont, Typeface.ITALIC);\n assertNotNull(italicFont);\n\n assertEquals(getLargerTypeface(\"a\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setting the Transmission Destination MAC Address.
public void setDestMacAddress(String destMacAddress) { this.destMacAddress = destMacAddress; }
[ "public void setMacDest(MAC dest) {\n\t\tmacDest = dest;\n\t}", "void setInterfaceMacAddress(MacAddress interfaceMacAddress);", "public void setTargetMAC(String _targetMAC) {\n System.err.print(\"setTargetMAC (string) not implemented properly\");\r\n }", "public MAC getMacDest() {\n\t\treturn macDest;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursive helper method for findEvolutionaryDistance
private double findEvolutionaryDistanceHelper(PhyloTreeNode ancestor, PhyloTreeNode node) { if(ancestor == null || ancestor == node) { return 0.0; } if(ancestor.getLeftChild() != null && ancestor.getLeftChild().getLabel().contains(node.getLabel())) { return (ancestor.getDistanceToChi...
[ "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "public int aStarEuclidean() {\n\r\n PriorityQueue<Node> frontier = new PriorityQueue<>(adjacencyComparator);\r\n int ExpandedNodes = 0;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a generic query to get beans based upon the nodetypes specified in the paraminfo, and a root scope
@Nullable private IterablePagination<HippoBean> getBeansFromQuery(final Info paramInfo, final QueryHelper helper, final HstRequest request, final HstRequestContext context, final HippoBean scope) { if (scope == null) return null; final String nodeTypeString = paramInfo.getNodeTypes(); ...
[ "List<? extends ICustomer> getCustomerChildren(String token) throws SiteWhereException;", "protected abstract Map findMatchingBeans(Class requiredType) throws BeansException;", "List<T> getSelectableNodes(String query);", "public List<RapidBean> findBeansByQuery(final String queryString) {\n\t\treturn new Que...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given path to a image file, transposed buffered image to be returned
public BufferedImage transpose(String src) { return this.transpose(ImportExportImage.importImage(src)); }
[ "public BufferedImage transpose(BufferedImage img) {\n if (img == null) {\n return null;\n }\n BufferedImage sink = new BufferedImage(img.getHeight(), img.getWidth(), img.getType());\n for (int i = 0; i < img.getHeight(); i++) {\n for (int j = 0; j < img.getWidth(); j++) {\n Color color...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get grid of which cells are hidden, will return null if it is a game without hidden cells
@Override public boolean[][] getOpenCells() { return gameParser.getUncoveredCellGrid(); }
[ "boolean isGridVisible();", "public Set<GridItem> getVisitableNeighbors() {\r\n\t\treturn parent.findVisitableNeighborsOf(this);\r\n\t}", "final public int getHidden() {\r\n \treturn this.width * this.height - this.squaresRevealed;\r\n }", "@Override\n public int[][] getGrid()\n {\n return gamePars...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of ModalCustomHeaderLarge
public final void setModalCustomHeaderLarge(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean modalcustomheaderlarge) { getMendixObject().setValue(context, MemberNames.ModalCustomHeaderLarge.toString(), modalcustomheaderlarge); }
[ "public final void setModalCustomHeaderLarge(java.lang.Boolean modalcustomheaderlarge)\r\n\t{\r\n\t\tsetModalCustomHeaderLarge(getContext(), modalcustomheaderlarge);\r\n\t}", "public final void setModalCustomHeader(java.lang.Boolean modalcustomheader)\r\n\t{\r\n\t\tsetModalCustomHeader(getContext(), modalcustomhe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value list of property dateCreated. Empty list is returned if the property not set in current object.
ImmutableList<SchemaOrgType> getDateCreatedList();
[ "@GetMapping(\"list/created_date\")\n public Mortgage[] retrieveMortgagesByCreatedDate() {\n return retrieveMortgagesService.getSortedMortgageListByCreatedDate();\n }", "public List<Post> getCreatedPosts() {\n return createdPosts;\n }", "public java.util.Date getCreatedDate(\r\n ) {\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if there is room for more entities
public boolean hasCapacity() { return entities.size() < maxSize; }
[ "@Override\r\n public boolean hasMoreObjects() {\r\n return hasMore;\r\n }", "private boolean ifFull() {\n return items.length == size;\n }", "private boolean maxLocationsReached() {\n Query q = new Query(\"Location\");\n int numOfEntities = ds.prepare(q).countEntities();\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an InputStream object wrapped around a DataFile object. This is a simple wrapper around a DataFile object. Any access on the underlying DataFile object while the input stream is in use will lead to undefined behaviour. Note that this is only intended as a short lived object for reading information from a DataFi...
public static InputStream asInputStream(DataFile df) { return new DFInputStream(df); }
[ "InputStream createInputStream();", "public static DataInputStream asDataInputStream(DataFile df) {\n return new DataInputStream(asInputStream(df));\n }", "public abstract InputStream createInputStream() throws IOException;", "public InputStream asInputStream() {\n return new ByteArrayInputStream(d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to iterate over nouns, calculate score and get top query words for category
public ArrayList<String> getTopQueryWordsForCategory( ArrayList<String> nouns, TopDocs topdocs, String category) throws IOException { for (String nounword : nouns) { if (!scoreMap.containsKey(nounword)) { Double score = calculateScore(nounword, topdocs.scoreDocs); scoreMap.put(nounword, score); } ...
[ "public String classifyAllPOSN() {\r\n\t\r\n\t\tint count = 0;\r\n\t\ttry {\r\n\t\t\tString delimiters = \"\\\\W\";\r\n\t\t\tString[] tokens = text.split(delimiters);\r\n\t\t\tString feeling = \"\";\r\n\t\t\tfor (int i = 0; i < tokens.length; ++i) {\r\n\t\t\t\t// Add weights -- positive => +1, strong_positive => +2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes given conversation from the ArrayList
public void deleteConversation(Conversation conversation) { if (conversations.contains(conversation)) conversations.remove(conversation); }
[ "private void deleteConversations() {\n mAdapter.resetAnimationIndex();\n List<Integer> selectedItemPositions =\n mAdapter.getSelectedItems();\n for (int i = selectedItemPositions.size() - 1; i >= 0; i--) {\n mAdapter.removeData(selectedItemPosition...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
clear the collapse list from nodes that are not collapseable. NOTE : this class's methods are not synchronized, any attemp to change the parameters given to it are not monitored , and therefore it should strictly be synchronized from outside.
public void clearCollapseList(GraphData data){ Iterator i = this.collapsingList.iterator(); while (i.hasNext()){ Integer collapsedNodeIndex = (Integer) i.next(); if (!data.nodes[collapsedNodeIndex.intValue()].isCollapseable()){ i.remove(); // System.err.println("removing "+ collapsedN...
[ "public abstract void unselectAllNodes();", "public void collapseAll(GraphData data) {\r\n \t\tIterator i = collapsingList.iterator();\r\n \t\twhile (i.hasNext())\r\n \t\t{\r\n \t\t\tint nodeToCollapse = ((Integer)i.next()).intValue(); \t\t\t\r\n \t\t\tthis.startCollapse(data,nodeToCollapse);\r\n \t\t}\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a Set containing all elements obtained from the specified Iteration.
public static <E, X extends Exception> Set<E> asSet(Iteration<? extends E, X> iter) throws X { try (Stream<? extends E> stream = iter.stream()) { return stream.collect(Collectors.toSet()); } }
[ "public final Enumeration elements ()\n {\n return new SetEnumeration(this);\n }", "public Iterator iterator()\n {\n return Collections.unmodifiableSet(m_set).iterator();\n }", "public Set<E> elements();", "@Override\n public Iterator<Set<E>> iterator() {\n return new DisjointSetIterat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Md__Group__4" $ANTLR start "rule__Md__Group__4__Impl" InternalMyDsl.g:10331:1: rule__Md__Group__4__Impl : ( ( rule__Md__TypeAssignment_4 ) ) ;
public final void rule__Md__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:10335:1: ( ( ( rule__Md__TypeAssignment_4 ) ) ) // InternalMyDsl.g:10336:1: ( ( rule__Md__TypeAssignment_4 ) ) { ...
[ "public final void rule__Css__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:10821:1: ( ( ( rule__Css__TypeAssignment_4 ) ) )\n // InternalMyDsl.g:10822:1: ( ( rule__Css__TypeAssignment_4 ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initiate nodes for Consistent Hashing
private static void testConsistentHashing() { Map<String, AtomicInteger> CHNodesMap = Maps.newHashMap(); List<String> CHNodes = Lists.newArrayList(); for(int i = 0 ; i < nodesCount; i ++) { CHNodes.add("CHNode"+i); CHNodesMap.put("CHNode"+i, new AtomicInteger()); ...
[ "public ConsistentHash(int numberOfReplicas, Collection<T> nodes) {\n this(new MD5HashFunction(), numberOfReplicas, nodes);\n }", "private static void testRendezvousHashing() {\n Map<String, AtomicInteger> HRWNodesMap = Maps.newHashMap();\r\n List<String> HRWNodes = Lists.newArrayList();\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a set of package version ranges
public PackageVersionRanges(String s) throws XPathException { ranges = new ArrayList<PackageVersionRange>(); for (String p : s.trim().split("\\s*,\\s*")) { ranges.add(new PackageVersionRange(p)); } }
[ "String toVersionRange(String version);", "public VersionRange getBundleVersionRange();", "public Map<String, String> fetchDatasetRangeVersions(String start, String end) {\n Map<String, String> versions = new LinkedHashMap<>();\n Double start_num = Double.parseDouble(start.substring(start.lastInde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XThrowExpression__Group__0__Impl" $ANTLR start "rule__XThrowExpression__Group__1" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:14823:1: rule__XThrowExpression__Group__1 : rule__XThrowExpression__Group__1__Impl rule__XThrowExpression__Group__2 ;
public final void rule__XThrowExpression__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:14827:1: ( rule__XThrowExpression__Group__1__Impl rule__XThrowEx...
[ "public final void rule__XThrowExpression__Group__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:25474:1: ( rule__XT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test IceCreamCone currentScoop method
public void testCurrentScoop() { cone1.addScoop(addFlavor); assertEquals(cone1.currentScoop(), addFlavor); assertNull(empty.currentScoop()); }
[ "public void testEatScoop() {\n // test that the number of scoops goes down\n assertEquals(cone1.numScoops(), 3, 0.01);\n cone1.eatScoop();\n assertEquals(cone1.numScoops(), 2, 0.01);\n // test with an empty cone\n assertNull(empty.eatScoop());\n }", "public void testA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a user, then an order for it, an invoice out the order and tries the invoice to be paid by an online payment This is ... the mega call !!!
public CreateResponseWS create(UserWS user, OrderWS order) throws SessionInternalError { CreateResponseWS retValue = new CreateResponseWS(); // the user first final Integer userId = createUser(user); retValue.setUserId(userId); if (userId == null)...
[ "@Test\n public void makePaymentToOtherUser() throws Exception {\n Pointer counterPartyAlias = new Pointer(counterPartyType, PaymentTest.counterPartyAlias);\n\n Amount amount = new Amount(AMOUNT_IN_EUR, CURRENCY);\n\n HashMap<String, Object> requestMap = new HashMap<>();\n requestMap.put(Payment.FIELD_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the buy sell productses from the database.
@Override public void removeAll() { for (BuySellProducts buySellProducts : findAll()) { remove(buySellProducts); } }
[ "public static void removeAllProducts() {\n\t\tConnection conn = DataBaseInfo.getConnection();\n\t\tPreparedStatement ps;\n\n\t\t\n\t\tString removeTicketsQuery = \"DELETE FROM `Tickets`\";\n\t\tString removeServicesQuery = \"DELETE FROM `Services`\";\n\t\tString removeTicketTypeQuery = \"DELETE FROM `ServiceTypes`...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates ByteArrayInputStream that uses buf as its buffer array. The initial value of pos is offset and the initial value of count is the minimum of offset+length and buf.length. The buffer array is not copied. The buffer's mark is set to the specified offset.
public ByteArrayInputStreamStub(byte[] buf,int offset,int length){ super(buf,offset,length); this.readAheadLimit = length; }
[ "private void fill() throws IOException {\n if (markpos < 0) {\n pos = 0; /* no mark: throw away the buffer */\n bufpos += count;\n } else if (pos >= buf.length) /* no room left in buffer */\n if (markpos > 0) { /* can throw away early part of the buffer */\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the validateQuestionnaireFormDefinitionSectionCode constraint of 'Questionnaire Form Definition Section'.
public boolean validateQuestionnaireFormDefinitionSection_validateQuestionnaireFormDefinitionSectionCode( QuestionnaireFormDefinitionSection questionnaireFormDefinitionSection, DiagnosticChain diagnostics, Map<Object, Object> context) { return questionnaireFormDefinitionSection.validateQuestionnaireFormDefiniti...
[ "public boolean validateQuestionnaireFormDefinitionSection_validateQuestionnaireFormDefinitionSectionLanguageCode(\n\t\t\tQuestionnaireFormDefinitionSection questionnaireFormDefinitionSection, DiagnosticChain diagnostics,\n\t\t\tMap<Object, Object> context) {\n\t\treturn questionnaireFormDefinitionSection.validateQ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'var238' field has been set.
public boolean hasVar238() { return fieldSetFlags()[239]; }
[ "public boolean hasVar123() {\n return fieldSetFlags()[124];\n }", "public boolean hasVar237() {\n return fieldSetFlags()[238];\n }", "public boolean hasVar239() {\n return fieldSetFlags()[240];\n }", "public boolean hasVar230() {\n return fieldSetFlags()[231];\n }", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns the JTree being used. By default it calls new JTree() if no JTree has been set.
public javax.swing.JTree getJTree() { if (jTree == null) { jTree = new javax.swing.JTree(); } return jTree; }
[ "public JTree getTree() {\n return tree;\n }", "public JTree getTree() {\n return tree;\n }", "public JTree getTree() {\n\t\treturn tree;\n\t}", "public JTree getTree() {\n\t if(_tree == null) {\n\t _tree = new DweezilTableTree();\n\t }\n\t return _tree;\n\t}", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds the URL used to retrive the movie videos.
public static URL buildMovieVideosUrl(int movieId) { Uri builtUri = Uri.parse(MOVIES_BASE_URL).buildUpon() .appendPath(PATH1_PARAM) .appendPath(PATH_MOVIE) .appendEncodedPath(String.valueOf(movieId)) .appendPath(PATH_VIDEOS) .append...
[ "java.lang.String getVideoUrl();", "public static String buildYouTubeUrl(String movieKey){\n return YOUTUBE_BASE_URL + YOUTUBE_PARAM_QUERY + movieKey;\n }", "private URL createHTTPRequestUrl(String[] parameters) throws MalformedURLException {\n\n // works with the base URL from the top of this ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Has the associated SpItem been edited?
public boolean isEdited() { return (_spItem.getAvEditState() == SpAvEditState.EDITED); }
[ "boolean isEdited();", "public final boolean isEdited(){\n\t\treturn JsUtils.getNativePropertyBoolean(this, \"edited\");\n\t}", "public boolean isItemSaved()\r\n\t{\r\n\t\treturn (status & STATUS_ITEM_SAVED) != 0;\r\n\t}", "public boolean getEdited() {\r\n return this.edited;\r\n }", "public boolean get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a specific details from disease of the given Id findDiseaseById
@Override public Disease findByDiseaseId(int id) { // setting logger info logger.info("Get the disease details By Id"); Optional<Disease> disease = diseaseRepo.findById(id); if(!disease.isPresent()) { return null; } logger.info(disease.get()); return disease.get(); }
[ "public abstract Disease getDisease(int diseaseId);", "@Transactional(readOnly = true)\n public Disease findOne(Long id) {\n log.debug(\"Request to get Disease : {}\", id);\n return diseaseRepository.findOneWithEagerRelationships(id);\n }", "@Override\r\n\tpublic Disease findByDiseaseName(St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add all Aloens in the army to the game as listeners and to game's environment.
public void addToGame(GameLevelAlien g, HitListener ar, ScoreTrackingListener stListener) { for (int i = 0; i < COLUMNS; i++) { for (int j = 0; j < ROWS; j++) { this.army.get(i).get(j).addToGame(g); this.army.get(i).get(j).addHitListener(ar); this...
[ "public void addListeners() {\n createPartyButton.addListener(new ClickListener() {\n public void clicked(InputEvent event, float x, float y) {\n game.setScreen(new CreatePartyScreen(game));\n System.out.println(\"create party!\");\n }});\n joinParty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the QuotaConsumer for current shard.
private QuotaConsumer getQuotaConsumer(AppEngineTaskAttemptContext taskAttemptContext) { QuotaManager manager = new QuotaManager(MemcacheServiceFactory.getMemcacheService()); QuotaConsumer consumer = new QuotaConsumer( manager, taskAttemptContext.getTaskAttemptID().toString(), DEFAULT_QUOTA_BATCH_SIZ...
[ "public BatteryConsumer getAggregateBatteryConsumer(\n @AggregateBatteryConsumerScope int scope) {\n return mAggregateBatteryConsumers[scope];\n }", "public Quota getQuota() {\n\t\treturn this.quota;\n\t}", "ConsumerStats getStats();", "Consumer getConsumer();", "public Consumer getCons...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the distance between a pixel in a given column and row is to the center of the circle
private double distance(int col, int row) { double dx = Math.abs((double)(col)-centerx); double dy = Math.abs((double)(row)-centery); double d2 = dx*dx+dy*dy; return Math.sqrt(d2); }
[ "public double distancia(Pixel pixel) {\r\n\t\tdouble distX = this.xDouble - pixel.xDouble;\r\n\t\tdouble distY = this.yDouble - pixel.yDouble;\r\n\t\tdouble val = distX * distX + distY * distY;\r\n\t\tif (val != 0)\r\n\t\t\treturn Math.sqrt(val);\r\n\t\treturn 0;\r\n\t}", "private int radiusFromCenter() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. Excel Dates and Times are stored without any timezone information. If you know (through other means) that your file uses a different TimeZone to the system default, you can use this version of the getJavaDate() method to handl...
public static Date getJavaDate(double date, boolean use1904windowing, TimeZone tz) { return getJavaDate(date, use1904windowing, tz, false); }
[ "public static Date getJavaDate(double date, boolean use1904windowing) {\r\n return getJavaDate(date, use1904windowing, null, false);\r\n }", "public static double getExcelDate(Date date, boolean use1904windowing) {\r\n Calendar calStart = LocaleUtil.getLocaleCalendar();\r\n calStart.setTi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the score, with which the comparison will be performed. For this, the ScoreModel given by the scoreShortName with the highest score of this peptide will be returned.
@Override public ScoreModel getCompareScore(String scoreShortname) { return getBestScoreModel(scoreShortname); }
[ "public String getScoreName(String shortName) {\n return psmModeller.getScoreName(shortName);\n }", "public String getScoreName(String shortName) {\n return scoreShortToScoreName.get(shortName);\n }", "public double getBestScore();", "public Comparator<PSMReportItem> getScoreComparator(Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets value as the attribute value for CompAccomFlag.
public void setCompAccomFlag(String value) { setAttributeInternal(COMPACCOMFLAG, value); }
[ "public String getCompAccomFlag() {\n return (String)getAttributeInternal(COMPACCOMFLAG);\n }", "public void setActiveflag(String value) {\n setAttributeInternal(ACTIVEFLAG, value);\n }", "public void setFabComp(String value) {\n setAttributeInternal(FABCOMP, value);\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on delete button in popup delete
public void clickOnDeleteButtonOnPopup() { waitForClickableOfElement(successToastMesCloseIconEle, "Close Icon Success Toast Message"); clickElement(successToastMesCloseIconEle, "Close Icon Success Toast Message"); clickDeleteButtonOnPopUp(); }
[ "public void click_delete() {\n\t\tdelete.click();\n\t}", "public void clickDeleteButtonOnPopUp() {\n getLogger().info(\"Click Delete Button on PopUp windows.\");\n WebElement popUpDiv = getDriver().findElement(By.xpath(\"//div[starts-with(@id, 'categoryModel')and contains(@style,'display: block')]\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the IP address of the Master Server through the GUI
void jtfMasterIP_actionPerformed(ActionEvent e) { HermesGlobals.masterServerIP = jtfMasterIP.getText(); }
[ "public void setIPOfMasterDevice(String ip);", "public void setIP(String serverAddress) {\n\t\thostName = serverAddress;\t\n\t}", "@FXML\n private void setAdressAction() {\n String adress = this.hostAdress.getText();\n if (this.checkIP(adress)) {\n this.hostIP = adress;\n this.portBox.setSelect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Distance'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseDistance(Distance object) { return null; }
[ "double getDistance();", "abstract public StringDistance getDistance();", "public String getDistanceType ();", "public abstract double getDistance(T o1, T o2) throws Exception;", "public abstract double distanceTo (Object object);", "@JsonIgnore public Distance getFlightDistanceDistance() {\n return (D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is an open loop.
public boolean isOpenLoop();
[ "public boolean isOpen()\r\n\t{\r\n\t return (fd != null);\r\n\t}", "public boolean isLooping() {\r\n\r\n\t\treturn looping;\r\n\t}", "public boolean isLoopMode();", "public boolean isOpened();", "public boolean isOpened() {\n\t\treturn (file_ != null);\n\t}", "public boolean isOpen() {\n return ite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a single Tags entry
public DatabaseSummary addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap<String, String>(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); ...
[ "public void addTag(Tag t);", "void addTag(Tag tag);", "void addTag(String tag){tags.add(tag);}", "public Canary addTagsEntry(String key, String value) {\n if (null == this.tags) {\n this.tags = new java.util.HashMap<String, String>();\n }\n if (this.tags.containsKey(key))\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Set Pen'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseSetPen(SetPen object) { return null; }
[ "public Pen getMyPen() {\n return myPen;\n }", "public IWorkingTool getActivePen();", "public abstract Stroke getStroke();", "public abstract void setStroke(Stroke s);", "public Stroke getStroke(){ \r\n return this.stroke;\r\n }", "public int getPenKind() {\n if (pm.pen.getKind() == PKin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the value associated with the column: RELATE_TRANSNO
public java.lang.Long getRelateTransno () { return relateTransno; }
[ "public String getOriginnertransnbr() {\n return originnertransnbr;\n }", "public String getEinoTransNo() {\r\n return einoTransNo;\r\n }", "public BigDecimal getTRADE_REF_NO()\r\n {\r\n\treturn TRADE_REF_NO;\r\n }", "public String getTransSourceNo() {\n return transSourceNo;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor method for the 'numMoves' variable.
public int getMoves(){ return numMoves; }
[ "public int getNumberOfMoves()\n\t{\n\t\treturn this.numMoves;\n\t}", "public static int getNumMoves() {\n return numMoves;\n }", "public int getNumberOfMoves();", "public int getNumMoves()\n\t{\n\t\treturn this.state.getNumMoves();\n\t}", "public static int numberOfMoves() {\r\n\t\treturn numberO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Concatenate svn executable name with the svn command.
private String buildSvnCommand(final String subCmd) { final StringBuilder command = new StringBuilder(svn + ' '); command.append(subCmd); return command.toString(); }
[ "private String buildSvnWithUsername(final String subCmd) {\n final StringBuilder command = new StringBuilder();\n if (username != null) {\n command.append(\"--username \").append(username).append(' ');\n }\n if (password != null) {\n command.append(\"--password \")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__InsertSQL__Group_2_14__1" $ANTLR start "rule__InsertSQL__Group_2_14__1__Impl" ../eu.artist.migration.mdt.database.sql.editor.ui/srcgen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1330:1: rule__InsertSQL__Group_2_14__1__Impl : ( ',' ) ;
public final void rule__InsertSQL__Group_2_14__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDS...
[ "public final void rule__InsertSQL__Group_2_7__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show a dialog that lets the user select a working directory
private void handleWorkingDirBrowseButtonSelected() { DirectoryDialog dialog = new DirectoryDialog(getShell()); dialog.setMessage(ScriptLaunchMessages.WorkingDirectoryBlock_7); String currentWorkingDir = getWorkingDirectoryText(); if (!currentWorkingDir.trim().equals("")) { //$NON-NLS-1$ File path = new...
[ "private void handleWorkingDirBrowseButtonSelected() {\r\n\t\tDirectoryDialog dialog = new DirectoryDialog(getShell());\r\n\t\tdialog.setMessage(\"Select a working directory for the launch configuration:\"); \r\n\t\tString currentWorkingDir = getWorkingDirectoryText();\r\n\t\tif (!currentWorkingDir.trim().equals(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function is used to set up the parameters window. This window should contain enough parameters to be able to run the operator although parameters like scaling and offset are not required as there is an operator already defined to do this. The interface components should be added to the parameters frame. In this ex...
void setParameters(){ parameters = new JFrame(name); panel = new JPanel(); JButton applyButton = new JButton("Apply"); setClassInterface(); scroll = new JScrollPane(imageLabel); /* Add others parameters and Limits array to the main panel */ panel.add(scroll); panel.add(numclassLabel...
[ "private JPanel createParameters() {\n\t\t// MLP\n\t\tJPanel mlpPane = createMlpPane();\n\n\t\t// KNN\n\t\tJPanel knnPane = createKnnPane();\n\n\t\t// LDA\n\t\tJPanel ldaPane = createLdaPane();\n\n\t\t// SVM\n\t\tJPanel svmPane = createSvmPane();\n\n\t\t// Correlation\n\t\tJPanel correlationPane = createCorrelation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Visits the method Adds the method to the class_ Symbol Table
@Override public Object visit(Method method) { this.errorReporter.reportMethodDeclarationErrors(method); this.curNode.getMethodSymbolTable().add(method.getName(), method); return null; }
[ "public Object visit(Method node) {\n Pair<String, String> newPair =new Pair<>(node.getName(),this.className);\n for(int i = 0;i<methodList.size();i++){\n if(methodList.get(i).getKey().equals(node.getName())){\n methodList.set(i,newPair);\n return null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_order_payments.payment_bn
public String getPaymentBn() { return paymentBn; }
[ "public void setPaymentBn(String paymentBn) {\n this.paymentBn = paymentBn;\n }", "public BillPayment getBillPayment(Integer paymentId);", "au.gov.asic.types.fss.InvoiceType.AsicPaymentDetails.Bpay.BillerCode xgetBillerCode();", "public BigDecimal getBALLOON_PAYMENT() {\r\n return BALLOON_PAY...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test to see if player clicks main menu button and respond appropriately
@Override public void onMouseEvent(int button, int action, int mods) { XYPair<Integer> mousePos = Game.ui.getMouseLocation(); if (button==0 && action== GLFW.GLFW_PRESS) { if (mainMenu.tryClick(mousePos.x, mousePos.y)) { nextScene = Cubix.menu; exiting = tr...
[ "@Test\n public void mainMenuButtonIsClicked(){\n onView(withId(R.id.highscoreButton)).perform(click());\n onView(withId(R.id.mainMenuBtn)).perform(click());\n onView(withId(R.id.playButton)).check(matches(isDisplayed()));\n }", "@Override\r\n public void actionPerformed(ActionEv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method that returning list of gadgets
public List<Gadget> getGadgetList() { List<Gadget> gadgets = new ArrayList<>(); orders.entrySet().stream().forEach((s) -> s.getValue().forEach((s1) -> gadgets.add(s1))); return gadgets; }
[ "public List<Gadget> getGadgets(){\n\t \t\t\t\r\n\t \t\t\tList<Gadget> gadgets = new ArrayList<>();\r\n\t \t\t\tGadget g = new Gadget();\r\n\t \t\t\t\t\t\t\t\t\t\r\n\t \t\t\tString sql = \"Select * from gadgets\";\r\n\t \t\t\ttry{\r\n\t \t\t\t\tStatement st = (Statement) con.createStatement(); //prepare the stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Z3_mk_and (__in Z3_context c, __in unsigned num_args, __in_ecount(num_args) Z3_ast const args[])
private String mk_and(int andSize, String andList){ return "Z3_mk_and(ctx, "+andSize+", "+andList+")"; }
[ "And createAnd();", "public void performLogicalAnd(BranchCallback longBranch);", "public static interface And<C> {\n /**\n * Returns the next object in the chain of anded objects.\n */\n C and();\n }", "BooleanExpression and(Expression a, Expression b);", "BooleanFormula and(BooleanFormula......
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The current contract termination date
@ApiModelProperty(example = "null", value = "The current contract termination date") public LocalDate getCurrentContractTerminationDate() { return currentContractTerminationDate; }
[ "@Override\n\tpublic java.util.Date getLabor_contract_end() {\n\t\treturn _ext_information.getLabor_contract_end();\n\t}", "public Date getContractEndDate() {\n return contractEndDate;\n }", "public java.util.Date getTerminationDate() {\n return this.terminationDate;\n }", "public java.sql...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
takes an int card (152), and returns a nice looking String. Used A, J, Q, K for face. Used X instead of 10.
public static String cardToString(int card){ StringBuffer sb = new StringBuffer(""); //add the suit of the card //convert the suit number into letter //create an array of suits String[] suits = {"S", "H", "C", "D"}; sb.append(suits[suit(card) - 1]); //add the face...
[ "public static String cardToString(int card) {\n return String.format(\"%c%c\", cardValues.get(card % 13), suitValues.get(card / 13));\n }", "public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables the action if there is a selection in the package explorer or a valid element has been selected in the editor.
@Override public void selectionChanged(IAction action, ISelection selection) { if (selection != null) { action.setEnabled(true); return; } IJavaElement javaElement = JavaEditorUtils.getCurrentSelectedJaveElement(); if (JavaEditorUtils.isJavaElementSupported(ja...
[ "@Override\r\n\tpublic boolean isEnabled() {\n \tISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getSelection(); \r\n\t\tif (selection instanceof IStructuredSelection) { \r\n\t\t\tIStructuredSelection strucSel = (IStructuredSelection) selection;\r\n\t\t\tif (((IStructu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method forwards the TM frame to the sink and then tries to empty the internal buffer, in case of pending TM frames. If the TM frame cannot be immediately forwarded, it is added to the internal buffer for later forwarding. If in the buffer there is already another frame generated by the same virtual channel, then t...
@Override public synchronized void accept(TmTransferFrame tmTransferFrame) { // If the transfer frame is the one you expect, then if will be forwarded by tryForwarding. Otherwise... if (!tryForwarding(tmTransferFrame)) { // If there is another frame from the same VC while(this.pendingVcs.contains(tmTransferF...
[ "protected void sendNextFrame () { // NEW \n\t\n\t// Extract a frame-worth of data from the sending buffer.\n\tint frameSize = ((sendBuffer.size() < MAX_FRAME_SIZE) ? sendBuffer.size() : MAX_FRAME_SIZE);\n\tbyte[] data = new byte[frameSize];\n\tIterator<Byte> i = sendBuffer.iterator();\n \n \n\tfor (int j = 0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of isValidFullName method, of class ValidVariables.
@Test public void testIsValidFullName() { System.out.println("isValidFullName"); String fullName = "Aliki Manou"; boolean expResult = true; boolean result = ValidVariables.isValidFullName(fullName); assertEquals(expResult, result); }
[ "@Test\n public void testIsStringOnlyAlphabetAndNumbers() {\n System.out.println(\"isStringOnlyAlphabetAndNumbers\");\n String fullName = \"Ali8\";\n boolean expResult = true;\n boolean result = ValidVariables.isStringOnlyAlphabetAndNumbers(fullName);\n assertEquals(expResult, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table PUBLIC.ALBUM_RECORD
int insert(AlbumRecord record);
[ "@Insert({\n \"insert into biz_message_alarm_type (id_, name_, \",\n \"icon_, level_, order_, \",\n \"code_, device_type, \",\n \"description_)\",\n \"values (#{id,jdbcType=TINYINT}, #{name,jdbcType=VARCHAR}, \",\n \"#{icon,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT}, #{or...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets whether a document is starred.
@Override public boolean setDocumentStarred(String documentId, boolean starred) throws DocumentServiceException { DocumentListEntry entry = getDocumentEntry(documentId); try { entry.setStarred(starred); entry.update(); } catch (Exception e) { e.printStackTrace(); throw new Document...
[ "public Builder setStarredOnly(boolean value) {\n\n starredOnly_ = value;\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }", "boolean getStarredOnly();", "private void setTheStar() {\r\n \t\tMyLog.v(TAG, \"setTheStar()\");\r\n \t\tFav fav = DataManager.findFav(this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'network_status_version' field. metricslib/RelayNetworkStatusVote: int getNetworkStatusVersion()
public trans.encoders.relayVote.RelayVote.Builder setNetworkStatusVersion(int value) { validate(fields()[2], value); this.network_status_version = value; fieldSetFlags()[2] = true; return this; }
[ "public void setNetworkStatusVersion(java.lang.Integer value) {\n this.network_status_version = value;\n }", "public java.lang.Integer getNetworkStatusVersion() {\n return network_status_version;\n }", "public java.lang.Integer getNetworkStatusVersion() {\n return network_status_version;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add an album to this band
public void addAlbum(String albumTitle ){ }
[ "Album addAlbum(Album album);", "public void addAlbum(Album album)\r\n {\r\n\talbumCollection.add(album);\r\n }", "public void addAlbum(Album album) {\n if(this.addingAlbum)\n return;\n \n this.addingAlbum = true;\n this.album = album;\n album.addMedium(this);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return true iff b is a better block than a for head purposes
public static boolean isBetter(BlockSummary a, BlockSummary b) { if (a == null) return true; if ((!isCoordinator(a.getHeader().getShardId())) && (a.getHeader().getShardId() == b.getHeader().getShardId())) { // If we are not the coordinator and we both have the same shard id int a_highest_coor...
[ "public boolean ifOverlap(Block b) {\n\t\tint thisR1 = this.getTopLeft().getRow();\n\t\tint thisR2 = this.getBotRight().getRow();\n\t\tint thisC1 = this.getTopLeft().getCol();\n\t\tint thisC2 = this.getBotRight().getCol();\n\t\tint R1 = b.getTopLeft().getRow();\n\t\tint R2 = b.getBotRight().getRow();\n\t\tint C1 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click on Pinterest Button.
public ItemPage clickPinterestButton() { pinterest.click(); return this; }
[ "public void clickLikeBtn() {\n likeBtn.click();\n }", "public void clickPublishBtn() {\r\n\t\tthis.publishBtn.click();\r\n\t}", "public void clickPayButton () {\t\t\r\n\t\tpayButton.click();\r\n\t}", "public void clickButton(){\n\t \twebElement.click(); \n\t \treturn;\n\t}", "@Test\n publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleEpackage" $ANTLR start "ruleEpackage" InternalMyDsl.g:937:1: ruleEpackage : ( ( rule__Epackage__Group__0 ) ) ;
public final void ruleEpackage() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:941:2: ( ( ( rule__Epackage__Group__0 ) ) ) // InternalMyDsl.g:942:2: ( ( rule__Epackage__Group__0 ) ) { // InternalMyDsl....
[ "public final void rule__Epackage__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:6512:1: ( ( 'epackage' ) )\n // InternalMyDsl.g:6513:1: ( 'epackage' )\n {\n // InternalMyDsl....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that the title field is mandatory, i.e. if it is null, an exception is thrown.
@Test public void builderTitleIsMandatory() { // We expect an exception to be thrown thrown.expect(IllegalStateException.class); thrown.expectMessage("Missing required properties: title"); @SuppressWarnings({"unused", "UnusedAssignment", "ConstantConditions"}) Movie movie = ...
[ "private void checkTitle() {\n\t\tif (title == null) {\n\t\t\tinvalidArgs.add(MESSAGE_INVALID_TITLE);\n\t\t}\n\t}", "public void validateTitle(String title){\n boolean isValid = title != null && !title.isEmpty();\n setTitleValid(isValid);\n }", "public void testInvalidTitleEmpty() {\n\t\tasser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overrides the compareTo() method of the comparable interface so that the ListEngine can sort the DVD's using collections.sort. Sorts by due date and then by title
public int compareTo(DVD o) { int order = 0; /* * Checks to see if this DVD's date is before, after, or the * same as the other's. */ order = this.getBoughtReturn().compareTo(o.getBoughtReturn()); /* * If the dates are the same, sort by alphabetical title. */ if(order == 0){ order = thi...
[ "@Override\r\n\tpublic int compareTo(Episode e) {\r\n\t\tString inString = e.titleGetValue();\r\n\t\tString myString = this.titleGetValue();\r\n\t\tint compare = inString.compareTo(myString);\r\n\t\tif(compare == 0) return 0;\r\n\t\tif(compare > 0) return 1;\r\n\t\treturn -1;\r\n\t}", "@Override\n\tpublic int c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if another Tile is connected to this one
public boolean isConnected(Tile other) { // if the columns match if (getCol() == other.getCol()) { // if this Tile is one above, check for down & up pipes to connect if (getRow() + 1 == other.getRow()) return hasSide(DOWN) && other.hasSide(UP); // similar for one below if (getRow() - 1 == ot...
[ "public boolean connected(MapTile tile)\n\t{\n\t\tif(zone == -1) return false;\n\t\treturn zone == tile.getZone();\n\t}", "private boolean areConnected(Slot a, Slot b) {\n if (a.getX() == b.getX()) {\n if (Math.abs(a.getY() - b.getY()) == 1) {\n return true;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an empty RatingModel, needed to create a new Rating.
private RatingModel(int rating, BeerModel beerModel, UserModel userModel) { this.domainObject = new Rating(new Date(System.currentTimeMillis()), beerModel.getDomainObject(), userModel.getDomainObject(), rating); this.node = DBUtil.createNode(NodeType.RATING); DBUtil.createRelationship(this.node, RelType.CONTAI...
[ "public Rating() {\n\t\t\n\t}", "public Ratings() {\n this(DSL.name(\"ratings\"), null);\n }", "public Rating() {\n //empty constructor for Firebase purposes\n }", "public com.vodafone.global.er.decoupling.binding.request.RatingAttributesType createRatingAttributesType()\n throws ja...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads quiz file into hashmap and list
private void readQuizData(InputStream is) { // array to read in file lines List<String> lines = new ArrayList<>(); // read file lines in try { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is)); String line; while ((line = ...
[ "public ArrayList<quizImpl> readFile() {\n\n // The name of the file to open.\n String fileName = \"Quizzes.txt\";\n\n // This will reference one line at a time\n String line;\n\n try {\n //reads file twice the first time adding contacts the second adding meetings\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Input Connector' containment reference. If the meaning of the 'Input Connector' containment reference isn't clear, there really should be more of a description here...
PropertyMediatorInputConnector getInputConnector();
[ "public InputConnector getInputConnector()\n {\n return inputConnector;\n }", "public InputConnector getInputConnector(String connectorName);", "public NodeAddress getConnector() {\n return connector;\n }", "public Connector getConnector() {\n return connector;\n }", "Object...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AbstractComponentLink__Alternatives" $ANTLR start "rule__ActivityExtension__Alternatives" InternalComponentDefinition.g:1521:1: rule__ActivityExtension__Alternatives : ( ( ruleActivationConstraints ) | ( ruleOperationModeBinding ) | ( ruleDefaultTrigger ) );
public final void rule__ActivityExtension__Alternatives() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalComponentDefinition.g:1525:1: ( ( ruleActivationConstraints ) | ( ruleOperationModeBinding ) | ( ruleDefaultTrigger ) ) int alt6=...
[ "public final void ruleActivityExtension() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:657:2: ( ( ( rule__ActivityExtension__Alternatives ) ) )\n // InternalComponentDefinition.g:658:2: ( ( rule__Ac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate an array of length len, the numbers are no larger than bound.
static private int[] generateRandomNumbers(int len, int bound) { int [] a = new int[len]; for(int i=0; i<len; i++) { a[i] = new java.util.Random().nextInt(bound); } return a; }
[ "private static long[] generateArray(){\n Random r = new Random();\n long[] array = new long[size];\n for (int i = 0; i < size; i++){\n array[i] = 1 + (long) (r.nextDouble() * range);;\n }\n return array;\n }", "private static int[] generateArray(int size, int star...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ CONSTRUCTORS Creates a StockGrabber and initializes its list of registered observers as an empty ArrayList.
public StockGrabber() { observers = new ArrayList<>(); }
[ "public FishGrabber() {\n observers = new ArrayList<FishObserver>();\n\n }", "public StockManager()\n {\n stock = new ArrayList<>();\n }", "public StockExchange()\n {\n stocks = new ArrayList<Stock>();\n }", "public StockManager()\n {\n stock = new ArrayList<Produ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setCrAcc method, of class OBJSalesInvoiceQO.
@Test public void testSetCrAcc() { System.out.println("setCrAcc"); String CrAcc = ""; OBJSalesInvoiceQO instance = null; instance.setCrAcc(CrAcc); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype.");...
[ "@Test\r\n public void testGetCrAcc() {\r\n System.out.println(\"getCrAcc\");\r\n OBJSalesInvoiceQO instance = null;\r\n String expResult = \"\";\r\n String result = instance.getCrAcc();\r\n assertEquals(result, expResult);\r\n // TODO review the generated test code and ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adjust the toughness of this agent according to the toughness of opponents
public void adjustToughness() { if (this.opBidHistory.getMinToughness(TOUGHNESS_NUM_BIDS) < DEFAULT_TOUGHNESS && this.getTimeLine().getTime() < MAX_TIME_COPY_TOUGHNESS) { this.toughness = Math.max(MIN_TOUGHNESS, this.opBidHistory.getMinToughness(TOUGHNESS_NUM_BIDS)); } else { this.toughness = DEFAULT_TOUG...
[ "private void deriveToughness(){\n\t\ttoughness = 2 + atts.get(\"vigor\")/2;\n\t}", "private void calculateOthers()\n {\n\n this.toughness = new Attribute((this.vigor.getDice() / 2) + 2 + this.large.get() - this.small.get(), 0);\n this.parry = new Attribute((this.fighting.getDice() / 2) + 2, 0);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }