__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46582458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getDatabaseType() { String type = getDatabaseName(); for (int i = 0; i < dbTypes.length; i++) { if (type.toLowerCase().indexOf(dbTypes[i].toLowerCase()) > -1) { if (dbTypes[i].equals(SYBASE2)) return SYBASE; return dbTypes[i]; } } return DEFAULT; } COM: <s> returns the dbtype for the database being used </s>
funcom_train/9057234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void intro() { //windows 82 wide "|23456789012345678901234567890123456789012345678901234567890123456789012345678901|" //ubuntu 80 wide "|234567890123456789012345678901234567890123456789012345678901234567890123456789|" System.out.println(""); System.out.println("+-------------------------------------------+"); System.out.println("|Velkommen til 'Laeg en Studieplan' |"); System.out.println("| |"); System.out.println("|Programmet kender foelgende kommandoer: |"); System.out.println("|hjaelp tilfoej fjern udskrivbase |"); System.out.println("|visplan gem hent soeg viskursus afslut|"); System.out.println("+-------------------------------------------+"); } COM: <s> prints the welcome text when the program starts </s>
funcom_train/2311517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportDebugLog(String message) { synchronized(debugMon){ if(writeDebug == null){ //well, we are finished, nothing to report return; } try{ //writeDebug.write(TimeAndDate.getTime()); writeDebug.write(message); //if (config.getReportToConsole()) synchronized (System.out) { // System.out.print(message); //} }catch (IOException e){ reportErrorLog("localhost", "IO Exception while reporting to the Debug log."); } } } COM: <s> reports if anything at debug level has happened to the debug log file </s>
funcom_train/26383712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean findString(String query, boolean ignoreCase) { // Find the currently active source view, if any. SourceView view = (SourceView) getSelectedView(); if (view != null) { return view.findString(query, ignoreCase); } return false; } // findString COM: <s> search for the given string in the currently selected source view </s>
funcom_train/32831143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDifference_notEqualsDifferentValues() { Difference result = reflectionComparator.getDifference(mapA, mapDifferentValue); Difference difference = getInnerDifference("string", getInnerDifference("\"key 2\"", result)); assertEquals("test 2", difference.getLeftValue()); assertEquals("XXXXXX", difference.getRightValue()); } COM: <s> test for two maps that contain different values </s>
funcom_train/3160893
/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(GtlgrammarEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(GtlgrammarEditorPlugin.INSTANCE.getImage("full/wizban/NewGrammar"))); } COM: <s> this just records the information </s>
funcom_train/3168844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PtrArray subOrders() { return (PtrArray) mySubOrders.copy(); /* udanax-top.st:30639:CrossOrderSpec methodsFor: 'accessing'! {PtrArray CLIENT of: OrderSpec} subOrders "The sub OrderSpec used for each axis in the space. Note that this is *not* in lex order, but rather indexed by axis number." ^mySubOrders copy cast: PtrArray! */ } COM: <s> the sub order spec used for each axis in the space </s>
funcom_train/19421824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OptionListSource getSimpleOptionListSource(String source) { EaasyStreet.logTrace("[In] ConfigurationFactoryBase(" + className + ").getSimpleOptionListSource()"); OptionListSource optSource = new DynaOptionListSource(source); EaasyStreet.logTrace("[Out] ConfigurationFactoryBase(" + className + ").getSimpleOptionListSource()"); return optSource; } COM: <s> creates and returns and option list source based on the passed parameters </s>
funcom_train/22549061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDownload(AbstractDownloader md) { md.initialize(this, fileManager, callback(md)); waiting.add(md); callback(md).addDownload(md); RouterService.schedule(new Runnable() { public void run() { writeSnapshot(); // Save state for crash recovery. } },0,0); } COM: <s> performs common tasks for initializing the download </s>
funcom_train/6282791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rename(TreePath currentPath) { if(currentPath == null) { currentPath = tree.getSelectionModel().getSelectionPath(); if(currentPath == null) return; } DefaultMutableTreeNode node = ((DefaultMutableTreeNode)currentPath.getPathComponent(currentPath.getPathCount()-1)); if(((File)node.getUserObject()).exists()) { tree.setEditable(true); } } COM: <s> method rename renames a directory </s>
funcom_train/10925053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long getBytesInflated() { long inB = inf.getBytesRead(); if (current.bytesReadFromStream >= TWO_EXP_32) { while (inB + TWO_EXP_32 <= current.bytesReadFromStream) { inB += TWO_EXP_32; } } return inB; } COM: <s> get the number of bytes inflater has actually processed </s>
funcom_train/43474638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store (DHTMessage msg) { String key = msg.getKey(); if (data.containsKey(key)) { Vector members = (Vector) data.get(key); members.add(msg.getValue()); } else { Vector members = new Vector(); members.add(msg.getValue()); data.put(key, members); } System.out.println("\n\tINFO: '" + msg.getValue() + "' Stored At '" + this.id + "'\n"); } COM: <s> this method stores key value pair on the distributed repository of dht application </s>
funcom_train/23937427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void putViews() { if (views != null && views.size() > 0) { PDFArray viewRefs = new PDFArray(); for (Iterator it = views.iterator(); it.hasNext();) { PDF3DView view = (PDF3DView) it.next(); viewRefs.add(view.makeReference()); } put("VA", viewRefs); } } COM: <s> sets the available 3 d views in this 3 d stream </s>
funcom_train/25582805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateValusBox(String key){ valueBox.removeAllItems(); HashSet<HashSet<ReasonerProperty>> conditions = selectedFunctionCondition.getConditions(); for(HashSet<ReasonerProperty> cons: conditions){ String k = cons.iterator().next().getKey(); if(key.equals(k)){ for(ReasonerProperty prop: cons){ String value = prop.getValue(); valueBox.addItem(value); } } } valueBox.updateUI(); valueBox.invalidate(); valueBox.validate(); } COM: <s> update the propery values according to the selected property </s>
funcom_train/17458798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subscribe() throws ClientStatusException,ServerStatusException{ amfConnection.connect(getUrl()); AcknowledgeMessageExt m=(AcknowledgeMessageExt)call(buildPrepare()); DSId=(String)m.getHeader(CommandMessage.FLEX_CLIENT_ID_HEADER); getCallBack().onAcknowledgeMessageExt(m); m=(AcknowledgeMessageExt)call(buildSubscribe()); getCallBack().onAcknowledgeMessageExt(m); pollingThread=new Thread(this); pollingThread.start(); } COM: <s> begin subscribe by starting the polling thread </s>
funcom_train/22260616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection(IWorkingSet workingSet) { if (workingSet == null) { throw new IllegalArgumentException("Working set must not be null"); } this.workingSet = workingSet; if (getShell() != null && text != null) { firstCheck = true; initializeCheckedState(); text.setText(workingSet.getName()); } } COM: <s> implements iworking set page </s>
funcom_train/4136046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addXPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BoundingBox_x_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BoundingBox_x_feature", "_UI_BoundingBox_type"), UtilsPackage.Literals.BOUNDING_BOX__X, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the x feature </s>
funcom_train/8324049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadLevel(final JdbcSchema.Table.Column.Usage usage) { String name = usage.getSymbolicName(); MondrianDef.Expression expression = new MondrianDef.Column(getName(), usage.levelColumnName); int bitPosition = usage.rColumn.getBitPosition(); Level level = new Level( name, expression, bitPosition, usage.rColumn); addLevel(level); } COM: <s> given a usage of type level create a level column </s>
funcom_train/16513767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { IListWithParent connectionCategory = (IListWithParent) firstSelectedObject; IScenario scenario = connectionCategory.getScenario(); IConnectionCategory newConnection = ScenarioFactory .createConnectionCategory(scenario); newConnection.setName(findDistinctiveConnectionName(scenario)); ExecuteAddition.addConnectionCategory(newConnection); } COM: <s> this method adds a new connection to scenario </s>
funcom_train/43097986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeContext(Object handle, Object context) { if (handle instanceof MSignal && context instanceof MBehavioralFeature) { ((MSignal) handle).removeContext((MBehavioralFeature) context); return; } throw new IllegalArgumentException("handle: " + handle + " or context: " + context); } COM: <s> remove the given context behavioral feature from a signal </s>
funcom_train/36240099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getJTextArea() { if (jTextArea == null) { jTextArea = new JTextArea(); jTextArea.setBounds(new Rectangle(19, 55, 303, 182)); jTextArea.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED)); } return jTextArea; } COM: <s> this method initializes j text area </s>
funcom_train/50864530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEnvironmentalComplaint(Complaint complaint) { boolean result = false; if (complaint == suffocation) result = true; if (complaint == dehydration) result = true; if (complaint == starvation) result = true; if (complaint == decompression) result = true; if (complaint == freezing) result = true; if (complaint == heatStroke) result = true; return result; } COM: <s> checks if a health complaint is an environmental complaint </s>
funcom_train/26510628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWrapMode(int wrapMode) { if (wrapMode == NO_WRAP) { constrainWidthToTextWidth = false; constrainHeightToTextHeight = false; } else if (wrapMode == WRAP) { constrainWidthToTextWidth = true; constrainHeightToTextHeight = true; } else if (wrapMode == WRAP_CLIP){ constrainWidthToTextWidth = false; constrainHeightToTextHeight = true; } recomputeLayout(); } COM: <s> determines how bounds get set and how text wraps within bounds </s>
funcom_train/11374911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canStartBackupNode(Configuration conf) throws IOException { BackupNode bn = null; try { bn = startBackupNode(conf); } catch(IOException e) { if (e instanceof java.net.BindException) return false; throw e; } finally { if(bn != null) bn.stop(); } return true; } COM: <s> check whether the backup node can be started </s>
funcom_train/13298073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addComposedOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Issue_composedOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Issue_composedOf_feature", "_UI_Issue_type"), NegotiationPackage.Literals.ISSUE__COMPOSED_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the composed of feature </s>
funcom_train/12307717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initScorerQueue() throws IOException { Iterator si = subScorers.iterator(); scorerQueue = new ScorerQueue(nrScorers); while (si.hasNext()) { Scorer se = (Scorer) si.next(); if (se.next()) { // doc() method will be used in scorerQueue. scorerQueue.insert(se); } } } COM: <s> called the first time next or skip to is called to </s>
funcom_train/34284019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fromSoapObject(SoapObject item) { PropertyInfo mpi = new PropertyInfo(); try { for (int p = 0; p < item.getPropertyCount(); p++) { item.getPropertyInfo(p, null, mpi); try { setValue(mpi.name, item.getProperty(p)); } catch (Exception e){ } } } catch (Exception illegal_el) { return false; } return true; } COM: <s> k soap helper function set values from the soap </s>
funcom_train/28308578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean processSpecific(Container container) throws Exception { Object attributeValue = container.getAttribute(attributeName); String message = ((attributeValue == null) ? " Attribute " + attributeName + " not present" : "Removed attribute " + attributeName); container.removeAttribute(attributeName); addLogEntry(container, message, ContainerStatus.OK); return true; } COM: <s> removes the configured attribute from the container </s>
funcom_train/31947752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStartPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESession_start_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESession_start_feature", "_UI_ESession_type"), SailuserdataPackage.Literals.ESESSION__START, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the start feature </s>
funcom_train/22166975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerInstruction(Instruction instruction) { instructionSet.put(instruction.getOpcode(), instruction); String[] opcodeNames = instruction.getOpcodeNames(); for (int i = 0; i < opcodeNames.length; i++) { interpreterMap.put(opcodeNames[i], instruction); } logger.debug("Instruction with opcode " + instruction.getOpcode() + " registered (named " + instruction.getOpcodeNames()[0] + ")"); } COM: <s> registers the instruction </s>
funcom_train/20497746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkGeoCacheProximity(GeoPoint pos) { if (mIsGeoCaching) { for (GPSPoint cached : mGeocache) { GeoPoint pnt = cached.getGeoPoint(); if (Math.abs(pos.getLatitude() - pnt.getLatitude()) < MIN_DISTANCE && Math.abs(pos.getLongitude() - pnt.getLongitude()) < MIN_DISTANCE) { notifyObservers(cached); break; } } } } COM: <s> checks the position against the list of geocached locations </s>
funcom_train/28670149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJGameCommandButton() { if (this.jGameCommandButton == null) { this.jGameCommandButton = new JButton(); fillTabButton(this.jGameCommandButton, "Game<br>Command", getJGamePanel().getName()); } return this.jGameCommandButton; } COM: <s> this method initializes j button </s>
funcom_train/45623353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExcludedPermissionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateTrustInfoType_excludedPermissions_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateTrustInfoType_excludedPermissions_feature", "_UI_GenerateTrustInfoType_type"), MSBPackage.eINSTANCE.getGenerateTrustInfoType_ExcludedPermissions(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the excluded permissions feature </s>
funcom_train/22572711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyToStatusLine(IStatus status) { String message = status.getMessage(); switch (status.getSeverity()) { case IStatus.OK: setErrorMessage(null); setMessage(null); break; case IStatus.WARNING: setMessage(message, IMessageProvider.WARNING); setErrorMessage(null); break; case IStatus.INFO: setMessage(message, IMessageProvider.INFORMATION); setErrorMessage(null); break; default: if (message.length() == 0) { message = null; } setMessage(null); setErrorMessage(message); break; } } COM: <s> applies the status to the status line of a dialog page </s>
funcom_train/42186369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createWarningBox(ElementalList list, boolean blocking) { int width = 400; int height = 200; createWarningBox(list, new Vector2D((view.getWidth() - width) / 2, (view.getHeight() - height) / 2), new Vector2D(400, 200), blocking); } COM: <s> shows a warning to the player </s>
funcom_train/48072988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String asString(String propPath) throws IllegalArgumentException { IPropertyBinding prop = getPropertyBinding(propPath); if(prop == null) return null; if(prop instanceof ISelfFormattingPropertyValue == false) { throw new IllegalArgumentException("Non self-formatting property: " + propPath); } return ((ISelfFormattingPropertyValue) prop).asString(); } COM: <s> provides the property value in string form </s>
funcom_train/34068046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeToMenuState() { if (game != null) { getSceneGraph().clear(); game = null; Loader.recreateCameras(getSceneGraph(), getDisplay(), true); } if (menu == null) { menu = new Menu(this, session); } else { menu.changeSession(session); } changeActiveGameState(menu); if (session.isFinished()) { menu.setSelectedMenu(Menu.Screen.RESULTS); } } COM: <s> changes the games state to the menu </s>
funcom_train/10842956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RequestExecutor assertContentContains(String... expected) throws ParseException, IOException { assertNotNull(this.toString(), response); for(String exp : expected) { if(!content.contains(exp)) { fail(this + ": content does not contain '" + exp + "', content=\n" + content); } } return this; } COM: <s> for each supplied string fail unless content contains it </s>
funcom_train/51821661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendColumn() { alterDataTitles = ArrayTools.appendToArray(alterDataTitles, "..."); for (int i = 0; i < alterData.size(); i++) { String[] dat = (String[])alterData.get(i); alterData.set(i, ArrayTools.appendToArray(dat, ".")); } } COM: <s> appends a new column to the data </s>
funcom_train/11514962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(E o1, E o2) { if(o1 == o2) { return 0; } if(o1 == null) { return (this.nullsAreHigh ? 1 : -1); } if(o2 == null) { return (this.nullsAreHigh ? -1 : 1); } return this.nonNullComparator.compare(o1, o2); } COM: <s> perform a comparison between two objects </s>
funcom_train/41505432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resolution destroy() { accountService.destroyAccount(getContext().getUserInformation().getUserId()); getContext().getMessages().add(new ScopedLocalizableMessage(DestroyAccountActionBean.class, "accountDestroyed")); getContext().logout(); return new RedirectResolution(IndexActionBean.class); } COM: <s> destroys the current account </s>
funcom_train/8089494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDefaults() throws Exception { setClusterType(defaultClusterType()); setClusterSubType(defaultClusterSubType()); setMinInstNum(defaultMinInstNum()); setMaxInstNum(defaultMaxInstNum()); setAttrIndexRange(defaultAttrIndexRange()); m_numClusterAttributes = 1; setValuesList(defaultValuesList()); } COM: <s> sets the default values </s>
funcom_train/20986416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeAll(List<BaseToken> nodeList, CleanTimeValues cleanTimeValues) { TagPos firstTagPos = cleanTimeValues._openTags.findFirstTagPos(); if (firstTagPos != null) { closeSnippet(nodeList, firstTagPos, null, cleanTimeValues); } } COM: <s> close all unclosed tags if there are any </s>
funcom_train/50273499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RouterImpl getValidRouterByIpAddressAndOnionPort(IpNetAddress ipNetAddress, int onionPort) { for (RouterImpl router : validRoutersByFingerprint.values()) { if (router.getOrAddress().equals(new TcpipNetAddress(ipNetAddress, onionPort))) { // router found return router; } } // not found return null; } COM: <s> find a router by the give ip address and onoion port </s>
funcom_train/7862711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { //pluginViewPanel.setSize(new Dimension(69, 265)); jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setSize(800, 600); jFrame.setContentPane(getJContentPane()); jFrame.setTitle("Application"); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/3858544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void recalculateLayout() { layoutChildren(); PBounds bounds = getUnionOfChildrenBounds(null); setBounds( getX(), getY(), bounds.getMaxX() + bounds.getWidth()*TEXT_SIZE_CORRECTION_FACTOR + myInsets, // apply the correction factor... bounds.getMaxY()+myInsets); } COM: <s> recalculates the layout of the node itself and all children </s>
funcom_train/42036559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatW3CDateTime(Date date) { SimpleDateFormat dateFormater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); dateFormater.setTimeZone(TimeZone.getTimeZone("GMT")); return dateFormater.format(date); } COM: <s> create a w3 c date time representation of a date </s>
funcom_train/33516455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean updateKeys(List<KeyValue> keys, byte [] now) { if(keys == null || keys.isEmpty()) { return false; } for(KeyValue key : keys) { if(key.getTimestamp() == HConstants.LATEST_TIMESTAMP) { key.updateLatestStamp(now); } } return true; } COM: <s> checks if any stamps is long </s>
funcom_train/21611414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParsePredicateDeclarationWithFixedAndVargs() throws MUParserException { ParseTree pt = parser.parse("predicate_declaration", "PredicateName ( var1, var2, var3, _ )"); System.out.println("parse tree: " + pt); checkParsing(pt, "predicate_name", "(", "variable", "variable", "variable", "varargs", ")"); } COM: <s> tests parsing of a predicate declaration with fixed and variable arguments </s>
funcom_train/30005382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endExecution() { ExecutionController.getInstance().add(generateLog()); for (int i=0;i<elementList.size();i++) { ExecutionListElement e = elementList.get(i); if (e.getPanel() instanceof Releasable) { ((Releasable)e.getPanel()).release(); } } panelHandler.switchToNothingSelectedView(); } COM: <s> ends the execution by adding the result to the database </s>
funcom_train/787123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLowValue(int lowValue) { int e = (model.getValue()-lowValue)+model.getExtent(); model.setRangeProperties(lowValue, e, model.getMinimum(), model.getMaximum(), false); model.setValue(lowValue); } COM: <s> sets the low value shown by this range slider </s>
funcom_train/3444375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean tryWrite(String name, Table table) { AbstractWriter ret = create(name, table); if (ret != null) { try { boolean ok = ret.write(); if (ok) { return ok; } } catch (Exception e) { logger.error("While writing table "+name, e); } } return false; } COM: <s> tries writing the specified table in the file stream with the specified name </s>
funcom_train/9687870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reload(final JComponent component) { //component.setNextFocusableComponent(this.optionsButton); component.addKeyListener(new EscapeListener()); // Sets a new JComponent for current pane's ResultArea object. if (context instanceof TreeRefactorItContext) { getCurrentPane().getComponent().saveTreeExpansionAndScrollState(( TreeRefactorItContext) context); } getCurrentPane().getComponent().setContent(component); reload(); } COM: <s> inserts sets given component to the current pane </s>
funcom_train/7628774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendSms(SmsTracker tracker) { HashMap map = tracker.mData; byte smsc[] = (byte[]) map.get("smsc"); byte pdu[] = (byte[]) map.get("pdu"); Message reply = obtainMessage(EVENT_SEND_SMS_COMPLETE, tracker); mCm.sendSMS(SimUtils.bytesToHexString(smsc), SimUtils.bytesToHexString(pdu), reply); } COM: <s> send the message along to the radio </s>
funcom_train/50911496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translateByColumn(double[] d) throws EuclidRuntimeException { checkRows(d); for (int i = cols - 1; i >= 0; --i) { for (int j = rows - 1; j >= 0; --j) { flmat[j][i] -= d[j]; } } } COM: <s> subtract value from each colum </s>
funcom_train/25180954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); HashMap<Integer, org.apache.mahout.math.Vector> weights; Iterator<String> fields = getKeys().iterator(); String field; while (fields.hasNext()) { field = fields.next(); try { weights = getAllWeightVectorsFor(field); if (weights != null) buffer.append(field + "\t:" + weights.toString() + "\n"); } catch (IdealizeInputException e) { e.printStackTrace(); } } return buffer.toString(); } COM: <s> return a textual representation of the indexed data </s>
funcom_train/2620863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assignUserToGroup(Long groupId, Long userId, Long effectiveId) { simpleJdbcTemplate.update( "insert into solardras.dras_user_group_member (ugr_id,usr_id,eff_id) values (?,?,?)", groupId, userId, effectiveId); } COM: <s> assign a user to a user group </s>
funcom_train/35357019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toFile(RgbImage rgb, String szFile) { WritableRenderedImage im = RgbImageJ2se.toImage(rgb); String szSuffix = "JPG"; if (szFile.contains(".")) { int nSuffix = szFile.lastIndexOf('.'); szSuffix = szFile.substring(nSuffix + 1); } File f = new File(szFile); try { ImageIO.write(im, szSuffix, f); } catch (IOException ex) { } } COM: <s> sends an rgb image to a file </s>
funcom_train/12560659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int append(Item item) { synchronized (Display.LCDUILock) { // NullPointerException will be thrown // by item.owner if item == null if (item.owner != null) { throw new IllegalStateException(); } int i = insertImpl(numOfItems, item); formLF.lInsert(i, item); return i; } } COM: <s> adds an code item code into the code form code </s>
funcom_train/14242328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminateSymbolSetBounds( int x1, int y1, int x2, int y2) { _terminateLine1.setX1( x1); _terminateLine1.setY1( y1); _terminateLine1.setX2( x2); _terminateLine1.setY2( y2); _terminateLine2.setX1( x2); _terminateLine2.setY1( y1); _terminateLine2.setX2( x1); _terminateLine2.setY2( y2); } COM: <s> if the object is terminated the termination symbol will appear as a cross </s>
funcom_train/35669682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBaseCITLinePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CITLineFragment_baseCITLine_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CITLineFragment_baseCITLine_feature", "_UI_CITLineFragment_type"), FragmentsPackage.Literals.CIT_LINE_FRAGMENT__BASE_CIT_LINE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the base cit line feature </s>
funcom_train/26509300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean le(Object e1, Object e2) { if (!isElement(e1) || !isElement(e2)) return false; if (smalltolarge) return ((Integer)e1).intValue() <= ((Integer)e2).intValue(); else return ((Integer)e1).intValue() >= ((Integer)e2).intValue(); } COM: <s> the method code le code checks if one element is less than </s>
funcom_train/3340257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set() { int year = _cal.get(Calendar.YEAR); _yearField.setText(Integer.toString(year)); int month = _cal.get(Calendar.MONTH) + 1; _monthField.setText(Integer.toString(month)); int day = _cal.get(Calendar.DAY_OF_MONTH); _dayField.setText(Integer.toString(day)); } COM: <s> set the fields to the current time </s>
funcom_train/10286144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addText(String text, String linkFormat) { if (getWordPattern() == null || text == null) return; Pattern pattern = Pattern.compile(getWordPattern()); Matcher matcher = pattern.matcher(text); String word; if (linkFormat != null) { while (matcher.find()) { word = matcher.group(0); addTag(new Tag(word, String.format(linkFormat, word))); } } else { while (matcher.find()) { word = matcher.group(0); addTag(new Tag(word, null)); } } } COM: <s> extracts tags from a text </s>
funcom_train/41665154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createModelCodeDirectories() { for (ConceptConfig conceptConfig : modelConfig.getConceptsConfig()) { String conceptCode = conceptConfig.getCode(); String modelConcepCodetDirectoryPath = getModelConceptCodeDirectoryPath(conceptCode); File conceptCodeDirectory = new File(modelConcepCodetDirectoryPath); if (!conceptCodeDirectory.exists()) { conceptCodeDirectory.mkdirs(); } } } COM: <s> creates directories for the model where the source code will be </s>
funcom_train/3990215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSzmer_oddechowyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_szmer_oddechowy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_szmer_oddechowy_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__SZMER_ODDECHOWY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the szmer oddechowy feature </s>
funcom_train/44860194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Money multiply(BigDecimal multiplier, int roundingMode) { BigDecimal result = getDecimalAmount().multiply(multiplier); result = result.movePointRight(currency.getDefaultFractionDigits()); result = result.setScale(0, roundingMode); return new Money(result.longValue(), currency); } COM: <s> money multiplication with user specified rounding mode </s>
funcom_train/45317770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void extractArguments() { arguments.clear(); // Get command and arguments String parts[] = firstLine.split(" "); boolean first = true; for (String string : parts) { if (first) { // Ignore first word, it's the command itself first = false; } else { arguments.add(string); } } } COM: <s> gets the command arguments and adds them to the arguments collection </s>
funcom_train/20785137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int increaseAgeUs (int deltaAge){ if ( deltaAge > 0 ){ ageUs += 2 * deltaAge; } else{ ageUs += deltaAge; } if ( ageUs > (int)( 1000 * maximumClusterLifetimeMs ) ){ ageUs = (int)( 1000 * maximumClusterLifetimeMs ); } return ageUs; } COM: <s> increases the age of cluster </s>
funcom_train/9705484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator examineHeaderElements(String actor) { Collection elements = new ArrayList(); for (Iterator iterator = omSOAPHeader.examineHeaderBlocks(actor); iterator.hasNext();) { elements.add(toSAAJNode((NodeImpl)iterator.next())); } return elements.iterator(); } COM: <s> returns a list of all the code soapheader element code objects in this </s>
funcom_train/29926958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void seek() { int first = rpanel.getFirstSelectedIndex(); // in some jdks, selected index is set to -1 between selections. if (first == -1) return; int [] selected = results.getSelectedIndices(); if (selected.length == 0) return; geneSelection.deselectAllIndexes(); for (int i = 0; i < selected.length; i++) { geneSelection.setIndex(choices[selected[i]], true); } geneSelection.notifyObservers(); scrollToIndex(choices[first]); } COM: <s> selects all the genes which are currently selected in the results panel </s>
funcom_train/5503863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getParentDirectory(File dir) { //System.out.println("dir : " + dir); if (dir == null) { return null; } else if (dir.equals(this.homedir)) { return this.homedir; } else { //System.out.println("getParentDirectory : calling getParentFile" + dir); return dir.getParentFile(); } } COM: <s> returns the parent directory of code dir code </s>
funcom_train/27737880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PingRequest createMulticastPing() { GUID guid = new GUID(); List<NameValue<?>> l = new LinkedList<NameValue<?>>(); l.add(new NameValue<byte[]>(GGEPKeys.GGEP_HEADER_SUPPORT_CACHE_PONGS, getSCPData())); return new PingRequestImpl(guid.bytes(), (byte)1, l); } COM: <s> creates a ttl 1 ping for faster bootstrapping intended </s>
funcom_train/24592422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getSunQuality() { double sunQuality; if(sun < SUN_MIN_PRODUCTIVE) // not enough sun but still producible sunQuality = sun / SUN_MIN_PRODUCTIVE; else if(sun < SUN_MAX_PRODUCTIVE) // good amount of sun sunQuality = 1; else if(sun < SUN_MAX_USEFUL) // too much sun but still producible sunQuality = (SUN_MAX_USEFUL - sun) / (SUN_MAX_USEFUL - SUN_MAX_PRODUCTIVE); else // totally too much sun sunQuality = 0; return sunQuality; } COM: <s> calculate the quality of sun which is used to calculate current productivity </s>
funcom_train/46575584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startFORM(NamedNodeMap nnm) throws AppToyException { // TODO i18n ((Decorations)ctx.parent).setText(getAttribute(nnm, "title", "-noname-")); String id = getAttribute(nnm, "id", null); if (id != null) { presenter.addControl(id, new AWindow((Decorations)ctx.parent)); } processEventAttributes(nnm, "http://apptoy.sf.net/events"); } COM: <s> set parent title </s>
funcom_train/41976089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addCamera(){ interfaceCameras.add(new PWCamera()); interfaceCameras.get(cameraIndex).setID(cameraIndex); ((PWCamera)interfaceCameras.get(cameraIndex)).setCamPassword(new String("0000")); cameraIndex++; return true; } COM: <s> add the camera to server and set value of camera password to 0000 </s>
funcom_train/10481974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLineCount() throws MessagingException { String[] headers = getHeader("Lines"); // hopefully, there's only a single one of these. No sensible way of // interpreting // multiples. if (headers.length == 1) { try { return Integer.parseInt(headers[0].trim()); } catch (NumberFormatException e) { // ignore } } // dunno...and let them know I don't know. return -1; } COM: <s> get a line count for the nntp message </s>
funcom_train/3468246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeChildrenNode(boolean explore) { XFile eFiles[] = _ef.listXFiles(_df); if (eFiles != null) { for (int i = 0; i < eFiles.length; i++) { addChild(new JEFDirTreeNode(eFiles[i], explore)); } } exploreDone = true; } COM: <s> description de la methode </s>
funcom_train/38574017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAddTracksInBackgroundEnabled(boolean addTracksInBackground) { super.setProperty(ADD_TRACKS_IN_BACKGROUND_ENABLED, Boolean.toString(addTracksInBackground)); dispatchChangeEvent(OptionsChangeEvent.ADD_TRACKS_BACKGROUND_ENABLE_CHANGE, OptionsChangeEvent.NON_PROGRESS_EVENT); } COM: <s> changes the boolean value to the desired boolean as to whether or </s>
funcom_train/12128021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute getThisAttribute(String key) { Attribute attr; Subgraph sg; if(attributes == null) return(null); if((attr = (Attribute)(attributes.get(key))) == null) return(null); if((sg = getSubgraph()) == null) return(attr); if(attr == sg.getAttribute(key)) return(null); return(attr); } COM: <s> get only the corresponding local attribute for the specified key if </s>
funcom_train/13961136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void takeValuesFromRequest(WORequest r, WOContext c) { super.takeValuesFromRequest(r,c); if (c._wasFormSubmitted()) { try { object().validateTakeValueForKeyPath(objectPropertyValue(), key()); } catch (NSValidation.ValidationException e) { validationFailedWithException(e, objectPropertyValue(), key()); } } } COM: <s> extends the parent implementation in order to force validation </s>
funcom_train/43774295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Value getSeparator(final Value value1, final Value value2) { int idx = value1.compareTo(value2); if(idx == 0) { return value1.clone(); } byte[] b = new byte[Math.abs(idx)]; value2.copyTo(b, 0, b.length); return new Value(b); } COM: <s> gets shortest possible separator for the pivot </s>
funcom_train/13913806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProxymaServletResponse (HttpServletResponse aResponse, ProxymaContext theContext) throws NullArgumentException { if (aResponse == null) { log.severe("I can't build a ProxymaResponse without an HttpServletResponse."); throw new NullArgumentException("I can't build a ProxymaResponse without an HttpServletResponse."); } this.theApplicationServerResponse = aResponse; this.log = theContext.getLogger(); } COM: <s> default constructor for this class </s>
funcom_train/36049772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double toSafeDouble(Object obj, double defaultValue) { if (obj == null) return defaultValue; if (obj instanceof Number) return ((Number) obj).doubleValue(); try { String lText = obj.toString(); lText = StringUtils.replaceAll(lText, ",", ""); return Double.parseDouble(lText); } catch (Throwable t) { } return defaultValue; } COM: <s> convenience method that returns a value as a double </s>
funcom_train/31818280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStoryCardBestCaseEstimate(long id, float bestCaseEstimate) { AsyncCallback callback = new AsyncCallback() { public void onSuccess(Object result) { listener.updatedStoryCardBestCaseEstimate((StoryCardWeb)result); } public void onFailure(Throwable caught) { caught.printStackTrace(); } }; aps.updateStoryCardBestCaseEstimate(id, bestCaseEstimate, callback); } COM: <s> updates the best case estimate of a storycard </s>
funcom_train/18569787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualsReturnsTrueWhenSignaturesMatch() { Class[] newArgTypes = new Class[] {String.class, Integer.class}; Signature newSignature = new Signature(Signature.class, "myMethod", newArgTypes); assertEquals(signature, newSignature); } COM: <s> test the equals method returns true when signatures match </s>
funcom_train/37125367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePropertyChange(java.beans.PropertyChangeEvent evt) { java.awt.Cursor prevCursor = waitCursor() ; super.firePropertyChange(evt); java.awt.Component component = getJComponent() ; if((component != null) && (prevCursor != null)) { component.setCursor(prevCursor) ; } } COM: <s> the fire property change method was generated to support the </s>
funcom_train/33162485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRunAsWebUser( boolean flagValue ) { this.flags = setFlagField( ASSIST_FLAG_AGENT_RUNASWEBUSER, flagValue ) ; this.flags = setFlagField( ASSIST_FLAG_AGENT_RUNASSIGNER, !flagValue ) ; // TODO // this.flags = setFlagField( flags, IDominoAgent.ASSIST_FLAG_AGENT_RUNASWEBUSER, flagValue ) ; } COM: <s> sets whether the agent should be run as the web user </s>
funcom_train/50692146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMappedString(String theString){ if (!props.isMapping()){ return theString; } StringBuffer buffer = new StringBuffer(""); int lengthOfMappedString = props.getMappingMaxLength(); for(int i = 1; i < lengthOfMappedString; i++){ int mappedStringIndex = props.getMappingIndex(i); if (mappedStringIndex > theString.length()) { break; } char currentChar = theString.charAt(mappedStringIndex - 1); buffer.append(currentChar); } return buffer.toString(); } COM: <s> return a string without the the characters that correspond to hidden columns </s>
funcom_train/48408178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNestedPackagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Package_nestedPackage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Package_nestedPackage_feature", "_UI_Package_type"), SpemxtmethodPackage.Literals.PACKAGE__NESTED_PACKAGE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the nested package feature </s>
funcom_train/13255866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Polygon twoPointRectangle(int xP1, int yP1, int xP2, int yP2) { Polygon p = new Polygon(); p.addPoint(xP1, yP1); p.addPoint(xP1, yP2); p.addPoint(xP2, yP2); p.addPoint(xP2, yP1); return p; } COM: <s> create a polygon that is a rectangle draw between two point </s>
funcom_train/16955031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { model = null; conn = null; ModelMaker modelMaker = ModelFactory .createModelRDBMaker(getConnection()); OntModelSpec ontModelSpec = new OntModelSpec(OntModelSpec.OWL_MEM); ontModelSpec.setBaseModelMaker(modelMaker); ontModelSpec.setDocumentManager(new OntDocumentManager()); Model base = modelMaker.createModel(DEFAULT_MODEL_NAME); model = ModelFactory.createOntologyModel(ontModelSpec, base); } COM: <s> sometimes if operation is idle my sql connection fails and we need to </s>
funcom_train/29395456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute getAttribute(Term v) { Attribute a = head.getAttribute(v); if (a != null) { return a; } for (Iterator<Literal> i = body.iterator(); i.hasNext();) { Literal rt = i.next(); a = rt.getAttribute(v); if (a != null) { return a; } } return null; } COM: <s> returns the attribute associated with the given variable </s>
funcom_train/48189977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(PosStampTemplate entity) { LogUtil.log("saving PosStampTemplate instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved pos stamp template entity </s>
funcom_train/28146672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean has(Object target, Object propertyId) { if(target instanceof Map) { try { if(((Map)target).containsKey(propertyId)) { return Boolean.TRUE; } } catch(NullPointerException e) { if(propertyId == null) { // Map implementation doesn't handle null return null; } // key was not null -- probably a bug in the map implementation throw e; } } return null; } COM: <s> determines whether a key is present in the map </s>
funcom_train/965353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installBorder() { boolean useNarrowBorder = Boolean.TRUE.equals( popupMenu.getClientProperty(Options.NO_MARGIN_KEY)); String suffix = useNarrowBorder ? "noMarginBorder" : "border"; LookAndFeel.installBorder(popupMenu, "PopupMenu." + suffix); } COM: <s> installs a border without margin iff the client property </s>
funcom_train/25293950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitForOffScreenRendering() { if (!offScreen) { throw new IllegalStateException(Ding3dI18N.getString("Canvas3D1")); } if (Thread.currentThread() instanceof Renderer) { throw new IllegalStateException(Ding3dI18N.getString("Canvas3D31")); } while (offScreenRendering) { MasterControl.threadYield(); } } COM: <s> waits for this canvas3 ds off screen rendering to be done </s>
funcom_train/43036475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGridBlocks(Placable placable) { int placeBlockGridX = Math.round(placable.getSpatial() .getLocalTranslation().x); int placeBlockGridZ = Math.round(placable.getSpatial() .getLocalTranslation().z); for (Vector2f placeBlock : placable.getPlaceBlocks()) { setGridBlock(placeBlockGridX + (int) placeBlock.x, placeBlockGridZ + (int) placeBlock.y, GridBlockType.SOLID); } } COM: <s> sets all the grid blocks occupied by the placable </s>
funcom_train/26322081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object formBackingObject(HttpServletRequest request) throws Exception { User user =(User) request.getSession().getAttribute("tutorialUser"); if (user == null) { user = new User("test", "test"); user.setFirstname("Firstname"); user.setLastname("Lastname"); request.getSession().setAttribute("tutorialUser", user); } return user; } COM: <s> get the tutorial user from the request or create one if not existing </s>
funcom_train/1538833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigQuaternion norm() { // this.conjugate().multiply(this); BigRational v = re.multiply(re); v = v.sum( im.multiply(im) ); v = v.sum( jm.multiply(jm) ); v = v.sum( km.multiply(km) ); return new BigQuaternion( v ); } COM: <s> quaternion number norm </s>