__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32221915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAtomicConcept get(ITerm term) { if (term instanceof IVariable) { throw new IllegalArgumentException("Must not be a Variable"); } IAtomicConcept freshConcept = map.get(term); if (freshConcept != null) return freshConcept; String roleName = conceptPrefix + term.toString(); freshConcept = BASIC.createAtomicConcept(roleName); map.put(term, freshConcept); return freshConcept; } COM: <s> this method automatically creates an </s>
funcom_train/3403739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void characters (String data) throws SAXException { try { if (!startTagIsClosed) { write('>'); startTagIsClosed = true; } char ch[] = data.toCharArray(); characters(ch, 0, ch.length); } catch( IOException e ) { throw new SAXException(e); } } COM: <s> write a string of character data with xml escaping </s>
funcom_train/12561155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lDelete(int offset, int length) { if (editable) { if (cursor.index >= offset) { int diff = cursor.index - offset; cursor.index -= (diff < length) ? diff : length; cursor.option = Text.PAINT_USE_CURSOR_INDEX; } } myInfo.isModified = myInfo.scrollY = true; updateTextInfo(); } COM: <s> notifies l amsp f of character deletion in the corresponding </s>
funcom_train/28339296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUserInRole(String role) { User user = getSessionUser(); boolean answer = false; if (user == null) { // No user at all answer = false; } else if ("*".equals(role)) { // "*" matches any roles (there is a user!) answer = true; } return answer; } COM: <s> over ride the container role checking and handle the special role </s>
funcom_train/7512333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getKeyMethodMap() { Map map = new HashMap(); String pkg = this.getClass().getPackage().getName(); ResourceBundle methods = ResourceBundle.getBundle(pkg + ".LookupMethods"); Enumeration keys = methods.getKeys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); map.put(key, methods.getString(key)); } return map; } COM: <s> provides the mapping from resource key to method name </s>
funcom_train/2920865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toNodes() { StringBuffer s = new StringBuffer(); for (int i = 1; i < ht.sc.length; ++i) { if (i != 1) { s.append("\n"); } s.append((new Node(i)).toString()); } return s.toString(); } COM: <s> construct the node representation of the hyphenation tree object </s>
funcom_train/11311118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PathImpl getPathWithoutLeafNode() { List<Node> nodes = new ArrayList<Node>(nodeList); PathImpl path = null; if (nodes.size() > 1) { nodes.remove(nodes.size() - 1); path = new PathImpl(nodes); } return path; } COM: <s> return a new </s>
funcom_train/50298305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultCacheBuffer(int pageCount) throws SQLException { if (pageCount < 1){ throw new IllegalArgumentException("page count must be positive"); } ServiceRequestBuffer srb = createDefaultPropertiesSRB(); srb.addArgument(ISCConstants.isc_spb_prp_page_buffers, pageCount); executeServicesOperation(srb); } COM: <s> set the default page buffer count to be cached in the database </s>
funcom_train/3711582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAxisType (AxisType at) { axisType = at; if (mappingSelector != null) { mappingSelector.setSelectedItem (axisType); } if (reportLog) { SpvLogger.log(Level.INFO, "Plot type changed to " + axisType); } super.setAxisType (at); } COM: <s> sets the axis type </s>
funcom_train/49761724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String internalGet(String key) { String result = Platform.getPreferencesService().get(key, null, getPreferenceNodes(false)); if (result == null) { result = Platform.getPreferencesService().get(currentOS + key, null, getPreferenceNodes(true)); } if (result == null) { result = Platform.getPreferencesService().get(key, null, getPreferenceNodes(true)); } return result; } COM: <s> return the string value for the specified key </s>
funcom_train/2601004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MyTreeNode clone() { MyTreeNode root=(MyTreeNode)super.clone(); for (int i=0; i<this.getChildCount(); i++) root.insert((MyTreeNode)(((MyTreeNode)getChildAt(i)).clone()),i); return root; } COM: <s> clones recursively the tree </s>
funcom_train/45860957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String addParameters(String page, Map<String, String> parameters) { StringBuffer buffer = new StringBuffer(page); if (parameters != null && parameters.size() > 0 ) { if (page.indexOf('?') == -1) { buffer.append("?"); } Iterator<String> keys = parameters.keySet().iterator(); String key; while (keys.hasNext()) { key = keys.next(); buffer.append(key).append("=").append(parameters.get(key)); if (keys.hasNext()) { buffer.append("&"); } } } return buffer.toString(); } COM: <s> adds the map of parameters to the page url </s>
funcom_train/20044849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void after() { try { oStream.flush(); oStream.closeOutput(); } catch(com.sun.star.io.NotConnectedException e) {} catch(com.sun.star.io.BufferSizeExceededException e) {} catch(com.sun.star.io.IOException e) {} this.disposeEnvironment(); } COM: <s> after the test the stream writer is closed and the </s>
funcom_train/16463747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testFormatText(String expectedText, String unformattedText, boolean urlEncode, KeywordAction action, String senderMsisdn, String senderDisplayName, String incomingMessageText, Integer refNo) { String formattedText = KeywordUtils.formatText(unformattedText, urlEncode, action, senderMsisdn, senderDisplayName, incomingMessageText, refNo); assertEquals("Formatted text did not appear as expected.", expectedText, formattedText); } COM: <s> helper method for testing if supplied text is formatted in the expected way </s>
funcom_train/16907903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCValue(int value) { if (function==NONE) return value; if (function>=STRAIGHT_LINE && function<=RODBARD2 && coefficients!=null) { double v = CurveFitter.f(function, coefficients, value); if (zeroClip && v<0.0) return 0.0; else return v; } if (cTable==null) makeCTable(); if (cTable!=null && value>=0 && value<cTable.length) return cTable[value]; else return value; } COM: <s> converts a raw pixel value to a density calibrated value </s>
funcom_train/41218341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addFile(UTF8 src, Block blocks[]) { waitForReady(); // Always do an implicit mkdirs for parent directory tree mkdirs(NDFSFile.getNDFSParent(src.toString())); if (unprotectedAddFile(src, blocks)) { logEdit(OP_ADD, src, new ArrayWritable(Block.class, blocks)); return true; } else { return false; } } COM: <s> add the given filename to the fs </s>
funcom_train/22718955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String xpathCompElementMinOccurs(String compName, String elementName, String minOccurs) { return xpathComponentName(compName) + "/xsd:sequence/xsd:element[(@name = '" + elementName + "' or @ref = '" + elementName + "') and " + " @minOccurs = '" + minOccurs + "']"; } COM: <s> is the minimum occurence value defined </s>
funcom_train/24492565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { for (Ball b: ballList){ b.setBounds(getWidth(), getHeight()); b.move(); // Move the ball. } repaint(); // Repaint indirectly calls paintComponent. //i++; //paintImmediately(0,0,400, 400); //System.out.println("painting "+i); } COM: <s> action listener of the timer </s>
funcom_train/42744877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getServiceHandle( String id, String oaipmhUrl) throws RemoteException, SISFaultException { SISStub stub = new SISStub(HDL_SERVICE_RUL); //Use this code to avoid the connection reset problem stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, false); ResolveIdentifier resolve = new ResolveIdentifier(); resolve.setIdentifier(id); //System.out.println(oaipmhUrl); ResolveIdentifierResponse response = stub.resolveIdentifier(resolve); String handle = response.get_return(); return handle; } COM: <s> todo change it </s>
funcom_train/41665308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NeighborConfig getLastParentConfig() { NeighborConfig lastParentConfig = null; for (NeighborConfig neighborConfig : getList()) { if (neighborConfig.isParent() && neighborConfig.isInternal()) { lastParentConfig = neighborConfig; } } for (NeighborConfig neighborConfig : getList()) { if (neighborConfig.isParent() && neighborConfig.isExternal()) { lastParentConfig = neighborConfig; } } return lastParentConfig; } COM: <s> gets the last parent neighbor configuration </s>
funcom_train/9364088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof Pair)) return false; final Pair<F, S> other; try { other = (Pair<F, S>) o; } catch (ClassCastException e) { return false; } return first.equals(other.first) && second.equals(other.second); } COM: <s> checks the two objects for equality by delegating to their respective equals methods </s>
funcom_train/7265638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private V removeEntry(TrieEntry<K, V> h) { if (h != root) { if (h.isInternalNode()) { removeInternalEntry(h); } else { removeExternalEntry(h); } } decrementSize(); return h.setKeyValue(null, null); } COM: <s> removes a single entry from the trie </s>
funcom_train/14329378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_lastUpdateCount() { String fieldName = "lastUpdateCount"; String messageKey = Driver.LASTUPDATECOUNT; String expectedValue = DefaultProperties.LAST_UPDATE_COUNT; assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, expectedValue); if (!isOnlySqlServerTests()) { assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, expectedValue); } } COM: <s> test the code last update count code property </s>
funcom_train/37804382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPbuttons() { if( Pbuttons == null ) { final FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(java.awt.FlowLayout.RIGHT); Pbuttons = new JPanel(); Pbuttons.setLayout(flowLayout); Pbuttons.add(getBok(), null); Pbuttons.add(getBexit(), null); } return Pbuttons; } COM: <s> this method initializes pbuttons </s>
funcom_train/33158416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int remove(final int index) { if (index < 0 || index >= length) { throw new IndexOutOfBoundsException(); } final int value = elements[index]; if (length-index-1 > 0) { System.arraycopy(elements, index+1, elements, index, length-index-1); } length -= 1; fireRemove(index, value); return value; } COM: <s> remove a stack element at a specific index </s>
funcom_train/31480760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRemoteConnectionHostName() { try { if (null == this.sock) { // Hack to ensure we get the localhost name return java.net.InetAddress.getLocalHost().getHostName(); } else { return this.getSocket().getInetAddress().getHostName(); } } catch (java.net.UnknownHostException e) { return "<remote hostname n/a>"; } } COM: <s> return the hostname of the address to which this connection is bound </s>
funcom_train/26454927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invalidGetFromCacheArgument(String key, int refresh) { try { // Try to get the data from the cache admin.getFromCache(key, refresh); fail("getFromCache did NOT throw an IllegalArgumentException"); } catch (IllegalArgumentException ipe) { // This is what we expect } catch (NeedsRefreshException nre) { admin.cancelUpdate(key); // Ignore this one } } COM: <s> method that try to retrieve data from the cache but specify wrong arguments </s>
funcom_train/50804007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { mapPanel.repaint(); for (int i = 0; i < displayStr.length; ++i) { conf.display[i] = display[i].isSelected(); } for (int i = 0; i < rangeStr.length; ++i) { conf.ranges[i] = ranges[i].isSelected(); } } COM: <s> the event listener for all the display options </s>
funcom_train/46818788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void probeOpenOffice() throws ExportException { // test connection OpenOfficeConnection connection = new SocketOpenOfficeConnection(); try { connection.connect(); connection.disconnect(); } catch (ConnectException cEx) { // logger.fatal("Could not establish connection to OpenOffice.", // cEx); throw new ExportException(ooExceptionString); } catch (OpenOfficeException oEx) { // logger.fatal("Could not establish connection to OpenOffice.", // oEx); throw new ExportException(ooExceptionString); } } COM: <s> checks once if ooo is running </s>
funcom_train/38324722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getSlotValue(int col, Object data) { if (useMacros) { return macros[col].getReadMacro().getProperty(data); } else { try { if (this.PROPS[col].getReadMethod() != null) { return this.PROPS[col].getReadMethod().invoke(data, new Object[0]); } return null; } catch (IllegalAccessException e) { return null; } catch (IllegalArgumentException e) { return null; } catch (InvocationTargetException e) { return null; } } } COM: <s> note havent decided if the method should throw an exception </s>
funcom_train/825230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSceneGraph() { sceneBG = new BranchGroup(); bounds = new javax.media.j3d.BoundingSphere(new Point3d(0, 0, 0), BOUNDSIZE); lightScene(); addBackground(); sceneBG.addChild(new CheckerFloor().getBG()); loadObject2(); sceneBG.compile(); } COM: <s> create the scene graph </s>
funcom_train/5734558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SampleModel createCompatibleSampleModel(int w, int h) { int[] bandOffsets = new int[numComponents]; for (int i = 0; i < numComponents; i++) { bandOffsets[i] = i; } return new ComponentSampleModelJAI(transferType, w, h, numComponents, w*numComponents, bandOffsets); } COM: <s> creates a code sample model code with the specified width and </s>
funcom_train/12674627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SymTabAST findFirstToken(int type) { SymTabAST result = null; AST sibling = getFirstChild(); while (sibling != null) { if (sibling.getType() == type) { result = (SymTabAST) sibling; break; } sibling = sibling.getNextSibling(); } return result; } COM: <s> gets first occurence of the child node with a certain type </s>
funcom_train/1883676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getAnyRadioButton() { if (this.anyRadioButton == null) { this.anyRadioButton = new JRadioButton(); this.anyRadioButton.setText("Search using any tag"); this.anyRadioButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { TagCloudBrowserPanel.this.invokeTagSearch(); } }); } return this.anyRadioButton; } COM: <s> this method initializes any radio button </s>
funcom_train/1546531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { this.n = 0; minImpl.clear(); maxImpl.clear(); sumImpl.clear(); sumLogImpl.clear(); sumsqImpl.clear(); geoMeanImpl.clear(); secondMoment.clear(); if (meanImpl != mean) { meanImpl.clear(); } if (varianceImpl != variance) { varianceImpl.clear(); } } COM: <s> resets all statistics and storage </s>
funcom_train/36463734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataEvent getEvent() { DataEvent de = null; if (mbean != null) { try { de = getOsEvent(); } catch (final Exception e) { e.printStackTrace(); de = new DataEvent(); de.setValue(0.0); de.setType(e.getClass().getCanonicalName()); de.setMessage(e.getMessage()); } } return de; } COM: <s> get the actual event for this probe </s>
funcom_train/38787319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void turn_right(double multiplier) { rot -= turn_rate * Math.min(multiplier, 1); if (Math.min(multiplier, 1) == 1) { for (Thruster t : thrusters.get(3)) { t.do_effect(xpos, ypos, rot); } } rot = MyMath.FixDeg(rot); fix_rotation(); } COM: <s> turn right with multiplier force </s>
funcom_train/8347883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTxtMunicipio() { if (txtMunicipio == null) {//GEN-END:|202-getter|0|202-preInit // write pre-init user code here txtMunicipio = new TextField("Municipio:", null, 32, TextField.ANY);//GEN-LINE:|202-getter|1|202-postInit // write post-init user code here }//GEN-BEGIN:|202-getter|2| return txtMunicipio; } COM: <s> returns an initiliazed instance of txt municipio component </s>
funcom_train/5395702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCommentNode() { System.out.println("getCommentNode"); DBPComment instance = new DBPComment(); Comment expResult = null; Comment result = instance.getCommentNode(); 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 comment node method of class org </s>
funcom_train/49045266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonFeulgenLightGreen() { if (buttFeulgenLightGreen == null) { buttFeulgenLightGreen = new JRadioButtonMenuItem(); buttFeulgenLightGreen.setText("Feulgen Light Green"); buttFeulgenLightGreen.setToolTipText("Feulgen Light Green"); buttFeulgenLightGreen.addActionListener(this); buttFeulgenLightGreen.setActionCommand("parameter"); } return buttFeulgenLightGreen; } COM: <s> this method initializes the option feulgen light green </s>
funcom_train/18548487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePassword(UserTO uto) throws DataAccessException { Connection c = null; try { c = getConnection(false); this.updatePassword(uto, c); c.commit(); } catch(Exception e){ try { c.rollback(); } catch (SQLException er) { LogUtil.log(this, LogUtil.LOG_ERROR, "", er); } throw new DataAccessException(e); } finally{ this.closeConnection(c); } } COM: <s> update the password of user into database </s>
funcom_train/20928157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showInFrame(int frameWidth, int frameHeight) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); JFrame f = new JFrame(); f.setBounds(screenSize.width / 2 - frameWidth / 2, screenSize.height / 2 - frameHeight / 2, frameWidth, frameHeight); f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); f.add(this); f.setVisible(true); window.setSize(getSize()); } COM: <s> puts this drawing panel in a frame with the specified size centered on </s>
funcom_train/44694627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldName(final int iIndex) { if (m_BaseLayer != null) { final FeatureCollectionWrapper fc = m_BaseLayer.getFeatureCollectionWrapper(); /** * We assume that the first attribute of the feature is its geometry, and that there is always a geometry */ return fc.getFeatureSchema().getAttributeName(iIndex + 1); } else { return null; } } COM: <s> returns the name of a given field in the attributes table </s>
funcom_train/51725234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getcourbidx(String label) { //null => no courb found with this label for (int courbe = 0; courbe < courbs.size(); courbe++) { Donnees vals = courbs.get(courbe); if (vals.getlabel().compareTo(label) == 0) { return courbe; } } return -1; } COM: <s> provide the curb index from its label </s>
funcom_train/47867244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(byte[] value, NSOFDecoder decoder) throws IOException { // Decode the frame. InputStream in = new ByteArrayInputStream(value); NSOFObject o = decoder.inflate(in); if (!NSOFImmediate.isNil(o)) { NSOFBitmap bmp = (NSOFBitmap) o; setBits(bmp.getBits()); setBounds(bmp.getBounds()); setMask(bmp.getMask()); setObjectClass(bmp.getObjectClass()); } } COM: <s> set the value from the binary object </s>
funcom_train/34318428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setText("00:00"); jButton.setPreferredSize(new Dimension(80, 22)); jButton.setToolTipText("Run"); jButton.setFont(new Font("Dialog", Font.PLAIN, 18)); jButton.addActionListener(this); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/14021783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAttachmentMaxSize() throws DelegateException{ String size = null; try { Context context = new InitialContext(); size = (java.lang.String) context.lookup( "java:/comp/env/attachmentMaxSize" ); } catch (NamingException ex) { ex.printStackTrace(); } return size; } COM: <s> gets attachments maximum size for entire application </s>
funcom_train/25190798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Advertisement create (Serializable obj, InputStream data) { AdvertisementGenerator parser = new AdvertisementGenerator (sourceDir, classDir); parser.removeSourceFiles (removeSource); Advertisement result = parser.generate (obj, data); ClassServer server = ClassServer.getClassServer (); server.addRoot (classDir); return result; } COM: <s> create create an advertisement from a serializable object and an xml stream </s>
funcom_train/38628798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run () { // Capture input in case it changes during execution of this method final double value = input.get(); if (!timer.isRunning()) { timer.start(); derivative = 0; } else derivative = Math.differentiate(previousValue, value, timer.get()); timer.reset(); previousValue = value; } // run() COM: <s> samples and differentiates the input </s>
funcom_train/2518165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void taskDelete() { SummaryTask st = new ProjectSummaryTask(); st.setName("parent"); ProjectTask std = new ProjectTask(); std.setParentTask(st); Assert.assertEquals(st.subTaskCount(), 1); taskDao.discard(std); Assert.assertEquals(st.subTaskCount(), 0); taskDao.save(st); dbc.commit(); dbc.close(); dbc.open(); taskDao = dbc.getTaskDao(); SummaryTask newSt = (SummaryTask) taskDao.findFirstByName("parent"); Assert.assertEquals(newSt.subTaskCount(), 0); } COM: <s> this test to look at problem which occurs when a task is deleted </s>
funcom_train/48391919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addChangedHandler(com.smartgwt.client.widgets.grid.events.ChangedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.ChangedEvent.getType()) == 0) setupChangedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.ChangedEvent.getType()); } COM: <s> add a changed handler </s>
funcom_train/49009264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints4 = new GridBagConstraints(); gridBagConstraints4.anchor = GridBagConstraints.WEST; gridBagConstraints4.insets = new Insets(0, 0, 10, 0); gridBagConstraints4.fill = GridBagConstraints.HORIZONTAL; jLabel = new JLabel(); jLabel.setText("图象识别训练器"); jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.add(jLabel, gridBagConstraints4); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/13307559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Dimension getScaledWidth(RenderedImage image, int maxWidth, int maxHeight){ int imgWidth = image.getWidth(); int imgHeight = image.getHeight(); double scale = 1.0d; if (imgHeight > maxHeight){ scale = (double)maxHeight / (double)imgHeight; } int newWidth = (int)(imgWidth * scale); return new Dimension(newWidth, maxHeight); } COM: <s> this method calculates the propprtional relation in the given max dimension </s>
funcom_train/4623588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeFile(File file) { this.file = file; if ( file.exists() && !file.canWrite()) { throw new Unchecked( new IOException( "file is readonly" )); } if ( encoded ) { writeEncoded(); } else { changed = true; // force a write out writable = true; // be optimistic write(); } } COM: <s> switch to a new file same content save as </s>
funcom_train/2878412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object sfParseAnyValue(Reader reader) throws SmartFrogCompilationException { Object o = getParser().sfParseAnyValue(reader); if (o instanceof ReferencePhases) { o = ((ReferencePhases)o).sfAsReference(); } else if (o instanceof SFComponentDescription) { o = ((SFComponentDescription)o).sfAsComponentDescription(); } return o; } COM: <s> parses any value from a reader </s>
funcom_train/3946038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrganizationsType_default_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OrganizationsType_default_feature", "_UI_OrganizationsType_type"), ImscpRootv1p1p2Package.eINSTANCE.getOrganizationsType_Default(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the default feature </s>
funcom_train/2628778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signalBoundsChanged() { invalidateFullBounds(); setBoundsChanged(true); firePropertyChange(PROPERTY_CODE_BOUNDS, PROPERTY_BOUNDS, null, bounds); final int count = getChildrenCount(); for (int i = 0; i < count; i++) { final PNode each = (PNode) children.get(i); each.parentBoundsChanged(); } } COM: <s> this method should be called when the bounds of this node are changed </s>
funcom_train/38309366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTopDocumentElements() { topDocumentElements.clear(); topRealTag = null; BaseDocumentTag item = null; int stackSize = documentStack.size(); for (int i = 0; i < stackSize; i++) { item = (BaseDocumentTag) documentStack.get(i); registerTopDocumentElement(item); } } COM: <s> updates the top document elements </s>
funcom_train/51346668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toString(IChunkedOrderedIterator<ISPO> itr, int max, AbstractTripleStore db) { StringBuilder sb = new StringBuilder(); int n = 0; while (itr.hasNext() && n < max) { if (n > 0) sb.append(", "); sb.append(itr.next().toString(db)); } return "{" + sb.toString() + "}"; } COM: <s> consumes up to max elements from the iterator and returns a </s>
funcom_train/13304505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMimeTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OneBinaryDocument_mimeType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OneBinaryDocument_mimeType_feature", "_UI_OneBinaryDocument_type"), NegotiationPackage.Literals.ONE_BINARY_DOCUMENT__MIME_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the mime type feature </s>
funcom_train/13592511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testArguments() { ArgumentParser parser = new ArgumentParser( new String[] {"a", "bc", "def=g", "hjk=lmn opq"}); Iterator<String> iter = parser.iterator(); assertEquals("a", iter.next()); assertEquals("bc", iter.next()); assertEquals("def=g", iter.next()); // '=' should not be parsed! assertEquals("hjk=lmn opq", iter.next()); assertIteratorAtEnd(iter); } COM: <s> test if regular arguments no options are correctly recognized </s>
funcom_train/40312263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetColumnType_InvalidColumn2() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.getColumnType(0); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by getColumnType method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests get column type with column index equals to 0 </s>
funcom_train/31093452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubstituteEntities1() throws Exception { File file = createTextFile( "A \u201cline of text\u201d \u2014 A \u2018second\u2019 line" ); PageFragment fragment = new PageFragment(); fragment.setSource( file.getAbsolutePath() ); assertEquals( "Fragment contents", "A &ldquo;line of text&rdquo; &mdash; A &lsquo;second&rsquo; line", fragment.asText() ); } COM: <s> verifies substitution of common non latin1 characters rsquo rdquo ldquo lsquo and mdash </s>
funcom_train/17202043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepare() { live = new LiveAnalysis(false, // don't create GC maps true, // skip (final) local propagation step // of live analysis false, // don't store live at handlers ir.desiredSSAOptions.getExcludeGuards()); // don't skip guards live.perform(ir); } COM: <s> perform some calculations to prepare for ssa construction </s>
funcom_train/19417305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTimeAxis(String length){ this.length = (new Integer(length)).intValue(); Integer y2 = new Integer((y1.intValue())+((new Integer(length)).intValue())); SVGDashedLine svgDL = new SVGDashedLine(x1.toString(),y1.toString(),x1.toString(),y2.toString()); svgDL.createSVGDashedLine(svgNS,document,element); } COM: <s> creates the time axis of the classifier role with its length </s>
funcom_train/46752415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateUserRef(DisplayModel updateUserRef) { if (Converter.isDifferent(this.updateUserRef, updateUserRef)) { DisplayModel oldupdateUserRef= new DisplayModel(this); oldupdateUserRef.copyAllFrom(this.updateUserRef); this.updateUserRef.copyAllFrom(updateUserRef); setModified("updateUserRef"); firePropertyChange(String.valueOf(PARAMETERVALUES_UPDATEUSERREFID), oldupdateUserRef, updateUserRef); } } COM: <s> date the parameter value was last updated </s>
funcom_train/23717831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRecordKey(HttpServletRequest req) { String reqUrl = req.getRequestURI(); String res = reqUrl.substring(getRequestPathFromRoot(req).length()); logger.debug("Record key for '" + reqUrl + "' is '" + res + "'"); return res; } COM: <s> strips the path to this servlet from the user request url </s>
funcom_train/12547443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawState(Graphics g, State state) { if (selected.contains(state)) { getStateDrawer().drawState(g, getAutomaton(), state, state.getPoint(), SELECTED_COLOR); if (doesDrawStateLabels()) getStateDrawer().drawStateLabel(g, state, state.getPoint(), StateDrawer.STATE_COLOR); } else super.drawState(g, state); } COM: <s> if a state is selected draw it somewhat darker than the others </s>
funcom_train/22279803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSetFont(Font aFont) { Range s = selectedRange(); if( s.length > 0 ) { Hashtable newAttr = new Hashtable(); newAttr.put( FONT_KEY , aFont ); addAttributesForRange( newAttr , s); } else addTypingAttribute(FONT_KEY,aFont); } COM: <s> changes the font of the currently selected text </s>
funcom_train/50879602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayer(Layer inLayer){ if (inLayer == null) return; myLayer = inLayer; myPanelLayer.setLayer(myLayer); myPanelStyle.setLayer(myLayer); myPanelLabeler.setLayer(myLayer); myPanelRenderer.setLayer(myLayer); myPanelProjection.setLayer(myLayer); myPanelFilter.setLayer(myLayer); } COM: <s> set the layer into the dialog </s>
funcom_train/3907995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRolePartCompleted(RolePart rolePart) { DataElement completeAct = getCompleteActDataElement(); // Ensure "complete-act" element exists Element element = completeAct.createElement(); // Add it addRef(rolePart, element, LD_Core.WHEN_ROLE_PART_COMPLETED, LD_Core.REF); } COM: <s> add a role part reference for complete act when role part completed </s>
funcom_train/67409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getFieldsEnumeration() { Field[] fields = getClass().getFields(); Vector v = new Vector(); for(int i=0; i<fields.length; i++) v.add(fields[i].getName()); return Collections.enumeration(v); } COM: <s> subclasses may override this method to add their own fields </s>
funcom_train/39119737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JInternalFrame getJInternalFrame() { if (jInternalFrame == null) { jInternalFrame = new JInternalFrame(); jInternalFrame.setContentPane(getJContentPane1()); jInternalFrame.setTitle("Session 1"); jInternalFrame.setBounds(0, 0, 524, 329); jInternalFrame.setClosable(true); jInternalFrame.setResizable(true); jInternalFrame.setIconifiable(true); jInternalFrame.setMaximizable(true); jInternalFrame.setVisible(true); } return jInternalFrame; } COM: <s> this method initializes j internal frame </s>
funcom_train/1723229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testDoFirstLoading() { // expect(mProvider.getCaches()).andReturn(mList1); // PowerMock.replayAll(); // // CachesProviderLazy lazy = new CachesProviderLazy(mProvider, MINDIST, MINTIME, mClock); // // assertEquals(mList1, lazy.getCaches()); // PowerMock.verifyAll(); // } COM: <s> loading the list directly after initialization </s>
funcom_train/47310782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getChildren(IPropertySheetEntry entry) { // if the entry is the root and we are showing categories, and we have // more than the // defualt category, return the categories if (entry == rootEntry && isShowingCategories) { if (categories.length > 1 || (categories.length == 1 && !categories[0] .getCategoryName().equals( MISCELLANEOUS_CATEGORY_NAME))) return Arrays.asList(categories); } // return the sorted & filtered child entries return getSortedEntries(getFilteredEntries(entry.getChildEntries())); } COM: <s> returns the child entries of the given entry </s>
funcom_train/25133613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderBinaryDF(URL url) throws Exception { EditorBinaryDFHandler handler = new EditorBinaryDFHandler(engine, url); engine.parseBinaryDFImpl(url, handler); df = handler.getDefinitionFile(); name = new File(url.toString()).getName(); renderExistingLayer(layersList, handler); } COM: <s> render a unique layer contained in an xml definition file in a jpanel </s>
funcom_train/3306319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resendAllNodes() { logger.debug("resending all TreeNodes..."); deltaqueue.addDelta (TreeDelta.ACTION_CLEAR, new HashMap(0)); int innerOrderPos = 0; for (Iterator iChildren = this.rootNode.getChildren().iterator(); iChildren.hasNext();) { CommandTreeNode childNode = (CommandTreeNode) iChildren.next(); resendNodes(childNode, true, innerOrderPos++); } } COM: <s> sends a tree delta </s>
funcom_train/37582164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { if (Trace.TRACE) { Trace.trace(); } // CHECKME: is this correct? We return "unknown" (0) for getMaxRowSize // So, what does it mean to say that "unknown" does not include // LONGVARCHAR and LONGVARBINARY? // boucherb@users 20020427 // fredt@users - changed return true; } COM: <s> retrieves whether the return value for the method </s>
funcom_train/39955025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContentTypes() { Set types = new HashSet(); types.addAll(Arrays.asList(extractor.getContentTypes())); assertTrue( "EmptyTextExtractor does not support the given content type", types.contains("test/type")); assertEquals( "EmptyTextExtractor supports unknown content types", 1, types.size()); } COM: <s> tests that the extractor supports no content types </s>
funcom_train/41721693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMinMaxNumCases(CompositeCase cc1, CompositeCase cc2) { int numCases1 = cc1.getCases().size(); int numCases2 = cc2.getCases().size(); if (numCases1 < numCases2) { minNumCases = numCases1; maxNumCases = numCases2; } else { minNumCases = numCases2; maxNumCases = numCases1; } } COM: <s> sets the min and max number of simple cases between two </s>
funcom_train/863992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface Names extends PipelineInterface { /** * Pass a name * * @param kind the name kind * @param nameIndex the name index - may be zero * @param namespaceIndex the namespace index - may be zero * @param namespaceSetIndex the namespace set index - may be zero */ public void name( MultiNameKind kind, int nameIndex, int namespaceIndex, int namespaceSetIndex ); } COM: <s> interface to pass the name pool </s>
funcom_train/14635107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeMediaApplication() { System.out.println("I'm closing media application!! Check if I'll open again..."); if (audio_app!=null) { audio_app.stopMedia(); audio_app=null; } if (video_app!=null) { video_app.stopMedia(); video_app=null; } } COM: <s> close the media application </s>
funcom_train/16823038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPlane() { try { ObjectLoader objectLoader = new ObjectLoader(context.getResources().openRawResource( R.raw.airplane_red_mesh_obj)); verticesAsByteBuffer = objectLoader.getVerticesBuffer(); textureCoordinatesAsByteBuffer = objectLoader.getTextureBuffer(); normalsAsByteBuffer = objectLoader.getNormalsBuffer(); } catch (NotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> may want to use w and h in the future </s>
funcom_train/14027689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean rewindIndex() { if (_index < 0) { throw new IndexOutOfBoundsException( "The program index (" + _index + ") is not within the instruction list (length=" + _instructionList.size() + ")"); } if (_index > 0) { --_index; } return (_index > 0); } COM: <s> rewind the program index to the previous instruction </s>
funcom_train/13307005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypedRdfQuery toTypedRdfQuery(Object ... params){ String[] saparam; if(params != null) { saparam = new String[params.length]; int i = 0; for(Object param : params) { System.out.println(param); saparam[i++] = param.toString().replaceAll(" ", "*"); } }else saparam = new String[0]; String result = String.format(this.template, (Object[])saparam); return new TypedRdfQuery(this.qlanguage, result); } COM: <s> generates a final string with query with variables filled in </s>
funcom_train/29289966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateUserGroup(UserGroupCMPData data) throws EJBException { try { UserGroupCMPLocal userGroupLocal = getUserGroupCMPLocalHome() .findByPrimaryKey(data.getGroup_id()); userGroupLocal.setDescription(data.getDescription()); userGroupLocal.setGroup_name(data.getGroup_name()); } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> update user group business method </s>
funcom_train/41029602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Card getCard(Card creator, String name) { if (creator == null || !creator.getName().equals("Ancient Garden")) { throw new RuntimeException("game.getCard(): this method is restricted."); } CardFactory cardFactory = CardManager.getCardFactory(); Card card = cardFactory.getCard(name); card.setOwner(creator.getOwnerID()); card.setController(creator.getController()); card.setUniqueNumber(getUniqueCardID()); return card; } COM: <s> loads card from database </s>
funcom_train/7589292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double distanceToClosedPoint(double [] point, double [][] front) { double minDistance = distance(point,front[0]); for (int i = 1; i < front.length; i++) { double aux = distance(point,front[i]); if (aux < minDistance) { minDistance = aux; } } return minDistance; } // distanceToClosedPoint COM: <s> gets the distance between a point and the nearest one in </s>
funcom_train/48615571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteIrFile(IrFile irFile) { LinkedList<FileInfo> filesToDelete = new LinkedList<FileInfo>(); FileInfo fileInfo = irFile.getFileInfo(); filesToDelete.add(fileInfo); Set<TransformedFile> transforms = irFile.getTransformedFiles(); for(TransformedFile tf : transforms) { FileInfo info = tf.getTransformedFile(); filesToDelete.add(info); } irFileDAO.makeTransient(irFile); for(FileInfo info : filesToDelete) { fileServerService.deleteFile(info); } return true; } COM: <s> delete the specified ir file </s>
funcom_train/17095795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(700, 500); this.setTitle("About"); this.getContentPane().setLayout( new BoxLayout(this.getContentPane(), BoxLayout.Y_AXIS)); this.add(getJScrollPane(), BorderLayout.PAGE_START); JPanel jp2 = new JPanel(); jp2.setMaximumSize(new Dimension(100, 100)); jp2.add(getJButton()); this.add(jp2, BorderLayout.PAGE_END); } COM: <s> this method initializes this </s>
funcom_train/28116654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AckTypes getAckTypes() { AckTypes result = null; String test = getName(); String[] types = types = AttributeHelper.getAttributes( getClass(), test, "jmscts.session", false); if (types.length == 0) { result = AckTypes.ALL; } else { result = AckTypes.fromString(types); } return result; } COM: <s> returns the session types to test against </s>
funcom_train/47738968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GraphModelEdit createRemoveAndCellEdit(Object[] cells, Map attributes) { // Remove from GraphStructure ConnectionSet cs = ConnectionSet.create(this, cells, true); // Remove from Group Structure ParentMap pm = ParentMap.create(this, cells, true, false); // Construct Edit GraphModelEdit edit = createEdit(null, cells, attributes, cs, pm); if (edit != null) { edit.end(); } return edit; } COM: <s> returns an edit that represents a remove and a change </s>
funcom_train/28109282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String rval = "PRODUCT [ name = " + getName() + "\n" + " MODEL_NUMBER = " + getModel_number() + "\n" + " description = " + getDescription() + "\n" + " category = " + getCategory() + "\n" + "]"; return rval; } COM: <s> produces a string representation of the record </s>
funcom_train/35086979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPageSize() { double rate = 0; if (this.getElapsed() > 0 && calculator.getTotalBytes() > 0) { rate = calculator.getTotalBytes() / ((double) this.getElapsed() / 1000); } if (rate < 0) { rate = 0; } return rate; } COM: <s> should calculate the average page size which means divide the bytes by number </s>
funcom_train/38806723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debug(GanttRectangle clientRect, String message) { logger.debug(getCategory() + " [x=" + clientRect.x + ",y=" + clientRect.y + "]" + " [w=" + clientRect.width + ",h=" + clientRect.height + "] " + message); } COM: <s> debug log with rectangle position and size on the canvas </s>
funcom_train/43424334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(String queryId){ if (results.containsKey(queryId)) results.remove(queryId); sessions.remove(queryId); if (hPlql.containsKey(queryId)) hPlql.remove(queryId); if (resultFormats.containsKey(queryId)) resultFormats.remove(queryId); } COM: <s> remove result and session of the query id </s>
funcom_train/49992975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SessionDelegate() throws NamingException { ResourceBundle facilityResources = ResourceBundle.getBundle("uk.icat3.download.facility"); String facilityName = null; try { facilityName = facilityResources.getString("facility.name"); } catch (Exception mre) { facilityName = "ISIS"; } CachingServiceLocator csl = CachingServiceLocator.getInstance(); usr = (UserSession)csl.lookup("UserSession"+facilityName); } COM: <s> creates a new instance of session delegate </s>
funcom_train/18032298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuFileExportCd() { if (m_menuFileExportCd == null) { m_menuFileExportCd = new JMenuItem(); m_menuFileExportCd.setText(Messages.getString("FBMenu.14")); //$NON-NLS-1$ m_menuFileExportCd.setMnemonic(Messages.getString("FBMenu.15").charAt(0)); //$NON-NLS-1$ } return m_menuFileExportCd; } COM: <s> returns the file export cd item </s>
funcom_train/9681125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isMarkedAsUsed(final LocationAware locationAware) { final JavadocComment jdoc = Comment.findJavadocFor(locationAware); if (jdoc != null && jdoc.getText().toLowerCase().indexOf("@used") != -1) { return true; } return false; } COM: <s> determines whether the member or type is marked as used </s>
funcom_train/18099549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubCommand(Command childCommand, Command parentCommand) { if(this.menuItemStyle != null) { addSubCommand(childCommand, parentCommand, this.menuItemStyle); } else { //#style menuitem, menu, default addSubCommand(childCommand, parentCommand, de.enough.polish.ui.StyleSheet.defaultStyle ); } } COM: <s> adds the given command as a subcommand to the specified parent command </s>