__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/20884972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWithPrefixesCSV() { check(CSV, "", 0, TestDTOB.class, TestDTOC.class); check(CSV, "TYPE_B;0123456789;0123456789", 1, TestDTOB.class, TestDTOC.class); } COM: <s> tests full cycle for csv for the case when prefixes are used </s>
funcom_train/28170624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEnum(String value, Enum e) { enumToValueMap.put(e, value); Set<Enum> enums; if (valueToEnumMap.containsKey(value)) { enums = valueToEnumMap.get(value); } else { enums = new HashSet<Enum>(); valueToEnumMap.put(value, enums); } enums.add(e); } COM: <s> adds an enum value to the domfactory </s>
funcom_train/9889610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColoredExperimentsCount(int colorIndex) { int count = 0; if(this.experimentColorIndices == null){ this.experimentColorIndices = createExperimentColorIndices(); } for (int i=0; i<experimentColorIndices.length; i++) { if (experimentColorIndices[i] == colorIndex) { count++; } } return count; } COM: <s> returns count of columns which have public color index equals to color index </s>
funcom_train/18219888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int writeFileTableEntryFor(ScmFile newFile) { int fileID; fileID = SCMDatabaseVisitor.updateFileTable(new FileTableEntry( getEnabledIntValue(newFile.isEnabled()), getFolderID(newFile .getPath()), newFile.getFileName(), newFile .getFileType())); return fileID; } COM: <s> writes a single file table entry </s>
funcom_train/5405915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(Plugin plugin) { String name = getElementValue(plugin, "/plugin/name"); String pluginName = pluginDirs.get(plugin).getName(); if (name != null) { // return AdminConsole.getAdminText(name, pluginName); return "PLUGIN_NAME"; } else { return pluginName; } } COM: <s> returns the name of a plugin </s>
funcom_train/16831017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void train() { if (flags.trainFiles != null) { train(flags.baseTrainDir, flags.trainFiles); } else if (flags.trainFileList != null) { String[] files = flags.trainFileList.split(","); train(files); } else { train(flags.trainFile); } } COM: <s> train the classifier based on values in flags </s>
funcom_train/18112077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMemberOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Person_MemberOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Person_MemberOf_feature", "_UI_Person_type"), BioDBPackage.Literals.PERSON__MEMBER_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the member of feature </s>
funcom_train/10210506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void netFileFailed(final String error) { SwingUtilities.invokeLater(new Runnable() { public synchronized void run() { progressOneStep(progressDialog); } }); messageText = messageText + expLineEditName.getText() + ".net.xml file generation failed with the following message:\n"; messageText += converter.getLastError(); this.setVisible(false); this.dispose(); progressDialog.setVisible(false); progressDialog.dispose(); displayResult(); } COM: <s> is called by the sumo export thread if an error occured while generating </s>
funcom_train/39949420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxValid() { if (jCheckBoxValid == null) { jCheckBoxValid = new JCheckBox(); jCheckBoxValid.setText("isValid"); jCheckBoxValid.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { _testingLocationProvider.getCurrentEmulatedLocation().setValid(jCheckBoxValid.isSelected()); } }); } return jCheckBoxValid; } COM: <s> this method initializes j check box valid </s>
funcom_train/5463236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit() throws IndexOutOfBoundsException { if (index > 0) { // Swap top and previous stack entries and point to previous Value[] newenv = (Value[]) trail.get(index-1); trail.set(index-1, environment); trail.set(index, newenv); --index; } else { throw new IndexOutOfBoundsException("Underflow of BindingEnvironment"); } } COM: <s> forget the previously pushed state but keep the current environment </s>
funcom_train/5894867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setTimeoutMessage(String deviceType, String message) { if (deviceType == null) deviceType = "ajax"; TimeoutURIInfo inf = _timeoutURIs.get(deviceType); if (inf != null) { String old = inf.message; inf.message = message; return old; } inf = new TimeoutURIInfo(); inf.message = message; _timeoutURIs.put(deviceType, inf); return null; } COM: <s> sets the timeout message for this device or null if the default </s>
funcom_train/16683522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFileMD5() { final FxPK pk = getPagePK(); if (pk.isNew()) { return ""; } BinaryDescriptor binaryDescriptor = (BinaryDescriptor) getPageContent().getValue("/filecontent").getBestTranslation(); return binaryDescriptor.getMd5sum(); } COM: <s> returns md5 checksum of file stored in file content instance </s>
funcom_train/47828063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Report createReport(String reportTemplateFile, PostSaleReportType postSaleReport) { Report report = null; try { JasperReport reportTemplate = (JasperReport) JRLoader.loadObject(reportTemplateFile); report = createReport(reportTemplate, postSaleReport); } catch (JRException e) { logger.error(e.getMessage(), e); } return report; } COM: <s> creates a report from a post sale report type object </s>
funcom_train/12192893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnnotatedValue(int index, String value, Object annotation) { if (index >= 0 && index < length) { int i = index * SLOTS_PER_ATTRIBUTE; data[i + OFFSET_VALUE] = value; data[i + OFFSET_ANNOTATION] = annotation; } else { badIndex(index); } } COM: <s> set the value and annotation of a specific attribute </s>
funcom_train/50464663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object call(Object obj, String methodName, boolean value) throws ReflectException, InvocationTargetException { if(obj == null) throw new ReflectException("obj cannot be null"); Class[] types = new Class[]{Boolean.TYPE}; return call(obj.getClass(), obj, methodName, new Object[]{new Boolean(value)}, types); } COM: <s> call a method on a object instance with a single boolean argument </s>
funcom_train/49601909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDGNumber() { try { DERInteger dg = (DERInteger) ((DERSequence) ((DERSequence) sequence .getObjectAt(0)).getObjectAt(1)).getObjectAt(1); return dg.getValue().intValue(); } catch (Exception e) { return -1; } } COM: <s> gets the data group number this soi is attached to </s>
funcom_train/23840280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MODScanner useRadix(int radix) { if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) throw new IllegalArgumentException("radix:"+radix); if (this.defaultRadix == radix) return this; this.defaultRadix = radix; // Force rebuilding and recompilation of radix dependent patterns integerPattern = null; return this; } COM: <s> sets this scanners default radix to the specified radix </s>
funcom_train/21503591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutputDataTypeSpecifiablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BlockType_outputDataTypeSpecifiable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BlockType_outputDataTypeSpecifiable_feature", "_UI_BlockType_type"), DMLPackage.Literals.BLOCK_TYPE__OUTPUT_DATA_TYPE_SPECIFIABLE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the output data type specifiable feature </s>
funcom_train/12199232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServerPDUEvent getRequestEvent(long timeout) { ServerPDUEvent pduEvent = null; synchronized (requestEvents) { if (requestEvents.isEmpty()) { try { requestEvents.wait(timeout); } catch (InterruptedException e) { // ignoring, actually this is what we're waiting for } } if (!requestEvents.isEmpty()) { pduEvent = (ServerPDUEvent) requestEvents.dequeue(); } } return pduEvent; } COM: <s> returns received pdu from the queue </s>
funcom_train/23183602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomize(double min, double max) { java.util.Random g = new java.util.Random(); double diff = max - min; for (int row = 0; row < _row; row++) { for (int column = 0; column < _column; column++) { _cell[row][column] = g.nextFloat() * diff + min; } } } COM: <s> randomize the matrix value </s>
funcom_train/8845781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { VerticalPanel vPanel = new VerticalPanel(); vPanel.setWidth("100%"); CanvasPanelExt canvas1 = new AnnotatedCanvas(500, 300); canvas1.addCanvasPainter(new SimpleXYPlot(1)); vPanel.add(canvas1); CanvasPanelExt canvas = new AnnotatedCanvas(500, 300); canvas.addCanvasPainter(new SimpleXYPlot(0)); vPanel.add(canvas); RootPanel.get().add(vPanel); } COM: <s> this is the entry point method </s>
funcom_train/18827355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Map attributes) throws TransformerException { if (wired != null) { throw new IllegalStateException(); } Direction flow = (Direction) attributes.get(DIRECTION); if (flow == null) { flow = Direction.FORWARD; } attributes.put(Transformer.DIRECTION, flow); head.init(attributes); wired = flow; } COM: <s> initialises the code assembly code for operation with specific </s>
funcom_train/38540151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpVerbose() { for (int i=0; i<numSquares*numSquares; i++) { for (int j=0; j<numSquares*numSquares; j++) { System.out.print(cells[i][j].getMin()); System.out.print(" "); } System.out.println(); } System.out.println(); } COM: <s> prints out via system </s>
funcom_train/33263808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLayout() { int totalHeight = 0; Gadget g[] = getGadgets(); for (int i = 0; i < getGadgetCount(); i++) { if (g[i].isVisible()) { g[i].doLayout(); g[i].setLocation(0, totalHeight); totalHeight += g[i].getSize().height-1; } } } COM: <s> arranges the gadgets </s>
funcom_train/318718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display() { try { Object aboutDialog = thinlet.parse("resources/about.xml", this); Object licenseText = thinlet.find(aboutDialog, "licenseText"); thinlet.setString(licenseText, "text", gnuLicenseText); thinlet.add(aboutDialog); } catch (Exception exc) { exc.printStackTrace(); } } COM: <s> creates and displays the about dialog </s>
funcom_train/15460563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void encodeComponent(FacesContext context, UIComponent component) throws IOException { if (log.isDebugEnabled()) log.debug("Encode Component " + component.getClientId(context)); component.encodeBegin(context); if(component.getRendersChildren()) { component.encodeChildren(context); } else { for(int i=0; i<component.getChildren().size(); i++) { encodeComponent(context, (UIComponent)component.getChildren().get(i)); } } component.encodeEnd(context); } COM: <s> calls the encoding methods from the re render components </s>
funcom_train/3524405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateComponentForSpanNoHolder() throws Exception { setupTestPage("TestPage1.html"); Component component = factory.createComponentForElement( "PersonX__fullName", container.getDocumentAdapter().getElementById( "Person__fullName"), holders); assertNull("Component sh/b null", component); } COM: <s> test method create component for element case span bound field but no </s>
funcom_train/25394717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JLight getLightSource(int index) { // Make sure this is a valid index if (index < 0 || (int) (index) >= getLights().size()) { return null; } // Return the light that we were supplied with by the creator of the world return lights.get(index); } COM: <s> get access to a particular light source between 0 and </s>
funcom_train/8232513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer1() { if (spacer1 == null) {//GEN-END:|128-getter|0|128-preInit // write pre-init user code here spacer1 = new Spacer(16, 1);//GEN-LINE:|128-getter|1|128-postInit // write post-init user code here }//GEN-BEGIN:|128-getter|2| return spacer1; } COM: <s> returns an initiliazed instance of spacer1 component </s>
funcom_train/44315146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean getBoolean( String name, Boolean defaultValue ) throws NamedValueParseException { String parameter = _accessor.getValue( name ); if ( isEmpty( parameter ) ) { return defaultValue; } Boolean value = toBoolean( parameter.trim() ); if ( value != null ) { return value; } throw new NamedValueParseException( name ); } COM: <s> returns the named parameter as a boolean </s>
funcom_train/18807816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimePeriodValues getSeries(final int series) { // check arguments... if ((series < 0) || (series > getSeriesCount())) { throw new IllegalArgumentException( "TimePeriodValuesCollection.getSeries(...): index outside valid range."); } // fetch the series... final TimePeriodValues ts = (TimePeriodValues) this.data.get(series); return ts; } COM: <s> returns a series </s>
funcom_train/37079098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFieldsPanelBottomGlue() { Component glue = Box.createVerticalGlue(); // ?? //addLeftField(glue); no weight int fill = GridBagConstraints.VERTICAL; fieldsPanel.add(glue,GuiUtil.makeConstraint(0,row,1,1,1.0,0,fill)); } COM: <s> pad out bottom of fields panel for layout otherwise syns can get huge </s>
funcom_train/29656843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean allowClass(Class cls) { return !Number.class.isAssignableFrom(cls) && cls != Character.class && cls != Boolean.class && cls != String.class && cls != java.util.Date.class && cls != java.util.Calendar.class && cls != java.sql.Date.class ; } COM: <s> whether to allow a class to be constructed </s>
funcom_train/9139546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeToStream(final LexiconOutputStream _lexiconStream) throws IOException { final BlockLexiconOutputStream lexiconStream = (BlockLexiconOutputStream)_lexiconStream; final byte zerob = (byte)0; final long zerol = (long)0; final String[] terms = tfs.keys(new String[0]); Arrays.sort(terms); for (String t : terms) { lexiconStream.writeNextEntry(t, TermCodes.getCode(t), nts.get(t), tfs.get(t), blockFreqs.get(t), zerol, zerob); } } COM: <s> stores the lexicon map to a lexicon stream as a sequence of entries </s>
funcom_train/49456341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void disactivateModule(Db db) throws Exception { try { db.enter(); PreparedStatement disactive = db.prepareStatement("UPDATE e_module SET active=false WHERE class_name = ?"); disactive.setString(1, getClass().getName()); int res = db.executeUpdate(disactive); if(res != 1) throw new Exception("Fail to deactive "+getName()); _logger.warn("Module "+getName()+" successfully disactivated." ); } finally { db.exit(); } } COM: <s> mark the module as inactive cant be accessed </s>
funcom_train/40685685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addYawChangedHandler(final StreetviewYawChangedHandler handler) { maybeInitYawChangedHandlers(); yawChangedHandlers.addHandler(handler, new DoubleCallback() { @Override public void callback(double yaw) { StreetviewYawChangedEvent event = new StreetviewYawChangedEvent( StreetviewPanoramaWidget.this, yaw); handler.onYawChanged(event); } }); } COM: <s> adds a handler for yaw change events </s>
funcom_train/3403143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getElementText() throws XMLStreamException { if(!hasEvent) { throw new NoSuchElementException(); } if(!_currentEvent.isStartElement()) { StAXDocumentParser parser = (StAXDocumentParser)_streamReader; return parser.getElementText(true); } else { return _streamReader.getElementText(); } } COM: <s> reads the content of a text only element </s>
funcom_train/8036725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void halt() { try { pleaseStop = true; new Socket("127.0.0.1", config.getListenPort()); if (sSocket != null) { sSocket.close(); } for (Connection connection : connections) { connection.halt(); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> force a halt by connecting to self and then closing the server socket </s>
funcom_train/444578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitConstraint(Constraint expr) { if (!body) { body = true; expr.getOperand().accept(this); } else { addError(expr, ValidationError.AX_BODY_ERR + ": Must not " + "contain a Negation:\n" + leSerializer.serialize(expr)); body = false; } } COM: <s> checks if a constraint is valid to wsml rule </s>
funcom_train/16165592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcon(int id, ImageIcon icon, boolean thumb_rendered) { Debug.printDebugMsg(this, "Setting icon: " + id); assert id > 0; assert icon != null; icons.put(id, icon); Database.getDB().insertThumbnail(id, icon, thumb_rendered); } COM: <s> sets an icon that should be written into the database </s>
funcom_train/45692456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumSamplesEmptyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EsxFile_numSamplesEmpty_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_numSamplesEmpty_feature", "_UI_EsxFile_type"), EsxPackage.Literals.ESX_FILE__NUM_SAMPLES_EMPTY, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the num samples empty feature </s>
funcom_train/13197605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performSelectTargetField(ImageButton myButton) { try { DCCoord selectedField = new DCCoord(myButton.getBoard(), myButton.getFile(), myButton.getRank()); sendOut(encoder.movePiece(activePlayer, selectedField)); } catch (DCLocationException e) { System.err.println("DCLocationExeption in " + "performSelectStartField() : " + e.getMessage()); displayMessage("ERROR [performSelectTargetField()] - " + "Invalid startfield!"); } } COM: <s> tries to select a target field to move to </s>
funcom_train/46192217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Row get(Row.Key rowKey, String[] columnNames) throws IOException { if(columnNames == null) { return null; } RowFilter rowFilter = new RowFilter(rowKey); for(String eachColumn: columnNames) { rowFilter.addCellFilter(new CellFilter(eachColumn)); } return get(rowFilter); } COM: <s> retrieve data with row key and specific column names </s>
funcom_train/12280903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(int b) { if (this.output == null) throw new IllegalStateException("Closed"); try { this.output.write(b); } catch (IOException e) { this.abort(); String message = "Unable to write data"; throw new DAVException(507, message, e, this.resource); } } COM: <s> p write data to this </s>
funcom_train/36138494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class resolveClass(String className) throws InvalidScriptException { ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { return Class.forName(className, true, cl); } catch (ClassNotFoundException cnf) { // Unrecoverable; script must be fixed MessageFormat mf = new MessageFormat(Strings.get("ClassNotFound")); throw new InvalidScriptException(mf.format(new Object[] { className })); } } COM: <s> returns the class corresponding to the given class name </s>
funcom_train/10375200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTLD11Empty() throws Exception { URL srcXML = classLoader.getResource("1_1_dtd/taglib-empty-src.tld"); URL expectedXML = classLoader.getResource("1_1_dtd/taglib-empty-expected.tld"); parseAndCompare(srcXML, expectedXML); } COM: <s> tests for empty tld files </s>
funcom_train/4510022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getUserCount() { try { String path = USER_URL_PREFIX + "users/count"; Element element = ClearspaceManager.getInstance().executeRequest(GET, path); return Integer.valueOf(WSUtils.getReturn(element)); } catch (Exception e) { Log.error(e); } return 0; } COM: <s> gets the user count using the user service users count get service </s>
funcom_train/25315668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nowJumping(CollectStaff staff) { int x = GUI.getInstance().getCrawlerPosition(); int y = staff.getY() + 75*staff.getHeight()/100; hopSize = noteSize*8; setEndDestination(new Point((x-(hopSize/2)),y), (Note.JUMP_NOTE_MOVE_SPEED*3), noteSize); this.jumping = true; } COM: <s> sets the jumping value for this note to true </s>
funcom_train/14505443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISignServerWSClient generateSignServerWSClient(String clientType, String[] hosts, boolean useHTTPS, IFaultCallback faultCallback, int port) { return generateSignServerWSClient(clientType, hosts, useHTTPS, faultCallback, port, DEFAULT_TIMEOUT, DEFAULT_WSDL_URL); } COM: <s> generates a sign server wsclient using default timeout and wsdl url but </s>
funcom_train/50313224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readProperty(String resource, String property, boolean search) throws CmsException { return m_rb.readProperty(m_context.currentUser(), m_context.currentProject(), m_context.getSiteRoot(resource), m_context.getSiteRoot(), property, search); } COM: <s> looks up a specified property with optional direcory upward cascading </s>
funcom_train/24492619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean containsReview(String reviewId, boolean checkLoaded) { boolean result = containsCaseInsensitive(this.rModel.keySet(), reviewId); if (checkLoaded) { result = result && containsCaseInsensitive(this.commentDB.keySet(), reviewId); } return result; } COM: <s> checks whether the given review id is stored in the model </s>
funcom_train/11343685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ServicePermission)) { return false; } ServicePermission sp = (ServicePermission) obj; return (action_mask == sp.action_mask) && getName().equals(sp.getName()) && ((service == sp.service) || ((service != null) && (service .compareTo(sp.service) == 0))); } COM: <s> determines the equality of two service permission objects </s>
funcom_train/20119179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createPrincipalAwareCacheKey(String newtCacheKey) { String fixedCacheKey = newtCacheKey; final SecurityOptions securityOptions = this.getContext().getSecurityOptions(); if ( securityOptions!=null && ! isShareCacheWithRemoteUsers() && securityOptions.getUserPrincipal()!=null && securityOptions.getUserPrincipal().getName()!=null ){ fixedCacheKey+=":"+securityOptions.getUserPrincipal().getName(); } return fixedCacheKey; } COM: <s> add user principal into cache key </s>
funcom_train/17756005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void filter() { matches_.removeAll(); try { Pattern pattern = Pattern.compile(regexText_.getText()); IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (IProject project : projects) { if (pattern.matcher(project.getName()).matches()) { matches_.add(project.getName()); } } } catch (PatternSyntaxException e) { return; } } COM: <s> filter the matching projects section of the property page </s>
funcom_train/10357315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skipDateDelimiter() throws ParseException { if (current >= endOffset) { parseError("Invalid date field delimiter"); } if (source.charAt(current) == '-') { current++; } else { // must be at least a single whitespace character skipRequiredWhiteSpace(); } } COM: <s> skip a delimiter between the date portions of the </s>
funcom_train/49054325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeToken(Transition transition, Token token) { boolean removed = false; if (outputTransitions.contains(transition)) { synchronized (tokensToLocks) { if (tokensToLocks.get(token) == transition) { tokensToLocks.remove(token); removed = true; } } } if (removed) { tokenRemoved(token); } } COM: <s> removes a token by request from a transition </s>
funcom_train/173250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void widgetSelected(SelectionEvent e) { int column = getViewer().getTable().indexOf((TableColumn) e.widget); if (column == getSorter().getTopPriority()) getSorter().reverseTopPriority(); else { getSorter().setTopPriority(column); } setSorter(getSorter()); } COM: <s> handles the case of user selecting the </s>
funcom_train/22233797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttributeGain(float gain) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes0")); ((AuralAttributesRetained)this.retained).setAttributeGain(gain); } COM: <s> set attribute gain amplitude scale factor </s>
funcom_train/19311013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() throws PsOperatorException { final PsObject object = popOperand(PsOperator.LOAD); final PsObject value = getInterpreter().find(object); if (value == null) { throw new PsOperatorException(PsError.UNDEFINED, PsOperator.LOAD); } pushOperand(value); } COM: <s> executes the load operator </s>
funcom_train/17984369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize() { if (isPreferredSizeSet()) return super.getPreferredSize(); Dimension size = check(getThumbnailSize()); Insets insets = getInsets(); if (insets != null) { size.width += insets.left + insets.right; size.height += insets.top + insets.bottom; } return size; } COM: <s> returns the preferred size which will be the set preferred size </s>
funcom_train/14363797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationInstance newApplicationInstance() { Echo2Impress impress = new Echo2Impress(clazz, method); impress .setActionListener(new Controller(impress, impress.getPresentation())); try { impress.setStyleSheet(StyleSheetLoader.load("style.xml", Thread .currentThread().getContextClassLoader())); } catch (Exception e) { throw new RuntimeException(e); } return impress; } COM: <s> creates a new echo2 impress instance with the previously created </s>
funcom_train/10746971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void receiveInitialEvent() { if (settings.isDebuggeeSuspend()) { initialEvent = debuggeeWrapper.vmMirror.receiveCertainEvent(JDWPConstants.EventKind.EXCEPTION); logWriter.println("Received inital EXCEPTION event"); debuggeeWrapper.resume(); logWriter.println("Resumed debuggee VM"); } } COM: <s> receives initial exception event if debuggee is suspended on event </s>
funcom_train/23716468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem3 () { if (stringItem3 == null) {//GEN-END:|80-getter|0|80-preInit // write pre-init user code here stringItem3 = new StringItem ("Plik MP3: \n", null);//GEN-LINE:|80-getter|1|80-postInit // write post-init user code here }//GEN-BEGIN:|80-getter|2| return stringItem3; } COM: <s> returns an initiliazed instance of string item3 component </s>
funcom_train/2760069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startup() throws InterruptedException { // parse the script if(_fqlScript == null) { throw new IllegalStateException("Cannot startup a processor without setting the FQL script or specifying to poll the store."); } _script = Embedder.compile(_scriptLanguage, "Processor["+_id+"]", 1, _fqlScript); _engine.start(); synchronized(_semaphore) { while(!_started) { _semaphore.wait(); } } } COM: <s> starts up the processor </s>
funcom_train/25935579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printExampleInput(String extractorName) throws IOException { ExtractorFactory<?> factory = getFactory(extractorName); ExampleInputOutput example = new ExampleInputOutput(factory); String input = example.getExampleInput(); if (input == null) { throw new IllegalArgumentException("Extractor " + extractorName + " provides no example input"); } System.out.println(input); } COM: <s> prints an example of input for the provided extractor </s>
funcom_train/42251964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException { if (Globals.IS_SECURITY_ENABLED) { try { PrivilegedForward dp = new PrivilegedForward(request, response); AccessController.doPrivileged(dp); } catch (PrivilegedActionException pe) { Exception e = pe.getException(); if (e instanceof ServletException) throw (ServletException) e; throw (IOException) e; } } else { doForward(request, response); } } COM: <s> forward this request and response to another resource for processing </s>
funcom_train/13275170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showSaveDialog(String homeName) { return this.controller.getContentManager().showSaveDialog(this, this.preferences.getLocalizedString(HomePane.class, "saveHomeDialog.title"), ContentManager.ContentType.SWEET_HOME_3D, homeName); } COM: <s> displays a content chooser save dialog to choose the name of a home </s>
funcom_train/20288684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getLinkProjectId(Connection db, int linkItemId, int linkModuleId) throws SQLException { int linkProjectId = -1; if (linkModuleId == Constants.PROJECT_BLOG_FILES) { BlogPost blogPost = new BlogPost(db, linkItemId); linkProjectId = blogPost.getProjectId(); } return linkProjectId; } COM: <s> gets the project id for the related item </s>
funcom_train/5768882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SymbolInterval createSymbolInterval(int firstSymbol, int lastSymbol) throws AlphabetException { if (lastSymbol < firstSymbol) { throw new AlphabetException("lastSymbol: " + lastSymbol + " is smaller than firstSymbol: " + firstSymbol); } insert(firstSymbol, lastSymbol); return new SymbolInterval(firstSymbol, lastSymbol); } COM: <s> creates a symbol interval </s>
funcom_train/13492194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateDiscount(Customer c, KnowledgeBase kb) { // build query Predicate p = KBServer.getPredicateGetDiscount(); Query query = query(fact(p, c, QUERY_VARIABLE),"get discount"); // issue query InferenceEngine ie = new ResolutionInferenceEngine(); try { result = ie.query(query, kb,InferenceEngine.ONE,InferenceEngine.BUBBLE_EXCEPTIONS); result.next(); } catch (InferenceException x) { System.err.println("Inference Error, details:"); x.printStackTrace(System.err); } } COM: <s> calculate the discount for a customer c using the knowledge base kb </s>
funcom_train/3114003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(Component invoker, int x, int y) { //// 1. Just in case we have another show, abort it. if (showThread != null) { showThread.abort(); } //// 2. Now start the delayed display. showThread = new ShowThread(invoker, x, y); showThread.start(); } // of method COM: <s> show the pie menu </s>
funcom_train/18957988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void AddPriority(String priorityName) throws SQLException, Exception { Statement stmt = dbConn.createStatement(); // insert the new priority into the Priority table. String update = "INSERT INTO Priority (PriorityName) VALUES" + "('" + priorityName + "');"; System.out.println(update); stmt.executeUpdate(update); stmt.close(); } COM: <s> adds the new priority to the project </s>
funcom_train/25365646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGotoIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Dialog_gotoId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Dialog_gotoId_feature", "_UI_Dialog_type"), LeveleditorPackage.Literals.DIALOG__GOTO_ID, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the goto id feature </s>
funcom_train/42630988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(ViewPort vp) { getJdbcTemplate().update(sUpdateSql,new Object[]{ vp.getType(), vp.getTitle(), vp.getParent(), vp.getTrail(), vp.getLeftMenu(), vp.getTopMenu(), vp.getFooter(), vp.getBanner(), vp.getCreateTime(), vp.getCreator(), vp.getAclPolicy(), vp.getId() }); d_cache.putInCache(String.valueOf(vp.getId()), vp); } COM: <s> update the view port attribute </s>
funcom_train/28486582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPublishYearPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Book_publishYear_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Book_publishYear_feature", "_UI_Book_type"), LibraryPackage.Literals.BOOK__PUBLISH_YEAR, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the publish year feature </s>
funcom_train/19406936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Action getExitAction() { if (null == m_ExitAction) { m_ExitAction = new ExitAction("Exit", new ImageIcon(this.getClass() .getResource(m_ResourcePath + "exit.png")), m_Gui, m_Main); } //this.getClass().getResource(m_ResourcePath + "exit.png").; return m_ExitAction; } COM: <s> returns the exit action </s>
funcom_train/22753799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void locateOnScreen(Frame frame) { Dimension paneSize = frame.getSize(); Dimension screenSize = frame.getToolkit().getScreenSize(); frame.setLocation( (screenSize.width - paneSize.width) / 2, (screenSize.height - paneSize.height) / 2); } COM: <s> locates the frame on the screen center </s>
funcom_train/48527782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writePrimitive(short s, String field) throws IOException { writer.start("primitive"); if (field != null) writer.attribute("field", field); writer.attribute("type", "short"); writer.attribute("value", s); writer.end("primitive"); } COM: <s> method which writes a short to the stream as the given field name </s>
funcom_train/48053294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColumn(String columnName, Integer[] index) { columnNames.add(columnName); int[] _index = new int[index.length]; for (int i = 0; i < index.length; i++) { _index[i] = index[i]; } indexes.add(_index); export.add(true); } COM: <s> adds a new column element </s>
funcom_train/25487905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matching multValues(double factor) { for(Iterator<java.util.Map.Entry<Tuple, Double>> i = this.entrySet().iterator(); i.hasNext(); ) { java.util.Map.Entry<Tuple, Double> entry = i.next(); entry.setValue(entry.getValue()*factor); } return this; } COM: <s> multiplies all the matching values with the given factor </s>
funcom_train/3413363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean mutatesTo(Object oldInstance, Object newInstance) { // Assume the instance is either mutable or a singleton // if it has a nullary constructor. return (constructor.length == 0) || !definesEquals(oldInstance) ? super.mutatesTo(oldInstance, newInstance) : oldInstance.equals(newInstance); } COM: <s> if the number of arguments in the specified constructor is non zero and </s>
funcom_train/32112806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { NavigationManager nm = new NavigationManager(); nm.setDriveService(driveService); nm.init(); // Add it to the root panel. RootPanel.get("tree").add(nm.getFolderTree()); RootPanel.get("details").add(nm.getChildTable()); } COM: <s> this is the entry point method </s>
funcom_train/11024203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteWithSimpleIntPropertyAndFloatValue() { try { new BeanPropertyValueChangeClosure("intProperty", expectedFloatValue).execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException e) { /* this is what we expect */ } } COM: <s> test execute with simple int property and float value </s>
funcom_train/36638377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertNodeIntoSelected(TreeNode node) { TreePath path = transformationTreeView.getSelectionPath(); //Get the node to insert into SceneNode selected = (SceneNode) transformationTree.getRoot(); if (path != null && path.getLastPathComponent() instanceof Transformation) selected = (SceneNode) path.getLastPathComponent(); //Add the node synchronized (transformationTree) { transformationTree.insertNodeInto((SceneNode) node, selected, selected.getChildCount()); } } COM: <s> inserts the given node into the currently selected node </s>
funcom_train/42971243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyDeviceLeft(RemoteDevice device) { String deviceName = null; logger.info("[BluetoothRadar] [" + deviceName + "] device has left the smart-space."); BluetoothDevice bluetoothDevice = new BluetoothDevice(device, btUtil); radarListener.deviceLeft(bluetoothDevice); neighborDevices.remove(device); devicePoll.removeDevice(device); } COM: <s> notify listeners that a device has left the smart space </s>
funcom_train/3375239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FontMetrics getFontMetrics(Font f) { AccessibleContext ac = getCurrentAccessibleContext(); if (ac instanceof AccessibleComponent) { return ((AccessibleComponent) ac).getFontMetrics(f); } else { Component c = getCurrentComponent(); if (c != null) { return c.getFontMetrics(f); } else { return null; } } } COM: <s> gets the code font metrics code of this object </s>
funcom_train/2288397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importResources(String importFile, String importPath) throws Exception { CmsImportParameters params = new CmsImportParameters( OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(importFile), importPath, true); OpenCms.getImportExportManager().importData( m_cms, new CmsShellReport(m_cms.getRequestContext().getLocale()), params); } COM: <s> imports a resource into the cms </s>
funcom_train/12024000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSavedPlan(final ListenerReturnEvent event) { if (JDBCPlannerProperties.getRepeatGeneration() || !plannedSQL.contains(savedSQL)) { try { plannedSQL.add(savedSQL); prepSQL.put((PreparedStatement) event.getWrappedResult(), new SQLInfo(savedSQL)); } catch (Exception e) { logger.logError("Error generating runtime query plan.", e); } } } COM: <s> generates the plan statement for a call that requires arguments </s>
funcom_train/18661157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRootNode( SortableDefaultMutableTreeNode rootNode ) { if ( rootNode != null ) { LOGGER.fine( "setting root node to " + rootNode.toString() ); } else { LOGGER.info( "setting root node to null. Why ?" ); } this.rootNode = rootNode; } COM: <s> this method sets the root node of the collection </s>
funcom_train/1170777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCardSupport(String CardName) { // TODO: using AllZone.getCardFactory().getCard() would probably be much faster. for (Card gCard : AllZone.getCardFactory()) { if (CardName.equalsIgnoreCase(gCard.getName())) { return true; } } return false; } COM: <s> p is card support </s>
funcom_train/36231315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMessage(CondensedStatusMessage message) { if (messages.containsKey(message.getMessage())) { CondensedStatusMessage oldMessage = messages.get( message.getMessage()); oldMessage.update(message); } else { messages.put(message.getMessage(), message); } } COM: <s> add a condensed status message to this condensed status </s>
funcom_train/47276539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorLabel(int theColor) { color.colorLabel = theColor; if (_myLabel != null) { _myLabel.set(_myLabel.toString(), color.colorLabel); } for (int i = 0; i < controllers.size(); i++) { ((ControllerInterface) controllers.get(i)).setColorLabel(theColor); } } COM: <s> set the color of the text label of the group </s>
funcom_train/44308826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateSorting() { SortableTableHeader header=(SortableTableHeader)m_table.getTableHeader(); if (header.getSortedColumn()!=null) m_associationRelationsTableModel.sortModel(header.getSortedColumn().getModelIndex(),header.getSortAscending()); updateActions(); } COM: <s> updates the sorting of the model </s>
funcom_train/9532863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectTerm(Object source, OBOClass oboClass, boolean isHyperlink, UseTermListener useTermListener) { boolean isMouseOver = false; // System.out.println("ishyperlink="+isHyperlink); TermSelectionEvent e = makeTermEvent(source, oboClass, useTermListener, isMouseOver, isHyperlink); if (!isHyperlink) // and if it is a hyperlink that whats the point??? fireTermSelect(e); } COM: <s> select obo class if its not a hyperlink then fire term select </s>
funcom_train/17544772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void viewOutput() { InputOutput io = IOProvider.getDefault().getIO(toString(), false); //InputOutput io = IOProvider.getDefault().getIO(server.toString(), toolbarActions); io.select(); io.setErrSeparated(false); getOutput().attachWriter(io.getOut()); } COM: <s> shows the server output </s>
funcom_train/46945469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuOpenItems() { if (jMenuOpenItems == null) { jMenuOpenItems = new JMenu(); jMenuOpenItems.setText("Open.."); jMenuOpenItems.setPreferredSize(new Dimension(80, 21)); jMenuOpenItems.add(getJMenuItemOpenMPEG7()); jMenuOpenItems.add(getJMenuItemOpenVideo()); } return jMenuOpenItems; } COM: <s> this method initializes j menu open items </s>
funcom_train/17468361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(FieldDescriptor type) { if (type.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { throw new IllegalArgumentException( "ExtensionRegistry.add() must be provided a default instance when " + "adding an embedded message extension."); } add(new ExtensionInfo(type, null)); } COM: <s> add a non message type extension to the registry by descriptor </s>
funcom_train/44011424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSalary() { System.out.println("getSalary"); EmployeeBO instance = new EmployeeBO(); double expResult = 0.0; double result = instance.getSalary(); 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 get salary method of class edu </s>
funcom_train/5421054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldBeIgnored(final Description description) { if (Environment.smokeTestEnabled) { return !isSmokeTest(description); } if (isSkipTestOn(description) || !isRunTestOn(description) || isBroken(description)) { return true; } if (!Environment.integrationTestEnabled) { return isIntegrationTest(description); } return false; } COM: <s> should be ignored </s>
funcom_train/8103625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFileInHomeDir(String sub_dir, String _filename,String enc,boolean b_append) { String fs = System.getProperty("file.separator"); dir = System.getProperty("user.home") + fs + ".synarcher" + fs + sub_dir + fs; SetFilename(_filename); Open(b_append, enc); } COM: <s> opens file stream in user home directory </s>