__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/41607974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildFileUploadName(){ int num = 0; if (listField != null) { Entity field = null; for (int i = 0; i < listField.size(); i++) { field = (Entity) listField.get(i); if(field.getInputType()!=null){ if (field.getInputType().equalsIgnoreCase("fileUpload")){ num++; fieldFileUpload.put(field.getName(),String.valueOf(num)); } } } } } COM: <s> put field name with index of file upload start from 1 </s>
funcom_train/40685772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapDragEndHandler(final MapDragEndHandler handler) { maybeInitMapDragEndHandlers(); mapDragEndHandlers.addHandler(handler, new VoidCallback() { @Override public void callback() { MapDragEndEvent e = new MapDragEndEvent(MapWidget.this); handler.onDragEnd(e); } }); } COM: <s> this event is fired when the user stops dragging the map </s>
funcom_train/3742752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getTopWords(int hits) { Hashtable table = new Hashtable<String, WordEntry>(wordtable); Collection<Entry> coll = new ArrayList<Entry>(hits); if (hits > table.size()) { hits = table.size(); } for (int i = 0; i < hits; i++) { Entry e = getTopWord(table); if (!e.getWord().equals("")) { coll.add(e); table.remove(e.getWord()); } } return coll; } COM: <s> returns the top words of an analyzed document </s>
funcom_train/29506013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getRadioShadowVerticalDown() { if (radioShadowVerticalDown == null) { radioShadowVerticalDown = new JRadioButtonMenuItem(); radioShadowVerticalDown.setText("Down"); radioShadowVerticalDown.setName("VerticalDown"); radioShadowVerticalDown.addItemListener(PrincipalActionFactory.makeSelectShadowCommand(getOptions(),getFontText())); } return radioShadowVerticalDown; } COM: <s> this method initializes j radio button menu item7 </s>
funcom_train/6473347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsVariable(FOS variable){ boolean found = false; int i=0; FOS arg = null; while (!found && i<arguments.size()) { arg = arguments.get(i++); found = arg.isSameAs(variable) || (arg.containsVariable(variable)); } return found; } COM: <s> checks if specified variable is contained within this </s>
funcom_train/51615642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object read(DataRepresentation representation) throws ReadError, ObjectInstantiationError { String class_id = representation.getAttribute("class"); RecordElementWriter[] elements = (RecordElementWriter[])RECORD_ELEMENT_ARRAY.get(representation, "elements"); return new GenericRecordWriter(class_id, elements); } COM: <s> reads a generic record writer object from a data representation </s>
funcom_train/40768713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (setData == false) { System.out.println("set the WarCompileData first"); System.exit(1); } // get the variables need to process compile and build war setupProjectVars(); // Compile Project compileProject(); // build the war buildWar(); System.out.println(""); System.out.println("All Done!"); } COM: <s> start the build process </s>
funcom_train/19224440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean iconShowing() { // if (hasFlag(Flag.SLIDE_STYLE) || isTextNode()) // VUE-1220 - never hide resource icon, even on slides // return false; // else return !hasFlag(Flag.INTERNAL) && mIconBlock.isShowing(); // remember not current till after a layout } COM: <s> this is consulted during layout which can effect the size of the node </s>
funcom_train/20901635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unset() { IRequest request = requestHolder.get(); if (request instanceof IComponentRequest) { Iterator<ParallelComponent> pcIter = ((IComponentRequest)request).parallelComponentIterator(); if (pcIter != null) { while (pcIter.hasNext()) { ParallelComponent parallelComponent = pcIter.next(); parallelComponent.cancel(); } } } super.unset(); } COM: <s> used to terminate the request manager setup </s>
funcom_train/17496004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validateSum() { for (int y = 0; y < getNumOfRows(); y++) { double sum = 0; for (int x = 0; x < getNumOfCols(); x++) { if (getElement(y, x) != null) sum += getElement(y, x); } if (sum != 1.0) return false; } return true; } COM: <s> validates if each rows sum is 1 </s>
funcom_train/9547370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double returnValue() { // prob = 1 / (rank^zipfExp * harmonicNormFactor) // => rank^zipfExp = 1 / (prob * harmonicNormFactor) // => rank = zipfExp-sqrt (1 / (prob*harmonicNormFactor)) // rank = 1 ... maximum_Number_Of_Ranks => 1/rank = 0..1 return 1/( Math.pow( 1 / (Math.random() * harmonicNormFactor) , 1/zipfExponent ) ); } COM: <s> returns a rank not a probability </s>
funcom_train/45623181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSummaryPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_summary_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_summary_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_Summary(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the summary feature </s>
funcom_train/43672734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDisplayName(UGen ugen) { if (specials == null) return className; final Integer specialIndex = new Integer(ugen.getSpecialIndex()); String specialName; for (Iterator iter = specials.keySet().iterator(); iter.hasNext();) { specialName = iter.next().toString(); if (specials.get(specialName).equals(specialIndex)) return specialName; } return className; } COM: <s> returns a string ready to display to the user </s>
funcom_train/27975583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAddress(final String value) { if ( address != null ) { if ( address.equals( value ) ) { return; } throw new IllegalStateException( "The address property cannot be changed once it has been set" ); } if ( value == null ) { throw new IllegalArgumentException( "The address property cannot be set to null" ); } address = value; } COM: <s> sets the address of the code net port code </s>
funcom_train/33606725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultipliedBy() { System.out.println("multipliedBy"); double c = 0.0; R2 instance = new R2(); R2 expResult = null; R2 result = instance.multipliedBy(c); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of multiplied by method of class r2 </s>
funcom_train/50327472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void message(LocoNetMessage m) { log.debug("message"); // are we running? if (!mRunButton.isSelected()) return; // yes, is this what we're looking for if (! (mNextEcho.equals(m))) return; // yes, we got it, do the next startSequenceDelay(); } COM: <s> process the incoming message to look for the needed echo </s>
funcom_train/39466757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoomOut() { addToFrameHistory(); double stepX = (frame[0][1]-frame[0][0])*0.2; double stepY = (frame[1][1]-frame[1][0])*0.2; frame[0][0] = frame[0][0]-stepX; frame[0][1] = frame[0][1]+stepX; frame[1][0] = frame[1][0]-stepY; frame[1][1] = frame[1][1]+stepY; } COM: <s> zoom out 40 </s>
funcom_train/51337867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recursiveDelete(File f) { if(f.isDirectory()) { final File[] children = f.listFiles(); for (int i = 0; i < children.length; i++) { recursiveDelete(children[i]); } } if(log.isInfoEnabled()) log.info("Removing: " + f); if (!f.delete()) { log.warn("Could not remove: " + f); } } COM: <s> recursively removes any files and subdirectories and then removes the </s>
funcom_train/40412061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeUpdate(T f) { String dataSourceId = f.getDataSourceId(); if (dataSourceId != null) { DataProviderObject dataSourceProvider = map.get(dataSourceId); if (dataSourceProvider != null) { f.setSingleDto(dataSourceProvider.updateData(f)); } } } COM: <s> performs a data update operation </s>
funcom_train/925333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event) { String cmd = event.getActionCommand(); if (cmd.equals("Exit")) { System.exit(0); } else if(cmd.equals("Open")) { openFile(); } else if(cmd.equals("Save")) { saveFile(); } else if(cmd.equals("About")) { showAbout(); } else { System.out.println("Unrecognized Event Command"); } } COM: <s> void action performed action event </s>
funcom_train/15616887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String retrieveBaseUrl() throws DataAccessException { VirtualWiki virtualWiki = VirtualWiki.defaultVirtualWiki(); String url = Environment.getValue(Environment.PROP_SERVER_URL); WikiLink wikiLink = new WikiLink(WikiUtil.WEBAPP_CONTEXT_PATH, virtualWiki.getName(), virtualWiki.getRootTopicName()); url += wikiLink.toRelativeUrl(); return url; } COM: <s> return the url of the index page for the wiki </s>
funcom_train/38851739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode( int node_id, int community_id, int dnodecomm ){ assert( node_id >= 0 && node_id < network_size ); tot.set(community_id, tot.get(community_id)-graph.getWeightedDegree(node_id)); in.set(community_id, in.get(community_id)-( 2 * dnodecomm + graph.getSelfLoops(node_id))); n2c.set(node_id, -1); } COM: <s> removes the node </s>
funcom_train/14306753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean contains(ArrayList list, VPTFile file) { if (list != null) for (int i = 0; i < list.size(); i++) { if (fileComparator.compare(list.get(i),file) == 0) { list.remove(i); return true; } } return false; } //}}} //{{{ +run() : void COM: <s> checks whether the given list contains the given file or not </s>
funcom_train/9374748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setDataEnabled(boolean enable) { if (DBG) Log.d(LOG_TAG, "setDataEnabled(" + enable + ")"); Message msg = obtainMessage(EVENT_SET_MASTER_DATA_ENABLE); msg.arg1 = (enable ? ENABLED : DISABLED); sendMessage(msg); return true; } COM: <s> prevent mobile data connections from being established </s>
funcom_train/29538202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initAudio() { boolean allClipsInitialized = true; try { for (AudioCue cue : AudioCue.values()) { if (DEBUG) { System.out.println("Loading audio clip " + cue.getResourcePath()); } clips[cue.ordinal()] = initializeClip(cue); } } catch (UnsupportedAudioFileException uafe) { allClipsInitialized = false; } catch (IOException ioe) { allClipsInitialized = false; } catch (LineUnavailableException lue) { allClipsInitialized = false; } return allClipsInitialized; } COM: <s> initialize the audio manager </s>
funcom_train/18096071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelButtonBildUpload() { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.gridx = -1; gridBagConstraints1.gridy = -1; JPanel jPanelButtonBildUpload = new JPanel(); HelperPanel.formatPanel(jPanelButtonBildUpload); jPanelButtonBildUpload.setLayout(new GridBagLayout()); jPanelButtonBildUpload.add(getJButtonBildHochladen(), gridBagConstraints1); return jPanelButtonBildUpload; } COM: <s> this method initializes j panel button bild upload </s>
funcom_train/10910614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addString(String s) throws IOException { final String label = s.trim(); if (label.length() > 0 && Character.isDigit(label.charAt(0))) { rtfListItem.setRtfListStyle(new RtfListStyleNumber()); } else { rtfListItem.setRtfListStyle(new RtfListStyleText(label)); } } COM: <s> sets the content of the list item label </s>
funcom_train/44137546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTypeGradient(int type, Color c1, Color c2) { m_Type = type; if(c1 != null) m_Color1 = c1; else m_Color1 = Color.WHITE; if(c2 != null) m_Color2 = c2; else m_Color2 = Color.WHITE; m_Image = null; repaint(); } COM: <s> to set background as gradient type </s>
funcom_train/12261518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveMultipageTiff() { try { File tiffFile = new File(outputFolder, fileName + ".tif"); tiffFile.delete(); ImageIOHelper.mergeTiff(pages.toArray(new BufferedImage[pages.size()]), tiffFile); } catch (Exception e) { System.err.println(e.getMessage()); } } COM: <s> creates a multi page tiff image </s>
funcom_train/42943757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runningChecksum(byte b[]) { if (b != null) { for (int i = 0; i < b.length; i++) { C[0] = C[0] + ((int) b[i] & 0xFF); C[1] = C[1] + C[0]; } } } COM: <s> runs fletcher checksum algorithm over the data in byte array </s>
funcom_train/35649366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void extractParentObjectExpression() { this.locationOfLastBracket = expressionString.lastIndexOf('['); this.locationOfLastDot = expressionString.lastIndexOf('.'); this.initialize(); if (this.useBracketForPropertyExtraction) { this.parentObjectExpression = expressionString.substring(0,this.locationOfLastBracket) + "}"; } else { this.parentObjectExpression = expressionString.substring(0,this.locationOfLastDot) + "}"; COM: <s> this method can extract an parent expression from an expression </s>
funcom_train/12836370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseServices() { Map services = definition.getServices(); Iterator iteServ = services.values().iterator(); this.wsdlServices = new ServiceImpl[services.size()]; int tabIndex = 0; while (iteServ.hasNext()) { this.wsdlServices[tabIndex] = (ServiceImpl) iteServ.next(); tabIndex++; } } COM: <s> method to parse and store all the services defined in the wsdl file </s>
funcom_train/21438228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String toString(int[] v, char delim) { if( v==null ) return ""; StringBuilder strbuf = new StringBuilder(); for( int i=0; i<v.length; i++ ) { if( i>0 ) strbuf.append(delim); strbuf.append(v[i]); } return strbuf.toString(); } COM: <s> return a string representation of an integer array </s>
funcom_train/15696984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFunctionMapping (String prefix, String className) throws DistributionConfigurationException { Class functionClass = null; try { functionClass = Class.forName(className); } catch (ClassNotFoundException e) { throw new DistributionConfigurationException("No class named " + className + " was found to use as a function plug-in.", e); } functionMappings.put(prefix, functionClass); } COM: <s> adds a function namespace mapping to the list </s>
funcom_train/20251072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataInputStream openConfigFile(String path) { File f = new File(path); try { FileInputStream fis = new FileInputStream(f); DataInputStream dis = new DataInputStream(fis); return dis; } catch (FileNotFoundException fnf) { throw new Error("Erro na abertura do arquivo!! - ConfigFile."); } } COM: <s> open the configuration file </s>
funcom_train/38251246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String filterString() { StringBuffer filterableBuff = new StringBuffer(); for (Iterator iterator=snpFilterList.iterator();iterator.hasNext();) { SNPFilter snpFilter = (SNPFilter)iterator.next(); filterableBuff.append(snpFilter.getFilterString()).append(","); } return filterableBuff.toString(); } COM: <s> get filter string </s>
funcom_train/39294102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContractType_version_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContractType_version_feature", "_UI_ContractType_type"), CntPackage.Literals.CONTRACT_TYPE__VERSION, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the version feature </s>
funcom_train/37243609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getNoteStartTime(int noteIndex) { if (noteIndex >= this.size()) return -1.0; double startLoc = this.getStartTime(); for (int i=0; i<noteIndex; i++) { startLoc += this.getNote(i).getRhythmValue(); } return startLoc; } COM: <s> calculate the start time in beats of the note at the specified index </s>
funcom_train/50313346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAll () { checkWidget(); if((style & SWT.SINGLE) != 0) return; for(int i = 0; i < items.length; i++) { TreeItem item = items[i]; if(item != null && !item.isDisposed()) Fox.FXFoldingList_selectItem(handle, items[i].handle, true); } } COM: <s> selects all the items in the receiver </s>
funcom_train/3708806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getProfile(String username){ byte[] a = Convert.ShortToByteArray(PROFILE_GENERAL); byte[] b = Convert.getSNBytes(username); Packet p = new RawData(a); Packet q = new RawData(b); SNAC s = new SNAC(SNAC_FAMILY_LOCATION, SNAC_SUBTYPE_GET_PROFILE, SNAC_FLAGS); s.addPacket(p); s.addPacket(q); FLAP f = new FLAP((byte)0x02, s, getSequence()); this.sendFLAP(f); this.getAwayMsg(username); } COM: <s> requests a users profile </s>
funcom_train/25395260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBoundaryBoxVisible(final boolean iShowBox, final boolean iAffectChildren) { // update current object boxVisible = iShowBox; // update children if (iAffectChildren) { for (int i = 0; i < childrens.size(); i++) { childrens.get(i).setBoundaryBoxVisible(iShowBox, true); } } } COM: <s> show or hide the boundary box for this object optionally propagating the </s>
funcom_train/9763297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeUShort(final int val) { if (val < 0) { throw new IllegalArgumentException("Negative value (" + val + ") passed to unsigned writing method."); } if (val > MAX_USHORT) { throw new IllegalArgumentException("Value (" + val + ") to large to be written as ushort."); } byteBuffer.clear(); byteBuffer.putInt(val); writeByteBuffer(2); } COM: <s> write a 16 bit unsigned short </s>
funcom_train/46581982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File createUserTransaction(File pRoot) throws IOException { Properties props = new Properties(); props.put("transactionManager","/atg/dynamo/transaction/TransactionManager"); return NucleusTestUtils.createProperties("UserTransaction",new File(pRoot,"/atg/dynamo/transaction"),"atg.dtm.UserTransactionImpl",props); } COM: <s> creates the user transaction component </s>
funcom_train/14077206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void newBook(Citation c) { Paragraph bookHeader = new Paragraph(c.getBook().getName(), this.bookFont); try { this.document.add(bookHeader); //System.err.println("New BOOK: " + c.getBook().getName()); } catch (DocumentException de) { }; this.currentIndent = 0.0; } COM: <s> respond to a change in book by outputting a new section header </s>
funcom_train/3888099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSchemaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ExtendType_schema_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ExtendType_schema_feature", "_UI_ExtendType_type"), ImsldV1p0Package.Literals.EXTEND_TYPE__SCHEMA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the schema feature </s>
funcom_train/36376471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlugins(String value) { if (tenantConfigProperties.getProperty(PluginRegistry.PLUGINS_ENABLED_PROP) == null) { tenantConfigProperties.put(PluginRegistry.PLUGINS_ENABLED_PROP, value); } else { tenantConfigProperties.setProperty(PluginRegistry.PLUGINS_ENABLED_PROP, value); } } COM: <s> enable disable the plugin support for this tenant </s>
funcom_train/51412257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMDataType getValue(String column) throws CMExceptionTableRowValueNotExists{ Object obj = values.get(column); if(obj == null) { CMExceptionTableRowValueNotExists e = new CMExceptionTableRowValueNotExists("CMDataType", column, getTableName()); e.addContextInfo("This error is an unexpected failure within the internal system. Please run a databasecheck."); throw e; }else return (CMDataType)obj; }//getValue COM: <s> getter for columnvalues </s>
funcom_train/13557636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short openBackDoor() throws CardServiceException { SecureMessagingWrapper wrapper = getWrapper(); short version; byte[] result; result = sendEvilCommand(wrapper, EvilInterface.INS_OPEN_BACKDOOR, (byte) 0, (byte) 0, 2, EvilInterface.ACCESS_CODE); version = (short) ((result [0] << 8) | result [1]); return version; } COM: <s> opens the backdoor to an evil applet </s>
funcom_train/35740076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyStore getKeyStore() { Throwable failure; try { return getKeyStore(keystore_password); } catch (KeyStoreException failed) { failure = failed; } catch (IOException failed) { failure = failed; } if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) { LOG.warning("Failure recovering keystore : " + failure); } return null; } COM: <s> gets a copy of the key store associated with this pse instance </s>
funcom_train/42537174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof BehFile))return false; if(o == this)return true; BehFile oo = (BehFile)o; return (((Object)incl).equals(oo.incl))&&(((Object)behs).equals(oo.behs)); } COM: <s> is the given object equal to this beh file </s>
funcom_train/42535561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof Constr))return false; if(o == this)return true; Constr oo = (Constr)o; return (((Object)from).equals(oo.from))&&(((Object)res).equals(oo.res)); } COM: <s> is the given object equal to this constr </s>
funcom_train/1554064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCommandName() { String cmdname, classname; // get class name classname = getClassName(); // dependent algorithm is an "Expression" if (classname.startsWith("AlgoDependent")) { cmdname = "Expression"; } else { // translate algorithm class name to internal command name cmdname = getCommandString(classname); } return cmdname; } COM: <s> translate class name to internal command name </s>
funcom_train/20364917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasGroup() { GeneralSkillBias bias = new GeneralSkillBias( TEST_GENERAL_SKILL ); assertFalse( bias.hasChildGroup(GROUP_NAME) ); List<String> groupMembers = new ArrayList<String>(); groupMembers.add(FIRST_AID); groupMembers.add(FIELD_MEDIC); groupMembers.add(SURGERY); groupMembers.add(CYBERNETICS); ChildSkillGroup expectedGroup = createExclusiveGroup(GROUP_NAME, groupMembers); bias.createExclusiveGroup(GROUP_NAME,groupMembers); assertTrue( bias.hasChildGroup(GROUP_NAME) ); } COM: <s> test check for presen </s>
funcom_train/24621873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void maximize( JComponent component ) { if (component != null && component.isVisible()) { Insets i = getInsets(); Dimension d = getSize(); component.setBounds(i.left, i.top, d.width - i.left - i.right, d.height - i.top - i.bottom); } dividerPanel.setBounds(0, 0, 0, 0); } COM: <s> maximizes one site of the layout </s>
funcom_train/18657075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { stateA = 0x67452301; stateB = 0xefcdab89; stateC = 0x98badcfe; stateD = 0x10325476; stateE = 0xc3d2e1f0; count = 0; buffer.rewind(); for(int i=0;i<64;i++){ buffer.put((byte)0); } buffer.rewind(); } COM: <s> resets the sha1 to initial state for a new message digest calculation </s>
funcom_train/39466986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAboutDialog(@Nullable final Component parent) { tabs.setSelectedIndex(0); if (licensePane.getComponentCount() > 0) { licensePane.setSelectedIndex(0); } JOptionPane.showMessageDialog(parent, this, ACTION_BUILDER.format("about.title", actionBuilder.getString("application.name")), JOptionPane.PLAIN_MESSAGE); } COM: <s> show about dialog </s>
funcom_train/29372348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getJTextField_NameSurname() { if (jTextField_NameSurname == null) { jTextField_NameSurname = new JTextField(); jTextField_NameSurname.setBounds(new Rectangle(135, 75, 301, 16)); try { //jTextField_NameSurname.setText(MainRun.getInit().getPref().getPref("name")); } catch (NullPointerException ex) { jTextField_NameSurname.setText(""); } } return jTextField_NameSurname; } COM: <s> this method initializes j text field name surname </s>
funcom_train/19177881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBatch(String[] batch) throws dbException { try { if (batch!=null) { for (int b=0; b<batch.length; b++) { this.statement.addBatch(batch[b]); } } } catch(SQLException e) {throw new dbException("Results: db batch addition failed", e);} } COM: <s> add batch of instructions </s>
funcom_train/8628932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDependencies(HashSet<DbObject> dependencies) { if (sequences != null) { for (Sequence s : sequences) { dependencies.add(s); } } ExpressionVisitor visitor = ExpressionVisitor.get(ExpressionVisitor.GET_DEPENDENCIES); visitor.setDependencies(dependencies); for (Column col : columns) { col.isEverything(visitor); } } COM: <s> add all objects that this table depends on to the hash set </s>
funcom_train/4299434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(Object[] data) throws HsqlException { if (data.length != columnCount) { Object[] newdata = getNewRow(); ArrayUtil.copyArray(data, newdata, visibleColumnCount); data = newdata; } else { for (int i = visibleColumnCount; i < columnCount; i++) { data[i] = null; } } Row r = Row.newRow(this, data); indexRow(r); } COM: <s> used by the methods above </s>
funcom_train/50382422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InternalGridBean createInternalGridBean() { Map<QName, String> plugins = new HashMap<QName, String>(); Application app = ApplicationImpl.ANY_APPLICATION; plugins.put(InternalGridBean.SWING_PLUGIN, GridBeanPlugin.class.getName()); ClassLoader classLoader = Thread.currentThread() .getContextClassLoader(); return new InternalGridBeanImpl(app, "ForEachGridBean", "1.0", DataSourceModel.class, plugins, classLoader); } COM: <s> instead of loading a grid bean from a </s>
funcom_train/5728612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CourseMember persistCourseMember(Course course, User user, CourseMemberType memberType) { CourseMember member = getCourseMemberDao().load(createMemberPk(course,user)); if (member == null) { member = new CourseMemberImpl(); member.setCourseMemberPk(createMemberPk(course,user)); member.setMemberType(memberType); getCourseMemberDao().create(member); } else { member.setMemberType(memberType); getCourseMemberDao().update(member); } return member; } COM: <s> this method persist the course member based on user course and type </s>
funcom_train/175872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGlobalParamLocale() throws JTestCaseException { String result = null; try { result = _root.getNodeValueByAttrValue("class/params/param", "name", "locale"); } catch (Exception e) { throw new JTestCaseException(e.getMessage()); } return result; } COM: <s> helps setting the locale for date formats </s>
funcom_train/43570759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessage(String data, boolean isSecure) throws HttpMalformedHeaderException { super.setMessage(data); try { if (!parse(isSecure)) { mMalformedHeader = true; } } catch (Exception e) { mMalformedHeader = true; } if (mMalformedHeader) { if (log.isDebugEnabled()) { log.debug("Malformed header: " + data); } throw new HttpMalformedHeaderException(); } } COM: <s> set this requeset header with the given message </s>
funcom_train/3740318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeBussinessAdmin(User who, User user, boolean bussinessAdmin) throws UserManagerException { if (!mayChangeStatus(who,user)) throw new UserManagerException(); try { Session sess = HibernateUtil.currentSession(); Transaction trans = sess.beginTransaction(); user.setBussinessAdmin(bussinessAdmin); sess.saveOrUpdate(user); trans.commit(); } catch (HibernateException e) { throw new UserManagerException(); } } COM: <s> change business admin attribute of the given user </s>
funcom_train/8084780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector getBeanInstancesForIDs(Vector ids) { Vector result; int i; int pos; result = new Vector(); for (i = 0; i < ids.size(); i++) { pos = m_BeanInstancesID.indexOf(ids.get(i)); result.add(m_BeanInstances.get(pos)); } return result; } COM: <s> returns a vector with references to bean instances according to the ids </s>
funcom_train/12163008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUseEnclosingTableCell() throws Exception { PaneAttributes attributes = new PaneAttributes(); attributes.setStyles(StylesBuilder.getDeprecatedStyles()); doTestUseEnclosingTableCell(attributes, "<td/>"); // Set some styles on the element. attributes.setStyles(StylesBuilder.getStyles("background-color: red")); doTestUseEnclosingTableCell(attributes, getExpectedEnclosingTableCellMarkup()); } COM: <s> test the method create enclosing element </s>
funcom_train/9569013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onParagraph(PdfWriter writer, Document document, float position) { n++; PdfContentByte cb = writer.getDirectContent(); PdfDestination destination = new PdfDestination(PdfDestination.FITH, position); new PdfOutline(cb.getRootOutline(), destination, "paragraph " + n); } COM: <s> adds an outline for every new paragraph </s>
funcom_train/45881338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean confirmPasswordResetByCipher(PasswordReset passwd) { String decrypted = StringUtil.decrypt(passwd.getCipher()); if (StringUtil.isEmpty(decrypted)) { _log.info("Failed attempt to confirm password reset due to wrong cipher key.[" + passwd.getCipher() + "]"); return false; } String token = decrypted.substring(0, tokenLength); String email = decrypted.substring(tokenLength); passwd.setToken(token); passwd.setEmailAddress(email); return confirmPasswordReset(email, token); } COM: <s> validates the cipher for password reset and returns the corresponding </s>
funcom_train/7803390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearTemporaryHistory() { // iterate round zapping all the entries first then clear the map out // TODO // Iterator ig = tempHistory.keySet().iterator(); //while (ig.hasNext()) { // String gpath = (String)ig.next(); // List ghist = (List)tempHistory.get(gpath); // ghist.clear(); // ghist = null; //} tempHistory.clear(); } COM: <s> clear out all temporary history entries </s>
funcom_train/18565871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public HttpPostConnection verifyInstallationId(int installationId) { HashMap updateData = new HashMap(); updateData.put("action", "makeAutoId"); updateData.put("installationId", "" + installationId); HttpPostConnection connection = new HttpPostConnection(updateData); new Thread(connection).start(); return connection; } COM: <s> runs an asynchronous user id validating as background thread </s>
funcom_train/26282669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { // we know they are equal if they have the same reference if (other == this) { return true; } // we know they are not equal if the other is not a play if (!(other instanceof Play)) { return false; } Play otherPlay = (Play) other; return cards.equals(otherPlay.getCards()); } COM: <s> tests whether or not this play is equal to another </s>
funcom_train/49457162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void test00_import_ns() throws Exception { Db db = DbConnection.npMainDbRW(); try { db.begin(); nessusImport imp = new nessusImport(); VulnProbe vp = new VulnProbe(); LocalFileState lfs = new LocalFileState("report.nbe", "", "data", "nessus"); imp.setVulnProbe(vp); imp.setDb(db); FileInputStream fis = new FileInputStream("data/nessus/report.nbe"); try { imp.parse(lfs, fis); } finally { fis.close(); } db.commit(); } finally { db.safeClose(); } } COM: <s> ensure there are assets in the database </s>
funcom_train/28874148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getTargetByName(String rootName) { NodeList targets = doc.getElementsByTagName("target"); //$NON-NLS-1$ int um = targets.getLength(); for (int i = 0 ; i < um ; i++) { Node target = targets.item(i); Element ele = (Element)target; String name = ele.getAttribute("name"); //$NON-NLS-1$ if (name.equals(rootName)) return ele; } return null; } COM: <s> get a lt target gt by its name attribute </s>
funcom_train/40226633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(ISearch search, ModelDataRequest auxDataRequest) { if(search == null || !search.isSet()) { throw new IllegalArgumentException("Null or un-set search criteria"); } final LoadRequest<ISearch> elr = new LoadRequest<ISearch>(search); elr.setModelDataRequest(ModelDataCommand.filterRequest(auxDataRequest)); this.modelRequest = elr; crudOp = CrudOp.LOAD; } COM: <s> sets the state of this command for loading an entity by primary key </s>
funcom_train/26464958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { // If this class ever uses SDLPoint for X and Y, or any immutables, // then they must be cloned also, or the clone will be shallow. Object o = null; try { o = super.clone(); // Clone should always be supported. } catch (CloneNotSupportedException e) {} return o; } COM: <s> creates a clone of the sdlrect </s>
funcom_train/13515446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DuplicatedKeyIterator lookupValues(Key key) throws ChaiDBException { switch (type) { case IBTreeConst.HYPER_BTREE: return ((IDuplicatedKeyBTree) btree).lookup(key, kc); default: break; } throw new ChaiDBException(ErrorCode.INVALID_INDEX_TYPE); } COM: <s> return an iterator to get all corresponding value of a key </s>
funcom_train/14088677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(String type) throws IOException { String chunkId = "001A"; /* need to remove the previous chunk if this has been called before */ removeEntry(chunkId, IMessage.PT_STRING8); this.createDocument("__substg1.0_" + chunkId, INode.PT_STRING8, INode.createPtString(type)); } COM: <s> sets the msg file type </s>
funcom_train/11652726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MatchResult getCorrectMatch(List<MatchResult> matches, int entry) { int matchSize = matches.size(); if (matchSize <= 0 || entry > matchSize){ return null; } if (entry == 0) // Random match { return matches.get(JMeterUtils.getRandomInt(matchSize)); } return matches.get(entry - 1); } COM: <s> grab the appropriate result from the list </s>
funcom_train/12116789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getLineWidth() { Float cached = (Float) opengl.getStateMachine().get(GL.GL_LINE_WIDTH); if (cached != null) { return cached; } else { float f[] = new float[1]; opengl.getGl().glGetFloatv(GL.GL_LINE_WIDTH, f, 0); opengl.getStateMachine().set(GL.GL_LINE_WIDTH, new Float(f[0])); return f[0]; } } COM: <s> returns the current line width </s>
funcom_train/3078446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeRevisionLog(Build build, Revisions revisions) { String publishDir = build.getPublishDir(); Luntbuild.createDir(publishDir); writeTXTRevisionLog(publishDir, build, revisions); writeXMLRevisionLog(publishDir, build, revisions); writeHTMLRevisionLog(publishDir, build, revisions); } COM: <s> write revision log for specified build </s>
funcom_train/37448340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInteractionToHold(Collection<ResultRowData> ints) { for (ResultRowData rowData : ints) { InteractionRowData row = InteractionRowData.makeSearchRow(rowData); // Avoid duplicates. if (!myInteractionsToHold.contains(row) && !interactionExists(row.getAc())) { myInteractionsToHold.add(row); } } } COM: <s> adds an interaction to hold if the new interaction doesnt </s>
funcom_train/24561975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Icon exportIconProperty(String propertyKey, Binaries binaries) throws SQLException { Icon returnValue = null; Contributionproperty contributionProperty = getUtility().getAggregatedProperty(propertyKey); if (contributionProperty instanceof ImageProperty) { ImageProperty imageProperty = (ImageProperty) contributionProperty; returnValue = new Icon(); returnValue.setBinaryref(imageProperty.getExporter().exportBinaryref(binaries)); } return returnValue; } COM: <s> export icon property </s>
funcom_train/180544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GameObj getObj() { if (input.equalsIgnoreCase("me")){ return thePlayer; } if (input.equalsIgnoreCase("here")) { return thePlayer.getLocation(); } if (input.startsWith("#")) { return getByNumber(); } else { return getByName(); } } COM: <s> return the object that is being searched for </s>
funcom_train/1528652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void coordsRWtoEV(GeoPoint P) { // translate by -b P.x = P.x - P.z * b.x; P.y = P.y - P.z * b.y; // rotate by -alpha double px = P.x; P.x = px * eigenvec[0].x + P.y * eigenvec[0].y; P.y = px * eigenvec[1].x + P.y * eigenvec[1].y; } COM: <s> transforms coords of point p from real world space to eigenvector space </s>
funcom_train/26525498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocal() { Address myAdr = this.getAddress(); if( myAdr != null ) { try{ if( myAdr.getHost().equals(InetAddress.getLocalHost()) ) { return true; } } catch(UnknownHostException ex) { //the local address is unknown }; } return false; } COM: <s> checks the address of this component which is usually provided </s>
funcom_train/42135100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getType() { String type = getDataType(); type = type.substring(0, 1).toUpperCase() + type.substring(1).toLowerCase(); if (getEncoding().equalsIgnoreCase(SCREENSTREAMER_ENCODING)) { type = SCREENSTREAMER_TYPE; } return type; } COM: <s> returns the type audio video screen none of a stream </s>
funcom_train/23790397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectOption(int value) { if (m_selection == value) return; OptionData data = getOptionData(value); if (data == null) return; boolean lock = m_listenerManager.setDirty(null); m_currentMouseSelectionPos = m_options.indexOf(data); m_selection = value; m_text.setText(data.text); // trigger listeners Iterator<DropDownListener> iter = m_dropDownListeners.iterator(); while (iter.hasNext()) { DropDownListener l = iter.next(); l.onSelectionChange(this); } if (lock) m_listenerManager.trigger(); } COM: <s> sets the currently selected option on the drop down list </s>
funcom_train/18807560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getKeys() { final List result = new java.util.ArrayList(); final Iterator iterator = this.data.iterator(); while (iterator.hasNext()) { final KeyedObject ko = (KeyedObject) iterator.next(); result.add(ko.getKey()); } return result; } COM: <s> returns the keys </s>
funcom_train/18726141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(final JaxoPreview p) { final URL indexPage = localIndexPage(); if (indexPage == null) { final String msg = LANGUAGE.message("installErrorVisit%0", WEB_URL); JaxoDialogs.showErrorDialog(parent, msg); } else { p.setParentComponent(parent); p.browseURL(indexPage); } } COM: <s> shows the user guide in the given preview </s>
funcom_train/42930224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int createDimensionalValueInDbmsAndCache(Dimension dimension, Object newValue) { int fk = _dimensionalDao.createDimensionalValue(dimension, newValue); if (fk < 1) throw new IllegalStateException("Invalid foreign key '" + fk + "'from database for value '" + newValue + "' in dimension " + dimension); insertIntoCache(dimension, fk, newValue); return fk; } COM: <s> creates the new dimensional value by inserting another entry into the </s>
funcom_train/3598415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChangedColours(NOMElement element) { List parents = element.getParents(); if (parents==null) { return; } Iterator pit = parents.iterator(); while (pit.hasNext()) { NOMElement nel = (NOMElement)pit.next(); //System.out.println("Adding colour: " + nel.getColour()); //System.err.println("ADD CHANGED COLOUR: " + nel.getColour()); colours_changed.add(nel.getColour()); } } COM: <s> notes that this elements colour has been changed and also </s>
funcom_train/2438023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recalculate() { // We only need to set the Begin position, the other fields will get updated automatically: int start = 1; for (int row = 0; row < getRowCount(); ++row) { setValueAt(start, row, BEGIN); start += getField(row).getLength(); } } COM: <s> recalculates the begin end length values of the fields in this model </s>
funcom_train/16580609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldPath() { if (jTextFieldPath == null) { jTextFieldPath = new JTextField(); jTextFieldPath.setPreferredSize(new java.awt.Dimension(210,20)); jTextFieldPath.setBounds(new java.awt.Rectangle(12,38,319,23)); jTextFieldPath.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(KeyEvent arg0) { if (!jTextFieldPath.getText().equals("")) setFinishButtonEnabled(true); else setFinishButtonEnabled(false); } }); } return jTextFieldPath; } COM: <s> this method initializes j text field path </s>
funcom_train/18591585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateItem(ScheduleItem item) { if(item == null) return; int position = itemModel_.getPosition(item.getID(), item.getSenderID(), item.isAdvanceReservation()); int selectedIndex = (int) itemQueueJList_.getSelectedIndex(); if(selectedIndex == position) { updateItemDetails(item); } } COM: <s> updates information in the list </s>
funcom_train/25291608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReverbBounds(Bounds reverbVolume) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes26")); ((AuralAttributesRetained)this.retained).setReverbBounds(reverbVolume); } COM: <s> set reverberation bounds volume </s>
funcom_train/49248077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TabularColumnMD getColumnByName(String catalogName,String schemaName, String tableName, String columnName) { TableMD table=getTableByName(catalogName, schemaName,tableName); if (table==null) return null; return table.getColumnByName(columnName); } COM: <s> get column by name </s>
funcom_train/44440057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void print_number_range(char sepchar, int a, int b) { /* * Note: we can have B < A in the case of a range of no lines. In this * case, we should print the line number before the range, which is B. */ if (++b > ++a) { outfile.print("" + a + sepchar + b); } else { outfile.print(b); } } COM: <s> print a pair of line numbers with sepchar translated for file file </s>
funcom_train/6270573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attribute (String name, String value, boolean isSpecified) { // System.out.println("Starting attribute "+name+" "+value); String temp = value.trim(); // if (temp.charAt(0) == '#') // temp = temp.substring(1); attMap.put(name, temp); } COM: <s> attributes come before their element </s>
funcom_train/648424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnMoveUp() { if (btnMoveUp == null) { btnMoveUp = new JButton(); btnMoveUp.setText("Up"); btnMoveUp.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { moveSelectedFolderUp(); } }); } return btnMoveUp; } COM: <s> this method initializes j button6 </s>