__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2759913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String urlToFileName(String url) { String fileName = url; fileName = fileName.replace('/', '_'); fileName = fileName.replace(':', '_'); fileName = fileName.replace('?', '_'); fileName = fileName.replace('&', '_'); return fileName; } COM: <s> converts the supplied url to a file name </s>
funcom_train/3275750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyBoardsOfTraversal (boolean begin) { Board[] boards = null; int event = ((begin) ? BoardEvent.TRAVERSAL_BEGIN : BoardEvent.TRAVERSAL_END); boards = game.getBoards(); if (boards != null) { for (int i=0; i < boards.length; i++) { boards[i].fireBoardEvent(event); } } } COM: <s> sends board event </s>
funcom_train/49469983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SupportContract getSupportContract(Integer support_contract_id) throws Exception, RaciException { Db db = dbRO(); try { _logger.info("Asset : getSupportContract "+support_contract_id); checkUserCanAccess(db); return DbSupportContract.getSupportContract(db, support_contract_id); } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> get a support contract </s>
funcom_train/11013878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof EscherComplexProperty)) { return false; } EscherComplexProperty escherComplexProperty = (EscherComplexProperty) o; if ( !Arrays.equals( _complexData, escherComplexProperty._complexData ) ) return false; return true; } COM: <s> determine whether this property is equal to another property </s>
funcom_train/18440874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getControlSequence(String controlSequence) throws Exception { if (controlSequences.containsKey(controlSequence)) { return controlSequences.get(controlSequence); } else { if (parent != null) { return parent.getControlSequence(controlSequence); } else { throw new Exception("Undefined control sequence: " + controlSequence + "."); } } } COM: <s> gets a parser object for a control sequence </s>
funcom_train/35083509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean incPattern(String text) { this.USEFILE = false; for (int idx = 0; idx < this.INCPATTERNS.size(); idx++) { if (JMeterUtils.getMatcher().contains(text, (Pattern) this.INCPATTERNS.get(idx))) { this.USEFILE = true; break; } } return this.USEFILE; } COM: <s> by default the method assumes the entry is not included unless it </s>
funcom_train/24001990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigInteger2 gcd(BigInteger2 val) { if (val.signum == 0) return this.abs(); else if (this.signum == 0) return val.abs(); MutableBigInteger a = new MutableBigInteger(this); MutableBigInteger b = new MutableBigInteger(val); MutableBigInteger result = a.hybridGCD(b); return new BigInteger2(result, 1); } COM: <s> returns a big integer2 whose value is the greatest common divisor of </s>
funcom_train/18729187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void relate(Geometric geometric) { if (geometric instanceof Surface) { relate((Surface) geometric); } else { Vertex origin = geometric.center(); double distance = plane().distance(origin); Relation relation = new Relation(geometric, String.valueOf(distance)); add(relation); } } COM: <s> relate the geometric to this coordinate system </s>
funcom_train/22545202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDefaultRenderers() { super.setDefaultRenderers(); TABLE.setDefaultRenderer(QualityHolder.class, QUALITY_RENDERER); TABLE.setDefaultRenderer(EndpointHolder.class, ENDPOINT_RENDERER); TABLE.setDefaultRenderer(ResultSpeed.class, RESULT_SPEED_RENDERER); TABLE.setDefaultRenderer(Date.class, DATE_RENDERER); TABLE.setDefaultRenderer(Float.class, PERCENTAGE_RENDERER); } COM: <s> sets the default renderers to be used in the table </s>
funcom_train/39294170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_text_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_text_feature", "_UI_DocumentRoot_type"), CntPackage.Literals.DOCUMENT_ROOT__TEXT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the text feature </s>
funcom_train/16486337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTemplateName() throws FusionGWException { Object template = registry.getAttribute( "org.fusiongw.velocity.template" ); if( kernel.getUser().getRegistry().getAttribute( "org.fusiongw.velocity.template" ) != null ) template = kernel.getUser().getRegistry().getAttribute( "org.fusiongw.velocity.template" ); return template.toString(); } COM: <s> retrieves the name of the current template </s>
funcom_train/20807669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readFile(String fileName) { File inputFile = new File(fileName); BufferedReader inputStream; StringBuffer fileInString = new StringBuffer(); String line; int counter = 0; try { inputStream = new BufferedReader(new FileReader(inputFile)); while((line = inputStream.readLine()) != null) { fileInString.append(line + "\n"); } } catch (Exception ex) { ex.printStackTrace(); } return fileInString.toString(); } COM: <s> this reads the file present as code file name code into a string </s>
funcom_train/46332075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getStringForPD(PointData pd) { Object data = pd.getData(); String res = pd.getTimestamp().toString(AbsTime.Format.HEX_BAT) + "\t"; res += getStringForObject(data); if (pd.getAlarm()) { res += "A"; } return res; } COM: <s> convert the point data to a line of ascii text </s>
funcom_train/38418438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateScenario(String mobileEntity, Point2D start, Point2D end) { if(currentScenario==null) return; currentScenario.updateInDesign(mMap); // hack for transition effect ArrayList newTransitions = currentScenario.recordEnd(); this.entityPart.reload(currentScenario); this.contextPart.reload(currentScenario); if(newTransitions.isEmpty()==false) { TransitionEffect te = new TransitionEffect( start, end, mobileEntity, newTransitions, mMap, false); this.mTransitionEffects.add(te); } } COM: <s> support transition arrows </s>
funcom_train/4656554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeSource(ParseSource source) throws IOException { if (source != null) { if (source.getInputStream() != null) { source.getInputStream().close(); } if (source.getReader() != null) { source.getReader().close(); } } } COM: <s> closes streams and readers associated with a parse source </s>
funcom_train/13196298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(GameEnv gameEnv) throws IllegalMoveException { if (gameEnv == null) { throw new IllegalArgumentException("gameEnv must be specified"); } Board board = gameEnv.getBoard(); Piece piece = board.getPiece(startLocation); if (piece == null) { throw new IllegalMoveException("Can't perform move : No piece found on starting location " + startLocation); } piece.moveTo(targetLocation); /* TODO : Provide feedback to view */ } COM: <s> executes the move on the specified gaming environment </s>
funcom_train/50577926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node simplify() { if (children != null) { for (int i = 0; i < children.length; ++i) { SimpleNode n = (SimpleNode) children[i]; if (n != null) { n = (SimpleNode) n.simplify(); } } } // Any custom simplification should be done here return this; } COM: <s> provides a mechanism for simplication of the expression </s>
funcom_train/3099749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int variant() { if (variant < 0) { // This field is composed of a varying number of bits if ((leastSigBits >>> 63) == 0) { variant = 0; } else if ((leastSigBits >>> 62) == 2) { variant = 2; } else { variant = (int)(leastSigBits >>> 61); } } return variant; } COM: <s> the variant number associated with this tt uuid tt </s>
funcom_train/2558063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setOverride(Type type, Object value, OutputNode node) throws Exception { Class expect = type.getType(); if(expect.isPrimitive()) { type = getPrimitive(type, expect); } return context.setOverride(type, value, node); } COM: <s> this method is used to set the override class within an element </s>
funcom_train/3411415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getAdvanceBetween(int start, int limit) { int localStart = start - fStart; int localLimit = limit - fStart; ensureComponents(localStart, localLimit); TextLine line = makeTextLineOnRange(localStart, localLimit); return line.getMetrics().advance; // could cache line in case getLayout is called with same start, limit } COM: <s> returns the graphical width of a line beginning at code start code </s>
funcom_train/1379011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PersistManager getPersistManager(){ /* Class cl = Thread.currentThread().getContextClassLoader().loadClass(this.props.getProperty("persist.manager")); Method method = cl.getDeclaredMethod("getInstance", new Class[]{}); Object obj = method.invoke(cl, new Object[]{}); if(obj instanceof PersistManager){ PersistManager pm = (PersistManager)obj; pm.setOntLibPath(this.props.getProperty("ont.lib.path")); return (PersistManager)obj; } return null; */ return pm; } COM: <s> get the persist manager </s>
funcom_train/19289536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuItem getAboutMenuItem() { if (aboutItem == null) { if (ControlThisComputer.isRunningOnMacOS()) { // don't make this and get the item for Mac OS X that's real from the library. aboutItem = new MenuItemAppleOSX.AboutMenuItem(this); } else { Menu helpMenu = getMenu("Help"); aboutItem = helpMenu.getMenuItem("About..."); } } return aboutItem; } COM: <s> get the about </s>
funcom_train/1301528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long reserveDrawer(long forMillis, String key) { final long result = NEXT_NUM.getAndIncrement(); claimNum2Drawer.put(result, new Drawer(forMillis)); if (key != null) { key2claimNum.put(key, result); } //System.out.println("reserved drawer #" + result + " forMillis=" + forMillis + " key=" + key); return result; } COM: <s> reserve a drawer for a time </s>
funcom_train/46455921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resizeFonts(double factor, DrawingPanel panel) { labelFont = FontSizer.getResizedFont(labelFont, factor); superscriptFont = FontSizer.getResizedFont(superscriptFont, factor); titleFont = FontSizer.getResizedFont(titleFont, factor); titleLine.setFont(titleFont); } COM: <s> resizes fonts by the specified factor </s>
funcom_train/24627756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void raise() { INode p = getParentNode(); if (p != null && p.getLastChild() != this) { p.removeChild(this); p.appendChild(this); // p.dump(); Browser br = getBrowser(); if (br != null) br.eventq(MSG_RAISED, this); Document doc = getDocument(); if (doc != null) doc.repaint(100); // probably done as part of remove/add } // //System.out.println("raise window: "+p); } COM: <s> windows added on top so raise to top remove add </s>
funcom_train/49952686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshWatchList() { if (stocks.size() == 0) { return; } String url = JSON_URL; Iterator<String> iter = stocks.iterator(); while (iter.hasNext()) { url += iter.next(); if (iter.hasNext()) { url += "+"; } } url = URL.encode(url) + "&callback="; // Send request to server by replacing RequestBuilder code with a call to a JSNI method. getJson(jsonRequestId++, url, this); } COM: <s> generate random stock prices </s>
funcom_train/5380990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void adjustGridLayout() { int numColumns = calcNumberOfColumns(); ((GridLayout) fieldEditorParent.getLayout()).numColumns = numColumns; if (fields != null) { for (int i = 0; i < fields.size(); i++) { FieldEditor fieldEditor = (FieldEditor) fields.get(i); fieldEditor.adjustForNumColumns(numColumns); } } } COM: <s> adjust the layout of the field editors so that </s>
funcom_train/47944903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCriteria(List<ExtractCriteria> listCriteria) throws MotuException, MotuNotImplementedException { if (LOG.isDebugEnabled()) { LOG.debug("updateCriteria() - entering"); } if (dataset == null) { createDataset(); } dataset.updateCriteria(listCriteria); if (LOG.isDebugEnabled()) { LOG.debug("updateCriteria() - exiting"); } } COM: <s> updates list of criteria into the dataset </s>
funcom_train/25974142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onResponse(boolean response) { if(response){ for(int i=0;i<this.records.size();i++){ String uuid = (String)this.records.get(i); JSONArray params = new JSONArray(); params.set(0, new JSONString(uuid)); if(i == (this.records.size() - 1)){ AuDoc.jsonCall.asyncPost2("recman.checkin", params, new UpdateResponseHandler(this.parent)); }else{ AuDoc.jsonCall.asyncPost2("recman.checkin", params, new NoOpResponseHandler()); } } } } COM: <s> checks in the records if used selects ok </s>
funcom_train/27826420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size() { int count=0; Iterator iterator=hashEntrySet.iterator(); while (iterator.hasNext()) { Map.Entry entry=(Map.Entry)iterator.next(); WeakValue weakValue=(WeakValue)entry.getValue(); if (weakValue==null || weakValue.get()!=null) count++; } return count; } COM: <s> returns the size of this set </s>
funcom_train/4307127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimer( int time, int warning ) throws Exception{ // Checks to see that time is in between the necessary frame // Sets time(class variable) to time(param value) if( ( time == -1 ) || ( ( time >= 10 || time <= 300 ) && ( warning >= 10 || warning <= 300 ) ) ){ timer = time; warningTime = warning; theDriver.setTimer( time, warning ); } else { throw new Exception( "Invalid timer settings" ); } } COM: <s> tell the kernel to set a time limit for each turn </s>
funcom_train/7801080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillSearchIndexResultSet(final List<ORecord<?>> resultSet, final Object indexResult) { if (indexResult != null) { if (indexResult instanceof Collection<?>) { Collection<OIdentifiable> indexResultSet = (Collection<OIdentifiable>) indexResult; if (indexResultSet.size() > 0) for (OIdentifiable o : indexResultSet) fillResultSet(resultSet, o); } else fillResultSet(resultSet, (OIdentifiable) indexResult); } } COM: <s> copies or loads by their </s>
funcom_train/13846630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void collisionDetection(ArrayList<Unit> units, float delta) { for (Unit unit : units) { unit.collideable.setPosition(unit.pos.getX(), unit.pos.getY(), 0f); } collEngine.checkCollisions(collGroup, false, this); } COM: <s> detect all collisions and correct them </s>
funcom_train/35743413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { sendTestMessages(pipe); System.out.println("[" + Thread.currentThread().getName() + "] Closing the pipe"); pipe.close(); } catch (Throwable all) { LOG.log(Level.SEVERE, "[" + Thread.currentThread().getName() + "] Failure in ConnectionHandler", all); } } COM: <s> main processing method for the connection handler object </s>
funcom_train/10620358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Dimension calcSize(int rows, int columns) { FontMetrics fm = getFontMetrics(getFont()); if ((fm == null) || !isDisplayable()) { return null; } int avWidth = fm.charWidth('_'); // take width of an 'average' character return new Dimension(avWidth * columns + 4, (fm.getHeight() + 1) * rows + 4); } COM: <s> calculates minimum size required for specified </s>
funcom_train/17570641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void make_buffer_bigger(){ char bufferEX[] = new char[this.buffer.length + buffersizeSequence]; System.arraycopy(this.buffer, 0, bufferEX, 0, buffer.length);//arraycopy(Object srcarray, int srcPos,Object destarray,int destPos,int length) this.buffer = bufferEX; } COM: <s> wil make the buffer bigger see buffersize sequence </s>
funcom_train/5635607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { try { return "<PyConnection user='" + this.connection.getMetaData().getUserName() + "', url='" + this.connection.getMetaData().getURL() + "'>"; } catch (SQLException e) { return "<PyConnection at " + hashCode() + ">"; } } COM: <s> produces a string representation of the object </s>
funcom_train/37777115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProperty(String key, String defaultValue) { String value = (String) m_valueMap.get(key); if (value == null && super.defaults != null) value = super.defaults.getProperty(key); if (value == null) value = defaultValue; return value; } COM: <s> searches for the property with the specified key in this property list </s>
funcom_train/12191600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestDefaultMarshallerElement parse(InputStream inputStream) { try { IBindingFactory bfact = BindingDirectory .getFactory(TestDefaultMarshallerElement.class); IUnmarshallingContext uctx = bfact.createUnmarshallingContext(); return (TestDefaultMarshallerElement) uctx.unmarshalDocument( inputStream, null); } catch (JiBXException e) { throw new RuntimeException(e); } } COM: <s> parses given stream </s>
funcom_train/38222054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { Iterator items = expressionBuffer.iterator(); while (items.hasNext()) { CParseToken current = (CParseToken) items.next(); System.out.println("Token=" + current.token + " Value=" + current.value + " LineNo=" + current.lineNo + " Position=" + current.position); } } COM: <s> prints this parsed expression for test purposes </s>
funcom_train/3925188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addObserver( Observer o ) { if ( o instanceof Client && ((Client)o).isOnline() && ((Client)o).getSession() != null ) { Logger.logDebug( "Transmitting to "+((Client)o).getSession() ); } super.addObserver(o); } COM: <s> start transmit to client todo </s>
funcom_train/22020954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMethod(String name, String parameters) { MethodProps m = new MethodProps(name, parameters, null, null, Constants.notStaticCst, Constants.publicCst); nameAndParametersToMeth.put(name + " " + parameters, m); methodsFigure.addLine(createMethText(m), m.static_, m.visibility); } COM: <s> add a new method to the class or interface </s>
funcom_train/26177158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString (Tag tag, Doc doc, HtmlStandardWriter writer) { this.driver.setDestinationDirectory(writer.configuration().destdirname); return this.taglet.getOutput( new JavaDocLogger(this.logger, this.taglet, writer, tag.position()), DocletParameterFactory.create(doc, writer), writer.commentTagsToString(doc, tag.inlineTags(), false, false) ); } COM: <s> given the code tag code representation of this custom </s>
funcom_train/48869041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getObjectAssociationButton() { if (objectAssociationButton == null) { objectAssociationButton = new JToggleButton("Object Association",new ImageIcon("resources/images/association.png")); objectAssociationButton.setToolTipText("Object Association"); group.add(objectAssociationButton); objectAssociationButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setSelectedButton(OBJECT_ASSOCIATION); } }); } return objectAssociationButton; } COM: <s> this method initializes object association button </s>
funcom_train/1579685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logState() { final List<ExecutableEntity> entities = Scheduler.instance .getCurrentAgents(); final HashMap<String, Gens> list = new HashMap<String, Gens>(); String state = ""; for (final ExecutableEntity e : entities) { if (e instanceof Gens) { list.put(e.getName(), (Gens) e); } } for (final String name : list.keySet()) { final Gens g = list.get(name); state += g.getActivity(); } state += "\n"; System.out.println(state); } COM: <s> log the agent state </s>
funcom_train/5261550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LegendItemCollection getLegendItems() { LegendItemCollection result = new LegendItemCollection(); if (getDataset() != null) { XYItemRenderer r = getRenderer(); if (r != null) { LegendItem item = r.getLegendItem(0, 0); result.add(item); } } if (getDataset(1) != null) { XYItemRenderer renderer2 = getRenderer(1); if (renderer2 != null) { LegendItem item = renderer2.getLegendItem(1, 1); result.add(item); } } return result; } COM: <s> override the get legend items method to handle special case </s>
funcom_train/17023120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long readLongValue(int bytes) throws ItchLibraryException { long nameLength = 0; for (int i = 0; i < bytes; i++) { nameLength <<= 8; try { nameLength += readUnsignedByte(); } catch (IOException e) { throw new ItchLibraryException(e); } } return nameLength; } COM: <s> utility method for reading variable amount of bytes </s>
funcom_train/47978937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V put( K mainKey, SK subKey, V value ) { if ( !_innerDoubleMap.containsKey( mainKey ) ) { _innerDoubleMap.put( mainKey, new HashMap< SK, V >() ); } _innerDoubleMap.get( mainKey ).put( subKey, value ); return this.get( mainKey, subKey ); } COM: <s> puts a value into the map </s>
funcom_train/21753590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPairToMap(Map names, String keyName, String valueName) { if (!names.containsKey(keyName)) { // create a empty set names.put(keyName, new HashSet()); } if (valueName != null) { // add the value to the key ((HashSet) names.get(keyName)).add(valueName); } } COM: <s> add a pair of names to the map </s>
funcom_train/10840876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSONObject adapt(Resource resource) throws JSONException { // TODO Find a better way to adapt a Resource to a JSONObject. StringWriter writer = new StringWriter(); jsResourceWriter.dump(resource, writer, 0, tidy); return new JSONObject(writer.getBuffer().toString()); } COM: <s> adapt a resource to a json object </s>
funcom_train/3924425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Logger.logDebug( "Async DB write running" ); while ( active ) { if ( q.size() > 0 ) { flush(); } else { try { Thread.sleep( sleep ); } catch ( InterruptedException ie ) { active = false; flush(); } } } thread = null; } COM: <s> writer thread run impl </s>
funcom_train/25763267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel3() { if (jPanel3 == null) { jPanel3 = new JPanel(); jPanel3.setLayout(new FlowLayout()); jPanel3.add(getDdTileProvider(), null); jPanel3.add(getBtnSetTileProvider(), null); } return jPanel3; } COM: <s> this method initializes j panel3 </s>
funcom_train/49403485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void transferAttributes(final AbstractSAMHeaderRecord record, final Map<String, String> textAttributes) { // All header tags are now of type String, so no need to distinguish standard from non-standard. for (final Map.Entry<String, String> entry : textAttributes.entrySet()) { record.setAttribute(entry.getKey(), entry.getValue()); } } COM: <s> transfer standard and non standard tags from text representation to in memory representation </s>
funcom_train/13546377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LinkedList getIndices(Instruction inst) { if(!Getelementptr.conforms(inst)) return (LinkedList) null; int i = 1; // Skip the first element (its the type of element). LinkedList indices = new LinkedList(); while(Getelementptr.hasVal(inst, i)) indices.add(Getelementptr.getValOperand(inst, i++)); return indices; } COM: <s> returns a linked list with the index operands of the specified gep inst </s>
funcom_train/50093193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IMolecule getMolecule2()throws Exception { IMolecule molecule = builder.newMolecule(); molecule.addAtom(builder.newAtom("C")); molecule.addAtom(builder.newAtom("C")); molecule.addBond(0, 1, IBond.Order.DOUBLE); molecule.addAtom(builder.newAtom("C")); molecule.getAtom(2).setFormalCharge(1); molecule.addBond(1, 2, IBond.Order.SINGLE); molecule.addAtom(builder.newAtom("C")); molecule.addBond(2, 3, IBond.Order.SINGLE); addExplicitHydrogens(molecule); return molecule; } COM: <s> get the molecule 2 c c c c </s>
funcom_train/39062903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeViewer() { Iterator i = includedProjects.iterator(); String projectName; IProject project; while (i.hasNext()) { projectName = (String)i.next(); project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember(projectName); if (project != null && project.exists()) { includeViewer.setChecked(project, true); } } } COM: <s> initializes the viewer so that all of the projects included in the </s>
funcom_train/49670689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLabelAppVersion() { labelAppVersion = new Label(shell, SWT.NONE); labelAppVersion.setText(Version.VERSION_NUMBER); labelAppVersion.setLayoutData( SharedStyle.relativeTo(labelAppSlogan, labelHomePage)); updateLabelAppVersion(); } COM: <s> creates label with application version </s>
funcom_train/12764285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logLineWithTime(String s) { s.replaceAll(eol(), "\\"); synchronized (log) { long time = System.currentTimeMillis(); String timeString = DateFormat.getTimeInstance(DateFormat.SHORT).format(new Date(time)); s = "<Time:"+timeString+">" + s + eol(); buffer.append(s); fireLineAdded(s); } } COM: <s> logs the given string with all newlines replaced by characters </s>
funcom_train/29850179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputSource resolveEntity(String publicId, String systemId) { systemId = systemId.toLowerCase(); if ((systemId.indexOf("xgmml.dtd") != -1) || publicId.equals(XGMMLConstants.PUBLIC_ID)) { return new InputSource( new BufferedReader( new InputStreamReader(getClass().getResourceAsStream("xgmml.dtd")))); } return null; } COM: <s> resolves the entity </s>
funcom_train/42667360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonExit() { if (jButtonExit == null) { jButtonExit = new JButton(); jButtonExit.setName("jButtonExit"); jButtonExit.setToolTipText("Exit the program"); jButtonExit.setRolloverEnabled(false); jButtonExit.setText("Exit"); jButtonExit.setAction(new Actioneer(this, jButtonExit)); } return jButtonExit; } COM: <s> this method initializes j button exit </s>
funcom_train/51572006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void path(String name, List<String> elements) { ExplicitPath path = new ExplicitPath(); for (String element : elements) { path.add(replaceTilde(stripQuotes(replaceTokens(element)))); } currentNamespace.putPath(name, path); log.log(Level.FINER, "created path '" + name + "' with elements " + elements); } COM: <s> create a named explicit path </s>
funcom_train/10518849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doTest(String target, String expectedStart, String expectedEnd) { executeTarget(target); String resultContent = read("result/concat." + target.substring(4) + ".test"); assertTrue("First 5 lines differs.", resultContent.startsWith(expectedStart)); assertTrue("Last 5 lines differs.", resultContent.endsWith(expectedEnd)); } COM: <s> executes a target and checks the beginning and the ending of a file </s>
funcom_train/17206521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean scanCheckPrimitiveArray(ObjectReference obj, int index, boolean total, int length) { if(VM.objectModel.isPrimitiveArray(obj)) { arrayPrimitiveStream.increment(index, (short)1); if (total) { totalPrimitives++; totalScalarUsedSpace += length; } return true; } else { return false; } } COM: <s> check if this object is an array of primitives </s>
funcom_train/12211465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean processTask(Attributes atts) throws SAXException { try { PlannerTask task = new PlannerTask(atts); for (PlannerIntegration pi : this.integration) { pi.processTask(task); } this.generatePlannerNode(task); } catch(PlannerException e) { throw new SAXException("Error while creating task from SAX attributes", e); } return false; } COM: <s> process a task </s>
funcom_train/13404590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillAudio(TreeSet audioMedia) { this.audioMedia = audioMedia; //store audioModel = new DefaultListModel(); Iterator it = audioMedia.iterator(); while (it.hasNext()) { Media m = (Media)it.next(); audioModel.addElement(m.toScriptEvent()); } audioList.setModel(audioModel); IconLoader il = new IconLoader(audioModel,audioList); il.start(); } COM: <s> fill audio list </s>
funcom_train/1575934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleAllAdds(final Container source, final Component child) { assert source != null; assert child != null; assert EventQueue.isDispatchThread(); // On AWT event thread if (child instanceof Container) { final Container container = (Container) child; final Component[] children = container.getComponents(); for (int i = 0; i < children.length; i++) handleAllAdds(container, children[i]); } handleAdd(source, child); } COM: <s> handle all adds </s>
funcom_train/19308933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeCIDSystemInfo(final StringBuilder p) { p.append("/CIDSystemInfo 3 dict dup begin" + EOL); p.append(" /Registry (Adobe) def" + EOL); p.append(" /Ordering (Identity) def" + EOL); p.append(" /Supplement 0 def" + EOL); p.append("end def" + EOL); } COM: <s> writes the cid sytem info portion of the cmap content </s>
funcom_train/17539857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (socketRunner != null) { socketRunner.terminate(); socketRunner = null; } if (sc != null) { try { sc.close(); } catch (IOException ex) { logger.error("Error closing socket", ex); } sc = null; } } COM: <s> if open then close connection to the server </s>
funcom_train/21954278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (getFolderInfo() != null) { String folderName = getFolderInfo().getFolderName(); if (getFolderInfo().hasUnread()) { return folderName + " (" + getFolderInfo().getUnreadCount() + ")"; } else { return folderName; } } else { return "no folder name"; } } COM: <s> override to string since we only want to display a folders </s>
funcom_train/20504280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getBookingId(Date dateMade, Date reservedUntil, BigDecimal price) { String sql = "select id from Booking where date_made = ? and reserved_until = ? and price = ?"; Object[] args = new Object[] { dateMade, reservedUntil, price }; return jdbcTemplate.queryForLong(sql, args); } COM: <s> returns the id of the booking record that holds the given values </s>
funcom_train/19308453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void begin() throws PsOperatorException { final PsObject object = popOperand(PsOperator.BEGIN); if (! (object instanceof PsDictionary)) { throw new PsOperatorException(PsError.TYPECHECK, PsOperator.BEGIN); } getInterpreter().getDictionaryStack().push((PsDictionary) object); } COM: <s> executes the begin operator </s>
funcom_train/47315529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readTag() throws IOException { if (isAtEnd()) { lastTag = 0; return 0; } final int tag = readRawVarint32(); if (tag >>> TAG_TYPE_BITS == 0) { // If we actually read zero, that's not a valid tag. throw ProtobufException.invalidTag(); } lastTag = tag; return tag; } COM: <s> attempt to read a field tag returning zero if we have reached eof </s>
funcom_train/27678578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mustReadEq() { // Drop any prefix space this.dropS(); // Get the next character, which must be equals char ch = this.getChar(); if ( ch != '=' ) { throw new XmlWellFormednessAlert( "'=' character expected" ).culpritChar( ch ).mishap(); } // Drop any postfix space this.dropS(); } COM: <s> tests if the next input sequence matches the code eq code production </s>
funcom_train/1797185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void declareExtensions() { new CellFeed().declareExtensions(extProfile); new ListFeed().declareExtensions(extProfile); new RecordFeed().declareExtensions(extProfile); new SpreadsheetFeed().declareExtensions(extProfile); new TableFeed().declareExtensions(extProfile); new WorksheetFeed().declareExtensions(extProfile); } COM: <s> declare the extensions of the feeds for the google spreadsheets service </s>
funcom_train/51101017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isContainingDeclaredListProperties() { if (entity == null) { return false; } Iterator it = entity.getDeclaredRelationships().iterator(); while(it.hasNext()) { Relationship r = (Relationship) it.next(); if(r.isToMany()) { return true; } } return false; } COM: <s> returns true if current entity contains at least one declared list property </s>
funcom_train/3787021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setHelpData(String newHelpData[]) { /* setHelpData */ if(tCols!=newHelpData.length) return(false); tHelp= new String[tCols]; for(int i=0;i<tCols;i++) tHelp[i]= newHelpData[i]; return(true); } /* setHelpData */ COM: <s> set help data set t help list for table </s>
funcom_train/4933849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDrools() { if (translator == null) { setTranslator(new N3DroolsEngineFacade()); if (infrastructure_project) { getTranslator().setMessageLevel(Level.SEVERE); // translator.setJavaObjectsInDrools( true ); // TODO test and activate } translator.setJavaObjectsInDrools(javaObjectsInDrools); } } COM: <s> lazily create the </s>
funcom_train/7613575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCompressionMode(int mode) { checkWriteCompressed(); switch (mode) { case MODE_EXPLICIT: { compressionMode = mode; unsetCompression(); break; } case MODE_COPY_FROM_METADATA: case MODE_DISABLED: case MODE_DEFAULT: { compressionMode = mode; break; } default: { throw new IllegalArgumentException("Illegal value for mode!"); } } } COM: <s> sets the compression mode to the specified value </s>
funcom_train/10532748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOverload() throws Exception { assertEquals("Good morning", _helloBean.hello("Good morning")); assertEquals("99", _helloBean.hello(99)); boolean bytes[] = {true, false, true, false}; assertEquals("truefalsetruefalse", _helloBean.hello(bytes)); } COM: <s> tests invoking overloaded methods on a control </s>
funcom_train/9021277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void optimize() { if(optimized()||thePattern==null) return; minMatch = new patInt(0);//thePattern.countMinChars(); thePattern = RegOpt.opt(thePattern,ignoreCase, dontMatchInQuotes); skipper = Skip.findSkip(this); //RegOpt.setParents(this); return; } COM: <s> once this method is called the state of variables </s>
funcom_train/10929258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String buildPredicates(TypeDefinition fromType, String condition) { String typeCondition = jcrTypeCondition(fromType); if (typeCondition == null) { return condition == null ? "" : "[" + condition + "]"; } else if (condition == null) { return "[" + typeCondition + "]"; } else { return "[" + typeCondition + " and " + condition + "]"; } } COM: <s> build a xpath predicate for the given cmis type and an additional condition </s>
funcom_train/24468784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractSubfieldContent(final String line, final String code) { String output = ""; try { final String identifier = "<subfield code=\"" + code; if (line.contains(identifier)) { output = StringEscapeUtils.unescapeXml(line.substring(line.indexOf(identifier) + 19, line .indexOf("</subfield>"))).trim(); output = addSpace4Interpunctuation(output); } } catch (final Exception e) { System.out.println(line + " | " + e); } return output; } COM: <s> extracts the content of a subfield with a given code </s>
funcom_train/28754042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumofbases(Long newVal) { if ((newVal != null && this.numofbases != null && (newVal.compareTo(this.numofbases) == 0)) || (newVal == null && this.numofbases == null && numofbases_is_initialized)) { return; } this.numofbases = newVal; numofbases_is_modified = true; numofbases_is_initialized = true; } COM: <s> setter method for numofbases </s>
funcom_train/43321853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invite(JID toInvite, String description) { ISarosSession sarosSession = sarosSessionObservable.getValue(); OutgoingSessionNegotiation result = new OutgoingSessionNegotiation( toInvite, sarosSession.getFreeColor(), sarosSession, description, sarosContext); OutgoingInvitationJob outgoingInvitationJob = new OutgoingInvitationJob( result); outgoingInvitationJob.setPriority(Job.SHORT); outgoingInvitationJob.schedule(); } COM: <s> invites a user to the shared project </s>
funcom_train/1907945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SignatureConstraint getSignature(final String name, final int paramCount) throws AdaptException { final SignatureConstraint signature = signatures.get(name); if(signature == null) { return manager.forName(name).withArgCount(paramCount).constraint(); } return new ArgCountSignature(signature, paramCount); } COM: <s> returns a referenced signature </s>
funcom_train/25294736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initEditor(String initialValue, String path) { try { URL initialURL = new URL(initialValue); hostName.setText(initialURL.getHost()); hostName.setColumns(7); portNumber.setText(String.valueOf(initialURL.getPort())); portNumber.setColumns(4); } catch (MalformedURLException mfue) { // initial value is not a valid URL. Leave text fields empty logger.warn("Current property is not a valid URL: " + initialValue); } this.path = path; } COM: <s> initialise editor elements </s>
funcom_train/3428193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final InstructionList il = methodGen.getInstructionList(); _test.translateDesynthesized(classGen, methodGen); // remember end of condition final InstructionHandle truec = il.getEnd(); if (!_ignore) { translateContents(classGen, methodGen); } _test.backPatchFalseList(il.append(NOP)); _test.backPatchTrueList(truec.getNext()); } COM: <s> translate the test expression and contents of this element </s>
funcom_train/50383829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateOKStatus() { if (!isTreeEmpty()) { if (fValidator != null) { fCurrStatus = fValidator.validate(getResult()); updateStatus(fCurrStatus); } else { fCurrStatus = new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, "", //$NON-NLS-1$ null); } } else { fCurrStatus = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, fEmptyListMessage, null); } updateStatus(fCurrStatus); } COM: <s> validate the receiver and update the ok status </s>
funcom_train/50914159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getParentOrPrevious() { if (getMoleculeRefs2Attribute().getValue().equals(PARENT_S + " " + CHILD_S)) { return (Element) getParent(); } else if (getMoleculeRefs2Attribute().getValue().equals(PREVIOUS_S + " " + NEXT_S)) { ParentNode parent = getParent(); int position = parent.indexOf(this); if (position == 0) return null; return (Element) parent.getChild(position - 1); } return null; } COM: <s> gets the element that is previous or parent to the join depending </s>
funcom_train/40843704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Node node, PApplet parent){ int nxSize = node.width; int nySize = node.height; int nxPos = node.x1; int nyPos = node.y1; parent.smooth(); parent.ellipseMode(PApplet.CORNER); parent.ellipse(nxPos-3, nyPos-3, nxSize+6, nySize+6); parent.ellipse(nxPos, nyPos, nxSize, nySize); } COM: <s> decomposes the drawing of the rounded rectangle </s>
funcom_train/49463621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configureMail() throws Exception { try { Properties props = System.getProperties(); session = Session.getDefaultInstance(props, null); // -- Get hold of a POP3 message store, and connect to it -- store = session.getStore(protocol); } catch (Exception ex) { _logger.error("Unable to access default JavaMail session"); throw ex; } } COM: <s> configure the email </s>
funcom_train/12803007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeTransaction(AtomicOperationCommand aCommand) throws DataAccessException { try { beginDatabaseAction(); } catch (SQLException ex) { markForRollback(); throw new DataAccessException(ex); } try { aCommand.execute(); } catch (DataAccessException ex) { markForRollback(); throw ex; } finally { endDatabaseAction(null, null, null); } } COM: <s> use this method to bound multiple database operations which need </s>
funcom_train/38414117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeItemLink( String itemName ) { // we search the item index for( int i=0; i<items.length; i++ ) if( items[i].itemName.equals(itemName) ) { if( items[i].link!=null && items[i].link.isVisible() ) items[i].link.hide(); items[i].link = null; return true; } return false; // not found } COM: <s> to remove a menu link on an item </s>
funcom_train/39889687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGuardarUsuario() throws Exception { System.out.println("guardarUsuario"); Usuario usuario = new Usuario(); usuario.setNombre("andres"); usuario.setPassword("1111"); UsuarioDAOXmlImpl instance = new UsuarioDAOXmlImpl(); instance.guardarUsuario(usuario); } COM: <s> test of guardar usuario method of class com </s>
funcom_train/20643562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getFileInPath(String path) { String test[] = new String[]{ wwwhome + "/", wwwhome + "/"+BC.langManager.getLang()+"dir/"}; File f = null; for (int i = 0; i < test.length ; i++) { f = new File( test[i]+path); if (f.isDirectory()) { // if directory, implicitly add 'index.html f = new File(f.toString()+"/index.html"); } if (f.exists()) { return f; } } return f; } COM: <s> return a file in the wwwhome path </s>
funcom_train/7758234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendToNetwork(Message msg, RendezVousPropagateMessage propHdr) throws IOException { if (LOG.isEnabledFor(Level.DEBUG)) { LOG.debug("Endpoint propagating " + msg + " (" + propHdr.getMsgId() + ")"); } endpoint.propagate((Message) msg.clone(), PropSName, PropPName); } COM: <s> propagates on all endpoint protocols </s>
funcom_train/31100261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int writeString(String str) { int length = 0; try { byte[] buf = str.getBytes("ISO-8859-1"); System.arraycopy(buf, 0, output, currentPos, buf.length); length = buf.length; currentPos += length; } catch (Exception e) { // This should never happen! } return length; } COM: <s> writes a iso 8859 1 string at the current position </s>
funcom_train/44930668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MofPackage findMetamodelRoot(String root, ModelPackage metamodel) { for (Iterator it = metamodel.getMofPackage().refAllOfClass().iterator(); it.hasNext(); ) { ModelElement elem = (ModelElement)it.next(); if (elem.getName().equals(root)) return (MofPackage)elem; } return null; } COM: <s> locates the root of a metamodel </s>
funcom_train/49219028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCodedProperty(String propertyKey) { // throw exception if property file was not yet loaded if (coded == null) { System.err.println("coded properties not loaded: " + propertyKey); return null; } // read the property from the property catalogue String propertyValue = null; propertyValue = coded.getProperty(propertyKey); if (propertyValue == null) { System.err.println("property not found: " + propertyValue); } return logic.decode(propertyValue).trim(); } COM: <s> gets the property </s>
funcom_train/14237240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected static final class RightDistanceChecker implements DistanceChecker { public Rectangle getRegion(Rectangle r) { return new Rectangle(r.x + r.width, r.y, Integer.MAX_VALUE, r.height); } public boolean isComponentCloser(Component comp, Component closest) { if(comp == null) return false; if(closest == null) return true; return comp.getX() < closest.getX(); } } COM: <s> compares distances to right of a component </s>