__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/28362825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publish(ChannelSnapshot snapshot, long machineId) { System.out.println(snapshot.getPV() + "\t timestamp = " + snapshot.getTimestamp() + ", status = " + snapshot.getStatus() + ", severity = " + snapshot.getSeverity() + ", value = " + ArrayTool.asString( snapshot.getValue() )); } COM: <s> publish the channel snapshot by displaying its description to a console </s>
funcom_train/22909737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static void addListener(SETTING setting, SettingsListener listener) { List<SettingsListener> listenerList = listeners.get(setting); if (listenerList == null) { listenerList = new ArrayList<SettingsListener>(); listeners.put(setting, listenerList); } listenerList.add(listener); } COM: <s> add a listener for a setting </s>
funcom_train/23198522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void send(Msg msg) { if ((msg != null) && (!listeners.isEmpty())) { for (Iterator<MsgListener> i = listeners.iterator(); i.hasNext(); ) ((MsgListener) i.next()).receivedMsg(msg); } } COM: <s> sends a message to all listeners of the msg speaker </s>
funcom_train/34341445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getEnviarPedido2() { if (EnviarPedido2 == null) {//GEN-END:|42-getter|0|42-preInit // write pre-init user code here EnviarPedido2 = new Command("Ok", Command.OK, 0);//GEN-LINE:|42-getter|1|42-postInit // write post-init user code here }//GEN-BEGIN:|42-getter|2| return EnviarPedido2; } COM: <s> returns an initiliazed instance of enviar pedido2 component </s>
funcom_train/39395231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateOverallCosts(TcoObject object) { return getValue(getTotalCosts(object, KIND_PC), INDEX_TOTAL) + getValue(getTotalCosts(object, KIND_FC), INDEX_TOTAL) + // add any DependencyCost in SupplierChain (recursively) getValue(calculateDependency(object), INDEX_TOTAL); } COM: <s> summarize total personal cost fact cost dependency cost in tree for </s>
funcom_train/13375437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNumofPages() { double x = getPrintSource().getBounds().getSize().width / (getPrintRegion().width / scale); double y = getPrintSource().getBounds().getSize().height / (getPrintRegion().height / scale); return ((x > (int) x) ? (int) x + 1 : (int) x) * ((y > (int) y) ? (int) y + 1 : (int) y); } COM: <s> return the number of pages to be printed </s>
funcom_train/29895965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void interrupt() { Thread t = threadVar.get(); if (t != null) { t.interrupt(); // boolean intr = t.isInterrupted(); // if (intr) // System.err.println("IS INTERRUPTED"); // else System.err.println("NOT INTERRUPTED"); // FIXME: interrupt() doesn't seem to work, so use stop() t.stop(); } threadVar.clear(); } COM: <s> a new method that interrupts the worker thread </s>
funcom_train/7470170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float indexerScore(Text url, NutchDocument doc, CrawlDatum dbDatum, CrawlDatum fetchDatum, Parse parse, Inlinks inlinks, float initScore) throws ScoringFilterException { return (float)Math.pow(dbDatum.getScore(), scorePower) * initScore; } COM: <s> dampen the boost value by score power </s>
funcom_train/51009679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanDescriptor getBeanDescriptor() { BeanDescriptor bd = createBeanDescriptor(beanClass, new Object[] { "preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "A component that evaluates relational logics." }); bd.setValue("hidden-state", Boolean.TRUE); // needed for Studio. bd.setValue("helpSetName", "net/jbeans/data/control/resources/Relational/jhelpset.hs"); return bd; } COM: <s> returns a bean descriptor for relational bean </s>
funcom_train/12067983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write() throws IOException { int tileIndex = src.getTileIdx(); int tileWidth = src.getTileCompWidth(tileIndex, 0); int tileHeight = src.getTileCompHeight(tileIndex, 0); // Write in strips for (int i = 0; i < tileHeight; i += DEF_STRIP_HEIGHT) { write(0, i, tileWidth, ((tileHeight - i) < DEF_STRIP_HEIGHT) ? tileHeight - i : DEF_STRIP_HEIGHT); } } COM: <s> writes the sources current tile to the output </s>
funcom_train/27721868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int metricValue(CodeNode pmPassed, CodeAnalyser caPassed){ CodeClass myCodeClass = (CodeClass) pmPassed; int numOp = 0; numOp = myCodeClass.getMethodCount(); //return the number of operations in the code class return numOp; }//end of metricValue public method COM: <s> method to get the actual metric value from the code class object </s>
funcom_train/41665598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConceptConfig getConceptConfig(String conceptCode) { ConceptConfig resultConceptConfig = conceptsConfig .retrieveByCode(conceptCode); if (resultConceptConfig == null) { for (ConceptConfig conceptConfig : conceptsConfig) { String entitiesCode = conceptConfig.getEntitiesCode(); if (entitiesCode != null && entitiesCode.equals(conceptCode)) { resultConceptConfig = conceptConfig; } } } return resultConceptConfig; } COM: <s> gets the concept configuration for a given concept code </s>
funcom_train/7718422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PromptElement currentPrompt() { if (indexIsGroup(mCurrentIndex)) return new PromptElement(getGroups()); else if (isEnd()) return new PromptElement(PromptElement.TYPE_END); else if (isBeginning()) return new PromptElement(PromptElement.TYPE_START); else return new PromptElement(mCurrentIndex, getForm(), getGroups()); } COM: <s> returns the promp element for the current index </s>
funcom_train/51808654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NQueens cloneSolution() { NQueens clone = new NQueens(); List<Queen> clonedQueenList = new ArrayList<Queen>(queenList.size()); for (Queen queen : queenList) { clonedQueenList.add(queen.clone()); } clone.queenList = clonedQueenList; return clone; } COM: <s> clone will only deep copy the queens </s>
funcom_train/8886838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAceWikiEntry(OWLEntity entity, ACELexiconEntry lexiconEntry, Set<ACESnippet> snippets) { StringBuilder sb = new StringBuilder(); sb.append("type:"); sb.append(LexiconUtils.getLexiconEntryType(entity).toAceWikiType()); sb.append('\n'); sb.append("words:"); sb.append(lexiconEntry.toAceWikiFormat()); sb.append('\n'); for (ACESnippet snippet : snippets) { if (! snippet.isEmpty()) { sb.append("| "); sb.append(snippetToAceWiki(snippet)); sb.append('\n'); } } return sb.toString(); } COM: <s> p ignores snippets which have no ace content </s>
funcom_train/18743589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkCompleteness() throws IllegalStateException { for (SignatureKind sigKind : EnumSet.allOf(SignatureKind.class)) { if (!this.algebraMap.containsKey(sigKind)) { throw new IllegalStateException(String.format( "Implementation of signature '%s' is missing", sigKind)); } } } COM: <s> checks for the completeness of the register </s>
funcom_train/5340245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupConstants() { // Create padded panel without bottom padding so that button // rows for all the tabs line up. MAIN_PANEL = new PaddedPanel(); DATA_MODEL = new ConnectionModel(); TABLE = new LimeJTable(DATA_MODEL); BUTTON_ROW = (new ConnectionButtons(this)).getComponent(); SERVENT_STATUS = new JLabel(""); NEIGHBORS = new JLabel(""); } COM: <s> set up the necessary constants </s>
funcom_train/37739833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkStartAndFinishModeWithProcessP1() throws Exception { // create the process SmartWfProcess process = createProcess("st-process1", "P1"); assertState(process, NOT_STARTED); // start the process process.setupWaitForState (RUNNING); process.start(); process.waitForState (); assertState(process, RUNNING); process.setupWaitForState (COMPLETED); controlStartAndFinishMode(process); process.waitForState(); assertState(process, COMPLETED); removeProcess(process); } COM: <s> test a simple process definition </s>
funcom_train/44838560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Subject findById(String id) throws RemoteException { Subject subject = null; try { subject = subjectManager.findById(id); } catch (RemoteException rex) { System.out.println("Error on the remote server" + rex); throw new RemoteException("Error on the remote server" + rex); } return subject; } COM: <s> find a subject by id </s>
funcom_train/3374344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { JEditorPane editor = getEditor(e); if (editor != null) { StyledEditorKit kit = getStyledEditorKit(editor); MutableAttributeSet attr = kit.getInputAttributes(); boolean italic = (StyleConstants.isItalic(attr)) ? false : true; SimpleAttributeSet sas = new SimpleAttributeSet(); StyleConstants.setItalic(sas, italic); setCharacterAttributes(editor, sas, false); } } COM: <s> toggles the italic attribute </s>
funcom_train/2294779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { m_height = -1; m_width = -1; m_type = 0; m_position = 0; m_renderMode = 0; m_quality = 0; m_color = Color.WHITE; m_filters = new ArrayList(); m_maxBlurSize = CmsImageLoader.getMaxBlurSize(); } COM: <s> initializes the members with the default values </s>
funcom_train/7959639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAncestorOf(DockGroup g){ if (this.equals(g)){ return true; } else { DockGroup parent = g.parent; while (parent != null){ if (this.equals(parent)){ return true; } else { parent = parent.parent; } } } return false; } COM: <s> returns true if this group is the ancestor of group g </s>
funcom_train/3859567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Thing lookup(ReferenceDescription aDescription, Type aDeclaringType) { ReferenceCache.Lookup request = new ReferenceCache.Lookup(aDescription, aDeclaringType); Thing cached = (Thing) myCache.get(request); if (cached != null) { myCacheFound++; } else { myCacheMissed++; } return cached; } COM: <s> lookup result for resolving request in cache </s>
funcom_train/28774670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gauge getGauge7() { if (gauge7 == null) {//GEN-END:|136-getter|0|136-preInit // write pre-init user code here gauge7 = new Gauge("Other Insurance", false, 100, 50);//GEN-LINE:|136-getter|1|136-postInit // write post-init user code here }//GEN-BEGIN:|136-getter|2| return gauge7; } COM: <s> returns an initiliazed instance of gauge7 component </s>
funcom_train/43233207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkConsistency(final Project project) throws ModelException { if (this.version == null || this.version.trim().isEmpty()) { throw new NoValidValueException("Die Version des Release darf nicht leer sein!"); } if (this.currentReleaseDate == null) { throw new NoValidValueException("Das Releasedatum darf nicht leer sein!"); } project.isReleaseDoubleDefined(this.getVersion(), this.getReleaseDate()); } COM: <s> checks the consistencies for the release </s>
funcom_train/10387651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRestrictedUserAgent(String userAgent) { try { Pattern nRule = Pattern.compile(userAgent); restrictedUserAgents = addREArray(restrictedUserAgents, nRule); } catch (PatternSyntaxException pse) { getLog().error(sm.getString("http11processor.regexp.error", userAgent), pse); } } COM: <s> add restricted user agent which will downgrade the connector </s>
funcom_train/34584963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle(final Action action, final SimulationObject user) { final ActionMode mode = action.getMode(); switch (mode) { case examineItem: examine(action, user); break; case takeItem: take(action, user); break; case useItem: use(action, user); break; case collectItem: collect(action, user); break; case switchItemToLeftHand: switchItemToLeftHand(action, user); break; case useTwoItems: useTwoItems(action, user); break; case dropItem: drop(action, user); break; default: } } COM: <s> the method implements the use of an item by an user </s>
funcom_train/43334092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initPerspective(IPerspective perspective) { this.perspective = perspective; info.setView(perspective.getInfoView()); scene.setView(perspective.getSceneView()); navigator.setView(perspective.getNavigatorView()); plot.initView(perspective.getPlotView()); } COM: <s> initializes the view controllers to the given view perspective </s>
funcom_train/18543803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultTreasureItem createDefaultTreasureItem(TableRef tableRef) { if (tableRef == null) { PrintHelper.log.error("TableRef is null!", new NullPointerException()); return null; } DefaultTreasureItem item = new DefaultTreasureItem(this); item.addTable(tableRef); item.initHandlers(t_handlers); return item; } COM: <s> create a new default treasure item in this treasure </s>
funcom_train/46631000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alg_Move_Pist_Down(){ internal_rate.value = 10; Out_Pist_X.value = Temp_X.value ; Out_Pist_Y.value = Temp_Y.value - internal_rate.value ; Pist_X_C.value = Out_Pist_X.value; Pist_Y_C.value = Out_Pist_Y.value; Temp_X.value = Out_Pist_X.value; Temp_Y.value = Out_Pist_Y.value; } COM: <s> algorithm move pist down in java </s>
funcom_train/5348286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFile_DifferentSize() throws Throwable { rfd1=newRFD("some file name", 1839, null); rfd2=newRFD("some file name", 1223, null); assertTrue(! IncompleteFileManager.same(rfd1, rfd2)); File tmp1=ifm.getFile(rfd1); File tmp2=ifm.getFile(rfd2); assertNotEquals(tmp2, tmp1); } COM: <s> different name or size different temp file </s>
funcom_train/51788039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNextElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowElement_nextElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FlowElement_nextElement_feature", "_UI_FlowElement_type"), RAMPackage.Literals.FLOW_ELEMENT__NEXT_ELEMENT, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the next element feature </s>
funcom_train/31078954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equalsInstruction(Instruction other) { if (other == this) return true; if (!super.equalsInstruction(other)) return false; String type = getTypeName(); String otherType = ((ClassInstruction) other).getTypeName(); return (type == null) || (otherType == null) || type.equals(otherType); } COM: <s> class instructions are equal if the type they reference is the same or </s>
funcom_train/2002538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void encode(int symbol) throws IOException { while (_model.escaped(symbol)) { _model.interval(ArithCodeModel.ESCAPE,_interval); // have already done complete walk to compute escape _encoder.encode(_interval); } _model.interval(symbol,_interval); // have already done walk to element to compute escape _encoder.encode(_interval); } COM: <s> writes encoded symbol after necessary escapes to the underlying </s>
funcom_train/2437775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDestination(IntegrationProject project, File destination) { if (JitterPackConstants.getSuggestedJitterpakName(project).equals(destination.getName())) { suggestedNames.remove(project.getID()); } else { suggestedNames.put(project.getID(), destination.getName()); } } COM: <s> registers a new export destination </s>
funcom_train/43239743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPredicate(Predicate pred) { if (monitor) { VisualizationViewer vv = v_panelGraph.getVisualizationViewer(); vv.suspend(); gmemory.addVertex(pred); synchronized (v_panelGraph.getGraphZoom()) { v_panelGraph.getLayoutMutable().update(); } if (!vv.isVisRunnerRunning()) vv.init(); else vv.unsuspend(); refreshVisual(); } else { gmemory.addVertex(pred); } } COM: <s> adds the recently generated predicate pred to the repage </s>
funcom_train/17207601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defineField(String fieldName, Type fieldType) { if (fields.containsKey(fieldName)) { throw new RuntimeException("Type "+getName()+" already contains a field called "+fieldName); } int offset = fieldType.isObject() ? referenceFields++ : dataFields++; Field field = new Field(fieldName,fieldType,offset); fields.put(fieldName, field); } COM: <s> define a new field </s>
funcom_train/45271500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void collectTemplateFile(IFile f) { if (FLEXOTASK_TEMPLATE_SUFFIX.equalsIgnoreCase(f .getFileExtension())) { if (Utils.isSourceIFile(f)) { trace("found a flexotask XML template file: " + f.getName()); templateIFiles.add(f); } } } COM: <s> collects the provided code ifile code in a set if its filename </s>
funcom_train/438461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateDependencies() { // Deregisters as dependent with each old precedent for (Cell precedent : precedents) ((CellImpl)precedent).removeDependent(this); precedents.clear(); if (formula != null) // Registers as dependent with each new precedent for (Reference reference : formula.getReferences()) for (Cell precedent : reference.getCells()) { if (!this.equals(precedent)) { precedents.add(precedent); ((CellImpl)precedent).addDependent(this); } } } COM: <s> updates the cells dependencies </s>
funcom_train/29990869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintSelectionBorder(Graphics g) { Graphics2D g2 = (Graphics2D) g; Stroke previousStroke = g2.getStroke(); g2.setStroke(GraphConstants.SELECTION_STROKE); if (childrenSelected || selected) { if (childrenSelected) g.setColor(gridColor); else if (hasFocus && selected) g.setColor(lockedHandleColor); else if (selected) g.setColor(highlightColor); Dimension d = getSize(); g.drawOval(0, 0, d.width - 1, d.height - 1); } g2.setStroke(previousStroke); } COM: <s> provided for subclassers to paint a selection border </s>
funcom_train/22753965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setNodeProperties(Element nd, DataNode node) { nd.setAttribute("id", node.getId()); nd.setAttribute("name", node.getName()); setSubNode(nd, "description", node.getDescription()); } COM: <s> adds the id and name attributes and description element to the given element </s>
funcom_train/31224095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel addLabel(String text) { JLabel l = new JLabel(text); l.setFont(FONT_LABEL); layout.putConstraint(SpringLayout.WEST, l, 5, SpringLayout.WEST, this); layout.putConstraint(SpringLayout.NORTH, l, 5, SpringLayout.SOUTH, indexComponent); this.add(l); indexComponent = l; return l; } COM: <s> adds a label to zone information pane </s>
funcom_train/13874769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExtentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MappingParameter_extent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MappingParameter_extent_feature", "_UI_MappingParameter_type"), QvtoperationalPackage.Literals.MAPPING_PARAMETER__EXTENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the extent feature </s>
funcom_train/33516539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long clearAll() { Entry cur; Entry prev; long freedMemory = 0; for(int i=0; i<entries.length; i++) { cur = entries[i]; while(cur != null) { freedMemory += cur.heapSize(); cur = cur.next; } entries[i] = null; } headPtr = null; tailPtr = null; size = 0; return freedMemory; } COM: <s> clears all the entries in the map </s>
funcom_train/7852081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(Object attr) { //We must enforce that attr is an LDAPAttribute LDAPAttribute attribute = (LDAPAttribute) attr; String name = attribute.getName().toUpperCase(); if( this.map.containsKey(name)) return false; else{ this.map.put(name, attribute); return true; } } COM: <s> adds the specified attribute to this set if it is not already present </s>
funcom_train/17387256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void queuedText(String text) { Enumeration<OutgoingTextPlugin> e = outgoingTextPlugins.elements(); while (e.hasMoreElements()) { OutgoingTextPlugin plugin = (OutgoingTextPlugin) e.nextElement(); ((OutgoingTextCallback) plugin.getCallback()).queuedText(text, plugin.getData()); } } COM: <s> text has been queued and will wait for its turn </s>
funcom_train/43239599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equalsTo(ProbDist p) { if(p.numLabels!=this.numLabels) return false; if(p.strength!=this.strength) return false; for(int i=0;i<p.numLabels;i++) { if (p.getWeight(i)!=this.getWeight(i)) return false; } return true; } COM: <s> compare the present prob dist with a given prob dist </s>
funcom_train/7272919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExpiration(String expTimestamp) { if (expTimestamp == null || expTimestamp.equals("0")) { _expiration = null; return; } try { _expiration = new Date(Long.parseLong(expTimestamp)); } catch (NumberFormatException e) { System.out.println("Expiration passed cannot be converted to a long"); _expiration = null; } } //setExpiration COM: <s> sets the expiration date out of a string with the timestamp </s>
funcom_train/42237454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { System.err.println(getVersion() + "|" + getPadding() + "|" + getExtension() + "|" + getCsrcCount() + "|" + getMarker() + "|" + getPacketType() + "|" + getSequence() + "|" + getTimestamp() + "|" + getSsrc()); } COM: <s> prints the header </s>
funcom_train/31432471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleList reverse(SimpleList lst) { if (isEmpty()) return lst; SimpleList ans = lst; Enumeration list = (EnumerationSimpleList)this.elements(); while (list.hasMoreElements()) { ans = new SimpleList(list.nextElement(), ans); } return ans; } COM: <s> this is revappend in common lisp </s>
funcom_train/10471978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPathForClass() throws NameSolvingException { loadProperties(); Enumeration enumeration = interfaces.keys(); while (enumeration.hasMoreElements()) { String ejbInterface = (String) enumeration.nextElement(); Iterator types = superInterfaces.iterator(); while (types.hasNext()) { Type superType = (Type) types.next(); ITypeBinding bind = superType.resolveBinding(); if (bind != null && bind.getQualifiedName().equals(ejbInterface)) { String path = interfaces.getProperty(ejbInterface); return path; } } } return null; } COM: <s> gets xpath where need to search already defined references for current </s>
funcom_train/34528118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public ProjectsList getProjectsList() { // Collection<String> projectNames = new ArrayList<String>(); // ProjectDesc[] descs = getAvailableProjectNames(); // for (ProjectDesc desc : descs) { // projectNames.add(desc.getProjectName()); // } // String defaultProjectName = serviceConfigMgr.getDefaultProjectName(); // return new ProjectsList(projectNames, defaultProjectName); // } COM: <s> creates and returns the project list object containing the names </s>
funcom_train/42715139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ErrCode saveToRecord(String s, int rid) { byte[] to_save = s.getBytes(); try { r.setRecord(rid, to_save, RECORD_OFFSET, to_save.length); return new ErrCode(Constants.ERR_SUCCESS); } catch (RecordStoreException rse) { return new ErrCode(Constants.ERR_FAILURE); } } COM: <s> saves a string into the given id number of a record </s>
funcom_train/19418664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AttachObj getByFileName(final String fileName) { if (fileName == null) return null; final int size = aoList.size(); for (int i = 0; i < size; i++) { final AttachObj attachObj = (AttachObj)aoList.get(i); if (fileName.equals(attachObj.getFileName())) { return attachObj; } } return null; } COM: <s> returns an attach obj in this list with the </s>
funcom_train/44137558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintOnTheLine(Graphics g) { g.setColor(Color.WHITE); g.drawRect(1, 1, m_w0 - 3, m_h0 - 3); g.drawRect(2, 2, m_w0 - 5, m_h0 - 5); } COM: <s> to draw the white rectangle of element on the line </s>
funcom_train/20055346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void search() { try { Thread.sleep(4000); } catch (InterruptedException e) { e.printStackTrace(); } displaySuccess("You've successfully waited :)"); searchButton.setEnabled(true); carder.show(cardPane, "form"); connectionAnimation.stop(); } COM: <s> cherche ordre de vente </s>
funcom_train/5457924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this.getClass().equals(obj.getClass())) { MessageInfo other = (MessageInfo) obj; return other.session.equals(session) && other.dataType == dataType && other.messageType == messageType && other.version.equals(version); } return false; } COM: <s> compares equality with other objects </s>
funcom_train/25580724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point parsePoint(String pointStr) { Point point = new Point(0, 0); String[] values = pointStr.split("\\,"); try { point.x = Integer.valueOf(values[0]); point.y = Integer.valueOf(values[1]); } catch (NumberFormatException e) { log("NumberFormatException", null, e.getMessage(), pointStr); point = null; } return point; } COM: <s> parses a point encoded in the given string in the format </s>
funcom_train/20440059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGridPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFField_grid_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFField_grid_feature", "_UI_ESMFField_type"), ESMFPackage.Literals.ESMF_FIELD__GRID, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the grid feature </s>
funcom_train/21848658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComponent createInfoTable() { m_model = new JETATableModel(); String[] names = new String[2]; names[0] = I18N.getLocalizedMessage("Property"); names[1] = I18N.getLocalizedMessage("Value"); m_model.setColumnNames(names); Class[] coltypes = new Class[2]; coltypes[0] = String.class; coltypes[1] = String.class; m_model.setColumnTypes(coltypes); return new javax.swing.JScrollPane(TableUtils.createBasicTablePanel( m_model, true)); } COM: <s> creates the jtable that displays the jdbc driver properties </s>
funcom_train/15488770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkIncompatibleOptions(Token[][] options, int i1, int i2) { if(options[i1][0] != null && options[i2][0] != null) { if(!options[i1][0].isBefore(options[i2][0])) { int tmp = i1; i1 = i2; i2 = tmp; } errors.add(options[i2][0], CompileError.WRONG_OPTIONS_COMBINATION, options[i1][0].image, options[i2][0].image); } } COM: <s> checks incompatible options </s>
funcom_train/38324695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void getUtilMethods() { try { // since a class may inherit the addListener method from // a parent, we lookup all methods and not just the // declared methods. addListener = this.OBJECT_CLASS.getMethod(Constants.PCS_ADD, new Class[] { PropertyChangeListener.class }); removeListener = this.OBJECT_CLASS.getMethod(Constants.PCS_REMOVE, new Class[] { PropertyChangeListener.class }); } catch (NoSuchMethodException e) { // we should log this } } COM: <s> method will try to look up add and remove property change listener </s>
funcom_train/14460810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRecordIndex(BiffRec rec){ if(rec.getSheet()!=null) { Sheet bs = rec.getSheet(); // Logger.logInfo("ByteStreamer getting index of sheetRec: " + bs.toString()); int ret = bs.getSheetRecs().indexOf(rec); // bs.getRidx(); // if(ret>-1)return ret; return records.indexOf(rec); } return records.indexOf(rec); } COM: <s> get the recvec index of this record </s>
funcom_train/18348197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filter(Class cl, Pattern pattern, Collection filtered) { synchronized(list) { Iterator i = list.iterator(); while (i.hasNext()) { SharedSpaceItem item = (SharedSpaceItem)i.next(); if (item.matches(cl, pattern)) { filtered.add(item.getObject()); } } } } COM: <s> adds to the collection the objects of those shared space items that </s>
funcom_train/29945212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyNot(ASTNot n) { Type et = doIt(n.getExpr()); if (boolType().equals(et)) { n.setType(_last = boolType()); } else { n.setType(_last = errorType()); _failed = true; System.out.println("operand of ! should be boolean. Got:" + et.toString()); } } COM: <s> this function checks whether the operand of are boolean or not </s>
funcom_train/22606062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreference(String preferenceName, String value) { IEclipsePreferences root = Platform.getPreferencesService().getRootNode(); Preferences node = root.node(InstanceScope.SCOPE).node(GraphVizActivator.ID); node.put(preferenceName, value); try { node.flush(); } catch (BackingStoreException e) { LogUtils.logError(ID, "Error updating preferences.", e); } } COM: <s> sets the given preference to the given value </s>
funcom_train/29578737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteChildrenAndNotify() { for (final FileWatcher child : children.values()) { child.deleteChildrenAndNotify(); } children.clear(); if(lastType == Type.DIRECTORY) { watcher.notifyOnDirectoryDelete(this); } else if (lastType == Type.FILE) { watcher.notifyOnFileDelete(this); } } COM: <s> delete all my children recursively then notify the watcher that </s>
funcom_train/1589374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public YearMonthDay setCopy(int value) { int[] newValues = iYearMonthDay.getValues(); newValues = getField().set(iYearMonthDay, iFieldIndex, newValues, value); return new YearMonthDay(iYearMonthDay, newValues); } COM: <s> sets this field in a copy of the year month day </s>
funcom_train/40851405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPercVictory() { if(this.getNbGames()==null || this.getNbGames().intValue()==0) return "N/A"; double perc = ((double)this.getNbVictory().intValue()) / this.getNbGames().intValue(); return NumberUtils.getPrettyPrintForm(perc * 100) + "%"; } COM: <s> return a pretty print form of the percentage of won on discard games </s>
funcom_train/48151600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o, Object arg) { if (arg == getValueSetter(0)) { initial = getValueSetter(0).getValueAsInt(); setParameters(); } else if (arg == getValueSetter(1)) { p = getValueSetter(1).getValue(); computeBoldParameters(); setParameters(); } } COM: <s> this method handles the scroll events associated with a change in the </s>
funcom_train/269259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL getSourceURL( ) { String src = (String) this.fElement.getAttributes().getAttribute(HTML.Attribute.SRC); if( src==null ) return null; URL reference = ((HTMLDocument)getDocument()).getBase(); try { URL u = new URL(reference,src); return u; } catch (MalformedURLException e) { return null; } } COM: <s> return a url for the image source </s>
funcom_train/46767105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); //JSplitPane topbotsplitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,) this.mp = new MainPane(data,this); jFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setSize(size,size); jFrame.setContentPane(getJContentPane()); jFrame.setTitle(data.ProgramName+" [GL"+version+"]"); jFrame.addWindowListener(new FrameListener(this)); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/48031476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void constructObject(Vector2 position, Vector2 velocity, float rotation, Vector2 acceleartion, ObjectId id, Vector2 size, String textureName, int life) { this.size = size; this.position = position; this.velocity = velocity; this.rotation = rotation; this.acceleration = acceleartion; this.textureName = textureName; this.life = life; this.id = id; } COM: <s> hilfsfunktion f r die konstruktoren </s>
funcom_train/952579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Work getByContextID (long contextID) { Iterator iter = work.iterator(); while (iter.hasNext()) { try { Work element = (Work) iter.next(); if (element.getMessage().getContextID() == contextID) { return element; } } catch (ClassCastException e) { System.err.println(e.toString()); } } if (lastDequeued != null && lastDequeued.getMessage().getContextID() == contextID) { return lastDequeued; } return null; } COM: <s> get one work with given context id in message </s>
funcom_train/51063604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void send_ping () { if (_sender && (_msg_count > 0)) { Ping outb = new Ping (_peer, _msg_count, true/*recursive*/, true/*dd_intermediate_upcall*/, false/*one_hop*/); System.out.println ("*Node " + _nodeName + " sending " + outb + "*"); // resend every 10 seconds, maximum 6 times _ping_token = _resender.resend(outb, 6, 10000); --_msg_count; } } COM: <s> if were the sender and we havent sent all of our ping messages </s>
funcom_train/50873032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLastVariable() { OMBinding binding = new OMBinding(); binding.setBody( new OMInteger( "1" ) ); binding.addVariable( new OMVariable( "a" ) ); binding.addVariable( new OMVariable( "b" ) ); assertTrue( ((OMVariable) binding.lastVariable()).getName().equals( "b" ) ); } COM: <s> test of last variable method of class nl </s>
funcom_train/43475001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object o) { int pred = binarySearchIter(0, list.size()- 1, o); if (pred < 0) return false; remakeSuccessors = true; remakePredecessors = true; remakeNeighbours = true; remakeFarthestNeighbours = true; list.remove(pred); return true; } COM: <s> removes an object from neighbours set </s>
funcom_train/38724980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getThumbnail () { try { return DataManager.getInstance().getShapeThumbnail(this); } catch (SQLException se) { GuiController.getInstance().displayException(se); } return new ImageIcon(getClass().getResource("/net/sf/wwusmart/gui/res/nothumb.png")); } COM: <s> retrieves the shapes thumbnail from the database </s>
funcom_train/43934534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyItemPause(IPlayItem item, int position) { IStreamAwareScopeHandler handler = getStreamAwareHandler(); if (handler != null) { try { handler.streamPlaylistVODItemPause(this, item, position); } catch (Throwable t) { log.error("error notify streamPlaylistVODItemPause", t); } } } COM: <s> notifies subscribers on pause </s>
funcom_train/24111464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExporterProxy(final IExporterProxy exporterProxy) { final boolean changed = (this.exporterProxy == null) ? (exporterProxy != null) : ((exporterProxy == null) || !this.exporterProxy.getId().equals(exporterProxy.getId())); this.exporterProxy = exporterProxy; if (changed) { fireWizardDataChanged(); } } COM: <s> sets the exporter proxy </s>
funcom_train/45737652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startSimulation() { CustomerQueue queue = new CustomerQueue(NOF_CHAIRS, this); doorman = new Doorman(queue, this); doorman.startThread(); barbers = new Barber[NOF_BARBERS]; for(int i = 0; i < NOF_BARBERS; i++) { barbers[i] = new Barber(queue, this, i); barbers[i].startThread(); } } COM: <s> creates the customer queue the doorman and the barbers </s>
funcom_train/13895464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addAreaIsotope(int permitId, int[] isotopeId, int areaId) { int result = 0; int i = 0; while (i < isotopeId.length && result != -1) { result = -1; try { result = this.pds .addAreaIsotope(permitId, isotopeId[i], areaId); } catch (SQLException e) { this.log.warning("Could not add area isotope with id:" + isotopeId[i]); } finally { this.cleanUp(); } i++; } return result; } COM: <s> adds a list of isotope ids to an area on a specific permit </s>
funcom_train/44011677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStore() { System.out.println("getStore"); TransactionBO instance = new TransactionBO(); StoreBO expResult = null; StoreBO result = instance.getStore(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get store method of class edu </s>
funcom_train/49409146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveItem() { System.out.println("removeItem"); DIDL instance = new DIDL(); ItemType item = instance.newItem(); instance.addItem(item); ItemType result = instance.removeItem(item); assertEquals(item, result); assertEquals(0, instance.getItems().size()); } COM: <s> test of remove item method of class info </s>
funcom_train/29389853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeAGE(Vector<String> list) throws IOException { FileWriter fw = new FileWriter(ageList); int start = Math.max(0, list.size()-MAX_MAILS); for(int i = 0; i < start; i++) { File f = new File(basedir, list.get(i)); if(f.exists()) f.delete(); } for(int i = start; i < list.size(); i++) { fw.write(list.get(i)+"\n"); } } COM: <s> only stores the last max mails mails and deletes the rest </s>
funcom_train/4377731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLong(String key) throws RJSONException { Object object = get(key); try { return object instanceof Number ? ((Number)object).longValue() : Long.parseLong((String)object); } catch (Exception e) { throw new RJSONException("JSONObject[" + quote(key) + "] is not a long."); } } COM: <s> get the long value associated with a key </s>
funcom_train/14100288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Matrix4f m1) { return m1 != null && m00 == m1.m00 && m01 == m1.m01 && m02 == m1.m02 && m03 == m1.m03 && m10 == m1.m10 && m11 == m1.m11 && m12 == m1.m12 && m13 == m1.m13 && m20 == m1.m20 && m21 == m1.m21 && m22 == m1.m22 && m23 == m1.m23 && m30 == m1.m30 && m31 == m1.m31 && m32 == m1.m32 && m33 == m1.m33; } COM: <s> returns true if all of the data members of matrix4f m1 are </s>
funcom_train/3295567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeHeightValue(float height, GridTile tileDescription, Object outputTile, int tilex, int tilez) { BufferedImage tile = (BufferedImage)outputTile; try { tile.setRGB(tilex,tilez,(short)height); } catch (ArrayIndexOutOfBoundsException e) {System.out.println(" tilex, tilez "+tilex +","+tilez+" "+e);} } COM: <s> this assumes it is called in consecutively from pixel 0 0 through to </s>
funcom_train/16849072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showChartFrame(Chart2D chart) { JFrame frame = new JFrame("2D Chart for " + "Magnitude frequencies."); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.getContentPane().add(chart, BorderLayout.CENTER); frame.setSize(400, 400); frame.setLocationRelativeTo(null); frame.setVisible(true); } COM: <s> shows the given chart panel on a jframe </s>
funcom_train/19073906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setPlugin(ConverterPlugIn newPlugIn) { if (newPlugIn == plugIn) { return false; } if (newPlugIn == null) { plugIn.setConnected(false); } else { if (newPlugIn.isConnected()) { return false; } newPlugIn.setConnected(true); newPlugIn.addPlugInListener(this); buffered = true; } plugIn = newPlugIn; this.resetInput(); return true; } COM: <s> sets the plugin for the data preprocessing </s>
funcom_train/31743192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(double x, double y) { if (numTypes < 2) { return false; } // int cross = Curve.crossingsForPath(getPathIterator(null), x, y); int cross = GeomUtil.pointCrossingsForPath(getPathIterator(null), x, y); if (windingRule == WIND_NON_ZERO) { return (cross != 0); } else { return ((cross & 1) != 0); } } COM: <s> tests if the specified coordinates are inside the boundary of </s>
funcom_train/26023960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JInternalFrame createInternalFrame(String title) { JInternalFrame internalFrame = new JInternalFrame(title, true, true, true, true); internalFrame.setBounds(0, 0, 600, 280); internalFrame.setVisible(true); internalFrame.setFocusable(false); internalFrame.getContentPane().setLayout(new BorderLayout()); return internalFrame; } COM: <s> hook method to create an internal frame </s>
funcom_train/26470646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String params = ""; String key; String value; if (parameters != null) { Iterator i = parameters.keySet().iterator(); while (i.hasNext()) { key = (String) i.next(); value = (String) parameters.get(key); params = params + ((params.length() < 1) ? "?" : "&") + key + "=" + value; } } if (response != null) return response.encodeURL(url + params); else return url; } COM: <s> make a string out of the link for use in html </s>
funcom_train/28420558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeSettings(Object settings) { WizardDescriptor wd = (WizardDescriptor) settings; WsdlGeneratorContext context = (WsdlGeneratorContext) wd.getProperty(WsdlGeneratorContext.WIZARD_DESCRIPTOR); if (context == null) { context = new WsdlGeneratorContext(); wd.putProperty(WsdlGeneratorContext.WIZARD_DESCRIPTOR, context); } // Sets the file selected context.setEarFile(fileSelected); } COM: <s> store the file object </s>
funcom_train/27750762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launch() { // a 'main' thread for the process in a new threadgroup, to be compatible with java_url _mainThread = new Thread(_processThreadGroup, this, "Main thread for " + _name); _mainThread.setContextClassLoader(_classLoader); // start process /* DEBUG */ log.debug (getPid()+":Process.launch()"); _mainThread.start(); Thread.yield(); } COM: <s> start the process running </s>
funcom_train/31078654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Local getLocal(String name) { String loc; for (int i = 0; i < _locals.size(); i++) { loc = ((Local) _locals.get(i)).getName(); if ((loc == null && name == null) || (loc != null && loc.equals(name))) return (Local) _locals.get(i); } return null; } COM: <s> return the local with the given name or null if none </s>
funcom_train/4426576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeDecls(Element parent, String kind, List<Var> variables) { for (Var variable : variables) { Element decl = document.createElement("Decl"); parent.appendChild(decl); decl.setAttribute("kind", kind); decl.setAttribute("name", variable.getName()); decl.appendChild(writeType(variable.getType())); if (variable.isInitialized()) { writeExpr(decl, variable.getInitialValue()); } } } COM: <s> appends decl elements to the given parent parent with the given kind </s>
funcom_train/16310138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIfEmptyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FileLoop_ifEmpty_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FileLoop_ifEmpty_feature", "_UI_FileLoop_type"), PstlPackage.Literals.FILE_LOOP__IF_EMPTY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the if empty feature </s>
funcom_train/34563075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NodeMore iter(final NodIter iter) { return new NodeMore() { /** Child counter. */ int c; @Override public boolean more() { return iter != null && c != iter.size(); } @Override public Nod next() { return more() ? iter.get(c++) : null; } }; } COM: <s> iterates all nodes of the specified iterator </s>
funcom_train/19595999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sendRgbFrame(byte addrTopLeft, byte addrTopRight, byte addrBottomLeft, byte addrBottomRight, PApplet data) { PImage img = new PImage(data.width, data.height, PApplet.RGB); data.loadPixels(); img.loadPixels(); img.pixels=data.pixels; data.updatePixels(); img.updatePixels(); return sendRgbFrame(addrTopLeft, addrTopRight, addrBottomLeft, addrBottomRight, img); } COM: <s> send a pimage to four rainbowduino device arranged as cube </s>