__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40676001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocalApiVersionNoLongerSupported() { Set<String> localApiVersions = localVersion.getApiVersions(); Set<String> remoteApiVersions = remoteVersion.getApiVersions(); if (localApiVersions != null && remoteApiVersions != null) { if (localApiVersions.isEmpty()) { return false; } return Collections.disjoint(localApiVersions, remoteApiVersions); } else { return false; } } COM: <s> returns true if the server does not support any of the api </s>
funcom_train/810568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceFileRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PrecursorType_sourceFileRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PrecursorType_sourceFileRef_feature", "_UI_PrecursorType_type"), MzmlPackage.Literals.PRECURSOR_TYPE__SOURCE_FILE_REF, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the source file ref feature </s>
funcom_train/47435229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProperty(String key) throws CoreException, IOException { final Properties[] properties = getOrCreateProperties(); for (int i = 0; i < properties.length; i++) { if (properties[i] != null) { final String value = properties[i].getProperty(key); if (value != null) { return value; } } } return null; } COM: <s> gets the value for the key in all the properties files </s>
funcom_train/38308691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String execToString(ExpressionTuple expr, FormatHelper formatHelper) { Timestamp value = (Timestamp) expr.getObject().getValue(); Format format = formatHelper.getTimestampFormat(); if (format != null) { return format.format(value); } return value.toString(); } COM: <s> executes the to string operation </s>
funcom_train/11676886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFeature(String featureName, boolean isFeatureEnable) throws SAXException { MediatorProperty mp = new MediatorProperty(); mp.setName(featureName); if (isFeatureEnable) { mp.setValue("true"); } else { mp.setValue("false"); } explicityFeatures.add(mp); factory.setFeature(featureName, isFeatureEnable); } COM: <s> add a feature which need to set for the schema factory </s>
funcom_train/29545726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAssocSQLSelector(String sqlAssocSelector, int sqlAssocCount, String sqlAssocOrder, String sqlAssocComboSelector) { this.sqlAssocSelectTree = sqlAssocSelector; // Because the record ID is part of the select statement, the value is incremented. this.sqlAssocSelectCount = sqlAssocCount + 1; this.sqlAssocSelectOrder = sqlAssocOrder; this.sqlAssocComboSelectTree = sqlAssocComboSelector; } COM: <s> set the sql statement used to populate the associated records tree </s>
funcom_train/43245579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSecondMostRecentCareLocation() { System.out.println("getSecondMostRecentCareLocation"); PatientDataDG2Object instance = new PatientDataDG2Object(); String expResult = ""; String result = instance.getSecondMostRecentCareLocation(); 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 second most recent care location method of class org </s>
funcom_train/943253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { SystemRepository systemRepository = new SystemRepository(); if ("true".equals(systemRepository.getProperty("aim.enabled"))) { try { buildSession(); } catch (IOException e) { e.printStackTrace(); } catch (JaimException e) { e.printStackTrace(); } } } COM: <s> initialize the session manager </s>
funcom_train/107435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getJTextArea1() { if (jTextArea1 == null) { jTextArea1 = new JTextArea(); jTextArea1.setBounds(9, 163, 363, 89); jTextArea1.setWrapStyleWord(false); jTextArea1.setText(""); jTextArea1.setAutoscrolls(true); jTextArea1.setLineWrap(true); jTextArea1.setEnabled(false) ; } return jTextArea1; } COM: <s> this method initializes j text area1 </s>
funcom_train/586037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createComboType() { GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.horizontalSpan = 2; gridData.verticalAlignment = GridData.CENTER; comboType = new Combo( this, SWT.READ_ONLY ); comboType.setItems( new String[] { "Field customization", "Module extension", "Menu" } ); comboType.setLayoutData( gridData ); } COM: <s> this method initializes combo type </s>
funcom_train/29768624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTables(Connection connection, boolean ignoreErrors) { Set<IMessage> exceptionsToIgnore = new HashSet<IMessage>(Arrays .asList(new IMessage[] { JdbcErrors.TableAlreadyExists })); executeDDL(connection, ignoreErrors, IMapping.OpCreateTable, exceptionsToIgnore, true); } COM: <s> creates the tables according to our </s>
funcom_train/33388638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBoardConfigurationInvalidMove() { String resultString = ProtocolManager.getParser() .getBoardConfiguration(new BackgammonBoardImpl(), null, false, GameOverStatus.INVALID_MOVE); assertEquals( resultString, "2 1 0 1 0 1 0 1 0 1 5 0 0 1 3 0 0 1 0 1 0 1 5 1 5 0 0 1 0 1 0 1 3 1 0 1 5 1 0 1 0 1 0 1 0 1 2 0 0 0 0 0 1 1 11 "); } COM: <s> tests getting board configuration with invalid move for game over status </s>
funcom_train/15605981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSequence(int index, String label, ViewerSequence sequence, SwingRange range) { labelVector.add(index, label); dataVector.add(index, sequence); rangeVector.add(index, range); validateRange(); //this.fireTableStructureChanged(); } COM: <s> adds a sequence to this code default seq table model code </s>
funcom_train/36200615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ if (this instanceof AtomicCluster){ return "[" + ((AtomicCluster)this).getContent().toString() + "]"; }else{ StringBuilder stringRep = new StringBuilder(); Iterator<HierarchicalCluster> subClusters = ((ComposedHierarchicalCluster)this).iterator(); while (subClusters.hasNext()){ String[] lines = subClusters.next().toString().split("\n"); for (int i = 0; i < lines.length; i++){ stringRep.append("\n"); stringRep.append(" "); stringRep.append(lines[i]); } } return stringRep.toString(); } } COM: <s> hierarchical string representation </s>
funcom_train/10191065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EventLogger printException(Exception e, int level) { //ByteArrayOutputStream err=new ByteArrayOutputStream(); //e.printStackTrace(new PrintStream(err)); //return println("Exception: "+err.toString(),level); return println("Exception: "+ExceptionPrinter.getStackTraceOf(e),level); } COM: <s> logs the exception </s>
funcom_train/72010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() { assertEquals("Addition failed", DataHolderFactory.holder(20), DataHolderFactory.holder(12).add(DataHolderFactory.holder(8))); assertEquals("Addition failed", DataHolderFactory.holder(20), DataHolderFactory.holder(12.0).add(DataHolderFactory.holder(8.0))); } COM: <s> test of the add method </s>
funcom_train/13273826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Content getIcon(int maxWaitingDelay) throws IOException { File tempIconFile = OperatingSystem.createTemporaryFile("icon", ".png"); ImageIO.write(getIconImage(maxWaitingDelay), "png", tempIconFile); return new TemporaryURLContent(tempIconFile.toURI().toURL()); } COM: <s> returns the icon content matching the displayed view </s>
funcom_train/47867173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLength(int newSize) { int lengthOld = value.size(); int lengthNew = newSize; if (lengthOld == lengthNew) { // Nothing to change. return; } if (lengthOld < lengthNew) { // Append blank slots. for (int i = lengthOld; i < lengthNew; i++) { add(null); } } else { // Remove slots. for (int i = lengthOld; i < lengthNew; i++) { remove(lengthOld); } } } COM: <s> set the array size </s>
funcom_train/45078445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConceptRelationship getConceptRelationship() { // ConceptId source = new ConceptId(codeSystem_id, sourceConceptId); // ConceptId target = new ConceptId(codeSystem_id, targetConceptId); ConceptRelationship relation = new ConceptRelationship( new ConceptId(sourceConceptSystemId, sourceConceptCode), relationshipCode, getQualifiers(), new ConceptId(targetConceptSystemId, targetConceptCode)); return relation; } COM: <s> convert to the cts concept relation ship </s>
funcom_train/11706534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnd(int v) { if (Annotation_Type.featOkTst && ((Annotation_Type) jcasType).casFeat_end == null) this.jcasType.jcas.throwFeatMissing("end", "uima.tcas.Annotation"); jcasType.ll_cas.ll_setIntValue(addr, ((Annotation_Type) jcasType).casFeatCode_end, v); } COM: <s> setter for end sets ending of span of annotation </s>
funcom_train/8022932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stylizeFont(String font, int size) { for (int i = 0; i < Token.all.length; i++) { Style s = styles.getStyleForScanValue(Token.all[i].getScanValue()); StyleConstants.setFontFamily(s, font); StyleConstants.setFontSize(s, size); } setFont(new Font(font, Font.BOLD, size)); } COM: <s> set font and size </s>
funcom_train/43098113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object copyStereotype(Object source, Object ns) { if (!(source instanceof MStereotype)) { throw new IllegalArgumentException("source"); } if (!(ns instanceof MNamespace)) { throw new IllegalArgumentException("namespace"); } MStereotype st = (MStereotype) buildStereotype(null); ((MNamespace) ns).addOwnedElement(st); doCopyStereotype((MStereotype) source, st); return st; } COM: <s> copies a stereotype </s>
funcom_train/50345767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addOwnerName(String owner){ if (_ownerList.contains(owner)) return false; _ownerList.add(owner); log.debug("train (" +getName()+ ") add car owner "+owner); setDirtyAndFirePropertyChange (OWNERS_CHANGED_PROPERTY, _ownerList.size()-1, _ownerList.size()); return true; } COM: <s> add a owner name that the train will </s>
funcom_train/30075596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView onSubmit(Object command) throws ServletException { // the edited object Client client = (Client) command; // delegate the update to the Business layer getGpir().storeClient(client); return new ModelAndView(getSuccessView(), "clientId", Integer.toString(client.getId())); } COM: <s> method updates an existing code client code when the form is committed </s>
funcom_train/4526002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object resolvedCachedArgument(String beanName, Object cachedArgument) { if (cachedArgument instanceof DependencyDescriptor) { DependencyDescriptor descriptor = (DependencyDescriptor) cachedArgument; TypeConverter typeConverter = beanFactory.getTypeConverter(); return beanFactory.resolveDependency(descriptor, beanName, null, typeConverter); } else if (cachedArgument instanceof RuntimeBeanReference) { return beanFactory.getBean(((RuntimeBeanReference) cachedArgument).getBeanName()); } else { return cachedArgument; } } COM: <s> resolve the specified cached method argument or field value </s>
funcom_train/25540981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double round(double darg) { double dex = Math.log10(darg); int nex = (int) dex; darg = darg / Math.pow(10.0, nex); if (darg >= 5.0) { darg = 5.0; } else if (darg >= 2.0) { darg = 2.0; } else { darg = 1.0; } darg = darg * Math.pow(10, nex); return darg; } COM: <s> rounds the taus </s>
funcom_train/1831644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBooleanField(Event phoneEvent, int field) { if (phoneEvent.getPIMList().isSupportedField(field)) { if(phoneEvent.countValues(field) > 0) { return phoneEvent.getBoolean(field, 0) == true ? 1 : 0; } else { return 0; } } else { // TODO: log all unsupported fields, but only once return -1; } } COM: <s> gets the value of a boolean field </s>
funcom_train/9874111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPrediction (SegmentInfo currSeg, double startx, double endx) { double sign=1; if(currSeg.getDataMean() < 0) sign = -1; PredictionGraphNode predNode = new PredictionGraphNode(startx, endx, sign, currSeg.getType()); predNodes.add(predNode); this.addChild(predNode); } COM: <s> adds a window prediction to this node spanning from startx to endx coordinates </s>
funcom_train/8012213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameterKey(String pageParam) { // check to see if the param already exsists // yes: just return // no: add it if (_pageParamsKeys.indexOf(pageParam) != -1) { return; } else { // add pageParam to the _pageParamsKeys Vector _pageParamsKeys.addElement(pageParam); } } COM: <s> adds to a list of parameters to pass on during an add operation </s>
funcom_train/29655300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyReleased(KeyEvent e) { String text = ((JTextField) e.getSource()).getText(); if (text.length() > 0) { tabbedPane1.setTitleAt(tabbedPane1.getSelectedIndex(), text); } else { tabbedPane1.setTitleAt(tabbedPane1.getSelectedIndex(), UNTITLED_TAB_NAME); } } COM: <s> listener that updates tabs title </s>
funcom_train/10204704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String upDirectory(String directory) { String upDir = null; if (currDir != null) { // ignore the final separator int index = currDir.lastIndexOf(SEP_CHAR, currDir.length() -2); if (index > 0) { // make sure we include the trailing separator upDir = currDir.substring(0, index+1); } if (upDir.equals(URL_PREFIX)) { // we're back up to our fake root upDir = null; } } return upDir; } COM: <s> returns the url of the parent of the given directory </s>
funcom_train/49409253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(DC dc, InputStream stream) throws Exception { this.dc=dc; XMLReader parser = XMLReaderFactory.createXMLReader(XMLConstants.DEFAULT_PARSER_NAME); parser.setFeature("http://xml.org/sax/features/namespaces", true); parser.setContentHandler(this); parser.parse(new InputSource(stream)); } COM: <s> parses an input stream to populate the specified dc object </s>
funcom_train/34261308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrphansStale(FmmObject orphanCandidate) { if (orphanCandidate.isDiscussionTopicInstance()) { derivedStateManager.setDerivedStateContainerStale(orphanTopicsContainer, true); } else if (orphanCandidate.isWorkPackageInstance()) { derivedStateManager.setDerivedStateContainerStale(orphanWorkPackagesContainer, true); } else if (orphanCandidate.isWorkTaskLinkInstance()) { setOrphanTasksStale(); } } COM: <s> used for example on a remove operation </s>
funcom_train/12164425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRewriteAssetURLTextAsset() throws Exception { AssetGroup assetGroup = new AssetGroup("Default Group"); assetGroup.setProject(createProject("/base")); MarinerURL url = new MarinerURL("http://test.com:8080/this=that"); TextAsset asset = new TextAsset("TestText"); String expected = url.getExternalForm(); doRewriterTest(asset, assetGroup, url, expected); } COM: <s> test the rewriting with a text asset and complete url </s>
funcom_train/45845295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerContext(GameContext context, String methodName) { if (context == null || methodName == null) throw new IllegalArgumentException("Null parameter. context: " + context + ", methodName: " + methodName); m_registry.put(methodName, context); } COM: <s> a context may register multiple entry points </s>
funcom_train/13511392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyRowClickEvent(int clickCount, int mouseButton){ for(int i=0;i<tableViewListeners.size();i++){ ((TableViewListener) tableViewListeners.get(i)).rowClick(new MouseButtonEvent(clickCount, mouseButton)); } } COM: <s> notify to the table view listeners that user click on a row </s>
funcom_train/14400024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(ASCIIPrintStream pWriter) { Iterator<Entry<HeaderEntry, String>> iterator = this.iFields.entrySet().iterator(); while (iterator.hasNext()) { Entry<HeaderEntry, String> entry = iterator.next(); pWriter.print(entry.getKey().toString()); pWriter.print(": "); pWriter.print(entry.getValue().toString()); pWriter.print("\r\n"); } pWriter.print("\r\n"); } COM: <s> writes a header block to a stream </s>
funcom_train/32319500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateWarning(String from, int amount) { AIMBuddy aimbud = getBuddy(from); for (int i = 0; i < aimListeners.size(); i++) { try { aimListeners.get(i).handleWarning(aimbud, amount); } catch (Exception e) { e.printStackTrace(); } } } COM: <s> send warning event to all listeners </s>
funcom_train/50341831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameEditorPanel (Editor panel) { if (panelsList.size()==0) return; for (int i = 0; i<panelsList.size(); i++) { Object o = panelsList.get(i); if (o == panel) { JCheckBoxMenuItem r = (JCheckBoxMenuItem)panelsSubMenu.getItem(i); r.setText(panel.getTitle()); return; } } } COM: <s> rename an editor type panel in show panels sub menu </s>
funcom_train/44170274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckArgsNotNull() { try { this.dummyMethod(null, "notNull", null); Assert.fail("Should throw an IllegalArgumentException here!"); } catch (final IllegalArgumentException iae) { // ok Assert.assertTrue(iae.getMessage(), iae.getMessage().contains( "dummyMethod()")); } catch (final Exception e) { e.printStackTrace(); Assert .fail("Should never throw any other exception than IllegalArgumentException"); } } COM: <s> test method for </s>
funcom_train/45844078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void followBakedPath(String pathName) { CharacterBehaviorManager steering = m_context.getBehaviorManager(); steering.clearTasks(); steering.setEnable(true); AvatarContext ac = ((AvatarContext)m_context); LocationNode location = ac.goToNearestLocation(); if (location != null) steering.addTaskToBottom(new FollowBakedPath(pathName, location, m_context)); } COM: <s> follow a pre baked path </s>
funcom_train/32942264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView getSearchView(TransferSeedsCommand aCommand, PermissionCriteria aCriteria) { Pagination results = targetManager.searchPermissions(aCriteria); updateCommand(aCommand, aCriteria); int numberOfSeeds = siteManager.countLinkedSeeds(aCommand.getFromPermissionOid()); ModelAndView mav = new ModelAndView("permission-search"); mav.addObject("page", results); mav.addObject("seedCount", numberOfSeeds); mav.addObject(Constants.GBL_CMD_DATA, aCommand); return mav; } COM: <s> perform the search and build the results view </s>
funcom_train/43150811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { try { debugCode("executeUpdate("+quote(sql)+", "+autoGeneratedKeys+");"); throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT); } catch (Exception e) { throw logAndConvert(e); } } COM: <s> calling this method is not legal on a prepared statement </s>
funcom_train/48091073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { History.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { eventBus.fireEvent(new NavegarMenuEvent(History.getToken())); } }); // History.fireCurrentHistoryState(); eventBus = new HandlerManager(null); BuscadorUI buscadorUI = new BuscadorUI(); TablaUI tablaUI = new TablaUI(); new BuscadorPresenter(buscadorUI, eventBus); new TablaPresenter(tablaUI, eventBus); } COM: <s> this is the entry point method </s>
funcom_train/21924444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateHumanName(INakedNameSpace ns) { ns.getMappingInfo().setHumanName(generateHumanName((INakedModelElement) ns)); Iterator iter = ns.getOwnedMembers().iterator(); while (iter.hasNext()) { INakedModelElement mew = (INakedModelElement) iter.next(); if (mew instanceof INakedNameSpace) { updateHumanName((INakedNameSpace) mew); } else { mew.getMappingInfo().setHumanName(generateHumanName(mew)); } } } COM: <s> returns a camel case name wrapper with a generated plural </s>
funcom_train/35627256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processFeatures(Element features[]) { this.features.clear(); this.initializerIterator = null; for (int i = 0; i < features.length; i++) { this.features.put(features[i].uri, features[i]); } // received a set of features trigger the stream initialization Vector workingInitializers = new Vector(); Enumeration en = this.initializers.elements(); while (en.hasMoreElements()) { workingInitializers.addElement(en.nextElement()); } initializerIterator = workingInitializers.elements(); nextInitializer(); } COM: <s> start the feature chain </s>
funcom_train/3421843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasFeature(String feature, String version) { return (feature.equalsIgnoreCase("XS-Loader") && (version == null || version.equals("1.0")) || super.hasFeature(feature, version)); } // hasFeature(String,String):boolean COM: <s> test if the dom implementation supports a specific feature </s>
funcom_train/8436707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFloatArgument(String name, boolean necessary) { if(arguments.containsKey(name) || !name.matches("\\w+")) throw new IllegalArgumentException("Argument " + name + " already exists or is not valid"); arguments.put(name, new DirectArgument(DirectArgument.ARG_FLOAT)); if(necessary) necessaryArguments.add(name); } COM: <s> register a single precision floating point argument specifiable by name n </s>
funcom_train/38851646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateZMatrix(){ if( useCuda ){ zMatrix = MatrixOperations.matMultiplication(bMatrix, zMatrix); }else{ zMatrix = bMatrix.times(getzMatrix()); } getzMatrix().timesEquals(1.0 / zMatrix.getRowDimension()); calculatePointDistances(); calculateBMatrix(); } COM: <s> updates the matrix containing the points coordinates by the gutmman transformation </s>
funcom_train/1485591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractMessageProperty(Message resourceMessage, List<String> psNamespaces, String psPropertyName) { try { return messageUtils.extractConceptAsString(resourceMessage, psNamespaces, psPropertyName, true); } catch(Exception e){ //this is expected behaviour for properties not available in certain protocols logger.debug(e.getMessage()); } return null; } COM: <s> retrieve a property from the message handling any parsing xpath errors </s>
funcom_train/16578071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StylesPanel getTabStyle() { if (tabStyle == null) { tabStyle = new StylesPanel(this); tabStyle.setEnabled(false); tabStyle.addListener(new BeanListener() { public void beanValueChanged(Object value) { fireWizardComplete(isCorrectlyConfigured()); }; }); tabStyle.addFocusListener(new FocusAdapter() { public void focusGained(FocusEvent e) { refreshStyleTree(); } }); } return tabStyle; } COM: <s> this method initializes j panel6 </s>
funcom_train/44018438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String determineRotonym(String word) throws RotonymException { String result; char ch; boolean rotonymWord = true; StringBuffer bufferWord = new StringBuffer(); for (int i = 0; i < word.length(); i++) { try { ch = this.returnChar(word.charAt(i)); bufferWord.append(ch); } catch (RotonymException e) { rotonymWord = false; break; } } if (rotonymWord) { result = bufferWord.toString(); } else { throw new RotonymException(word + " is geen rotonym"); } return result; } COM: <s> converts the given word to its rotonym according to the concrete strategy </s>
funcom_train/9201061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runSimulation(int victims0, int fires0, String proyect) { //Inicialization LOGGER.info("Simulation beginning. Length = " + this.generator.params.LENGTH); //Simulation loop running this.simulateLoop(this.generator.params.LENGTH, victims0, fires0, proyect); LOGGER.info("End of simulation"); } COM: <s> runs the simulation with the specified number of victims and fires </s>
funcom_train/27674674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLoader( final String extension, final Class loaderClass ) { if ( loaderClass != null ) { // Check the retrieved class is an extension of a Loader if ( Loader.class.isAssignableFrom( loaderClass ) ) { loaders.insert( extension, loaderClass ); } else { throw( Alerts.fault( "Loader's must inherit from Loader class" ).culprit( "class", loaderClass ).mishap() ); } } } COM: <s> adds the specified loader to this builder </s>
funcom_train/810792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultArrayLengthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChromatogramType_defaultArrayLength_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChromatogramType_defaultArrayLength_feature", "_UI_ChromatogramType_type"), MzmlPackage.Literals.CHROMATOGRAM_TYPE__DEFAULT_ARRAY_LENGTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the default array length feature </s>
funcom_train/1458289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOverrideSectionSettings(boolean overrideSectionSettings) { if (!this.overrideSectionSettings && overrideSectionSettings) { // the value is changing from using the default settings to overriding them, // so create a local settings object that is initially identical to // the default this.setSectionSettings(this.getSection().getSettings().clone()); } this.overrideSectionSettings = overrideSectionSettings; } COM: <s> sets a value indicating whether or not this voice section will override </s>
funcom_train/25382544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setError(AbstractJobTask jobTask, ErrorSummary error) throws UniversalWorkerException { if (Util.isSet(jobTask) && Util.isSet(error)) { this.tasksMap.get(jobTask.getJobTaskId()).setError(error); } else { throw new UniversalWorkerException(Status.CLIENT_ERROR_NOT_FOUND, "The job does not exist."); } } COM: <s> set the error </s>
funcom_train/32191013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(Object key, ComponentHandler componentHandler) { if (log.isInfoEnabled()) { log.debug("Adding '" + componentHandler.getClass() + "' to registry under key '" + key + "'."); } this.componentHandler.put(key, componentHandler); } COM: <s> register a component handler instance for a key generally a class </s>
funcom_train/19454924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String computePackageName() { String s, prefix, answer, className; int index; s = this.getClass().getName(); index = s.indexOf(getDomainPkgSuffix()); prefix = s.substring(0, index); className = s.substring(s.lastIndexOf('.') + 1); answer = prefix + getBrokerPkgSuffix() + "." + className + getBrokerSuffix(s); return answer; } COM: <s> computes a two or three tier broker package name </s>
funcom_train/29000793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char getNextButtonMnemonic(String buttonText) { char[] bt = buttonText.toUpperCase().toCharArray(); for (int x = 0; x < bt.length; x++) { if (!mnec.contains(Character.toString(bt[x])) && bt[x] != ' ') { mnec.add(Character.toString(bt[x])); return bt[x]; } } return ' '; } COM: <s> h2 code get next button mnemonic code h2 </s>
funcom_train/42347520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectionLost() { setState(STATE_LISTEN); // Send a failure message back to the Activity Message msg = mHandler.obtainMessage(BluetoothInterfaceActivity.MESSAGE_TOAST); Bundle bundle = new Bundle(); bundle.putString(BluetoothInterfaceActivity.TOAST, "Device connection was lost"); msg.setData(bundle); mHandler.sendMessage(msg); } COM: <s> indicate that the connection was lost and notify the ui activity </s>
funcom_train/45249815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshSelection() { Iterator iter = items.iterator(); while (iter.hasNext()) { MenuItem next = (MenuItem) iter.next(); if (!next.isDisposed()) { next.setSelection(isEqual(data.getState(), next.getData())); } } } COM: <s> refreshes the selected menu items to match the current state of the model </s>
funcom_train/17489635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Simplex get(Simplex s) { int hash = s.hashCode(); int index = hash & mask; int reprobe_index = index; do { Simplex si = table[reprobe_index]; if (si == null) // it's a miss return null; if (si.seq(s)) // it's a hit return si; reprobe_index++; if (reprobe_index >= mask) reprobe_index = 0; } while (reprobe_index != index); // we checked everything return null; } COM: <s> get the interned version of the simplex s </s>
funcom_train/4363875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getProcessingTime() { long result = 0; Container[] children = findChildren(); if (children != null) { for( int i=0; i< children.length; i++ ) { result += ((StandardWrapper)children[i]).getProcessingTime(); } } return result; } COM: <s> gets the cumulative processing times of all servlets in this </s>
funcom_train/29361734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXtend() throws Exception { System.setProperty("java.protocol.handler.pkgs", "gf.sandbox.protocols"); logger.info("java.protocol.handler.pkgs: " + System.getProperty("java.protocol.handler.pkgs")); URLConnection conn = new URL("xtend:http://user:password@www.x.com/mp3.mp3").openConnection(); logger.info("Instanceof EnhancedURLConnection: " + (conn instanceof EnhancedURLConnection)); assertTrue(conn instanceof EnhancedURLConnection); } COM: <s> see if gf </s>
funcom_train/28152098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveCommands(Expr globalFacts) throws Err { ConstList<Sig> exactSigs = ConstList.make(world.exactSigs); for(int i=0; i<commands.size(); i++) { Command cmd = commands.get(i); cmd = resolveCommand(cmd, exactSigs, globalFacts); commands.set(i, cmd); } } COM: <s> each command now points to a typechecked expr </s>
funcom_train/26440912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(){ // System.out.println("Actually deleting " + this); if (deleted) return; deleted = true; if (myBrain != null){ if (myBrain instanceof AbstractAgent) getStructure().getAgent().doKillAgent((AbstractAgent) myBrain); else myBrain.delete(); } super.delete(); } COM: <s> delete an entity and its brain if there is one </s>
funcom_train/24350873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IChainedToken delete(int index) { if (!toElement(index)) return null; IChainedToken oldToken = fCurrent; fCurrent = (IChainedToken) oldToken.getNext(); chain(oldToken.getPrevious(), fCurrent); fSize -= 1; fLength -= oldToken.getLength(); oldToken.setNext(null); oldToken.setPrevious(null); return oldToken; } COM: <s> deletes the token at a specified index </s>
funcom_train/44385394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Module createModule(String name, String path) { Module result = new Module(); result.setProject(getProject()); result.setTaskName(getTaskName()); result.setName(name); result.setPath(path); result.addAttribute(ModuleSetPropertyGenerator.MODULE_SET, set); result.addAttribute(CompilePropertyGenerator.COMPILE_CLASSES, path + "/classes"); return result; } COM: <s> create a virtual module </s>
funcom_train/48404492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addFocusChangedHandler(com.smartgwt.client.widgets.events.FocusChangedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.FocusChangedEvent.getType()) == 0) setupFocusChangedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.FocusChangedEvent.getType()); } COM: <s> add a focus changed handler </s>
funcom_train/32144642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getLangres(I18nKey key, String locale, Object... params) { I18n i18nResolver = OperationContext.getOperationContext().getI18nResolver(); if (i18nResolver != null) { return i18nResolver.langres(key, locale, params); } else { throw new InstallerRuntimeException(InstallerRuntimeException.MISSING_I18N); } } COM: <s> returns an i18n ed text for the given key locale and parameters </s>
funcom_train/14077351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLDelegate createXMLDelegate() { XMLDelegate delegate = new XMLDelegate(id); delegate.setValue("name", this.getColonSeparatedDisplay()); delegate.setValue("parent", Integer.toString(((Category) this.parent).id)); return delegate; } COM: <s> create an xmldelegate object based on this category object </s>
funcom_train/31363097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { if (startPoint.isValid()) { endPoint.projectionStoE(e.getX(), e.getY(), model.getSOrigin(), model.getSMax()); if (endPoint.isValid()) { model.translate(startPoint, endPoint); } } } COM: <s> called when a used drag the mouse on the hyperbolic tree </s>
funcom_train/17009398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt(byte[] marshalledBytes) throws MarshallingException { ByteArrayInputStream baInputStream = new ByteArrayInputStream( marshalledBytes); DataInputStream din = new DataInputStream(new BufferedInputStream( baInputStream)); if (marshalledBytes == null) { throw new NullPointerException("Specified byte[] is null."); } try { int value = din.readInt(); return value; } catch (IOException ioe) { throw new MarshallingException("Problems un-marshalling int. " + ioe.getMessage()); } } COM: <s> this method converts a code byte code into an code int code </s>
funcom_train/21936938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue() { if (isEmpty()) { return null; } final StringBuffer v = new StringBuffer(); if (applicationId != null) { v.append(applicationId); } if (serviceId != null) { v.append(serviceId); } if (logicalTerminal != null) { v.append(logicalTerminal); } if (sessionNumber != null) { v.append(sessionNumber); } if (sequenceNumber != null) { v.append(sequenceNumber); } return v.toString(); } COM: <s> gets the fixed length block 1 value as a result of </s>
funcom_train/50688079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Shortcut hShortcut_next) { if (hShortcut_next.m_hShortcut_next != null) { throw new IllegalArgumentException("only one shortcut can be added"); } hShortcut_next.m_hShortcut_next = m_hShortcut_next; m_hShortcut_next = hShortcut_next; } COM: <s> adds a shortcut to this shortcut </s>
funcom_train/29271338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ByteBuffer getSource(String source){ ByteBuffer result = null; String uri = null; int stream = 0; if((source != null)&&(!source.equals("null"))){ if(source.startsWith("<uri>")){ uri = source.substring(5, source.length()-6); } else if(source.startsWith("<stream>")){ String streamstr = source.substring(8, source.length()-9); stream = new Integer(streamstr).intValue(); }else { result = getLayerStream(source); if(result!=null){ return result; } uri = source; } if(uri!=null){ try{ byte[] b = getFile(uri); result = ByteBuffer.wrap(b); result.position(getPosition(source)); }catch (Exception e) { result = null; } } else { result = getStream(stream); } } return result; } COM: <s> get source retrieves a data source based on the source name </s>
funcom_train/49017405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StackItem getStackItem(int index) { if (alItems.size() == 0) { return null; } if (index < alItems.size()) { return alItems.get(index); } else if (index < (alItems.size() + alPlanned.size())) { return alPlanned.get(index - alItems.size()); } else { return null; } } COM: <s> return right stack item in normal or planned stacks </s>
funcom_train/5347021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRandomRejected() { _currentConnection = new TestConnection("GNUTELLA"); try { _currentConnection.initialize(); fail("connection should not have been accepted"); } catch(Exception e) { } _currentConnection = new TestConnection("CONNECT"); try { _currentConnection.initialize(); fail("connection should not have been accepted"); } catch(Exception e) { } _currentConnection = new TestConnection("RANDOM"); try { _currentConnection.initialize(); fail("connection should not have been accepted"); } catch(Exception e) { } } COM: <s> test to make sure that random connection strings are rejected </s>
funcom_train/46619918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logException(Throwable error) { getMessageTextArea().append(lineSeparator + "BUILD FAILED" + lineSeparator); if (error instanceof BuildException) { getMessageTextArea().append(error.toString()); Throwable nested = ((BuildException) error).getException(); if (nested != null) { nested.printStackTrace(System.err); } } else { error.printStackTrace(System.err); } } COM: <s> outputs an exception </s>
funcom_train/16411219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActiveFrame(becta.viewer.framework.Frame frame){ if(frame != activeFrame){ if(activeFrame != null) activeFrame.getCanvas().getDocument().getCurrentPage().dispose(false); //removes currently showing frame from desktop desktop.removeAll(); desktop.repaint(); //adds new frame activeFrame = frame; desktop.add(activeFrame, BorderLayout.CENTER); desktop.validate(); fireFileChange(activeFrame); frame.load(false); frame.loadComplete(); } } COM: <s> sets active theme </s>
funcom_train/2587421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { final StringBuffer message = new StringBuffer(String.valueOf(super.getMessage())); message.append(" [Location: Line="); message.append(this.line); message.append(" Column="); message.append(this.column); message.append("] "); return message.toString(); } COM: <s> modifies the message to give more detailed location information </s>
funcom_train/5382310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resize() { IEntry[] old = table; table = new IEntry[old.length * 2]; for (int i = 0; i < old.length; i++) { IEntry next = old[i]; while (next != null) { IEntry entry = next; next = next.getNext(); int index = indexFor(entry.getKey()); entry.setNext(table[index]); table[index] = entry; } old[i] = null; } threshold = (int) (table.length * loadFactor); } COM: <s> resizes this hash table by doubling its capacity </s>
funcom_train/36643002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int addPattern(int[] pattern) { for (int i = 0; i < patternCount; i++) { if (comparePatterns(patterns[i], pattern)) { weights[i] += 1.0; return i; } } if (isInvariant(pattern)) { invariantCount++; } int index = patternCount; patterns[index] = pattern; weights[index] = 1.0; patternCount++; return index; } COM: <s> adds a pattern to the pattern list </s>
funcom_train/19827285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf (Component comp) { int max = getModel().size(); TabDataModel mdl = getModel(); for (int i=0; i < max; i++) { if (getComponentConverter().getComponent(mdl.getTab(i)) == comp) { return i; } } return -1; } COM: <s> get the index of a component </s>
funcom_train/35812147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean mapCategory(Message msg) { boolean result = false; if (msg != null && msg.getCategory() != null) { // get current message category MessageCategory msgCategory = msg.getCategory(); // get persistent category MessageCategory persistentCategory = getOrInsertCategory(msgCategory .getName()); if (persistentCategory != null && persistentCategory.isPersistent()) { // replace message category with persistent one msg.mapperSetCategory(persistentCategory); result = true; } } return result; } COM: <s> maps given category to its database representation </s>
funcom_train/50926271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void annotateSpaceGroupMultiplicities() { if (molecule != null && symmetry != null) { List<CMLAtom> atoms = molecule.getAtoms(); for (CMLAtom atom : atoms) { Point3 xyzFract = atom.getXYZFract(); if (xyzFract != null) { int mult = symmetry.getSpaceGroupMultiplicity(xyzFract); if (mult > 1) { CMLScalar scalar = new CMLScalar(mult); scalar.setDictRef(DICT_MULTIPLICITY); atom.appendChild(scalar); } } } } } COM: <s> find multiplicities for all atoms </s>
funcom_train/29397139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean align(int a) { // skips to the next multiple of 'a' bytes if (a <= 0) return false; if (a == 1) return true; int temp = current + (a - (current % a)) % a; if (temp > size) return false; current = temp; return true; } COM: <s> moves the file pointer to the next higher multiple of a </s>
funcom_train/46575419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void declareBean(String name, Object object, Class<?> class1) throws AppToyException { try { getManager().declareBean(name, object, class1); } catch (BSFException e) { log.warning(String.format(Messages.getString("BSFProcessor.Bean%Name%%Class%cannotbedeclared"), name,class1.getName())); //$NON-NLS-1$ } } COM: <s> p declares a bean which is accessible for the script </s>
funcom_train/50768747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean declaredInSource(Concern c,String src){ /* Sourcefile format: C:/Program Files/ComposeStar/... */ String source = src; TypeLocations locations = TypeLocations.instance(); PlatformRepresentation repr = c.getPlatformRepresentation(); if(repr instanceof Type){ Type type = (Type)repr; if(type.IsNestedPrivate || type.IsNestedPublic){ /* undecided yet, safety first */ return true; } String location = locations.getSourceByType(type.FullName); if(location!=null){ if(location.equals(source)) return true; } } else { /* undecided yet, safety first */ return true; } return false; } COM: <s> returns true if concern is possible declared in a sourcefile </s>
funcom_train/41157651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSpeechComponents() { speechModule = SpeechModule.getInstance(); commandListener = new CustomRuleListener(); dictateListener = new CustomDictateListener(); audioListener = new CustomAudioListener(); speechModule.addAudioListener(audioListener); speechModule.setRuleListener(commandListener); } COM: <s> initializes the speech components </s>
funcom_train/8581200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInInterval(C o) { if (null == lower || null == upper) { return false; } boolean in = true; if (isLowerInclusive()) { in = lower.compareTo(o) <= 0; } else { in = lower.compareTo(o) < 0; } if (in) { if (isUpperInclusive()) { in = upper.compareTo(o) >= 0; } else { in = upper.compareTo(o) > 0; } } return in; } COM: <s> returns code true code if the specified object is between the end </s>
funcom_train/6349208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList convertDirectoriesToFileGlobs() { ArrayList fileGlobsToAdd = new ArrayList(); Iterator inputDirIter = inputDirectories.iterator(); while (inputDirIter.hasNext()) { File inputDir = (File)inputDirIter.next(); for (int i=0;i<extensions.length;i++) { fileGlobsToAdd.add(inputDir.getAbsolutePath() + File.separator + "*." + extensions[i]); } } return fileGlobsToAdd; } COM: <s> converts the directories held by this code options code object into </s>
funcom_train/22232199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SceneGraphPath pickAny( PickShape pickShape ) { if (universe == null) { throw new IllegalStateException(J3dI18N.getString("Locale4")); } PickInfo pickInfo = pickAny( PickInfo.PICK_BOUNDS, PickInfo.SCENEGRAPHPATH, pickShape); if(pickInfo == null) { return null; } return pickInfo.getSceneGraphPath(); } COM: <s> returns a reference to any item that is pickable below this </s>
funcom_train/46626824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRefXML(String elementName, String nameValue) throws SAXException { AttributesImpl atts = new AttributesImpl(); atts.addAttribute(xmlns, localName, "name", "String", nameValue); cm.startElement(xmlns, localName, elementName, atts); cm.endElement(xmlns, localName, elementName); } COM: <s> generates doc for following elements </s>
funcom_train/4758082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(String latex) { parseString = new StringBuffer(latex); len = parseString.length(); formula.root = null; pos = 0; spos = 0; line = 0; col = 0; group = 0; insertion = false; atIsLetter = 0; arrayMode = false; ignoreWhiteSpace = true; firstpass(); } COM: <s> reset the parser with a new latex expression </s>
funcom_train/43320896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean canFollow() { ISarosSession sarosSession = sessionManager.getSarosSession(); if (sarosSession == null) return false; int usersWithWriteAccessCount = 0; for (User user : sarosSession.getParticipants()) { if (user.isRemote() && user.hasWriteAccess()) usersWithWriteAccessCount++; } return usersWithWriteAccessCount == 1; } COM: <s> returns code true code if the follow mode button should be enabled </s>
funcom_train/14462109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForeColor(int t){ icvColorFlag = 0; icvColorFlag |= ((short)t); // icvColorFlag << (short)t;//(t<< 0x7F); // 20060310 KSC: Fix typo: icvColorFlag |= ((short)icvFore << 7); icvColorFlag |= ((short)icvBack << 7); this.updateColors(); } COM: <s> set the foreground color for this format </s>
funcom_train/11808266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkID(String id) { for (int i = 0; i < ID_PREFIX.length; i++) if (id.startsWith(ID_PREFIX[i])) { int number = Integer.parseInt( id.substring(ID_PREFIX[i].length()) ); currentID[i] = Math.max(currentID[i], number); break; } } COM: <s> checks if this id is possible </s>
funcom_train/21021284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateHorseStable(Horse horse) throws Exception { String statem = "UPDATE horse SET stableID="+horse.getStable().getStableID()+" WHERE horseID="+horse.getHorseID(); Connection con = makeConnection(); Statement sql = con.createStatement(); sql.executeUpdate(statem); sql.close(); con.close(); } COM: <s> method update horse stable it s for a change of a stable </s>