__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/20814218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Type getGenericType(Class<?> clazz) { try { ParameterizedType genericSuperclass = (ParameterizedType)clazz.getGenericSuperclass(); Type[] actualTypeArguments = genericSuperclass.getActualTypeArguments(); if (actualTypeArguments != null && actualTypeArguments.length == 1) return actualTypeArguments[0]; } catch (Exception e) { // fallback... } return null; } COM: <s> returns actual type argument of a given class </s>
funcom_train/28347723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Action captureWindowAsImageAction( final XalAbstractDocument document ) { Action action = new AbstractAction( "capture-as-image", IconLib.getIcon( IconGroup.CUSTOM, "snapshot24.gif" ) ) { public void actionPerformed( final ActionEvent event ) { document.getDocumentView().captureAsImage(); } }; return action; } COM: <s> make an action that captures the main window corresponding to the document </s>
funcom_train/50323913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEvilPeerEntry(List someEntries) { if (null != someEntries) { /** Iterator it = someEntries.iterator(); while (it.hasNext()) { addEvilPeerEntry( (EvilPeerEntry)it.next() ); } */ getCache().addAll(someEntries); } } COM: <s> add the given list evil peer entries to the cache </s>
funcom_train/1626790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onLoad(Widget sender) { loadedCount++; if (loadedCount == imageCount) { long took = System.currentTimeMillis() - start; Log.debug("Took " + took + " ms to load " + imageCount + " user."); //Window.alert("Took " + took + " ms to load " + imageCount + " user."); } } COM: <s> fired when a widget finishes loading </s>
funcom_train/13966473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stringIDForEO(EOEntity entity, EOEnterpriseObject eo) { Object id = idForEO(entity, eo); String idStr; if (id instanceof Object[]) { throw new IllegalArgumentException(eo.entityName() + " has a compound primary key, which is currently not supported."); } else { idStr = String.valueOf(id); } return idStr; } COM: <s> returns the string form of the primary key of the given eo </s>
funcom_train/31101841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getURI(String prefix) { // find prefix in current context for (int i = fNamespaceSize; i > 0; i -= 2) { if (fNamespace[i - 2] == prefix) { return fNamespace[i - 1]; } } // prefix not found return null; } // getURI(String):String COM: <s> look up a prefix and get the currently mapped namespace uri </s>
funcom_train/18008382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) throws ServletException { setFilterConfig(filterConfig); initCaches(); String localizationStyleString = null; try { localizationStyleString = filterConfig.getInitParameter(PARAMETER_LOCALIZATIONSTYLE); if (localizationStyleString != null) { setLocalizationStyle(Integer.parseInt(localizationStyleString)); } else { setLocalizationStyle(LOCALIZATIONSTYLE_FILESUFFIX); } } catch (NumberFormatException nfe) { setLocalizationStyle(LOCALIZATIONSTYLE_FILESUFFIX); } finally { localizationStyleString = null; } log(i18nFilterResources.getString("xmlfilter.message.initialized")); //$NON-NLS-1$ } COM: <s> initializes the filter with the information contained in the filter config object </s>
funcom_train/12182174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAssetSelectionCriteriaSection(Composite parent) { selectionCriteriaSection = new AssetSelectionCriteriaSection(parent, SWT.NONE, getContext()); GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING); data.heightHint = 200; selectionCriteriaSection.setLayoutData(data); selectionCriteriaSection.packSection(); setDefaultColour(selectionCriteriaSection); } COM: <s> creates the variant selection criteria section for this variable policy </s>
funcom_train/21963967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getSubTextElementsHelper() { String out = ""; if (getType() == HtmlElementType.text) { out += getText(); } for(HtmlElement child : getChildren()) { out += child.getSubTextElementsHelper(); } return " " + out + " "; } COM: <s> returns all of the text elements underneath this tag </s>
funcom_train/27822843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationField getApplicationField(String uri) throws KAONException { ApplicationField applicationField=(ApplicationField)m_applicationFields.get(uri); if (applicationField==null) { Instance applicationFieldInstance=m_registryOIModelInstance.getInstance(uri); applicationField=new ApplicationField(this,applicationFieldInstance); m_applicationFields.put(uri,applicationField); } return applicationField; } COM: <s> returns the application field object for given uri </s>
funcom_train/3350936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDay() { final int control = cmos.getRegister(RTC_CONTROL); final int date = cmos.getRegister(CMOS_RTC_DAY_OF_MONTH); if ((control & RTC_DM_BINARY) != 0) { return date; } else { return BCDUtils.bcd2bin(date); } } COM: <s> gets the current day of the month </s>
funcom_train/44838619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StudentEnrollment findById(String id) throws RemoteException { StudentEnrollment se = null; try { se = studentEnrollmentManager.findById(id); } catch (RemoteException rex) { System.out.println("Error on the remote server" + rex); throw new RemoteException("Error on the remote server" + rex); } return se; } COM: <s> find a student enrollment by id </s>
funcom_train/15410449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int queryPlanHash(BeanQueryRequest<?> request) { int hc = (baseProps == null ? 1 : baseProps.queryPlanHash(request)); if (fetchPaths != null) { for (OrmQueryProperties p : fetchPaths.values()) { hc = hc * 31 + p.queryPlanHash(request); } } return hc; } COM: <s> calculate the hash for the query plan </s>
funcom_train/18135988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeWorkflow(String workflowId) { Workflow workflow = workflows.get(workflowId); if (workflow != null) { workflows.remove(workflowId); workflow.removePropertyChangeListener(propertyChangeEventForwarder); if (rootWorkflowId != null && rootWorkflowId.equals(workflowId)) { rootWorkflowId = null; } propertyChangeSupport.firePropertyChange(WORKFLOWS_FIELD, workflow, null); } } COM: <s> method for removing a workflow </s>
funcom_train/20885027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBooleanFLR() { BooleanDTO dto = new BooleanDTO(); dto.booleanField = new Boolean(false); assertTrue(JSefaTestUtil.serialize(FLR, dto).indexOf("0") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(FLR, dto); } COM: <s> tests boolean flr </s>
funcom_train/40558987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document unarchiveOrder(String orderNumber) throws ProtocolException { UnarchiveOrderRequest unArchiveReqeust = _objectFact.createUnarchiveOrderRequest(); unArchiveReqeust.setGoogleOrderNumber(orderNumber); JAXBElement<UnarchiveOrderRequest> unArchiveOrder = _objectFact.createUnarchiveOrder(unArchiveReqeust); return convertToDOM(unArchiveOrder); } COM: <s> the b unarchive order b method creates the xml request for an </s>
funcom_train/45077661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProp(String key, String defaultValue) { String tmp_str = ""; if (appl != null) { tmp_str = appl.getParameter(key); } if (tmp_str != null && !tmp_str.equals("") ) { return tmp_str; } else { return getProperty(key, defaultValue); } } COM: <s> get a property with a method that works for applets </s>
funcom_train/1213864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasDuplicateSeed() { Set<Integer> seedSet = new HashSet<Integer>(); for (Wrestler w : this.list) { seedSet.add(w.getSeed()); } boolean rv = this.list.size() != seedSet.size(); if (rv) { logger.debug("Duplicate seed : " + seedSet); } return (rv); } COM: <s> determine if the given list of wrestlers have one or more wrestlers with </s>
funcom_train/13874728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsInversePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResolveExp_isInverse_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResolveExp_isInverse_feature", "_UI_ResolveExp_type"), QvtoperationalPackage.Literals.RESOLVE_EXP__IS_INVERSE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is inverse feature </s>
funcom_train/36767320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Db4oProvider getDb4oProvider() { DataObject dataObj = (DataObject)this.getLookup().lookup(DataObject.class); Db4oProvider provider = (Db4oProvider)dataObj.getCookie(Db4oProvider.class); if( provider == null ) { ErrorManager.getDefault().log("Severe: No db4o provider found"); } return provider; } COM: <s> retrieves the db4o provider object holding the database and queries from </s>
funcom_train/40676199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskOptions payload(String payload, String charset) { try { return payload(payload.getBytes(charset), "text/plain; charset=" + charset); } catch (UnsupportedEncodingException exception) { throw new UnsupportedTranslationException( "Unsupported charset '" + charset + "' requested.", exception); } } COM: <s> sets the payload from a </s>
funcom_train/39166083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NameEnvironmentAnswer findType(char[][] compoundTypeName) { String result = ""; String sep = ""; for (int i = 0; i < compoundTypeName.length; i++) { result += sep; result += new String(compoundTypeName[i]); sep = "."; } return findType(result); } COM: <s> tries to find the class or source file defined by the given type </s>
funcom_train/9031790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long empty() throws Exception{ dispatchOnBeforeEmpty(); //Coloquei isso para que o método empty não eclua nada do banco de dados Boolean originalLogChanges = getLogChanges(); setLogChanges(false); Long count = 0L; try{ while ( ! this.isEmpty() ){ this.delete( (AppEntity)this.list.get(0) ); count++; } } finally { setLogChanges(originalLogChanges); } dispatchOnAfterEmpty(); return count; } COM: <s> this method deletes all objects from this data list </s>
funcom_train/7508011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeader(String name) { String value = getHttpServletRequest().getHeader(name); String clean = ""; try { clean = ESAPI.validator().getValidInput("HTTP header value: " + value, value, "HTTPHeaderValue", 150, true); } catch (ValidationException e) { // already logged } return clean; } COM: <s> returns the named header from the http servlet request after canonicalizing </s>
funcom_train/20765576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int sliderVal2BitVal(int vmax, JSlider slider) { int v = 0; int s = slider.getValue(); double sm = slider.getMaximum(); double vm = vmax; v = (int) Math.round(vm*s/sm); // log.info("sliderValue=" + s + " -> bitValue=" + v); return v; } COM: <s> maps from linear slider to linear exponential bit value </s>
funcom_train/31534361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleBuddySignOn(AIMBuddy buddy, String info) { /*if (buddy.getName().equalsIgnoreCase(newName.getName()) && buddy.hasMessages()) { ArrayList messages = buddy.getMessages(); String message = ""; //collect the messages for (int i = 0; i < messages.size(); i++) { message += (messages.get(i) + "<BR>"); } //send the list aim.sendMessage(buddy, message); buddy.clearMessages(); }*/ } COM: <s> called when a buddy signs online </s>
funcom_train/38492176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PDU send(PDU pdu) throws java.io.IOException, NetSNMPSendError, InterruptedException { pduCarrier c = new pduCarrier() ; synchronized ( c ) { sess.send(pdu, c) ; c.wait() ; } // synchronized if( c.result == NetSNMP.STAT_TIMEOUT ) { throw new java.io.IOException("operation timed out") ; } return c.myPDU ; } COM: <s> send a pdu and retrieve the result </s>
funcom_train/28875735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disableTheme() { jRadioButtonOcean.setEnabled(false); jRadioButtonSteel.setEnabled(false); jRadioButtonAqua.setEnabled(false); jRadioButtonCharcoal.setEnabled(false); jRadioButtonHighContrast.setEnabled(false); jRadioButtonEmerald.setEnabled(false); jRadioButtonRuby.setEnabled(false); } COM: <s> disable the themes buttons </s>
funcom_train/34529911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CSVReader getReader(String filePath, char separator) throws DataSourceException { CSVReader reader = null; try { reader = new CSVReader(new FileReader(filePath), separator, '"'); } catch(Exception ex) { String msg = "Unable to read the CSV file: " + filePath; throw new DataSourceException(msg, ex); } return reader; } COM: <s> returns the csvreader for the specified file </s>
funcom_train/12183905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node createOrGetNode(Object element) { // Check, if there already is an instance of Node created for specified // element. Node node = (Node) nodesMap.get(element); // If no, create it now. if (node == null) { node = new Node(element); nodesMap.put(element, node); } return node; } COM: <s> creates an instance of internal node containing specified graph node </s>
funcom_train/24316184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyArray(String key, String[] newValues) { String finalValue = ""; for (int i = 0; i < newValues.length; i++) { finalValue = finalValue + "," + newValues[i]; } properties.setProperty(key, finalValue.substring(1)); init(); } COM: <s> set property value as string and remove old values </s>
funcom_train/50208914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void loadCastorMapping() throws BuildException { // try { // //log("destination dir: " + destDir); // //log("Castor mapping file from: " + mappingFile); // FlowModelBind.loadMapping(mappingFile); // } catch (Exception e) { // e.printStackTrace(); // throw new BuildException( // "Could not create FlowImageGenerator", // getLocation()); // } // } COM: <s> loads the castor maping file </s>
funcom_train/47143022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportError(final Exception ex) { Toolkit.getDefaultToolkit().beep(); ex.printStackTrace(); SwingUtilities.invokeLater(new Runnable() { public void run() { ImportPanel panel = (ImportPanel)getComponent(); panel.setErrorMessage(ex.getMessage()); setCanGoBack(true); } }); } COM: <s> reports the given error message to the step component </s>
funcom_train/45248377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCheckBox getJCheckBoxMultiplosArquivosSaidaDados() { if (jCheckBoxMultiplosArquivosSaidaDados == null) { jCheckBoxMultiplosArquivosSaidaDados = new JCheckBox(); jCheckBoxMultiplosArquivosSaidaDados.setOpaque(false); jCheckBoxMultiplosArquivosSaidaDados.setSize(new Dimension(81, 21)); jCheckBoxMultiplosArquivosSaidaDados.setLocation(new Point(242, 281)); jCheckBoxMultiplosArquivosSaidaDados.setText("Dados"); } return jCheckBoxMultiplosArquivosSaidaDados; } COM: <s> this method initializes j check box multiplos arquivos saida dados </s>
funcom_train/38574933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean loadWall(Node dir) throws Exception { NodeList dirList = dir.getChildNodes(); for (int i = 0; i < dirList.getLength(); i++) { Node node = dirList.item(i); if (node.getNodeName().toLowerCase().equals("wall")) { return 0 != Integer.parseInt(node.getTextContent()); } } throw new Exception("Kein Reward gefunden!"); } COM: <s> read the wall out of a directionnode from the gridworldfile </s>
funcom_train/4231646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMaxSize(Collection vertices) { // Maximum width or height Dimension d = new Dimension(0, 0); // Iterate over all vertices Iterator it = vertices.iterator(); while (it.hasNext()) { Dimension2D size = getSize(it.next()); // Update Maximum if (size != null) d.setSize(Math.max(d.getWidth(), size.getWidth()), Math.max(d .getHeight(), size.getHeight())); } return d; } COM: <s> obtains the maximum width or height dimension of any of the vertices in </s>
funcom_train/39470157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); if (!isEmpty()) { sb.append("State Number: "+stateNo); sb.append("\nStart State: "+startState); sb.append("\nFinal State: "+finalState); sb.append("\nAlphabet: "+alpha); sb.append("\nState transitions:"); for (int i = 0; i<stateNo; i++) { sb.append("\n"+i+":"+states[i]); } } else { sb.append("Empty RTS"); } return new String(sb); } COM: <s> returns a string representation of this rts </s>
funcom_train/1064081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasLibrary(String libName) { boolean found = false; Iterator it = getUml2Model().getImportedPackages().iterator(); while (it.hasNext() && !found) { org.eclipse.uml2.uml.Package currentLibrary = (org.eclipse.uml2.uml.Package) it.next(); if (libName.equals(currentLibrary.getName())) { found = true; } } return found; } COM: <s> check if the library is imported in the model </s>
funcom_train/5392014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAliases(XStream xstream) { if (aliases != null) { Iterator it = aliases.keySet().iterator(); while(it.hasNext()) { String alias = (String) it.next(); try { Class clazz = Class.forName((String) aliases.get(alias)); xstream.alias(alias, clazz); } catch (ClassNotFoundException e) { log.error(e); log.error("class " + aliases.get(alias) + " not found for xstream alias"); } } } } COM: <s> adds the aliases configured for this processor to the xsteam configuration to use </s>
funcom_train/43245179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpStreetAddr1() { System.out.println("getEmpStreetAddr1"); EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); String expResult = ""; String result = instance.getEmpStreetAddr1(); 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 emp street addr1 method of class org </s>
funcom_train/40418743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAlternateUrl(String contentid){ String url = null; String obj_type = contentid.split("\\.")[0]; if(obj_type != null){ //try to get a specific URL for the objecttype url = conf.getString(CRConfig.ADVPLR_HOST + "." +obj_type); } if(url == null){ //if we didn't get a specific URL take the generic one url = conf.getString(CRConfig.ADVPLR_HOST); } return url + contentid; } COM: <s> get the alternate url for the request </s>
funcom_train/32634422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFlowBlock(FlowBlock flowBlock) { if (this.flowBlock != flowBlock) { this.flowBlock = flowBlock; StructuredBlock[] subs = getSubBlocks(); for (int i=0; i<subs.length; i++) { if (subs[i] != null) subs[i].setFlowBlock(flowBlock); } } } COM: <s> set the flow block of this block and all sub blocks </s>
funcom_train/51537928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lInsert(char data[], int offset, int length, int position) { if (data == null) { return; // -au } if (position <= cursor.index) { cursor.index += length; cursor.option = Text.PAINT_USE_CURSOR_INDEX; } myInfo.isModified = true; setVerticalScroll(); lRequestPaint(); } COM: <s> notifies l amps f of a character insertion in the corresponding </s>
funcom_train/45018170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupShapes(boolean hasCenter) { if (hasCenter) { shapes = new ITool[] { box, oval, line, xLine, yStrip, arc, doubleArc, annulus, singleStrip, doubleStrip, levelFilter, freePaint, paintTin }; } else { shapes = new ITool[] { box, oval, line, xLine, yStrip, levelFilter, freePaint, paintTin }; } } COM: <s> adds the shapes to the available tools list </s>
funcom_train/45311190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Grammar parseDoc(IDocument doc, IFile file) throws CoreException { cManager.clearTodos(); Grammar grammar = JSGFParserMediator.parse(doc.get(), cManager); CompilationUnit cUnit = compUnits.getCUnitForFile(file); if (cUnit != null) { cUnit.setGrammar(grammar); compUnits.buildReferences(cUnit); semanticErrorManager.findErrors(cUnit); } showErrors(grammar, file); return grammar; } COM: <s> parse a document and return the grammar model </s>
funcom_train/2918702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIncompleteSemanticHoistedContext() throws Exception { ErrorQueue equeue = new ErrorQueue(); ErrorManager.setErrorListener(equeue); Grammar g = new Grammar( "parser grammar t;\n"+ "a : b | B;\n" + "b : {p1}? B | B ;"); String expecting = ".s0-B->:s1=>1\n"; checkDecision(g, 1, expecting, new int[] {2}, new int[] {1,2}, "B", new int[] {1}, null, 3); } COM: <s> the following grammar should yield an error that rule a has </s>
funcom_train/26325803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addGyro() { if (getEmptyCriticals(LOC_CT) < 4) { return false; } addCompactGyro(); addCritical(LOC_CT, 5, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_GYRO)); addCritical(LOC_CT, 6, new CriticalSlot(CriticalSlot.TYPE_SYSTEM, SYSTEM_GYRO)); setGyroType(GYRO_STANDARD); return true; } COM: <s> add the critical slots necessary for a standard gyro </s>
funcom_train/4919874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddExternalManagedObject() { Change<ExternalManagedObjectModel> change = this.operations .addExternalManagedObject("OBJECT", String.class.getName()); this.assertChange(change, null, "Add external managed object OBJECT", true); change.apply(); assertEquals("Incorrect target", this.model.getExternalManagedObjects() .get(0), change.getTarget()); } COM: <s> ensures that can add an </s>
funcom_train/15548322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getWebNavigatorTextField() { if (webNavigatorTextField == null) { webNavigatorTextField = new JTextField(); webNavigatorTextField.setBorder(BorderFactory.createLineBorder(Color.gray, 1)); webNavigatorTextField.setFont(new Font("Dialog", Font.BOLD, 10)); } return webNavigatorTextField; } COM: <s> this method initializes web navigator text field </s>
funcom_train/32979356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMinimumSize() { /* getMinimumSize */ int width= (int)(MIN_CANVAS_WIDTH*(0.95+(mae.hps.nHP_E/50))); return(new Dimension(width, MIN_CANVAS_HEIGHT)); } /* getMinimumSize */ COM: <s> get minimum size get the minimum preferred size </s>
funcom_train/48601993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(FacesContext context, UIComponent component, Object value) { String valueStr = null; try { valueStr = (String)value; } catch (Exception e) { throw new FacesException("RegexValidator can only be attached to component UIInput."); } if (!Pattern.matches(regex, valueStr)) { if (this.errorMsg == null) { this.errorMsg = DEFAULT_ERROR_MESSAGE; } FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, this.errorMsg, this.errorMsg); throw new ValidatorException(message); } } COM: <s> main method to implement for code validator code </s>
funcom_train/44588967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formatDirTree(File dir, CodeFormatter codeFormatter) { File[] files = dir.listFiles(); if (files == null) return; for (int i = 0; i < files.length; i++) { File file = files[i]; if (file.isDirectory()) { formatDirTree(file, codeFormatter); } else if (Util.isJavaLikeFileName(file.getPath())) { formatFile(file, codeFormatter); } } } COM: <s> recursively format the java source code that is contained in the </s>
funcom_train/28757498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFooterbackground(String newVal) { if ((newVal != null && this.footerbackground != null && (newVal.compareTo(this.footerbackground) == 0)) || (newVal == null && this.footerbackground == null && footerbackground_is_initialized)) { return; } this.footerbackground = newVal; footerbackground_is_modified = true; footerbackground_is_initialized = true; } COM: <s> setter method for footerbackground </s>
funcom_train/18594124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComponentReference getWindowReference(Map newReferences) { String windowID = getAttribute(TAG_WINDOW); ComponentReference wref = null; if (windowID != null) { wref = resolver.getComponentReference(windowID); if (wref == null) wref = (ComponentReference)newReferences.get(windowID); } return wref; } COM: <s> reference id of this components parent window optional </s>
funcom_train/13993637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTransactionalWrite() throws Exception { if (pm.currentTransaction().isActive()) { pm.currentTransaction().rollback(); } try { pm.makePersistent(new MockPersistentIdentifiable()); fail("transaction is not active, but no exception was thrown"); } catch (JDOUserException expected) { } } COM: <s> tests that write operations must be executed in transactions </s>
funcom_train/17434469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void InteractionState1() { Widget w = new Widget(); w.setId("w"); manager.registerInteractionState(w, "state"); String result = manager.getLinkToPageSet("pageSetId", "linkObject", Arrays.asList(new String[] { }), null, null); assertEquals( "<a href=\"pageSetId?w=state\">linkObject</a>", result); } COM: <s> create a link with one interaction state and nothing else </s>
funcom_train/2898006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void installDefaults() { super.installDefaults(); setLeftChildIndent( ((Integer) UIManager.get("HorizontalRotateTree.topChildIndent")) .intValue()); setRightChildIndent( ((Integer) UIManager.get("HorizontalRotateTree.bottomChildIndent")) .intValue()); } COM: <s> installs additional ui configuration values of the code jhorizontal rotate tree code </s>
funcom_train/34898051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleRequest(Request request, IRequestErrorHandler errorHandler) { GWT.log("OtherUserListController.handleRequest", null); if (request instanceof OtherNonAdministrativeUsersRequest) this.handleOtherUsersListRequest((OtherNonAdministrativeUsersRequest)request, errorHandler); else errorHandler.handleRequestFailed(new CorraException(getErrorMessage())); } COM: <s> handles a request for a list of project summaries </s>
funcom_train/25504730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHorizontalPosition(int position) { final ScrollBar horizontalBar = this.canvas.getHorizontalBar(); if (horizontalBar != null && horizontalBar.isEnabled()) { final int viewWidth = (this.canvas.getClientArea().width - this.origin.x) / this.unit.x; horizontalBar.setSelection(clampPosition(position, this.width, viewWidth)); applyHorizontalSelection(horizontalBar, viewWidth); } } COM: <s> set the horizontal position </s>
funcom_train/41597076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void export (final Connection jdbc) throws IOException, SQLException { /* Start a transaction */ jdbc.setAutoCommit(false); /* Create the tables */ createTables(jdbc); /* Populate the tables */ populateTables(jdbc); jdbc.commit(); jdbc.setAutoCommit(true); } COM: <s> export the access database to the given sqlite jdbc connection </s>
funcom_train/48474892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParaOrderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Place_paraOrder_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Place_paraOrder_feature", "_UI_Place_type"), DtPackage.Literals.PLACE__PARA_ORDER, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the para order feature </s>
funcom_train/14660791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CheckBoxList getCheckBoxList() { if (checkBoxList == null) { checkBoxList = new CheckBoxList(); checkBoxList.setSymbolName(DGEConstants.POLICY_ERROR_NAMES.name); checkBoxList.setBorderTitle("Select Policies/Errors to Plot"); } return checkBoxList; } COM: <s> this method initializes check box list </s>
funcom_train/8685357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSelected(String name, File file) { if (selectors != null) { for (int i = 0; i < selectors.length; i++) { if (!selectors[i].isSelected(basedir, name, file)) { return false; } } } return true; } COM: <s> test whether a file should be selected </s>
funcom_train/48102250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showInitialMessages(){ // show initial values mainFrame.setTrackingButtonEnabled(true); mainFrame.setGPSData("0.0", "0.0"); mainFrame.setGPSStatus("<font color='red'>Offline</font>"); mainFrame.setTrackingResults("0", "0", "0", ""); mainFrame.setTrackingStatus("<font color='red'>Stopped</font>"); mainFrame.showTrackingDownloadIcon(false); this.downloadCounter = 0; this.logCounter = 0; } COM: <s> shows the default gps data and tracker messages </s>
funcom_train/39787850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testForeground() { NullComponent c = new NullComponent(); PropertyChangeEvaluator pce = new PropertyChangeEvaluator(); c.addPropertyChangeListener(pce); c.setForeground(new Color(0x12, 0x34, 0x56)); assertEquals(new Color(0x12, 0x34, 0x56), c.getForeground()); assertEquals(Component.PROPERTY_FOREGROUND, pce.lastEvent.getPropertyName()); } COM: <s> test code foreground code property </s>
funcom_train/14171752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveAll() throws Exception { final String value = "value"; final String key = "key"; // Add the entry Element element = new Element(key, value); store.put(element); // Check the entry is there element = store.get(key); assertNotNull(element); // Remove it store.removeAll(); // Check the entry is not there assertEquals(0, store.getSize()); element = store.get(key); assertNull(element); } COM: <s> tests removing all the entries </s>
funcom_train/40097726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prev(ActionEvent e) { Integer f = getFirst(); int first = f==null ? 0 : f; Integer r = getRows(); int rows = r==null ? 0 : r; first -= rows; if (first<0) { first = 0; } this.first = first; value = null; } COM: <s> the previous action event handler </s>
funcom_train/34707621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAmbulanceAvailable(Ambulance ambulance)throws SQLException { boolean available = false; String query="SELECT A.Status_Id FROM ambulance A WHERE A.Ambulance_ID=" + ambulance.getID(); ResultSet results=DBConnection.getConnection().getDBQuery(query); if(results.next()){ int status=results.getInt("Status_Id"); if(status==Ambulance.AMBULANCE_STATUS.AVAILABLE.getStatus()){ available = true; } } results.close(); return available; } COM: <s> checks if the ambulance specified has a status of available </s>
funcom_train/4233650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveImageRelativeToMouse(Point p) { int xDelta = p.x - mousePosition.x; int yDelta = p.y - mousePosition.y; int newOriginX = origin.x + xDelta; int newOriginY = origin.y + yDelta; setOrigin(newOriginX, newOriginY); } COM: <s> moves the image to the specified point relative to the previous mouse </s>
funcom_train/17395429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Move move(Square startSquare, Square endSquare) { Move move = InvalidMove.execute(); // Must Piece to be moved must be of the player's color if(squareContainsPlayersPiece(startSquare)) { move = executeMove(startSquare, endSquare); if(!move.getMoveType().equals(MoveType.INVALID)) { // Stores the Move into history moves.add(move); changePlayer(); if(isCheckMate(getCurrentPlayer())) { moves.add(CheckmateMove.execute()); } } } return move; } COM: <s> executes a move from given the starting and </s>
funcom_train/25290831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateData(GeometryUpdater updater) { int format = ((GeometryArrayRetained)this.retained).vertexFormat; if ((format & BY_REFERENCE) != 0 && isLiveOrCompiled() && !this.getCapability(ALLOW_REF_DATA_WRITE)) { throw new CapabilityNotSetException(Ding3dI18N.getString("GeometryArray81")); } ((GeometryArrayRetained)this.retained).updateData(updater); } COM: <s> updates geometry array data that is accessed by reference </s>
funcom_train/18837224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File downloadFile(String sourceFile) throws FileNotFoundException { File file = new File(sourceFile); if(file.exists() == false) try { throw new FileNotFoundException( "File " + sourceFile + " not found from host " + InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { } return file; } COM: <s> download a file from the remote server </s>
funcom_train/3103785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrderBy(String orderBy) { String oldorderBy = this.orderBy; this.orderBy = orderBy; try { propertyChangeSupport.firePropertyChange("orderBy", oldorderBy, orderBy); } catch(java.lang.NullPointerException npe) { } this.refresh(); } COM: <s> setter for property order by </s>
funcom_train/34564793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final byte[] b, final int s, final int e) { final int bs = e - s; if(size + bs > chars.length) { int ns = chars.length << 1; while(size + bs > ns) ns <<= 1; chars = Arrays.copyOf(chars, size + ns); } System.arraycopy(b, s, chars, size, bs); size += bs; } COM: <s> adds a partial byte array to the token </s>
funcom_train/31678057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemClear() { if (jMenuItemClear == null) { jMenuItemClear = new JMenuItem(); jMenuItemClear.setText("Clear View"); // Generated jMenuItemClear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(final java.awt.event.ActionEvent e) { jOutputPane.setText(""); } }); } return jMenuItemClear; } COM: <s> this method initializes j menu item </s>
funcom_train/15913350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getChildIndex(TreeItem parentItem, TreeItem item) { TreeItem[] children = parentItem.getItems(); for (int i = 0; i < children.length; i++) { if (children[i].equals(item)) { return i; } } return -1; } COM: <s> returns the index of the passed item as a child of the passed </s>
funcom_train/47414696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void finishToken(Token.Type type) { Token token = new Token(); token.setType(type); token.setLine(startLine); token.setColumn(startCol); token.setText(currentText.toString()); currentText.setLength(0); tokens.add(token); startLine = lineNumber; startCol = colNumber; } COM: <s> creates a new token using text buffered by </s>
funcom_train/25291052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPolygonOffset(float polygonOffset) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_OFFSET_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("PolygonAttributes10")); if (isLive()) ((PolygonAttributesRetained)this.retained).setPolygonOffset(polygonOffset); else ((PolygonAttributesRetained)this.retained).initPolygonOffset(polygonOffset); } COM: <s> sets the constant polygon offset to the specified value </s>
funcom_train/12906976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String padTo(String poString, int iNumberOfChars) { int iLen = iNumberOfChars - poString.length(); if (iLen > padding.length) { padding = new char[iLen]; Arrays.fill(padding, 0, iLen, ' '); } return poString.concat(String.copyValueOf(padding, 0, iLen)); } COM: <s> ensures the given string is the correct length </s>
funcom_train/19251484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int computeLowerIndex(int _lowerIndex, int _upperIndex) { //-- in case the retrieved (from preferences) lowerIndex is <=0, //-- or lowerIndex is not between 1 and upperIndex, we force it to 1 if ( !Math.between( 1, _lowerIndex, _upperIndex)) { return 1; } return( _lowerIndex); } COM: <s> retrieves the preferred lower index and checks that is value is correct </s>
funcom_train/21016670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cell getCell(IElement element, IComposite composite) { requireNotNull(element, "@require (element != null)"); requireNotNull(composite, "@require (composite != null)"); Cell result = null; for (Cell cell : _cells) { int elementIndex = cell.elementIndex; if ((elementIndex != -1) && (composite.get(elementIndex) == element)) { result = cell; break; } } return result; } COM: <s> returns the cell holding the given element </s>
funcom_train/43470674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String receiverList() throws ZXException { String receiverList; BOCollection colRcvr = quickFKCollection("im/rcvr", "", "+", "+,usrPrfle", false, null, "usrPrfle", false); if (colRcvr == null) { throw new ZXException("Unable to retrieve receivers for message"); } receiverList = colRcvr.col2String("usrPrfle", "", "; "); return receiverList; } COM: <s> construct receiver list for this msg </s>
funcom_train/11296692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean debug(JexlNode node) { start = 0; end = 0; if (node != null) { builder.setLength(0); this.cause = node; // make arg cause become the root cause JexlNode root = node; while (root.jjtGetParent() != null) { root = root.jjtGetParent(); } root.jjtAccept(this, null); } return end > 0; } COM: <s> seeks the location of an error cause a node in an expression </s>
funcom_train/44325675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initProcess() throws Exception { if (fProcess instanceof IInteractiveProcess) { Class contextType = fProcessDescriptor.getProcessContextType(); IInteractiveContext context = (IInteractiveContext) contextType .newInstance(); IInteractiveProcess process = (IInteractiveProcess) fProcess; process.setInteractiveContext(context); } } COM: <s> initializes a newly created process </s>
funcom_train/8200518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.resourcePool.clear(); this.colorsPool.clear(); this.resourcePool.clear(); } COM: <s> dispose the resource pool </s>
funcom_train/46573923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String suitableFileName(String fileName) { String fileNameMethod = fileName; boolean exists = false; int j=0; final File fi = new File(directory + "/" + fileNameMethod + ".txt"); exists = fi.exists(); while (exists) { j = j + 1; fileNameMethod = fileName + "(" + j + ")"; final File fiLoop = new File(directory + "/" + fileNameMethod + ".txt"); exists = fiLoop.exists(); } return(fileNameMethod + ".txt"); } COM: <s> generates an adequate filename </s>
funcom_train/45318159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AACCResponse doNotifyCampaignUpdated() throws IOException, RequestErrorException, RequestErrorException, DaemonErrorException, UnsupportedMessageException { UpdateCampaignMessage message = new UpdateCampaignMessage(); message.setCampaign(cboCampaigns.getSelectedItem().toString()); AACCResponse response = AdministrationPanelView.getDaemonSocket().send(message); return response; } COM: <s> notify the daemon that the campaign has been updated </s>
funcom_train/16695817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(short lineNumber, byte b1, byte b2, byte b3, byte b4) { int ico = this.currentInserter.offset; this.makeSpace(lineNumber, 4); this.code[ico++] = b1; this.code[ico++] = b2; this.code[ico++] = b3; this.code[ico ] = b4; } COM: <s> inserts bytes at the current insertion position </s>
funcom_train/34083562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sameLocation(Location loc, GeoPoint p) { if (loc==null || p==null) return false; return sameLocation(new GeoPoint((int)(loc.getLatitude()*1E6), (int)(loc.getLongitude()*1E6)), p); } COM: <s> checks whether the location is the same </s>
funcom_train/25865158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReplaceableObject searchFile(File file, String searchString, boolean matchcase) { try { LineFileObject replaceableObject = new LineFileObject(); replaceableObject.setFile(file); return searchFile(new FileInputStream(file), searchString, matchcase,replaceableObject); } catch (FileNotFoundException e) { e.printStackTrace(); } return null; } COM: <s> entry point to the line searcher </s>
funcom_train/36469806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionOnPenHeld(Point p) { tmpPt=displayToBase(p.x,p.y,tmpPt); mThread delThread=new mThread(new Runnable() { public void run() { tryDeleteReferencepoint(tmpPt); } }); delThread.start(); } COM: <s> pen held propose to delete closer reference point </s>
funcom_train/20875489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getPropertyFloat(String key, float defaultValue) { try { if (containsPropery(key)) return Float.parseFloat(getProperty(key)); if (iSaveDefaults) setProperty(key, String.valueOf(defaultValue)); return defaultValue; } catch (NumberFormatException nfe) { if (iSaveDefaults) setProperty(key, String.valueOf(defaultValue)); return defaultValue; } } COM: <s> returns float property </s>
funcom_train/22029312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Linear1DSet getLinear1DComponent(int i) { if (i == 0) return getX(); else if (i == 1) return getY(); else if (i < 0) { throw new ArrayIndexOutOfBoundsException("Negative component index " + i); } else { throw new ArrayIndexOutOfBoundsException("Component index " + i + " must be less than 2"); } } COM: <s> get the indexed component x is at 0 y is at 1 </s>
funcom_train/42203696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void gotoClosest() { long tt = date / 1000L, bestError = Long.MAX_VALUE, error; int i = 0; sIndex = i; ScheduleItem match; synchronized (queue) { Iterator<ScheduleItem> it = queue.iterator(); while (it.hasNext()) { // find the difference between date and time match = it.next(); error = Math.abs(match.getTime() / 1000L - tt); if (error < bestError) { bestError = error; sIndex = i; } i++; } } } COM: <s> goes to the closest match </s>
funcom_train/6471148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChartImageDefinition (ChartHolder ch, int width, int height, int type, String mimeType, int timeout) { if(width <= 0 || height <= 0){ throw new IllegalArgumentException("ChartImage with height or width <= 0 is illegal"); } this.chartHolder = ch; this.width = width; this.height = height; this.type = type; this.mimeType = mimeType; Calendar cal = new GregorianCalendar(); cal.add(Calendar.SECOND,timeout); this.timeoutTime = cal.getTime(); } COM: <s> constructor for chart image </s>
funcom_train/38757522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendFavorites(Document doc) { Element root = doc.getDocumentElement(); Element favElement = doc.createElement("favorites"); for (int i = 0; i < 6; i++) { if (favorites[i] != null) { Element fav = doc.createElement("favorite"); fav.appendChild(doc.createTextNode(favorites[i].getSite() .getName() + "::" + favorites[i].getName())); favElement.appendChild(fav); } } root.appendChild(favElement); } COM: <s> called by store creates and adds favorites element </s>
funcom_train/21850421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object prop) { super.setValue(prop); if (prop instanceof BevelBorderProperty) { BevelBorderProperty bp = (BevelBorderProperty) prop; m_type = bp.m_type; m_highlightOuter.setValue(bp.m_highlightOuter); m_highlightInner.setValue(bp.m_highlightInner); m_shadowOuter.setValue(bp.m_shadowOuter); m_shadowInner.setValue(bp.m_shadowInner); } else { assert (false); } } COM: <s> sets this border property to that of another bevel border property </s>
funcom_train/1942479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getDeactivateButton() { if (deactivateButton == null) { deactivateButton = new JButton(); deactivateButton.setBounds(new Rectangle(321, 150, 95, 26)); deactivateButton.setText("Deactivate"); deactivateButton.setEnabled(false); deactivateButton.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent e) { alarmTriggerTask.cancel(); deactivateButton.setEnabled(false); activateButton.setEnabled(true); hourComboBox.setEnabled(true); minuteComboBox.setEnabled(true); } }); } return deactivateButton; } COM: <s> this method initializes deactivate button </s>
funcom_train/35566899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAngleSmallest(Vector2D vec) throws NullVectorException { if (Geo2D.isNull(this) || Geo2D.isNull(vec)) throw new NullVectorException( "Can't calculate angle between null vectors"); return Math.acos(this.getScalarProduct(vec) / (Geo2D.length(this) * Geo2D.length(vec))); } COM: <s> calculates the smallest angle between this code vector2 d code and the </s>
funcom_train/3287268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FileBean getFileByDisplayName(final String fileDisplayName, String path, List fileList, Map zipFiles){ final String filePath = StringUtils.defaultString(path); return findFileByFilter(new FileBeanFilter(){ public boolean accept(FileBean aFile){ return fileDisplayName.equals( aFile.getDisplayName()) && FileItemHelper.pathEquals(filePath, StringUtils.defaultString(aFile.getPathInArchive()) ); } }, fileList, zipFiles); } COM: <s> this method looks up the first matching file bean </s>