__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10016547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setup(VFSFileSystemView view) { installShowFilesListener(); if (view == null) { view = VFSFileSystemView.getFileSystemView(); } setFileSystemView(view); updateUI(); if (isAcceptAllFileFilterUsed()) { setFileFilter(getAcceptAllFileFilter()); } enableEvents(AWTEvent.MOUSE_EVENT_MASK); } COM: <s> performs common constructor initialization and setup </s>
funcom_train/47443286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void avoidCollision() { if (eteammate.r < abstract_robot.RADIUS * 1.4) { nextmove.setx(-eteammate.x); nextmove.sety(-eteammate.y); nextmove.setr(MAXSPEED); } else if (eopponent.r < abstract_robot.RADIUS * 1.4) { nextmove.setx(-eopponent.x); nextmove.sety(-eopponent.y); nextmove.setr(MAXSPEED); } } COM: <s> has player avoid a collision </s>
funcom_train/37806153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDownloadingBoardCount() { int downloadingBoards = 0; synchronized( runningDownloadThreads ) { final Iterator<Vector<BoardUpdateThread>> i = runningDownloadThreads.values().iterator(); while( i.hasNext() ) { final Vector<BoardUpdateThread> v = i.next(); if( v.size() > 0 ) { downloadingBoards++; } } } return downloadingBoards; } COM: <s> returns the count of boards that currently have running download threads </s>
funcom_train/3392426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean add(Map map, ClassDoc superclass, ClassDoc cd) { List list = (List)map.get(superclass); if (list == null) { list = new ArrayList(); map.put(superclass, list); } if (list.contains(cd)) { return false; } else { list.add(cd); } return true; } COM: <s> adjust the class tree </s>
funcom_train/45271540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startupOnInitialize() { trace("startupOnInitialize ..."); // initialize message console console = new MessageConsole("Flexotask Console - " + getProject().getName(), null); console.activate(); ConsolePlugin.getDefault().getConsoleManager().addConsoles( new IConsole[] { console }); stream = console.newMessageStream(); } COM: <s> creates a console for the specific project being checked and schedules </s>
funcom_train/50353220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLogPanel() { if (logPanel == null) { logPanel = new JPanel(); logPanel.setLayout(new BorderLayout()); logPanel.add(getLogConsole(), BorderLayout.CENTER); logPanel.add(getLogButtonPanel(), java.awt.BorderLayout.SOUTH); } return logPanel; } COM: <s> this method initializes log panel </s>
funcom_train/18183708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testCreateInteraction() throws ResourceException { assertThat(factoryConnectionImpl.createInteraction(), is(both(notNullValue()).and(instanceOf(Interaction.class)))); assertThat(factoryConnectionImpl.createInteraction().getConnection(), is(both(notNullValue()).and(instanceOf(Connection.class)))); } COM: <s> creates an code interaction code by invoking the factory method in </s>
funcom_train/24136636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onConnect(ChannelEvent event) { // Notify listeners that channel has been joined final ServerEvent ce_event = new ServerEvent(Server.this,(Channel)event.getSource()); notifyListeners(new _ServerEventNotifier() { public void notify(ServerListener listener) {listener.onChannelJoin(ce_event);} }); } COM: <s> a channel has been connected joined </s>
funcom_train/36932472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int index(final char theChar){ // degenerate case, but the find function will have trouble // if there are somehow zero chars in the lookup if (_myCharCodes.length == 0) return -1; // quicker lookup for the ascii fellers if (theChar < 128) return _myAsciiLookUpTable[theChar]; // some other unicode char, hunt it out return index_hunt(theChar, 0, _myCharCount - 1); } COM: <s> get index for the char convert from unicode to bagel charset </s>
funcom_train/13914140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClone() throws CloneNotSupportedException { System.out.println("clone"); RamBuffer clone = (RamBuffer) instance.clone(); assertNotSame(instance, clone); assertSame(instance.getPage(0), clone.getPage(0)); assertEquals(instance.getSize(), clone.getSize()); assertFalse(instance.isLocked()); assertTrue(clone.isLocked()); } COM: <s> test of clone method of class ram buffer </s>
funcom_train/1152163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calcPressure() { for(int i = 0; i < t.length; i++) { if (!t[i].isEmpty()) { t[i].setMinMaxDensity(); // remember our min and max density t[i].calcPressure(param); } } // for (int i=0; i<numShapePts; i++) { // shapePtsT[i].calcPressure(param); // } } COM: <s> this method calculates the pressure of each particle </s>
funcom_train/20308119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOWLTranslation(boolean enableOWLTranslation) { if (enableOWLTranslation && (mode != HYBRID)) { throw new ReasonerException("Can only enable OWL rule translation in HYBRID mode"); } this.enableOWLTranslation = enableOWLTranslation; if (enableOWLTranslation) { addPreprocessingHook(owlTranslator); } else { removePreprocessingHook(owlTranslator); } } COM: <s> set to true to enable translation of selected parts of an owl schema </s>
funcom_train/7970926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ASExpression toASE() { return new ListExpression( StringExpression.makeString( "key" ), StringExpression.makeString( _id ), StringExpression .makeString( _annotation ), StringExpression .makeString( _mod.toByteArray() ), StringExpression .makeString( _key.toByteArray() ) ); } COM: <s> construct an s expression which represents this key </s>
funcom_train/34986225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeManual() { man = new HashMap<String, String>(); man.put("exit", "Exits the program with exit status 0."); man.put("help", "Now, honestly...?"); man.put("new server", "Starts a new battle server."); man.put("quit", man.get("exit")); } COM: <s> method code initialize manual code initializes a code hash map code </s>
funcom_train/46695170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullExecute() { System.out.println("execute"); Graph g = QueryTestGraphs.emptyGraph; NullGraphQuery instance = new NullGraphQuery(); instance.buildQuery(false); Collection<Graph> result = instance.execute(g, null, null); assertEquals(0, result.size()); } COM: <s> test of execute method of class null graph query </s>
funcom_train/32734163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimEvent waitDelay(String eventName, double delay, Priority priority) { SimEvent simEvent = super.waitDelay(eventName, delay, priority); SimLogMessageType msgType = SimLogMessageType.SCHEDULE_EVENT; SimLogger.log(SimLevel.TRACE, SimLogMessageType.SCHEDULE_EVENT, simEvent); return simEvent; } COM: <s> schedule an event after a specific delay and with a given priority </s>
funcom_train/39073488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readLocalNodes(Node parent) throws DataConfigException { NodeList nodes = parent.getChildNodes(); localNodes = new Vector(); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { String name = node.getNodeName(); if (name.equals("node")) { readNode(node); } else { throw new DataConfigException("Unknown tag: " + name); } } } } COM: <s> method read local hosts </s>
funcom_train/50392647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Processor getProcessor(String actionType)throws ExecutionException{ try{ //get a chain of processor class names from config String[] chain=configuration.getProcessorChain(actionType); Processor[] ps=new Processor[chain.length]; for(int i=0; i<chain.length;i++){ ps[i]=createInstance(chain[i]); if(i>0){ ps[i-1].setNext(ps[i]); } } return ps[0]; }catch(Exception e){ throw new ExecutionException("Can't create processor for action type <"+actionType+">",e); } } COM: <s> create return a fully configured processor for the given action type </s>
funcom_train/10482060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean exists() throws MessagingException { try { // update the group statistics. If the folder doesn't exist, we'll // get an exception that we // can turn into a false reply. updateGroupStats(); // updated ok, so it must be there. return true; } catch (FolderNotFoundException e) { return false; } } COM: <s> test to see if this folder actually exists </s>
funcom_train/17905814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatabaseSource getDatabaseSource(String name) { if (name == null) { return getDatabaseSource(getDefaultNamePrefix()); } DatabaseSource source = findByName(getSchemas(), name); if (source == null) { source = findByName(getCatalogs(), name); } return source; } COM: <s> returns the database source with the name specified scanning schema </s>
funcom_train/25233284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String system() throws IOException { // possible responses 215, 500, 501, 502, and 421 sendCommand(FtpConstants.SYST); // Set the system type from the response. String response = getLine(FtpConstants.POSITIVE); MyFtpConnection.throwErrorIfNecessary( response ); this.osType = response.toUpperCase(); this.ftpLister.setOsType( osType ); return response; } COM: <s> this command is used to find out the type of operating </s>
funcom_train/10348771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExitMenuItem() { if (exitMenuItem == null) { exitMenuItem = new JMenuItem(); exitMenuItem.setText("Quit"); final LogViewer logViewer = this; exitMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { logViewer.dispose(); } }); } return exitMenuItem; } COM: <s> this method initializes exit menu item </s>
funcom_train/28343876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetProbe() { try { checkProbe(); // probe = Probe.newProbeInitializedFrom(probe); probe.reset(); // initialize the probe properly if (probe instanceof EnvelopeProbe) { ((EnvelopeProbe) probe).initFromTwiss(initTwiss); probe.applyState(initProbeState); } if (!(probe instanceof TransferMapProbe)) { //probe.reset(); probe.initialize();// this has to be checked I am not sure... } bPropagated = false; } catch (LatticeError e) { e.printStackTrace(); } } COM: <s> reset the probe to its initial values </s>
funcom_train/15409478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConcurrencyMode determineConcurrencyMode() { if (loadedProps != null) { // 'partial bean' update/delete... if (concurrencyMode.equals(ConcurrencyMode.VERSION)) { // check the version property was loaded BeanProperty prop = beanDescriptor.firstVersionProperty(); if (prop != null && loadedProps.contains(prop.getName())) { // OK to use version property } else { concurrencyMode = ConcurrencyMode.ALL; } } } return concurrencyMode; } COM: <s> determine the concurrency mode depending on fully partially populated </s>
funcom_train/30244777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getOccurrence() { int rate = getFindRate(); int mod = rate; if(_fragments!=null) { for(Fragment f:_fragments) { mod = (int) (mod * f.getOccurrence()/100f); } } //return mod>0?mod:rate; // don't let fragments lower find rate to 0 return mod; } COM: <s> gets the find rate of this item including all fragments </s>
funcom_train/3023864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isJavaDocRequired(String type, ModifierHolder mods) { // Get the resource bundle FileSettings bundle = FileSettings.getRefactoryPrettySettings(); // Determine the minimum acceptable level String minimumLevel = "none"; try { minimumLevel = bundle.getString(type + ".minimum"); } catch (SettingNotFoundException snfe) { // Use default value } // Check the level return isAll(minimumLevel) || isPackage(minimumLevel, mods) || isProtected(minimumLevel, mods) || isPublic(minimumLevel, mods); } COM: <s> determines if the java doc comment is required for the particular method </s>
funcom_train/16141830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDataSourceDatabase(String DataSourceDBName) throws Exception { StorageSvcFactory.getInstance(this.dbPath).create(DataSourceDBName, DATA_SOURCE_DB_OBJ_ID, false).close(); logger.debug("Created Data Source Database with name "+DataSourceDBName); } COM: <s> creates a berkeley db storage for the data source data </s>
funcom_train/32079741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTime (int hours, int minutes, int seconds) { checkWidget (); if (!isValidTime(Calendar.HOUR_OF_DAY, hours)) return; if (!isValidTime(Calendar.MINUTE, minutes)) return; if (!isValidTime(Calendar.SECOND, seconds)) return; calendar.set(Calendar.HOUR_OF_DAY, hours); calendar.set(Calendar.MINUTE, minutes); calendar.set(Calendar.SECOND, seconds); updateControl(); } COM: <s> sets the receivers hours minutes and seconds in a single operation </s>
funcom_train/18846392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createNoProcessTasksException(String tscToken, String processID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getInformationDiagnosticsCode(); String exceptionID = "80081"; propertyMap.addPropertyValuePair("processID", processID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> no process tasks found </s>
funcom_train/13490620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregister(Class exclass) { if (clean) reInit(); List toRemove = new ArrayList(); for (Iterator iterator = handlers.iterator(); iterator.hasNext();) { Object[] pair = (Object[]) iterator.next(); if (exclass.isAssignableFrom((Class) pair[0])) { toRemove.add(pair); } } for (int i = 0; i < toRemove.size(); i++) { Object[] pair = (Object[]) toRemove.get(i); handlers.remove(pair); } } COM: <s> unregister all classes from which the supplied class code exclass class is assignable </s>
funcom_train/7735432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int calculateHeight(JComponent c) { JMenu menuButton = (JMenu) c; //text metrics FontMetrics textMetrics = menuButton.getFontMetrics(menuButton.getFont()); int textHeight = textMetrics.getHeight(); //calculate the size of the menu point int menuHeight = textHeight + topMargin + bottomMargin + topInset + bottomInset; return menuHeight; } COM: <s> calculates the preferred height for the given component </s>
funcom_train/23246341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reInitialize(final long aNodeID) { additionalWhere = " AND n.id = " + aNodeID; this.minLat = Integer.MIN_VALUE; this.minLon = Integer.MIN_VALUE; this.maxLat = Integer.MAX_VALUE; this.maxLon = Integer.MAX_VALUE; } COM: <s> re initialize this class to read one node from the database </s>
funcom_train/20630413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(int[] ia) { return ((ia[0] == con_id) && (ia[1] == gid) && (ia[2] == mod) && (ia[3] == value.gid().intValue()) && (ia[4] == rg)); } COM: <s> determines if this role matches another role represented as </s>
funcom_train/9784889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isParentOf(GeoElement geo) { if (algoUpdateSet != null) { Iterator it = algoUpdateSet.getIterator(); while (it.hasNext()) { AlgoElement algo = (AlgoElement) it.next(); for (int i = 0; i < algo.output.length; i++) { if (geo == algo.output[i]) // child found return true; } } } return false; } COM: <s> returns whether geo depends on this object </s>
funcom_train/6352218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position getTotalPosition() { Vec4 point = getTotalPoint(); // view origin in global Position totPos = MathUtils.fromGlobalPosition(_bomber.getModel() .getWorld().getModel().getGlobe(), point); //System.out.println("ViewModel:" //+ " totPos=" + MathUtils.fromPosition(totPos)); return totPos; } COM: <s> gets the total eye position with reference and offset of the view </s>
funcom_train/22636495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scheduleMoveMan(int dx, int dy) { nextDX = dx; nextDY = dy; if (moveMan() && !timerIsRunning) { timerIsRunning = true; stopMovement = false; timerHandler.removeCallbacks(this); animationDelay = getDelayInMillis(); timerHandler.postDelayed(this, animationDelay); } } COM: <s> schedule the man to move in a certain direction designated by the input </s>
funcom_train/4553333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(int index) throws JSONException { Object object = get(index); try { return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble((String) object); } catch (Exception e) { throw new JSONException("JSONArray[" + index + "] is not a number."); } } COM: <s> get the double value associated with an index </s>
funcom_train/5445135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMethodRef_Descriptor(int Index) { if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_METHOD_REF)) throw new ClassFormatError("Constant pool item does not exist"); return getNameAndType_Descriptor(((Integer)ItemValue2[Index]).intValue()); } COM: <s> get the descriptor from a method ref constant </s>
funcom_train/36193009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubsequenceExamples() { try { assertEquals(abcde.subsequence(1, 3), bc); assertEquals(abcde.subsequence(0, 3), abc); for (int i = 0; i < 5; i++) { assertEquals(abcde.subsequence(i, i), emptySeq); } } catch (JMLSequenceException e) { fail("indexing here should not raise a JMLSequenceException"); } } COM: <s> test the examples from the subsequence method </s>
funcom_train/21026035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StoredFile getImage(String img) throws MalformedURLException, IOException { log.debug("getImage({})", img); StoredFile stFile = null; if ("login".equals(img)) { stFile = Config.LOGO_LOGIN; } else if ("mobile".equals(img)) { stFile = Config.LOGO_MOBILE; } else if ("report".equals(img)) { stFile = Config.LOGO_REPORT; } log.debug("getImage: {}", stFile); return stFile; } COM: <s> get requested image input stream </s>
funcom_train/12563376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void destroyAppMidlets() { Enumeration midlets = midletProxyList.getMIDlets(); while (midlets.hasMoreElements()) { MIDletProxy midlet = (MIDletProxy)midlets.nextElement(); if (midlet.getSuiteId() == MIDletSuite.INTERNAL_SUITE_ID && midlet.getClassName().indexOf("Manager") != -1) { continue; } midlet.destroyMidlet(); } } COM: <s> destroy every midlet except the application manager midlet </s>
funcom_train/23901993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DMatrixN reTranspose() { DMatrixN r = new DMatrixN(MAX_I,MAX_J); for (int i=0; i<MAX_I; i++) { for (int j=0; j<MAX_J; j++) r.v[j*MAX_I+i] = v[i*MAX_J + j]; } return r; } COM: <s> this returns a new matrix containing a transposed of this matrix </s>
funcom_train/37649558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button buildReferenceButton(Composite parent) { final Button button = new Button(parent, SWT.RADIO); button.setText(getMessage(StringKeys.PREF_RULESETSELECTION_BUTTON_REFERENCE)); button.setSelection(true); importByReference = true; button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { importByReference = true; } }); return button; } COM: <s> build the reference button </s>
funcom_train/20543633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkColumn(int columnIndex) throws SQLException { if (navigator == null) { throw Util.sqlException(ErrorCode.X_24501); } if (columnIndex < 1 || columnIndex > columnCount) { throw Util.sqlException(ErrorCode.JDBC_COLUMN_NOT_FOUND, String.valueOf(columnIndex)); } } COM: <s> internal column index validity check </s>
funcom_train/34899185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removeTransition(String transitionID) { ArrayList<Transition> newTrs = new ArrayList<Transition>(); boolean bTransitionWasRemoved = false; for (int i = 0; i < trsList.size(); i++) { if (!trsList.get(i).getTransitionID().equals(transitionID)) { newTrs.add(trsList.get(i)); } else { bTransitionWasRemoved = true; } } this.setTransitions(newTrs); return bTransitionWasRemoved; } COM: <s> remove a transition defined through its precursor and fragment ion </s>
funcom_train/2878504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComponentDescription sfParseComponentDescription(InputStream is) throws SmartFrogCompilationException { try { return sfParseComponentDescription(new InputStreamReader(is, SF_ENCODING)); } catch (UnsupportedEncodingException e) { throw new SmartFrogParseException("error in encoding of string for reader", e); } } COM: <s> parses a component description from an input stream </s>
funcom_train/32383429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFileCheckSummer getFileCheckSummer() { AbsFileCheckSummer absfcs = null; String strKey = this.is.getEntry("classtype.FileCheckSummer"); if(this.mFileCheckSummers.containsKey(strKey)) absfcs = this.mFileCheckSummers.get(strKey); else absfcs = this.mFileCheckSummers.get("DoNoneChecksum"); return absfcs; } COM: <s> get the right object that implements the ifile check summer interface </s>
funcom_train/9805917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Property p) { if (!NamedObjectCompare.equals(getName(), p.getName())) return false; EdifTypedValue cmp1 = getValue(); EdifTypedValue cmp2 = p.getValue(); if (!cmp1.getClass().getName().equals(cmp2.getClass().getName())) return false; return cmp1.equals(cmp2); } COM: <s> return true if this property matches the passed in one making sure they </s>
funcom_train/41164108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoResponseMchoiceE2 entity) { EntityManagerHelper.log("deleting CoResponseMchoiceE2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoResponseMchoiceE2.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co response mchoice e2 entity </s>
funcom_train/32794025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildGUI() { tabs = new JTabbedPane(); tabs.addTab("Input", getInputPane()); tabs.addTab("Project", getProjectPane()); tabs.addTab("Output", getOutputPane()); tabs.addTab("About", getAboutPane()); setLayout(new BorderLayout()); add(tabs); } COM: <s> builds the gui </s>
funcom_train/12569383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setRowKey(String oldKey, String newKey) { ResourceRow row = this.rows.get(oldKey); if (row != null) { row.setKey(newKey); this.rows.remove(oldKey); this.rows.put(newKey, row); fireRowKeyChanged(oldKey, newKey, row); return true; } return false; } COM: <s> change the key of a row </s>
funcom_train/22388158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object mapRow(ResultSet rs, int i) throws SQLException { return new Task(rs.getInt("ID"), rs.getInt("ACTION_ID"), rs.getString("DESCRIPTION"), rs.getString("STATUS")); } COM: <s> map to the task </s>
funcom_train/2558430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(Model model) { int index = model.getIndex(); int size = size(); for(int i = 0; i < index; i++) { if(i >= size) { add(null); } if(i == index -1) { set(index-1, model); } } } COM: <s> this is used to register the model within the list </s>
funcom_train/31873515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String optionsInfo(){ StringBuffer buf = new StringBuffer(); buf.append("Command line options:\n"); final Option[] o = this.options; for(int i=0; i<o.length; i++){ buf.append(o[i].help).append("\n"); } return buf.toString(); } COM: <s> prepares short info for each option </s>
funcom_train/18050818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { try { if (this.index >= 0) { if (this.changed) { Date now = new Date(); this.setMTime(now); this.db.updateEntry(this.index, this.getPacked()); }; } else { Date now = new Date(); this.setCTime(now); this.setMTime(now); this.setATime(now); this.index = this.db.addEntry(this.getPacked()); } } catch (KeydbLockedException e) { } catch (IOException e) { } } COM: <s> save entry to database </s>
funcom_train/32070646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addDocumentAttachmentGroups(Collection<DocumentAttachmentGroup> documentAttachmentGroups) { boolean addOk = getDocumentAttachmentGroups().addAll(documentAttachmentGroups); if (addOk) { for(DocumentAttachmentGroup documentAttachmentGroup : documentAttachmentGroups) { documentAttachmentGroup.setLabel((Label)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed document attachment groups collection to the label collection </s>
funcom_train/11320300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAccessForMenuWithoutRoles() { // Setup Menu menu = new Menu("menu"); RoleAccessController controller = new RoleAccessController(); menu.setAccessController(controller); MockRequest request = new MockRequest(); String role = "userRole"; MockPrincipal principal = new MockPrincipal("bob", role); request.setUserPrincipal(principal); // Perform tests assertTrue(menu.isUserInRoles()); } COM: <s> check that menu without any roles defined its public can be viewed by </s>
funcom_train/3467384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginGeneratedCode(java.lang.String prefix, java.lang.String id) { // @BEGINPROTECT _3D58B10602CF if (this.getFile().getReengineering()) { this.getFile().getReengineeringWriter().start(prefix, id); } // @ENDPROTECT } COM: <s> for reengineering mode start the area identified by id where the code is </s>
funcom_train/18294049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getSettings(SortedProperties p) { p.setProperty(BOARD_SIZE,boardSize.getValue().toString()); p.setProperty(HORIZONTAL_COLOR,Integer.toString(horizontalColor.getBackground().getRGB())); p.setProperty(VERTICAL_COLOR,Integer.toString(verticalColor.getBackground().getRGB())); } COM: <s> puts the settings in this preferences option into the passed in properties </s>
funcom_train/10806716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAttributeNS(String namespaceURI, String localName) { if (this.attributes == null) { return ""; } Attr attributeNodeNS = this.getAttributeNodeNS(namespaceURI, localName); return attributeNodeNS == null ? "" : attributeNodeNS.getValue(); } COM: <s> retrieves an attribute value by local name and namespace uri </s>
funcom_train/25503285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validate(ByteBuffer buffer, int[] values) { assert values != null; final int dimension = (end() - start()) / IntData.SIZE_OF; boolean valid = values.length == dimension; for (int index = 0; valid && index < dimension; index++) { valid = IntData.validate(value(buffer, index), values[index]); } return valid; } COM: <s> validate this attributes values by comparing them to a specific value array </s>
funcom_train/23011092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processAdjustmentEvent(AdjustmentEvent e) { super.processAdjustmentEvent(e); if(e.getAdjustmentType() == AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED) { return; } synchronized(this) { setAlphaValue = 255 - e.getValue(); setAlphaTo = map.getActiveLayer(); } } COM: <s> this thing is set to true when manually changing scrollbar position </s>
funcom_train/4881165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSairMenu () { if (SairMenu == null) {//GEN-END:|114-getter|0|114-preInit // write pre-init user code here SairMenu = new Command ("Sair", Command.EXIT, 0);//GEN-LINE:|114-getter|1|114-postInit // write post-init user code here }//GEN-BEGIN:|114-getter|2| return SairMenu; } COM: <s> returns an initiliazed instance of sair menu component </s>
funcom_train/36188992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reset_space_map() { int panel_width = this.getWidth(); for (int i = 0; i < 15; i++) { free_x[i] = panel_width; } space_between_date_descriptions = this.getWidth() / 100; y_description_slot0 = (slot_height * number_of_slots) + descriptions_slot_height / 5; } COM: <s> set all space of descriptions renderer to empty </s>
funcom_train/24628132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean semanticEventBefore(SemanticEvent se, String msg) { if (super.semanticEventBefore(se,msg)) return true; else if (VMenu.MSG_CREATE_EDIT==msg) { INode menu = (INode)se.getOut(); VCheckbox cb = (VCheckbox)createUI("checkbox", "Paste as Markup", "event "+MSG_SET, menu, ClipProvenance.MENU_CATEGORY, false); cb.setState(active_); } return false; } COM: <s> add entry to clipboard menu </s>
funcom_train/45860563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureOfflineProject() { try { SYNC_PROJECT = adminCms.readProject(SYNC_PROJECT_NAME); } catch (CmsException e) { try { SYNC_PROJECT = adminCms.createProject(SYNC_PROJECT_NAME, SYNC_PROJECT_NAME, "Administrators", "Projectmanagers"); } catch (CmsException e1) { LOG.error("Unable to create a new project to work with the syncmodule", e); } } if (SYNC_PROJECT != null) { adminCms.getRequestContext().setCurrentProject(SYNC_PROJECT); } } COM: <s> this ensures that the syncmodule always have an offline project to work with </s>
funcom_train/29645657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTest(Test test) { String testName; if (test instanceof TestCase) { testName = getClassBaseName(test) + "." + ((TestCase)test).getName(); } else { testName = test.toString(); } getWriter().print("RUN " + testName); } COM: <s> called when a test case is started </s>
funcom_train/5669102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getAllFilenames() { ArrayList files = new ArrayList(fTableData.size()); for (int i = 0; i < fTableData.size(); i++) { Vector item = (Vector) fTableData.get(i); String filename = (String) item.get(0); files.add(filename); } return files; } COM: <s> returns list with all filenames </s>
funcom_train/10787651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOldStylePersistenceUnitConfiguration() { emf1 = OpenJPAPersistence.createEntityManagerFactory(OLD_STYLE_UNIT_NAME, PERSISTENCE_UNIT); assertNotNull(emf1); assertTrue(containsProperty(OLD_STYLE_DRIVER_KEY)); assertTrue(containsProperty(OLD_STYLE_URL_KEY)); assertFalse(containsProperty(NEW_STYLE_DRIVER_KEY)); assertFalse(containsProperty(NEW_STYLE_URL_KEY)); verifyDatabaseConnection(); } COM: <s> tests that openjpa </s>
funcom_train/2583111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex(Comparable key) { if (key == null) { throw new IllegalArgumentException("Null 'key' argument."); } final Integer i = (Integer) this.indexMap.get(key); if (i == null) { return -1; // key not found } return i.intValue(); } COM: <s> returns the index for a given key </s>
funcom_train/5730393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStableVersion() { final WikiSiteContentInfo wikiSite = createDefaultWikiSiteContentInfo(); wikiSite.setStable(true); wikiService.saveWikiSite(wikiSite); final WikiSiteContentInfo newerWikiSite = createDefaultWikiSiteContentInfo(); wikiService.saveWikiSite(newerWikiSite); final WikiSiteContentInfo stableWikiSite = wikiService.getNewestStableWikiSiteContent(wikiSite.getWikiSiteId()); assertEquals(wikiSite, stableWikiSite); assertTrue(stableWikiSite.isStable()); } COM: <s> tests the setting a wiki site version stable </s>
funcom_train/21320112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void collidedWith(Entity other) { // prevents double kills, if we've already hit something, // don't collide if (used) { return; } // if we've hit an alien, kill it! if (other instanceof AlienEntity) { // remove the affected entities game.removeEntity(this); game.removeEntity(other); // notify the game that the alien has been killed game.notifyAlienKilled(); used = true; } } COM: <s> notification that this shot has collided with another </s>
funcom_train/10500530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validate() throws BuildException { if (null == mydestfile) { throw new BuildException("Destfile must be set."); } if (null == fromTag && null== fromBranch) { throw new BuildException("fromTag or fromBranch must be set."); } if (null == baseURL) { throw new BuildException("baseURL must be set."); } } COM: <s> validate the parameters specified for task </s>
funcom_train/28298631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawLines(Graphics g) { drawLines(lineEdgeColor,TransBaseSettings.sizeSingle+1,1,TransBaseSettings.sizeDouble+1,g); drawLines(lineColor,TransBaseSettings.sizeSingle,2,TransBaseSettings.sizeDouble,g); } COM: <s> draws all existing lines </s>
funcom_train/20448690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int newLocal(final Type type){ Object t; switch(type.getSort()) { case Type.BOOLEAN: case Type.CHAR: case Type.BYTE: case Type.SHORT: case Type.INT: t = Opcodes.INTEGER; break; case Type.FLOAT: t = Opcodes.FLOAT; break; case Type.LONG: t = Opcodes.LONG; break; case Type.DOUBLE: t = Opcodes.DOUBLE; break; case Type.ARRAY: t = type.getDescriptor(); break; // case Type.OBJECT: default: t = type.getInternalName(); break; } int local = nextLocal; setLocalType(local, type); setFrameLocal(local, t); nextLocal += type.getSize(); return local; } COM: <s> creates a new local variable of the given type </s>
funcom_train/4359986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureRedirector() { if (redirectorElement != null) { redirectorElement.configure(redirector); redirectOutput = true; } /* * Due to depends chain, Ant could call the Task more than once, * this is to prevent that we attempt to configure uselessly * more than once the Redirector. */ redirectorConfigured = true; } COM: <s> set up properties on the redirector from redirector element if present </s>
funcom_train/32216887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visitNode(InitialNode node) throws TranslationException { // InitNodes should have just one out transition checkSingleOutgoingTransition(node); ActivityEdge edge = node.getOutgoing(null); ActivityNode target = edge.getTarget(); // jump it this.forceStateNumber(node, START_STATE); this.createGuard(node, true, true); this.createTransition(target, 1d, true); this.dispatchNodeVisit(target); } COM: <s> visits an initial node </s>
funcom_train/27868698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getAbout(int i) throws OAIException { Node ret = null; priCheckIdOnly(); try { Node node = XPathAPI.selectSingleNode(xmlRecord, "oai:about[" + (i + 1) + "]/*", repo.getNamespaceNode()); if (node != null) { ret = node.cloneNode(true); } } catch (TransformerException te) { throw new OAIException(OAIException.CRITICAL_ERR, te.getMessage()); } return ret; } COM: <s> returns the about section of the record as an xml node </s>
funcom_train/39474671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillBackground(Graphics g) { if(backgroundFillColor != null) { // Color c = g.getColor(); g.setColor(backgroundFillColor); g.fillRect(0, 0, getBoard().getWidth(), getBoard().getHeight()); } } COM: <s> just keep the look and feel background then </s>
funcom_train/18742273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int retrieveIdentifierEndPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens.TokenNameIdentifier:// 110 return this.scanner.getCurrentTokenEndPosition(); } } } catch (InvalidInputException e) { // ignore } return -1; } COM: <s> this method is used to retrieve the start position of the block </s>
funcom_train/45236569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void licenseYear() throws IOException { final List<String> lines = getLines(new File("LICENSE.txt")); assertTrue("Incorrect year in LICENSE.txt", lines.get(1).contains("Copyright (c) " + Calendar.getInstance().get(Calendar.YEAR))); } COM: <s> checks the year in license </s>
funcom_train/8075163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetOccurrences () { m_matchOccs = 0; m_nonMatchOccs = 0; m_endAtSubOccs = 0; m_endAtGapOccs = 0; m_gapStartOccs = 0; m_gapExtendOccs = 0; m_gapEndOccs = 0; m_subOccs = 0; } COM: <s> reset the number of occurrences of all ops in the set </s>
funcom_train/2675479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(IRTMPEvent event) { final IClientStream stream = connection.getStreamByChannelId(id); if (id > 3 && stream == null) { log.info("Stream doesn't exist any longer, discarding message " + event); return; } final int streamId = (stream == null) ? 0 : stream.getStreamId(); write(event, streamId); } COM: <s> writes packet from event data to rtmp connection </s>
funcom_train/22597229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ListenerInterface getListenerInterface(String name) { ListenerInterface li = null; for(ListenerInterface li1 : listenerInterfaces) { if(name.equals(li1.getName())) { li = li1; break; } } if(li == null) { li = new ListenerInterface(name); listenerInterfaces.add(li); } return li; } COM: <s> gets listener interface by its name </s>
funcom_train/42899119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void associateAddress(String instanceId, String publicIp) throws EC2Exception { Map<String, String> params = new HashMap<String, String>(); params.put("InstanceId", instanceId); params.put("PublicIp", publicIp); HttpGet method = new HttpGet(); AssociateAddressResponse response = makeRequestInt(method, "AssociateAddress", params, AssociateAddressResponse.class); if (!response.isReturn()) { throw new EC2Exception("Could not associate address with instance (no reason given)."); } } COM: <s> associates an address with an instance </s>
funcom_train/40171076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLocation(Node node, com.jme.scene.Node lightNode) { Node locationNode = node.getAttributes().getNamedItem("location"); String[] split = locationNode.getNodeValue().split(WHITESPACE_REGEX); if (split.length >= 3) { float x = getFloat(split[0], 0); float y = getFloat(split[1], 0); float z = getFloat(split[2], 0); lightNode.setLocalTranslation(x, y, z); } } COM: <s> retrieves the location from the given x3 d light node and sets the </s>
funcom_train/50332390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteButtonActionPerformed() { javax.swing.JOptionPane.showMessageDialog(this, rb.getString("NotSupported1")+"\n"+rb.getString("NotSupported2"), rb.getString("NotSupportedTitle"), javax.swing.JOptionPane.INFORMATION_MESSAGE); resetNotes(); return; } COM: <s> method to handle delete button </s>
funcom_train/35929875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean showResult(L2PcInstance player, String res) { if (res == null) return true; if (res.endsWith(".htm")) { showHtmlFile(player, res); } else if (res.startsWith("<html>")) { NpcHtmlMessage npcReply = new NpcHtmlMessage(5); npcReply.setHtml(res); player.sendPacket(npcReply); } else { SystemMessage sm = new SystemMessage(SystemMessage.S1_S2); sm.addString(res); player.sendPacket(sm); } return false; } COM: <s> show a message to player </s>
funcom_train/8627315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueLob copyToTemp() throws SQLException { ValueLob lob; if (type == CLOB) { lob = ValueLob.createClob(getReader(), precision, handler); } else { lob = ValueLob.createBlob(getInputStream(), precision, handler); } return lob; } COM: <s> create an independent copy of this temporary value </s>
funcom_train/28652550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSourceCode () { if (!rendered) { sourcePane.setText (getString ("SourceCode.loading")); revalidate (); repaint (); SwingUtilities.invokeLater (new CGDemoRunnable (getDemo (), this) { public void run () { CGSource src = (CGSource) obj; String code = src.getSourceCode (); src.sourcePane.setText (code); src.sourcePane.setCaretPosition (0); src.rendered = true; } }); } } COM: <s> loads and puts the source code text into jeditor pane </s>
funcom_train/2968103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFeatureViolations(int week) { int counter = 0; for(ITimeInterval ti : getTimeIntervals()) { if(!ti.isUnplaced() && ti.getYearSet().isAssigned(week) && !ti.getRoom().getFeatures().containsAll(getFeatures())) { counter++; } } return counter; } COM: <s> this method counts the number of required but not satisfied ifeatures </s>
funcom_train/46161362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reactivate() { //TODO Fix this to be recipient aware. // String date = new SimpleDateFormat("h:mm a").format(new Date()); // String msg = "--- User " + recipient.getUser() + " has joined the world at " + // date + " ---\n"; // messageTextArea.append(msg); messageTextField.setEnabled(true); sendButton.setEnabled(true); } COM: <s> re activates the chat by displaying a message and turning on the gui </s>
funcom_train/50016529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUtc(boolean utc) { if (utc) { start.setUtc(true); if (end != null) { getEnd().setUtc(true); } } else { start.setTimeZone(null); if (end != null) { getEnd().setTimeZone(null); } } } COM: <s> updates the start and possible end times of this period to reflect </s>
funcom_train/10840149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getContextPath(final HttpServletRequest request) { String contextPath = getResource(request); if ("".equals(contextPath)) { contextPath = request.getContextPath(); } int query = contextPath.indexOf('?'); if (query > 0) { contextPath = contextPath.substring(0, query); } return removeEndingSlash(contextPath); } COM: <s> returns the context path for the authentication form request </s>
funcom_train/11663465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasChildren() { NodeList list = config.getChildNodes(); int size = list.getLength(); for (int i = 0; i < size; i++) { if (list.item(i).getNodeType() == Node.ELEMENT_NODE) { return true; } } return false; } COM: <s> has children returns whether or not the configuration node has child </s>
funcom_train/25256974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { // Write out any hidden stuff s.defaultWriteObject(); // Write out all elements in the proper order. for (Node<E> p = first(); p != null; p = p.getNext()) { Object item = p.getItem(); if (item != null) s.writeObject(item); } // Use trailing null as sentinel s.writeObject(null); } COM: <s> save the state to a stream that is serialize it </s>
funcom_train/51596922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File makeOutputFile(File directory, String fileBaseName) { File rv = new File(directory, fileBaseName + FCS_EXTENSION); if (rv.exists()) { int i = 1; while (rv.exists()) { rv = new File(directory, fileBaseName + "(" + i + ")" + FCS_EXTENSION); ++i; } } return rv; } COM: <s> makes a file name for the output file that does not yet exist </s>
funcom_train/10180896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer result = new StringBuffer(256); result.append("ActionRedirect ["); result.append("originalPath=").append(getOriginalPath()).append(";"); result.append("parameterString=") .append(getParameterString()).append("]"); return result.toString(); } COM: <s> p return a string description of this object </s>
funcom_train/32969873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton42() { if (jButton42 == null) { jButton42 = new JButton(); jButton42.setToolTipText("Clean"); jButton42.setRolloverIcon(new ImageIcon(getClass().getResource("/orders/sel/clean2.gif"))); jButton42.setPressedIcon(new ImageIcon(getClass().getResource("/orders/push/clean3.gif"))); jButton42.setIcon(new ImageIcon(getClass().getResource("/orders/norm/clean1.gif"))); jButton42.setDoubleBuffered(true); jButton42.setBounds(new java.awt.Rectangle(468,70,34,34)); jButton42.setBorderPainted(false); } return jButton42; } COM: <s> this method initializes j button42 </s>
funcom_train/4349222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStone(int col, int row, int player) { //if the position was occupied by other player, //reducing the score if (this.gameMatrix[col][row] != GameLogic.EMPTY) { scores[this.gameMatrix[col][row]-1]--; } this.gameMatrix[col][row] = player; if (player != GameLogic.EMPTY) { scores[player - 1]++; } } COM: <s> sets the given stone in the given coordinate and calculates mobility and </s>