__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50862298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMaxInputResourceRate(AmountResource resource, double rate, boolean ambient) { if (ambient) { if (!maxAmbientInputResourceRates.containsKey(resource)) maxAmbientInputResourceRates.put(resource, rate); } else { if (!maxInputResourceRates.containsKey(resource)) maxInputResourceRates.put(resource, rate); } } COM: <s> adds a maximum input resource rate if it doesnt already exist </s>
funcom_train/47675028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object newValue) { if (newValue instanceof String) { if (((String) newValue).equalsIgnoreCase("true") || ((String) newValue).equalsIgnoreCase("false")) { try { this.value = Boolean.parseBoolean((String) newValue); return; } catch (Exception e) { } } } this.value = newValue; } COM: <s> set the value of this attribute </s>
funcom_train/35194233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteFile() { this.fileUploaderService = new FileUploaderService(); FileUploader fileUploaderPort = fileUploaderService.getFileUploaderPort(); try { // Upload the file fileUploaderPort.deleteFile(FOLDER+fileToDelete); } catch (Exception e) { e.printStackTrace(); } return "file deleted"; } COM: <s> delete the file on the server </s>
funcom_train/20042755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _addControl() { oObj.addControl("CONTROL1", (XControl)tEnv.getObjRelation("CONTROL1")); oObj.addControl("CONTROL2", (XControl)tEnv.getObjRelation("CONTROL2")); tRes.tested("addControl()",true); } COM: <s> test calls the method twice two controls gotten from object relations </s>
funcom_train/45935158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private void enrichMetadata(MimeMessage mimeMessage, SubmitTransactionData txnData) { // enrich all document metadata for (XDSDocument xdsDocument : txnData.getDocList()) { enrichXDSDocumentEntry(mimeMessage, txnData.getDocumentEntry(xdsDocument.getDocumentEntryUUID())); } enrichXDSSubmissionSet(mimeMessage, txnData); } COM: <s> enriches the repository submission transaction with mime mail metadata appropriate for xdr </s>
funcom_train/22208828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNodeCount() { try { // map prefix "xtm" to XTM 1.0 namespace PrefixResolver pr = new XTMPrefixResolver((Node) domDocument.getDocumentElement()); iterateNodeCountTable(pr); } catch (Exception ex) { ex.printStackTrace(); fail("Unexpected exception: " + ex.toString()); } } COM: <s> tries a number of xpath queries and checks whether they return a </s>
funcom_train/4237299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetComentario() { System.out.println("getComentario"); OrdenPlatillo instance = new OrdenPlatillo(); instance.setComentario("Sin sal"); String expResult = "Sin sal"; String result = instance.getComentario(); assertEquals(expResult, result); } COM: <s> test of get comentario method of class data </s>
funcom_train/43402830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nameCompareTo(Denotator d) { if (getName() == null) { return (d.getName() == null)?0:-1; } else if (d.getName() == null) { return 1; } else { return getName().compareTo(d.getName()); } } COM: <s> compares the names of two denotators </s>
funcom_train/25135996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void popMatrices(GLContext context) { GL2 gl = context.getGL().getGL2(); gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); gl.glPopMatrix(); gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION); gl.glPopMatrix(); gl.glMatrixMode(GL.GL_TEXTURE); gl.glPopMatrix(); } COM: <s> pops all the matrices </s>
funcom_train/18455472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUniqueKeys() { List allKeys = Algs.collect(Algs.flatten(Algs.map(ATTRS, new Function() { public Object[] with(Class attrCls) { return GraphLayoutAttrs.newBuilder(attrCls).keys(); }}))); assertEquals(new HashSet(allKeys).size(), allKeys.size()); } COM: <s> p tests that all the known non global attribute keys are </s>
funcom_train/4227907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IFigure createFigure() { Figure f = new FreeformLayer(); // f.setBorder(new GroupBoxBorder("Diagram")); f.setLayoutManager(new FreeformLayout()); f.setBorder(new MarginBorder(5)); // Create the static router for the connection layer ConnectionLayer connLayer = (ConnectionLayer)getLayer(LayerConstants.CONNECTION_LAYER); connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f)); return f; } COM: <s> returns a figure to represent this </s>
funcom_train/28992807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameterValuesParsed(String key) { String[] parms = (String[]) parameterValues.get(key); String parm = null; if (parms != null) { parm = ""; for (int i = 0; i < parms.length; i++) { parm += parms[i]; if (i < parms.length - 1) { parm += ","; } } } return parm; } COM: <s> return the parameter value in the array of parameters </s>
funcom_train/46628710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer("<ValidationFailedException>\n"); buf.append("<errors>\n"); for (String error : errors) { buf.append("<error>\n"); buf.append(error); buf.append("\n</error>\n"); } buf.append("</errors>\n"); buf.append("</ValidationFailedException>\n"); return buf.toString(); } COM: <s> returns a short description of this throwable </s>
funcom_train/15416469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandContextManager createCommandContextManager(String dftl) { String cn = GlobalProperties.get("ebean.server.commandcontextmanager", dftl); if (cn == null){ return null; } try { Class<?> cls = Class.forName(cn); CommandContextManager cm = (CommandContextManager)cls.newInstance(); return cm; } catch (Exception ex){ throw new PersistenceException(ex); } } COM: <s> create a command context manager </s>
funcom_train/45117385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJavadoc(String javadoc) { if (javadoc == null) { return; } String[] javaDocLines = javadoc.split("\n"); StringBuffer jdbuf = new StringBuffer(); jdbuf.append("/**\n"); for (int i = 0; i < javaDocLines.length; i++) { jdbuf.append(" * "); jdbuf.append(javaDocLines[i]); jdbuf.append("\n"); } jdbuf.append(" */"); this.javadoc = jdbuf.toString(); } COM: <s> set the javadoc the string will be splited to lines and formated as </s>
funcom_train/22285349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ButtonWidget getNext() { ButtonWidget result = this; if (group != null) { // get all the available buttons in this group ButtonWidget[] bws = getGroupButtons(); // search for this button int index; for (index = 0; index < bws.length; index++) { Widget w = bws[index]; if (w == this) { break; } } // return next button, if this is not the last one if (index < bws.length-1) { result = bws[index+1]; } } return result; } COM: <s> get the next button in the same group that is not disabled </s>
funcom_train/4753894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean convert(final StringBuffer buf, final IAST f, final int precedence) { if (f.size() != 2) { return false; } buf.append("\\sqrt{"); fFactory.convert(buf, f.get(1), 0); buf.append('}'); return true; } COM: <s> converts a given function into the corresponding te x output </s>
funcom_train/3467329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void forceNoOverwrite() { // @BEGINPROTECT _3A911EE203D8 java.io.PrintWriter out = this.getOutput(); if (out != null) { // close temporary, so that it can be removed later out.close(); out = null; } setPreparedToOverwrite(false); // @ENDPROTECT } COM: <s> is called during a rollback </s>
funcom_train/9238045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean callChannelMessage(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) { final CallbackOnChannelMessage cb = (CallbackOnChannelMessage)getCallbackManager().getCallbackType("OnChannelMessage"); if (cb != null) { return cb.call(cChannel, cChannelClient, sMessage, sHost); } return false; } COM: <s> callback to all objects implementing the channel message callback </s>
funcom_train/10482534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendMessageID(MessageIDTerm term, String charset) throws MessagingException { // not directly supported by IMAP, but we can compare on the header information. appendAtom("HEADER"); appendString("Message-ID"); appendString(term.getPattern(), charset); } COM: <s> append imap search term information from a message idterm item </s>
funcom_train/3908622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivity(Activity activity) { _activity = activity; // Lazily set the DataModel if(getDataModel() == null) { setDataModel(activity.getDataModel()); } // Set Model ((EnvironmentSelectorTreeModel)getEditor_TreeModel()).setActivity(activity); } COM: <s> set the activity </s>
funcom_train/181231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean hasChanged() { if (event == null) { return null; } else { if (event.getOldValue() == null) { if (event.getNewValue() != null) { return Boolean.TRUE; } } else { if (!event.getOldValue().equals(event.getNewValue())) { return Boolean.TRUE; } } } return Boolean.FALSE; } COM: <s> return whether the value changed at creating this instance </s>
funcom_train/20777071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drop(DropTargetDropEvent dtde) { if (draggedFile != null) { // log.info("AEViewer.drop(): opening file "+draggedFile); try { recentFiles.addFile(draggedFile); getAePlayer().startPlayback(draggedFile); } catch (IOException e) { log.warning(e.toString()); e.printStackTrace(); } } } COM: <s> called when the drag operation has terminated with a drop on the </s>
funcom_train/986750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextField1() { if (textField1 == null) {//GEN-END:|91-getter|0|91-preInit // write pre-init user code here textField1 = new TextField("Nombre", "", 32, TextField.ANY);//GEN-LINE:|91-getter|1|91-postInit // write post-init user code here }//GEN-BEGIN:|91-getter|2| return textField1; } COM: <s> returns an initiliazed instance of text field1 component </s>
funcom_train/38806626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int calcTaskEndPointX(LayoutTask task, int startPX) { if (log.isDebugEnabled()) { log.debug(" Calculate X for End time of task: " + this); } int ret = 0; ret = startPX + layoutStrategy.calcTaskSteps(task) * context.getConfig().getTimeUnitWidth(); if (log.isDebugEnabled()) { log.debug(" = " + ret); } return ret; } COM: <s> calculate x of the end point of task </s>
funcom_train/34451204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MBreakpoint_expression_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_MBreakpoint_expression_feature", "_UI_MBreakpoint_type"), DebugPackage.Literals.MBREAKPOINT__EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the expression feature </s>
funcom_train/12923198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readShort() throws IOException { if (size - index < 2) { fill(); } if (index + 2 > size) { throw new ArrayIndexOutOfBoundsException(); } int value = buffer[index++] & BYTE_MASK; value |= buffer[index++] << TO_BYTE1; return value; } COM: <s> read an signed 16 bit integer </s>
funcom_train/5793403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendRequest(IcmpSocket icmpSocket) { try { createRequestPacket(); log().debug(System.currentTimeMillis()+": Sending Ping Request: "+this); icmpSocket.send(createDatagram()); } catch (Throwable t) { m_callback.handleError(getAddress(), getRequest(), t); } } COM: <s> send this ping request through the given icmp socket </s>
funcom_train/4136025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addThumbURLPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Document_thumbURL_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Document_thumbURL_feature", "_UI_Document_type"), PapersPackage.Literals.DOCUMENT__THUMB_URL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the thumb url feature </s>
funcom_train/21849189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component createToolBar() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); panel.add(_createButton(Icons.NEW_16, ID_ADD_ITEM)); panel.add(_createButton(Icons.EDIT_16, ID_EDIT_ITEM)); panel.add(_createButton(Icons.DELETE_16, ID_DELETE_ITEM)); panel.add(_createButton(Icons.UP_16, ID_MOVE_UP)); panel.add(_createButton(Icons.DOWN_16, ID_MOVE_DOWN)); return panel; } COM: <s> creates the toolbar at the top of the panel </s>
funcom_train/17968668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected LogContext internalCreateContext(final String context) { synchronized (this.logContexts) { LogContext ctx = (LogContext) this.logContexts.get(context); if (ctx == null) { ctx = new LogContext(context); this.logContexts.put(context, ctx); } return ctx; } } COM: <s> creates a log context </s>
funcom_train/46761398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final IconModel icon, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long iconId = store(icon, chain, call); chain.execute(); // return primary key return iconId; } catch (Exception ex) { Log.exception(ex); Log.error(icon); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the icon model model creating a new icon or updating existing rows </s>
funcom_train/38542717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLong(int parameterIndex, long x) throws SQLException { try { ((PreparedStatement) this.realStatement).setLong(parameterIndex, x); if (parameterIndex <= this.currentParams.length) { this.currentParams[parameterIndex - 1] = new Long(x); } } catch (SQLException e) { manageException(e); throw generateException(e); } } COM: <s> sets the designated parameter to the given java code long code </s>
funcom_train/1538097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void step() { for(Layout<V,E> layout : layouts.keySet()) { if(layout instanceof IterativeContext) { IterativeContext context = (IterativeContext)layout; if(context.done() == false) { context.step(); } } } if(delegate instanceof IterativeContext) { IterativeContext context = (IterativeContext)delegate; if(context.done() == false) { context.step(); } } } COM: <s> call step on any sublayout that is also an iterative context </s>
funcom_train/18568745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateCanvas(Component viewComponent, Dimension canvasSize, boolean zoomMode) { super.activateCanvas(viewComponent, canvasSize, zoomMode); affineTransform = new AffineTransform(); affineTransform.setToIdentity(); bufImg = new BufferedImage(canvasSize.width, canvasSize.width, BufferedImage.TYPE_INT_RGB); } COM: <s> activate painting for pixel based calculation </s>
funcom_train/40433435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getRiskInformationTimestamp() { log.trace("Entering getRiskInformationTimestamp"); long result = -1; XMLGregorianCalendar xmlCalendar = getRiskInformationNotification().getTimestamp(); if (xmlCalendar != null) { result = getTimeInMillis(xmlCalendar); } log.trace("Leaving getRiskInformationTimestamp"); return result; } COM: <s> gets the risk information notification timestamp </s>
funcom_train/18896914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAutoCommit( boolean state ) { if ( state ) { executeQuery("set autocommit on;", "autocommit on", "Auto commit is on"); } else { executeQuery("set autocommit off;", "autocommit off", "Auto commit is off"); } this.autocommit = state; } COM: <s> toggle auto commit setting </s>
funcom_train/18424428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Product getProductById(String id) { Product res = null; for (Enumeration enum = products.elements(); ((enum.hasMoreElements()) && (res==null)); ) { Product p = (Product)enum.nextElement(); if (p.getId().equals(id)) res = p; } return res; } COM: <s> returns a product by its id name </s>
funcom_train/51106748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSelectLikeIgnoreCaseObjects2() throws Exception { query.setRoot(Artist.class); Expression qual = ExpressionFactory.likeIgnoreCaseExp("artistName", "artist%"); query.setQualifier(qual); performQuery(); // check query results List objects = opObserver.rowsForQuery(query); assertNotNull(objects); assertEquals(_artistCount, objects.size()); } COM: <s> test how like ignore case works when using lowercase parameter </s>
funcom_train/50096362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testCycloOctan() throws Exception { String filename = "data/mdl/cyclooctan.mol"; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); MDLV2000Reader reader = new MDLV2000Reader(ins, Mode.STRICT); Molecule mol1 = (Molecule) reader.read(new Molecule()); SmilesGenerator sg = new SmilesGenerator(); String moleculeSmile = sg.createSMILES(mol1); Assert.assertEquals(moleculeSmile, "C1=CCCCCCC1"); } COM: <s> test for some rings where the double bond is broken </s>
funcom_train/24933804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final Object object1, final Object object2) { final int positionOfAttribute1 = ((MAttribute) object1).getPositionInModel(); final int positionOfAttribute2 = ((MAttribute) object2).getPositionInModel(); return compareUtil.compareInt(positionOfAttribute1, positionOfAttribute2); } COM: <s> compares two attributes by the order the use file provides </s>
funcom_train/37507100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPeer(Peer peer) throws IOException { /* Connect to the new Peer */ Socket socket = new Socket(peer.getIP(), peer.getServerPort()); PeerSocket ps = new PeerSocket(socket, peer); /* add it to the peerList */ ps.setHomeList(peerSockets); P4PAgent.incrNetworkSize(peer.getSetSize()); } COM: <s> adds a peer to the list and connect to it </s>
funcom_train/23403294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOperaFilePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Mapping_operaFile_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Mapping_operaFile_feature", "_UI_Mapping_type"), OLCLMapPackage.Literals.MAPPING__OPERA_FILE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the opera file feature </s>
funcom_train/9979084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAwtContainer() { GridData gridData2 = new GridData(); gridData2.grabExcessHorizontalSpace = true; gridData2.horizontalAlignment = GridData.FILL; gridData2.verticalAlignment = GridData.FILL; gridData2.grabExcessVerticalSpace = true; awtContainer = new Composite(treeComposite, SWT.NO_BACKGROUND | SWT.EMBEDDED); awtContainer.setLayout(new GridLayout()); awtContainer.setLayoutData(gridData2); } COM: <s> this method initializes awt container </s>
funcom_train/20242511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void layoutComponents() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(Box.createRigidArea(new Dimension(10, 1))); add(productListScrollPane); add(Box.createRigidArea(new Dimension(10, 1))); add(productEditor); add(Box.createRigidArea(new Dimension(10, 1))); add(Box.createHorizontalGlue()); } COM: <s> lays out the product list and product editor </s>
funcom_train/48261091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWork() throws Exception { System.out.println("work"); CommandWorkerOptions commandWorkerOptions = null; LogCommandWorker instance = new LogCommandWorker(); instance.work(commandWorkerOptions); // TODO review the generated test code and remove the default call to fail. //fail("The test case is a prototype."); } COM: <s> test of work method of class log command worker </s>
funcom_train/7756820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StructuredDocument removeServiceParam(ID key) { Element param = (Element) serviceParams.remove(key); if (param == null) { return null; } incModCount(); // It sound silly to clone it, but remember that we could be sharing // this element with a clone of ours, so we have the duty to still // protect it. StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(param); return newDoc; } COM: <s> removes and returns the parameter element that matches the given key </s>
funcom_train/3787028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean writeTableDelim(String fileName, String delim) { /* writeTableDelim */ String sDelimData= this.cvtTblToDelimData(delim); if(sDelimData==null) return(false); boolean ok= FileIO.writeTextFile(fileName, sDelimData); return(ok); } /* writeTableDelim */ COM: <s> write table delim write the table as a delimited character or </s>
funcom_train/34564381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Expr union() throws QueryException { final Expr e = intersect(); if(!consumeWS(UNION) && !consumeWS2(PIPE)) return e; Expr[] list = { e }; do list = add(list, intersect()); while(consumeWS(UNION) || consumeWS2(PIPE)); return new Union(list); } COM: <s> 52 parses a union expr </s>
funcom_train/18246072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_calculateDeltaEncodedGaps_EmptySequence() throws SequenceException{ MutableGenericSequence<Short> encodedGaps= SequenceUtils.calculateDeltaEncodedGaps(new MutableGenericSequence<Character>()); assertEquals(encodedGaps.getSize(),0); assertTrue(encodedGaps.getData().isEmpty()); } COM: <s> if you pass an empty sequence in you should </s>
funcom_train/3274405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectShips(Ship[] ships) { Iterator selIter = selectedShips.iterator(); Ship temp; while(selIter.hasNext()){ temp = ((Ship)selIter.next()); deSelectShipConcurrent(temp, selIter); currentGroupLeader = null; selectedShipsIter = null; } for (int i = 0; i < ships.length; i++) { selectShip(ships[i], false); // ships[i].showBoundingBox(true); } nextGroupLeader(); } COM: <s> set these ships to be selected </s>
funcom_train/3006293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPrecedingColumnName() { String result = null; FwkTableDisplayTag tableDisplayTag = (FwkTableDisplayTag) pageContext.getAttribute( Constants.TABLE_DISPLAY_TAG ); List columnNames = tableDisplayTag.getColumnNames(); if ( !columnNames.isEmpty() ) { result = (String)columnNames.get( 0 ); } return result; } COM: <s> returns the name of the first column of the table display </s>
funcom_train/23182471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeActivePlotter() { logger.info("changeActivePlotter() - Entry"); Plotter activePlotter = ctrlMainFrame.getTabbedPlotter().getActivePlotter(); ctrlMainFrame.getCtrlMainLeftPanel().getView().getMainTree().clearSelection(); mainGuiModel.setActivePlotter(activePlotter); logger.info("changeActivePlotter() - Exit"); } COM: <s> changes active plotter and update </s>
funcom_train/45529075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getKind(){ if(leftIToken.getKind() == JSCParsersym.TK_VAR) return 3; else if(leftIToken.getKind() == JSCParsersym.TK_COLON){ if(_WHILE != null) return 6; else return 5; } else if(_Name1 == null) return 4; else if(_Name2 == null) return 1; else return 2; } COM: <s> 1 name1 leftarrow expr seq generator clause br </s>
funcom_train/4527718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(length*2); for (int i = 0; i < length; i++) { int b = data[i]; buf.append(HEX_DIGITS[(b >> 4) & 0xf]); buf.append(HEX_DIGITS[b & 0xf]); } return buf.toString(); } COM: <s> returns a string representation of this object </s>
funcom_train/23021470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, Object value) { if (value == null) { super.put(key, null); } else if (value instanceof Float) { Float boxedFloat = (Float) value; put(key, boxedFloat.floatValue()); } else if (value instanceof Double) { Double boxedDouble = (Double) value; put(key, boxedDouble.doubleValue()); } else { put(key, value.toString()); } } COM: <s> associates the specified objects </s>
funcom_train/2292441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showElementLanguageSelector() { List locales = OpenCms.getLocaleManager().getAvailableLocales(getCms(), getParamResource()); if ((locales == null) || (locales.size() < 2)) { // for less than two available locales, do not create language selector return false; } return true; } COM: <s> determines if the element language selector is shown dependent on the available locales </s>
funcom_train/24080466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDirFields() { //Create directory label + field + button dirLabel = new JLabel("Directory:"); dirField = new JTextField(40); dirButton = new JButton("Browse"); dirButton.setIcon(browseBtnIcon1); dirButton.setRolloverIcon(browseBtnIcon1); //Create checkbox (include subdirectories) subDirCheckBox = new JCheckBox("Include subdirectories"); } COM: <s> set all fields related to browsing a directory </s>
funcom_train/29514257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logOut() { if (isLoggedIn()) { try { try { sendXmlToClient(encodeClientReply(getLastCommand(), null)); } catch (IOException e) { // if log out fail, then just disconnect... } getServerArchive().save(); unlockFiles(getMyLockedItems()); } catch (IOException e) { if (DEBUG) e.printStackTrace(); System.out.println("ERROR: Couldn't save serverarchive during log out"); } setServerArchive(null); unlockUser(getConnectedUser()); setConnectedUser(null); } this.connectedClient.disconnect(); } COM: <s> logs out the user and disconnects from client saves the servers archive </s>
funcom_train/20845850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTo(OutputStream out) throws IOException { InputStream is = getContentStream(); try { final int size = 1024; byte[] puffer = new byte[size]; int dataRead = -1; while ((dataRead = is.read(puffer)) != -1) { out.write(puffer, 0, dataRead); } } finally { if (is != null) is.close(); } } COM: <s> writes attachment to the given outputstream </s>
funcom_train/24134524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { Debug.println("IdentServer: stopping"); try { _echoServer.close(); } catch (Exception e) { Debug.println(" _echoServer is null"); } try { _clientSocket.close(); } catch (Exception e) { Debug.println(" _clientSocket is null"); } } COM: <s> try to stop ident server </s>
funcom_train/11659020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JellyContext newJellyContext(Map newVariables) { // XXXX: should allow this new context to // XXXX: inherit parent contexts? // XXXX: Or at least publish the parent scope // XXXX: as a Map in this new variable scope? newVariables.put("parentScope", variables); JellyContext answer = createChildContext(); answer.setVariables(newVariables); return answer; } COM: <s> a factory method to create a new child context of the </s>
funcom_train/39371470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pluginSelected(ActionEvent evt) { if (machTree.getCurrent() == null) return; for (PluginInt pi : plugins) if (pi.getVisibleName().equals( ((JMenuItem) evt.getSource()).getText())) { lowerArea.removeAll(); lowerArea.add((JPanel) pi); lowerArea.validate(); lowerArea.repaint(); ((JPanel) pi).validate(); machTree.setCurrentMachineUpdateInt((MachineUpdateInt) pi); } } COM: <s> the user selected a plugin </s>
funcom_train/9869560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPublicado(Boolean newVal) { if ((newVal != null && this.publicado != null && newVal.equals(this.publicado)) || (newVal == null && this.publicado == null && publicado_is_initialized)) { return; } this.publicado = newVal; publicado_is_modified = true; publicado_is_initialized = true; } COM: <s> setter method for publicado </s>
funcom_train/44020905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getHelpCheckForNewVersionMenuItem() { if (helpCheckForNewVersionMenuItem == null) { helpCheckForNewVersionMenuItem = new JMenuItem(); helpCheckForNewVersionMenuItem.setText("Check for new version"); helpCheckForNewVersionMenuItem.setMnemonic('C'); helpCheckForNewVersionMenuItem.addActionListener(eventHandler); } return helpCheckForNewVersionMenuItem; } COM: <s> return the help check for new version menu item </s>
funcom_train/26172033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Prop ( InputStream in ) { this( null, null ); try { Properties parse = new Properties(); parse.load( in ); _me.putAll( parse ); System.err.println( "{PRP} loaded Properties from InputStream" ); } catch ( IOException e ) { System.err.println( "{PRP} error loading Properties from InputStream" ); } } COM: <s> ctor to load a properties file from an input stream </s>
funcom_train/4233552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void autoScale() { double oldScale = scale; // scale the image to the panel scale = getAutoScale(); if (scale != oldScale) { firePropertyChange(SCALE_PROPERTY, oldScale, scale); } setCursor(Cursor.getDefaultCursor()); autoCenter(); } COM: <s> automatically scales the image to maximize its dimensions in the panel </s>
funcom_train/3643847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDCA(int dcaValue) throws OneWireIOException, OneWireException, IllegalArgumentException { byte[] data = readPage(7); data [6] = ( byte ) (dcaValue & 0x00ff); data [7] = ( byte ) ((dcaValue & 0xff00) >>> 8); writePage(7, data, 0); } COM: <s> set the value of the dca </s>
funcom_train/49102074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out, IpssProject project) throws Exception { // don't try / catch this command // sothat we get error messages at the // frontend. // e.g. I you have not permissions to // write a file you should get an error message out = new BufferedOutputStream(out); out.write(toString(project).getBytes()); out.flush(); out.close(); } COM: <s> writes the graph as xml file </s>
funcom_train/25311894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawGrid(Color color){ Graphics g = bufferImage.getGraphics(); g.setColor(color); int height = this.getContentPane().getHeight() -10; int width = this.getContentPane().getWidth(); int i = 10; int j = 0; while(i < width){ g.drawLine(i, 0, i, height); i+=pixelsPerUnit; } while (j< height){ g.drawLine(0, j, width, j); j+= pixelsPerUnit; } } COM: <s> it draws the grid </s>
funcom_train/47308104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadNextLevel() { lostFocus(); if (levelnames.empty()) { currentlevel = null; } else { String filename = levelnames.pop(); System.out.println("Loading level " + filename + "..."); currentlevel = levelloader.load(filename); } gainedFocus(); } COM: <s> loads the next level </s>
funcom_train/9890807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void dispose() { // dispose panes for(ArrayList<ObjectPropertyPane<?>> panes : m_PaneSets.values()) { for(ObjectPropertyPane<?> pane : panes) { disposePane(pane); } } // dispose listeners if(m_DBConnectListener != null) { DataBase.removeDataBaseConnectListener(m_DBConnectListener); } // dispose others m_Toolkit.dispose(); super.dispose(); } COM: <s> does additional disposing </s>
funcom_train/3151968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processDataChangedEvent(Event e) { delegateToChild(defaultChild, e); // this will reload the datas if(showMap != null) { Integer intId = ( Integer)showMap.get( defaultChild); if( intId != null) showProcessor.forward( new ModelEvent( intId.intValue(), this)); //this will show the right view } } COM: <s> this method will delegate the event to the default child </s>
funcom_train/7280663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyAndNone() throws Exception { GGEP g = new GGEP(); assertNull(IntervalEncoder.decode(1024 * 1024L, g)); IntervalSet s = new IntervalSet(); IntervalEncoder.encode(1024 * 1024L, g, s); assertNotNull(IntervalEncoder.decode(1024 * 1024L, g)); } COM: <s> tests that empty interval sets are not the same as non existent ones </s>
funcom_train/38537681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMinZ(Number n) throws PropagationFailureException { if (z != null) { z.setMin(n); } else { for (int i=0; i<gz.getNodeCount(); i++) { ((NumNode) gz.getNode(i)).setMin(n); } } } COM: <s> sets the minimum value for the current z </s>
funcom_train/35715288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installWheelHandler() { if (fFocusRevision != null && !fWheelHandlerInstalled) { //FIXME: does not work on Windows, because Canvas cannot get focus and therefore does not send out mouse wheel events: //https://bugs.eclipse.org/bugs/show_bug.cgi?id=81189 //see also https://bugs.eclipse.org/bugs/show_bug.cgi?id=75766 fControl.addListener(SWT.MouseWheel, fMouseHandler); fWheelHandlerInstalled= true; } } COM: <s> installs the mouse wheel handler </s>
funcom_train/5309190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CategoryAxis getDomainAxisForDataset(int index) { CategoryAxis result = getDomainAxis(); Integer axisIndex = (Integer) this.datasetToDomainAxisMap.get(index); if (axisIndex != null) { result = getDomainAxis(axisIndex.intValue()); } return result; } COM: <s> returns the domain axis for a dataset </s>
funcom_train/46214069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeMessages() { out("<tr>"); out("<td colspan='2'>"); out("<ul>"); MessageBean dexMessage = (MessageBean) pageContext.getRequest().getAttribute(Names.MESSAGES); if (dexMessage != null) { for (int i = 0; i < dexMessage.size(); i++) { out("<li class='dexMessages'>"); out((String) dexMessage.get(i)); out("</li>"); } dexMessage.clear(); } out("</ul>"); out("</div>"); out("</td>"); out("</tr>"); } COM: <s> assumes we are within a table </s>
funcom_train/51302099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPersistentDataFromRMS() { // Load game settings if possible if (areGameSettingsInRMS()) loadFromRMS(); else { I18n.setLanguage(I18n.ENGLISH); saveToRMS(); } // Load all top tables if possible if (areAllTopTablesInRMS()) loadAllTopTablesFromRMS(); else saveAllTopTablesToRMS(); } COM: <s> loads all persistent data from appropriate rms storages </s>
funcom_train/22447612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setText("CreateRandomBounds"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() createRandomBounds(); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/13450981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContainers() throws SerializationException { final SerializationBase sb = new SerializationBaseTestDto(); final Vector v = new Vector(); v.addElement(sb); v.addElement(null); v.addElement(sb); final String serialized = Serializer.serialize(v); final Object unserialized = Serializer.deserialize(serialized); cmpVectors(v,(Vector) unserialized); } COM: <s> tests the handling of containers </s>
funcom_train/43629287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringAt(int row, int column) { // changed implementation to use StringValueRegistry StringValue stringValue = getStringValueRegistry().getStringValue( convertRowIndexToModel(row), convertColumnIndexToModel(column)); return stringValue.getString(getValueAt(row, column)); } COM: <s> returns the string representation of the cell value at the given </s>
funcom_train/26104146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteMessage() { Intent i = new Intent(SmsPopupActivity.this.getApplicationContext(), SmsPopupUtilsService.class); i.setAction(SmsPopupUtilsService.ACTION_DELETE_MESSAGE); i.putExtras(smsPopupPager.getActiveMessage().toBundle()); SmsPopupUtilsService.beginStartingService(SmsPopupActivity.this.getApplicationContext(), i); removeActiveMessage(); } COM: <s> delete the current message from the system database </s>
funcom_train/3410167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(MenuComponent m) { if (m == null) { return; } synchronized (getTreeLock()) { if (m == menuBar) { menuBar = null; FramePeer peer = (FramePeer)this.peer; if (peer != null) { mbManagement = true; if (valid) { invalidate(); } peer.setMenuBar(null); m.removeNotify(); } m.parent = null; } else { super.remove(m); } } } COM: <s> removes the specified menu bar from this frame </s>
funcom_train/43416012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(int background, int foreground) { setComponentColors(background, foreground); try { TextAnnotation annotation = new TextAnnotation(ScreenModel.FONT_NORMAL, ScreenModel.TEXTSTYLE_ROMAN, background, foreground); append(new AnnotatedText(annotation, getFormFeed())); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> clears the text by printing a form feed </s>
funcom_train/21287491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAcceleration() { //the acceleration due to the car in front if (routePos<route.size()-1) { double carAccel = accelerationDueToCar(); double nodeRoadAccel = accelerationToNearestNodeOrRoad1(); double min = Math.min(carAccel, nodeRoadAccel); accelX = min * Math.cos(route.get(routePos).getRoadAngle()); accelY = min * Math.sin(route.get(routePos).getRoadAngle()); notUpdated = true; } } COM: <s> checks all possible sources of acceleration of this vehicle </s>
funcom_train/35716612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Template findTemplate(String name, String contextTypeId) { Assert.isNotNull(name); for (Iterator it= fTemplates.iterator(); it.hasNext();) { TemplatePersistenceData data= (TemplatePersistenceData) it.next(); Template template= data.getTemplate(); if (data.isEnabled() && !data.isDeleted() && (contextTypeId == null || contextTypeId.equals(template.getContextTypeId())) && name.equals(template.getName())) return template; } return null; } COM: <s> returns the first enabled template that matches both name and context type id </s>
funcom_train/20894643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInitialState() { Enumeration it = states.keys(); while (it.hasMoreElements()) { String id = (String)it.nextElement(); State q = (State)states.get(id); if (q.isInitial()) { return id; } } return null; } COM: <s> the id of the initial state or code null code if this </s>
funcom_train/543400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBestFitMinMax(double min, double max) { if (min < max) { bfMin = min; bfMax = max; } if (!autoBestFit) { synchronized (this) { convertImage(); if (zoomDialog != null && zoomDialog.isVisible()) buildZoom(); } } } COM: <s> sets the value of best fit min and max when automatic </s>
funcom_train/47197614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void orderModules() { int size = modules.size(); for (int p = 1; p < size; p++) { Module m = modules.get(p); int j = p; for (; j > 0 && m.getImodule().getPositionWeight() < modules.get(j - 1).getImodule().getPositionWeight(); j--) modules.set(j, modules.get(j - 1)); modules.set(j, m); } } COM: <s> reorder module into the following weigh the less weight will appear </s>
funcom_train/2583918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D translateScreenToJava2D(Point screenPoint) { Rectangle insets = this.getClientArea(); int x = (int) ((screenPoint.x - insets.x) / this.scaleX); int y = (int) ((screenPoint.y - insets.y) / this.scaleY); return new Point2D.Double(x, y); } COM: <s> translates a screen location to a java2 d point </s>
funcom_train/32057658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateSize() { System.out.println("testUpdateSize"); JGraph jg=new JGraph(); BasicGraphUI x = new BasicGraphUI(); GraphLayoutCache g = new GraphLayoutCache( new DefaultGraphModel(),jg ); x.installUI(jg); x.updateSize(); } COM: <s> test of update size method of class basic graph ui </s>
funcom_train/37227670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String id() { String result = System.identityHashCode(this) + ", PK = "; if (this.ctx == null) { result += "[nullCtx]"; } else { Object pk = this.ctx.getPrimaryKey(); result += (pk==null ? "[nullPK]" : pk.toString()); } return result; } COM: <s> returns a string representation of the primary key of this entity bean </s>
funcom_train/39216123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendLinkUrl(StringBuilder sb, String id) { sb.append(this.contextPath); sb.append(id).append('.').append(this.suffix); if (!isCrawler() && !isUsingCookies()) { sb.append(StandaloneSessionManager.DIVIDER); sb.append(getSessionId()); } } COM: <s> appends the link url to the given string builder </s>
funcom_train/19672161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleKeyboard() { while(Keyboard.next()) { // closing on ESCAPE if(Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) { closing = true; } if(Keyboard.getEventKey() == Keyboard.KEY_SPACE && Keyboard.getEventKeyState()) { Mouse.setGrabbed(!Mouse.isGrabbed()); } } } COM: <s> handles the keyboard </s>
funcom_train/21609432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStringList(String key, String valarr[]) { String s = ""; for (int i = 0; i < valarr.length; i++) { s += valarr[i]; if (i != valarr.length-1) s += SandstormConfig.LIST_ELEMENT_DELIMITER; } vals.put(key, s); } COM: <s> set the given key to the given string list value </s>
funcom_train/17848762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNrDays(int nrDays) { if (mTimeCB != null) { for (int i = 0; i < TIME_VALUE_ARR.length; i++) { if (nrDays == TIME_VALUE_ARR[i]) { mTimeCB.setSelectedIndex(i); break; } } } } COM: <s> sets the number of days to use for searching </s>
funcom_train/3467230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File createFile(java.lang.String p_root, java.lang.String p_name, java.lang.String p_id) throws java.io.IOException { // @BEGINPROTECT _3CA9CE7D0211 return this.createFile(p_root, p_name, p_id, false); // @ENDPROTECT } COM: <s> create a new file </s>
funcom_train/17675863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getClassList() { if (cmdToIDInt != null) { return createArrayList(cmdToIDInt.keySet().iterator()); } if (cmdToIDString != null) { return createArrayList(cmdToIDString.keySet().iterator()); } return Collections.EMPTY_LIST; } COM: <s> get all of the class meta datas we have in alphabetical order </s>
funcom_train/44555883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLabel(double x, double y, String label) { setup(); int xt = Plot.LEFT_MARGIN + (int)(x*frameWidth); int yt = Plot.TOP_MARGIN + (int)(y*frameHeight); ip.drawString(label, xt, yt); } COM: <s> draws text at the specified location where 0 0 </s>