__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/20342197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextField() { if (textField == null) {//GEN-END:|26-getter|0|26-preInit // write pre-init user code here textField = new TextField("Server address", null, 300, TextField.ANY);//GEN-LINE:|26-getter|1|26-postInit // write post-init user code here }//GEN-BEGIN:|26-getter|2| return textField; } COM: <s> returns an initiliazed instance of text field component </s>
funcom_train/4482390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testSetAndGetId() { CourseColumn instance = courseColumn; int expResult = 0; int result = instance.getId(); assertEquals(expResult, result); expResult = 5; instance.setId(expResult); result = instance.getId(); assertEquals(expResult, result); } COM: <s> test of get id method of class course column </s>
funcom_train/42970384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tearDownConnection(ClientConnection c) throws IOException { if (c instanceof CachableConnection){ logger.debug("Tearing down connection for device '"+c.getClientDevice().getNetworkDeviceName()+"'"); ((CachableConnection) c).tearDown(); }else{ logger.debug("Closing connection for device '"+c.getClientDevice().getNetworkDeviceName()+"'"); c.closeConnection(); } } COM: <s> method responsible for trully closing the connection </s>
funcom_train/778657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServletOutputStream getOutputStream() throws IOException { if (writer != null) throw new IllegalStateException("getWriter() has already been called for this response"); if (stream == null) stream = createOutputStream(); if (debug > 1) { System.out.println("stream is set to "+stream+" in getOutputStream"); } return (stream); } COM: <s> return the servlet output stream associated with this response </s>
funcom_train/13914056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unmasqueradeCookie (Cookie cookie) { String cookieValue = cookie.getValue(); if (cookieValue.startsWith(PROXYMA_REWRITTEN_HEADER)) { String originalValue = cookieValue.substring(33); cookie.setValue(originalValue); log.finer("Unmasqueraded Cookie original value: " + originalValue); } } COM: <s> rebuilds the original cookie from a masqueraded one </s>
funcom_train/1493516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getFirmwareVersion() { byte[] dataBuffer = new byte[8]; byte dataSize; // Set the MSB to tell the 2CAN that this is a remote message. dataSize = getTransaction(0x80000000 | CAN_MSGID_API_FIRMVER, dataBuffer); if (dataSize == 4) { return unpackINT32(dataBuffer); } return 0; } COM: <s> get the version of the firmware running on the jaguar </s>
funcom_train/47812424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadTeamNames() { lbTeam.clear(); teamHandling.getTeamList(new OrderBy("team.name", SortOrder.ASC), new OkCallback<List<Team>>() { public void onSuccess(final List<Team> teams) { for (int i = 0; i < teams.size(); i++) { lbTeam.addItem(teams.get(i).getName()); } } }); } COM: <s> this method loads a list of the teamnames </s>
funcom_train/2522942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int extendToInclude(final Date someDate){ int result = super.extendToInclude(someDate); if (result > 0){ //We have to extend the vectors this.data.addRowsAtEnd(result, this.getColumnDefaults(this.header)); } else if (result < 0){ //We have to shift the values back. //Reminder: result is negative! this.data.addRowsAtStart(-result, this.getColumnDefaults(this.header)); } return result; } COM: <s> extends the temporal scope of the time series to include the </s>
funcom_train/16451694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBibleVerse(BibleVerse bibleVerse) { //first add the correct ID to the verse bibleVerse.setID(IDCounter); //add the verse to the Vector of verses bibleVerses.add(bibleVerse); //update the JTable frame.updateTable(bibleVerse); //increase the counter IDCounter = IDCounter + 1; } COM: <s> call this method if you want to add a new verse to </s>
funcom_train/25311366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addIntArray(String ident, int[] array) { // TODO, asserts to prevent multiple array being put with the same identity? // assert ( intArrayTable.get(ident) == null ) : "The int array with identity " + ident + " already exists "; intArrayTable.put(ident, array); } COM: <s> it stores an int array </s>
funcom_train/31483214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void coreCrypt(byte[] in, int inOffset, byte[] out, int outOffset) { des1.coreCrypt(in, inOffset, out, outOffset); des2.coreCrypt(out, outOffset, out, outOffset); des3.coreCrypt(out, outOffset, out, outOffset); } COM: <s> perform a des encryption or decryption operation depends on subkey </s>
funcom_train/5003111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getParetoGraphic(File file) throws StatException { String rName = asVector().getSymbol(); String expr = "pareto(" + rName + ")"; //$NON-NLS-1$ //$NON-NLS-2$ try { RWorkspace.getRWorkspaceInstance().plot(file, expr, RDevice.SVG); } catch (Exception e) { throw new StatException(e); } } COM: <s> draw a pareto graphic with this frequency list and record it into the </s>
funcom_train/50041946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDefaultHeight() { if (XYPlotRenderer.class.isAssignableFrom(getDefaultRendererClass())) { return PreferenceManager.getInstance().getAsInt(PreferenceManager.CHART_TRACK_HEIGHT_KEY); } else { return PreferenceManager.getInstance().getAsInt(PreferenceManager.TRACK_HEIGHT_KEY); } } COM: <s> returns the default height based on the default renderer for the data </s>
funcom_train/33256199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class Mainoumi extends RobotPlayer { public String getName() { return "Mainoumi"; } public int turn() { int attempt = mostIfWinTurn(); if (attempt < 0) { attempt = opponentMostTurn(); if (attempt == colour) attempt = expandTurn(); } if (attempt < 0) attempt = mostTurn(); return attempt; } public String getIcon() { return "greenAlien.gif"; } } COM: <s> mainoumi is deliberately obstructive </s>
funcom_train/130287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getAudioProperties () { try { sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */ os.writeByte (PLAYER_AUDIODSP_GET_CONFIG); os.flush (); } catch (Exception e) { System.err.println ("[AudioDSP] : Couldn't send PLAYER_AUDIODSP_GET_CONFIG " + "command: " + e.toString ()); } } COM: <s> configuration request get audio properties </s>
funcom_train/33611086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics2D canvas, GraphicRendererProvider rend) { if (text == null || text.length() == 0) return; lastGr = canvas; if (renderer == null) rend.getStringRenderer().draw(point, text, canvas, visibility); else renderer.draw(point, text, canvas, visibility); } COM: <s> draws the primitive on the specified graphics canvas using current style </s>
funcom_train/20272201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findReplacementName(String name) { String original = getOrginalName(name); String newName = original; int i = 0; while (!isValidName(newName)) { newName = original + ContextualRenamer.UNIQUE_ID_SEPARATOR + String.valueOf(i++); } return newName; } COM: <s> find a name usable in the local scope </s>
funcom_train/8691544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPackages() { StringBuffer p = new StringBuffer(); for (int i = 0; i < packages.size(); i++) { if (i > 0) { p.append(":"); } p.append(packages.elementAt(i).toString()); } return p.toString(); } COM: <s> get the packages as a collon separated list </s>
funcom_train/31805869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private String decode(String str) { if (str == null) { return null; } String s = null; try { final String fStr = str; final String fEncoding = urlEncoding; s = (String)AccessController .doPrivileged(new PrivilegedExceptionAction() { public Object run() { try { return URIEncoder.decode(fStr, fEncoding); } catch (UnsupportedEncodingException excpt) { return URIEncoder.decode(fStr); } } }); } catch (Exception ex) { ex.printStackTrace(); } return s; } COM: <s> decode encoded uri string into string under aglets encoding </s>
funcom_train/18377548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.getTable().setHeaderVisible(true); viewer.getTable().setLinesVisible(true); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setSorter(new NameSorter()); viewer.setInput(ResourcesPlugin.getWorkspace()); makeActions(); hookContextMenu(); hookDoubleClickAction(); contributeToActionBars(); } COM: <s> this is a callback that will allow us </s>
funcom_train/43467386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLog() throws Exception { Log log = LogFactory.getLog(LogTest.class); log.fatal("Pre zX Config"); ZX zx = new ZX(TestUtil.getCfgPath()); zx.log.fatal("Post zX Config"); log = LogFactory.getLog(LogTest.class); log.fatal("New log handle"); } COM: <s> tests the basic functionality of the logging </s>
funcom_train/47528842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cluster getRollBackCluster() { List<Versioned<byte[]>> values = get(new ByteArray(ByteUtils.getBytes(ROLLBACK_CLUSTER_KEY, "UTF-8"))); if(values.size() > 0) { return clusterMapper.readCluster(new StringReader(getSingleValue(values))); } return null; } COM: <s> returns null if no roll back cluster entry found </s>
funcom_train/29918454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String genRemoteUnblockChallenge(String pinType) throws TokenException { String retval = null; Token token = tokens.get(pinType); Session session = null; try{ session = token.openSession(SessionType.SERIAL_SESSION, SessionReadWriteBehavior.RO_SESSION,null,null); retval = AladdinETokenConnector.eTCGenUnblockChallenge((int) session.getSessionHandle()); }finally { if(session != null){ session.closeSession(); } } return retval; } COM: <s> generates a remote unblock challenge from the token for the given pin type </s>
funcom_train/43365393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProgressTracker modifyElements(ArrayList<String> objectIds, ArrayList<String> paths, NewElementValueStrings newElements){ XmlOperationInfo info = new XmlOperationInfo(objectIds, xmlCont); ModifyElementValuesOperation op = new ModifyElementValuesOperation(info, paths, newElements); KWBDatabaseManager.submitToThreadPool(op); return op; } COM: <s> modify elements based on the paths and string values </s>
funcom_train/36690589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object readResolve() throws ObjectStreamException { AdminClientConnection connection = getConnection(); if (connection != null) { return connection.readResolveReference(getId(), this); } else { logger.warning(String.format("No connection available to resolve reference %d. " + "Reference equality may be violated.", getId().longValue())); return this; } } COM: <s> replaces this instance with a canonical instance </s>
funcom_train/24527187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean subscribe(String category, String type, int logLevel){ //boolean val = super.subscribe(category, type, logLevel); System.out.println("WMSL: subscribe "+category+" type: "+type); return true; //return (logLevel >= org.webmacro.util.LogSystem.WARNING); } COM: <s> return true or false if this log target would like to receive </s>
funcom_train/20251136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findTransitionCollumn(int b) { boolean found = false; int i = 0; while (!found) { if ((b >= inputMap[i][0]) && (b <= inputMap[i][1])) { found = true; } else { i++; if (i >= col) { throw new Error("Caractere Invalido(Code):" + b); } } } return i; } COM: <s> return the collumn of the transition corresponding to the character b </s>
funcom_train/570775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundForColumn( int column, Color color ) { for ( int i = 0; i < tabMdl.getRowCount( ); i++ ) { StringBuffer sb = new StringBuffer( ); sb.append( i ); sb.append( "-" ); sb.append( column ); cellColors.put( sb.toString( ), color ); } } COM: <s> change the column background </s>
funcom_train/1952456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) { System.out.println("Device discovered: "+btDevice.getBluetoothAddress()); //add the device to the vector if(!vecDevices.contains(btDevice)){ vecDevices.addElement(btDevice); } } COM: <s> this call back method will be called for each discovered bluetooth devices </s>
funcom_train/51783354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testScalings() { assertEquals(0.5, Scaling.SCALING_50.getScaleFactor()); assertEquals(0.75, Scaling.SCALING_75.getScaleFactor()); assertEquals(1.0, Scaling.SCALING_100.getScaleFactor()); assertEquals(1.5, Scaling.SCALING_150.getScaleFactor()); } COM: <s> tests the scaling objects </s>
funcom_train/37817839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void algorithmRestarted() { // TODO: currently this method is invoked at regular algorithm start too // so it isn't bad, but not efficient setUndoButtonsEnabled(true); if (controller.algorithmHasNextStep()) { setPerformButtonsEnabled(true); controlPane.setAlgorithmButtonsEnabled(false); controlPane.setKeyInputEnabled(false); connector.setSavingBlocked(true); // for explanation of the following step, see DocuPane.update() setStepDirection(true); } } COM: <s> sets the enable state of the buttons for running an algorithm </s>
funcom_train/26240408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return question.getName()+" - "+question.getType().getDisplayName()+ //$NON-NLS-1$ " ("+result.getAnswerCount()+"/"+getNofClients()+")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } COM: <s> get a string representation of this sent question </s>
funcom_train/31480303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SPKITag add(SExpression sexp) throws SPKIException { if (this.built_as_star) throw new SPKIException(__me + ".add(): Can't add tag-" + "expressions to an all-permissions star tag object!"); SList _sl = (SList)this.getSList(); if (_sl.isList()) { _sl.add(sexp); } else { throw new SPKIException(__me + ".add(): Can't add to non-list!"); } return this; } COM: <s> add an s expression to this tag object </s>
funcom_train/45121687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLabelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ComboItem_label_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ComboItem_label_feature", "_UI_ComboItem_type"), DictionaryPackage.Literals.COMBO_ITEM__LABEL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the label feature </s>
funcom_train/49079834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getMidp2Path() { if (!this.midp2Path.exists()) { throw new BuildException("The default path to the MIDP/2.0-API [" + this.midp2Path.getAbsolutePath() + "] points to a non-existing file. Please specify it with the [midp2Path] attribute of the <build> element."); } return this.midp2Path; } COM: <s> gets the path to the midp 2 </s>
funcom_train/7645193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InetAddress getHostAddress() throws IOException { if (hostAddress == null) { // the value was not set yet if (proxy != null && proxy.type() != Proxy.Type.DIRECT) { hostAddress = ((InetSocketAddress) proxy.address()) .getAddress(); } else { hostAddress = InetAddress.getByName(url.getHost()); } } return hostAddress; } COM: <s> get the inet address of the connection machine </s>
funcom_train/12334572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (queueConnection != null) { try { queueConnection.close(); } catch (JMSException e) { /* ignore */ } } if (topicConnection != null) { try { topicConnection.close(); } catch (JMSException e) { /* ignore */ } } } //- close COM: <s> gracefully shuts down underlying connections </s>
funcom_train/3840261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendCreateRoom(RoomInformation ri) { JClient.getInstance(_socket).createRoom(ri.getName(), ri.getTimePerTurn(), ri.getGamePreset().getCode(), ri.getMaxPlayers(), ri.getDescription()); } COM: <s> sends a create room request using the provided room information as initial </s>
funcom_train/13561658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinguisticVariable copy(){ //Create new LV LinguisticVariable tempLV = new LinguisticVariable(this.getLVName()); //Copy membership functions for(Enumeration<MembershipFunction> e = this.storage.elements(); e.hasMoreElements(); ) { tempLV.add((MembershipFunction)e.nextElement()); } //Copy input value tempLV.setInputValue(input_value); return tempLV; } COM: <s> return an exact copy of itself </s>
funcom_train/25646961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populateModel(KendoModel kendoModel) { // Add all states to editor model (except the start state) addStates(kendoModel.getFunctionalModel(), kendoModel.getEditorModel()); // Add all transitions addTransitions(kendoModel.getFunctionalModel(), kendoModel.getEditorModel()); } COM: <s> populates the specified kendo model from its associated functional model </s>
funcom_train/37565369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean next(LinkInstruction key) throws IOException { if (! haveCurrent) { return false; } currentKey.set(current.getLink()); do { key.set(current); } while ((haveCurrent = edits.next(current, NullWritable.get())) && currentKey.compareTo(current.getLink()) == 0); return true; } COM: <s> the incoming stream of edits is sorted first by md5 then by url </s>
funcom_train/8690212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute() throws BuildException { Commandline cmd; attributes.log("Using gcj compiler", Project.MSG_VERBOSE); cmd = setupGCJCommand(); int firstFileName = cmd.size(); logAndAddFilesToCompile(cmd); return executeExternalCompile(cmd.getCommandline(), firstFileName) == 0; } COM: <s> performs a compile using the gcj compiler </s>
funcom_train/22948715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setInitialValues() { addConfigKey(new ParameterDouble("Upper frequency", "Upper frequency", 64, 1, 0, 64)); addConfigKey(new ParameterDouble("Lower frequency", "Lower frequency", 0, 1, 0, 64)); } COM: <s> adds two configuration keys </s>
funcom_train/35838714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Link getLink(PCSession session, String sViewID, String sLinkID) throws NoSuchElementException , SQLException { // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ; // // Link link = DBViewLink.getLink(null, sViewID, sLinkID); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return null; } COM: <s> returns the link with the given id </s>
funcom_train/21633272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { final DetermineWorkload determine = new DetermineWorkload( this.numThreads, (int) this.indexable.getRecordCount()); this.workers = new FlatGradientWorker[determine.getThreadCount()]; int index = 0; // handle CPU for (final IntRange r : determine.calculateWorkers()) { this.workers[index++] = new GradientWorkerCPU(this.network.clone(), this, this.indexable.openAdditional(), r.getLow(), r.getHigh()); } } COM: <s> init the process </s>
funcom_train/44420893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(){ inBytes = 0L; outBytes = 0L; cal.setTime(new Date() ); lastIn = cal.getTimeInMillis(); lastOut = cal.getTimeInMillis(); connectionMark = 0; connectionStart = 0; inMessages = 0; outMessages = 0; } COM: <s> clears all internal byte counters and reinitializes times to the current time </s>
funcom_train/34305242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Solution createBitRepresentation() { Solution sol = new Solution(); sol.representation = new int[this.size()]; for (int i = 0; i < sol.representation.length; i++) { sol.representation[i] = (this.get(i).getPartition() == Partition.Alpha) ? 0 : 1; } PartitionBucket temp = this.getPartitionBucket(Partition.Alpha); sol.cutSize = temp.getCutSize(); return sol; } COM: <s> create a bit representation of the node partitioning </s>
funcom_train/37447609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractViewBean getBinaryViewBean ( Collection objects, String link, String contextPath ) { Object firstItem = objects.iterator ().next (); Class objsClass = firstItem.getClass (); logger.info ( objsClass ); Class clazz = (Class) ourBeanToBinaryView.get ( objsClass ); return getViewBean( clazz, objects, link, contextPath); } COM: <s> returns the appropriate view bean for given code collection code object </s>
funcom_train/19913397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String fillLeadingZero(String trackValue, int digitCount) { if (trackValue.length() >= digitCount) { return trackValue; } StringBuffer tmp = new StringBuffer(trackValue); while (tmp.length() < digitCount) { tmp.insert(0, "0"); } return tmp.toString(); } COM: <s> this method will insert zeros to the code track value code until its </s>
funcom_train/44852368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryResult getReviewersQuestions(Long inReviewerID, Long inGroupID, Integer[] inState) throws VException, SQLException { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(ResponsibleHome.KEY_TYPE, ResponsibleHome.Type.REVIEWER.getValue()); return getQuestionsResponsibleFor(lKey, inReviewerID, inGroupID, inState); } COM: <s> returns all questions being in the specified state in the specified group </s>
funcom_train/38810067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__OrgJdomAttribute_getAttribute_String_OrgJdomNamespace() { Element element = new Element("el"); Namespace ns = Namespace.getNamespace("x", "urn:foo"); Attribute att = new Attribute("name", "first", ns); element.setAttribute(att); element.setAttribute(new Attribute("name", "first")); assertEquals("incorrect Attribute returned", element.getAttribute( "name", ns), att); } COM: <s> test get attribute by name and namespace </s>
funcom_train/15408114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setScalarType(DeployBeanDescriptor<?> deployDesc) { Iterator<DeployBeanProperty> it = deployDesc.propertiesAll(); while (it.hasNext()) { DeployBeanProperty prop = it.next(); if (prop instanceof DeployBeanPropertyAssoc<?>) { } else { deployUtil.setScalarType(prop); } } } COM: <s> set the scalar types on all the simple types </s>
funcom_train/4509029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RosterItem getRosterItem(JID user) throws UserNotFoundException { RosterItem item = rosterItems.get(user.toBareJID()); if (item == null) { // Optimization: Check if the contact has a FROM subscription due to shared groups item = getImplicitRosterItem(user); if (item == null) { throw new UserNotFoundException(user.toBareJID()); } } return item; } COM: <s> returns the roster item that is associated with the specified jid </s>
funcom_train/1534964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean handleLinkedGeo(Map<String, String> attrs) { // name of linked geo String exp = (String) attrs.get("exp"); if (exp != null) { // store (geo, epxression, number) values // they will be processed in processLinkedGeos() later linkedGeoList.add(new GeoExpPair(geo, exp)); } else return false; return true; } COM: <s> linked geos have to be handled at the end of the construction because </s>
funcom_train/3579715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleChangedResources() { if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { editingDomain.getCommandStack().flush(); for (Iterator i = changedResources.iterator(); i.hasNext(); ) { Resource resource = (Resource)i.next(); if (resource.isLoaded()) { resource.unload(); try { resource.load(Collections.EMPTY_MAP); } catch (IOException exception) { IFSSchemaEditorPlugin.INSTANCE.log(exception); } } } } } COM: <s> handles what to do with changed resources on activation </s>
funcom_train/31661493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Format setInputFormat(Format format) { if (format != null && format instanceof RGBFormat && format.matches(supportedRGB)) { inputFormat = (RGBFormat)format; Dimension size = inputFormat.getSize(); inWidth = size.width; inHeight = size.height; return format; } else return null; } // setInputFormat() COM: <s> set the data input format </s>
funcom_train/3888759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStructureTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActivityStructureType_structureType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ActivityStructureType_structureType_feature", "_UI_ActivityStructureType_type"), ImsldV1p0Package.Literals.ACTIVITY_STRUCTURE_TYPE__STRUCTURE_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the structure type feature </s>
funcom_train/40536107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkEmptiness(Stack s) { assertTrue(s.empty()); try { s.pop(); fail("Did not throw exception on pop of checkEmptiness"); } catch (EmptyStackException es) { try { s.peek(); fail("Did not throw exception on peek of checkEmptiness"); } catch (EmptyStackException es2) { // we wanted to get here } } } COM: <s> checks for emptiness of stack by peeking and popping </s>
funcom_train/40222121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Card c) { if (c == null) { throw new IllegalArgumentException ("Stack::add() received null card to add."); } if (numCards > maxPileSize-1) { growStack(delta); } /** Add card to pile. */ cards [numCards++] = c; clearSelections(); // clear our selections... hasChanged(); // we have changed state... } COM: <s> add a card into the stack </s>
funcom_train/1301614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { isRunning.set(false); try { if (socketIO != null) socketIO.close(); if (socket != null) socket.close(); } catch (IOException ioe) { this.ioe = ioe; } this.socket = null; this.socketIO = null; } COM: <s> shutdown this server </s>
funcom_train/17678658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection con() { if (conx == null) { cacheTx(); try { conx = conSrc.getConnection(false, false); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw BindingSupportImpl.getInstance().internal(e.toString(), e); } } return conx; } COM: <s> get our database connection </s>
funcom_train/46278271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScopedProperty(String name, Object value) { if (name == null || value == null) { throw new JAXRPCException( Messages.getMessage(name == null ? "badProp03" : "badProp04")); } myProperties.put(name, value); } // setScopedProperty COM: <s> set a scoped property on the call i </s>
funcom_train/14282475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheck() { boolean okay = false; try { Value value1 = new Value("3"); Subtract sub = new Subtract(); sub.addFunction(value1); sub.check(); okay = false; } catch (Exception e) { e.printStackTrace(); } assertFalse("Subtract check failure", okay); } COM: <s> check that add correctly requires two or more functions </s>
funcom_train/34563796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit() { new Close().exec(context); if(proc != null) proc.stop(); stopTimer(); context.delete(this); try { socket.close(); } catch(final IOException ex) { log.write(ex.getMessage()); ex.printStackTrace(); } } COM: <s> exits the session </s>
funcom_train/35318499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getComponent(int n) { // This method is not synchronized under AWT tree lock. // Instead, the calling code is responsible for the // synchronization. See 6784816 for details. try { return component.get(n); } catch (IndexOutOfBoundsException z) { throw new ArrayIndexOutOfBoundsException("No such child: " + n); } } COM: <s> gets the nth component in this container </s>
funcom_train/36934797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CCSceneAnalyzer createSceneAnalyzer(int theWidth, int theHeight, int theFramesRate) { if ((nodes() & NODE_SCENE) == 0) return null; if (super.enableScene(theWidth, theHeight, theFramesRate)) { // setup the var for depth calc return new CCSceneAnalyzer(this); } else return null; } COM: <s> enable the scene data collection </s>
funcom_train/28352246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInactiveExcuse() { synchronized ( this ) { if ( isReady() ) return null; final StringJoiner joiner = new StringJoiner( "<br>" ); for ( KnobElement element : _elements ) { if ( !element.isReady() ) { final String excuse = element.getInactiveExcuse(); if ( excuse != null ) { joiner.append( excuse ); } } } return "<html><body> " + joiner.toString() + " </body></html>"; } } COM: <s> determine the reason for not being ready </s>
funcom_train/43415040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean haveWritePermission(String chave_recurso) { boolean havePermission = false; for (int i = 0; i < getPermissoes().size(); i++) { if (getPermissoes().get(i).getChaveRecurso().equals(chave_recurso)) { if(getPermissoes().get(i).getWritefield() == 1){ havePermission = true; } } } return havePermission; } COM: <s> checks if current user has write permission of an interface area or widget </s>
funcom_train/3100648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateArg1Isa(CycObject cycObject) throws UnknownHostException, IOException, CycApiException { CycList arg1Isas = cycAccess.getArg1Isas(cycObject); arg1Isas = substituteGenlConstantsForNarts(arg1Isas); arg1Isas = findAllowedTermsOrGenls(arg1Isas); if (arg1Isas.size() > 0) arg1Isa = (CycConstant)arg1Isas.first(); else arg1Isa = null; } COM: <s> populates the argument 1 type constaint for a cyc predicate </s>
funcom_train/18859224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(Object object) { String label = ((DataSourcesType)object).getId(); return label == null || label.length() == 0 ? getString("_UI_DataSourcesType_type") : //$NON-NLS-1$ getString("_UI_DataSourcesType_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } COM: <s> this returns the label text for the adapted class </s>
funcom_train/42944211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKeyIgnoreCase(String key) { if (key != null) { // TODO: Optimize! for (Iterator i = this.keyOrder.iterator(); i.hasNext();) { Object k = i.next(); if ((k instanceof String) && key.equalsIgnoreCase((String) k)) { return true; } } } return false; } COM: <s> tests if this map has the given key without considering case </s>
funcom_train/7295734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setVariableRange(int start, int end) { if (start > end || start < 0 || end > 0xFFFF) { throw new IllegalArgumentException("Invalid variable range " + start + ", " + end); } data.variablesBase = variableNext = (char) start; // first private use variableLimit = (char) (end + 1); } COM: <s> set the variable range to start end inclusive </s>
funcom_train/7981128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRaAppendLong() { // right-append '1' to column 5 buf.raAppend(5, (long) 1); assertEquals("buf is ' 1'", " 1", buf.toString()); // try appending a too-long int buf.raAppend(6, (long) 123); assertEquals("'123' appended", " 1123", buf.toString()); } COM: <s> check that ra append long works </s>
funcom_train/30244569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int score() { int total = 0; for(Item i:getItem()) { int s = i.getCount()*i.score(); if(i.getStatus()==Status.blessed) { s *= 2; } else if(i.getStatus()==Status.cursed) { s /= 2; } total += s; } return total; } COM: <s> computes this inventorys score </s>
funcom_train/20400398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Defaults getSystemDefaults() { Defaults defaults = new Defaults(); for (Iterator<Parameter> i = paramsByDeclarationOrder.iterator(); i.hasNext();) { Parameter param = (Parameter) i.next(); defaults.setDefault(param.getID(), param.getDefault()); } return (defaults); } COM: <s> returns a defaults object representing the default values defined within </s>
funcom_train/3491781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection<? extends T> collection) { boolean changed = false; int size = collection.size(); Iterator<? extends T> it; ensureCapacity(size); it = collection.iterator(); while (size-- > 0) { if (add(it.next())) { changed = true; } } return changed; } COM: <s> adds all of the elements in tt collection tt to the set </s>
funcom_train/18743800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EnableUniqueAction getEnableUniqueAction(ResourceKind resource) { EnableUniqueAction result = this.enableUniqueActionMap.get(resource); if (result == null) { result = new EnableUniqueAction(this.simulator, resource); this.enableUniqueActionMap.put(resource, result); } return result; } COM: <s> lazily creates and returns an instance of </s>
funcom_train/37446537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean SearchOptionTab (String split, ArrayList options) { String[] tabString = command.split(split); for (int m = 0; m < tabString.length; m++) { for (int n = 0; n < options.size(); n++) { if ( tabString[m].equals(options.get(n)) == true ) { return true; } } } return false; } COM: <s> this method splits the command line according to the spaces </s>
funcom_train/29630459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String v) { if (MedlineField_Type.featOkTst && ((MedlineField_Type)jcasType).casFeat_name == null) jcasType.jcas.throwFeatMissing("name", "taxonfinder.typesys.MedlineField"); jcasType.ll_cas.ll_setStringValue(addr, ((MedlineField_Type)jcasType).casFeatCode_name, v);} COM: <s> setter for name sets the field name that represents the field </s>
funcom_train/34538346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWrapperParameter(String _parameter, String _fieldName, String _type) { if (this.paramWrapper == null) this.paramWrapper = new Vector<QueryParameterStructure>(); QueryParameterStructure aux = new QueryParameterStructure(_parameter, _fieldName, _type); this.paramWrapper.addElement(aux); } COM: <s> adds new parameter to the wrapper clause </s>
funcom_train/37238125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkThread() { Iterator threads = recThreadList.iterator(); // Vector list=new Vector(); while (threads.hasNext()) { HL7RecThread recThread = (HL7RecThread) threads.next(); String hsptName = recThread.getFirstFacilityConnected(); if (!recThread.isAlive()) threads.remove(); } } COM: <s> check the thread if it is running or not </s>
funcom_train/31944122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareStreams(Socket socket) throws IOException { m_Input = new DataInputStream( new BufferedInputStream(socket.getInputStream()) ); m_Output = new DataOutputStream( new BufferedOutputStream(socket.getOutputStream()) ); m_ByteIn = new BytesInputStream(Modbus.MAX_IP_MESSAGE_LENGTH); }//prepareStreams COM: <s> prepares the input and output streams of this </s>
funcom_train/13391614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDialog() { int width = 400; int height = 370; pack(); setSize(width, height); getContentPane().add(base); java.awt.event.WindowListener l = new WindowAdapter() { public void windowClosing(WindowEvent e) { dispose(); } }; addWindowListener(l); setVisible(true); } COM: <s> override show to determine size and placement </s>
funcom_train/46815443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtensionAttributeString( IConfigurationElement configurationElement, String attributeName) { String attribute = configurationElement.getAttribute(attributeName); this .getCommonFacade() .log( AbstractExtensionManager.class, AbstractExtensionManager.MSGID0003, "Found contributed String '{0}', extensionpoint declared by plugin {1}, extensionpoint name = {2}, attribute name ={3}", attribute, this.getExtensionPointPluginId(), this.getExtensionPointName(), attributeName); return attribute; } COM: <s> returns the value of the attribute with the name attribute name </s>
funcom_train/39529521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage createImage(int width, int height) { if (width > PICSIZE || height > PICSIZE) return null; else // We used to reuse old buffered images for new entries. However, // due to the delayed processus of image writing, this could lead // to serious screen garbage is the cache was too small. // So we try a different strategy, just in case. return new BufferedImage(PICSIZE, PICSIZE, BufferedImage.TYPE_INT_ARGB); //return elements[pos].image; } COM: <s> creates an image of the required size can fail </s>
funcom_train/28250176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(final String login) throws NoSuchElementException { try { final User user = usersDAO.getUserFromLogin(login); if(user==null) { throw new NoSuchElementException("No such user for login " + login); } return user; } catch(final IOException ioe) { log.log(Level.SEVERE, ioe.toString(), ioe); throw new RuntimeException(ioe); } } COM: <s> returns an object representing the user with given login </s>
funcom_train/44708056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean commit() throws LoginException { s_log.debug("START commit"); if (m_userID != null) { m_subject.getPrincipals().add(new PartyPrincipal(m_userID)); s_log.debug("SUCCESS added new principal"); } s_log.debug("END commit"); return true; } COM: <s> adds the user id to the subject in a party principal </s>
funcom_train/51242318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MapPopupPanel() { super(impl.createElement()); // Default position of popup should be in the upper-left corner of the // window. By setting a default position, the popup will not appear in // an undefined location if it is shown before its position is set. setPopupPosition(0,0); } COM: <s> creates an empty popup panel </s>
funcom_train/13393879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws TaskExecutionException { super.execute(); if (path == null) { throw new TaskExecutionException("Must specify 'path' attribute"); } try { execute("/reload?path=" + URLEncoder.encode(this.path, CHAR_ENCODING)); } catch (UnsupportedEncodingException uee) { throw new TaskExecutionException(uee); } } COM: <s> execute the requested operation </s>
funcom_train/51129868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUserByTeam(Team team) { User[] myUsers = getUsers(); for (int i = 0; i < myUsers.length; i++) { if (myUsers[i].getTeam().equals(team)) { return myUsers[i]; } } return null; } COM: <s> returns the owner of a team </s>
funcom_train/21652988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (saveRunning) { for (Player p : GameEngine.getPlayers()) { if (p == null) { continue; } try { if (p == null || !p.online) { continue; } GameEngine.fileManager.saveCharacter(p); } catch (Exception e) { } } try { Thread.sleep(10000); } catch (Exception e) { } } } COM: <s> save character files every 10 seconds or so </s>
funcom_train/3520256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String storeDocText(String xmlDocText, String name) { String documentId = null; try { documentId = getLoad().parseText(xmlDocText, name); } catch (Throwable ex) { status("Error: " + ex.getMessage()); } if (documentId != null) { status("Loaded document " + documentId + " from text"); } else { status("Was unable to load document from text"); } return documentId; } COM: <s> store a document from the text xml doc text </s>
funcom_train/24073690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Transaction tran) { for (Long adr : locksRead.get(tran)) readLocks.remove(adr, tran); locksRead.removeAll(tran); assert !locksRead.isEmpty() || readLocks.isEmpty(); for (Long adr : locksWrite.get(tran)) { writeLocks.remove(adr); writes.remove(adr, tran); } locksWrite.removeAll(tran); assert !locksWrite.isEmpty() || (writeLocks.isEmpty() && writes.isEmpty()); } COM: <s> remove all locks for this transaction </s>
funcom_train/41304751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnPlayGame() { if (btnPlayGame == null) { btnPlayGame = new JButton(); btnPlayGame.setText("Play"); btnPlayGame.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { gameFactory = new SeegaGameFactory(); gameFactory.getEngine().initialize(new Properties()); startGame(); } }); } return btnPlayGame; } COM: <s> this method initializes btn play game </s>
funcom_train/584162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if ( jContentPane == null ) { jContentPane = new JPanel(); jContentPane.setLayout( new BorderLayout() ); jContentPane.add( getJInterfacesCustomBox(), java.awt.BorderLayout.NORTH ); jContentPane.add( getJDataPanel(), java.awt.BorderLayout.CENTER ); jContentPane.add( getJCommandPanel(), java.awt.BorderLayout.SOUTH ); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/45617166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void convert(Collection<File> files) throws BuildException { AbstractConverter conv = getConverter(files); conv.setForceOutput(forceOutput); Collection<File> result = conv.convert(); files.removeAll(result); for (File f : files) { log(String.format("Unable to convert BibTeX file %s", f), Project.MSG_ERR); } if (files.size() > 0) { throw new BuildException("Not all BibTeX files could be converted."); } } COM: <s> performs the actual conversion </s>
funcom_train/30206089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonRemoveAll() { if (jButtonRemoveAll == null) { jButtonRemoveAll = new JButton(); jButtonRemoveAll.setText("Remove all"); jButtonRemoveAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { modelPoints.getArray().clear(); refreshPointsList(); } }); } return jButtonRemoveAll; } COM: <s> this method initializes j button remove all </s>
funcom_train/367087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { FocusEvent fe; synchronized ( this ) { m_curNode = null; m_query = null; Entity[] rem = (Entity[])m_set.toArray(FocusEvent.EMPTY); m_set.clear(); fe = new FocusEvent(this, FocusEvent.FOCUS_REMOVED, null, rem); } m_listener.focusChanged(fe); } // COM: <s> clears this focus set invalidating any previous search </s>
funcom_train/5215317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initData() throws GoogleException { String user = Activator.getDefault().getPluginPreferences().getString("google.user"); String passwd = Activator.getDefault().getPluginPreferences().getString("google.passwd"); GoogleAccount myAccount = new GoogleAccount(user, passwd); List<GoogleAccount> list = new ArrayList<GoogleAccount>(); list.add(myAccount); GoogleCalendarList calendarList = new GoogleCalendarList(list); tasks = calendarList.getAllTasks(); listeners.clear(); addChangeListener(calendarList); }; COM: <s> initialize the table data </s>
funcom_train/16750788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DbNode find(long id) { int i = Collections.binarySearch(getNodes(), new DbNode(id, 0, 0), new Comparator<DbNode>() { @Override public int compare(DbNode a, DbNode b) { if (a.getId() == b.getId()){ return 0; }else if (a.getId() > b.getId()){ return 1; }else{ return -1; } } }); if (i >= 0){ return getNodes().get(i); } return null; } COM: <s> within this block find the node with the given id </s>