__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14471910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveAsXls() { File xlsFile = promptForFilename(); if (xlsFile == null) { return; } if(xlsFile.getName().toLowerCase().endsWith(".xls") == false) { File renameF = new File(xlsFile.getAbsolutePath()+".xls") ; xlsFile = renameF ; } XlsReader xlsreader = new XlsReader(); xlsreader.write(this, xlsFile); } COM: <s> save the table as xls </s>
funcom_train/32070005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAccounts(Collection<Account> accounts) { boolean addOk = getAccounts().addAll(accounts); if (addOk) { for(Account account : accounts) { account.setLocale((Locale)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed accounts collection to the locale collection </s>
funcom_train/9140111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(char[] cbuf, int offset, int len) throws IOException { if (EOF) return -1; int i=0; for(;i<len;i++) { int c = this.read(); if (c == -1) { //System.out.println(" rtr="+i); return i;//not i-1, as i (iterator) is 1 behind no of chars read } else cbuf[offset++] = (char)c; } return i; } COM: <s> read characters into a portion of an array </s>
funcom_train/21178093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List createPropagators() { List result = new ArrayList(); String nextLevel = getParentLevel(); if (nextLevel != null) { if (isPropagateAvg()) { AvgValue v = new AvgValue(getId(),getLevel()); result.add(v); } if (isPropagateMax()) { MaxValue max = new MaxValue(getId(),getLevel()); result.add(max); } if (isPropagateSum()) { Sum s = new Sum(getId(),getId()); result.add(s); } } return result; } COM: <s> create a list of propagators avg value max value sum applicable to </s>
funcom_train/16383164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { //make a new root ResultNode doc = new ResultNode(null, null, this.name); //execute each recordset for(int i = 0; i < recordSets.size(); i++) { RecordSet recordSet = recordSets.get(i); doc = recordSet.execute(doc); } this.setDocument(doc); } COM: <s> execute document definition </s>
funcom_train/28253177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map t) { Iterator i = t.entrySet().iterator(); while (i.hasNext()) { Object en = i.next(); if (en instanceof Map.Entry) { Map.Entry e = (Map.Entry)en; put(e.getKey(), e.getValue()); } else if (en instanceof Entry) { Entry e = (Entry)en; put(e.getLongKey(), e.getValue()); } } } COM: <s> copies all of the mappings from the specified map to this one </s>
funcom_train/22798660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionMessages updateHardwareComponent(RequestContext requestContext, HardwareComponent component, Map<Integer, Attribute> customAttributes) throws DatabaseException { ActionMessages errors = new ActionMessages(); // Validate attributes AdminUtils.validateAttributeValues(requestContext, errors, component, customAttributes); if (!errors.isEmpty()) { return errors; } HardwareDao hardwareDao = new HardwareDao(); return hardwareDao.updateHardwareComponent(component); } COM: <s> this is for updating hardware component </s>
funcom_train/27825230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String constantAsSQL(Object constant) { if (constant==null) return "NULL"; else if (constant instanceof Boolean) return ((Boolean)constant).booleanValue() ? "1" : "0"; else if (constant instanceof Integer) return constant.toString(); else return "'"+encodeApostrophes(constant.toString())+"'"; } COM: <s> formats the given constant for sql </s>
funcom_train/25010462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getData(final DropTargetDragEvent e) throws Exception { DataFlavor[] flavors = e.getTransferable().getTransferDataFlavors(); DataFlavor chosen = null; System.out.println("local transfer"); for (int i = 0; i < flavors.length; i++) { if (e.isDataFlavorSupported(flavors[i])) { chosen = flavors[i]; break; } } return e.getTransferable().getTransferData(chosen); } COM: <s> gets data from the drag </s>
funcom_train/18646410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRelevantToRoleType(RoleType roleType) { boolean ret=false; if (getThisRole() != null && roleType != null) { ret = getThisRole().equals(roleType); } if (ret == false && getFreeRole() != null && roleType != null) { ret = getFreeRole().equals(roleType); } return(ret); } COM: <s> this method determines whether the cdl type or any </s>
funcom_train/1917647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStreamChunk(StreamChunk toAdd) { if (toAdd == null) { throw new IllegalArgumentException("Argument must not be null."); } if (!Arrays.asList(this.streamChunks).contains(toAdd)) { StreamChunk[] tmp = new StreamChunk[this.streamChunks.length + 1]; System.arraycopy(this.streamChunks, 0, tmp, 0, this.streamChunks.length); tmp[tmp.length - 1] = toAdd; this.streamChunks = tmp; } } COM: <s> this method appends a stream chunk to the header </s>
funcom_train/12186664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String resolveHref(String href) throws MalformedURLException { URL base = getPipelineContext().getCurrentBaseURI(); URL resolvedURL; if (base == null) { resolvedURL = new URL(href); } else { resolvedURL = new URL(base, href); } return resolvedURL.toExternalForm(); } COM: <s> helper method used to resolve relative uris </s>
funcom_train/40712818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onHistForward() { PageNode nextPage = null; int nextPageID = -1; while(nextPage == null) { if(futureStack.isEmpty()) { Toolkit.getDefaultToolkit().beep(); return; } nextPageID = futureStack.removeLast(); nextPage = tree.getPage(nextPageID); } historyStack.addLast(nextPageID); gotoPage(nextPage, false); } COM: <s> navigates to the next page in the history </s>
funcom_train/43796015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertIsLoggedInAdmin(int sessionId){ UserType loggedInUserType = _userHandler .getCurrentlyLoggedInUserType(_userHandler .matchUsernameToSessionId(sessionId)); if (loggedInUserType == null){ // The requesting user is not logged in throw new UnauthorizedAccessException( "Unauthorized Admin Operation Access Exception"); } if (loggedInUserType.compareTo(UserType.ADMIN) < 0){ // Only an admin can remove users throw new UnauthorizedAccessException( "Unauthorized Admin Operation Access Exception"); } } COM: <s> checks whether the given session id belongs to a currently logged in admin </s>
funcom_train/13944782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getChild(Object parent, int index) { if (parent == root) { if ((soms != null) && (soms.size() > index)) { DefaultMutableTreeNode node = new DefaultMutableTreeNode(((MusicMap) soms.get(index)).getName()); return node; } } return null; } COM: <s> returns the child of one node on position index </s>
funcom_train/12917358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MP3Track getMP3Track(String ID) { for (int i=0;i<playlist.size();i++) { if (ID.equalsIgnoreCase((String)playlist.elementAt(i))) { logger.debug("Returning track ID "+ID); return new SimpleTrack(ID); } } return null; } COM: <s> obtain an mp3 track </s>
funcom_train/44398415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendWithConfirmation(UserId userId, Document messageToSend) { int id = getNextMessageId(); messageToSend.selectSingleNode("//message/@id").setText(String.valueOf( id)); server.sendMessage(userId, messageToSend); recordMessage(userId, id, messageToSend); } COM: <s> sends message and recods it to await for its confirmation </s>
funcom_train/42202391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyStream(InputStream is, OutputStream os) throws IOException { byte[] buffer = new byte[1024]; int i; while (true) { // read from the input... i = is.read(buffer, 0, buffer.length); if (i < 0) break; // and write it right back to the output os.write(buffer, 0, i); os.flush(); } } COM: <s> copies one stream to another </s>
funcom_train/25205342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimen toDimen(FixedDimen size) { if (size == null) { throw new IllegalArgumentException("size"); } int shift = POINTSHIFT; long z = size.getValue(); while (z >= MAX_FIXWORD_VALUE) { z >>= 1; shift -= 1; } return new Dimen(z * value >> shift); } COM: <s> convert the fixword value to a dimen value </s>
funcom_train/13393818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return getDomain() + "\tTRUE\t" + getPath() + "\t" + String.valueOf(getSecure()).toUpperCase() + "\t" + getExpires() + "\t" + getName() + "\t" + getValue(); } COM: <s> creates a string representation of this cookie </s>
funcom_train/36168890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel(); if (view instanceof View) { Integer id = new Integer(NetworkVisualIDRegistry.getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/2949383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(java.io.File f) { String ext = ""; //$NON-NLS-1$ if (f != null) { String filename = f.getName(); int i = filename.lastIndexOf('.'); if (i > 0 && i < filename.length() - 1) { ext = filename.substring(i + 1).toLowerCase(); } } if (extension.equals(ext) || f.isDirectory()) { return true; } else { return false; } } COM: <s> determines whether to show files of the given type </s>
funcom_train/32982783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void popStock(BusMessage oMessage) throws Exception { int idxLast = _oScreenStack.size() - 1; if (idxLast > 0) { ActionScreen oScreen = (ActionScreen) _oScreenStack .remove(idxLast); // oScreen.exit(oMessage); oScreen = (ActionScreen) _oScreenStack.get(idxLast - 1); _oContext.getController().setScreenContent(oScreen); } } COM: <s> remove the top entry from the stack </s>
funcom_train/18454301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int popChar() { int len = fFindString.length(); if (len > 0) { fFindString.deleteCharAt(--len); if (fCasePosition == len) fCasePosition = -1; } // When findString is empty, go back to base position regardless. if (len == 0) { fCurrentIndex = fBasePosition; fStack.clear(); } else if (fStack.empty()) return -1; else fCurrentIndex = ((Integer) fStack.pop()).intValue(); setSelection(fElements[fCurrentIndex]); return fCurrentIndex; } COM: <s> delete a character from the find string </s>
funcom_train/2921603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void preTask(final Object element, final Object context) { this.context = context; final IElementAdapter adapter = getAdapter(element); if (adapter == null) return; adapter.setContext(context); if (!ask(SHALL_HANDLE, element, PUSH)) return; fireEvent(PRE_TASK, element, NORMAL_FRAME); checkInterrupt(); try { if (ask(SUSPEND, element, NORMAL_FRAME)) { fireEvent(SUSPENDED); commandListener.listenCommand(); checkInterrupt(); fireEvent(RESUMED); } } catch (final IOException e) { throw new DebuggerInterruptedException("User interrupt"); } } COM: <s> the main method to manipulate the runtime process for debugging </s>
funcom_train/48580506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configureSlider(int _min, int _max, int _start, int _minSpacing, int _majSpacing) { slider = new JSlider(); slider.setMinimum(_min); slider.setMaximum(_max); slider.setValue(_start); slider.setMajorTickSpacing(_majSpacing); slider.setMinorTickSpacing(_minSpacing); slider.setPaintLabels(true); slider.setPaintTicks(true); slider.addChangeListener(this); } COM: <s> sets the configuration parameters for the slider </s>
funcom_train/38439138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String GetValue ( String aChildName, String aKey ) { Hashtable aChildHash = null; if (main.containsKey(aChildName)) aChildHash = (Hashtable) main.get(aChildName); else return new String(); Object aValue = aChildHash.get(aKey); if (aValue == null) return new String(); return aValue.toString(); } COM: <s> method get value retrieves a value for given folder and key </s>
funcom_train/10869759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrecedence() throws Exception { QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, "field", new MockAnalyzer(random, MockTokenizer.WHITESPACE, false)); Query query1 = qp.parse("A AND B OR C AND D"); Query query2 = qp.parse("+A +B +C +D"); assertEquals(query1, query2); } COM: <s> this test differs from test precedence query parser </s>
funcom_train/26095891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStartLevelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Edge_startLevel_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Edge_startLevel_feature", "_UI_Edge_type"), ArnePackage.Literals.EDGE__START_LEVEL, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the start level feature </s>
funcom_train/16764407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(JMEExporter e) throws IOException { // TODO: Verify that Map.keySet() and Map.values() guarantee parallel // entrySet ordering. e.getCapsule(this) .write( keySet().toArray(new String[0]), "keys", null); } COM: <s> subclasses must super </s>
funcom_train/5245064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean importAnnots(Pred p) { boolean imported = false; if (p.hasAnnot()) { Iterator<Term> i = p.getAnnots().iterator(); while (i.hasNext()) { Term t = i.next(); // p will only contain the annots actually added (for Event) if (!hasAnnot(t)) { addAnnot((Term) t.clone()); imported = true; } else { // Remove what is not new from p i.remove(); } } } return imported; } COM: <s> import annotations from another predicate i p i </s>
funcom_train/5463189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule cloneRule() { if (getNumVars() > 0) { HashMap<Variable, Value> vmap = new HashMap<Variable, Value>(); return new Rule(name, cloneClauseArray(head, vmap, null), cloneClauseArray(body, vmap, null)); } else { return this; } } COM: <s> clone a rule cloning any embedded variables </s>
funcom_train/50939910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(String key, List value) { TreePropertyMaker maker = new TreePropertyMaker(); for (int i = 0; i < value.size(); i++) { maker.addElement(value.get(i).toString()); } setProperty(key, maker.getString()); } COM: <s> set the list to the property using tree property maker </s>
funcom_train/50915511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transform(Transform2 t2) { if (hasCoordinates(CoordinateType.TWOD)) { Real2 xy = new Real2(this.getX2(), this.getY2()); xy.transformBy(t2); this.setX2(xy.getX()); this.setY2(xy.getY()); } } COM: <s> transforms 2 d coordinates of atom </s>
funcom_train/45239392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public K set(int index, K element) { Entry old; if(containsKey(element)) { throw new IllegalArgumentException("Adding specified duplicate element violates Set property"); } else if((old = list.get(index)).key.equals(element)) { return element; } else { K r = old.key; remove(r); old.key = element; outerThis.add(index, old); } } COM: <s> replaces the element at the specified position in this list with </s>
funcom_train/1060908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InteractionFragment getOwner(Point locationAbs) { AnalyseOwnerCommand ownerCmd = new AnalyseOwnerCommand(); ownerCmd.setDiagram(LookForElement.getDiagram(cfragmentView)); ownerCmd.setAnyEditPart(anyEditPart); ownerCmd.setLocation(locationAbs); ownerCmd.execute(); InteractionFragment owner = ownerCmd.getOwner(); ownerCmd.dispose(); return owner; } COM: <s> returns the nearest enclosing interaction or interaction operand to the specified </s>
funcom_train/32114518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintWriter getWriter() throws IOException, MissingParameterException { if (getName() == null) { throw new MissingParameterException("name"); } AnnotationProcessorEnvironment env = getAnnotationProcessorEnvironment(); return env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, pkg, new File(getName()), charset); } COM: <s> return the writer to the specified file </s>
funcom_train/17732695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMinutesRollover() { logger_.info("Running testMinutesRollover..."); ElapsedTime elapsed = new ElapsedTime(0, ElapsedTime.HOUR); ElapsedTime compare = new ElapsedTime(0, 1, 0, 0, 0); assertEquals("hours is incorrect", compare, elapsed); logger_.debug(elapsed); } COM: <s> tests minutes rollover 60mins 1 hour </s>
funcom_train/43787721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGive(int horizontal, int vertical) { if (horizontal > MAX_GIVE_OR_TAKE.horizontal || vertical > MAX_GIVE_OR_TAKE.vertical) { throw new RuntimeException("Maximum 'give' in either direction is 100."); } give = new Magnitude(horizontal, vertical); } COM: <s> the max give in either direction is 100 </s>
funcom_train/19230244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataMap(MetaMap dataMap) { if (mDataMap == dataMap) return; Object old = this.mDataMap; mDataMap = dataMap; notify(LWKey.DataUpdate, old); if (mLabelFormat != null) { setLabelImpl(fillLabelFormat(mLabelFormat), true, false); } } COM: <s> replace all data on this node at once generating events for undo </s>
funcom_train/31310506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue( Object value, String fieldName ) { Object key; key = getSubMapperKey(value); IoSCellEditorValueMapper mapper = (CellEditorSubMapper) subMappers.get(key); if (mapper == null) throw new RuntimeException("No submapper for key = "+key+" !"); return mapper.getValue(value, fieldName); } COM: <s> dispatch get value call to sub mapper </s>
funcom_train/7615360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMinValue(int component) { if (component < 0 || component > numComponents - 1) { // awt.16A=Invalid component index: {0} throw new IllegalArgumentException(Messages.getString("awt.16A", component)); //$NON-NLS-1$ } return 0; } COM: <s> gets the minimum normalized color component value for the specified </s>
funcom_train/31872962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntList insert(int index, int value) throws SizeLimitExceededException { if (this.size == 0) { append(value); return this; } if (this.size > Constants.LIST_SIZE_LIMIT) { throw new SizeLimitExceededException(); } if (this.size == this.data.length) expandDataBuffer(); index = Instruction.normalizeIndex(index, this.size); System.arraycopy(this.data, index, this.data, index+1, this.size - index); this.data[index] = value; this.size++; return this; } COM: <s> inserts new element to this list at specified index </s>
funcom_train/43631777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unselectAll() { selected = null; updatePropEditor(); if(adding != null) { if(adding.isComplete()) { objects.add(adding); adding = null; } else { adding = null; } } Iterator <Object>i = objects.iterator(); while(i.hasNext()) { i.next().unselect(); } redraw(); } COM: <s> unselect all the object in the scene </s>
funcom_train/3909974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { setDialogTitle(Messages.getString("uk.ac.reload.editor.contentpackaging.resourceview.CP_ResourceChooser.0")); //$NON-NLS-1$ setMultiSelectionEnabled(true); setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); _checkbox = new JCheckBox(Messages.getString("uk.ac.reload.editor.contentpackaging.resourceview.CP_ResourceChooser.1")); //$NON-NLS-1$ _checkbox.setSelected(_wasChecked); setAccessory(_checkbox); } COM: <s> routine to pass in the question text to be shown along side </s>
funcom_train/50235988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean saveCurrentFile() { Document Doc = editor.getDocument(); FileSaver saver = new FileSaver(openedFile, editor.getDocument()); if (!saver.canWrite()) { if (saveAsFileBox()) return true; return false; } saver.start(); updateDisplayedFileName(); return true; } COM: <s> saves the current file </s>
funcom_train/17203246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void breakCodeOrder(BasicBlock bb1, BasicBlock bb2) { if (IR.SANITY_CHECK) VM._assert(bb1.next == bb2); if (IR.SANITY_CHECK) VM._assert(bb2.prev == bb1); bb1.next = null; bb2.prev = null; } COM: <s> create a break in the code order between bb1 and bb2 </s>
funcom_train/51162551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void evalOrLoad(String it) { if (it.startsWith("(")) load(new java.io.StringReader(it)); else if (! it.startsWith("-")) { enter(); try { Scheme.load(it); } finally { exit(); } } } COM: <s> eval or load a string </s>
funcom_train/9821249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insertTechMapHints(Cell c) { NodeList children = c.getChildren(); for (children.init(); !children.atEnd(); children.next()) insertTechMapHints(children.getCell()); // if (c.isPlaced()) { // String rloc = getRLOCFromPlacementInfo(c); // if (!rloc.equals("")) // c.replaceProperty("RLOC", rloc); // } } COM: <s> adds the hints to the tree recurses through all cells and puts </s>
funcom_train/32890213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void relaxBucket(int laneId, int prevpos) { float curWait = bucket[laneId][WAIT]; float curBuck = bucket[laneId][BUCK]; if(curWait>0) { bucket[laneId][WAIT]--; curWait--; bucket[laneId][BUCK] = curBuck*(curWait/(curWait+1)); } else { // Apparently the Roaduser didnt wait before crossing, like he was on pos1 or 2 and had enough speed. bucket[laneId][WAIT] = 0; bucket[laneId][BUCK] = 0; } } COM: <s> empties the gain value bucket partly which is being filled when roadusers are </s>
funcom_train/43526165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextWord() throws IOException { String res = null; if (matcher != null) { while (res == null) { if (matcher.find()) { res = matcher.group(1); } else if (reader.ready()) { matcher = pattern.matcher(reader.readLine()); } else { break; } } } return res == null ? null : res.toLowerCase(); } COM: <s> returns the next word in file </s>
funcom_train/8324173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExpression(String operand) { StringBuilder buf = new StringBuilder(64); buf.append(name); buf.append('('); if (distinct) { buf.append("distinct "); } buf.append(operand); buf.append(')'); return buf.toString(); } COM: <s> returns the expression to apply this aggregator to an operand </s>
funcom_train/29832046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Locale localeFromConfiguration() { Locale locale = Locale.getDefault(); if (!useSystemLocale) { if (!localeLanguage.isEmpty()) { if (!localeCountry.isEmpty()) { if (!localeVariant.isEmpty()) { locale = new Locale(localeLanguage, localeCountry, localeVariant); } else { locale = new Locale(localeLanguage, localeCountry); } } else { locale = new Locale(localeLanguage); } } } return locale; } COM: <s> determines the selected locale from the configuration values </s>
funcom_train/45811925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadMapping(InputSource isource) { // Read mapping file. ContentHandler handler = new MappingHandler(this); try { XMLReader parser = new DefaultXMLReaderFactory().createXMLReader(); parser.setContentHandler(handler); parser.setErrorHandler(new Slf4jSaxErrorHandler(log)); parser.parse(isource); } catch (Exception e) { throw new OntopiaRuntimeException(e); } } COM: <s> internal read a mapping description from the specified file </s>
funcom_train/9362578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTiming(String label) { if (mPerfWriter != null) mPerfWriter.writeStartTiming(label); mPerfMeasurement = new Bundle(); mPerfMeasurement.putParcelableArrayList( METRIC_KEY_ITERATIONS, new ArrayList<Parcelable>()); mExecTime = SystemClock.uptimeMillis(); mCpuTime = Process.getElapsedCpuTime(); } COM: <s> start measurement of user and cpu time </s>
funcom_train/45697827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calcMaxDepth() { int depth = 0; if (children.isEmpty()) { return depth; } else { depth++; for (Tree child : children) { final int childDepth = child.calcMaxDepth(); if (childDepth + 1 > depth) { depth = childDepth + 1; } } } return depth; } COM: <s> calculates how deep this tree is </s>
funcom_train/10749239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test5() { Constructor[] cs = getClass().getConstructors(); assertNotNull("Unexpected null", cs); assertEquals("Assert 0: array length:", 1, cs.length); assertEquals("Assert 1: array length:", 0, cs[0].getParameterTypes().length); } COM: <s> the get constructors method must not return public constructors of the </s>
funcom_train/41991465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getText(Element element) { StringBuilder sb = new StringBuilder(); NodeList nl = element.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node n = nl.item(i); if (n.getNodeType() == Node.TEXT_NODE) { sb.append(n.getNodeValue()); } } return sb.toString(); } COM: <s> get text within an element </s>
funcom_train/48144343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponent(int i,int j,int k,int l,double x) { if(i>=0 && i<4 && j>=0 && j<4 && k>=0 && k<4 && l>=0 && l<4) rank4[i][j][k][l]=x; else throw new DimensionException("Invalid component."); } COM: <s> sets the value of a component of this tensor </s>
funcom_train/43467357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNewDoc() { AbstractDocument doc = new OpenOfficeDocument(); try { assertEquals("Activate Openoffice", zXType.rc.rcOK.pos, doc.activate().pos); assertEquals("Create new blank document", zXType.rc.rcOK.pos, doc.newDoc(null).pos); } finally { assertEquals("Close document", zXType.rc.rcOK.pos, doc.closeDoc(false).pos); } } COM: <s> test new doc </s>
funcom_train/13915676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void kill() { // Check if each thread is still alive and kill it if it is... for (int i = 0; i < this.cjeExecutorThreads.size(); i++) { ETLJobExecutor je = (ETLJobExecutor) this.cjeExecutorThreads.get(i); // If the thread is dead, remove it from our collection... if (je.isAlive() == false) { je.interrupt(); } } } COM: <s> runs through the threads to see if they are still running </s>
funcom_train/17688229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (in != null) { try { in.close(); } catch (IOException e) { e.printStackTrace(System.err); } } if (out != null) { try { out.close(); } catch (IOException e) { e.printStackTrace(System.err); } } if (port != null) { port.close(); } } COM: <s> closes communication port </s>
funcom_train/23011385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void extentChanged() { if (!(projection == null || stopped)) { lastExtent = (project.maxExtent.isZero()) ? new FloatRectangle(0f, 0f, 0f, 0f) // load entire map : getExtent(); request.setSpatialExtent(lastExtent, null); startServiceThread(); } } COM: <s> this method is called after maps extent have changed </s>
funcom_train/48343802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Environment getEnvironment() throws UnknownResourceException { // Make sure that the current environment is still the current // environment. This is important for cases where the environment // was moved to another node and has returned. try { current = Environment.lookup(current.getId()); } catch (IllegalArgumentException x) { throw new UnknownResourceException(x.getMessage()); } return current; } COM: <s> get the current environment </s>
funcom_train/44869819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawGeometricBean getXPoint() { if (xPoint == null) { xPoint = new WCMDrawGeometricBean(); xPoint.setH(3); xPoint.setShape(10); xPoint.setFillColor(Color.gray); xPoint.setColor(Color.gray); xPoint.setX1(getXInput()); xPoint.setY1(getVOfX()); xPoint.setV(3); if (presentation) { xPoint.setV(5); xPoint.setH(5); } } return xPoint; } COM: <s> this method initializes x point </s>
funcom_train/40931513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationInstanceInfos getApplicationInstanceInfos() { Vector playerList = new Vector(); int nbPlayer = this.actorSessionSize(); ActorSession actorSession = null; for(Iterator iter = this.enumerateActorSession(); iter.hasNext();){ actorSession = (ActorSession) iter.next(); playerList.add("pseudo"); playerList.add(new Integer(actorSession.getActorID())); } ApplicationInstanceInfos appInstanceInfos = new ApplicationInstanceInfos( this.getApplicationInstanceID(), nbPlayer, playerList ); return appInstanceInfos; } COM: <s> for lobby service this method provide informations of the application instance </s>
funcom_train/5420137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unzip(String path , String s) throws IOException { String fullPath = getFullPath( path , s ); FileOutputStream out = new FileOutputStream(fullPath); byte [] b = new byte[512]; int len = 0; while ( (len=zin.read(b))!= -1 ) { out.write(b,0,len); } out.close(); } COM: <s> unzips some file from the zip </s>
funcom_train/44849832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendWarningMail() { Long lGroupID = getGroupID(); try { QueryResult lAdmins = BOMHelper.getJoinGroupAdminToMemberHome().select(lGroupID); NoReviewerNotification lMail = new NoReviewerNotification(AddressAdapter.fill(lAdmins, MemberHome.KEY_MAIL), getGroupName(lGroupID)); lMail.send(); } catch (Exception exc) { LOG.error("Error encountered while sending a mail to group adminstrators.", exc); //$NON-NLS-1$ } } COM: <s> notifies the group administration that there are no reviewers available </s>
funcom_train/49469460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PageCounter countVRTVulnerabilities(VRTId e_vulnerability_vrt_id, Boolean my, Filter f) throws Exception, RaciException { _logger.info("VRT : countVRTVulnerabilities "+e_vulnerability_vrt_id+","+my+","+f); List<Number> no_match = new ArrayList<Number>(); no_match.add(4); // no status 4 == ignored return doCountVRTVulnerabilitiesFiltered(e_vulnerability_vrt_id, null, no_match, my, f); } COM: <s> page counter for list unignored vulnerabilities associated with a particular vrt meeting </s>
funcom_train/8242571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection get(String connectionString) throws DBException { try { getInstance(); return DriverManager.getConnection(jdbcRootString + connectionString); } catch(SQLException e) { throw new DBException(jdbcRootString + connectionString + ": " + e.getMessage(), e); } catch(ClassNotFoundException e) { throw new DBException(jdbcRootString + connectionString + ": Class not found, check your classpath."); } } COM: <s> returns a new </s>
funcom_train/29576223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputSource resolveEntity(String publicId, String systemId) { if (validationInputSource.getSystemId() != null) { return new InputSource(validationInputSource.getSystemId()); } else if (systemId != null) { return new InputSource(systemId); } return null; } COM: <s> entity resolver method allows us to override an existing system id </s>
funcom_train/48506488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getIcon (String name) { PersistentIconManager pim = ServerContext.getPersistentIconManager(); // Get all the plugins in the database try { if (pim.getIcon(name) != null) { return pim.getIcon(name); } } catch (Exception e) { e.printStackTrace(); } // If that doesn't work for whatever reason, get all icons from local hash table if (knownIcons.get(name) != null) { return knownIcons.get(name); } // If no icons exist then return null. return null; } COM: <s> determine if icon exists </s>
funcom_train/44601812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_assume_29(){ if(testIsDisabled("Compiler reports that null comparison always yields false")) return; compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X {\n" + " public X() {\n" + " Object x = null;\n" + " //@ assume x!=null;\n" + " }\n" + "}\n", "new X()", null, JMLAssumeError.class); } COM: <s> is assume supported </s>
funcom_train/32057962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCells() { System.out.println("testGetCells"); GraphModel gm = null; CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); CellView[] cv = new CellView[5]; assertEquals("getCells failed", cache.getCells(cv) != null, true); } COM: <s> this function tests get cells function of graph layout cache class </s>
funcom_train/20671835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeListener(IEngineListener l){ if (_logger.isDebugEnabled()) { _logger.debug("removeListener(IEngineListener) - >> ENTER"); } if(l != null){ this._listeners.remove(l); } if (_logger.isDebugEnabled()) { _logger.debug("removeListener(IEngineListener) - << EXIT"); } } COM: <s> remove the given listener </s>
funcom_train/48493912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { // Null names are not allowed if (name == null) return; if (this.name != null && this.name.equals(name)) return; for (NameChangeEvent event : nameChange) { name = event.nameChanging(this, name); } this.name = name; for (NameChangeEvent event : nameChange) { event.nameChanged(this, this.name); } } COM: <s> sets a new name </s>
funcom_train/51153931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append( XModel childNode ) { if ( childNode instanceof XPojoModel ) { childNode.setParent( this ); saveModelNode( childNode.getId(), (XPojoModel)childNode ); } else { DebugLogger.logError( "Unsupported operation: append(XModel)" ); throw ( new UnsupportedOperationException( "append" )); } } COM: <s> append a node </s>
funcom_train/41768215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchTitle(String[] commands) { String title; if (commands.length > 1) title = commands[1]; else { System.out.print("Search for title: "); try { title = sc.nextLine(); } catch (Exception e) { System.out.println("Error while reading line."); return; } } showList(bookcollection.getBooksByTitle(title)); } COM: <s> search for title </s>
funcom_train/37229073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCodingSystem( String sCodeSystem ) { HL7Element e = new SimpleElement( iLevel + 1, this ); e.setType( "ID" ); e.setName( "CWE.3" ); e.setValue( sCodeSystem ); try { setComponent( e, 3 ); } catch( MalformedFieldException mfe ) { mfe.printStackTrace(); } } COM: <s> set the coding system used in an existing coded element </s>
funcom_train/50310829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNextPageButtonState(int nextPageButtonState) { int oldNextPageButtonState = this.nextPageButtonState; this.nextPageButtonState = nextPageButtonState; propertyChangeSupport.firePropertyChange("nextPageButtonState", new Integer(oldNextPageButtonState), new Integer(nextPageButtonState)); } COM: <s> setter for property next page button state </s>
funcom_train/47608163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadMatrices() { if(prNeedsUpdate) { updateProj(); prNeedsUpdate = false; } if(mvNeedsUpdate) { updateModel(); mvNeedsUpdate = false; } gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); gl.glLoadMatrixd(matProj, 0); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); gl.glLoadMatrixd(matModel, 0); } COM: <s> loads the matrices to set the current view </s>
funcom_train/41164616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(AgStatusExercises2 entity) { EntityManagerHelper.log("saving AgStatusExercises2 instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ag status exercises2 </s>
funcom_train/16480811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMode0Address() { switch (m_memIndex) { case 0: return "bx+si"; case 1: return "bx+di"; case 2: return "bp+si"; case 3: return "bp+di"; case 4: return "si"; case 5: return "di"; case 6: return "0x"+Hex.toHexStringUnsigned(disasm.nextWord(),4); case 7: return "bx";//fff8 default: throw new RuntimeException(); } } COM: <s> decodes the indirect memory operand corresponding to mode 0 </s>
funcom_train/22131115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String str) { String[] tmp; if (size == data.length) { tmp = new String[data.length + GROW]; System.arraycopy(data, 0, tmp, 0, data.length); data = tmp; } data[size] = str; size++; } COM: <s> adds a new element to the end of the list </s>
funcom_train/25974020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRecType(String uuid, String name, String description, ArrayList udfs) { HashMap custom = new HashMap(); custom.put("uuid", uuid); custom.put("name", name); custom.put("description", description); custom.put("udfs", udfs); String[] caption = new String[2]; caption[0] = name; caption[1] = description; this.recTypes.addItem(caption, null, custom); } COM: <s> adds a new rec type to the list </s>
funcom_train/326739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canPlot(double bearing) { switch (radarParameters.sides) { case RadarParameters.SIDES_ALL: return true; case RadarParameters.SIDES_BACKHALF: return ((bearing >= 90 && bearing <= 270) || bearing <= -90); case RadarParameters.SIDES_FRONTHALF: return ((bearing >= -90 && bearing <= 90) || bearing >= 270); case RadarParameters.SIDES_LEFTHALF: return ((bearing >= -180 && bearing <= 0) || bearing >= 180); case RadarParameters.SIDES_RIGHTHALF: return (bearing >= 0 && bearing <= 180); } return false; } COM: <s> return true if the point can be plotted on this particular </s>
funcom_train/32986120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Connection dbconn) throws TorqueException { Criteria crit = new Criteria(); crit.add(DBChemicalNamePeer.MOLECULE_ID, this.getMoleculeId()); crit.add(DBChemicalNamePeer.NAME, getName()); List v = DBChemicalNamePeer.doSelect(crit,dbconn); if (v.size() == 0) { super.save(dbconn); } } COM: <s> saves a chemical name checking that the name does not yet exist </s>
funcom_train/26212999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer result = new StringBuffer(); result.append((this.userName == null) ? "null" : this.userName); result.append(":"); result.append((this.password == null) ? "null" : this.password); return result.toString(); } COM: <s> get this object string </s>
funcom_train/6439530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { StringBuffer buf = new StringBuffer(); buf.append(super.getMessage()); if(nested != null) { buf.append(", nested exception: "); buf.append(nested.getMessage()); } return buf.toString(); } COM: <s> returns the message of this exception and the nested exception </s>
funcom_train/43408391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getClearButton() { if (clearButton == null) { clearButton = new JButton(); clearButton.setText("Clear Result"); clearButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { tableModel.setList(new ArrayList()); resetTable(); } }); } return clearButton; } COM: <s> this method initializes clear button </s>
funcom_train/18050757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create(String pass, byte[] keyfile, int rounds) throws KeydbException { this.close(); this.header = new KeydbHeader(rounds); this.setProgress(5, Config.getLocaleString(keys.KD_GENERATE_KEY)); this.key = this.makeMasterKey(pass, keyfile, 5, 95); this.setProgress(95, Config.getLocaleString(keys.KD_PREPARE_STRUCTURE)); this.plainContent = new byte[4096]; this.contentSize = 0; this.makeGroupsIndexes(); this.makeEntriesIndexes(); setProgress(100, Config.getLocaleString(keys.KD_DONE)); watchDog.setTimer(TIMER_DELAY); } COM: <s> create empty database </s>
funcom_train/9201283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean match(String pattern, String httpMethod, URLPattern urlPattern) throws Exception { if (match(pattern, urlPattern)) { Collection methods = urlPattern.getWebResourceCollection().getHttpMethods(); if (methods.isEmpty() || methods.contains(httpMethod.toUpperCase())) { return true; } } return false; } COM: <s> test to see if a string pattern and http method matches a urlpattern </s>
funcom_train/39378562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHref() { if (isExternal()) { return getPath(); } else if ("#".equals(getPath())) { return getContext().getResponse().encodeURL(getPath()); } else { Context context = getContext(); return context.getResponse().encodeURL(context.getRequest().getContextPath() + "/" + getPath()); } } COM: <s> return the menu anchor href attribute </s>
funcom_train/45547988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void truncateEntryCount(long count, boolean trim) throws IOException { validator.nonNegative(count); if (count >= getEntryCount()) { return; } setEntryCount(count); setLastOffsetImpl(getMetrics(), true); if (trim) { trimToCount(); } } COM: <s> truncates the entry count </s>
funcom_train/26257086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeSchema() { Log.debug("MappingModel: writeSchema"); SchemaWriter cw = null; if (getSchemaFileFormat().equals("Oracle")) { cw = new OracleSchemaWriter(this); } if (getSchemaFileFormat().equals("Postgres")) { cw = new PostgresSchemaWriter(this); } try { cw.writeSchema(schemaFile); } catch(IOException io) { Log.error("MappingModel: writeSchema IOException " + io); } Log.debug("MappingModel: writeSchema done"); } COM: <s> describe code write schema code method here </s>
funcom_train/43647157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showPreference() { final JDialog dialog = preferencePane.createDialog(view, InternationalMessages .getString("Preference.Title")); dialog.setSize(620, 300); dialog.setVisible(true); if (preferencePane.getValue() != null) { if (preferencePane.getValue() instanceof Integer) { if (preferencePane.getValue().equals( new Integer(JOptionPane.OK_OPTION))) { preferencePane.submit(); } } } } COM: <s> show preference dialog </s>
funcom_train/44136454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getPropertyInclude(Node node) { String include = "false"; NamedNodeMap map = node.getAttributes(); if(map.getLength() > 0) { Node n = map.getNamedItem(OSMFile.OSM_PRESENTATION_PROPINCLUDE); if(n != null) include = getStringCleaned(n.getNodeValue()); } return "true".equals(include); } COM: <s> it indicates whether the property for the element is included </s>
funcom_train/5727815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(PostInfo postInfo1, PostInfo postInfo2) { if (postInfo1 == null || postInfo1.getCreated()==null) { return 0; } if (postInfo2 == null || postInfo2.getCreated()==null) { return 0; } return (postInfo1.getCreated().compareTo(postInfo2.getCreated())); } COM: <s> compares dates of 2 post info objects </s>
funcom_train/2311459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sigVerify(String unique, String filename) throws InterruptedException, IOException, KeyNoteCLException, SignatureVerificationException, UnknownCLException, SyntaxError{ //create the process createSigVerifyProcess(unique, filename); //open the IO openIO(unique); //verify getSigVerifyAnswer(unique, KeyNoteString.SIGVERIFYM.getString()); } COM: <s> this method verifies if a file is signed correctly </s>
funcom_train/7928634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAccount(String accountName) throws StorageException { this.lock.lock(); try { //TODO delete all feeds and entries of this account this.forceWriteTerms.add(new Term( StorageAccountWrapper.FIELD_ACCOUNTNAME, accountName)); storageModified(); } finally { this.lock.unlock(); } } COM: <s> deletes the user with the given username </s>