__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3102889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadElementParticipants(final RefactoringStatus status, final List<RefactoringParticipant> result, final RenameArguments arguments, final String[] natures, final SharableParticipants sharables) { Assertion.valid(status); Assertion.valid(result); Assertion.valid(arguments); Assertion.valid(natures); Assertion.valid(sharables); final Object[] elements= getElements(); final int length= elements.length; for (int index= 0; index < length; index++) { result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, this, elements[index], arguments, natures, sharables))); } } COM: <s> loads the participants for the elements being refactored </s>
funcom_train/50221860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selfDestroy() { //==component.removeStateChangeListener(this); scv.removeStopEventListener(this); scv.removeStepEventListener(this); scv.removeResetEventListener(this); scv.removeFEventListener(this); scv.removeFFEventListener(this); if (timer.isRunning()) timer.stop(); timer = null; visual = null; } //selfDestroy COM: <s> this method is called from the framework when this </s>
funcom_train/43093915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeObsoleteFeatures() { if (obsoleteFeatures == null) { return; } for (Iterator i = obsoleteFeatures.iterator(); i.hasNext();) { Object feature = i.next(); Model.getCoreHelper().removeFeature(classifier, feature); Model.getUmlFactory().delete(feature); } } COM: <s> remove features no longer in the source from the current </s>
funcom_train/17724940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BuyNowPostData getPostData() { if (this.postData != null) { return this.postData; } ValueBinding _vb = getValueBinding("postData"); if (_vb != null) { return (BuyNowPostData) _vb.getValue(getFacesContext()); } else { return null; } } COM: <s> p returns the value of post data support bean through additional attributes </s>
funcom_train/13272775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String floatToString(float f) { if (Math.abs(f) < 1E-6) { return "0"; } else if (Math.abs(f - 1f) < 1E-6) { return "1"; } else if (Math.abs(f + 1f) < 1E-6) { return "-1"; } else { return String.valueOf(f); } } COM: <s> returns the string value of the given float except for 1 </s>
funcom_train/39117781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(String clientID, String name, long time, Level level, Object message, Throwable t) { if (buffer.length() > 0) { buffer.delete(0, buffer.length()); } if(clientID != null){ buffer.append(clientID); buffer.append(' '); } buffer.append(time); buffer.append(':'); if (level != null) { buffer.append('['); buffer.append(level); buffer.append(']'); } if (message != null) { buffer.append(delimiter); buffer.append(message); } if (t != null) { buffer.append(delimiter); buffer.append(t); } return buffer.toString(); } COM: <s> format the given message and the throwable object </s>
funcom_train/32316092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addURIFromOWLEntityPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OWLEntity_uRIFromOWLEntity_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OWLEntity_uRIFromOWLEntity_feature", "_UI_OWLEntity_type"), OdmPackage.Literals.OWL_ENTITY__URI_FROM_OWL_ENTITY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the uri from owl entity feature </s>
funcom_train/45237053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdExit() { if (cmdExit == null) {//GEN-END:|89-getter|0|89-preInit // write pre-init user code here cmdExit = new Command("Sair", Command.ITEM, 0);//GEN-LINE:|89-getter|1|89-postInit // write post-init user code here }//GEN-BEGIN:|89-getter|2| return cmdExit; } COM: <s> returns an initiliazed instance of cmd exit component </s>
funcom_train/10518890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToBytes() { ZipShort zs = new ZipShort(0x1234); byte[] result = zs.getBytes(); assertEquals("length getBytes", 2, result.length); assertEquals("first byte getBytes", 0x34, result[0]); assertEquals("second byte getBytes", 0x12, result[1]); } COM: <s> test conversion to bytes </s>
funcom_train/3402560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class getImplementorClass(String name, XMLStreamReader xsr) { try { return Class.forName(name, true, classLoader); } catch (ClassNotFoundException e) { logger.log(Level.SEVERE, e.getMessage(), e); throw new LocatableWebServiceException( ServerMessages.RUNTIME_PARSER_CLASS_NOT_FOUND(name), e, xsr ); } } COM: <s> loads the class of the given name </s>
funcom_train/27758220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleAbout(ApplicationEvent ae) { if(mainApp != null){ ae.setHandled(true); new Thread() { public void run() { About.doAbout(); } }.start(); } else{ throw new IllegalStateException("handleAbout: Dx instance detached from listener"); } } COM: <s> this is called when the user tries to find out about dialox </s>
funcom_train/28339456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double potentialSummation(R3 ptFld) { double dblVol; // coulomb potential Iterator iter; // ensemble particle iterator dblVol = 0.0; iter = this.iterator(); while (iter.hasNext()) { Particle p = (Particle)iter.next(); dblVol += p.electricPotential(ptFld); } return dblVol; } COM: <s> computes the coulomb potential of the ensemble at the given field point </s>
funcom_train/5077834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetConnection(ConnectionEditPart connection, int index) { primAddTargetConnection(connection, index); GraphicalEditPart target = (GraphicalEditPart) connection.getTarget(); if (target != null) target.getTargetConnections().remove(connection); connection.setTarget(this); fireTargetConnectionAdded(connection, index); } COM: <s> adds a i target i connection edit part at the specified index </s>
funcom_train/44137008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyMediaInclude(OSMElementEditorPanel ec, OSMElement elt, int type) { for(int i = 0;i < m_ClientList.size();i++) { OSMElementEditorListener lster = (OSMElementEditorListener)m_ClientList.get(i); lster.onMediaInclude(new OSMElementEditorEvent(ec, elt, type)); } } COM: <s> to notify a media inclusion </s>
funcom_train/10584886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setType(int type) throws IllegalArgumentException { switch (type) { case FieldDefinition.TEXT: index = true; break; case FieldDefinition.DATE: index = true; break; case FieldDefinition.KEYWORD: index = false; break; default: throw new IllegalArgumentException("type not allowed"); } this.type = type; } COM: <s> set the type of the field definition date text keyword </s>
funcom_train/44586898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean close(LRUCacheEntry entry) { IBuffer buffer= (IBuffer) entry._fValue; // prevent buffer that have unsaved changes or working copy buffer to be removed // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=39311 if (!((Openable)buffer.getOwner()).canBufferBeRemovedFromCache(buffer)) { return false; } else { ArrayList buffers = (ArrayList) this.buffersToClose.get(); if (buffers == null) { buffers = new ArrayList(); this.buffersToClose.set(buffers); } buffers.add(buffer); return true; } } COM: <s> returns true if the buffer is successfully closed and </s>
funcom_train/37231173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OBXSegment setChiefComplaint( CEElement ceChiefComplaint ) { OBXSegment obx = addOBX(); obx.setObservationIdentifier( Loinc.CHIEF_COMPLAINT_NOM ); // try { obx.setObservationValueType( "CE" ); obx.setObservationValue( ceChiefComplaint ); // } // catch( MalformedFieldException mfe ) { // mfe.printStackTrace(); // } return obx; } COM: <s> set the chief complaint as a predefined ce element </s>
funcom_train/19748146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getComponentsAsPlainList() { List result = new ArrayList(); result.add(this); for (int i = 0; i < menuComponents.size(); i++) { MenuComponent child = (MenuComponent) menuComponents.get(i); result.addAll(child.getComponentsAsPlainList()); } return result; } COM: <s> returns list of all menu components in following order root his </s>
funcom_train/47552098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prettyPrint(CodeWriter w, PrettyPrinter tr) { w.write("for ("); for (Iterator it = varDecls.iterator(); it.hasNext();){ printVarDecl(it.next(), w, tr); } w.write(" : "); print(expr, w, tr); w.write(")"); printSubStmt(body, w, tr); } COM: <s> write the statement to an output file </s>
funcom_train/19422300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getPersonAttributeList() { List thisList = new ArrayList(); if (contactIds != null) { Iterator i = personAttributeNames.iterator(); while (i.hasNext()) { LabelValueBean lvb = (LabelValueBean) i.next(); if (StringUtils.booleanValue(lvb.getValue())) { thisList.add(lvb.getLabel().substring(6)); } } } return thisList; } COM: <s> p builds and returns the list of person attributes </s>
funcom_train/48522124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteBusinessPartner(String businessPartnerName) throws Exception { if (this.getBusinessPartner(businessPartnerName) != null) { StringBuilder strBuilder = new StringBuilder("BusinessPartner?where=name%20like%20%27"); strBuilder.append(businessPartnerName); strBuilder.append("%27"); this.doDeleteContentRequest(strBuilder.toString()); } } COM: <s> delete business partner </s>
funcom_train/37656680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object createBadValue(int count) { if (count == 1) return Integer.valueOf( randomBool() ? randomInt(MIN - SHIFT, MIN) : randomInt(MAX, MAX + SHIFT) ); Integer[] values = new Integer[count]; for (int i=0; i<values.length; i++) values[i] = (Integer)createBadValue(1); return values; } COM: <s> creates and returns count number of out of range integer values </s>
funcom_train/44310323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deferReadKey(NamedParameterStatement stmt, Object obj) { m_deferredObjectStmts.put(obj, stmt); List<Object> ls = m_deferredStatementObjs.get(stmt); if (ls==null) { ls = new ArrayList<Object>(); m_deferredStatementObjs.put(stmt, ls); } ls.add(obj); } COM: <s> defer the reading of a database generated key </s>
funcom_train/38474173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int monthFromName(String methodName) { String result; if (methodName.substring(0, 2).equals("rem")) { result = methodName.substring(6, 7); } else { result = methodName.substring(0, 2); } return Integer.parseInt(result); } COM: <s> method month from method name </s>
funcom_train/10955690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) throws ServletException { try { this.filterConfig = filterConfig; initLogging(); dispatcher = createDispatcher(filterConfig); dispatcher.init(); dispatcher.getContainer().inject(this); staticResourceLoader.setHostConfig(new FilterHostConfig(filterConfig)); } finally { ActionContext.setContext(null); } } COM: <s> initializes the filter by creating a default dispatcher </s>
funcom_train/7758032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addPeerViewElement(PeerViewElement pve) { boolean added; if (null == pve.getRdvAdvertisement()) { throw new IllegalStateException("Cannot add a seed pve to local view"); } synchronized (localView) { added = localView.add(pve); if (added) { // Refresh, if necessary, our up and down peers. updateUpAndDownPeers(); } } if (added) { pve.setPeerView(this); } return added; } COM: <s> add the provided element to the local peerview </s>
funcom_train/2513863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gatherWidgets(Vector result){ Enumeration e = _widgets.elements(); while(e.hasMoreElements()){ Widget n = (Widget) e.nextElement(); result.add(n); } if(_up!=null)_up.gatherWidgets(result); if(_down!=null)_down.gatherWidgets(result); if(_left!=null)_left.gatherWidgets(result); if(_right!=null)_right.gatherWidgets(result); } COM: <s> gathers all the widgets within the tree </s>
funcom_train/12804413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStateName() { StringBuffer stateName = new StringBuffer(); stateName.append(currentState.getStateName()); StateMachine embeddedStateMachine = currentState.getEmbeddedStateMachine(); if (embeddedStateMachine != null) { stateName.append("~" + embeddedStateMachine.getStateName()); } return stateName.toString(); } COM: <s> retrieve the heirarchical state name given the current state </s>
funcom_train/21483670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertResponseGoodAndCached(String path, boolean fullPage) throws Exception { WebResponse firstResponse = getResponseFromAcceptGzipRequest(path); assertResponseGood(firstResponse, fullPage); WebResponse secondResponse = getResponseFromAcceptGzipRequest(path); assertResponseGood(secondResponse, fullPage); checkTimeStamps(firstResponse, secondResponse, true); } COM: <s> assert that the page cache was used </s>
funcom_train/45505494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPolygon getJPolygon( PlanPolygon poly ) { for( Component c : getComponents() ) // Room level if( c instanceof JPolygon ) { if( ((JPolygon)c).getPlanPolygon() == poly ) return (JPolygon)c; for( Component cx : ((JPolygon)c).getComponents() ) // Area level if( cx instanceof JPolygon && ((JPolygon)cx).getPlanPolygon() == poly ) return (JPolygon)cx; } return null; } COM: <s> searches for a jpolygon on screen that shows the given plan polygon </s>
funcom_train/44616960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean makeSpace (int space) { int limit; limit = getSpaceLimit(); /* if space is already available */ if (this.currentSpace + space <= limit) { return true; } /* if entry is too big for cache */ if (space > limit) { return false; } /* Free up space by removing oldest entries */ while (this.currentSpace + space > limit && this.entryQueueTail != null) { privateRemoveEntry (this.entryQueueTail, false); } return true; } COM: <s> ensures there is the specified amount of free space in the receiver </s>
funcom_train/40626683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EventServiceAsync refreshEventService(String aConnectionId) { if(aConnectionId != null) { EventServiceAsync theEventService = myEventServiceCreator.createEventService(); final ServiceDefTarget theServiceDefTarget = (ServiceDefTarget)theEventService; theServiceDefTarget.setServiceEntryPoint(theServiceDefTarget.getServiceEntryPoint() + "?id=" + aConnectionId); return theEventService; } return myEventService; } COM: <s> refreshes re initializes the </s>
funcom_train/23867178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNobelPrize(final NobelPrize nobelPrize) { EntityManagerHelper.beginTransaction(); nobelPrize.setYear(YEAR_AFTER_UPDATE); nobelPrize.setNobelPrizeCategory(EntityDataAccess.findById(NobelPrizeCategory.class, 2L)); EntityDataAccess.merge(nobelPrize); EntityManagerHelper.commit(); } COM: <s> updates the previously created nobel prize </s>
funcom_train/14372714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swatchRequest () { // System.out.println("Swatch request!"); final SwatchQuery req = new SwatchQuery(getBeginDate(), getEndDate(), selectedSourceList, selectedSourceGroupList, activeStripSet, getSampleInterval(), DataGrid.getNextSwatchQueryId()); this.requestData(req); } COM: <s> helpful parameter free wrapper method for queueing a swatch query </s>
funcom_train/16907095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPixels(ImageProcessor ip) { Font font = new Font(name, style, size); ip.setFont(font); ip.setAntialiasedText(antialiasedText); FontMetrics metrics = ip.getFontMetrics(); int fontHeight = metrics.getHeight(); int descent = metrics.getDescent(); int i = 0; int yy = 0; while (i<MAX_LINES && theText[i]!=null) { ip.drawString(theText[i], x, y+yy+fontHeight); i++; yy += fontHeight; } } COM: <s> renders the text on the image </s>
funcom_train/43231008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPersonToTeam(final Team team, final Collection<Person> collection) { try { this.beginTransaction(); for (final Person person : collection) { final TeamAddMemberCommand command = new TeamAddMemberCommand(team, person); this.doCommand(command); } this.commitTransaction(); } catch (final IPScrumGeneralException e) { this.toastMessage(e.getMessage()); this.rollbackTransaction(); } } COM: <s> this method opens the function to add persons to a team </s>
funcom_train/51408650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Edge(){ Auximage = Pimage; this.Erode(new kernel("cruz")); ParameterBlock pb = new ParameterBlock(); pb.addSource(Auximage); pb.addSource(Pimage); PlanarImage aux2 = JAI.create("subtract", pb); Pimage = aux2; this.InvertImage(); } COM: <s> returns the edges of a binary image </s>
funcom_train/27943703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearSocksProxy() { Properties prop = System.getProperties(); prop.remove( "socksProxyHost" ); prop.remove( "socksProxyPort" ); prop.remove( "java.net.socks.username" ); prop.remove( "java.net.socks.password" ); System.setProperties( prop ); } COM: <s> clear all socks proxy settings </s>
funcom_train/49469716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeAllThings(Object so[]) { if (so != null && so.length > 0) { for(int i=0; i<so.length; ++i) { try { ShutDownOperation o = (ShutDownOperation) so[i]; // this won't throw an exception o.shutdown(); } catch (Throwable t) { //NOPMD // ignore throwables we are shutting down. } } } } COM: <s> now close all open resources weve been asked to close </s>
funcom_train/36198545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIMEI() throws Exception { if (driver == null) { throw new Exception("Driver not set"); } if (waitBusy()) { throw new ModemBusyException("Modem is already executing command"); } busy = true; try { return driver.getIMEI(this); } finally { busy = false; } } COM: <s> retrieves imei from the modem </s>
funcom_train/51114648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTTPMessageWrapper createHTTPMessageWrapper() { if (m_wrapperFactory == null) throw new NullPointerException("Before an HTTPTransceiver will work, you must define the class name of the MessageWrapperFactory to be used. Call 'setMessageWrapperFactoryClassName()'."); return m_wrapperFactory.createHTTPMessageWrapper(); } COM: <s> return a default httpmessage wrapper </s>
funcom_train/27849593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel initSubmissionPanel () { final JPanel submissionPanel = new JPanel (new BorderLayout(2, 2)); // submissionPanel.setBorder(GUIFactory.titledLBorder("brd_send_view")); initSubmissionSummary(); submissionPanel.add(profView, BorderLayout.NORTH); // submissionPanel.add(sendBtn, BorderLayout.SOUTH); // sendBtn.setEnabled(DocWhatsUp.getQueueCount() > 0); return submissionPanel; } COM: <s> inits a submission information panel </s>
funcom_train/2956174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void manageCuts() { if (feasible) { ArrayList currentCuts; currentCuts = decomposition.computeExpl(bendersCut); addCuts(currentCuts); } nbCutLearned = 0; for (int i = 0; i < bendersCut.length; i++) { bendersCut[i] = null; } } COM: <s> compute the global cut using the master slaves relation </s>
funcom_train/48407508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAnnotatedElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Comment_annotatedElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Comment_annotatedElement_feature", "_UI_Comment_type"), SpemxtcompletePackage.eINSTANCE.getComment_AnnotatedElement(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the annotated element feature </s>
funcom_train/19967583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXml(){ Element vector = new Element(SEMANTIC_VECTOR); vector.setAttribute(SEMANTIC_VECTOR_ONTOLOGY, this.getOntology()); for (C concept : this.getConcepts()){ Element conceptElement = new Element(SEMANTIC_VECTOR_CONCEPT); conceptElement.setAttribute(SEMANTIC_VECTOR_CONCEPT_VALUE, getValue(concept).toString()); conceptElement.addContent(concept.toString()); vector.addContent(conceptElement); } return vector; } COM: <s> converts a vector to a xml element </s>
funcom_train/17006496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkDetails getLinkDetails(Node n1, Node n2) { Iterator it = links.iterator(); while (it.hasNext()) { LinkDetails l = (LinkDetails) it.next(); if (((l.connectedNode1 == n1) && (l.connectedNode2 == n2)) || ((l.connectedNode1 == n2) && (l.connectedNode2 == n1))) { return l; } } return null; } COM: <s> get object containing information about all the links between specified </s>
funcom_train/2578709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Range findDomainBounds(XYDataset dataset) { if (dataset == null) { return null; } // need to handle cluster centering as a special case if (this.centerBarAtStartValue) { return findDomainBoundsWithOffset((IntervalXYDataset) dataset); } else { return super.findDomainBounds(dataset); } } COM: <s> returns the x value bounds for the specified dataset </s>
funcom_train/42280490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh () { if (tableList != null) { int [] tableNums = tableList.getTablesNumbers(); Vector<Table> listData = new Vector<Table> (); for (int i = 0; i < tableNums.length; i++) { Table table = tableList.getTable(tableNums[i]); listData.add (table); } //convert to a table at some stage setListData (listData); } } COM: <s> refresh method which updates the visual userlist </s>
funcom_train/41017915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties getProperties(BundleContext bundleContext) { Properties configuration = new Properties(); // iterate over all known configuration properties for (Entry<String, String> entry : CONFIGURATION_PROPERTIES.entrySet()) { String key = entry.getKey(); // fetch value from bundle context String value = bundleContext.getProperty(key); if (value == null) { // use default value if nothing provided by the configuration value = entry.getValue(); } configuration.setProperty(key, value); } return configuration; } COM: <s> reads the configuration properties from the bundle context and applies </s>
funcom_train/199456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeObject(Object object, MarshallingContext context, HierarchicalStreamWriter writer) { if (object == null) { writer.startNode(mapper().serializedClass(ClassMapper.Null.class)); writer.endNode(); } else { writer.startNode(mapper().serializedClass(object.getClass())); context.convertAnother(object); writer.endNode(); } } COM: <s> write object writes a context to the specified object </s>
funcom_train/22829237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTables(Database database, boolean dropTables) { if (dropTables) { dropTables(database); } for (int idx = 0; idx < database.getTableCount(); idx++) { Table table = database.getTable(idx); writeTableComment(table); createTable(database, table); } // we're writing the external foreignkeys last to ensure that all // referenced tables are already defined createExternalForeignKeys(database); } COM: <s> outputs the ddl required to drop if requested and re create all tables </s>
funcom_train/25099291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVoltagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HardwarePin_voltage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HardwarePin_voltage_feature", "_UI_HardwarePin_type"), HardwaremodelingPackage.Literals.HARDWARE_PIN__VOLTAGE, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the voltage feature </s>
funcom_train/10662626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAutoBindAndExportionUsingRemoteRegistry() throws RemoteException { exportObj = new AutoBindITCRemoteUnicast(); exportObj.clean(true); try { reg.rebind(AutoBindITCRemoteUnicast.BIND_NAME, exportObj); fail("can't bind remotelly"); } catch (ServerException e) { } try { reg.lookup(AutoBindITCRemoteUnicast.BIND_NAME); fail("Object binded"); } catch (NotBoundException e) { } } COM: <s> this case makes a test on a non exported object </s>
funcom_train/3549286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDateOfDeath(Date newDateOfDeath) { if (newDateOfDeath != null && dateOfBirth != null) { if (newDateOfDeath.before(dateOfBirth)) { logger.warn("Received dateOfDeath before dateOfBirth, PersonImpl " + getID()); throw new IllegalArgumentException("Person cannot normally pass through time in reverse"); } } dateOfDeath = newDateOfDeath; } COM: <s> sets persons date of death </s>
funcom_train/27840246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String writeSelectorBlock() { StringBuffer temp = new StringBuffer(); temp.append(" "); temp.append(getName()); temp.append(".setSelectorString(\""); temp.append(getName()); temp.append("\");\n"); return temp.toString(); } COM: <s> write the selector block </s>
funcom_train/42211901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MutableUserDetails retrieveByName(String username) { return (MutableUserDetails) DataAccessUtils .uniqueResult(this .getHibernateTemplate() .findByNamedParam( "from PersistentUserDetails as user_details where upper(user_details.username) = :username", "username", username.toUpperCase())); } COM: <s> retrieve the user by username </s>
funcom_train/28651993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getAngle(Point fix, Point p) { double tmp = Math.atan2(p.getY() - fix.getY(), p.getX() - fix.getX()) ; if (tmp < 0) { tmp += 2 * Math.PI ; } return 2 * Math.PI - tmp ; } COM: <s> returns angle of line fix p respect to x axis </s>
funcom_train/15617478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parse(JFlexLexer lexer, Map<String, String> attributes, String content) throws ParserException { try { String result = this.parseSharedCode(lexer, attributes); if (!StringUtils.isBlank(result)) { result += '\n'; } result += this.parseButtonCode(lexer, attributes); return JFlexParserUtil.formatAsNoParse(result); } catch (IOException e) { throw new ParserException(e); } } COM: <s> parse a facebook integration tag of the form facebook and return the </s>
funcom_train/9666911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshBill() { bill = new Bill(cm); invoice = bill.produceBill(selectedGuardianID); String billText = invoice.invoiceText; jTextPane1.setText(billText); if (invoice.noMoneyOwed) { settleBillButton.setEnabled(false); printBillButton.setEnabled(false); } else { printBillButton.setEnabled(true); } } COM: <s> refreshes the text pane that displays the customer bill </s>
funcom_train/39063881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearProjects(boolean save) { if (save && isDirty()) { IRunnableWithProgress runner = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { saveProjects(monitor); } }; try { new ProgressMonitorDialog(getSite().getShell()).run(false, true, runner); } catch (InvocationTargetException e) { MarkerPlugin.log(e); } catch (InterruptedException e) { } } projectMarkMap.clear(); } COM: <s> clears the projects for the current marking session </s>
funcom_train/13814838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getImgWidth() { int w = imgWidth; if ( resType == RES_CUSTOM ) { String strWidth = customWidthFld.getText(); try { w = Integer.parseInt( strWidth ); } catch (NumberFormatException ex) { ex.printStackTrace(); } } return w; } COM: <s> get the width for the exported photo s selected by user </s>
funcom_train/34246173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean getIsOptionalReviewer() { if (communityMemberAssignment != null) isOptionalReviewer = CacheUtility.getBoolean(WorkTaskAssignmentType.OPTIONAL_REVIEWER.getName().equals(communityMemberAssignment.getGovernanceType())); if (isOptionalReviewer == null) isOptionalReviewer = Boolean.FALSE; return isOptionalReviewer; } COM: <s> returns the is optional reviewer </s>
funcom_train/28352868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLimits() { if ( this == _limitsHandler ) { _lowerLimit = _lowerCustomLimit; _upperLimit = _upperCustomLimit; EVENT_PROXY.channelChanged( KnobElement.this, KnobElement.this.getChannel() ); EVENT_PROXY.readyStateChanged( KnobElement.this, KnobElement.this.isReady() ); } } COM: <s> update the limits </s>
funcom_train/49319195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllChildren() { synchronized (fChildren) { // Create copy of children vector because removeChild will modify original Object[] copy = fChildren.toArray(); // Call removeChild() on each child, which will remove listeners as well for (int i = 0; i < copy.length; i++) { removeChild((ScienceObjectModel) copy[i]); } } } COM: <s> removes all children from the science object model </s>
funcom_train/35585835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getScoreItem() { if (scoreItem == null) {//GEN-END:|28-getter|0|28-preInit // write pre-init user code here scoreItem = new StringItem("Score", "");//GEN-LINE:|28-getter|1|28-postInit // write post-init user code here }//GEN-BEGIN:|28-getter|2| return scoreItem; } COM: <s> returns an initiliazed instance of score item component </s>
funcom_train/9878260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findNextHighestStart(int y) { int index = 0, i; for(i = this.coordStarts.length-1; i >= 0; i--) { if(coordStarts[i] <= y && coordEnds[i] >= y) return i; if(coordStarts[i] < y) { if(i < coordStarts.length-1) return i+1; else return coordStarts.length-1; } } if(i < 0) return 1; return index; } COM: <s> returns the loci that starts after location y </s>
funcom_train/16791131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean openDialog() { Shell shell = this.getShell(); this.ok = false; shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!shell.getDisplay().readAndDispatch()) shell.getDisplay().sleep(); } return this.ok; } COM: <s> open the dialog and keep it open until weve finished with it </s>
funcom_train/43989269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComponentValueModel getComponentModel(String propertyName) { ComponentValueModel componentModel = componentModels.get(propertyName); if (componentModel == null) { AbstractValueModel model = getModel(propertyName); componentModel = new ComponentValueModel(model); componentModels.put(propertyName, componentModel); } return componentModel; } COM: <s> looks up and lazily creates a component value model that adapts </s>
funcom_train/21656622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTfTipoDeCambio() { if (tfTipoDeCambio == null) { tfTipoDeCambio = new JTextField(); tfTipoDeCambio.setBounds(new Rectangle(572, 360, 120, 25)); ValidadorReal v = new ValidadorReal(lbErrorTipocambio,true); tfTipoDeCambio.setInputVerifier(v); } return tfTipoDeCambio; } COM: <s> this method initializes tf tipo de cambio </s>
funcom_train/3911926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMethod(Method method) { _method = method; // Lazily set the DataModel if(getDataModel() == null) { setDataModel(method.getDataModel()); } // Set Model ((PlaySelectorTreeModel)getEditor_TreeModel()).setMethod(method); } COM: <s> set the method </s>
funcom_train/42110938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double klSize() { double klSum = 0; int size = size(); if (size <= 1) return 0; double uniform = 1.0 / size; for (Double prob : itemProbs_.values()) { klSum += klDivergence(prob, uniform); } double logBase = Math.log(size); double klSize = Math.max(size * (1 - klSum / logBase), 1); return klSize; } COM: <s> returns the kl divergence of the distribution from a uniform distribution </s>
funcom_train/17710534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanUp() { synchronized (this.cache) { for (final Iterator iter = this.cache.values().iterator(); iter .hasNext();) { final ProxyGrantingTicketHolder holder = (ProxyGrantingTicketHolder) iter.next(); if (holder.isExpired(this.timeout)) { iter.remove(); } } } } COM: <s> cleans up old expired proxy tickets </s>
funcom_train/41179094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean firstRead(String result, boolean readable, boolean controle, UserDetails technicien) throws Exception { // Bouml preserved body begin 0005F07B boolean rez = false; if (technicien.isAtLeast(BioClearanceLvls.Technician)) { rez = true; if (controle && readable) { this.stat = AnalysisState.Read; this.result = result; } else { notAnalysableTest(); } } API_bdd.saveAnalysis(this); return rez; // Bouml preserved body end 0005F07B } COM: <s> used by the first read which is a technician </s>
funcom_train/48400846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayAll() { System.out.print("DataMgr:"); if (_objs != null) { System.out.print("objs:" + _objs.length); } if (_cols != null) { System.out.print("cols;" + _cols.length); } }//End of display() COM: <s> display the contents of all internal lists to the system output for debugging </s>
funcom_train/50446643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(char[] cbuf, int offset, int len) throws IOException { int result; if (pushbackBuffer == null) { result = in.read(cbuf, offset, len); // if (result < 1) { // log.info("READ " + result + " BYTES"); // } throttle.enforce(result); throttle.logByteCount(result); } else { result = readPushbackBuffer(cbuf, offset, len); } return (result); } COM: <s> reads at most code len code elements into the specified char array </s>
funcom_train/43572166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getBainHasmashosRT2Stars() { Date alos19Point8 = getAlos19Point8Degrees(); Date sunrise = getSunrise(); if (alos19Point8 == null || sunrise == null) { return null; } return getTimeOffset(getSunset(), (sunrise.getTime() - alos19Point8 .getTime()) * (5 / 18d)); } COM: <s> this method returns em bain hashmashos em of rabainu tam calculated </s>
funcom_train/13995008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChangeValueObjectID() { ValueObject[] valueObjects = new ValueObject[4]; for (int i = 0; i < valueObjects.length; i++) { valueObjects[i] = container.createVO(); } assertEquals("invalid key count", 4, container.getKeys().size()); valueObjects[0].setID(new Key("fo", "fo", true)); assertEquals("invalid key count", 4, container.getKeys().size()); } COM: <s> bug old id remains in key list </s>
funcom_train/17378665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(Properties props) { String refType = props.getProperty("reference-type"); if (refType == null) { refType = props.getProperty("referenceType"); } if (refType != null) { referenceType = MemoryCacheLevel.getByReferenceType(refType); } } COM: <s> configures the cache </s>
funcom_train/32953829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Record findNextRecordBySid(short sid, int pos) { int matches = 0; for (Iterator iterator = records.iterator(); iterator.hasNext(); ) { Record record = ( Record ) iterator.next(); if (record.getSid() == sid) { if (matches++ == pos) return record; } } return null; } COM: <s> returns the next occurance of a record matching a particular sid </s>
funcom_train/21437695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(char _fragment_type, int _first_pos, int _last_pos, Residue r) { _fragment_type = Character.toUpperCase(_fragment_type); return ( fragment_type==_fragment_type && first_pos==_first_pos && last_pos==_last_pos && matches(r) ); } COM: <s> return code true code if the ring fragment type matches the </s>
funcom_train/7265415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { int numBits = unitsInUse << ADDRESS_BITS_PER_UNIT; StringBuilder buffer = new StringBuilder(8*numBits + 2); String separator = ""; buffer.append('{'); for (int i = 0 ; i < numBits; i++) { if (get(i)) { buffer.append(separator); separator = ", "; buffer.append(i); } } buffer.append('}'); return buffer.toString(); } COM: <s> returns a string representation of this bit set </s>
funcom_train/21300946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Source resolve(String href, String base) throws TransformerException { if (href.indexOf(".xsl") > -1) { href = getStylesheetDir() + href; } else { href = getBaseDir() + href; } return EnvisionStylesheet.resolve(href, base, getClass().getClassLoader(), fallbackResolver); } COM: <s> resolve href uri </s>
funcom_train/25084555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONArray getJSONArray(String key) throws JSONException { Object o = get(key); if (o instanceof JSONArray) { return (JSONArray)o; } throw new JSONException("JSONObject[" + quote(key) + "] "+ExceptionMessage.IS_NOT_A_JSONARRAY.toString()); } COM: <s> get the jsonarray value associated with a key </s>
funcom_train/17029565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSpecialMethod(Method method) { boolean ok = false; String methodName = method.getName(); if (methodName.equals("getStartDate") || methodName.equals("getEndDate") || methodName.equals("getUrl") || methodName.equals("getUri") || methodName.equals("getDODSUrl")) { ok = true; } return ok; } COM: <s> does the parameter require special handling i </s>
funcom_train/1776062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateLandArea(Envelope2D extent, Rectangle rect, WritableRaster raster, List<MultiPolygon> land, MultiPolygon catchment, Map<Integer, Integer> areas) throws Exception { Stack<Param> _stack = new Stack<Param>(); Param _param = new Param(); _param.setExtent(extent); _param.setRect(rect); _param.setFs(land); _stack.push(_param); this.calculate(_stack, raster, catchment, areas); } COM: <s> calculate the land area for each altitude level zone </s>
funcom_train/2581983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getFirstMillisecond(Calendar calendar) { calendar.set(this.year, this.month - 1, 1, 0, 0, 0); calendar.set(Calendar.MILLISECOND, 0); // in the following line, we'd rather call calendar.getTimeInMillis() // to avoid object creation, but that isn't supported in Java 1.3.1 return calendar.getTime().getTime(); } COM: <s> returns the first millisecond of the month evaluated using the supplied </s>
funcom_train/7876617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Insets getBorderInsets(Component c, Insets insets) { // if c is not a JTextArea...nothing is done... if (c instanceof JTextPane) { int width = lineNumberWidth((JTextPane) c); if (location == LEFT_SIDE) { insets.left = width; } else { insets.right = width; } } return insets; } COM: <s> this modifies the insets by adding space for the line number on the </s>
funcom_train/37657481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void locationFieldInit() { LOGGER.entering(getClass().getName(), "locationFieldInit"); assert locationField == null : "locationField already initialized."; locationField = new JTextField(PREFS.get("pmdLocation", "")); locationField.setEditable(false); LOGGER.exiting(getClass().getName(), "locationFieldInit"); } COM: <s> initializes the location field </s>
funcom_train/8608979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeGeneralInfo(ByteBuffer buf, Item item) { writeD(buf, item.getObjectId()); ItemTemplate itemTemplate = item.getItemTemplate(); writeD(buf, itemTemplate.getTemplateId()); writeH(buf, 0x24); writeD(buf, itemTemplate.getNameId()); writeH(buf, 0); } COM: <s> the header of every item block </s>
funcom_train/10674857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Result classFormatTest(String className, String message) { Logger logger = Logger.global; logger.info("Verify: " + message); try { Class cl = Class.forName(className); cl.newInstance(); return passed("class loaded and instantiated"); } catch (Throwable e) { return failed("caught " + e); } } COM: <s> tries to load and istanciate specified class </s>
funcom_train/46314150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsXmlContent getXmlContent() throws CmsException { if (m_xmlContent == null) { final CmsObject cms = getCmsObject(); final CmsFile file = cms.readFile(getAlbumPath()); m_xmlContent = CmsXmlContentFactory.unmarshal(cms, file); } return m_xmlContent; } COM: <s> returns the current albums xml content </s>
funcom_train/44101578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long doServiceDuration(long timeLeft) { /* * 1. 'Undergo service' (currently just wait) * 2. update the planState * 3. update the planPointer */ PlanStep planStep = plan.getCurrentPlanStep(); long currentTimeInDay = getSimulationTime(); int wakeUpTime = planStep.interval.getTo(); if(currentTimeInDay >= wakeUpTime) { state.setPlanState(WAIT_FOR_RESOURCE_ENTRY); return currentTimeInDay - wakeUpTime; } return 0; } COM: <s> this method simply waits until the exit time of this resource has passed </s>
funcom_train/33149122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RectangularShape convert(RectangularShape r) { double xmin = xToPixel(r.getMinX()); double ymin = yToPixel(r.getMinY()); double xmax = xToPixel(r.getMaxX()); double ymax = yToPixel(r.getMaxY()); r.setFrameFromDiagonal(xmin, ymin, xmax, ymax); return r; } COM: <s> converts a rectangular shape from user coordinates </s>
funcom_train/50156474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ComplexTypeLabel getRepeatItemLabelObj(String siblingPath, String indexId) { prtln("\n getRepeatItemLabelObj: level: " + getLevel() + "\n" + xpath); ComplexTypeLabel labelObj = super.getRepeatItemLabelObj(siblingPath, indexId); if (state.hasFieldInfo(xpath)) { // prtln(" ... adding bpLink with " + xpath); labelObj.bestPractices = bestPracticesLink(xpath); } return labelObj; } COM: <s> gets the repeat item label obj attribute of the dlese jsp renderer object </s>
funcom_train/3631520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void completeTransaction(EjHeader trans) throws JposException{ int receiptNo = 0; receiptNo = context.fiscalPrinter().getReceiptNo(); logger.debug ("ReceiptNo:"+receiptNo); if (receiptNo > 0) trans.setTransNo(receiptNo); if (!trans.transHeader().updateState(com.globalretailtech.data.Transaction.COMPLETE)) { logger.warn("Transaction update failure" + trans.transHeader().toString()); } } COM: <s> updates trans no with receipe no and </s>
funcom_train/43245713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetExcludePreviousConditions() { System.out.println("setExcludePreviousConditions"); boolean excludePreviousConditions = true; InsuranceDG1Object instance = new InsuranceDG1Object(); instance.setExcludePreviousConditions(excludePreviousConditions); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set exclude previous conditions method of class org </s>
funcom_train/23235071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BitSet createBitSet(String binaryString) { BitSet bset = new BitSet(binaryString.length()); boolean bitTrue = false; for (int i = 0; i < binaryString.length(); i++) { if (binaryString.charAt(i) == '1') { bitTrue = true; } else { bitTrue = false; } bset.set(i, bitTrue); } return bset; } COM: <s> create a bit set based on a string representation of binary digits </s>
funcom_train/50863993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VehicleMission getMissionNeedingLoading() { VehicleMission result = null; List<Mission> loadingMissions = getAllMissionsNeedingLoading(person.getSettlement()); if (loadingMissions.size() > 0) { int index = RandomUtil.getRandomInt(loadingMissions.size() - 1); result = (VehicleMission) loadingMissions.get(index); } return result; } COM: <s> gets a random vehicle mission loading at the settlement </s>
funcom_train/28500583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JC_Propertyable getPrefProperty( final String pPath, final String pName, final boolean pUserPref ) throws JC_Exception { JC_Nodeable prefs = getPrefNode( this, pPath ); if (prefs!=null) { return prefs.getProperty( pName ); } return null; } COM: <s> get pref property </s>
funcom_train/21844696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value getElement( int rowNumber ) { Value row = getArray().get(rowNumber-1); if( row == null ) return null; Value r = new Value(Value.RECORD, null); for( int idx = 0; idx < columnNames.size(); idx++ ) { String key = columnNames.get(idx); Value element = row.getElement(idx+1); r.setElement(element, key); } return r; } COM: <s> get a single row from a table given the row number </s>