__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7422627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String writeInputParamsToYAWL(String s){ if(getInputParams().size() > 0){ for(YVariable var : getInputParams()){ s += "\t\t\t\t\t<inputParam>\n"; s += var.writeAsParameterToYAWL(); s += "\t\t\t\t\t</inputParam>\n"; } } return s; } COM: <s> serializes the list of input parameters to xml </s>
funcom_train/35355965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getMsgEndTime(Message msg) { double tEnd = 0; if (msg != null) { switch (msg.getType()) { case DR_SETPOINT: tEnd = 0; break; case INFO: case DR_COSTRATIO: case DR_RELIABILITY: tEnd = 0; break; } // switch } // if return tEnd; } COM: <s> get the end time from the message </s>
funcom_train/50916569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasContentEqualTo(CMLAtomSet otherAtomSet) { boolean result = false; if (otherAtomSet != null && this.size() == otherAtomSet.size()) { CMLAtomSet atomSet = this.complement(otherAtomSet); result = atomSet.size() == 0; } return result; } COM: <s> compare two atom sets for content </s>
funcom_train/33442050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String rewritePath(String lookupPath) { String result = null; // Rewriting URL for (Iterator<String> it = this.rewriteRules.keySet().iterator(); it .hasNext();) { String registeredPath = it.next(); Pattern p = Pattern.compile(registeredPath); Matcher matcher = p.matcher(lookupPath); if (matcher.find()) { result = replace(matcher, rewriteRules.get(registeredPath)); break; } } return result; } COM: <s> rewrite path within application according regex rules </s>
funcom_train/36048396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInstalled(Plugin p) { Collection<Map<String, List<PluginInfo>>> col = plugins.values(); for (Map<String, List<PluginInfo>> map : col) { for (List<PluginInfo> ll : map.values()) { for (PluginInfo pi : ll) { if (pi.equals((Plugin) p)) { return true; } } } } return false; } COM: <s> find out whether a plugin is already installed </s>
funcom_train/29768631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SqlAndFields getDrop(Class<?> clazz, String schema) { String fullTableName = translateClassToTable(clazz, schema); String drop = "Drop table " + fullTableName; SqlAndFields sqlAndFields = new SqlAndFields(drop, null); return sqlAndFields; } COM: <s> creates the drop </s>
funcom_train/51782855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setToDiagramSize() { setPreferredSize(new Dimension( (int) (diagram.getSize().getWidth() + MARGIN_RIGHT + MARGIN_LEFT), (int) (diagram.getSize().getHeight() + MARGIN_BOTTOM + MARGIN_TOP))); invalidate(); } COM: <s> adjusts this components preferred size attribute to the diagrams size </s>
funcom_train/14607925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setValues(Map values, String validate) throws UIException { List validatedFields = getValidatedFields(validate); for (Iterator names = values.keySet().iterator(); names.hasNext();) { String name = (String) names.next(); if (containsControl(name)) { Field field = (Field) getControl(name); setValue(field, values.get(name), values, validatedFields.contains(field)); } } } COM: <s> set values of all contained fields </s>
funcom_train/48336228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElement(String name, Hashtable atts) { if (atts.size() != 0) { currentObject.attributes = atts; } currentObject.name = name; DataObject tmp = new DataObject(); tmp.parent = currentObject; if (currentObject.parent != null) { currentObject.parent.getValue().addElement(currentObject); } currentObject = tmp; } COM: <s> this method adds an element and list of attributes to this data object </s>
funcom_train/51817666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addParameterValue(final String _name, final String _value) { List values = (List)parametersMap.get(_name); if (values == null) { values = new ArrayList(); parametersMap.put(_name, values); } values.add(_value); } COM: <s> adds a new value for the given parameter </s>
funcom_train/21436918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IonCloud clone() { IonCloud ret = new IonCloud(); for (Map.Entry<String, Integer> c : this.ions.entrySet()) ret.ions.put(c.getKey(), c.getValue()); ret.ionsNum = this.ionsNum; ret.ionsRelCount = this.ionsRelCount; ret.ionsTotalMass = this.ionsTotalMass; return ret; } COM: <s> create a copy of the object </s>
funcom_train/3380130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Identity getIdentity(PublicKey key) { if (key == null) { return null; } Enumeration<Identity> e = identities(); while (e.hasMoreElements()) { Identity i = e.nextElement(); PublicKey k = i.getPublicKey(); if (k != null && keyEqual(k, key)) { if (i instanceof Signer) { localCheck("get.signer"); } return i; } } return null; } COM: <s> get an identity by key </s>
funcom_train/25383511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContactOperations addProfileAction(long userId) { mValues.clear(); if (userId != 0) { mValues.put(SyncAdapterColumns.DATA_PID, userId); mValues.put(SyncAdapterColumns.DATA_SUMMARY, mContext .getString(R.string.profile_action)); mValues.put(SyncAdapterColumns.DATA_DETAIL, mContext .getString(R.string.view_profile)); mValues.put(Data.MIMETYPE, SyncAdapterColumns.MIME_PROFILE); addInsertOp(); } return this; } COM: <s> adds a profile action </s>
funcom_train/34009877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected QueryBuilder newQueryBuilderForTestAddSubQueryNotExistsInWhereClause(){ QueryBuilder queryBuilder = new QueryBuilderImpl(new HQLClauseFactory()); FromClause fromClause = queryBuilder.getFromClause(); fromClause.from("Cat", "mate"); WhereClause whereClause = queryBuilder.getWhereClause(); whereClause.equalsAlias("mate", "mate", "cat"); return queryBuilder; } COM: <s> create a query like </s>
funcom_train/10571314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLocalNameCollision(){ m_xc.insertAttributeWithValue("at","v1"); m_xc.insertAttributeWithValue("at","v2"); toPrevTokenOfType(m_xc,TokenType.START); m_xc.toFirstAttribute(); assertEquals(m_xc.getName().getLocalPart(),"at"); assertEquals(true, m_xc.toNextAttribute()); assertEquals(m_xc.getName().getLocalPart(),"at"); } COM: <s> no xml tag can contain 2 attrib such that </s>
funcom_train/18374801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkArguments( int row, int column ) { if (( row < 0 ) || ( row >= totalRows()) || ( column < 0 ) || ( column >= totalColumns())) { throw new IllegalArgumentException("The cell (" + row + ", " + column + ") is not in the range of the table."); } } COM: <s> checks whether the arguments are in the range of the table </s>
funcom_train/44852457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeParticipant(Long inGroupID, Long inMemberID) throws BOMChangeValueException { try { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(KEY_GROUP_ID, inGroupID); lKey.setValue(KEY_MEMBER_ID, inMemberID); delete(lKey, true); } catch (VException exc) { throw new BOMChangeValueException(exc.getMessage()); } catch (SQLException exc) { throw new BOMChangeValueException(exc.getMessage()); } } COM: <s> removes the specified participant from the specified group </s>
funcom_train/5881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showButtons(String fileName){ if (FileValidate.canWrite(fileName)) { getWizard().setNextFinishButtonEnabled(true); Core appCore = Core.getInstance(); appCore.setOutputFile(new File(fileName)); appCore.setOutputWriter(writer); } else getWizard().setNextFinishButtonEnabled(false); } COM: <s> check if file name is valid </s>
funcom_train/34898496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class App { private static IDMapperServicesAsync ourInstance = null; public static synchronized IDMapperServicesAsync getInstance() { if (ourInstance == null) { ourInstance = (IDMapperServicesAsync) GWT.create(IDMapperServices.class); ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "IDMapperServices"); } return ourInstance; } } COM: <s> utility convenience class </s>
funcom_train/22545674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canBeUnshared(LibraryTreeNode node) { if (node == null) return false; if (node == speciallySharedFilesNode) return false; if (node == incompleteFilesNode) return false; if (node == sharedFilesNode) return false; if (node == torrentsMetaFilesNode) return false; if (node.getParent() == null) return false; if (node.getParent() == sharedFilesNode) return true; return canBeUnshared((LibraryTreeNode)node.getParent()); } COM: <s> returns true if the given node is in the shared files subtree </s>
funcom_train/3908194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanup() { // Unregister and clear the proxy menus _deleteHandler.clear(); _moveUpHandler.clear(); _moveDownHandler.clear(); if(_dataModel != null) { _dataModel.removeIDataModelListener(this); } // This is important _dataModel = null; } COM: <s> over ride to clean up </s>
funcom_train/13712870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer){ return processingGraphics.drawImage(img, x, y, width, height, observer) && svgGraphics.drawImage(img, x, y, width, height, observer); } COM: <s> draws as much of the specified image as has already been scaled </s>
funcom_train/50093136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeSureAtomTypesAreRecognized(IMolecule molecule) throws CDKException { Iterator<IAtom> atoms = molecule.atoms().iterator(); CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(molecule.getBuilder()); while (atoms.hasNext()) { IAtom nextAtom = atoms.next(); Assert.assertNotNull( "Missing atom type for: " + nextAtom, matcher.findMatchingAtomType(molecule, nextAtom) ); } } COM: <s> test to recognize if a imolecule matcher correctly identifies the cdkatom types </s>
funcom_train/3392615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Symbol nameToSymbol(String name, boolean classCache) { Symbol s = null; Name nameName = env.names.fromString(name); if (classCache) s = env.symtab.classes.get(nameName); else s = env.symtab.packages.get(nameName); if (s != null && s.exists()) return s; s = javacompiler.resolveIdent(name); if (s.kind == Kinds.ERR ) return null; if (s.kind == Kinds.PCK) s.complete(); return s; } COM: <s> returns a symbol given the types or packagess canonical name </s>
funcom_train/28982995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(long spotAddress, ILowPan lowPan) { this.spotAddress = spotAddress; this.lowPan = lowPan; this.dispatcher = Dispatcher.getInstance(); this.forwardingEngine = ForwardingEngine.getInstance() ; this.output = Output.getInstance() ; this.routingTopology = RoutingTopology.getInstance(); this.state = IService.STARTING; } COM: <s> initializes the instance of gearmanager </s>
funcom_train/1443925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveStates() { this.savedStates.clear(); for (AbstractState state : this.agent.getWorld().getSelfRef() .getMyStateEval().getPossibleStates()) { this.buffer.setLength(0); this.buffer.append( Double .toString(RCMath.round(state.getStateAssessment(), 3))).append("\t").append( state.getState().toString()).append("(").append( state.getSubStateString()).append(")"); this.savedStates.add(this.buffer.toString()); } } COM: <s> saves the actual state evaluation process state name assessment </s>
funcom_train/9586291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTlvImpl(Tlv tlv) { DefensiveTools.checkNull(tlv, "tlv"); getTlvList().add(tlv); Integer type = tlv.getType(); List<Tlv> siblings = getTlvMap().get(type); if (siblings == null) { siblings = createSiblingList(); getTlvMap().put(type, siblings); } siblings.add(tlv); } COM: <s> adds a tlv to this chain </s>
funcom_train/43796119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRatingPane(int movieId, double rating, int votes){ if (movieId == _movieId){ _ratingStarsLabel.setIcon(loadImage("images\\" + (int)rating + ".gif")); _ratingLabel.setText(new DecimalFormat("0.0").format(rating) + "/10 (" + votes + " votes)"); } } COM: <s> updates the rating pane according to the given parameters </s>
funcom_train/38224143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer sb = new StringBuffer(); sb.append("[Constraint type="); sb.append(constraintType); sb.append(", link="); sb.append(link); sb.append(", linkCardinality="); sb.append(linkCardinality); sb.append("]"); return sb.toString(); } COM: <s> string representation of a link </s>
funcom_train/44317971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dialogChanged() { IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember( new Path(containerName)); String suggestion = getFileExtensionless(); if (! Utility.getAvailableName(res, suggestion).equals(getFileName())) { updateStatus("That impasse already exists."); return; } // if updateStatus(null); } // void dialogChanged() COM: <s> ensures that the selected impasse does not already exist </s>
funcom_train/35841818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComponent getHomeModelSelector() { if (homeModelSelector == null) { homeModelSelector = new UMLSearchableComboBox( homeModelComboBoxModel, new ActionSetDiagramHomeModel(), true); } return new UMLComboBoxNavigator( Translator.localize("label.namespace.navigate.tooltip"), homeModelSelector); } COM: <s> returns the home model selector </s>
funcom_train/18029046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddContext() { System.out.println("addContext"); MutablePropertyDataSet ds = null; QDataSet cds = null; DataSetUtil.addContext(ds, cds); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of add context method of class data set util </s>
funcom_train/20728973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String escapeAndQuote(String value) { String s = StringHelper.replace(value, Character.toString(quoteChar), Character.toString(quoteChar) + Character.toString(quoteChar)); return (new StringBuffer(2 + s.length())).append(quoteChar).append(s).append(quoteChar).toString(); } COM: <s> enclose the value in quotes and escape the quote </s>
funcom_train/22919051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionResponse getGenericPortMappingEntry( int newPortMappingIndex ) throws IOException, UPNPResponseException { ActionMessage msg = msgFactory.getMessage( "GetGenericPortMappingEntry" ); msg.setInputParameter( "NewPortMappingIndex", newPortMappingIndex ); try { return msg.service(); } catch ( UPNPResponseException ex ) { if ( ex.getDetailErrorCode() == 714 ) { return null; } throw ex; } } COM: <s> retreives a generic port mapping entry </s>
funcom_train/40731961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancelUpload(HttpServletRequest request) { logger.debug("UPLOAD-SERVLET (" + request.getSession().getId() + ") cancelling Upload"); AbstractUploadListener listener = getCurrentListener(request); if (listener != null && !listener.isCanceled()) { listener.setException(new UploadCanceledException()); } } COM: <s> mark the current upload process to be canceled </s>
funcom_train/31022010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionConfig(ActionConfig action) { IEasyStrutsModel model = (IEasyStrutsModel) getModel(); model.getApplicationConfig().addActionConfig(action); ((EasyStrutsFormPage)getPage(EASYSTRUTS_PAGE)).updateTree(); ((EasyStrutsFormPage)getPage(EASYSTRUTS_PAGE)).showElement(action,false); IEditable editable = (IEditable)model; editable.setDirty(true); fireSaveNeeded(); } COM: <s> method add action config </s>
funcom_train/20530662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HsqlArrayList getAllTables() { Iterator schemas = allSchemaNameIterator(); HsqlArrayList alltables = new HsqlArrayList(); while (schemas.hasNext()) { String name = (String) schemas.next(); if (SqlInvariants.isLobsSchemaName(name)) { continue; } if (SqlInvariants.isSystemSchemaName(name)) { continue; } HashMappedList current = getTables(name); alltables.addAll(current.values()); } return alltables; } COM: <s> returns an hsql array list containing references to all non system </s>
funcom_train/50846419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrepareCall() throws Exception { String sql = "CALL PI() + ?"; Connection conn = newConnection(); CallableStatement stmt = conn.prepareCall(sql); stmt.setDouble(1, Math.PI); ResultSet rs = stmt.executeQuery(); rs.next(); assertEquals((double)2*Math.PI, rs.getDouble(1)); } COM: <s> test of prepare call method of interface java </s>
funcom_train/18096398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeQuote(char newQuote) throws BadQuoteException { if (newQuote == quote) return; // no need to do anything. if (!charIsSafe(newQuote)){ throw new BadQuoteException(newQuote + " is not a safe quote."); } updateCharacterClasses(quote, newQuote); // keep a record of the current quote. quote = newQuote; } COM: <s> change this lexer so that it uses a new character for quoting </s>
funcom_train/20829727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteOrphanImages(final Gallery gallery) { for (ImageDescriptor descriptor : gallery.getImages()) { if (getGalleryCountForImage(descriptor.getId()) <= 1) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("image " + descriptor.getId() + " is now orphaned, deleting it"); } getCurrentSession().delete(descriptor); } } } COM: <s> deletes any images contained exclusively in the specified gallery </s>
funcom_train/46382453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3f getCameraLookDirection(Vector3f v) { Quaternion rot = cameraNode.getWorldRotation(); if (v == null) { v = new Vector3f(0, 0, 1); } else { v.set(0, 0, 1); } rot.multLocal(v); v.normalizeLocal(); return v; } COM: <s> returns the camera look direction as a vector </s>
funcom_train/10628669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSignumPositive() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; BigInteger aNumber = new BigInteger(aSign, aBytes); assertEquals("incorrect sign", 1, aNumber.signum()); } COM: <s> signum of a positive number </s>
funcom_train/3412644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage getSubimage (int x, int y, int w, int h) { return new BufferedImage (colorModel, raster.createWritableChild(x, y, w, h, 0, 0, null), colorModel.isAlphaPremultiplied(), properties); } COM: <s> returns a subimage defined by a specified rectangular region </s>
funcom_train/40144152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteWord(Word word) { Word deletingWord = null; Iterator<Word> wordIterator = this.words.iterator(); while (wordIterator.hasNext()) { Word aWord = wordIterator.next(); if (aWord.equals(word)) { deletingWord = aWord; break; } } if (deletingWord != null) { if (deletingWord.deleteEdges()) { boolean a = this.words.remove(deletingWord); return a; } return false; } return false; } COM: <s> deletes a word from this window </s>
funcom_train/26073073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { try { workbook.write(o_stream); } catch (IOException ioe) { String error = "IOException in "+getName()+". Message is : "; log.warn(error + ioe); if ( getMonitor() != null ) new NetErrorManager(getMonitor(),error + ioe.getMessage()); } } COM: <s> write any remaining data to the xls file </s>
funcom_train/5824112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepend(int[] ids) { if (ids != null && ids.length != 0) { int[] tmp = new int[m_data.length + ids.length]; System.arraycopy(ids, 0, tmp, 0, ids.length); System.arraycopy(m_data, 0, tmp, ids.length, m_data.length); m_data = tmp; } } COM: <s> prepends the passed set of identifiers to the front of the object </s>
funcom_train/47247677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI createPivotalTrackerURI() throws TrackerException { try { return URIUtils.createURI(protocol.toString(), PIVOTAL_TRACKER_HOST, -1, createRequestPath(), createQueryString(), null); } catch (URISyntaxException ex) { throw new TrackerException("URI construction failure", ex); } } COM: <s> create a pivotal tracker uri using the path elements and query string parameters </s>
funcom_train/23160098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: { int intensity = v.intvalue; int index = v.index; // Code magnitude into bits. int igradient = (int) (g.getmag() * fractionMagnitude) & maskMagnitude; // make all of it fit into 16 bits. int entry = (igradient << nrIntensityBits) | intensity; return new VJAlphaColor(opacityTable[entry], 255); } COM: <s> classify the interpolated voxel value and gradient magnitude </s>
funcom_train/51812387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnderlyingFileReadOnly() throws Exception { File file = createFile("Hello World"); file.setWritable(false); FileResource resource = new FileResource(file); try { resource.getOutputStream(); fail("Exception not thrown for a read only resource"); } catch (IOException e) { // expected. } } COM: <s> tests that with an underlying file set to read only the resource can </s>
funcom_train/2813514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object computeTransform(final Object src, final TransformationContext context) throws MoldException { Object computedValue = null; try { computedValue = super.computeTransform(src, context); } catch (NoSuchMethodException e) { computedValue = fldTransformation.computeTransform(src, context); } return computedValue; } COM: <s> queries the value from the source instance using the source </s>
funcom_train/48226286
/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) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getTopPanel(), java.awt.BorderLayout.NORTH); jContentPane.add(getStatusPanel(), java.awt.BorderLayout.SOUTH); jContentPane.add(getMainPanel(), java.awt.BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/38542934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getBatchRequestAt(int index) { String result = null; Object obj = this.batchRequests.elementAt(index); if (obj instanceof String) { result = (String) obj; } else { Object[] params = this.currentParams; this.currentParams = (Object[]) obj; result = buildActualQuery(); this.currentParams = params; } return result; } COM: <s> this method enables to access the batched queries </s>
funcom_train/15954638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetYear() { DataDate lDataDate1 = new DataDate(fYear,fMonth,fDay,fTimeZone); int lYear = 2000; lDataDate1.setYear(lYear); assertEquals(lYear,lDataDate1.getYear()); } COM: <s> test of set year method </s>
funcom_train/11708592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHiddenFeatures(String[] aFeatureNames) { mHiddenFeatureNames.clear(); // add default hidden features mHiddenFeatureNames.addAll(Arrays.asList(DEFAULT_HIDDEN_FEATURES)); // add user-defined hidden features mHiddenFeatureNames.addAll(Arrays.asList(aFeatureNames)); } COM: <s> configures the viewer to hide certain features in the annotation deatail pane </s>
funcom_train/39038316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawComponent(final AbstractComponent component) { this.component = component; final GridBagConstraints constraints = new GridBagConstraints(); constraints.weightx = 1.0; constraints.weighty = 1.0; constraints.fill = GridBagConstraints.BOTH; jPanel1.removeAll(); jPanel1.add(component, constraints); jPanel1.validate(); jButton1.setEnabled(true); this.open(); this.requestActive(); } COM: <s> specified component is drawn on this top component </s>
funcom_train/13773285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delItems() throws WrongLPX { ensureLPXCreated(); if ((nbMarkedColumns != 0) || (nbMarkedRows != 0)) { native_del_items(id); nbRows -= nbMarkedRows; nbCols -= nbMarkedColumns; nbMarkedRows = 0; nbMarkedColumns = 0; } } COM: <s> removes all marked rows and columns from the problem object </s>
funcom_train/30043370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Polygon rotate(Vec c, double angle) { Polygon p = new Polygon(); double sin = Math.sin(angle); double cos = Math.cos(angle); for (Vec n : points) { p.addPoint(new Vec((n.x - c.x)*cos - (n.y - c.y)*sin + c.x, (n.y - c.y)*cos + (n.x - c.x)*sin + c.y)); } return p; } COM: <s> rotates this polygon around a point </s>
funcom_train/50446731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupSocket() { if (socket != null) { synchronized (lock) { try { SMTPUtils.println(out, "RSET"); response.read(in); SMTPUtils.println(out, "QUIT"); response.read(in); } catch (java.io.IOException e) { log.error("Error quitting from validator session: " + e.getMessage(), e); } } try { socket.close(); } catch (Throwable t) { log.error("Error cleaning up validator socket: " + t.getMessage(), t); } socket = null; in = null; out = null; } } COM: <s> closes the validator socket if necessary </s>
funcom_train/12619624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Plant scanForAVisiblePlant(){ for (Plant p: plants){ // if the animal can see this plant, return it if (spritesOverlap(this.getPositionX(), this.getPositionY(), p.getPositionX(), p.getPositionY(), this.getSight(), this.getSight())) return p; } // nothing found return null; } COM: <s> try to find a plant within the sight range of the animal </s>
funcom_train/19322015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); builder.append(this.classNamePermission) .append(this.memberPermission) .append(this.objectName) .append(this.actions); return builder.toHashCode(); //return this.getName().hashCode() + this.getActions().hashCode(); } COM: <s> returns the hash code value for this object </s>
funcom_train/32974385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defineVariable(String varName, Object varValue, boolean overwrite) { final DynamicScopeContext context = scraper.getContext(); if (overwrite || context.getVar(varName) == null) { context.setLocalVar(varName, CommonUtil.createVariable(varValue)); } } COM: <s> adds or replaces variable in scrapers context </s>
funcom_train/25661297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSession(ClientSession session) { DataManager dataMgr = AppContext.getDataManager(); dataMgr.markForUpdate(this); if (session == null) { currentSessionRef = null; } else { currentSessionRef = dataMgr.createReference(session); } log.log(Level.INFO, "Set session for {0} to {1}", new Object[] { this, session }); } COM: <s> mark this player as logged in on the given session </s>
funcom_train/2968634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reinitScriptText() { if(!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { reinitScriptText(); } }); return; } String str = getCommand(currentVisibleIndex); if(!EMPTY_COMMAND.equals(str)) { scriptText.setText(str); } } COM: <s> this method sets the text of the command line with the current command </s>
funcom_train/16706828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTerms(String[] terms, String sourceSeparator) { if (sourceSeparator != null) { data[KTERMSOURCE] = terms; data[KTERMS] = new String[terms.length]; for (int i = 0; i < terms.length; i++) { data[KTERMS][i] = terms[i].substring(0, terms[i].indexOf(sourceSeparator)).trim(); } } else { data[KTERMS] = terms; data[KTERMSOURCE] = null; } setupTermIndex(); // Print.arrays("\n", data); } COM: <s> set the terms of the corpus </s>
funcom_train/42957562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void InsertUpdateStatus (boolean updateStatus, String queryType){ String successMessage = "Photo " + queryType + " successful"; String errorMessage = "Could not " + queryType + " photo"; if (updateStatus){//update successfully JOptionPane.showMessageDialog(null,successMessage, null, JOptionPane.NO_OPTION); shlContactPhotoImport.close(); } else if (!updateStatus){//could not update JOptionPane.showMessageDialog(null,errorMessage, null, JOptionPane.NO_OPTION); } } COM: <s> display meassage box based on if the photo insert update was successful unsuccessful </s>
funcom_train/27818205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calculatePreferedColumnWidth(int column) { int pref = 0; int row; for (row = 0; row < dim[ROW]; row++) if (grid[column][row] != null) { int width = grid[column][row].getPreferedWidth(); if (pref < width) pref = width; } return pref; } COM: <s> calculates the prefered width for a column </s>
funcom_train/3331018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createXMLName(Class c) { //-- create default XML name String name = c.getName(); int idx = name.lastIndexOf('.'); if (idx >= 0) name = name.substring(idx+1); return toXMLName(name); } //-- createXMLName COM: <s> creates the xml name for the given class </s>
funcom_train/25779047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IntValue_value_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IntValue_value_feature", "_UI_IntValue_type"), TestpackagePackage.Literals.INT_VALUE__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the value feature </s>
funcom_train/42279790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileProcessor getProcessorForType( String type ) { // TODO: Replace with something more smart, so that we do not ALWAYS return a fresh copy, only if required try { return (this.availProcessor.get(type).getClass().newInstance()); } catch( Exception e ) { e.printStackTrace(); return null; } } COM: <s> return the file processor for a given type </s>
funcom_train/22222599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void PanNE( int percentage ) { double deltaX = (this.getWidth() * (double)percentage / 100.0f); double deltaY = (this.getHeight() * (double)percentage / 100.0f); this.minY += deltaY; this.maxY += deltaY; this.minX += deltaX; this.maxX += deltaX; } COM: <s> implements pan ne method </s>
funcom_train/14025469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame createFrame(String title, JTable t) { JFrame result = new JFrame(title); result.setJMenuBar(createMenuBar()); result.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); result.setContentPane(new JScrollPane(t)); result.pack(); return result; } COM: <s> creates a frame with the given title and table view </s>
funcom_train/21507292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recieveBoardInfo() throws IOException { for (int cols=0; cols < NUM_COLS; cols++) { for (int rows=0; rows < NUM_ROWS; rows++) { player1Board[cols][rows] = fromPlayer1.readChar(); player2Board[cols][rows] = fromPlayer2.readChar(); } } // TESTING displayServerBoards(); } COM: <s> requests the information about where each player placed their units </s>
funcom_train/3446098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCategoryAttribute(String name, String type) { if (table.getColumn(name) != null) return; Column col = ColumnFactory.createColumn(type, name); if (col == null) { throw new java.lang.TypeNotPresentException( "No class for type "+type, null); } table.addColumn(col); } COM: <s> adds a new attribute associated with categories </s>
funcom_train/23307822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float distance(float x1, float x2, float y1, float y2, float z1, float z2) { float xdiff, ydiff, zdiff; xdiff = x2 - x1; ydiff = y2 - y1; zdiff = z2 - z1; return (float) Math.sqrt(xdiff*xdiff + ydiff*ydiff + zdiff*zdiff); } COM: <s> the private distance method </s>
funcom_train/41832444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("MantisConnectPort".equals(portName)) { setMantisConnectPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/20309963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAnonID() { boolean prior = JenaParameters.disableBNodeUIDGeneration; try { JenaParameters.disableBNodeUIDGeneration = false; doTestAnonID(); JenaParameters.disableBNodeUIDGeneration = true; doTestAnonID(); } finally { JenaParameters.disableBNodeUIDGeneration = prior; } } COM: <s> check that anon ids are distinct whichever state the flag is in </s>
funcom_train/32125692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnts() throws AntFrameworkException{ if(this.numberOfAnts <= 0){ throw new AntFrameworkException("The number of ants cannot be less than or equal to zero (0)"); } this.Ants = new Ant[this.numberOfAnts]; for(int i = 0; i < this.numberOfAnts; i++){ Ants[i] = new Ant(i,0); } } COM: <s> sets the array of ants of this enviroment </s>
funcom_train/43580087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getEntityExtractor() { if (entityExtractor == null) { entityExtractor = new JButton(); entityExtractor.setBounds(new Rectangle(140, 87, 125, 24)); entityExtractor.setText("Extract Entities"); entityExtractor.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { StartupExtraction extraction = new StartupExtraction(); extraction.startUp(analyser); hideMe(); } }); } return entityExtractor; } COM: <s> this method initializes entity extractor </s>
funcom_train/2287602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private I_CmsResourceWrapper getResourceTypeWrapper(CmsResource res) { Iterator iter = getWrappers().iterator(); while (iter.hasNext()) { I_CmsResourceWrapper wrapper = (I_CmsResourceWrapper)iter.next(); if (wrapper.isWrappedResource(m_cms, res)) { return wrapper; } } return null; } COM: <s> try to find a resource type wrapper for the resource </s>
funcom_train/40544696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinimalDate(Date d) { checkinCalendar.setMinimalDate(d); if (getInitDate() != null && GWTCDatePicker.compareDate(d, getInitDate()) < 0) { checkinCalendar.setSelectedDate(d); } updateTextElementsFromCheckin(); } COM: <s> set the minimal selectable date for the interval </s>
funcom_train/32231361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveUser(UserBean user) throws Exception { UserBean userBean = getUser(user.getUserId()); /** The userId already used, suggest non existing userId **/ if ( userBean != null && user.getId() == null ) return false; if ( user.getId() == null ) { userDao.save(user); return true; } userDao.merge(user); return true; } COM: <s> save user into database </s>
funcom_train/33991789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document batch_run( String methods, boolean serial ) throws FacebookException, IOException { List<Pair<String,CharSequence>> params = new ArrayList<Pair<String,CharSequence>>(); params.add( new Pair<String,CharSequence>( "method_feed", methods ) ); if ( serial ) { params.add( new Pair<String,CharSequence>( "serial_only", "1" ) ); } return callMethod( FacebookMethod.BATCH_RUN, params ); } COM: <s> executes a batch of queries </s>
funcom_train/28113876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void response(String line) { StringTokenizer st = new StringTokenizer(line, " "); String prefix = st.nextToken(); String rest = line.substring(prefix.length() + 1).trim(); synchronized( responses ) { responses.put(prefix, rest); responses.notifyAll(); } } COM: <s> this internal method puts a tagged response into the </s>
funcom_train/20504228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPerformance() throws Exception { // setting the expectations Performance expectedResult = new Performance(null, new Date(), null); daoMock.getPerformance(1); daoMockControl.setReturnValue(expectedResult); daoMockControl.replay(); // executing the tested method Performance result = eventsCalendar.getPerformance(1); // assertions & verifications assertEquals(expectedResult, result); daoMockControl.verify(); } COM: <s> tests the get performances id method of the events calendar service </s>
funcom_train/20109069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void err(final Context c, final Exception e) { String msg = e.getMessage(); if (msg == null) { msg = e.getClass().getName(); LogUtil.error(msg); msg = Messages.getString("ErrUtil.0"); //$NON-NLS-1$ } Toast.makeText(c, msg, Toast.LENGTH_SHORT).show(); } COM: <s> inform user of an exception call from ui thread </s>
funcom_train/24379155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getTypeAsNode(Node node, ChoiceInteractionType type) { if (type != null) { QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "choiceInteraction"); JAXBElement<ChoiceInteractionType> jaxbe = new JAXBElement<ChoiceInteractionType>(qname, ChoiceInteractionType.class, type); node = getNode(node, jaxbe); } return node; } COM: <s> gets the choice interaction type as a dom node </s>
funcom_train/37071135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean lookupDuplicatesAndSetTermId() { if (getTermId() != null) { return true; } TermTable term_table = new TermTable(conn); try { String candidate_term_id = term_table.lookupTermUsingExternalId(external_id); if (! term_table.isObsolete(candidate_term_id)) { setTermId(candidate_term_id); return true; } return false; } catch (TermTable.LookupException e) { return false; } } COM: <s> to check if this term exists external id exists and not obsolete </s>
funcom_train/12300903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGreenPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RGBType_green_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RGBType_green_feature", "_UI_RGBType_type"), SchemaPackage.Literals.RGB_TYPE__GREEN, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the green feature </s>
funcom_train/28755476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCalcmolwt(Long newVal) { if ((newVal != null && this.calcmolwt != null && (newVal.compareTo(this.calcmolwt) == 0)) || (newVal == null && this.calcmolwt == null && calcmolwt_is_initialized)) { return; } this.calcmolwt = newVal; calcmolwt_is_modified = true; calcmolwt_is_initialized = true; } COM: <s> setter method for calcmolwt </s>
funcom_train/10870387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doCompare(BitVector bv, BitVector compare) { boolean equal = true; for(int i=0;i<bv.size();i++) { // bits must be equal if(bv.get(i)!=compare.get(i)) { equal = false; break; } } assertEquals(bv.count(), compare.count()); return equal; } COM: <s> compare two bit vectors </s>
funcom_train/3721503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Structure getCurrentStructure(int rep) throws HL7Exception { Structure ret = null; if (this.currentChild != -1) { String childName = this.childNames[this.currentChild]; ret = this.currentGroup.get(childName, rep); } else { ret = this.currentGroup; } return ret; } COM: <s> returns the given rep of the structure at the current location </s>
funcom_train/8073296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean retainAll(Collection<?> c) { boolean result=false; for(int i=0;i<=lastIndex;i++) { if(isThere.get(i) && !c.contains(data[i])) { removeIndex(i); result=true; } } shrink(); return result; } COM: <s> removes all elements that are not in c </s>
funcom_train/16623820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getInput() { String txt = null; Transferable contents = clipboard.getContents(null); if((contents != null) && (contents.isDataFlavorSupported(DataFlavor.stringFlavor))) { try { txt = (String)contents.getTransferData(DataFlavor.stringFlavor); } catch (UnsupportedFlavorException e) { } catch (IOException e) { } } return txt; } COM: <s> gets text from the clipboard </s>
funcom_train/28355357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateView() { gridButton.setSelected( scopeScreen.isGridVisible() ); legendButton.setSelected( scopeScreen.isLegendVisible() ); float brightness = scopeScreen.getBrightness(); brightnessSlider.setValue( (int)(100*brightness) ); fftHandlerButton.setSelected( scopeScreen.usingFFTHandler() ); } COM: <s> update the status of components to reflect the underlying model </s>
funcom_train/15625645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateRecChange(final int x, final int y) { if (recChange.x > x) { recChange.x = x; } if (recChange.y > y) { recChange.y = y; } if (recChange.width < x) { recChange.width = x; } if (recChange.height < y) { recChange.height = y; } } COM: <s> adds a point to the set of changes </s>
funcom_train/33268917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g, Dimension size, int x, int y) { g.drawArc(x, y, 10, size.height, 90, 180); g.drawArc((x + size.width) - 10, y, 10, size.height, 270, 180); box.paint(g, boxSize, x + 10, y); } COM: <s> paints the bracket box </s>
funcom_train/27823583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = "size=" + cachemap.size() + "\n"; Iterator it = cachemap.keySet().iterator(); while (it.hasNext()) { String key = (String)it.next(); result += key + "\t" + (String)cachemap.get(key) + "\n"; } return result; } COM: <s> prints a table of cache mappings </s>
funcom_train/32762901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean publish( final Connection connection, final DatabaseAdaptor databaseAdaptor, final MachineSnapshot machineSnapshot ) { try { final ChannelSnapshotTable channelSnapshotTable = getChannelSnapshotTable( connection, machineSnapshot ); MACHINE_SNAPSHOT_TABLE.insert( connection, databaseAdaptor, channelSnapshotTable, machineSnapshot ); return true; } catch( SQLException exception ) { exception.printStackTrace(); return false; } } COM: <s> publish the specified machine snapshot </s>
funcom_train/28367776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseModelFrom(final String filename) { if (filename != null) { scheduler = new Scheduler(); parser = new Parser(); world = new World(); boolean preParseVars = false; preParseFile(filename, preParseVars); preParseVars = true; preParseFile(filename, preParseVars); alreadyParsed = new ArrayList<String>(); parseFile(filename); } } COM: <s> parses the model from an xml file </s>
funcom_train/42508856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayView(View parentView) { JFormattedTextField thicknessTextField = ((JSpinner.DefaultEditor)thicknessSpinner.getEditor()).getTextField(); if (SwingTools.showConfirmDialog((JComponent)parentView, this, this.dialogTitle, thicknessTextField) == JOptionPane.OK_OPTION) { this.controller.modifyWalls(); } } COM: <s> displays this panel in a modal dialog box </s>