__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4547737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntFrag(Memory usedMemory) { if (usedMemory.getMemoryAreaTotaSize() == 0) // If no memory areas are used, there is no internal fragmentation. return 0; else { return (int) ((usedMemory.getMemoryAreaTotaSize() - usedMemory.getMemoryAreaTotalUsedSize()) * 100 / usedMemory.getMemoryAreaTotaSize()); } } COM: <s> returns the internal fragmentation of memory as a percentage </s>
funcom_train/25649365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetName() { System.out.println("getName"); LanguageVariant instance = null; try { instance = LanguageVariantFactory.getVariant("English"); } catch (IOException ex) { ex.printStackTrace(); } String expResult = "English"; String result = instance.getName(); assertEquals(expResult, result); } COM: <s> test of get name method of class com </s>
funcom_train/44166299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRightColumns(int y) { int rightColumns = rightSpace / tileWidth + 1; if ((y % 2) == 0) { if ((rightSpace % tileWidth) == 0) { rightColumns--; } } else { if ((rightSpace % tileWidth) > 32) { rightColumns++; } } return rightColumns; } COM: <s> returns the amount of columns that are to the right of the tile </s>
funcom_train/29977588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBatchJobPriorityComparatorHandlesNull() { int result; BatchJobPriorityComparator bjpc = new BatchJobPriorityComparator(); Dummy d = new Dummy(); result = bjpc.compare(null, null); assertEquals(result, 0); result = bjpc.compare(d, null); assertTrue(result < 0); result = bjpc.compare(null, d); assertTrue(result > 0); } COM: <s> in the unlikely event that null is passed to the </s>
funcom_train/9876803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSize() { Graphics2D g = (Graphics2D)getGraphics(); this.maxGeneNameWidth = getMaxWidth(g, true); this.maxUniqueIDWidth = getMaxWidth(g, false); int width = 20+this.maxGeneNameWidth+this.maxUniqueIDWidth; int height = this.elementHeight*this.rowsOrder.length+1; setSizes(width, height); } COM: <s> updates the bar sizes </s>
funcom_train/35921187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String key(Date d) { Calendar c = Calendar.getInstance(); c.setTime(d); return ""+c.get(c.YEAR)+c.get(c.MONTH)+c.get(c.DAY_OF_MONTH); //return ""+d.getYear()+d.getMonth()+d.getDate(); //return new String(d.toString()); } COM: <s> this function return the key to be used in the hashtable </s>
funcom_train/10496952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QuoteDataBean createQuote(String symbol, String companyName, BigDecimal price) throws Exception { if (Log.doActionTrace()) Log.trace("TradeAction:createQuote", symbol, companyName, price); QuoteDataBean quoteData; quoteData = trade.createQuote(symbol, companyName, price); return quoteData; } COM: <s> given a market symbol price and details create and return a new </s>
funcom_train/9279796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String bytesToString(byte[] ba) { if (ba == null) return null; StringBuffer s = new StringBuffer(); for (int i = 0; i < ba.length; ++i) { s.append(Integer.toHexString(ba[i] & 0x00ff)); } return s.toString(); } COM: <s> helper method to convert byte array to string </s>
funcom_train/41738908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectWith(IPass pass) throws IOException { //logger.setLevel(Level.DEBUG); IConnectionFactory conFactory = ConnectionFactory.getInstance(); //if(!passes.contains(pass)) // passes.add(pass); if(pass == null) throw new IOException("Unable to connect: pass is null"); logger.debug("mirror " + name + " looking for connection"); conn = conFactory.getConnection(pass); conn.connect(); pass.setActive(true); online = true; this.pass = pass; // keep the good pass at hand lastVisit = checkinTime; } COM: <s> attempt to connect to this mirror using a specific pass </s>
funcom_train/48337039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestCase initializeTestCase(int widgetNum){ Random random = Randomer.getInstance(); //2008/7/10: length couldn't be 0, maybe it can be 0. while(length == 0 ) length = random.nextInt(10); for(int i = 0; i < length; i ++){ addElement(new ContextEvent(random.nextInt(widgetNum), random.nextInt(3))); } return this; } COM: <s> test case is a event sequence in fact which consists of </s>
funcom_train/48706080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildObject(String prepend, HttpServletRequest request, StringBuilder builder, Configuration configuration, SimpleRegistry registry) { ToStringBuilderAppenderUtils.appendInstanceInformation(request, builder, configuration); builder.append(" "); builder.append("{"); builder.append(SystemUtils.LINE_SEPARATOR); buildObjectInternal(prepend + " ", request, builder, configuration, registry); builder.append(prepend); builder.append("}"); } COM: <s> build request object </s>
funcom_train/50427922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if ((owner != null)&& (this.name!=null)) owner.rename(this.name, name); this.name = name; if (getLabel() == null || getLabel().equalsIgnoreCase("<Null vertex>")) setLabel(name); } COM: <s> set the node name </s>
funcom_train/14163879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(String ipAddress) { JdbcTemplate jdbc = new JdbcTemplate(ds); Object[] args = new Object[1]; args[0] = ipAddress; String name = null; try { name = (String) jdbc.queryForObject("SELECT name FROM \"user\" WHERE ipaddress = ?", args, String.class); } catch (EmptyResultDataAccessException ex) { name = ""; } return name; } COM: <s> get the name of the user for the associated ip address </s>
funcom_train/35674862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenArrayssm() throws Exception { ICobolComplexBinding ce = getComplexBinding("arrayssm", "Dfhcommarea"); ICobolArrayComplexBinding ca = (ICobolArrayComplexBinding) ce .getChildrenList().get(1); genSource("arrayssm", ca); check("arrayssm", "TableComplexWrapperBinding.java"); } COM: <s> a complex array type case </s>
funcom_train/5075302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isEmpty(File dir) { File[] list = dir.listFiles(); for (int i = 0; i < list.length; i++) { if (list[i].isFile()) { return false; } else if (!isEmpty(list[i])) { return false; } } return true; } COM: <s> checks if the directory is empty </s>
funcom_train/37468900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnd( Integer end ) { if ( end != null ) { if ( start != null && start > end ) { throw new IllegalArgumentException( "End (" + end + ") must be greater than start (" + start + ") !" ); } if ( end < 1 ) { throw new IllegalArgumentException( "End must be 1 or greater." ); } } this.end = end; } COM: <s> sets end range of the splice variant </s>
funcom_train/2919617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StateCluster build_Set(IntSet set) { //NFAState start = newState(); NFAState left = newState(); //transitionBetweenStates(start, left, Label.EPSILON); NFAState right = newState(); Transition e = new Transition(new Label(set),right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; } COM: <s> from set build single edge graph o o set o </s>
funcom_train/1714158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ColorModel createColorModel( int bpc ) throws IOException { int[] nbBits = { bpc, bpc, bpc }; ComponentColorModel componentColorModel = new ComponentColorModel( createColorSpace(), nbBits, false, false, Transparency.OPAQUE, DataBuffer.TYPE_BYTE ); return componentColorModel; } COM: <s> create a java color model for this colorspace </s>
funcom_train/13646847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteKeystoreEntry( String alias ) throws Exception{ if( this.getKeystore() == null ){ //internal error, should not happen this.getLogger().severe( "deleteKeystoreEntry: Unable to delete entry, keystore is not loaded."); return; } this.getKeystore().deleteEntry( alias ); this.rereadKeystoreCertificates(); } COM: <s> deletes an entry from the actual keystore </s>
funcom_train/6408357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGeometry(int circleSamples, int radialSamples, float innerRadius, float outerRadius) { this.circleSamples = circleSamples; this.radialSamples = radialSamples; this.innerRadius = innerRadius; this.outerRadius = outerRadius; setGeometryData(); setIndexData(); } COM: <s> rebuilds this torus based on a new set of parameters </s>
funcom_train/47491151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectToWatch(String connectIP, int connectPort, Platform plat) { Connection con = new ConnectionImpl(); try { con.connect(connectIP, connectPort); } catch (SocketTimeoutException e) { // TODO Retry transmitt e.printStackTrace(); } catch (IOException e) { // TODO Retry transmit e.printStackTrace(); } outConnections.add(con); connectionOfOuts.put(plat, con); } COM: <s> connecter til en watch </s>
funcom_train/13717666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFirstSourceRange() { System.out.println("testGetFirstSourceRange"); // Test whether Source ranges are stored according to // first location. SourceRanges srs = new SourceRanges(A12A21); srs.add(A11A22); Assert.assertEquals(srs.getFirstSourceRange(), A11A22); Assert.assertEquals(srs.getFirstSourceRange(), A11A22); } COM: <s> test of get first source range method of class be </s>
funcom_train/16147125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent evt) { startButton.setEnabled(false); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); //Instances of javax.swing.SwingWorker are not reusuable, so //we create new instances as needed. task = new Task(); task.addPropertyChangeListener(this); task.execute(); } COM: <s> invoked when the user presses the start button </s>
funcom_train/3380496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setFillMode(int fillRule) { switch (fillRule) { case FILL_EVEN_ODD: mFillOpStr = EVEN_ODD_FILL_STR; mClipOpStr = EVEN_ODD_CLIP_STR; break; case FILL_WINDING: mFillOpStr = WINDING_FILL_STR; mClipOpStr = WINDING_CLIP_STR; break; default: throw new IllegalArgumentException(); } } COM: <s> set the current path rule to be either </s>
funcom_train/14282669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushVariable(String varName, String varType, String varValue) throws JerbilException { if (varName == null || !varName.startsWith("$")) { throw new JerbilException("Variables must begin with $:" + varName); } Utils.checkValueOfType(varValue, varType); variableBindings.put(varName, new Variable(varType, varValue)); } COM: <s> creates a variable at run time </s>
funcom_train/25290085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlanes(Vector4d[] planes) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_PLANE_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("ModelClip2")); if (isLive()) ((ModelClipRetained)this.retained).setPlanes(planes); else ((ModelClipRetained)this.retained).initPlanes(planes); } COM: <s> sets the clipping planes of this model clip node to the </s>
funcom_train/44223031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean existGraphicGroup(int groupID){ boolean isExist = false; for(int i = 0; i < this.graphicGroups.calculateSize(); i++){ GraphicObjectGroup gog = (GraphicObjectGroup)this.graphicGroups.readByNumber(i); if(gog.get_groupID() == groupID){ isExist = true; break; } } return isExist; } COM: <s> check the existence of the graphic group with the input group id </s>
funcom_train/50022466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMatchingColors(RGB initial) { RGB[] colors = Matcher.sixColors(initial); for (int i = 0; i < Math.min(colors.length, spots.length); i++) { spots[i].setRGB(colors[i]); } rgbField.setText(colors[0].toString()); } COM: <s> calculates six matching colors and sets </s>
funcom_train/29288135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSelection(List parts) { connections = new ArrayList(); paths = 0; components = 0; notes = 0; for (int i=0; i<parts.size(); i++) { if (parts.get(i) instanceof PathNodeEditPart) paths++; if (parts.get(i) instanceof ComponentEditPart) components++; if (parts.get(i) instanceof NoteEditPart) notes++; if (parts.get(i) instanceof AbstractConnectionEditPart) connections.add(parts.get(i)); } } COM: <s> count the number of selected edit parts of each kind </s>
funcom_train/24463405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void wrapAndRethrowException(Exception exception) throws ObjectCreationException { String message = "Failed to instantiate object of type [" + clazz.getName() + "] due to " + exception.getClass().getSimpleName() + "."; log.debug("wrapAndRethrowException: " + message + " Throw ObjectCreationException.", exception); throw new ObjectCreationException(message, exception); } COM: <s> wraps the specified exception within an object creation exception and throws it </s>
funcom_train/25491945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LandTile getLandTile(byte[] data, int offset) { LandTile tile = new LandTile(); int flags = getIntValue(data, offset); // for water tiles this seams to be 0 // TODO How to handle water tiles? short textureId = getShortValue(data, offset + 4); String tileName = getString(data, offset + 6, 20).trim(); tile.setFlags(flags); tile.setTextureId(textureId); tile.setName(tileName); return tile; } COM: <s> converts the given data into a land tile object starting at the given </s>
funcom_train/10209440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeConnection() throws IOException { Message message = new Message(new CloseCommandGenerator()); message.writeToStream(this.outputStream); while(true) { message = Message.readFromStream(this.inputStream); for(Command command : message.getCommands()) { if(command.getId() == CloseCommandGenerator.ID) { this.connected = false; return; } } } } COM: <s> closes the socket connection to sumo </s>
funcom_train/35329767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enlargeIfNeeded(int n) { int neededSize = components.length ; while (componentCount + n > neededSize) { neededSize = neededSize * 2 ; } if (neededSize > components.length) { long[] newComponents = new long[neededSize] ; for (int i = 0 ; i < components.length ; i++) { newComponents[i] = components[i] ; } components = newComponents ; } } COM: <s> checks if there is enough space in the components </s>
funcom_train/11688691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { if (initialzed) { if (log.isDebugEnabled()) { log.debug("Shutting down priority executor" + (name != null ? ": " + name : "")); } executor.shutdown(); try { executor.awaitTermination(100, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { log.error("Failed to Shut down Executor"); } initialzed = false; } } COM: <s> destroy the executor </s>
funcom_train/35725495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stepOn() { int[] newPos = new int[2]; int newWay; if (direction == 0) { newWay = -1; } else newWay = 1; newPos[0] = position[0] + newWay; newPos[1] = position[1]; map.remove(this, position); map.put(this, newPos); } COM: <s> the lemming steps forward in old direction </s>
funcom_train/20427086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColor(){ if(_name.contains("A")){ return Color.argb(75, 255, 255, 250); }else if(_name.contains("B")){ return Color.argb(75, 225, 225, 225); }else if(_name.contains("C")){ return Color.argb(75, 195, 195, 195); }else if(_name.contains("D")){ return Color.argb(75, 165, 165, 165); }else if(_name.contains("E")){ return Color.argb(75, 135, 135, 135); }else if (_name.contains("F")){ return Color.argb(75, 105, 105, 105); }else{ return Color.argb(75, 75, 75, 75); } } COM: <s> gets the color to display this chord as in the ui </s>
funcom_train/40439024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JsArrayString toJsniArray(Object[] array) { if (array == null) { return null; } JsArrayString jsArray = (JsArrayString) JsArrayString.createArray(); for (int i = 0; i < array.length; i++) { Object value = array[i]; jsArray.set(i, value == null ? null : value.toString()); } return jsArray; } COM: <s> converts a java array to a js array string </s>
funcom_train/37052981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void heapInsert(Object key){ add(key); int i = size(); if(i < 1){ i = 1; } while(i > 1 && comp.compare(newGet(parent(i)), key) == -1){ newSet(i, newGet(parent(i))); i = parent(i); } newSet(i, key); } COM: <s> insert an item and place it appropriately by adding a new </s>
funcom_train/17585408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getElapsedTime() throws SlimConnectionException { return (int) Double.parseDouble(getSlimServer().sendCommand( SLIM_PROP_PLAYER_TIME_QUERY.replaceAll(PARAM_PLAYER_ID, getId()))[0].split("\\\\.")[0]); } COM: <s> returns the time of the currently playing song </s>
funcom_train/18894950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPredicateString(NamespaceMap namespaces) throws GraphException { if (namespaces == null) { throw new IllegalArgumentException("NamespaceMap is null"); } assert predicate != null : "Predicate is null"; assert predicate.getURI() != null : "Predicate should have an URI"; return namespaces.replaceNamespace(predicate.getURI().toString()); } COM: <s> utility method for getting the predicate with namespaces substituted </s>
funcom_train/20879183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(String message) { // do an initial setup for this instance to determine if debugging is // on for the class. Only runs once. For some reason this doesn't work // if placed in the constructor... if (classDebug == null) { setupDebugging(); } if (classDebug.intValue() == ON) { System.err.println("DEBUG: " + caller + " - " + message); } } COM: <s> this method evaluates whether debugging for the class to which the object </s>
funcom_train/18589943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollListTo(int pos) { if(pos < 0) pos = 0; if(pos >= songsList.getRowCount()) pos = songsList.getRowCount() - 1; Rectangle cell=songsList.getCellRect(pos,0,true); songsList.scrollRectToVisible(cell); } COM: <s> scrolls the playlist table so that the specified index row number is visible </s>
funcom_train/18703134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Text createTextField(Composite parent) { Text text = new Text(parent, SWT.SINGLE | SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.verticalAlignment = GridData.CENTER; data.grabExcessVerticalSpace = false; data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; text.setLayoutData(data); return text; } COM: <s> creates an input text field </s>
funcom_train/644418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLastRightParenthesisIndex(String input) { int length = input.length(); String currentChar; for (int i = 0; i < length; i++) { currentChar = String.valueOf(input.charAt(length - 1 - i)); if (currentChar.equals(")")) { return length - 1 - i; } } return -1; } COM: <s> returns the index of the last right parenthesis </s>
funcom_train/3814435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void put(WordSequence wordSequence, float logProb, float logBackoff) { // System.out.println("Putting " + wordSequence + " p " + logProb // + " b " + logBackoff); map.put(wordSequence, new Probability(logProb, logBackoff)); } COM: <s> puts the probability into the map </s>
funcom_train/44106507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsMap() { TemplateAdapter templateAdapter = new TemplateAdapter(); templateAdapter.put("foo", "bar"); assertTrue("A template adapter must implement a map interface!", templateAdapter instanceof Map); assertTrue(templateAdapter instanceof Map); assertEquals("bar", templateAdapter.adapt("foo")); } COM: <s> a template adapter must be a map </s>
funcom_train/18136061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConnectedByInputPortTo(Task task) { boolean connectionFound = false; Iterator<InputPort> inputPortIterator = getAllInputPorts().iterator(); while (inputPortIterator.hasNext() && !connectionFound) { InputPort currentInputPort = inputPortIterator.next(); Iterator<OutputPort> outputPortIterator = task.getAllOutputPorts() .iterator(); while (outputPortIterator.hasNext() && !connectionFound) { connectionFound = currentInputPort .isConnectedTo(outputPortIterator.next()); } } return connectionFound; } COM: <s> method for checking whether this task is connected to a task from its </s>
funcom_train/18739033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BasicEvent createSimpleEvent(SystemRecord record) { assert hasRule(); if (record == null) { return new BasicEvent(getRule(), getPatternMap(), Reuse.NONE); } else { return record.createSimpleEvent(getRule(), getPatternMap()); } } COM: <s> callback factory method to create a simple event </s>
funcom_train/12213550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDimension(String identifier) { int sDim; Symb s = searchSymbol(identifier); int d = 0; String name = identifier; int i = identifier.indexOf("["); if(i > 0) name = identifier.substring(0,i); while ((i = identifier.indexOf("[")) > 0){ identifier = identifier.substring(i); d++; } sDim = s.getDimension(); if(sDim == -1){ s.setDimension(d); } else if(sDim != d) System.out.println("Error: La dimension de " + identifier + " no corresponde"); } COM: <s> set the symbols array dimension </s>
funcom_train/4495950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); jLabel.setText("ProgressBarLabel"); jLabel.setBounds(new Rectangle(5, 10, 281, 21)); jLabel.setHorizontalAlignment(SwingConstants.LEFT); jPanel = new JPanel(); jPanel.setLayout(null); jPanel.add(getJProgressBar(), null); jPanel.add(getJButton(), null); jPanel.add(jLabel, null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/11371249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void opBlockChecksum(DataInputStream in) throws IOException { OpBlockChecksumProto proto = OpBlockChecksumProto.parseFrom(vintPrefixed(in)); blockChecksum(fromProto(proto.getHeader().getBlock()), fromProto(proto.getHeader().getToken())); } COM: <s> receive op block checksum </s>
funcom_train/31018585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntry(Object child, Object parent) { if (child != null) { Object previous = null; if (child instanceof TreeNode) { previous = ((TreeNode) child).getParent(); if (!(child instanceof Port)) changeChildCount(previous, -1); if (previous != null) changedNodes.add(previous); } entries.add(new Entry(child, parent)); if (!(child instanceof Port)) changeChildCount(parent, 1); // Update Changed Nodes changedNodes.add(child); if (parent != null) changedNodes.add(parent); } } COM: <s> set code parent code of code child code in the parent map </s>
funcom_train/51658650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (!fDisposed) { fDisposed= true; setEnabled(false); disposeInformationControl(); if (fSubjectControl != null && !fSubjectControl.isDisposed() && fSubjectControlDisposeListener != null) fSubjectControl.removeDisposeListener(fSubjectControlDisposeListener); fSubjectControl= null; fSubjectControlDisposeListener= null; fIsCustomInformationControl= false; fCustomInformationControlCreator= null; fInformationControlCreator= null; fInformationControlCloser= null; } } COM: <s> disposes this manager and if necessary all dependent parts such as </s>
funcom_train/652621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { IDocument document = getDocument(); JSSyntaxModelFactory factory = JSSyntaxModelFactory.getInstance(); JSElementList model = factory.getContentOutline(document); if (model != null) { TreeViewer viewer = getTreeViewer(); if (viewer != null) { Control control = viewer.getControl(); if ((control != null) && !control.isDisposed()) { control.setRedraw(false); viewer.setInput(model); viewer.expandAll(); control.setRedraw(true); } } } } COM: <s> forces the outline page to update its contents </s>
funcom_train/21015812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getAboutMenuItem() { if (aboutMenuItem == null) { aboutMenuItem = new JMenuItem(); aboutMenuItem.setText("About"); aboutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(SwingDraft.this.getFrame(),"Sweet Home 3D Draft\nCopyrights 2006 eTeks","About",JOptionPane.PLAIN_MESSAGE); } }); } return aboutMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/1131625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play() { if (instance == null) return; // update status setPP(!pause); if (!instance._isRunning() && !pause) { // set up all robots for the run for (SimRobot bot : env.getRobots()) bot.reset(); clearLCD(); // run user code Thread pRun = new Thread(Simulator.this); pRun.setPriority(Thread.MAX_PRIORITY - 1); pRun.setName("User Code Run"); pRun.start(); } } COM: <s> runs or pauses the program </s>
funcom_train/28344889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCavAmpAvg() throws ConnectionException, GetException { cavAmpAvgC = this.lazilyGetAndConnect(CAV_AMP_AVG_HANDLE, cavAmpAvgC); final double amplitudeAverage = toCavAmpAvgFromCA( cavAmpAvgC.getValDbl() ); publishAmplitude( amplitudeAverage ); return amplitudeAverage; } COM: <s> get the cavity amplitude k v </s>
funcom_train/46744561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsertUserRef(DisplayModel insertUserRef) { if (Converter.isDifferent(this.insertUserRef, insertUserRef)) { DisplayModel oldinsertUserRef= new DisplayModel(this); oldinsertUserRef.copyAllFrom(this.insertUserRef); this.insertUserRef.copyAllFrom(insertUserRef); setModified("insertUserRef"); firePropertyChange(String.valueOf(CENSUS_INSERTUSERREFID), oldinsertUserRef, insertUserRef); } } COM: <s> visit that created this record </s>
funcom_train/50772773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIndentOfLine(IDocument document, int line) throws BadLocationException { if (line > -1) { int start= document.getLineOffset(line); int end= start + document.getLineLength(line) - 1; int whiteend= findEndOfWhiteSpace(document, start, end); return document.get(start, whiteend - start); } else { return ""; //$NON-NLS-1$ } } COM: <s> returns the string at line with the leading whitespace removed </s>
funcom_train/42901905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AudioInputStream getAudioInputStream(InputStream inputStream, int medialength) throws UnsupportedAudioFileException, IOException { AudioFileFormat audioFileFormat = getAudioFileFormat(inputStream, medialength); return new Ccitt2PcmAudioInputStream(inputStream, audioFileFormat.getFormat(), audioFileFormat.getFrameLength()); } COM: <s> obtains an audio input stream from the input stream provided </s>
funcom_train/26629537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIndexExistingIngredient() { // get all ingredients, and index one of them RecipeBiz recipeBiz = getRecipeBiz(); List<Ingredient> ingredients = recipeBiz.getAvailableIngredients(); assertTrue("At least 1 ingredient must be present", ingredients.size() > 0); Ingredient ingredient = ingredients.get(0); RecipeSearchIndexBiz indexBiz = getRecipeSearchIndexBiz(); indexBiz.indexIngredient(ingredient.getIngredientId()); snooze(2); } COM: <s> test indexing existing ingredient </s>
funcom_train/12158185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AttributeGroupReference getAttributeGroupReference (String name) { if (enclosingScope != null) { return enclosingScope.getAttributeGroupReference (name); } AttributeGroupReference reference = (AttributeGroupReference) attributeGroupReferences.get (name); if (reference == null) { reference = createAttributeGroupReference (name); attributeGroupReferences.put (name, reference); } return reference; } COM: <s> get an code attribute group reference code to the specified name </s>
funcom_train/26103287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupMessages(Bundle b, boolean newIntent) { // Store bundle bundle = b; // Create message from bundle SmsMmsMessage message = new SmsMmsMessage(getApplicationContext(), bundle); smsPopupPager.addMessage(message); if (!newIntent) { // TODO: move off UI thread smsPopupPager.addMessages(SmsPopupUtils.getUnreadMessages(this, message.getMessageId())); } // mSmsPopups.refreshPrivacy(); } COM: <s> setup messages within the popup given an intent bundle </s>
funcom_train/8354347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WriteFuture stopSsl(IoSession session) throws SSLException { SslHandler handler = getSslSessionHandler(session); NextFilter nextFilter = (NextFilter) session.getAttribute(NEXT_FILTER); WriteFuture future; synchronized (handler) { future = initiateClosure(nextFilter, session); } handler.flushScheduledEvents(); return future; } COM: <s> stops the ssl session by sending tls tt close notify tt message to </s>
funcom_train/3862115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Element configNode) throws SperowiderInstantiationException { if (configNode == null) { cFileRoot = null; } else { cFileRoot = configNode.getAttributeValue("fileroot"); } if (cFileRoot == null) { cFileRoot = System.getProperty("user.dir") + File.separator; } } COM: <s> initializes the location of the files </s>
funcom_train/22184734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mergeIncomingEmailSets (BufferedEmailSet emailSet, Set edges) { for (Iterator iter = edges.iterator(); iter.hasNext();) { EmailEdge tempEdge = (EmailEdge) iter.next(); if (tempEdge.getDest() == vertex) { BufferedEmailSet tempSet = tempEdge.getEmailSet(); emailSet.addAll(tempSet); } } } COM: <s> iterates over all edges and adds the emails of incoming edges to the </s>
funcom_train/35675088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJvmqueryWs() throws Exception { jaxbgen("ws.jvmquery", new File(COB_XSD_DIR, "jvmquery-ws.xsd"), true, 1L, true, null, null, null, null, false, false); check("ws.jvmquery"); } COM: <s> the jvmquery web service case </s>
funcom_train/50299504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParameterMetaData getParameterMetaData() throws SQLException { statementListener.executionStarted(this); Object syncObject = getSynchronizationObject(); synchronized(syncObject) { try { prepareFixedStatement(procedureCall.getSQL(selectableProcedure), true); } catch (GDSException ge) { throw new FBSQLException(ge); } } return new JDBC30ParameterMetaData(fixedStmt.getInSqlda().sqlvar, gdsHelper); } COM: <s> retrieves the number types and properties of this </s>
funcom_train/12652513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPostalCode(Long postalCode) { // Do nothing if null or not changing if ((postalCode == null) || postalCode.equals(getPostalCode())) return; logger.debug("Setting zip code to sort trials to #0", postalCode); getTrials().setPostalCodeGeocoding(postalCode.intValue(), postalCodeManager.getPostalCodeGeocoding(postalCode.intValue()).getGeocoding()); } COM: <s> stores the users postal code and clears the list of sorted trials </s>
funcom_train/39295002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getImage(Object object) { BusinessElement businessElement = (BusinessElement)object; String bmlPackage = businessElement.getPackage(); bmlPackage = bmlPackage.substring(bmlPackage.lastIndexOf(".") + 1); bmlPackage = bmlPackage.substring(0,bmlPackage.lastIndexOf("$")); return getResourceLocator().getImage("full/obj16/" + bmlPackage); //return getResourceLocator().getImage("full/obj16/BusinessElement"); } COM: <s> this returns business element </s>
funcom_train/10749869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetThreadGroup1() { ThreadGroup tg = new ThreadGroup("group1"); Thread t = new Thread(tg, "t1"); ThreadGroup threadGroup = t.getThreadGroup(); assertEquals("incorrect value returned by getThreadGroup()", tg, threadGroup); } COM: <s> get the thread group of a thread created in the specified thread group </s>
funcom_train/8132556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(Object dataObject) { // go through children and pass them the data for (ICompoundLifecycleElement element : cycleElements ) { if( !(element instanceof org.webguitoolkit.ui.controls.table.Table ) ) element.loadFrom(dataObject); } fireServerEvent(new ServerEvent(this, EVENT_COMPOUND_LOAD )); } COM: <s> load the data object into the context to transport it to the client </s>
funcom_train/29617673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisTextField getJElevationField() { if (jElevationField == null) { jElevationField = new MgisTextField(); jElevationField.setFieldType(MgisTextField.FIELDTYPE_NUMERIC); jElevationField.setDocument(jElevationField.new JTextFieldLimit(4, false)); jElevationField.setBounds(12, 216, 45, 19); } return jElevationField; } COM: <s> this method initializes jion field </s>
funcom_train/33726886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serialize(Output output) throws IOException { Serializer serializer = new Serializer(); Map<String, Object> persistentAttributes = new HashMap<String, Object>(); for (String name : attributes.keySet()) { if (name.startsWith(IPersistable.TRANSIENT_PREFIX)) { continue; } persistentAttributes.put(name, attributes.get(name)); } serializer.serialize(output, persistentAttributes); } COM: <s> serializes byte buffer output storing them to attributes </s>
funcom_train/3394939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runContributingProcs(RoundEnvironment re) { if (!onProcInterator) { Set<TypeElement> emptyTypeElements = Collections.emptySet(); while(innerIter.hasNext()) { ProcessorState ps = innerIter.next(); if (ps.contributed) callProcessor(ps.processor, emptyTypeElements, re); } } } COM: <s> run all remaining processors on the proc state list that </s>
funcom_train/23271875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireLegendClickEvent(LegendClickEvent event) { Object[] listeners = this.listeners.getListeners( LegendClickListener.class); for (int i = listeners.length - 1; i >= 0; i -= 1) { ((LegendClickListener) listeners[i]).onLegendClick(event); } } COM: <s> fires a legend click event </s>
funcom_train/22719082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int graph_center() { GemP p; int c, u, v, w; int h; c = -1; u = -1; h = nodeCount + 1; for (w = 0; w < nodeCount; w++) { v = bfs(w); while (v >= 0 && gemProp[v].in < h) { u = v; v = bfs(-1); } p = gemProp[u]; if (p.in < h) { h = p.in; c = w; } } return c; } COM: <s> returns node for the graph center </s>
funcom_train/37819486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePathHighlighting() { if ((highlightedStart == -1) || (highlightedEnd == -1) || (highlightedInner == -1)) { return; } setLabelColorByState(highlightedStart, highlightedInner, HighlightState.NONE); setLabelColorByState(highlightedInner, highlightedInner, HighlightState.NONE); setLabelColorByState(highlightedInner, highlightedEnd, HighlightState.NONE); } COM: <s> removes the highlighting of the start element inner element and the end </s>
funcom_train/3133326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String language(char[] text, int start, int len) { int mark = start; int size = 0; while(start < len) { char next = text[start]; if(terminal(next)) { return new String(text, mark, size); } size++; start++; } return new String(text, mark, len); } COM: <s> this will extract the primary language tag from the header </s>
funcom_train/28704555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ActionForward getFwd(ActionMapping mapping, UploadCourseForm uploadCourseForm) { ActionForward fwd = new ActionForward(); if ("import".equals(uploadCourseForm.getFirstOp())) { fwd = mapping.findForward("upload"); } else if ("update".equals(uploadCourseForm.getFirstOp())) { fwd = mapping.findForward("update"); } else { fwd = mapping.findForward("home"); } return fwd; } COM: <s> returns the action forward depending in what case is called </s>
funcom_train/8987131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() throws JspException { CommonIndexTag indexTag = (CommonIndexTag)findAncestorWithClass(this, CommonIndexTag.class); DmsDefaultProfileSetting setting = (DmsDefaultProfileSetting)pageContext.getAttribute(indexTag.getId()); ResponseUtils.write(pageContext, setting.getFieldName()); return TagSupport.SKIP_BODY; } COM: <s> starts to render the common index name </s>
funcom_train/48705003
/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 o2 = stack.pop(); Object o1 = stack.pop(); if (!(o1 instanceof String && o2 instanceof String)) { throw new VMException("Can only concatenate two String with *"); } stack.push(((String) o1) + ((String) o2)); } COM: <s> pops the top two string literals concatenates them in reverse </s>
funcom_train/511046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTimeout(Test test, RemoteExecutionInterruptedException ex) { errors.add(new TestFailure(test, ex, TestFailure.Type.TIMEOUT)); for (TestListener listener : cloneListeners()) { listener.addTimeout(test, this, ex); } } COM: <s> adds a timeout to the list of errors </s>
funcom_train/44508448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(javax.crypto.Cipher cipher, int mode, java.security.Key key) { try { cipher.init(mode, key); } catch (InvalidKeyException e) { String msg = "Unable to init cipher."; throw new IllegalStateException(msg, e); } } COM: <s> initializes the jdk cipher with the specified mode and key </s>
funcom_train/14262569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendTargetText(String text, Locale locale) { if (locale == null) { return; // This is a no-op of no locale specified } // If this is a new locale, create a new target if (!tuTargets.containsKey(locale)) { tuTargets.put(locale, new TuTarget()); } tuTargets.get(locale).appendText(text); } COM: <s> append a specified string to the tu target for the specified locale </s>
funcom_train/3847187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean evaluateCondition() { String condition = lineProcessor.evaluateLine(this.condition).trim(); if( condition.equalsIgnoreCase("true") || condition.equalsIgnoreCase("yes") ) return true; else if( condition.equalsIgnoreCase("false") || condition.equalsIgnoreCase("no") ) return false; throw new EvaluationException("Invalid condition : " + condition + ". Evaluated from " + this.condition ); } COM: <s> evaluates the condition to true or false </s>
funcom_train/44885728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConnection( IDBConnection dbcon ) { m_dbcon = dbcon; try { Properties defaultSQL = SQLCache.loadSQLFile(DEFAULT_SQL_FILE, null, ID_SQL_TYPE); m_sql = new SQLCache(SQL_FILE, defaultSQL, dbcon, ID_SQL_TYPE); } catch (Exception e) { e.printStackTrace( System.err ); } } COM: <s> set the database connection </s>
funcom_train/50688403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RestTest headers(Map<String, Object> requestHeaders) { if (this.method == null) { throw new IllegalStateException("Cannot set headers until get, put, post, or delete is called"); } for (Map.Entry<String, Object> entry : requestHeaders.entrySet()) { this.header(entry.getKey(), entry.getValue()); } return this; } COM: <s> sets request headers </s>
funcom_train/24622207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getAttributeFromNode(Node node, String attributeName ) { if ( node.hasAttributes() ) { for ( int i = 0; i < node.getAttributes().getLength(); i++ ) { if ( node.getAttributes().item(i).getNodeName() == attributeName ) { return node.getAttributes().item(i).getNodeValue(); } } } return null; } COM: <s> gets the attribute string of a node </s>
funcom_train/22718408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateSql(int databaseId) { String sql = " " + name + " " + type.generateSql(databaseId) + getDefaultSql(); if (databaseId == DataType.DATABASE_SYB && identity) sql += " IDENTITY"; if (primaryKey) sql += " PRIMARY KEY"; else sql += " " + getNullAllowedS(); return sql; } COM: <s> generates the sql command portion to build this column </s>
funcom_train/28271078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void countryChangeEvent(ValueChangeEvent e) { if( e.getPhaseId() != PhaseId.INVOKE_APPLICATION ){ e.setPhaseId( PhaseId.INVOKE_APPLICATION ); e.queue(); return; } Integer newValue =(Integer) e.getNewValue(); zoneMenu = remote.getZonesMenu(newValue); zoneMenu.add(0,new SelectItem(0,"All Zones")); } COM: <s> country change event </s>
funcom_train/35111867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupFps() { fpsNode = new Node("FPS Node"); fpsText = Text.createDefaultTextLabel("fps", "FPS: " + 0); fpsText.setLocalScale(1.5f); fpsText.setLocalTranslation(10, screenHeight - 10 - fpsText.getHeight(), 0); fpsNode.attachChild(fpsText); // hudNode.attachChild(fpsNode); } COM: <s> init frames per second </s>
funcom_train/19340563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performFinish() { //Database update SpiderNews news = new SpiderNews(); news.setType(type); news.setTitle(title); news.setBody(body); try{ news.save(); NewsTab.getInstance().displayNews(); return true; }catch(SQLException sqle){ sqle.printStackTrace(); return false; } } COM: <s> called when user clicks finish </s>
funcom_train/42848264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(PrintWriter output, int w, int d) { DecimalFormat format = new DecimalFormat(); format.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.UK)); format.setMinimumIntegerDigits(1); format.setMaximumFractionDigits(d); format.setMinimumFractionDigits(d); format.setGroupingUsed(false); print(output,format,w+2); } COM: <s> print the matrix to the output stream </s>
funcom_train/12838051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getFieldVector(String tableName) { if (StringUtils.isBlank(tableName)) { return new Vector(); } Vector fieldVector = null; try { TableAgent ta = getTableAgent(tableName); fieldVector = ta.getFieldNames(); fieldVector.remove(Constants.sfDefaultPrimaryKeyName); } catch (Exception e) { logger.error("Exception", e); return new Vector(); } return fieldVector; } COM: <s> returns a set containing all the field names for a given table with </s>
funcom_train/44484876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImageDescriptor getImageDescriptor(String relativePath) { String iconPath = "icons/full/";//$NON-NLS-1$ try { AbstractUIPlugin plugin = BatikUIPlugin.getDefault(); URL installURL = plugin.getBundle().getEntry("/"); //$NON-NLS-1$ URL url = new URL(installURL, iconPath + relativePath); return ImageDescriptor.createFromURL(url); } catch (MalformedURLException e) { // Should not happen return null; } } COM: <s> returns the image descriptor with the given relative path </s>
funcom_train/3364384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getDisabledIcon(JComponent component, Icon icon) { if ((icon instanceof ImageIcon) && MetalLookAndFeel.usingOcean()) { return MetalUtils.getOceanDisabledButtonIcon( ((ImageIcon)icon).getImage()); } return super.getDisabledIcon(component, icon); } COM: <s> returns an code icon code with a disabled appearance </s>
funcom_train/24312856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialog() { graphScrollPane.setViewportView(currentGraph); // repack because the graph probably changed myDialog.pack(); // set location to be centered // org.webdocwf.util.swingwfapp.Utils.center(myDialog); org.enhydra.jawe.Utils.center(myDialog, 100, 150); // set title setDialogTitle(); myDialog.setVisible(true); } COM: <s> show dialog for editing panel </s>
funcom_train/44609123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMethodDeclArgumentBindingsToo() { final MethodBinding binding = (MethodBinding) this.delegee; final AbstractMethodDeclaration decl = binding.sourceMethodForJml(); if ((decl == null) || (decl.arguments == null)) { return; } for (int i = 0; i < decl.arguments.length; i++) { final Argument argument = decl.arguments[i]; if (argument.binding != null) { argument.binding.jml.setJmlModifiers(getJmlModifiersForParam(i)); } } } COM: <s> requires that this </s>
funcom_train/25938670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* * public void adjustSize(int windowWidth, int windowHeight) { int * scrollWidth = windowWidth - holder.getAbsoluteLeft() - 3; if (scrollWidth * < 1) { scrollWidth = 1; } * * int scrollHeight = windowHeight - holder.getAbsoluteTop() - 3; if * (scrollHeight < 1) { scrollHeight = 1; } * * holder.setPixelSize(scrollWidth, scrollHeight); } COM: <s> adjusts the widgets size such that it fits within the windows client </s>