__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/8022184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetServerType() { System.out.println("getServerType"); Config instance = new Config(); String expResult = ""; String result = instance.getServerType(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get server type method of class vgrabber </s>
funcom_train/22205841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOfType(Locator subjectOrIndicator) { if (m_provider.isTransactionOpen()) { return isOfType(m_provider.getOpenTransaction(), subjectOrIndicator); } else { ProviderTransaction txn = m_provider.openTransaction(); boolean ret = isOfType(txn, subjectOrIndicator); txn.rollback(); return ret; } } COM: <s> determines whether this topic is typed by a topic whose subject </s>
funcom_train/1069413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTagLabel(String keyword) { FontData[] fontdata={new FontData(this.fontString, this.fontSize, SWT.NORMAL)}; Font font = PapyrusPlugin.fontManager.get(fontdata); Label label = new Label(); label.setFont(font); label.setForegroundColor(this.fontColor); label.setOpaque(false); label.setText(PapyrusPlugin.ST_LEFT+keyword+PapyrusPlugin.ST_RIGHT); // Add the tag label to the figure at the position 0 this.add(label, 0); this.tagLabel = label; } COM: <s> this method is used to create the tag label in the figure </s>
funcom_train/45518097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(final UserAgent userAgent) throws IOException { document = getFactory().createSVGDocument(source); BridgeContext bridgeContext = new BridgeContext(userAgent); GVTTreeBuilder builder = new GVTTreeBuilder(document, bridgeContext); builder.addGVTTreeBuilderListener(this); builder.run(); try { builder.join(); } catch (InterruptedException ie) { log.warn("JVT builder interrupted for " + id); } } COM: <s> loads the svg image from source </s>
funcom_train/7630964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initLabelView() { mTextPaint = new Paint(); mTextPaint.setAntiAlias(true); mTextPaint.setTextSize(16); mTextPaint.setColor(0xFF000000); mPaddingLeft = 3; mPaddingTop = 3; mPaddingRight = 3; mPaddingBottom = 3; } COM: <s> construct object initializing with any attributes we understand from a </s>
funcom_train/20081641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDependencyFromName(final String dependency) { // Don't add null or array dependencies if ((dependency != null) && (!dependency.startsWith("["))) { // Convert to standard package name dependencies.add(dependency.replace('/', '.')); } } COM: <s> add a full class name to the dependencies set </s>
funcom_train/3461522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNormalStyle(){ HSSFCellStyle _styleNormal = mWorkbook.createCellStyle(); _styleNormal.setWrapText(true); _styleNormal.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP); _styleNormal.setAlignment(HSSFCellStyle.ALIGN_LEFT); _styleNormal.setFont(mFontNormal); _styleNormal.setBorderBottom(HSSFCellStyle.BORDER_THIN); _styleNormal.setBorderTop(HSSFCellStyle.BORDER_THIN); _styleNormal.setBorderLeft(HSSFCellStyle.BORDER_THIN); _styleNormal.setBorderRight(HSSFCellStyle.BORDER_THIN); mStyleNormal = _styleNormal; } COM: <s> set the normal style </s>
funcom_train/39397963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDomainRule(String[] domainParts, int nrOfDomainsToTake, int pathLengthToUse) { String topLevelDomain = domainParts[domainParts.length - 1]; DomainData domainData = new DomainData(domainParts,nrOfDomainsToTake,pathLengthToUse); addDomainData(topLevelDomain,domainData); } COM: <s> expects the data of a domain rule in the form </s>
funcom_train/7790352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserData findUserByUserID(String accountName) { UserData found = null; ArrayList<UserData> friends = this.getCurrentProfile().getAllFriends(); for (UserData user : friends) { // Temp fix for switching conversations if (user.getUserID().equals(accountName) || user.getNickname().equals(accountName)) { found = user; break; } } return found; } COM: <s> searches for a friend in all the accounts of the current profile by </s>
funcom_train/17714042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Advertiser retrieveAdvertiser(String id) throws Exception { IAdvertiserDAO dao = null; Advertiser retValue = null; try { dao = AbstractJASSDAOFactory.getJASSDAO().getAdvertiserDAO(); retValue = dao.retrieveAdvertiser(id); } catch (Exception ex) { logger.log(Level.SEVERE, null, ex); ex.printStackTrace(); } finally { dao = null; } return retValue; } COM: <s> this operation will retrieve advertiser object from persistent </s>
funcom_train/22579485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setNumInterfaces(ManagedDevice dev) { String sqlString = null; sqlString = new String ("UPDATE "+M_TBL_NAME + " SET numberOfInterfaces='"+dev.getIfNumber()+"'" + " WHERE deviceID="+dev.getDeviceID()); System.out.println("\nDbManagedDevice.setNumInterfaces:\n sqlString = "+sqlString); return executeUpdate(sqlString); } COM: <s> update a managed device records number of interfaces </s>
funcom_train/2365133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPopupShellTitle() { IProduct product = Platform.getProduct(); if (product != null) { String productName = product.getName(); String LABEL_SDK = "SDK"; if (productName.endsWith(LABEL_SDK)) { productName = productName.substring(0, productName.length() - LABEL_SDK.length()); } return productName + " " + LABEL_NOTIFICATION; } else { return LABEL_NOTIFICATION; } } COM: <s> override to return a customized name </s>
funcom_train/31322306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(GameEvent e) throws IOException { byte[] messageBytes = marshalMessage(e); out.writeInt(messageBytes.length); out.write(messageBytes, 0, messageBytes.length); out.flush(); logger.debug("Message size: " + messageBytes.length); } COM: <s> send the game event down the socket </s>
funcom_train/46098767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ticker getTicker() { if (ticker == null) {//GEN-END:|90-getter|0|90-preInit // write pre-init user code here ticker = new Ticker("");//GEN-LINE:|90-getter|1|90-postInit // write post-init user code here }//GEN-BEGIN:|90-getter|2| return ticker; } COM: <s> returns an initiliazed instance of ticker component </s>
funcom_train/7685498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFromTextFromMessageThread(String spaceSeparatedRcptIds) { // Thread IDs could in-theory be reassigned to different // recipients (if latest threadid was deleted and new // auto-increment was assigned), so our cache key is the // space-separated list of recipients IDs instead: String value = mThreadDisplayFrom.get(spaceSeparatedRcptIds); if (value != null) { return value; } return null; } COM: <s> returns cached from text of message thread display form of list of recipients </s>
funcom_train/21160357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOkButton() { if (OkButton == null) { OkButton = new JButton(); OkButton.setText(LanguageResource.getString("OKBUTTON_STR") ); OkButton.setMinimumSize(new Dimension(50, 14)); OkButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setVisible(false); mWasCancelled = false; } }); } return OkButton; } COM: <s> this method initializes ok button </s>
funcom_train/5587917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String validateArgument(String argument, Class<?> argumentType) { PropertyEditor pe = PropertyEditorManager.findEditor(argumentType); try { pe.setAsText(argument); } catch (IllegalArgumentException ex) { String n = argumentType.getName(); int i = n.lastIndexOf("."); if (i > -1) { n = n.substring(i + 1); } return "Invalid " + n + ": " + ex.getMessage(); } return null; } COM: <s> uses a property editor to validate an argument </s>
funcom_train/34563844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showPopup() { final String query = getText(); final int mode = gui.prop.num(GUIProp.SEARCHMODE); if(cmdMode()) { cmdPopup(query); } else if(mode == 1 || mode == 0 && query.startsWith("/")) { queryPopup(query); } else { pop.setVisible(false); } } COM: <s> shows the command popup menu </s>
funcom_train/43244856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLockKey() { System.out.println("getLockKey"); LockInfoObject instance = new LockInfoObject(); String expResult = ""; String result = instance.getLockKey(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get lock key method of class org </s>
funcom_train/32968896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton3() { if (jButton3 == null) { jButton3 = new JButton(); jButton3.setToolTipText("Planets"); jButton3.setRolloverIcon(new ImageIcon(getClass().getResource("/buttons1/planets2.gif"))); jButton3.setPressedIcon(new ImageIcon(getClass().getResource("/buttons1/planets3.gif"))); jButton3.setIcon(new ImageIcon(getClass().getResource("/buttons1/planets1.gif"))); jButton3.setBounds(new java.awt.Rectangle(118,36,34,34)); jButton3.setBorderPainted(false); jButton3.setDoubleBuffered(true); } return jButton3; } COM: <s> this method initializes j button3 </s>
funcom_train/5375400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkRedoLimit(IUndoableOperation operation) { IUndoContext[] contexts = operation.getContexts(); for (int i = 0; i < contexts.length; i++) { int limit = getLimit(contexts[i]); if (limit > 0) { forceRedoLimit(contexts[i], limit - 1); } else { // this context has a 0 limit operation.removeContext(contexts[i]); } } return operation.getContexts().length > 0; } COM: <s> check the redo limit before adding an operation </s>
funcom_train/51782272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getCompartmentHeightSum() { double result = mainCompartment.getSize().getHeight(); if (showAttributes) { result += attributesCompartment.getSize().getHeight(); } if (showOperations) { result += operationsCompartment.getSize().getHeight(); } return result; } COM: <s> returns the sum of compartment heights </s>
funcom_train/18416926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void nodesWereInserted(int[] childIndices) { if (listenerList != null && childIndices != null && childIndices.length > 0) { int cCount = childIndices.length; Object[] newChildren = new Object[cCount]; for (int counter = 0; counter < cCount; counter++) newChildren[counter] = getChildAt(childIndices[counter]); fireTreeNodesInserted(childIndices, newChildren); } } COM: <s> this method invoked after youve inserted some automated tree nodes into </s>
funcom_train/25136368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Texture getTexture(GL2 gl) throws GLException { if (dirtyRegion != null) { sync(gl, dirtyRegion.x, dirtyRegion.y, dirtyRegion.width, dirtyRegion.height); dirtyRegion = null; } this.gl4texture = gl; ensureTexture(gl); return texture; } COM: <s> returns the underlying open gl texture object associated with </s>
funcom_train/1293352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getFeature(String name) throws IllegalArgumentException { if (name == null) { throw new IllegalArgumentException("Feature name must not be null."); } if (name.equals(Constants.FEATURE_VERBOSE)) { return verbose; } else if (name.equals(Constants.FEATURE_IMPORT_DOCUMENTS)) { return importDocuments; } else { throw new IllegalArgumentException("Feature name '" + name + "' not recognized."); } } COM: <s> gets the value of the specified feature </s>
funcom_train/29936654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getCurrentCycle() { if(getChildren().isEmpty()) return super.getCurrentCycle(); long max = 0; for(PseudoAgent subAgent : subAgents.values()) if(subAgent.getCurrentCycle() > max) max = subAgent.getCurrentCycle(); return max; } COM: <s> the maximum cycle of all of our sub agents </s>
funcom_train/27944782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AllocTypeThreadMethodRef getAllocTypeThreadMethod(MethodRef peer) { ListIterator itr = getAllocTypeThreadMethods().listIterator(); AllocTypeThreadMethodData obj; while (itr.hasNext()) { obj = (AllocTypeThreadMethodData) itr.next(); if ( obj.getMethod().equals( peer ) ) return obj; } return null; } COM: <s> returns statistic data for given method where an instances of this class were </s>
funcom_train/22784022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateNegateItems() { // if there is no current node => nothing happens if (currentNode == null) { return; } // update items state if (currentNode.isNegate()) { if (negate != null) negate.setSelected(true); if (negateList != null) negateList.setSelectedItem(MUST_NOT); } else { if (negate != null) negate.setSelected(false); if (negateList != null) negateList.setSelectedItem(MUST); } } COM: <s> this will update the negate hook and combo box to match current negate </s>
funcom_train/44707332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ContentItem getContentItem(PageState state) { if (CMS.getContext().hasContentItem()) { return CMS.getContext().getContentItem(); } else { CMSPage page = (CMSPage) state.getPage(); return page.getContentItem(state); } } COM: <s> fetches the current content item </s>
funcom_train/33610609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(Double min, Double max) { Double aMin = Math.min(min, max); Double aMax = Math.max(min, max); if (aMin != this.min || aMax != this.max) { super.setMinimum(aMin); super.setMaximum(aMax); } changer.fireStateChanged(); } COM: <s> sets both boundaries of the interval </s>
funcom_train/11757672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BuiltIn getCopy(Struct ns){ BuiltIn bt=new BuiltIn(code); bt.library=library; bt.method=method; bt.builtin_struct = ns; bt.builtin_args=new Term[ns.getArity()]; /* for (int i=0; i<ns.getArity(); i++){ bt.builtin_args[i]=ns.getArg(i); }*/ return bt; } COM: <s> creates a copy of this builtins linking </s>
funcom_train/32959649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSharingStatus(ActEx trimAct, String statusVal) { ActRelationship sharingRel = trimAct.getRelationship().get( "sharingStatus"); if (sharingRel == null) { sharingRel = factory.createActRelationship(); sharingRel.setName("sharingStatus"); sharingRel.setLabel(new LabelFacet()); trimAct.getRelationships().add(sharingRel); } trimAct.getRelationship().get("sharingStatus").getLabel().setValue( statusVal); } COM: <s> sets a status to differentiate between request and response </s>
funcom_train/2801726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IBaseComponent loadComponent(String pComponentName) throws RaccoonException { IBaseComponent compo = null; if (pComponentName.startsWith("sub")) { TibrvSubscriber subscriber = createSubscriber(pComponentName); compo = subscriber; } else if (pComponentName.startsWith("pub")) { TibrvPublisher publisher = createPublisher(pComponentName); compo = publisher; } return compo; } COM: <s> generates a new instance of code component base code must be implemented </s>
funcom_train/49135295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField_KeyId() { if (jTextField_KeyId == null) { jTextField_KeyId = new JTextField(); jTextField_KeyId.setPreferredSize(new Dimension(270,25)); jTextField_KeyId.setText(key.getKey_Id()+""); jTextField_KeyId.setEditable(false); } return jTextField_KeyId; } COM: <s> this method initializes j text field </s>
funcom_train/22449195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserPrefsModel getUserPrefs() { fPrefs.setAutoCompleteWords(fAutoCompleteBox.isSelected()); fPrefs.setShowSimilarAtNotFound(fShowSimilarBox.isSelected()); fPrefs.setShowToolTips(fTooltipsBox.isSelected()); fPrefs.setStartMinimized(fStartMinimizedBox.isSelected()); fPrefs.setMinimizeWhenClosed(fMinimizeWhenClosedBox.isSelected()); fPrefs.setMinimizeWhenLoseFocus(fMinimizeWhenLoseFocusBox.isSelected()); return fPrefs; } COM: <s> return currnetly selected user preferences </s>
funcom_train/46123867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OrgnisedNode createOrganisedNode(ClassificationNodeTranslation nodeTranslation) { OrgnisedNode node = new OrgnisedNode(); node.setNodeTranslation(nodeTranslation); // We set the nodes info (id, name, description) in nodes tree ClassificationNode nodeOfTree = new ClassificationNode(); nodeOfTree.setId(new Long(nodeTranslation.getClassificationNodeId())); nodeOfTree.setName(nodeTranslation.getName()); nodeOfTree.setDescription(nodeTranslation.getDescription()); node.setNodeOfTree(nodeOfTree); return node; } COM: <s> create an orgnised node object from a classification node translation object </s>
funcom_train/18338250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Identifier goalTemplateIDGenerator(Integer noOfGTs, Ontology sdcGraph){ Integer numberID = noOfGTs + 1; String theID = "goalTemplate" + numberID.toString(); Identifier theInstanceID = wsmoFactory.createIRI(sdcGraph.getDefaultNamespace(), theID); if (sdcGraph.findInstance(theInstanceID) != null) { theInstanceID = goalTemplateIDGenerator(numberID, sdcGraph); } return theInstanceID; } COM: <s> creates a unique identifier for a goal template </s>
funcom_train/9785035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNameDescription() { StringBuilder sbNameDescription = new StringBuilder(); String label = getLabel(); String typeString = translatedTypeString(); if (app.isReverseNameDescriptionLanguage()) { // reverse order: "A point" sbNameDescription.append(label); sbNameDescription.append(' '); sbNameDescription.append(typeString); } else { // standard order: "point A" sbNameDescription.append(typeString); sbNameDescription.append(' '); sbNameDescription.append(label); } return sbNameDescription.toString(); } COM: <s> returns type and label of a geo element </s>
funcom_train/9918653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIntParameterBySemantic(String semantic, int x) { CGparameter p = CgGL.cgGetEffectParameterBySemantic(effect, semantic); if (p != null) CgGL.cgSetParameter1i(p, x); else System.err.println("GLCgFXEffect: 1f semantic is null"); } COM: <s> sets the int parameter with indicated semantic to the given value </s>
funcom_train/28644883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSeekClassifications() throws Throwable { List<Classification> results = null; results = classificationService.seekClassification("ETAM", null, null); assertNotNull(results); assertEquals(2, results.size()); results = classificationService.seekClassification("ETAM", "1.1", "210"); assertNotNull(results); assertEquals(1, results.size()); } COM: <s> test classification seek method </s>
funcom_train/13758296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoFieldCodes() { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("FieldCodes.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc); String text = extractor.getText(); assertTrue(text.length() > 0); assertFalse(text.contains("AUTHOR")); assertFalse(text.contains("CREATEDATE")); } COM: <s> the output should not contain field codes e </s>
funcom_train/27822932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator thisIterator() throws ModelException { try { return getStatements(m_model.getStatementInfos()).iterator(); } catch (RemoteException e) { throw new ModelException("Server exception",e); } catch (FinderException e) { throw new ModelException("Server exception",e); } } COM: <s> enumerate triples int the model </s>
funcom_train/34580660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getAboutBackCommand () { if (aboutBackCommand == null) {//GEN-END:|106-getter|0|106-preInit // write pre-init user code here aboutBackCommand = new Command (lang.getProperty("command.back"), Command.OK, 0);//GEN-LINE:|106-getter|1|106-postInit // write post-init user code here }//GEN-BEGIN:|106-getter|2| return aboutBackCommand; } COM: <s> returns an initiliazed instance of about back command component </s>
funcom_train/28455509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(String message, int loglevel) { if (managingPc != null) { managingPc.log(message, loglevel); } else { if (loglevel > Project.MSG_WARN) { x.java.lang.System.out().println(message); } else { x.java.lang.System.err().println(message); } } } COM: <s> log a message with the specified logging level </s>
funcom_train/13965433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String cssClassBuilderFromBaseName(D2WContext c, String baseName, String rootName) { String base = (String)c.valueForKey(baseName); String root = null; if (rootName != null) { root = (String)c.valueForKey(rootName); } return cssClassBuilder(c, base, root); } COM: <s> builds a css class for a page element </s>
funcom_train/27786137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashMap buildMenu(JMenu menu, List items) { HashMap menuMap = new HashMap(); for(Iterator iterator = items.iterator(); iterator.hasNext();) { String item = (String)iterator.next(); JMenuItem menuItem = MenuHelper.addMenuItem(this, menu, item); menuMap.put(menuItem, item); } return menuMap; } COM: <s> take the list of menu item and add them to the given menu </s>
funcom_train/22854392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void computeRepuFactor() { repuFactor = 0.0f; for (int i = 1; i < nodeNr; i++) { for (int j = 0; j < i; j++) { repuFactor += attr[i][j]; } } repuFactor /= nodeNr * (nodeNr-1) / 2; if (repuFactor == 0.0f) { repuFactor = 1.0f; } } COM: <s> computes the factor for repulsion forces code repu factor code </s>
funcom_train/44657845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEditIcon(Icon editIcon, String text) { if (editIcon != null) { editButton.setIcon(editIcon); if (text != null) { editButton.setToolTipText(text); } editButton.setText(""); } else { editButton.setIcon(null); if (text != null) { editButton.setText(text); } } } COM: <s> set the icon to use on the edit button </s>
funcom_train/16319622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ElementName getDefaultElementName(TreeElement node) { // deals with the case of a text node if (node.getNodeType() == Node.TEXT_NODE) { return new ElementName(ElementName.VALUE_NAME,null); } // else puts the type of the node return new ElementName(ElementName.TYPE_NAME,null); } COM: <s> returns an element name corresponding to the default case for a given node </s>
funcom_train/32355916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkDeleteVers() { boolean valid = false; if (treeController.getSelectedVers() == null) { JOptionPane.showMessageDialog(null, "Please select a file version"); } else { // yes response matches 0 ,and no response matches 1 final int response = JOptionPane.showConfirmDialog(null, "Are you sure you want to delete the selected version?", "Delete version", JOptionPane.YES_NO_OPTION); if (response == 0) { valid = true; } } return valid; } COM: <s> verifies if a version was selected and displays are you sure message </s>
funcom_train/4363134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void end(String namespace, String name) { if (bodyTextStack != null && !bodyTextStack.empty()) { // what we do now is push one parameter onto the top set of parameters Object parameters[] = (Object[]) digester.peekParams(); parameters[paramIndex] = bodyTextStack.pop(); } } COM: <s> process any body texts now </s>
funcom_train/37619239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fail() { if (isKnownBug) { TestNice.increaseKnownBug(); TestNice.getOutput().endTestCase(true); } else { TestNice.increaseFailed(); // log the sources printSources(); // compiler messages TestNice.getOutput().log("nicec", getCompilerMessages()); TestNice.getOutput().endTestCase(false); } // move contents of temp folder to a new folder in the fail folder TestNice.moveFilesToFailFolder(); } COM: <s> called by a specific testcase if the testcase fails </s>
funcom_train/3908102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removePatternMenuItem_actionPerformed(ActionEvent e) { currentSchematronTreeNode = currentSelectedTreeNode; currentSTNParent = currentSelectedTreeNodeParent; ElementImpl currentElmImpl = currentSchematronTreeNode.getXmlElement(); Pattern currPattern = (Pattern) currentElmImpl; ston.removeChild(currPattern); removeSchematronTreeNode(currentSchematronTreeNode); } COM: <s> remove the selected pattern </s>
funcom_train/42391499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void packCenterShow(Window window, boolean center) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); window.pack(); if (center) { window.setLocation((screenSize.width - window.getWidth()) / 2, (screenSize.height - window.getHeight()) / 2); } window.setVisible(true); } COM: <s> packs centers and shows the specified window on the screen </s>
funcom_train/29414489
/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 d = getSize(); Graphics2D g2 = createGraphics2D(d.width, d.height); drawWhirlis(d.width, d.height, g2); g2.dispose(); g.drawImage(bimg, 0, 0, this); } COM: <s> paints the current state of the whirlis </s>
funcom_train/7384521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object setCurrentRoot(Object root) { if (currentRoot != root) { mxCurrentRootChange change = new mxCurrentRootChange(this, root); change.execute(); mxUndoableEdit edit = new mxUndoableEdit(this, false); edit.add(change); fireEvent(new mxEventObject(mxEvent.UNDO, "edit", edit)); } return root; } COM: <s> sets and returns the current root and fires an undo event </s>
funcom_train/2854434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add (GetCallBack cb) { if (cb == null) throw new IllegalArgumentException ("null GetCallBack"); DEBUG_MSG(".add(callback), keyQ on " + StringLib.byteArrayToHex(myID.value())); keyQ.push(cb); } COM: <s> this method must be externally synchronized </s>
funcom_train/16692786
/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 ("CarRentalServiceAHttpPort".equals(portName)) { setCarRentalServiceAHttpPortEndpointAddress(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/28116930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean includes(Object selector, Object object) { boolean result = false; if (selector == null || selector.equals(object) || object == null) { result = true; } if (log.isDebugEnabled()) { log.debug("includes(selector=" + selector + ", object=" + object + ")=" + result); } return result; } COM: <s> determines if an object is included </s>
funcom_train/42442644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generalTagReplace( String html, String tagStr, String replacementStr ) { try{ Pattern pattern = Pattern.compile( tagStr ); Matcher matcher = pattern.matcher( html ); String tmp = matcher.replaceAll( replacementStr ); return tmp; } catch( Exception e ){ e.printStackTrace(); } return html; } COM: <s> method to mimic a one liner regex search and replace greedy </s>
funcom_train/13364699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (jJJCodeScanner != null) { jJJCodeScanner.dispose(); jJJCodeScanner = null; jJJLineCommentScanner.dispose(); jJJLineCommentScanner = null; jJJBlockCommentScanner.dispose(); jJJBlockCommentScanner = null; jJJavadocScanner.dispose(); jJJavadocScanner = null; } } COM: <s> disposes colors created by code scanner and comment scanners </s>
funcom_train/19410613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DateTime getCachedOnset(final Date date) { int index = Arrays.binarySearch(onsetsMillisec, date.getTime()); if (index >= 0) { return onsetsDates[index]; } else { int insertionIndex = -index -1; return onsetsDates[insertionIndex -1]; } } COM: <s> returns a cached onset for the specified date </s>
funcom_train/16695852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set() { if (this.offset != Offset.UNSET) throw new JaninoRuntimeException("Cannot \"set()\" Offset more than once"); this.offset = CodeContext.this.currentInserter.offset; this.prev = CodeContext.this.currentInserter.prev; this.next = CodeContext.this.currentInserter; this.prev.next = this; this.next.prev = this; } COM: <s> set this offset to the offset of the current inserter insert </s>
funcom_train/1911320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redraw() throws InternalFailureException { // The following code contains a few tricks concerning Swing and // threading. I do not require anyone to understand it - mainly // workarounds for the mess Sun has done... if (Thread.currentThread ().getName ().contains ("AWT-EventQueue")) { clearFrame(); setGamePanelContents(); resizePanel (); } else try { SwingUtilities.invokeAndWait (new Runnable () { //@Override public void run () { clearFrame(); setGamePanelContents(); resizePanel (); } }); } catch (Exception ex) { throw new InternalFailureException (ex); } } COM: <s> draws the game field once again and updates its graphical representation </s>
funcom_train/18591646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReservationMessage createResponse() { try { ReservationMessage newMessage = new ReservationMessage(dstId, srcId, reservation); newMessage.msgType = msgType; newMessage.price = price; return newMessage; } catch (Exception ex) { logger.log(Level.WARNING, "Error creating response.", ex); return null; } } COM: <s> creates a response for this message </s>
funcom_train/14180681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable observedObject, Object object) { if (observedObject == alhambra) { NotifyMessage message = (NotifyMessage) object; try { message.setMessageData(0, playerNumber); } catch (IllegalMessageDataIndex e) { // TODO Auto-generated catch block e.printStackTrace(); } setChanged(); notifyObservers(message); } else { System.out.println("falsches observedObject"); } } COM: <s> notifies game model if something has changed </s>
funcom_train/50479528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUIDValidity() throws MessagingException { for (int i = 0; i < uidFolders.length; i++) { long uidValidity = uidFolders[i].getUIDValidity(); assertTrue(uidValidity > 0); assertEquals(uidValidity, uidFolders[i].getUIDValidity()); } } COM: <s> tests support for uidfolder </s>
funcom_train/37646659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getFile(String name, int size) { File incDir = null; try { incDir = SettingsManager.instance().getIncompleteDirectory(); } catch(java.io.FileNotFoundException fnfe) { // this is fine, as this will just create a file in the current // working directory. } return new File(incDir,"T"+SEPARATOR+size+SEPARATOR+name); } COM: <s> same thing as get file rfd where rfd </s>
funcom_train/38552584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXML(Document doc) { Element element = doc.createElement(XML_TAG); element.setAttribute(SUBSYSTEM_TAG, this.getSubSystem().toString()); element.setAttribute(MACHINE_TAG, this.getMachine().toString()); return element; } COM: <s> converts the node into an xml element </s>
funcom_train/39025424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FCAction getTheAction(String domain, String action) { FCAction fa = getActionsMap().get(domain + "." + action); if (fa == null) { List<FCAction> fas = getActionsList(domain, true, true); for (FCAction a : fas) { if (a.getAction().equals(action)) { fa = a; } } } return fa; } COM: <s> returns action either directly from map for known domain action </s>
funcom_train/3373726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() { if (! isLoaded()) { setEstimatedMajorSpan(true); Element e = getElement(); ViewFactory f = getViewFactory(); int index0 = e.getElementIndex(getStartOffset()); int index1 = e.getElementIndex(getEndOffset()); View[] added = new View[index1 - index0 + 1]; for (int i = index0; i <= index1; i++) { added[i - index0] = f.create(e.getElement(i)); } replace(0, 0, added); zoneWasLoaded(this); } } COM: <s> creates the child views and populates the </s>
funcom_train/45027589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRoleAssignedToGroup(Role otherRole) { boolean duplicateRole = false; if (otherRole != null) { Iterator roles = this.getRolesIter(); while (roles.hasNext()) { Role memberRole = (Role) roles.next(); if (memberRole.equals(otherRole)) { duplicateRole = true; } } } return duplicateRole; } COM: <s> checks if the parameter other role has been assigned to this group </s>
funcom_train/7374693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp() throws IOException{ if (impl != null) { try{ storer = impl.createStoreFunc(this); }catch (IOException ioe) { int errCode = 2081; String msg = "Unable to setup the store function."; throw new ExecException(msg, errCode, PigException.BUG, ioe); } } } COM: <s> set up the storer </s>
funcom_train/3160551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadPlugIns() { Class[] plugInClasses = getPlugInLoader().loadAllPlugInClasses(VisatPlugIn.class); for (int i = 0; i < plugInClasses.length; i++) { Class plugInClass = plugInClasses[i]; createPlugInInstance(plugInClass); } } COM: <s> loads the plug ins found in all plug in paths </s>
funcom_train/7311559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkIdentity(String name) { // very cheesy way of finding identity DefinitionTable defTable = getDefinitionTable(); Definition def = defTable.getInternalDefinition(getFullName(), name); if (def instanceof DefParameter && def.getName().equals(name)) { identity = true; } else { identity = false; } return identity; } COM: <s> determines if this is an identity definition e </s>
funcom_train/4125958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePlayerExploredTiles() { if (playerExploredTiles == null || getGame().getViewOwner() != null) { return; } for (Player player : getGame().getPlayers()) { if (playerExploredTiles.get(player) != null || (player.isEuropean() && player.canSee(this))) { updatePlayerExploredTile(player); } } } COM: <s> updates the code player explored tile code for each player </s>
funcom_train/2125959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event getEvent(Element element) { String name = element.getName(); String builder = eventBuilders.getProperty(name); if (builder == null){ throw new NoSuchEventBuilderException("Cannot find " + builder + " by " + name); } EventBuilder eventBuilder = (EventBuilder) getApplicationContext().getBean(builder); return eventBuilder.build(element); } COM: <s> gets the event </s>
funcom_train/26221605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAgentopiaConnection createDirectConnection(HostId targetHostId, int firstFlag) throws IOException { Communicator comm = Communicator.createBasicCommunicator(targetHostId, firstFlag); if (null == comm) { throw new NullPointerException("Unable to create communicator to target host: " + targetHostId); } return comm; } COM: <s> creates a direct network connection to given target host </s>
funcom_train/35357039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getStdDev() throws jjil.core.Error { float f = getVariance(); // getVariance() if (f < 0) throw new Error( Error.PACKAGE.ALGORITHM, ErrorCodes.STATISTICS_VARIANCE_LESS_THAN_ZERO, new Float(f).toString(), null, null); // return sqrt(variance) return (float) Math.sqrt(f); } COM: <s> return standard deviation times 256 using newtons iteration </s>
funcom_train/21655855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtDesarrollo() { if (btDesarrollo == null) { btDesarrollo = new JButton(); btDesarrollo.setBounds(new Rectangle(20, 230, 150, 30)); btDesarrollo.setMnemonic('d'); btDesarrollo.setText("Desarrollo Pozo"); btDesarrollo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarDesarrolloPozo(); } }); } return btDesarrollo; } COM: <s> this method initializes bt desarrollo </s>
funcom_train/21413864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HotelBooking createRioBooking() { GregorianCalendar bookCal = new GregorianCalendar(2006, 7, 9); GregorianCalendar arrivalCal = new GregorianCalendar(2006, 10, 16); GregorianCalendar checkoutCal = new GregorianCalendar(2006, 10, 26); HotelBooking booking = new HotelBooking( new Integer(138991), "Rio de Janeiro", "Tijs Rademakers", "High Tech Campus 52", bookCal.getTime(), RoomType.Suite, Boolean.FALSE, arrivalCal.getTime(), checkoutCal.getTime() ); return booking; } COM: <s> creates a hotel booking for the rio de janeiro hotel </s>
funcom_train/46974928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void center() { // adjust initial position. Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) { frameSize.height = screenSize.height; } if (frameSize.width > screenSize.width) { frameSize.width = screenSize.width; } setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); } COM: <s> centers the dialog </s>
funcom_train/8929428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void memory2owl() { try { Model m = this.getModel(); log.debug("Creating file:" + config.OUTPUT_FILE); OutputStream file = new FileOutputStream(config.OUTPUT_FILE); m.write(file, "RDF/XML", Ontology.BASE); file.close(); } catch (Exception e) { System.out.print(e.toString()); } } COM: <s> saves current content of memory into file defined in ontology property </s>
funcom_train/8249443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void alterFormForEditing() { headingLabel.setModel(new StringResourceModel(HEADING_LABEL_EDIT_MODE_RESOURCE_ID, this, null)); submitButton.setModel(new StringResourceModel(SUBMIT_BUTTON_EDIT_MODE_RESOURCE_ID, this, null)); addOrReplace(headingLabel); addOrReplace(submitButton); } COM: <s> alters the form elements when the form is used for editing </s>
funcom_train/26644443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { while( childIt==null && combineIterator.hasNext() ) { childIt = combineIterator.next(); // Allow a null return value and just skip it. if( childIt!=null && !childIt.hasNext() ) childIt = null; } return childIt!=null; } COM: <s> iterates over combine iterator and child it to get the next available value </s>
funcom_train/17700114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitlePosition(int i) { if (bean == null) return; Integer oldValue = new Integer(bean.getTitlePosition()); Integer newValue = new Integer(i); bean.setTitlePosition(i); firePropertyChange("titlePosition", oldValue, newValue); } COM: <s> sets the title position of the chart </s>
funcom_train/4558959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WritableWorkbook createBlankXlsFile(String fullPath) { WritableWorkbook wb = null; try { WorkbookSettings ws = new WorkbookSettings(); ws.setLocale(new Locale("en", "EN")); wb =Workbook.createWorkbook(new File(fullPath), ws); } catch (Exception e) { System.out.println(e.getMessage()); } return wb; } COM: <s> create excel empty file </s>
funcom_train/43181836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAge() { List<FieldVector> vectors = new LinkedList<FieldVector>(); if (ball != null) vectors.add(ball); vectors.addAll(ownPlayers.values()); vectors.addAll(otherPlayers.values()); for (FieldVector v : vectors) { v.doAge(); } stamina += STAMINA_REGEN_FAKTOR; if (stamina > 4000) stamina = 4000; if (Utils.getDebugLevel() > Utils.DBG_STAMINA) System.out.println(playerId + " stamina: " + stamina); } COM: <s> age all non static vectors </s>
funcom_train/1811662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position getFlexTablePositon(final int i, final int j) { if (!this.inverseSide) { // extra row, column for showing row, column. return new Position(i + 1, j + 1); } else { // return new Position((7 - i) + 1, (7 - j) + 1); } } COM: <s> locate cell in the flextable cell </s>
funcom_train/5268671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void intoByteArray(byte[] data, int offset) { SaveGameHandler.intIntoByteArray(type, data, offset+0); SaveGameHandler.intIntoByteArray(hitpoints, data, offset+4); SaveGameHandler.intIntoByteArray(totalHitpoints, data, offset+8); } COM: <s> save this monster into a byte array </s>
funcom_train/12186590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public State createState(State containingState, Attributes attributes) { String value = attributes.getValue("", "precept"); Precept precept = Precept.matchfirst; if (value != null) { precept = Precept.valueOf(value); } return new SelectState(containingState, precept); } COM: <s> override to create specialization </s>
funcom_train/3370341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeLocalVars() { setOpaque(true); table = null; reorderingAllowed = true; resizingAllowed = true; draggedColumn = null; draggedDistance = 0; resizingColumn = null; updateTableInRealTime = true; // I'm registered to do tool tips so we can draw tips for the // renderers ToolTipManager toolTipManager = ToolTipManager.sharedInstance(); toolTipManager.registerComponent(this); setDefaultRenderer(createDefaultRenderer()); } COM: <s> initializes the local variables and properties with default values </s>
funcom_train/13711534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() throws IllegalStateException, SystemException { for(XAResource res : resourceLog){ try{ if(prepared.containsKey(res)){ // Resource reached prepare stage if(prepared.get(res).equals(XAResource.XA_OK)) res.rollback(id); }else{ // Resource didn't reach prepare stage res.rollback(id); } }catch(XAException e){ logger.severe("Got XAException from when rolling back: "+ e.getMessage()); } } status = Status.STATUS_ROLLEDBACK; } COM: <s> rollback all prepared xa resources that voted commit </s>
funcom_train/9497337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initConic(GeoConic macroConic, GeoConic conic) { ArrayList<GeoElement> macroPoints = macroConic.getPointsOnConic(); if (macroPoints == null) return; int size = macroPoints.size(); ArrayList<GeoElement> points = new ArrayList<GeoElement>(size); for (int i=0; i < size; i++) { points.add(getAlgoGeo(macroPoints.get(i))); } conic.setPointsOnConic(points); } COM: <s> makes sure that all points on conic are </s>
funcom_train/38763255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List listarEdificios() { Session session = getSession(); try { Criteria criteri = session.createCriteria(Edificio.class); criteri.addOrder( Order.asc("direccion") ); return criteri.list(); } catch (HibernateException he) { throw new EJBException(he); } finally { close(session); } } COM: <s> lista todos los edificios </s>
funcom_train/10600337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map match(String pattern, Map objectModel, Parameters parameters) { Request request = ObjectModelHelper.getRequest(objectModel); String value = request.getHeader(pattern); if (value == null) { return null; // no request header defined } else { Map map = new HashMap(); map.put("1", value); return map; // request header defined, return map } } COM: <s> match method to see if the request header exists </s>
funcom_train/38952440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialzeAttributeObject() { attribute = CAEXClassModelV215Factory.eINSTANCE.createAttributeType(); attribute.setName("Group"); nameAttribute = CAEXClassModelV215Factory.eINSTANCE .createAttributeType(); nameAttribute.setName("Name"); descAttribute = CAEXClassModelV215Factory.eINSTANCE .createAttributeType(); descAttribute.setName("Description"); attribute.getAttribute().add(nameAttribute); attribute.getAttribute().add(descAttribute); } COM: <s> initialze attribute object </s>
funcom_train/48105527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeExpr matches(Token token, int no, Stack<MatchFork> stack, List<Token> lookBackStack) { LOOP: for(String[] expBlock : expressions) { for(String exp : expBlock) { if(!token.termText().matches(exp)) continue LOOP; } return next; } return null; } COM: <s> does this match </s>
funcom_train/15540742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePause(final IDataSource sender, final boolean autoLocked) { Object listener; for (final Iterator it = this.collection.iterator(); it.hasNext();) { listener = it.next(); if (listener instanceof IAutoRefreshListener) { ((IAutoRefreshListener) listener).onPause(sender, autoLocked); } } } COM: <s> fires pause notifying to auto refreshing listeners </s>
funcom_train/94109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlockEvent(Latch lockInfo) { if (SanityManager.DEBUG) { SanityManager.ASSERT(owner != null, "Should only be called when locked"); } synchronized (this) { if (SanityManager.DEBUG) { if (nestedLatch != 0) SanityManager.THROWASSERT("nestedLatch is non-zero on unlockEvent - value = " + nestedLatch); } owner.deleteObserver(this); owner = null; myLatch = null; if (inClean) notifyAll(); } } COM: <s> unlatch me only to be called from lock manager </s>