__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49881182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchNote(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, KEY_NAME, KEY_ADDRESS }, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the note that matches the given row id </s>
funcom_train/28262999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyOthers() { // Notify others about my first appearance. // format: publisher|msgType|dest_groupName(must be global)|text|time. String msg = this.USER_NAME + msgSep + ENTER_NETWORK_STR + msgSep + "Global Group" + msgSep + "entered the network." + msgSep + getCurrentTime(); service.set(msgKey, msg); } COM: <s> notify others that i have entered the network </s>
funcom_train/28424581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void log( Level level, String message ) { if ( message == null ) { message = "" ; } Log.log(this, message); // log the message LogRecord record = new LogRecord( level, message ); record.setParameters(parameters); logger.log( record ); // write the message to the original System.out if desired if ( echo ) { ///systemOut.println( message ); } } COM: <s> logs build output to a java </s>
funcom_train/12556871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPreferredIndex(int field) { int indices = countValues(field); for (int i = 0; i < indices; i++) { int attributes = getAttributes(field, i); if ((attributes & ATTR_PREFERRED) != 0) { return i; } } return -1; } COM: <s> gets preferred index for requested field </s>
funcom_train/19422381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadClasses() { Properties responseKeys = EaasyStreet.getProperties(EaasyStreet.getProperty(Constants.CFG_EV_RESPONSES_SRC)); Enumeration e = responseKeys.propertyNames(); while (e.hasMoreElements()) { String responseKey = (String) e.nextElement(); String className = responseKeys.getProperty(responseKey); responses.put(responseKey, new EventResponse(responseKey, className, className)); } } COM: <s> p this method loads the event responses from the source property files </s>
funcom_train/12547653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int revealAllProductions() { Set remaining = new HashSet(objectToProduction.keySet()); remaining.removeAll(alreadyDone); int number = remaining.size(); Iterator it = remaining.iterator(); Collection ps = new ArrayList(); while (it.hasNext()) { Production[] p = (Production[]) objectToProduction.get(it.next()); ps.addAll(Arrays.asList(p)); } addProductions(ps); alreadyDone.addAll(remaining); return number; } COM: <s> this will reveal all the productions for all objects remaining to be </s>
funcom_train/36109110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ExternalModuleBridge findCurrentExternalModuleBridge(Object id) { SharedParameterStorage parameterStorage = solverBuilder.getParameterStorage(); Data moduleParameter = parameterStorage.getModuleParameterMap().get(id); int externalModuleModel = moduleParameter.getInt(MODULE_PARAMETER_MODULE); for (ExternalModuleBridge moduleBridge : solverBuilder.getListOfBlocks()) { int externalModuleId = ((DataWrapper)moduleBridge.getExternalModuleModel()).getId(); if (externalModuleId == externalModuleModel) return moduleBridge; } return null; } COM: <s> searching of current external module bridge </s>
funcom_train/43410064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BrowsePanel getJAddSupplierInnerPanel() { if (jAddSupplierInnerPanel == null) { CommonTableModel tableModel = new CommonTableModel( TableModels.SUPPLIER_COLUMNS, TableModels.SUPPLIER_METHODS); SupplierFilterManager mgr = new SupplierFilterManager(); tableModel.setList(mgr.getList()); jAddSupplierInnerPanel = new BrowsePanel(mgr, tableModel); jAddSupplierInnerPanel.setAddEnabled(true); jAddSupplierInnerPanel.setDeleteEnabled(false); jAddSupplierInnerPanel.setEditEnabled(true); } return jAddSupplierInnerPanel; } COM: <s> this method initializes j add supplier inner panel </s>
funcom_train/22526557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateColumnName(IRoleModel role) { for(TreeColumn column : getTree().getColumns()) { if(column.getData("role") == role) { //$NON-NLS-1$ column.setText(role.getTitle()); column.setToolTipText(role.getTitle()); } } } COM: <s> update a column name from the roles title </s>
funcom_train/2804486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connect(BldrCompRoot sibling) { if (isConnectableBy(sibling)) { sibling.registerConnection(this); if (connectedBy == null) { connectedBy = new Vector(); } connectedBy.addElement(sibling); // Has the sibling perform any operations that it needs to do buildConnectHook(sibling); sibling.setSelected(true); return true; } else { return false; } } COM: <s> connect a sibling to this component </s>
funcom_train/3286424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws InitializationException { Log.info( "Late init for JetspeedProfilerService called" ); while( !getInit() ) { //Not yet... try { Thread.sleep( 100 ); Log.info( "Waiting for init of JetspeedProfilerService..." ); } catch (InterruptedException ie ) { Log.error( ie ); } } } COM: <s> this is the lateinitialization method called by the </s>
funcom_train/38312012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isEmptyString(String text) { if (text == null) { return true; } int len = text.length(); for (int i = 0; i < len; i++) { char c = text.charAt(i); if (!Character.isWhitespace(c)) { return false; } } return true; } COM: <s> checks if the given string contains no or no real data </s>
funcom_train/4537972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startQueueListener() { final Runnable queueListener = new Runnable() { public void run() { while (true) { try { String jid = queue.take(); reloadVCard(jid); } catch (InterruptedException e) { e.printStackTrace(); break; } } } }; TaskEngine.getInstance().submit(queueListener); } COM: <s> listens for new vcards to lookup in a queue </s>
funcom_train/48332350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFieldAttr (int fieldOrElementIndex, Object attr){ if (fieldAttrs == null){ if (attr == null){ return; // no need to waste an array object for storing null } fieldAttrs = new Object[getNumberOfFieldsOrElements()]; } fieldAttrs[fieldOrElementIndex] = attr; } COM: <s> set the optional attribute for a field </s>
funcom_train/32958770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL tryURL( String contextPath, String path ) throws MalformedURLException { URL ctx = new URL( contextPath ); URL url = new URL( ctx, path ); // See if that yields a file try { InputStream is = url.openStream(); is.close(); } catch (IOException e) { // TolvenLogger.info( "**Failed Facelet=" + url.toString(), TolvenResourceResolver.class); url = null; } return url; } COM: <s> combine the context path with the specified path </s>
funcom_train/35838241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAerialSelectedLink(UILink link, int mode) { if (oAerialDialog == null) return; if (link == null) { oAerialViewPane.processSelectedLink(link, mode); } else { UILink oLink = (UILink)oAerialViewPane.get(link.getLink().getId()); if (oLink != null) { oLink.setSelected(true); oAerialViewPane.processSelectedLink(oLink, mode); } } } COM: <s> sets the selection mode for the given link in the aerial view </s>
funcom_train/35228955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void skipPad() throws IOException { if (bytesRead > 0) { int extra = (int) ( bytesRead % TarConstants.DATA_BLOCK ); if (extra > 0) { long bs = 0; while (bs < TarConstants.DATA_BLOCK - extra) { long res = skip( TarConstants.DATA_BLOCK - extra - bs ); bs += res; } } } } COM: <s> skips the pad at the end of each tar entry file content </s>
funcom_train/6446178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTopNavBar(PrintWriter body) throws IOException{ // for (int i=0; i < navSections.length; i+=2){ // body.print("<a href=\""); // body.print(navSections[i]); // body.print("\" class=\"menuTopOff\">"); // body.print(navSections[i+1]); // if(i == (navSections.length-2)) // body.print("</a>"); // else // body.print("</a> | "); // } } COM: <s> write the top navigation bar of the page </s>
funcom_train/43372820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTagValue(String tagName,String value,String comment){ xml.write("<!-- "+comment+" -->"); xml.write("<"+tagName+">"); xml.write(value); xml.write("</"+tagName+">"); } COM: <s> write tag value tag must be passed without </s>
funcom_train/9188358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeMirror getOriginalType(javax.lang.model.type.ErrorType errorType) { if (errorType instanceof com.sun.tools.javac.code.Type.ErrorType) { return ((com.sun.tools.javac.code.Type.ErrorType)errorType).getOriginalType(); } return com.sun.tools.javac.code.Type.noType; } COM: <s> gets the original type from the error type object </s>
funcom_train/35680107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLsfileal() throws Exception { CixsJaxwsService service = Samples.getLsfileal(); CixsOperation operation = service.getCixsOperations().get(0); File operationClassFilesDir = CodeGenUtil.classFilesLocation( GEN_SRC_DIR, operation.getPackageName(), true); Jaxws2CixsGenerator.generateHostProgram(operation, getParameters(), operationClassFilesDir); check(service, operation); } COM: <s> case where input commarea is different from output commarea </s>
funcom_train/15527637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCachedXML(String filename) { try { FileInputStream fis = new FileInputStream(getXMLCacheDir() + File.separator + filename); byte[] b = new byte[fis.available()]; fis.read(b, 0, fis.available()); return new String(b); } catch (Exception e) { e.printStackTrace(); return ""; } } COM: <s> returns the content of the specified xml file in the xml cache dir </s>
funcom_train/11728166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkNtQuery() throws RepositoryException, NotExecutableException { try { superuser.getWorkspace().getNodeTypeManager().getNodeType(ntQuery); } catch (NoSuchNodeTypeException e) { // not supported throw new NotExecutableException("repository does not support nt:query"); } } COM: <s> checks if the repository supports the nt query node type otherwise throws </s>
funcom_train/50869244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putStringList(String nodeName, Collection<?> data) { Preferences listPrefs = this.javaPreferences.node(nodeName); int count = 1; for (Iterator<?> iter = data.iterator(); iter.hasNext();) { String string = iter.next().toString(); listPrefs.put(String.valueOf(count), string); count++; } } COM: <s> stores a list of strings in the preferences </s>
funcom_train/44797456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element createDataField(final Document formDef, final String fieldConstraints, final String key) { Element field = formDef.createElement("TextField"); field.setAttribute("key",key); field.setAttribute("constraints",fieldConstraints); addCustomDataFieldAttributes(formDef,field,key); return field; } COM: <s> create standard data text field </s>
funcom_train/25664328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLongPref(final String key) { long value; String str = ""; this.reading.lock(); try { str = this.properties.getProperty(key.toLowerCase()); } finally { this.reading.unlock(); } try { value = Long.parseLong(str); } catch (final NumberFormatException e) { try { value = Long.parseLong(this.defaults.getProperty(key.toLowerCase())); } catch (final NumberFormatException e2) { value = 0; } } return value; } COM: <s> retrieves a 64 bit integer configuration option </s>
funcom_train/28555555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void componentResized(ComponentEvent e) { if (this.isVisible() == true){ if (e.getComponent().getClass().getName() == "brumTab.TabViewController"){ tipW.setLocation(getWidth()-270, getHeight()-210); } } } COM: <s> required by the component listener interface moves the tooltip when the </s>
funcom_train/19845069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getControlsFor(Command command) { List controlsForCommand = new ArrayList(); for (Iterator it = commands.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); Control key = (Control) entry.getKey(); Command value = (Command) entry.getValue(); if (value == command) { controlsForCommand.add(key); } } return controlsForCommand; } COM: <s> get a list of the registered controls </s>
funcom_train/27837635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRepositoryTreeListener() { repositoryTree.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { Object obj = repositoryTree.getLastSelectedPathComponent(); if (obj instanceof UmlElementDecorator) { UmlElementDecorator decorator = (UmlElementDecorator)obj; UmlElement element = decorator.getModel(); if (isSubClassOfFrameInstance(element)) showElementInCanvas((UmlObject)element); showElementProperty(element); } } }); } COM: <s> display uml element property when a node in the repository tree is </s>
funcom_train/4805296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Validator createValidator(Schema schema) { Stack stack = (Stack)validatorHandlerCache.get(schema); if (stack == null) { stack = new Stack(); validatorHandlerCache.put(schema, stack); } if (stack.empty()) return schema.createValidator(properties); return (Validator)stack.pop(); } COM: <s> get a validator for a schema </s>
funcom_train/3302254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _wiredRemove() { try { _preDestroy(); } catch(Throwable t) { // Either RuntimeException or Error try { context.setRollbackOnly(); } catch(IllegalStateException tx) {} // no TX context -> forget it catch(SystemException tx) { // should never ever happen throw new ComponentException(tx.getMessage()); } } } COM: <s> this function is called on object removal and in turn calls </s>
funcom_train/51152434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderListItem(Graphics g, String text) { int oldStart = startX; int bulletSize = fontHeight / 4; currentY += fontHeight / 2; startX += 2 * fontHeight; lineBreak(g); g.fillOval(startX - fontHeight / 2, currentY + fontHeight / 2, bulletSize, bulletSize); renderText(g, text); startX = oldStart; } COM: <s> render a list item </s>
funcom_train/22335743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ITransaction getTransactionForName(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, HttpTransactionDefinitionException { Class transactionClass = getClass().getClassLoader().loadClass(className); Object obj = transactionClass.newInstance(); if (! (obj instanceof ITransaction)) { throw new HttpTransactionDefinitionException("Transaction classname has to implement interface: ITransaction"); } return (ITransaction) obj; } COM: <s> tries to load class and instantiate class </s>
funcom_train/48660546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performPerspective(float[] xPoints, float[] yPoints, float[] zPoints, int noOfPoints) { k = near/far; for (int i = 0; i < noOfPoints; i++) { // no change in xPoints and yPoints zPoints[i] = (zPoints[i] + k)/(k-1); // NOTE: w = -z } } COM: <s> performs perspective projection </s>
funcom_train/16310497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEnabledSimpleBrowseButtonAccordingSimpleCombo() { MarkingScriptWizard wizard = (MarkingScriptWizard) getWizard(); FW4EXDir selectedDir = wizard.getFW4EXDirFromNoPathComboIndex( simpleFileDirCombo.getSelectionIndex()); simpleFileBrowseButton.setEnabled(selectedDir.equals(FW4EXDir.TEACHER)); } COM: <s> enables or disables the browse button of the simple input zone </s>
funcom_train/11681340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMessageID(MessageContext mc) { // now its the time to put the parameters set by the user in to the // correct places and to the // if there is no message id still, set a new one. String messageId = options.getMessageId(); if (messageId == null || "".equals(messageId)) { messageId = UUIDGenerator.getUUID(); } mc.setMessageID(messageId); } COM: <s> create a message id for the given message context if needed </s>
funcom_train/9646654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int joinSegments(Point2D.Double join, float tolerance) { for (int i=0; i < size(); i++) { Node p = get(i); if (Geom.length(p.x[0], p.y[0], join.x, join.y) < tolerance) { remove(i); return i; } } return -1; } COM: <s> joins two segments into one if the given point2 d </s>
funcom_train/12150209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() throws RepositoryException { RepositoryConfig config = RepositoryConfig.create(configFilePath, repHomeDir); subdelegatee = RepositoryImpl.create(config); delegatee = new SAMRepositoryImpl(subdelegatee); hook = new Thread() { public void run() { shutdown(); } }; Runtime.getRuntime().addShutdownHook(hook); } COM: <s> creates the underlying repository instance </s>
funcom_train/547428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcons(ImageIcon on, ImageIcon off, ImageIcon unknown) { on_state = on; off_state = off; unknown_state = unknown; iconSize = new Dimension(on_state.getIconWidth(), on_state.getIconHeight()); computeTitleSize(); } COM: <s> sets icons fot the switch </s>
funcom_train/9851485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void MessageDecomposition(String email) throws MessagingException, IOException { String acomaid = GetMessageID(email); String emailDIR = acomaid.substring(acomaid.indexOf("@") + 1, acomaid.indexOf(">")); String emailID = acomaid.substring("<".length(), acomaid.indexOf("@")); acomaid = emailDIR + File.separator + emailID; MessageDecomposition(email, acomaid, MultiServer.configAcoma.EMAIL_DIR); } COM: <s> saves the email and decomposed email parts to the acoma repository </s>
funcom_train/2845734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set parseTypes(String t) { Set typeset = new HashSet(); if (t != null) { List typelist = Arrays.asList(t.split("\\|")); for (Iterator it = typelist.iterator(); it.hasNext();) { typeset.add(it.next()); } } return typeset; } COM: <s> utility function to split a string of separated types into a set </s>
funcom_train/459554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParticipantObjectQuery() { NodeList list = participantObjectIdentificationNode.getChildNodes() ; for ( int i = 0 ; i < list.getLength() ; i++ ) { if ( list.item(i).getNodeName().equals("ParticipantObjectQuery")) { return list.item(i).getTextContent() ; } } return null ; } COM: <s> gets the value of the participant object query property </s>
funcom_train/5363038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected NamespaceMap mapNamespaces( Hashtable namespaces ) { NamespaceMap nsMap = null; if ( namespaces.size() > 0 ) { nsMap = new NamespaceMap(); Enumeration keys = namespaces.keys(); while ( keys.hasMoreElements() ) { String key = ( String ) keys.nextElement(); nsMap.setNamespace( key, ( String ) namespaces.get( key ) ); } } return nsMap; } COM: <s> maps a hashtable containing namespace definitions into a db xml </s>
funcom_train/44025320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStringFromDocument(Document doc) throws TransformerException { loggerInstance.log(Level.DEBUG, "Getting string format from a document."); DOMSource domSource = new DOMSource(doc); StringWriter writer = new StringWriter(); StreamResult result = new StreamResult(writer); TransformerFactory tf = TransformerFactory.newInstance(); Transformer transformer = tf.newTransformer(); transformer.transform(domSource, result); return writer.toString(); } COM: <s> get a string format of a given document </s>
funcom_train/21982732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JBarcode createUPCA(){ JBarcode jbc = new JBarcode(UPCAEncoder.getInstance(), WidthCodedPainter.getInstance(), UPCATextPainter.getInstance()); jbc.setBarHeight(17); try { jbc.setXDimension(0.264583333); } catch (InvalidAtributeException e) {} jbc.setShowText(true); jbc.setCheckDigit(true); jbc.setShowCheckDigit(true); return jbc; } COM: <s> creates a new jbarcode instance to upca barcode type </s>
funcom_train/8022161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMessagesByContact() { System.out.println("getMessagesByContact"); Contact contact = null; ArrayList<Message> expResult = null; ArrayList<Message> result = MessageManager.getMessagesByContact(contact); 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 messages by contact method of class vgrabber </s>
funcom_train/23663221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OLAPLegacyConnection getConnection() throws RuntimeException { IConnection connection = super.getConnection(); if ((connection != null) && (connection instanceof OLAPLegacyConnection)) return (OLAPLegacyConnection) connection; throw new RuntimeException("OLAP connection is needed for this source: "+getName()+". Connection set is of type: "+ connection.toString()); } COM: <s> get the connection </s>
funcom_train/19748508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putPageSequenceInCache(SequenceData data, String pageUri, String identifier) { putInCache(data, pageUri + "_" + identifier, DUMMY_LANGUAGE, PAGE_SEQUENCE_SUFFIX, new String[]{pageUri + PAGE_SEQUENCE_GROUP_SUFFIX, SEQUENCE_GROUP}, PageContext.APPLICATION_SCOPE); } COM: <s> puts sequence into cache into application scope for page </s>
funcom_train/3860737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other == this) { return true; } else if (other instanceof IntArrayList) { IntArrayList that = (IntArrayList)other; if (that.size() != this.size()) { return false; } else { for (int i = _pos; i-- > 0;) { if (this._data[i] != that._data[i]) { return false; } } return true; } } else { return false; } } COM: <s> compares this list to another list value by value </s>
funcom_train/43215035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean skipFile(BigHash expectedHash, File saveAs, byte[] padding) throws Exception { debugOut("Checking for skip file: " + saveAs.getAbsolutePath()); if (saveAs.exists()) { if (new BigHash(saveAs, padding).equals(expectedHash)) { return true; } // doesn't match, delete IOUtil.safeDelete(saveAs); } return false; } COM: <s> p checks whether a file should be skipped </s>
funcom_train/18032054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSubNodes(DefaultMutableTreeNode treeNode) { KategoryBean parentBean = (KategoryBean)treeNode.getUserObject(); List<KategoryBean> subNodes = parentBean.loadSubNodes(); for (KategoryBean bean : subNodes) { DefaultMutableTreeNode subTreeNode = new DefaultMutableTreeNode(bean); treeNode.add(subTreeNode); initSubNodes(subTreeNode); } } COM: <s> initialises the subnode of the given node recursively </s>
funcom_train/32790141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getModels(String metamodelName) throws ModelManagerException{ try{ ModelPackage metaModel = (ModelPackage) repository.getMetaModel(metamodelName); if(metaModel == null){ return new HashSet(); } return repository.getModels(metaModel); } catch (Exception e) { e.printStackTrace(); throw new ModelManagerException(e); } } COM: <s> get all the models in repository that are instances of a certain metamodel </s>
funcom_train/16300778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFireDisplayableCommand() { convenienceFireDisplayableCommand(new FormWrapper("item")); convenienceFireDisplayableCommand( new ListWrapper("label", List.IMPLICIT)); convenienceFireDisplayableCommand( new TextBoxWrapper("label", "", 12, TextField.PASSWORD)); } COM: <s> this test sequentially creates different displayable wrapper and tries to </s>
funcom_train/45257098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChildTree(TreeViewer aViewer) { // Save viewer. fChildTree = aViewer; // Create adapter. adapter = new DrillDownAdapter(fChildTree); adapter.addNavigationActions(toolBarMgr); toolBarMgr.update(true); // Set tree layout. fChildTree.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); layout(); } COM: <s> sets the child viewer </s>
funcom_train/8077912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(double value, double n) { sum += value * n; sumSq += value * value * n; count += n; if (Double.isNaN(min)) { min = max = value; } else if (value < min) { min = value; } else if (value > max) { max = value; } } COM: <s> adds a value that has been seen n times to the observed values </s>
funcom_train/36836589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SessionFactory getSessionFactory() throws HibernateException, MappingException{ //TODO Create a Property file with all mappings. //and use the addFile method to put them there. //configuration catches the mappings defs. //hibernate.hbm.xml Configuration cfg = new Configuration(); cfg.configure("/hibernate.cfg.xml"); //cfg.addFile("./src/br/ufal/cryptonline/User.hbm.xml"); this also works //cfg.addFile("./Forum.hbm.xml"); this.sessions = cfg.buildSessionFactory(); return this.sessions; } COM: <s> creates a session factory of hinernate </s>
funcom_train/28472000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Newses createNewses(int pCount, String pPrefix, String pSuffix){ Newses newses = new Newses(); for (int i = 0; i < pCount; i++){ News news = new News(); news.setSubject(pPrefix + " " + (pCount + 1) + " " + pSuffix); newses.add(news); } return newses; } COM: <s> creates a collection of news objects </s>
funcom_train/47981338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void joinGame(){ mRemoteLoadingDialog.setLoadingText("Joining game.\n\n Please wait..."); mRemoteLoadingDialog.setTimeOutHandler(mJoinGameTimeOutHandler); mRemoteLoadingDialog.run(); mMxaProxy.getIQProxy().getProxy().JoinGame( mMxaProxy.getIQProxy().getGameServiceJid(), null, mMxaProxy.getNickname(), false, _joinGameCallback ); } COM: <s> join game while sending an join game bean to the server </s>
funcom_train/10375390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(BundleContext context) { LOGGER.debug("Stopping web container extender..."); stopped = true; if (bt != null) { bt.close(); } if (eventDispatcher != null) { eventDispatcher.destroy(); } if (executor != null) { executor.shutdown(); } LOGGER.debug("Web container extender stopped"); } COM: <s> shutdown the extender bundle at termination time </s>
funcom_train/12675418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SymTabAST findLeftChild(SymTabAST aExpression) { SymTabAST leftChild = (SymTabAST) (aExpression.getFirstChild()); // handle Checkstyle grammar while (leftChild.getType() == TokenTypes.LPAREN) { leftChild = (SymTabAST) leftChild.getNextSibling(); } return leftChild; } COM: <s> finds the left child of a binary operator skipping parentheses </s>
funcom_train/25291676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrequencyScaleFactor(float frequencyScaleFactor) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_FREQUENCY_SCALE_FACTOR_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes15")); ((AuralAttributesRetained)this.retained).setFrequencyScaleFactor( frequencyScaleFactor); } COM: <s> this parameter specifies a scale factor applied to the frequency </s>
funcom_train/23284911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected LexicalProcessor createLexicalProcessor() { // Build a automaton from the lexicon model LexicalAutomatonBuilder lab = new LexicalAutomatonBuilder(lex, logger); LexicalAutomaton automaton = lab.getLexicalAutomaton(); // Create a processor for the lexicon LexicalProcessor lexer = new LexicalProcessor(); lexer.setLogger(logger); lexer.setLexicalAutomaton(automaton); return lexer; } COM: <s> creates a lexical processor from the lexicon </s>
funcom_train/21883953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getController(final String type, final String name) { final StringBuffer sb = new StringBuffer(); sb.append("deployment.").append(type + ".").append(name + ".").append(Constants.PROPERTY_DEP_CONTROLLER_FIELD); return getProject().getProperty(sb.toString()); } COM: <s> returns the controller </s>
funcom_train/44994852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double method2(final double meanAnomaly, final double excentricity) { double excentricAnomaly = 0; double newExcentricAnomaly = meanAnomaly; nbLoop = 0; while ((nbLoop < MAX_LOOP) && (Math.abs(newExcentricAnomaly - excentricAnomaly) >= PRECISION)) { excentricAnomaly = newExcentricAnomaly; newExcentricAnomaly = excentricAnomaly + (meanAnomaly + excentricity * Math.sin(excentricAnomaly) - excentricAnomaly) / (1 - excentricity * Math.cos(excentricAnomaly)); nbLoop++; } return newExcentricAnomaly; } COM: <s> resolve kepler equation with second method to compute excentric anomaly </s>
funcom_train/15626504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAlways() { final int prevNum = mapMenuLoader.loadNumEntries(); final int num = saveEntries(root, 0, ""); mapMenuLoader.saveNumEntries(num); for (int i = num; i < prevNum; i++) { mapMenuLoader.removeEntry(i); } } COM: <s> saves the contents to preferences </s>
funcom_train/22236578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReadAction2D(int action) { if (! (action == ROTATION || action == TRANSLATION || action == SCALE || action == NONE)) throw new IllegalArgumentException ("\nReadAction2D must be ROTATION, TRANSLATION, SCALE, " + "or NONE") ; this.readAction2D = action ; } COM: <s> sets the action to be bound to 2 d valuator reads </s>
funcom_train/8407785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HashEntry getEntry(Object key) { key = convertKey(key); int hashCode = hash(key); HashEntry entry = data[hashIndex(hashCode, data.length)]; // no local for hash index while (entry != null) { if (entry.hashCode == hashCode && isEqualKey(key, entry.key)) { return entry; } entry = entry.next; } return null; } COM: <s> gets the entry mapped to the key specified </s>
funcom_train/22582316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BandwidthControlledOutputStream (OutputStream out, int bps, int chunksize) { // Perform the super call. // We have to use cumulative calls, and we perform start-of-method calls as well. super (out, chunksize, true, true); // Initialisation. sw = new Stopwatch(); setLimit(bps); bps = temp_bps; stamp = getCount(); setLimiting(false); active = temp_active; } COM: <s> creates a new bandwidth controlled output stream </s>
funcom_train/50297061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void end(Xid id, int flags) throws XAException { if (flags != XAResource.TMSUCCESS && flags != XAResource.TMFAIL && flags != XAResource.TMSUSPEND) throw new FBXAException("flag not allowed in this context: " + flags + ", valid flags are TMSUCCESS, TMFAIL, TMSUSPEND", XAException.XAER_PROTO); internalEnd(id, flags); mcf.notifyEnd(this, id); } COM: <s> dissociates a resource from a global transaction </s>
funcom_train/9266755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postalDelivery() { while (true) { messageReceived.P(); Packet p = Machine.networkLink().receive(); MailMessage mail; try { mail = new MailMessage(p); } catch (MalformedPacketException e) { continue; } if (Lib.test(dbgNet)) System.out.println("delivering mail to port " + mail.dstPort + ": " + mail); // atomically add message to the mailbox and wake a waiting thread queues[mail.dstPort].add(mail); } } COM: <s> wait for incoming messages and then put them in the correct mailbox </s>
funcom_train/18745083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getSide(GraphJVertex vertex, Point2D point) { int side = 0; if (this.layoutMap != null) { JVertexLayout layout = this.layoutMap.getLayout(vertex.getNode()); if (layout != null) { Rectangle2D bounds = layout.getBounds(); side = getSide(bounds, point); } } return side; } COM: <s> checks on which side of a node a point lies </s>
funcom_train/34628370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dragStart(DragSourceEvent event) { event.doit = false; // deny if outline is dirty if (this.outline.isModelDirty()) { return; } // get the selected node OutlineNode node = this.getSelection(); if (node == null) { return; } // deny dragging of certain elements if (node.getType() == OutlineNode.TYPE_PREAMBLE) { return; } // proceed this.dragSource = node; event.doit = true; } COM: <s> validate the drag start </s>
funcom_train/44844682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = _appendTabs(_name.toUpperCase()) + "|Average(calls) in ms\n" + "----------------+--------\n" + "Total\t\t|" + _x(_average(getTime(), getCalls())) + "(" + getCalls() + ")"; return result; } COM: <s> returns benchmark test results </s>
funcom_train/5607945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PyObject __call__(PyObject arg1, PyObject args[], String keywords[]) { PyObject[] newArgs = new PyObject[args.length + 1]; System.arraycopy(args, 0, newArgs, 1, args.length); newArgs[0] = arg1; return __call__(newArgs, keywords); } COM: <s> a variant of the call method with one extra initial argument </s>
funcom_train/25033694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRectangularDisplayShutter(int shutterLeftVerticalEdge,int shutterRightVerticalEdge,int shutterUpperHorizontalEdge,int shutterLowerHorizontalEdge) { hasRectangularShutter = true; this.shutterLeftVerticalEdge = shutterLeftVerticalEdge; this.shutterRightVerticalEdge = shutterRightVerticalEdge; this.shutterUpperHorizontalEdge = shutterUpperHorizontalEdge; this.shutterLowerHorizontalEdge = shutterLowerHorizontalEdge; } COM: <s> set the parameters of a rectangular shutter </s>
funcom_train/15918387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StmtSeq flattenReturn(Return stmt) { if (null == stmt.expr()) return syn.createStmtSeq(stmt); List<Stmt> stmts = new ArrayList<Stmt>(); Expr expr = getPrimaryAndStatements(stmt.expr(), stmts); stmts.add(stmt.expr(expr)); return syn.createStmtSeq(stmt.position(), stmts); } COM: <s> flatten a return statements </s>
funcom_train/50702946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { initFont(); ColouredFont temp = new ColouredFontChooser(target, null, prefs).getFont(); if (temp != null) { target = temp; if (edge) { Prefs.edgeFont = target; Prefs.edgeFontColour = ((ColouredFont) target).getColor(); } else { Prefs.nodeFont = target; Prefs.nodeFontColour = ((ColouredFont) target).getColor(); } } updateAllPreferences(); viewControl.updateView(); } COM: <s> launches a dialog to set node edge colour </s>
funcom_train/42843314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean bindPeer() { try { peer = (Peer) Naming.lookup("//" + peerHost + "/" + peerName); } catch (Exception e) { cat.info(selfName + " could not find peer " + peerName + " on " + peerHost); return false; } return true; } COM: <s> try to bind the peer and report whether the peer is ready </s>
funcom_train/36204680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isVisible(TerminologyObject to) { if (to == to.getKnowledgeBase().getRootQASet()) return true; if (isThisOrFollowUpIndicated(to)) return true; if (to instanceof Question) { for (TerminologyObject parent : to.getParents()) { if (parent instanceof QContainer) { return true; } } } return false; } COM: <s> checks whether the given terminology object is currently visible or not </s>
funcom_train/31100432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDestinationRef(String id) { if (doesIDExist(id)) { IDNode node = (IDNode)idReferences.get(id); return "[ " + node.getPageReference() + " /XYZ " + node.getXPosition()/1000f + " " + node.getYPosition()/1000f + " null ]"; } else { addToIdValidationList(id); return null; } } COM: <s> returns a destination reference for the node with the </s>
funcom_train/24527689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void returnError(String error, Throwable t){ resultCode = RC_ERROR; evalErrorMsg = error; if ( t != null ) { this.throwable = t; println("returnError called with message: '"+error+"' and error: "+Tools.errorToString(t, true)); } else { println("returnError called with message: '"+error+"'"); } } COM: <s> sets the event result code rc error the </s>
funcom_train/16630132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getText_db_user() { if (text_db_user == null) { text_db_user = new JTextField(); text_db_user.setText("user"); text_db_user.setLocation(new Point(152, 66)); text_db_user.setSize(new Dimension(148, 23)); } return text_db_user; } COM: <s> this method initializes text db user </s>
funcom_train/35694341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestRender() { future = RenderManager.getInstance().getScheduledService(). schedule(this, delay, TimeUnit.MILLISECONDS); if (log.isDebugEnabled()) { log.debug("delay render started: delay is " + delay + " ms"); } } COM: <s> schedules a render pass on the group of renderables using the delay value </s>
funcom_train/44011546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTxLineList() { System.out.println("setTxLineList"); ArrayList<TransLineBO> TxLineList = null; TransactionBO instance = new TransactionBO(); instance.setTxLineList(TxLineList); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set tx line list method of class edu </s>
funcom_train/49199355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLinkedScenePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ChooseScenePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SceneElement_linkedScene_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SceneElement_linkedScene_feature", "_UI_SceneElement_type"), VspacemapsPackage.Literals.SCENE_ELEMENT__LINKED_SCENE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the linked scene feature </s>
funcom_train/27941849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegistryResponse lockDomain(GRIDomain domain) throws Exception { List statusCodes = new ArrayList(); statusCodes.add(RRPUtilities.LOCK_STATUS); domain.setStatusCodes(statusCodes); short[] fields = {GRIDomain.FIELD_STATUS}; return modifyDomain(domain, fields); } COM: <s> lock the domain </s>
funcom_train/27748361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBuildLogger(BuildLogger buildLogger) { if (this.logger != null && this.project != null) { this.project.removeBuildListener(this.logger); } this.logger = buildLogger; this.logger.setMessageOutputLevel(this.logLevel); if (this.project != null) { this.project.addBuildListener(this.logger); } } COM: <s> sets an alternative build logger </s>
funcom_train/35675141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DocumentFragment getMarkupParent(final XmlSchemaAppInfo appInfo) { NodeList markup = appInfo.getMarkup(); DocumentFragment markupParent = null; if (markup == null || markup.getLength() == 0) { markupParent = _db.newDocument().createDocumentFragment(); } else { markupParent = (DocumentFragment) markup.item(0).getParentNode(); } return markupParent; } COM: <s> the content of appinfo is a raw w3 c nodelist </s>
funcom_train/43343958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connect(Object[] params) { /* if (log.isDebugEnabled()) { log.debug("Connect Params: {}", params); for (Object e : params) { log.debug("Param: {}", e); } } Lock lock = getWriteLock(); lock.lock(); try { final Scope oldScope = scope; scope = (Scope) newScope; if (scope.connect(this, params)) { if (oldScope != null) { oldScope.disconnect(this); } return true; } else { scope = oldScope; return false; } } finally { lock.unlock(); }*/ return true; } COM: <s> connect to another scope on server with given parameters </s>
funcom_train/10049811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void incErrors(int add) { try { String msg = this.testStatistics.getMessage(); if (!msg.startsWith("error")) { int idxSlash = msg.indexOf('/'); int num = new Integer(msg.substring(0, idxSlash)).intValue() + add; msg = "" + num + msg.substring(idxSlash); this.testStatistics.setMessage(msg); } } catch (Throwable T) { Activator.log(T); } } COM: <s> increases the number of errors in the current test run </s>
funcom_train/23618383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(DataInputStream dis) throws IOException{ int b1 = (int)dis.readUnsignedByte(); int b2 = (int)dis.readUnsignedByte(); int b3 = (int)dis.readUnsignedByte(); int temp = (b1<<16) + (b2<<8) + b3; this.tempo = (double) (1000000f / (float)temp * 60.0f); return 3; } COM: <s> read the contends of this object in from disk </s>
funcom_train/49822610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean load_library_from_theory_2(Term th, Term libName){ Struct theory = (Struct) th.getTerm(); Struct libN = (Struct) libName.getTerm(); try { if (!theory.isAtom()){ return false; } if (!libN.isAtom()){ return false; } Theory t = new Theory(theory.getName()); TheoryLibrary thlib = new TheoryLibrary(libN.getName(),t); getEngine().loadLibrary(thlib); return true; } catch (Exception ex){ return false; } } COM: <s> loads a library constructed from a theory </s>
funcom_train/17817847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCachable(boolean cachable) { if (!cachable && !isUseMwtProtocol()) { wrappedResponse.setHeader("pragma", "no-cache"); wrappedResponse.setHeader("cache-control", "no-cache"); wrappedResponse.setHeader("expires", "0"); } this.cachable = cachable; } COM: <s> sets the cachable </s>
funcom_train/37508359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTextDelay() { if (m_textDelay == null) { m_textDelay = new JTextField(); m_textDelay.setPreferredSize(new Dimension(100, m_textDelay.getPreferredSize().height)); m_textDelay.setText("3"); m_textDelay.setHorizontalAlignment(JTextField.RIGHT); } return m_textDelay; } COM: <s> returns the textfield for the slideshow delay </s>
funcom_train/25422958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doSetDefaultSite(SearchFilterHarvestSites sFilter) { if("".equals(this.getDefaultSiteId())) { return; } sFilter.setSelectedHarvestSiteId(this.getDefaultSiteId()); sFilter.setSelectedHarvestSiteName(this.getDefaultSiteName()); } COM: <s> do set default site if one has been specified </s>
funcom_train/8452425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long login(String login, String password) throws LembreteSystemException { User user = new User(login, password); List<User> userList = userDAO.findByExample(user, null); for (User u : userList) { if (u.getEmail().equals(login)) { try { u.checkPassword(password); return u.getId(); } catch (LoginFailedException e) { break; } } } throw new LembreteSystemException(LOGIN_FAILED_MESSAGE); } COM: <s> logins an user into the system </s>
funcom_train/29829487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireBuddyFinderResultReceived(Collection users, String requestID) { for (Enumeration e = buddyFinderListeners.elements(); e.hasMoreElements(); ) { BSBuddyFinderListener listener = (BSBuddyFinderListener) e.nextElement(); listener.buddyFinderResultReceived(users, requestID); } } COM: <s> notifies buddy finder listeners that a buddyfinder result has arrived </s>
funcom_train/12113712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC8(javax.swing.event.ChangeEvent arg1) { try { // user code begin {1} // user code end this.jTabbedPane_StateChanged(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c8 jtabbed pane </s>
funcom_train/28662168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean readInSpecialToken() { try { token = in.read(); } catch (IOException e) { LogUtil.logError(XorPlugin.PLUGIN_ID, "Exception while reading from the input stream", e, false); //$NON-NLS-1$ } if (token == BOM_VALUE) { return true; } else { return false; } } COM: <s> checks if the input file contains a bom at the beginning </s>
funcom_train/23236324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processPositioning(final RPObject base, final RPObject diff) { boolean moved = false; if (diff.has("x")) { int nx = diff.getInt("x"); if(nx != x) { x = nx; moved = true; } } if (diff.has("y")) { int ny = diff.getInt("y"); if(ny != y) { y = ny; moved = true; } } if (moved) { onPosition(x, y); } } COM: <s> process attribute changes that may affect positioning </s>