__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9279447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRollbackStoredProcWithExecuteQuery() throws SQLException { Statement stmt = createStatement(); ResultSet rs = stmt.executeQuery("CALL PROC_WITH_SIDE_EFFECTS(1)"); rs.close(); rollback(); // Expect Side effects from stored procedure to be rolled back. JDBC.assertEmpty(stmt.executeQuery("SELECT * FROM SIMPLE_TABLE")); } COM: <s> tests that the effects of executing a stored procedure with </s>
funcom_train/17419821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button getBtnmark() { if (btnmark == null) { btnmark = new Button(); btnmark.setBounds(new Rectangle(550, 10, 100, 20)); btnmark.setLabel("Markierung"); btnmark.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { mark(); } }); } return btnmark; } COM: <s> this method initializes btnmark </s>
funcom_train/3813672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WordResult getWordResult(String word) { for (Set<WordResult> wordSet : values()) { for (WordResult wordResult : wordSet) { String resultSpelling = wordResult.toString(); //= wordResult.getPronunciation().getWord().getSpelling(); if (resultSpelling.equals(word)) { return wordResult; } } } return null; } COM: <s> returns the word result in this confusion set for the given word </s>
funcom_train/12179251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnderlineEmulatedWhenCssNotSupportedAndElementSupported() { Element element = doUnderlineTest(true, false); assertEquals("p", element.getName()); Element underline = (Element) element.getHead(); assertNotNull(underline); assertEquals("u", underline.getName()); } COM: <s> verify that the underline style is emulated using an element if the </s>
funcom_train/33146876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean setPrevious(byte [] sequence, int start, int length) { if (previous == null || previous.length < length) { previous = new byte [length]; } System.arraycopy(sequence, start, previous, 0, length); previousLength = length; return true; } COM: <s> copy code current code into an internal buffer </s>
funcom_train/43888335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireChange(Feature[] features, int type) { /* boundsAttribute().set(null); // must recalculate bounds CollectionEvent cEvent = new CollectionEvent( (FeatureCollection) data, features, type ); for (int i = 0, ii = listeners.size(); i < ii; i++) { ((CollectionListener) listeners.get(i)).collectionChanged(cEvent); } */ } COM: <s> to let listeners know that something has changed </s>
funcom_train/39181010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getConfiguration(String key,String defaultvalue,String err){ // If the configuration has the key, simply return the value if(rootconf.hasKey(key)){ return rootconf.get(key); } // Otherwise, log a warning and return the default value if(err!=null){ log.log(SystemLog.WARNING,err); } return defaultvalue; } COM: <s> returns a value from the root configuration or the given defalt value </s>
funcom_train/50207575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateClassSrc(FlowModelBind flowModelBind) { javaFile.getJavaClass().addModifier(Consts.MODIFIER_PUBLIC); javaFile.getJavaClass().addModifier(Consts.MODIFIER_FINAL); javaFile.getJavaClass().addInterface("IFlow"); // generate getStartFlowlets() method and the corresponding code generateGetStartFlowletsBlock(flowModelBind); // generate execute() method generateExecuteMethodSrc(flowModelBind); // generate the class's javadoc generateClassJavadoc(); // generate BSF Manager //generateBSFComponents(); } COM: <s> generates the classs source all fields and methods </s>
funcom_train/43792617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doesParentLoopMatch(Cf child, String[] tokens, Loop loop) { Cf parent = child.getParent(); if (parent == null) return false; loopMarker = loop.getParent(); for (Cf cf : parent.childList()) { if (doesLoopMatch(cf, tokens)) { cfMarker = cf; return true; } } if (doesParentLoopMatch(parent, tokens, loopMarker)) return true; return false; } COM: <s> checks if the segment or line read matches the parent loop </s>
funcom_train/12336197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IUIObserverCommand createFNewTopicCommand(Integer doneValue, Integer dumpOffset, String topic) { DefaultUIObserverCommand fNewTopicCommand = new DefaultUIObserverCommand("fNewTopic"); fNewTopicCommand.putCommandArgument("doneValue", doneValue); fNewTopicCommand.putCommandArgument("dumpOffset", dumpOffset); fNewTopicCommand.putCommandArgument("topic", topic); return fNewTopicCommand; } COM: <s> feeler new topic </s>
funcom_train/17162965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { escogerlab = new JLabel(); escogerlab.setBounds(new Rectangle(31, 16, 151, 16)); escogerlab.setText("Cambie la carpeta actual:"); jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.setBackground(Color.white); jContentPane.add(getComboCarpetas(), null); jContentPane.add(getOk(), null); jContentPane.add(escogerlab, null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/13503048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() throws ModuleShutdownException { try { consumerThread.shutdown(); reader.shutdown(); recoveryLog.shutdown("Server is shutting down."); } catch (JournalException e) { throw new ModuleShutdownException("Error closing journal reader.", role, e); } } COM: <s> tell the thread the reader and the log to shut down </s>
funcom_train/17286961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Document parseResults(InputSource in) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory bFac = DocumentBuilderFactory.newInstance(); //System.out.format("Builder is %s.\n", bFac.isNamespaceAware() ? "Namespace aware" : "Brain dead"); DocumentBuilder b = bFac.newDocumentBuilder(); Document d = b.parse(in); return d; } COM: <s> take an input source and try to parse it into a dom tree </s>
funcom_train/11745539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendPrefix(StringBuffer sqlBuffer, QuotingStrategy context) { sqlBuffer.append("ALTER TABLE "); sqlBuffer.append(context.quoteFullyQualifiedName(getEntity())); sqlBuffer.append(" ALTER "); sqlBuffer.append(context.quoteString(columnNew.getName())); sqlBuffer.append(" TYPE "); } COM: <s> append the part of the token before the actual column data type </s>
funcom_train/49200633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCopyrightPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ExhibitionModule_copyright_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ExhibitionModule_copyright_feature", "_UI_ExhibitionModule_type"), TransformedPackage.Literals.EXHIBITION_MODULE__COPYRIGHT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the copyright feature </s>
funcom_train/48148620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getVariance() { double sum = 0, mu = getMean(), x, w; if (type == DISCRETE) w = 1; else w = domain.getWidth(); for (int i = 0; i < domain.getSize(); i++) { x = domain.getValue(i); sum = sum + (x - mu) * (x - mu) * getDensity(x) * w; } return sum; } COM: <s> this method returns a default approximate variance </s>
funcom_train/45248446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean camelCaseMatch(String pattern, String name) { if (pattern == null) return true; // null pattern is equivalent to '*' if (name == null) return false; // null name cannot match return camelCaseMatch(pattern, 0, pattern.length(), name, 0, name .length()); } COM: <s> answers true if the pattern matches the given name using camel case rules </s>
funcom_train/23453179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParameterValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Parameter_parameterValue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Parameter_parameterValue_feature", "_UI_Parameter_type"), ProcessPackage.Literals.PARAMETER__PARAMETER_VALUE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the parameter value feature </s>
funcom_train/50720992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { LOGGER.info(e.toString()); if( e.getButton() == e.BUTTON3 ){ if( this.snapshotHandler != null ){ this.snapshotHandler.takeSnapshot(); } else { LOGGER.warning( "No snapshot handler was provided." ); } } else { //camera.panTiltStop(); } // end else } COM: <s> when the mouse is clicked press and release </s>
funcom_train/32144854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processScrollEvent(ScrollEvent aScrollEvent) { if (gScrollListeners != null) { for (Enumeration e = gScrollListeners.elements(); e.hasMoreElements();) { ScrollListener sl = (ScrollListener) e.nextElement(); sl.scroll(aScrollEvent); } } } COM: <s> process scroll events generated by this chax scrollable panel </s>
funcom_train/10654897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void check(final int s, final int e, final Shape a, final Container container) { assertEquals("Unexpected start line", s, line0); assertEquals("Unexpected end line", e, line1); assertSame("Unexpected shape", a, shape); assertSame("Unexpected container/host", container, host); } COM: <s> checks that fields have expected values </s>
funcom_train/28343627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyState(ProbeState state) { setSpeciesRestEnergy(state.getSpeciesRestEnergy()); setSpeciesCharge(state.getSpeciesCharge()); setCurrentElement(state.getElementId()); setPosition(state.getPosition()); setTime(state.getTime()); setKineticEnergy(state.getKineticEnergy()); } COM: <s> apply the contents of probe state to update my current state </s>
funcom_train/18570154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRdnName() { Name name; try { String fullName = context.getNameInNamespace(); NameParser parser = context.getNameParser(fullName); name = parser.parse(fullName); return name.get(name.size() - 1); } catch (NamingException e) { return "ERROR: " + e.getMessage(); } } COM: <s> returns the rdn name for the ldap entry </s>
funcom_train/20125932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initRenderer() { if (renderer instanceof AbstractRenderer) { ((AbstractRenderer)renderer).initRenderer(new File(getTemplateRoot())); } if (getGlobalTemplateRoot() != null) { if (renderer instanceof FreeMarkerRenderer) { ((FreeMarkerRenderer)renderer).setGlobalTemplateGroup(new File(getGlobalTemplateRoot())); } if (renderer instanceof StringTemplateRenderer) { ((StringTemplateRenderer)renderer).setGlobalTemplateGroup(new File(getGlobalTemplateRoot())); } } } COM: <s> renderer accessor lazy initializes renderer unsing injected factory </s>
funcom_train/10268913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getConditionValue(String cond, String var){ String[] parts = cond.split("="); for (int i = 0; i < parts.length; i+=2) { if (parts[i].trim().equalsIgnoreCase(var)) return parts[i+1].trim() ; } return null ; } COM: <s> gets the value for the specified variable in the condition string </s>
funcom_train/48406880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DirectedRelationship_source_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DirectedRelationship_source_feature", "_UI_DirectedRelationship_type"), SpemxtcompletePackage.eINSTANCE.getDirectedRelationship_Source(), false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the source feature </s>
funcom_train/44152467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double cumulativeProbability(double x) { double ret; if (Double.isNaN(x)) { ret = Double.NaN; } else if (x <= 0.0) { ret = 0.0; } else if (Double.isInfinite(x)) { ret = 1.0; } else { double r = x / scale; ret = 1.0 - Math.exp(-r * r / 2.0); } return ret; } COM: <s> the cdf for this distribution </s>
funcom_train/1474700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DecisionTree deepCopy() { DecisionTree result = new DecisionTree(); result.setStopSplitting(stopSplitting); result.setTarget(target); result.setDataSet(dataSet); result.setSelectionCriteria(selectionCriteria); result.setPruningMethod(pruningMethod); result.setPruningEnabled(pruningEnabled); result.setValidationEnabled(validationEnabled); result.setIdAttribute(idAttribute); result.setChosenAttributes(chosenAttributes); result.setLearningInstances(learningInstances); result.setLearningAttributes(learningAttributes); result.setRoot(root.deepCopy(result, null)); return result; } COM: <s> this method performs a deep copy of the tree </s>
funcom_train/5806091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String resolveAdminState(int sc) { String name = "UNKNOWN"; if (BGP_PEER_ADMIN_STATE.STOP.value() == sc) name = BGP_PEER_ADMIN_STATE.STOP.name(); if (BGP_PEER_ADMIN_STATE.START.value() == sc) name = BGP_PEER_ADMIN_STATE.START.name(); return name; } COM: <s> method to resolve a given peer state to human readable string </s>
funcom_train/26222382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFalse( String s ) { if ( s == null ) return false; if ( s.toLowerCase().equals( "false" ) ) { return true; } if ( s.toLowerCase().equals( "no" ) ) { return true; } if ( s.toLowerCase().equals( "off" ) ) { return true; } return false; } COM: <s> checks if a given string evaluates to ants false no off value </s>
funcom_train/31133194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AvnmpState getStateQueue(long t) throws NotFoundInQueueException { for(int i=0;i<size(); i++) { AvnmpState ap = (AvnmpState) get(i); if((ap.sqt == t)) return ap; } throw new NotFoundInQueueException(); } COM: <s> return a state based on time </s>
funcom_train/42382378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Pattern getPattern(int maxRep) { // race no concern: assignment is atomic, happy with any last value Pattern p = pattern.get(); if (p != null) { return p; } String regex = constructRegexp(maxRep); p = Pattern.compile(regex); pattern.set(p); return p; } COM: <s> construct the regexp string to be matched against the uri </s>
funcom_train/5164243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(String status) { int s; if (status.equals(ContactNodeUserObject.ON)) s = User.STATUS_ONLINE; else if (status.equals(ContactNodeUserObject.INVI)) s = User.STATUS_INVISIBLE; else if (status.equals(ContactNodeUserObject.DND)) s = User.STATUS_DONOTDISTURB; else if (status.equals(ContactNodeUserObject.TEL)) s = User.STATUS_ONTHEPHONE; else // if(status.equals(ContactNodeUserObject.OFF)) { //s = User.STATUS_OFFLINE; logout(); return; } server.getPort().send(new MsgStatusChange(bean.getUserID(), s)); } COM: <s> sets status of current user </s>
funcom_train/31056393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RemoteCell getRemoteCell() throws CellConnectException { String name = "//" + host + ":" + port + "/" + RMI_NAME; try { RemoteCell rs = (RemoteCell)Naming.lookup( name ); return rs; } catch( Exception error ) { // Debug.warning( "Couldn't find server at " + name ); throw new CellConnectException( error ); } } COM: <s> find the cell on the specified remote host </s>
funcom_train/197255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getSelectedFile() { File f = super.getSelectedFile(); FileFilter ff = getFileFilter(); if ((getDialogType() == SAVE_DIALOG) && (f != null) && (ff instanceof ExtensionFileFilter)) { ExtensionFileFilter eff = (ExtensionFileFilter) ff; return getCorrectedFileName(f, null, eff); } return f; } COM: <s> overrides get selected file from swings jfile chooser </s>
funcom_train/3197161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureAntProject(sypher.aardvark.Project _project) { _p = new Project(); _p.setName(_project.getName()); _p.init(); _baseDir = PROJECT_DIR + _project.getName(); _targets = _project.getTargets(); //set up the properties Properties props = _project.getProperties(); Enumeration enum = props.propertyNames(); String s = null; while (enum.hasMoreElements()) { s = (String) enum.nextElement(); _p.setProperty(s, props.getProperty(s)); } } COM: <s> takes a sypher </s>
funcom_train/5872933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyPlotEvent(OccurEvent oe) { if (_mdyEvtList == null) _mdyEvtList = new LinkedList(); _mdyEvtList.add(oe); if (getAttribute(ATTR_ON_MODIFY_EVENT_RESPONSE) == null) { setAttribute(ATTR_ON_MODIFY_EVENT_RESPONSE, Boolean.TRUE); Events.postEvent(-20000, "onModifyEventResponse", this, null); } } COM: <s> modify occur event in the plotinfo </s>
funcom_train/49249372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeSpi(String key) { Element node = myXMLNode(); if (node != null) { Element map = (Element)node.getElementsByTagName("map").item(0); NodeList entries = myEntries(); for (int i=0 ; i<entries.getLength() ; i++) { Element entry = (Element)entries.item(i); String nodeKey = entry.getAttribute("key"); if (nodeKey.equals(key)) { map.removeChild(entry); } } } } COM: <s> removes a given key from this node on the backing store </s>
funcom_train/30229474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String print() { BJCard c; String returnMe = new String(); for (int i=0; i< vCards.size(); i++) { c = (BJCard) vCards.elementAt(i); if (c.getIsFaceDown()) c.flipCard(); returnMe = c.print() + ' ' + returnMe; // This prints top card at beginning of string } // (which is the opposite of the programming, fyi) return returnMe; } COM: <s> facilitator display deck information </s>
funcom_train/35605619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyStatusCodeIfPossible(HttpServletRequest request, HttpServletResponse response, int statusCode) { if (!WebUtils.isIncludeRequest(request)) { if (logger.isDebugEnabled()) { logger.debug("Applying HTTP status code " + statusCode); } response.setStatus(statusCode); request.setAttribute(WebUtils.ERROR_STATUS_CODE_ATTRIBUTE, statusCode); } } COM: <s> apply the specified http status code to the given response if </s>
funcom_train/25194033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAllowedAssociation(String attributePath) { switch(associationConstrainType) { case ALLOW_ALL_ASSOCIATIONS: return true; case DONT_ALLOW_ANY_ASSOCIATIONS: return false; case ALLOW_ASSOCIATIONS_IN_LIST: return getAssociations().contains(attributePath); case DONT_ALLOW_ASSOCIATIONS_IN_LIST: return !getAssociations().contains(attributePath); default: return true; } } COM: <s> this method determines wether this association with the given attribute path </s>
funcom_train/17009075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTaskComplete() { boolean taskComplete = false; if (executionProfile.isExecuteOnce()) { taskComplete = true; } if (executionProfile.isStayAlive() || executionProfile.isExecutePeriodically()) { if (operation.terminationConditionReached()) { taskComplete = true; } } if (executionProfile.isExcuteAFixedNumberOfTimes()) { int maxLimit = executionProfile.getNumberOfTimesToExecute(); if (numOfIterations >= maxLimit) { taskComplete = true; } } return taskComplete; } COM: <s> checks to see if the task is complete </s>
funcom_train/7432267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() throws PrinterException { final PrinterJob printJob = PrinterJob.getPrinterJob(); final PageFormat pageFormat = printJob.defaultPage(); final Book book = new Book(); book.append(this, pageFormat); printJob.setPageable(book); if (printJob.printDialog()) { printJob.print(); } } COM: <s> constructs a new printer job allows the user to select which printer to </s>
funcom_train/48704947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openExternalLink(String fieldName, MouseEvent e) { final int row = glTable.rowAtPoint(e.getPoint()); BibtexEntry entry = sortedList.get(row); Object link = entry.getField(fieldName); try { if (link != null) Util.openExternalViewer(panel.metaData(), (String) link, fieldName); } catch (IOException ex) { ex.printStackTrace(); } } COM: <s> open old style external links after user clicks icon </s>
funcom_train/42134636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pausePlayback(Session session) throws IOException { String url = PROTOCOL + server + PORT_SEPARATOR + port + PATH_SEPARATOR + PATH + session.getId(); RTSPPauseRequest request = null; status.setStatusText("Pausing Playback..."); status.setPercentComplete(STARTING); String serverSessionId = session.getServerSessionId(); request = new RTSPPauseRequest(url, serverSessionId); sendRequest(request); status.setStatusText(DONE_STATUS_TEXT); status.setPercentComplete(COMPLETE); } COM: <s> pauses the playback of a session </s>
funcom_train/5425745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortEnabled(final boolean enable) { this.isSortEnabled = enable; final FilterModel fm = (FilterModel) getModel(); if (fm != null) { fm.rebuildIndex(); } // must repaint as sorting images are not bound properties final JTableHeader th = getTableHeader(); if (th != null) { th.repaint(); } } COM: <s> enable or disable sorting on this table </s>
funcom_train/47679617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String genJSArrays() { if (columnAliases == null) return ""; String js; js = "queryId = \"" + queryId.toLowerCase() + "\";\n" + "colNames = new Array("; for (int i = 0; i < columnAliases.length; i++) { js += "\"" + getFilteredColumnName(i) + "\","; } int len = js.length(); js = js.substring(0, len - 1); js += ");\n"; return js; } COM: <s> generates a java script array of the column aliases </s>
funcom_train/9215507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector requestMentionsTimelineJson(String sinceId) throws TwitterException { if (sinceId != null && sinceId.length() > 0) { sinceId = "since_id="+StringUtil.urlEncode(sinceId); } HttpUtil.setBasicAuthentication(username, password); return requestTimelineJson(gateway_proxy+MENTIONS_TIMELINE_PROXY, prepareParamCount(sinceId)); } COM: <s> request responses timeline from twitter api </s>
funcom_train/45786262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJrbtInd() { if (jrbtInd == null) { jrbtInd = new JRadioButton(); jrbtInd.setBounds(new Rectangle(230, 42, 97, 20)); jrbtInd.setText("Individual"); jrbtInd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (jrbtInd.isSelected()) { cargarIndividuales(); } } }); } return jrbtInd; } COM: <s> this method initializes jrbt ind </s>
funcom_train/8349133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public El unmask() { if (_mask != null) { if (_maskMsg != null) { _maskMsg.remove(); _maskMsg = null; } _mask.setVisible(false); _mask.remove(); _mask = null; removeStyleName("x-masked", "x-masked-relative"); } return this; } COM: <s> removes a previously applied mask </s>
funcom_train/49639748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNull() { assertEquals(null, Environment.escapeSystemProperties((String)null)); assertEquals(null, Environment.escapeSystemProperties((String[])null)); assertEquals(null, Environment.escapeSystemProperties((Iterable<String>)null)); } COM: <s> test null in properties </s>
funcom_train/16857640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showMsgSync(){ Label label = new Label("Synchronisation en cours..."); label.setSize("100%", "100%"); label.setStyleName("gwt-label"); popup.setWidget(label); popup.setAnimationEnabled(true); popup.addStyleName("gwt-popup"); popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int offsetWidth, int offsetHeight) { int left = 0; int top = (Window.getClientHeight() - offsetHeight) / 2; popup.setPopupPosition(left, top); } }); } COM: <s> shows the message indicating that synchronization is in progress </s>
funcom_train/41064435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { String driver = "com.mysql.jdbc.Driver"; // TODO You may change this connection to your own MySQL database String connection = "jdbc:mysql://localhost:3306/test?user=root&password=89djm0210"; try { Class.forName(driver); conn = (Connection) DriverManager.getConnection(connection); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> sets up the connection with the database </s>
funcom_train/16578147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getChkTransparency() { if (chkTransparency == null) { chkTransparency = new JCheckBox(); chkTransparency.setText(PluginServices.getText(this, "wms_transparency")); chkTransparency.setSelected(true); chkTransparency.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { fireWizardComplete(isCorrectlyConfigured()); } }); chkTransparency.setBounds(5, 168, 441, 21); } return chkTransparency; } COM: <s> this method initializes chk trasparency </s>
funcom_train/15732018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClasspath(URL[] extra){ if(urls == null){ urls = extra; }else{ URL[] newpath = new URL[urls.length + extra.length]; System.arraycopy(urls, 0, newpath, 0, urls.length); System.arraycopy(extra, 0, newpath, urls.length, extra.length); urls = newpath; } } COM: <s> add an array of classpath urls to the current classpath </s>
funcom_train/2583103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String removeStringDelimiters(String key) { String k = key.trim(); if (k.charAt(0) == this.textDelimiter) { k = k.substring(1); } if (k.charAt(k.length() - 1) == this.textDelimiter) { k = k.substring(0, k.length() - 1); } return k; } COM: <s> removes the string delimiters from a key as well as any white space </s>
funcom_train/10204989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInterfacePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MClass_interface_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MClass_interface_feature", "_UI_MClass_type"), ClassDiagramPackage.Literals.MCLASS__INTERFACE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the interface feature </s>
funcom_train/7848289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDirectory(final String path) { retrieveDirectory(path); // display these images final Context context = this; ArrayAdapter<String> filenamesAdapter = new ArrayAdapter<String>(this, getTextViewId(), this.currentFiles) { @Override public View getView(final int position, final View convertView, final ViewGroup parent) { return new IconifiedTextLayout(context, getItem(position), position); } }; setListAdapter(filenamesAdapter); } COM: <s> show the contents of a given directory as a selectable list </s>
funcom_train/20294634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(int tmp1, String tmp2) { if (!exists(tmp1)) { LookupElement thisElement = new LookupElement(); thisElement.setCode(tmp1); thisElement.setDescription(tmp2); if (this.size() > 0) { this.add(0, thisElement); } else { this.add(thisElement); } } } COM: <s> adds a feature to the item attribute of the lookup list object </s>
funcom_train/36005629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAll() { if (child != null) { Widget focusedWidget = null; FocusManager focusManager = getFocusManager(); if (focusManager != null) { focusedWidget = focusManager.getFocusedWidget(); } Widget widget = child; Widget nextWidget = null; while (widget != null) { nextWidget = widget.next; widget.next = widget.previous = widget.parent = null; if (widget == focusedWidget) { focusManager.requestFocus(null); } onChildRemoved(widget); widget.onRemoved(this); widget = nextWidget; } child = null; lastChild = null; invalidate(); } System.gc(); } COM: <s> remove all childs </s>
funcom_train/18836068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJob(Long jobID, String name) { if(this.sessions.indexOf(jobID) == -1) { int selectedSession = this.cgSession.append(name, null); this.sessions.insertElementAt(jobID, selectedSession); this.cgSession.setLabel(this.cgSession.size() + " jobs available"); this.cgSession.setSelectedIndex(selectedSession, true); } } COM: <s> adds a job to the list of jobs if it doesnt yet exists </s>
funcom_train/4646425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GalleryItem getItem(Point coords) { checkWidget(); if (DEBUG) System.out.println("getitem " + coords.x + " " + coords.y); //$NON-NLS-1$ //$NON-NLS-2$ int pos = vertical ? (coords.y + translate) : (coords.x + translate); GalleryItem group = this._getGroup(coords); if (group != null) return groupRenderer.getItem(group, new Point(vertical ? coords.x : pos, vertical ? pos : coords.y)); return null; } COM: <s> get item at pixel position </s>
funcom_train/10948186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteCharArrayPartial() { StringBuilderWriter writer = new StringBuilderWriter(); ProxyWriter proxy = new ProxyWriter(writer); try { proxy.write(new char[] {'A', 'B', 'C'}, 1, 2); } catch(Exception e) { fail("Writing char[] threw " + e); } assertEquals("BC", writer.toString()); } COM: <s> test writing a partial char array </s>
funcom_train/46404456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Document getDocument(String url) throws IOException, JDOMException { SAXBuilder parser = new SAXBuilder(); try { return parser.build(url); } catch (IOException ex) { System.out.println(ex.getMessage()); return null; } catch (JDOMException ex) { System.out.println(ex.getMessage()); return null; } } COM: <s> privat help method to get a document by url </s>
funcom_train/41266279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Prounimed entity) { EntityManagerHelper.log("saving Prounimed instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved prounimed entity </s>
funcom_train/22948760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getOffset() { int off = Integer.MIN_VALUE; while (off <= 0) { String s = JOptionPane.showInputDialog("Set offset", JOptionPane.QUESTION_MESSAGE); try { off = Integer.valueOf(s); } catch (NumberFormatException e) { logger.error("Invalid number entered", e); off = -1; } } return off; } COM: <s> gathers offset value by asking user to enter it into input dialog </s>
funcom_train/17424160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassDef getDefaultClassdef(String type, String classname) { ClassDef classDef = null; if (type.equals("dto") || type.equals("bean")) { return new ClassDef(classname, patternName); } else if (type.equals("nonbean")) { return new NonBeanClass(classname, patternName); } return null; } COM: <s> returns an instance of the default definitition for the class requested </s>
funcom_train/12758051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNewErrorDefinition() { try { ErrorDefinition def = new ErrorDefinition(); errorDefinitions.addErrorDefinition(def); markChanged(def); def.markNew(); ErrorCodeRow row = new ErrorCodeRow(def); errorCodeTableModel.addRowData(row); int index = errorCodeTableModel.getRowFor(row); errorCodeTable.getSelectionModel().setSelectionInterval(index, index); } catch (Throwable e1) { JOptionPane.showMessageDialog(this, e1.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } } COM: <s> method create new error definition </s>
funcom_train/33789782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCloseButton() { if (closeButton == null) { closeButton = new JButton(); closeButton.setBounds(new Rectangle(70, 230, 240, 30)); closeButton.setText("Chiudi"); closeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { base.mostraRidotto(); } }); } return closeButton; } COM: <s> this method initializes close button </s>
funcom_train/3549955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindNodeByIdNonExisentNode() { try { MemoryVocabSetFactory factory = MemoryVocabSetFactory.getInstance(); VocabSet set = factory.getVocabSet(); VocabNode foundNode = set.findVocabNodeById(new Integer(-1)); Assert.assertNull("found node must be null as it doesn't exist", foundNode); } catch (VocabException e) { Assert.fail("VocabException produced"); } } COM: <s> tests look up with a known non valid id </s>
funcom_train/8629300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort() { // insertion sort for (int i = 1, j; i < size(); i++) { int t = get(i); for (j = i - 1; j >= 0 && (get(j) > t); j--) { set(j + 1, get(j)); } set(j + 1, t); } } COM: <s> sort the array by value </s>
funcom_train/33481415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addListener() { tfNumberField.addListener(new TextFieldListenerAdapter() { @Override public void onSpecialKey(Field field, EventObject e) { if (e.getKey() == EventObject.ENTER) { checkValue(); } } }); btOk.addListener(new ButtonListenerAdapter() { @Override public void onClick(Button button, EventObject e) { checkValue(); } }); btCancel.addListener(new ButtonListenerAdapter() { @Override public void onClick(Button button, EventObject e) { hide(); } }); } COM: <s> add listener for the component </s>
funcom_train/11075371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Pointer getSingleNodePointer() { if (position == 0) { while (nextSet()) { prepare(); if (iterator == null) { return null; } // See if there is a property there, singular or collection NodePointer pointer = iterator.getNodePointer(); if (pointer != null) { return pointer; } } return null; } return getCurrentNodePointer(); } COM: <s> this method is called on the last context on the path when only </s>
funcom_train/7867871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endTest() { if (watchDog != null) { watchDog.interrupt(); watchDog = null; } sendMessage("Network.disable"); sendMessage("Timeline.stop"); result.setEnd(); TestResult lastResult = result; setTest(null); notifyTestCompleted(lastResult); } COM: <s> ends the test </s>
funcom_train/5715140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElement(FLGTourElement a_tourElement){ this.m_tourElements.add(a_tourElement); this.fireTourChanged(new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, this.m_tourElements.size()-1, this.m_tourElements.size()-1)); } COM: <s> adds the given tour element as throws elast element </s>
funcom_train/11687766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimeoutsReceiving() { if (endpoint.getChildren() != null) { long timeoutsReceiving = 0; for (Endpoint e : endpoint.getChildren()) { if (e.getMetricsMBean() != null) { timeoutsReceiving += e.getMetricsMBean().getTimeoutsReceiving(); } } return timeoutsReceiving; } else { return timeoutsReceiving; } } COM: <s> number of timeouts receiving replies </s>
funcom_train/37422719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addAND(String pStr, int pIndexOR){ TransExpression tExpr = new TransExpression(pStr); int tIndex = -1; if(pIndexOR < cVetOR.size()){ Vector tVetAnd = (Vector) cVetOR.get(pIndexOR); tIndex = tVetAnd.size(); tVetAnd.add(tExpr); cVetOR.set(pIndexOR,tVetAnd); }else return -1; return tIndex; } COM: <s> adds a new and expression to the transition condition </s>
funcom_train/12565198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SVGRect toSVGRect(final float[][] viewBox) { if (viewBox == null) { return null; } SVGRect r = new Box(viewBox[0][0], viewBox[0][1], viewBox[1][0], viewBox[2][0]); return r; } COM: <s> converts a view box array to an svgrect value </s>
funcom_train/5245235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GBelief clone() { if (hasLiteral()) { if (referstoGoal()) { GBelief gb1 = new GBelief(getGoal().clone()); gb1.setDBnum(getDBnum()); return gb1; } else { GBelief gb1 = new GBelief(getCategory(), (Literal) getLiteral().clone()); gb1.setDBnum(getDBnum()); return gb1; } } else { GBelief gb1 = new GBelief(getCategory()); gb1.setDBnum(getDBnum()); return gb1; } } COM: <s> clone this gbelief useful when propagating guards through intention structures </s>
funcom_train/22238033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LSIDAuthorityPort getAuthorityPort() { LSIDAuthorityPort port = getAuthorityPortForProtocol(HTTP); if (port != null) return port; port = getAuthorityPortForProtocol(SOAP); if (port != null) return port; if (!lsidAuthorityPorts.keys().hasMoreElements()) return null; return (LSIDAuthorityPort) lsidAuthorityPorts.get(lsidAuthorityPorts.keys().nextElement()); } COM: <s> get an arbitrary authority port if one exists </s>
funcom_train/7443874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getInboundEntityStream(long size, boolean chunked) { InputStream result = null; if (chunked) { result = new ChunkedInputStream(this, getInboundStream()); } else if (size >= 0) { result = new SizedInputStream(this, getInboundStream(), size); } else { result = new ClosingInputStream(this, getInboundStream()); } return result; } COM: <s> returns the inbound message entity stream if it exists </s>
funcom_train/49026781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getIngredienteB() { if (ingredienteB == null) { ingredienteB = new JButton(); ingredienteB.setFont(new Font("Dialog", Font.BOLD, 12)); ingredienteB.setText("Inserisci"); ingredienteB.setIcon(new ImageIcon(getClass().getResource("/icone/folder-full-add-icon.png"))); ingredienteB.setEnabled(false); ingredienteB.addActionListener(this); } return ingredienteB; } COM: <s> this method initializes ingrediente b </s>
funcom_train/21607316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseConstructorArgElements(Element beanEle, BeanDefinition bd) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element && DomUtils.nodeNameEquals(node, CONSTRUCTOR_ARG_ELEMENT)) { parseConstructorArgElement((Element) node, bd); } } } COM: <s> parse constructor arg sub elements of the given bean element </s>
funcom_train/7866528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AclEntry addAclRole(AclRole role, AclScope scope, String resourceId) throws Exception { if (role == null || scope == null || resourceId == null) { throw new RuntimeException("null passed in for required parameters"); } AclEntry entry = new AclEntry(); entry.setRole(role); entry.setScope(scope); URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId + URL_ACL); return service.insert(url, entry); } COM: <s> add an acl role to an object </s>
funcom_train/7616280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AffineTransform getTransform() { Object transform = fRequestedAttributes.get(TextAttribute.TRANSFORM); if (transform != null) { if (transform instanceof TransformAttribute) { return ((TransformAttribute)transform).getTransform(); } if (transform instanceof AffineTransform) { return new AffineTransform((AffineTransform)transform); } } else { transform = new AffineTransform(); } return (AffineTransform)transform; } COM: <s> gets the transform acting on this font from the fonts attributes </s>
funcom_train/36994961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TextStyleChangeRecord getStyleChange( TextItem item ) { // create text style change record TextStyleChangeRecord ts = new TextStyleChangeRecord(); if( item != null ) { ts.setFont(item.font); ts.setHeight(item.height); ts.setColor(item.color); } return ts; } COM: <s> creates text style change record from specified text item </s>
funcom_train/26264166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object findEntity(Object[] key) throws FinderException, RemoteException { try { Map result = new HashMap(); for (int i = 0; i < key.length; i++) { int iProperty = getIndexesPK()[i]; String name = getPropertiesNames().get(iProperty); result.put(name, key[i]); } return result; } catch (Exception ex) { log.error(ex.getMessage(), ex); throw new RemoteException( XavaResources.getString("tab_entity_find_error")); } } COM: <s> return a map with key values </s>
funcom_train/26505741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDuplicate(HubUser usr) { ArrayList searches = model.getRows(); for (int i = 0; i < searches.size(); i++) { if (((HubUser) (searches.get(i))).getNick().equals(usr.getNick())) { return true; } } return false; } COM: <s> gets the duplicate attribute of the recent hubs component object </s>
funcom_train/13492607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object perform(Term[] parameter,Session session) throws IllegalArgumentException, UnsupportedOperationException { Calendar c1,c2 = null; try { c1 = (Calendar) (parameter[0].resolve (session)); c2 = (Calendar) (parameter[1].resolve (session)); } catch(Exception x) { throw new IllegalArgumentException (); } return new Boolean (compute (c1, c2)); } COM: <s> perform the predicate using an array of terms as parameters </s>
funcom_train/16218248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeImage(String key, BufferedImage image) { if (this.imageBank.get(key) != null) { throw new ArrayStoreException("Key -> " + key + " is bounded to " + this.imageBank.get(key)); } this.imageBank.put(key, image); } COM: <s> stores image into cache with specified key </s>
funcom_train/34996506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jLabel_waiting = new JLabel(); jLabel_waiting.setBounds(new Rectangle(17, 22, 229, 17)); jLabel_waiting.setText("waiting ..."); jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(jLabel_waiting, null); jContentPane.add(getJProgressBar(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/29944199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyWhile(ASTWhile n) { IRGExpr egen = new IRGExpr(_theCode,_theFact); Label endLoop = _theCode.newLabel(); Label headLoop = _theCode.newLabel(); Location c = egen.doIt(n.getCond()); _theCode.jumpz(c,endLoop); doIt(n.getBody()); _theCode.jump(headLoop); _theCode.setLabel(endLoop); } COM: <s> generate the intermediate code for while loop </s>
funcom_train/2576622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double estimateMaximumTickLabelHeight(Graphics2D g2) { RectangleInsets tickLabelInsets = getTickLabelInsets(); double result = tickLabelInsets.getTop() + tickLabelInsets.getBottom(); Font tickLabelFont = getTickLabelFont(); FontRenderContext frc = g2.getFontRenderContext(); result += tickLabelFont.getLineMetrics("123", frc).getHeight(); return result; } COM: <s> estimates the maximum tick label height </s>
funcom_train/35309792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getIcon(File f) { Icon icon = null; if (f != null) { if(getFileView() != null) { icon = getFileView().getIcon(f); } FileView uiFileView = getUI().getFileView(this); if(icon == null && uiFileView != null) { icon = uiFileView.getIcon(f); } } return icon; } COM: <s> returns the icon for this file or type of file depending </s>
funcom_train/7645188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHostPort() { if (hostPort < 0) { // the value was not set yet if (proxy != null) { hostPort = ((InetSocketAddress) proxy.address()).getPort(); } else { hostPort = url.getPort(); } if (hostPort < 0) { hostPort = defaultPort; } } return hostPort; } COM: <s> get the connection port </s>
funcom_train/8092526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String globalInfo() { return "Class implementing minimal cost-complexity pruning.\n" + "Note when dealing with missing values, use \"fractional " + "instances\" method instead of surrogate split method.\n\n" + "For more information, see:\n\n" + getTechnicalInformation().toString(); } COM: <s> return a description suitable for displaying in the explorer experimenter </s>
funcom_train/33241447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Object oldHint = g2.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); g2.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); super.paint(g2); g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, oldHint); } COM: <s> enables text anti aliasing on paints and restores the old state </s>
funcom_train/10276031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push() throws IOException, BlitzException { BlitzServerResponse response; // Send push and read response socket.println("PUSH"); response = socket.readLine(); switch (response.getCode()) { case 10: // Ok. folders = new BlitzFolderList(socket); return; default: // Error throw new BlitzException(response.getCode(), response.getData()); } } COM: <s> pushes off a duplicate user </s>
funcom_train/3702492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(String strPath, InfoSpaceListener lstnr) { //// 1. Fix the path. if (KEY_ALL.equals(strPath) == false) { strPath = InfoSpaceHttpLib.canonicalizePath(strPath); } //// 2. Remove. mapInfoSpaceListeners.removeKeyValue(strPath, lstnr); } // of method COM: <s> remove a listener on this info space </s>
funcom_train/36957422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runWhenNextVisible() { // if there is one already: toggling twice is the identity if (fFoldingRunner != null) { fFoldingRunner.cancel(); return; } IWorkbenchPartSite site= getSite(); if (site != null) { IWorkbenchPage page= site.getPage(); if (!page.isPartVisible(RubyEditor.this)) { // if we're not visible - defer until visible fPage= page; fFoldingRunner= this; page.addPartListener(this); return; } } // we're visible - run now toggleFolding(); } COM: <s> makes sure that the editors folding state is correct the next time </s>