__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13712618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight){ processingGraphics.fillRoundRect(x, y, width, height, arcWidth, arcHeight); svgGraphics.fillRoundRect(x, y, width, height, arcWidth, arcHeight); } COM: <s> fills the specified rounded corner rectangle with the current color </s>
funcom_train/9568699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int gotoPage(int pageNumber) { if (pageNumber == getCurrentPageNumber()) { return pageNumber; } if (pageNumber < 0) { toolbar.setPageNumber(-1); return -1; } if (pageNumber == 0) { pageNumber = 1; } else if (pageNumber > getTotalNumberOfPages()) { pageNumber = getTotalNumberOfPages(); } pageNumber = showPage(pageNumber); toolbar.setPageNumber(pageNumber); return pageNumber; } COM: <s> shows a specific page </s>
funcom_train/8079581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSearchSpec() { ASSearch s = getSearch(); if (s instanceof OptionHandler) { return s.getClass().getName() + " " + Utils.joinOptions(((OptionHandler)s).getOptions()); } return s.getClass().getName(); } COM: <s> gets the search specification string which contains the class name of </s>
funcom_train/19270790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInitialized() { boolean okay = this.state.compareAndSet(STATE_INITIALIZING, STATE_INITIALIZED); if (!okay) { if (isInitialized()) { throw new AlreadyInitializedException(); } else { throw new IllegalStateException("You need to call setInitializing() before!"); } } } COM: <s> this method sets the state to </s>
funcom_train/31910243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void selectInteractor(InputEvent ie) { if (!disableInteractions && !suspendInteractions && interactor == null && gvtRoot != null) { Iterator it = interactors.iterator(); while (it.hasNext()) { Interactor i = (Interactor)it.next(); if (i.startInteraction(ie)) { interactor = i; break; } } } } COM: <s> selects an interactor given an input event </s>
funcom_train/34342785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCargarOtravez() { if (CargarOtravez == null) {//GEN-END:|35-getter|0|35-preInit // write pre-init user code here CargarOtravez = new Command("CargarOtravez", Command.BACK, 0);//GEN-LINE:|35-getter|1|35-postInit // write post-init user code here }//GEN-BEGIN:|35-getter|2| return CargarOtravez; } COM: <s> returns an initiliazed instance of cargar otravez component </s>
funcom_train/40736561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setId(Integer newVal) { if ((newVal != null && id != null && (newVal.compareTo(id) == 0)) || (newVal == null && id == null && idIsInitialized)) { return; } id = newVal; idIsModified = true; idIsInitialized = true; } COM: <s> setter method for id </s>
funcom_train/28295225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertMagicBranch(String magicBranchNumber){ int pos = magicBranchNumber.lastIndexOf(".0."); if(pos != -1) { return magicBranchNumber.substring(0,pos).concat(magicBranchNumber.substring(pos+2, magicBranchNumber.length())); }else { return magicBranchNumber; } } COM: <s> removes the zero from a magic branch tag </s>
funcom_train/37447053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getXmlFromCache( UserSessionDownload session, Element parent, CvObject cvObject ) { Map cache = session.getCvObjectCache(); return CvObject2xmlCommons.getInstance().getXmlFromCache( cache, new Cv2Source( cvObject, parent.getNodeName() ) ); } COM: <s> checks if the given cv object has already been generated as xml content </s>
funcom_train/40712825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PageNode loadFile(File f) { try { ZipInputStream zin = new ZipInputStream(new FileInputStream(f)); zin.getNextEntry(); ObjectInputStream ois = new ObjectInputStream(zin); PageNode root = PageNode.readFromFile(ois); ois.close(); return root; } catch(Exception e) { JOptionPane.showMessageDialog(this, "Error loading file: " + e.getMessage()); Util.logSilent(e); return null; } } COM: <s> loads a file </s>
funcom_train/37475659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasRole(String username, Workflow wf) throws Exception { boolean hasRole = false; if (!this.isRestricted()){ hasRole = true; } else { if (this.getMemberNames(wf.getWorkflowForRole(this.getName())).containsIgnoreCase(username)){ hasRole = true; } } return hasRole; } COM: <s> check if a user has this role in a workflow instance </s>
funcom_train/9886007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateClusterMembership(Cluster cluster){ int [] indices = cluster.getIndices(); for(int i = 0; i < indices.length; i++){ if(elementClusters[indices[i]] == null) elementClusters[indices[i]] = new ClusterList("element "+indices[i]); elementClusters[indices[i]].add(cluster); } } COM: <s> adds a cluster to elements cluster list for elements </s>
funcom_train/9077710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceBytes(int offset, int len, byte[] bytes) { if (len==1) { // Just insert if 1 bytes is selected. len = 0; } table.replaceBytes(offset, len, bytes); table.changeSelectionByOffset(table.anchorSelectionIndex, false); int count = bytes==null ? 0 : bytes.length; table.setSelectionByOffsets(offset, offset+count-1); } COM: <s> replaces a range of bytes </s>
funcom_train/19385976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveBetweenLists(DefaultListModel sourceLM, DefaultListModel targetLM, int[] indices){ Arrays.sort(indices); //move elements from source to destination in reverse order (so that deletion can occur without problems) for (int i = 0; i < indices.length; i++) { targetLM.add(0, sourceLM.getElementAt(indices[indices.length - i - 1])); sourceLM.removeElementAt(indices[indices.length - i - 1]); } } COM: <s> moves the selected elements in the first list into the second list </s>
funcom_train/51783419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkResetAssertions(Connection conn) { assertEquals(2, conn.getPoints().size()); assertEquals(new Point2D.Double(10.0, 10.0), conn.getPoints().get(0)); assertEquals(new Point2D.Double(50.0, 50.0), conn.getPoints().get(1)); } COM: <s> checks the reset assertions on the specified connection </s>
funcom_train/3667658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateParameters() throws Exception { Matrix num = (Matrix) updateParameter(NUMERATOR); Matrix den = (Matrix) updateParameter(DENOMINATOR); ss = ExtendedMath.ss2tf(num, den); StaticMatrix initialCondition = new StaticMatrix(); initialCondition.build(new Matrix(ss[0].getRowDimension(), 1)); setParameter(INITIAL_CONDITION, initialCondition); } COM: <s> updated the block parameters </s>
funcom_train/2878157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Prim sfObject){ if (sfObject == null) return; try { super.init(sfObject); } catch (Throwable ignored){ //ignore } try { add(REFERENCE,sfObject.sfCompleteName().copy()); } catch (Throwable ignored){ //ignore } } COM: <s> initializes the exception context with the smart frog component </s>
funcom_train/1222869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finish() throws IOException { ensureOpen(); if (state != States.FINISHED) { if (imgWidth == -1 || imgHeight == -1) { throw new IllegalStateException("image width and height must be specified"); } mdatAtom.finish(); writeEpilog(); state = States.FINISHED; imgWidth = imgHeight = -1; } } COM: <s> finishes writing the contents of the quick time output stream without closing </s>
funcom_train/13995461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setExceptions(int keyIndex, int propertyIndex, int count) { ValidationMessageList messageList = voModel.getValueObject(getKey(keyIndex)) .getValue(getProperty(propertyIndex)) .getExceptions(); messageList.clear(); for (int i = 0; i < count; i++) { messageList.add( new ValidationMessage(ValidationMessageClass.ERROR, "")); } } COM: <s> sets the validation messages in the mock model for the specified field </s>
funcom_train/43245441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTmpCounty() { System.out.println("getTmpCounty"); PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object(); String expResult = ""; String result = instance.getTmpCounty(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get tmp county method of class org </s>
funcom_train/37573897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFacsimileText() { String facsimile = Utils.getDigits(getFacsimile()); if ((facsimile!=null) && (facsimile.length()==10)) { facsimile = facsimile.substring(0,3) + " " + facsimile.substring(3,6) + " " + facsimile.substring(6); } return facsimile; } COM: <s> return the facsimile formatted </s>
funcom_train/16222218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLong( String key ) { verifyIsNull(); Object o = get( key ); if( o != null ){ return o instanceof Number ? ((Number) o).longValue() : (long) getDouble( key ); } throw new JSONException( "JSONObject[" + JSONUtils.quote( key ) + "] is not a number." ); } COM: <s> get the long value associated with a key </s>
funcom_train/45627894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getIncludeFilePath(String namespace, String xamlFileName) { String filePath = ""; for (IProject project : ProjectHelper.getSLProjects()) { if (namespace.equals(project.getName())) { filePath = project.getLocation().append(new Path(xamlFileName + ProjectHelper.XAML_SUFFIX)).toString(); } } return filePath; } COM: <s> get include file path </s>
funcom_train/28116638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFilter(String filter) throws Exception { if (filter != null) { FileReader filterReader = null; try { filterReader = new FileReader(filter); _filter = Filter.unmarshal(filterReader); } finally { if (filterReader != null) { filterReader.close(); } } } } COM: <s> loads the filter configuration file </s>
funcom_train/51342733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean holdsAllLocks(final LockFutureTask<? extends Object> task) { if (!lock.isHeldByCurrentThread()) throw new IllegalMonitorStateException(); for (R r : (R[]) task.resource) { final ResourceQueue<LockFutureTask<? extends Object>> resourceQueue = resourceQueues .get(r); assert resourceQueue != null : "resource=" + r; if (!resourceQueue.isGranted(task)) { return false; } } return true; } COM: <s> return code true code iff the task holds all of its declared locks </s>
funcom_train/7823521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLabLocation() { setLabLoc(news1, 0); setLabLoc(news2, 1); setLabLoc(news3, 2); setLabLoc(news4, 3); setLabLoc(news5, 4); setLabLoc(news6, 5); setLabLoc(news7, 6); setLabLoc(news8, 7); setLabLoc(news9, 8); setLabLoc(news10, 9); } COM: <s> sets location of all ten label </s>
funcom_train/27779232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveStructAt(int level, DynStructReader a) { try { if (a != null) { slot[level][used[level]++] = manager.save(a); setDirty(true); } } catch (SlotException x) { logger.log(Level.WARNING, "saveStructAt", x); } } COM: <s> save the given barrel in the given slot </s>
funcom_train/13210881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getMessage(BufferedReader in, StringBuffer message) { if (in!=null) { try{ if (in.ready()) { String str = in.readLine(); if (str!=null) message.append(str); return 0; } } catch (IOException e) { return -30225; } } return 0; } COM: <s> gets a message from the given input stream </s>
funcom_train/3175117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void search(Gedcom gedcom) { for (int t=0; t<Gedcom.ENTITIES.length && hitCount<MAX_HITS; t++) { for (Entity entity : gedcom.getEntities(Gedcom.ENTITIES[t])) { // next search(entity, entity); // still going? if (!lock.get()) return; } } } COM: <s> search in gedcom not on edt </s>
funcom_train/51482820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showHelp() { try { String helpPath = getClass().getName().replace('.', '/'); URL url = fApplication.getURL(helpPath + "Help.html"); fApplication.popupFrame(url, "Help"); } catch (IOException e) { showStatus("Help file not found"); } } COM: <s> shows a help page for the application </s>
funcom_train/32057102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLocation() { System.out.println("testGetLocation"); Object obj = new Object(); JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView eView = new EdgeView(obj, jgraph, cellmapper); PortView pView = new PortView(obj, jgraph, cellmapper); pView.getLocation(eView); } COM: <s> this function tests get location function of port view class </s>
funcom_train/47398695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh(IFtpConfig cfg) { m_fonfig = cfg; if (m_fonfig != null) { m_connections = m_fonfig.getConnectionManager().getAllConnections(); m_fonfig.getConnectionManager().setObserver(this); } else { m_connections.clear(); } fireTableDataChanged(); } COM: <s> reload the model </s>
funcom_train/39872926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNetworkType(String type, String subtype) { Map<String, String> map = new HashMap<String, String>(); map.put("type", type); map.put("subtype", subtype); mWebViewCore.sendMessage(EventHub.SET_NETWORK_TYPE, map); } COM: <s> inform web view about the current network type </s>
funcom_train/36614020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int handleChunk(Chunk chunk) throws IOException { int len = chunk.getLength(); byte[] data = new byte[len]; fin.read(data); chunk.setData(data); // Squash pad byte if ((len & 1) == 1) { len += len % 2; fin.skip(1); } return len; } COM: <s> reads the raw data associated with </s>
funcom_train/4780212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getPreviewToolbarButton() { if (previewToolbarButton == null) { previewToolbarButton = new JButton(); previewToolbarButton.addActionListener(actionListener); previewToolbarButton.setActionCommand(ActionConstants.PREVIEW_ACTION); previewToolbarButton.setIcon(ResourceUtil.previewIcon); previewToolbarButton.setText(ResourceUtil.getString("mainframe.button.preview")); previewToolbarButton.setToolTipText(ResourceUtil.getString("mainframe.button.preview.tooltip")); } return previewToolbarButton; } COM: <s> this method initializes preview toolbar button </s>
funcom_train/2309647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processHttp(Vertex sentence, Network network) { Collection<Relationship> words = sentence.getRelationships(Primitive.WORD); if (words != null) { Sense http = getPandora().awareness().getSense(Http.class); for (Relationship word : words) { Vertex meaning = word.getTarget().mostConscious(Primitive.MEANING); if (meaning != null) { if (meaning.instanceOf(Primitive.URL)) { log("Prcoessing URL", Pandora.FINE, meaning); http.input(meaning.getData()); } } } } } COM: <s> lookup any urls in the text </s>
funcom_train/43502656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuditTrail(ArrayList<Audit> trail) { this.trail = trail; // Collections.sort(this.trail, new Comparator() { // public int compare(Object o1, Object o2) { // Date d1 = ((Audit) o1).getDate(); // Date d2 = ((Audit) o2).getDate(); // return d2.compareTo(d1); // } // }); fireTableDataChanged(); } COM: <s> initializes the audit trail </s>
funcom_train/3288842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLogging(boolean loggingEnabled) { this.loggingEnabled = loggingEnabled; // if logging is enabled, output log message if (loggingEnabled == true) { log = new Log(); log.debug("debug", "logging has been enabled"); } else { log = null; } } COM: <s> enables or disables logging </s>
funcom_train/47804683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isMoveLegal(int sourceA, int sourceB,int destA,int destB,Move m){ return (isMoveLegal(sourceA,destA,m)&&isMoveLegal(sourceB,destB,m))?true:false; } COM: <s> check if this dual move is valid </s>
funcom_train/20589315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public Object invoke(MethodInvocation invocation) throws Throwable { before(invocation); long startTime = System.currentTimeMillis(); Object result = invocation.proceed(); long endTime = System.currentTimeMillis(); long executeTime = endTime - startTime; logExecuteTime(invocation, executeTime); after(invocation); return result; } COM: <s> invoke method invocation invocation </s>
funcom_train/10498279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDbId() throws IOException { FileTxnIterator itr = new FileTxnIterator(logDir, 0); FileHeader fh=readHeader(itr.logFile); itr.close(); if(fh==null) throw new IOException("Unsupported Format."); return fh.getDbid(); } COM: <s> the dbid of this transaction database </s>
funcom_train/36286563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testByteArraysNegativeSizeInBytes() throws Exception { String chunk = "testByteArraysNegativeSizeInBytes"; byte[][] input = { chunk.getBytes(), chunk.getBytes(), chunk.getBytes(), chunk.getBytes(), }; testByteArraysResize(input, -3, ErrorID.ARRAY_SIZE_INVALID, null); } COM: <s> tests passing a negative size in bytes value </s>
funcom_train/35056105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean invalidates(Power other) { ArgObject [] set1, set2; int i,j; set1 = getWeak(); set2 = other.getStrong(); for (i = 0; i < set1.length; ++i) { for (j = i; j < set2.length; ++j) { if (set1[i] == set2[j]) { return true; } } } return false; } COM: <s> determines whether other cannot be applied if this is undefeated </s>
funcom_train/11651791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean excPattern(String text) { this.USEFILE = true; boolean exc = false; for (int idx = 0; idx < this.EXCPATTERNS.size(); idx++) { if (JMeterUtils.getMatcher().contains(text, this.EXCPATTERNS.get(idx))) { exc = true; this.USEFILE = false; break; } } return exc; } COM: <s> the method assumes by default the text is not excluded </s>
funcom_train/18376872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSliderVisible(boolean visible) { this.sliderVisible = visible; sliderHolder.setLayoutData(getSliderGridData()); Display.getCurrent().asyncExec(new Runnable() { public void run() { sliderHolder.getParent().layout(true); sliderHolder.layout(true); Point sliderHolderSize = sliderHolder.getSize(); slider.setBounds(0, 0, sliderHolderSize.x, sliderHolderSize.y); } }); } COM: <s> sets if the slider is visible or not </s>
funcom_train/50757452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void askForSave(){ int sel = JOptionPane.showConfirmDialog(this,"File is not saved.\nDo you want to save it?", "Warning",javax.swing.JOptionPane.YES_NO_OPTION,javax.swing.JOptionPane.QUESTION_MESSAGE); if (sel == 0) SaveActionPerformed(null); } COM: <s> asks user if he wants to save current file </s>
funcom_train/22015634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean containsCaseInsensitive(String str, String searchString) { if (searchString == null) return false; String strLowerCase = str; if (strLowerCase != null) strLowerCase = strLowerCase.toLowerCase(); return StringUtils.contains(strLowerCase, searchString.toLowerCase()); } COM: <s> check if str contains search string </s>
funcom_train/35110589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeContours(List<Contour> list, AbstractInteractiveContourModel cm) { // TODO Plug-in change LinkedList<Contour> temp = new LinkedList<Contour>(); temp.addAll(list); while (!temp.isEmpty()) { sortByNumberOfChildren(temp, cm); Contour c = temp.removeFirst(); cm.remove(c); } } COM: <s> remove a list of contours from the contour model </s>
funcom_train/26201710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection subclasses(ClassDoc cd) { Collection ret = (Collection)classToSubclass.get(cd); if (ret == null) { ret = new TreeSet(); List subs = classtree.subclasses(cd); if (subs != null) { ret.addAll(subs); for (Iterator it = subs.iterator(); it.hasNext();) { ret.addAll(subclasses((ClassDoc)it.next())); } } addAll(classToSubclass, cd, ret); } return ret; } COM: <s> return all subclasses of a class and fill in class to subclass map </s>
funcom_train/18244081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllChromatogramsClosed(Object pSource) throws SeqdataException { int formerState = this.chromatogramOpennessState; this.chromatogramOpennessState = IAssemblyDisplayPreferences.CHROMATOGRAMS_ALL_CLOSED; this.fireChromatogramOpennessChange(pSource, this.chromatogramOpennessState, formerState); // System.out.println(this.getClass().getName() + ": setAllChromatogramsClosed() invoked"); } COM: <s> describe code set all chromatograms closed code method here </s>
funcom_train/47827601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AggregationType getAggregationType(final String failureResultKey) { if (failureResultKey.toLowerCase().indexOf("success") != -1) { return AggregationType.SUCCESS; } else if (failureResultKey.toLowerCase().indexOf("failure") != -1) { return AggregationType.FAILURE; } return AggregationType.UNKNOWN; } COM: <s> transforms a string key into an aggregation type </s>
funcom_train/21482625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void backOffIfDiskSpoolFull() { if (diskStore != null && diskStore.backedUp()) { //back off to avoid OutOfMemoryError try { Thread.sleep(BACK_OFF_TIME_MILLIS); } catch (InterruptedException e) { //do not care if this happens } } } COM: <s> wait outside of synchronized block so as not to block readers </s>
funcom_train/16855301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropDatabase(final VoidCallback callback) { db.transaction(new TransactionCallback() { @Override public void onTransactionFailure(final SQLError error) { callback .onFailure(new DataServiceException(error.getMessage())); } @Override public void onTransactionStart(final SQLTransaction tx) { tx.executeSql(DROP_TABLE_CONTACTS, null); } @Override public void onTransactionSuccess() { callback.onSuccess(); } }); } COM: <s> drops the local database </s>
funcom_train/50314140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection (int start) { checkWidget (); if(single) { Fox.FXTextField_setSelection(handle, 0, start); Fox.FXTextField_makePositionVisible(handle, start); } else { Fox.FXText_setSelection(handle, 0, start, true); Fox.FXText_makePositionVisible(handle, start); } } COM: <s> sets the selection </s>
funcom_train/46473308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveModel(String fileName) { ResourceSet resourceSet = new ResourceSetImpl(); resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl()); URI fileURI = URI.createFileURI(new File(fileName).getAbsolutePath()); Resource resource = resourceSet.createResource(fileURI); resource.getContents().add(configModel); try { resource.save(Collections.EMPTY_MAP); } catch (IOException e) {} } COM: <s> this method saves a model to a file </s>
funcom_train/17019507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int minDistanceRegion(titech.image.dsp.Region query) { minDist = Double.MAX_VALUE; int minR = 0; for (int i=0;i<regions.size();i++) { titech.image.dsp.Region r = (titech.image.dsp.Region)regions.get(i); double d = r.distance(query, weights, null); if (d < minDist) { minR = i; minDist = d; } } return minR; } COM: <s> instead of returning a titech </s>
funcom_train/22607094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeState(int enterState, boolean entering, int parentState) throws SAXException { if (entering) { if (parseState != parentState) { throw new SAXException("misplaced tag"); } else { parseState = enterState; } } else { if (parseState != enterState) { throw new SAXException("end tag with no start"); } else { parseState = parentState; } } } COM: <s> changes the state based on the current tag and the desired tag </s>
funcom_train/31128532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIpOf(String host){ String command = "AT+DNSLOOKUP="+host; String response = commandTransaction(command); for (int i = 0; i < response.length(); i++) { if(response.substring(i).startsWith("OK\r\n")){ int ipStart = response.indexOf("IP:")+3; int ipStop = response.indexOf("\r",ipStart); if(ipStart != -1 && ipStop != -1){ return response.substring(ipStart, ipStop); } } } return null; } COM: <s> method for getting an ip of a host </s>
funcom_train/3431683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Catalog getCatalog() { Catalog catalog = staticCatalog; if (useStaticCatalog == null) { useStaticCatalog = new Boolean(getUseStaticCatalog()); } if (catalog == null || !useStaticCatalog.booleanValue()) { catalog = getPrivateCatalog(); if (useStaticCatalog.booleanValue()) { staticCatalog = catalog; } } return catalog; } COM: <s> get a catalog instance </s>
funcom_train/38157388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attach() throws IOException { writeCommand(new AttachCommand(CLIENT_NAME, CLIENT_VERSION, System.getProperty("user.name"))); Command response = reader.getNextCommand(); server = response.getKey(KEY_SERVER).getArgument(0); serverVersion = response.getKey(KEY_VERSION).getArgument(0); } COM: <s> attach the jgi ft client to the server </s>
funcom_train/21362862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItem2() { if (jMenuItem2 == null) { jMenuItem2 = new JMenuItem(); jMenuItem2.setText("Txartela eman"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() } }); } return jMenuItem2; } COM: <s> this method initializes j menu item2 </s>
funcom_train/3370203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int column) { Object id = null; // This test is to cover the case when // getColumnCount has been subclassed by mistake ... if (column < columnIdentifiers.size() && (column >= 0)) { id = columnIdentifiers.elementAt(column); } return (id == null) ? super.getColumnName(column) : id.toString(); } COM: <s> returns the column name </s>
funcom_train/35349409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureSpinner(JSpinner spinner, String name) { spinner.addChangeListener(this); spinner.setName(name); JComponent editor = spinner.getEditor(); if (editor instanceof JSpinner.DefaultEditor) { JFormattedTextField ftf = ((JSpinner.DefaultEditor)editor). getTextField(); ftf.setFocusLostBehavior(JFormattedTextField.COMMIT_OR_REVERT); } } COM: <s> configures the spinner </s>
funcom_train/4467826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildObjects() { Iterator ite = objects.iterator(); while ( ite.hasNext()) { GraphicObject object = (GraphicObject)ite.next(); object.show(getParent()); Collection shapes = object.getShapes(); //to control the event on the different shape getParent().putEventSource(shapes,object); // add the shape to the virtual group add(getShape(),object.getShape()); } } COM: <s> builds the code graphic object code of this code virtual group code </s>
funcom_train/37768878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runTests() { log.info("Starting Tests"); for (Iterator it = m_settings.getTestSet().iterator(); it.hasNext();) { TestSet ts = (TestSet) it.next(); runTestSet(ts); } log.info("Ended Tests"); } COM: <s> main method to run all the tests based on the settings file </s>
funcom_train/9278703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNegativeLengthArgument() { ArrayList list = new ArrayList(1); list.add(new byte[1234]); try { combiner = new ByteArrayCombinerStream(list, -54); fail("An IllegalArgumentException singalling negative length " + "should have been thrown"); } catch (IllegalArgumentException iae) { // This should happen, continue. } } COM: <s> make sure an exception is thrown if a negative length is specified </s>
funcom_train/47106523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemWeapon19() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Weapon.W_19.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setPlrReadiedWeapon(Weapon.W_19); } }); return menuItem; } COM: <s> creates the twentieth choice for the weapon menu </s>
funcom_train/47864459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValuesAreSetAndRetrievedProperlyAsUnsigned() { ByteImage image = new ByteImage(1, 1); image.setCurrentIndex(0, 0); image.put(255); assertEquals(255, image.get()); image.put(129); assertEquals(129, image.get()); } COM: <s> must allow empty setting and retrieval as unsigned </s>
funcom_train/7618612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Size getPreviewSize() { String pair = get("preview-size"); if (pair == null) return null; String[] dims = pair.split("x"); if (dims.length != 2) return null; return new Size(Integer.parseInt(dims[0]), Integer.parseInt(dims[1])); } COM: <s> returns the dimensions setting for preview pictures </s>
funcom_train/24191599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTiposCosteFijo(TipoCosteFijoElementoGanaderia[] values) { List<TipoCosteFijoElementoGanaderia> oldTiposCosteFijo = this.tiposCosteFijo; this.tiposCosteFijo = Arrays.asList(values); propertyChangeSupport.firePropertyChange(PROP_TIPOSCOSTEFIJO, oldTiposCosteFijo, tiposCosteFijo); } COM: <s> set the value of tipos coste fijo </s>
funcom_train/11654462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createStartTimePanel() { JPanel panel = new JPanel(new BorderLayout(5, 0)); JLabel label = new JLabel(JMeterUtils.getResString("starttime")); //$NON-NLS-1$ panel.add(label, BorderLayout.WEST); start = new JDateField(); panel.add(start, BorderLayout.CENTER); return panel; } COM: <s> create a panel containing the start time field and corresponding label </s>
funcom_train/15623166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeChangedNameOfFeature(String oldName, String newName) { if (this.changedFeatureNames == null) { this.changedFeatureNames = new HashMap(); this.newToOldNames = new HashMap(); } this.changedFeatureNames.put(oldName, newName); this.newToOldNames.put(newName, oldName); } COM: <s> serves to remember a changed feature name globally </s>
funcom_train/23328005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChange(Change change) { if(changes.size() > changePos) { // We are "in-between" // We now have to delete all changes after changePos while(changes.size() > changePos) { changes.remove(changes.size()-1); } } changes.add(change); checkMaximum(); changePos = changes.size(); forwardStateToViews(); } COM: <s> add a new code change code object </s>
funcom_train/7422069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseActivity(Activity activity, Node activityNode) { GraphicalObjectParser.parse(activity, activityNode, this.output); Node loopNode = XMLUtil.getChildWithName(activityNode, LOOP); if (loopNode != null) { activity.setLoop(SupportingParser.parseLoop(loopNode, this.output)); } parseActivityAttributes(activity, activityNode); } COM: <s> parses an activity object from an activity node </s>
funcom_train/39185206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File file) { String extension = ""; if (file.getPath().lastIndexOf('.') > 0) extension = file.getPath().substring(file.getPath().lastIndexOf('.') + 1).toLowerCase(); if(extension != "") return extension.equals("tif"); else return file.isDirectory(); } COM: <s> returns whether or not file contains the tif file extension </s>
funcom_train/12651986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIncomplete() { int code = generator.nextInt(); // Ensure that the holder is empty Therapy therapy = new Therapy(); assert therapy.getIncomplete() == null : "Incomplete not null " + therapy.getIncomplete(); // Test the set and get therapy.setIncomplete(new CharacteristicCode(code)); assert new CharacteristicCode(code).equals(therapy.getIncomplete()) : "Characteristic " + code + " not contained in therapy " + therapy; } COM: <s> test incomplete field </s>
funcom_train/48099656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void load() throws IOException { FileInputStream in = null; try { defaultProps = new Properties(); in = new FileInputStream(DEFAULT_PROPS_FILE); defaultProps.load(in); in.close(); appProps = new Properties(defaultProps); in = new FileInputStream(APP_PROPS_FILE); appProps.load(in); } finally { if (in != null) in.close(); } } COM: <s> attempt to load the application properties data </s>
funcom_train/44214479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUsePreparedStatements(boolean usePreparedStatements) { // TODO why does this check on table? if (table == null) { String errorMsg = "JDBCAppender::setUsePreparedStatements(), Table-Option has to be set before !"; LogLog.error(errorMsg); errorHandler.error(errorMsg, null, 0); return; } this.usePreparedStatements = usePreparedStatements; } COM: <s> defines whether to use prepared statements instead of updateable result </s>
funcom_train/32891306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNode(Node node) { node.setId(allNodes.length); allNodes = (Node[])Arrayutils.addElement(allNodes, node); if (node instanceof SpecialNode) specialNodes = (SpecialNode[])Arrayutils.addElement(specialNodes, node); if (node instanceof Junction) junctions = (Junction[])Arrayutils.addElement(junctions, node); } COM: <s> adds a node to the infrastructure </s>
funcom_train/2326192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int row, int column, float value) { if (column < 0 || column >= columns || row < 0 || row >= rows) throw new IndexOutOfBoundsException("row:" + row + ", column:" + column); setQuick(row, column, value); } COM: <s> sets the matrix cell at coordinate tt row column tt to the specified </s>
funcom_train/30037462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countMaterialThreadsNeeded() { int maxThreadId = 0; for (CalCoreMesh mesh : mapCoreMesh.values()) { for (CalCoreSubmesh submesh : mesh.vectorCoreSubmesh) { maxThreadId = Math.max(maxThreadId, submesh.coreMaterialThreadId); } } return 1 + maxThreadId; } COM: <s> counts the number of core materials needed for this model </s>
funcom_train/3427308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unExcludeNamespaces(String prefixes) { if (_excludedURI == null) return; if (prefixes != null) { StringTokenizer tokens = new StringTokenizer(prefixes); while (tokens.hasMoreTokens()) { final String prefix = tokens.nextToken(); final String uri; if (prefix.equals("#default")) uri = lookupNamespace(Constants.EMPTYSTRING); else uri = lookupNamespace(prefix); Integer refcnt = (Integer)_excludedURI.get(uri); if (refcnt != null) _excludedURI.put(uri, new Integer(refcnt.intValue() - 1)); } } } COM: <s> turn of namespace declaration exclusion </s>
funcom_train/42667298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitMain() { if (jSplitMain == null) { jSplitMain = new JSplitPane(); jSplitMain.setOrientation(JSplitPane.VERTICAL_SPLIT); jSplitMain.setDividerSize(4); jSplitMain.setDividerLocation(400); jSplitMain.setBottomComponent(getJPanelBottom()); jSplitMain.setTopComponent(getJSplitTop()); jSplitMain.setDividerLocation(0.9); jSplitMain.setOneTouchExpandable(true); jSplitMain.setContinuousLayout(true); jSplitMain.setResizeWeight(0.9); } return jSplitMain; } COM: <s> this method initializes j split main </s>
funcom_train/37200752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MapRetrievalPlugin getDefaultMapRetrievalPlugin() { MapRetrievalPlugin default_plugin = null; String default_plugin_name = resources_.getString(KEY_DOWNLOAD_MAP_LAST_MAP_RETRIEVAL_PLUGIN_USED); int index = 0; while((index < map_retrieval_plugins_.length) && (default_plugin == null)) { if(map_retrieval_plugins_[index].getPluginIdentifier().equals(default_plugin_name)) return map_retrieval_plugins_[index]; index++; } // default plugin not found return map_retrieval_plugins_[0]; } COM: <s> looks for the default map retrieval plugin </s>
funcom_train/2877154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendLines(FileOutputStream stream, Vector<String> linesToAdd) throws IOException { Writer out = null; try { out = new BufferedWriter(new OutputStreamWriter(stream, encoding)); for (String line : linesToAdd) { out.write(line); out.write(lineEnding); } out.close(); out = null; } finally { FileSystem.close(out); } } COM: <s> append one or more lines to the output stream </s>
funcom_train/51412681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Row getSelectedCritTreeRow() { TreePath currentSelection = cmtCriteria.getSelectionPath(); if (currentSelection == null ) return null; Object nodeObj = currentSelection.getLastPathComponent(); if(nodeObj instanceof CMTreeNode) nodeObj = ((CMTreeNode)nodeObj).getUserObject(); if(nodeObj instanceof Row) { return (Row)nodeObj; } return null; } COM: <s> gets the actual selected row within the criteria tree </s>
funcom_train/3298104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MsnMessage addLine(String line) throws MessageFormatException { try { StringTokenizer st = new StringTokenizer(line); st.nextToken(); // skip ILN st.nextToken(); // skip ID this.status = st.nextToken(); this.account = st.nextToken(); this.nick = SpecialCharacters.getInstance().decode(st.nextToken(), true); return this; } catch (Exception ex) { throw new MessageFormatException(ex); } } COM: <s> adds a feature to the line attribute of the change status message object </s>
funcom_train/19166366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid(String seq, byte type1) { try { ArrayList<SequenceElement> elements = new ArrayList<SequenceElement>(); parse(seq, type1, elements); for (Iterator<SequenceElement> i = elements.iterator(); i.hasNext(); ) { if (i.next() instanceof Polymorphism) { return false; } } } catch (Exception ex) { return false; } return true; } COM: <s> checks if a string is a valid sequence of the specified type </s>
funcom_train/18811685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reshape (int x, int y, int width, int height) { super.reshape(x, y, width, height); width_ = width; height_ = height; if (graphics_ != null) { graphics_.dispose(); graphics_ = null; } repaint(); } COM: <s> resize the progress bar </s>
funcom_train/42852263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getNode(Identifier id) throws AnalysisException { if (!id.getGraphId().equals(_id.getGraphId())) { throw new AnalysisException("Attempt to access graph " + _id.getGraphId() + " with incorrect identifier " + id.toString()); } return this.getNode(id.getGraphId()); } COM: <s> note we have pushed the error checks for getting nodes and such down </s>
funcom_train/22305809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUsingAssertThat() { // TODO(joe): This is a bit tricker with EasyMock. //assertThat("xx", equal("xx")); //assertThat("yy", not(equal("xx"))); //assertThat("i like cheese", startsWith("i like")); } COM: <s> this examples shows using the standard j mock assert that method </s>
funcom_train/22982878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateComboBox(JComboBox combobox, Collection items, String selected) { String item; Iterator i = items.iterator(); int index = 0; while (i.hasNext()) { item = (String) i.next(); combobox.addItem(item); if (item.equals(selected)) { combobox.setSelectedIndex(index); } index++; } } COM: <s> populates a combobox with an array of strings and selects the default </s>
funcom_train/5028378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revertToDefaultAvailabilityForThursday() { IElementWrapper iew = this.getParentWrapper(); if (iew instanceof PersonWrapper) { PersonWrapper personWrapper = (PersonWrapper) iew; getAvailabilityRecord().setThursdayValue(-1); persisting(personWrapper); } if (iew instanceof OrganizationWrapper) { OrganizationWrapper organizationWrapper = (OrganizationWrapper) iew; getAvailabilityRecord().setThursdayValue(-1); persisting(organizationWrapper); } } COM: <s> remove the availability on thursday so that it then defaults </s>
funcom_train/42089225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNewbornPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WrappingEObject_newborn_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WrappingEObject_newborn_feature", "_UI_WrappingEObject_type"), CommonWrappingPackage.Literals.WRAPPING_EOBJECT__NEWBORN, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the newborn feature </s>
funcom_train/4375727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NameValuePair getParameter(String paramName) { LOG.trace("enter PostMethod.getParameter(String)"); if (paramName == null) { return null; } Iterator iter = this.params.iterator(); while (iter.hasNext()) { NameValuePair parameter = (NameValuePair) iter.next(); if (paramName.equals(parameter.getName())) { return parameter; } } return null; } COM: <s> gets the parameter of the specified name </s>
funcom_train/46787069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPhasePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_phase_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Task_phase_feature", "_UI_Task_type"), EZRealtimePackage.Literals.TASK__PHASE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the phase feature </s>
funcom_train/39349171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addressTryCompareAndSwap(ObjectReference src, Address slot, Address old, Address value, Word metaDataA, Word metaDataB, int mode) { return VM.barriers.addressTryCompareAndSwap(src, old, value, metaDataA, metaDataB, mode); } COM: <s> attempt to atomically exchange the value in the given slot </s>
funcom_train/7635899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public View getView(int position, View convertView, ViewGroup parent) { SpeechView sv; if (convertView == null) { sv = new SpeechView(mContext, mTitles[position], mDialogue[position]); } else { sv = (SpeechView) convertView; sv.setTitle(mTitles[position]); sv.setDialogue(mDialogue[position]); } return sv; } COM: <s> make a speech view to hold each row </s>
funcom_train/48082226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrivacyItem getItem(String listName, int order) { Iterator values = getPrivacyList(listName).iterator(); PrivacyItem itemFound = null; while (itemFound == null && values.hasNext()) { PrivacyItem element = (PrivacyItem) values.next(); if (element.getOrder() == order) { itemFound = element; } } return itemFound; } COM: <s> returns the privacy item in the specified order </s>
funcom_train/23164554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEmbeddedElement() { if (embeddedElement != null) { // return embeddedElement, if explicitly set by the setter return embeddedElement.booleanValue(); } // not set => calculate JavaType type = getElementType(); return (type != null) ? TypeSupport.isEmbeddedElementType(type) : false; } COM: <s> determines whether the values of the elements should be stored if </s>