__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5381457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String name, float value) { if (Float.isNaN(value)) throw new IllegalArgumentException(); final float floatValue = getFloat(name); if (value == floatValue) return; Float oldValue = new Float(floatValue); Float newValue = new Float(value); try { notify = false; if (getDefaultFloat(name) == value) getPluginPreferences(true).remove(name); else getPluginPreferences(true).putFloat(name, value); firePropertyChangeEvent(name, oldValue, newValue); } finally { notify = true; } } COM: <s> sets the current value of the float valued property with the </s>
funcom_train/25506272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JLabelMenu getShowHideColumnsMenu(String title) { return new JLabelMenu(title) { private static final long serialVersionUID = 1L; @Override protected void fillPopUp(JPopupMenu popup) { for (int i = 0; i < getColumnCount(false); i++) { JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(new ShowHideColumnAction(i)); menuItem.setSelected(isColumnVisible(i)); popup.add(menuItem); } } }; } COM: <s> gets a menu that interact with this table to show hide its columns </s>
funcom_train/44560952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getIcon() { for (DcField field : getFields()) { if (field.getValueType() == DcRepository.ValueTypes._ICON) { String value = (String) getValue(field.getIndex()); ImageIcon icon = null; if (value != null && value.length() > 1) icon = Utilities.base64ToImage(value); return icon; } } return null; } COM: <s> the icon used to represent this item </s>
funcom_train/16357804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(double HDOP, Matrix z){ double varE = (HDOP/Math.sqrt(2)* sigmaP); double varVE = (HDOP/Math.sqrt(2) * sigmaD); Matrix R = new Matrix(new double[][]{{varE,0,0,0},{0,varVE,0,0},{0,0,varE,0},{0,0,0,varVE}}); P = R.clone(); x = z.clone(); } COM: <s> initializes the variable of the filter </s>
funcom_train/3446105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findCategory(String name) { if (name == null) return -1; else if (name.isEmpty()) { return -1; } Integer i = (Integer) categories.get(name); if (i == null) { int v = categories.size(); putCategory(name, v); return v; } return i.intValue(); } COM: <s> find a category associated with a name creating it if it doesnt exist </s>
funcom_train/17046627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equidepth() { boolean result = true; int depth = -1; final List<Tree<T>> leafNodes = gatherLeaves(); for (Tree<T> leafNode : leafNodes) { final int curDepth = leafNode.depth(this); if (depth == -1) { depth = curDepth; } else if (depth != curDepth) { result = false; break; } } return result; } COM: <s> determine whether this node is equidepth defined as all terminal </s>
funcom_train/21995187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String clear() throws RpcException { try { authorize(Scanner.CLEAR); return getBus().clear(); } catch (JRecSecurityException e) { throw new RpcException("security-problem clearing scanner", e); } catch (BusException e) { throw new RpcException("bus-problem clearing scanner", e); } } COM: <s> clear the database of all data the scanner is responsible for </s>
funcom_train/3295807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeHeightValue(float height, GridTile tileDescription, Object outputTile, int tilex, int tilez) { BufferedWriter outputFile = (BufferedWriter)outputTile; try { String tmpString = textNumber.shortestNumber(height); outputFile.write(tmpString,0,tmpString.length()); } catch (IOException e) {System.err.println("writeHeightValue exception"+e);} } COM: <s> write one height value to the elevation tile </s>
funcom_train/19537494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String strPropListToArgs(String props) throws ParserException { String vals[] = props.split(";"); StringBuilder args = new StringBuilder(); try { for (String s : vals) { s = s.trim(); String encoded = URLEncoder.encode(s, "utf-8"); if (args.length() == 0) { args.append(encoded); } else { args.append("&"); args.append(encoded); } } } catch (UnsupportedEncodingException e) { throw new ParserException(e); } return args.toString(); } COM: <s> takes a property list and creates a url ready argument list </s>
funcom_train/44224067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAtlasCombo() { this.atlasCombo = new JComboBox(); this.atlasCombo.setPreferredSize(new Dimension(150, 30)); this.atlasCombo.setActionCommand("AtlasCombo"); this.atlasCombo.setRenderer(new CustomComboBoxRenderer(46)); this.add(this.atlasCombo); this.atlasCombo.addItemListener(this); } COM: <s> create a new atlas combo object for atlas server tool bar </s>
funcom_train/31479803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() throws ParseError { try { int token = this.lex.scan(); if (token == Lexer.EOF_TOKEN) error("No input found"); do { decl(token); token = this.lex.scan(); } while (token != Lexer.EOF_TOKEN); } finally { lex.close(); lex = null; } } COM: <s> loads a makefile from a reader </s>
funcom_train/50923641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeHTML(Writer w) throws IOException { w.write("<h3>"); w.write(this.getId()); w.write("</h3><br/><br/>\n"); Elements childElements = getChildElements(); for (int i = 0; i < childElements.size(); i++) { Element child = childElements.get(i); if (child instanceof CIFElement) { ((CIFElement) child).writeHTML(w); } else { w.write("<!-- unknown: " + child.getLocalName() + "-->"); } } } COM: <s> write block as html </s>
funcom_train/4174099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSigned(String column) throws SQLException { if (index.containsKey(column)) { return signed[index.get(column).intValue()]; } else { final SQLExceptionState state = SQLExceptionState.COLUMN_NOT_FOUND; throw new SQLException("Column " + column + " does not exist in dataset.", state.name(), state.code()); } } COM: <s> indicates whether values in the designated column are signed numbers </s>
funcom_train/11323613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onSubmitCheck(Page page, String redirectPath) { if (page == null) { throw new IllegalArgumentException("Null page parameter"); } if (redirectPath == null) { throw new IllegalArgumentException("Null redirectPath parameter"); } if (performSubmitCheck()) { return true; } else { page.setRedirect(redirectPath); return false; } } COM: <s> perform a form submission check ensuring the user has not replayed the </s>
funcom_train/20481188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subtractFromSelf(Interval i) { double a = Math.min(getInf(), i.getInf()); double b = Math.max(getSup(), i.getSup()); intersectSelf(new IntervalsList(new Interval(a - 1.0, i.getInf()), new Interval(i.getSup(), b + 1.0))); } COM: <s> remove an interval from the list </s>
funcom_train/19595249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCountEjbql() { String ejbql = getRenderedEjbql(); Matcher fromMatcher = FROM_PATTERN.matcher(ejbql); if (!fromMatcher.find()) { throw new IllegalArgumentException("no from clause found in query"); } int fromLoc = fromMatcher.start(2); Matcher orderMatcher = ORDER_PATTERN.matcher(ejbql); int orderLoc = orderMatcher.find() ? orderMatcher.start(1) : ejbql .length(); return "select count(*) " + ejbql.substring(fromLoc, orderLoc); } COM: <s> return the ejbql to used in a count query for calculating number of </s>
funcom_train/42535808
/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 ViewUse))return false; if(o == this)return true; ViewUse oo = (ViewUse)o; return (((Object)type).equals(oo.type))&&(((Object)quant).equals(oo.quant)); } COM: <s> is the given object equal to this view use </s>
funcom_train/37559229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getExtensionFile(File original) { // returns the original file if an extension already exists or if null if(original == null || original.getName().indexOf(".") >= 0) return original; // otherwise returns a new file with the added extension return new File(original.getParentFile(), original.getName() + "." + myExtension); } COM: <s> adds its extension to a given file without extension </s>
funcom_train/38588921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilenameMaster(String filenameMaster) { log.debug(filenameMaster); if(filenameMaster == null) { log.warn("Set NULL Parameter as Empty String."); filenameMaster = ""; } String old = getFilenameMaster(); this.filenameMaster = filenameMaster; this.firePropertyChange(MainModel.PROPERTY_FilenameMaster, old, this.filenameMaster ); refreshGridFileType(); } COM: <s> set the master filename </s>
funcom_train/22403486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void respondWithFailure(HttpServletResponse response) { try { response.setContentType("text/plain"); response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); response.getWriter().write(GENERIC_FAILURE_MSG); } catch (IOException e) { getServletContext().log( "respondWithFailure failed while sending the previous failure to the client", e); } } COM: <s> called when the machinery of this class itself has a problem rather than </s>
funcom_train/11743708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void register(Enum<T> enumeration, Object databaseValue) { // Check for duplicates. if (enumerationMappings.containsKey(databaseValue) || enumerationMappings.containsValue(enumeration)) throw new CayenneRuntimeException( "Enumerations/values may not be duplicated."); // Store by database value/enum because we have to lookup by db value later. enumerationMappings.put(databaseValue, enumeration); } COM: <s> register the given enum with the mapped database value </s>
funcom_train/42255319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startPrefixMapping(String prefix, String namespaceURI) throws SAXException { if (saxLog.isDebugEnabled()) { saxLog.debug("startPrefixMapping(" + prefix + "," + namespaceURI + ")"); } // Register this prefix mapping ArrayStack stack = (ArrayStack) namespaces.get(prefix); if (stack == null) { stack = new ArrayStack(); namespaces.put(prefix, stack); } stack.push(namespaceURI); } COM: <s> process notification that a namespace prefix is coming in to scope </s>
funcom_train/25205121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getSkip(int pos) { TfmLigKernCommand lkc = ligkerncommand[pos]; if (lkc.meansStop()) { return -1; } int p = pos; int skip = 0; int next = lkc.nextIndex(pos); while (++p < next) { if (ligkerncommand[pos].getActivity() != TfmLigKernCommand.PASSTHROUGH) { skip++; } } return skip; } COM: <s> gets the offset of next lig kern instruction in a program based on </s>
funcom_train/648456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getTxtHelp() { if (txtHelp == null) { txtHelp = new JTextPane(); txtHelp.setText(getHelpText()); txtHelp.setEditable(false); HTMLEditorKit h = new HTMLEditorKit(); txtHelp.setEditorKit(h); try { h.read(new StringReader(getHelpText()), txtHelp.getDocument(), 0); } catch (Exception e) { } } return txtHelp; } COM: <s> this method initializes txt help </s>
funcom_train/8072625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addObjectProperty(String objectPropertyName, Point location){ objectPropertyName=objectPropertyName.trim(); OWLObjectProperty propiedad = this.getOwlObjectPropertyByName(objectPropertyName); if (propiedad != null) { NodeObjectProperty node = new NodeObjectProperty(propiedad); this.addNode(node); node.getOntologyFig().setLocation(location); this.updateEquivalentObjectProperties(propiedad); this.updateDisjointLinks(propiedad); this.updateRangesAndDomains(propiedad); this.updateInverseObjectProperty(propiedad); this.updateSubProperties(propiedad); return true; } else return false; } COM: <s> adds an object property to the diagram </s>
funcom_train/20597366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConsumer(Scope scope, ValueConsumer consumer) { Boolean res = needsUpdateMap.put(consumer, Boolean.FALSE); if (res != null) { throw new IllegalArgumentException("Already added"); //$NON-NLS-1$ } consumer2Scope.put(consumer, (ScopeImpl)scope); } COM: <s> registers a consumer within a particular scope </s>
funcom_train/20827805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void messageTo(String msg, String who) { for (int i = 0; i < connections.size(); i++) { ConnectionThread ct = (ConnectionThread) connections.get(i); // if(ct.name.equals(who)) ct.message(msg + " to you"); if (ct.getMemeName().equals(who)) ct.message("msgto", msg); } } COM: <s> sends a message similar to message all in that it should be human </s>
funcom_train/6407603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getStickyKey(int key) { if (!restrictKey[key] && KeyInput.get().isKeyDown(key)) { restrictKey[key] = true; return true; } else if (!KeyInput.get().isKeyDown(key) && restrictKey[key]) restrictKey[key] = false; return false; } COM: <s> returns true if a key is down and wasnt down last call </s>
funcom_train/50137226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutputDimension(int newOutputDimension) { this.outputDimension = newOutputDimension; StreamInputSynapse inp; for (int i=0; i < inputs.size(); ++i) { inp = (StreamInputSynapse)inputs.elementAt(i); inp.setOutputDimension(newOutputDimension); } } COM: <s> sets the dimension of the input synapse </s>
funcom_train/32112480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int unloadCoreMaterial(int coreMaterialId) { if((coreMaterialId < 0) || (coreMaterialId >= (int)vectorCoreMaterial.size())) { //TODO afegir excepcio //CalError::setLastError(CalError::INVALID_HANDLE, __FILE__, __LINE__); return -1; } vectorCoreMaterial.set(coreMaterialId,null); return coreMaterialId; } COM: <s> delete the resources used by a core material </s>
funcom_train/12804232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Object anObject) throws PersistenceException { try { if ( getDatabase().isPersistent( anObject ) ) { getDatabase().remove( anObject ); } else { throw new PersistenceException("The object to remove must be bound to an open transaction."); } } catch ( PersistenceException pe ) { throw pe; } catch ( Exception e ) { throw new PersistenceException( e ); } } COM: <s> remove the object </s>
funcom_train/38353192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregister() { if (isRegistered && eventSource != null) try { // -- create the method name Method mthd = EventController.getRemoveListenerMethodFor(this); // -- invoke method mthd.invoke(eventSource, new Object[] { owner }); isRegistered = false; } catch (Exception e) { System.out.println("error while unregistering " + owner + " from event " + eventType + " at source " + eventSource); e.printStackTrace(); } } COM: <s> removes the event registration of the module for the event from the event </s>
funcom_train/11730301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLong() throws RepositoryException { Value val = PropertyUtil.getValue(prop); long l = val.getLong(); long ll = new Double(val.getDouble()).longValue(); assertTrue("Conversion from Double value to Long value is not correct.", l == ll); } COM: <s> tests the conversion from a double to a long value </s>
funcom_train/34113546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerLocalCommandExecutors(PageComponentContext context) { context.register("newCommand", newReportExecutor); context.register(GlobalCommandIds.PROPERTIES, propertiesExecutor); context.register(GlobalCommandIds.DELETE, deleteExecutor); context.register("testarCommand", testarExecutor); } COM: <s> register the local command executors to be associated with named commands </s>
funcom_train/7978692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHostBasename() throws URIException { // caching eliminated because this is rarely used // (only benefits legacy DomainScope, which should // be retired). Saves 4-byte object pointer in UURI // instances. return (this.getReferencedHost() == null) ? null : TextUtils.replaceFirst(MASSAGEHOST_PATTERN, this.getReferencedHost(), UURIFactory.EMPTY_STRING); } COM: <s> strips www variants from the host </s>
funcom_train/45686007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object fromMessage(Message msg) throws JMSException, MessageConversionException { if (msg instanceof TextMessage) { return m_decoder.decode(((TextMessage) msg).getText().toCharArray()); } else { throw new JMSException("Message of type " + msg.getClass().getName() + " is not supported. Only TextMessage"); } } COM: <s> convert a jms text message with a json payload to a telemetry artifact </s>
funcom_train/29539184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMatchOver(String winner, String score) { String[] ss = score.split("\\-"); int s0 = Integer.parseInt(ss[0]); int s1 = Integer.parseInt(ss[1]); if (winner.equals("You")) { matchScore[0] = s0; matchScore[1] = s1; } else { matchScore[0] = s1; matchScore[1] = s0; } whosTurn = 0; } COM: <s> handle the wins the match message </s>
funcom_train/13874259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIntegerSymbolPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IntegerLiteralExp_integerSymbol_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IntegerLiteralExp_integerSymbol_feature", "_UI_IntegerLiteralExp_type"), EssentialoclPackage.Literals.INTEGER_LITERAL_EXP__INTEGER_SYMBOL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the integer symbol feature </s>
funcom_train/10518309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFail() { // should get no output at all Project p = getProject(); p.setUserProperty("test.failure", FAILURE_MESSAGE); p.setUserProperty("test.delayed", DELAYED_MESSAGE); expectBuildExceptionContaining("testFail", "fail task in one parallel branch", FAILURE_MESSAGE); } COM: <s> tests the failure of a task within a parallel construction </s>
funcom_train/374603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean splitToComponents() { while (scanNext("'", "'", end + 1) && start != -1) { if (properties == null) { return false; } String s = substring(start + 1, end).trim(); if (s.length() == 0) { continue; } pathContents.add(s); } return (start == -1) ? true : false; } COM: <s> split to components </s>
funcom_train/44834391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setValuesToModelForContainer(JGComponent container, JGCycleParameters cycleParameters) { Iterator iter = container.getComponents().iterator(); while (iter.hasNext()) { JGComponent component = (JGComponent) iter.next(); component.setValuesToModel(cycleParameters); if (!(component instanceof JGSubmitable)) { setValuesToModelForContainer(component, cycleParameters); } } } COM: <s> set property values from container components recursively to model objects </s>
funcom_train/41593758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRevisedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StrucDocContent_revised_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StrucDocContent_revised_feature", "_UI_StrucDocContent_type"), V3Package.eINSTANCE.getStrucDocContent_Revised(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the revised feature </s>
funcom_train/19844854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropOutcomeTypeTable() { try { String sqlCmd = "DROP TABLE tbl_OUTCOME_TYPE"; stmt = conn.createStatement(); stmt.execute(sqlCmd); stmt.close(); } catch (Exception e) { logger.log(Level.SEVERE, e.toString()); } } COM: <s> drops the tbl outcome type table </s>
funcom_train/36178856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void quitApplication(int status) { JOptionPane optionPane = new JOptionPane("Are you sure you want to quit?", JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION); JDialog dialog = optionPane.createDialog(this, "Quit Chichak"); dialog.setVisible(true); if ((Integer) optionPane.getValue() == JOptionPane.YES_OPTION) { System.exit(status); } } COM: <s> quit application by call </s>
funcom_train/18088603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeTxt(final String s) { try { if (outFile != null) { outFile.writeBytes(s.getBytes(), 0, s.length()); } else { Generic.debug(Txt.WRITING_CLOSED, null); } } catch (final Exception e) { Generic.debug("writeTxt", e); } } COM: <s> write some text to the output file </s>
funcom_train/3363877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFlowSpan(int index) { Component c = getContainer(); if (c instanceof JTextArea) { JTextArea area = (JTextArea) c; if (! area.getLineWrap()) { // no limit if unwrapped return Integer.MAX_VALUE; } } return super.getFlowSpan(index); } COM: <s> fetch the constraining span to flow against for </s>
funcom_train/21842423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioTronSong toSong(){ AudioTronSong s=new AudioTronSong(); if( node instanceof AudioTronState.IndexedPlayableTreeNode) { type = "Song"; stringObject = ((AudioTronState.IndexedPlayableTreeNode)node).getUserObject(); if (stringObject instanceof Adapter) { s = (AudioTronSong) ((Adapter) stringObject).getSource(); //System.out.println(stringObject); } } return s; } COM: <s> method to convert this to a song if possible </s>
funcom_train/50299596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTestMethod(Method m) { String name= m.getName(); Class[] parameters= m.getParameterTypes(); Class returnType= m.getReturnType(); return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE); } COM: <s> check if method is test method </s>
funcom_train/3749256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInitialized() { if (logger.isDebugEnabled()) { logger.debug("isInitialized() - start"); } boolean returnboolean = (!singletonInstances.isEmpty()); if (logger.isDebugEnabled()) { logger.debug("isInitialized() - end - return value = " + returnboolean); } return returnboolean; } COM: <s> find out if the factory has been intialized or not </s>
funcom_train/51503062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbCancel() { if (jbCancel == null) { jbCancel = new JButton(); jbCancel.setBounds(588, 488, 91, 24); jbCancel.setText("Abbruch"); jbCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dispose(); } }); } return jbCancel; } COM: <s> this method initializes jb cancel </s>
funcom_train/34597483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireMouseWheelEvent(int change) { MouseWheelEvent evt = null; final MouseWheelListener[] listeners = (MouseWheelListener[]) listenerList .getListeners(MouseWheelListener.class); for (int i = 0; i < listeners.length; i++) { // lazily create it if (evt == null) { evt = new MouseWheelEvent(this, change); } listeners[i].mouseWheelMoved(evt); } } COM: <s> fires the specified mouse wheel event to all mouse wheel listeners in </s>
funcom_train/5661668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void turnOff() throws OneWireException { state = switchcontainer.readDevice(); int channelNumber = 0; channelNumber = ChannelMask >> 1; //convert from channel mask to number switchcontainer.setLatchState(channelNumber, false, false, state); switchcontainer.writeDevice(state); } COM: <s> puts the switch into the off nonconducting state </s>
funcom_train/3098380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanBackquote() { if ( verbosity > 5 ) System.out.println("`"); CycSymbol w = CycObjectFactory.makeCycSymbol("`"); if ( ( parenLevel > 0 ) && ( readStack.sp != parenLevel ) ) // Within a list. readStack.push(consMarkerSymbol); readStack.push(w); checkQuotes(); } COM: <s> scans a backquote while reading </s>
funcom_train/19179545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void histMaintRemoveFollowingQueries() { int histNewEnd; histNewEnd = historyPosition + 1; while (historyQueries.size() > histNewEnd) { logger.debug("Removed item at=" + histNewEnd); historyQueries.remove(histNewEnd); } logger.debug("historyPosition=" + historyPosition + " historyQueries.size=" + historyQueries.size()); } COM: <s> remove queries that follow the currently selected query in the history list </s>
funcom_train/5341005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent event) { String type = RESULTS.getMediaType().getMimeType(); for (int i = 0; i < BOXES.length; i++) { SelectorsHandler.setSelector(type, i, BOXES[i].getSelector()); } if(event != null) { FilterBox box = (FilterBox)event.getSource(); setMatchingValues(box); } } COM: <s> notification that the selectors have changed for a box </s>
funcom_train/42262522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BGTTreeNode tacticsDrivenPropagate(final BGTTreeNode node) { BGTTreeNode result = null; setVirtualValuesForObjects(node); if (virtuallyMoveRobots()) // there was a collision return null; //TODO test z zaniedbaniem kolizji, odkomentować górę, skasować linijkę niżej //virtuallyMoveRobots(); // new node is a result of move from previous node result = getCurrentVirtCoord(); return result; } COM: <s> moves robot one step from given node and </s>
funcom_train/22551113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean processWrite(WritableByteChannel channel, ByteBuffer buffer) throws IOException { if(outgoing == null) { outgoing = createOutgoingData(); } int written = channel.write(outgoing); stat.addData(written); amountWritten += written; if(!outgoing.hasRemaining()) { processWrittenHeaders(); return false; } else { return true; } } COM: <s> writes output to the channel </s>
funcom_train/7494586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private short valueMapOffsetToIndex(short offset) { for (short i=0; i<valueMap_map.length; ++i) { if (valueMap_map[i] == offset) { return i; } } throw new IllegalStateException("Can't map value map offset " + offset + " to index"); } COM: <s> convert an offset into the value map into a value map </s>
funcom_train/12177786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultFragment(Layout layout) { if (layout.getDefaultFragmentName() == null) { layout.setDefaultFragmentName(getFirstFragment(layout.getRootFormat())); if (logger.isDebugEnabled()) { logger.debug("Default fragment set to " + layout.getDefaultFragmentName()); } } } COM: <s> sets the default fragment to the first fragment in the format tree if </s>
funcom_train/24532008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resolveIt(IJavaProject javaProject) { try { // First see if a type. If not a type, then it is a package (or not found, treat as a package). hasResolved = true; IType type = javaProject.findType(fullyQualifiedName); if (type != null) { // It is a type. resolvedType = type; } } catch (JavaModelException e) { JavaVEPlugin.log(e, Level.WARNING); } } COM: <s> resolve it now </s>
funcom_train/49206620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSystemJobsIncludedChange() { JobStatsManager.getInstance().setSystemJobsIncluded( prefStore.getBoolean(LopbPreferenceConstants.LOPB_JOBS_INCLUDE_SYSTEM_JOBS)); // lets refresh the table view now try { final LopbView view = (LopbView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() .showView(LopbView.id); view.getTableViewer().refresh(); } catch (PartInitException pie) { log.error(pie); } } COM: <s> process system jobs included change </s>
funcom_train/3907998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChildren() { // Add <act> elements from XML DOM Iterator it = getElement().getChildren(LD_Core.ACT, getElement().getNamespace()).iterator(); while(it.hasNext()) { Element child = (Element)it.next(); Act act = new Act(getLD_DataModel(), child); addChild(act); } } COM: <s> add child act components </s>
funcom_train/31081138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeDeclaredField(String name) { List fields = _state.getFieldsHolder(); BCField field; for (Iterator itr = fields.iterator(); itr.hasNext();) { field = (BCField) itr.next(); if (field.getName().equals(name)) { itr.remove(); field.invalidate(); return true; } } return false; } COM: <s> remove a field from this class </s>
funcom_train/11678289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDestination(String jndiDestinationName) { // find and save provider specific Destination name before we delete String providerSpecificDestination = getPhysicalDestinationName(jndiDestinationName); stoplisteningOnDestination(jndiDestinationName); serviceJNDINameMapping.remove(jndiDestinationName); if (providerSpecificDestination != null) { serviceDestinationNameMapping.remove(providerSpecificDestination); } } COM: <s> abort listening on the jms destination from this connection factory </s>
funcom_train/46335599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkMemoryUse() { final String methodName = "checkMemoryUse()"; logger.entering(CLASS_NAME, methodName); OpbSessionUtils.checkMemoryUse( memoryLimitForCachedObjects, memoryLimitForCachedResults, dataObjectSource); } // End of checkMemoryUse() COM: <s> checks current memory use and clears data object caches if the limits </s>
funcom_train/28342609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendZData(double [] zData, String yAxisLabel) { if(startIndex == zValues[0].length) { shiftZDataSet(); shiftLabels(yLabels); } for(int k = 0; k < zData.length; k++) { zValues[k][startIndex] = zData[k]; } yLabels[startIndex] = yAxisLabel; startIndex++; Chart3dGridDataEvent zevent = new Chart3dGridDataEvent(source,Chart3dGridDataEvent.RELOAD_ZALL,index); fireChart3dDataEvent(zevent); } COM: <s> appends a new z data set to the model with a y axis </s>
funcom_train/18136077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectType getObjectType(String id) { ObjectType objectType = null; Iterator<ObjectType> objectTypeIterator = getObjectTypes().iterator(); while (objectType == null && objectTypeIterator.hasNext()) { ObjectType currentObjectType = objectTypeIterator.next(); if (currentObjectType.getId().equals(id)) { objectType = currentObjectType; } } return objectType; } COM: <s> method for getting an object type with the given id </s>
funcom_train/18898982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnconstrained() throws Exception { // Not subject = 1. tuples = new ConstrainedNegationTuples(NodePool.NONE, NodePool.NONE, NodePool.NONE, t1, new int[] { 0, 1, 2, 3}); // Expected results long[][] expectedTuples = new long[][] { }; testTuples(expectedTuples, tuples); } COM: <s> test a negation based only all unconstrained that is variables </s>
funcom_train/15723417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRowsNumber(int newRowsNumber) { if (newRowsNumber <= 0) { String message = "Wrong argument for setRowsNumber function " + "(newRowsNumber = " + newRowsNumber + ")"; myLogger.severe(message); //throw new IllegalArgumentException(message); return; } int selectedElementIndex = getIndexByPosition(mySelectedRow, mySelectedColumn); myRowsNumber = newRowsNumber; scrollToIndex(selectedElementIndex); firePanelDataChanged(); } COM: <s> changes table structure according to new number of rows </s>
funcom_train/11320867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onApplyOptionsClick() { //Reset the tree and nodes to default values resetTree(); //Store the users options in the session TreeOptions options = new TreeOptions(); options.javascriptEnabled = jsEnabled.isChecked(); options.rootNodeDisplayed = rootNodeDisplayed.isChecked(); ExampleUtils.setSessionObject(options); //Apply users new options applyOptions(); return true; } COM: <s> called when user submits the options form </s>
funcom_train/10914664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLastChar() { Iterator it = charSets.values().iterator(); if (it.hasNext()) { CharacterSet csm = (CharacterSet) it.next(); return csm.getLastChar(); } else { String msg = "getLastChar() - No character set found for font:" + getFontName(); LOG.error(msg); throw new FontRuntimeException(msg); } } COM: <s> get the last character in this font </s>
funcom_train/17251856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector2f multLocal(Vector2f vec) { if (null == vec) { LoggingSystem.getLogger().log(Level.WARNING, "Provided vector is " + "null, null returned."); return null; } x *= vec.x; y *= vec.y; return this; } COM: <s> code mult local code multiplies a provided vector to this vector </s>
funcom_train/42346073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AiringOverride getOverride(int airingId) { ResultSet rs = null; try { overrideGetQry.setInt(1, airingId); rs = overrideGetQry.executeQuery(); if(rs.next()) return new AiringOverride(airingId, rs.getString(1), rs.getString(2), rs.getBoolean(3)); return null; } catch(SQLException e) { LOG.error(SQL_ERROR, e); return null; } finally { try { if(rs != null) rs.close(); } catch(SQLException e) { LOG.error(SQL_ERROR, e); } } } COM: <s> get the override for the given airing id </s>
funcom_train/42398064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isOrHasSerializableSubType(final Type type) { Checker.notNull("parameter:type", type); boolean serialize = false; while (true) { if (this.isBlackListed(type)) { serialize = false; break; } if (this.isSerializable(type)) { serialize = true; break; } // is not blacklisted search sub types for one serializable type. final SerializableSubTypeFinder serializableSubTypeFinder = new SerializableSubTypeFinder(); serializableSubTypeFinder.start(type); serialize = serializableSubTypeFinder.hasSerializableSubType(); break; } return serialize; } COM: <s> tests if the given type is serializable or has a serializable sub type </s>
funcom_train/8080560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instances coveredBy(Instances data) { Instances r = new Instances(data, data.numInstances()); Enumeration enum = data.enumerateInstances(); while (enum.hasMoreElements()) { Instance i = (Instance) enum.nextElement(); if (resultRule(i) != -1) { r.add(i); } } r.compactify(); return r; } COM: <s> returns the set of instances that are covered by this rule </s>
funcom_train/42646368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void normalizeCoordinates(float x1, float y1, float x2, float y2) { float x = x1, y = y1, w = Math.abs(x2 - x1), h = Math.abs(y2 - y1); // get smallest x if (x1 > x2) { x = x2; } // get largest y if (y1 < y2) { y = y2; } setRect(x, y, w, h); } COM: <s> normalizes the given coordinates so that the rectangle is created with the </s>
funcom_train/3075981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateModules() { if (createNewModule() == null) // modules are not applicable for current vcs return; if (getModules().size() == 0) throw new ValidationException("No modules defined!"); Iterator it = getModules().iterator(); Module newModule = createNewModule(); while (it.hasNext()) { Object obj = it.next(); if (obj.getClass() != newModule.getClass()) throw new ValidationException("Invalid module class detected!"); Module module = (Vcs.Module) obj; module.validate(); } } COM: <s> check module properties against </s>
funcom_train/22742192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteFirstMatchFromQueue(int type,int subType){ for (int i=0;i < stack.size();i++ ){ Event event = (Event) stack.elementAt(i); if (event.getType()==type && event.getSubType()==subType){ stack.removeElementAt(i); break; } } } COM: <s> searches for a specific event and removes it from the </s>
funcom_train/50579201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(int b) throws IOException { //log.trace("write " + b + " in CompressionResponseStream "); if (closed) { throw new IOException("Cannot write to a closed output stream"); } if (bufferCount >= buffer.length) { flushToGZip(); } buffer[bufferCount++] = (byte) b; } COM: <s> write the specified byte to our output stream </s>
funcom_train/2287080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsFlexRequestDispatcher getRequestDispatcherToExternal(String vfs_target, String ext_target) { return new CmsFlexRequestDispatcher( m_controller.getTopRequest().getRequestDispatcher(ext_target), CmsLinkManager.getAbsoluteUri(vfs_target, m_controller.getCmsObject().getRequestContext().getUri()), ext_target); } COM: <s> replacement for the standard servlet api get request dispatcher method </s>
funcom_train/8436894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(E o) { checkMod(); modCount++; knownMod++; size++; //position++; Entry e = new Entry(o); e.previous = previous; e.next = next; if (previous != null) previous.next = e; else first = e; if (next != null) next.previous = e; else last = e; previous = e; lastReturned = null; } COM: <s> adds an element between the previous and next and advance to the next </s>
funcom_train/18014009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetCycles() { for (IfcDevice zDev : myDeviceList) { zDev.systemCyclesReset(); } // First we let all of the device attached to me know about the reset // if (myCycles!=JSTIA.CPU_CYCLES_PER_FRAME) System.out.println("JSSystem warning: resetting cycles at " + myCycles); myCycles = 0; // Now, we reset cycle count to zero } COM: <s> this resets the cycle count that the jssystem object maintains </s>
funcom_train/13874781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsBlackboxPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ImperativeOperation_isBlackbox_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ImperativeOperation_isBlackbox_feature", "_UI_ImperativeOperation_type"), QvtoperationalPackage.Literals.IMPERATIVE_OPERATION__IS_BLACKBOX, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is blackbox feature </s>
funcom_train/8589502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getSVentas() { if (sVentas == null) { sVentas = new JScrollPane(); sVentas.setBounds(new Rectangle(16, 73, 343, 120)); sVentas.setViewportView(getTVentas()); } return sVentas; } COM: <s> this method initializes s ventas </s>
funcom_train/3076936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllSchedules() { List facades = new ArrayList(); Iterator it = Luntbuild.getDao().loadSchedules().iterator(); while (it.hasNext()) { Schedule schedule = (Schedule) it.next(); facades.add(schedule.getFacade()); } return facades; } COM: <s> return all schedules configured for all projects in the system </s>
funcom_train/51237422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTree getJTree() { if (jTree == null) { m_modelAdaptor = new CurriculumAndFormModelAdaptor(); jTree = new JTree(m_modelAdaptor); jTree.setRootVisible(false); jTree.setShowsRootHandles(true); jTree.putClientProperty("JTree.lineStyle", "Angled"); jTree.addTreeSelectionListener(new TreeListener()); //jTree.expandPath(new TreePath(CurriculumFactory.getInstance())); } return jTree; } COM: <s> this method initializes j tree </s>
funcom_train/26529714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { String url = e.getURL().toString(); if (url.startsWith("http://help/")) PCSH.displayHelpTopic(url.substring(12)); else Browser.launch(url); } } COM: <s> launch a browser when you click on a link </s>
funcom_train/1533820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void verifyIterationCount() throws IllegalArgumentException { if ((minimalIterationCount <= 0) || (maximalIterationCount <= minimalIterationCount)) { throw MathRuntimeException.createIllegalArgumentException( "invalid iteration limits: min={0}, max={1}", minimalIterationCount, maximalIterationCount); } } COM: <s> verifies that the upper and lower limits of iterations are valid </s>
funcom_train/13511003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSold(int i){ if (i == 12 || i == 13 || i == 19 || i == 20 || i == 26 || i == 27 || i == 33 || i == 34 || i == 40 || i == 41 || i == 47 || i == 48){ return Boolean.TRUE.booleanValue(); } else { return Boolean.FALSE.booleanValue(); } } COM: <s> return true if i is the location of a saturday or sunday </s>
funcom_train/18028187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFillValue(double fillValue) { double oldFillValue = this.fillValue; this.fillValue = fillValue; if ( !Double.isNaN(fillValue) ) properties.put( QDataSet.FILL_VALUE, fillValue ); propertyChangeSupport.firePropertyChange("fillValue", new Double(oldFillValue), new Double(fillValue)); } COM: <s> setter for property fill value </s>
funcom_train/4360593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deallocate(Servlet servlet) throws ServletException { // If not SingleThreadModel, no action is required if (!singleThreadModel) { countAllocated.decrementAndGet(); return; } // Unlock and free this instance synchronized (instancePool) { countAllocated.decrementAndGet(); instancePool.push(servlet); instancePool.notify(); } } COM: <s> return this previously allocated servlet to the pool of available </s>
funcom_train/863502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replay( String filename ) { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse( new File( filename ) ); replay( doc.getDocumentElement() ); } catch( RuntimeException rex ) { throw rex; } catch( Exception ex ) { throw new RuntimeException( ex ); } } COM: <s> parse an xml document from the given filename and replay the methods calls </s>
funcom_train/43420893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int column) { switch (column) { case FILTER_NAME: return Translator.getTranslation("FILTER.NAME"); case FILTER_CONTENT_RULE: return Translator.getTranslation("FILTER.CONTENT_RULE"); case FILTER_CONTENT: return Translator.getTranslation("FILTER.CONTENT"); default: return "N/A"; } } COM: <s> returns name of column by given column number </s>
funcom_train/40912724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public sgVec3 norm(){ // get length float abs = (float)Math.sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); // if 0, just return 0 vector if (abs == 0) return new sgVec3(0.0f, 0.0f, 0.0f); // take norm v[0] /= abs; v[1] /= abs; v[2] /= abs; return this; } COM: <s> normalize the vector </s>
funcom_train/26245280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void basaltFlats(int number, int size, Terrain l) { for (int flat=0; flat < number; flat++) { int x = Die.die(width); int y = Die.die((int)(height*0.8)) + (int)(height * 0.2); setHeight(x, y, getHeight(x, y) + 10); generateLava(x, y, getHeight(x, y), size, l); } } COM: <s> generate a number of larva flats of a given size at random points </s>
funcom_train/8221952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConversationColumns(ColumnDataModel[] columns) { if (columns == null) return; for (int i = 0; i < columns.length; i++) { _conversationTableModel.addColumn(columns[i]); } _conversationTableSorter.setSortingStatus(0, TableSorter.DESCENDING); } COM: <s> adds the conversation columns </s>
funcom_train/16911331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openWorkspace() { SFileChooser simulationChooser = new SFileChooser( workspace.getCurrentDirectory(), "Zip Archive", "zip"); File simFile = simulationChooser.showOpenDialog(); if (simFile != null) { workspace.openWorkspace(simFile); workspace.setCurrentDirectory(simulationChooser.getCurrentLocation()); } } COM: <s> shows the dialog for opening a workspace file </s>
funcom_train/41382398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleDoubleClick(DoubleClickEvent event) { IStructuredSelection s = (IStructuredSelection) event.getSelection(); Object o = s.getFirstElement(); if (viewer.isExpandable(o)) { // Do not drill in to translation units of binaries. if (o instanceof ITranslationUnit || o instanceof IBinary || o instanceof IArchive) { return; } viewer.setExpandedState(o, !viewer.getExpandedState(o)); } } COM: <s> handles double clicks in viewer </s>
funcom_train/21878228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContextPath getContextPath() throws DepoException { ContextPath cp = new ContextPath("/Domain=" + getDepot(), "/Resource=" + getEntityClass(), "/Instance=" + getEntityName()); cp.setDirectionConstraint(getDirectionConstraint()); cp.setProximityConstraint(getProximityConstraint()); return cp; } COM: <s> describe code get context path code method here </s>
funcom_train/1362907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showConnectingNodesWithEdges(NodeItem ni){ EdgeItem [] eList=showConnectingEdges(ni); removeSomeHiddenEdges(eList);//already hidden in previous hide action NodeItem [] nList=showChildNodes(ni); removeSomeHiddenNodes(nList);//already hidden nList=showParentNodes(ni); removeSomeHiddenNodes(nList);//already hidden } COM: <s> show the connecting nodes with in out edges from a selected node </s>