__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46523550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOnPlane(Vector point) { Vector N = getNormal(); Vector A = faceVertices.get(0); // Compute O - A Vector OmA = new Vector(point); OmA.subtract(A); // Compute dist, the distance between O and the face plane double divider = N.dotProduct(N); if (divider < Vector.EPSILON / 1000) { // This should not happen unless the normal's length is 0 return false; } double dist = -(OmA.dotProduct(N) / divider); return Math.abs(dist) < Vector.EPSILON; } COM: <s> check if a point is on the plane defined by this face </s>
funcom_train/16378326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig config) throws ServletException { super.init(config); Servlet instance = null; //init try { // if it's already load JForum App if (isAlreadyInstalled()) { logger.debug("is already installed"); // load JForum servlet instance = new JForum(); } else { logger.debug("is not already installed"); instance = new InstallServlet(); } // init Servlet instance instance.init(config); } catch (ServletException ex) { ex.printStackTrace(); } // set in context getServletContext().setAttribute(JFORUM_KEY, instance); } COM: <s> init portlet method </s>
funcom_train/22232548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatternMask(int mask) { if (isLiveOrCompiled() && !this.getCapability(ALLOW_PATTERN_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes8")); if (isLive()) ((LineAttributesRetained)this.retained).setPatternMask(mask); else ((LineAttributesRetained)this.retained).initPatternMask(mask); } COM: <s> sets the line pattern mask to the specified value </s>
funcom_train/41071005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDateLabelFontName(String dateLabelFontName) throws java.beans.PropertyVetoException { String oldDateLabelFontName = this.dateLabelFontName; vetoableChangeSupport.fireVetoableChange(PROP_DATELABELFONTNAME, oldDateLabelFontName, dateLabelFontName); this.dateLabelFontName = dateLabelFontName; propertyChangeSupport.firePropertyChange(PROP_DATELABELFONTNAME, oldDateLabelFontName, dateLabelFontName); } COM: <s> set the value of date label font name </s>
funcom_train/35947259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Text replace(java.lang.CharSequence target, java.lang.CharSequence replacement) { int i = indexOf(target); return (i < 0) ? this : // No target sequence found. subtext(0, i).concat(Text.valueOf(replacement)).concat( subtext(i + target.length()).replace(target, replacement)); } COM: <s> replaces each character sequence of this text that matches the specified </s>
funcom_train/19765659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ticker getTicker() { if (ticker == null) {//GEN-END:|57-getter|0|57-preInit // write pre-init user code here ticker = new Ticker("\u522B\u7761\u8FC7\u7AD9\u4E86\u54E6");//GEN-LINE:|57-getter|1|57-postInit // write post-init user code here }//GEN-BEGIN:|57-getter|2| return ticker; } COM: <s> returns an initiliazed instance of ticker component </s>
funcom_train/17206502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void split(int unit, int size) { int basesize = getSize(unit); if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(basesize > size); setSize(unit, size); setSize(unit + size, basesize - size); addToFree(unit + size); if (DEBUG) dbgPrintFree(); } COM: <s> reduce a lump of units to size freeing any excess </s>
funcom_train/28961911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData() { Values tempValues = iimage.getValues(); tempValues.setType(false); ++countLineNumber; tempValues.setName("Data "+countLineNumber); arrValues.add(tempValues); if(arrValues.size() != 0) igraf.paintData(this.arrValues); this.load_items(); } COM: <s> adding data values to list of all values </s>
funcom_train/18748836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNodeSet(Collection<? extends Node> nodeSet) { for (Node node: nodeSet) { // Edge valueEdge = null; // boolean addValueEdge = false; // if (node instanceof ValueNode) { // valueEdge = new ValueEdge((ValueNode) node); // addValueEdge = true; // } addNode(node); // if (addValueEdge) // addEdge(valueEdge); } } COM: <s> adds a set of graph nodes to this j model </s>
funcom_train/46701547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeValue(final UJO bean, final VALUE value) throws IllegalArgumentException { try { getMethod(bean, true).invoke(bean, value); } catch (Exception e) { throw new IllegalArgumentException("BeanProperty:"+property.getName()+"="+value, e); } } COM: <s> warning there is recommended to call the method from the method ujo </s>
funcom_train/33856233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAvailableLocaleList() { List list = LocaleUtils.availableLocaleList(); List list2 = LocaleUtils.availableLocaleList(); assertNotNull(list); assertSame(list, list2); assertUnmodifiableCollection(list); Locale[] jdkLocaleArray = Locale.getAvailableLocales(); List jdkLocaleList = Arrays.asList(jdkLocaleArray); assertEquals(jdkLocaleList, list); } COM: <s> test available locale list method </s>
funcom_train/40729591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetHiddenItemsSubtypes_subtypes() { HashSet<Object> expected = new HashSet<Object>(); expected.add(new Integer(42)); expected.add(new Integer(1729)); assertEquals(expected, LivelinkConnector.getHiddenItemsSubtypes("42,1729")); assertEquals(expected, LivelinkConnector.getHiddenItemsSubtypes("1729,42")); } COM: <s> tests show hidden items with numeric subtype values </s>
funcom_train/3651060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(Localizer localizer) { Iterator entryIter = localizer.props.entrySet().iterator(); while (entryIter.hasNext()) { Map.Entry entry = (Map.Entry)entryIter.next(); props.put(entry.getKey(), entry.getValue()); } } COM: <s> adds in all of the keys from the given </s>
funcom_train/4018676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|24-getter|0|24-preInit // Insert pre-init code here okCommand = new Command(LocalizationSupport.getMessage("COMMAND_OK") , Command.OK, 1);//GEN-LINE:|24-getter|1|24-postInit // Insert post-init code here }//GEN-BEGIN:|24-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/45622847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOverridePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VCBuildType_override_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VCBuildType_override_feature", "_UI_VCBuildType_type"), MSBPackage.eINSTANCE.getVCBuildType_Override(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the override feature </s>
funcom_train/9373804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEFTransparent(int fileid, byte[] data, Message onComplete) { phone.mCM.iccIO(COMMAND_UPDATE_BINARY, fileid, getEFPath(fileid), 0, 0, data.length, IccUtils.bytesToHexString(data), null, onComplete); } COM: <s> update a transparent ef </s>
funcom_train/14012776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLibrary(String serviceId) { if (addedLibraries == null) { addedLibraries = new HashSet(); } if (addedLibraries.contains(serviceId)) { return; } Element libraryElement = getDocument().createElement("library"); libraryElement.setAttribute("service-id", serviceId); librariesElement.appendChild(libraryElement); addedLibraries.add(serviceId); } COM: <s> adds a java script library service to be dynamically loaded </s>
funcom_train/12646240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Toolkit getToolkit() { ComponentPeer peer = this.peer; if ((peer != null) && !(peer instanceof sun.awt.peer.LightweightPeer)) { return peer.getToolkit(); } Container parent = this.parent; if (parent != null) { return parent.getToolkit(); } return Toolkit.getDefaultToolkit(); } COM: <s> gets the toolkit of this component </s>
funcom_train/8711253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCatchClauses(List<CatchClause> catchClauses) { if (catchClauses == null) { this.catchClauses = null; } else { if (this.catchClauses != null) this.catchClauses.clear(); for (CatchClause cc : catchClauses) { addCatchClause(cc); } } } COM: <s> sets list of </s>
funcom_train/50119031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_hidden_exit(String dir, String location, String check_function, String leave_message) { Vector hexit_data = new Vector(); hexit_data.add(location.replace(File.separatorChar, '.')); hexit_data.add(check_function); hexit_data.add(leave_message); hexits.put(dir, hexit_data); } COM: <s> this method adds a new hidden exit to the room </s>
funcom_train/39966016
/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 method, Object[] args) throws Throwable { if (method.getDeclaringClass() == Object.class) { return invokeObjectMethod(proxy, method, args); } else { return invokeRemoteMethod(proxy, method, args); } } COM: <s> trmi sends the invocation request to the remote object wrapper and </s>
funcom_train/24079668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAndCheckOutDir(String outputDir) throws InvalidXMCDAUtilsArguments { final File outDir = new File(outputDir); if (!outDir.exists()) { if (!outDir.mkdir()) { throw new InvalidXMCDAUtilsArguments("Could not create dir " + outputDir + "."); } } if (!outDir.isDirectory()) { throw new InvalidXMCDAUtilsArguments(outputDir + " is not a directory."); } } COM: <s> creates the given output directory if it does not already exist </s>
funcom_train/32055860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (getCurrentGraph().getSelectionCount() > 0) { Color value = JColorChooser.showDialog(graphpad.getFrame(), Translator.getString("ColorDialog"), null); if (value != null) { Map map = GraphConstants.createMap(); Map map1 = GraphConstants.createMap(); GraphConstants.setForeground(map, value); makeEdit(map1, map); setSelectionAttributes(map); } } } COM: <s> set the font color using a color dialog when an action is initiated </s>
funcom_train/40676912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePngDimensions() { if (imageData.length < 24) { throw new IllegalArgumentException("corrupt PNG format"); } ByteBuffer buffer = ByteBuffer.wrap(imageData); buffer.order(ByteOrder.BIG_ENDIAN); width = buffer.getInt(16); height = buffer.getInt(20); } COM: <s> updates the dimension fields of the png image </s>
funcom_train/42435660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ISessionData getBackendSessionData(Map<String, ISessionData> dispatched, String name, long requestId) { if (dispatched.containsKey(name)) { return dispatched.get(name); } SessionData data = new SessionData(); data.setId(session.getId()); data.setCreationTime(session.getCreationTime()); data.setValid(session.isValid()); data.setRequestId(requestId); dispatched.put(name, data); return data; } COM: <s> get current data for session backend </s>
funcom_train/46734674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCustomControllerRef(DisplayModel customControllerRef) { if (Converter.isDifferent(this.customControllerRef, customControllerRef)) { DisplayModel oldcustomControllerRef= new DisplayModel(this); oldcustomControllerRef.copyAllFrom(this.customControllerRef); this.customControllerRef.copyAllFrom(customControllerRef); setModified("customControllerRef"); firePropertyChange(String.valueOf(FORMDEFINITIONS_CUSTOMCONTROLLERREFID), oldcustomControllerRef, customControllerRef); } } COM: <s> custom controller for definition </s>
funcom_train/38464237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean equalElements(Object o1, Object o2) { if(o1 != null) { return o1.equals(o2); } if(o2 != null) { // o1 == null && o2 != null ---> different return false; } // o1 == null && o2 == null ---> equal return true; } COM: <s> tests two collection elements for equality </s>
funcom_train/43475145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publish(Topic topic, ScribeContent content) { Logger.log(endpoint.getId() + ": Publishing content " + content + " to topic " + topic,Logger.EVENT_LOG); endpoint.route(topic.getId(), new PublishRequestMessage(handle, topic, content), null); } COM: <s> publishes the given message to the topic </s>
funcom_train/36819813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeShares(Share share, Integer amount) { Integer current = Integer.valueOf(0); if (portfolio.containsKey(share)) { current = portfolio.get(share); } int newAmount = current - amount; if (newAmount < 0) { throw new IllegalArgumentException("Current amount of shares is smaller than amount to be removed."); } portfolio.put(share, newAmount); } COM: <s> removes given amount of shares </s>
funcom_train/51011245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void vote() throws Exception { try { Connection con = connect(); try { con.setAutoCommit(false); qdb.addResponse(con, qid); adb.addResponse(con, qid, aid); con.commit(); question = null; } catch (Exception e) { con.rollback(); throw e; } finally { con.close(); } } catch (Exception e) { Log.error(e); throw e; } } COM: <s> votes for the current answer on the current question </s>
funcom_train/7624404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRequestedOrientation() { if (mParent == null) { try { return ActivityManagerNative.getDefault() .getRequestedOrientation(mToken); } catch (RemoteException e) { // Empty } } else { return mParent.getRequestedOrientation(); } return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; } COM: <s> return the current requested orientation of the activity </s>
funcom_train/3598158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCenter() { try { List results = engine.search(nom, "($w word):center($w)>'1.5'"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==4); NOMElement r1 = (NOMElement)((List)results.get(0)).get(0); assertTrue(r1.getID().equals("w_5")); } catch (Throwable ex) { ex.printStackTrace(); fail("Center test failed!"); } } COM: <s> check center works word w 5 starts at 1 </s>
funcom_train/31930759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createList() { m_list = new JList(m_model); m_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); m_list.addListSelectionListener(this); m_list.setVisibleRowCount(VISIBLE_ROWS); m_list.setFont(new Font("Dialog", Font.PLAIN, 12)); ColorSelector.colorize(m_list); } COM: <s> create and hook up the list itself </s>
funcom_train/5608279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scope getEnclosingLexicalScope() { if (scopeType == Scope.Type.FUNCTION || scopeType == Scope.Type.MODULE) { return this; } if (parent == null) { Indexer.idx.reportFailedAssertion("No lexical scope found for " + this); return this; } return parent.getEnclosingLexicalScope(); } COM: <s> returns the containing lexical scope which may be this scope </s>
funcom_train/5855998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean initializeComm(String my_id) { this.my_id = my_id; this.my_ip = PTKConstants.LOCALHOST_IP; this.my_port = PTKStaticVariables.getLocalHostPort(); client = new POutput(my_id, my_ip, my_port, PTKConstants.LOCALHOST_IP, PTKConstants.LOCALHOST_SERVER_PORT, this); return true; } COM: <s> version of initialize comm without ip and port </s>
funcom_train/22686296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public PdfFileInformation readPdfFileMetadata(String ref) { // read info object (may be defined and object set in different trailers // so must be done at end) if ((infoObject != null) && ((!isEncrypted) | (isPasswordSupplied))) readInformationObject(infoObject); // read and set XML value if (ref != null) currentFileInformation.setFileXMLMetaData(convertStreamToXML(ref) .toString()); return currentFileInformation; } COM: <s> read the form data from the file </s>
funcom_train/12560572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void donePreempting(Object preemptToken) { /** * This sync protects preempt related local fields: * preemptingDisplay and destroyPreemptingDisplay. */ synchronized (this) { if (preemptingDisplay != null && (preemptToken == preemptingDisplay || preemptToken == null)) { preemptionDoneCalled = true; foregroundController.stopPreempting( preemptingDisplay.getDisplayId()); } } } COM: <s> display the displayable that was being displayed before </s>
funcom_train/18865240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean removeChild(final Account child) { synchronized (cMutex) { if (children != null && indexOf(child) >= 0) { children = (Account[]) SortedArray.remove(children, child); if (children.length == 0) { children = null; } return true; } return false; } } COM: <s> removes a child account </s>
funcom_train/41266266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Producto entity) { EntityManagerHelper.log("saving Producto instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved producto entity </s>
funcom_train/4154411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getWall( final int x, final int y ) { try { if ( x < 0 || x >= width ) throw new ArrayIndexOutOfBoundsException(); return datas[ ( y << heightShift ) + x ]; } catch ( ArrayIndexOutOfBoundsException ae ) { return WALL_STONE; // Like outside map there is stone everywhere... } } COM: <s> returns a wall from the map </s>
funcom_train/37740946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RASInvocationHandler rasInvocationHandler() { if (rasCache == null) { WorkflowEngine engine = null; try { ResourceAssignmentService ras = engineLocal().resourceAssignmentService (); if (ras == null) { return null; } rasCache = new DefaultRASInvocationHandler (ras); } catch (RemoteException rex) { throw new EJBException (rex); } } return rasCache; } COM: <s> get the resource assignment invocation handler </s>
funcom_train/37586952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupDoc() { files = new File[] { new File("/tmp/nowhere") }; texts = new String[] { "This is a block of test text.\n" + "It doesn't matter what goes in here.\n" + "But it does matter if it is manipulated properly!\n"}; getter = new TestDocGetter(files, texts); } COM: <s> setup for test cases with one document </s>
funcom_train/12155433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doDefaultOption(ResourceBundle bundle) { if (logger.isDebugEnabled()) { logger.debug("Entering doDefaultOption(" + bundle + ")."); } callingEntityTextField.setText(DEFAULT_CALLING_ENTITY); sopClassUIDComboBox.setSelectedItem(0); littleEndianRadioButton.doClick(); super.doDefaultOption(bundle); if (logger.isDebugEnabled()) { logger.debug("Exiting doDefaultOption(" + bundle + ")."); } } COM: <s> resets the controls to their defaults </s>
funcom_train/39535034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEnumeratedTagValueReferenceAttribute(String nodeName, String attributeName){ boolean isEnumeratedTagValueReferenceAttribute=false; if(nodeName!=null && ! nodeName.equals("") && attributeName!=null && ! attributeName.equals("")){ isEnumeratedTagValueReferenceAttribute=refAttributeToEnumeratedTag.containsKey(nodeName+separator+attributeName); } return isEnumeratedTagValueReferenceAttribute; } COM: <s> returns whether the given attribute name corresponds to an enumerated tag value </s>
funcom_train/26485050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void maybeClose() { if (commandHistory.isChanged()) { String str = I18N.get("DesignWin.save_question"); switch (JOptionPane.showConfirmDialog(frame, str)) { case JOptionPane.YES_OPTION: saveReport(); case JOptionPane.NO_OPTION: break; case JOptionPane.CANCEL_OPTION: return; // Don't close window } } closeMe(); Designer.deleteWindow(this); } COM: <s> saves the report if it is changed some command has been performed and </s>
funcom_train/36490150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processUntilDoneCmd() throws UnrecoverableScrewupException { try { while (true) { try { Command cmd = new Command(getConnection()); if (preProcessCommands(cmd)) // Ist das Kommando schon abgearbeitet? continue; components.processCommand(cmd); if (cmd.has(Command.Code.DONE)) break; } catch (ProtocolException e) { lg.warn(e, "Ung\u00FCltiges Kommando; ignoriere"); } } } catch (IOException e) { throw new UnrecoverableScrewupException(e); } } COM: <s> alle kommandos verarbeiten </s>
funcom_train/21940555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field22 getField22() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("22"); if (t == null) { log.fine("field 22 not found"); return null; } else { return new Field22(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 22 </s>
funcom_train/50691168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateExcluded(int[][][] candidateComponents) { if (!excluded.contains(candidateComponents[selectedNodeAndGraphNumber[1]][selectedNodeAndGraphNumber[0]])){ excluded.add(candidateComponents[selectedNodeAndGraphNumber[1]][selectedNodeAndGraphNumber[0]]); } excludedBySubsteps[substepNumber + 1] = new ArrayList<int[]>(); for(int i=0;i<excluded.size();i++){ excludedBySubsteps[substepNumber + 1].add(excluded.get(i)); } } COM: <s> updates excluded and excluded by substeps modifying the substep </s>
funcom_train/2273245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setType(Ident type) throws NullPointerException { if (type == null) { throw new NullPointerException(tr("setType, type == null")); } if (type == Ident.INT || type == Ident.DOUBLE || type == Ident.BOOLEAN) { valType = type; return true; } return false; } COM: <s> set type of refer </s>
funcom_train/32969238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton12() { if (jButton12 == null) { jButton12 = new JButton(); jButton12.setToolTipText("Move"); jButton12.setRolloverIcon(new ImageIcon(getClass().getResource("/orders/sel/move2.gif"))); jButton12.setPressedIcon(new ImageIcon(getClass().getResource("/orders/push/move3.gif"))); jButton12.setIcon(new ImageIcon(getClass().getResource("/orders/norm/move1.gif"))); jButton12.setDoubleBuffered(true); jButton12.setBounds(new java.awt.Rectangle(230,36,34,34)); jButton12.setBorderPainted(false); } return jButton12; } COM: <s> this method initializes j button12 </s>
funcom_train/39342479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPathElement(String path) { File f = new File(path); if (f.isFile()) { addJarLibrary(path); return; } else if (f.isDirectory()) { //add to both maybe there are classes and jar mixed in one // directory addClassDirectory(path); addJarDirectory(path); } } COM: <s> add single jar file or directory with jarfiles or a classes directory to </s>
funcom_train/17756208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean preprocess(String[] anArgs) { // run the preprocessor to handle inheritance first. com.javadude.antxr.preprocessor.Tool preTool = new com.javadude.antxr.preprocessor.Tool(this, anArgs); if (preTool.preprocess()) { fPreprocessedArgs = preTool.preprocessedArgList(); } else { fPreprocessedArgs = null; hasError = true; } return hasError; } COM: <s> perform preprocessing on the grammar file </s>
funcom_train/3022420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateMetaData() { //System.out.println("CurrentSummary.updateMetaData()"); //System.out.flush(); MultipleDirClassDiagramReloader reloader = getMetadataReloader(); reloader.setNecessary(true); reloader.reload(); //System.out.println("CurrentSummary.updateMetaData() - end"); } COM: <s> reloads all the metadata before attempting to perform a refactoring </s>
funcom_train/18071624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getViewPointFromWorldPoint(short worldPointX, short worldPointY) { Point offset = this.scroller.getOffset(); double zoom = this.scroller.getZoom(); Point point = new Point(); point.x = (int)((Math.abs(StaticData.WORLD_MIN) + worldPointX) * zoom - offset.x); point.y = (int)((Math.abs(StaticData.WORLD_MIN) + worldPointY) * zoom - offset.y); return point; } COM: <s> convert world point2d to view point </s>
funcom_train/16913432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEditMode(final EditMode newEditMode) { if (newEditMode == null) { throw new IllegalArgumentException("editMode must not be null"); } EditMode oldEditMode = this.editMode; this.editMode = newEditMode; firePropertyChange("editMode", oldEditMode, this.editMode); setCursor(this.editMode.getCursor()); } COM: <s> set the current edit mode for this root network panel to </s>
funcom_train/13364856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addToolTipGroup() { final Group group = getGroup(NLS_GROUP_TOOL_TIPS, tt(NLS_TT_GROUP_TOOL_TIPS), 1); final Composite composite = getComposite(group); addField(new JJBooleanFieldEditor(P_NO_PREFERENCE_TOOL_TIPS, NLS_LABEL_NO_TOOL_TIPS, // NLS_TT_NO_TOOL_TIPS, composite)); } COM: <s> adds the no tool tip group and field </s>
funcom_train/39876613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int writeEntityData(byte[] data, int size) throws IOException { int result = writeEntityData_native(mBackupWriter, data, size); if (result >= 0) { return result; } else { throw new IOException("result=0x" + Integer.toHexString(result)); } } COM: <s> write a chunk of data under the current entity to the backup transport </s>
funcom_train/39395180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object addOwnedElement(java.lang.Object owner, java.lang.Class<? extends TcoObject> element) throws Throwable { // 1) create persistently TcoObject object = createTcoObject(((ch.softenvironment.jomm.mvc.model.DbChangeableBean)owner).getObjectServer(), element); // 2) add to ownedElements return addOwnedElement(owner, object); } COM: <s> add element to owner </s>
funcom_train/50120003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_response(String _state, String pattern, String resp_func) { String[] resp = new String[3]; resp[0] = _state; resp[1] = resp_func; resp[2] = pattern; responses.put(new Integer(responses.size()).toString(), resp); } COM: <s> adds a response to the responses list </s>
funcom_train/21884022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVersion(final String type, final String name) { final StringBuffer sb = new StringBuffer(); sb.append("package.").append(type + ".").append(name + ".").append(Constants.PROPERTY_PKG_VERSION_FIELD); return getProject().getProperty(sb.toString()); } COM: <s> returns the package version </s>
funcom_train/44548256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeReference(K key, V value) { Collection<V> valueCollection = get(key); Iterator<V> iterator = valueCollection.iterator(); while (iterator.hasNext()) { if (iterator.next() == value) { iterator.remove(); break; } } } COM: <s> removes the given value mapped to the given key from the map </s>
funcom_train/42949810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Color computeForeground(Component renderer, ComponentAdapter adapter) { // If this.foreground is null, use adapter.target.getForeground(); // Never use renderer.getForeground() as the seed in this decorator // class because renderer is too promiscuous! Color seed = foreground == null ? adapter.target.getForeground() : foreground; return adapter.isSelected() ? computeSelectedForeground(seed) : seed; } COM: <s> p computes a suitable foreground for the renderer component within the </s>
funcom_train/41266395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Mngmcn entity) { EntityManagerHelper.log("saving Mngmcn instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved mngmcn entity </s>
funcom_train/9277836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBigColumn() throws SQLException { int[] ia = { 40000, }; boolean[] useClob = { true, }; createTable(BIG_TABLE_NAME, ia, useClob); String[] sa = { "a", }; insertOneRow(BIG_TABLE_NAME, sa, ia); String[][] expected = { getStringArray(sa, ia), }; validTable(expected, BIG_TABLE_NAME); } COM: <s> try a column which is 32767 </s>
funcom_train/24627214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getOutputFile(URI uri, String related, int type, Map<String,String> headers) throws IOException { // maybe later upload to a server File mapto = mapTo(uri,related, type); if (!mapto.exists()) { File dir = new File(mapto.getParent()); if (!dir.exists() && !dir.mkdirs()) throw new IOException("Can't make parent directories: "+dir); } return mapto; } COM: <s> return output stream that stores in cache perhaps compressing </s>
funcom_train/29836397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point2D getSourceDockingCoords(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape) { DockingAttribute docking = edgeAttr.getDocking(); String sourcePortName = docking.getSource(); Edge edge = (Edge) edgeAttr.getAttributable(); Node sourceNode = edge.getSource(); return getDockingCoords(sourcePortName, sourceShape, sourceNode, true); } COM: <s> returns the coordinates of the port the edge belongs to </s>
funcom_train/39789879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderIconLabel(RenderContext rc, Node parentNode, Label label) { Element imgElement = ImageReferenceRender.renderImageReferenceElement(rc, this, label, IMAGE_ID_ICON); imgElement.setAttribute("id", ContainerInstance.getElementId(label)); imgElement.setAttribute("style", "border:0px none;"); parentNode.appendChild(imgElement); } COM: <s> renders a label containing only an icon </s>
funcom_train/1355598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attach(JComponent comp){ KeyListener kl = new KeyAdapter(){ @Override public void keyPressed(KeyEvent arg0) { int motorIdx = getMotorIndex(arg0.getKeyCode()); if (motorIdx <0) return; motorCommands[motorIdx] = TURN_ON; } @Override public void keyReleased(KeyEvent arg0) { int motorIdx = getMotorIndex(arg0.getKeyCode()); if (motorIdx <0) return; motorCommands[motorIdx] = TURN_OFF; } }; comp.addKeyListener(kl); } COM: <s> attach bot controls to the compoennt </s>
funcom_train/43429993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void switchPause() { pause=(pause+1)%2; if (pause==1) pauseButton.setIcon(new ImageIcon(getClass().getResource("play.gif"))); else pauseButton.setIcon(new ImageIcon(getClass().getResource("hourglas.gif"))); pBoard.startGame(); } COM: <s> toggle the game into pause and running states </s>
funcom_train/15811231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String number() throws ParseException { int startIdx = ptr; try { if (!isDigit(lookAhead(0))) { throw new ParseException( buffer + ": Unexpected token at " + lookAhead(0), ptr); } consume(1); while (true) { char next = lookAhead(0); if (isDigit(next)) { consume(1); } else break; } return buffer.substring(startIdx, ptr); } catch (ParseException ex) { return buffer.substring(startIdx, ptr); } } COM: <s> get and consume the next number </s>
funcom_train/23277621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ModelParameter findModelParameter(TypedModel typedModel) { ModelParameter result = null; for (Iterator it = currentOpTransformation.getModelParameter() .iterator(); it.hasNext();) { result = (ModelParameter) it.next(); if (((ModelType) result.getType()).getMetamodel().containsAll( typedModel.getUsedPackage())) return result; } return null; } COM: <s> finds a model parameter in the current mapping </s>
funcom_train/44166931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMoveCost(int basicMoveCost, Tile fromTile) { int moveCost = basicMoveCost; for (TileItem item : tileItems) { if (item instanceof TileImprovement && ((TileImprovement) item).isComplete()) { moveCost = ((TileImprovement) item).getMovementCost(moveCost, fromTile); } } return moveCost; } COM: <s> determine the movement cost to this code tile code from </s>
funcom_train/2897708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(ResourceBundle aDefaultMap) { Enumeration e = aDefaultMap.getKeys(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); myRegistryMap.put(key, aDefaultMap.getObject(key)); } this.fireUIResourceRegistryEvent(new UIResourceRegistryEvent(this)); } COM: <s> loads the given code resource bundle code as key localization mapping </s>
funcom_train/43907023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadDefault() throws IOException { // Check the application directory first // File file = new File("epsg.properties"); if (file.exists()) { epsg.load(new FileInputStream(file)); } // Use the built-in property defintions // URL url = EPSGCRSAuthorityFactory.class.getResource("epsg.properties"); epsg.load(url.openStream()); } COM: <s> loads from epsg </s>
funcom_train/4757105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean strictlyPositive() { if (isNaN()) { field.setIEEEFlagsBits(DfpField.FLAG_INVALID); dotrap(DfpField.FLAG_INVALID, LESS_THAN_TRAP, this, newInstance(getZero())); return false; } return (sign > 0) && ((mant[mant.length - 1] != 0) || isInfinite()); } COM: <s> check if instance is strictly greater than 0 </s>
funcom_train/9887044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getParameterElement(NodeList list, String key) { Element elem = null; for(int i = 0; i < list.getLength(); i++) { elem = (Element)(list.item(i)); if(elem.getAttribute("key").equals(key)) { break; } } return elem; } COM: <s> returns the parameter element given a node list </s>
funcom_train/35165792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void injectField(String fieldName, CtClass subject, Class<?> fieldClass) throws CannotCompileException, NotFoundException { if (!ClassUtil.hasField(subject, fieldName)) { String fieldString = writeFieldDeclaration(fieldName, fieldClass); CtField field = CtField.make(fieldString, subject); field.setModifiers(Modifier.PRIVATE); subject.addField(field); } } COM: <s> injects the new field into the class </s>
funcom_train/27943477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadImages() { String strJarFile = strResPath + "images.jar"; hImagesList = new HashMap<Integer, Icon>(); hImagesList.put( new Integer( SPLASH_WINDOW_BACKGROUND ), JImage.loadIconFromJar( strJarFile, "images/splash_window.gif" ) ); } COM: <s> load all images from images jar file </s>
funcom_train/23410343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAsFolderLocationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Agent_asFolderLocation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Agent_asFolderLocation_feature", "_UI_Agent_type"), AgentsPackage.Literals.AGENT__AS_FOLDER_LOCATION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the as folder location feature </s>
funcom_train/9266740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selfTest() { System.out.println("Starting tests of alarm, condition and communicator."); System.out.println("These are to test the lottery scheduler."); KThread.selfTest(); Semaphore.selfTest(); // SynchList.selfTest(); // if (Machine.bank() != null) { // ElevatorBank.selfTest(); // } Alarm.selfTest(alarm); Condition2.selfTest(alarm); Communicator.selfTest(alarm); // PriorityScheduler.selfTest(alarm); } COM: <s> test this kernel </s>
funcom_train/3655103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRelativeContentLocation() { String contentLocation = getContentLocation(); if (null == contentLocation) { return false; } else { return contentLocation.startsWith("./") || contentLocation.startsWith("../") || (contentLocation.indexOf(':') == -1); } } COM: <s> tests whether the current content location if any is relative </s>
funcom_train/3833932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Format getSelectedInfoFormat() { Format ms = (Format)offeredInfoFormats.get( 0 ); for ( int i = 0; i < offeredInfoFormats.size(); i++ ) { Format tmp = (Format)offeredInfoFormats.get( i ); if ( tmp.isCurrent() ) { ms = tmp; break; } } return ms; } COM: <s> returns the info format that is marked as selected </s>
funcom_train/47135617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInitialMarginPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Symbol_initialMargin_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Symbol_initialMargin_feature", "_UI_Symbol_type"), TradingPackage.Literals.SYMBOL__INITIAL_MARGIN, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the initial margin feature </s>
funcom_train/42544564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuilder recursivelyCreatePackageName(final Tree rootNode) { StringBuilder packageName = new StringBuilder(); if (rootNode.getType() == JavaParser.DOT) { assert rootNode.getChildCount() == 2 : "Expected 2 children"; packageName.append(recursivelyCreatePackageName(rootNode .getChild(0))); packageName.append("."); packageName.append(recursivelyCreatePackageName(rootNode .getChild(1))); } else { packageName.append(rootNode.getText()); } return packageName; } COM: <s> builds a package name from the child nodes of a package node </s>
funcom_train/50156962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getEndGrade() { int max = -1; if (selectedGradeRanges == null || !getUseGradeRanges()) { prtln("getEndGrade: selectedGradeRanges is null"); return MetadataConstraints.ANY_GRADE; } for (int i = 0; i < selectedGradeRanges.length; i++) { max = Math.max(max, standardsMapper.getEndGrade(selectedGradeRanges[i])); } return max; } COM: <s> compute a end grade value based on selected grade ranges </s>
funcom_train/7388972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem4() { if (stringItem4 == null) {//GEN-END:|160-getter|0|160-preInit // write pre-init user code here stringItem4 = new StringItem("Creature dirtiness:", creature.getTextDirtyLevel());//GEN-LINE:|160-getter|1|160-postInit // write post-init user code here }//GEN-BEGIN:|160-getter|2| return stringItem4; } COM: <s> returns an initiliazed instance of string item4 component </s>
funcom_train/32909878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getUserListPanel() { try { uiUserList.setTableModel(getUserList(), 60); PanelAddRemove panel = new PanelAddRemove(PanelAddRemove.NO_RIGHT_SIDE_BUTTONS); panel.getRemoveButton().setVisible(false); panel.getPropertiesButton().setVisible(false); addNewUserListener(uiUserList, panel.getAddButton()); panel.setListControl(uiUserList); return panel; } catch (Exception e) { Debug.LogException(this, e); return new UIJPanel(); } } COM: <s> panel with user list and add button </s>
funcom_train/37648653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRenderReportCmdNullArg2() throws CommandException { try { RenderReportCmd cmd = new RenderReportCmd(); cmd.setProject(this.testProject); cmd.registerRenderer(null, PMDRuntimeConstants.HTML_REPORT_NAME); cmd.performExecute(); fail(); } catch (UnsetInputPropertiesException e) { // yes cool } } COM: <s> test robustness 2 </s>
funcom_train/44714172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component createComponent() { TextArea textArea = new TextArea(getParameterName()); copyValuesToWidget(textArea); if (getComponentAttribute("cols") != null) { textArea.setCols(getCols()); } if (getComponentAttribute("rows") != null) { textArea.setRows(getRows()); } return textArea; } COM: <s> create the text area whose persistence is managed </s>
funcom_train/825581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getNextStatesInFlow(StateVertexFacade state) { LinkedList result = new LinkedList(); Collection outTrans = state.getOutgoing(); for (Iterator it = outTrans.iterator(); it.hasNext(); ) { TransitionFacade tr = (TransitionFacade) it.next(); if (! tr.hasExactStereotype("each time")) { result.add(tr.getTarget()); } } return result; } COM: <s> get all states reachable from a state except those reachable via </s>
funcom_train/50894544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCmdClose() { if (cmdClose == null) { cmdClose = new JButton(); cmdClose.setText("Close"); cmdClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.exit(0); // TODO Auto-generated Event stub actionPerformed() } }); } return cmdClose; } COM: <s> this method initializes cmd close </s>
funcom_train/15626885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addMapFile(@NotNull final MapFile<G, A, R> mapFile) { final int tmp = Collections.binarySearch(mapFiles, mapFile, MapFileNameComparator.INSTANCE); final int index = tmp >= 0 ? tmp : -tmp - 1; mapFiles.add(index, mapFile); addMapModelListener(mapFile.getPickmap()); return index; } COM: <s> adds a map file </s>
funcom_train/1504542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addObstacle(Obstacle newObs) { visibleObstacles.add(newObs); Iterator oItr = new HashSet(visibleObstacles).iterator(); while (oItr.hasNext()) { Obstacle currObs = (Obstacle)oItr.next(); if (newObs != currObs) addSegmentsFor(newObs, currObs); } addPerimiterSegments(newObs); addSegmentsFor(start, newObs); addSegmentsFor(end, newObs); } COM: <s> adds an obstacle to the visibility graph and generates new segments </s>
funcom_train/43664043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addXPackagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BPackage_xPackage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BPackage_xPackage_feature", "_UI_BPackage_type"), XmdlboPackage.Literals.BPACKAGE__XPACKAGE, false, false, false, null, getString("_UI_BaseModelPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the xpackage feature </s>
funcom_train/9546842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void flashEdge(NetID from, NetID to, Color color, String typeName, Class<?> msgClass) { Map<String, Serializable> attributes = new HashMap<String, Serializable>(); attributes.put("msg_class", msgClass.getSimpleName()); this.flashEdge(from, to, attributes, color, typeName); } COM: <s> paints a flashing overlay edge along with its class name </s>
funcom_train/12200025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serverResponse(Response response) throws IOException, PDUException { synchronized(this) { try { // Sleep for 300 ms sending reply to more accuratly simulate smsc this.wait(300); } catch( Exception e ) { e.printStackTrace(); } } debug.write("SimulatorPDUProcessor.serverResponse() " + response.debugString()); display("server response: " + response.debugString()); session.send(response); } COM: <s> send the response created by code client request code to the client </s>
funcom_train/25790188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAllowedMethods() { List<AnnotationInfo> annotations = getAnnotations(); if (annotations != null) { for (AnnotationInfo annotationInfo : annotations) { if (!getAllowedMethods().contains( annotationInfo.getRestletMethod())) { getAllowedMethods().add(annotationInfo.getRestletMethod()); } } } } COM: <s> invoked when the list of allowed methods needs to be updated </s>
funcom_train/38380424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getSelectedProblems() { Vector res = new Vector(); TreePath[] tp = jTreeProblems.getSelectionPaths(); for (int i = 0; i < tp.length; i++) { if (tp[i].getPathCount() == 3) res.add(tp[i].getLastPathComponent().toString()); } return res; } COM: <s> return a vector with names of all selected problems in the tree </s>
funcom_train/45251891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fillMajor(IConfigurationElement widgetElement) { if (widgetElement.getChildren(IWorkbenchRegistryConstants.TAG_LAYOUT).length==0) { return false; } IConfigurationElement layout = widgetElement.getChildren(IWorkbenchRegistryConstants.TAG_LAYOUT)[0]; String fillMajorVal = layout.getAttribute(IWorkbenchRegistryConstants.ATT_FILL_MAJOR); return (fillMajorVal != null && fillMajorVal.equals("true")); //$NON-NLS-1$ } COM: <s> returns whether or not the defining </s>
funcom_train/11515816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doWriteObject(ObjectOutputStream out) throws IOException { out.writeFloat(loadFactor); out.writeInt(data.length); out.writeInt(size); for (MapIterator<K, V> it = mapIterator(); it.hasNext();) { out.writeObject(it.next()); out.writeObject(it.getValue()); } } COM: <s> writes the map data to the stream </s>