__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/36955823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IInformationControlCreator getOutlinePresenterControlCreator(ISourceViewer sourceViewer, final String commandId) { return new IInformationControlCreator() { public IInformationControl createInformationControl(Shell parent) { int shellStyle= SWT.RESIZE; int treeStyle= SWT.V_SCROLL | SWT.H_SCROLL; return new RubyOutlineInformationControl(parent, shellStyle, treeStyle, commandId); } }; } COM: <s> returns the outline presenter control creator </s>
funcom_train/19624461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TopicPublisher createTopicPublisher(final TopicSession topicSession, final Topic topic) throws JMSException { final String methodName = "createQueueSender()"; final TopicPublisher topicPublisher = topicSession.createPublisher(topic); logger.debug(methodName, " --- TopicPublisher has been succesfully created for destination topic: " + topic.getTopicName()); return topicPublisher; } COM: <s> creates topic publisher for destination topic </s>
funcom_train/1975700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeader(Object instance, String name, Object value) { if (this.headers.containsKey(name)) { try { this.headers.get(name).getWriteMethod().invoke(instance, value); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IllegalStateException(e); } } } COM: <s> set the header value for the specified instance </s>
funcom_train/14275282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VolumeSize getVFSVolumeSize(VolumeReference volRef) throws ConduitHandlerException, NotConnectedException { try { return jHotSync.getVFSVolumeSize(volRef); } catch (DLPFunctionCallException e) { throw new ConduitHandlerException(e.toString(), e); } // end-catch } // end-method COM: <s> retrieves the volume size information for the specified volume </s>
funcom_train/29287571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModifyConditionEventCommand (ConditionEvent conditionEvent, ConditionEvent newConditionEvent) { this.conditionEvent = conditionEvent; this.newConditionEvent = newConditionEvent; this.oldConditionEvent = (ConditionEvent)EcoreUtil.copy(conditionEvent); setLabel(Messages.getString("org.isistan.flabot.edit.ucmeditor.commands.model.ModifyConditionEventCommand.label")); //$NON-NLS-1$ } COM: <s> instantiates a command that modifies the properties of a condition event </s>
funcom_train/18310980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node addNode (String id) throws TGException { Node n = tgPanel.findNode(id); String name = id; if (name.length() == 0) { name = "(Default Package)"; } if (id.startsWith("=")) { IJavaElement element = JavaCore.create(id); name = element.getElementName(); } if (n == null) { n = new EclipseNode(id, name); tgPanel.addNode(n); } return n; } COM: <s> adds a node for the given id unless it already exists </s>
funcom_train/18141695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSuffixes(String set) { StringTokenizer ss = new StringTokenizer(set,","); if (ss.countTokens()==0) throw new IllegalArgumentException("need at least one suffix"); suffixes.clear(); while (ss.hasMoreTokens()) suffixes.add(ss.nextToken().trim()); } COM: <s> accessor suffixes as comma separated list </s>
funcom_train/4904737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshTargets(BackupManager monitor) { if (monitor.isCanceled()) return; monitor.subTask(Messages.getString("BackupGroup.RefreshingTargets")); //$NON-NLS-1$ for (String target : targets) { if (!monitor.refreshFileSystem(target)) { ConfigManager.getConfigManager().logError(target + Messages.getString("BackupGroup.ErrorTargetUnreachable")); //$NON-NLS-1$ } monitor.worked(1); } } COM: <s> refresh the targets used by this group </s>
funcom_train/14417921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder result = new StringBuilder(); for (int j = 0; j < sizeM; j++) { for (int i = 0; i <= j; i++) { if (i != 0) result.append(" "); result.append(String.format(Locale.US, "%1$5.10f", new Object[] { new Double(getItem(i, j)) } )); } result.append("\n"); } return result.toString(); } COM: <s> returns a multiline string containing all elements of the matrix </s>
funcom_train/8354743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disposeDecoder(IoSession session) { ProtocolDecoder decoder = (ProtocolDecoder) session .removeAttribute(DECODER); if (decoder == null) { return; } try { decoder.dispose(session); } catch (Throwable t) { LOGGER.warn( "Failed to dispose: " + decoder.getClass().getName() + " (" + decoder + ')'); } } COM: <s> dispose the decoder removing its instance from the </s>
funcom_train/1684145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String rollResultsToString(LinkedList<Integer> rolls){ StringBuffer res = new StringBuffer("["); for (Integer roll : rolls){ res.append(roll+", "); } res.replace(res.length()-2, res.length()-1, "]"); return res.toString(); } COM: <s> implementation of a to string method for a linked list integer object </s>
funcom_train/22105122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean parseRequiredBooleanParameter(HttpServletRequest request, String paramName) { boolean value; String param = request.getParameter(paramName); if (null != param) { value = Boolean.valueOf(param).booleanValue(); } else { throw requiredParamErr(paramName); } return value; } COM: <s> parse a required boolean parameter </s>
funcom_train/1557069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void restorePrintAccuracy() { useSignificantFigures = useSignificantFiguresList.pop().booleanValue(); int sigFigures = noOfSignificantFiguresList.pop().intValue(); int decDigits = noOfDecimalPlacesList.pop().intValue(); if (useSignificantFigures) setPrintFigures(sigFigures); else setPrintDecimals(decDigits); //Application.debug("list size"+noOfSignificantFiguresList.size()); } COM: <s> gets previous values of print acuracy from stacks </s>
funcom_train/3525215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueHolder(ValueHolder valueHolder) { if (valueHolder != null) valueHolder.removeChangeListener(valueHolderChangeListener); this.valueHolder = valueHolder; if (valueHolder != null) valueHolder.addChangeListener(valueHolderChangeListener); fireEnableChange( new EnableEvent(this, isChangeable())); } COM: <s> set the value holder which will store the selection </s>
funcom_train/50612752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deactivate() { // combinations are shared between actions, so they are just referenced // here inputObjects = null; parameter = null; // access modes are specific to each action, so they must be recicled for (int i = 0; i < accessModes.length; i++) accessModes[i] = Action.NOP; // for (int i = 0; i < outputObjects.length; i++) // outputObjects[i] = null; flagBidSet = false; funcModel = null; } COM: <s> deactivates this action leaving it ready to return to the pool </s>
funcom_train/36462930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OMElement writeHeader(Hashtable<QName, String> headers) { OMNamespace soapenv = fac.createOMNamespace( IConstants.SOAPENV_NS, "soapenv"); OMElement env = fac.createOMElement("Header", soapenv); OMElement header = null; OMText headerVal = null; for(QName qname : headers.keySet()) { header = fac.createOMElement(qname); headerVal = fac.createOMText(headers.get(qname)); header.addChild(headerVal); env.addChild(header); } return env; } COM: <s> create a soap header element that contains all the headers </s>
funcom_train/15607533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean withinRequiredRange(FeatureBean model) { // No sequence alignment implies that entire axis of features is required. if (mSequenceAlignmentRange == null) { return true; } // No range of restriction or alignment given. else { // Test that range contains the feature. return mSequenceAlignmentRange.contains(model.calculateFeatureRange()); } // Must discard features outside of range. } // End method COM: <s> tests whether the model provided falls within the range to which </s>
funcom_train/44623294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JCExpression makeNNInstanceof(JCExpression e, int epos, Type type, int typepos) { JCExpression e1 = makeTypeof(e); JCExpression e2 = makeTypeLiteral(type,typepos); //if (inSpecExpression) e2 = trSpecExpr(e2,null); JCExpression ee = treeutils.makeJmlBinary(epos,JmlToken.SUBTYPE_OF,e1,e2); return ee; } COM: <s> makes the equivalent of an instanceof operation typeof e type type </s>
funcom_train/8093528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getMinBorder(int attrIndex) throws Exception { if(!attribute(attrIndex).isNumeric()) throw new Exception("Exception.getMinBorder : not numeric attribute !"); if(numInstances() == 0) throw new Exception("Exception.getMinBorder : empty Exemplar !"); return m_MinBorder[attrIndex]; } COM: <s> returns the value of the inf border of the exemplar </s>
funcom_train/12190475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String removeProtocol(URL url) throws MessageException { if (url == null) { throw new MessageException(localizer.format( "message-url-null-invalid")); } String urlString = url.toExternalForm(); int index = urlString.indexOf("://"); return index == -1 ? urlString : urlString.substring(index + 3); } COM: <s> this converts a code url code into a string representation of that </s>
funcom_train/25546009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCriteriaField(String fieldId) { if (fieldId.equals(Resurses.CRITERIA_SURNAME)) { return this.surname.getText(); } else if (fieldId.equals(Resurses.CRITERIA_GIVENNAME)) { return this.givenname.getText(); } else if (fieldId.equals(Resurses.CRITERIA_PATRONYME)) { return this.patronyme.getText(); } return null; } COM: <s> get file contents </s>
funcom_train/46739363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrderTemplateRef(DisplayModel orderTemplateRef) { if (Converter.isDifferent(this.orderTemplateRef, orderTemplateRef)) { DisplayModel oldorderTemplateRef= new DisplayModel(this); oldorderTemplateRef.copyAllFrom(this.orderTemplateRef); this.orderTemplateRef.copyAllFrom(orderTemplateRef); setModified("orderTemplateRef"); firePropertyChange(String.valueOf(APPLICATIONCONTROLVALUES_ORDERTEMPLATEREFID), oldorderTemplateRef, orderTemplateRef); } } COM: <s> order associated with this control </s>
funcom_train/40107485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _writeOccurrence(final Occurrence occ, final boolean wantSemicolon) throws IOException { _writeSemicolon(wantSemicolon); _writeTopicRef(occ.getType()); _out.write(": "); _writeLiteral(occ); _writeScope(occ); _writeReifier(occ); } COM: <s> serializes the specified occurrence </s>
funcom_train/38858978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getVariance() { Double cv = this.cachedVariance; if(cv == null) { Variance variance = new Variance(); Map<YearMonth,Double> seriesMap = this.seriesMap; Collection<Double> valueSet = seriesMap.values(); int size = valueSet.size(); double[] values = new double[size]; int index = 0; for(Double y : valueSet) { // y is never NaN values[index++] = y; } cv = variance.evaluate(values); this.cachedVariance = cv; } return cv.doubleValue(); } COM: <s> calculates the variance of the series </s>
funcom_train/14229025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unHold(CallId call, String address, String terminal) throws MethodNotSupportedException, RawStateException, PrivilegeViolationException, ResourceUnavailableException { if (this.callControl != null) this.callControl.unHold(call, address, terminal); else throw new MethodNotSupportedException(); } COM: <s> un hold method comment </s>
funcom_train/33368201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addReader(int readerID) throws SQLException { if (!isReader(readerID)) { dbm.exec("insert into ACLReaders (aclID, readerID) " + "values ('" + getID() + "', '" + readerID + "')"); } } COM: <s> adds the specified group or user to the read list </s>
funcom_train/9827818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dtbConstructorParamsUpdated( Object[][] params ) { Object[] newValues = new Object[params.length]; for ( int ind = 0; ind < newValues.length; ++ind ) newValues[ind] = params[ind][1]; _constructorPanel.updateValues( newValues ); } // end method dtbConstructorParamsUpdated COM: <s> implementation of the constructor param listener interface to </s>
funcom_train/25314867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getBuildPosition(){ // Use a go to position. As target position use points on a circle to be // able to vary the direction units spawn at. Point result=null; Point position=getPosition(); double angle=((nQueriedBuildPosition%16)*0.0625*0.5+randomizer.nextFloat()*0.01)*Math.PI; ++nQueriedBuildPosition; Point target=new Point( position.x+(int)(Math.cos(angle)*1000.0), position.y+(int)(Math.sin(angle)*1000.0) ); result=getGoToPosition(target,30); if(result==null){ return getBlockedArea().getBBoxRightBottom(getPosition()); } else{ return result; } } COM: <s> this function returns the position at which units built by this building </s>
funcom_train/27664495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStudyTime(String d_str) { final String fn = "setStudyTime: "; DateFormat df = new SimpleDateFormat("HHmmss"); try { setStudyTime(df.parse(d_str)); } catch (ParseException e) { log.error(fn + "Bad time format - '" + d_str + "'"); e.printStackTrace(); } } COM: <s> sets the study time from a string </s>
funcom_train/494932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { for (int i = 0; i < this.getMenuCount(); i++) { JMenu menu = getMenu(i); if (menu.getText() != FILE_MENU && menu.getText() != OBSERVATIONS_MENU ) menu.setEnabled(openState.isOpen()); } open.setEnabled(! openState.isOpen()); // Do not allow open, if already open. super.paint(g); } COM: <s> override paint to allow pre setting of the menu enablements </s>
funcom_train/48475696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addCellOutHandler(com.smartgwt.client.widgets.grid.events.CellOutHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.CellOutEvent.getType()) == 0) setupCellOutEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.CellOutEvent.getType()); } COM: <s> add a cell out handler </s>
funcom_train/34538032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInternalOrderByField(String _field) { QueryFieldStructure p = new QueryFieldStructure(_field, "", "", "ORDERBY"); if (this.internalOrderBy == null) this.internalOrderBy = new Vector<QueryFieldStructure>(); this.internalOrderBy.addElement(p); } COM: <s> adds new field to the internal order by clause </s>
funcom_train/18456282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void s_connect_cnf() { try { System.out.println("connected to WAP gateway " + wapgw); System.out.println("sending data (WSP POST)"); m = s.s_post(bytes, contentType, posturi); } catch (Exception e) { e.printStackTrace(); } } COM: <s> implementation of iwspupper layer </s>
funcom_train/47184592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doesFamilyMemberHaveHighBP(FamilyMemberBean member) throws iTrustException { List<HealthRecord> records = hrDAO.getAllHealthRecords(member.getMid()); if(records.size() == 0) return false; for(HealthRecord record : records) { if(record.getBloodPressureSystolic() > 240 || record.getBloodPressureDiastolic() > 120 ) return true; } return false; } COM: <s> checks to see if a particular family member has high blood pressure </s>
funcom_train/14499732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected OdfDocument loadTemplate(Resource res) throws Exception { InputStream in = res.createInputStream(); OdfPackage pkg = null; try { pkg = OdfPackage.loadPackage(in); } finally { in.close(); } OdfMediaType odfMediaType = OdfMediaType.getOdfMediaType(pkg.getMediaType()); if (odfMediaType == null) { throw new IllegalArgumentException("Document contains incorrect ODF Mediatype '" + pkg.getMediaType() + "'"); } return newDocument(odfMediaType, pkg); } COM: <s> loads an open document from the given resource </s>
funcom_train/7625079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharSequence loadDescription(PackageManager pm) { if (nonLocalizedDescription != null) { return nonLocalizedDescription; } if (descriptionRes != 0) { CharSequence label = pm.getText(packageName, descriptionRes, null); if (label != null) { return label; } } return null; } COM: <s> retrieve the textual description of this permission </s>
funcom_train/39061934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doPrint() { if(clientSite == null) return; BusyIndicator.showWhile(clientSite.getDisplay(), new Runnable() { public void run() { clientSite.exec(OLE.OLECMDID_PRINT, OLE.OLECMDEXECOPT_PROMPTUSER, null, null); // note: to check for success: above == SWTOLE.S_OK } }); } COM: <s> print this objects contents </s>
funcom_train/39256242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BaseObjectCollection filterTasks(BaseObjectCollection aTasks, User aUser) throws Exception { BaseObjectCollection tasks = new BaseObjectCollection(); for(int i=0;i<aTasks.getCount();i++) { Task oTask = (Task)aTasks.getItem(i); Project oProject = (Project)Project.retrieve(oTask.projectid).getItem(0); if(aUser.hasPermissionsToViewTasks(oProject.versionid)) tasks.Add(aTasks.getItem(i)); } return tasks; } COM: <s> this filters a task collection based on permissions </s>
funcom_train/10617151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCertificateException06() { CertificateException tE = new CertificateException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code certificate exception string throwable code </s>
funcom_train/28168832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getClone(Figure f) { T value = get(f); try { return value == null ? null : (T) Methods.invoke(value,"clone"); } catch (NoSuchMethodException ex) { InternalError e = new InternalError(); e.initCause(ex); throw e; } } COM: <s> gets a clone of the value from the figure </s>
funcom_train/51107567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmployeeAddress() throws Exception { createTestData("testEmployeeAddress"); List addresses = context.performQuery(new SelectQuery(Address.class)); assertEquals(1, addresses.size()); Address address = (Address) addresses.get(0); assertSame(Employee.class, address.getToEmployee().getClass()); } COM: <s> tests that to one relationship produces correct subclass </s>
funcom_train/41829519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDuration() { if(duration == 0) { if(x == 0 && y == 0) { duration = (long)((rot / speed) * 1000000000); } else { int length = (int)Math.sqrt(x*x + y*y); duration = (long)((length / speed) * 1000000000); } } return duration; } COM: <s> converts a speed pixels per second into a duration in nanoseonds </s>
funcom_train/22847376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(E object, Rectangle box) { Rectangle2D box2D = new Rectangle2D.Double(box.x, box.y, box.width, box.height); int index = (objects.size() > 0) ? objects.lastKey() + 1 : 0; boxes.put(index, box2D); root.add(index, box); objects.put(index, object); } COM: <s> adds an object to the tree </s>
funcom_train/35896493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(553, 367); this.setJMenuBar(getBarramenu()); this.setResizable(false); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("icono/.JPG"))); this.setContentPane(getJContentPane()); this.setTitle("JUEGO AHORCADO"); } COM: <s> this method initializes this </s>
funcom_train/37570842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEFSP(EFSP efsp) throws ModelException { try { Integer id = ((IntegerIdImpl)(efsp.getId())).integerValue(); EJBEFSP ejbefsp = m_EFSPHome.findByPrimaryKey(id); ejbefsp.remove(); } catch (Exception exception) { throw new ModelException("The EJBEFSPFacadeBean could not remove an EFSP entity bean for: " + efsp + "."); } } COM: <s> delete an efsp from the system </s>
funcom_train/12165291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteFormPreamble() throws Exception { final VolantisProtocol protocol = getProtocol(); MethodInvoker invoker = new MethodInvoker() { public void invoke() throws Exception { protocol.writeFormPreamble(getOutputBuffer(protocol)); } }; String expecting = getExpectedWriteFormPreambleResult(); ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting); } COM: <s> this method tests the method public void write form preamble </s>
funcom_train/8557442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFragment(String name, Reader reader, boolean persistent) { String file = null; try { } catch (Throwable t) { logger.error("DatabaseRegistryService: Could not create fragment: " + file, t); } finally { try { reader.close(); } catch (Exception e) { logger.error(e); // At least log the exception. } } } COM: <s> read and unmarshal a fragment in memory </s>
funcom_train/17492690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDefinedVariable(String name) { for (Link l = scopes; l != null; l = l.next) { if (l.scope.get(name) != Scope.NO_SUCH_KEY) { return true; } else if (l.cscope.get(name) != Scope.NO_SUCH_KEY) { return true; } } return false; } COM: <s> tests whether an entry is defined in this context </s>
funcom_train/9799494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginFileStructure() throws Exception { // reset all array Iterators Object value; Iterator values = vars.values().iterator(); while (values.hasNext()) { value = values.next(); if (value instanceof IArray) { ((IArray)value).getIterator(true); } } } COM: <s> begins the file structure </s>
funcom_train/36048429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFontMask(AttributeSet attr) { fontMask = 0; if (StyleConstants.isBold(attr)) { fontMask |= BOLD; } if (StyleConstants.isItalic(attr)) { fontMask |= ITALIC; } if (StyleConstants.isUnderline(attr)) { fontMask |= UNDERLINE; } } COM: <s> tweaks the appropriate bits of font mask </s>
funcom_train/2369339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (!this.looping && !this.iconAnim.isEmpty()) { if (this.iconAnim.size() == 1) { this.assigned.setIconImage(this.iconAnim.get(0)); } else { if (!this.running) { this.running = true; WizardEnvironment.execute(this); } } } } COM: <s> starts the animation </s>
funcom_train/38326299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object val) { if (val instanceof Collection) { Iterator itr = ((Collection)val).iterator(); while (itr.hasNext()) { MultiValue mv = (MultiValue)itr.next(); if (mv.getNegated()) { notEqualList.add(mv.getValue()); } else { equalsList.add(mv.getValue()); } } } } COM: <s> method will check to see if the object is a collection </s>
funcom_train/10866233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTurkish() throws Exception { Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "Turkish"); assertAnalyzesTo(a, "ağacı", new String[] { "ağaç" }); assertAnalyzesTo(a, "AĞACI", new String[] { "ağaç" }); } COM: <s> test turkish lowercasing </s>
funcom_train/26282476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskDescriptor getTaskDescriptorByName(String name, TaskDescriptor taskDesc) { TaskDescriptor old = (TaskDescriptor)taskDefinitionTable.put(name, taskDesc); if(old != null) { log.warn("Encountered duplicate task descriptor name '" + name + "'. Using most recent entry."); } return old; } COM: <s> returns any exsiting descriptor if found </s>
funcom_train/44011358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInterestList() { System.out.println("getInterestList"); MembershipBO instance = null; ArrayList<AreaOfInterestBO> expResult = null; ArrayList<AreaOfInterestBO> result = instance.getInterestList(); 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 interest list method of class edu </s>
funcom_train/13867845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(String name, String value) throws DOMNodeException { try { XMLParserImpl.setAttribute(this.getJsObject(), name, value); } catch (JavaScriptException e) { throw new DOMNodeException(DOMException.INVALID_MODIFICATION_ERR, e, this); } } COM: <s> this function delegates to the native method code set attribute code in </s>
funcom_train/31980778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchLocal(String communityId, SearchQuery query, String qid) { //use the one below to get responses with a DOM field tsWorker.searchWithDOM(communityId, query.getQuery(), qid); //searchResponseWorker.addQid(qid); for now not dealing with qids at this level.. otherwise I won't know when to purge these } COM: <s> perform local search on repository via core webadapter </s>
funcom_train/3481830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet getChannelDefAll() throws ChannelStoreException { // retrieve user details ResultSet rsChannelDefAll = null; try { rsChannelDefAll = this.selectChannelDefAll_PS.executeQuery(); } catch (Exception e) { throw new ChannelStoreException("Error fetching all queue definitions.\n" + e.toString()); } return rsChannelDefAll; } COM: <s> create a result set containing all the channel definitions </s>
funcom_train/38553011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTesting() { SubSystemID id = new SubSystemID("TestID"); SubSystemStatus status; status = new SubSystemStatus(id); status.setTesting(true); assertTrue("testing should be true", status.isTesting()); status.setTesting(false); assertTrue("testing should be false", !status.isTesting()); } COM: <s> test the testing parameters </s>
funcom_train/32773184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPresent(Locale locale, String key) { String message = getMessage(locale, key); if (message == null) return (false); else if ((!returnNull)&&message.startsWith("!")) return (false); // FIXME - Only valid for default implementation else return (true); } COM: <s> return code true code if there is a defined message for the specified </s>
funcom_train/5802592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeConnection() { org.apache.log4j.Category log = ThreadCategory.getInstance(this.getClass()); if (m_availConn != null) { try { m_availConn.close(); m_availConn = null; } catch (Throwable t) { log.warn( "initialize: an exception occured while closing the " + "JDBC connection", t); } } } COM: <s> closes the database connection </s>
funcom_train/13590455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAsPng(final String filename, final int width, final int height) { try { ChartUtilities.saveChartAsPNG(new File(filename), getChart(), width, height, null, true, 9); } catch (IOException e) { e.printStackTrace(); } } COM: <s> stores the chart as png image file </s>
funcom_train/45246748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldProporcaoF84() { if (jNumberFloatFieldProporcaoF84 == null) { jNumberFloatFieldProporcaoF84 = new JNumberFloatField(); jNumberFloatFieldProporcaoF84.setSize(new Dimension(65, 20)); jNumberFloatFieldProporcaoF84.setLocation(new Point(345, 153)); } return jNumberFloatFieldProporcaoF84; } COM: <s> this method initializes j number float field proporcao f84 </s>
funcom_train/33265628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSeparator() { /* THIS IS NOT LOOKING RIGHT... IS THIS LIKE WIN 95/NT? --Rich if (!separatorAdded) { SeparatorGadget sg = new SeparatorGadget(); sg.setVMargin( 2 ); sg.setHMargin( 10 ); buttonArea.add( "Center", sg ); separatorAdded = true; } */ } COM: <s> adds the separator gagdet if needed </s>
funcom_train/23271467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubtitlePaint(Paint paint) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument"); } Paint old = this.subtitle.getPaint(); this.subtitle.setPaint(paint); firePropertyChange("subtitlePaint", old, paint); } COM: <s> sets the paint for the charts subtitle and sends a </s>
funcom_train/23411186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStateFormulaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Negation_stateFormula_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Negation_stateFormula_feature", "_UI_Negation_type"), OMPackage.Literals.NEGATION__STATE_FORMULA, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the state formula feature </s>
funcom_train/50336470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calculateLoops() { if (this._minLoops != this._maxLoops) { Random r = new Random(); this._numLoops = this._minLoops + r.nextInt(this._maxLoops-this._minLoops); } else { this._numLoops = this._minLoops; } } COM: <s> method to calculate the number of times to loop playback of this sound </s>
funcom_train/10645232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endTag(final boolean omitted) { throw new UnsupportedOperationException(Messages.getString("swing.27")); //$NON-NLS-1$ // XXX: Perhaps depending on the boolean value, an endtag.missing // error may be thrown //handleEndTag(currentTag); } COM: <s> calls method that reports that a closing tag has been found </s>
funcom_train/45146551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNativePrepareCode(String name) { String base = gtkType+" _wrap_"+name+" = "; if (castType.equals("prepare-function")) { return base+"NatPrepare_" +(castFunc == null ? Strings.replace(javaType, "[]", "Array")+"(" : castFunc+"(" +Strings.stripTrailingChars(javaType, "*")+", ") +name+");"; // Note: javaType above should be gtkType really... } return null; } COM: <s> return the preparation code to convert an object of this type </s>
funcom_train/49409675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMimeTypeforIdentifier(String identifier) throws ARCException { CDXRecord c; for (Iterator i = cdxSet.iterator(); i.hasNext(); ) { c = (CDXRecord) i.next(); if (c.getUrl().equals(identifier)) return c.getMimetype(); } throw new ARCResourceNotFoundException("Specified Identifier " + identifier + " was not found."); } COM: <s> get mime type for specified resource identifier within the current </s>
funcom_train/32776586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node getNode(int nodeID) { // anhand nodeID im Array nodes suchen mit bin�rer Suche int left = 0; int right = this.nodes.length; while (left < right) { int middle = (left + right) / 2; if (this.nodes[middle].getID() < nodeID) { left = middle + 1; } else { right = middle; } } if (right < this.nodes.length && nodeID == this.nodes[right].getID()) { // nodeID gefunden return this.nodes[right]; } return null; } COM: <s> returns the node with the given node id </s>
funcom_train/4891765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void downgradeUsedLocks() { if (lockDowngradeEnabled) { for (Object element : getResourceLocksNeeded()) { ResourceLock lock = (ResourceLock) element; Integer value = resourceLocksUsed.get(lock.getResourceName()); int intvalue = value == null ? 0 : value.intValue(); lock.downGrade(intvalue); } } } COM: <s> take the resource locks and downgrade the locks to the actual level used </s>
funcom_train/10508722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrom(String from) throws BuildException { if (from != null) { try { reg.setPattern(from); } catch (NoClassDefFoundError e) { // depending on the implementation the actual RE won't // get instantiated in the constructor. throw new BuildException("Cannot load regular expression matcher", e); } } else { throw new BuildException("this mapper requires a 'from' attribute"); } } COM: <s> sets the quot from quot pattern </s>
funcom_train/22354527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeHerb(int row) { HerbInfo herbInfo = getHerb(row); if (herbInfo == null) return false; if (herbMap.containsKey(herbInfo.item)) { herbs.remove(herbInfo); herbMap.remove(herbInfo.item); sortHerbs(); fireTableStructureChanged(); return true; } return false; } COM: <s> removes the herb of the specified row from the model </s>
funcom_train/16651770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String triggerFinishWizard(){ log.debug("is any db connection error: #0", atarrabiConfiguration.isAnyDBConnErrorInitException()); if (!atarrabiConfiguration.checkForeignDBAvailablilityWithException()) { log.debug("Cant reach CERA database"); facesMessages.add(Severity.ERROR, "Error, entries cannot be submitted. Check the db connection2."); return "/home.xhtml"; } else { log.debug("starting to finish the wizard"); return this.finishWizard(); } } COM: <s> finishes the wizard but checks foreign database connection first </s>
funcom_train/28308077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDepth(String pSource) throws Exception { Descriptor sourceDesc = getDescriptor(pSource); if (sourceDesc == null) return -1; List<?> source = sourceDesc.getTreeLocationArray(); if (source == null) return -1; TreeLocation location = (TreeLocation) source.get(0); return new Integer(location.getLevel()).intValue() - 1; } COM: <s> return the depth of a specific concept up to the root concept </s>
funcom_train/3812650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void plot(Data cepstrum) { if (cepstrum != null) { if (cepstrum instanceof DoubleData) { int energy = (int) ((DoubleData) cepstrum).getValues()[0]; System.out.println(getPlot(energy)); } else { System.out.println(cepstrum); } } } COM: <s> plots the energy values of the given data to system </s>
funcom_train/634503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleAttributeElement(Element elementAttribute) { NamedNodeMap elementAttributes = elementAttribute.getAttributes(); String name = elementAttributes.getNamedItem("name").getNodeValue(); String value = elementAttribute.getFirstChild().getNodeValue(); attributes.put(name, value); } COM: <s> adds an attribute to the configuration </s>
funcom_train/23201123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notify(String msg) { for (AbstractMessageHandler handler : handlers) { handler.setSkypeClient(getSkypeClient()); if(handler.handle(msg)){ log.debug("handled by " +handler.getClass().getSimpleName() + ": " + msg); } } } COM: <s> notification from skype </s>
funcom_train/24608816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alert(String arg) { if (root == null) System.out.println(arg); else { JPopupMenu menu = new JPopupMenu("Alert"); menu.add(new JLabel(arg)); menu.pack(); menu.show(root, 0, 0); } } COM: <s> the alert string builtin javascript function </s>
funcom_train/39456835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatterns(List list) { patterns = new Pattern[DEFAULT_PATTERNS.length + list.size()]; System.arraycopy(DEFAULT_PATTERNS, 0, patterns, 0, DEFAULT_PATTERNS.length); for (int i = 0; i < list.size(); i++) { String p = (String) list.get(i); Pattern pattern = Pattern.compile(p); patterns[i + DEFAULT_PATTERNS.length] = pattern; } } COM: <s> sets a list of patterns for which classes can be marshalled </s>
funcom_train/36680349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBaseRecolorImageStrip(String imgRef, String imgPath, int tileWidth, int tileHeight) { String baseImgRef = loadAwtImg(imgRef, imgPath); Image slickImg = slickImageFactory.createImgStripFromAwtSource(baseImgRef, tileWidth, tileHeight); slickImageLib.addSlickImg(baseImgRef, slickImg); } COM: <s> set the base image as an image strip for recoloring </s>
funcom_train/14518003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ILogSessionLocal getLogSession() { if (logsession == null) { try { ILogSessionLocalHome logsessionhome = (ILogSessionLocalHome) getLocator().getLocalHome(ILogSessionLocalHome.COMP_NAME); logsession = logsessionhome.create(); } catch (CreateException e) { throw new EJBException(e); } } return logsession ; } //getLogSession COM: <s> gets connection to log session bean </s>
funcom_train/42536001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String ret = retType.getSimpleName()+" "+name+"("; for(int i = 0; i < argTypes.length; i++){ ret += argTypes[i].getSimpleName(); if(i < argTypes.length-1)ret += ", "; } return ret+")"; } COM: <s> return the string representation of this dbentry </s>
funcom_train/50208682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureFlow4JProject(IJavaProject javaProject, IProgressMonitor monitor) throws CoreException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } try { IProject project= mainPage.getProjectHandle(); Flow4JPlugin.addFlow4JNature(project, new SubProgressMonitor(monitor, 1)); Flow4JPlugin.addFlow4jRuntimeLibrary(javaProject); } finally { monitor.done(); } } COM: <s> configures the flow4 j project </s>
funcom_train/2624044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetContainer() { System.out.println("getContainer"); Window mockWindow; mockWindow = EasyMock.createMock(Window.class); JFCXWindow instance = new JFCXWindow(mockWindow); EasyMock.replay(mockWindow); GComponent result = instance.getContainer(); assertEquals(((JFCXComponent)result).aComponent , mockWindow); } COM: <s> test of get container method of class jfcxwindow </s>
funcom_train/49752451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getComandoIrDescargas() { if (comandoIrDescargas == null) {//GEN-END:|73-getter|0|73-preInit // write pre-init user code here comandoIrDescargas = new Command("Back", Command.BACK, 0);//GEN-LINE:|73-getter|1|73-postInit // write post-init user code here }//GEN-BEGIN:|73-getter|2| return comandoIrDescargas; } COM: <s> returns an initiliazed instance of comando ir descargas component </s>
funcom_train/13915569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVariableName(java.lang.String string, boolean caseSensitive) { if (string == null) { return; } this.CaseSensitive = caseSensitive; this.VariableName = string; if (this.VariableName != null) { this.searchAccelerator = new BoyerMooreAlgorithm(); this.searchAccelerator.compile(this.VariableName); } } COM: <s> sets the variable name </s>
funcom_train/8314494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readLine() { if(eos) return null; StringBuilder string = new StringBuilder(64); try { boolean done = false; while(!done) { int in = input.read(); switch(in) { case IAC: handleIAC(); break; case CR: done = true; break; /* ignore linefeed and null */ case LF: case 0: break; case EOS: eos = true; return null; default: string.append((char) in); } } return string.toString(); } catch(IOException ie) { System.out.println("[TelnetConnection] IOException: "+ie.getMessage()); eos = true; return null; } } COM: <s> read a string of input until a newline is encountered </s>
funcom_train/7518305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(EstrangeiroDependente entity) { EntityManagerHelper.log("deleting EstrangeiroDependente instance", Level.INFO, null); try { entity = getEntityManager().getReference( EstrangeiroDependente.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent estrangeiro dependente entity </s>
funcom_train/5662674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPhoneEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_View_phoneEnabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_View_phoneEnabled_feature", "_UI_View_type"), ViewPackage.eINSTANCE.getView_PhoneEnabled(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the phone enabled feature </s>
funcom_train/10268383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CheckedOutChildItem getCheckedOutChildItem(String itemId) { Iterator itr = _myChildren.iterator(); while (itr.hasNext()) { // for each child CheckedOutChildItem c = (CheckedOutChildItem) itr.next() ; if (itemId.equals(c.getItem().getID())) return c ; } return null ; } COM: <s> returns the checked out child item object of the childitem with the id </s>
funcom_train/19154415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void copyFile(File from, File to) throws IOException { FileInputStream in = new FileInputStream(from); FileOutputStream out = new FileOutputStream(to); int c; while ((c = in.read()) != -1) out.write(c); in.close(); out.close(); } COM: <s> copies a binary file from one place to another </s>
funcom_train/24934211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String objectNameList(MObject[] objects ) { String txt =""; for (int i=0;i<objects.length;++i) { if (i>0) txt = txt + ","; MObject o = objects[i]; txt = txt + o.name(); } return txt; } COM: <s> writes all objects participating in an association into a </s>
funcom_train/34635421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCodeSnippetRef(Element e) { Chapter chapter = getActiveChapter(); CodeSnippet snippet = getCodeSnippet(e); // create reference if (chapter != null && snippet != null) { try { repository.addCodeSnippetToChapter( chapter, snippet); } catch (DepthCrossProjectRelationException e1) { VexPlugin.log("Fragment relation is not valid.", e1); } } } COM: <s> adds a code snippet ref for the given coderef element </s>
funcom_train/42135482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String uploadFromFile(String filename) throws IOException { FileInputStream input = new FileInputStream(filename); byte[] buffer = new byte[BUFFER_SIZE]; int bytesRead = 0; while ((bytesRead = input.read(buffer)) != -1) { write(buffer, 0, bytesRead); } close(); return getResponse(); } COM: <s> uploads to the server from a file </s>
funcom_train/45245896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldPesosSitiosLogDet() { if (jNumberFloatFieldPesosSitiosLogDet == null) { jNumberFloatFieldPesosSitiosLogDet = new JNumberFloatField(); jNumberFloatFieldPesosSitiosLogDet.setLocation(new Point(330, 173)); jNumberFloatFieldPesosSitiosLogDet.setSize(new Dimension(65, 20)); } return jNumberFloatFieldPesosSitiosLogDet; } COM: <s> this method initializes j number float field pesos sitios log det </s>
funcom_train/22548751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMulticastPushRequest(PushRequest push) { if(push == null) { throw new NullPointerException("null push"); } // must have a TTL of 1 Assert.that(push.getTTL() == 1, "multicast push ttl not 1"); MulticastService.instance().send(push); SentMessageStatHandler.MULTICAST_PUSH_REQUESTS.addMessage(push); } COM: <s> sends a push request to the multicast network </s>
funcom_train/3361401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String fullPackagePath = "javax.sound.sampled."; String initialString = new String(getLineClass().toString()); String finalString; int index = initialString.indexOf(fullPackagePath); if (index != -1) { finalString = initialString.substring(0, index) + initialString.substring( (index + fullPackagePath.length()), initialString.length() ); } else { finalString = initialString; } return finalString; } COM: <s> obtains a textual description of the line info </s>
funcom_train/1653713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddChild_StringStringStringString() { HTMLNode methodHTMLNode = new HTMLNode(SAMPLE_OKAY_NODE_NAME); methodHTMLNode.addChild(SAMPLE_OKAY_NODE_NAME, SAMPLE_OKAY_ATTRIBUTE_NAME, SAMPLE_ATTRIBUTE_VALUE, SAMPLE_NODE_CONTENT); List<HTMLNode> childrenList = methodHTMLNode.children; assertEquals(1,childrenList.size()); assertEquals(generateFullNodeOutput(SAMPLE_OKAY_NODE_NAME, SAMPLE_OKAY_ATTRIBUTE_NAME, SAMPLE_ATTRIBUTE_VALUE, SAMPLE_NODE_CONTENT), childrenList.get(0).generate()); } COM: <s> tests add children string string string string method </s>