__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40359988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddedPropertyInPropertyNames() throws Exception { Document filter = createFilter(false, "foo", "bar"); Set<String> names = filter.getPropertyNames(); assertTrue(names.contains("foo")); // Make sure all the real properties are there too. assertTrue(names.containsAll(createProperties().keySet())); } COM: <s> test added property shows up in the property names </s>
funcom_train/25702012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProperties(String propSheet, String propName) { //System.out.println("getProperties"); String prop = cachedProperties.get(propName); if(prop == null) { prop = XPathEvaluator.getString(propName, getProperties(propSheet)); cachedProperties.put(propName, prop); } //else System.out.println("using cached"); return prop; } COM: <s> get a specific property </s>
funcom_train/21405741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid(){ boolean trueFound = false, falseFound = false; for(int i=0; i<getConditions().size(); i++){ Condition condition = (Condition)this.getConditions().elementAt(i); if(condition.isTrue(formData,true)) trueFound = true; else falseFound = true; } if(getConditions().size() == 1 || getConditionsOperator() == EpihandyConstants.CONDITIONS_OPERATOR_AND) return !falseFound; else if(getConditionsOperator() == EpihandyConstants.CONDITIONS_OPERATOR_OR) return trueFound; return false; } COM: <s> checks conditions of a rule and executes the corresponding actions </s>
funcom_train/46997045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkValidYearMonthDay(int year, int month, int dayOfMonth) { if (!isValidYearMonthDay(year, month, dayOfMonth)) { throw new IllegalArgumentException("Year/month/day combination is invalid: " + year + "/" + month + "/" + dayOfMonth); } } COM: <s> throws an exception if the input isnt a valid day in the gregorian </s>
funcom_train/34595138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkBattleEnd(int i) { if (getAliveCount(i) != 0) return; int opponent = ((i == 0) ? 1 : 0); if (getAliveCount(opponent) == 0) { // It's a draw! opponent = -1; } informVictory(opponent); } COM: <s> check if one party has won the battle and inform victory if so </s>
funcom_train/17589203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int find(int x) { if (array[x] < 0) { return x; } else { int t = find(array[x]); if (TRACE && t != array[x]) { System.out.println("\t"+x+"-c>"+t); } array[x] = t; return t; } } COM: <s> perform a find with path compression </s>
funcom_train/21234354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInitWithJavaConfigurationContainer() { Controller controller = new Controller(); controller.setConfigFiles( new String [] {"siouxsie/mvc/impl/test-controller-conf.xml"} ); controller.addConfigurationProvider(new TestConfigurationProvider()); controller.init(); assertNotNull(controller.getConfiguration()); SomeInterface someObj = controller.getConfiguration().getContainer().getInstance(SomeInterface.class); assertEquals(SomeImpl.class,someObj.getClass()); } COM: <s> init with java container configuration </s>
funcom_train/22033525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { stopRenderer(); display = null; displayRenderer = null; if (component instanceof DisplayPanelJ3D) { ((DisplayPanelJ3D) component).destroy(); } else if (component instanceof DisplayAppletJ3D) { ((DisplayAppletJ3D) component).destroy(); } component = null; // WLH 17 Dec 2001 captureImage = null; } COM: <s> stop the applet </s>
funcom_train/46724978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } if (e.getID() == WindowEvent.WINDOW_ACTIVATED) { e.getWindow().repaint(); } } COM: <s> closes or repaints the window </s>
funcom_train/25540966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dataread(List<ValidObservation> observations) { numdat = observations.size(); dt = new double[numdat + 1]; dx = new double[numdat + 1]; for (int i = 1; i <= observations.size(); i++) { ValidObservation ob = observations.get(i - 1); dt[i] = ob.getJD(); dx[i] = ob.getMag(); } } COM: <s> reads data from the specified observation list </s>
funcom_train/1953296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TimeLine_time_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TimeLine_time_feature", "_UI_TimeLine_type"), TemporalPackage.Literals.TIME_LINE__TIME, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the time feature </s>
funcom_train/23944108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(String attributeName) { // check first for a namespace-less attribute String attr = attributes.get(new XAttributeName(attributeName, null, null)); if (attr == null) { // find any attribute ignoring namespace for (XAttributeName n : attributes.keySet()) { if (Objects.equal(n.name, attributeName)) { return attributes.get(n); } } } return attr; } COM: <s> retrieve the first attribute which has the given local attribute name </s>
funcom_train/25365822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPostItemsDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Room_postItemsDescription_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Room_postItemsDescription_feature", "_UI_Room_type"), LeveleditorPackage.Literals.ROOM__POST_ITEMS_DESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the post items description feature </s>
funcom_train/18895428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(int type) { assert refCount > 0; int count = objectStackCounts[type]; if (count > 0) { Object[] os = objectStacks[type]; Object o = os[--count]; os[count] = null; objectStackCounts[type] = count; return o; } if (nextPool != null) { synchronized (nextPool) { return nextPool.get(type); } } return null; } COM: <s> gets a pooled object of a given type from this pool </s>
funcom_train/46825019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawMouseFiringCursor(Graphics g) { Point p = this.model.getBoardFiringPoint(); if (p != null) { g.setColor(Color.red); int xx = p.x * (CELL_SIZE + CELL_SPACING) + 1; int yy = p.y * (CELL_SIZE + CELL_SPACING) + 1; g.fillRect(xx, yy, CELL_SIZE, CELL_SIZE); } } COM: <s> draw mouse firing cursor </s>
funcom_train/18518435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logMsgs(MessageAgregate agrMessages, Level level) { LogWrapper logger = LogWrapper.getInstance(this.getClass()); for (Iterator it = agrMessages.getMessageCollection().iterator(); it.hasNext();) { CodedMessage codMsg = (CodedMessage) it.next(); logger.log(translateMessage(codMsg), level); } } COM: <s> logs the given messages with the specified level </s>
funcom_train/11651986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int index, String url, String user, String pass, String domain, String realm) { Authorization auth = new Authorization(url, user, pass, domain, realm); if (index >= 0) { getAuthObjects().set(index, new TestElementProperty(auth.getName(), auth)); } else { getAuthObjects().addItem(auth); } } COM: <s> update an authentication record </s>
funcom_train/1651229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTMLNode createAlerts() { HTMLNode alertsNode = new HTMLNode("div"); UserAlert[] alerts = getAlerts(); int totalNumber = 0; for (int i = 0; i < alerts.length; i++) { UserAlert alert = alerts[i]; if (!alert.isValid()) continue; totalNumber++; alertsNode.addChild("a", "name", alert.anchor()); alertsNode.addChild(renderAlert(alert)); } if (totalNumber == 0) { return new HTMLNode("#", ""); } return alertsNode; } COM: <s> write the alerts as html </s>
funcom_train/599351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeValues(Class<?> clazz, Object o, Map<String, Object> values) { for (Map.Entry<String, Object> value : values.entrySet()) { writeValue(o, value.getKey(), value.getValue()); } } COM: <s> tries to write all attributes from given map into the object </s>
funcom_train/8627670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addSession(Connection conn) throws SQLException { WebSession session = createNewSession("local"); session.setShutdownServerOnDisconnect(); session.setConnection(conn); session.put("url", conn.getMetaData().getURL()); String s = (String) session.get("sessionId"); return url + "/frame.jsp?jsessionid=" + s; } COM: <s> create a session with a given connection </s>
funcom_train/32800578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStaticPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_DefinitionExpCS_static_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DefinitionExpCS_static_feature", "_UI_DefinitionExpCS_type"), OclPackage.Literals.DEFINITION_EXP_CS__STATIC, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the static feature </s>
funcom_train/6274073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cutoff(int cutoffUnder, int cutoffOver) { if (cutoffUnder > 0 || cutoffOver < Integer.MAX_VALUE) { for (Iterator<StringList> it = iterator(); it.hasNext();) { StringList ngram = (StringList) it.next(); int count = getCount(ngram); if (count < cutoffUnder || count > cutoffOver) { it.remove(); } } } } COM: <s> deletes all ngram which do appear less than the cutoff under value </s>
funcom_train/19225471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initQualifierTypes() { qualifierTypes.put (TuftsDLAuthZ.ASSET, new VueQualifierType (VueQualifierType.QUALIFIER_TYPE_KEY+"Fedora.Asset", "A Fedora Asset.")); qualifierTypes.put (TuftsDLAuthZ.OWNED_ASSET, new VueQualifierType (VueQualifierType.QUALIFIER_TYPE_KEY+"Fedora.OwnedAsset", "An owned Fedora Asset.")); } COM: <s> initialize the qualifier types </s>
funcom_train/24368302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean handlePane(LinkedHashMap<String, String> attrs) { try { String location = (String)attrs.get("location"); double dividerLocation = Double.parseDouble((String)attrs.get("divider")); int orientation = Integer.parseInt((String)attrs.get("orientation")); tmp_panes.add(new DockSplitPaneXml(location, dividerLocation, orientation)); return true; } catch(Exception e) { Application.debug(e.getMessage() + ": " + e.getCause()); return false; } } COM: <s> handle a pane </s>
funcom_train/20882663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setup(int order, List words, List preds) { vocab = new Discrete(words); predVocab = new Discrete(preds); vocabPdf = new DiscreteProbDist(predVocab); this.order = order; numStates = (int)Math.pow((double)words.size(), (double)order - 1); states = new NgrammarState[numStates]; for (int i = 0; i < numStates; i++) states[i] = new NgrammarState(i, predVocab); } COM: <s> initialize an ngrammar with the given order word list and predictee </s>
funcom_train/15557375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VarBinding lookupVar( String id ) { SymTable symtab = currentSymTable() ; VarBinding rslt = null ; // search all enclosing scopes while( symtab != null ) { if ( symtab.varExist( id ) ) { rslt = symtab.getVar( id ) ; break ; // found it, stop search } else { // not found - go up to the enclosing scope symtab = symtab.parent() ; } } return rslt ; } COM: <s> get the binding for the given symbol in the context of current scope </s>
funcom_train/1812477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void askForState() { try { G2CLMessage m = createGetStateMessage(); logger.log(Level.FINER,"asking " + this.stateProvider + " for the group state"); data.send(m, service, null, this.stateProvider, (Annotation[]) null); } catch (Exception e) { logger.log(Level.SEVERE,"error requesting state", e); } } COM: <s> ask state provider for the group state </s>
funcom_train/10482511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List extractResponses(String type) { List responses = new ArrayList(); Iterator i = queuedResponses.iterator(); while (i.hasNext()) { IMAPUntaggedResponse response = (IMAPUntaggedResponse)i.next(); // if this is of the target type, move it to the response set. if (response.isKeyword(type)) { i.remove(); responses.add(response); } } return responses; } COM: <s> extract all responses from the pending queue that </s>
funcom_train/3375199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(ComboBoxModel aModel) { ComboBoxModel oldModel = dataModel; if (oldModel != null) { oldModel.removeListDataListener(this); } dataModel = aModel; dataModel.addListDataListener(this); // set the current selected item. selectedItemReminder = dataModel.getSelectedItem(); firePropertyChange( "model", oldModel, dataModel); } COM: <s> sets the data model that the code jcombo box code uses to obtain </s>
funcom_train/26559309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debugAttachWait() { int nDebugWait = m_sessionConfig.getDebugWait(); if( nDebugWait > 0 ) { s_logger.info("Waiting [" + nDebugWait + "] milliseconds for debugger attach"); try { Thread.sleep(nDebugWait); } catch(InterruptedException ie) {} s_logger.info("Done waiting"); } } COM: <s> wait for a debugger to attach if weve been asked to </s>
funcom_train/17544322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Widget attachEdgeWidget(String edge) { VMDConnectionWidget connectionWidget = new VMDConnectionWidget(this, router); connectionLayer.addChild(connectionWidget); connectionWidget.getActions().addAction(createObjectHoverAction()); connectionWidget.getActions().addAction(createSelectAction()); connectionWidget.getActions().addAction(moveControlPointAction); return connectionWidget; } COM: <s> implements attaching a widget to an edge </s>
funcom_train/35867086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReceiveProxyTicket() throws ServletException, IOException { this.proxyTicketReceptor.init(this.basicConfig); this.mockRequest.setRequestURL("https://someplace.com/app/casProxyReceptor?pgtIou=FOO&pgtId=BAR"); this.proxyTicketReceptor.doGet(this.mockRequest, this.mockResponse); // TODO: test for proper response } COM: <s> test that the receptor successfully receives tickets without throwing an exception </s>
funcom_train/39475122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class getDirectClass(String string) { String[] table = XMLObjectWriter.DIRECT_CLASSES_TABLE; for (int i = 0; i < table.length; i+=2) { if(table[i+1].equals(string)) try { return Class.forName(table[i]); } catch (ClassNotFoundException ex) { throw new Error(ex); // won't happen } } return null; } COM: <s> get direct class </s>
funcom_train/37000700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object aValue, int aRowIndex, int aColumnIndex) { Precondition.argumentEquals("aRowIndex", VALUE_COLUMN, aColumnIndex); String key = key(aRowIndex); preferences.put(key, (String)aValue); } COM: <s> changes the value of a preference </s>
funcom_train/50912018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { // don't change this routine!!! StringBuffer s = new StringBuffer(); s.append(S_LBRAK); for (int i = 0; i < nelem; i++) { if (i > 0) { s.append(S_COMMA); } s.append(array[i]); } s.append(S_RBRAK); return s.toString(); } COM: <s> gets values as string </s>
funcom_train/18956371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileName(String path) { int posA = path.lastIndexOf("/"); int posB = path.lastIndexOf("\\"); int pos = ((posA == -1) ? posB : posA); return ((pos == -1) ? path : path.substring(pos + 1)); } COM: <s> returns the filename part of a path </s>
funcom_train/36259187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int showConfirmationDialog(@NotNull final String titleSelector, @NotNull final String message, final int optionType) { return JOptionPane.showConfirmDialog(null /*this.getParent()*/, message, actionBuilder.getString(titleSelector), optionType, JOptionPane.QUESTION_MESSAGE); } COM: <s> display a confirmation dialog </s>
funcom_train/2641981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TDoubleArrayList inverseGrep(TDoubleProcedure condition) { TDoubleArrayList list = new TDoubleArrayList(); for (int i = 0; i < _pos; i++) { if (! condition.execute(_data[i])) { list.add(_data[i]); } } return list; } COM: <s> searches the list for values which do b not b satisfy </s>
funcom_train/2057710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFileUploadField() { fileUploadField = new FileUploadField(); fileUploadField.setName("file"); fileUploadField.setAllowBlank(false); fileUploadField.setFieldLabel("File"); fileUploadField.setStyleAttribute("overflow", "hidden"); fileUploadPanel.setSpacing(3); fileUploadPanel.add(fileUploadField); } COM: <s> creates the file upload field </s>
funcom_train/43326338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IVector eliminate(int pos) { IVector rv = new IVector(); rv.data = new int[data.length - 1]; System.arraycopy(data, 0, rv.data, 0, pos); System.arraycopy(data, pos+1, rv.data, pos, data.length - pos - 1); return rv; } COM: <s> return a copy of the vector with one position removed </s>
funcom_train/35293842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processAcctReport() throws COPSException, IOException { Hashtable acctReport = new Hashtable(); if (this.policyProcess != null) { acctReport = this.policyProcess.getAcctData(this); } this.msgSender.sendReport(acctReport, ReportType.ACCOUNTING); this.status = PEPRequestStateManager.ACCT_TIMEOUT; } COM: <s> processes an accounting report </s>
funcom_train/22024825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCartesianView(float x, float y, float width, float height){ float xScale = getWidth()/width; float yScale = getHeight()/height; AffineTransform translation = AffineTransform.getTranslateInstance(-x, y); AffineTransform scaling = AffineTransform.getScaleInstance(xScale, -yScale); AffineTransform Tx = scaling; Tx.concatenate(translation); viewTransform = Tx; try { inverse = viewTransform.createInverse(); } catch (NoninvertibleTransformException e) { e.printStackTrace(); } } COM: <s> sets up the view transform so that </s>
funcom_train/19646007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand1() { if (exitCommand1 == null) {//GEN-END:|43-getter|0|43-preInit // write pre-init user code here exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|43-getter|1|43-postInit // write post-init user code here }//GEN-BEGIN:|43-getter|2| return exitCommand1; } COM: <s> returns an initiliazed instance of exit command1 component </s>
funcom_train/48706104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cacheEntryFlushed(CacheEntryEvent event) { // do nothing, because a group or other flush is coming if (!Cache.NESTED_EVENT.equals(event.getOrigin())) { flushed("entry " + event.getKey() + " / " + event.getOrigin()); } } COM: <s> event fired when an entry is flushed from the cache </s>
funcom_train/28150658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public String toString() { if (pos==Pos.UNKNOWN) return msg; if (pos.filename.length()>0) return "Line "+pos.y+" column "+pos.x+" in "+pos.filename+":\n"+msg; return "Line " + pos.y + " column " + pos.x + ":\n" + msg; } COM: <s> returns a textual description of the error </s>
funcom_train/4930480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkFieldValue( String name, Boolean value, ScaffoldInfo info, Map conceptProperties) { Storage params = info.getMacroParams(); if(checkCardinality(name, value, conceptProperties, info) == false){ return false; } if ( value == null && params.getBoolean( REQUIRED_PARAM, false ) ) { info.addError( "Please enter a value." ); return false; } return true; } COM: <s> checks that the field value matches the requirements </s>
funcom_train/14009165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer size(Object list) { if (this.isArray(list)) { // Thanks to Eric Fixler for this refactor. return new Integer(Array.getLength(list)); } if (!this.isList(list)) { return null; } return new Integer(((List) list).size()); } COM: <s> gets the size of a list array </s>
funcom_train/10510375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Task getThreadTask(Thread thread) { synchronized(threadTasks) { Task task = (Task) threadTasks.get(thread); if (task == null) { ThreadGroup group = thread.getThreadGroup(); while (task == null && group != null) { task = (Task) threadGroupTasks.get(group); group = group.getParent(); } } return task; } } COM: <s> get the current task associated with a thread if any </s>
funcom_train/24050452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getErrorMessage() { if (isValid) return "no intersections found"; Coordinate[] intSegs = segInt.getIntersectionSegments(); return "found non-noded intersection between " + WKTWriter.toLineString(intSegs[0], intSegs[1]) + " and " + WKTWriter.toLineString(intSegs[2], intSegs[3]); } COM: <s> returns an error message indicating the segments containing the </s>
funcom_train/28774613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gauge getGauge3() { if (gauge3 == null) {//GEN-END:|132-getter|0|132-preInit // write pre-init user code here gauge3 = new Gauge("Household", false, 100, 50);//GEN-LINE:|132-getter|1|132-postInit // write post-init user code here }//GEN-BEGIN:|132-getter|2| return gauge3; } COM: <s> returns an initiliazed instance of gauge3 component </s>
funcom_train/1151341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static Prior parsePrior(Element e, Prior base) throws BoxerXMLException { XMLUtil.assertName(e, Priors.NODE.PRIOR); return mkPrior( Type.valueOf( XMLUtil.getAttributeOrException(e, ATTR.TYPE)), XMLUtil.getAttributeDouble( e, ATTR.MODE), XMLUtil.getAttributeDouble( e, ATTR.VAR), XMLUtil.getAttributeBoolean( e, ATTR.ABSOLUTE), XMLUtil.getAttributeInt( e, ATTR.SKEW, 0), base); } COM: <s> parses one prior xml element into a prior object of an </s>
funcom_train/9070461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Option findOption(Option option) { Option opt = null; for (Iterator<Option> it = options.iterator(); it.hasNext();) { if ((opt = (Option) it.next()).compareTo(option) == 0) { break; } else { opt = null; } } return opt; } COM: <s> finds the given option in the option list </s>
funcom_train/15685130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewElement(Object businessData) { // We know the last selected object (it is in the valueDataPath) // try { Object lastSelected = getContext().get(getValueDataPath()); if (lastSelected == null) { getContext().addToCollection(getAbsoluteCollectionDataPath(), businessData); } else { addNewElement(lastSelected, businessData); } } catch (MonoiException exception) { exception.printStackTrace(); } } COM: <s> adds a child to the last selected node </s>
funcom_train/37444748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRequest(final HttpServletRequest request) { this.request = request; @SuppressWarnings("unchecked") final Enumeration<String> enumeration = getSession().getAttributeNames(); while (enumeration.hasMoreElements()) { final Object object = getFromSession(enumeration.nextElement()); if (object instanceof AbstractJSPBean) { ((AbstractJSPBean)object).setRequestFromOtherBean(request); } } } COM: <s> sets the http request object from the jsp to this bean </s>
funcom_train/31481250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public article fetchBody(String msgID) throws NNTPException { this.command("BODY " + msgID); if (false == this.checkResponse()) { throw new NNTPException(__me + ".fetchBody(): " + this.getLastStatusResponse()); } article art = new article(); art.setHEAD(this.getLastTextResponse()); return art; } COM: <s> fetch an articles body lines by message id or number </s>
funcom_train/256968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if (key == KeyEvent.VK_ENTER) { // Check if thread is already running if (similarityThread != null) while (similarityThread.isAlive()) Common.sleep(100); // Start thread to fetch similar requirements similarityThread = new FetchSimilar(gui.getRsForVisibleTab()); similarityThread.start(); } } COM: <s> fetches similar requirements if enter key is pressed </s>
funcom_train/21020212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { // rotate colors if (m_iColorOffset == NUMBER_OF_BARS) { m_iColorOffset = 0; } else { m_iColorOffset++; } // repaint if (m_oBarsScreenBounds != null) { repaint(m_oBarsScreenBounds); } else { repaint(); } } COM: <s> called to animate the rotation of the bars colors </s>
funcom_train/24418547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getKey(int key) { try { String shift; if (isShifted) { shift = " - "; } else { shift = " "; } toastMsg("ASN " + _newCmd + shift + key); if (!_sqlhelper.asn(_db, _newCmd, key, isShifted)) toastMsg("No such function: " + _newCmd); } catch (Exception e) { Utils.showException(e.toString(), _cont); } reset(); } COM: <s> assign a function to the key pressed </s>
funcom_train/36243174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Task addFragment(IExosTaskEventListener listener, int accountId, String fragmentId, byte[] data, int dataLen, int groupId){ log.debug("add fragment: "+fragmentId); try{ SetFragmentTask task = new SetFragmentTask(listener, accountId, fragmentId, data, dataLen, groupId); queue.addTask(task); return task; } catch (Exception ex) { log.fatal(ex.getMessage(), ex); } return null; } COM: <s> creates a task to add a fragment for a certain group and account </s>
funcom_train/18166705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void customize(Properties properties) throws Exception { for (Iterator<?> it = properties.keySet().iterator(); it.hasNext(); ) { String key = (String) it.next(); if (key.equalsIgnoreCase(activeProperty)) { String val = properties.getProperty(key); active = Boolean.valueOf(val).booleanValue(); } else if (key.equalsIgnoreCase(temporaryProperty)) { tmpDir = properties.getProperty(key); } } } COM: <s> downloader becomes activated via a property in csf </s>
funcom_train/18472604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateSeriesTotal(CategoryDataset dataset, int series) { double result = 0.0; for (int i = 0; i < dataset.getColumnCount(); i++) { Number value = dataset.getValue(series, i); if (value != null) { result = result + value.doubleValue(); } } return result; } COM: <s> calculates a series total </s>
funcom_train/13451009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SerializerMapper createDefaultMapper() throws ServletException { if (this.packagePrefix == null || this.packagePrefix.length() == 0) { throw new ServletException( "Set the init-param 'packagePrefix' in web.xml or " + "derive a class from " + getClass().getName() + " and overwritten createMapper()"); } return new SerializerMapper(this.packagePrefix); } COM: <s> creates an instance of the default mapper which will use the given map </s>
funcom_train/43200109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFriend() { String endorsement = "is-friend-in-the-past"; Agent jNode = (Agent)getRandomNodeOut(); // will be null if no outEdges. if (jNode != null) { removeEdgesTo(jNode); jNode.removeEdgesFrom(this); removeEdgesFrom(jNode); jNode.removeEdgesTo(this); jNode.friends.remove(this); jNode.assertEndorsement(this, endorsement); this.friends.remove(jNode); this.assertEndorsement(jNode, endorsement); } } COM: <s> removes a link between this agent and one chosen at </s>
funcom_train/43348278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPageLabel(int nPage, int numPages) { if (numPages == 0) numPages = 1; if (nPage > numPages) nPage = numPages; String text = mResources.getString("gui.main.page.label.text1") + " " + nPage + " " + mResources.getString("gui.main.page.label.text2") + " " + numPages; mPageLabel.setText(text); } COM: <s> sets the page label </s>
funcom_train/1482822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyTo(byte[] target, int targetOffset) { if (this.length > target.length + targetOffset) { throw new ArrayIndexOutOfBoundsException(); } System.arraycopy(this.data, this.offset, target, targetOffset, this.length); } COM: <s> copies the payload data to a byte array </s>
funcom_train/46477862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDriversPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SecurityContextModel_Drivers_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SecurityContextModel_Drivers_feature", "_UI_SecurityContextModel_type"), SecurityContextPackage.Literals.SECURITY_CONTEXT_MODEL__DRIVERS, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the drivers feature </s>
funcom_train/7621131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled(boolean enabled) { setFlags(enabled ? ENABLED : DISABLED, ENABLED_MASK); /* * The View most likely has to change its appearance, so refresh * the drawable state. */ refreshDrawableState(); // Invalidate too, since the default behavior for views is to be // be drawn at 50% alpha rather than to change the drawable. invalidate(); } COM: <s> set the enabled state of this view </s>
funcom_train/1444801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Info parseChangeType(String cmd) throws ParseException { ReInit(new StringReader(cmd)); this.cmd = cmd; try { startChangeType(); } catch (ParseException e) { System.out.println("Exception during Parsing with Command:"); System.out.println(" " + cmd +"\r\n"+ e); } return cpti; } COM: <s> parses the change player type info </s>
funcom_train/29774012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle(Object... params) { ICommandService cservice = (ICommandService) PlatformUI.getWorkbench() .getService(ICommandService.class); Command c = cservice.getCommand(id); printCommandInfo(c); //TODO: How can we pass parameters/context etc here? What is expected by commands? ExecutionEvent ee = new ExecutionEvent(c, new HashMap<String, String>(), null, null); try { c.executeWithChecks(ee); } catch (Exception ex) { //TODO: Exception Handling! ex.printStackTrace(); } } COM: <s> calls simplest eclipse commands no parametrisation possible by now for </s>
funcom_train/23246537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SAXParser createParser() { try { return SAXParserFactory.newInstance().newSAXParser(); } catch (ParserConfigurationException e) { throw new OsmosisRuntimeException("Unable to create SAX Parser.", e); } catch (SAXException e) { throw new OsmosisRuntimeException("Unable to create SAX Parser.", e); } } COM: <s> creates a new sax parser </s>
funcom_train/44420823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessageToNetwork(ORPGMessage msg){ if (msg == null ){ return;} //sanity check //address resolution not required by client side routing if (!inClientMode){ msg = resolveMessageAddress(msg); } RouteServiceThread sendThread = threadPool.getServiceThread(); sendThread.send(msg); //hand message to RouteServiceThread and release the thread. } COM: <s> transfers an orpgmessage to the network and does route resolution if required </s>
funcom_train/22848654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Combo createComboControl(Composite parent, String[] items) { Combo combo = new Combo(parent, SWT.BORDER | SWT.SINGLE); combo.setItems(items); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalSpan = 1; combo.setLayoutData(gridData); return combo; } COM: <s> creates the combo control </s>
funcom_train/43337081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resource getResource(String id) { Iterator<ExtendedLinkElement> extendedLinkElementsIterator = extendedLinkElements.iterator(); while (extendedLinkElementsIterator.hasNext()) { ExtendedLinkElement currExLinkElement = (ExtendedLinkElement) extendedLinkElementsIterator .next(); if (currExLinkElement.isResource() && currExLinkElement.getId() != null && currExLinkElement.getId().equals(id)) { return (Resource) currExLinkElement; } } return null; } COM: <s> returns a resource for a certain id </s>
funcom_train/43608876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean containsState(List<SMEdge> path, State s) { for (SMEdge edge : path) { if((edge.getSource()!=null && edge.getSource().equals(s)) || (edge.getTarget()!=null && edge.getTarget().equals(s))) { return true; } } return false; } COM: <s> returns true if the given path contains the given state </s>
funcom_train/18254951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Object o) { //Make sure the agent (if it is an agent) has not been deleted from this collection.. if (!(o instanceof Location) || !((Location) o).isDelete() || !getContext().isHome((Location) o)) { return collection.contains(o); } else { return false; } } COM: <s> returns true if the context collection contains the object agent </s>
funcom_train/51294508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void repaintDate() { tfMonthYear.setText(df.format(gregorianCalendar.getTime())); gregorianCalendar.setFirstDayOfWeek(Calendar.MONDAY); int date = gregorianCalendar.get(Calendar.DATE); gregorianCalendar.set(Calendar.DATE, 1); model.setStart(gregorianCalendar.get(Calendar.DAY_OF_WEEK)); model.setMonthDays(gregorianCalendar.getActualMaximum(Calendar.DATE)); gregorianCalendar.set(Calendar.DATE, date); } COM: <s> draw date in the calendar </s>
funcom_train/45740594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommandDetails () { if (itemCommandDetails == null) {//GEN-END:|17-getter|0|17-preInit // write pre-init user code here itemCommandDetails = new Command ("Details", Command.ITEM, 0);//GEN-LINE:|17-getter|1|17-postInit // write post-init user code here }//GEN-BEGIN:|17-getter|2| return itemCommandDetails; } COM: <s> returns an initiliazed instance of item command details component </s>
funcom_train/46763214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BodyType createSSBody() { BodyType body = new BodyType(); AddPrescriber addPrescriber = new AddPrescriber(); DirectoryPrescriberType type = new DirectoryPrescriberType(); type.setIdentification(createPrescriberId("")); type.setName(createDirectoryName("","","","","")); //Sending TE as the qualifier which identifies the primary number which is //all we support for now type.setPhoneNumbers(createPhoneNumbers("","TE")); addPrescriber.setPrescriber(type); body.setAddPrescriber(addPrescriber); return body; } COM: <s> create the surescripts message body </s>
funcom_train/46277625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getImplementsText() { // See if this class extends another class String implementsText = " implements java.io.Serializable"; if (type.isSimpleType()) { implementsText += ", org.apache.axis.encoding.SimpleType"; } implementsText += " "; return implementsText; } COM: <s> returns the appropriate implements text </s>
funcom_train/17824437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(String wsdlURL, String cid, String userName, String password) throws WiseConnectionException { String tmpDir = wiseProperties.getProperty("wise.tmpDir"); if (tmpDir == null) { tmpDir = getCurrentTmpDeployDir(); } this.init(wsdlURL, cid, userName, password, tmpDir); } COM: <s> init method retrieves the wsdl parses it using wscontract consume </s>
funcom_train/22290773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point destinationMousePoint() { if (destinationView == null) { return null; } else if (dragView != null) { Point point = new Point(dragView._lastX, dragView._lastY); dragView.superview().convertPointToView(destinationView, point, point); return point; } else { return new Point(0, 0); } } COM: <s> returns the mouses location in the current destination views </s>
funcom_train/31911639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isLatinChar(char c) { Character.UnicodeBlock block = Character.UnicodeBlock.of(c); if (block == Character.UnicodeBlock.BASIC_LATIN || block == Character.UnicodeBlock.LATIN_1_SUPPLEMENT || block == Character.UnicodeBlock.LATIN_EXTENDED_ADDITIONAL || block == Character.UnicodeBlock.LATIN_EXTENDED_A || block == Character.UnicodeBlock.LATIN_EXTENDED_B) { return true; } else { return false; } } COM: <s> returns true if the specified character is within one of the latin </s>
funcom_train/31894782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean atHome() { Point loc = getTileLocation(); try { int xDist = (int) (homeTile.getX() - loc.getX()), yDist = (int) (homeTile .getY() - loc.getY()); if (xDist * xDist > 1 || yDist * yDist > 1) return false; else return true; } catch (NullPointerException e) { homeTile = getTileLocation(); return true; } } COM: <s> check if mother hen is at home aka starting position </s>
funcom_train/4684491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean freshenRoute(long address) { RoutingEntry entry = getEntry(address); if (entry == null) { Debug.print("[LQRP] Attempt to freshen non-existant route to " + IEEEAddress.toDottedHex(address)); return false; } else { freshenRoute(entry); return true; } } COM: <s> increases the expiry time for a route that is specified by the destination </s>
funcom_train/29707227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkValidTableExtension() throws JFitsioFatalException { if (this.currentHduType != HduType.HDU_BINARY_TBL && this.currentHduType != HduType.HDU_ASCII_TBL) { throw new JFitsioFatalException(String.format("CHDU(%d) does not contain a table extension: %s", this.currentHdu, this.currentHduType)); } } COM: <s> make sure the chdu is a valid fits table extension </s>
funcom_train/29706181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeHeader(RandomAccessFile rFile_p) throws IOException { rFile_p.seek(0); rFile_p.writeShort(_size); rFile_p.writeShort(_currentCount); rFile_p.writeShort(_lastPredefIndex); rFile_p.writeShort(_elementSize); rFile_p.writeShort(_templateRows); rFile_p.writeShort(_templateCols); } COM: <s> update the headers info </s>
funcom_train/16462267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateGroupList() { Object groupListComponent = getGroupTreeComponent(); Object selected = this.uiController.getSelectedItem(groupListComponent); this.uiController.removeAll(groupListComponent); this.uiController.add(groupListComponent, this.uiController.getNode(this.uiController.rootGroup, true)); this.uiController.setSelected(selected, groupListComponent); updateContactList(); } COM: <s> updates the group tree </s>
funcom_train/47109424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetPassword(ActionEvent ae) { setRequestSend(false); // check if a token is existing EntityManager manager = null; try { manager = EntityManagerFactory.createEntityManager(); handleRequest(manager); } catch (Exception ex) { logger.fatal("Failed to reset password for '" + username + "'", ex); FacesUtils.addErrorMessage("Interner Fehler beim Zurücksetzen des Passwortes"); } finally { manager = EntityManagerHelper.close(manager); } } COM: <s> process the reset request </s>
funcom_train/39800840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void installNavigationActions() { installWrapper("scrollToPreviousMonth", "previousMonth", monthView .getComponentOrientation().isLeftToRight() ? monthDownImage : monthUpImage); installWrapper("scrollToNextMonth", "nextMonth", monthView .getComponentOrientation().isLeftToRight() ? monthUpImage : monthDownImage); } COM: <s> installs and configures navigational actions </s>
funcom_train/47023381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand2() { if (okCommand2 == null) {//GEN-END:|259-getter|0|259-preInit // write pre-init user code here okCommand2 = new Command("Ok", Command.OK, 0);//GEN-LINE:|259-getter|1|259-postInit // write post-init user code here }//GEN-BEGIN:|259-getter|2| return okCommand2; } COM: <s> returns an initiliazed instance of ok command2 component </s>
funcom_train/33158621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendSignal(ObjectOutputStream out, int code) { try { out.writeInt(code); out.flush(); } catch (IOException e) { logger_.log(Level.FINE, "Error trying to send signal :" + code + " (" + e.toString() + ")"); } } COM: <s> sends a single int code on the connected socket </s>
funcom_train/22316432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getWidth(int frame, int transform) { SingleVOITransforms useTransform = ((this.arrayOfTransforms == null) || (frame >= this.arrayOfTransforms.length)) ? this.commonTransforms : this.arrayOfTransforms[frame]; SingleVOITransform singleTransform = (SingleVOITransform) (useTransform .get(transform)); return singleTransform == null ? 0 : singleTransform.width; } COM: <s> get the window width of the particular transform available for a particular </s>
funcom_train/28355346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createChannelModels() { final int count = 4; channelModels = new ChannelModel[count]; for ( int index = 0 ; index < count ; index++ ) { String channelId = "ch" + (index+1); ChannelModel channelModel = new ChannelModel(channelId, timeModel); channelModels[index] = channelModel; channelModel.addChannelModelListener(this); } } COM: <s> create the channel models for the scope </s>
funcom_train/41489378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AclImpl fetchAcl(ObjectIdentity oid, Sid sid) throws metaphor.service.SecurityException { try { return (AclImpl) getMutableAclService().readAclById(oid, new Sid[] {sid}); } catch (NotFoundException e) { return (AclImpl) getMutableAclService().createAcl(oid); } } COM: <s> retrieves or creates an acl for the object identity and security identifier </s>
funcom_train/5379714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireApplyEditorValue() { Object[] array = listeners.getListeners(); for (int i = 0; i < array.length; i++) { final ICellEditorListener l = (ICellEditorListener) array[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.applyEditorValue(); } }); } } COM: <s> notifies all registered cell editor listeners of an apply event </s>
funcom_train/41880031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrimariesData(double[][] p ){ for(int i=0; i<mHeight; i++){ for(int j = 0; j<mWidth; j++){ //primariesValues[i][j] = p[i][j]; primariesField[i][j].setText(doubleToString(p[i][j],3)); //System.out.println(doubleToString(p[i][j],3) + " " + p[i][j]); } } this.repaint(); //this.pack(); } COM: <s> the purpose of that function is to get data from external </s>
funcom_train/15540633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFixedPosition(final boolean resized) { if (resized) { this.initLeft = Window.getClientWidth() - this.initRight; } else { this.initTop = this.getPopupTop(); this.initLeft = this.getPopupLeft() - Window.getScrollLeft(); this.initRight = Window.getClientWidth() - this.initLeft; } } COM: <s> todo what happens if css botton position instead top is set </s>
funcom_train/37852811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryService let(String variableName, Object value) { if (variableName == null) throw new NullPointerException("null variable name"); if (variableName.startsWith("$")) variableName = variableName.substring(1); if (variableName.length() == 0) throw new IllegalArgumentException("empty variable name"); return let(QName.parse(variableName, namespaceBindings, ""), value); } COM: <s> bind a variable to the given value within all query expression evaluated subsequently </s>
funcom_train/13596455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void markWordProperNoun(String word) { WordData wordData = getWord(word); int oldStatus = wordData.getStatus(); wordData.setStatus(WordData.STATUS_PROPER_NOUN); Integer oldStatusInt = new Integer(oldStatus); removeWordFromStatusMap(wordData, oldStatusInt); Integer statusInt = new Integer(wordData.getStatus()); addToWordStatusMap(wordData, statusInt); extractor.markWordProperNoun(word); notifyWordStatusChanged(wordData, oldStatus, WordData.STATUS_PROPER_NOUN); } COM: <s> mark the word as proper noun </s>
funcom_train/49824308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Project makeProject3() { Project project = new Project(); project.setOwner(testUser1); project.setName(testProject3Name); project.setDescription(testProject3Desc); project.setStartTime(testProject3Start); project.setEndTime(testProject3End); project.setUriPatterns(testProject3Uris); return project; } COM: <s> create a test project3 </s>