__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/16971343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int depth(Node<T> node) { if(rootElement == null || !isInTree(node)) return -1; else{ int depth = 0; Node<T> tmp = node; while(!node.equals(rootElement)) { depth++; tmp = tmp.getParent(); } return depth; } } COM: <s> return the the level at which node is in the tree </s>
funcom_train/2731517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BooleanValue visit(ExistTerm existTerm) { logger.debug("<ExistTerm>"); Value[] boundValues = new Value[existTerm.getVariable().size()]; Object/*Term*/[] domains = existTerm.getRanges().toArray(); boolean bool = visitExistTerm(0, domains, boundValues, existTerm); BooleanValue value = BooleanValue.parseBooleanValue(bool); logger.debug("<Value>" + value + "</Value>"); logger.debug("</ExistTerm>"); return value; } COM: <s> evaluates an exist term </s>
funcom_train/22305310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Color colorForRow(int row, boolean isSelected) { Color c = getBackground(); if (isSelected) { return TedConfig.getInstance().getSelectedRowColor(); } if( (row%2)==0) { return TedConfig.getInstance().getEvenRowColor(); } else { return TedConfig.getInstance().getOddRowColor(); } } COM: <s> returns the appropriate background color for the given row </s>
funcom_train/8951562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMarker(Tribe pTribe, Color pTribeColor, Ally pAlly, Color pAllyColor) { invalidate(); addMarkerInternal(Marker.TRIBE_MARKER_TYPE, pTribe.getId(), pTribeColor); addMarkerInternal(Marker.ALLY_MARKER_TYPE, pAlly.getId(), pAllyColor); revalidate(true); } COM: <s> and both a tribe marker and an ally marker </s>
funcom_train/7427006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object object) { if (this == object) { return true; } if (!(object instanceof NotificationTarget)) { return false; } final NotificationTarget target = (NotificationTarget) object; if (method != target.method && (method == null || !method.equals(target.method))) { return false; } final Object o = get(); return o != null && o == target.get(); } COM: <s> returns true if this object is logically equivalent to the one passed </s>
funcom_train/34353402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDirectMapping(SSWAPGraphNode node) { this.directMappingStmts.put(node, jenaModel.createStatement(getResource(), SSWAP.mapsTo, node.getResource())); jenaModel.add((Statement) directMappingStmts.get(node)); } COM: <s> add the given node to the direct mappings and add a maps to </s>
funcom_train/35750597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFeature(final String feature, final boolean state) throws FilterException { try { parser.setFeature(feature, state); } catch (SAXNotRecognizedException e) { throw new FilterException("SAXNotRecognizedException", e); } catch (SAXNotSupportedException e) { throw new FilterException("SAXNotSupportedException", e); } } COM: <s> sets a feature on the neko html parser </s>
funcom_train/27811189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateUserByteCounts(User user, long bytesStreamedDelta, long bytesDownloadedDelta, long bytesUploadedDelta) { if (user == null) { return; } user.setBytesStreamed(user.getBytesStreamed() + bytesStreamedDelta); user.setBytesDownloaded(user.getBytesDownloaded() + bytesDownloadedDelta); user.setBytesUploaded(user.getBytesUploaded() + bytesUploadedDelta); userDao.updateUser(user); } COM: <s> updates the byte counts for given user </s>
funcom_train/14177118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createCancelButton(Composite parent) { cancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true, SWT.FLAT); if (arrowCursor == null) arrowCursor = new Cursor(cancel.getDisplay(), SWT.CURSOR_ARROW); cancel.setCursor(arrowCursor); setOperationCancelButtonEnabled(enableCancelButton); } COM: <s> creates the cancel button </s>
funcom_train/19096981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setLayout(null); this.setSize(266, 251); this.add(getSetInfo(), null); this.add(getSetWarn(), null); this.add(getSetError(), null); this.add(getRemStatus(), null); this.add(getEnableFinish(), null); } COM: <s> this method initializes this </s>
funcom_train/12536808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectMessage createObjectMessage(Object object) throws JMSException { if (object != null) { if (object instanceof Serializable) { return this.queueSession.createObjectMessage((Serializable) object); } else { throw new IllegalArgumentException(); } } else { return this.queueSession.createObjectMessage(); } } COM: <s> returns a new object message containing the specified code object code </s>
funcom_train/32950507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrimAsPayload( Trim trim, TolvenMessage tm ) throws JAXBException { JAXBContext jc = setupJAXBContext( ); ByteArrayOutputStream output = new ByteArrayOutputStream( ); Marshaller m = jc.createMarshaller(); m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE ); m.marshal( trim, output ); tm.setPayload(output.toByteArray()); } COM: <s> marshal a trim object graph to xml and add it to the message </s>
funcom_train/799983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getColor( RGB rgb ) { if ( rgb == null ) return null; notDisposed( device ); Color color = (Color) colors.get( rgb ); if ( color == null ) { color = new Color( device, rgb ); colors.put( SWTUtil.copy( rgb ), color ); } return color; } COM: <s> returns a color for the passed in rgb </s>
funcom_train/39533680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawCursor(Graphics g){ currentPosition=computeCurrentPosition(); //drawing the cursor Shape cursor=null; if(isHorizontal){ cursor=cursorShape.createTransformedShape( AffineTransform.getTranslateInstance( currentPosition, getHeight()-cursorShape.getBounds().height)); }else{ cursor=cursorShape.createTransformedShape( AffineTransform.getTranslateInstance( getWidth()-cursorShape.getBounds().width, currentPosition)); } //paint the cursor Graphics2D g2=(Graphics2D)g.create(); g2.setColor(fillColorCursor); g2.fill(cursor); g.dispose(); } COM: <s> draws the cursor </s>
funcom_train/35277106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void attachBoundingBox(BoundingBox bb, Node parent) { WireBox wb = new WireBox(bb.getXExtent(), bb.getYExtent(), bb.getZExtent()); Geometry g = new Geometry(); g.setMesh(wb); g.setLocalTranslation(bb.getCenter()); parent.attachChild(g); } COM: <s> used by attach bound children </s>
funcom_train/24513777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDialogContents() { jbtnCancel.setEnabled(true); jrbUp.setSelected(false); jrbDown.setSelected(true); jcbWholeWords.setSelected(false); jcbMatchCase.setSelected(false); jcbStartOnTop.setSelected(true); jcbProject.setSelected(false); jtfPhrase.setText(""); jtfReplace.setText(""); } COM: <s> set dialog components to their inital state </s>
funcom_train/17904978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tabPaneFocusChange(DockedTabContainer tabContainer) { DockedTabContainer[] dtca = {westContainer, centerContainer, eastContainer}; for (int i = 0; i < dtca.length; i++) { DockedTabContainer dtc = dtca[i]; if (dtc != null && dtc != tabContainer) { dtc.tabPaneFocusLost(); } } } COM: <s> indicates a focus change on the tab components and their containers </s>
funcom_train/18513371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCursor(DragSourceDragEvent dsde) { // set a cursor, depending on the action and on the location // Note the the default action is move, then copy and finally link setCursor(dsde.getDragSourceContext(), dsde.getTargetActions(), tree .getDraggedRow() != -1); } COM: <s> updates the cursor depending on a drag source drag event </s>
funcom_train/8872787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void servos()throws NullPointerException{ //Servos if(left.getRawButton(4)) servo1.set(0.4); else servo1.set(1.0); if(left.getRawButton(5)) servo2.set(0.6); else servo1.set(0.0); } COM: <s> this method is used to manipulate the servos </s>
funcom_train/11745162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInherited() { ObjEntity owningEntity = (ObjEntity) getEntity(); if (owningEntity == null) { return false; } ObjEntity superEntity = owningEntity.getSuperEntity(); if (superEntity == null) { return false; } return superEntity.getAttribute(getName()) != null; } COM: <s> returns code true code if attribute inherited from a super entity </s>
funcom_train/43501710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIncluded(File path) { boolean incExB = (this.includeRE == null) ? true : this.includeRE.match(path.getName()); if (!incExB) log.debug("Excluding: " + path.getAbsolutePath()); return incExB; } COM: <s> determines if a given file shall be visible </s>
funcom_train/18860012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLocationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramNode_location_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramNode_location_feature", "_UI_DiagramNode_type"), VisualizerPackage.eINSTANCE.getDiagramNode_Location(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the location feature </s>
funcom_train/40411749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testModifyItem() throws Exception { System.out.println("modifyItem"); Stock s = instance.getItemById(id); s.setHolding(12); instance.modifyItem(s); Stock m = instance.getItemById(id); if(m.getHolding() != s.getHolding()) fail("Failed to set number of holding"); } COM: <s> test of modify item method of class usyd </s>
funcom_train/1033640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void queueBuffers(Buffer[] buffers) { int numBuffers = buffers.length; int[] arr = new int[numBuffers]; for (int i = 0; i < numBuffers; i++) { arr[i] = buffers[i].bufferID; } al.alSourceQueueBuffers(sourceID, numBuffers, arr, 0); } COM: <s> queues one or more buffers on a source </s>
funcom_train/22204108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Locator other) { if (other == null) { return false; } if (!getClass().equals(other.getClass())) { return false; } return (other.getNotation().equals(getNotation()) && other.getAddress().equals(getAddress())); } COM: <s> determines the equality of this locator to code other code </s>
funcom_train/15627920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doMapCreateView(final boolean performAction) { final MapView<G, A, R> mapView = currentMapView; if (mapView == null) { return false; } if (performAction) { mapViewsManager.newMapView(mapView.getMapControl(), mapView.getScrollPane().getViewport().getViewPosition(), null); } return true; } COM: <s> executes the map create view action </s>
funcom_train/50077230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateUserDuplicatePrincipal() throws SecurityManagementException { UserManager userManager = (UserManager) Lookup.getInstance().fetchComponent( userManagerServiceLocation); try { Principal user = userManager.createUser(TEST_USERNAME, TEST_USERINFO); fail( "Created use with name [" + TEST_USERNAME + "], but " + "should have thrown DuplicatePrincipalException"); } catch (DuplicatePrincipalException dpe) { // success } } COM: <s> tests that creating a user with a name that already exists will </s>
funcom_train/45018469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNXflipperPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXinstrument_nXflipper_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXinstrument_nXflipper_feature", "_UI_NXinstrument_type"), NexusPackageImpl.Literals.NXINSTRUMENT__NXFLIPPER, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the nxflipper feature </s>
funcom_train/49695720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object readIntArray(Integer[] a, Element xob) { StringTokenizer st = new StringTokenizer(xob.getText()); int index = 0; while (st.hasMoreTokens()) { String s = st.nextToken(); // check for null values because this is a wrapper if (s.equals("null")) { a[index++] = null; } else { a[index++] = new Integer(s); } } return a; } COM: <s> reads an array of integer </s>
funcom_train/18846443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void serializeManualPTCT(ArrayList ptctCollObj, ManualProcessTaskContextType mptct) { String serObj = null; int idx = ptctCollObj.indexOf(mptct); mptct = new ManualProcessTaskContextType(); mptct = (ManualProcessTaskContextType) ptctCollObj.get(idx); serObj = mptct.serializePTCT(); if(log.isDebugEnabled()) { log.debug(componentID + ":: Serialized Manual PTCT = " + serObj); } ptctCollObj.set(idx, serObj); } COM: <s> serialize manual process task context type </s>
funcom_train/11745119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSourceIndependentFromTargetChange() { // note - call "isToPK" at the end of the chain, since // if it is to a dependent PK, we still should return true... return isToMany() || isFlattened() || isToDependentEntity() || !isToPK(); } COM: <s> returns a boolean indicating whether modifying a target of such relationship in any </s>
funcom_train/34396382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SearchExpressionBuilder add(LogicalExpressionOp op, SearchExpression expression) { if (null == currentExpression || (currentExpression instanceof EmptyExpression)) { // First expression if (op.isUnary()) { this.currentExpression = new LogicalExpression(op, expression, null); } else { this.currentExpression = expression; } } else { // Combine with current: this.currentExpression = new LogicalExpression(op, this.currentExpression, expression); } return this; } COM: <s> add a new </s>
funcom_train/51699604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Workflow getWorkflow(WorkflowDefinitionRepository repo, Object instanceId) throws WorkflowException { MemoryWorkflow wf = null; if (instanceId == null) { throw new WorkflowException("Workflow instance id cannot be null"); } wf = (MemoryWorkflow) workflowInstances.get(instanceId); if (wf == null) { throw new WorkflowException("No workflow instance found with id=" + instanceId); } return wf; } COM: <s> get a previously created workflow </s>
funcom_train/28254268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPathString(Node n){ String path = ""; try{ Node node = n; while(node != getRootNode()){ path = "/" + node.getTitle() + path; node = getParent(node); } path = "internal:/" + path; }catch(NullPointerException ex){ System.out.println("Error resolving path name. There's probably something wrong with the tree structure."); } return path; } COM: <s> gets a string representing the path to a node </s>
funcom_train/2628518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAction() { System.out.println("setAction"); String action = ""; EventWrapper instance = new EventWrapper(); instance.setAction(action); // 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 action method of class event wrapper </s>
funcom_train/17923029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void increaseChangePanel(){ if (increaseLoops > split){ changePanel = 5; //no Panel should be changed return; } else{ changePanel++; } if (changePanel > split) { changePanel =1; } if (this.checkIfFrozen(changePanel) == true){ increaseLoops++; this.increaseChangePanel(); } else { return; } } COM: <s> this method increases the value of the variable change panel </s>
funcom_train/11729850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyMultiStringParent() throws RepositoryException { String[] emptyStringArray = new String[]{null}; property2.setValue(emptyStringArray); node.save(); assertEquals("Property.setValue(emptyStringArray) did not set the property to an empty array", 0, property2.getValues().length); } COM: <s> test the assignment of an empty property by assigning it a null array </s>
funcom_train/40234340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix activateLayer( Matrix x ){ Matrix input = x.transpose().times(w); input = input.transpose(); for ( int i = 0; i < input.getRowDimension(); i++ ){ double reaction = activation_func.activate( input.get( i, 0 ) ); input.set( i, 0, reaction ); } return input; } COM: <s> get input signals calculate input signal for each neuron and output theirs reactions </s>
funcom_train/39061792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocationName() { // dispid=210, type=PROPGET, name="LocationName" int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"LocationName"}); int dispIdMember = rgdispid[0]; Variant pVarResult = oleAutomation.getProperty(dispIdMember); if (pVarResult == null || pVarResult.getType() != OLE.VT_BSTR) return null; return pVarResult.getString(); } COM: <s> returns the current web page title </s>
funcom_train/35414098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public lalr_item add(lalr_item itm) throws internal_error { lalr_item other; not_null(itm); /* see if an item with a matching core is already there */ other = (lalr_item) _all.get(itm); /* if so, merge this lookahead into the original and leave it */ if (other != null) { other.lookahead().add(itm.lookahead()); return other; } /* otherwise we just go in the set */ else { /* invalidate cached hashcode */ hashcode_cache = null; _all.put(itm, itm); return itm; } } COM: <s> add a singleton item merging lookahead sets if the item is already part </s>
funcom_train/31106199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRole() { assertEquals( taskRole, relation.getRole( "Task.notes" )); assertEquals( noteRole, relation.getRole( "Note" )); assertEquals( null, relation.getRole( "" )); assertEquals( null, relation.getRole( "Task" )); } COM: <s> lookup roles by name </s>
funcom_train/18358355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialise(int reqPort, DataSource inAudio, String reqName) { int i = reqPort % 2; if ((reqPort % 2) != 0) { throw new IllegalArgumentException("requested port must be even"); } dataPort = reqPort; controlPort = dataPort + 1; audioSource = inAudio; participantName = reqName; setupFirstSession(); initialiseAudio(); } COM: <s> initialise data takes the port audio source entitye name </s>
funcom_train/33757861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ThreadStyle getThreadStyleAt(int x, int y) { if (showThreads) { x /= getScreenScale(); y /= getScreenScale(); ThreadSegment threadSegment = diagram.getThreadAt(x, y); if (threadSegment != null) { return threadSegment.getStyle(); } } return null; } COM: <s> gets the style of the thread at the specified position of the diagram </s>
funcom_train/36431308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeObject getProjectTree(String project, TreeObject root) throws IOException, SosException { if (project == null) { project = projectProps.getRootProject(); } BufferedReader br = execCommand(); checkResult(br.readLine()); root.setAttribute("database", projectProps.getDatabase()); root.setAttribute("id", project); return parseGetProjectTreeResult(br, root, 0, projectProps); } COM: <s> executes the sos command get project tree and store the output in a </s>
funcom_train/22710842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean displayPickedTestCases(List<PickedTestCase> pickedTestCases) { if (this.tableViewer.getTable().isDisposed()) { return false; } if (pickedTestCases == null) { throw new NullPointerException("pickedTestCases == null"); //$NON-NLS-1$ } refreshAndPackTable(pickedTestCases.toArray()); return true; } COM: <s> displays the given </s>
funcom_train/5421021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invokeBefores(final Object target) throws Throwable { if (ProfiledStatement.isTestCaseClass(testClass)) { invoke("setUp", target); } else { List<FrameworkMethod> befores = testClass.getAnnotatedMethods(Before.class); invoke(befores, target); } } COM: <s> here we invoke all set up methods </s>
funcom_train/8064791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void translateImpl(int dx, int dy) { _x1 += dx; _y1 += dy; _x2 += dx; _y2 += dy; _x += dx; _y += dy; // dont calcBounds because _w and _h are unchanged firePropChange("bounds", null, null); } COM: <s> translate this fig </s>
funcom_train/11378815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getType() { byte[] bytes = getBytes(); if (bytes == null || bytes.length == 0) { return null; } for (Type type : Type.values()) { if (type.code == (int) bytes[0]) { return type; } } return null; } COM: <s> get the type code embedded in the first byte </s>
funcom_train/35104919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeInt(int addr, int value) throws MemoryException { this.writeByte(addr , (byte)(value & 0xFF)); this.writeByte(addr + 1, (byte)(value >>> 8 & 0xFF)); this.writeByte(addr + 2, (byte)(value >>> 16 & 0xFF)); this.writeByte(addr + 3, (byte)(value >>> 24 & 0xFF)); } COM: <s> write one int to memory </s>
funcom_train/42090992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDeployedHostPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Architecture_deployedHost_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Architecture_deployedHost_feature", "_UI_Architecture_type"), C2Package.Literals.ARCHITECTURE__DEPLOYED_HOST, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the deployed host feature </s>
funcom_train/22202529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getColumnIndexForObject(MatrixNode mn, Object representedObject){ for(int i = 0; i < mn.getColumnCount(); i++){ Object o = mn.getColumn(i).getRepresentedObject(); if(o != null){ if(o.equals(representedObject)) return i; }else{ if(representedObject == null) return i; } } fail("The given Matrix does not contain a column that represents "+representedObject); return -1; } COM: <s> returns the index of the column that represents </s>
funcom_train/5036177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testArtifactsFromOtherProcessShouldNotShowInExplorerContents() { Artifact formOne = simpleProcess.createForm("FormOne", simpleFormType); Xprocess testProcess = testPortfolio.createProcess("Test Process"); assertNull(findThis(formOne, testProcess.getExplorerContents())); // leave simpleProcess clean formOne.delete(); } COM: <s> if process2 extends process1 the artifacts from process1 should not </s>
funcom_train/50157116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getToolHelp(String s) { FieldInfoReader fieldInfoReader = state.getFieldInfo(s); if (fieldInfoReader != null) { try { return fieldInfoReader.getDefinition(); } catch (Exception e) { prtln("getToolHelp: unable to obtain definition for " + s); } } return "${sf:decodePath(" + jspQuotedString(s) + ")}"; } COM: <s> attempts to return a metadata vocab field definition for the input string </s>
funcom_train/40322396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(300, 200); this.setTitle("Java2D - Ejemplo 4"); //this.setLayout(new GridLayout.) this.add(getPanelMutante(), BorderLayout.CENTER); this.add(getPanelInfo(), BorderLayout.SOUTH); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { System.out.println("windowClosing()"); System.exit(NORMAL); } }); } COM: <s> this method initializes this </s>
funcom_train/44869356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawGeometricBean getFPoint() { if (fPoint == null) { fPoint = new WCMDrawGeometricBean(); fPoint.setShape(10); fPoint.setFillColor(Color.magenta); fPoint.setColor(Color.magenta); fPoint.setX1(getAInput()); fPoint.setY1(getFOfA()); fPoint.setV(3); fPoint.setH(3); if (presentation) { fPoint.setV(5); fPoint.setH(5); fPoint.setLineWidth(3); } } return fPoint; } COM: <s> this method initializes f point </s>
funcom_train/51376326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getExpiresAt() throws AuthValidationException { if (vq == null) { throw new AuthValidationException("Use loadQueueEntry(...) method first"); } try { Date ex = vq.getFieldDate(ValidationQueue.FLD_EXPIRES_AT); return ex; } catch (DBException dbe) { throw new AuthValidationException("DB error", dbe); } } COM: <s> method to retrieve the absolute date time when the request expires </s>
funcom_train/14419496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StyledText findEditor(final Composite composite) { final ClassMatcher classMatcher = new ClassMatcher(StyledText.class); return (StyledText) syncExec(new WidgetResult() { public Widget run() { StyledText styledText = null; try { List findControls = finder.findControls(composite, classMatcher, true); styledText = (StyledText) findControls.get(0); } catch (Exception e) { log.error(e); } return styledText; } }); } COM: <s> finds the editor using the given composite </s>
funcom_train/32378669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInformation() { StringBuffer sb = new StringBuffer(); sb.append("GroupID : " + getGroupId()); sb.append("Group Name : " + getGroupName()); sb.append("Description : " + getDesc()); return sb.toString(); } COM: <s> returns a complete group information as a string </s>
funcom_train/3278068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NodeComponent addNodeComponent(Node node) throws DuplicateNodeException { NodeComponent nodeComp = new NodeComponent(this, node); try { componentList.add(nodeComp); } catch (DigraphException e) { throw new DuplicateNodeException(e.getMessage()); } // add component to the container list so it will be painted last digraphRenderer.add(nodeComp, 0); return nodeComp; } COM: <s> add a node to the digraph view but not to the internal digraph </s>
funcom_train/16435541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importReportCodesFrom(SSAccountPlan pAccountPlan) { Map<Integer, SSAccount> iMap = getAccountMap(); iAssessementYear = pAccountPlan.iAssessementYear; for (SSAccount iFromAccount : pAccountPlan.getAccounts()) { SSAccount iAccount = iMap.get(iFromAccount.getNumber()); if (iAccount != null) { iAccount.setReportCode(iFromAccount.getReportCode()); } } } COM: <s> copies the report codes from another account plan </s>
funcom_train/43427666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ByteBuffer pendingImage() { ByteBuffer pendingImg = _pendingImageMap.get(getClass()); if (pendingImg == null) { BufferedImage bi = Util.toBufferImage(pendingImageImpl()); pendingImg = Util.bufferedImagetoByteBuffer(bi); _pendingImageMap.put(getClass(), pendingImg); _pendingImageSizeMap.put(getClass(), new Dimension(bi.getWidth(), bi.getHeight())); } return pendingImg; } COM: <s> pending image in byte buffer format </s>
funcom_train/17700345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showRow(ResultSet rs) throws SQLException { for (int i = 1; i <= fields.size(); i++) { String field = rs.getString(i); JTextField tb = (JTextField) fields.get(i - 1); tb.setText(field); } } COM: <s> shows a database row by populating all text fields </s>
funcom_train/5432868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveData(){ if(currItem != null){ theEditPanel.saveData(currItem); nameTextActionPerformed(null); currItem.description = descText.getText(); currItem.model = modelText.getText(); currItem.image = imageText.getText(); currItem.sound = soundText.getText(); } } COM: <s> saves his fields </s>
funcom_train/20775744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Element value) { this.list[this.index] = value; this.index = (this.index + 1) % this.list.length; if (!this.isFull) { this.N++; if (this.N >= this.list.length) { this.isFull = true; } } } COM: <s> adds a value to the circular list </s>
funcom_train/8602453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIndent(int indent, int wrapInc) { if (indent < 0) throw new IllegalArgumentException("indent must be greater or equal" + " to zero"); if (indent * indentStr.length() >= maxLineLength) throw new IllegalArgumentException("indent is greater than maximum" + " line length"); if (indent + wrapInc < 0) throw new IllegalArgumentException("wrap indent must be greater or" + " equal to zero"); this.indent = indent; this.wrapInc = wrapInc; } COM: <s> sets the number of indentation steps which should be applied when a new </s>
funcom_train/4726447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAndSaveWriteLock(Transaction txn, GetResponse response, Key writeLock) { Entity toSave = response.getPureMetaData() == null ? response.getEntity() : response.getPureMetaData(); if (toSave != null) { toSave.setProperty(WRITE_LOCK_PROPERTY, writeLock); ds.put(txn, toSave); } } COM: <s> updates the write lock for a given entity </s>
funcom_train/29290109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getStatusRespone(String user_id, String survey_id) throws EJBException { Integer status = 0; try { Collection<ResponeCMPLocal> coll = getResponeCMPLocalHome().findCheckUserIsParticipate(user_id, survey_id); Iterator it = coll.iterator(); while(it.hasNext()) { ResponeCMPLocal responeLocal = (ResponeCMPLocal)it.next(); status = responeLocal.getStatus(); } } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } return status; } COM: <s> get status of respone </s>
funcom_train/44478436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document generateXML(){ Element dcel = new Element("dublin_core"); Document dcdoc = new Document(dcel); for(DCValue value : book.getDcvalues()){ Element dcval = new Element("dcvalue"); dcval.setAttribute("element", value.getElement()); dcval.setAttribute("qualifier", (value.getQualifier() != null)?value.getQualifier():"none"); if(value.getLanguage() != null) dcval.setAttribute("language", value.getLanguage()); dcval.setText(value.getValue()); dcel.addContent(dcval); } return dcdoc; } COM: <s> produces an xml with a dc export expected by dspace </s>
funcom_train/10238220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMAC(String password){ MessageDigest md = null; try { md = MessageDigest.getInstance("SHA"); } catch(NoSuchAlgorithmException e){} try { md.update(password.getBytes("UTF-8")); } catch(UnsupportedEncodingException e){} byte raw[] = md.digest(); String hash = (new BASE64Encoder()).encode(raw); return hash; } COM: <s> sha secure hash algorithm for password </s>
funcom_train/1493691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configMaxOutputVoltage(double voltage) { byte[] dataBuffer = new byte[8]; byte dataSize; m_maxOutputVoltage = voltage; dataSize = packFXP8_8(dataBuffer, voltage); setTransaction(LM_API_CFG_MAX_VOUT, dataBuffer, dataSize); } COM: <s> configure the maximum voltage that the jaguar will ever output </s>
funcom_train/19536313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(String aState) { if (aState == null || (aState = aState.trim()).length() == 0) { setState((WaitState)null); } else { setState(InitToolGameSettings.getInstance().getWaitState(aState)); } } COM: <s> set the value of state for this creature item </s>
funcom_train/35299220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnDisplaySize(int columnIndex, int size) throws SQLException { if (size < 0) { throw new SQLException("Invalid column display size. Cannot be less " + "than zero"); } checkColRange(columnIndex); colInfo[columnIndex].columnDisplaySize = size; } COM: <s> sets the normal maximum number of chars in the designated column </s>
funcom_train/20215976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getPin() { if (pin == null) {//GEN-END:|154-getter|0|154-preInit // write pre-init user code here pin = new TextField("Enter pin", null, 32, TextField.NUMERIC | TextField.PASSWORD);//GEN-LINE:|154-getter|1|154-postInit // write post-init user code here }//GEN-BEGIN:|154-getter|2| return pin; } COM: <s> returns an initiliazed instance of pin component </s>
funcom_train/38474094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActual(double newValue) { double oldDifference = getDifference(); double oldValue = actual; this.actual = newValue; actualChangeSupport.firePropertyChange( "prop", new Double(oldValue), new Double(newValue)); differenceChangeSupport.firePropertyChange( "prop", new Double(oldDifference), new Double(getDifference())); } COM: <s> method set actual </s>
funcom_train/44082896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get( String key ) { Object val = m_props.getProperty( fullKey(key) ); //WRZ Need to log these somewhere .. user will be interested if (val == null) { if (m_parent != null) val = m_parent.get(key); //parent will report its error too if (val == null) System.out.println( "Property \"" + fullKey(key) + "\" not defined" ); } return val; } COM: <s> get null returns the value of our root as a key </s>
funcom_train/40449419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public JsonObject deepCopy() { JsonObject result = new JsonObject(); result.members.putAll(members); for (Map.Entry<String, JsonElement> entry : result.members.entrySet()) { entry.setValue(entry.getValue().deepCopy()); } return result; } COM: <s> returns a deep copy of this object </s>
funcom_train/554447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeTab() { SnapshotDetailTabbedPaneContent tabToRemove = (SnapshotDetailTabbedPaneContent) this.getSelectedComponent(); int idx = this.indexOfComponent(tabToRemove); String keyToRemove = this.getTitleAt(idx); tabsHashtable.remove(keyToRemove); this.remove(tabToRemove); Snapshot snap = tabToRemove.getSnapshot(); SnapshotData data = snap.getSnapshotData(); Snapshot.removeSelectedSnapshot(data.getId()); } COM: <s> closes the currently selected tab </s>
funcom_train/4508494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyCloseListeners() { synchronized (listeners) { for (ConnectionCloseListener listener : listeners.keySet()) { try { listener.onConnectionClose(listeners.get(listener)); } catch (Exception e) { Log.error("Error notifying listener: " + listener, e); } } } } COM: <s> notifies all close listeners that the connection has been closed </s>
funcom_train/11735315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(Name name) { if (names.size() > NUM_NAMES_THRESHOLD) { ensureModifiable(); return names.add(name); } else { int size = names.size(); // get a cached set names = CACHE.get(names, name, !shared); // a set from the cache is always shared shared = true; return names.size() != size; } } COM: <s> adds a code name code </s>
funcom_train/269176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton mkButton(String name) { String label = null; String tip = null; label = this.getBundleMessage(name+ ".label"); tip = this.getBundleMessage(name+".tooltip"); JButton button = new JButton(label); button.setToolTipText(tip); return button; } COM: <s> convenience routine to make a localized jbutton </s>
funcom_train/33282151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jsxFunction_scrollByPages(final int pages) { final HTMLElement body = ((HTMLDocument) document_).jsxGet_body(); if (body != null) { body.jsxSet_scrollTop(body.jsxGet_scrollTop() + (WINDOW_HEIGHT * pages)); } } COM: <s> scrolls the window content down by the specified number of pages </s>
funcom_train/50863106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getPartManufacturingDemand(Part part) { double demand = 0D; // Get highest manufacturing tech level in settlement. if (ManufactureUtil.doesSettlementHaveManufacturing(settlement)) { int techLevel = ManufactureUtil.getHighestManufacturingTechLevel(settlement); Iterator<ManufactureProcessInfo> i = ManufactureUtil.getManufactureProcessesForTechLevel( techLevel).iterator(); while (i.hasNext()) { double manufacturingDemand = getPartManufacturingProcessDemand(part, i.next()); demand += manufacturingDemand; } } return demand; } COM: <s> gets the manufacturing demand for a part </s>
funcom_train/13211029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized private boolean nameAlreadyExists(String name) { for (int i=0; i<getNumClients(); i++) { NetworkClient client = getClient(i); if (client!=null && client.getState()==CONNECTED && client.getClientName().equals(name)) { return true; } } return false; } COM: <s> tests if one of the connected clients has the same name as </s>
funcom_train/25375200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = "CrossValidationSplitResultProducer: "; result += getCompatibilityState(); if (m_Instances == null) { result += ": <null Instances>"; } else { result += ": " + Utils.backQuoteChars(m_Instances.relationName()); } return result; } COM: <s> gets a text descrption of the result producer </s>
funcom_train/49469202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newTextCell(String content, String align) { // Create a cell and put a value in it. HSSFCell cell = createCell(); cell.setCellType(HSSFCell.CELL_TYPE_STRING); HSSFCellStyle cellStyle; if("center".equals(align)) cellStyle = getCenteredTextCellStyle(); else cellStyle = getTextCellStyle(); cell.setCellStyle(cellStyle); if(content == null) cell.setCellValue(""); else cell.setCellValue(content); } COM: <s> create a cell with a test in it and an optinnal alignment </s>
funcom_train/2524947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatAddresses(Address[] addrs) { if (addrs == null) return ""; StringBuffer strBuf = new StringBuffer(getDisplayAddress(addrs[0])); for (int i = 1; i < addrs.length; i++) { strBuf.append(", ").append(getDisplayAddress(addrs[i])); } return strBuf.toString(); } COM: <s> utility method for formatting msg header addresses </s>
funcom_train/1111534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { if (chooserTree.isSelectionEmpty()) return; TreePath[] treeSelection = chooserTree.getSelectionModel() .getSelectionPaths(); newModel.setValue((DefaultMutableTreeNode) treeSelection[0] .getLastPathComponent()); if (!useModelLabel.isSelected()) { newModel.setLabel(treeSelection[0].getLastPathComponent() .toString()); labelField.setText(newModel.toString()); } } COM: <s> the tree selection listener </s>
funcom_train/12127032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCamera(PCamera newCamera) { if (camera != null) { camera.setComponent(null); } camera = newCamera; if (camera != null) { camera.setComponent(this); Rectangle swtRect = getBounds(); camera.setBounds(new Rectangle2D.Double(swtRect.x, swtRect.y, swtRect.width, swtRect.height)); } } COM: <s> set the camera associated with this canvas </s>
funcom_train/13913664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commandAction(Command c, Displayable s) { try { if (c == backCommand) { display.setCurrent(backScreen); } else if (c == sendCommand) { display.setCurrent(sendingScreen); new Thread(this).start(); } } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> respond to commands including exit </s>
funcom_train/5867851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rollback(Execution exec, Throwable ex) { try { if (HibernateUtil.currentSession().getTransaction().isActive()) { log.debug("Trying to rollback database transaction after exception:"+ex); HibernateUtil.currentSession().getTransaction().rollback(); } } catch (Throwable rbEx) { log.error("Could not rollback transaction after exception! Original Exception:\n"+ex, rbEx); } } COM: <s> rollback the current session </s>
funcom_train/1170156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean filterByCardType(Card c) { boolean filterOut = false; if (!(searchTextField2.getText() == "")) { filterOut = !(c.getType().toString().toLowerCase().contains(searchTextField2.getText().toLowerCase())); } return filterOut; } COM: <s> p filter by card type </s>
funcom_train/34806446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialiseStatement(int pColCount, DbResultColumn[] pResultColumnArr) { // Double check this should only be called from DbResultSet amd will do this check first if (isStatementInitialised()) { throw new ExInternal("This Statement has already been initialised"); } else { mColCount = pColCount; mResultColumnArr = pResultColumnArr; mStatementInitialised = true; } } COM: <s> called from db result set on first run to set result values </s>
funcom_train/1548191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double transform(Object o) throws MathException { double value = Double.NaN; if (o instanceof Number || o instanceof String) { value = defaultTransformer.transform(o); } else { NumberTransformer trans = getTransformer(o.getClass()); if (trans != null) { value = trans.transform(o); } } return value; } COM: <s> attempts to transform the object against the map of </s>
funcom_train/66656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHorizontalAlignment(int align) { if (align == HA_LEFT) { alignOffset = 0; } else if (align == HA_CENTER) { alignOffset = (text2D.getWidth() / 2) * -1; } else if (align == HA_RIGHT) { alignOffset = text2D.getWidth() * -1; } alignOffset = alignOffset * getLocalScale().x; } COM: <s> sets the horizontal alignment of text to the target </s>
funcom_train/46760028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final TemplateModel template, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long templateId = store(template, chain, call); chain.execute(); // return primary key return templateId; } catch (Exception ex) { Log.exception(ex); Log.error(template); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the template model model creating a new template or updating existing rows </s>
funcom_train/25656485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OpenOfficeExecutorService () { if (executable != null) { new Thread(this, "OpenOfficeRunner").start(); // wait for the thread to start up. while (OpenOfficeExecutorService.me == null) Thread.yield(); } else { log.warn("OpenOffice is not running, the property specifying the install path did not exist."); } } COM: <s> start the thread to control execution of open office </s>
funcom_train/10182546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forget(Xid id) throws XAException { if (current == null || !id.equals(current)) { throwXAException(XAException.XAER_NOTA); } current = null; xaCon.transactionFailed(); if (active) // End was not called! System.err .println("WARNING: Connection not closed before transaction forget.\nConnection will not participate in any future transactions.\nAre you sure you want to be doing this?"); } COM: <s> indicates that no further action will be taken on behalf of this </s>
funcom_train/1760736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEntries(DocumentServiceEntry[] entries) { this.entries.clear(); this.clear(); HashMap<String, ArrayList<DocumentServiceEntry>> hier = getEntryHierarchy(entries); if (hier.containsKey("")) { for (DocumentServiceEntry entry : hier.get("")) { ExplorerTreeItem item = getEntryTreeItem(entry, hier); addItem(item); } } else { //no items } } COM: <s> sets the document entries to be displayed </s>
funcom_train/10619338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getCLong(long[] dst, int offset, int length) { checkArraysBounds(offset, dst.length, length, CLONG_SIZE == 8 ? 8 : 4); for (int i = 0, j = offset; i < length; i++, j++) { dst[j] = getCLong(i * CLONG_SIZE); } } COM: <s> this method transfers c long values into the given destination array </s>
funcom_train/40334538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("Receiver".equals(portName)) { setReceiverEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>