__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4377653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextTo(char delimiter) throws RJSONException { StringBuffer sb = new StringBuffer(); for (;;) { char c = next(); if (c == delimiter || c == 0 || c == '\n' || c == '\r') { if (c != 0) { back(); } return sb.toString().trim(); } sb.append(c); } } COM: <s> get the text up but not including the specified character or the </s>
funcom_train/24116999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remapTaskLink(TaskLink taskLink, AbstractResource resource){ try{ if(taskLink==null) throw new NullPointerException("TaskLink does not exist"); } catch(Exception e){ logger.error("Error during remapping the task link", e); } mapTaskLink(taskLink, resource); // systemModel.recreateLocalViews(); } COM: <s> remaps the task linkk to a resource and refreshes all local views </s>
funcom_train/28878174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addActionListener(String _p, ActionListener _l) { if ((_p == null) || (_l == null)) return false; if (ac_.containsKey(_p)) { Vector _prop = (Vector) ac_.get(_p); if ((_prop != null) && (!_prop.contains(_l))) _prop.add(_l); else return false; } else { Vector _prop = new Vector(); _prop.add(_l); ac_.put(_p, _prop); } return true; } COM: <s> registers the specified listener for this action </s>
funcom_train/49018294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cloneProperties(Item propertiesSource) { Iterator<String> it = propertiesSource.getProperties().keySet().iterator(); while (it.hasNext()) { String sProperty = it.next(); if (!getMeta(sProperty).isConstructor()) { this.properties.put(sProperty, propertiesSource.getValue(sProperty)); } } } COM: <s> clone all properties from a given properties list but not overwrite </s>
funcom_train/32095500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getTrainingLevel() { StepConfig[] conf = Options.getInstance().getOrgSolverSteps(); int level = -1; for (StepConfig act : conf) { if (act.isEnabledTraining()) { int actLevel = act.getLevel(); if (actLevel > level) { level = actLevel; } } } return level; } COM: <s> utility method gets the </s>
funcom_train/36634398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check(int var1, int val1, int var2, int val2) { constraint_checks++; //System.out.println (var1 + ", "+ val1 + ", " + var2 + ", " + val2); if (constraints[var1][var2] == null) return true; return constraints[var1][var2][val1][val2]; } COM: <s> this is the function that does the actual constraint checks </s>
funcom_train/18357770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getMissionById() { Map retVal = new HashMap(); assert (lmc != null); try { Collection missList = lmc.getMissionList(); Iterator missions = missList.iterator(); while (missions.hasNext()) { Mission aMiss = (Mission) missions.next(); retVal.put(new Long(aMiss.getMissionId()).toString(),aMiss); } } catch (Exception e) { logH.getLogger().severe("Mission not available" + e.getMessage()); } return retVal; } COM: <s> returns a map of the string mission id to the mission itself </s>
funcom_train/28362623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { try { if ( shouldExecute() ) { // the very first algorithm should be the InitialAlgorithm which generates a trial point from the variables' starting values final AlgorithmStrategy initialStrategy = new SingleAlgorithmStrategy( _solver.getAlgorithmPool(), new InitialAlgorithm( _problem ) ); execute( initialStrategy ); } while ( shouldExecute() ) { execute( _market.nextStrategy() ); } } catch ( RunTerminationException exception ) { exception.printStackTrace(); } } COM: <s> execute the search schedule </s>
funcom_train/31111418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDsqPenalty(long newPen) { Long oldP = new Long(fPenalty); fPenalty = fPenalty & (DSQ_MASK ^ 0xFFFFFFFF); // clear previous finish // bits fPenalty = fPenalty | (newPen & DSQ_MASK); // add in to finish penalty // bits firePropertyChange(PENALTY_PROPERTY, oldP, new Long(fPenalty)); } COM: <s> replaces the disqualification penalty leaving others alone </s>
funcom_train/40704394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void photosUpload(String aid, String caption, AsyncCallback<Photo> callback) { Json j = new Json (); j.put ( "data", "asldkjasdlfkjasdflkjasd f sadlkjasdlfkj " ); callMethodRetObject ( "photos.upload", j.getJavaScriptObject (), Photo.class, callback ); } COM: <s> uploads a photo owned by the specified user or the current session user </s>
funcom_train/34633346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MergeEntry getPartnerEntry(final MergeEntry other) throws PartnerNotFoundException { if (other.isStartEntry()) return this.getStartMarkerEntry(); else if (other.isEndEntry()) return this.getEndMarkerEntry(); else return this.getPartnerEntry(other.getNode()); } COM: <s> return the partner entry for the given merge entry </s>
funcom_train/21060065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean gotoLine(int lineNumber) { Element lineElement = document.getDefaultRootElement().getElement(lineNumber); if (lineElement == null) { return false; } this.select(lineElement.getStartOffset(), lineElement.getStartOffset()); return true; } COM: <s> points the curser to the begin of the given line </s>
funcom_train/13271945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDepth(float depth) { if (isResizable()) { if (depth != this.depth) { float oldDepth = this.depth; this.depth = depth; this.shapeCache = null; this.propertyChangeSupport.firePropertyChange(Property.DEPTH.name(), oldDepth, depth); } } else { throw new IllegalStateException("Piece isn't resizable"); } } COM: <s> sets the depth of this piece of furniture </s>
funcom_train/22277782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color darkerColor() { int r, g, b; // This case is really common. if (this == Color.lightGray) { return Color.gray; } r = (128 * red()) / 192; g = (128 * green()) / 192; b = (128 * blue()) / 192; return new Color(r, g, b); } COM: <s> returns a darker version of this color </s>
funcom_train/25084197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createViewerTitle( int pos ) { ViewerTitle viewerTitle = (ViewerTitle)findComponent( getId() + "_viewerTitle" ); if( viewerTitle == null ) { viewerTitle = new ViewerTitle(); viewerTitle.setId( getId() + "_viewerTitle" ); getChildren().add( pos, viewerTitle ); } } COM: <s> creates the viewer title </s>
funcom_train/51698968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransitionParameterDefinition getParameterDefinition(String parameterId) { for (Iterator<TransitionParameterDefinition> iter = getParameterDefinitions(); iter.hasNext();) { TransitionParameterDefinition paramDef = iter.next(); if (paramDef.getId().equals(parameterId)) return paramDef; } return null; } COM: <s> get the transition parameter definition with the given id defined in this transition </s>
funcom_train/41806304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCurrentCode(String findName) { for (int i = 0; i < codeCount; i++) { if (findName.equals(code[i].getFileName()) || findName.equals(code[i].getPrettyName())) { setCurrentCode(i); return; } } } COM: <s> internal helper function to set the current tab based on a name </s>
funcom_train/3820374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canView(User user) { SecurityContext sctx = cat.getProject().getSecurityContext(); // 2. Check permissions try { sctx.check(user, sctx.getViewContentPermission(ctype)); sctx.check(user, sctx.getViewCategoryPermission(cat)); return true; } catch (SCMException ex) { return false; } } COM: <s> check view permissions for this content </s>
funcom_train/3429851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCanonicalizationMethodURI() { Element el= XMLUtils.selectDsNode(this._constructionElement.getFirstChild(), Constants._TAG_CANONICALIZATIONMETHOD,0); if (el==null) { return null; } return el.getAttributeNS(null, Constants._ATT_ALGORITHM); } COM: <s> returns the canonicalization method uri </s>
funcom_train/23950377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateParent(AVLNode newChild, AVLNode oldChild) { newChild.parent = oldChild.parent; if (oldChild.parent != null) { if (oldChild.parent.left == oldChild) { oldChild.parent.left = newChild; } else { oldChild.parent.right = newChild; } } else { root = newChild; } } COM: <s> update two way parent child reference to a new child </s>
funcom_train/29645714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deepEquals(DeepEquality other, EqualityHelper helper) { if (this == other) return true; if (!(other instanceof MedicalInsurance)) return false; if (helper.isProcessed(this)) return true; helper.markProcessed(this); return deepCompareFields((MedicalInsurance)other, helper); } COM: <s> indicates whether some other object is deep equal to this one </s>
funcom_train/36422089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseLines( String input ){ if( input == null ){ return null; } String output = null; try { output = parser.parse(input, true, false); } catch (IOException ex) { System.out.println("Exception in IceParser!"); ex.printStackTrace(); } return output; } COM: <s> parses the input using ice parser </s>
funcom_train/12663181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean existsCmdModule(final String moduleName) { if (null == moduleName) { IllegalArgumentException illegalArgumentException = new IllegalArgumentException( "moduleName parameter was null"); logger.error("Error: ", illegalArgumentException); throw illegalArgumentException; } return existsChild(moduleName); } COM: <s> determines if named cmdmodule exists in the lookup table </s>
funcom_train/48403818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDragMoveHandler(com.smartgwt.client.widgets.events.DragMoveHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.DragMoveEvent.getType()) == 0) setupDragMoveEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.DragMoveEvent.getType()); } COM: <s> add a drag move handler </s>
funcom_train/36958964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractRubydoc(IMember member, IProgressMonitor monitor) throws RubyModelException, IOException { if (member != null && member.getRubyScript() != null) { // Reader reader= getHTMLContentReader(member, monitor); // if (reader != null) // return getString(reader); return RDocUtil.getHTMLDocumentation(member); } return null; } COM: <s> extracts the javadoc for the given code imember code and returns it </s>
funcom_train/134541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(ViewI view) { /* The reason this is done is so that pickTraversalByPixel will work. * Otherwise, the root glyph's pixel box is always empty. * Hence, since all glyphs are children of the root glyph, * no glyphs can get hit. -- Eric 1998-12-12 */ view.transformToPixels(getCoordBox(), getPixelBox()); super.draw(view); } COM: <s> calculates the pixel box </s>
funcom_train/17800548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tasting findByPK(String id) { Tasting tasting = new Tasting(); tasting.setId(id); List druideDB_resultat = find(tasting); if ( druideDB_resultat != null && druideDB_resultat.size() == 1) { return (Tasting)druideDB_resultat.get(0); } return null; } COM: <s> this method is used to find a tasting with its pk s </s>
funcom_train/39967773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void subdivide(BitSet bitSet, int lo, int hi) { bitSet.set(lo); // mark this division start int mid = (lo + hi) >> 1; // the point of next subdivision if ( Math.random() < density && hi - lo > minNoteLength) { subdivide(bitSet, lo, mid); // lower subdivision subdivide(bitSet, mid, hi); // higher subdivision } } COM: <s> stochastic binary subdivision </s>
funcom_train/26316070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAdjacentLocCW(int loc) { switch (loc) { case LOC_NOSE: return LOC_RWING; case LOC_LWING: return LOC_NOSE; case LOC_RWING: return (LOC_RWING + 3); case LOC_AFT: return (LOC_LWING + 3); case 4: return LOC_LWING; case 5: return LOC_AFT; default: return Integer.MIN_VALUE; } } COM: <s> find the adjacent firing arc location on this vessel clockwise </s>
funcom_train/43239776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePredicate(Predicate pred) { if (monitor) { VisualizationViewer vv = v_panelGraph.getVisualizationViewer(); vv.suspend(); gmemory.removeVertex(pred); synchronized (v_panelGraph.getGraphZoom()) { v_panelGraph.getLayoutMutable().update(); } if (!vv.isVisRunnerRunning()) vv.init(); else vv.unsuspend(); refreshVisual(); } else { gmemory.removeVertex(pred); } } COM: <s> removes the predicate from the repage memory </s>
funcom_train/49318283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _cancel() { Component c = (Component) _mainImageDisplay; c.removeMouseListener(_pickObjectListener); _imageZoom.setActive(false); c.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); pickButton.setText(_I18N.getString("pick")); _pickMode = false; } COM: <s> cancel the current pick operation </s>
funcom_train/17733772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int index, Row element) { if ((index > size) || (index < 0)) { throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); } ensureCapacity(size + 1); // Increments modCount!! System.arraycopy(elementData, index, elementData, index + 1, size - index); elementData[index] = element; size++; } COM: <s> inserts the specified element at the specified position in this </s>
funcom_train/41068590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetChecksum() { System.out.println("getChecksum"); MIDISystemExclusive instance = new MIDISystemExclusive(); int expResult = 0; int result = instance.getChecksum(); 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 checksum method of class com </s>
funcom_train/9067426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFixPars( Map fixPars ) throws SpotFail { Set checkSet = new HashSet( fixPars.keySet() ); checkSet.removeAll( _defPars.keySet() ); if ( ! checkSet.isEmpty() ) { throw new SpotFail ( "Fixed parameters " + checkSet + " are not Cus parameters" ); } _allPars = new Hashtable( fixPars ); } COM: <s> set the cus parameters that are not variable for this function </s>
funcom_train/31144099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke ( Object proxy, Method m, Object[] args ) throws Throwable { Bench.mark ( object.hashCode () + "." + m.getName () ); try { return m.invoke ( object, args ); } catch ( InvocationTargetException ex ) { throw ex.getTargetException (); } finally { Bench.print ( object.hashCode () + "." + m.getName () ); } } COM: <s> provides any services this request requires then passes the method on to the </s>
funcom_train/18061771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void set(final N value, final N min, final N max) { _min = nonNull(min, "Min value"); _max = nonNull(max, "Max value"); _value = nonNull(value, "Gene value"); _valid = _value.compareTo(_min) >= 0 && _value.compareTo(_max) <= 0; } COM: <s> set the code numer gene code </s>
funcom_train/29767340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAssociationPropertiesFromField(Field f) { AssociationAnnotation annotation = f.getAnnotation(AssociationAnnotation.class); setAnnotation(annotation); if (annotation == null) { setShouldTrackRoot(false); setShouldTrackAssociated(false); } else { setShouldTrackRoot(annotation.shouldTrackCollectionRoot()); setShouldTrackAssociated(annotation.shouldTrackCollectionAssociated()); } } COM: <s> extracts the assocations properties from the annotation of the passed </s>
funcom_train/23202468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private JPanel getSegmentationContentPane() { // if (jContentPane == null) { // jContentPane = new JPanel(); // jContentPane.setLayout(new BorderLayout()); // jContentPane.add(getToolBar(), BorderLayout.NORTH); // jContentPane.add(getSampleRepresentationPanel(),BorderLayout.CENTER); // } // return jContentPane; // } COM: <s> this method initializes j content pane for segmentation </s>
funcom_train/23350817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ProcessReRoot(Node node) { if (node.getParent() == null) { return; } if (node.getParent() != null) { ProcessReRoot(node.getParent()); } // Exchange branch label, length et cetera exchangeInfo(node.getParent(), node); // Rearrange topology Node parent = node.getParent(); node.nodes.add(parent); parent.nodes.remove(node); parent.setParent(node); } COM: <s> adapted from http code </s>
funcom_train/670048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextSequentialString() { String s = "" + sequential; for (int i = s.length(); i < this.digitSize; ++i) { s = "0" + s; } this.sequential++; if (this.sequential >= this.largestValue) { this.sequential = 1; } return s; } COM: <s> get next sequential string </s>
funcom_train/33962532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Blog updateBlog(final Blog blog) { return (Blog) getJpaTemplate().execute(new JpaCallback(){ public Object doInJpa(EntityManager entityManager) throws PersistenceException { Identifiable _identifiable = saveOrUpdate(entityManager, blog); entityManager.flush(); return _identifiable; } }); } COM: <s> update the given code blog code if none exists yet create one </s>
funcom_train/32057732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetInvokesStopCellEditing() { System.out.println("testSetInvokesStopCellEditing"); jgraph.setInvokesStopCellEditing( true ); boolean b = jgraph.getInvokesStopCellEditing(); assertEquals( b, true ); jgraph.setInvokesStopCellEditing( false ); b = jgraph.getInvokesStopCellEditing(); assertEquals( b, false ); } COM: <s> test of set invokes stop cell editing method of class jgraph </s>
funcom_train/32869539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveRunNotification() { ProseRunNode run = new ProseRunNode("test", "dummyhost", -1, null); ProsePlugin.getDefault().addRun(run); ProsePlugin.getDefault().removeRun(run); assertEquals(run, listener.run); } COM: <s> test if listeners are notified on code prose run code removals </s>
funcom_train/7624430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void launchQuerySearch(int actionKey, final String actionMsg) { final String query = mSearchTextField.getText().toString(); final Bundle appData = mAppSearchData; final SearchableInfo si = mSearchable; // cache briefly (dismiss() nulls it) dismiss(); sendLaunchIntent(Intent.ACTION_SEARCH, null, query, appData, actionKey, actionMsg, si); } COM: <s> react to the user clicking the go button </s>
funcom_train/12174005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List fillListWith(List list,int refSize, StyleValue defaultValue){ List defaultList = new ArrayList(); defaultList.addAll(list); for(int i = 0;i < refSize;i++){ defaultList.add(defaultValue); } return defaultList; } COM: <s> fill list with default values up to provided size </s>
funcom_train/14299163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String translate(String toTranslate) { StringBuffer translation = new StringBuffer(); char[] chars = toTranslate.toCharArray(); // loop through the characters for (int charCount = 0; charCount < chars.length; charCount++) { char character = chars[charCount]; String translatedChar = translateChar(character); if (translatedChar == null) { // no translation so use the original translation.append(character); } else { // append translation translation.append(translatedChar); } } return translation.toString(); } COM: <s> translates a string </s>
funcom_train/35298556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeIIOReadWarningListener(IIOReadWarningListener listener) { if (listener == null || warningListeners == null) { return; } int index = warningListeners.indexOf(listener); if (index != -1) { warningListeners.remove(index); warningLocales.remove(index); if (warningListeners.size() == 0) { warningListeners = null; warningLocales = null; } } } COM: <s> removes an code iioread warning listener code from the list of </s>
funcom_train/48024392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRewriteAllowed(){ boolean isAllowed = true; // check if we are allowing nested rewrites if (runtimeRewriteParams_stack.size()>1 && !getParamB("nestedRewrite")){ getLogger().fine("Ignoring nested rewrite"); isAllowed = false; } return isAllowed; } COM: <s> checks whether the current rewrite is allowed or not i </s>
funcom_train/11104787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidInput() { // NOTE - null and zero-length string are irrelevant inputs, because // JSF will not call validators in that scenario try { validator.validate(facesContext, input, "abc"); fail("Should have thrown ValidatorException"); } catch (ValidatorException e) { ; // Expected result // System.err.println("a: " + e.getFacesMessage().getSummary()); } } COM: <s> p tests for invalid input with no range limits </s>
funcom_train/14428639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLabel(final Composite labelPane) { label = new CPULabel(labelPane, line); label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1)); label.addMouseListener(new TraceLineSelectListener(line, zoom)); } COM: <s> creates this lines label using the given text in the given composite </s>
funcom_train/13593499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private pairLinkLink cutLink(Link toCut, Coord p) { Node endPoint = getRandomNode(p); net.addNode(endPoint); pairLinkLink pair = fixLink(toCut, endPoint); diffManager.saveState(null, DifferenceManager.type.CREATE, endPoint, null, pair.link1, pair.link2, null, null, activeLink, null); controls.updateButtons(); controls.updateTable(); return pair; } COM: <s> splits a link l in the coordinate given by p </s>
funcom_train/9499675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final protected void removeFromUpdateSets(AlgoElement algorithm) { boolean removed = algoUpdateSet != null && algoUpdateSet.remove(algorithm); if (removed) // propagate up the graph if (algoParent != null) { GeoElement[] input = algoParent.getInputForUpdateSetPropagation(); for (GeoElement element : input) element.removeFromUpdateSets(algorithm); } } COM: <s> remove algorithm from update sets up the construction graph </s>
funcom_train/43224871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection copyAll(Collection eObjects) { Collection result = new ArrayList(eObjects.size()); for (Iterator i = eObjects.iterator(); i.hasNext();) { EObject eObject; EObject next = (EObject) i.next(); if (next instanceof Implementation || next instanceof Generalization) { if (!isInterfaceInSubModel(next)) { continue; } } eObject = copy(next); result.add(eObject); } return result; } COM: <s> override super returns a collection containing a copy of each eobject </s>
funcom_train/2770682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hitCountChanged() { if (!fHitCountButton.getSelection()) { removeErrorMessage(fgHitCountErrorMessage); return; } String hitCountText= fHitCountText.getText(); int hitCount= -1; try { hitCount = Integer.parseInt(hitCountText); } catch (NumberFormatException e1) { addErrorMessage(fgHitCountErrorMessage); return; } if (hitCount < 1) { addErrorMessage(fgHitCountErrorMessage); } else { removeErrorMessage(fgHitCountErrorMessage); } } COM: <s> validates the current state of the hit count editor </s>
funcom_train/30048966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultContentFilter(QueryResultFormatType myFormat) { for (String[] filter: CatalogConfiguration.WORKSPACE_ELEMENT_FILTERS) { ElementFilterType elementFilter = myFormat.addNewElementFilter(); elementFilter.setPropertyName(filter[0]); elementFilter.setPropertySource(filter[1]); elementFilter.setElementName(filter[2]); elementFilter.setElementSource(filter[3]); elementFilter.setElementFilter(filter[4]); } } //end of setDefaultContentFilter COM: <s> the default element filter can be set in two places once when there </s>
funcom_train/47969616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compile() { try { converter = prefixConfig.getConfiguredCompiler(); //Compile the specified ontologies in the desired jar file converter.createConceptJar(jarFile); } catch (Exception e) { Logger.getLogger(OntologyCompiler.class.getName()). log(Level.SEVERE, null, e); } } COM: <s> compile the ontologies in java code </s>
funcom_train/3006755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFilterDefinition( FilterDefinition filterDef ) { if ( filterDef == null ) return; String pathPk = filterDef.getFullPath(); try { researcherService.removeFilterDef( pathPk ); filterDefCache.remove( pathPk ); } catch ( java.rmi.RemoteException e ) { throw new RuntimeException( e.getLocalizedMessage() ); } } COM: <s> removes from the server the path item corresponding to the given filter definotion </s>
funcom_train/37895859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkDocuments(ProgressCallback progress, List<ErrorReport> errorList) throws TerminatedException { User.enablePasswordChecks(false); try { DocumentCallback cb = new DocumentCallback(errorList, progress, true); broker.getResourcesFailsafe(cb, directAccess); } finally { User.enablePasswordChecks(true); } } COM: <s> run some tests on all documents stored in the database </s>
funcom_train/41164325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StoredOpenResponse2 update(StoredOpenResponse2 entity) { EntityManagerHelper.log("updating StoredOpenResponse2 instance", Level.INFO, null); try { StoredOpenResponse2 result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved stored open response2 entity and return it or a </s>
funcom_train/3291497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MMObjectBuilder getParentBuilder(MMObjectBuilder builder) { MMObjectBuilder parent=builder.getParentBuilder(); if ((parent==null) && (builder instanceof InsRel) && !builder.getTableName().equals("insrel")) { parent=mmb.getInsRel(); } return parent; } COM: <s> returns the parent builder of the specifed builder </s>
funcom_train/1060071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDiagramLinkPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Diagram_diagramLink_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Diagram_diagramLink_feature", "_UI_Diagram_type"), Di2Package.Literals.DIAGRAM__DIAGRAM_LINK, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the diagram link feature </s>
funcom_train/37850337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCaret(Caret caret) { checkWidget (); super.setCaret(caret); if (caret != null) { if(activeComponent != null){ selectStartPos = activeComponent.restoreCaret( caret, horizontalScrollOffset, verticalScrollOffset); if(selectStartPos != null){ selectStartPos.y = selectStartPos.y + getCaret().getSize().y/2; caretOffsetX = selectStartPos.x; } } } } COM: <s> sets the receivers caret </s>
funcom_train/17579284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EditPart getRootEditPart() { List selected = getSelectedObjects(); EditPart rootEditPart = null; if (selected.size() > 0) { Object item = selected.get(0); if (item instanceof EditPart) { EditPart selectedEditPart = (EditPart) item; while (!(selectedEditPart instanceof RootEditPart)) { selectedEditPart = selectedEditPart.getParent(); } rootEditPart = selectedEditPart; } } return rootEditPart; } COM: <s> returns the parent edit part of the selected object </s>
funcom_train/2807919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int removeByPrimaryKey(GenericPK primaryKey) throws GenericEntityException { if (primaryKey == null) return 0; if (Debug.verboseOn()) Debug.logVerbose("Removing GenericPK: " + primaryKey.toString(), module); return genericDAO.delete(primaryKey); } COM: <s> remove a generic entity corresponding to the primary key </s>
funcom_train/50141739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException{ try{ ps.setBigDecimal(parameterIndex, x); } catch (SQLException sqlex){ log.debug(getLogString() + " Exception: " + sqlex); throw sqlex; } setContent(parameterIndex, x); } COM: <s> sets the designated parameter to a code java </s>
funcom_train/11096818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateInOnlyExchange() throws Exception { MockExchangeFactory instance = new MockExchangeFactory(); InOnly exchange = instance.createInOnlyExchange(); assertNotNull(exchange.getExchangeId()); assertEquals(exchange.getPattern(), MockExchangeFactory.IN_ONLY); } COM: <s> test of create in only exchange method of class mock exchange factory </s>
funcom_train/47675095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Integer getFieldLength(MsgElement p_elem) { MsgAttribute fieldLengthAttr = null; Integer fieldLengthValue = null; fieldLengthAttr = p_elem.getAttribute(StructureAttributes.P_FIELDLENGTH); // no attribute found by that name if (fieldLengthAttr == null) { return null; } fieldLengthValue = getIntegerValue(fieldLengthAttr); return fieldLengthValue; } COM: <s> get the field length attribute value of the </s>
funcom_train/1073022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getEpochIndex(int[] character) { boolean match = true; ArrayList<Integer> adata; for (int index = 0; index < epochs.size(); index++) { match = true; adata = epochs.get(index).getCharacteristics(); for (int i = 0; i< character.length; i++) { if (adata.get(i) != character[i]) { match = false; continue; } } if (match) { return index; } } return -1; } COM: <s> finds and returns the epoch with the matching ascriptive character </s>
funcom_train/17281600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cancel() { synchronized (processorLock) { boolean success; if (item == null) { success = false; } else { Processor p = item.getProcessor(); success = item.clear(null); if (p != null) { p.interruptTask(this, RequestProcessor.this); item = null; } } if (success) { notifyFinished(); // mark it as finished } return success; } } COM: <s> removes the task from the queue </s>
funcom_train/45317104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyACW(boolean acw) { if (acw) { doTimeClosure(STATE_ACW); lastKnownState = STATE_ACW; } else { acwTime += Calendar.getInstance().getTime().getTime() - lastEventTimestamp.getTime(); notifyReadyOrManual(); } } COM: <s> activates acw stats </s>
funcom_train/9802817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { if (o == null || !(o instanceof GameFactory)) { return -1; } GameFactory gameFactory = (GameFactory) o; int compareNames = name.compareTo(gameFactory.name); if (compareNames != 0) { return compareNames; } else { return author.compareTo(gameFactory.author); } } COM: <s> compares two game interfaces lexicographically primarily on name and secondarily on author </s>
funcom_train/19370233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readFromFile(final URI urlSpec){ model = project.createOntologyFromDocumentIRI(IRI.create(urlSpec)); sourceString = urlSpec.toString(); //myFormat.addPrefixNamespaceMapping("me", sourceString+NAMESPACEANCHOR); // more checking here valid = true; } COM: <s> reads an rdf file into the model </s>
funcom_train/44872678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void actionPerformed(ActionEvent evt) { Object src = evt.getSource(); if (src == null) return; if (src == startStopButton) { if (status == RUN) stop(); else start(); } else if (src == startButton) { start(); } else if (src == stopButton) { stop(); } else if (src == nextButton) { next(); } else if (src == prevButton) { prev(); } else if (src == pauseButton) { pause(); } } COM: <s> respond to button clicks </s>
funcom_train/10747634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPrintable(AccessFlags access) { if (access.isPrivate() && !printPrivate || access.isProtected() && !printProtected || access.isPublic() && !printPublic || !access.isPublic() && !access.isProtected() && !access.isPrivate() && !printPackagePrivate) { return false; } return true; } COM: <s> determines if the given access is acceptable </s>
funcom_train/28888622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public L select1() { final IBBDAPIPrincipal userAccess = BBDAbstractFactory.makeBBDPrincipal("Duke", "Java"); selectHello.setBbdPrincipal(userAccess); final IBBDConnection<R,L> myConnection = BBDAbstractFactory.makeBBDConnection(); L bbdRowAL = (L)new BBDRowArrayList<R>(); try { bbdRowAL = myConnection .executeQuery(selectHello); } catch (final SQLException e) { e.printStackTrace(); log.severe(e.toString()); } return bbdRowAL; } COM: <s> ask the database for information using an bbd api that </s>
funcom_train/43448499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recurse() throws IllegalSymbolException, InvalidStructureException { for (int j = net.getNumberMatchStates()-2; j >= 0; j--) { for (int i = sequence.length()-3; i >=0; i--) { if(j <= net.getNumberMatchStates()-4){ updateDeleteMatrix(j, i); } updateInsertMatrix(j, i); updateMatchMatrix(j, i); } } } COM: <s> recursively fills the backward matrices </s>
funcom_train/43895470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDisplayName() { String name = this.getClass().getName(); name = name.substring(name.lastIndexOf('.')); if (name.endsWith("Factory")) { name = name.substring(0, name.length() - 7); } else if (name.endsWith("FactorySpi")) { name = name.substring(0, name.length() - 10); } return name; } COM: <s> default implementation abuses the naming convention </s>
funcom_train/10520226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIncludes(String[] includes) { if (includes == null) { this.includes = null; } else { Pattern[] p = new Pattern[includes.length]; for (int i = 0; i < includes.length; i++) { p[i] = new Pattern(); p[i].setPattern(includes[i]); } setIncludes(p); } } COM: <s> sets the set of include patterns to use </s>
funcom_train/29672413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVariableInLine() throws Exception { assertEquals(1, config.getBreaks().getLine(0).variableSize()); BasicConfig variable = config.getBreaks().getLine(0).getVariable(0); assertEquals("toTest", variable.getProperty("name")); assertEquals("local", variable.getProperty("type")); } COM: <s> test variable element which is beneath line element </s>
funcom_train/43346790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getInstance(String className){ try { Class clazz = getClazz(className); Object obj = clazz.newInstance(); return obj; } catch(InstantiationException ex){ logger.warn(name +": "+ ex.getMessage()); } catch(IllegalAccessException ex){ logger.warn(name +": "+ ex.getMessage()); } return null; } COM: <s> instanciate an object from the given class </s>
funcom_train/10911085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderInlineBlockParent(InlineBlockParent ibp) { renderInlineAreaBackAndBorders(ibp); currentIPPosition += ibp.getBorderAndPaddingWidthStart(); // For inline content the BP position is updated by the enclosing line area int saveBP = currentBPPosition; currentBPPosition += ibp.getOffset(); renderBlock(ibp.getChildArea()); currentBPPosition = saveBP; } COM: <s> render the given inline block parent </s>
funcom_train/177935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPrimaryKeyValue(){ List pkValues = getConditionValues(); if (!getType().hasMultiplePrimaryKey() && pkValues!=null && pkValues.size()>0){ return getConditionValues().get(0); }else{ return getConditionValues(); } } COM: <s> get the primaery key values that are used to get an object </s>
funcom_train/46077655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean navigateLibrary(int key) { //Handle only relevant input if (games==null || games.length==0) return false; if (key==NPC.DIR_UP) this.incrementCurrentGameID(-1); else if (key==NPC.DIR_DOWN) this.incrementCurrentGameID(1); else if (key==InputAdapter.KEY_ACCEPT) return true; return false; } COM: <s> return true if a game should be loaded </s>
funcom_train/4358521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSaveOnRestart(boolean saveOnRestart) { if (saveOnRestart == this.saveOnRestart) return; boolean oldSaveOnRestart = this.saveOnRestart; this.saveOnRestart = saveOnRestart; support.firePropertyChange("saveOnRestart", new Boolean(oldSaveOnRestart), new Boolean(this.saveOnRestart)); } COM: <s> set the option to save sessions to the store when the manager is </s>
funcom_train/46459373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOriginX(int n, double value) { if (isLocked()) return; if (isFixedOrigin()) { setAllOriginsX(value); return; } originX.set(n, value); try { updateTransforms(n); } catch(NoninvertibleTransformException ex) { ex.printStackTrace(); } } COM: <s> sets the image x position of the world origin for the specified </s>
funcom_train/41837187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showSubwayStation(View v) { // IF there is a subway station DO String subwayStationId = BusStopInfo.this.busStop.getSubwayStationId(); if (!TextUtils.isEmpty(subwayStationId)) { // show subway station info Intent intent = new Intent(BusStopInfo.this, SubwayStationInfo.class); intent.putExtra(SubwayStationInfo.EXTRA_STATION_ID, subwayStationId); startActivity(intent); } } COM: <s> show the subway station </s>
funcom_train/37656673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object createBadValue(int count) { if (count == 1) return Double.valueOf( randomBool() ? randomDouble(MIN - SHIFT, MIN - 0.01) : randomDouble(MAX + 0.01, MAX + SHIFT) ); Double[] values = new Double[count]; for (int i=0; i<values.length; i++) values[i] = (Double)createBadValue(1); return values; } COM: <s> creates and returns count number of out of range values </s>
funcom_train/442687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateComponents(List<Entry> selectedEntries) { meaningsMap.clear(); meaningActions.clear(); listModel.clear(); if (selectedEntries.size() == 1) { for (Sense meaning : getCurrentEntry().getSenses()) { Sense clone = (Sense) meaning.clone(); meaningsMap.put(clone, meaning); listModel.addElement(clone); } meaningList.setEnabled(true); } else { meaningList.setEnabled(false); } } COM: <s> updates display components in this area depending on the selected </s>
funcom_train/51453065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getOpenMenuItem() { if (openMenuItem == null) { openMenuItem = new JMenuItem(); openMenuItem.setText("Open"); openMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK, true)); openMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { openTemplate(); } }); } return openMenuItem; } COM: <s> this method creates an jmenu item </s>
funcom_train/34643897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTypePath(ASTNode child, ASTNode parent) { if (parent instanceof Type) { StructuralPropertyDescriptor location= child.getLocationInParent(); return location == ParameterizedType.TYPE_PROPERTY || location == SimpleType.NAME_PROPERTY; } else if (parent instanceof QualifiedName) { StructuralPropertyDescriptor location= child.getLocationInParent(); return location == QualifiedName.NAME_PROPERTY; } return false; } COM: <s> returns code true code if the given child parent nodes are valid </s>
funcom_train/47545256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackground (Color color) { checkWidget (); if (color != null && color.isDisposed ()) { SWT.error (SWT.ERROR_INVALID_ARGUMENT); } GdkColor gdkColor = color != null ? color.handle : null; OS.gtk_tree_store_set (parent.modelHandle, handle, Tree.BACKGROUND_COLUMN, gdkColor, -1); cached = true; } COM: <s> sets the receivers background color to the color specified </s>
funcom_train/27897630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertFormElementNotPresent(String formElementName) { try { assertTrue("Found form element with name [" + formElementName + "] when not expected.", !getTestingEngine() .hasFormParameterNamed(formElementName)); } catch (UnableToSetFormException e) { // assertFormControlNotPresent } } COM: <s> assert that a form input element with a given name is not present </s>
funcom_train/35288391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean overlaps(Interval interval) { int position = 0; if (!this.intervals.isEmpty()) { position = indexOf(interval); if (position != 0 && this.intervals.get(position - 1).overlaps(interval)) { return true; } else if (position != intervals.size() && this.intervals.get(position).overlaps(interval)) { return true; } } return false; } COM: <s> returns true if any interval in the calendar overlaps the specified </s>
funcom_train/35677800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPackedDecimalToBigDecimal() { try { BigDecimal javaDecimal = CobolPackedDecimalSimpleConverter .fromHostSingle(9, 17, 2, PACKED_DECIMAL_HOST_BYTES, 0); assertEquals(0, javaDecimal.compareTo(DECIMAL_JAVA)); } catch (CobolConversionException e) { fail(e.getMessage()); } } COM: <s> convert from cobol packed decimal to big decimal </s>
funcom_train/37797094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object process(final Element elCtorArgs) throws Exception { LOG.debug(">> process(elCtorArgs)"); if (elCtorArgs == null) { throw new SQLUnitException(IErrorCodes.ELEMENT_IS_NULL, new String[] {"constructorArgs"}); } return getArguments(elCtorArgs.getChildren()); } COM: <s> processes the jdom element representing the constructor args tag </s>
funcom_train/3108625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendCommand(String command, String data) { // logger.debug("Sending command: " + command // + ConstantSettings.COMMAND_SEP_CHAR + data); try { // dispatching hub.sendCommand(command, data); } catch (Exception e) { logger.error("Error in " + this.getClass().getName() + " when trying to send " + " message " + command + " with data " + data, e); // logger.error(e); } } COM: <s> dispatching the sending of commands to the underlying hub </s>
funcom_train/26483518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void postParse() throws SAXException { convertFormulas(); // Headers, footers, and details must have at least one section. ensureNotEmpty(report.headers()); ensureNotEmpty(report.pageHeaders()); ensureNotEmpty(report.details()); ensureNotEmpty(report.footers()); ensureNotEmpty(report.pageFooters()); for (Iterator iter = report.subreports(); iter.hasNext(); ) ensureNotEmpty(((Subreport)iter.next()).details()); } COM: <s> performed after a parse we convert old style formulas if necessary and </s>
funcom_train/17586354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkOutputFile(final File outputFile) { Validate.notNull(outputFile, "The output file cannot be null."); File directory = new File(outputFile.getPath()); if (!directory.exists()) { directory.mkdirs(); } if (outputFile.exists()) { outputFile.delete(); } } COM: <s> checks if the output directory and file exists </s>
funcom_train/19051909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { switch (type) { case '*': return content + "*"; case '?': return content + "?"; case '+': return content + "+"; case ',': case '|': case '&': char data[] = {' ', (char) type, ' '}; String str = ""; for (WWEContentModel m = (WWEContentModel) content; m != null; m = m.next) { str = str + m; if (m.next != null) { str += new String(data); } } return "(" + str + ")"; default: return content.toString(); } } COM: <s> convert to a string </s>
funcom_train/40105201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hideDisucssions() { if (oldSourceViewerConfiguration != null) setSourceViewerConfiguration(oldSourceViewerConfiguration); rootDiscussionsView = false; getSourceViewer().setTextDoubleClickStrategy( oldSourceViewerConfiguration.getDoubleClickStrategy( getSourceViewer(), IDocument.DEFAULT_CONTENT_TYPE), IDocument.DEFAULT_CONTENT_TYPE); getSourceViewer().setTextHover( oldSourceViewerConfiguration.getTextHover(getSourceViewer(), IDocument.DEFAULT_CONTENT_TYPE), IDocument.DEFAULT_CONTENT_TYPE); clearMarked(); } COM: <s> hide the discussions links from the editor </s>