__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11792823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayUsage() { String usage = "java " + getClass().getName() + " command "; String header = Messages.getString("Client.OptionsText"); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(usage, header, options, null, true); System.out.println(Messages.getString("Client.Footer")); } COM: <s> prints out the usage of the client to the standard output </s>
funcom_train/28346070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getSequenceAsDocument() throws LatticeError { // checkLattice(); // generate a DOM for the XAL sequence XmlDataAdaptor sequenceAdptr = XmlDataAdaptor.newEmptyDocumentAdaptor(null, null); sequence.write(sequenceAdptr.createChild("ComboSequence")); // SequenceAdptr.writeTo(new OutputStreamWriter(System.out)); return sequenceAdptr.document(); } COM: <s> getter for the accelerator sequence as a dom </s>
funcom_train/16380364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateTextFieldHeightType_Min(int textFieldHeightType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = textFieldHeightType >= TEXT_FIELD_HEIGHT_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.TEXT_FIELD_HEIGHT_TYPE, new Integer(textFieldHeightType), new Integer(TEXT_FIELD_HEIGHT_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em text field height type em </s>
funcom_train/36787827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumericFormat(int column, int decimals) { String decimalString = ""; if (decimals > 0) { decimalString = "0."; for (int i = 0; i < decimals; i++) { decimalString += "0"; } } mFormatsMap.put(mColumns.get(column - 1).get(1), new DecimalFormat( decimalString)); } COM: <s> sets the given columns value with the given decimals </s>
funcom_train/9114244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject toJSONObject(JSONArray names) { if ((names == null) || (names.length() == 0) || (length() == 0)) { return null; } JSONObject jo = new JSONObject(); for (int i = 0; i < names.length(); i++) { jo.put(names.getString(i), this.opt(i)); } return jo; } COM: <s> produce a jsonobject by combining a jsonarray of names with the values of </s>
funcom_train/18883402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StreamSegment getStreamSegment(long position, int length) { int numSegments = segmentLengths.length; for (int i = 0; i < numSegments; i++) { int len = segmentLengths[i]; if (position < len) { return new StreamSegment(segmentPositions[i] + position, Math.min(len - (int) position, length)); } position -= len; } return null; } COM: <s> gets the stream segment attribute of the stream segment mapper impl object </s>
funcom_train/43067963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MacBytes getMacBytes(int index, int arraySize){ byte[] dst = new byte[MacBytes.size()]; int offset = macStart() + index*MacBytes.size(); byte[] bytes = getBytes(); for (int i=0; i < dst.length; i++, offset++) dst[i] = bytes[offset]; return new MacBytes(dst); } COM: <s> return types of following two are subject to change </s>
funcom_train/24936706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computeActorOutputPortFanout(Network network) { for (Vertex vertex : network.getVertices()) { if (vertex instanceof Instance) { Instance instance = (Instance) vertex; Map<Port, List<Connection>> map = instance.getOutgoingPortMap(); for (List<Connection> values : map.values()) { int cp = 0; for (Connection connection : values) { networkPortConnectionFanout.put(connection, cp++); } } } } } COM: <s> count the fanout of the actors output port </s>
funcom_train/3107981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeSortableTable(SortableTable table) { table.getTable().setDefaultRenderer(Long.class, new ByteCellRenderer()); ImageIcon[] buffer = getUserIcons(); table.getTable().getColumn("Nick").setCellRenderer( new UserCellRenderer(buffer, null)); table.getTable().getColumn("Ping").setCellRenderer( new javax.swing.table.DefaultTableCellRenderer()); } COM: <s> initialize the given sortable table instance </s>
funcom_train/16415496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map createBindingMap(String[] paramNames) { Map<Integer, String> returnValue = new HashMap<Integer, String>(); int x = 0; for (x = 0; x < paramNames.length; x++) { returnValue.put(x, paramNames[x]); } returnValue.put(x, "THIS"); return returnValue; } COM: <s> create the binding map of names </s>
funcom_train/1958036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed (ActionEvent event){ String cmd = event.getActionCommand(); if(cmd.equals("browseIpt")) { JFileChooser chooser = new JFileChooser(); int returnVal = chooser.showDialog(this, "Select Iptables output file"); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); txtIptablesCmd.setText(file.getAbsolutePath()); } } } COM: <s> listen for clicks on the browse buttons </s>
funcom_train/27822133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTreeNodeX(JTreeTable treeTable,int row) { int indent=treeTable.getTreeNodeIndent(row); if (treeTable.getShowsRootHandles() && treeTable.isRootVisible()) indent+=m_expandedIcon.getIconWidth(); return indent; } COM: <s> returns the horizontal coordinate of the node in the table </s>
funcom_train/37567116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String identify(InputStream is) throws IOException { StringBuffer text = new StringBuffer(); byte buffer[] = new byte[2000]; int len = 0; while ((len = is.read(buffer)) != -1) { text.append(new String(buffer, 0, len)); } return identify(text.toString()); } COM: <s> identify language from inputstream </s>
funcom_train/35874385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getJTablePessoaFisica() { if (jTablePessoaFisica == null) { jTablePessoaFisica = new JTable(modelo); jTablePessoaFisica.setPreferredScrollableViewportSize(new Dimension(400,100)); jTablePessoaFisica.setGridColor(new Color(238, 238, 238)); jTablePessoaFisica.setCellSelectionEnabled(false); } return jTablePessoaFisica; } COM: <s> this method initializes j table pessoa fisica </s>
funcom_train/23271264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBarBaseValue(double base) { CategoryPlot plot = (CategoryPlot) this.chart.getPlot(); if (plot == null) { return; } BarRenderer renderer = (BarRenderer) plot.getRenderer(); if (renderer == null) { return; } double old = renderer.getBase(); renderer.setBase(base); firePropertyChange("barBaseValue", old, base); } COM: <s> sets the bar base value and fires a </s>
funcom_train/46764995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableNode getNode(ThreadedMessage tm){ TableNode node = null; String id = tm.getID(); String nick = tm.getNick(); for (Iterator i = displayedmessagetree.nodes(); i.hasNext();){ TableNode nextnode = (TableNode)i.next(); if (nextnode.canGetString("nick") && nextnode.canGetString("id")){ if (nextnode.getString("nick").equals(nick) && nextnode.getString("id").equals(id)) node = nextnode; } } return node; } COM: <s> returns the corresponding table node of the threaded message </s>
funcom_train/42535103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof TravControl))return false; if(o == this)return true; TravControl oo = (TravControl)o; return (((Object)start).equals(oo.start))&&(((Object)builtins).equals(oo.builtins))&&(((Object)bypass).equals(oo.bypass)); } COM: <s> is the given object equal to this trav control </s>
funcom_train/3290503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getDevices(String devicetype, List devices) { MMObjectBuilder mmob = mmb.getMMObject(devicetype); List v = mmob.searchVector(""); Iterator e = v.iterator(); while (e.hasNext()) { MMObjectNode mmon = (MMObjectNode)e.next(); String name = "" + mmon.getValue("name"); devices.add(devicetype); devices.add(name); } } COM: <s> get all devices of given devicetype </s>
funcom_train/2808889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHandlerClass(String name, int type) { Map map = getHandlerMap(); Map hMap = null; if (type == 1) hMap = (Map) map.get("view"); else hMap = (Map) map.get("event"); if (!hMap.containsKey(name)) return null; else return (String) hMap.get(name); } COM: <s> gets the class name of the named handler </s>
funcom_train/37522268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processTree( CompilerPassEnterable tree ) { long lastTime = System.currentTimeMillis(); //tree.prettyPrint(); prettyPrint(tree); if (verboseMode()) { inform( CompilerMessages.JAVA_CODE_GENERATED, tree.getTokenReference().file(), new Long(System.currentTimeMillis() - lastTime) ); } } COM: <s> generate the source code of parsed compilation unit </s>
funcom_train/40622659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTableWidth(FixedWidthFlexTable table, boolean includeSpacer) { int scrollWidth = table.getElement().getScrollWidth(); if (!includeSpacer) { int spacerWidth = getSpacerWidth(table); if (spacerWidth > 0) { scrollWidth -= spacerWidth; } } return scrollWidth; } COM: <s> returns the width of a table minus any padding in pixels </s>
funcom_train/9100822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAugmentedSearchURL() { if (properties.getMethod().equals("GET")) { StringBuffer url = new StringBuffer(); url.append(properties.getSearchURL()); if (url.indexOf("?") < 0) { url.append("?"); } else { url.append("&"); } url.append(urlBuffer.toString()); return url.toString(); } else { return properties.getSearchURL(); } } COM: <s> modifies the request url depending on the request type </s>
funcom_train/3821105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getOptionObject( String opt ) { String res = getOptionValue( opt ); Object type = ((Option)((List)options.get(opt)).iterator().next()).getType(); return res == null ? null : TypeHandler.createValue(res, type); } COM: <s> p return the code object code type of this code option code </s>
funcom_train/26383790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Mounted getSuperCharger() { for (Mounted m : getMisc()) { MiscType mtype = (MiscType) m.getType(); if (mtype.hasFlag(MiscType.F_MASC) && m.isReady() && mtype.hasSubType(MiscType.S_SUPERCHARGER)) { return m; } } return null; } COM: <s> get a supercharger mounted on this mech </s>
funcom_train/21300058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFreeChart createChart(IntervalXYDataset dataset) { JFreeChart chart = ChartFactory.createHistogram( "Histogram Demo", null, null, dataset, PlotOrientation.VERTICAL, true, false, false ); chart.getXYPlot().setForegroundAlpha(0.75f); return chart; } COM: <s> creates a chart </s>
funcom_train/31156451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadRequirements() { boolean success = false; ResourceBundle table = ResourceBundle.getBundle(settings.getString( JellSettings.REFERENCE_TABLE)); String nextRef = null; referenceList = new ArrayList(); for (Enumeration e = table.getKeys(); e.hasMoreElements(); ) { nextRef = (String)e.nextElement(); if ((table.getString(nextRef)).equals("true")) { referenceList.add(nextRef); } } } COM: <s> load the properties from the input file </s>
funcom_train/7647155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkPermission(Permission permission, Object context) { try { inCheck = true; // Must be an AccessControlContext. If we don't check // this, then applications could pass in an arbitrary // object which circumvents the security check. if (context instanceof AccessControlContext) { ((AccessControlContext) context).checkPermission(permission); } else { throw new SecurityException(); } } finally { inCheck = false; } } COM: <s> checks whether the specified security context is allowed to access the </s>
funcom_train/4857021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transferToVariant() { if (!this.hasVariant) { return; } // Parameters.out.println("Transferring to " + this.variant + " the variant of " + this); this.variant.addToBuffer(this.bufferAmount * this.density / this.variant.density); this.bufferAmount = 0.0; } COM: <s> transfers the buffer to the parent material </s>
funcom_train/36427889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean get(FileChannel fileChannelOut) { if (!isReady) { return false; } long size = pfile.length(); long transfert; try { transfert = pfile.transferTo(fileChannelOut); } catch (PassthroughException e) { return false; } if (transfert == size) { position += size; } return transfert == size; } COM: <s> write the file interface to the file channel out thus bypassing the </s>
funcom_train/25329849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExposedField(String fieldName, Field f) { fieldName = Field.baseName(fieldName); if (loader.debug) { System.out.println( "Proto.setExposedField(): adding field named \"" + fieldName + "\""); } f.init(null, FieldSpec, Field.EXPOSED_FIELD, fieldName); } COM: <s> sets the exposed field attribute of the proto object </s>
funcom_train/11724068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyCreated() { // copy listeners to array to avoid ConcurrentModificationException ItemLifeCycleListener[] la = listeners.values().toArray(new ItemLifeCycleListener[listeners.size()]); for (int i = 0; i < la.length; i++) { la[i].itemCreated(this); } } COM: <s> notify the listeners that this instance has been created </s>
funcom_train/3457509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioFile getNext() { AudioFile af; //af = (AudioFile)queueVector.remove(queueVector.size()-1); //get first element. Pull it out of the queue af = (AudioFile) queueVector.remove(0); //When a file is dequeued, it needs to set the time for it's end play. This will be //the stack start time. return af; } COM: <s> retrieves the next file from the queue </s>
funcom_train/43256889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isRectangular_(Object o, int depth){ if( depth == dimensions.length ) return true ; int n = Array.getLength(o) ; if( n != dimensions[depth] ) return false ; for( int i=0; i<n; i++){ if( !isRectangular_(Array.get(o, i), depth+1) ){ return false; } } return true ; } COM: <s> recursively check all dimensions to see if an array is rectangular </s>
funcom_train/20888749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enterRoutingPhase() { // LOGGER.debug("Node " + myNodeId + " has entered RoutingPhase"); currentPhase = ROUTING_PHASE; LOGGER.info("******** Neighborhood entering routing phase ********"); LOGGER.info("Node " + myNodeId + "'s WholeNeighborhood: " + printMyWholeNeighborhood()); LOGGER.info("Node " + myNodeId + "'s SelectedNeighborhood: " + printMySelectedNeighborhood()); } COM: <s> this method represents phase 3 routing phase </s>
funcom_train/44871418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doLoadFirstExample() { String loadDefault = (loadExampleButton == null) ? "yes" : "no"; if (exampleStrings != null && exampleStrings.size() > 0 && !"no".equalsIgnoreCase(getParameter("LoadFirstExample", loadDefault))) { doLoadExample((String) exampleStrings.elementAt(0)); } } COM: <s> load the first example </s>
funcom_train/49789960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkDoctoralForm() throws Exception { { String field = getLabelIDForText("name"); assertLabeledFieldEquals(field, "Test Student"); } { String field = getLabelIDForText("enrolled"); assertLabeledFieldEquals(field, "yesterday"); } { String field = getLabelIDForText("qualification"); assertLabeledFieldEquals(field, "bsc"); } { String field = getLabelIDForText("degree"); assertLabeledFieldEquals(field, "science"); } } COM: <s> a specific doctoral instance we are checking for </s>
funcom_train/17933720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject put(String key, Object value) throws NullPointerException { if (key == null) { throw new NullPointerException("Null key."); } if (value != null) { this.myHashMap.put(key, value); } else { remove(key); } return this; } COM: <s> put a key value pair in the jsonobject </s>
funcom_train/10863607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt(String param, int def) { String val = get(param); try { return val==null ? def : Integer.parseInt(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } } COM: <s> returns the int value of the param or def if not set </s>
funcom_train/25290689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackDistanceGain(Point2f[] attenuation) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("ConeSound0")); ((ConeSoundRetained)this.retained).setBackDistanceGain(attenuation); } COM: <s> sets this sounds back distance gain attenuation where gain scale </s>
funcom_train/21405421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long newPacemark(long idRoute) { DataBasePoints dbp = new DataBasePoints(ctx); dbp.open(); Punt p = dbp.getLastPoint(idRoute); dbp.close(); DataBasePlaceMarks dbm = new DataBasePlaceMarks(ctx); dbm.open(); long id = dbm.insertPlacemark(idRoute, p.getLat(), p.getLon(), p .getAltitude()); dbm.close(); return id; } COM: <s> creates a new placemark and associates it with the last point </s>
funcom_train/34635568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImageLinks() { NodeList list = document.getElementsByTagName("img"); for (int i = 0; i < list.getLength(); i++) { Element imgElement = (Element) list.item(i); String src = imgElement.getAttribute("src"); Node parent = imgElement.getParentNode(); Element aElement = document.createElement("a"); aElement.setAttribute("href", src); aElement.appendChild(imgElement); parent.appendChild(aElement); } } COM: <s> surrounds all img tags with a a tag which links to this image </s>
funcom_train/21469515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formatTimeZoneRFC(StringBuffer buf, int count, Date date, TimeZone timeZone) { if (count < 3) { buf.append(timeZone.getRFCTimeZoneString(date)); } else if (count == 3) { buf.append(timeZone.getISOTimeZoneString(date)); } else { buf.append(timeZone.getGMTString(date)); } } COM: <s> formats timezone field following rfc </s>
funcom_train/14300788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sustainDamage(String type, int damage,int servingSize) { if (servingSize < m_size) { if (m_alive) { this.setHealth(m_healthLevel-damage); } this.setSize(m_size-servingSize); return true; } this.setSize(0); //will automatically kill entity and setHealth(0) would be redundant return false; } COM: <s> method called when this entity is attacked or damaged typically when one entity </s>
funcom_train/28774356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getAmount() { if (amount == null) {//GEN-END:|125-getter|0|125-preInit // write pre-init user code here amount = new TextField("Amount", null, 32, TextField.DECIMAL);//GEN-LINE:|125-getter|1|125-postInit // write post-init user code here }//GEN-BEGIN:|125-getter|2| return amount; } COM: <s> returns an initiliazed instance of amount component </s>
funcom_train/26025183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadRegions(Object[] cells) { for (Object obj: cells) { DefaultGraphCell cell = (DefaultGraphCell)obj; ArchPadComponent archPadComponent = (ArchPadComponent)cell.getUserObject(); regions.addAll(archPadComponent.getRegions()); List<?> children = cell.getChildren(); if (children.size() > 0) { loadRegions(children.toArray()); } } } COM: <s> load the architectural </s>
funcom_train/15609261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CuratedExon getExonForStopCodon() { if (this.stopCodon == null) { return null; } GeometricAlignment codonAlign = stopCodon.getOnlyGeometricAlignmentToOnlyAxis(); if (codonAlign == null) { return null; } return (CuratedExon) this.getSubFeatureAtPositionOnAxis( codonAlign.getAxis(), codonAlign.getRangeOnAxis().getStart()); } COM: <s> get the curated exon that contains the stop codons start position </s>
funcom_train/49262865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean belongsTo(final String[] list, final String word) { if (list == null) { return false; } if (caseSensitive) { for (int i = 0; i < list.length; i++) { if (list[i].equals(word)) { return true; } } } else { for (int i = 0; i < list.length; i++) { if (list[i].equalsIgnoreCase(word)) { return true; } } } return false; } COM: <s> determines if a word belongs to a list </s>
funcom_train/40356326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeLog(String s) { try { FileOutputStream fout = new FileOutputStream("logs/Log.txt", true); PrintStream p = new PrintStream(fout); p.println(s); } catch(Exception ex) { ex.printStackTrace(); logError(ex); } } COM: <s> function to write an entry in the log file </s>
funcom_train/4753821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IExpr put(final int key, final IExpr value) { int index = findInsertionIndex(key); IExpr previous = missingEntries; boolean newMapping = true; if (index < 0) { index = changeIndexSign(index); previous = values[index]; newMapping = false; } keys[index] = key; states[index] = FULL; values[index] = value; if (newMapping) { ++size; if (shouldGrowTable()) { growTable(); } ++count; } return previous; } COM: <s> put a value associated with a key in the map </s>
funcom_train/38463896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeClassMapping(ObjectData data) { if(data != null) { Set objs = (Set)classMap.get(data.getObjectClass()); if(objs != null) { objs.remove(data.getOID()); if(objs.isEmpty()) { // There are no more objects of this class. classMap.remove(data.getObjectClass()); } } } } COM: <s> removes mapping for an objects class </s>
funcom_train/42415632
/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 ("Qti".equals(portName)) { setQtiEndpointAddress(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/3363891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerKeyboardAction(ActionListener anAction,String aCommand,KeyStroke aKeyStroke,int aCondition) { InputMap inputMap = getInputMap(aCondition, true); if (inputMap != null) { ActionMap actionMap = getActionMap(true); ActionStandin action = new ActionStandin(anAction, aCommand); inputMap.put(aKeyStroke, action); if (actionMap != null) { actionMap.put(action, action); } } } COM: <s> this method is now obsolete please use a combination of </s>
funcom_train/9664855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getFooterTdElement(int column) { Element tfoot = getFooterTable().getTFootElement(); if (tfoot != null) { if (tfoot.getChildCount() > 0 && tfoot.getFirstChildElement().getChildCount() > column) { Element tr = DOM.getChild(tfoot, 0); return DOM.getChild(tr, column); } } return null; } COM: <s> this method gets a footer td element </s>
funcom_train/23012016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchRectangle(FloatRectangle ext) { if (activeLayer != null) { request.clear(); request.setSpatialExtent(ext, null); request.setQuery(ProxyRequest.RQT_ATTRIB_WEBLINK, activeLayer.id, null); //search if (!stopped) { startServiceThread(); } } } COM: <s> initiates proxy request </s>
funcom_train/21116885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetZamanDilimi() { System.out.println("setZamanDilimi"); int zamanDilimi = 0; Zaman instance = new Zaman(); instance.setZamanDilimi(zamanDilimi); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set zaman dilimi method of class persistence </s>
funcom_train/33161828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reset(InternalNode[] entitiesToLayout) { tempLocationsX = null; tempLocationsY = null; forcesX = null; forcesY = null; anchors = null; setDefaultConditions(); srcDestToNumRelsMap = new HashMap(); srcDestToRelsAvgWeightMap = new HashMap(); relTypeToWeightMap = new HashMap(); } COM: <s> clean up after done </s>
funcom_train/13395590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteFromTables(String[] names) { for (int i = 0; i < names.length; i++) { int rowCount = this.jdbcTemplate.update("DELETE FROM " + names[i]); if (logger.isInfoEnabled()) { logger.info("Deleted " + rowCount + " rows from table " + names[i]); } } this.zappedTables = true; } COM: <s> convenient method to delete all rows from these tables </s>
funcom_train/31873026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Machine getMachine() { int n = this.machine.size(); List<Instruction> programs = new ArrayList<Instruction>(); for (int i=0;i<n;i++) { if (Math.random()<this.reliability) // the right program programs.add(i,this.machine.instructions.get(i)); else // empty program programs.add(i,new Program(new IntList())); } Machine m = new Machine(); m.instructions = programs; return m; } COM: <s> provides a machine </s>
funcom_train/9367702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] b, int offset, int length) throws IOException { if (b == null) { throw new NullPointerException("byte array is null"); } if ((offset | length) < 0 || length > b.length - offset) { throw new ArrayIndexOutOfBoundsException("invalid offset or length"); } return mSocket.read(b, offset, length); } COM: <s> reads at most </s>
funcom_train/24059657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void realign() { StyleBarAlignment alignment = StyleBarAlignment.valueOf( _preferences.getPreference(PREFERENCE_ALIGNMENT)); if (!alignment.equals(_alignment)) { _alignment = alignment; membersUpdateAlignment(); removeAll(); if (_alignment.equals(StyleBarAlignment.LEFT) || _alignment.equals(StyleBarAlignment.RIGHT)) { setOrientation(VERTICAL); } else { setOrientation(HORIZONTAL); } // OrientationChangeListener will be triggered and // layout buttons } } COM: <s> load the current aligment from preferences and realign </s>
funcom_train/26618618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(char[] buffer, int start, int length) throws GSPException { try { m_content.write("print(\""); encodeJavaStringLiteral(m_content, buffer, start, length); m_content.write("\");"); m_content.write(LINEFEED); } catch (IOException e) { throw new GSPException(e); } } COM: <s> string to print </s>
funcom_train/47314325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vec2D crossProduct(Vec2D cV){ return new Vec2D( m_fY * cV.m_fW - m_fW * cV.m_fY, m_fW * cV.m_fX - m_fX * cV.m_fW, m_fX * cV.m_fY - m_fY * cV.m_fX ); } COM: <s> this method will perform cross product given the two vectors </s>
funcom_train/40859991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFieldSortCustomSearcher() throws Exception { // log("Run testFieldSortCustomSearcher"); // define the sort criteria Sort custSort = new Sort( new SortField("publicationDate_", SortField.STRING), SortField.FIELD_SCORE ); Searcher searcher = new CustomSearcher (index, 2); // search and check hits matchHits(searcher, custSort); } COM: <s> run the test using two custom searcher instances </s>
funcom_train/40213557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawArrow(Graphics2D g2, int x1, int y1, int x2, int y2) { //startx,starty,endx,endy,headsize,difference,factor g2.drawPolygon(getArrow(x1, y1, x2, y2, DEFAULT_HEAD_SIZE, DEFAULT_DEFFERENCE, DEFAULT_FACTOR)); g2.fillPolygon(getArrow(x1, y1, x2, y2, DEFAULT_HEAD_SIZE, DEFAULT_DEFFERENCE, DEFAULT_FACTOR)); } COM: <s> drawing the arrow </s>
funcom_train/1300847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExtractionResults run(String streamId, InputStream inputStream, AtomicBoolean die, boolean turnOffCaching) throws IOException { final TextContainer textContainer = megaExtractor.runExtractors(streamId, inputStream, die, turnOffCaching); return run(textContainer); } COM: <s> run the extraction pipeline and disambiguate the results over the input stream </s>
funcom_train/20678757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getComment() { String result = ""; NodeList nodes = node.getChildNodes(); if (nodes != null) { for (int i = 0; i < nodes.getLength(); i++) { Node curr = nodes.item(i); if (curr.getNodeType() == Node.COMMENT_NODE) { result += ((Comment) curr).getData(); } } } return result; } COM: <s> gets comment for this xml node </s>
funcom_train/49791543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String instrumentJavascriptBlockTag(String input) throws InstrumentationException { // jump to the start of the actual javascript if (!input.contains(">")) { // there is no ending of the script tag: something like [<script src="<?php] return input; // return as-is } return input.substring(0, input.indexOf('>') + 1) + instrumentJavascriptBlock(input.substring(input.indexOf('>') + 1)); } COM: <s> instrument a block of javascript </s>
funcom_train/13306332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeeAlso(String _seeAlso) { synchronized (this) { try { java.net.URI test = new java.net.URI(_seeAlso); this.seeAlso = test.toString(); setGraphProperty(new URIImpl(SIOC.seeAlso),new URIImpl(this.seeAlso)); } catch (URISyntaxException mfuex) { setGraphProperty(new URIImpl(SIOC.link),_seeAlso); } } this.setTimestamp(); } COM: <s> sets the see also it may be uri </s>
funcom_train/3297218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveFrag(String taskName) throws IOException { Frag saveFrag = (Frag) TestUtil.createTask(TASK_TYPE, Frag.class, taskName); saveFrag.setArgType(ArgFragDelegate.NAMED_TYPE); saveFrag.setArgFrags(TreeNode.PATH_SEPARATOR + ROOT_NAME + TreeNode.PATH_SEPARATOR + CHILD1_NAME); saveFrag.setLibraryName(LIBRARY_NAME); saveFrag.setLibraryPath(TestUtil.getTempDir()); saveFrag.setRead(false); saveFrag.execute(); } COM: <s> saves a frag that uses the named frag root child1 as an argument </s>
funcom_train/19082866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newMessage(InputStream in) throws IOException { try { MagicUIComponents.chatHistoryText.append(1, new BufferedReader( new InputStreamReader(in)).readLine()); } catch (IOException e) { System.out.println(" **disconnection ** in chat"); MagicUIComponents.chatHistoryText.append(1, LanguageManager .getString("disconnected")); throw e; } } COM: <s> to read a message from the specified input stream </s>
funcom_train/32220548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDeleteXml() { wrapper = new Envelope(); wrapper.set(versionAddr, version); wrapper.setAttribute("transactionData", "action", "delete"); wrapper.set(submitterIdAddr,submitterId); wrapper.set(submitterGroupAddr,submitterGroup); wrapper.set(contentIdAddr,contentId); wrapper.buildPath(communityContentAddr); wrapper.set(metadataIdentifierAddr,metadataIdentifier); wrapper.set(timestampAddr,DateUtil.toString(timestamp)); return adjustXML(wrapper.marshall()); } COM: <s> return the xml for a delete operation based on the current </s>
funcom_train/18831319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void treeExpanded(TreeExpansionEvent evt) { TreePath path = evt.getPath(); // The expanded path JTree tree = (JTree) evt.getSource(); // The tree // Get the last component of the path and // arrange to have it fully populated. FileTreeNode node = (FileTreeNode) path.getLastPathComponent(); if (node.populateDirectories(true)) { ((DefaultTreeModel) tree.getModel()).nodeStructureChanged(node); } } COM: <s> description of the method </s>
funcom_train/21762264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setBounds(new Rectangle(46, 93, 642, 246)); jScrollPane.setViewportView(getJTextAreaStatus()); } return jScrollPane; } COM: <s> this method initializes j scroll pane </s>
funcom_train/13275329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGroundPaint(EnvironmentPaint groundPaint) { if (groundPaint != this.groundPaint) { EnvironmentPaint oldGroundPaint = this.groundPaint; this.groundPaint = groundPaint; this.propertyChangeSupport.firePropertyChange(Property.GROUND_PAINT.name(), oldGroundPaint, groundPaint); } } COM: <s> sets whether the ground is colored or textured </s>
funcom_train/7874343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Status updateStatus(String status) throws TwitterException { assert (status != null); requireCredentials(); String url = "http://twitter.com/statuses/update.json"; Parameter[] parameters = {new Parameter("status", status)}; String response = getTwitterHttpManager().post(url, parameters); return Status.newFromJsonString(response); } COM: <s> updates the authenticating users status </s>
funcom_train/7633627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Params addTextView(final String text, float heightRatio) { mViewFactories.add(new ViewFactoryBase(heightRatio) { public View create(final Context context) { final TextView tv = new TextView(context); tv.setText(text); return tv; } }); return this; } COM: <s> add a text view </s>
funcom_train/21846331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIdentifier(String word) { if (word == null || word.length() == 0) { return false; // not qualified as word } for (int i = 0; i < word.length(); i++) { if (!doc.isIdentifierPart(word.charAt(i))) { return false; } } return true; } COM: <s> check whether the given word is identifier or not </s>
funcom_train/39802096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Rectangle getMonthDetailsBoundsAtLocation(int x, int y) { Rectangle month = getMonthBoundsAtLocation(x, y); if (month == null) return null; int startOfDaysY = month.y + getMonthHeaderHeight(); if (y < startOfDaysY) return null; month.y = startOfDaysY; month.height = month.height - getMonthHeaderHeight(); return month; } COM: <s> returns the bounds of the month details which contains the </s>
funcom_train/8037577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean storeCash() throws VMCSException{ for(Coin coin : coins){ try { tranCtrl.getMainController().getMachineryController().storeCoin(coin); } catch (VMCSException e) { tranCtrl.terminateFault(this); throw new VMCSException("Storing Coins",e.getMessage()); } } this.coins.clear(); this.totalInserted = 0; tranCtrl.getCustomerPanel().getMoneyInserted().setValue("0" + " C"); return true; } COM: <s> instruct the cash store to update its totals and then re set the </s>
funcom_train/7457577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean consumeBoolean() throws ParseException { if (currentToken.equals("true")) { nextToken(); return true; } else if (currentToken.equals("false")) { nextToken(); return false; } else { throw parseException("Expected \"true\" or \"false\"."); } } COM: <s> if the next token is a boolean consume it and return its value </s>
funcom_train/49626122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element deserializeToJDOM() { Element check = new Element("TypedCheck").setAttribute("class", this .getClass().getCanonicalName()); check.addContent(new Element("parameter").setAttribute("name", getParameterName())); Element regexElement = new Element("regex"); if (this.regex != null) { regexElement.setAttribute("value", this.regex); } check.addContent(regexElement); return check; } COM: <s> returns a jdom representation of the check </s>
funcom_train/17860657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTotalCards(Integer totalCards) { if (totalCards == null) { throw new NullPointerException(); } if (this.totalCards < MIN_SUITS_LENGTH || this.totalCards > MAX_SUITS_LENGTH) { throw new IllegalArgumentException("cummulatedLength must an integer between 1 and 30"); } this.totalCards = totalCards; } COM: <s> sets accumulated length </s>
funcom_train/1237905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerSchemaSpecificTypes(TypeMappingImpl tm) { // Register the timeInstant type tm.register(java.util.Calendar.class, Constants.XSD_TIMEINSTANT2000, new CalendarSerializerFactory(java.util.Calendar.class, Constants.XSD_TIMEINSTANT2000), new CalendarDeserializerFactory(java.util.Calendar.class, Constants.XSD_TIMEINSTANT2000)); } COM: <s> register the schema specific type mappings </s>
funcom_train/12663111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(final String attr, final String value) { if ("name".equals(attr)) { throw new IllegalArgumentException("Cannot modify 'name' attribute of command"); } if ("controller".equals(attr)) { throw new IllegalArgumentException("Cannot modify 'controller' attribute of command"); } props.setProperty(getPropertyKey(attr), value); parseProperties(); } COM: <s> sets the property of the command with the given attribute name </s>
funcom_train/21897041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restore(WidgetDashState state, WidgetContainerFactory factory) { removeAll(); setColumnCount(state.getColumnCount()); WidgetIdentifier[] identifiers = state.getWidgetIdentifiers(); for (WidgetIdentifier identifier : identifiers) { WidgetContainer container = factory.createWidgetContainer(identifier); if (container != null) { WidgetPosition position = state.getWidgetPosition(identifier); if (position != null) { container.setWidgetPosition(position); } add(container); } } } COM: <s> populate the widget pane given the previously stored </s>
funcom_train/44166249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignTradeRoute(Unit unit) { TradeRoute oldRoute = unit.getTradeRoute(); if (!gui.showTradeRouteDialog(unit)) return; // Cancelled // Delete or deassign of trade route removes the route from the unit TradeRoute route = unit.getTradeRoute(); if (oldRoute != route) assignTradeRoute(unit, route); } COM: <s> assigns a trade route to a unit using the trade route dialog </s>
funcom_train/28298235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startNewRound() { // init a new round if (getNumRounds()>1) setChanged(true); init(); numTurn = 0; roundHasFinished=false; startPlayer++; if (startPlayer>=getNrPlayers()) startPlayer=0; actTurn=startPlayer; handOutCards(); start(); } COM: <s> starts a new round </s>
funcom_train/5183420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PaletteContainer createMergeDecisionNode4Group() { PaletteStack paletteContainer = new PaletteStack(Messages.MergeDecisionNode4Group_title, null, null); paletteContainer.setId("createMergeDecisionNode4Group"); //$NON-NLS-1$ paletteContainer.setDescription(Messages.MergeDecisionNode4Group_desc); paletteContainer.add(createMergeNode1CreationTool()); paletteContainer.add(createDecisionNode2CreationTool()); return paletteContainer; } COM: <s> creates merge decision node palette tool group </s>
funcom_train/37805591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final File otherMsgFile) { try { final MessageXmlFile otherMessage = new MessageXmlFile(otherMsgFile); return equals(otherMessage); } catch(final Throwable t) { logger.log(Level.WARNING, "Handled Exception in compareTo(File otherMsgFile)", t); return false; // We assume that the other message is different (it may be corrupted) } } COM: <s> compares the given message in other msg file with this message </s>
funcom_train/29017990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTextLimit () { checkWidget (); int /*long*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText == 0) return LIMIT; return (int)/*64*/OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF; } COM: <s> returns the maximum number of characters that the receivers </s>
funcom_train/46840893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeLBCoord(Request request) { m_lbCoord = request.getLogicalPt(); m_clicked = request.getClicked(); if (m_logger.isDebugEnabled()) { m_logger.debug("m_clicked.size() = " + m_clicked.size()); } } COM: <s> saves coordinates of the left mouse button click for later use </s>
funcom_train/44512126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goOnline() { user.setStatus(Buddy.ONLINE); updateUser(); // Inputpanel der ChatGuis aktivieren Enumeration chats = chattable.elements(); while (chats.hasMoreElements()) { ChatGui cg = (ChatGui) chats.nextElement(); Buddy b = cg.getGuiOwner(); // wird nur aktiviert wenn der Buddy online ist if (!b.isOffline()) { cg.setInputEnabled(true); } } playSound(SoundController.USER_GOES_ONLINE); } COM: <s> method is invoked when user changes his status to online </s>
funcom_train/18060771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forcePointCount(int newPointCount) { for(int i=0; i<newPointCount; i++) { dataPoints[i] = 0.0f; if (dataPointTimes[i] == null) dataPointTimes[i] = new MTime(); } pointCount = newPointCount; } COM: <s> fill in the data points array with elements up to the specified count </s>
funcom_train/18032195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButtonWatermark() { if (m_buttonWatermark == null) { m_buttonWatermark = new JButton(); m_buttonWatermark.setIcon(FBImage.getIcon(FBImage.WATERMARK)); m_buttonWatermark.setToolTipText(Messages.getString("FBToolbar.10")); //$NON-NLS-1$ m_buttonWatermark.setMargin(new Insets(0, 0, 0, 0)); } return m_buttonWatermark; } COM: <s> returns the watermark button </s>
funcom_train/11702172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transportable receive() throws IOException, ServiceException { if (!isOpen()) { throw new IOException("Socket not open"); } Transportable out = factory.makeTransportable(); header = out.fromStream(is); if (header != null && header.key.equals(TransportConstants.ERROR_KEY)) { throw new ServiceException(header.getValueAsString(), out); } return out; } COM: <s> the other 1 2 of the split rpc </s>
funcom_train/10909334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isColorCanvas() { Boolean prop = (Boolean)context.getProperty(PCLRendererContextConstants.PCL_COLOR_CANVAS); return Boolean.TRUE.equals(prop) || (getForeignAttributes() != null && "true".equalsIgnoreCase((String)getForeignAttributes().get( PCLConstants.COLOR_CANVAS))); } COM: <s> indicates whether an rgb canvas should be used rather than one with grayscales </s>
funcom_train/40469469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetToQuantizedTick(double timeStamp, int tickStep) { currTick.setTime(timeStamp); currTick.truncate(this.timeUnitTickInterval); int normalizedValue = MathUtil.quantize(currTick.get(this.timeUnitTickInterval), tickStep); currTick.set(this.timeUnitTickInterval, normalizedValue); } COM: <s> quantizes the specified time stamp down to the specified tick step </s>
funcom_train/9547576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHosts(Map<String, List<Host>> groups) { this.groups = groups; List<Host> hosts = new LinkedList<Host>(); for (List<Host> group : groups.values()) { hosts.addAll(group); } log.info("Total number: " + hosts.size() + " hosts in " + groups.size() + " groups"); } COM: <s> initialize the scenario with the available hosts </s>
funcom_train/23717159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadTgtTypeMapToSrcCol() { CaseHashMap types = null; if (this.sourceCols != null && this.sourceCols.size() > 0) { types = new CaseHashMap(); for (int i = 0; i < this.sourceCols.size(); i++) { String srcCol = this.sourceCols.get(i); types.put(srcCol, this.getTgtColTypeBySrcCol(srcCol)); } this.tgtTypeMapToSrcCol = types; } } COM: <s> get target type map according to source column list </s>
funcom_train/40339296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unsort(final ContentViewer viewer, Object[] elements, final int columnIndex) { Arrays.sort(elements, new Comparator() { public int compare(Object a, Object b) { return -1 * TableViewerComparator.this.compare(viewer, a, b, columnIndex); } }); } COM: <s> un sorts the given elements in place modifying the given array </s>