__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40306630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyGlobalChat(Player from, String message) { if (m_isClientGame) { //when connected to external server, messages will be bounced back, so dont notify clients directly m_serverHandler.notifyGlobalMessage(from, message); return; } Notification n = new Notification(Notification.NOTIF_TYPE_CHATMESSAGE, null); n.setParam(1,from); n.setParam(2,message); setChanged(); notifyObservers(n); } COM: <s> notify all players about a chatmessage </s>
funcom_train/20860553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element mergePathToTags(Path path) throws Exception { // searching for it in the tree boolean create = false; Element element = document.getRootElement(); for (PathElement pe : path.getElements()) { // insertion point Element child = findMatchingChild(element, pe); if (child == null) { create = true; child = element; } if (create) { Element newElement = makeElement(pe); element.addContent(newElement); element = newElement; } else { element = child; } } return element; } COM: <s> appends the path to the tag extending the tag tree when necessary </s>
funcom_train/34084129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point createPointGeometry(double x, double y, double z) { double[] coords = adjustCoords(x, y, z); return mGeometryFactory.createPoint(new Coordinate(coords[0], coords[1], coords[2])); } COM: <s> constructs and returns a jts point geometry from x y x coordinates </s>
funcom_train/20062144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(BaseEvent pEvent) { if (isEnabled() && mActionListeners != null) { for (Iterator i = mActionListeners.iterator(); i.hasNext();) { IActionListener l = (IActionListener) i.next(); try { l.handleAction(pEvent); } catch (Exception ex) { // ignore } } } } COM: <s> runs this action passing the triggering my gwt event </s>
funcom_train/44627615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJMLprecedence9() { helpExpr("a <==> b <#=c <==> d", JmlBinary.class, 14, JmlBinary.class, 2, JCIdent.class ,0, JmlBinary.class, 9, JCIdent.class ,7, JCIdent.class ,12, JCIdent.class ,19 ); } COM: <s> test precedence between lock and equivalence </s>
funcom_train/43244994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetResultCode() { System.out.println("getResultCode"); RefDataResponseObject instance = new RefDataResponseObject(); int expResult = 0; int result = instance.getResultCode(); 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 result code method of class org </s>
funcom_train/29774302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkSyncSettings() { String contactSM = (String)xmlContactValues.get(PARAM_SYNCMODE); String calendarSM = (String)xmlCalendarValues.get(PARAM_SYNCMODE); if (contactSM.equalsIgnoreCase(SYNC_NONE) && calendarSM.equalsIgnoreCase(SYNC_NONE) ) { return false; } return true; } COM: <s> check if there is least one source to synchronize </s>
funcom_train/6459394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read() throws FileNotFoundException, IOException { BufferedReader reader = new BufferedReader(new FileReader(inputFile)); int recordCount = 1; ArrayList record = new ArrayList(); while (reader.ready()) { String inputFileLine = reader.readLine(); record.add(inputFileLine); if (inputFileLine.equalsIgnoreCase("END:VCARD")) { writeOutputFile(record, recordCount); recordCount++; record.clear(); } } } COM: <s> read in the input file split it into records and write out to </s>
funcom_train/300174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSetter(Method method) { String methodName = method.getName(); return methodName.length() > SETTER_PREFIX_LENGTH && methodName.startsWith(SETTER_PREFIX) && Character.isUpperCase(methodName.charAt(SETTER_PREFIX_LENGTH)) && method.getParameterTypes().length == SETTER_PARAM_COUNT; } COM: <s> returns code true code if the supplied method is a setter method </s>
funcom_train/45468530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TransactionContext getTransaction() throws TransactionNotInProgressException { if (_scope == null) { throw new TransactionNotInProgressException(Messages.message("jdo.dbClosed")); } if (isActive()) { return _ctx; } throw new TransactionNotInProgressException(Messages.message("jdo.dbTxNotInProgress")); } COM: <s> returns the currently active transaction if any </s>
funcom_train/4882300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand3 () { if (backCommand3 == null) {//GEN-END:|248-getter|0|248-preInit // write pre-init user code here backCommand3 = new Command ("Voltar", Command.BACK, 0);//GEN-LINE:|248-getter|1|248-postInit // write post-init user code here }//GEN-BEGIN:|248-getter|2| return backCommand3; } COM: <s> returns an initiliazed instance of back command3 component </s>
funcom_train/3563561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEditor(Integer editorID, String firmName) throws DbException { LinkedList parmList; parmList = new LinkedList(); addIfNotNull(parmList, "editorID", editorID); addIfNotNull(parmList, "editorName", firmName); simpleRequest(UPDATE_EDITOR_REDUCED_PAGE, "Cannot update editor", parmList); } COM: <s> updates an editor </s>
funcom_train/42134920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void teardown(TransportManager transMan) { Iterator<String> iterator = listenMap.keySet().iterator(); while (iterator.hasNext()) { RecordListener listener = (RecordListener) listenMap.get(iterator.next()); listener.teardown(transMan); } listenMap.clear(); archiveMgr.terminate(); leaveVenue(); } COM: <s> stops recording all streams </s>
funcom_train/14626168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("myPHPShopAdminPort".equals(portName)) { setmyPHPShopAdminPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/41252397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { if (pressPanel == null) return; Rectangle bounds = pressPanel.getBounds(); Graphics2D g2 = (Graphics2D) g; int x = bounds.x; int y = bounds.y + bounds.height / 2; if (bounds.x + bounds.width / 2 < linkPoint.x) x += bounds.width; g2.drawLine(x, y, linkPoint.x, linkPoint.y); } COM: <s> paints in coordinate space of the associator view </s>
funcom_train/46857001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(SAXParseException exception) throws SAXException { //logError(exception, "Error"); System.out.println("**Parsing error**\n" + " Linea: " + exception.getLineNumber() + "\n" + " URI: " + exception.getSystemId() + "\n" + " Messaggio: " + exception.getMessage()); throw new SAXException(exception); } COM: <s> metodo definizione error </s>
funcom_train/41337893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDbScore(Text url, CrawlDatum old, CrawlDatum datum, List<CrawlDatum> inlinked) throws ScoringFilterException { for (int i = 0; i < this.filters.length; i++) { this.filters[i].updateDbScore(url, old, datum, inlinked); } } COM: <s> calculate updated page score during crawl db </s>
funcom_train/9183808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateReplica(TupleID vid, Location replicaLoc, Long newVersion) { HashMap<Location, Long> inner = ReplicaMap.get(vid); if (inner == null || inner.get(replicaLoc) == null) registerReplica(vid, replicaLoc, newVersion); else if (inner.get(replicaLoc) < newVersion) { inner.remove(replicaLoc); inner.put(replicaLoc, newVersion); } } COM: <s> update the version of a replication specified vid replica location </s>
funcom_train/48390841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addColorSelectedHandler(com.smartgwt.client.widgets.form.events.ColorSelectedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.form.events.ColorSelectedEvent.getType()) == 0) setupColorSelectedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.form.events.ColorSelectedEvent.getType()); } COM: <s> add a color selected handler </s>
funcom_train/21503628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDataKindPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InoutputDefinition_dataKind_feature"), getString("_UI_PropertyDescriptor_description", "_UI_InoutputDefinition_dataKind_feature", "_UI_InoutputDefinition_type"), DMLPackage.Literals.INOUTPUT_DEFINITION__DATA_KIND, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the data kind feature </s>
funcom_train/4874633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JcvMat sub(JcvScalar val) { JcvMat ret = new JcvMat(numRows, numCols, numChannels); for (int i=0; i<numRows*numCols*numChannels; ++i) { ret.data[i] = data[i] - val.val[i%numChannels]; } return ret; } COM: <s> matrix scalar subtraction </s>
funcom_train/31426261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Segment getSegment(UIOperation op, int index) throws WrongArgumentTypeException, ArgumentIndexOutOfBoundsException { IOperationArgument arg = op.getSafeArgument(index); if(arg != null) { Object value = arg.getValue(); if(value instanceof Segment) { return (Segment) value; } else { throw new WrongArgumentTypeException(); } } else { throw new ArgumentIndexOutOfBoundsException(); } } COM: <s> retrieves the segment element associated to the nth argument of the given operation </s>
funcom_train/4224143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocalServerWinner() { if (serverType.equalsIgnoreCase(RepConstants.subscriber)) { return (conflictResolver.equalsIgnoreCase(RepConstants.subscriber_wins)) ? true : false; } else { return (conflictResolver.equalsIgnoreCase(RepConstants.publisher_wins)) ? true : false; } } COM: <s> retunrs weather local server is conflict resolver or not </s>
funcom_train/12304104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processDone(int exitcode) { _failureCode = exitcode; if (_jobLogger.isInfoEnabled()) { _jobLogger.info("Process done, exit code: " + exitcode); } /* currently GRAM ignores job error code */ if (canceled) { setStatus(GRAMConstants.STATUS_FAILED); } else { setStatus(GRAMConstants.STATUS_DONE); } } COM: <s> is called when the process is finished executing </s>
funcom_train/20024615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeGeomType(int newType) { if (this.particleMesh == null) return; // int oldType = particleMesh.getParticleType(); // if (newType == oldType) { // return; // } // executeCommand(new ChangeParticleGeomType(particleMesh, newType)); } COM: <s> changing of the particle geometry </s>
funcom_train/19072669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findMin(PointValue pInit, int serie) { int i = pInit.point + 1; int s = getInputVector().size(); double lastValue = pInit.value; while (i < s) { if (getValuePoint(i, serie) <= lastValue) { lastValue = getValuePoint(i, serie); ++i; } else break; } return --i; } COM: <s> find the next up turning point starting from the p init </s>
funcom_train/598128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSeedMaterial(int poolNumber, byte[] data, int offset, int length) { if (poolNumber < 0 || poolNumber >= pools.length) throw new IllegalArgumentException("pool number out of range: " + poolNumber); pools[poolNumber].update((byte)length); pools[poolNumber].update(data, offset, length); if (poolNumber == 0) pool0Count += length; } COM: <s> adds new random data entropy to the specified entropy pool </s>
funcom_train/32144888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertElementAt(Object comboBoxItem, int index) { itemsList.add(index, (CustomComboBoxItem) comboBoxItem); super.fireIntervalAdded(this, index, index); if (getSize() == 1) { selectedItem = ((CustomComboBoxItem) comboBoxItem).getText(); } } COM: <s> insert a combo box item at the specified index </s>
funcom_train/44477602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSafeUri(String _uri, Pattern pMatch, String property){ String result = _uri; Matcher m = pMatch.matcher(result); if(m.find()){ String name = m.group(2); String drmproturi = Configuration.getURI(property).toString(); int pos = drmproturi.length(); String preuri = drmproturi.substring(0, pos); String posturi = drmproturi.substring(pos+2); try { name = URLEncoder.encode(name, "UTF-8"); name = name.replace("+", "%20"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); }finally{ result = preuri + name + posturi; } } return result; } COM: <s> gets only url encode for the name part of the collection uri </s>
funcom_train/28660384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDefaultIndexAlphabets() { String defalph = AlphabetsManager.getInstance().getDefaultAlphabet() .getName(); String[] alphs = getAlphabets(); for (int i = 0; i < alphs.length; i++) { if (defalph.equals(alphs[i])) { return i; } } return 0; } COM: <s> looks up the index number of the default alphabet in list of all </s>
funcom_train/4363783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeServletMapping(String pattern) { String name = null; synchronized (servletMappingsLock) { name = (String) servletMappings.remove(pattern); } Wrapper wrapper = (Wrapper) findChild(name); if( wrapper != null ) { wrapper.removeMapping(pattern); } mapper.removeWrapper(pattern); fireContainerEvent("removeServletMapping", pattern); } COM: <s> remove any servlet mapping for the specified pattern if it exists </s>
funcom_train/16905955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void awardTrophy(Trophy t, String nick) { if(!trophyManager.haveTrophy(t, nick)) { trophyManager.addTrophy(t, nick); getNetwork().getConnection().sendPrivmsg(channelName, nick + ": Du har fått en trofé - " + t.getName()); } } COM: <s> award trophy to user </s>
funcom_train/5606920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void unsupported(String methodName) { String qualifiedName = getClass().getName(); String className = qualifiedName.substring(qualifiedName.lastIndexOf('.') + 1); throw Py.IOError(String.format("%s.%s() not supported", className, methodName)); } COM: <s> raise a type error indicating the specified operation is not supported </s>
funcom_train/25754287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextFrame getNextInThread() throws Exception { if (nextInThread == null && hasProperty(InDesignDocument.PROP_NTXF)) { String objectId = getObjectReferenceProperty(InDesignDocument.PROP_NTXF); if (objectId != null) { this.nextInThread = (TextFrame)this.getDocument().getObject(objectId); } } return this.nextInThread; } COM: <s> get the frame to which this frame threads if any </s>
funcom_train/43579578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAsInt(final String name) { final Object val = params.get(name); if (val == null) { return 0; } if (val instanceof Boolean) { return ((Boolean) val).equals(Boolean.TRUE) ? 1 : 0; } if (val instanceof Double) { return ((Double) val).intValue(); } if (!(val instanceof Integer)) { return 0; } return ((Integer) val).intValue(); } COM: <s> get the value for an integer parameter </s>
funcom_train/31627025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void usage() { System.out.println("RepoBuilder -src <source> [-dest <maven>] " + "-spec <specification>"); System.out.println(" -src <source directory> Location from which " + "to copy the files"); System.out.println(" -dest <maven respository> Location of the " + "maven repository"); System.out.println(" -spec <property file> Specification of which " + "files to copy"); } COM: <s> displays the usage of the command to system </s>
funcom_train/20608949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getJLUsername() { if (jLUsername == null) { jLUsername = new JLabel(); jLUsername.setText("Username :"); jLUsername.setLocation(new Point(14, 77)); jLUsername.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED); jLUsername.setHorizontalAlignment(SwingConstants.CENTER); jLUsername.setHorizontalTextPosition(SwingConstants.CENTER); jLUsername.setSize(new Dimension(81, 27)); } return jLUsername; } COM: <s> this method initializes j lusername </s>
funcom_train/33734453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseXmlStartUserTag(XmlPullParser parser, FlickrFindResponse res) { log.debug("Parser found USER start tag."); res.setResponseCode(FlickrResponseErrorCode.SUCCESS); // If there is a user tag the request was successful String NSID = parser.getAttributeValue("", FlickrResponseAttributeName.USER_ID.getTag()); FlickrAccount acc = createUser(NSID); if(acc != null) { res.setUser(acc); } } COM: <s> method to parse the starting user tag </s>
funcom_train/45108648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int selectSut(String sutName) throws Exception { JComboBoxOperator combo = getSutOperator(); int index = combo.findItemIndex(sutName, new StringComparator() { public boolean equals(String arg0, String arg1) { return arg0.trim().toLowerCase().equals(arg1.trim().toLowerCase()); } }); combo.selectItem(index); return 0; } COM: <s> return the selected from combo </s>
funcom_train/51345158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startAboutSection(int classType, String id) { generator.startAboutSectionCB(classType); println(); String s = "<" + T_ONTO_PREFIX + Generator.CLASS_TOKEN[classType] + T_SPACE + T_RDF_ABOUT + "=\"" + id + "\">"; println(s); } COM: <s> implementation of writer start about section </s>
funcom_train/43260842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|78-getter|0|78-preInit // write pre-init user code here okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|78-getter|1|78-postInit // write post-init user code here }//GEN-BEGIN:|78-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/30155747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSkinColor(String skinColor) { if (!mSkinColor.equals(skinColor)) { mCharacter.postUndoEdit(MSG_SKIN_COLOR_UNDO, ID_SKIN_COLOR, mSkinColor, skinColor); mSkinColor = skinColor; mCharacter.notifySingle(ID_SKIN_COLOR, mSkinColor); } } COM: <s> sets the skin color </s>
funcom_train/50142088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMember(String item, String group){ IGroup groupInstance = getGroup(group); IItem itemInstance = getItem(item); // Look if user is within group (directly) groupInstance.addMember(itemInstance); try{store();}catch(Exception e){e.printStackTrace();} } COM: <s> add an item member to a group </s>
funcom_train/40912945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { for(int c = 0; c < NumBubbles; c++){ m_particles[c] = new Particle(m_origin); float s = getNewSpeed(); m_particles[c].vel = new sgVec3(calcXSpeed(s) , s, 0.0f); m_node.addChild(m_particles[c].transNode); } } COM: <s> initialise the bubbles system </s>
funcom_train/26319326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void engineHit() { engineHit = true; immobilize(); lockTurret(LOC_TURRET); lockTurret(LOC_TURRET_2); for (Mounted m : getWeaponList()) { WeaponType wtype = (WeaponType) m.getType(); if (wtype.hasFlag(WeaponType.F_ENERGY)) { m.setBreached(true); // not destroyed, just // unpowered } } } COM: <s> apply the effects of an engine hit crit </s>
funcom_train/29561981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void padSpace(TIntArrayList array, int sequence) { assert ( array.size() <= sequence); // e.g. 0 <= 0, on first add while( array.size() <= sequence){ // ensures we add including then value we want to then set array.add( -1 ); } } COM: <s> pad the supplied array cos trove doesnt supply the capability </s>
funcom_train/20151875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void broadcast(String tellType, Collection<User> users, String msg, Object... args) { if (args.length > 0) { msg = MessageFormat.format(msg, args); } for (User user : users) { command.sendQuietly("{0} {1} {2}", tellType, user, msg); } } COM: <s> sends a message to all players in the list </s>
funcom_train/51535136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream openHandleGZIP(String svgURI) throws IOException { URI uri = null; try { uri = new URI(svgURI); } catch (URISyntaxException e) { throw new IOException(e.getMessage()); } URL url = uri.toURL(); URLConnection connection = url.openConnection(); try { if (connection instanceof HttpURLConnection) { setupHttpEncoding((HttpURLConnection) connection); } connection.connect(); return (connection.getInputStream()); } finally { // FIXME ? //connection.close(); } } COM: <s> if gzip encoding is supported this method should setup the </s>
funcom_train/47024274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importRtfDocument(Reader reader, RtfDocument rtfDoc) throws IOException { this.rtfDoc = rtfDoc; this.state = PARSER_IN_HEADER; this.importHeader = new RtfImportHeader(this.rtfDoc); this.fontTableParser = new RtfFontTableParser(this.importHeader); this.colorTableParser = new RtfColorTableParser(this.importHeader); this.tokeniser = new RtfTokeniser(this, 0); this.tokeniser.tokenise(reader); } COM: <s> imports a complete rtf document </s>
funcom_train/16081845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isReturnNull() { // Are we returning null? if (root.getChildCount() == 2) { DetailAST expr = (DetailAST) root.getFirstChild(); if (expr.getChildCount() != 1) { return false; } DetailAST litteralNull = (DetailAST) expr.getFirstChild(); if (litteralNull.getType() == TokenTypes.LITERAL_NULL) { return true; } } return false; } COM: <s> is the code return null </s>
funcom_train/45715370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ColumnOJ setColumn(int index, ColumnOJ column) { ColumnOJ old_column = OJ.getData().getResults().getColumns().setColumn(index, column); OJ.getEventProcessor().fireColumnChangedEvent(old_column.getName(), column.getName(), ColumnChangedEventOJ.COLUMN_EDITED); return old_column; } COM: <s> replaces a column and returns the old one </s>
funcom_train/51144627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMagnification(float magnification) throws IllegalArgumentException { if( (Float.isNaN(magnification)) && (Float.isNaN(focalLength)) ) { throw new IllegalArgumentException("Magnification cannot be Float.NaN while focal length is also Float.NaN. "); } this.focalLength = Float.NaN; this.magnification = magnification; } COM: <s> sets the magnification of the scope </s>
funcom_train/10748055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ReflectionData getReflectionData() { // read the volatile field once final ReflectionData localData = _reflectionData; if (localData == null){ // if null, construct, write to the field and return return _reflectionData = new ReflectionData(); } // else, just return the field return localData; } COM: <s> accessor for the reflection data field which needs to have </s>
funcom_train/37807570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); switch (type) { case CLIENT: sb.append("client"); break; case SERVER: sb.append("server"); break; case CHANNEL: sb.append("channel"); break; } sb.append("[").append(identifier).append("]"); return sb.toString(); } COM: <s> creates a human readable string representation of this </s>
funcom_train/10642550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { setVisible(false); try { setSelected(false); } catch (final PropertyVetoException e) { } boolean oldValue = isClosed(); isClosed = true; firePropertyChange(IS_CLOSED_PROPERTY, oldValue, true); if (!oldValue) { fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_CLOSED); } } COM: <s> makes the internal frame invisible unselected and closed </s>
funcom_train/8946145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidAttribute(final String attributeName) { int dotIndex; Relation relation; boolean returnValue; String relationPart; String trimmedAttributeName; returnValue = false; trimmedAttributeName = attributeName.trim(); dotIndex = trimmedAttributeName.indexOf('.'); if (dotIndex > 0) { relationPart = trimmedAttributeName.substring(0, dotIndex); relation = this.databaseDictionaryDao.getRelation(relationPart); if (relation != null) { if (relation.getAttribute(trimmedAttributeName) != null) { returnValue = true; } } } return returnValue; } COM: <s> verifies if a given attribute is valid for a given relation </s>
funcom_train/44706028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setAddUserMode(PageState state) { Assert.assertTrue(m_addParty.isSelected(state)); m_members.clearSelection(state); m_editLink.setSelected(state, false); m_staffRolePanel.setVisible(state, false); m_addPartyPanel.setVisible(state, true); m_adminListing.setVisible(state, false); } COM: <s> sets this staff panel to add user mode </s>
funcom_train/7787613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void growTreeToCurrDepthLimit(long stopTime) { while(this.hasUnexploredNodes() && System.currentTimeMillis() < stopTime) { long startAddedNodes = this.addedNodes; while(this.hasUnexploredNodes() && (this.addedNodes-startAddedNodes) < MAX_ADDED_NODES_BEFORE_AB && System.currentTimeMillis() < stopTime) { ConfigNode current = this.getNextUnexploredNode(); current.generateChildren(); this.addNodes(current.children); } this.alphaBeta(); } } COM: <s> grow the tree up to the max depth or the stop time whichever </s>
funcom_train/19088295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String serialize(Element elem, boolean repair) { docinfo.resetSer(); Node masterNode = docinfo.findMasterNode(elem); postWorkChange(masterNode, elem); orgWriter.reset(); StringWriter stWriter = new StringWriter(2000); serializer.setOutputCharStream(stWriter); try { serializer.serialize(elem); } catch (IOException e) { throw new JivanHTMLException(e); } if (repair) { // trying to repair a node which has been created by user? // doesn't make sense. if (masterNode != null) repair(masterNode, elem); docinfo.initChanges(elem); } preWorkChange(elem); return stWriter.toString(); } COM: <s> seriazation from a subtree </s>
funcom_train/8967928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProblemMarker(String msg, String location, int priority, int severity ){ try { IMarker m = resource.createMarker(IMarker.PROBLEM); m.setAttribute(IMarker.MESSAGE, msg); m.setAttribute(IMarker.PRIORITY, priority); m.setAttribute(IMarker.SEVERITY, severity); m.setAttribute(IMarker.LOCATION, location); addMarker(m); } catch (CoreException e) { } } COM: <s> adds new problem marker </s>
funcom_train/45740696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItemPublicKeyAlg () { if (stringItemPublicKeyAlg == null) {//GEN-END:|44-getter|0|44-preInit // write pre-init user code here stringItemPublicKeyAlg = new StringItem ("Public key algorithm:", null);//GEN-LINE:|44-getter|1|44-postInit // write post-init user code here }//GEN-BEGIN:|44-getter|2| return stringItemPublicKeyAlg; } COM: <s> returns an initiliazed instance of string item public key alg component </s>
funcom_train/22189715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeConfiguration() { IDialogSettings s = getDialogSettings(); s.put (SearchData.SRCH_TEXT, m_txtSearchText.getText()); Set keys = m_mapCheckBoxes.keySet(); Iterator iter = keys.iterator(); while (iter.hasNext()) { String sKey = (String) iter.next(); Button btnCheck = (Button) m_mapCheckBoxes.get(sKey); s.put (sKey, btnCheck.getSelection()); } } COM: <s> stores it current configuration in the dialog store </s>
funcom_train/45401654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { InferenceEngine inferenceEngine = new InferenceEngine(); try { DataReader dataReader = new YamlReader( new File(settings), new File(rules), new File(interactions), new File(variabelen)); inferenceEngine.setup(dataReader); inferenceEngine.start(); System.out.println("This is a " + inferenceEngine.getResult() + " tree."); } catch (GoalNotFoundException e) { System.out.println("Can't reach goal."); } catch (Exception e) { System.out.println(inferenceEngine.getCurrentState()); e.printStackTrace(); } } COM: <s> start the application </s>
funcom_train/19747252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createClause(String condition, Float compareTo) { if ( condition.equalsIgnoreCase(FilterConditions.OBJECT_IS_NULL) || condition.equalsIgnoreCase(FilterConditions.OBJECT_IS_NOT_NULL) ) { return createNullComparison(condition); } else { return fieldName + " " + condition + " " + compareTo.toString(); } } COM: <s> creates clause from specified condition and float to compare our field to </s>
funcom_train/26229641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void jButtonRiFileBrowse_actionPerformed(ActionEvent e) { // raw image file browse if(showOpenFileChooser("CT", "Raw CT Images", jTextFieldRiFilename)) workingDir = getParentFileFromPathname(jTextFieldRiFilename.getText()); } COM: <s> shows a jfile chooser to browse for a raw ct image </s>
funcom_train/31782439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMobileDeviceEnabled( boolean bEnableMobileDevice ) throws MSNException { if( notificationServer != null ) { try { notificationServer.setMobileDeviceEnabled( bEnableMobileDevice ); } catch( MSNException e ) { throw e; } } else throw new MSNException( MSNException.MSN_EX_NOT_CONNECTED ); } COM: <s> enable disable a mobile device br </s>
funcom_train/45504545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollHorizontal( int change ) { int fact = (editview.getLeftPanel().getHorizontalScrollBar().getMaximum() - editview.getLeftPanel().getHorizontalScrollBar().getMinimum())/scrollCount; int value = editview.getLeftPanel().getHorizontalScrollBar().getValue(); editview.getLeftPanel().getHorizontalScrollBar().setValue( value + change*fact ); } COM: <s> p adjusts the horizontal scroll bar position </s>
funcom_train/51635832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxCallDepth() { int maxCallDepth; IPreferenceStore settings = JavaPlugin.getDefault().getPreferenceStore(); maxCallDepth = settings.getInt(PREF_MAX_CALL_DEPTH); if (maxCallDepth < 1 || maxCallDepth > 99) { maxCallDepth= DEFAULT_MAX_CALL_DEPTH; } return maxCallDepth; } COM: <s> returns the maximum tree level allowed </s>
funcom_train/40690781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveAllRandomAccess() { Multimap<String, Integer> multimap = create(); multimap.put("foo", 1); multimap.put("foo", 3); assertTrue(multimap.removeAll("foo") instanceof RandomAccess); assertTrue(multimap.removeAll("bar") instanceof RandomAccess); } COM: <s> confirm that remove all returns a list implementing random access </s>
funcom_train/43873910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long getUpdatePeriodByName(final String paramName) { final String valueAsString = filterConfig.getInitParameter(paramName); if (valueAsString == null) { return 0; } try { return Long.valueOf(valueAsString); } catch (final NumberFormatException e) { throw new WroRuntimeException(paramName + " init-param must be a number, but was: " + valueAsString); } } COM: <s> extracts long value from provided init param name configuration </s>
funcom_train/14326871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node createTagElement(Document document, String name, String value) { Node nodeElement = document.createElement(name); value = (value != null) ? value : ""; Node text = document.createTextNode(value); nodeElement.appendChild(text); return nodeElement; } COM: <s> creates a tag element for the given code document code </s>
funcom_train/2959664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponentEdge(int compi, int compj) { if (!this.componentOrder[compi][compj]) { this.componentOrder[compi][compj] = true; for (int compj2 = 0; compj2 < compj; compj2++) { if (this.componentOrder[compj][compj2]) { this.componentOrder[compi][compj2] = true; } } } } COM: <s> add an edge in the component graph between compi and compj </s>
funcom_train/2624986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processActivities(final long currentTime) { final int size = activities.size(); if (size > 0) { processingActivities.addAll(activities); for (int i = size - 1; i >= 0; i--) { final PActivity each = (PActivity) processingActivities.get(i); each.processStep(currentTime); } processingActivities.clear(); } } COM: <s> process all scheduled activities for the given time </s>
funcom_train/16643459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPanel() { LOGGER.trace("Creating the configuration panel"); final List<ConfigurationKey> keys = VieAPluginModelList.getConfigurationKeys(); fields = new HashMap<ConfigurationKey, JTextField>(keys.size()); for (final ConfigurationKey key : keys) { createConfigurationForm(key); } } COM: <s> creates the showed panel </s>
funcom_train/22965580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encodeToFile(String filename) { log.debug("encodeToFile - enter with filename = " + filename); try { FileOutputStream out = new FileOutputStream(filename); com.sun.media.jai.codec.ImageEncoder jaiEncoder = ImageCodec.createImageEncoder("wbmp", out, null); jaiEncoder.encode(_image); } catch (IOException e) { log.warn("encodeToFile - exception", e); } log.debug("encodeToFile - exit"); } COM: <s> encode a buffered image as a wbmp data stream </s>
funcom_train/8131347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Pattern compilePattern(String pattern) { if(!pattern.startsWith(ISREGULAREXPRESSION)){ pattern = escapeRegexLiterals(pattern); pattern = pattern.replaceAll("\\*", ".*"); pattern = pattern.replaceAll("\\?", "."); if (!pattern.endsWith("*")) pattern += ".*"; }else{ pattern = regularExpressionFilter(pattern); } return Pattern.compile(pattern, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE); } COM: <s> pattern for insensitive search </s>
funcom_train/51102781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasRenamedFiles() { if (files == null) { return false; } synchronized (files) { Iterator it = files.iterator(); while (it.hasNext()) { if (((ProjectFile) it.next()).isRenamed()) { return true; } } } return false; } COM: <s> returns true is project has renamed files </s>
funcom_train/546551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEditable(boolean b) { unselectAll(); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); dragMode = DRAG_NONE; if( createMode!=CREATE_NONE ) { createMode = CREATE_NONE; fireCancelCreate(); } isEditable = b; repaint(); } COM: <s> sets the specified boolean to indicate whether or not this </s>
funcom_train/35766819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultipleOpenClose() { FtpZosClient ftpzosClient = new FtpZosClient(); try { ftpzosClient.open(_hostSettings.getHostName(), _hostSettings.getHostUserId(), _hostSettings.getHostPassword()); ftpzosClient.close(); ftpzosClient.open(_hostSettings.getHostName(), _hostSettings.getHostUserId(), _hostSettings.getHostPassword()); ftpzosClient.close(); } catch (IOException e) { fail(e.toString()); } } COM: <s> do 2 sequences of open close </s>
funcom_train/13895326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCheckActivity(String type, int permitNum, int isotopeID) { if (type.equals("OS")) return this.getCheckActivity(type, permitNum, isotopeID, this .getOSMaxActivityUnit(permitNum, isotopeID)); else return this.getCheckActivity(type, permitNum, isotopeID, this .getSSMaxActivityUnit(permitNum, isotopeID)); } COM: <s> this method gets the amount of activity left for a certain open source </s>
funcom_train/12191614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJNDIDatasourceUnmarshalling() throws Exception { DatasourceConfiguration datasource = parseDatasource( new ByteArrayInputStream(ANONYMOUS_JNDI_DATASOURCE.getBytes())); assertEquals(DataSourceType.JNDI_DATASOURCE, datasource.getType()); JNDIDatasource jndiDatasource = (JNDIDatasource) datasource; assertEquals("jdbc/TestDB", jndiDatasource.getJndiName()); } COM: <s> test unmarshalling of a jndi datasource </s>
funcom_train/43393362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResultSet SelectSqlAJob(long aworkflowid) throws Exception { String sql = "SELECT id, name, txt, x, y FROM ajob WHERE id_aworkflow = ? ORDER BY id"; PreparedStatement preparedStatementAllAJob = connection.prepareStatement(sql); preparedStatementAllAJob.setLong(1, aworkflowid); return preparedStatementAllAJob.executeQuery(); } COM: <s> a workflow ban szerpl sszes job adatait adja vissza result set ben </s>
funcom_train/4233192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleSegmentSizeUpdate() { try { int segmentSize = Integer.parseInt(segmentSizeTextField.getText()); spectrumAnalyzerPanel.setSegmentSize(segmentSize); } catch (Exception e) { segmentSizeTextField.setText(Integer.toString(spectrumAnalyzerPanel.getSegmentSize())); return; } } COM: <s> handles events from the segment size component </s>
funcom_train/48467665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verify(byte[] message, byte[] signature) { try { // this way signatureInstance should be thread safe final Signature signatureInstance = Signature.getInstance(algorithm); signatureInstance.initVerify(publicKey); signatureInstance.update(message); return signatureInstance.verify(signature); } catch (Exception e) { throw new SignatureException("error verifying signature", e); } } COM: <s> verifies the authenticity of a message using a digital signature </s>
funcom_train/12160958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStarAllDefaultsUnacceptable() { check(new String[]{"ISO-8859-1;q=0,UTF-16;q=0,UTF-8;q=0,*,US-ASCII"}, "UTF-16", "US-ASCII"); } COM: <s> if the user specifies that the implicit device and system defaults are </s>
funcom_train/20767715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RemoteControl (int port) throws SocketException{ this.port = port; try{ datagramSocket = new DatagramSocket(port); } catch ( SocketException e ){ throw new SocketException(e + " on port " + port); } log.info("Constructed " + this); ( T = new RemoteControlDatagramSocketThread() ).start(); } COM: <s> creates a new instance </s>
funcom_train/51164080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void draw_dates(Graphics g, Rectangle w) { TemporalDrawer drawer = temporal_drawer(); if (drawer != null && drawer.main_data_processed()) { drawer.set_xaxis(xaxis_); drawer.set_yaxis(yaxis_); drawer.set_maxes(xmax, ymax, xmin, ymin); drawer.set_ranges(xrange, yrange); drawer.set_clipping(clipping); drawer.draw_data(g, w); } } COM: <s> draw times if they exist otherwise date dates if they exist </s>
funcom_train/29656131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pack() { super.pack(); if (!firstPack) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation(screenSize.width / 2 - getWidth() / 2, screenSize.height / 2 - getHeight() / 2); firstPack = true; } } COM: <s> overrided to set frame position at center of window </s>
funcom_train/32756469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInitialValue( final double value ) { if ( getActiveSource() == CUSTOM_SOURCE ) { _coreParameter.setInitialValue( toCA( value ) ); } else { final double boundedValue = Math.max( getLowerLimit(), Math.min( value, getUpperLimit() ) ); _coreParameter.setInitialValue( toCA( boundedValue ) ); } } COM: <s> set this parameters initial variable value </s>
funcom_train/27786289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadExchangeRates(Currency sourceCurrency, Currency destinationCurrency) { List exchangeRates = QuoteSourceManager.getSource().getExchangeRates(sourceCurrency, destinationCurrency); for(Iterator iterator = exchangeRates.iterator(); iterator.hasNext();) { ExchangeRate exchangeRate = (ExchangeRate)iterator.next(); addToCache(exchangeRate); } } COM: <s> load all the exchange rates that convert between the given currencies from the </s>
funcom_train/41747471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseArguments(String[] args) { if (args.length > 0) { if (args[0].equalsIgnoreCase("derbyclient")) { framework = "derbyclient"; driver = "org.apache.derby.jdbc.ClientDriver"; protocol = "jdbc:derby://localhost:1527/"; } } } COM: <s> parses the arguments given and sets the values of this class instance </s>
funcom_train/21844622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final InstructionContext env) throws JBasicException { String descriptor = null; if( env.instruction.stringValid) descriptor = env.instruction.stringOperand; else descriptor = env.pop().getString(); Value result = Utility.protoType(env.session, descriptor); if( result == null ) throw new JBasicException(Status.BADTYPE, descriptor); env.push(result); } COM: <s> b code prototype em descriptor em code br br b </s>
funcom_train/3380577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toHexString(byte[] block) { StringBuffer buf = new StringBuffer(); int len = block.length; for (int i = 0; i < len; i++) { byte2hex(block[i], buf); if (i < len-1) { buf.append(":"); } } return buf.toString(); } COM: <s> converts a byte array to hex string </s>
funcom_train/1805691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractItemUrlFromResponse(String insertResponse) { int startIndex = insertResponse.indexOf("<id>") + 4; int endIndex = insertResponse.indexOf("</id>"); String itemUrl = insertResponse.substring(startIndex, endIndex); return itemUrl; } COM: <s> parse the post xml response returned by code insert response code and </s>
funcom_train/21106350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MJButton getBtBSEditOperation() { if (btBSEditOperation == null) { btBSEditOperation = new MJButton(); btBSEditOperation.setPreferredSize(new java.awt.Dimension(75, 20)); btBSEditOperation.setText("Edit"); } return btBSEditOperation; } COM: <s> this method initializes bt bsedit operation </s>
funcom_train/1265181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateQNames_MinLength(List<?> qNames, DiagnosticChain diagnostics, Map<Object, Object> context) { int length = qNames.size(); boolean result = length >= 1; if (!result && diagnostics != null) reportMinLengthViolation(ExecutablePackage.eINSTANCE.getQNames(), qNames, length, 1, diagnostics, context); return result; } COM: <s> validates the min length constraint of em qnames em </s>
funcom_train/3813020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createActiveLists() { int nlists = activeListFactories.size(); for (int i = 0; i < currentActiveLists.length; i++) { int which = i; if (which >= nlists) { which = nlists - 1; } ActiveListFactory alf = activeListFactories.get(which); currentActiveLists[i] = alf.newInstance(); } } COM: <s> creates the emitting and non emitting active lists </s>
funcom_train/15677435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean almostEquals(GeometricObject2D obj, double eps) { if (this==obj) return true; if (!(obj instanceof Point2D)) return false; Point2D p = (Point2D) obj; if (Math.abs(this.x - p.x) > eps) return false; if (Math.abs(this.y - p.y) > eps) return false; return true; } COM: <s> test whether this object is the same as another point with respect </s>
funcom_train/8774193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStatus(final String status) throws SkypeException { try { String response = Connector.getInstance().executeWithId("SET CALL " + getId() + " STATUS " + status, "CALL " + getId() + " STATUS "); Utils.checkError(response); } catch (ConnectorException e) { Utils.convertToSkypeException(e); } } COM: <s> change the status of this call object </s>
funcom_train/21643896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(String name, Serializable message) throws IOException { if (peer != null) { peer.setCall(); if (peer.getMessageManager() == null) { throw new IOException("You are not on a team."); } peer.getMessageManager().sendMessage(name, message); } else { uninitializedException("sendMessage"); } } COM: <s> sends a message to one or more teammates </s>