__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44221909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void finishLookup() { ViewStateMachine vsm = this.questionnaire.get_vpdmfApp().get_vsm(); vsm.set_currentViewInstance(this.parentVi); vsm.set_currentViewType(this.parentVi.get_defName()); vsm.set_displayViewType(this.parentVi.get_defName()); } COM: <s> finish off the final step of the lookup query by restoring the </s>
funcom_train/10863757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean recursiveHasNext() { // return false if we have no more iterators if(current==null) { if(itit.hasNext()) { current=itit.next(); } else { return false; } } boolean result = current.hasNext(); if(!result) { current = null; result = recursiveHasNext(); } return result; } COM: <s> test if current iterator has next and if not try the next </s>
funcom_train/22442607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVerbosityLevel(String level) { if ("warning".equalsIgnoreCase(level)) this.level = WARNING; else if ("fatal".equalsIgnoreCase(level)) this.level = FATAL; else if ("error".equalsIgnoreCase(level)) this.level = ERROR; else if ("information".equalsIgnoreCase(level)) this.level = INFORMATION; else if ("debug".equalsIgnoreCase(level)) this.level = DEBUG; } COM: <s> set the verbosity level for this logger </s>
funcom_train/23680128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void supplies_view(){ setContentView(R.layout.supplies); //Change screen to "supplies.xml" screen Button SuppliesDone = (Button)findViewById(R.id.DoneSupplyList); SuppliesDone.setOnClickListener(SuppliesDoneListener); Button SuppliesDelete = (Button)findViewById(R.id.SupplyDelete); SuppliesDelete.setOnClickListener(SuppliesDeleteListener); } COM: <s> switch to individual supply view </s>
funcom_train/28346506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component makeTopButtonBar() { Box bar = new Box( BoxLayout.X_AXIS ); bar.setBorder( BorderFactory.createEtchedBorder() ); bar.add( Box.createHorizontalGlue() ); JButton clearButton = new JButton( "Clear" ); bar.add( clearButton ); clearButton.addActionListener( new ActionListener() { public void actionPerformed( final ActionEvent event ) { _loggerHandler.clear(); } } ); return bar; } COM: <s> make a button bar at the top of the window </s>
funcom_train/35865980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getActiveParticipantCount(MeetingEntity me) { Query q = em.createQuery("Select p from ParticipationEntity p where" + " p.meeting.id = '" + me.getId() + "' and p.active = 'true'"); return q.getResultList().size(); } COM: <s> get the number of active participants for a given meeting </s>
funcom_train/28418816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPayload(DatagramPacket data) { String payload = ""; try { payload = new String(data.getData(), "ASCII"); } catch (UnsupportedEncodingException ex) { Logger.getLogger(DCControl.class.getName()).log(Level.SEVERE, null, ex); } payload = payload.trim(); return payload; } COM: <s> fetches the payload from a datagrampacket </s>
funcom_train/3289925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPage(String url) { // get the scanparser scanparser m=(scanparser)mmb.getBaseModule("SCANPARSER"); if (m!=null) { // found module, create a empty // context since we don't have a user scanpage sp=new scanpage(); // setup a session so we can use sessions String sname="emailuser"; sp.sname=sname; sessionInfo session=sessions.getSession(sp,sname); sp.session=session; // get the page and return it return(m.calcPage(url,sp,0)); } return(null); } COM: <s> get page using the scanparser remember this is a hack to be </s>
funcom_train/1301847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WorkResponse getWork(WorkRequest workRequest, WorkQueue queue, AtomicBoolean pause) { WorkResponse result = null; // monitor workJob's status, to determine whether to fetch work. if (workJob.isAcceptingWork()) { result = requestWorkFromServer(pause); } return result; } COM: <s> get the next work response </s>
funcom_train/35840304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeTransition(Object handle, Object intTrans) { try { if (handle instanceof State && intTrans instanceof Transition) { ((State) handle).getInternalTransition().remove(intTrans); return; } } catch (InvalidObjectException e) { throw new InvalidElementException(e); } throw new IllegalArgumentException("handle: " + handle + " or intTrans: " + intTrans); } COM: <s> remove a transition </s>
funcom_train/25295695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { // currentIterator.hasNext() if (currentIterator != null && currentIterator.hasNext()) { return true; } // iterator.hasNext() and currentIterator.hasNext() while(iterator != null && iterator.hasNext()){ closeCurrentIterator(); currentIterator = iterator.next(); if(currentIterator != null && currentIterator.hasNext()){ return true; } } closeCurrentIterator(); // close last ClosableIterator return false; } COM: <s> moves to next iterator if actual one is empty </s>
funcom_train/37077308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (!canExecute()) { throw new IllegalStateException("feature:" + feature); } Vector<SeqFeatureI> exons = new Vector<SeqFeatureI>(); exons.addElement(feature); annotationEditor.setSelections(exons, exons, null, null); annotationEditor.deleteSelectedFeatures(); curationState.getSZAP().repaint(); // TODO repaint all msa's } COM: <s> performs the deletion </s>
funcom_train/13260601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printTempMeasures() { if (pauseSim()) { if (tempMeasures != null) { for (TempMeasure tempMeasure : tempMeasures) { TempMeasure temp = tempMeasure; if (!temp.isFinished()) { System.out.println(temp.getName() + ": " + Double.toString(temp.getTempMean()) + " " + temp.getNsamples()); } } } restartSim(); } } COM: <s> prints on system </s>
funcom_train/19533623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void characters(char ch[], int start, int length) { // parse name of actual configuration part if (inPart && inName) { char content[] = new char[length]; System.arraycopy(ch,start,content,0,length); partName = new String(content); } // parse each configuration option and add it to a hash if (inPart && inOptions && optionsName != null) { char content[] = new char[length]; System.arraycopy(ch,start,content,0,length); optionsHash.put(optionsName,new String(content)); } } COM: <s> overwritten methode from default handler </s>
funcom_train/17204122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instruction remove() { if (IR.PARANOID) { isLinked(); VM._assert(!isBbFirst() && !isBbLast(), "Removal of first/last instructions in block not supported"); } // Splice this out of instr list Instruction Prev = prev, Next = next; Prev.next = Next; Next.prev = Prev; next = null; prev = null; return Prev; } COM: <s> removal remove this from the instruction stream </s>
funcom_train/34262754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { if(getCurrentFilePreference().isImmutableFile()) { OptionDialogHelper.showError("Delete Preference", "Cannot delete " + getCurrentFilePreference().getName()); return; } getFileExtensionMediator().deleteFilePreferenceSelected(); } COM: <s> delete button pressed to delete a file preference </s>
funcom_train/7520737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanBuffers() { Iterator it = nextList.iterator(); while (it.hasNext()) { EventContainer cont = (EventContainer) it.next(); try { cont.event.getMessage().pushString(cont.event.getChannel().getChannelID()+ " (buffered)"); cont.event.setChannel(topChannel); cont.event.setSourceSession(this); cont.event.init(); cont.event.go(); } catch (AppiaEventException e) { e.printStackTrace(); } lastDelivered[cont.source] = cont.sn; } nextList.clear(); } COM: <s> cleans the remaining messages in the buffers </s>
funcom_train/49817845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { String label = ((JMenuItem) ae.getSource()).getText(); // Figure out the appropriate action if (label == DESTROY_VIEW) HGVKit.destroyNetworkView(graphView); else if (label == CREATE_VIEW) HGVKit.createHGViewer(graphView); else { // throw an exception here? System.err.println("Unexpected network panel popup option"); } // end of else } COM: <s> based on the action event destroy or create a view </s>
funcom_train/17689330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Chart newXYChart() { // return new Chart( // org.jfree.chart.ChartFactory.createXYStepChart( // diagram.getTitle(), getLabelOfX(), getLabelOfY(), // Datasets.newCategoryDataset(diagram), PlotOrientation.VERTICAL, true, false, true)); // } COM: <s> creates a chart with points scatter plot </s>
funcom_train/4922932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDirectHttpFile() throws IOException { this.createSourceHttpResourceFactory(null, null, true); HttpResource resource = this.doCreateHttpResourceTest("index.html", true); HttpFile file = (HttpFile) resource; ByteBuffer contents = file.getContents(); assertTrue("Should be direct buffer", contents.isDirect()); assertTrue("Should be read-only", contents.isReadOnly()); assertHttpFileContents("Should be able to retrieve direct content", "test", resource); } COM: <s> ensure using direct </s>
funcom_train/1663078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void actionClone() { int selectedIndex = projectList.getSelectedIndex(); if (selectedIndex > -1) { Project newProject = new Project((Project) projectList.getSelectedValue()); newProject.setName(MessageFormat.format(I18n.getMessage("jsite.project.action.clone-project.copy"), newProject.getName())); projectListModel.add(newProject); projectList.setSelectedIndex(projectListModel.indexOf(newProject)); } } COM: <s> clones the currently selected project </s>
funcom_train/2459545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeUserType(String userName, String userType) throws UMException { UNameVals val = (UNameVals) s.users.getVal(userName); if (val == null) throw new UMException("User " + userName + " does not exist"); val.userType = userType; } COM: <s> change the type of a particular user </s>
funcom_train/18325753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOnEnterActionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_State_onEnterActions_feature"), getString("_UI_PropertyDescriptor_description", "_UI_State_onEnterActions_feature", "_UI_State_type"), CoremodelPackage.Literals.STATE__ON_ENTER_ACTIONS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the on enter actions feature </s>
funcom_train/50328282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void releaseSession(int handle) { // Send KLOC CanMessage msg = new CanMessage(2, tc.getCanid()); msg.setOpCode(CbusConstants.CBUS_KLOC); msg.setElement(1, handle); log.debug("Release session handle " + handle); tc.sendCanMessage(msg, null); } COM: <s> release a session freeing up the slot for reuse </s>
funcom_train/31801705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSingleFailure() { startRedirect(); TestResult result = new TestResult(); result.addFailure(this, new MockError("SingleFailure")); Util.dumpResult(result); assertEquals("", bout.toString()); assertEquals("SingleFailure" + NEW_LINE, berr.toString()); endRedirect(); } COM: <s> test dump result with a single failure </s>
funcom_train/12282707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getResponse() { byte[] resp; if (currentResponse.length > currentPosition) { byte[] tmp = new byte[currentPosition]; for (int i = 0; i < currentPosition; i++) { tmp[i] = currentResponse[i]; } resp = tmp; } else { resp = currentResponse; } return new String(Base64.encode(resp)); } COM: <s> returns the response that has been generated after shrinking the array if </s>
funcom_train/28477098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSettings() { logger.debug("Loading settings from file " + SETTINGS_FILENAME); try { settings = (Settings) getContext().getLocalStorage().load( SETTINGS_FILENAME); } catch (IOException e) { logger.warn("Could not load settings from file", e); } if (settings == null) { logger.debug("Settings were not loaded from file: create new settings"); settings = new Settings(); } else { logger.debug("Got settings " + settings); this.setLogLevel(settings.getLogLevel()); } } COM: <s> load the application settings from file </s>
funcom_train/6424124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleCTCPMSG(IRCConnection connection, String sender, String target, String msg){ IRCLine line = new IRCLine(msg); String command = line.getNextToken(); String param = line.getRemaining(); doCommand((IRCCommandConnection)connection,sender,command,param); if(Preferences.DEBUG_LEVEL>=20) System.out.println("{OakCommand.handleCTCPMSG} command="+command); // doCommand((IRCCommandConnection)connection,message); } COM: <s> handles the incomming ctcp commands </s>
funcom_train/21462072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTranscoder(Transcoder transcoder) { if (transcoder == null) { throw new IllegalArgumentException("transcoder cannot be null"); } if (transcoders == null) { getTranscoder(Formats.XML); } String format = transcoder.getHandledFormat(); if (format != null && transcoder != null) { transcoders.put(format, transcoder); } } COM: <s> override the transcoder used for a specific format </s>
funcom_train/23453234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProvidesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ServiceProvider_provides_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ServiceProvider_provides_feature", "_UI_ServiceProvider_type"), ServicePackage.Literals.SERVICE_PROVIDER__PROVIDES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the provides feature </s>
funcom_train/44448589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getExpectedScore(LPC signal, String word) { if (noExpectedScore) return Double.MAX_VALUE; double max = 0; double cost; LPC[] templates = loadModels(modelPath, word); for (int i = 0; i < templates.length; i++) { // System.out.println("matching " + signal.getName() + " with " // + templates[i].getName()); cost = match(signal, templates[i]); if (cost > max) { max = cost; } } return max; } COM: <s> calculates the score that is expected for a model when comparing it to </s>
funcom_train/22235814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void duplicateNode(Node originalNode, boolean forceDuplicate) { super.duplicateNode(originalNode, forceDuplicate); TCBSplinePathInterpolator originalSpline = (TCBSplinePathInterpolator) originalNode; setAlpha(originalSpline.getAlpha()); keysLength = originalSpline.keysLength; keyFrames = new TCBKeyFrame[keysLength]; System.arraycopy(originalSpline.keyFrames, 0, keyFrames, 0, keysLength); } COM: <s> copies all tcbspline path interpolator information from </s>
funcom_train/43340696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Move_number_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Move_number_feature", "_UI_Move_type"), TacticsPackage.eINSTANCE.getMove_Number(), true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number feature </s>
funcom_train/3360398
/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(); int n = members.length; for (int i = 0; i < n; i++) { if (i > 0) { result.append (','); } result.append (members[i][0]); if (members[i][0] != members[i][1]) { result.append ('-'); result.append (members[i][1]); } } return result.toString(); } COM: <s> returns a string value corresponding to this set of integer attribute </s>
funcom_train/17083345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showMenu() { System.out.println("\n1. Upload from CSV"); System.out.println("2. Upload from MySQL"); System.out.println("99. Exit"); System.out.println(" "); System.out.println("---> Operation: "); } COM: <s> displays a menu in the console to choose the operation </s>
funcom_train/16677777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDialogShell(int style) { dialogShell = new XShell(parent, style); dialogShell.addShellListener(listener); if (SWTUtil.checkStyle(style, SWT.NO_TRIM)) { dialogShell.setMaximized(true); } GridLayout gl = new GridLayout(); gl.numColumns = 1; gl.horizontalSpacing = 0; gl.verticalSpacing = 0; gl.marginBottom = 0; gl.marginHeight = 0; gl.marginLeft = 0; gl.marginRight = 0; gl.marginTop = 0; gl.marginWidth = 0; dialogShell.setLayout(gl); } COM: <s> creates a shell using the given style </s>
funcom_train/25656722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resumeBean() { if (this.getExecutionStatus() == s_status_suspended) setExecutionStatus(IAnalyticsServiceBean.s_status_running); else throw new IllegalArgumentException("Attempt resume "+this.getBeanName()+" while it was not suspended."); return true; } COM: <s> this method resumes a bean that has been suspended </s>
funcom_train/44679755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MatchedShell getMatchedShell() { if (matchedShell == null) { switch (datasetRole) { case BoundaryMatcher.REFERENCE: matchedShell = new MatchedShellReference(getShellCoordinates()); break; case BoundaryMatcher.SUBJECT: matchedShell = new MatchedShellSubject(getShellCoordinates()); break; } } return matchedShell; } COM: <s> return the matched shell object for this feature creating it if necessary </s>
funcom_train/31167476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStreams() { try { os = new ObjectOutputStream(socket.getOutputStream()); is = new ObjectInputStream(socket.getInputStream()); } catch(IOException ioe) { LimeServer.error("Problems while creating a connection to " + key, ioe, true); } } COM: <s> initializes the input and output streams of this connection </s>
funcom_train/2301854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transition createTransition(State from, State to, Node node, Map e2t) { String s = (String) e2t.get(TRANSITION_READ_NAME); if (s == null) s = ""; // Allow lambda transition. return new FSATransition(from, to, s); } COM: <s> creates and returns a transition consistent with this node </s>
funcom_train/41740457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldProxy field(String name) { try { Field field = this.clazz.getDeclaredField(name); return this.getFieldProxy(field); } catch (SecurityException e) { throw new FieldReflectionException("No access to the attribute: " + name, e); } catch (NoSuchFieldException e) { throw new FieldReflectionException( "The attribute does not exists: " + name, e); } } COM: <s> wrapps the named field into an </s>
funcom_train/25647801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute() throws InterruptedException { boolean userEventOk = true; for (TestCommand command : this.userCommands) { if (!executeTestCommand(command, true)) { userEventOk = false; } } if (userEventOk) { for (TestCommand command : this.systemCommands) { if (!executeTestCommand(command, false)) { return false; } } } else { return false; } return true; } COM: <s> execute commands from one user event and one system event </s>
funcom_train/35566302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean containsToolBar(JPanel panel, String name) { Component[] tbpComps = panel.getComponents(); for (int i=0; i<tbpComps.length; i++) { Component c = tbpComps[i]; if (c instanceof JToolBar) { if (((JToolBar)c).getName().equals(name)) { return true; } } } return false; } COM: <s> checks if a panel already contains a specific tool bar </s>
funcom_train/27837799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(Element classElement) { super.load(classElement); setName(classElement.getAttributeValue(UmlvmConstants.TAG_NAME)); loadSuperClass(classElement); String activeClassString = classElement.getAttributeValue(UmlvmConstants.TAG_ACTIVECLASS); if (activeClassString == null || !UmlvmConstants.TRUE.equals(activeClassString)) { setActiveClass(false); } else { setActiveClass(true); } loadAttributes(classElement); loadOperations(classElement); } COM: <s> load itself from xml element </s>
funcom_train/35036222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit() { // Will exit thread this.continueProcessing = false; // Will stop download this.stopDownloading = true; this.news.abortDownload(); infoProcessor.debug("downloader.stop. Shutdown=" + shutdown); // If not downloading or paused we should be asleep so wake up if (!isDownloading() || this.paused == true) { this.paused = false; synchronized (this) { notifyAll(); } } } COM: <s> causes the downloader to exit </s>
funcom_train/4514627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIconState(CommandButtonDisplayState state) { this.currDimension = -1; this.currState = state; for (List<AbstractCommandButton> ljrb : this.buttons) { for (AbstractCommandButton jrb : ljrb) { jrb.setDisplayState(state); jrb.revalidate(); jrb.doLayout(); } } this.revalidate(); this.doLayout(); this.repaint(); } COM: <s> sets the new state for the icons in this panel </s>
funcom_train/51658022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHighlightAnnotationType(Object annotationType) { fConfiguredHighlightAnnotationTypes.remove(annotationType); fAllowedHighlightAnnotationTypes.clear(); if (fConfiguredHighlightAnnotationTypes.isEmpty() && fTextInputListener != null) { fSourceViewer.removeTextInputListener(fTextInputListener); fTextInputListener= null; fInputDocumentAboutToBeChanged= false; } } COM: <s> removes the given annotation type from the list of annotation types whose </s>
funcom_train/43600548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteAlbum() { try { IPerson person = (IPerson)ServiceLocator.getService("PersonSvc"); ProfileBean profileBean = (ProfileBean)getSessionScope().get("currentProfile"); int userId = profileBean.getUserAuth().getUserId(); String imageId = (String)getRequestParam().get("imageId"); person.deleteAlbum(Integer.parseInt(imageId)); } catch (SysException e) { e.printStackTrace(); } return "success"; } COM: <s> this function is used to delete album using delete album service </s>
funcom_train/44484944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validateDestinationGroup() { String destinationValue = getDestinationValue(); if (destinationValue.length() == 0) { setMessage(destinationEmptyMessage()); return false; } String conflictingContainer = getConflictingContainerNameFor(destinationValue); if (conflictingContainer == null) setErrorMessage(""); //$NON-NLS-1$ else { setErrorMessage(Messages.format("RasterizeWizardPage1.conflictingContainer", //$NON-NLS-1$ new Object[] { conflictingContainer })); giveFocusToDestination(); return false; } return true; } COM: <s> answer a boolean indicating whether the receivers destination specification </s>
funcom_train/45502401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkTooManyPersonsInArea() throws TooManyPeopleException { if( getEvacuees() != 0 && (area() / getEvacuees() < Assignment.spacePerPerson) ) throw new TooManyPeopleException( this, ZLocalization.getSingleton().getString( "ds.z.AssignmentArea.ContainsToManyPersonsException" ) ); } COM: <s> checks if this assignment area contains too many people </s>
funcom_train/40541107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { if (showing) { return; } showing = true; GlobalEventPreviewManager.getInstance().addEventPreview(this); // Set the position attribute, and then attach to the DOM. Otherwise, // the PopupPanel will appear to 'jump' from its static/relative // position // to its absolute position (issue #1231). DOM.setStyleAttribute(getElement(), "position", "absolute"); if (topPosition != -1) { setPopupPosition(leftPosition, topPosition); } getRootPanel().add(this); onShow(); } COM: <s> shows the popup </s>
funcom_train/8526613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUnmappedColumn(String tableName, String columnName) { Collection c = (Collection) getUnmappedColumns().get(tableName.toUpperCase()); if (c == null) { c = new HashSet(); getUnmappedColumns().put(tableName.toUpperCase(), c); } c.add(columnName); } COM: <s> configuration declare a column as not mapped in the database so that </s>
funcom_train/34837801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(XSObject xso) { try { Method method = xso.getClass().getMethod("getAnnotations", new Class[] {}); XSObjectList annotations = (XSObjectList) method.invoke(xso, new Object[] {}); setAnnotations(annotations); } catch (Exception e) { logger.info("No annotations found.", e); } } COM: <s> update content view </s>
funcom_train/2742277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BooleanValue visit(ForallTerm forTerm) { logger.debug("<ForallTerm>"); Value[] boundValues = new Value[forTerm.getVariable().size()]; Object/*Term*/[] domains = forTerm.getRanges().toArray(); BooleanValue value = BooleanValue.parseBooleanValue(visitForTerm(0, domains, boundValues, forTerm)); logger.debug("<Value>" + value + "</Value>"); logger.debug("</ForallTerm>"); return value; } COM: <s> evaluates a forall term </s>
funcom_train/6347339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLongCopy() { long[] x = new long[]{'\0', 'c', '\uFFFF'}; LongArrayRecord r = RecordFactoryCreator. createLongArrayRecordFactory(). createRecord(x); long[] y = r.getLongArray(); long[] z = r.getLongArray(); assertNotSame(y, z); } COM: <s> asserts that the long wrapper makes a copy when returning </s>
funcom_train/44011637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmployee() throws Exception { System.out.println("getEmployee"); TransactionBO instance = new TransactionBO(); EmployeeBO expResult = null; EmployeeBO result = instance.getEmployee(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get employee method of class edu </s>
funcom_train/1238699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getUnderlTypeNillable() { // refType could refer to array with underlying nillable // type - set the underlTypeNillable to true if this is // the case. if (!underlTypeNillable && !getDimensions().equals("") && refType != null) { underlTypeNillable = refType.getUnderlTypeNillable(); } return underlTypeNillable; } COM: <s> return whether the underlying type is nillable if this is an array type </s>
funcom_train/28555305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String randomString(int lo, int hi){ int n = rand(lo, hi); byte b[] = new byte[n]; for (int i = 0; i < n; i++) b[i] = (byte)rand('a', 'z'); return new String(b, 0); } COM: <s> generates a random alphabetical string of variable length </s>
funcom_train/12155865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PatientBean getPatient(int id) throws UnknownPatientException, PatientRepositoryException { if (logger.isDebugEnabled()) { logger.debug("Entering getPatient(int id)."); logger.debug("id = [" + id + "]."); } PatientBean patient = getPatient(id, DEFAULT_FETCH_PATIENT_EXAMS_FLAG); if (logger.isDebugEnabled()) { logger.debug("Exiting getPatient(int id); RV = [" + patient + "]"); } return patient; } COM: <s> gets the patient with the specified id </s>
funcom_train/43471572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePosition( Word word, int radius ) { // randomly spiral out double theta = Math.random() * PApplet.TWO_PI; int x = (int)( radius * Math.cos( theta ) ); int y = (int)( radius * Math.sin( theta ) ); word.x = centerPoint.x + x; word.y = centerPoint.y + y; // TODO: check bounds } COM: <s> randomly spirals the word position from a central point </s>
funcom_train/39166643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateRuleTime(FSMInstance currentInstance, long startTime) { int index = currentInstance.getFSMPosition().getIndexInRuleList(); currentInstance.getSupportGraph().getRuleTimes().get(index).addTime(Benchmark.startPoint() - startTime); } COM: <s> increment the time spent by the rule associated with the fsm </s>
funcom_train/31539732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Request createRequest() { Request request = new Request(new User("Inquisitor"+no+"@Nirwa.na")); request.addDescription("Test " + no); request.accept(); assertTrue("request must not be closed", !request.isClosed()); return request; } COM: <s> creates a simple request for testing </s>
funcom_train/3750742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { SiteWrapper sites = (SiteWrapper)usitesAndVsites.elementAt(rowIndex); switch (columnIndex) { case COL_USITE: return sites.getUsite().getName(); case COL_VSITE: Vsite single = sites.getVsite(); if (single != null) { return single.getName(); } else { return res.getString("BROKER_SETTINGS_ALL_VSITES_AT_USITE"); } default: return null; } } COM: <s> fetch the value stored in a particular cell </s>
funcom_train/39380224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberPages() { if (getPageSize() == 0) { return 1; } if (getRowList().isEmpty()) { return 1; } double value = (double) getRowList().size() / (double) getPageSize(); return (int) Math.ceil(value); } COM: <s> return the number of pages to display </s>
funcom_train/3102492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getChildren(final IResource resource) throws CoreException { Assertion.valid(resource); if (resource.getType() != IResource.FILE) { int count= 0; if (resource.isAccessible()) { final IContainer container= (IContainer) resource; final IResource[] children= container.members(); for (int index= 0; index < children.length; index++) { count+= getChildren(children[index]); } } return count; } return 1; } COM: <s> returns the number of children of the specified resource </s>
funcom_train/38537052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CspDoubleExpr multiply(CspDoubleCast expr) { if (expr == this) return new DoubleExpr(null, this, NumOperation.SQUARE); else if (expr instanceof CspGenericDoubleCast) return new GenericDoubleExpr(null, this, NumOperation.MULTIPLY, (CspGenericDoubleCast) expr); else return new DoubleExpr(null, this, NumOperation.MULTIPLY, (DoubleCast) expr); } COM: <s> returns an expression representing the product of this expression with </s>
funcom_train/17833680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateDialog() { /* * Imseam changed * */ //new loginButton.setEnabled(ModelUtil.hasLength(getUsername()) && ModelUtil.hasLength(getPassword())); //old // loginButton.setEnabled(ModelUtil.hasLength(getUsername()) && ModelUtil.hasLength(getPassword()) // && ModelUtil.hasLength(getServerName())); } COM: <s> checks the users input and enables disables the login button depending on state </s>
funcom_train/27789422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isPortFree(int port) { boolean ok = true; ServerSocket socket = null; try { socket = new ServerSocket(port); } catch (Exception e) { ok = false; } finally { if (socket != null) { try { socket.close(); socket = null; } catch (Exception e) { } } } return ok; } COM: <s> check if the given port is free </s>
funcom_train/3746788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element findConfigRootElement() { Element configRoot = (Element)config.selectSingleNode("XMLMerger/file[@name=\"" + sourceFileName + "\"]/*[1]"); if (configRoot == null) { throw new RuntimeException("ERROR in XMLMerger: no file defined in " + "XMLMerger config with name '" + sourceFileName + "'"); } return configRoot; } COM: <s> find the config document root element which corresponds to a given file </s>
funcom_train/36957334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateUIFromFilter() { fMaxCallDepth.setText(String.valueOf(CallHierarchyUI.getDefault().getMaxCallDepth())); fNames.setText(CallHierarchy.getDefault().getFilters()); fFilterOnNames.setSelection(CallHierarchy.getDefault().isFilterEnabled()); updateEnabledState(); } COM: <s> updates the ui state from the given filter </s>
funcom_train/51119975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface Viewer { /** * Set the Container that serves as the data source of the viewer. * * @param newDataSource * The new data source Item */ public void setContainerDataSource(Container newDataSource); /** * Get the Container serving as the data source of the viewer. * * @return data source Container */ public Container getContainerDataSource(); } COM: <s> interface implemented by viewer classes capable of using a container as a </s>
funcom_train/16749479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoPoints(Collection<OverlayPoint> points) { OverlayPoint mean = OverlayPoint.mean(points); gotoLonLat(mean.getLongitude(), mean.getLatitude()); OverlayPoint minimum = OverlayPoint.minimum(points); OverlayPoint maximum = OverlayPoint.maximum(points); zoom = zoomMax; tilesFromGeo(); while (!containsPoint(minimum) || !containsPoint(maximum)) { if (!zoomOut()) { break; } } fireChangeListeners(); } COM: <s> move the viewport to show all points </s>
funcom_train/15396340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DipPlayer authenticate(Element playerE) throws InvalidAuthenticationException { DipPlayer result; lockbox_.rwLock.readLock().lock(); try { result = lockbox_.playerMap.get(playerE.getAttribute("player")); } finally { lockbox_.rwLock.readLock().unlock(); } if(result == null || !result.comparePassword(playerE.getAttribute("password"))) { throw new InvalidAuthenticationException("Invalid name and password"); } return result; } COM: <s> authenticates the player </s>
funcom_train/18781531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play(java.io.File file) { //System.err.println("Play: "+file); setFile(file); notifyPosition(0,1024); notifyBitRate(128000); isRunning = true; if (thread==null) { thread = new Thread(this); thread.start(); } blockPlay(); } COM: <s> ugh this play has to block </s>
funcom_train/3860783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLayout() { // Set width of text to current width here... textArea.setSize(size.width, 0); // Layout the text to fit the width... textArea.setFont(getFont()); textArea.layout(); // Set the height of this component to the calculated height of the text... setSize(size.width, textArea.getTextHeight()); // And move the text down to fit: textArea.setLocation(0, textArea.getTextHeight()); } COM: <s> resize the label to its preferred size </s>
funcom_train/31467761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(RemainderAssignExpression node) { Node left = node.getLeftExpression(); LeftHandSideModifier mod = NodeProperties.getModifier(left); Object lhs = mod.prepare(this, context); // Perform the operation Object result = InterpreterUtilities.remainder (NodeProperties.getType(node), lhs, node.getRightExpression().acceptVisitor(this)); // Cast the result result = performCast(NodeProperties.getType(left), result); // Modify the variable and return mod.modify(context, result); return result; } COM: <s> visits an remainder assign expression </s>
funcom_train/4722562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream parseStringToInputStream(final String data) { InputStream in = null; if (data != null) { final String trimmedData = data.trim(); try { in = new ByteArrayInputStream(trimmedData.getBytes("UTF-8")); } catch (Exception e) { logger.error("Error converting string to input stream: " + e.getMessage()); } } return in; } COM: <s> parses the string to input stream </s>
funcom_train/27822032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtension(File file) { if (file!=null) { String fileName=file.getName(); int i=fileName.lastIndexOf('.'); if (i>0 && i<fileName.length()-1) return fileName.substring(i+1).toLowerCase(); } return null; } COM: <s> return the extension portion of the files name </s>
funcom_train/4362053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSessionTimeout(int timeout) { int oldSessionTimeout = this.sessionTimeout; /* * SRV.13.4 ("Deployment Descriptor"): * If the timeout is 0 or less, the container ensures the default * behaviour of sessions is never to time out. */ this.sessionTimeout = (timeout == 0) ? -1 : timeout; support.firePropertyChange("sessionTimeout", oldSessionTimeout, this.sessionTimeout); } COM: <s> set the default session timeout in minutes for this </s>
funcom_train/23891093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearImage(int clientID) throws WorkspaceIsLockedException, NoPermissionsToEditException { hasUserPermissions(clientID); Graphics2D imGrap = (Graphics2D)image.getGraphics(); imGrap.setColor(backgroundColor); imGrap.fillRect(0, 0, image.getWidth()-1, image.getWidth()-1); } COM: <s> clears the image by filling the whole image with the backgroundcolor </s>
funcom_train/10866848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int stemSuffix(char s[], int len) { for (int i = 0; i < suffixes.length; i++) if (endsWithCheckLength(s, len, suffixes[i])) len = deleteN(s, len - suffixes[i].length, len, suffixes[i].length); return len; } COM: <s> stem suffix es off an arabic word </s>
funcom_train/18037380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDocument(Object object) { if (debugging) { log.info("[DocumentNavigator] if is document"); } if (!(object instanceof StAXNode)) { return false; } XMLEvent xe = ((StAXNode) object).getXMLEvent(); return xe.getEventType() == javax.xml.stream.XMLStreamConstants.START_DOCUMENT; } COM: <s> test if a node is a document root </s>
funcom_train/42991620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String visit(AssignTemp2Temp i) { String instruction = ""; instruction = "\t" + JasminType.getInstructionPrefix(i.getRhs()) + "load " + i.getRhs().getNumber() + "\n"; instruction += "\t" + JasminType.getInstructionPrefix(i.getLhs()) + "store " + i.getLhs().getNumber(); return instruction; } COM: <s> visits assign temp to temp </s>
funcom_train/3378951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(DerOutputStream out) throws IOException { DerOutputStream seq = new DerOutputStream(); for (int i = 0, n = size(); i < n; i++) { get(i).encode(seq); } out.write(DerValue.tag_Sequence, seq); } COM: <s> encode the general subtrees </s>
funcom_train/38327996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Template findTemplate(String name) { Template tmpl = null; Iterator itr = this.workingMem.getAgenda().modules.values().iterator(); while (itr.hasNext()) { Object val = itr.next(); if (val != this.workingMem.getMain()) { tmpl = ((Defmodule) val).getTemplate(name); } if (tmpl != null) { break; } } // if it wasn't found in any other module, check main if (tmpl == null) { tmpl = this.workingMem.getMain().getTemplate(name); } return tmpl; } COM: <s> find the template starting with other modules and ending with the main </s>
funcom_train/34849324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Defaults getSystemDefaults() { Defaults defaults = new Defaults(); for (Iterator i = paramsByDeclarationOrder.iterator(); i.hasNext();) { Parameter param = (Parameter) i.next(); defaults.setDefault(param.getID(), param.getDefault()); } return (defaults); } COM: <s> returns a defaults object representing the default values defined within </s>
funcom_train/25642041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodDocImpl getMethodDoc(MethodSymbol meth) { assert !meth.isConstructor() : "not expecting a constructor symbol"; MethodDocImpl result = (MethodDocImpl)methodMap.get(meth); if (result != null) return result; result = new MethodDocImpl(this, meth); methodMap.put(meth, result); return result; } COM: <s> return the method doc for a method symbol </s>
funcom_train/23768157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findSourceSubdir(File sourceDirectory, String grammarFileName) { String srcPath = sourceDirectory.getPath() + File.separator; if (!grammarFileName.startsWith(srcPath)) { throw new IllegalArgumentException("expected " + grammarFileName + " to be prefixed with " + sourceDirectory); } File unprefixedGrammarFileName = new File(grammarFileName.substring(srcPath.length())); return unprefixedGrammarFileName.getParent() + File.separator; } COM: <s> given the source directory file object and the full path to a </s>
funcom_train/8104397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SynonymRow getRow(String w) { if (null == rows || 0 == rows.size()) { return null; } for(int i=0; i<rows.size(); i++) { SynonymRow r = rows.get(i); if(r.word.equalsIgnoreCase(w)) { return r; } } return null; } COM: <s> gets row from the table which contains the synonym w </s>
funcom_train/43590419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getJJMenuBar() { if (jJMenuBar == null) { jJMenuBar = new JMenuBar(); jJMenuBar.add(getJMenu()); if (!Zenses.getInstance().isMacOSX()) { jJMenuBar.add(getWindowMenu()); } jJMenuBar.add(getHelpMenu()); } return jJMenuBar; } COM: <s> this method initializes j jmenu bar </s>
funcom_train/36253339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public int createNetwork(EmotiveNetwork emoNet) { try { conn.networkCreateXML(emoNet.getNetworkXML()); return 1; } catch (Exception e) { log.error("Error while starting Network from the specified XML String"); e.printStackTrace(); } return -1; }*/ COM: <s> creates a new network using the fields in the emotive network object </s>
funcom_train/13803053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { if (properties == null) { return null; } Object name = properties.getProperty(Keys.NAME); if (name == null) { //logger.log(Priority.ERROR, "getName(): name is null"); return Element.NONAME; } if ( name instanceof String ) { return (String)name; } return String.valueOf(name); } COM: <s> convenience accessor for name property </s>
funcom_train/16442343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean open(String filename) { InferenceGraph ig; try { if (jb.is_applet) return (false); else { jb.appendText("\nLoading " + filename + "\n"); ig = new InferenceGraph(filename); } } catch (Exception e) { jb.appendText(e + "\n"); return (false); } // Put the network into the graphical interface set_inference_graph(ig); return (true); } COM: <s> open a file and read the network in it </s>
funcom_train/48553033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransformMatrix transpose(){ double nm[][] = new double[3][3]; int i, j; for(i = 0; i < 3; ++i){ for(j = 0; j < 3; ++j){ nm[i][j] = m[j][i]; } } return new TransformMatrix(nm); } COM: <s> performs matrix transposition </s>
funcom_train/5437170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChecksum(PacketInputStream input, PacketAnalysisDescriptor parent) { try { int offset = input.getOffset(); int checksum = input.readShort(); addNode("Checksum: 0x" + Integer.toHexString(checksum), offset, offset+1, parent); } catch (IOException e) { // Drop it. } } COM: <s> adds the ip header checksum information to the analysis information </s>
funcom_train/1917791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isExtendedContentDescriptionMandatory(Tag tag) { return tag.getFirstTrack().trim().length() > 0 || tag.getFirstYear().trim().length() > 0 || tag.getFirstGenre().trim().length() > 0 || tag.getFirstAlbum().trim().length() > 0; } COM: <s> this method decides if a property chunk is needed in order to store </s>
funcom_train/48406907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addArtifactPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ArtifactContainer_Relationship_artifact_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ArtifactContainer_Relationship_artifact_feature", "_UI_ArtifactContainer_Relationship_type"), SpemxtcompletePackage.eINSTANCE.getArtifactContainer_Relationship_Artifact(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the artifact feature </s>
funcom_train/112492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void parseQueryParameters(String query, Map parameters) { StringTokenizer st = new StringTokenizer(query, "&"); String key, value, pair; while(st.hasMoreTokens()) { pair = (String)st.nextToken(); int pos = pair.indexOf('='); if (pos != -1) { key = pair.substring(0, pos); value = pair.substring(pos+1, pair.length()); parameters.put(key, value); } else parameters.put(pair, null); } } COM: <s> appends the parameters from the given query string to the given map </s>
funcom_train/40255414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAttributes(StringBuffer sb) { // TODO: Localize me. int attrCount = getAttributeCount(); if (attrCount>0) { sb.append("<b>Attributes:</b><br>"); sb.append("<center><table width='90%'><tr><td>"); for (int i=0; i<attrCount; i++) { Parameter attr = getAttribute(i); sb.append("&nbsp;&nbsp;&nbsp;<b>"); sb.append(attr.getName()!=null ? attr.getName() : attr.getType()); sb.append("</b>&nbsp;"); String desc = attr.getDescription(); if (desc!=null) { sb.append(desc); } sb.append("<br>"); } sb.append("</td></tr></table></center><br><br>"); } } COM: <s> adds html describing the attributes of this tag to a buffer </s>
funcom_train/27959641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List subList(int fromIndex, int toIndex) { // Check bounds if (fromIndex > toIndex || fromIndex < 0 || toIndex > size) { throw new IndexOutOfBoundsException(); } return new SubLinkedList(back, getEntry(fromIndex - 1, size, ends, ends), getEntry(toIndex, size, ends, ends), toIndex - fromIndex); } COM: <s> obtain a list view of a subsection of this list from from index </s>