__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34341122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getLevantaVentas() { if (LevantaVentas == null) {//GEN-END:|22-getter|0|22-preInit // write pre-init user code here LevantaVentas = new Command("Levartar Ventas", Command.OK, 0);//GEN-LINE:|22-getter|1|22-postInit // write post-init user code here }//GEN-BEGIN:|22-getter|2| return LevantaVentas; } COM: <s> returns an initiliazed instance of levanta ventas component </s>
funcom_train/16483077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Library scan(MediaLibraryPath srcPath, Library library) { File directory = new File(srcPath.getPath()); if (directory.isFile()) { mediaLibraryRoot = directory.getParentFile().getAbsolutePath(); } else { mediaLibraryRoot = directory.getAbsolutePath(); } mediaLibraryRootPathIndex = mediaLibraryRoot.length(); this.scanDirectory(srcPath, directory, library); return library; } COM: <s> scan the specified directory for movies files </s>
funcom_train/49421492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMessagesNonExistingKey() { assertNotNull("Not even the key was returned", Messages .getString("Non-Existing-key")); assertTrue("The key was not returned properly in non-existing key", "!Non-Existing-key!".equalsIgnoreCase(Messages .getString("Non-Existing-key"))); } COM: <s> tests for non existing key </s>
funcom_train/36930247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendProgramChange(CCProgramChange theProgramChange){ try{ sendEvent(theProgramChange); }catch (CCInvalidMidiDataException e){ if (theProgramChange.number() > 127 || theProgramChange.number() < 0){ throw new CCInvalidMidiDataException("You tried to send the program number " + theProgramChange.number() + ". With MIDI you only have the program numbers 0 - 127 available."); } } } COM: <s> with this method you can send program changes to your midi output </s>
funcom_train/43326782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void writeCASP(Printf outfile) throws IOException { int i; Residue tr; outfile.printf("PFRMAT SS\n"); outfile.printf("TARGET %s\n",name); outfile.printf("AUTHOR xxxx-xxxx-xxxx\n"); outfile.printf("METHOD see http://www.cmpharm.ucsf.edu/~jmc/pred2ary/\n"); outfile.printf("MODEL 1\n"); for (tr=firstRes(); tr!=null; tr=(Residue)tr.next) tr.writeCASP(outfile); outfile.printf("END\n"); } COM: <s> write in casp format </s>
funcom_train/7623687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMaximumSize() { SQLiteStatement prog = null; lock(); try { prog = new SQLiteStatement(this, "PRAGMA max_page_count;"); long pageCount = prog.simpleQueryForLong(); return pageCount * getPageSize(); } finally { if (prog != null) prog.close(); unlock(); } } COM: <s> returns the maximum size the database may grow to </s>
funcom_train/20781305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public MotionData readData(MotionData motionData) throws IOException{ try{ long oldPosition=position(); motionData.read(dataInputStream); getSupport().firePropertyChange("position",oldPosition,position()); return motionData; }catch(NullPointerException e){ throw new IOException(); } } COM: <s> reads and deserializes a motion data object from the input stream </s>
funcom_train/47104563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void turnPlayerAround() { Player plr = GameWorld.getInstance().getLocalPlayer(); if (plr.getFacing() == Facing.LEFT) plr.setFacing(Facing.RIGHT); else if (plr.getFacing() == Facing.DOWN) plr.setFacing(Facing.UP); else if (plr.getFacing() == Facing.RIGHT) plr.setFacing(Facing.LEFT); else if (plr.getFacing() == Facing.UP) plr.setFacing(Facing.DOWN); } COM: <s> turns the player around </s>
funcom_train/12590622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetGewaehlt(){ if(aktAktion==KonstantenProtokoll.EINHEITENKAUFEN){ meinSpielbrett.set_einheitenArrayDazuES(einheitenCache,this.getMeinSpielerByID().get_Spielernummer(),-1); this.resetEinheitenCache(); } else if(aktAktion==KonstantenProtokoll.GESCHENKWAEHLEN){ meinSpielbrett.set_einheitenArrayDazuES(einheitenCache,this.getMeinSpielerByID().get_Spielernummer(),-1); this.resetEinheitenCache(); } this.setChanged(); this.notifyObservers(Konstanten.NOMSG); } COM: <s> resets the choosen troops </s>
funcom_train/25595937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectionColor(Color c) { ModifiedTreeNode root = (ModifiedTreeNode) treeModel.getRoot(); this.nodeSelectionColor = c; Enumeration children = root.getBFTEnumeration(); while (children.hasMoreElements()) { ModifiedTreeNode child = (ModifiedTreeNode) children.nextElement(); (child.getNodeRenderer()).setSelectionColor(this.nodeSelectionColor); } } COM: <s> sets the given selection color to all the nodes of the tree </s>
funcom_train/2290377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeString() { if (CmsResource.COPY_AS_SIBLING == m_type) { return CmsConfigurationCopyResource.COPY_AS_SIBLING; } else if (CmsResource.COPY_PRESERVE_SIBLING == m_type) { return CmsConfigurationCopyResource.COPY_AS_PRESERVE; } return CmsConfigurationCopyResource.COPY_AS_NEW; } COM: <s> returns the copy type as string </s>
funcom_train/45638782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outputFinished(OutputPipeJob job, IOutputPipe pipe) { synchronized (listeners) { for (Iterator iter = listeners.iterator(); iter.hasNext();) { IOutputPipeListener l = (IOutputPipeListener) iter.next(); l.outputFinished(job, pipe); } } } COM: <s> method called by running output pipes </s>
funcom_train/37557127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawOval (int x, int y, int width, int height) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); // Check performance impact of always setting null brush. If the user has not // set the background color, we may not have to do this work? int nullBrush = OS.GetStockObject(OS.NULL_BRUSH); int oldBrush = OS.SelectObject(handle, nullBrush); OS.Ellipse(handle, x,y,x+width+1,y+height+1); OS.SelectObject(handle,oldBrush); } COM: <s> draws the outline of an oval using the foreground color </s>
funcom_train/7285046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JsonElement toJsonTree(Object src, Type typeOfSrc) { if (src == null) { return JsonNull.createJsonNull(); } JsonSerializationContextDefault context = new JsonSerializationContextDefault( createDefaultObjectNavigatorFactory(serializationStrategy), serializeNulls, serializers); return context.serialize(src, typeOfSrc, true); } COM: <s> this method serializes the specified object including those of generic types into its </s>
funcom_train/1666106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installUI(JComponent c) { super.installUI(c); scrollpane.getHorizontalScrollBar().putClientProperty(LiquidScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); scrollpane.getVerticalScrollBar().putClientProperty(LiquidScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); } COM: <s> installs some default values for the given scrollpane </s>
funcom_train/12768515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tag addChild(String childName) { Tag t = children.get(childName); // check if we already have this tag if (t == null) { t = new Tag(this, childName); children.put(childName, t); } t.setParent(this); Monitoring.getDefault().fireEvent(new TagSEATagEvent(TagSEATagEvent.Tagging.New, t)); return t; } COM: <s> adds a child to this tag </s>
funcom_train/20535168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBoton6() { if (boton6 == null) { boton6 = new JButton(); boton6.setBounds(new Rectangle(200, 300, 140, 30)); boton6.setText("Franjas"); boton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { control.pedirArchivo("franja"); } }); } return boton6; } COM: <s> this method initializes boton6 </s>
funcom_train/16141184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollToBottom(boolean force) { if (force || Boolean.parseBoolean(jEdit.getProperty(PolyMLPlugin.PROPS_SCROLL_ON_OUTPUT))) { SwingUtilities.invokeLater(new Runnable() { public void run() { Rectangle target = new Rectangle(0, panel.getBounds().height, 1, 100); panel.scrollRectToVisible(target); } }); } } COM: <s> scrolls the panel to the bottom hack </s>
funcom_train/28404322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidDefinition(TilesRequestContext context, String definitionName) { try { Definition definition = getDefinition(definitionName, context); return definition != null; } catch (NoSuchDefinitionException nsde) { return false; } catch (DefinitionsFactoryException e) { // TODO, is this the right thing to do? return false; } } COM: <s> checks if a string is a valid definition name </s>
funcom_train/9758342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void log(BadLocationException e) { String msg= e.getLocalizedMessage(); if (msg == null) msg= "unable to access the document"; //$NON-NLS-1$ TextEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, msg, e)); } COM: <s> logs the exception </s>
funcom_train/40219400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetDeviceTree() { int count = deviceModel.getChildCount(root); MutableTreeNode nodes[] = new MutableTreeNode[count]; for (int i = 0; i < count; i++) { nodes[i] = (MutableTreeNode) deviceModel.getChild(root, i); } for (MutableTreeNode node : nodes) { deviceModel.removeNodeFromParent(node); } } COM: <s> deletes the device tree </s>
funcom_train/9197600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Object obj) { // Call to nextIndex() will check concurrent. nextIndex(); // tmpcursor is the backing cursor of the next element // Remember that List.add(index,obj) is really an insert.... ContentList.this.add(tmpcursor, obj); forward = true; expected = ContentList.this.getModCount(); canremove = canset = false; index = nextIndex(); cursor = tmpcursor; fsize++; } COM: <s> inserts the specified element into the list </s>
funcom_train/34757632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stackedIndexPush(Map index, String key, String value) { Object stack = index.get(key); if (stack == null) { index.put(key, value); } else { LinkedList values = null; if (stack instanceof String) { values = new LinkedList(); values.addFirst(stack); index.put(key, values); } else { values = (LinkedList) stack; } values.addFirst(value); } } COM: <s> pushes code value code on to a stack stored in code index code </s>
funcom_train/1060338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void editProperties() { Transformation tranformation = (Transformation) selectedModuleLabel.getData(MODULE_ID_KEY); EditPropertiesDialog dialog = new EditPropertiesDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), tranformation.configElement, propertyMap); if (dialog.open() == Window.OK) if (dialog.getPropertyMap() != null) { propertyMap = dialog.getPropertyMap(); updateLaunchConfigurationDialog(); } } COM: <s> open a resource chooser to edit module properties </s>
funcom_train/1613016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStringComparison(StringComparisonOperator op, StringComparableOperand op1, StringComparableOperand op2){ //constraint = new StringComparison(op, op1, op2); //current = facade.createStringComparison(op, op1, op2); expressions[current] = facade.createStringComparison(op, op1, op2); } COM: <s> sets the string comparison </s>
funcom_train/17157683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPathAccessible() { QFile file = new QFile(this.ui.pathLineEdit.text()); if (file.exists()) { if (file.open(OpenModeFlag.ReadOnly)) { file.close(); return true; } } file.close(); return false; } COM: <s> checks if a file exists and can be open for read </s>
funcom_train/20270930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getOutputCharset() throws FlagUsageException { if (!config.charset.isEmpty()) { if (!Charset.isSupported(config.charset)) { throw new FlagUsageException(config.charset + " is not a valid charset name."); } return config.charset; } return "US-ASCII"; } COM: <s> query the flag for the output charset </s>
funcom_train/45918731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startReasonletPolling(ReasonletLoader rl) { try { logger.info("Starting Reasonlet Loader polling..."); rl.startPolling(); logger.info("Reasonlet Loader started."); } catch (LoaderException e) { throw new RuntimeException("Error while starting Reasonlet Loader."); } } COM: <s> starts the reasonlet loader polling </s>
funcom_train/24376406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getRegistryObjectsFromIds(List objs, List ids) { List ros = new ArrayList(); if ((ids.size() > 0) && (objs.size() > 0)) { Iterator iter = objs.iterator(); while (iter.hasNext()) { RegistryObjectType ro = (RegistryObjectType) iter.next(); if (ids.contains(ro.getId())) { ros.add(ro); } } } return ros; } COM: <s> filter out those registry objects whose id are in the list ids </s>
funcom_train/5379490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkVisibleRange(int includeIndex) { updator.checkVisibleRange(includeIndex); ConcurrentTableUpdator.Range newRange = updator.getVisibleRange(); ConcurrentTableUpdator.Range oldRange = range; // If we're in the middle of processing an invalid range, cancel the sort if (newRange.start != oldRange.start || newRange.length != oldRange.length) { sortMon.cancel(); } } COM: <s> checks if currently visible range has changed and triggers and update </s>
funcom_train/3393030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Shape s) { try { shapepipe.draw(this, s); } catch (InvalidPipeException e) { revalidateAll(); try { shapepipe.draw(this, s); } catch (InvalidPipeException e2) { // Still catching the exception; we are not yet ready to // validate the surfaceData correctly. Fail for now and // try again next time around. } } finally { surfaceData.markDirty(); } } COM: <s> strokes the outline of a path using the settings of the current </s>
funcom_train/42068185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextAsStringPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkDataListType_textAsString_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkDataListType_textAsString_feature", "_UI_ChunkDataListType_type"), WavPackage.Literals.CHUNK_DATA_LIST_TYPE__TEXT_AS_STRING, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the text as string feature </s>
funcom_train/44184614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleSeed(final CrawlURI curi, final String disposition) { if(getTrackSeeds()) { if(curi.isSeed()){ SeedRecord sr = processedSeedsRecords.getOrUse( curi.getURI(), new Supplier<SeedRecord>() { public SeedRecord get() { return new SeedRecord(curi, disposition); }}); sr.updateWith(curi,disposition); } } // else ignore } COM: <s> if the curi is a seed we update the processed seeds cache </s>
funcom_train/49770399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext(Pattern pattern) { ensureOpen(); if (pattern == null) throw new NullPointerException(); hasNextPattern = null; saveState(); while (true) { if (getCompleteTokenInBuffer(pattern) != null) { matchValid = true; cacheResult(pattern); return revertState(true); } if (needInput) readInput(); else return revertState(false); } } COM: <s> returns true if the next complete token matches the specified pattern </s>
funcom_train/41515266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyProgressStart(String message) { if (mActiveAlert != null) { waitForNoAlert(); mActiveAlert = null; } if (mActiveAlert == null) { mActiveAlert = mController.createProgressAlert(message); mProgressActive = true; mActiveAlert.setCommandListener(this); mAlertDisplayed = true; } } COM: <s> notify a long running process is beginning </s>
funcom_train/3391377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkNext() { if (next == null) { printText("doclet.Next_Package"); } else { String path = DirectoryManager.getRelativePath(packageDoc.name(), next.name()); printHyperLink(path + "package-summary.html", "", configuration.getText("doclet.Next_Package"), true); } } COM: <s> print next package link in the navigation bar </s>
funcom_train/33058924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkIn(Object obj) throws Exception { PooledObject pobj; if (obj != null) { int pos = getConnID(obj); if (pos == -1) throw new Exception("Trying to return an object that was never part of the pool"); pobj = pool[pos]; pobj.isFree(true); } else { logger.warn("Lost Connection"); } } COM: <s> checks an object back into the pool </s>
funcom_train/3830347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCoordinates() { Debug.debugMethodBegin( this, "getCoordinates" ); String s = null; NodeList nl = element.getChildNodes(); if ( ( nl != null ) && ( nl.getLength() > 0 ) ) { s = element.getFirstChild().getNodeValue(); } Debug.debugMethodEnd(); return s; } COM: <s> returns the coordinates in the lt coordinates gt tag </s>
funcom_train/48099681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object setProperty(String key, Object obj) throws Exception { String value = null; ByteArrayOutputStream bytestream = null; ObjectOutputStream objstream = null; try { bytestream = new ByteArrayOutputStream(); objstream = new ObjectOutputStream(bytestream); objstream.writeObject(obj); value = bytestream.toString(); } finally { if (objstream != null) objstream.close(); } return setProperty(key, value); } COM: <s> update a config property with a new serialised object value </s>
funcom_train/44223150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renew(){ File f = this.basePanel.get_canvas().getSVGFile(); String fileName = ""; if(f == null){ fileName = "N/A"; }else{ fileName = f.getAbsolutePath(); } this.setTitle("Diagrammar - " + fileName); this.enableAction(); this.basePanel.renew(); } COM: <s> this in an entry to manipulate this application </s>
funcom_train/21016117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCaretIndex(int pathPosition) { requireTrue(pathPosition >= 0, "@require (pathPosition >= 0)"); requireTrue(pathPosition <= getCaretPath().getLength(), "@require (pathPosition <= getCaretPath().getLength())"); int result = _caretIndex; if (pathPosition < _caretPath.getLength()) { result = _caretPath.getElementIndex(pathPosition); } return result; } COM: <s> returns the caret index inside the composite at the given path position </s>
funcom_train/2879771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLeaf(Object node) { if (node instanceof BrowseEntry) { //System.out.println("isLeaf():("+node+")"+"/"+((BrowseEntry)node).isLeaf()+"/"+((BrowseEntry)node).toStringAll()); return ((BrowseEntry)node).isLeaf(); } else { return false; } } COM: <s> gets the leaf attribute of the browse tree model object </s>
funcom_train/46321310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWeights( float[] newWeights ) { int numWeights = newWeights.length; if ( numWeights != weights.length ) { throw new IndexOutOfBoundsException( "Length of weights vector does not mach number of inputs to this node." ); } // Replace the old weights array with the new one. for ( int i = 0; i < numWeights; ++i ) weights[i] = newWeights[i]; } COM: <s> set the weights associated with all of the inputs to this neuron </s>
funcom_train/28471792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetText() { Review testReview = new Review(); String testText1 = "Ist total langweilig."; String testText2 = "Fakten, Fakten, Fakten"; testReview.setText(testText1); assertTrue(testText1.equals(testReview.getText())); testReview.setText(testText2); assertTrue(testText2.equals(testReview.getText())); } COM: <s> this should test the methods get text and set text of review </s>
funcom_train/18808448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zeroAll() { final int rows = getRowCount(); final int columns = getColumnsCount(); for (int row = 0; row < rows; row++) { for (int column = 0; column < columns; column++) { this.data[row][column] = 0.0; } } fireSeriesChanged(); } COM: <s> sets all matrix values to zero and sends a </s>
funcom_train/31237634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object checkObject(Object object) throws CloneNotSupportedException, ClassNotFoundException, NullPointerException { if (object == null) throw new NullPointerException("Null object"); if (!(object instanceof Paragraph) && !(object instanceof Table)) throw new ClassNotFoundException("Only Paragraph or Table allowed"); Object newObject = null; if (object instanceof Paragraph) { newObject = ((Paragraph)object).duplicate(); } else { newObject = ((Table)object).duplicate(); } return newObject; } COM: <s> check object must be paragraph or table </s>
funcom_train/13956728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected long cacheTime(NSArray eos, EOFetchSpecification fs) { if(fs.fetchesRawRows() || fs.refreshesRefetchedObjects()) { return 0; } for (Object object : eos) { if (!(object instanceof EOEnterpriseObject)) { return 0; } if (EOFaultHandler.isFault(object)) { return 0; } if (excludedEntities().containsObject(((EOEnterpriseObject)object).entityName())) { return 0; } } return 100L; } COM: <s> returns the time the result should stay in the cache </s>
funcom_train/16689478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getVerticalAlignment() { String align = (String)fElement.getAttributes().getAttribute(HTML.Attribute.ALIGN); if(align != null) { align = align.toLowerCase(); if(align.equals(TOP) || align.equals(TEXTTOP)) { return 0.0f; } else if(align.equals(RelativeImageView.CENTER) || align.equals(MIDDLE) || align.equals(ABSMIDDLE)) { return 0.5f; } } return 1.0f; // default alignment is bottom } COM: <s> method returns the images vertical alignment </s>
funcom_train/28751402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReportid(Long newVal) { if ((newVal != null && this.reportid != null && (newVal.compareTo(this.reportid) == 0)) || (newVal == null && this.reportid == null && reportid_is_initialized)) { return; } this.reportid = newVal; reportid_is_modified = true; reportid_is_initialized = true; } COM: <s> setter method for reportid </s>
funcom_train/47163916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createSoftwareDocumentation() throws Exception { checkDocumentationContextAvailable(); log.debug("creating software documentation."); //documentationContext.getAttributes().getMap().put(SoftwareDocumentationUtils.DOCUMENTATION_PARAMETER, documentationTypeNodes); //documentationTypeNodes.put(DocumentationResourecesId.DOCUMENTATION_TECHNICAL, new HashMap<Object, BoostedNode>()); documentationRoot = SoftwareDocumentationUtils.createSoftwareDocumentation(initialDocumentationCreator, documentationContext, closeRootAfterCreation); } COM: <s> starts the documentation </s>
funcom_train/8232601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem7() { if (stringItem7 == null) {//GEN-END:|118-getter|0|118-preInit // write pre-init user code here stringItem7 = new StringItem("Biblioteca P\u00FAblica Francisco Jos\u00E9 de Caldas", "");//GEN-LINE:|118-getter|1|118-postInit // write post-init user code here }//GEN-BEGIN:|118-getter|2| return stringItem7; } COM: <s> returns an initiliazed instance of string item7 component </s>
funcom_train/7842732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemove() throws Exception { TermTypeIterator instance = new TermTypeIterator("http://alcme.oclc.org/srw/search/GSAFD", "z3919.mappedTerms", "exact", ""); try { instance.remove(); fail("Should have thrown an UnsupportedOperationException"); } catch(UnsupportedOperationException e) { } } COM: <s> test of remove method of class org </s>
funcom_train/21105298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPCustRepReport() { if (pCustRepReport == null) { pCustRepReport = new JPanel(); pCustRepReport.setLayout(new BorderLayout()); pCustRepReport.add(getJScrollPane3(), java.awt.BorderLayout.CENTER); } return pCustRepReport; } COM: <s> this method initializes p cust rep report </s>
funcom_train/22233597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int index, Object value) { if (value == null) { throw new NullPointerException(); } if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_VALUE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ShaderAttributeObject1")); if (isLive()) ((ShaderAttributeArrayRetained)this.retained).setValue(index, value); else { ((ShaderAttributeArrayRetained)this.retained).initValue(index, value); } } COM: <s> sets the specified array element of the value of this shader </s>
funcom_train/17079697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if(logger.isDebugEnabled()){ logger.debug("Closing and disposing view: "+getId()); } try{ dispose(); }catch (Exception e) { String msg="Error en el metodo dispose de la vista {0} msg: {1}"; logger.error(MessageFormat.format(msg, getId(),e.getMessage())); e.printStackTrace(); } } COM: <s> template method for subclases to do clean up work </s>
funcom_train/46932107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getSPforLevel( int level ) { Real twoPointFive = new Real("2.5"); Real pwr = new Real( twoPointFive ); pwr.mul( level ); pwr.sub(twoPointFive); Real value = new Real(2); value.pow(pwr); value.mul(250); value.mul(rank); value.ceil(); return value.toInteger(); } COM: <s> the number of points required for the lvl req of this skill </s>
funcom_train/22086739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedOutputStream getOutputStream() { PipedInputStream in = new PipedInputStream(); PipedOutputStream out = null; try { out = new PipedOutputStream(in); } catch (Exception e) { Logger.error(e); } setContentStream(in); return new BufferedOutputStream(out); } COM: <s> creates a new response stream and returns an output stream which </s>
funcom_train/31346072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User validateUser(String username, String password) { if (engine == null) return null; try { User check = engine.loadUser(username); if (check.validatePassword(password)) { System.out.println("[CMS] Password was accepted."); return check; } System.out.println("[CMS] Password was rejected."); } catch (DatabaseException de) { // whoops System.out.println("[CMS] Database Exception (" + de.getMessage() + ") validating user."); return null; } return null; } COM: <s> validates the username password pair returning the user if the username </s>
funcom_train/43376252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getJJMenuBar() { if (jJMenuBar == null) { jJMenuBar = new JMenuBar(); jJMenuBar.setPreferredSize(new java.awt.Dimension(0,30)); jJMenuBar.add(getJMenu()); jJMenuBar.add(getStatistics()); jJMenuBar.add(getConfiguration()); jJMenuBar.add(getHelp()); } return jJMenuBar; } COM: <s> this method initializes j jmenu bar </s>
funcom_train/41163426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoScoreExercises2 entity) { EntityManagerHelper.log("saving CoScoreExercises2 instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co score exercises2 entity </s>
funcom_train/2480661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if (running == true) { running = false; Enumeration en_sensors = sensors.elements(); Sensor sensor; while (en_sensors.hasMoreElements()) { sensor = (Sensor) en_sensors.nextElement(); sensor.onStop(); } sensors = new Hashtable(); num_sensors = 0; next_ID_Sensor = 0; } } COM: <s> this method stop the frame and all the sensors inserted into it </s>
funcom_train/50817641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { setLayout(new GridLayout(1, 1)); this.fontList = createFontList(); JComponent displayPanel = createDisplayPanel(); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, this.fontList, displayPanel); System.out.println("Created font panel split pane " + splitPane); add(splitPane); } COM: <s> initialize the gui </s>
funcom_train/889074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { if (params == null) params = new Object[1]; params[0] = ae; try { methodToCall.invoke(target, params); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { System.err.println("Error invoking:" + methodToCall); e.printStackTrace(); } } COM: <s> reroutes it to a method </s>
funcom_train/22654920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentLogEventModel(LogEventModel logEventModel, long pageNumber, long selectedEventIndex) { if(!logEventModel.equals(rootLogEventModel)){ logEventModel.setPreviousLogEventModel(this.currentLogEventModel); } logEventModel.clearSearchResults(); this.currentLogEventModel = logEventModel; setSelectedEvent(pageNumber, selectedEventIndex); } COM: <s> sets the specified log event model as the current model </s>
funcom_train/13524377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLayoutComponent(Component comp, Object constraints) { if (constraints instanceof PXElasticConstraints) { setConstraints(comp, (PXElasticConstraints) constraints); } else if (constraints != null) { final String errMsg = "cannot add to layout: constraint must be a PXElasticConstraints object"; throw new IllegalArgumentException(errMsg); } } COM: <s> adds the specified component to the layout using the specified constraints </s>
funcom_train/42451599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConfigSection getSection(String name) { int index = name.indexOf('.'); if (index < 0) { return getLocalSection(name); } String localName = name.substring(0, index); String subName = name.substring(index + 1); ConfigSection sec = getLocalSection(localName); return sec == null ? null : sec.getSection(subName); } COM: <s> returns subsection with the specified name </s>
funcom_train/3112061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadGUI() { if (!initialized) { getContentPane().setLayout(new BorderLayout()); getContentPane().add(constructComponents(), BorderLayout.CENTER); JPanel panel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); panel.add(buttonRow); getContentPane().add(panel, BorderLayout.SOUTH); initialized = true; propertyChange(); } } COM: <s> loads the gui and sets u the components to their initial states </s>
funcom_train/46336430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCommentLines() { System.out.println("setCommentLines"); List<String> commentLines = new ArrayList<String>(); PlsqlCall instance = new PlsqlCall(); instance.setCommentLines(commentLines); assertSame(commentLines, instance.getCommentLines()); } COM: <s> test of set comment lines method of class plsql call </s>
funcom_train/7275512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void switchDHTMode(final DHTMode from, final DHTMode to) { Runnable init = new Runnable() { public void run() { if (to != DHTMode.INACTIVE) { dhtManager.get().start(to); } else { dhtManager.get().stop(); } DHTSettings.DHT_MODE.setValue(to.toString()); } }; unlimitedExecutor.execute(init); } COM: <s> switches the mode of the dht </s>
funcom_train/21941830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field86 getField86() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("86"); if (t == null) { log.fine("field 86 not found"); return null; } else { return new Field86(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 86 </s>
funcom_train/11792411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void getFiles(AAType aaType) throws Exception { logger.debug("getFiles started"); int transportType = checkTransportType(aaType.getTransportType()); if (transportType == ServiceProperties.TRANSPORT_TYPE_DISCRETE) { getDescreteFiles(aaType); } else if (transportType == ServiceProperties.TRANSPORT_TYPE_BUNDLED_ZIP) { getBundledZipFile(aaType.getBundle()); } logger.debug("getFiles finished"); } COM: <s> gets the files belonging to the aa and stores them in the temporary </s>
funcom_train/8337757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void maybeWatermark(Graphics g, Rectangle size) { if (session == null) { throw new IllegalStateException("Session is null. Please call constructor with session as parameter."); } if (session.isEnterpriseServerSession()) { try { boolean licensed = ServerInfoProvider.isServerLicensed( ((WabitSwingSessionImpl)session).getEnterpriseServerInfos()); if (!licensed) { this.watermark(g, size); } } catch (Exception e) { logger.warn(e); } } } COM: <s> will verify if the server is licensed before watermarking </s>
funcom_train/8077626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRawResultOutput() { StringBuffer result = new StringBuffer(); if (m_Clusterer == null) { return "<null> clusterer"; } result.append(toString()); result.append("Clusterer model: \n"+m_Clusterer.toString()+'\n'); // append the performance statistics if (m_result != null) { result.append(m_result); } return result.toString(); } COM: <s> gets the raw output from the clusterer </s>
funcom_train/5306603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Date nextStandardDate(Date date, DateTickUnit unit) { Date previous = previousStandardDate(date, unit); Calendar calendar = Calendar.getInstance(this.timeZone); calendar.setTime(previous); calendar.add(unit.getCalendarField(), unit.getCount()); return calendar.getTime(); } COM: <s> returns the first standard date based on the specified field and </s>
funcom_train/3702923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSessionExpired() { Condition cond = getConditionByName(COND_SESSION); //// 1. If could not find, assume it has expired. if (cond == null) { return (true); } //// 2. Check the condition. return (cond.evaluate() == false); } // of method COM: <s> check if this session configuration has expired </s>
funcom_train/39301101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPcGetInterfaceOrClass() { SurrogateManager mm = SurrogateManager.getInstance(); mm.reset(); mm.addMock(new MockInterfaceToMock()); InterfaceToMock it = (InterfaceToMock) new TestClass01().getInterfaceToMock(); assertEquals("MOCK", it.getSomething("test")); } COM: <s> test basic aspect j pointcut pc get interface or class interaction </s>
funcom_train/11020938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyBasicAttributeContext(BasicAttributeContext context) { Attribute parentTemplateAttribute = context.getTemplateAttribute(); if (parentTemplateAttribute != null) { this.templateAttribute = new Attribute(parentTemplateAttribute); } preparer = context.preparer; if (context.attributes != null && !context.attributes.isEmpty()) { attributes = deepCopyAttributeMap(context.attributes); } copyCascadedAttributes(context); } COM: <s> copies a basic attribute context in an easier way </s>
funcom_train/31701984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderDelayedDrawable(ICanvas canvas, IDrawable draw) { // Get the user space (normal or unified). final Rectangle2D.Double rectU = getSpaceU(); // Normal delayed drawables are just painted onto the // same canvas as already existing items. draw.draw(canvas, rectD, rectU, trans); } COM: <s> renders one delayed drawable in full </s>
funcom_train/8231993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand8() { if (okCommand8 == null) {//GEN-END:|95-getter|0|95-preInit // write pre-init user code here okCommand8 = new Command("Buscar", Command.OK, 0);//GEN-LINE:|95-getter|1|95-postInit // write post-init user code here }//GEN-BEGIN:|95-getter|2| return okCommand8; } COM: <s> returns an initiliazed instance of ok command8 component </s>
funcom_train/34562965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Item item(final QueryContext ctx) throws QueryException { if(item == null) { if(expr == null) Err.or(VAREMPTY, this); final Item it = ctx.item; ctx.item = null; item = cast(ctx.iter(expr).finish(), ctx); ctx.item = it; } return item; } COM: <s> evaluates the variable and returns the resulting item </s>
funcom_train/13596982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImportWordListPanel getWordPanel() { if (importWordlistPanel == null) { importWordlistPanel = new ImportWordListPanel(true); importWordlistPanel.setName("Words"); // Generated //added this listener so that we can upadte the grapheme panel with the new graphemes importWordlistPanel.addPropertyChangeListener("graphemeAdded2",getGraphemePanel()); } return importWordlistPanel; } COM: <s> this method initializes grapheme panel </s>
funcom_train/7971133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cert loadCert(String nodeid) throws AuditoriumCryptoException { if (! _certCache.containsKey(nodeid)) { try { _certCache.put(nodeid, new Cert( load( nodeid + ".cert" ) )); } catch (Exception e) { throw new AuditoriumCryptoException( "loadCert(\"" + nodeid + "\")", e ); } } return _certCache.get(nodeid); } COM: <s> load the published certificate from a file in the keys directory </s>
funcom_train/25503540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInputs(InputMap inputMap, Decoder decoder) throws IOException { assert inputMap != null; assert decoder != null; final DecodeCache decodeCache = this.input.scanner().decodeCache(); final DecodeResult decodeResult = decodeCache .decode(this.input, this.start, decoder, this.input.name() + "[*]"); updateEndPosition(decodeResult.extent()); addInputs(decodeResult.input(), inputMap); } COM: <s> add multiple child nodes of type code input code to this node </s>
funcom_train/14034511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItemMapping(int itemId, int parentId) throws SQLException { ContentType parentIdType; try { parentIdType = DAOFactory.getHelperDAO().getContentTypeById( parentId); if (parentIdType != null) { idao.addItemMapping(itemId, parentId, parentIdType, null); } } catch (NoAvailableDAOException e) { Logger.fatal("Couldn't get a helper DAO", e); } } COM: <s> add an item mapping </s>
funcom_train/50714399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void multiplicativeExpr() throws ParserException { unaryExpr(); while (ct.getType() == TokenType.STAR || ct.getType() == TokenType.SLASH || ct.getType() == TokenType.MOD) { // keep reference to which operation it is TokenType multOp = ct.getType(); ct = nextToken(); unaryExpr(); // perform operation performInfixOp(multOp); } } COM: <s> mult expr unary expr mult op unary expr </s>
funcom_train/47871979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() throws PhoneCallException { Validate .throwing(PhoneCallException.class) .that(!line.isBusy(), "The line %s is busy", line) .that(destination.isReachable(), "The destination %s is unreachable", destination) .that(log != null, "The log has not being set"); // implementation of connect Assert.that(line.isBusy(), "The line %s should be busy", line); } COM: <s> starts the call </s>
funcom_train/25248615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getYesterday() { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Calendar currDate = Calendar.getInstance(); currDate.add(Calendar.DATE, -1); //go back 1 days currDate.getTime(); return dateFormat.format(currDate.getTime()); } COM: <s> calculates and returns the string format of yesterday date </s>
funcom_train/10933252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFolderEmpty(File folder) { if (!folder.isDirectory()) { return true; } String[] fileNames = folder.list(); if ((fileNames == null) || (fileNames.length == 0)) { return true; } if ((fileNames.length == 1) && (fileNames[0].equals(SHADOW_FOLDER))) { return true; } return false; } COM: <s> checks if a folder is empty </s>
funcom_train/3373117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importStyleSheet(URL url) { try { InputStream is; is = url.openStream(); Reader r = new BufferedReader(new InputStreamReader(is)); CssParser parser = new CssParser(); parser.parse(url, r, false, true); r.close(); is.close(); } catch (Throwable e) { // on error we simply have no styles... the html // will look mighty wrong but still function. } } COM: <s> imports a style sheet from code url code </s>
funcom_train/51107817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataNode newDataNode(String name) throws Exception { AccessStackAdapter adapter = getAccessStackAdapter(Class.forName(connectionInfo .getAdapterClassName())); DataNode node = new DataNode(name); node.setDataSource(dataSource); node.setAdapter(adapter.getAdapter()); return node; } COM: <s> creates new data node </s>
funcom_train/33635875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getRecentToTextFieldRss() { if (recentToTextFieldRss == null) { recentToTextFieldRss = new JTextField(); recentToTextFieldRss.setBounds(new Rectangle(145, 149, 52, 23)); } return recentToTextFieldRss; } COM: <s> this method initializes recent to text field rss </s>
funcom_train/31663247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCAMPVariable getVariable(String symbol) { if (isNTupleBlock()) return ntuple.getVariable(symbol); else { symbol = symbol.toUpperCase(); for (int i = 0; i < vars.length; i++) { if (symbol.equals(vars[i].getSymbol())) return vars[i]; } return null; } } COM: <s> gets the variable for symbol symbol </s>
funcom_train/39534605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeVisualResource(SVGHandle handle, Element resourceNode){ if(handle!=null && resourceNode!=null){ Element parentNode=(Element)resourceNode.getParentNode(); if(parentNode!=null){ //removing the node from its parent parentNode.removeChild(resourceNode); } } } COM: <s> removes the given resource node </s>
funcom_train/38512891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int removeGhostRelations() { int n = 0; for (Iterator it = mProjects.iterator(); it.hasNext();) { ProjectItem item = (ProjectItem) it.next(); int tmp = item.removeGhostRelations(); if (tmp > 0) { fireProjectChanged(item); n += tmp; } } return n; } COM: <s> change all existing ghost relations to real relations </s>
funcom_train/46943373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelContainer() { if (jPanelContainer == null) { jPanelContainer = new JPanel(); jPanelContainer.setLayout(new BoxLayout(getJPanelContainer(), BoxLayout.X_AXIS)); jPanelContainer.add(getJScrollPane11(), null); jPanelContainer.add(getJPanelAudioLanguage(), null); } return jPanelContainer; } COM: <s> this method initializes j panel container </s>
funcom_train/39558869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFillXincoCoreNodes() { try { XincoCoreNodeServer instance = new XincoCoreNodeServer(1); assertTrue((instance.getXincoCoreNodes()).size() > 0); } catch (Exception e) { Logger.getLogger(XincoCoreNodeServerTest.class.getSimpleName()).log(Level.SEVERE, null, e); fail(); } } COM: <s> test of fill xinco core nodes method of class xinco core node server </s>
funcom_train/1382361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnPartenze() { if (btnPartenze == null) { btnPartenze = new JButton(); btnPartenze.setText("Partenze"); btnPartenze.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { visualizzaPartenze(); // TODO Auto-generated Event stub // actionPerformed() } }); } return btnPartenze; } COM: <s> this method initializes btn partenze </s>
funcom_train/3598116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddDoubleAttribute() { try { String atname="ATNAME"; double atval=10.56; String atname2="ATNAME2"; word.setDoubleAttribute(atname, new Double(atval)); assertEquals(((Double)word.getAttributeComparableValue(atname)).doubleValue(), atval); NOMAttribute nat = new NOMWriteAttribute(atname2, new Double(atval)); word.addAttribute(nat); List atts = word.getAttributes(); assertTrue(atts.size()==2); NOMAttribute nna = word.getAttribute(atname2); assertEquals(nna,nat); } catch (NOMException nex) { nex.printStackTrace(); fail("Exception raised when setting / getting attribute value"); } } COM: <s> testing some attribute addition and retrieval </s>
funcom_train/2763110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nullSafeSet(String table, String columnName, PreparedStatement ps, Object value, int index) throws SQLException { int sqlType = getTable(table, true).getColumn(columnName, true).getSQLType(); nullSafeSet(sqlType, ps, value, index); } COM: <s> deals with setting values on a prepared statement </s>
funcom_train/20775327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EventCostFunction getSpatialEventCostFunction() { if (Parameters.getInstance().hasKey(Parameters.PREDICTOR_ACCELERATION_TYPE) && Parameters.getInstance().get(Parameters.PREDICTOR_ACCELERATION_TYPE).equals("none")) { return new BoundaryEventCostFunction(); } return new PredictedBoundaryEventCostFunction(); } COM: <s> generates the cost function for the spatial evaluation </s>