__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44177866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setBit( long bitIndex) { long longIndex = bitIndex >>> ADDRESS_BITS_PER_UNIT; int arrayIndex = (int) (longIndex >>> SUBARRAY_POWER_OF_TWO); int subarrayIndex = (int) (longIndex & SUBARRAY_MASK); bits[arrayIndex][subarrayIndex] |= (1L << (bitIndex & BIT_INDEX_MASK)); } COM: <s> changes the bit with index tt bit index tt in local bitvector </s>
funcom_train/32056612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRead() { DefaultGraphModelFileFormatXML dgmffs = new DefaultGraphModelFileFormatXML(); try { dgmffs.read("/tmp/save.pad", new Hashtable(), new GPGraph()); } catch (Exception e) { assertTrue(false); } try { dgmffs.read("/tmp/save1.pad", new Hashtable(), new GPGraph()); } catch (Exception e) { assertTrue(false); } } COM: <s> tests reading from a file </s>
funcom_train/19974366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void endVideoEffect() { try { if (movie == null) return; // remove old GraphicsMode gm = new GraphicsMode (); // get handler for our movie and set the new GraphicsMode VisualMediaHandler handler = (VisualMediaHandler) movie.getIndTrackType (1, StdQTConstants.visualMediaCharacteristic, StdQTConstants.movieTrackCharacteristic).getMedia().getHandler();; handler.setGraphicsMode(gm); } catch (QTException e) { e.printStackTrace( ); return; } } COM: <s> remove graphics mode for black images </s>
funcom_train/11321803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderDomReadyPrefix(HtmlStringBuffer buffer) { // Wrap content in Click.addLoadEvent function if (isExecuteOnDomReady()) { buffer.append("Click.addLoadEvent(function(){\n"); } } /** * Render the "<tt>Click.addLoadEvent</tt>" function suffix. The suffix is * "<tt>});</tt>". COM: <s> render the tt click </s>
funcom_train/3720850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEventFlow(EventFlow eventFlow) throws java.beans.PropertyVetoException { EventFlow oldEventFlow = this.eventFlow; vetoableChangeSupport.fireVetoableChange("eventFlow", oldEventFlow, eventFlow); this.eventFlow = eventFlow; propertyChangeSupport.firePropertyChange("eventFlow", oldEventFlow, eventFlow); } COM: <s> setter for property event flow </s>
funcom_train/2966150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProfileAttribute getAttribute(String attributeName) { if (attributePosition == null) { attributePosition = new HashMap<Resource, Vector<Integer>>(); } Set<Resource> keys = attributePosition.keySet(); for (Resource qn : keys) { if (qn.getLocalName().equals(attributeName)) { return data.get(((Integer) (attributePosition.get(qn)).firstElement()) .intValue()); } } return null; } COM: <s> retrieve a profile attribute with a specific name </s>
funcom_train/14241685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FigNode getFigNodeFor(GraphModel gm, Layer lay, Object node) { if (node instanceof MInstance) return new FigBOTLSourceObject(gm, node); System.out.println("needs-more-work ClassDiagramRenderer getFigNodeFor "+node); return null; } COM: <s> return a fig that can be used to represent the given node </s>
funcom_train/20057555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeField(String name, Object value) { ensureAllocated(); StructField f = (StructField)structFields.get(name); if (f == null) throw new IllegalArgumentException("No such field: " + name); setField(f, value); writeField(f); } COM: <s> write the given field value to the field and native memory </s>
funcom_train/34627744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String rmTrailingWhitespace(String input) { int lastChar = input.length() - 1; while (lastChar >= 0 && Character.isWhitespace(input.charAt(lastChar))) lastChar--; lastChar++; if (lastChar < input.length()) return input.substring(0, lastChar); return input; } COM: <s> removes trailing whitespace from the document </s>
funcom_train/43327719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final static public void randomlyLocateFrame(Frame f) { // randomly locate somewhere on screen. Dimension screen = f.getToolkit().getScreenSize(); Dimension me = f.getSize(); int maxX = screen.width - me.width; int maxY = screen.height - me.height; Random r = new Random(); int x = Math.abs(r.nextInt()) % maxX; int y = Math.abs(r.nextInt()) % maxY; f.setLocation(x,y); } COM: <s> randomly locate a frame somewhere on the screen where </s>
funcom_train/4014879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initPanel(){ AbsolutePanel panel = new AbsolutePanel(); FormUtil.maximizeWidget(panel); tabs.add(panel,LocaleText.get("page") + "1"); selectedPanel = panel; super.initPanel(); dragControllers.add(tabs.getWidgetCount()-1,selectedDragController); panel.setHeight(sHeight); //This is needed for IE DeferredCommand.addCommand(new Command() { public void execute() { setHeight(getHeight()); } }); } COM: <s> sets up the design surface panel for the first page </s>
funcom_train/45223205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TrackerDBInfo getTrackerDBInfo() { TrackerDBInfo trackerDBInfoQuery = new TrackerDBInfo(); trackerDBInfoQuery.setDefaultUnitId(1L); Example example = Example.create(trackerDBInfoQuery); Session session = HibernateUtil.beginTransaction(); Criteria criteria = session.createCriteria(TrackerDBInfo.class); criteria.add(example); TrackerDBInfo trackerDBInfo = (TrackerDBInfo) criteria .uniqueResult(); HibernateUtil.commitTransaction(); trackerDBInfo.setLocale(locale); return trackerDBInfo; } COM: <s> gets the tracker db info </s>
funcom_train/27945702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getReplaceableStringsProps() { Properties props = new Properties(); // PENDING: don't use StringBufferInputStream, it does not encode characters // well. try { props.load(new StringBufferInputStream(getReplaceableStringsTable())); } catch (IOException e) { } return props; } COM: <s> gets the replaceable table as the properties class </s>
funcom_train/19608752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResult() throws IOException { // while (true) { // while (cmdResult.indexOf(Constant.SEPERATOR) >= 0) { // int pos = cmdResult.indexOf(Constant.SEPERATOR); // String result = cmdResult.substring(0, pos); // cmdResult = new StringBuilder(cmdResult.substring(pos // + Constant.SEPERATOR.length())); // if (result.startsWith("@")) // return result.substring(1).trim(); // } // } return EncodingUtil.decode(din.readLine()); } COM: <s> get result from socket server synchronized receive format of result </s>
funcom_train/45524918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sanityCheckState(IEditorInput input) { IDocumentProvider p = getDocumentProvider(); if (p == null) return; if (p instanceof IDocumentProviderExtension3) { long stamp = p.getModificationStamp(input); if (stamp != fModificationStamp) { fModificationStamp = stamp; } } else { if (fModificationStamp == -1) fModificationStamp = p.getSynchronizationStamp(input); long stamp = p.getModificationStamp(input); if (stamp != fModificationStamp) { fModificationStamp = stamp; } } updateState(getEditorInput()); } COM: <s> checks the state of the given editor input </s>
funcom_train/37447211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createShortlabel( UserSessionDownload session, Element parent, AnnotatedObject object ) { // shortlabel is mandatory in the IntAct API. Element shortlabel = session.createElement( "shortLabel" ); Text shortlabelText = session.createTextNode( object.getShortLabel() ); shortlabel.appendChild( shortlabelText ); parent.appendChild( shortlabel ); } COM: <s> create a shortlabel element containing the shortlabel of the given annotatated object </s>
funcom_train/46696062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsStructural() { System.out.println("isStructural"); BasicParameter instance = new BasicParameter(); instance.setStructural(false); boolean expResult = false; boolean result = instance.isStructural(); assertEquals(expResult, result); instance.setStructural(true); expResult = true; assertEquals(expResult, instance.isStructural()); } COM: <s> test of is structural method of class basic parameter </s>
funcom_train/13390068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object createInstance() throws Exception { if (!isSingleton()) lookupExistingServices(); ServiceItem serviceItem = lookupService(); serviceIDs.add(serviceItem.serviceID); // wrap the service proxy and add to the list of advised objects. Advised advised = addAdvice(serviceItem); proxy = advised; serviceProxies.add(advised); return advised; } COM: <s> construct the object returned by this factory </s>
funcom_train/30006313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreePath getTreePath(TestBase node) { if (node == null) { return null; } if (node.getParent() != null) { TreePath parentPath = getTreePath(node.getParent()); TreePath result = parentPath.pathByAddingChild(node); return result; } else { return new TreePath(node); } } COM: <s> returns the tree path to the specified node </s>
funcom_train/24931754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws CommandFailedException { MSystem system = fSystemState.system(); // evaluate expression Evaluator evaluator = new Evaluator(); Value v = evaluator.eval(fExpr, fSystemState, system.topLevelBindings()); // bind variable to object system.addVarBindingToCurrentScope(fVar, v); } COM: <s> executes command and stores undo information </s>
funcom_train/10594792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void publish( PortalService service, String[] values) { final Layout layout = service.getProfileManager().getLayout(values[0] ); if ( layout != null ) { try { this.publish( service, layout, values); } catch (Exception e) { this.getLogger().warn("Unable to publish event. Ignoring exception.", e); } } } COM: <s> publish the event </s>
funcom_train/51711066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElementTypePropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_AnonymousTupleType_elementType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AnonymousTupleType_elementType_feature", "_UI_AnonymousTupleType_type"), ImperativeoclPackage.Literals.ANONYMOUS_TUPLE_TYPE__ELEMENT_TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the element type feature </s>
funcom_train/3481068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws JMSException { // Load local language preferences try { language = new LocalLanguageHelper("com.myeai.language.JmsClient"); } catch (Exception e) { throw new JMSException(e.getMessage()); } // Initialize local values messageHeader = new MessageHeader(); messageProperties = new MessageProperties(); messageSelector = null; } COM: <s> initialize this message object </s>
funcom_train/47981420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPlayerAtTarget(XHuntPlayer p) { if(p.getGeoLocation() != null && p.getCurrentTargetId() > 0){ return (mRoutemanagement.computeDistance(p.getGeoLocation(), mRoutemanagement.getStation(p.getCurrentTargetId()).getGeoPoint()) < control.getSettings().getDistanceTargetReached()); } return false; } COM: <s> computes the distance between the current and the target location </s>
funcom_train/7368375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graphics initGraphics(int x, int y) { simage = Image.createImage(x, y); Graphics cscreen = simage.getGraphics(); //#ifdef DLOGGING if (finestLoggable) {logger.finest("initGraphics simage,cscreen=" + simage + "," + cscreen);} //#endif screenWidth = x; screenHeight = y; return cscreen; } COM: <s> initialize graphics portion only </s>
funcom_train/51075749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printthis(){ CCDataInfo di = getDataInfo(); System.out.println(di); int year = di.getStart_year(), end = di.getEnd_year(), res = di.getSparsity(); for (; year <= end; year += res) { System.out.print(da.getValue(year) + "\t"); } } COM: <s> prints every value in the dataset used mainly for diagnostic things now </s>
funcom_train/42642911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCertainPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ITerm_certain_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ITerm_certain_feature", "_UI_ITerm_type"), DigitalHPSPackage.Literals.ITERM__CERTAIN, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the certain feature </s>
funcom_train/20043766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _enableControl() { boolean result = true ; try { oObj.enableControl(cntlID, false) ; oObj.enableControl(cntlID, true) ; } catch (Exception e) { e.printStackTrace(log) ; result = false ; } tRes.tested("enableControl()", result) ; } COM: <s> disables and then enables the control </s>
funcom_train/37563999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refract(String parameterName, Object[] parObj, Class[] paramType) { try { String methodName= ("set"+parameterName.substring(0,1).toUpperCase().concat(parameterName.substring(1))); Method m = c.getMethod(methodName,paramType); Object result = m.invoke(myObj,parObj); }catch (Exception e) {System.err.println(e.getMessage());} } COM: <s> refract the given parameter </s>
funcom_train/3160755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeFrame(JInternalFrame f) { super.closeFrame(f); // possible to retrieve the associated buttons right here via // f.getAssociatedButton(), and then with a call to getParent() the item // can be directly removed from its parent container, but I find the // below message propogation to DesktopPane a cleaner implementation... desktopPane.removeAssociatedComponents((BaseInternalFrame) f); desktopPane.resizeDesktop(); } COM: <s> closes the internal frame and removes any associated button and menu components </s>
funcom_train/26612760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCallStack() { if (runstate==null) return ""; StringBuffer sb= new StringBuffer("Call Stack:\r\n"); RunState rs = runstate; while (rs!=null) { Tag t = rs.getTag(); sb.append(" <"+t.getTagName()+" " + t.getPropertiesForDisplay() +"/>\r\n"); rs = rs.getParent(); } sb.append(" <eccles-config />\r\n"); return new String(sb); } COM: <s> get the tag call stack </s>
funcom_train/624599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCount() { Collection intCol = new Vector(); for (int i = 1; i <= 50; i++) { intCol.add(new IntegerInstance(i % 10)); } OclCollection collection = new CollectionInstance(Type.AnInteger, intCol); OclInteger result = collection.count(new IntegerInstance(5)); assertTrue(result.equals(new IntegerInstance(5))); } COM: <s> tests the ocl count operation on collections </s>
funcom_train/17206790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGeneralInfo(String info) { if (org.jikesrvm.VM.BuildWithGCSpy) { if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(initialised, "ServerInterpreter.setGeneralInfo: server not initiialised"); Address tmp = GCspy.util.getBytes(info); sysCall.gcspyMainServerSetGeneralInfo(server, tmp); GCspy.util.free(tmp); } } COM: <s> set the general info for the server interpreter </s>
funcom_train/22279989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lastIndexOf(Object element, int index) { int i; if (index > count) { throw new ArrayIndexOutOfBoundsException(index + " > " + count); } for (i = index - 1; i >= 0; i--) if (array[i].equals(element)) return i; return -1; } COM: <s> returns the last index of b element b in the vector starting at </s>
funcom_train/27779880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setOffsets(int index, long val) { if (index >= offsets.length) { long o[] = new long[index + delta]; for (int i = 0; i < offsets.length; i++) { o[i] = offsets[i]; } offsets = o; } offsets[index] = val; } COM: <s> sets the offsets attribute of the merge readers object </s>
funcom_train/48982515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performValidateAdd() { // verifies if the discipline is null if (discipline == null) { addActionError(getText("discipline.input.validation.required")); } // verifies if the title is empty if (!StringUtils.hasText(discipline.getName())) { addActionError(getText("discipline.input.validation.name")); } } COM: <s> perfom a validation in adicional method </s>
funcom_train/49792136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertLabelTextNotPresent(String text) { List<IElement> results = getElementsByXPath("//label[" + getContainsTextXPath(text) + "]"); for (IElement e : results) { // ask HtmlUnit if the element is visible if (isDisplayed(e)) { fail("Unexpectedly found a label with text '" + text + "' that was displayed: " + e); } } } COM: <s> assert that a label em does not em exist with the given text </s>
funcom_train/8436551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getElemCount() { int rval = 0; Iterator<SparseNode> si = rows.values().iterator(); while(si.hasNext()) { for(SparseNode n = si.next(); n != null; n = n.right) { rval++; } } return rval; } COM: <s> returns number of non zero elements in matrix </s>
funcom_train/39312394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initComponents() {/*_I*/System.out.println("splash.initComponents("+")");/*I_*/ addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) {/*_I*/System.out.println("splash.initComponents.mouseClicked("+"evt="+evt+")");/*I_*/ formMouseClicked(evt); } }); pack(); } COM: <s> this method is called from within the constructor to </s>
funcom_train/21955336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllOpenFolders() { Vector returnValue = new Vector(); Vector currentStores = getStoreList(); for (int i = 0; i < currentStores.size(); i++) { returnValue.addAll(((StoreInfo) currentStores.elementAt(i)).getAllFolders()); } return returnValue; } COM: <s> gets all of the open and available folders known by the system </s>
funcom_train/16411243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton createArrowButton() { boolean iconOnly = comboBox.isEditable(); JButton button = new MetalComboBoxButton( comboBox, new ExtendedMetalComboIcon(), iconOnly, currentValuePane, listBox ); button.setMargin( new Insets( 0, 1, 1, 3 ) ); return button; } COM: <s> overrides create arrow button for drawing arrow button with extended metal combo icon </s>
funcom_train/33282908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object jsxFunction_removeChild(final Object childObject) { Object removedChild = null; if (childObject instanceof Node) { // Get XML node for the DOM node passed in final DomNode childNode = ((Node) childObject).getDomNodeOrDie(); // Remove the child from the parent node childNode.remove(); removedChild = childObject; } return removedChild; } COM: <s> removes a dom node from this node </s>
funcom_train/22498722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(final Object parent, final Object child) { if (parent == root) { for (int counter = rootElements.length - 1; counter >= 0; counter--) { if (rootElements[counter] == child) { return counter; } } return -1; } return super.getIndexOfChild(parent, child); } COM: <s> returns the index of child in parent </s>
funcom_train/21015118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void trackMouse ( final int x, final int y ) { //System.out.println("tracked."); final int old[] = mousePos; mousePos [0] = x; mousePos [1] = y; if ( contains ( x, y ) ) { } else { } pcs.firePropertyChange ( "mousePos", old, mousePos ); } COM: <s> this watches the mouse where it is and if the button is pressed </s>
funcom_train/48895350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); // Generated jContentPane.add(getProntuario(), null); // Generated jContentPane.add(getAgenda(), null); // Generated } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/37828726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nativeSQL(String sql) throws java.sql.SQLException { if (Driver.TRACE) { Object[] args = { sql }; Debug.methodCall(this, "nativeSQL", args); Debug.returnValue(this, "nativeSQL", sql); } EscapeProcessor escaper = new EscapeProcessor(); return escaper.escapeSQL(sql); } COM: <s> a driver may convert the jdbc sql grammar into its systems </s>
funcom_train/37885183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String getCollectionPath(String path){ String pathName = null; int separatorPos = path.lastIndexOf("/"); if(separatorPos == Constants.STRING_NOT_FOUND){ // no path pathName=""; } else { pathName=path.substring(0, separatorPos); } return pathName; } COM: <s> get collection pathname from path </s>
funcom_train/12562333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSuiteProperties() { if (args != null) { for (int i = 0; i < args.length; i++) { if (args[i] != null) { midletSuite.setTempProperty( internalSecurityToken, "arg-" + i, args[i]); } } } } COM: <s> sets midlet suite arguments as temporary suite properties </s>
funcom_train/19166410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NASecStructure calculateStructure(NucleotideSequence seq, boolean doTemp) { Alignment la = doStrongestIntramolecularLocalAlignment(seq.seqString(), seq.getType()); if (la == null) return null; NASecStructure s = new DefaultNASecStructure(la,seq.length()); return s; } COM: <s> return the strongest intramolecular structure as reported by lac for </s>
funcom_train/34339532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand2() { if (okCommand2 == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here okCommand2 = new Command("Ok", Command.OK, 0);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return okCommand2; } COM: <s> returns an initiliazed instance of ok command2 component </s>
funcom_train/42682226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillData(){ try{ localIp.setText(Statics.getLocalIP()); } catch (SocketException e) { HLog.netlogger.error("Could not retrieve local IPs information",e); } try { remoteIp.setText(Statics.getRemoteIP()); } catch (IOException e) { HLog.netlogger.error("I couldn't retrieve remote IP address",e); } status.setText("Disconnected"); port.setText(Conf.getInstance().getPort()); } COM: <s> loads the data and fills the widgets </s>
funcom_train/31464456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLongOption(String name, String paramName, String description) { Option o = new Option(); o.name = name; o.parameterName = paramName; o.description = description; o.isLongOption = true; m_longOptions.add(o); m_optionNameToOption.put(o.name, o); } COM: <s> adds a long option </s>
funcom_train/46739923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTermSubcategoryRef(DisplayModel termSubcategoryRef) { if (Converter.isDifferent(this.termSubcategoryRef, termSubcategoryRef)) { DisplayModel oldtermSubcategoryRef= new DisplayModel(this); oldtermSubcategoryRef.copyAllFrom(this.termSubcategoryRef); this.termSubcategoryRef.copyAllFrom(termSubcategoryRef); setModified("termSubcategoryRef"); firePropertyChange(String.valueOf(APPLICATIONCONTROLVALUES_TERMSUBCATEGORYREFID), oldtermSubcategoryRef, termSubcategoryRef); } } COM: <s> term subcategory for this control </s>
funcom_train/4885643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toHumanReadableString(FixDictionary fixDictionary) { header.setBodyLength(calculateLength()); StringBuffer sb = new StringBuffer(header.toHumanReadableString(fixDictionary)); sb.append(body.toHumanReadableString(fixDictionary)); sb.append(trailer.toHumanReadableString(fixDictionary)); return sb.toString(); } COM: <s> converts message to human readable text form </s>
funcom_train/25885320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean ballCollides(Rect r) { int x = mBallPosition.getX(); int y = mBallPosition.getY(); return y >= mRedPaddleRect.bottom && y <= mBluePaddleRect.bottom && x >= r.left && x <= r.right && y >= r.top - BALL_RADIUS && y <= r.bottom + BALL_RADIUS; } COM: <s> tells us if the ball collides with a rectangle </s>
funcom_train/50235659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { int pic_width =this.getWidth(); int pic_height=this.getHeight(); g.setColor(Color.white); g.fillRect(1, 1, pic_width, pic_height); mondrian_vertical(g, 1, 1, pic_width, pic_height, 4); } COM: <s> method paint component </s>
funcom_train/25315649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModes(int firstMode, int secondMode) { this.notVictory = true; // Create the modes GUI.getInstance().flushStaticGraphics(); GUI.getInstance().drawBackground(); Placement[] plc = getPlacement(firstMode, secondMode); this.mode0 = createMode(firstMode, plc[0],0); this.mode1 = createMode(secondMode, plc[1],1); this.ci.setModesOfWiimotes(new int[]{firstMode,secondMode}); } COM: <s> sets the modes of the game </s>
funcom_train/27843505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getElementAt(int index) { try { Binding binding = _componentSupport.getBinding(ITEM_PROPERTY); return binding.getModelValue(getIndexVarName(), new Integer(index)); } catch (Exception e) { // Public API method, so we throw here only runtime exceptions throw ScopeUtils.createRTException(e); } } COM: <s> returns the value at the specified index </s>
funcom_train/29716789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Line shorterPath(Line l1, Line l2) { int d1 = Math.abs(l1.x1 - l1.x2) + Math.abs(l1.y1 - l1.y2); int d2 = Math.abs(l2.x1 - l2.x2) + Math.abs(l2.y1 - l2.y2); if (d1 > d2) return l2; else return l1; } COM: <s> calculate the shorter of two lines </s>
funcom_train/13364559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char nextDelim() { char ch = (char) fScanner.read(); int count = 1; while (Character.isWhitespace(ch) || Character.isJavaIdentifierPart(ch)) { ch = (char) fScanner.read(); count++; } for (; count > 0; count--) { fScanner.unread(); } return ch; } COM: <s> looks ahead and returns the next delimiter character </s>
funcom_train/13273800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setViewPitch(float viewPitch) { this.viewPitch = viewPitch; if (this.universe != null) { updateViewPlatformTransform(this.universe.getViewingPlatform().getViewPlatformTransform(), getViewYaw(), getViewPitch(), getViewScale()); } } COM: <s> sets the code pitch code angle used by view platform transform </s>
funcom_train/13958607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void localizationDidReset(NSNotification n) { if (session._localizer == null) return; String currentLanguage = session._localizer.language(); session._localizer = ERXLocalizer.localizerForLanguage(currentLanguage); if (log.isDebugEnabled()) { log.debug("Detected changes in the localizers. Reset reference to " + currentLanguage + " localizer for session " + session.sessionID()); } } COM: <s> resets the reference to localizer when localization </s>
funcom_train/18746414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialise() { assert this.hostFactory == null && this.startState == null; PatternGraph startGraph = createStartGraph(this.grammar.getStartGraph()); this.hostFactory = startGraph.getFactory(); this.startState = createStartState(startGraph); addState(this.startState); } COM: <s> initialises the start state and corresponding host factory </s>
funcom_train/7502233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Maze findMaze(String name) { Maze maze = null; try { maze = IOUtils.convertBytesToMaze(rs.getRecord(getRecordId(name))); } catch (RecordStoreNotOpenException e) { e.printStackTrace(); throw new RuntimeException(e.getMessage()); } catch (InvalidRecordIDException e) { // Don't rethrow. } catch (RecordStoreException e) { e.printStackTrace(); throw new RuntimeException(e.getMessage()); } return maze; } COM: <s> finds maze by name </s>
funcom_train/21879070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Revis getResourceRevision(Model model, Resource res, RevNum revnum) throws DepoException { ModelHelper.readlock(model); try { logger.debug("getResourceRevision for resource: " + res.getURI() + " number: " + revnum); RevisionNumberQuery query = new RevisionNumberQuery(model, res, revnum, false); return query.getRevision(); } finally { ModelHelper.unlockread(model); } } COM: <s> get a revis instance for a certain revision of a resource </s>
funcom_train/16544086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clonePoints(final Graph orig, final Graph dest) { final LinkedList<Point2D> l = this.innerPoints.get(orig); final LinkedList<Point2D> d = new LinkedList<Point2D>(); while (d.size() < l.size()) { d.add(new Point2D.Double()); } Collections.copy(d, l); this.innerPoints.put(dest, d); } COM: <s> adds the edge to another graph </s>
funcom_train/50345697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRS(RollingStock rs){ setNumberRS(getNumberRS()+1); if (rs.getClass() == Car.class) setNumberCars(getNumberCars()+1); else if (rs.getClass() == Engine.class) setNumberEngines(getNumberEngines()+1); setUsedLength(getUsedLength() + Integer.parseInt(rs.getLength())+ RollingStock.COUPLER); } COM: <s> adds rolling stock to a specific track </s>
funcom_train/11724475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fetchNext() { org.apache.jackrabbit.spi.Event event; next = null; while (next == null && actualEvents.hasNext()) { event = actualEvents.next(); next = filter.accept(event, isLocal) ? new EventImpl(event, resolver, idFactory) : null; } } COM: <s> fetches the next event from the collection of events </s>
funcom_train/33239059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finalize() { if (this.clientname != null) { Logger.bad("DBConnection being destroyed with clientname still set " + this.clientname); this.close(); } if (this.st != null) { Logger.bad("DBConnection being destroyed with an open Statement"); this.close(); } if (this.con != null) { Logger.bad("DBConnection being destroyed with an open Connection"); this.close(); } } COM: <s> a sanity check to make sure that we are closing the connection before </s>
funcom_train/22471049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEvent(Event event) { long userid = event.getUser().getId(); InternalLookup lookup = _perUserLookupTable.get(userid); if (lookup == null) { _perUserLookupTable.put(userid, new InternalLookup(event)); } else { lookup.addEvent(event); } } COM: <s> updates this event count lookup object with a new event </s>
funcom_train/3484439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMime ( ) { // if there's more than if ( _parts.size () > 1 ) { return ( true ); } // or if the one part is not text if ( ((BodyPart) _parts.elementAt (0)).isMime () ) { return ( true ); } return ( false ); }; COM: <s> checks to see if this should be a multipart mime message </s>
funcom_train/4085850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Widget createHorizontalEdge( Vec2i loc, int thickness, String... styleNames ) { Widget widget = GWT.create( FlowPanel.class ); widget.addStyleName( resources.style().edge() ); for( String style : styleNames ) widget.addStyleName( style ); addHorizontalEdgeWidget( loc, widget, thickness ); return widget; } COM: <s> creates a standard edge widget and adds it to the square </s>
funcom_train/7469546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure(JobConf conf) { this.maxInlinks = conf.getInt("link.max.inlinks", 1000); this.tokenize = conf.getBoolean("indexer.anchor.tokenize", true); this.stored = conf.getBoolean("indexer.anchor.stored", false); } COM: <s> configures the jobs </s>
funcom_train/50878559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent inAE){ if (myChooser == null) myChooser = new ColorDlg(); myChooser.setModal(true); myChooser.setVisible(true); myChooser.setLocationRelativeTo(this); setBackground(myChooser.getColor()); paint(getGraphics()); } COM: <s> respond to events from the jbutton to display the color cooser </s>
funcom_train/34353044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPhraseKeywords(String phrase, Collection keywords) { MatchObject match = (MatchObject) phraseMatches.get(phrase); if (match == null) { match = new MatchObject(phrase); phraseMatches.put(phrase, match); } match.keywordUsages.addAll(keywords); } COM: <s> adds a list of keywords keyed by a phrase </s>
funcom_train/15613782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void completePrefixes(String prefix, List<BODiffrence> diffrences) { if (diffrences == null || prefix == null) { return; } for (BODiffrence diff : diffrences) { diff.setFieldName(diff.getFieldName() == null ? prefix : prefix + "." + diff.getFieldName()); this.completePrefixes(prefix, diff.getSubDiffrences()); } } COM: <s> completes all field names from diffrences list with prefix </s>
funcom_train/9164692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateDvdReference(String dvdReference) { if (dvdReference == null) { throw new IllegalArgumentException("dvdReference must not be null."); } if (!dvdReference.startsWith(DvdService.DVD_REFERENCE_PREFIX)) { throw new IllegalArgumentException( "All DVD references must start with 'DVD-'" + ", this dvdReference: '" + dvdReference + "'"); } } COM: <s> performs validation of the dvd reference parameter for service methods </s>
funcom_train/16913679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel mainPanel() { JPanel panel = new JPanel(); panel.setLayout(new GridLayout(1, 1)); agents = new JPanel(new GridLayout(0, 1)); panel.add(new JButton(new NewAgentAction())); return panel; } COM: <s> returns a new main panel </s>
funcom_train/41459445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkForSilence(byte[] data, int offset, int len) { for (int i = offset; i < len - 1; i += 2) { int s = (data[i] & 0xff) | (data[i + 1] << 8); if (s > SILENCE_LEVEL) { return false; } } return true; } COM: <s> checks does the frame contains sound or silence </s>
funcom_train/29312821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getImageNameVector() { Vector images = new Vector(1); int i = 0; String param = "image" + i; String value; while((value = getParameter(param)) != null) { images.addElement(value); i++; param = "image" + i; } // Make sure we didn't waste any vector size. images.trimToSize(); return images; } COM: <s> get image name vector </s>
funcom_train/1963395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelBasicSearch() { if (jPanelBasicSearch == null) { jPanelBasicSearch = new JPanel(); jPanelBasicSearch.setLayout(null); jPanelBasicSearch.add(jLabelSearch, null); jPanelBasicSearch.add(getJTextFieldSearch(), null); jPanelBasicSearch.add(getJButtonSearch(), null); } return jPanelBasicSearch; } COM: <s> this method initializes j panel basic search </s>
funcom_train/5341982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFileTransfer(FileTransfer transfer, List l, List lazy) { File f = transfer.getFile(); if(f == null) { if(transfer instanceof LazyFileTransfer) lazy.add(((LazyFileTransfer)transfer).getLazyFile()); } else { addFile(l, f); } } COM: <s> adds the specified file transfer to the lists </s>
funcom_train/33896399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadSinks() { list.addSink(Info.init()); list.addSink(ReportUpload.init(images)); list.addSink(Query.init(images)); list.addSink(Report.init()); list.addSink(Solutions.init()); list.addSink(Administrator.init()); } COM: <s> adds all sinks to the list </s>
funcom_train/51163644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw_data(Graphics g, Rectangle bounds) { if (! range_set) range(); if ( linecolor != null) g.setColor(linecolor); _drawer.set_data(data); _drawer.set_xaxis(xaxis); _drawer.set_yaxis(yaxis); _drawer.set_maxes(xmax, ymax, xmin, ymin); _drawer.set_ranges(xrange, yrange); _drawer.set_clipping(clipping); _drawer.draw_data(g, bounds, hline_data, vline_data); if (_dates_needed) draw_dates(g,bounds); } COM: <s> draw the straight line segments and or the markers at the </s>
funcom_train/39243427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getProfiles() { List menuProfiles = new ArrayList(); List profiles = adminService.getProfiles(); for(Iterator it = profiles.iterator(); it.hasNext();) { Profile jobProfile = (Profile) it.next(); menuProfiles.add(new SelectItem(jobProfile.getName())); } return menuProfiles; } COM: <s> get the list of profiles as configured by the administrator to be </s>
funcom_train/50088153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findEquivalenceClasses() { if (atomContainer==null) { return null; } List<IRingSet> equivalenceClasses = new ArrayList<IRingSet>(); for (Object o : cycleBasis().equivalenceClasses()) { equivalenceClasses.add(toRingSet(atomContainer, (Collection) o)); } return equivalenceClasses; } COM: <s> finds the interchangeability equivalence classes </s>
funcom_train/21343855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Spinner setupSpinner(int spinID, int arrayID){ Spinner spin = (Spinner) findViewById(spinID); ArrayAdapter adapter = ArrayAdapter.createFromResource( this, arrayID, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spin.setAdapter(adapter); return spin; } COM: <s> initialize new spinner </s>
funcom_train/47947158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getMatchingRows() { if (matchingRows == null) { matchingRows = new JCheckBox(); matchingRows.setText("passend"); matchingRows.setSelected(true); matchingRows.setMnemonic(KeyEvent.VK_UNDEFINED); matchingRows.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { rows.setEnabled(!matchingRows.isSelected()); } }); } return matchingRows; } COM: <s> this method initializes matching rows </s>
funcom_train/38524327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute getAttribute(String name) { if (name == null) throw new UnknownAttributeException ("Attribute '" + name + "' does not exist in the Element: '" + name +"'"); if (attributes.containsKey(name)) return (Attribute) attributes.get(name); else throw new UnknownAttributeException ("Attribute '" + name + "' does not exist in the Element: '" + name +"'"); } COM: <s> gets an attribute specified by a name </s>
funcom_train/13994227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnsubscribeChange() { eventBroker.unsubscribeChange(getMockKey(IDS[0], TYPES[0]), changeSubscribers[1]); publishChange(ATTRIBUTES[2], IDS[0], TYPES[0]); assertNotification(true, changeSubscribers[0]); assertNotification(false, changeSubscribers[1]); assertNotification(false, changeSubscribers[2]); assertNotification(false, changeSubscribers[3]); } COM: <s> tests unsubscribe mechanism for normal change subscribers </s>
funcom_train/17201726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object arg0) { Element<T> cursor = head; while (cursor != null && !(arg0 == null ? cursor.entry == null : cursor.entry.equals(arg0))) { cursor = cursor.next; } if (cursor == null) { return false; } else { removeInternal(cursor); return true; } } COM: <s> remove the given element from the list </s>
funcom_train/16612929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LinkedList splitAndFilter(List alleleFeatures) { LinkedList r = new LinkedList(); for (int i = 0; i < alleleFeatures.size(); i++) { AlleleFeature af = (AlleleFeature) alleleFeatures.get(i); splitAndFilter(af, r); } return r; } COM: <s> splits any allele features that cross exon intron or exon utr boundaries </s>
funcom_train/39059390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NumberFormat getNumberFormat() { if (_type == LabelType.Numeric) { return _numberFormat; } else { throw new IllegalArgumentException( "GraphTickLabelFormatter object has incorrect LabelType. " + "The NumberFormat " + _numberFormat.toString() + " is invalid when LabelType is " + _type.toString() + "." ); } } // End of property. COM: <s> gets number format of label label must be of numeric type </s>
funcom_train/46680506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Speakertable makeCopy(){ Speakertable result = new Speakertable(); String ids[] = getAllSpeakerIDs(); for (int pos=0; pos<ids.length; pos++){ try {result.addSpeaker(getSpeakerWithID(ids[pos]).makeCopy());} catch (JexmaraldaException je) {} } return result; } COM: <s> returns a copy of this speakertable </s>
funcom_train/34404045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void componentsForMessage() { composeMessageLayout.removeComponent("errorMessage"); composeMessageLayout.removeComponent(lbBulltinTile); composeMessageLayout.removeComponent(selTargetAudience); composeMessageLayout.removeComponent(lbTargetAudience); composeMessageLayout.addComponent(selSendTo, "tfSendTo"); composeMessageLayout.addComponent(btSelectRecipien, "lbListSendTo"); } COM: <s> components for message </s>
funcom_train/39140161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected float textWidthImpl(char buffer[], int start, int stop) { float wide = 0; for (int i = start; i < stop; i++) { // could add kerning here, but it just ain't implemented wide += textFont.width(buffer[i]) * size; } return wide; } COM: <s> implementation of returning the text width of </s>
funcom_train/46436866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extendTools(OpModule parentModule) { Iterator<OpTool> it = parentModule.getTools(); while (it.hasNext()) { OpTool parentTool = it.next(); if (!(this.getToolsMap().containsKey(parentTool.getName()))) { this.tools.add(parentTool); } } } COM: <s> extends this modules tools with the tools from the parent </s>
funcom_train/48816177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveEvent( Event e ) { // TODO: right now, events are received in a multi-threaded fashion. // we probably want to add them to a queue, and let a single-thread // handle them in the policy to avoid complications try { RecoveryAction action = policy.processEvent( e ); if( action != null ) { action.doAction(); } } catch( Exception exc ) { exc.printStackTrace(); System.exit(-1); // do something more clever than fail-stop... } } COM: <s> this is where events such as failure reports come in </s>
funcom_train/1821468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeatureCollectionRole getRole(FeatureCollectionRole role) { for (int i=0; i<this.roles.length && this.roles[i]!=null; i++){ if (this.roles[i].equalsRole(role)){ return this.roles[i]; } } return null; } COM: <s> check if this feature collection has a role like the given one </s>
funcom_train/4900764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildElementCount(Node node) { int count = 0; NodeList list = node.getChildNodes(); for (int i=0; i<list.getLength(); i++) { Node n = list.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { count++; } } return count; } COM: <s> returns the number of child elements for the given node </s>