__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38543363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Color loadColor(Preferences node) { int red = node.getInt(RED_PREFERENCE, 255); int green = node.getInt(GREEN_PREFERENCE, 255); int blue = node.getInt(BLUE_PREFERENCE, 255); return new Color(red, green, blue); } COM: <s> enables to recover a color stored in the preferences as its rgb </s>
funcom_train/3709262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startApp(String appName) { try { //instantiate a new application object apps = new Application(inspector.getAppsURL()); //see if is started if (apps != null) { logger.info("Application "+appName+" started."); started = true; } } catch (Exception e) { logger.fatal("Could not create application"); logger.fatal(e); } } COM: <s> parse the application source and start the application </s>
funcom_train/33837102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int BoothInZone(String idZone) { try { ResultSet rs = DataUtility.excuteQuery("select count(*) as number from booth where status = 1 and idzone = " + "\'" + idZone + "\'"); rs.next(); int numberBooth = rs.getInt("number"); return numberBooth; } catch (SQLException ex) { ex.printStackTrace(); return 0; } } COM: <s> get number booth was be rent by exhibitor has status 1 and </s>
funcom_train/39134105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { synchronized (this) { if (!isInitialized) { log.debug("Tried to destroy when no Dozer instance started."); return; } try { unregisterJMXBeans(new JMXPlatformImpl()); } catch (Throwable e) { log.warn("Exception caught while disposing Dozer JMX MBeans.", e); } isInitialized = false; } } COM: <s> performs framework shutdown sequence </s>
funcom_train/22607264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableLayoutConstraints getConstraints(Component component) { for (Iterator iter = compList.iterator(); iter.hasNext();) { Comp comp = (Comp) iter.next(); if (comp.equals(component)) { return (TableLayoutConstraints) comp.clone(); // return copy of constraints only } } return null; } COM: <s> gets the constraints of a given component </s>
funcom_train/43327950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public double output(int i) { // if ((i<0) || (i>=data.net[nlayers-1].lsize)) // fatal("network::output - output %d out of range",i); return (data.net[data.net.length-1].n_out[i+1]); } COM: <s> return a network output </s>
funcom_train/18588962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public String toString() { String tempStr; Enumeration<String> extensions = filters.keys(); tempStr = extensions.nextElement(); while (extensions.hasMoreElements()) { tempStr += "," + extensions.nextElement(); } return tempStr + ";" + description; } COM: <s> returns the string representation of this object </s>
funcom_train/536368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MservResponse trackLocation(Track track) { String fileName = track.getUri().getPath(); return new MservResponse(245, String.format("Location for track %d/%d:\n\r%s", MservToolkit.getAlbumId(track.getAlbum()), MservToolkit.getTrackId(track), fileName)); } COM: <s> return the location for a single track </s>
funcom_train/12560225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setDisplayState(int lc_ch_offset, int p) { boolean lc_ls_set = (p & PSPCtrlCodes.LTRIGGER)!=0; boolean lc_rs_set = (p & PSPCtrlCodes.RTRIGGER)!=0; int lc_live_dpad = getLiveDPAD(p); boolean paint_req = detectPaintReq(lc_ch_offset, lc_ls_set, lc_rs_set, lc_live_dpad); chordal_offset=lc_ch_offset; ls_set=lc_ls_set; rs_set=lc_rs_set; live_dpad=lc_live_dpad; return paint_req; } COM: <s> set the current display state </s>
funcom_train/44544289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dropMidnight(Element resultElement, String timestamp) { final int indexOf = timestamp.indexOf(" 00:00:00"); if (indexOf > 0) { resultElement.setAttribute(QALabTags.DATE_ATTRIBUTE, timestamp.substring(0, indexOf)); } } COM: <s> remove the 00 00 00 from timestamp </s>
funcom_train/51339512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IRecordCompressor getRecordCompressor() { if (recordCompressorFactory == null) { return NOPRecordCompressor.INSTANCE; } if (!readOnly) { assert _writeCompressor != null; // Instance used for writes, which are single threaded. return _writeCompressor; } return recordCompressorFactory.getInstance(); } COM: <s> an object that knows how to de compress a node or leaf optional </s>
funcom_train/26630581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer description = new StringBuffer(); Iterator internalSnippetList = getIterator(); //loop through Interator while (internalSnippetList.hasNext()) { description.append(internalSnippetList.next()); description.append("\n"); } return description.toString(); } COM: <s> get string description of this class </s>
funcom_train/23855226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calcLine() { Point2D[] linePoints = new Point2D[2]; // line between parent and child linePoints[0] = new Point2D.Double(childNode.getRelativePos().x, 0); linePoints[1] = childNode.getRelativePos(); setPathToPolyline(linePoints); } COM: <s> tells the dendrogram edge to recalculate the line between parent and child </s>
funcom_train/41279920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeOldestPublishedEntry() { //Could be optimized, but it is significant? Enumeration enum = published.elements(); PutedEntry oldest = null; PutedEntry current = null; if (enum.hasMoreElements()) oldest = (PutedEntry) enum.nextElement(); else return; while (enum.hasMoreElements()) { current = (PutedEntry) enum.nextElement(); if (current.getTime() < oldest.getTime()) oldest = current; } published.remove(oldest.getKey()); } COM: <s> remove the oldest published entry from the putlist </s>
funcom_train/6347480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBoolean() throws IOException { PropertyStorageFactory f = PropertyStorageFactoryCreator.createXMLPropertyStorageFactory(); PropertyStorageExtended store = f.createPropertyStorage(TESTFILE); store.storeBoolean("booleankey", TEST_BOOLEANS[0]); assertEquals(store.getBoolean("booleankey"), TEST_BOOLEANS[0]); } COM: <s> tests storing and loading of boolean values </s>
funcom_train/16463819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isIncomingMessage(String pdu) { int index, i; i = Integer.parseInt(pdu.substring(0, 2), 16); index = (i + 1) * 2; i = Integer.parseInt(pdu.substring(index, index + 2), 16); if ((i & 0x03) == 0) return true; else return false; } COM: <s> todo should implement this properly using constants from </s>
funcom_train/45801437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValidationType() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_VALIDATION_TYPE); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return occ == null ? null : occ.getValue(); } COM: <s> returns the validation type </s>
funcom_train/28982416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackAccountSettings () { if (backAccountSettings == null) {//GEN-END:|39-getter|0|39-preInit // write pre-init user code here backAccountSettings = new Command ("Back", Command.BACK, 0);//GEN-LINE:|39-getter|1|39-postInit // write post-init user code here }//GEN-BEGIN:|39-getter|2| return backAccountSettings; } COM: <s> returns an initiliazed instance of back account settings component </s>
funcom_train/42750919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSelectingRecordCount() throws SQLException{ if(this.phrases == null || !( this.phrases.getCurrentClause() instanceof SELECTClause)) throw new SQLException("This query is not for SELECT, and this function is not supported for this status."); SELECTClause select = (SELECTClause)phrases.getCurrentClause(); SELECTClause selectCount = select.getSelectCountClause(); Query scq = new Query(conn, selectCount); Variable<Integer> count = new Variable<Integer>(0); scq.retrieve(count); return count.value; } COM: <s> gets the records count which this query currently selecting </s>
funcom_train/20385725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getFieldValue(String name, Object object) throws ValidationException { ValueStack stack = ActionContext.getContext().getValueStack(); boolean pop = false; if (!stack.getRoot().contains(object)) { stack.push(object); pop = true; } Object retVal = stack.findValue(name); if (pop) { stack.pop(); } return retVal; } COM: <s> return the field value named code name code from code object code </s>
funcom_train/16524740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTileset(TileSet set, String filename) throws Exception { OutputStream os = new FileOutputStream(filename); Writer writer = new OutputStreamWriter(os); XMLWriter xmlWriter = new XMLWriter(writer); xmlWriter.startDocument(); writeTileset(set, xmlWriter, filename); xmlWriter.endDocument(); writer.flush(); } COM: <s> saves a tileset to an xml file </s>
funcom_train/17783030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isUpdate(IResource res, IResourceDelta delta) { boolean ret=false; // Are the changes associated with the contents? if (res != null && res.getFileExtension() != null && (isNotationSupported(res.getFileExtension()) || isNotationSupported(res.getName())) && (delta.getFlags() & IResourceDelta.CONTENT) != 0) { ret = true; } return(ret); } COM: <s> this method determines whether the supplied resource </s>
funcom_train/51334009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getRequestedIdFromRenderParamNoExc(String paramname) { PortletRequest request = FacesUtils.getPortletRequest(); log.debug("Checking render parameters for a requested id"); if ((request.getParameter(paramname) == null) || (request.getParameter(paramname).length() <= 0)) { String msg = "Render parameter was null or zero-length, cannot get an id"; log.debug(msg); return AbstractBean.UNSAVED_VALUE; } int reqid = Integer.parseInt(request.getParameter(paramname)); return reqid; } COM: <s> gets the id of a requested object from a render parameter </s>
funcom_train/39138397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValues(String pPairsString) { InputStream xReader = new ByteArrayInputStream(pPairsString.getBytes()); try { load(xReader); } catch (IOException xEx) { throw new IllegalStateException( "unexpected exception: IOException while reading from a ByteArrayInputStream: " + xEx.getMessage()); } } COM: <s> add new entries </s>
funcom_train/41524649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Action getActionIfAuthorized(User user, Trial trial, String name){ Action action = null; Rol rol = getUserActiveRol(user, trial); //Controls bad conditions if( (rol != null) && (name != null) ){ action = actionDao.findActionByName(name); action = (action != null)?((rol.getActions().contains(action))?action:null):null; } return action; } COM: <s> whether or not a user is authorized to do some action </s>
funcom_train/48207046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stdEqualityOperatoes() { functions.add(new JavaNativeFunction(new OneArgFunctionBody() { @Override public Instance run1(Instance thiz, Instance arg0) { return _bool(thiz.equals(arg0)); } }, new FunctionSignature(OperatorsNames.EQ_NAME, type), BooleanType.INSTANCE)); functions.add(new JavaNativeFunction(new OneArgFunctionBody() { @Override public Instance run1(Instance thiz, Instance arg0) { return _bool(!thiz.equals(arg0)); } }, new FunctionSignature(OperatorsNames.NEQ_NAME, type), BooleanType.INSTANCE)); } COM: <s> adds and implmentations bases on instances equal method </s>
funcom_train/29884142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(String fname,int readwrite) { try { if (readwrite == 0) writer = new BufferedWriter(new java.io.FileWriter(fname+"")); else reader = new BufferedReader(new java.io.FileReader(fname+"")); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> opens the text file for reading and writing </s>
funcom_train/35283554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix4f getLocalToWorldMatrix(Matrix4f store) { if (store == null) { store = new Matrix4f(); } else { store.loadIdentity(); } // multiply with scale first, then rotate, finally translate (cf. // Eberly) store.scale(getWorldScale()); store.multLocal(getWorldRotation()); store.setTranslation(getWorldTranslation()); return store; } COM: <s> creates a transform matrix that will convert from this spatials </s>
funcom_train/33241580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Monad generateForce(){ Monad tempForce = null; if (ForceBreakOnPlane) { tempForce=this.generateNormalForce(); Monad tempTangentForce=this.generateTangentForce(); try { tempForce.Add(tempTangentForce); } catch (CladosException e) { System.out.println("Add of perturbing forces failed."); System.exit(0); } //errors caught earlier } else { tempForce=this.generateForceMonad(); } if (DEBUG) { System.out.println("Force generated magnitude is " +tempForce.MagnitudeOf()); } return tempForce; } COM: <s> this method collects the normal and tangential force monads adds them and </s>
funcom_train/48266546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getFlap() throws IOException { // System.out.println("gotFlap "+is.read()); char myChar = (char) (is.read()); if (myChar != '*') { return null; } myChar = (char) (is.read()); myChar = (char) (is.read()); myChar = (char) (is.read()); myChar = (char) (is.read()); int length = (myChar * 0x100) + is.read(); byte b[] = new byte[length]; is.read(b); return new String(b); } COM: <s> get a flap packet </s>
funcom_train/18456337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getByte(byte b, int offset, int length) { BitSet bitset = getBitSet(b); byte result = 0; for (int i = 0; i < length; i++) { int bit = offset + (length - i - 1); if (bitset.get(bit)) { if (i == 8) { result -= 128; } else { result += pot[i]; } } } return result; } COM: <s> returns a byte value of code length code bits </s>
funcom_train/36165842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getCurrentLineNumber() { if (text != null) { int caret = text.getCaretPosition(); Element rootElement = text.getDocument().getDefaultRootElement(); int lineNumber = rootElement.getElementIndex(caret); return lineNumber + 1; } return -1; } COM: <s> tries to determine the current line number that the caret is on </s>
funcom_train/45458306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; // Start off in the proper state. int state = Token.NULL; switch (initialTokenType) { case Token.LITERAL_STRING_DOUBLE_QUOTE: state = STRING; start = text.offset; break; case Token.LITERAL_CHAR: state = CHAR; start = text.offset; break; case Token.COMMENT_MULTILINE: state = MLC; start = text.offset; break; default: state = Token.NULL; } s = text; try { yyreset(zzReader); yybegin(state); return yylex(); } catch (IOException ioe) { ioe.printStackTrace(); return new DefaultToken(); } } COM: <s> returns the first token in the linked list of tokens generated </s>
funcom_train/50154926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUiLabelOf( String system, String metadataField, String metadataValue ) { String ret = (String)uiLabelOf.get( system + metadataField + metadataValue ); if ( ret == null ) { reportError( "getUiLabelOf is NULL for (" + system + metadataField + metadataValue + ")" ); ret = " "; } return ret; } COM: <s> gets the ui label of attribute of the metadata vocab object </s>
funcom_train/3741402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeLocations() { for (Iterator iter = baseGraph.getVertices().iterator(); iter.hasNext(); ) { Vertex v = (Vertex) iter.next(); Coordinates coord = (Coordinates) v.getUserDatum(getBaseKey()); if (coord == null) { coord = new Coordinates(); v.addUserDatum(getBaseKey(), coord, UserData.REMOVE); } if (!dontmove.contains(v)) initializeLocation(v, coord, currentSize); initialize_local_vertex(v); } } COM: <s> this method calls tt initialize local vertex tt for each vertex </s>
funcom_train/46845824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getInterfaceName() { try { Class[] a = getClass().getInterfaces(); for (int i = 0; i < a.length; i++) { if (a[i] != IService.class) return a[i].getName(); } } catch (Exception e) {} throw new RuntimeException("Event listener interface ill-defined."); } COM: <s> returns the interface name for this event listener </s>
funcom_train/51567328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel lab = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof String) { Font font = new Font((String) value, Font.PLAIN, 14); lab.setFont(font); lab.setText((String) value); } else { lab.setText("***"); } return lab; } COM: <s> return a component that has been configured to display the specified </s>
funcom_train/15636953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBigIntegers2() { System.out.println("toBigInteger2"); BigInteger expResult = new BigInteger("0"); BitString instance = BitString.createMin(); BigInteger result = instance.toBigInteger(); assertTrue(expResult.equals(result)); } COM: <s> test to big integer method </s>
funcom_train/23709141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSelected(Object cell) { System.out.println("mxGraphSelectionModel(line 86): selecionado o id " + ((mxCell)cell).getId() + " :: package com.mxgraph.view"); Manager.showAtributtes(((mxCell)cell).getId()); return (cell == null) ? false : cells.contains(cell); } COM: <s> returns true if the given cell is selected </s>
funcom_train/42783722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object unmarshall(ByteBuffer bb) { // 1st, read the length. int len = ((Integer) HLACodecFactory.hlaInteger32BE.unmarshall(bb)) .intValue(); BitSet bs = new BitSet(len); int index = 0; byte b = 0; while (index < len) { int pos = index % 8; if (pos == 0) { b = bb.get(); } if ((bitMask[pos] & b) == bitMask[pos]) { bs.set(index); } index++; } return bs; } COM: <s> read and decode array data to the end of bb </s>
funcom_train/24428751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { String str = getParameter("fps"); int fps = (str != null) ? Integer.parseInt(str) : Constants.DEFAULT_FPS; long period = (long) Constants.KILO / fps; System.out.println("fps: " + fps + ", period: " + period + "ms"); makeGUI(period * Constants.MEGA); // ms --> ns } COM: <s> initialize a new worm chase </s>
funcom_train/8915482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int calculateGCost(Node start, Node parent, Map map) { int extraCost = map.getCostForCell(start.getLocation().y, start.getLocation().x); if (parent == null) { return extraCost + AStarCost.NORMAL_MOVE; } else { int gCost = parent.getGCost(); if (start.isDiagonalWith(parent)) { return (extraCost + gCost + AStarCost.DIAGONAL_MOVE); } else { return (extraCost + gCost + AStarCost.NORMAL_MOVE); } } } COM: <s> calculates g cost see some a tutorial for more information </s>
funcom_train/7820955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getOffset(int column, int line) { int offset = 0; if (line < offsetAtStartOfLine.size()) { //First determine the offset of the current line then add the column number. //If the token references line 0, it means line 1. Line 1 is represented as 0 in the list. (First element) offset = offsetAtStartOfLine.get((line == 0) ? line : line - 1) + column; } return offset; } COM: <s> given a specific node location determine the offset </s>
funcom_train/2919250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTarget64BitStringFromValue(long word) { int numHexDigits = 8*2; StringBuffer buf = new StringBuffer(numHexDigits+2); buf.append("0x"); String digits = Long.toHexString(word); digits = digits.toUpperCase(); int padding = numHexDigits - digits.length(); // pad left with zeros for (int i=1; i<=padding; i++) { buf.append('0'); } buf.append(digits); return buf.toString(); } COM: <s> convert long to 0x nnnnnnnnnnnnnnnn by default for spitting out </s>
funcom_train/19979662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setView(String view){ remove(viewerPanel); if(view == PERFORMANCE_VIEW){ ConfigOptions.CONFIG_OPTIONS.setGuiView(PERFORMANCE_VIEW); viewerPanel = makePerformanceViewersMain(); }else if(view == DEBUG_VIEW){ ConfigOptions.CONFIG_OPTIONS.setGuiView(DEBUG_VIEW); viewerPanel = makeDebugViewersMain(); }else{ throw new IllegalStateException(); } add(viewerPanel, BorderLayout.CENTER); validate(); pack(); setLocationRelativeTo(null); } COM: <s> sets the current view </s>
funcom_train/2852996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SiteList add (String name) { if (isSigned()) throw new IllegalStateException ("cannot add to signed SiteList"); if (name == null || name.length() == 0) throw new IllegalArgumentException ("null or empty file name"); name = name.trim(); contents.push (name); return this; } COM: <s> add a content line to the site list </s>
funcom_train/32630141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DatabaseProxy getDatabaseProxy(final Database database) throws DNotesException { try { return (DatabaseProxy) getDatabase(database.getServer(), database.getFilePath()); } catch (NotesException e) { final DominoException d = new DominoException(e); throw new NotesProxyException(RESOURCES.getString("session.cannot.get.databasekey"), d); } } COM: <s> for a given notes database instance returns the corresponding existing </s>
funcom_train/42442516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAction(HttpServletRequest request){ String action = "default"; Enumeration parameters = request.getParameterNames(); while (parameters.hasMoreElements()) { String parameter = (String) parameters.nextElement(); if( parameter.compareTo("action") == 0 ) { action = request.getParameter(parameter).toString(); } } return action; } COM: <s> try to retrieve the action information from the front end </s>
funcom_train/35140536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInjectSessionVariables() { InterceptorHelper helper = new InterceptorHelper(); MockServiceOne service = new MockServiceOne(); SemanticSessionFactory factory = helper.injectSemanticServiceFactory( getSemanticServiceAnnnotation(service), service, null); helper.injectSessionVariables(factory, getSessionVariablesAnnotation(service)); SemanticSession session = factory.getInstance(); super.assertNotNull(session.getContext().getSessionVariable("1")); session.dispose(); } COM: <s> test inject session variables </s>
funcom_train/47749496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String readIpv6Adress(byte[] Byte, int startFrom) { byte[] ip = new byte[16]; System.arraycopy(Byte, startFrom, ip, 0, ip.length); String Add = ""; int j = 0; for (j = 0; j < ip.length; j += 2) { if (j != 0) Add += ":"; Add += toString(ip[j]) + toString(ip[j + 1]); }// end for loop return Add; } COM: <s> read ipv6 adress on the byte array starting from the position </s>
funcom_train/45077671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttribute(Element node) { try { if( node.getAttributeCount() > 0) { Attribute n = node.getAttribute(0); if (n != null) return n.getValue(); else return ""; // return node.getAttributes().item(0).getNodeValue(); } } catch (Exception e) { cat.error("getAttribute failed "+e); } return ""; } COM: <s> generate a string representing the first attribute of a node </s>
funcom_train/9196506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Label createLabel(LabelBuilder builder, Properties labelInfo) { builder.setId(labelInfo.getProperty("id")); builder.setDescription(labelInfo.getProperty("description")); StringTokenizer tokenizer = new StringTokenizer(labelInfo .getProperty("tags"), "+"); while (tokenizer.hasMoreTokens()) { builder.setTag(tokenizer.nextToken()); } return builder.getLabel(); } COM: <s> instruct concrete builder to build the label by following the </s>
funcom_train/1909906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setStartSymbol(Symbol newStartSymbol){ Rule rule; for (Rule rule1 : rules) { rule = rule1; if (rule.getLHS().equals(newStartSymbol)) { //Check that start symbol exists startSymbol_index = rules.indexOf(rule); genotype2Phenotype();// Update phenotype. return true; } } return false; } COM: <s> change start symbol by symbol </s>
funcom_train/25010514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPositionForHero(final Hero hero) { int position = Globals.INT_999; if (hero != null) { for (int i = 0; i < Globals.INT_6; i++) { if (heroes.get(i) == null) { continue; } // looking for an initiate if (hero.equals(heroes.get(i))) { position = i; break; } } } return position; } COM: <s> finds the position a </s>
funcom_train/1590020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "LimitChronology[" + getBase().toString() + ", " + (getLowerLimit() == null ? "NoLimit" : getLowerLimit().toString()) + ", " + (getUpperLimit() == null ? "NoLimit" : getUpperLimit().toString()) + ']'; } COM: <s> a debugging string for the chronology </s>
funcom_train/34859006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildOutput() throws AtomException { Map<String, DataType> map = new HashMap<String, DataType>(); for ( AtomInput ai : inputs.values() ) { DataType type = NullDataElement.Factory.getType(); if ( ai.getLink() != null ) { type = ai.getLink().getType(); } map.put(ai.getName(), type); } this.type = AggregatedDataElement.Factory.getTypeFromSubTypes(map); update(false); } COM: <s> rebuilds the output data type </s>
funcom_train/31239947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLayout() { // Set width of text to current width here... textArea.setSize(size.getWidth(), 0); // Layout the text to fit the width... textArea.setFont(getFont()); // Set the height of this component to the calculated height of the text... setSize(size.getWidth(), textArea.getTextHeight()); // And move the text down to fit: textArea.setLocation(0, textArea.getTextHeight()); } COM: <s> resize the label to its preferred size </s>
funcom_train/46590740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void responseAll(Updater updater, FLNetworkConnection connection) { ClientListUpdate broadCastUpdate = new ClientListUpdate(ClientListUpdate.WELCOME + connection.getClientName()); List<FLNetworkConnection> connections = updater.listRegisteredConnections(); for (FLNetworkConnection c : connections) { broadCastUpdate.addClient(c.getClientId(), c.getClientName()); } updater.broadcastUpdate(broadCastUpdate); } COM: <s> notify all connected clients about new player arrival </s>
funcom_train/48085395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setSize(new java.awt.Dimension(624, 215)); jFrame.setTitle("Eve分词系统"); jFrame.setContentPane(getJContentPane()); jFrame.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/46589661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void comment(final String sTagName, final boolean bShow) { if (bShow) { this.sComments.remove(sTagName); this.sComments.add(StringFactory.get("!"+sTagName)); //$NON-NLS-1$ } else { this.sComments.add(StringFactory.get(sTagName)); this.sComments.remove("!"+sTagName); //$NON-NLS-1$ } } COM: <s> shortcut for easy hiding of pieces of html </s>
funcom_train/1440719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notestIsActiveLevel() { System.out.println("isActiveLevel"); String currentLevel = ""; java.util.logging.Level level = null; boolean expResult = false; boolean result = ServerLogsLevelProvider.isActiveLevel(currentLevel, level); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of is active level method of class server logs level provider </s>
funcom_train/33703957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Account_id_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Account_id_feature", "_UI_Account_type"), BankabeulePackage.Literals.ACCOUNT__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the id feature </s>
funcom_train/24039366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlStatus() { if (pnlStatus == null) { lblSF = new JLabel(); lblSF.setText("JLabel"); lblSF.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED); lblStatus = new JLabel(); lblStatus.setText("JLabel"); pnlStatus = new JPanel(); pnlStatus.setLayout(new BorderLayout()); pnlStatus.add(lblStatus, BorderLayout.WEST); pnlStatus.add(lblSF, BorderLayout.EAST); } return pnlStatus; } COM: <s> this method initializes pnl status </s>
funcom_train/2911797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int updateList(Map<XfoafDomain, Long> input) { if (input != null) { Set<Map.Entry<XfoafDomain, Long>> entrySet = input.entrySet(); for (Map.Entry<XfoafDomain, Long> entry : entrySet) { XfoafDomain xfd = entry.getKey(); Long newValue = entry.getValue(); xfd.setPersonInterest(person, newValue); } return 0; } return -1; } COM: <s> updates interest level for given xfoaf domain and domain menagers person </s>
funcom_train/25437077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateRandomTargets() { Runnable generator = new Runnable() { @Override public void run() { while (model.getGameStatus().isGameRunning()) { // Sleep for a bit try { Thread.sleep((long) (Math.random() * TARGET_GENERATION_INTERVAL)); } catch (InterruptedException e) { e.printStackTrace(); } // Generate a target if (model.getGameStatus().isGameRunning()) { TargetGenerator.this.generateTarget(); } } } }; Thread runner = new Thread(generator); runner.start(); } COM: <s> starts another thread to spuriously generate targets every random amount </s>
funcom_train/26397547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContentToMessage(final String htmlContent, final Message msg) throws MessagingException { final MimeMultipart attachments = new MimeMultipart(); final MimeBodyPart textbody = new MimeBodyPart(); final String contentType = getContentType(); textbody.setContent(htmlContent, contentType); attachments.addBodyPart(textbody); msg.setContent(attachments); } COM: <s> sets the content as an attachment w proper mime type </s>
funcom_train/40526652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void requireModuleDefs(JobEnvelope source) { maybeBreakBlock(true, source); if (!moduleDefs) { emitStatement(quasiStmt("var el___;"), source); emitStatement( quasiStmt("var emitter___ = IMPORTS___.htmlEmitter___;"), source); started = moduleDefs = true; } } COM: <s> define bits needed by the emitter calls and the attribute fixup </s>
funcom_train/29955596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMutateReturnValues(final boolean v) { mMutateReturns = v; final NOP nop = mMutateReturns ? new NOP() : null; mMutatable[Constants.ARETURN] = nop; mMutatable[Constants.DRETURN] = nop; mMutatable[Constants.FRETURN] = nop; mMutatable[Constants.IRETURN] = nop; mMutatable[Constants.LRETURN] = nop; } COM: <s> set whether or not return values should be mutated </s>
funcom_train/18955893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (!(other instanceof MCRURNPK)) { return false; } MCRURNPK castother = (MCRURNPK) other; return new EqualsBuilder().append(this.getMcrid(), castother.getMcrid()).append(this.getMcrurn(), castother.getMcrurn()).isEquals(); } COM: <s> this method check the equalance of the given object with this class </s>
funcom_train/43848440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit(InputStream inputStream) throws XFormTransactionException { try { CommitterService cs = new CommitterServiceImpl(); cs.validate(sd, inputStream); cs.insert(table); } catch (CommitterServiceCommitEx ex) { throw new XFormTransactionException(ex.getMessage(), ex); } catch (CommitterServiceValidateEx ex) { throw new XFormTransactionException(ex.getMessage(), ex); } } COM: <s> definire un validatore dellinput </s>
funcom_train/31363629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute( ) throws BuildException { // project <- the project directory // location <- the location inside the build file // id <- identifier from buildfile if user added it // taget <- reference to the target it belongs to... if( ! _confFileExists() ) { emitDoxygenConfigFile(); } executeDoxygen(); } COM: <s> implementation of the ant tasks execute method </s>
funcom_train/640238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void importGraphToArrayLists() { graph = new ArrayList<ArrayList<SGYElement>>(); for (int i = 0; i <= maxHierarchy; i++) { graph.add(new ArrayList<SGYElement>()); } for (SGYElement actElement : vertices.values()) { graph.get(actElement.hierarchy).add(actElement); } } COM: <s> building an array list representing the graph fpr upcoming tasks </s>
funcom_train/43402661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String indexToLabel(int i) { if (reverseLabelMap == null) { return Integer.toString(i); } else if (i >= reverseLabelMap.length) { if (i < getFormCount()) { return Integer.toString(i); } else { return null; } } else { return reverseLabelMap[i]; } } COM: <s> returns the label corresponding to the given index code i code </s>
funcom_train/50899051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(String sDelimiter) { final int cCount = size(); StringBuffer oBuffer = new StringBuffer(30*cCount); for (int c=0; c<cCount; c++) { if (c>0) oBuffer.append(sDelimiter); oBuffer.append(getColumnName(c)); } return oBuffer.toString(); } // toString COM: <s> get list of column names </s>
funcom_train/18032587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuWorkspaceRestore() { if (m_menuWorkspaceRestore == null) { m_menuWorkspaceRestore = new JMenuItem(); m_menuWorkspaceRestore.setText(Messages.getString("FBMenu.62")); //$NON-NLS-1$ m_menuWorkspaceRestore.setMnemonic(Messages.getString("FBMenu.63").charAt(0)); //$NON-NLS-1$ } return m_menuWorkspaceRestore; } COM: <s> returns the workspace recovery item </s>
funcom_train/26618025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onChange(BaseModel baseModel, String propertyName) { m_mspJarlFile.onChange(baseModel, propertyName); m_mspFrameSlider.onChange(baseModel, propertyName); m_mspOptionsPane.onChange(baseModel, propertyName); m_mspRenderPane.onChange(baseModel, propertyName); m_mspRenderStatusPane.onChange(baseModel, propertyName); } COM: <s> foward the changes on </s>
funcom_train/44892683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (!(object instanceof UserCookie)) { return false; } UserCookie rhs = (UserCookie) object; return new EqualsBuilder().append(this.username, rhs.username) .append(this.dateCreated, rhs.dateCreated) .append(this.id, rhs.id) .append(this.cookieId, rhs.cookieId).isEquals(); } COM: <s> generated using commonclipse http commonclipse </s>
funcom_train/37075442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeqFeature(SeqFeatureI feature) { this.feature = feature; if (feature == null) { logger.error("Transaction set with null feature.", new Throwable()); } if (Config.getSaveClonedFeaturesInTransactions()) { featureClone = feature.cloneFeature(); } } COM: <s> set the touched seq feature i object </s>
funcom_train/48147319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCutPoints(double s, double t){ if (s < 0) s = 0; else if (s > 1) s = 1; x = s; if (t < 0) t = 0; else if (t > 1) t = 1; y = t; if (x < y) setSides(x, y - x, 1 - y); else setSides(y, x - y, 1 - x); } COM: <s> this method sets the cutpoints to specified values </s>
funcom_train/22232674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPhysicalEnvironment(PhysicalEnvironment physicalEnvironment) { synchronized (canvasList) { if (activeStatus) { if (this.physicalEnvironment != null) { this.physicalEnvironment.removeUser(this); } physicalEnvironment.addUser(this); } } this.physicalEnvironment = physicalEnvironment; if ((viewPlatform != null) && viewPlatform.isLive()) { VirtualUniverse.mc.postRequest(MasterControl.PHYSICAL_ENV_CHANGE, this); } repaint(); } COM: <s> sets the view models physical environment to the physical environment </s>
funcom_train/44315208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches( String patternPath ) { if ( patternPath == null ) throw new IllegalArgumentException(); PathMatcher.Pattern pattern = (PathMatcher.Pattern) _patternCache.get( patternPath ); if ( pattern == null ) { pattern = new PathMatcher.Pattern( patternPath ); _patternCache.put( patternPath, pattern ); } return matches( pattern ); } COM: <s> does the target path match the given pattern </s>
funcom_train/47281479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (calledFromTopMenu) { this.project = MMSUtils.getTreeObject(this.swingSession.getTree(),Project.class); if (project == null) return; } int responds = JOptionPane.showConfirmDialog(swingSession.getFrame(), "Are you sure you want to delete the project [" + project.getName() + "]?", "Confirm Delete", JOptionPane.YES_NO_OPTION); if ( responds != JOptionPane.YES_OPTION ) return; swingSession.delete(project); } COM: <s> performs the delete action if a project is selected </s>
funcom_train/7697716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invokeFunction(String func, Object... args) { Object result = null; try { result = getInvocableEngine().invokeFunction(func, args); } catch (ScriptException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } return result; } COM: <s> execute a function defined in script and pass them </s>
funcom_train/23326160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSlotName(Slot theSlot) { String slotName = theSlot.getName(); if (!useJADENames) { return slotName; } // if there is a JADE name use this as the slot name if (jadeNameSlot != null) { Object temp = theSlot.getOwnSlotValue(jadeNameSlot); if (temp != null) { slotName = (String) temp; } } return slotName; } COM: <s> get the name of the slot </s>
funcom_train/25423024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HtmlOutputText makeResultText(FacesContext facesContext, String text) { HtmlOutputText outText = new HtmlOutputText(); outText.setEscape(false); outText.setValue(text); if (getResultStyleClass().length() > 0) { outText.setStyleClass(getResultStyleClass()); } return outText; } COM: <s> makes an html output text component for result text display </s>
funcom_train/26601775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkForDelimeters(ParseElements pe) { for (int i = 0; i < delimitedTokens.length; ++i) { if (pe.queryArray[pe.position] == delimitedTokens[i]) return true; } for (int i = 0; i < reserveWord.length; ++i) { if (pe.queryArray[pe.position] == reserveWord[i]) return true; } return false; } COM: <s> checks for delimeters with respect to query for identifying keywords </s>
funcom_train/3156508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GeoPos getGeoPos(final PixelPos pixelPos, GeoPos geoPos) { if (geoPos == null) { geoPos = new GeoPos(); } geoPos.lat = _latGrid.getPixelFloat(pixelPos.x, pixelPos.y); geoPos.lon = _lonGrid.getPixelFloat(pixelPos.x, pixelPos.y); return geoPos; } COM: <s> returns the latitude and longitude value for a given pixel co ordinate </s>
funcom_train/21375989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Serializable findPrimaryKey(PrunableEntity entity, List<Field> fields) throws SecurityException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { for ( Field field : fields ) { Annotation a = field.getAnnotation(Id.class); if ( a != null ) { return (Serializable)getValue(field, entity); } } return null; } COM: <s> helper method to find the value of the primary key for an entity </s>
funcom_train/808416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IExampleManager getExampleManager() { IExampleManager exampleManager = null; try { exampleManager = (IExampleManager) finderTracker.waitForService(1000*30); } catch (InterruptedException e) { throw new IllegalStateException("Could not get example manager", e); } if(exampleManager == null) { throw new IllegalStateException("Could not get example manager"); } return exampleManager; } COM: <s> returns a reference to the example manager object </s>
funcom_train/50909518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move(int direction) { try { Moving command; command = new Moving(((Model)model).getPlayerCharacter(),direction); command.move(); //update screen model.actionCompleted(); } catch (Exception e) { logger.severe("Moving failed. Message: " + e.getMessage()); //TODO: error handling } } COM: <s> moves one step to given direction if it is possible </s>
funcom_train/18479652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix4 setTranslation(double x,double y,double z) { return new Matrix4( m00,m01,m02,x, m10,m11,m12,y, m20,m21,m22,z, m30,m31,m32,m33) ; } COM: <s> returns a matrix that is this matrix with the translation set </s>
funcom_train/3942938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check(String pValue) throws Exception { this.value = pValue; try { if (pValue.equals(EMPTY_STRING)) { return false; } File tFile = new File(pValue); File pParentDirectory = tFile.getParentFile(); if (pParentDirectory.exists() && pParentDirectory.canRead() && pParentDirectory.canWrite()) { return true; } } catch (Exception err) { return false; } return false; } COM: <s> checks if the parameter value is an creatable file or not </s>
funcom_train/44284863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection filterDescriptorsByManufacturer(Collection col, String manufacturer) { TreeSet treeset = new TreeSet(); for(Iterator i=col.iterator(); i.hasNext();) { DeviceDescriptor descriptor = (DeviceDescriptor) i.next(); if(descriptor.getManufacturer().equals(manufacturer)) { treeset.add(descriptor); } } return(treeset); } COM: <s> returns a sorted collection of device descriptors with the manufacturer code manufacturer code </s>
funcom_train/34710551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doFilesClear() { LOG.debug("doFilesClear()"); this.itemRescan.setEnabled(false); this.itemReorder.setEnabled(false); this.itemClear.setEnabled(false); this.fileSizeKb = 0L; this.files = new ArrayList<String>(0); this.lblPath.setText(""); this.lblFiles.setText("[]"); this.lblSize.setText("0.0 KB"); this.lblFormat.setText(""); } COM: <s> clears folderpath files size format attribute manipulating visible gui components only </s>
funcom_train/3815162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { microphone.clear(); microphone.startRecording(); Result result = recognizer.recognize(); microphone.stopRecording(); if (result != null) { String resultText = result.getBestFinalResultNoFiller(); if (!resultText.isEmpty()) { String zip = convertResultToZip(resultText); fireListeners(zip); } else { fireListeners(null); } } } COM: <s> performs a single recognition </s>
funcom_train/17624287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fixWindowSize() { Insets insets = this.getInsets(); int w = Settings.getBrickSize() * Layout.MAX; int h = Settings.getBrickSize() * Layout.MAX; this.setSize(w + insets.left + insets.right, h + insets.top + insets.bottom + getJMenuBar().getHeight()); } COM: <s> method sets game window size </s>
funcom_train/34558260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final Component component, int top, int right) { component.setStyle("position:absolute;right:" + right + "px;top:" + top + "px;z-index:1000000;"); if (mapRendered) { component.render(MapPanel.this.getBody().getDOM()); } else { addListener(MAP_RENDERED_EVENT, new Function() { public void execute() { component.render(MapPanel.this.getBody().getDOM()); } }); } } COM: <s> add an absolutely positioned component over the map panel at the specificed location </s>
funcom_train/48562384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { InterviewServiceAsync interviewRpcService = GWT.create(InterviewService.class); HandlerManager eventBus = new HandlerManager(null); Authentication interviewerAuthentication = new InterviewerAuthentication(interviewRpcService); Authentication interviewedAuthentication = new InterviewedAuthentication(interviewRpcService); AppController app = new AppController(eventBus, interviewRpcService, interviewerAuthentication, interviewedAuthentication); app.go(RootPanel.get()); RootPanel loading = RootPanel.get("loading");; loading.setVisible(false); } COM: <s> this is the entry point method </s>
funcom_train/3772198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getNamespaces() { Vector namespaces = new Vector(); Enumeration enum = Domain.enumerateNamespaces(); while (enum.hasMoreElements()) { String name = (String)enum.nextElement(); NamespaceBean bean = getNamespace(name); if (bean != null) { namespaces.addElement(bean); } } return namespaces; } COM: <s> returns a vector of namespace beans representing all the namespaces </s>
funcom_train/1728422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logTransactions() { MockTransaction t = new MockTransaction(); managedObject = tLog.start(null, managedObject); int startVersion = tLog.getVersion().intValue(); // Log some transactions. tLog.log(t); tLog.log(t); tLog.log(t); // The version number should have been increased. assertEquals(tLog.getVersion().intValue(), 3 + startVersion); } COM: <s> changes to the managed object are logged as transactions </s>