__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3561484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFlagHelpText (String flagName) { int pos; pos = getFlagPos(flagName); if (pos >= 0) { try { return getFlagHelpText(pos); } catch (IndexOutOfBoundsException e) { System.out.println("Not fatal: flag not correctly defined"); } } return ""; } COM: <s> returns help text of a flag whose name is specified </s>
funcom_train/8989825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DmsArchiveDetail createArchiveDetail(DmsArchiveDetail archiveDetail) throws ApplicationException { DmsArchiveDetailDAObject archiveDetailDAO = new DmsArchiveDetailDAObject(sessionContainer, conn); DmsArchiveDetail newArchiveDetail = (DmsArchiveDetail) archiveDetailDAO.insertObject(archiveDetail); archiveDetailDAO=null; return newArchiveDetail; } COM: <s> create and reterive the new dms archive detail object </s>
funcom_train/14310137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showSmallContent( boolean isSmall ) { if ( ! isSmall ) { //The large version of the content, small empty border: contentPanel.setBorder( BorderFactory.createEmptyBorder(10,40,10,40) ); } else { //The small version of the content, large empty border: contentPanel.setBorder( BorderFactory.createEmptyBorder(10,120,10,120) ); } } COM: <s> change the size of the content panel </s>
funcom_train/51782158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawDirection(DrawingContext drawingContext) { ReadingDirection readingDirection = ((UmlRelation)association.getModelElement()).getNameReadingDirection(); if (readingDirection == ReadingDirection.LEFT_RIGHT) { drawTriangleLeftRight(drawingContext); } else if (readingDirection == ReadingDirection.RIGHT_LEFT) { drawTriangleRightLeft(drawingContext); } } COM: <s> draws the direction triangle </s>
funcom_train/19381245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetSearchCriteria() { _dependsOnKey = null; _dependsOnValue = null; _txtName.setValue(""); _txtName2.setValue(""); _txtName3.setValue(""); _txtNewValue.setValue(""); _dsLookupNew.reset(); _dsLookupNew.insertRow(); } COM: <s> resets the search criteria </s>
funcom_train/51222494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRelation(ITable source, ITable destination, IRelation.Kind kind) { relationCount++; // create initial name // check for uniqueness String name = "Rel_" + relationCount; // add relation to the model IRelation relation = this.model.addRelation(name, source, destination, kind); // add relation to the diagram addRelation(relation); this.changed = true; } COM: <s> add a relation to the diagram </s>
funcom_train/25459745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JasperReport compileReport(JasperDesign jasperDesign){ JasperReport jasperReport=null; try { jasperReport= JasperCompileManager.compileReport(jasperDesign); } catch (JRException e) { log.error("Error in compiling the report.... "+e.getMessage()); } return(jasperReport); } COM: <s> compile the report and generates a binary version of it </s>
funcom_train/7506047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invokePluginContextInitialized(ServletContextEvent evt) { for (ApplicationContextPlugin plugin : getApplicationContextPlugins()) { for (ContextLoaderListener listener : plugin.getContextLoaderListeners()) { try { listener.contextInitialized(evt); } catch (Exception e) { log.error("error in contextInitialized for plugin '" + plugin.getName() + "'", e); } } } } COM: <s> invokes context initialized for every registered plugin </s>
funcom_train/5001957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsVariable(String variableName) throws RWorkspaceException { REXP res = null; try { res = connection.eval("exists(\"" + variableName + "\")"); //$NON-NLS-1$ //$NON-NLS-2$ } catch (RserveException e) { throw new RWorkspaceException(e); } if (res.isLogical() && ((REXPLogical)res).isTRUE()[0]) { return true; } return false; } COM: <s> test if a variable exists in the r workspace </s>
funcom_train/13922645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerDraggableContainer(Container draggableContainer) { if (this.draggableContainer == null) { this.draggableContainer = draggableContainer; draggableContainer.addContainerListener(this); dragListener = new DraggableListener(this); hearingComponents = new HashSet<Integer>(); draggableContainerRegistered = true; } else { throw new IllegalArgumentException("A Draggable Container has already been registered"); } } COM: <s> registers the given </s>
funcom_train/816841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startDerby(){ log.info("Entering StartDerbyServerThread.startDerby()"); try{ // just to be sure that we don't start two servers this.stopDerby(); server = new NetworkServerControl(); server.start( null ); } catch ( Exception ex ) { log.debug( ex ); return false; } log.info("Done with StartDerbyServerThread.startDerby()"); return true; } COM: <s> starts the network server </s>
funcom_train/51636050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Annotation getAnnotation(int offset, int length) { IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput()); Iterator e= new JavaAnnotationIterator(model, true, false); while (e.hasNext()) { Annotation a= (Annotation) e.next(); Position p= model.getPosition(a); if (p != null && p.overlapsWith(offset, length)) return a; } return null; } COM: <s> returns the annotation overlapping with the given range or code null code </s>
funcom_train/41385667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBotonSuscripciones() { if (botonSuscripciones == null) { botonSuscripciones = new JButton(); botonSuscripciones.setBounds(new Rectangle(15, 5, 130, 15)); botonSuscripciones.setText("Suscripciones"); botonSuscripciones.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { listener.actionListener(e); } }); } return botonSuscripciones; } COM: <s> this method initializes boton suscripciones </s>
funcom_train/28672767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultInitMethodPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BeansType_defaultInitMethod_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BeansType_defaultInitMethod_feature", "_UI_BeansType_type"), BeansPackage.Literals.BEANS_TYPE__DEFAULT_INIT_METHOD, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the default init method feature </s>
funcom_train/11004243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFooter(int pageNumber) { // First page footer is optional, only return // if it's set if(pageNumber == 1) { if(getFirstFooter().length() > 0) { return getFirstFooter(); } } // Even page footer is optional, only return // if it's set if(pageNumber % 2 == 0) { if(getEvenFooter().length() > 0) { return getEvenFooter(); } } // Odd is the default return getOddFooter(); } COM: <s> returns the correct defined footer for the given </s>
funcom_train/21810394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processProtocolEvent ( X10ProtocolEvent protocolEvent ) { // Copy the object and stuff the object into the txQueue debug ("processProtocolEvent:: " + protocolEvent ); if (protocolEvent instanceof X10ProtocolEvent) { try { m_txQueue.put ( (X10ProtocolEvent)protocolEvent ); } catch ( InterruptedException e) { debug ( e.toString( ) ); } } } COM: <s> implementation of the process protocol event method </s>
funcom_train/3730325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassGen makeClass( String className, String fileName ) { ClassGen newClass = new ClassGen( className, "java.lang.Object", fileName, Constants.ACC_PUBLIC, interfaces); MethodGen constructor = makeConstructor( newClass ); newClass.addMethod( constructor.getMethod() ); MethodGen testMethod = makeMethod( newClass ); org.apache.bcel.classfile.Method m = testMethod.getMethod(); newClass.addMethod( m ); return newClass; } COM: <s> generate a class with a single no arg constructor and a run test </s>
funcom_train/3412331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Window getFullScreenWindow() { Window returnWindow = null; synchronized (fsAppContextLock) { // Only return a handle to the current fs window if we are in the // same AppContext that set the fs window if (fullScreenAppContext == AppContext.getAppContext()) { returnWindow = fullScreenWindow; } } return returnWindow; } COM: <s> returns the code window code object representing the </s>
funcom_train/7661501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecute1() { ThreadPoolExecutor p = new ThreadPoolExecutor(1,1, 60, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(1)); try { for(int i = 0; i < 5; ++i){ p.submit(new MediumRunnable()); } shouldThrow(); } catch(RejectedExecutionException success){} joinPool(p); } COM: <s> submit runnable throws rejected execution exception if </s>
funcom_train/43431459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHandleBar(ComponentHandlebar handlebar) { assert(handlebar != null); // Only add the handlebar if it doesn't overlap with a component and there's no multiple selection Rectangle handleRect = handlebar.getRequiredSpace(); if ((!TrackLayout.detectOverlap(handleRect, null)) && (TrackLayout.getNumSelected() == 1)) { handlebars.add(handlebar); } } COM: <s> associates a handlebar with the resize information for use by a layout component </s>
funcom_train/51538558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZipEntry getEntry(String name) { checkClosed(); try { Hashtable entries = getEntries(); ZipEntry entry = (ZipEntry) entries.get(name); // If we didn't find it, maybe it's a directory. if (entry == null && !name.endsWith("/")) entry = (ZipEntry) entries.get(name + '/'); return entry != null ? new ZipEntry(entry, name) : null; } catch (IOException ioe) { return null; } } COM: <s> searches for a zip entry in this archive with the given name </s>
funcom_train/47171109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextToken getNextText(boolean skipEmpty) { int pos = getPosition(); while (pos < elements.size()) { AbstractHTMLToken element = elements.get(pos); if (element instanceof TextToken) { if (!skipEmpty || !isWhitespace(element)) { setPosition(pos + 1); return (TextToken)element; } } pos ++; } return null; } COM: <s> returns the next text token html token in the current file </s>
funcom_train/25010139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Action getInitiateInPartyAction(final Hero hero, final int index) { Action action = new Action() { /** * {@inheritDoc} */ public void performAction() { if (hero != null) { heroViewer.setHero(hero); for (int i = 0; i < initiatesInParty.length; i++) { if (i == index) { continue; } initiatesInParty[i].removeSelection(); } clearSelectionsFromHeroes(); clearSelectionsFromUnselectedInitiates(); addPanel.setVisible(false); removePanel.setVisible(true); } } }; return action; } COM: <s> gets the default </s>
funcom_train/5316777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SAXParseException (String message, Locator locator) { super(message); this.publicId = locator.getPublicId(); this.systemId = locator.getSystemId(); this.lineNumber = locator.getLineNumber(); this.columnNumber = locator.getColumnNumber(); } COM: <s> create a new saxparse exception from a message and a locator </s>
funcom_train/21460311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkGetU() { DenseMatrix64F A = RandomMatrices.createRandom(5,7,-1,1,rand); SingularValueDecomposition<DenseMatrix64F> alg = createSvd(); assertTrue(alg.decompose(A)); DenseMatrix64F U = alg.getU(false); DenseMatrix64F Ut = alg.getU(true); DenseMatrix64F found = new DenseMatrix64F(U.numCols,U.numRows); CommonOps.transpose(U,found); assertTrue( MatrixFeatures.isEquals(Ut,found)); } COM: <s> makes sure transposed flag is correctly handled </s>
funcom_train/14089082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer insertContent(StringBuffer input) { StringBuffer out = new StringBuffer(); Pattern p = Pattern.compile("(?si)(" + patternStart + ")(" + patternEnd + ")"); Matcher m = p.matcher(input); int last = 0; int counter = 0; while (m.find()) { out.append(input.substring(last, m.start())); out.append(m.group(1)); try { out.append(content.get(counter)); } catch (IndexOutOfBoundsException e) { } out.append(m.group(2)); counter++; last = m.end(); } out.append(input.substring(last, input.length())); return out; } COM: <s> re inserts the removed content </s>
funcom_train/3710748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getWidget() { super.getWidget(); // Interpolating selector turned off dor now. Only interpolating mode is supported. // final JCheckBox interpolating = new JCheckBox("interpolating"); // interpolating.setSelected(is_interpolating); // // interpolating.addActionListener(new ActionListener() { // public void actionPerformed(ActionEvent e) { // is_interpolating = interpolating.isSelected(); // } // }); // // top_panel.add (interpolating); // frame.validate(); } COM: <s> overrides superclass in order to provide a selector for the </s>
funcom_train/15739825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortOrder(SortOrder sortOrder) { if (this.sortOrder != sortOrder) { this.sortOrder = sortOrder; if (sortOrder == SortOrder.UNORDERED) { resetModelData(); } else { Collections.sort(sortedModel); } fireContentsChanged(ListDataEvent.CONTENTS_CHANGED, 0, sortedModel.size()-1); } } COM: <s> change the sort order of the model at runtime </s>
funcom_train/13221738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dragExit(DropTargetEvent dte) { Object o = dte.getDropTargetContext().getComponent(); if (o instanceof JComponent) { JComponent target = (JComponent) o; target.setBorder(oldBorder); } if (o instanceof DragAndDropable) { DragAndDropable target = (DragAndDropable) o; target.setDraggingOver(null); } } COM: <s> called while a drag operation is ongoing when the mouse pointer has </s>
funcom_train/10912144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readUShort(int pos) { int ret = output[pos]; if (ret < 0) { ret += 256; } ret = ret << 8; if (output[pos + 1] < 0) { ret |= output[pos + 1] + 256; } else { ret |= output[pos + 1]; } return ret; } COM: <s> read a unsigned short value at given position </s>
funcom_train/22369611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restartPlayback() { long position = getCurrentAudioObjectPlayedTime(); // Disable playback state listeners while restarting playback setCallToPlaybackStateListenersDisabled(true); finishPlayer(); playCurrentAudioObject(true); seekCurrentAudioObject(position); // Enable playback state listeners again setCallToPlaybackStateListenersDisabled(false); } COM: <s> restarts playback stops and starts playback seeking to previous position </s>
funcom_train/7609556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perform() { String[] operands = new String[2]; //Check number of operands if(getStack().size() >= 2) { operands[0] = getStack().pop().getStringValue(); operands[1] = getStack().pop().getStringValue(); String result = operands[0] + operands[1]; getStack().push(new Operand(result)); } else { throw new IllegalStateException(" Too few operands, Concat needs 2 operands"); } } COM: <s> concat this instruction concatenates two string constants at the top of the stack </s>
funcom_train/49009168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancelButton() { if (cancelButton == null) { cancelButton = new JButton(); cancelButton.setText("停止采集"); cancelButton.setEnabled(false); cancelButton.setActionCommand("取消采集"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (imageCapture != null) { imageCapture.stop(); } } }); } return cancelButton; } COM: <s> this method initializes cancel button </s>
funcom_train/27947272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAtomRenderingStyleDescription() { if (settings.getAtomDrawMode()== DisplaySettings.QUICKDRAW) { return("QUICKDRAW"); } else if (settings.getAtomDrawMode()== DisplaySettings.SHADING) { return("SHADED"); } else if (settings.getAtomDrawMode()== DisplaySettings.WIREFRAME) { return("WIREFRAME"); } return "NULL"; } COM: <s> gets the rendering mode for atoms </s>
funcom_train/27779938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSet(long bit) throws IOException { RandomAccessFile v = _vf(); synchronized (v) { if (v.length() * 8 <= bit) { return false; } v.seek(bit / 8); byte b = (byte) (v.readByte() >>> (bit % 8)); return (b & 1) == 1; } } COM: <s> gets the set attribute of the bit vector object </s>
funcom_train/50141735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDouble(int parameterIndex, double x) throws SQLException{ try{ ps.setDouble(parameterIndex, x); } catch (SQLException sqlex){ log.debug(getLogString() + " Exception: " + sqlex); throw sqlex; } setContent(parameterIndex, String.valueOf(x)); } COM: <s> sets the designated parameter to a java code double code value </s>
funcom_train/3359505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getResourceAsStream(String name) { URL url = getResource(name); if (url != null) { try { return url.openStream(); } catch (IOException ex) { // Syslog.debug("Cannot load resource " + name, ex); return null; } } else { return null; } } COM: <s> gets a resource as stream by name </s>
funcom_train/35405819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBoardSymmetryI() { BoardI board = BoardI.newBoard(); assertNotNull(board); board = board.newBoard(new Move("white k10")); if (DEBUG) System.err.println(board); assertNotNull(board); for (short row = 0; row < board.getSize(); row++) for (short column = 0; column < board.getSize(); column++) { boolean result; result = this.identicalLinearisation(board, row, column, column, row); assertTrue(result); } } COM: <s> make sure that all the linearisations are different </s>
funcom_train/25058019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyHardCodedValuesToPd(OperationDef operationDef, IProcessData processData) { for (Parameter parameter : operationDef.getInputParameters()) { if (parameter.getValue() != null) { processData.putItem(parameter.getName(), parameter.getValue()); } } } COM: <s> this method copies values hardcoded in process definition over to process data before </s>
funcom_train/50897705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Record load(String sKey) throws StorageException { DBPersist oDbp = new DBPersist(getName(), getName()); try { if (oDbp.load(this, sKey)) return oDbp; else return null; } catch (SQLException sqle) { throw new StorageException(sqle.getMessage(), sqle); } } COM: <s> p load a register by its primary key p </s>
funcom_train/12807716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toPdf(int midSize, final OutputStream os) throws IOException { os.write((byte)type); while (--midSize >= 0) os.write((byte)(offset >>> 8 * midSize & 0xff)); os.write((byte)(generation >>> 8 & 0xff)); os.write((byte)(generation & 0xff)); } COM: <s> writes pdf syntax to the output stream </s>
funcom_train/26018838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SocketConnection getSocketConnection() throws IOException { if (logger.isActivated()) { logger.debug("Open client socket to " + remoteAddress + ":" + remotePort); } SocketConnection socket = NetworkFactory.getFactory().createSocketClientConnection(); socket.open(remoteAddress, remotePort); if (logger.isActivated()) { logger.debug("Socket connected to " + socket.getRemoteAddress() + ":" + socket.getRemotePort()); } return socket; } COM: <s> returns the socket connection </s>
funcom_train/49159455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getDoneEvents() { Vector<SchedulerEvent> result = new Vector<SchedulerEvent>(); java.util.Collections.sort(events); for (int i = 0; i < events.size(); i++) { SchedulerEvent tmp = events.get(i); if (tmp.isDone()) { result.add(tmp); } } return result; } COM: <s> returns all events until today </s>
funcom_train/29324576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasProperty(Object id) { String stringId = ScriptRuntime.toString(id); String s = ScriptRuntime.getStringId(stringId); if (s == null) return getBase(obj, ScriptRuntime.getIntId(stringId)) != null; return getBase(obj, s) != null; } COM: <s> determine if a property exists in an object </s>
funcom_train/34023081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Number toInteger(Object val, Class<? extends Number> intClass) { Number num = toNumber(val); if (num instanceof Float || num instanceof Double) { if (intClass == Long.class) { return Double.doubleToLongBits(num.doubleValue()); } else { return Float.floatToIntBits(num.floatValue()); } } return num; } COM: <s> convert the given value to an integer type if necessary and possible </s>
funcom_train/12117579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC46(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.scadIncAggiungiJButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c46 scad inc aggiungi jbutton </s>
funcom_train/15718310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner createSpinner() { SpinnerModel model = new SpinnerNumberModel(100, 0, 255, 1); JSpinner ret = new JSpinner(model); // ret.setMinimumSize(new Dimension(50, 10)); // ret.setPreferredSize(new Dimension(50, 10)); return ret; } COM: <s> creates one spinner </s>
funcom_train/46937570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonNextMonth() { if (jButtonNextMonth == null) { jButtonNextMonth = new JButton(); jButtonNextMonth.setText(">>"); jButtonNextMonth.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { myCalendar.add(Calendar.MONTH, 1); fixData(); fixDisplay(); } }); } return jButtonNextMonth; } COM: <s> this method initializes j button next month </s>
funcom_train/21438131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public BufferedImage createImage(int width, int height, boolean opaque) { if( opaque ) return new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); } COM: <s> create an image </s>
funcom_train/11342140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String compactState(String input) { StringBuffer output = new StringBuffer(); StringTokenizer st = new StringTokenizer(input); while (st.hasMoreTokens()) { output.append(st.nextToken().toUpperCase().charAt(0)); } return output.toString(); } COM: <s> compact names that look like state strings </s>
funcom_train/12160609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String value) { if (value != null && value.trim().length() == 0) { hoursTextField.setText(""); minutesTextField.setText(""); secondsTextField.setText(""); } else { throw new IllegalArgumentException( "Expected an empty string value but got: " + value); } } COM: <s> if the value argument is an empty string then the hours minutes </s>
funcom_train/25152264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPage(int pageIndex) throws FileNotFoundException, IOException, ClassNotFoundException { ObjectInputStream in = new ObjectInputStream( new BufferedInputStream( new FileInputStream(getSwapFileName(pageIndex)) ) ); this.page = (ArrayList)in.readObject(); this.currentPageIndex=pageIndex; in.close(); } COM: <s> loads a swap page from temporary file into memory </s>
funcom_train/22557015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void metadata2XML(){ try{ m_CDProgramMgr.createGUIData(); uolXMLHandle = new XMLUoLsHandleOut(); uolXMLHandle.Save("C:\\uolsMetadata.xml", m_CDProgramMgr.getGUILearningPath(), m_CDProgramMgr.getCompetences()); }catch (Exception e) { e.printStackTrace(); System.exit( 1 ); } } COM: <s> transforms a learning path object into an xml file </s>
funcom_train/50328291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSpeedSteps(int handle, int mode) { log.debug("Set speed step mode " + mode + " for session handle" + handle); CanMessage msg = new CanMessage(3, tc.getCanid()); msg.setOpCode(CbusConstants.CBUS_STMOD); msg.setElement(1, handle); msg.setElement(2, mode); tc.sendCanMessage(msg, this); } COM: <s> send a cbus message to change the session speed step mode </s>
funcom_train/44121091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLastLeadingWhiteSpace() { if ((lineStart > leadingWhiteSpaceEnd) || (lineStart >= unescapedJavaCode.length())) { return (EMPTY_STRING); } // if else { return (unescapedJavaCode.substring(lineStart, leadingWhiteSpaceEnd)); } // else } // StringWithJavaSourceCode.getLastLeadingWhiteSpace() COM: <s> returns last leading white space </s>
funcom_train/50976819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeAll() { try { if (mReader != null) mReader.close(); if (mWriter != null) mWriter.close(); if (mNotebookSocket != null) { mNotebookSocket.close(); mNotebookSocket = null; } } catch ( Exception ex ) { System.err.println( "Error in die: " + ex ); } } COM: <s> closes all open sockets and streams </s>
funcom_train/1942328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlock(Lock lock) throws SQLException { PreparedStatement pstmt = con.prepareStatement("DELETE FROM LockTable WHERE lock_table=? AND lock_tupel=? AND lock_user=? AND lock_timestamp=?"); pstmt.setString(1, lock.getTable()); pstmt.setInt(2, lock.getTupel()); pstmt.setString(3, lock.getUser().getName()); pstmt.setTimestamp(4, lock.getTimestamp()); pstmt.executeUpdate(); } COM: <s> generic method to remove a lock from the database </s>
funcom_train/37035887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getResourcePaths(String path) { DirContext resources = context.getResources(); if (resources != null) { if (System.getSecurityManager() != null) { PrivilegedAction dp = new PrivilegedGetResourcePaths(resources, path); return ((Set) AccessController.doPrivileged(dp)); } else { return (getResourcePathsInternal(resources, path)); } } return (null); } COM: <s> return a set containing the resource paths of resources member of the </s>
funcom_train/19838076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int rotate(int number, int offset) { final int len = length(number); offset %= len; if (offset == 0) return number; if (offset < 0) offset = len + offset; final int mask = (int) Math.pow(base, offset); return number / mask + (number % mask) * (int) Math.pow(base, len - offset); } COM: <s> rotate digits of a number </s>
funcom_train/3740372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Task getTask(Long taskId) throws TaskManagerException { try { Session sess= HibernateUtil.currentSession(); Task task = (Task) sess.load(Task.class, taskId); logger.info("Pobranie tasku z bazy"); return task; } catch (Exception e) { String error = e.getClass()+" getTask(taskId)"; logger.warn("Zlapano wyjatek "+e.getClass()); throw new TaskManagerException(error); } } COM: <s> return task with the given id </s>
funcom_train/12689189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFilePath() { String baseDir = getBaseDir(); if (getIncludes().size() == 0) return ""; String fileName = getIncludes().get(0); String result = baseDir; if (result.length() > 0) result += separator; result += fileName; return result; } COM: <s> returns file path relative to the root </s>
funcom_train/13997384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContent(String txt, String border) { // System.out.println("Setting text in ModifyPanel"); // System.out.println("Text: "+ txt); ta.setText(txt); ta.setFont(new Font("Arial", Font.PLAIN, 16)); borderpath.setTitle(border); // ta.setContentType(contentType); //display as html } COM: <s> set the content of the text area </s>
funcom_train/50310535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startMasterJobs() { // Wait until this server is cluster master while (!clusterServer.isMaster()) clusterServer.waitUntilMaster(); // Server is cluster master. Start up all master jobs. Iterator i = masterJobs.keySet().iterator(); while (i.hasNext()) { JobScheduler s = (JobScheduler)(i.next()); Job job = (Job)(masterJobs.get(s)); Logger.log(Logger.INFO, "Jobs: Starting master job [" + job.getClass().getName() + "]", this); s.schedule(job); } } COM: <s> starts the master job if the server is cluster master </s>
funcom_train/25194162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String arrayToString(Object[] array) { StringBuffer buffer = new StringBuffer(); for(int i = 0; i < array.length; i++) { if(i > 0 ) { buffer.append(arraySeparator); } buffer.append(objectToString(array[i])); } return buffer.toString(); } COM: <s> can convert an array of the given class type to an commaseparated string </s>
funcom_train/28232908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StyleSheet getStyleSheet() { if (defaultStyles == null) { defaultStyles = new StyleSheet(); try { InputStream is = HTMLEditorKit.getResourceAsStream(DEFAULT_CSS); Reader r = new BufferedReader( new InputStreamReader(is, "ISO-8859-1")); defaultStyles.loadRules(r, null); r.close(); } catch (Throwable e) { // on error we simply have no styles... the html // will look mighty wrong but still function. } } return defaultStyles; } COM: <s> get the set of styles currently being used to render the </s>
funcom_train/9886670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMinRatio(int intensityIndex1, int intensityIndex2, int logState) { float ratio, minRatio = Float.MAX_VALUE; for (int i = 0; i < size(); i++) { ratio = getSlideDataElement(i).getRatio(intensityIndex1, intensityIndex2, logState); if (ratio < minRatio) minRatio = ratio; } return minRatio; } COM: <s> returns a microarray min ratio value of specified intensities </s>
funcom_train/9362471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishBroadcast() { if (mBroadcastCount < 0) { throw new IllegalStateException( "finishBroadcast() called outside of a broadcast"); } Object[] active = mActiveBroadcast; if (active != null) { final int N = mBroadcastCount; for (int i=0; i<N; i++) { active[i] = null; } } mBroadcastCount = -1; } COM: <s> clean up the state of a broadcast previously initiated by calling </s>
funcom_train/18741836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addScenarioHandler(StrategyValue strategyType, String name) { SimulatorAction generateAction = new CheckLTLAction(this.simulator, strategyType, name); generateAction.setEnabled(false); this.scenarioActionMap.put(strategyType, generateAction); JMenuItem menuItem = add(generateAction); menuItem.setToolTipText(strategyType.getDescription()); } COM: <s> adds an explication strategy action to the end of this menu </s>
funcom_train/13491020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ComplexTerm cplx(Function function, Object obj) { Class[] structure = function.getStructure(); if (structure.length != 1) { throw new IllegalArgumentException("Not the right number of terms for this function, the number is 1, but must be " + structure.length); } Term[] terms = {toTerm(obj, structure[0])}; return lfactory.createComplexTerm(function, terms); } COM: <s> create a complex term with one sub term </s>
funcom_train/9993337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowLevel(String id) { Element row = DOM.getElementById(addIdPrefix(id)); if (row == null) return -1; String level = DOM.getElementProperty(row, "level"); if (level == null) return -1; return Integer.parseInt(level); } COM: <s> gets the row level </s>
funcom_train/33526899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadArticles() { List<Article> toLoad = new ArrayList<Article>(); if (selectedSection != null) { toLoad = articleFacade.findByStateAndSection(new ArticleWorkflowState("REVIEWED"), selectedSection); } getArticles().setWrappedData(toLoad); } COM: <s> loads the articles into the datamodel based on the selected section </s>
funcom_train/26336119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GameItem getItem( String id ) { Iterator iter = this.contains.iterator(); while( iter.hasNext() ) { GameItem i = (GameItem) iter.next(); if( i != null && i.getID().equals( id )) return i; } return null; } COM: <s> get game item by id </s>
funcom_train/3763822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void optimize() { synchronized (this) { try { IndexWriter iw = new IndexWriter(root, new StandardAnalyzer(), false); iw.optimize(); iw.close(); } catch (IOException e) { logger.warn("Error occured in the optimize process of the index", e); } } } COM: <s> optimize the index better results time for search process </s>
funcom_train/39885213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(PipedInputStream stream) throws IOException { if (stream == null) { throw new NullPointerException(); } synchronized (stream) { if (this.target != null) { throw new IOException("Already connected"); } if (stream.isConnected) { throw new IOException("Pipe already connected"); } stream.establishConnection(); this.target = stream; } } COM: <s> connects this stream to a </s>
funcom_train/32802303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle(EssentialOCLEditorPlugin.INSTANCE .getString("_UI_Wizard_label")); //$NON-NLS-1$ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE .getImageDescriptor(EssentialOCLEditorPlugin.INSTANCE .getImage("full/wizban/NewTypes"))); //$NON-NLS-1$ } COM: <s> this just records the information </s>
funcom_train/43772493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E get(int index) { if(index < 0) { throw new IllegalArgumentException(); } int p = index / PAGE_SIZE; if(p >= _pages.length || _pages[p] == null) { return null; } return _pages[p][index % PAGE_SIZE]; } COM: <s> get the value of a given array slot null if none </s>
funcom_train/1590606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long set(long instant, int value) { FieldUtils.verifyValueBounds(this, value, iMin, iMax); int remainder = getRemainder(getWrappedField().get(instant)); return getWrappedField().set(instant, value * iDivisor + remainder); } COM: <s> set the specified amount of scaled units to the specified time instant </s>
funcom_train/50229549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawTimeBar(Graphics2D g) { float timeLeft = (float)client.frameCount/(float)client.level.timeout; int border = (int)(Level.YSIZE * (1 - timeLeft)); g.setColor(Color.black); g.fillRect(Level.XSIZE, 0, TIMEBARWIDTH, border); g.setColor(Color.green); g.fillRect(Level.XSIZE, border, TIMEBARWIDTH,Level.YSIZE - border); newRects.add(new Rectangle(Level.XSIZE, 0, TIMEBARWIDTH, Level.YSIZE)); } COM: <s> draw a bar that shrinks to zero when the level times out </s>
funcom_train/16082546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buddyOffline(String sn, Buddy buddy) { Contact contact = identity.getContact(AIMUtil.normalize(sn)); if (contact != null) { contact.setStatus(MessagingConstants.STATUS_OFFLINE); Contact[] contacts = new Contact[1]; contacts[0] = contact; eventListener.contactStatusUpdateReceived(this, identity, contacts); } } COM: <s> responds to daim buddy online events </s>
funcom_train/21633953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setInput(final BiPolarNeuralData input) { double activation; for (int i = 0; i < this.f1Count; i++) { activation = (input.getBoolean(i) ? 1 : 0) / (1 + this.a1 * ((input.getBoolean(i) ? 1 : 0) + this.b1) + this.c1); this.outputF1.setData(i, (activation > 0)); } } COM: <s> set the input to the neural network </s>
funcom_train/37522188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processTree( CompilerPassEnterable tree ) { long lastTime = System.currentTimeMillis(); try { tree.typecheck(); } catch( PositionedError e ) { reportTrouble( e ); } if( verboseMode() ) { inform( CompilerMessages.BODY_CHECKED, tree.getTokenReference().file(), new Long(System.currentTimeMillis() - lastTime) ); } } COM: <s> check that body of a given compilation unit is correct </s>
funcom_train/35682638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp(final String endpointName) throws Exception { if (endpointName.equals("CICSTS23-LSMSG")) { mEndpoint = getLsmsgEndpoint(); } else if (endpointName.equals("CICSTS23-MQCIH")) { mEndpoint = getMqcihEndpoint(); } if (_log.isDebugEnabled()) { mEndpoint.setHostTraceMode(true); } mAddress = new LegStarAddress(endpointName); } COM: <s> special setup using an endpoint configuration name </s>
funcom_train/32726503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login() { String nick = _nickField.getText(); String channel = _channelChoice.getSelectedItem(); if (nick == null || nick.trim().length() == 0) { // TODO: Error dialog return; } _applet.login(nick,channel); } COM: <s> attempt to login </s>
funcom_train/45872403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileInputStream getVoxelAtlasStream() { FileInputStream file = null; try { File fi = new File("etc/allen/Annotation25"); if (fi == null || !fi.canRead()) { throw new OMTException("Can't open Annotation25! " + fi.toString(), null); } file = new FileInputStream(fi); } catch (Exception e) { throw new OMTException("Cannot access voxel atlas stream", e); } return file; } COM: <s> the meshes were extracted from a sagittally oriented volume </s>
funcom_train/44871717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPoints(double[] xCoords, double[] yCoords) { if (xCoords == null) return; int ct = xCoords.length; if (yCoords == null) ct = 0; else if (yCoords.length < ct) ct = yCoords.length; for (int i = 0; i < ct; i++) addPoint(xCoords[i], yCoords[i]); for (int i = ct; i < xCoords.length; i++) addPoint(xCoords[i], 0); } COM: <s> add points to the table </s>
funcom_train/29722781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxMultiLine() { if (jCheckBoxMultiLine == null) { jCheckBoxMultiLine = new JCheckBox(); jCheckBoxMultiLine.setText("^ and $ match at embedded newlines"); jCheckBoxMultiLine.setFont(new Font("Dialog", Font.PLAIN, 12)); } return jCheckBoxMultiLine; } COM: <s> this method initializes j check box multi line </s>
funcom_train/10543164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1InsertBeforeTrigger() throws SQLException{ if (isDerby1482Fixed == false) return; basicSetup(); Statement s = createStatement(); s.execute("create trigger trigger1 no cascade before INSERT on table1 referencing " + "new as n_row for each row " + "select updates from table2 where table2.id = n_row.id"); commit(); runtest1InsertTriggerTest(); } COM: <s> this test creates a before insert trigger which selects </s>
funcom_train/10942001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evalPermissions(DispatchContext dctx, Map<String, ? extends Object> context) { // old permission checking if (this.containsPermissions()) { for (ModelPermGroup group: this.permissionGroups) { if (!group.evalPermissions(dctx, context)) { return false; } } return true; } else { return true; } } COM: <s> evaluates permissions for a service </s>
funcom_train/45750207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRelatedElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Relationship_relatedElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Relationship_relatedElement_feature", "_UI_Relationship_type"), OntoUMLPackage.Literals.RELATIONSHIP__RELATED_ELEMENT, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the related element feature </s>
funcom_train/17084407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|28-getter|0|28-preInit // write pre-init user code here exitCommand = new Command("Salir", "Salir del Juego", Command.EXIT, 0);//GEN-LINE:|28-getter|1|28-postInit // write post-init user code here }//GEN-BEGIN:|28-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/31890887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toElement(String elementName) { Element resultElement = DocumentHelper.createElement(elementName); Element nameElement = resultElement.addElement("name"); if (name!=null) nameElement.addText(name); Element addressElement = resultElement.addElement("email"); if (address!=null) addressElement.addText(address); return resultElement; } COM: <s> converts this email address to xml element of given name </s>
funcom_train/23299859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocInfo getDocInfoFromID(String requested) { for (int j=0; j<MAXDOCUMENTS-1; j++) { if (((DocInfo)index.get(j)).getDocID().equals(requested)){ DocInfo infoRequested = (DocInfo)index.get(j); return infoRequested; } } return null; } COM: <s> returns a doc info object containing all the information about </s>
funcom_train/10927665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RepositoryInfo getRepositoryInfo() { RepositoryInfo repositoryInfo = getBinding().getRepositoryService().getRepositoryInfo(getTestRepositoryId(), null); assertNotNull(repositoryInfo); assertNotNull(repositoryInfo.getId()); assertEquals(getTestRepositoryId(), repositoryInfo.getId()); return repositoryInfo; } COM: <s> returns the info object of the test repository </s>
funcom_train/9854379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAll() { if (!_multiple) throw new UiException("Appliable only to the multiple seltype: "+this); if (getChildren().size() != _selItems.size()) { for (Iterator it = getChildren().iterator(); it.hasNext();) { final Listitem item = (Listitem)it.next(); _selItems.add(item); item.setSelectedDirectly(true); } _jsel = getChildren().isEmpty() ? -1: 0; smartUpdate("selectAll", "true"); } } COM: <s> selects all items </s>
funcom_train/46766755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void setValue (int choice){ // // if (value.equalsIgnoreCase("")==false) this.value = value; //// MUST ALWAYS DO THIS! // // String u = d.updateDoc("selected_choice", String.valueOf(choice)); // if (u.equalsIgnoreCase("OK")==false){ // System.out.println("Error in Option::setValue: Option "+flag+" not found in doc"); // System.out.println(u); // } // } COM: <s> set the option value for choice type option only </s>
funcom_train/39467863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyBytes(@NotNull final InputStream in) throws IOException { @SuppressWarnings({"IOResourceOpenedButNotSafelyClosed"}) final InputStream lin = in instanceof BufferedInputStream ? in : new BufferedInputStream(in); final byte[] buf = new byte[numItems]; final int bytesRead = lin.read(buf, 0, numItems); System.out.write(buf, 0, bytesRead); } COM: <s> copies the first </s>
funcom_train/20273354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void markName(String name, int lineno, int charno) { if (currentMarker != null) { currentMarker.name = new JSDocInfo.StringPosition(); currentMarker.name.setItem(name); currentMarker.name.setPositionInformation(lineno, charno, lineno, charno + name.length()); } } COM: <s> adds a name declaration to the current marker </s>
funcom_train/212812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getIntValue() { try { int index = Integer.parseInt(indexValueForm.get(0)); standardOutput(formPanel.get(index)); } catch (FormInputPanelException ex) { errorOutput(ex.toString()); } catch (NumberFormatException ex) { errorOutput(ex.toString()); } } COM: <s> shows how to get the value based upon the index </s>
funcom_train/2881270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException, RemoteException { if (!isActive) { throw new RemoteException("RmiConnectorServer is not active"); } rmiConnectorServer.getMBeanServer().setAttribute(name, attribute); } COM: <s> sets the attribute attribute of the rmi connector proxy object </s>
funcom_train/44556890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void savePreferences(Properties prefs) { Point loc = getLocation(); prefs.put(ImageJ.IJ_X, Integer.toString(loc.x)); prefs.put(ImageJ.IJ_Y, Integer.toString(loc.y)); //prefs.put(IJ_WIDTH, Integer.toString(size.width)); //prefs.put(IJ_HEIGHT, Integer.toString(size.height)); } COM: <s> called once when image j quits </s>