__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19655699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchStorageList() { Cursor mCursor = mDb.query(true, DB_TABLE, new String[] { KEY_ID, KEY_TITLE, KEY_AMOUNT, KEY_UNIT, KEY_SEGMENT }, KEY_STORED + " = 1", null, null, null, null, null); return mCursor; } COM: <s> return a cursor over the list of all recipes in the database </s>
funcom_train/3814331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandWord(UnitContext leftContext) { Word word = node.getWord(); T(" Expanding word " + word + " for lc " + leftContext); Pronunciation[] pronunciations = word.getPronunciations(null); for (int i = 0; i < pronunciations.length; i++) { expandPronunciation(leftContext, pronunciations[i], i); } } COM: <s> expand the the word given the left context </s>
funcom_train/3902843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTimeLimitActionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_timeLimitAction_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_timeLimitAction_feature", "_UI_DocumentRoot_type"), AdlcpV1p3Package.Literals.DOCUMENT_ROOT__TIME_LIMIT_ACTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the time limit action feature </s>
funcom_train/10269410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keepAlive(String sessionKey) throws FluxException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("FluxFacade keepAlive: " + sessionKey); } XFormsSessionManager manager = (XFormsSessionManager) session.getAttribute(XFormsSessionManager.XFORMS_SESSION_MANAGER); XFormsSession xFormsSession = manager.getXFormsSession(sessionKey); xFormsSession.getKey(); } COM: <s> note user typing activity not value change </s>
funcom_train/18110565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTree getXmlTree() { if (xmlTree == null) { xmlTree = new JTree(new DefaultTreeModel(rootNode)); xmlTree.setEditable(true); DefaultTreeModel treeModel = new DefaultTreeModel(rootNode); treeModel.addTreeModelListener(this); /*TreeSelectionModel model = xmlTree.getSelectionModel(); model.setSelectionMode(TreeSelectionModel.CONTIGUOUS_TREE_SELECTION);*/ xmlTree.addMouseListener(this); xmlTree.setCellRenderer(new TreeIconRenderer()); } return xmlTree; } COM: <s> this method initializes xml tree </s>
funcom_train/7630399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStreamMute(int streamType, boolean state) { IAudioService service = getService(); try { service.setStreamMute(streamType, state, mICallBack); } catch (RemoteException e) { Log.e(TAG, "Dead object in setStreamMute", e); } } COM: <s> mute or unmute an audio stream </s>
funcom_train/20883559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List findPhonemes() { Set set = new HashSet(); for (int i = 0; i < stateMachine.length; i++) { if (stateMachine[i] instanceof FinalState) { FinalState fstate = (FinalState) stateMachine[i]; if (fstate.phoneList != null) { for (int j = 0; j < fstate.phoneList.length; j++) set.add(fstate.phoneList[j]); } } } return new ArrayList(set); } COM: <s> returns a list of all the phonemes used by the lts rules </s>
funcom_train/11647222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntrospectionConfiguration createSchemaIntrospectionConfiguration() { IntrospectionConfiguration configuration = new IntrospectionConfiguration(); configuration.getPrefixMapper().setPrefix(W3C_SCHEMA_URI, "xsd"); configuration.getPrefixMapper().setPrefix(W3C_SCHEMA_INSTANCE_URI, "xsi"); return configuration; } COM: <s> p gets an code introspection configuration code that is suitable </s>
funcom_train/44183933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nonseedLine(String line) { String effectiveDirective = getEffectiveAddDirective(); if(line.startsWith(effectiveDirective)) { return surtPrefixes.considerAsAddDirective(line.substring(effectiveDirective.length())); } else { // not a line this instance is interested in return false; } } COM: <s> consider nonseed lines as possible surt prefix directives </s>
funcom_train/35866041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMeetingCount() { System.out.println("getMeetingCount"); MeetingMgmtBean instance = new MeetingMgmtBean(); int expResult = 0; int result = instance.getMeetingCount(); 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 meeting count method of class se392 </s>
funcom_train/3926891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int printUntilToken( int scanner, int endTokenOffset, int tokenType ) { while (( scanner != -1 ) && ( scanner <= endTokenOffset )) { int type = dataSource.getType( scanner ); if ( type == tokenType ) { return( scanner ); } else { print( dataSource, scanner, type ); scanner = dataSource.getNextToken(); } } return( scanner ); } COM: <s> print tokens until one of a particular type is encountered </s>
funcom_train/5437037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setOffsetText(byte[] dump) { lines = dump.length / 16 + 1; StringBuffer sb = new StringBuffer(); for(int i = 0; i < lines; i++) { sb.append(Utils.toHex(i * 16, 4)).append('\n'); } offsets.setText(sb.toString()); } COM: <s> sets the offset text </s>
funcom_train/4754405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fraction divide(Fraction fraction) { if (fraction == null) { throw new NullArgumentException(LocalizedFormats.FRACTION); } if (fraction.numerator == 0) { throw new MathArithmeticException(LocalizedFormats.ZERO_FRACTION_TO_DIVIDE_BY, fraction.numerator, fraction.denominator); } return multiply(fraction.reciprocal()); } COM: <s> p divide the value of this fraction by another </s>
funcom_train/37446232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUndetermined() { // Set only when we have fuzzy types. if ( ( fromCvFuzzyType != null ) && ( toCvFuzzyType != null ) ) { undetermined = fromCvFuzzyType.getShortLabel().equals( CvFuzzyType.UNDETERMINED ) && toCvFuzzyType.getShortLabel().equals( CvFuzzyType.UNDETERMINED ) ; } else { undetermined = false ; } } COM: <s> undetermined is true only both fuzzy types are of undetermined type </s>
funcom_train/38730483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getCollisionTimePaddleSphere(Ball b, Paddle p, Paddle.HemispherePlace hemisphere) { return getCollisionTimeBall(b.getPosition(), b.getVelocity(), b.getRadius(), p.getHemispherePosition(hemisphere), p.getVelocity(), p.getRadius()); } COM: <s> calculates collision with ball and the hemisphere completed to whole </s>
funcom_train/49790318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testResumeMultiple() throws Exception { IFile sitemap = beginAtSitemapThenPage("Page 2"); assertNoProblem(); gotoSitemapThenPage(sitemap, "External Page", "Advertisement"); assertNoProblem(); assertButtonPresentWithText("Continue"); clickButtonWithText("Continue"); assertTitleEquals("External Page"); assertNoProblem(); gotoSitemapThenPage(sitemap, "Advertisement"); assertNoProblem(); assertButtonPresentWithText("Continue"); clickButtonWithText("Continue"); assertTitleEquals("External Page"); assertNoProblem(); } COM: <s> if we ask to resume multiple times we carry on going back </s>
funcom_train/29954589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetGrammar() { System.out.println("setGrammar"); String grammar = "shape0*shape1"; ShapeBlockObject instance = new ShapeBlockObject(); instance.setGrammar(grammar); String result = instance.getGrammar(); System.out.println(result); assertEquals(grammar,result); } COM: <s> test of set grammar method of class hbm </s>
funcom_train/2733571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String visit(List<Domain> domains) { StringBuilder sb = new StringBuilder(); if (domains != null && domains.size() > 0) { sb.append(print("(")); boolean first = true; for (int i = 1; i < domains.size(); i++) { Domain domain = domains.get(i); if (!first) sb.append(print(", ")); else first = false; sb.append(visit(domain)); } sb.append(print(")")); } return sb.toString(); } COM: <s> visit the domain list if it is empty do nothing </s>
funcom_train/35310521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoCreateRowSorter(boolean autoCreateRowSorter) { boolean oldValue = this.autoCreateRowSorter; this.autoCreateRowSorter = autoCreateRowSorter; if (autoCreateRowSorter) { setRowSorter(new TableRowSorter<TableModel>(getModel())); } firePropertyChange("autoCreateRowSorter", oldValue, autoCreateRowSorter); } COM: <s> specifies whether a </s>
funcom_train/13892844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public TdDialog getNewTDDialog(Component component) { while (component != null && !(component instanceof Frame) && !(component instanceof Dialog)) component = component.getParent(); TdDialog dialog; if (component == null) dialog = new TdDialog((Frame)null); else if (component instanceof Dialog) dialog = new TdDialog((Dialog)component); else dialog = new TdDialog((Frame)component); dialog.positionDialog(); return dialog; } COM: <s> this function allows to get a new table properties dialog by giving the </s>
funcom_train/41325395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readCoordinate(int[] index, float[] data) throws IOException { int size = index.length; if (size != data.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) { index[i] = getInt(); data[i] = getFloat(); } } COM: <s> reads a coordinate vector </s>
funcom_train/46581952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean tablesExist() { String[] types = { "TABLE" }; boolean exists = false; try { ResultSet rs = getDatabaseMetaData().getTables(null, null, mGenerator.getTableName(), types); while (rs.next()) { exists = true; } } catch (SQLException e) { ; // eat it } return exists; } COM: <s> returns true if the tables required for this component exist </s>
funcom_train/29985441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NCacheEntry getEntry (Object o) { NCacheEntry ent; synchronized (this) { ent = htab.get (new MemoryKey (o)); } if (ent != null) { /* used to check "!checkKey (ent) &&" but that is unneccessary * get will read in data. */ if (!checkHook (ent)) { // bad entry... remove (ent); } } /*if (ent != null) ent.setVisited (new Date ());*/ return ent; } COM: <s> get the cache entry assosiated with given object </s>
funcom_train/37020160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort(Object[] array) { int N = array.length; for (int k = N / 2; k > 0; --k) { downheap(array, k, N); } do { Object temp = array[0]; array[0] = array[N - 1]; array[N - 1] = temp; --N; downheap(array, 1, N); } while (N > 1); } COM: <s> sorts an array of objects </s>
funcom_train/42284274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean calculateEnabled() { int count = 0; for(Iterator<?> it=getSelectedObjects().iterator(); it.hasNext(); ) { Object next = it.next(); if(next instanceof Deleteable) { count++; IUndoableOperation operation = getOperation((Deleteable)next); if(operation == null || !operation.canExecute()) return false; } } return count > 0; } COM: <s> returns code true code if the selected objects can be deleted </s>
funcom_train/48150881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double minimum(double[] distData) { double min=0; if (distData.length > 0) min = distData[0]; for (int i = 1; i < distData.length; i++) if (min > distData[i]) min = distData[i]; return(min); } COM: <s> the method finds the minimum of a double array </s>
funcom_train/2441807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreferencesPage getPage(Node node) { // Nodes cannot be created outside of this class, so we can be sure that // the Node refers to an instance created in here --> We can use the // default implementation of equals() and hashCode() provided by Object // when we look for a node in the page map: return pages.get(node); } COM: <s> returns the page for a given preferences node </s>
funcom_train/38318876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isUpToDate () { if (!getToolList().exists()) { return false; } long nTimestamp= getToolList().lastModified(); Iterator i= _toolTypes.iterator(); while (i.hasNext()) { if (!((ToolType) i.next()).isUpToDate(nTimestamp)) { return false; } } return true; } COM: <s> checks if the tool list is up to date according to the </s>
funcom_train/47865751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthToken(AuthToken authToken, String resource) { setAddress(new JID(authToken.getUsername(), getServerName(), resource)); this.authToken = authToken; setStatus(Session.STATUS_AUTHENTICATED); // Add session to the session manager sessionManager.addSession(this); } COM: <s> initialize the session with an authentication token and resource name </s>
funcom_train/2863056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String stripBlockChars(String authoString) { StringBuffer returnString = new StringBuffer(); char ch; for (int i=0; i<authoString.length();i++) { ch = authoString.charAt(i); if (blockChars.indexOf(ch) == -1) { returnString.append(ch); } } return returnString.toString(); } COM: <s> removes block chars characters from the string passed to it </s>
funcom_train/9817229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String lookUpPhysicalName(String logicalName) { for(int i=0;i<logicalNames.size();i++) { if(logicalName.equals(VirtexToJHDLSyms.EDIFToJHDLName((String)logicalNames.elementAt(i)))) return (String)physicalNames.elementAt(i); } return null; } COM: <s> looks up a physical resource name based on a logical jhdl </s>
funcom_train/36676005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawMultiTextOnLine(Graphics g, String delimiter, String... strings) { int leftOffset = 0; for (String txt : strings) { txt += delimiter; leftOffset += GuiUtil.getStringWidth(txt, g); drawOnCurrentLine(txt, LEFT_OFFSET + leftOffset, g); } } COM: <s> paints multiple strings on 1 line </s>
funcom_train/15666022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printDoc(String text) { try { JTextPane newEditor = new JTextPane(); newEditor.setText(text); StyleContext sc3 = new StyleContext(); Style style3 = sc3.addStyle(null, null); StyleConstants.setForeground(style3, Color.black); DocumentRenderer d = new DocumentRenderer(); d.print(newEditor); } catch (Exception e) { } } COM: <s> sets the tabs attribute of the messages pane object </s>
funcom_train/41881436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onHitRobot(HitRobotEvent e) { // When a robot is hit, turn and move to the opposite wall, then orient PacerEvader // so that it is again facing left-to-right, with its gun pointing into the // battle field. turnRight(90); ahead(fieldHeight); turnRight(90); } COM: <s> moves pacer evader to the opposite wall whenever it hits an enemy robot </s>
funcom_train/31955579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(char[] c, int start, int len) throws IOException { for (int i = start; i < start + len; i += 1) { if (count + 2 > buf.length) { checkBuf(2); } buf[count++] = (byte) (c[i] >> 8); buf[count++] = (byte) (c[i]); } } COM: <s> write a segment of an array of chars </s>
funcom_train/40419392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SQLRequestProcessor (CRConfig config) throws CRException { super(config); Properties dshprop = ((CRConfigUtil) config).getDatasourceHandleProperties(); dshDriverClass = dshprop.getProperty(DSHDRIVERCLASS_KEY); dshUrl = dshprop.getProperty(DSHURL_KEY); Properties dsprops = ((CRConfigUtil) config).getDatasourceProperties(); table = dsprops.getProperty(TABLEATTRIBUTE_KEY); String colatt = dsprops.getProperty(COLUMNATTRIBUTE_KEY); if (colatt != null) { columns = colatt.split(","); } idcolumn = dsprops.getProperty(IDCOLUMN_KEY); mergeOnIdColumn = config.getBoolean(MERGE_ON_IDCOLUMN_KEY, mergeOnIdColumn); } COM: <s> create a new instance of sqlrequest processor </s>
funcom_train/38865118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getAll(String[][] qdmap) { this.clear(); this.put("","None"); this.put(" ","None"); this.put("/","Missing"); for(int i=0; i<qdmap.length; i++) { this.put(qdmap[i][0],qdmap[i][1]); } return true; } COM: <s> retrieve all codes with descriptions from a 2 dimensional array of </s>
funcom_train/18742536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Action getScrollToCurrentAction() { if (getActiveTransition() == null) { this.scrollToCurrentAction.setState(getSimulatorModel().getState()); } else { this.scrollToCurrentAction.setTransition(getSimulatorModel().getTransition()); } return this.scrollToCurrentAction; } COM: <s> initialises and returns the action to scroll to the active state or transition </s>
funcom_train/24002018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getT61String() throws IOException { if (tag != tag_T61String) throw new IOException( "DerValue.getT61String, not T61 " + tag); // return new String(getDataBytes()); // , "ISO-8859-1"); return new String(byte2charArray(getDataBytes())); } COM: <s> returns an asn </s>
funcom_train/7825660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getAnotherEnd(Node node) { if (node.equals(impl.getFrom())) return impl.getTo(); if (node.equals(impl.getTo())) return impl.getFrom(); throw new IllegalArgumentException("node is neither arc begin nor arc end"); } COM: <s> given begin returns end given end returns begin otherwise throws exception </s>
funcom_train/33428757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFullscreen() { //Debug.print("Set to fullscreen"); _activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); _activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); _activity.getWindow().requestFeature(Window.FEATURE_NO_TITLE); } COM: <s> removes the title bar and application name from view </s>
funcom_train/35512905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void turnLeft(MoveStatus currentMove, MoveStatus newMove) { switch (currentMove.getCp()) { case SOUTH : newMove.setCp(CardinalPoint.EAST); break; case EAST : newMove.setCp(CardinalPoint.NORTH); break; case NORTH : newMove.setCp(CardinalPoint.WEST); break; case WEST : newMove.setCp(CardinalPoint.SOUTH); break; } } COM: <s> turns towards the left </s>
funcom_train/8078976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawHighlight(Graphics g, int w, int h) { drawNode(g, w, h); g.setColor(Color.yellow); g.fillOval((int)(m_x * w) - 5, (int)(m_y * h) - 5, 11, 11); } COM: <s> call this function to draw the node highlighted </s>
funcom_train/3936496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Combo createRequiredLabelCombo(Composite inParent, String inText, final int inComboType) { createLabel(inParent, inText); Combo outCombo = new Combo(inParent, inComboType); FormUtility.addDecorationRequired(outCombo); GridData lLayout = new GridData(SWT.FILL, SWT.CENTER, true, false); lLayout.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth(); outCombo.setLayoutData(lLayout); return outCombo; } COM: <s> creates a code combo code widget that has the required decoration </s>
funcom_train/22277328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushState() { GraphicsState lastState = state(); GraphicsState newState; if (lastState != null) { newState = (GraphicsState)lastState.clone(); } else { // THIS SHOULD NEVER HAPPEN ALERT! newState = new GraphicsState(); } graphicsStates.addElement(newState); } COM: <s> creates an entry in the graphics state stack </s>
funcom_train/3302327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String locateModule(String rawModuleName) { if (!new File(rawModuleName).exists()) { String moduleName = locateModuleFromClassloader(rawModuleName); if (moduleName != null) return moduleName; moduleName = locateModuleFromClasspath(rawModuleName); if (moduleName != null) return moduleName; URL url = getURL(rawModuleName); if (url != null) return url.getPath(); } return rawModuleName; } COM: <s> find the actual location of a module specified in the application descriptor </s>
funcom_train/3370801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJTabbedPane(); // initialize AccessibleContext for the existing pages int count = getTabCount(); for (int i = 0; i < count; i++) { pages.get(i).initAccessibleContext(); } } return accessibleContext; } COM: <s> gets the accessible context associated with this jtabbed pane </s>
funcom_train/49317489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openURL() { String urlStr = DialogUtil.input("Enter the World Wide Web location (URL) to display:"); if (urlStr != null) { URL url; try { url = new URL(urlStr); } catch (Exception e) { DialogUtil.error(e); return; } setPage(url); } } COM: <s> display a dialog to enter a url to display </s>
funcom_train/48911144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfImporteSus() { if (txfImporteSus == null) { txfImporteSus = new JTextField(); txfImporteSus.setBounds(new Rectangle(100, 45, 130, 20)); txfImporteSus.setText("0"); txfImporteSus.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent e) { calcularDiferencia(); } }); } return txfImporteSus; } COM: <s> this method initializes txf importe sus </s>
funcom_train/47120569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deletePost(String postid) throws MwaConnectionException { Object[] params = new Object[]{DEFAULT_APPKEY, postid, mwaConnectionConfig.getUsername(), mwaConnectionConfig.getPassword(), Boolean.TRUE}; execute("metaWeblog.deletePost", params); } COM: <s> delete a post </s>
funcom_train/44498100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void submitWorkingForm() { if (workingForm != null) { try { workingForm.submit(WAIT); } catch (JiffieException je) { throw new RuntimeException("couldn't submit form", je); } }else{ throw new RuntimeException("No working form to submit!"); } } COM: <s> submits the current working form </s>
funcom_train/38184768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadProperties(String fileName) throws ActiveJmsException { try { this.properties.load(new FileInputStream(fileName)); this.setSystemProperties(); } catch (IOException exception) { throw new ActiveJmsException("The file '".concat(fileName).concat("' could not be found or read.")); } } COM: <s> provides a method for loading an active jms </s>
funcom_train/36960778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentProvider() { PackageContentProvider contentProvider= new PackageContentProvider(); PackageLabelProvider labelProvider= new PackageLabelProvider(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | RubyElementLabels.P_COMPRESSED, AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | RubyElementImageProvider.SMALL_ICONS); fPackageViewer.setContentProvider(contentProvider); fPackageViewer.setLabelProvider(new DecoratingRubyLabelProvider(labelProvider, false)); } COM: <s> set the content and label provider of the </s>
funcom_train/3619406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPostconditionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UseCase_postconditions_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UseCase_postconditions_feature", "_UI_UseCase_type"), EclipsesrsPackage.Literals.USE_CASE__POSTCONDITIONS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the postconditions feature </s>
funcom_train/18319456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void z4(StateMachineContext context) { state = DISCONNECTED; for (Iterator i = threads.values().iterator(); i.hasNext(); ) { ((SMThread)i.next()).terminated(); } threads.clear(); DebugPlugin.getDefault().fireDebugEventSet( new DebugEvent[] { new DebugEvent(this, DebugEvent.TERMINATE) }); } COM: <s> app has closed connection </s>
funcom_train/50603934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object newInstance() throws SOAPException{ try { return javaClass.newInstance(); } catch (Throwable t) { logger.error("Could not instantiate '" + javaClass.getName() + "'", t); throw new SOAPException("Could not instantiate bean '" + javaClass.getName() + "'"); } } COM: <s> create a new instance of the bean that this serializer is configured for </s>
funcom_train/48405329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addRightMouseDownHandler(com.smartgwt.client.widgets.events.RightMouseDownHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.RightMouseDownEvent.getType()) == 0) setupRightMouseDownEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.RightMouseDownEvent.getType()); } COM: <s> add a right mouse down handler </s>
funcom_train/25706558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getIdentitiesList() { if( identitiesList == null ) { identitiesList = new JList(); identitiesList.setModel(new DefaultListModel()); for( final Object element : Core.getIdentities().getLocalIdentities() ) { ((DefaultListModel)identitiesList.getModel()).addElement(element); } } return identitiesList; } COM: <s> this method initializes identities list </s>
funcom_train/4307110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeLocalMove(){ //make sure startSpace and endSpace are defined if( startSpace != 99 && endSpace!= 99 ){ // Takes the information of a move and calls makeMove() // in a localPlayer boolean result = activePlayer.makeMove( startSpace, endSpace ); } // Reset startSpace and endSpace to 99 startSpace = 99; endSpace = 99; } COM: <s> send a move on to the kernel i </s>
funcom_train/28753080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBiohazard(Long newVal) { if ((newVal != null && this.biohazard != null && (newVal.compareTo(this.biohazard) == 0)) || (newVal == null && this.biohazard == null && biohazard_is_initialized)) { return; } this.biohazard = newVal; biohazard_is_modified = true; biohazard_is_initialized = true; } COM: <s> setter method for biohazard </s>
funcom_train/43213709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimeSpentHealing() { long time = timeSpentHealing; // If currently doing this activity, increment time by run time of this // current activity. if (this.currentActivity == HashSpanFixingThread.ACTIVITY_HEALING) { time += (TimeUtil.getTrancheTimestamp() - lastActivityStartTimestamp); } return time; } COM: <s> p get time in milliseconds spent healing local data chunks </s>
funcom_train/11306067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initExpressions() { Matcher matcher = EXPRESSION.matcher(pattern); while (matcher.find()) { String token = matcher.group(); token = token.substring(1, token.length() - 1); Expression exp = new Expression(token); for (VarSpec varspec : exp) variables.add(varspec.getName()); expressions.add(exp); } } COM: <s> return the array of template variables </s>
funcom_train/45850792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void index(String pBadTerm, String pGoodTerm) { String key = pBadTerm.trim().toLowerCase(); String value = pGoodTerm.trim().toLowerCase(); if(key.length()==0 || key.equals(value)) correctSpellings.put(value); else { List aux = (List)(commonMisspellingIndex.get(key)); if(aux==null) aux = new Vector(); aux.add(value); commonMisspellingIndex.put(pBadTerm,aux); } } COM: <s> index a given term </s>
funcom_train/19327314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property ancestorProperty(final FoProperty propertyType) { final FObj parent = this.getParent(); if (parent == null) { return null; } final PropertyList propertyList = parent.getPropertyList(); final Property property = propertyList.getProperty(propertyType); if (property != null) { return property; } return parent.ancestorProperty(propertyType); } COM: <s> returns the nearest ancestor property of a specified type </s>
funcom_train/3863421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getSequence(String fileName) { try { sequence = MidiSystem.getSequence(new File(PATH_MEDIA_UNIT_MUSIC+fileName)); } catch (InvalidMidiDataException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } } COM: <s> loads a sequence from disk </s>
funcom_train/32634615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int putClassType(String name) { TypeSignature.checkTypeSig(name); if (name.charAt(0) == 'L') name = name.substring(1, name.length()-1); else if (name.charAt(0) != '[') throw new IllegalArgumentException("wrong class type: "+name); return putIndexed(CLASS, name, putUTF8(name), 0); } COM: <s> adds a new class entry to the constant pool and returns </s>
funcom_train/37740810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection processes() { RequestScope scope = RequestLog.enterScope (this, "processes", (Object[])null); Collection res = null; try { res = processHome().findAll(); } catch (ResourceNotAvailableException re) { throw new EJBException(re); } catch (FinderException ne) { throw new EJBException(ne); } catch (RemoteException re) { throw new EJBException(re); } finally { scope.leave (res); } return res; } COM: <s> this operation method creates and delivers a collection of all </s>
funcom_train/32155152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkAddLink(Nogood nogood) { Iterator<VarAssignment> it = nogood.getLhs().iterator(); while (it.hasNext()) { VarAssignment ass = it.next(); if (!this.communicator.isHigherNeighbor(ass.getAgentId())) { this.communicator.addNeighbor(ass.getAgentId()); this.agentView.add(this.makeExternalVar(ass)); this.adlMsgH.sendAddLink(ass); } } } COM: <s> procedure to check if a new link should be added </s>
funcom_train/24933861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { setActualMap( null ); setType( null ); setKind( null ); setActualNode( null ); setActualEdge( null ); setActualEdgeProperty( null ); setActualObj( null ); setSource( null ); setTarget( null ); setID( -1 ); setSpecialID( -1 ); } COM: <s> resets every field in this context object </s>
funcom_train/20940480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList getUserRoles(HttpServletRequest request) { ArrayList groups = getGroups(); Iterator it = groups.iterator(); ArrayList userRoles = new ArrayList(); while (it.hasNext()) { RoleDO role = (RoleDO) it.next(); if (request.isUserInRole(role.getName())) { userRoles.add(role); } } return userRoles; } COM: <s> get all roles which this user belongs </s>
funcom_train/48373079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveData() { Announcements _an = Announcements.getInstance(); switch (shutdownMode) { case SIGTERM: System.err.println("★關閉伺服器★"); break; case GM_SHUTDOWN: System.err.println("★GM 關閉伺服器★"); break; case GM_RESTART: System.err.println("★GM 重新啟動伺服器★"); break; } _an.announceToAll("伺服器目前由 " + _modeText[shutdownMode] + " NOW! bye bye"); // we cannt abort shutdown anymore, so i removed the "if" GameServer.getInstance().disconnectAllCharacters(); System.err .println("【資料儲存完畢,所有玩家全部離線。】"); try { int delay = 500; Thread.sleep(delay); } catch (InterruptedException e) { // never happens :p } } COM: <s> this sends a last byebye disconnects all players and saves data </s>
funcom_train/25855515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexSearcher initSearch(String indexpath) throws IOException { File indexDir = new File(indexpath); FSDirectory directory = FSDirectory.getDirectory(indexDir,false); IndexSearcher searcher = new IndexSearcher(directory); if(!indexDir.exists()){ System.out.println("The Lucene index is not exist"); return null; } return searcher; } COM: <s> init search for lucene </s>
funcom_train/44821869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnNameList() { StringBuffer colList = new StringBuffer(); for (int i=0; indexColumns != null && i<indexColumns.length; i++) { if (colList.length() > 0) colList.append(","); colList.append (indexColumns[i].getColumnName()); } return colList.toString(); } COM: <s> get columns as a comma separated list </s>
funcom_train/4561153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendCustomerOffers() { OfferBundle offers; synchronized (lock) { offers = this.customerOfferBundle; this.customerOfferBundle = null; } if (offers != null && offers.size() > 0) { // In TAC SCM one customer agent represents all customers and // all customer offers will be sent to this agent. In other // words, there is only one customer address to sent to. sendMessage(customerAddress, offers); } } COM: <s> sends any pending offers to the customers </s>
funcom_train/45226543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void servicesDiscovered(int i, ServiceRecord[] serviceRecord) { serviceUrl = ""; for (int j=0; j < serviceRecord.length; j++) { serviceUrl = serviceRecord[j].getConnectionURL(0,false); // when a service is discovered, we need to store connection url for later use. GPS receiver provides only one service. } } COM: <s> callback raised for every service discovered on the previously selected device </s>
funcom_train/41332670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Shape createArrowDown(final double x, final double y, final double w, final double h) { path.reset(); path.moveTo(x, y); path.lineTo(x + w / 2, y + h); path.lineTo(x + w, y); path.closePath(); return path; } COM: <s> return a path for an arrow pointing down </s>
funcom_train/3926439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean optimizationOK( SpaceStructure nSpace, Node n ) { if ( nSpace == null ) { return( false ); } SpaceEntitySet v = nSpace.getVertices(); if ( v == null ) { return( false ); } return( v.getNumberEntities() >= minFloaterVertices ); } COM: <s> check if optimization is allowed according to the user configurable </s>
funcom_train/44286647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean Import_classes(FactoryWriterXML xml, TransactionXML transaction, List listReference) { if(!Loop_on_items(xml, transaction, listReference)) return false; if(!Import_core_classes(xml, transaction, listReference)) return false; return true; } COM: <s> class definition import classes </s>
funcom_train/30006234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getName(Object o) { if (o != null) { String name = o.getClass().getName(); name = name.substring(name.lastIndexOf('.') + 1, name.length()); return name; } else { throw new NullPointerException("Argument 'o' is empty."); } } COM: <s> returns the name of the class of the specified object </s>
funcom_train/1643788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int compareDate(Date a, Date b) { final Date ta = new Date(a.getTime()); final Date tb = new Date(b.getTime()); final long d1 = setHourToZero(ta).getTime(); final long d2 = setHourToZero(tb).getTime(); return (int) Math.round((d2 - d1) / 1000.0 / 60.0 / 60.0 / 24.0); } COM: <s> calculate the number of days between two dates </s>
funcom_train/45622990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAnalysisTimeoutPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_analysisTimeout_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_analysisTimeout_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_AnalysisTimeout(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the analysis timeout feature </s>
funcom_train/12179570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DOMProtocol createProtocol() { // todo: use test version, requires moving all test protocols to runtime. ProtocolBuilder builder = new ProtocolBuilder(); ((DefaultDevice) device.getDevice()).setPolicyValue( DevicePolicyConstants.SUPPORTS_JAVASCRIPT, "true"); device.setProtocolConfiguration(null); return (DOMProtocol) builder.build( new ProtocolRegistry.HTMLVersion3_2Factory(), device); } COM: <s> return an instance of the protocol class htmlversion3 2 </s>
funcom_train/48704716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeCurrentEdit() { Component comp = Globals.focusListener.getFocused(); if ((comp == source) || ((comp instanceof FieldEditor) && this.isAncestorOf(comp))) { storeFieldAction.actionPerformed(new ActionEvent(comp, 0, "")); } } COM: <s> makes sure the current edit is stored </s>
funcom_train/5373616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRegion (Region region) { checkWidget (); if ((style & SWT.NO_TRIM) == 0) return; if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); /* int hRegion = 0; if (region != null) { hRegion = OS.CreateRectRgn (0, 0, 0, 0); OS.CombineRgn (hRegion, region.handle, hRegion, OS.RGN_OR); } OS.SetWindowRgn (handle, hRegion, true); this.region = region; */ } COM: <s> sets the shape of the shell to the region specified </s>
funcom_train/887397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getContentAutoStyle(String styleName) { // Search for a normal style Element elem = XMLUtilities.getElemWithAttrValue(getContentAutoStyles(), NODE_STYLE, ATTR_STYLE_NAME, styleName); if(elem != null) return elem; // Search for a list style return XMLUtilities.getElemWithAttrValue(getContentAutoStyles(), NODE_LIST_STYLE, ATTR_STYLE_NAME, styleName); } COM: <s> returns the automatic style with the given name if this document defines it </s>
funcom_train/48383133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TryRange split(int address) { //this is a private class, so address is assumed //to be valid TryRange tryRange = new TryRange(address, endAddress); tryRange.catchAllHandlerAddress = this.catchAllHandlerAddress; tryRange.handlers.addAll(this.handlers); append(tryRange); this.endAddress = address; return tryRange; } COM: <s> this splits the current range into two ranges at the given </s>
funcom_train/20422592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(DataOutput dataOutput) throws IOException { ExternalizableHelper.writeByteArray(dataOutput, getTokenToSerialize(servicePrincipalName)); ExternalizableHelper.writeUTF(dataOutput, getName()); ExternalizableHelper.writeUTF(dataOutput, getServicePrincipalName()); ExternalizableHelper.writeUTF(dataOutput, getMemberString()); } COM: <s> coherence externalizable lite method to serialize this principal </s>
funcom_train/4882231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand2 () { if (backCommand2 == null) {//GEN-END:|233-getter|0|233-preInit // write pre-init user code here backCommand2 = new Command ("Voltar", "Voltar para Menu", Command.BACK, 0);//GEN-LINE:|233-getter|1|233-postInit // write post-init user code here }//GEN-BEGIN:|233-getter|2| return backCommand2; } COM: <s> returns an initiliazed instance of back command2 component </s>
funcom_train/2583013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getStartValue(Comparable series, Comparable category) { int seriesIndex = getSeriesIndex(series); if (seriesIndex < 0) { throw new UnknownKeyException("Unknown 'series' key."); } int itemIndex = getColumnIndex(category); if (itemIndex < 0) { throw new UnknownKeyException("Unknown 'category' key."); } return getStartValue(seriesIndex, itemIndex); } COM: <s> returns the start data value for one category in a series </s>
funcom_train/17174901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParameterPassingSyntax() throws Exception { Script script = TestUtils.createJavaAppScript("src/easyaccept/script/test/script18.txt", new TestFacade()); for(int i = 0; i < 4; i++) { Result result = script.getAndExecuteCommand(); assertNotNull(result); assertFalse(""+i, result.hasError()); assertEquals("OK", result.getResult()); } script.close(); } COM: <s> provide the parameters syntax test </s>
funcom_train/43343224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node convert(File _file) { Node n = new Node(); try { FileInputStream fis = new FileInputStream(_file); n = (Node) BinaryImporter.getInstance().load(fis); return n; } catch (IOException e) { e.printStackTrace(); } return null; } COM: <s> converts given binary file into a node using </s>
funcom_train/882037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String renderTree(HTMLTreeModel model) { StringBuffer buf = new StringBuffer(); buf.append(this.childrenPrefix); TreeNode rootNode = (TreeNode)model.getTreeModel().getRoot(); this.renderNodes(model, rootNode, buf); buf.append(this.childrenSuffix); return buf.toString(); } COM: <s> invoke this method to build the whole html result from passed model </s>
funcom_train/12273851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { // use this when you're ready to clean up try { pbar.dispose(); } catch (Exception e) { } // TODO brett - This closes the vpn window? any reason for this? // try { // parent.dispose(); // } // catch (Exception e) {} } COM: <s> the dispose method removes the progress bar from the screen display </s>
funcom_train/17989323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgress(double curProgress) { m_curProgress = Math.max(m_minProgress, Math.min(m_maxProgress, curProgress)); // Calculate percent complete int percent = (int) (100 * getPercent()); DOM.setStyleAttribute( m_barElement, "width", (percent + "%")); DOM.setElementProperty(m_textElement, "innerHTML", generateText(m_curProgress)); updateTextStyle(percent); // Realign the text redraw(); } COM: <s> set the current progress </s>
funcom_train/24242594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONList toJSONListnoHeader() { // get records JSONList row = new JSONList(); for (Iterator it = resultSetToArrayList.iterator(); it.hasNext();) { row.add(((ObjectDto) it.next()).toJSON()); } return row; } COM: <s> returns a simple jsonlist compliant with js framework </s>
funcom_train/36185343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxHistory() { if (jCheckBoxHistory == null) { jCheckBoxHistory = new JCheckBox(); jCheckBoxHistory.setEnabled(true); jCheckBoxHistory.setBounds(new Rectangle(437, 122, 21, 21)); } return jCheckBoxHistory; } COM: <s> this method initializes j check box history </s>
funcom_train/8534117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyValue getValue(ID propertyID) { if (propertyID == null) return null; if (RDF_ABOUT.equals(propertyID) && fAbout) return getReference(); if (RDF_ID.equals(propertyID) && !fAbout) return getReference(); Map map = getMap(false); return (PropertyValue) (map != null ? map.get(propertyID) : null); } COM: <s> returns a value corresponding to the property with the specified url </s>
funcom_train/19380110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String fName) { try { FileOutputStream fStream = new FileOutputStream(fName); ObjectOutput stream = new ObjectOutputStream(fStream); stream.writeObject(getModel()); stream.flush(); stream.close(); fStream.close(); } catch (Exception e) { e.printStackTrace(); System.err.println("Serialization error: " + e.toString()); } } COM: <s> similarly the save method serializes our combo box s combo box model </s>
funcom_train/6489962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowIssue() { LogTools.trace(logger, 25, "AnalysisController.windowIssue()"); IssueController controller = new IssueController(_analysis); _issueGUI = controller.getFrame(); launchOneShotWindow(_issueGUI, _issueEnabler, "ISSUE WINDOW", _frame); } COM: <s> issue window command handler </s>
funcom_train/41842195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parsesp(String text) throws ParserException{ Parser parser = new Parser(text); NodeList nl = parser.parse(null); TagNameFilter tg = new TagNameFilter(UtilityConstants.pTag); NodeList nla = nl.extractAllNodesThatMatch(tg,true); for(int i=0; i<nla.size();i++){ Node n = nla.elementAt(i); TagNode tn = (TagNode)n; text = "<br><p align=\"left\"><abstr>"+n.toPlainTextString()+"</abstr>"; } return text; } COM: <s> get the abstract text from the result text formatted </s>