__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/8084135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean eventGeneratable(String eventName) { if (!eventName.equals("dataSet")) { return false; } if (m_listenee == null) { return false; } if (m_listenee instanceof EventConstraints) { if (!((EventConstraints)m_listenee).eventGeneratable("instance")) { return false; } } return true; } COM: <s> returns true if at the current time the named event could be </s>
funcom_train/7424044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateNoise(int degreeOfNoise) { if (random(degreeOfNoise)) { removeHead(degreeOfNoise); } if (random(degreeOfNoise)) { removeTail(degreeOfNoise); } if (random(degreeOfNoise)) { removeRandomElements(degreeOfNoise); } if (random(degreeOfNoise)) { duplicate(degreeOfNoise); } if (steps.size() > 1 && random(degreeOfNoise)) { swapSteps(degreeOfNoise); } } COM: <s> generates the desired amount of noise </s>
funcom_train/31658697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Database setup(String databaseName) throws SQLite.Exception{ Database db = new Database(); TableResult result = new TableResult(); db.open(databaseName,0); /* Create main ontology table */ db.exec("create table ontologies (" + "name TEXT CONSTRAINT textnotnull NOT NULL," + "format TEXT CONSTRAINT formatnotnull NOT NULL," + "encoding TEXT," + /* may be null */ "ontology TEXT CONSTRAINT ontologynotnull NOT NULL," + "primary key (name,format))",result); return db; } COM: <s> creates a new empty ontology database in the file code database name code </s>
funcom_train/22357942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPrimitiveEquals(MagellanMessageImpl o) { // we use == for ambiguousID as it is singleton // this is true iff this.ID == o.ID == ambiguousID && this.text == o.text return (getID() == o.getID()) && MagellanMessageImpl.equalObjects(getText(), o.getText()); } COM: <s> this checks if messages are of old style without id </s>
funcom_train/4205949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSparkToStartup(File dir) { final File sparkDirectory = new File(dir, "Spark.exe"); try { final String sparkPath = sparkDirectory.getCanonicalPath(); WinRegistry.setValue(WinRegistry.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Spark", sparkPath); setURI(sparkPath); } catch (IOException e) { e.printStackTrace(); } } COM: <s> adds spark to the users registry </s>
funcom_train/36547343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initVariants() { jsonVariant = new Variant( MediaType.APPLICATION_JSON ); xmlStringVariant = new Variant( MediaType.TEXT_XML ); xmlDocVariant = new Variant( MediaType.APPLICATION_XML ); // This resource supports two kind of representations getVariants().add( xmlStringVariant ); getVariants().add( xmlDocVariant ); getVariants().add( jsonVariant ); } COM: <s> inits the variants </s>
funcom_train/15694875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(AbstractStage<T> stage) { if (this.stages.size() == this.branchesIn.length) { throw new IllegalArgumentException("Cannot add another branch at the parallel operator."); } this.stages.add(stage); stage.setBiggerIsBetter(this.biggerIsBetter); } COM: <s> adds a new branch to this parallel stage </s>
funcom_train/18894534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMp3s(Mp3Iterator mp3s) throws Exception { checkInitialized(); if (mp3s == null) { throw new IllegalArgumentException("Mp3Iterator is null"); } //load each Mp3 individually Mp3File mp3 = null; while (mp3s.hasNext()) { mp3 = mp3s.nextMp3(); try { loadMp3(mp3); } catch (Exception e) { getListener().loadExceptionOccurred(mp3, e); } } } COM: <s> loads all the mp3s files in the file system model </s>
funcom_train/7442870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getJarEntryPath() { String result = null; if (getSchemeProtocol().equals(Protocol.JAR)) { final String ssp = getSchemeSpecificPart(); if (ssp != null) { final int separatorIndex = ssp.indexOf("!/"); if (separatorIndex != -1) { result = ssp.substring(separatorIndex + 2); } } } return result; } COM: <s> returns the jar entry path </s>
funcom_train/44385785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleMouseDoubleClick(MouseEvent e, int x, int y) { Figure figure = drawing().findFigureInside(e.getX(), e.getY()); if ((figure != null) && (figure instanceof TextFigure)) { getTextTool().activate(); getTextTool().mouseDown(e, x, y); } } COM: <s> hook method which can be overriden by subclasses to provide </s>
funcom_train/7924325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDocument(final IndexWriter writer, final String id, final String text) throws IOException { final Document document = new Document(); document.add(new Field(FIELD_ID, id, Field.Store.YES, Field.Index.UN_TOKENIZED)); document.add(new Field(FIELD_TEXT, text, Field.Store.YES, Field.Index.TOKENIZED)); writer.addDocument(document); } COM: <s> adds the document to the index </s>
funcom_train/22284726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocale(Locale locale) { if (keyResource != null) { // make new key resource String keyResourceName = keyResource.getResourceName(); if (locale == null) { this.keyResource = new marimba.util.StringResources(keyResourceName); } else { this.keyResource = new marimba.util.StringResources(keyResourceName, locale); } // update label setLabel(AppMenuBar.getKey(realLabel, keyResource)); this.label = getLabel(); } } COM: <s> set the locale of this menu item which will refresh it </s>
funcom_train/12171389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visitFooter(Element footer) { if (container instanceof TransTable) { TransTable transTable = (TransTable) container; transTable.setFooter(footer); // Specifically do not visit the footer's children yet. This will // be handled by the visitTableChildren method to ensure that // the footer's content is actioned after any body content } } COM: <s> called when a table footer dom element is visited during the </s>
funcom_train/32908961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArtifactList getChildren(int artifactRefId, int parentId, RelationGroup relation, ServiceCall call) throws java.rmi.RemoteException, DataAccessException, Exception { try { startService(call); RequirementTreeList treeList = rtda.getChildren(artifactRefId, parentId, relation, false); ArtifactList list = getItems(treeList, true, true); stopService(call); return list; } catch (Exception e) { Debug.LogException(this, e); throw e; } } COM: <s> return the list of all related elements to that item e </s>
funcom_train/9758854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBsProposal(String proposal, String displayString, String additionalInfo) { String prolog= fExpression.substring(0, fDocumentOffset); int position= proposal.length(); // If the string already contains the backslash, do not include in the proposal if (prolog.endsWith("\\")) { //$NON-NLS-1$ position--; proposal= proposal.substring(1); } if (fIsEscape) { fPriorityProposals.add(new Proposal(proposal, displayString, additionalInfo, position)); } else { addProposal(proposal, position, displayString, additionalInfo); } } COM: <s> adds a proposal that starts with a backslash </s>
funcom_train/49463154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String removeTags(String text) throws Exception { StringBuffer outputText = new StringBuffer(text.length()); DOMFragmentParser parser = new DOMFragmentParser(); HTMLDocument document = new HTMLDocumentImpl(); DocumentFragment fragment = document.createDocumentFragment(); parser.parse(new org.xml.sax.InputSource(new java.io.StringReader(text)), fragment); appendText(outputText, fragment); return outputText.toString().trim(); } COM: <s> remove html tags and trim whitespace </s>
funcom_train/25774920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExpressionList getRoles(){ roleTemplates.clear(); try { // retrieve role names ExpressionList roleNames = ResolutionHelper.resolveAndApply( Const.vX, Const.pRoles, theoryScope, flag); // create role templates for (Expression roleName : roleNames) roleTemplates.put( roleName, new Predicate( Const.aGoal, roleName, Const.vX ) ); // return roleNames return roleNames; } catch (InterruptedException e) { wasInterrupted = true; return null; } } COM: <s> is called after an axiom file has been stored in the theory object </s>
funcom_train/8296202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Source getObjectSource(final String name, final Object object){ return new SAXSource(new AbstractXMLReader() { public void parse(InputSource input) throws IOException, SAXException { contentHandler.startDocument(); toObjectSAX(contentHandler, object, name); contentHandler.endDocument(); } }, new InputSource()); } COM: <s> return object xml source </s>
funcom_train/24078688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public OrderedInterval newUnrestrictedInterval(PreferenceDirection direction, double minimum, double maximum) { Preconditions.checkArgument(!Double.isNaN(minimum)); Preconditions.checkArgument(minimum < Double.POSITIVE_INFINITY); Preconditions.checkArgument(!Double.isNaN(maximum)); Preconditions.checkArgument(maximum > Double.NEGATIVE_INFINITY); return new OrderedInterval(direction, minimum, maximum, null); } COM: <s> creates an interval with possibly infinite lower and upper bounds </s>
funcom_train/50865155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void missionUpdate(MissionEvent event) { if (event.getType().equals(Mission.DESCRIPTION_EVENT)) { int index = missions.indexOf(event.getSource()); if ((index > -1) && (index < missions.size())) { SwingUtilities.invokeLater(new MissionListUpdater( MissionListUpdater.CHANGE, this, index)); } } } COM: <s> catch mission update event </s>
funcom_train/11794224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fetchACP(S3Bucket pBucket) throws S3Exception { try { // some setup... initRequest(); // send our command and get the response... S3OperationParameters params = new S3OperationParameters(); params.setSubResource(S3SubResource.ACL); HttpURLConnection conn = mOpFactory.execute(pBucket, null, params); getResults(conn); XMLDoc resp = readXMLDoc(conn); S3ACP acl = new S3ACP(resp); pBucket.setACP(acl); } catch (AWSException e) { throw new S3Exception(e.getMessage(), e.getCause()); } } COM: <s> retrieves the access control list acp information for the given bucket </s>
funcom_train/42900026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String purchaseReservedInstancesOffering(String offeringId, int instanceCount) throws EC2Exception { Map<String, String> params = new HashMap<String, String>(); params.put("ReservedInstancesOfferingId", offeringId); params.put("InstanceCount", ""+instanceCount); HttpGet method = new HttpGet(); PurchaseReservedInstancesOfferingResponse response = makeRequestInt(method, "PurchaseReservedInstancesOffering", params, PurchaseReservedInstancesOfferingResponse.class); return response.getReservedInstancesId(); } COM: <s> this method purchases a reserved instance offering </s>
funcom_train/37841813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKey(String uri, Key key) throws KeyRingException { try { if (isOpen == false) { this.open(); } Certificate[] certChain = new Certificate[1]; certChain[0] = keystore.getCertificate(uri); keystore.setKeyEntry(uri, key, keyPass.toCharArray(), certChain); } catch (Exception e) { e.printStackTrace(); throw new KeyRingException(); } }//end addKey() COM: <s> adds a given certificate to the key ring as a trusted certificate </s>
funcom_train/3279460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean matchWord() { IDocument doc = fText.getDocument(); try{ int pos = fPos; char c; while (pos >= 0){ c =doc.getChar(pos); if (!Character.isJavaIdentifierPart(c)){ break; } --pos; } fStartPos = fPos; pos = fPos; int length = doc.getLength(); while (pos < length){ c = doc.getChar(pos); if (!Character.isJavaIdentifierPart(c)){ break; } ++pos; } fEndPos = pos; return true; } catch (BadLocationException e) { // do something } return false; } COM: <s> this code looks horrible </s>
funcom_train/47024276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importRtfFragment(Reader reader, RtfDocument rtfDoc, RtfImportMappings importMappings) throws IOException { this.rtfDoc = rtfDoc; this.state = PARSER_IN_DOCUMENT; this.importHeader = new RtfImportHeader(this.rtfDoc); this.fontTableParser = new RtfFontTableParser(this.importHeader); this.colorTableParser = new RtfColorTableParser(this.importHeader); handleImportMappings(importMappings); this.tokeniser = new RtfTokeniser(this, 1); this.tokeniser.tokenise(reader); } COM: <s> imports an rtf fragment </s>
funcom_train/26075481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void boundChangeCoefficientOnFeatures(int[][] coeffs, int max) { IntegerVariable[] costs = new IntegerVariable[allFeatures_.size()]; for (int i = 0; i < allFeatures_.size(); i++) { Feature f = allFeatures_.get(i); costs[i] = createChangeCoefficientOnFeature(f, coeffs[i]); } csp_.addConstraint(lt(sum(costs), max + 1)); } COM: <s> this method bounds the sum of the costs of the changes across all </s>
funcom_train/19055491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setup(XContour source) { int size; type_ = source.type_; this.contourPoint_.clear(); size = source.contourPoint_.size(); for (int i = 0;i < size;i++) { addContourPoint((XContourPoint)source.getContourPoint(i).clone()); } } COM: <s> initializes the code xcontour code by the xcontour code source code </s>
funcom_train/2878027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sfTerminatedWith(TerminationRecord status, Prim comp) { if (sfContainsChild(comp)) { if (timer != null) { try { terminated = true; timer.interrupt(); } catch (Exception e) { } } } //relay up to the super class super.sfTerminatedWith(status, comp); } COM: <s> terminates the component </s>
funcom_train/12075713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void workoutMinimumSize() { for(int i = 0; i < components.size(); i++) { Component component = (Component)components.elementAt(i); component.workoutPreferredSize(); } if (layout!=null) { width = layout.getPreferredWidth(this); height = layout.getPreferredHeight(this); } else { width=0; height=0; } } COM: <s> works out the current size of this panel </s>
funcom_train/44709977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateWidget( PageState state, Element parent ) { Element textarea = parent.newChildElement(getElementTag(), BEBOP_XML_NS); textarea.addAttribute("name", getName()); String value = getParameterData(state).marshal(); if ( value == null ) { value = ""; } textarea.addAttribute("value", value); exportAttributes(textarea); } COM: <s> generates the dom for the textarea widget </s>
funcom_train/7232912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { final CPNArcFigure clone = (CPNArcFigure) super.clone(); clone.id = null; clone.guard = new CPNAnnotationFigure(CPNAnnotationFigure.ARC_GUARD, clone); clone.expression = new CPNAnnotationFigure(CPNAnnotationFigure.EXPRESSION, clone); clone.guard.moveBy(0, -16); clone.expression.moveBy(0, 0); clone.arc = null; clone.netDrawing = null; clone.setAttribute("ArcType", new Integer(CPNArcFigure.UNDEFINED_ARC)); return clone; } COM: <s> if you clone an arc it will lose its connections </s>
funcom_train/38730427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawObjects() { // sort objects and draw translucent objects from back to front for (WorldObject object : worldObjects) { // position of opaque objects is irrelevant if (object.isVisible() && !object.isOpaque()) object.updateZDepth(); } Collections.sort(worldObjects, comparator); for (WorldObject object : worldObjects) { if (object.isVisible()) object.draw(); } } COM: <s> draw all registered objects </s>
funcom_train/6254921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void close(boolean checkAbort) throws IOException { synchronized (outLock) { synchronized (stateLock) { if (checkAbort && aborted) { throw new IOException("request aborted"); } else if (outState == CLOSED) { return; } else if (outState == INVALID) { throw outException; } } try { if (outState == UNUSED) { startOutput(); } endOutput(); } catch (Throwable th) { invalidate(th); } synchronized (stateLock) { outState = CLOSED; if (inState >= EOF) { done(inState == INVALID); } } } } COM: <s> attempts to close stream </s>
funcom_train/32791588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { BorderLayout thisLayout = new BorderLayout(); this.setLayout(thisLayout); { options = new JPanel(); BoxLayout optionsLayout = new BoxLayout(options, javax.swing.BoxLayout.Y_AXIS); options.setLayout(optionsLayout); this.add(options, BorderLayout.CENTER); { nameLabel = new JLabel(); this.add(nameLabel, BorderLayout.NORTH); nameLabel.setText("name"); } { west = new JPanel(); this.add(west, BorderLayout.WEST); west.setPreferredSize(new java.awt.Dimension(40, 10)); } } } COM: <s> this method initializes this </s>
funcom_train/45642970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBlockLengths(String blocklengths) { if (blocklengths != null) { if (blocklengths.indexOf("|") == -1) { // no separator; implies just one given blocklength supportedBlockLengths = new int[1]; supportedBlockLengths[0] = Integer.valueOf(blocklengths); } else { logger.debug("tokenizing blocklengths"); supportedBlockLengths = tokenizeLengths(blocklengths); } } else { // no block lengths specified logger.debug(name + " blocklengths is null"); supportedBlockLengths = new int[0]; } } COM: <s> sets the available block lenghts for the algorithm </s>
funcom_train/45471910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnmarshallerNoArgs() throws Exception { Unmarshaller u = new Unmarshaller(); u.setClass(UnmarshalFranz.class); UnmarshalFranz f = (UnmarshalFranz)u.unmarshal(_reader); Assert.assertNotNull(f); Assert.assertEquals("Bla Bla Bla", f.getContent()); } COM: <s> creates an unmarshaller instance without any argument sets the </s>
funcom_train/311410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convert_ring2nest() throws Exception { int ipn = 0; setScheme(Scheme.NESTED); for (int imap = 0; imap < this.getName().length; imap++) { for (int ipr = 0; ipr < nPixel(); ipr++) { ipn = (int) this.ring2nest(ipr); MapItem item = map[imap][ipr]; double val = item.getValue(); if (item == null) { item = map[imap][ipn] = new MapItem(); } item.setValue(val); } } } COM: <s> makes the conversion map ring to nest </s>
funcom_train/18846430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createBPDIDMissingException(String tscToken) { DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getFatalErrorDiagnosticsCode(); String exceptionID = "80003"; String serExMsg = edg.constructErrorDocOneItem(tscToken, componentID, severityType, subSystemCode, exceptionID); return serExMsg; } COM: <s> construct exception message </s>
funcom_train/7418048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void identifyGatewayDirection(Gateway gateway, Shape shape) { /* Determine the direction of the Gateway */ int numIncomming = shape.getIncomings().size(); int numOutgoing = shape.getOutgoings().size(); GatewayDirection direction = GatewayDirection.UNSPECIFIED; if (numIncomming > 1 && numOutgoing > 1) direction = GatewayDirection.MIXED; else if (numIncomming <= 1 && numOutgoing > 1) direction = GatewayDirection.DIVERGING; else if (numIncomming > 1 && numOutgoing <= 1) direction = GatewayDirection.CONVERGING; /* Set the gateway direction */ gateway.setGatewayDirection(direction); } COM: <s> determines and sets the </s>
funcom_train/11720733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exportData(ExportContext context, boolean isCollection, Node contentNode) throws IOException, RepositoryException { if (contentNode.hasProperty(JcrConstants.JCR_DATA)) { Property p = contentNode.getProperty(JcrConstants.JCR_DATA); IOUtil.spool(p.getStream(), context.getOutputStream()); } // else: stream undefined -> content length was not set } COM: <s> checks if the given content node contains a jcr data property </s>
funcom_train/1842978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRefType(Type t) throws ClassNotFoundException { if (t instanceof ObjectType && isEntity(((ObjectType) t).getClassName())) { return false; } if (t instanceof ArrayType) { ArrayType at = (ArrayType) t; return isRefType(((ArrayType) t).getBasicType()); } return true; } COM: <s> return whether this type is a non entity </s>
funcom_train/39533519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleChanged(){ Runnable runnable=new Runnable(){ public void run() { for(HandlesListener listener : handlesListeners){ if(listener!=null){ listener.handleChanged(currentHandle, new HashSet<SVGHandle>(handles)); } } if(currentHandle!=null){ currentHandle.getSVGFrame().getFrameMenuItem().setSelected(true); } } }; if(SwingUtilities.isEventDispatchThread()){ runnable.run(); }else{ try{ SwingUtilities.invokeAndWait(runnable); }catch (Exception ex){} } } COM: <s> notifies the listeners when a svg handle has changed </s>
funcom_train/8076569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isContained(TreeNode parent, String[] values, int lvl){ if(lvl == values.length) // Parent is leaf return true; else if(lvl > values.length) return false; else{ Vector kids = parent.children; int index = search(kids, values[lvl]); if(index != -1){ TreeNode newParent = (TreeNode)kids.elementAt(index); return isContained(newParent, values, lvl+1); } else return false; } } COM: <s> private function to decide whether one level of one branch </s>
funcom_train/18938753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validate( String fullID ) { if ( fullID != null ) { Pattern p = Pattern.compile( "[a-zA-Z_0-9-\\.]+@[a-zA-Z_0-9-\\.]+[/a-zA-Z_0-9-\\.]*" ); Matcher m = p.matcher( fullID ); return m.matches(); } return false; } COM: <s> validates the given identification </s>
funcom_train/18288556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateProjectFromConfig(ILaunchConfiguration config) { String projectName = ""; //$NON-NLS-1$ try { projectName = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); } catch (CoreException ce) { EclipseMECorePlugin.log(IStatus.WARNING, "Error updating project field", ce); } projectText.setText(projectName); } COM: <s> update the project field from the launch configuration </s>
funcom_train/7276048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cancelUDPFailover(byte[] clientGUID) { synchronized (UDP_FAILOVER) { byte[] key = clientGUID; IntWrapper requests = UDP_FAILOVER.get(key); if (requests != null) { requests.addInt(-1); if (requests.getInt() <= 0) UDP_FAILOVER.remove(key); } } } COM: <s> removes data from udp failover indicating a push has used it </s>
funcom_train/35680124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommonPackage() throws Exception { CixsJaxwsService model = Samples.getLsfileae(); String resStr = genSource(model, Jaxws2CixsGenerator.JAXWS_TO_CIXS_GENERATOR_NAME, "vlc/j2c-service-common-package.vm", GEN_SRC_DIR, "test.txt"); assertTrue(resStr.contains("package com.legstar.test.cixs.lsfileae;")); } COM: <s> generate the package name </s>
funcom_train/19963300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(long bytes, OnBytesChangedListener callBack) { long amount = bytes; int unit = 0; while ((amount % 1024) == 0 && amount > 0) { unit++; amount >>= 10; } mAmountPicker.setCurrent((int) amount); mUnitPicker.setCurrent(unit); mOnBytesChangedListener = callBack; } COM: <s> init the component </s>
funcom_train/37564482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createRandomString(int numChars) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < numChars; i++) { buf.append((char) ('A' + Math.abs(rand.nextInt() % 26))); } return buf.toString(); } COM: <s> return a string of num chars length </s>
funcom_train/16564889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GeneralMatrix getDq() { // GeneralMatrix Dq = new GeneralMatrix(3 * sourcePoints.size(), 1); GeneralMatrix R = new GeneralMatrix(3, 3); R.mul(getRalfa(), getRbeta()); R.mul(R, getRgamma()); return specialMul(R, x); } COM: <s> generates partial derivative in q scale factor </s>
funcom_train/26467716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Composite createComposite(TabFolder tabFolder) { GridLayout layout; GridData data; layout = new GridLayout(); Composite composite = new Composite(tabFolder, SWT.NONE); composite.setLayout(layout); data = new GridData(GridData.FILL); data.grabExcessHorizontalSpace = true; composite.setLayoutData(data); return composite; } COM: <s> create a composite for the tab folder </s>
funcom_train/50863136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void destroyOldSimulation() { malfunctionFactory.destroy(); mars.destroy(); missionManager.destroy(); relationshipManager.destroy(); medicalManager.destroy(); masterClock.destroy(); unitManager.destroy(); creditManager.destroy(); scientificStudyManager.destroy(); relationshipManager.destroy(); eventManager.destroy(); } COM: <s> destroys the current simulation to prepare for creating or loading a new simulation </s>
funcom_train/8318420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { log.info(Messages.getString("CacheDecorator.clearing_cache")); //$NON-NLS-1$ final List entries = new ArrayList( managedCache.keySet() ); for (Object object : entries) { if(object instanceof Cacheable) { remove((Cacheable)object); } else { remove(object); } } managedCache.clear(); Arrays.fill(adaptiveResults, 0); } COM: <s> clears the cache </s>
funcom_train/42481543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_exceptions2() { System.out.println("test_exceptions2 output:"); int i = 2; System.out.println("i: "+ i); // obviously wrong fail("fail(), with this test_exceptions2 message"); // will the test execute this or exit with exception? // should not execute i = i * 10; System.out.println("i: "+ i); } COM: <s> test should fail with the fail message displayed </s>
funcom_train/35541694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLevelAlone() { lexAndCheck(" 01." + LS, "[@0,7:8='01',<DATA_ITEM_LEVEL>,1:7]" + "[@1,9:9='.',<PERIOD>,1:9]"); } COM: <s> items dont have to be named </s>
funcom_train/49576032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean login(ReportGeneratorConfiguration reportGeneratorConfiguration) throws InfoException { UsersRepository repository = new UsersRepository(reportGeneratorConfiguration.getUsersRepositoryPath()); UserManagerLoginFrame userManagerLoginFrame = new UserManagerLoginFrame(this,"Login",true,"root",reportGeneratorConfiguration,userManager); if(userManagerLoginFrame.login()) { return true; } return false; } COM: <s> metodo privado para login </s>
funcom_train/34339726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getNuevo() { if (Nuevo == null) {//GEN-END:|42-getter|0|42-preInit // write pre-init user code here Nuevo = new Command("NuevoRegistro", Command.ITEM, 0);//GEN-LINE:|42-getter|1|42-postInit // write post-init user code here }//GEN-BEGIN:|42-getter|2| return Nuevo; } COM: <s> returns an initiliazed instance of nuevo component </s>
funcom_train/8023143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push(String queueKey, String value) { try { Vector params = new Vector(4); params.addElement(groupID); params.addElement(pageID); params.addElement(queueKey); params.addElement(value); System.out.print("about to executeAsync pushValue"); System.out.println(" " + params); client.executeAsync("pushValue", params, acb); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> queue key is relative to current web scheme step </s>
funcom_train/14171222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putProperties(@NotNull Map map) { for (Map.Entry entry : (Set<Map.Entry>) map.entrySet()) { String key = String.valueOf(entry.getKey()); String value = entry.getValue() == null ? null : String.valueOf(entry.getValue()); putProperty(key, value); } } COM: <s> add unset proeprties to this context </s>
funcom_train/802942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInstrumentNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InstrumentDescriptionType_instrumentName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_InstrumentDescriptionType_instrumentName_feature", "_UI_InstrumentDescriptionType_type"), MzdataPackage.Literals.INSTRUMENT_DESCRIPTION_TYPE__INSTRUMENT_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the instrument name feature </s>
funcom_train/15399077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJobSubmissionState (int state) throws DrmaaException { String stateString = null; if (state == super.HOLD) { stateString = this.HOLD_STRING; } else if (state == super.ACTIVE) { stateString = this.ACTIVE_STRING; } else { throw new InvalidAttributeValueException ("jobSubmissionState attribute is invalid"); } this.setAttribute (JOB_SUBMISSION_STATE, stateString); } COM: <s> p specifies the job state at submission </s>
funcom_train/8439083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStatus() { if (status == null) {//GEN-END:|141-getter|0|141-preInit // write pre-init user code here status = new StringItem("\u0421\u0442\u0430\u0442\u0443\u0441 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438:", null);//GEN-LINE:|141-getter|1|141-postInit // write post-init user code here }//GEN-BEGIN:|141-getter|2| return status; } COM: <s> returns an initiliazed instance of status component </s>
funcom_train/36365640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { for(int i=0; i<pivData.length; i++) { for(int j=0; j<pivData[0].length; j++) { System.out.print(pivData[i][j] + " "); } System.out.println(); } } COM: <s> print data to std out </s>
funcom_train/35043158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean iWouldBeCoordinator(Vector<Address> new_mbrs) { Membership tmp_mbrs=gms.members.copy(); tmp_mbrs.merge(new_mbrs, null); tmp_mbrs.sort(); return !(tmp_mbrs.size() <= 0 || gms.local_addr == null) && gms.local_addr.equals(tmp_mbrs.elementAt(0)); } COM: <s> returns potential coordinator based on lexicographic ordering of member addresses </s>
funcom_train/37069779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAliasNames(String alias_type) { return selectcol2("SELECT pub_genealias.alias from pub_genealias " + " where pub_genealias.pub_gene_id = ? " + " and pub_genealias.is_obsolete='n' " + " and pub_genealias.alias_type = ? ", alias_type); } COM: <s> returns a list of aliases to this gene given a particular alias type </s>
funcom_train/45623018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDictionariesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_dictionaries_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_dictionaries_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_Dictionaries(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the dictionaries feature </s>
funcom_train/37564724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFinished() { if (LOG.isLoggable(Level.FINER)) LOG.finer(queuedRequests.size() + " queued, " + outstandingRequests.size() + " outstanding," + delaysInUse() + "/" + owner.getMaxConcurrentRequests() + " delays in use"); return ( (queuedRequests.size() == 0) && (outstandingRequests.size() == 0) ); } COM: <s> returns code true code if this queue is finished processing </s>
funcom_train/24428776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testMove(int x, int y) { if (mAnimationLoop.isRunning()) { // stops problems with a rapid move // after pressing 'quit' mIsOverPauseButton = mPauseArea.contains(x, y); mIsOverQuitButton = mQuitArea.contains(x, y); mGame.testMove(x, y); } } COM: <s> is x y over the pause or quit button </s>
funcom_train/35846979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getThemeFromName(String name) { if (name == null) { return null; } String className = null; for (int i = 0; i < THEMES.length; ++i) { if (THEMES[i].getName().equals(name)) { className = THEMES[i].getClass().getName(); } } return className; } COM: <s> returns the theme class name identifier for the specified </s>
funcom_train/14655250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBColumn getColumnByName(String name) { if (!getDBColumnList().containsKey(name)) { getLogger().error( "The column '" + name + "' does not exist in the table '" + getName() + "'"); } return (DBColumn) getDBColumnList().get(name); } COM: <s> search for a column by name </s>
funcom_train/19073973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean renameMacro(String oldName, String newName) { JooneMacro macro = (JooneMacro)macros.get(oldName); if (macro != null) { if (macro.isEventMacro()) return false; else { macros.remove(oldName); this.addMacro(newName, macro.getText()); return true; } } else return false; } COM: <s> renames a macro </s>
funcom_train/7511092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneImageSource() { if (jScrollPaneImageSource == null) { jScrollPaneImageSource = new JScrollPane(); jScrollPaneImageSource .setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); jScrollPaneImageSource .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); jScrollPaneImageSource.setViewportView(getJPanelImageSource()); } return jScrollPaneImageSource; } COM: <s> this method initializes j scroll pane image source </s>
funcom_train/11344815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void collectParentClassesFromClass(Class clazz, Set acc, Bundle bundle) throws ClassNotFoundException { Class parent = clazz.getSuperclass(); if (parent != null) { acc.add(parent.getName()); collectParentClassesFromClass(parent, acc, bundle); } } COM: <s> collect parent classes for the given class </s>
funcom_train/51616130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttributes(AttributeList attrs) { if (!attrs.isEmpty()) { String attr_name = attrs.head().getName(); Object attr_value = attrs.head().getValue(); addAttributes(attrs.tail()); ((Element)top).setAttribute(attr_name, attr_value.toString()); } } COM: <s> add a set of attributes to the current tag </s>
funcom_train/35321117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPropertyChangeListener(PropertyChangeListener listener) { if (listener == null) { return; } if (listener instanceof PropertyChangeListenerProxy) { PropertyChangeListenerProxy proxy = (PropertyChangeListenerProxy)listener; // Call two argument add method. addPropertyChangeListener(proxy.getPropertyName(), proxy.getListener()); } else { this.map.add(null, listener); } } COM: <s> add a property change listener to the listener list </s>
funcom_train/2854281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BinaryExpr (Operator o, Expr leftSub, Expr rightSub) { super(Operator.TAGS[o.getIndex()]); if (o == null || leftSub == null) throw new NullPointerException( "null operator or left subexpression"); op = o; left = leftSub; right = rightSub; } COM: <s> create a binary two operand expression </s>
funcom_train/3374340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { JEditorPane editor = getEditor(e); if (editor != null) { int a = this.a; if ((e != null) && (e.getSource() == editor)) { String s = e.getActionCommand(); try { a = Integer.parseInt(s, 10); } catch (NumberFormatException nfe) { } } MutableAttributeSet attr = new SimpleAttributeSet(); StyleConstants.setAlignment(attr, a); setParagraphAttributes(editor, attr, false); } } COM: <s> sets the alignment </s>
funcom_train/878331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showShopList() { lastListing = WorldImpl.getInstance().getShops(); hr( locale.translate("shop") ); for (int i=0; i<lastListing.size(); i++){ stdout.print(i + ") " + lastListing.elementAt(i) + "\n"); } hr(); } COM: <s> displays a list of the shops </s>
funcom_train/48600463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void end() { if (list != null) { if (list.contains(subEntity)) { xml.xmlMessage(WriterXML.ERROR, "error:duplicate:name:sub", subEntity.getName()); } else { list.add(subEntity); } } } COM: <s> ends the tag interpretation </s>
funcom_train/48978701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Range join(Range range) { // Update the lower bound: if (range.lower!=null) { if (lower==null || range.lower.isBetterThan(lower)) { lower = range.lower.copy(); } } // Update the upper bound: if (range.upper!=null) { if (upper==null || range.upper.isBetterThan(upper)) { upper = range.upper.copy(); } } // Reset bounds list: this.bounds = null; // Done. return this; } COM: <s> join this range with the argument range </s>
funcom_train/8491639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getHeightTile() { if (heightTile == null) { heightTile = new JTextField(); heightTile.setBounds(new Rectangle(370, 29, 36, 16)); heightTile.setBackground(Color.green); heightTile.addCaretListener(new javax.swing.event.CaretListener() { public void caretUpdate(javax.swing.event.CaretEvent e) { setNewTileHeight(); } }); } return heightTile; } COM: <s> this method initializes height tile </s>
funcom_train/39533691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDOMListener(SVGDOMListener listener){ if(listener!=null){ Set<SVGDOMListener> set=null; if(domListeners.containsKey(listener.getNode())) { set=domListeners.get(listener.getNode()); }else { //creating and putting the new set into the map set=new CopyOnWriteArraySet<SVGDOMListener>(); domListeners.put(listener.getNode(), set); } set.add(listener); listener.setHandle(handle); } } COM: <s> adding a listener to the svg dom of this handle </s>
funcom_train/27747894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point toControl (Point point) { checkWidget (); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); int eventHandle = eventHandle (); int window = OS.GTK_WIDGET_WINDOW (eventHandle); int [] x = new int [1], y = new int [1]; OS.gdk_window_get_origin (window, x, y); return new Point (point.x - x[0], point.y - y[0]); } COM: <s> returns a point which is the result of converting the </s>
funcom_train/25649206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsSystemModel() { KendoSystemModel sys = project.getDefaultModel(); TestSetItem instance = new TestSetItemImpl(sys); assertTrue(instance.isSystemModel()); assertFalse(instance.isApplicationModel()); assertFalse(instance.isSubModel()); assertFalse(instance.isUseCasePath()); assertFalse(instance.isUseCase()); } COM: <s> test of is system model method of class com </s>
funcom_train/1561003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getRestorePanel() { if (restorePanel == null) { restorePanel = new JPanel(); restorePanel.setMinimumSize(new Dimension(10,0)); restorePanel.setBorder(BorderFactory.createEtchedBorder(1)); restorePanel.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { restoreBrowserPanel(); } public void mouseEntered(MouseEvent e) { restorePanel.setBackground(Color.LIGHT_GRAY); } public void mouseExited(MouseEvent e) { restorePanel.setBackground(null); } }); } restorePanel.setBackground(null); return restorePanel; } COM: <s> returns restore panel if none exists a new one is built </s>
funcom_train/3937039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContent(String inParameterName) { String[] lParts = inParameterName.split(PATH_DELIMITER); if (lParts.length == 1) { ListenerParameter lParameter = elements.get(inParameterName); return lParameter == null ? null : lParameter.getContent(); } Stack<String> lPath = createPathStack(lParts); String lElementID = lPath.pop(); ListenerParameter lParameter = elements.get(lElementID); return lParameter == null ? null : lParameter.getContent(lPath); } COM: <s> returns the content from the specified parameter </s>
funcom_train/13953811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ERMetadataEntry getMetadataEntryByType(int type) { ERMetadataEntry matchingEntry = null; Iterator metadataEntriesIter = _metadataEntries.iterator(); while (matchingEntry == null && metadataEntriesIter.hasNext()) { ERMetadataEntry entry = (ERMetadataEntry) metadataEntriesIter.next(); if (entry.getType() == type) { matchingEntry = entry; } } return matchingEntry; } COM: <s> returns a metadata entry for the given type </s>
funcom_train/38734922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getFilteredProjectsCounter() { Iterator<? extends FilteredCountedItem> prs = this.getFilteredProjects(); int filteredProjectsCounter = 0; while (prs.hasNext()) { FilteredCountedItem fci = prs.next(); filteredProjectsCounter += fci.getCounter(); } return filteredProjectsCounter; } COM: <s> returns the total number of urls belonging to the filtered projects </s>
funcom_train/20876168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int isInConflict(Student student) { if (getAssignment() == null) return 0; int ret = 0; for (JenrlConstraint jenrl : activeJenrls()) { Lecture lect = jenrl.another(this); if (lect.students().contains(student)) ret++; } return ret; } COM: <s> true if this lecture is in a student conflict with the given student </s>
funcom_train/28489811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttr(Node node, String name) { ProgressLogger.getInstance().debug("enter getAttr(Node, String)"); NamedNodeMap attrs = node.getAttributes(); Node attr = attrs.getNamedItem(name); ProgressLogger.getInstance().debug("exit getAttr(Node, String)"); if (attr == null) return null; else return attr.getNodeValue(); } COM: <s> gets an attribute of a node </s>
funcom_train/49317737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void call( Map message ) throws SampException { HubConnection connection = connector_.getConnection(); if ( connection != null ) { Client client = comboBoxModel_.getClient(); if ( client == null ) { connection.callAll( getTag(), message ); } else { connection.call( client.getId(), getTag(), message ); } } } COM: <s> sends a given message by call response to the currently selected target </s>
funcom_train/37828744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fire(EventType eventType, String eventDetail, String furtherData) { Pair<EventType, String> key = new Pair<EventType, String>(eventType, eventDetail); List<EventHandler> handlers = waitingEventHandlers.remove(key); if (handlers != null) { for(EventHandler handler : handlers) { handler.fire(eventType, eventDetail, furtherData); } } } COM: <s> fires and removes an event handler </s>
funcom_train/22665138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCmbBirthdayMonth() { if (cmbBirthdayMonth == null) { cmbBirthdayMonth = new JComboBox(); cmbBirthdayMonth.setBounds(new Rectangle(452, 234, 76, 27)); cmbBirthdayMonth.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { updateMonthDayCount(); } }); } return cmbBirthdayMonth; } COM: <s> this method initializes cmb birthday month </s>
funcom_train/14460800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateRefCount(short rc){ byte[] newdata = this.getData(); byte[] b = ByteTools.shortToLEBytes(rc); if(b[0]==-1) b[0]=0; System.arraycopy(b, 0, newdata, 6, 2); setData(newdata); init(); } COM: <s> update the number of refs in this shrfmla </s>
funcom_train/3543237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoChoices(AutoChoices mode) { if (mode != autoChoices) { enableNotifications(false); this.autoChoices = mode; for (FilterEditor editor : editors.values()) { // after this call, the editor will request its choices editor.setAutoChoices(mode); } enableNotifications(true); } } COM: <s> sets unsets the auto choices flag </s>
funcom_train/4936544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddKnowledgeURI2() throws MalformedURLException, IOException, URISyntaxException { RuleBasedApplicationStarter rbas = new RuleBasedApplicationStarter(); rbas.addKnowledge( new URI("examples/book.n3") ); ITripleStore triple_store = rbas.getTripleStoreRETE(); Assert.assertTrue( "predicate_uris.size() == 12", triple_store.query("").size() == 12 ); } COM: <s> line add knowledge and following are permuted compared to test add knowledge uri </s>
funcom_train/3180778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printCDATA(CDATA cdata, Writer out) throws IOException { String str = currentFormat.textNormalize ? cdata.getTextNormalize() : ((currentFormat.textTrim) ? cdata.getText().trim() : cdata.getText()); out.write("<![CDATA["); out.write( str); out.write("]]>"); } COM: <s> this will handle printing of code </s>
funcom_train/44849380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SearchResult createSearchResult(String inSearchItemName, String inCN, String inUID, String inName, String inSN, String inMail) { return new SearchResult(inSearchItemName, null, createAttributes(inCN, inUID, inName, inSN, inMail)); } COM: <s> each code search result code is an entry </s>
funcom_train/10765380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unlockAll() { if (__log.isDebugEnabled()) { __log.debug("UNLOCKER: unlockAll: " + _locks); } if (((OScope)SCOPEACT.this._self.o).atomicScope) getBpelRuntimeContext().forceFlush(); for (IsolationLock il : _locks) il.lockChannel.unlock(_synchChannel); _locks.clear(); } COM: <s> unlock all the acquired locks </s>
funcom_train/23271270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCategoryAxisMargin(double margin) { CategoryPlot plot = (CategoryPlot) this.chart.getPlot(); if (plot != null) { double old = plot.getDomainAxis().getCategoryMargin(); plot.getDomainAxis().setCategoryMargin(margin); firePropertyChange("categoryAxisMargin", old, margin); } } COM: <s> sets the total space allocated to the margin between categories </s>