__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/36190773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRecomposition() throws Exception { ICompositionManager manager = (ICompositionManager) compositionManagerFinder .getService(); assertNotNull(manager); CompositionPlan plan = null; try { manager.reComposePlan(new ArrayList<PssService>(), new CompositionID()); fail("Recomposition should fail unless the plan has been already composed"); } catch (ServiceMgmtException e) { e.printStackTrace(); } } COM: <s> test re composing a plan without having composed it first </s>
funcom_train/47855610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveImageToFile(BufferedImage buffuredImageRescaled, String bnID) { String filename = getPathForId(bnID); try { ImageIO.write(buffuredImageRescaled, extension, new File(filename)); logger.debug("image captured into "+filename); //$NON-NLS-1$ } catch (IOException e) { logger.debug("error during the capture of image "+filename, e); //$NON-NLS-1$ } notifyListenersOfLoad(bnID, filename); } COM: <s> takes this picture and stores it into this filename </s>
funcom_train/18249448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateStrandedness() { // System.out.println("Calculating strandedness..."); boolean forward = false; boolean reverse = false; Iterator iter = this.getSupportingSequences().iterator(); while (iter.hasNext()) { IBaseAssemblySequence seq = (IBaseAssemblySequence) iter.next(); if (seq.isComplemented()) { reverse = true; } else { forward = true; } if (reverse && forward) { break; } } this.dualStrandedSupport = forward && reverse; } COM: <s> compute our strandedness </s>
funcom_train/49105379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double eval(double[][] dAry2D, boolean highValue) throws Exception { // always there are two input value arrays ExpCalculator u1Exp = getInputExpList().get(0); ExpCalculator u2Exp = getInputExpList().get(1); double u1 = u1Exp.eval(dAry2D[0]); double u2 = u2Exp.eval(dAry2D[1]); if (highValue) return u1 > u2 ? u1 : u2; else return u1 < u2 ? u1 : u2; } COM: <s> evaluate function value based on the input 2 d double array </s>
funcom_train/18479772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LPI getIntersection(Line l) { Plane pr = getPlane() ; LPI inter = pr.getIntersection(l) ; if (inter == null) return null ; for(int i = 0; i < polys.length; i++) { Poly t = polys[i] ; if (t.isValid(inter.p_uv)) { return inter ; } } return null ; } COM: <s> returns the intersection between this list of polygons and a line </s>
funcom_train/31678600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Term copy() { Term term = FACTORY.array(_size); term._size = _size; for (int i = 0; i < _size; i++) { checkCanceled(); term._powers[i] = _powers[i]; term._variables[i] = _variables[i]; } return term; } COM: <s> returns an entierely new copy of this term </s>
funcom_train/42785694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int attrOffset, Object newVal) { boolean enabled = cls.getModel().isRedundancyFilterEnabled(); boolean changed = false; Object oldVal = values[attrOffset]; if (oldVal != newVal) { if ((oldVal == null) || (newVal == null) || (!oldVal.equals(newVal))) { changed = true; } } if (changed || !enabled) { values[attrOffset] = newVal; setChanged(attrOffset); } } COM: <s> set a new attribute value given its offset </s>
funcom_train/3466880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMany() { // @BEGINPROTECT _11_6_1d8404b6_1186398708818_722962_555 // add individual code here if (this.getMultiplicity() != null) { if (this.getMultiplicity().getUpperBound() > 1) { return true; } } return false; // @ENDPROTECT } COM: <s> returns true if the parameter has a to n multiplicity </s>
funcom_train/18738430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOutjarInInpath () { String[] args = new String[] {"-aspectpath", aspectjarName, "-inpath", injarName, "-outjar", injarName}; Message error = new Message(WeaverMessages.format(WeaverMessages.OUTJAR_IN_INPUT_PATH)); Message fail = new Message("Usage:"); MessageSpec spec = new MessageSpec(null,null,newMessageList(error),newMessageList(fail),null); CompilationResult result = ajc(baseDir,args); // System.out.println(result); assertMessages(result,spec); } COM: <s> aim check that outjar does not coincide with a member of inpath </s>
funcom_train/22000396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { // We only need to shutdown the internal HYSQLDB database try { if (software == HSQLDB_SOFTWARE && mode == INTERNAL && (checkConnection() != null)) { try { Statement statement = connection.createStatement(); ResultSet RS = statement.executeQuery("SHUTDOWN"); RS.close(); statement.close(); } catch (SQLException e) { System.err.println("SQLException " + e.getMessage()); e.printStackTrace(System.err); DesktopManager.showErrorMessage(Localization.getString("ERROR_TALKING_TO_DATABASE", e.getMessage())); } } } catch (DatabaseTableException d) { } } COM: <s> shutdown the database </s>
funcom_train/18890289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWhiteSpaceRecord() { if (depth > -1) { int length1 = offset - increment - temp_offset; if (length1 != 0) if (singleByteEncoding)//if (encoding < FORMAT_UTF_16BE) writeVTDText(temp_offset, length1, TOKEN_CHARACTER_DATA, depth); else writeVTDText(temp_offset >> 1, length1 >> 1, TOKEN_CHARACTER_DATA, depth); } } COM: <s> write white space records that are ignored by default </s>
funcom_train/11659301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void warning(SAXParseException exception) throws SAXException { log.error( "Parse Warning at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), exception); if (errorHandler != null) { errorHandler.warning(exception); } } COM: <s> forward notification of a parse warning to the application supplied </s>
funcom_train/45471874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int hash = 17; hash = 17 * getFieldName().hashCode(); hash = hash * 17 * getFieldType().hashCode(); if (getHandler() != null) { hash = hash * 17 * getHandler().hashCode(); } return hash; } COM: <s> returns the hash code for this xmlfield descriptor </s>
funcom_train/4013171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createOffScreenBuffer(int format, int width, int height) { Log.d(TAG, "Creating off-buffer=" + format + ", " + width + ", " + height); mOffScreenBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); mOffScreenBitmapDrawable = new BitmapDrawable(mOffScreenBitmap); mOffScreenBitmapDrawable.setBounds(0, 0, width, height); mOffScreenCanvas = new Canvas(mOffScreenBitmap); } COM: <s> create the off screen buffer according to the passed parameters </s>
funcom_train/4741991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(String username, String password, String cloudName) { properties = new HashMap<String, Object>(); properties.put("username", username); properties.put("password", password); properties.put("cloudName", cloudName); } COM: <s> the method to set the properties for a private key pair </s>
funcom_train/17713675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String multiplyInt(String num1, int num2){ if(num2<0){ num2 = num2 * (-1); } if(num2 == 0){ return "0"; } int carry = 0; int index = 1; int len1 = num1.length(); StringBuffer result = new StringBuffer(); while(index <= len1){ int n1 = num1.charAt(len1 - index) - '0'; int prod = (n1 * num2) + carry; carry = prod / 10; result.append(prod%10); index++; } result = result.reverse(); if(carry > 0){ result.insert(0, carry); } return trimLeadingZero(result.toString()); } COM: <s> to multiply number represented by num1 with the magnitude of num2 </s>
funcom_train/38531440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateResource() throws Exception { System.out.println("testCreateResource"); // Add your test code below by replacing the default call to fail. String id = this.collection.createId(); Resource resource = this.collection.createResource(id, "XMLResource"); assertNotNull("Resource not created, null returned",resource); } COM: <s> test of create resource method of class gov </s>
funcom_train/4040269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreState(IMemento memento) { memento = memento.getChild(PREF_RABBIT_VIEW); if (memento == null) { return; } Integer width = memento.getInteger(PREF_METRICS_WIDTH); if (width != null && width > 0) { sashFormData.left.offset = width; } } COM: <s> restores the view state </s>
funcom_train/50845943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecute() throws Exception { boolean expResult; boolean result; PreparedStatement stmt = queryBy("id"); stmt.setInt(1, 1); expResult = true; result = stmt.execute(); assertEquals(expResult, result); stmt.close(); expResult = false; stmt = updateColumnWhere("c_varchar", "id"); stmt.setString(1, "Execute"); stmt.setInt(2, 1); result = stmt.execute(); assertEquals(expResult, result); stmt.close(); } COM: <s> test of execute method of interface java </s>
funcom_train/26442281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendConnectedKernelInformation(SocketKernel distantSocket,KernelAddress distantKernel,AgentAddress p2p, String protocol){ AgentAddress addr=getAgentWithRole(community,group,"netagent"); Vector v=new Vector(); v.add(distantSocket.getHost()+":"+distantSocket.getPort()); v.add(distantKernel); v.add(p2p); v.add(protocol); sendMessage(addr,new NetworkMessage(NetworkMessage.KERNEL_CONNECTED,v)); } COM: <s> informs the net agent that a new kernel has been connected </s>
funcom_train/45776121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(){ logger.log(Level.INFO, "Closing replay {0}", name); // closing all actives sessions if (sender != null && sender.isConnected()) { sender.close(); removeListener(sender); } for (IoSession session : listeners) { if (session.isConnected()) { removeListener(session); } } if (saveTask!=null) { // stopping the saving task if active saveTask.cancel(); // saves all remaining data to file saveTask.run(); saveTask = null; } } COM: <s> this function closes all sessions attached to this replay </s>
funcom_train/20784194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void computeByteArray(OSCJavaToByteArrayConverter stream) { stream.write("#bundle"); computeTimeTagByteArray(stream); Enumeration enumer = packets.elements(); OSCPacket nextElement; byte[] packetBytes; while (enumer.hasMoreElements()) { nextElement = (OSCPacket) enumer.nextElement(); packetBytes = nextElement.getByteArray(); stream.write(packetBytes.length); stream.write(packetBytes); } byteArray = stream.toByteArray(); } COM: <s> compute the osc byte stream representation of the bundle </s>
funcom_train/9851023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) { WebListable newValue = null; if (value != null) { newValue = findOption(value); if (newValue == null) { throw new IllegalArgumentException(value + " is an invalid key for this option input's iterable."); } } this.value = newValue; } COM: <s> defines this option inputs value </s>
funcom_train/21634048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeHeaders() { if (this.tw == null) { throw new QuantError("Must open file first."); } final StringBuilder theLine = new StringBuilder(); theLine.append(FileData.DATE); theLine.append(this.format.getSeparator()); theLine.append(FileData.TIME); for (final String str : this.columns) { if (theLine.length() > 0) { theLine.append(this.format.getSeparator()); } theLine.append("\""); theLine.append(str); theLine.append("\""); } this.tw.println(theLine.toString()); } COM: <s> write the headers </s>
funcom_train/36463098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WSDLTypeTree retrieveTypes() { if(interceptor != null) interceptor.beginWSDLTypeParsing(style, wsdl, location); // use the type parser that is registered for this style // and get all types WSDLTypeTree types = TypeParser.getInstance(style.getInvocationStyle()) .getElementTypes(wsdl, location, style.getInvocationStyle()); if(interceptor != null) interceptor.finishedWSDLTypeParsing(style, wsdl, location, types); return types; } COM: <s> load all types </s>
funcom_train/3563407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGenre(Integer genreID, String genreName) throws DbException { LinkedList parmList; parmList = new LinkedList(); addIfNotNull(parmList, "genreID", genreID); addIfNotNull(parmList, "genreName", genreName); simpleRequest(UPDATE_GENRE_REDUCED_PAGE, "Cannot update genre", parmList); } COM: <s> updates a genre </s>
funcom_train/22520293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createWarningArea() { // warning icon fWarning = new Label(this, SWT.NONE); fWarning.setImage(ImageFactory.getImage(ImageFactory.IMAGE_WARNING)); GridData gd = new GridData(SWT.RIGHT, SWT.TOP, false, false); gd.widthHint = 32; fWarning.setLayoutData(gd); fWarning.setVisible(fShowWarning); } COM: <s> creates the warning area </s>
funcom_train/4918180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUrl() throws Throwable { final String HOST = "server"; // Obtain the URL this.doMain("--office_building_host server --office_building_port 13778 url"); // Validate output URL String expectedUrl = OfficeBuildingManager .getOfficeBuildingJmxServiceUrl( HOST, OfficeBuildingPortOfficeFloorCommandParameter.DEFAULT_OFFICE_BUILDING_PORT) .toString(); this.assertOut(expectedUrl); this.assertErr(); } COM: <s> ensure able to obtain url </s>
funcom_train/2437834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDoImportAction(Action action) { if (doImportAction != null) { jpBrowser.removeActionListener(doImportAction); jpSearcher.removeActionListener(doImportAction); } if (action != null) { jpBrowser.addActionListener(action); jpSearcher.addActionListener(action); } doImportAction = action; setDefaultUiAction(action); } COM: <s> provides this ui with an code action code that will trigger the actual </s>
funcom_train/45396039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyAttributes(GroovyBuilder builder, ObjectFactoryInterceptor ofi, String nodeName, Object instance, Map<Object, Object> attributes) { ClassMethod apply = this.getAttributeApplicator(instance.getClass()); if (apply != null && attributes != null) apply.invoke(instance, attributes); else if (attributes != null) super.applyAttributes(builder, ofi, nodeName, instance, attributes); } COM: <s> this will see if there is a </s>
funcom_train/34552006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doesSystemLibraryExists(){ try{ java.io.File temp = new java.io.File( org.edu.gces.s2005.projects.frontendformysql.domain.BackEnd.System.SystemInformationDatabase.SystemLibraryName ); return temp.isDirectory(); } catch( Exception e ){ return false; } } COM: <s> this method will check if system library exists or not </s>
funcom_train/2628363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetProperty() { System.out.println("[setProperty]"); AttributesType attrType = new AttributesType(); List<PropertyType> proplist = new ArrayList(); /* Test 1 - setting empty array list */ attrType.setProperty(proplist); assertEquals(attrType.property, proplist); System.out.println("[setProperty |Test 1]- PASSED"); } COM: <s> test of set property method of class attributes type </s>
funcom_train/48704985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(BstEntry context) { if (stack.size() < 2) { throw new VMException("Not enough operands on stack for operation ="); } Object o1 = stack.pop(); Object o2 = stack.pop(); if (o1 == null ^ o2 == null) { stack.push(VM.FALSE); return; } if (o1 == o2) { stack.push(VM.TRUE); return; } stack.push(o1.equals(o2) ? VM.TRUE : VM.FALSE); } COM: <s> pops the top two both integer or both string literals compares </s>
funcom_train/14597157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getStripeNumber(MysqlDataAccessor stripe) { String name = stripe.getStripe(); if (!StringUtil.startsWithIgnoreCase(name, stripePrefix)) { return -1; } String number = name.substring(stripePrefix.length()); try { return Integer.parseInt(number); } catch (NumberFormatException e) { return -1; } } COM: <s> if the stripe name is of the form code stripexxx code where </s>
funcom_train/5864725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newInternalPaging() { assert D.OFF || inPagingMold(): "paging mold only"; assert D.OFF || (_paging == null && _pgi == null); final Paging paging = new Paging(); paging.setAutohide(true); paging.setDetailed(true); paging.setTotalSize(_rows != null ? _rows.getVisibleItemCount(): 0); paging.setParent(this); if (_pgi != null) addPagingListener(_pgi); } COM: <s> creates the internal paging component </s>
funcom_train/19311069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyDocumentComplete() throws FoTreeException { final FoTreeEvent event = new FoTreeEvent(this); for (int i = 0; i < this.foTreeListeners.size(); i++) { final FoTreeListener listener = this.foTreeListeners.get(i); listener.foDocumentComplete(event); } } COM: <s> notify all objects in the fo tree listeners that a document complete </s>
funcom_train/30005280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getTestCaseList() { if (this.testCaseList == null) { this.testCaseList = new JList(new TestExecutionListModel(this.sequence, TestCase.class)); this.testCaseList.setCellRenderer(new TestExecutionListCellRenderer()); this.testCaseList.setBorder(new EtchedBorder()); } return this.testCaseList; } COM: <s> gets the test case list </s>
funcom_train/26335264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTimeString() { int hour = this.getTimeHour(); int min = this.getTimeMinute(); String m = ( hour < 13 ? "am" : "pm" ); if( hour > 12 ) hour -= 12; return hour + ":" + (min<10?"0":"") + min + m; } COM: <s> get time as string </s>
funcom_train/51348206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { if (!open) throw new IllegalStateException(); if(current==null) { throw new IllegalStateException(); } /* * Remove the justifications from the store (note that there is no value * stored under the key). */ ndx.remove(Justification.getKey(keyBuilder, current)); } COM: <s> removes the last </s>
funcom_train/18545602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintArrow(Graphics g, int x2, int y2, int direction){ if (direction==ARROW_DIR_RIGHT) { g.drawLine(x2-4, y2-7, x2-4, y2-1); g.drawLine(x2-3, y2-6, x2-3, y2-2); g.drawLine(x2-2, y2-5, x2-2, y2-3); } } COM: <s> paint the arrow of dependence </s>
funcom_train/25292852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Appearance setupAppearance(Texture2D t2d) { Appearance appearance = getAppearance(); if (appearance == null) { TransparencyAttributes transp = new TransparencyAttributes(); transp.setTransparencyMode(TransparencyAttributes.BLENDED); transp.setTransparency(0f); appearance = new Appearance(); appearance.setTransparencyAttributes(transp); appearance.setTexture(t2d); Material m = new Material(); m.setLightingEnable(false); appearance.setMaterial(m); appearance.setCapability(Appearance.ALLOW_TEXTURE_WRITE); appearance.setCapability(Appearance.ALLOW_TEXTURE_READ); appearance.setCapabilityIsFrequent(Appearance.ALLOW_TEXTURE_READ); }else{ appearance.setTexture(t2d); } return appearance; } COM: <s> creates appearance for this shape3 d </s>
funcom_train/12603064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if (!isConnected()) { error(log, "MultiConnectionThinkGearSocket already disconnected"); return; } info(log, "Stopping MultiConnectionThinkGearSocket"); try { disruptor.shutdown(); closeSocket(); } catch (Throwable e) { error(log, "Unexpected exception on stop", e); } info(log, "MultiConnectionThinkGearSocket stopped"); notifyConnectionEventListeners(State.STOPPED); } COM: <s> closes the connection to the think gear socket </s>
funcom_train/450509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeSelector (Creature creature) { //Generate a tag. RandomCreatureGenerator randomGenerator = new RandomCreatureGenerator(); Tag tag = randomGenerator.createTag(); //Apply a TagCondition with the new tag to all the creature's behaviors. Iterator behaviors = creature.behaviorIterator(); while (behaviors.hasNext()) { Behavior behavior = (Behavior) behaviors.next(); behavior.addCondition(new TagCondition(tag)); } } COM: <s> make a creature act only on creatures with a given tag </s>
funcom_train/23020199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserinfo(String user, String password) throws URIException, NullPointerException { // set the charset to do escape encoding String charset = getProtocolCharset(); setRawUserinfo(encode(user, within_userinfo, charset), (password == null) ? null : encode(password, within_userinfo, charset)); } COM: <s> set the user and password </s>
funcom_train/39044753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExportMenuItem() { JMenuItem exportMenuItem = getItem("EXPORT", fileMenu); if (exportMenuItem == null) { exportMenuItem = new JMenuItem(Language.MENU_FILE_ITEM_EXPORT); exportMenuItem.setName("EXPORT"); exportMenuItem.setIcon(new ImageIcon(Resource.getInstance().loadImage(ImageResourcePath.MENU_EXPORT_ICON))); exportMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { new ExportDialog(); } }); } return exportMenuItem; } COM: <s> this method initializes export menu item </s>
funcom_train/43197135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startsWith(TreePath treePath) { int thisSegmentCount = getSegmentCount(); int otherSegmentCount = treePath.getSegmentCount(); if (otherSegmentCount == thisSegmentCount) { return equals(treePath); } if (otherSegmentCount > thisSegmentCount) { return false; } for (int i = 0; i < otherSegmentCount; i++) { Object otherSegment = treePath.getSegment(i); if (!otherSegment.equals(segments[i])) { return false; } } return true; } COM: <s> returns whether this path starts with the same segments as the given </s>
funcom_train/11533137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gcTaintLog() { long timeoutTimestamp = System.currentTimeMillis() - _taintLogTimeout; Iterator<TaintingHistoryEntry> it = _taintLog.iterator(); while (it.hasNext()) { TaintingHistoryEntry entry = it.next(); if (entry.getTimestamp() < timeoutTimestamp) { it.remove(); } } } COM: <s> garbage collects our tainting data </s>
funcom_train/42337823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveDocumentContent(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException { if (!fIsAboutToSave) return; if (element instanceof IFileEditorInput) { IFileEditorInput input= (IFileEditorInput) element; InputStream stream= new ByteArrayInputStream(document.get().getBytes()); IFile file= input.getFile(); file.setContents(stream, overwrite, true, monitor); } } COM: <s> saves the content of the given document to the given element </s>
funcom_train/28353868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupModel() { List gaps = (theCavity).getGapsAsList(); try{ theModel.setStartNode(((RfGap) gaps.get(0)).getId()); theModel.setStopNode(((RfGap) gaps.get(gaps.size()-1)).getId()); } catch(Exception exc) { System.err.println("Problem setting up cavity in PhaseFinder:" + exc.getMessage()); } } COM: <s> set the model to only run through the specified cavity </s>
funcom_train/46443376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setMouseCursor(Cursor cursor) { super.setMouseCursor(cursor); switch (pcType) { case GANTT_CHART: //set also for all children for (int i = 0; i < getChildCount(); i++) { OpProjectComponent child = (OpProjectComponent) getChild(i); child.setMouseCursor(cursor); } break; } } COM: <s> set the cursor for this component </s>
funcom_train/18749894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AttributeEdge createEdge(Node sourceNode, Map<String, String> attributes, Node targetNode) { if (targetNode == null) { return new AttributeEdge(new Node[] { sourceNode }, new AttributeLabel(attributes)); } else { return new AttributeEdge(new Node[] { sourceNode, targetNode }, new AttributeLabel(attributes)); } } COM: <s> callback factory method to create an attribute edge with given </s>
funcom_train/36613811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postKMeansError(Throwable err) { if (mListeners.size() > 0) { synchronized (mListeners) { int sz = mListeners.size(); for (int i=0; i<sz; i++) { mListeners.get(i).kmeansError(err); } } } } COM: <s> notifies registered listeners that k means has failed because of </s>
funcom_train/12178776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRender() throws Exception { PropertyRenderer renderer = new RuntimeWapInputFormatRenderer(); StyleProperty property = StylePropertyDetails.MCS_INPUT_FORMAT; String expected = "-wap-input-format:\"N*\";"; StyleValue value = StyleValueFactory.getDefaultInstance().getString(null, "N:N*"); checkRender(context, renderer, property, value, expected); } COM: <s> ensure we render the wml validation format </s>
funcom_train/49403492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgramRecords(final List<SAMProgramRecord> programRecords) { this.mProgramRecords = programRecords; this.mProgramRecordMap.clear(); for (final SAMProgramRecord programRecord : this.mProgramRecords) { this.mProgramRecordMap.put(programRecord.getProgramGroupId(), programRecord); } } COM: <s> replace entire list of program records </s>
funcom_train/39378544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(String[] options) { if (options == null) { String msg = "options parameter cannot be null"; throw new IllegalArgumentException(msg); } for (int i = 0; i < options.length; i++) { String value = options[i]; getOptionList().add(new Option(value, value)); } } COM: <s> add the given array of string options to the select option list </s>
funcom_train/4586963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { synchronized (connections) { if (connections.get(address) == this) { // connections.remove(address); connections.put(address, NULL); } } // socket有可能是空的,如果服务端未能正确建立连接的话 if (socket == null) { return; } try { socket.close(); // 关闭SOCKET } catch (IOException e) { } if (log.isDebugEnabled()) { log.debug(getName() + ": closing"); } } COM: <s> close the connection </s>
funcom_train/20099746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkAnswer(String ans) { if(currentQuestion().checkAnswer(ans)) { countGoodAnswer(); if(currentQuestion().canDelete()) { done.add(currentQuestion()); toAsk.remove(currentQuestionNumber); } return true; } else { countWrongAnswer(); return false; } } COM: <s> checks answer and updates internal statistics </s>
funcom_train/51296227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComplexShift createByGroupId(int id) throws ErrorHandler { ComplexShift compPer = new ComplexShift(); compPer.setNew(false); ResultSet res = null; try { res = dba .makeSelect("SELECT * FROM complex_shift_handler WHERE group_id=" + id); while (res.next()) { return create(res.getInt("id")); } } catch (SQLException e) { throw new ErrorHandler(e.getMessage() + ":"); } finally { DBAccessor.getInstance().releaseConnection(res); } return null; } COM: <s> retrieve period that belongs to group specified </s>
funcom_train/13683141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getGeneral() { if (general == null) { descripLabel = new JLabel(); descripLabel.setBounds(new java.awt.Rectangle(50,50,77,20)); descripLabel.setText("Description:"); entNameLabel = new JLabel(); entNameLabel.setText("Name:"); entNameLabel.setBounds(new java.awt.Rectangle(51,15,53,23)); general = new JPanel(); general.setLayout(null); general.setName(""); general.add(entNameLabel, null); general.add(getEntName(), null); general.add(descripLabel, null); general.add(getEntDescScrol(), null); } return general; } COM: <s> this method initializes general </s>
funcom_train/37820427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBranch(NullElem nullElemBegin, NullElem nullElemEnd) { try { actionStack .perform(new AddBranchAction(nullElemBegin, nullElemEnd)); synDiaSystem.notifyObservers(); } catch (Exception e) { mainController.showErrorDialog( Messages.getString("ebnf", "SynDiaEditor.Error_InternalError") + Messages.getString("ebnf", "SynDiaEditor.Error_Appendix"), false); } } COM: <s> adds a branch at the given position </s>
funcom_train/44870376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBottomButton() { if (bottomButton == null) { bottomButton = new JButton(); bottomButton.setMaximumSize(new java.awt.Dimension(47, 26)); bottomButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); bottomButton.setText("Bottom"); bottomButton.setToolTipText("Move to the bottom (back)"); bottomButton.setPreferredSize(new java.awt.Dimension(47, 20)); } return bottomButton; } COM: <s> this method initializes j button1 </s>
funcom_train/51207799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { Dazio.dm.retryCount = 1; if (Dazio.dm.getParameter(RS.PARAM_LOGIN_TYPE).compareTo(RS.keypad) == 0) { displ = new Keypad(0, 0); } else { displ = new PasswordAlfanumView(); } Dazio.d.setCurrent(displ); } COM: <s> start the application leading to the login screen </s>
funcom_train/12832055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnText(final Object element, final int columnIndex) { VerificationResult result = (VerificationResult) element; switch (columnIndex) { case 0: return ""; case 1: return result.getId(); case 2: return result.getType(); case 3: return result.getAlgorithm(); default: return null; } } COM: <s> returns the text for the current column </s>
funcom_train/6494069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedItem( Object item ) { int index = 0; selectedItem = item; if ( list.contains( item ) ) { index = list.indexOf( item ); } fireEvent(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index, index)); } COM: <s> sets the selected item attribute of the file path model object </s>
funcom_train/46220103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Long parseLong(ActionRequest request, String paramName) { Long l = null; if (request.getParameter(paramName) != null && !request.getParameter(paramName).equals("")) { l = Long.parseLong(request.getParameter(paramName)); } return l; } COM: <s> parses an long input field </s>
funcom_train/43391361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sysLog(String txt) { // System.out.println(" " + txt); // if (DEBUG > 0) { // try { //// System.out.println(gridjobdir+" "+txt); // FileWriter tmp = new FileWriter(OutputDir + "/history/sys.log", true); // BufferedWriter out = new BufferedWriter(tmp); // out.newLine(); // out.write(txt); // out.flush(); // out.close(); // } catch (Exception e) { // } // } } COM: <s> creates a log entry in the file std </s>
funcom_train/7456837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void previewAllSymbolAdapters() { ArrayList<PositioningTool> tools = new ArrayList<PositioningTool>(); for (SymbolAdapter adapter : DisplayConfiguration.getInstance().getAdapter()) { tools.addAll(adapter.getTool().getElements()); } PreviewDialog.getInstance().setPositioningtoolsToPaint(tools); PreviewDialog.getInstance().updatePreview(); } COM: <s> method that displays all created symboladpaters in preview dialog </s>
funcom_train/13439529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeMainFrameState(int eventId, int oldState, int newState) { WindowEvent e = new WindowEvent(mainFrame, eventId, oldState, newState); WindowStateListener[] wsl = mainFrame.getWindowStateListeners(); for (int i=0; i<wsl.length; i++) { wsl[i].windowStateChanged(e); } } COM: <s> as the set state method does not invoke the handler do this manually </s>
funcom_train/7798490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertAfter(ASTNode node, ASTNode element, TextEditGroup editGroup) { if (node == null || element == null) { throw new IllegalArgumentException(); } int index= getEvent().getIndex(element, ListRewriteEvent.BOTH); if (index == -1) { throw new IllegalArgumentException("Node does not exist"); //$NON-NLS-1$ } internalInsertAt(node, index + 1, true, editGroup); } COM: <s> inserts the given node into the list after the given element </s>
funcom_train/24147144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Range convertRange(CoordinateSystem coordinateSystem) { if ( coordinateSystem == null ) { throw new NullPointerException("Cannot convert to a null range coordinate system"); } if(coordinateSystem.equals(this.rangeCoordinateSystem)){ return this; } return new Range(this.getStart(),this.getEnd(),coordinateSystem); } COM: <s> create a new range object which represents </s>
funcom_train/9646523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pauseGame() { if (!gameWasStarted) return; boolean isRunning = !snakeModel.isPaused(); if (isRunning) { fireGamePaused(); if (chiefFunction) { shellModifier.shellMinimize(); } } else { fireGameContinued(); } updatePauseButtonLabel(); } COM: <s> handles the pause event </s>
funcom_train/47106596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemWeapon21() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Weapon.W_21.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setPlrReadiedWeapon(Weapon.W_21); } }); return menuItem; } COM: <s> creates the twenty second choice for the weapon menu </s>
funcom_train/19657187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateMultipleRadioDuplicateText() { mockRadioCollection = new MockAbstractRadioCollection("test", new String[] { "hi", "hello", "hi", "test", "test" }); // insure that we only get three (duplicates don't get added). assertEquals(3, mockRadioCollection.size()); } COM: <s> try creating multiple a collection with choices that have duplicates </s>
funcom_train/21184960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layout( IFigure parent ) { // System.err.println( "layout " + parent ); Rectangle rect = parent.getClientArea(); Iterator children = parent.getChildren().iterator(); IFigure f; while ( children.hasNext() ) { f = (IFigure) children.next(); f.setBounds( rect ); } } COM: <s> implements the algorithm to layout the components of the given container figure </s>
funcom_train/46382429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerDataFlavorHandler(DataFlavorHandlerSPI handler) { // For each of the data flavors that are supported by the handler, add // then to the map. If the data flavor is already registered, then // overwrite. DataFlavor flavors[] = handler.getDataFlavors(); if (flavors != null) { for (DataFlavor flavor : flavors) { dataFlavorHandlerMap.put(flavor, handler); } } } COM: <s> registers a data flavor handler spi </s>
funcom_train/10948360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMissingFile() throws Exception { File testFile = new File(getTestDirectory(), "dummy-missing-file.txt"); LineIterator iterator = null; try { iterator = FileUtils.lineIterator(testFile, "UTF-8"); fail("Expected FileNotFoundException"); } catch (FileNotFoundException expected) { // ignore, expected result } finally { LineIterator.closeQuietly(iterator); } } COM: <s> test a missing file </s>
funcom_train/49705764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processInventoryToTabFile(String directoryAsString) throws IOException, ParserConfigurationException, SAXException { log.info("Processing inventory XML to tab file in: " + directoryAsString); File directory = new File(directoryAsString); File output = new File(directoryAsString + "/" + inventoryFilename + indexFileExtension); SimpleXml2Tab inventoryXml2Tab = new SimpleXml2Tab(); inventoryXml2Tab.run(directory, output, inventoryFilename, inventoryElementsOfInterest, "*/record"); } COM: <s> process the inventory to tab file </s>
funcom_train/10522756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleSP() throws Exception { assertNotNull(testCtrl); JdbcControl.SQLParameter[] params = new JdbcControl.SQLParameter[1]; params[0] = new JdbcControl.SQLParameter(new String(), Types.VARCHAR, JdbcControl.SQLParameter.OUT); testCtrl.getExpensiveProduct(params); assertEquals(params[0].value, "foo"); } COM: <s> simple sp which does not do a database query in the sp </s>
funcom_train/14215768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getItemSubTotal(double quantity) { // Debug.logInfo("Price" + getBasePrice() + " quantity" + quantity + " Rental adj:" + getRentalAdjustment() + " other adj:" + getOtherAdjustments(), module); return (getBasePrice() * quantity * getRentalAdjustment()) + getOtherAdjustments(); } COM: <s> returns the total line price </s>
funcom_train/18861237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GlobalForwardsType createGlobalForwards() { GlobalForwardsType element = StrutsConfigFactory.eINSTANCE .createGlobalForwardsType(); StrutsConfigType root = ((ConfigEditor) getPage().getEditor()) .getModelRoot(); Command command = SetCommand.create(getEditingDomain(), root, StrutsConfigPackage.eINSTANCE.getGlobalForwardsType(), element); if (command.canExecute()) { getEditingDomain().getCommandStack().execute(command); } return element; } COM: <s> creates a new global forwards element and adds it to the root element </s>
funcom_train/15914590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDemoKBSearchCategoryInstances() throws Exception { String actualCategoryInstances = navigatorAgentProxy.instances( EXP_CATEGORY ); assertEquals( "failed to find expected instances in search of categories "+EXP_CATEGORY+ ", got \""+actualCategoryInstances+"\" instead of \""+ EXP_CATEGORY_INST+"\"", EXP_CATEGORY_INST, actualCategoryInstances); } COM: <s> test kb search for non existent categories </s>
funcom_train/4283992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypeEndPositionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypedASTNode_typeEndPosition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TypedASTNode_typeEndPosition_feature", "_UI_TypedASTNode_type"), UtilitiesPackage.Literals.TYPED_AST_NODE__TYPE_END_POSITION, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the type end position feature </s>
funcom_train/8088855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canRefine(Rule rule) { if (rule.isEmpty()) { return true; } if (m_best != 0) { if (numValuesInResult() < m_best) { return true; } Rule worstResult = (Rule) m_results.getLast(); if (rule.getOptimistic() >= worstResult.getConfirmation()) { return true; } return false; } else { return true; } } COM: <s> test if it is worth refining a rule </s>
funcom_train/14011049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException { _logger.info("AtomAPI POST Called =====[ SUPPORTED ]====="); _logger.info(" Path: " + httpServletRequest.getPathInfo()); if (isAuthorized(httpServletRequest)) { } else { sendAuthenticationRequired(httpServletResponse); } } COM: <s> handle http post </s>
funcom_train/29367888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResource(RemoteFile srbFile) { String filePath = srbFile.getPath(); StringTokenizer tokens = new StringTokenizer(filePath, "/"); //the zone is the 1st token if(tokens.hasMoreTokens()) { String resource = zoneResources.get(tokens.nextToken()); if(resource != null) { return resource; } } //last ditch effort return getDefaultStorageResource(); } COM: <s> returns the current srb storage resource for a zone determined from the srbfile </s>
funcom_train/4644643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIconPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AttachmentType_icon_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AttachmentType_icon_feature", "_UI_AttachmentType_type"), TassooPackage.Literals.ATTACHMENT_TYPE__ICON, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the icon feature </s>
funcom_train/32767130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCurrentMaxY() { if (zoomGridLimitsV.size() == 0) { if (externalGridLimits == null || externalGridLimits.isSetYmax() == false) { return getInnerMaxY(); } else { return externalGridLimits.getMaxY(); } } else { GridLimits gl = (GridLimits) zoomGridLimitsV.lastElement(); if (gl.isSetYmax() == false) { return getInnerMaxY(); } return gl.getMaxY(); } } COM: <s> returns the current max y attribute of the function graphs jpanel object </s>
funcom_train/50108522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPurge() throws Exception { MockPreparedStatement retrieveStatement = setExpectationsForRetrieve(); MockPreparedStatement purgeStatement = setExpectationsForExecute(get(PURGE_TAG),new Object[] {BLANK_KEY},null); bean.delete(newParametersMap(ONE_ROW)); verifyAll(new MockPreparedStatement[] {retrieveStatement,purgeStatement}); } COM: <s> confirms that a delete statement uses the primary key </s>
funcom_train/42475043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findAllStatement() { return new StringBuilder("SELECT ").append(LIST_COLUMNS) .append(" FROM enzymes WHERE status IN ('OK','PM') AND enzyme_id NOT IN") .append(" (SELECT before_id FROM history_events WHERE event_class = 'MOD')") .append(" ORDER BY ec1, ec2, ec3, status, ec4").toString(); } COM: <s> returns the sql statement used for loading the list of all public enzymes </s>
funcom_train/38414886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabledAt(String primaryKey, boolean value) { for (int i=0; i<tabbedPane.getTabCount();i++) { if ( tabbedPane.getComponentAt(i).getName().equals(primaryKey) ) { tabbedPane.setEnabledAt(i, value); return; } } } COM: <s> to enable disable a chat room </s>
funcom_train/49216807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadLibrary() { String libPathFromProps = System .getProperty(IOfficeApplication.NOA_NATIVE_LIB_PATH); if (libPathFromProps != null) { libPath = libPathFromProps; } if (libPath == null) { System.loadLibrary("nativeview"); } else { if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1) { System.load(libPath + "/nativeview.dll"); } else { System.load(libPath + "/libnativeview.so"); } } } COM: <s> for using of the jni methods its neccessary to load system library which </s>
funcom_train/4116702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDecode1DMode() { doSetDecodeMode(BarcodeFormat.UPC_A, BarcodeFormat.UPC_E, BarcodeFormat.EAN_13, BarcodeFormat.EAN_8, BarcodeFormat.CODE_39, BarcodeFormat.CODE_128, BarcodeFormat.ITF); } COM: <s> select the 1 d formats we want this client to decode by hand </s>
funcom_train/16822997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateColours(FastGeometryBuilder<?, ?> aFastGeometryBuilder) { if (!openGLGeometryBuilderImpl.complete) { throw new IllegalStateException("Updates are not permitted until after the first time the geometry builder has been enabled."); } final IntBuffer coloursAsBuffer = openGLGeometryBuilderImpl.coloursAsBuffer; coloursAsBuffer.position(coloursPositionInBuffer); coloursAsBuffer.put(((FastGeometryBuilderImpl<?, ?>) aFastGeometryBuilder).colours); coloursAsBuffer.position(0); } COM: <s> updates the colours associated with this geometry </s>
funcom_train/50062170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSegments(String segs) { if (segs == null) return; if (!hasDecoders()) encoders = extractEncoding(segs); if (!hasDecoders()) setDefaultEncoding(); String[] segmentStrings = segs.split(SEGMENT_TERMINATOR); int segmentCount = segmentStrings.length; for (int index = 0; index < segmentCount; ++index) { addSegment(new HL7Segment(segmentStrings[index], encoders)); } // for } // addSegments COM: <s> adds the segments contained in the argument string object to the context </s>
funcom_train/31688519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPageId() { NodeList xnlPage = getElementsByTagName(PageBinding.TAG_PAGE); int nId = -1; if (xnlPage.getLength() > 0) { String sId = ((Element) xnlPage.item(0)).getAttribute(HarmoniseObjectBinding.ATTRIB_ID); if(sId != null && sId.length() > 0) { nId = Integer.parseInt(sId); } } return nId; } COM: <s> returns the page id from state </s>
funcom_train/2804496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSetPromptCallback() { String key = controller.selectResource(((StrInputPane)getManagedComponent()).promptKey.getKey()); if (key != null) { ((StrInputPane)getManagedComponent()).promptKey = new ResKey(key); } } COM: <s> obtain a prompt string resource from the user </s>
funcom_train/42012654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJBGenerarFactura() { if (jBGenerarFactura == null) { jBGenerarFactura = new JButton(); jBGenerarFactura.setText("GENERAR FACTURA ..."); jBGenerarFactura.setActionCommand("Generar"); jBGenerarFactura.setIcon(new ImageIcon(getClass().getResource("/iconos/accept.png"))); jBGenerarFactura.addActionListener(this); } return jBGenerarFactura; } COM: <s> this method initializes j bgenerar factura </s>
funcom_train/3712077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAsXML (XmlDocument document, ElementNode parent) { ElementNode element = (ElementNode) document.createElement(LOGARITHM_ATTRIBUTE); XMLUtilities.BuildDOMElement (document, element, LOG10_FLAG, String.valueOf(isLog10())); parent.appendChild (element); } COM: <s> saves the logarithm in a xml document </s>
funcom_train/46458596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStroke(BasicStroke stroke) { if (stroke == null) return; this.stroke = new BasicStroke(stroke.getLineWidth(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 8, stroke.getDashArray(), stroke.getDashPhase()); } COM: <s> overrides tpoint set stroke method </s>
funcom_train/34141036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFixWhitespace() throws Exception { parse("<tag>Hello,</tag><tag>world!</tag>"); assertEquals("Hello, world!", mHandler.getOutput()); parse("<tag>Hello,</tag> <tag>world!</tag>"); assertEquals("Hello, world!", mHandler.getOutput()); } COM: <s> content should have a space inserted if necessary to preserve separation </s>