__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18228590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FixedFileSystem (String name, String displayName/*, String moduleName*/) { list = this; change = this; info = this; attr = this; try { setSystemName (name); } catch (PropertyVetoException pve) { throw new InternalError (pve.toString ()); } this.displayName = displayName; //this.moduleName = moduleName; } COM: <s> creates the filesystem with no instances </s>
funcom_train/1071595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EditPart getPartForElement(Object modelElement) { if (modelElement instanceof WhiteboardDiagram) { return new WhiteboardDiagramEditPart(modelElement); } if (modelElement instanceof Shape) { return new ShapeEditPart(modelElement); } if (modelElement instanceof Connection) { return new ConnectionEditPart(modelElement); } throw new RuntimeException( "Can't create part for model element: " + ((modelElement != null) ? modelElement.getClass().getName() : "null")); } COM: <s> maps an object to an edit part </s>
funcom_train/18111791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeywordOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Keyword_KeywordOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Keyword_KeywordOf_feature", "_UI_Keyword_type"), BioDBPackage.Literals.KEYWORD__KEYWORD_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the keyword of feature </s>
funcom_train/9957306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSingleMultiPolygonManyPointsNoHoleRoundTrip() throws SAXException, IOException, ParserConfigurationException{ PolygonGenerator pgc = new PolygonGenerator(); pgc.setGeometryFactory(geometryFactory); pgc.setGenerationAlgorithm(PolygonGenerator.BOX); pgc.setNumberPoints(1000); MultiGenerator pg = new MultiGenerator(pgc); pg.setBoundingBox(new Envelope(0,10,0,10)); pg.setNumberGeometries(3); pg.setGeometryFactory(geometryFactory); MultiPolygon pt = (MultiPolygon) pg.create(); checkRoundTrip(pt); } COM: <s> round trip test for a single multi polygon with lotsa points </s>
funcom_train/43001674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RecoverPoint getTheLatestRecoverPoint() { String StatePoint; if (recoverPointList.size() == 0) { StatePoint = "Start@0@0@0@0@0"; } else { StatePoint = recoverPointList.getLast(); } String point[] = StatePoint.split("@"); RecoverPoint p = new RecoverPoint(point[0], point[1], point[2], point[3], point[4]); totalFinishedPhotoNumber = Long.parseLong(point[5]); StatePoint = null; return p; } COM: <s> get the latest recover point </s>
funcom_train/8568172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OpTree generateParallelTree(int index, int length) { if (index < length - 1) { return par(cutAt(index, length), generateParallelTree(index + 1, length)); } else if (index == length - 1) { // Final item. return cutAt(index, length); } else { throw new RuntimeException("Error, invalid input to gen par tree."); } } COM: <s> recursive function to generate a big parallel tree </s>
funcom_train/22233468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPolygonOffsetFactor(float polygonOffsetFactor) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_OFFSET_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes10")); if (isLive()) ((PolygonAttributesRetained)this.retained). setPolygonOffsetFactor(polygonOffsetFactor); else ((PolygonAttributesRetained)this.retained). initPolygonOffsetFactor(polygonOffsetFactor); } COM: <s> sets the polygon offset factor to the specified value </s>
funcom_train/31679183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { FastMap localMap = localMap(); for (FastMap.Entry e = localMap.head(), end = localMap.tail(); (e = (FastMap.Entry) e.getNext()) != end;) { checkCanceled(); e.setValue(null); } } COM: <s> removes all mappings from this map sets the local values to </s>
funcom_train/8805660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLeftOperand(ASExpression leftOperand) { if (leftOperand == null) { throw new IllegalArgumentException(); } // an Assignment may occur inside a Expression - must check cycles ASTNode oldChild = this.leftOperand; preReplaceChild(oldChild, leftOperand, LEFT_OPERAND_PROPERTY); this.leftOperand = leftOperand; postReplaceChild(oldChild, leftOperand, LEFT_OPERAND_PROPERTY); } COM: <s> sets the left operand </s>
funcom_train/24181756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsParamInSignature(String paramTypeFQN, String paramName) { for (Object o : this.md.parameters()) { if (o instanceof SingleVariableDeclaration) { SingleVariableDeclaration s = (SingleVariableDeclaration) o; if (s.getName().getFullyQualifiedName().equals(paramName) && areTypesEquals(s.getType(), paramTypeFQN)) return true; } } return false; } COM: <s> checks if a parameter with name and type passed as parameter is existing </s>
funcom_train/13597118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void synchronise(){ Project project = ProjectUtil.getOpenProject(); new RuleExtractionProgressDialog(ProjectUtil.getTopFrame(this)) .showProgress(project.getDictionary()); //System.out.println(ProjectUtil.getSoundPanel().getWordData()); if (ProjectUtil.getSoundPanel().getWordData()!=null) { ProjectUtil.getSoundPanel().displayWord(ProjectUtil.getSoundPanel().getWordData()); } } COM: <s> synchronises the rule set and updates the currently displayed word </s>
funcom_train/30190290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenu getHelpers() { if( helperMenuItems != null ) return helperMenuItems; helperMenuItems = new JMenu("SQL Functions"); JMenuItem menuItem = new JMenuItem("SQL Query"); menuItem.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { SQLQueryPanel.makeWindow(dataSources); } }); helperMenuItems.add(menuItem); return helperMenuItems; } COM: <s> get a sub menu of menu items for this plugins helpers </s>
funcom_train/7298456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() throws LaunchFailedException { String[] cmdArray = { mozLocation, "-compose" }; try { Runtime.getRuntime().exec(cmdArray); } catch (IOException e) { throw new LaunchFailedException("Cannot launch Mozilla composer via -compose commandline:" + e.getMessage()); } } COM: <s> launch a blank mozilla compose window </s>
funcom_train/32113895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transfer(int x0, int y0, int xnew, int ynew) { Being tmpB = currentMap.getTile(x0, y0).being; // Remove being from old position currentMap.getTile(x0, y0).being = null; // Put being in new position currentMap.getTile(xnew, ynew).being = tmpB; // Update (x, y) setXY(xnew, ynew); } COM: <s> transfers the player between squares move teleport </s>
funcom_train/9559181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VariablePath removeLastPathElement() { if (pathElements.length == 0) { return this; } int newSize = pathElements.length - 1; String[] newPathElements = new String[newSize]; System.arraycopy(this.pathElements, 0, newPathElements, 0, newSize); return new VariablePath(newPathElements); } COM: <s> creates a new variable path with last path element removed </s>
funcom_train/12734857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLoggable(int level) { Level logLevel = Level.SEVERE; switch (level) { case DEBUG: logLevel = Level.FINE; break; case INFO: logLevel = Level.INFO; break; case WARN: logLevel = Level.WARNING; break; case ERROR: logLevel = Level.SEVERE; break; } return logger.isLoggable(logLevel); } COM: <s> checks whether the given log level should be logged or not </s>
funcom_train/50093402
/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.getAtom(0).setFormalCharge(-1); molecule.addAtom(builder.newAtom("C")); molecule.addBond(0, 1, IBond.Order.SINGLE); molecule.addAtom(builder.newAtom("C")); molecule.addBond(1, 2, IBond.Order.DOUBLE); addExplicitHydrogens(molecule); return molecule; } COM: <s> get the molecule 2 c c c </s>
funcom_train/10212844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ForceSession getSession() { if (isAlwaysUseNewSession()) { return SessionFactoryUtils.getNewSession(getSessionFactory()); } else if (!isAllowCreate()) { return SessionFactoryUtils.getSession(getSessionFactory(), false); } else { return SessionFactoryUtils.getSession(getSessionFactory(), true); } } COM: <s> return a session for use by this template </s>
funcom_train/20334177
/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 (obj instanceof Corridor) { Corridor cmp=(Corridor)obj; if (getInstanceName()!=cmp.getInstanceName() && (getInstanceName()==null || !getInstanceName().equals(cmp.getInstanceName())) ) return false; return true; } return false; } COM: <s> test the equality of this code corridor code </s>
funcom_train/50153147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void task_add() { try { // fill in project if we have one Integer projfiltid = null; if (!projectName.equals(Resource.getResourceString("All"))) { try { projfiltid = TaskView.getProjectId(projectName); } catch (Exception e) { Errmsg.getErrorHandler().errmsg(e); return; } } new TaskView(null, TaskView.Action.ADD, projfiltid).showView(); } catch (Exception e) { Errmsg.getErrorHandler().errmsg(e); } } COM: <s> open the task editor in add mode </s>
funcom_train/21407623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void upload( Persistent dataInParams, Persistent dataIn, Persistent dataOutParams, Persistent dataOut,TransportLayerListener eventListener, String userName, String password){ saveParameters(dataInParams,dataIn,dataOutParams,dataOut,eventListener,false,userName, password); new Thread(this).start(); } COM: <s> uploads data over the transport layer </s>
funcom_train/21225052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getGroup() { int int7to6 = value & 0xC0; // (B7|B6) switch (int7to6) { case GROUP_GENERAL_DATA_CODING: // 00xx case GROUP_AUTOMATIC_DELETION: // 01xx return int7to6; default: // any other group return value & 0xF0; // (B7|B6|B5|B4) == 1xxx } } COM: <s> this will return the dcs group see group field values </s>
funcom_train/21057928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInputIndexOf(String name) throws InvalidInputException { Integer idx = inputNamesMap.get(name); if (idx == null) { throw new InvalidInputException("Invalid input '" + name + "' of this gate cannot be found. There is no such input name"); } return idx; } COM: <s> gets the index of the input associated with the given name </s>
funcom_train/4403783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateValue() { if (this._isNewValueBuffered == false) Display.error(this.getClass().getName() + "::updateValue() - already performed."); if (this._isInputNode == true) Display.error(this.getClass().getName() + "::updateValue() - input value cannot be updated."); this._neuronValue = this._newNeuronValue; this._isNewValueBuffered = false; } COM: <s> update the neuron value with the new memorised value </s>
funcom_train/27822085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Icon getItemIcon(JTreeTable treeTable,int row) { TreeTableModel model=treeTable.getTreeTableModel(); Object node=treeTable.getPathForRow(row).getLastPathComponent(); if (model.isLeaf(node)) return m_leafIcon; else if (treeTable.isExpanded(row)) return m_openIcon; else return m_closedIcon; } COM: <s> returns the icon used for the item in given row </s>
funcom_train/4922482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCharacterValue(int hexidecimal) { int charValue; if ((0 <= hexidecimal) && (hexidecimal <= 9)) { charValue = '0' + hexidecimal; } else if ((0xA <= hexidecimal) && (hexidecimal <= 0xF)) { charValue = 'A' + (hexidecimal - 0xA); } else { throw new IllegalArgumentException("Invalid hexidecimal value " + hexidecimal); } return String.valueOf((char) charValue); } COM: <s> obtains the character value for the hexidecimal value </s>
funcom_train/3527115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkPreconditions(String updateSourcePath, String updateLabelName, String resourcePath) throws SlideException, PreconditionViolationException { ViolatedPrecondition violatedPrecondition = getPreconditionViolation(updateSourcePath, updateLabelName, resourcePath); if (violatedPrecondition != null) { throw new PreconditionViolationException(violatedPrecondition, resourcePath); } } COM: <s> checks the preconditions of the update method </s>
funcom_train/8742449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String dump(String indent) { String value = "ML" + indent + getName() + "(" + getId() + ") (parent=" + ((parent == null) ? "null" : parent.getId()) + ")\n"; for (MapLayer child : children) { value += child.dump(indent + " "); } return value; } COM: <s> return a string representation of this menu as ascii art </s>
funcom_train/4536289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioClip getClip(String clip) { if (!clipMap.containsKey(clip)) { // Add new clip final AudioClip newClip = loadClipForURL(clip); if (newClip != null) { clipMap.put(clip, newClip); } } return clipMap.get(clip); } COM: <s> plays an audio clip of local clips deployed with spark </s>
funcom_train/37518536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean run(String[] args, MjcCommonOptions opt, OutputStream os) { final long startTime = System.currentTimeMillis(); // Sets options and initializes compilation options = getOptionsInstance(opt); if (os != null) setOutputStream(os); if (!runInitialization(args)) { errorFound = true; return false; } return runCompilation(startTime); } COM: <s> runs a compilation session for the gui </s>
funcom_train/25332785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCoordinateSystemDAO() throws Exception { DBDAOCollectionCoreFactory instance = new DBDAOCollectionCoreFactory(); DBCollectionSpecies sp = new DBCollectionSpecies(); instance.setSpecies(sp); DBCoordinateSystemDAO result = instance.getCoordinateSystemDAO(); assertNotNull(result); assertTrue(result.getFactory()==instance); assertTrue(result.getSpecies()==sp); } COM: <s> test of get coordinate system dao method of class dbdaocollection core factory </s>
funcom_train/26450709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean init(CpuDriver cpuDriver, Machine machine) { this.cpu = cpuDriver.cpu; this.frq = cpuDriver.frq; this.readMap = cpuDriver.mra.get(); this.writeMap = cpuDriver.mwa.get(); this.portInMap = cpuDriver.ior.get(); this.portOutMap = cpuDriver.iow.get(); this.mem = cpuDriver.mra.mem; this.irqHandler = cpuDriver.irh; this.ipf = cpuDriver.ipf; this.machine = machine; this.cpu.init(this, 0); return true; } COM: <s> initialize the cpu board </s>
funcom_train/31241505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attach(ALBufferID buffer) { assert isCreated() : this + " is not created yet"; try { unattach(); set(AL_BUFFER, buffer.getBufferID()); attachedBuffer = buffer; } catch (OpenALException e) { System.err.println("Failed: "+buffer.getBufferID()+" source: "+source); throw e; } if (buffer.isLooped()) { set(AL_LOOPING, AL_TRUE); } else { set(AL_LOOPING, AL_FALSE); } } COM: <s> attach a buffer to this source </s>
funcom_train/18846978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createPublicProcessPoolNotFoundException(String tscToken, String puppID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80011"; propertyMap.addPropertyValuePair("puppID", puppID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct public process pool not found exception message </s>
funcom_train/39367969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int outside (double x, double x1, double x2) { int i=0; if (between (x, x1, x2)) i = 0; else if (between (x1, x, x2)) i = -1; else if (between (x2, x, x1)) i = 1; return i; } COM: <s> see if value is outside two other values </s>
funcom_train/25069205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PublicKey getPublicKey(final KeyPair pair){ PublicKey pubKey = null; try { PublicKey publicKey = pair.getPublic(); KeyFactory factory = KeyFactory.getInstance(algorithm); pubKeySpec = factory.getKeySpec(publicKey, RSAPublicKeySpec.class); pubKey = factory.generatePublic(pubKeySpec); return pubKey; } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (InvalidKeySpecException e) { e.printStackTrace(); } return pubKey; } COM: <s> extracts a public key from the provided key pair </s>
funcom_train/8323827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String chooseQuery(Dialect dialect) { String best = dialect.getBestName(); String bestCode = dialectCodes.get(best); if (bestCode != null) { return bestCode; } String genericCode = dialectCodes.get("generic"); if (genericCode == null) { throw Util.newError("View has no 'generic' variant"); } return genericCode; } COM: <s> chooses the code variant which best matches the given dialect </s>
funcom_train/36429488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrom(DbTaskRunner runner) { if (runner != null) { this.infostatus = runner.infostatus; this.rank = runner.rank; this.status = runner.status; this.step = runner.step; this.stop = runner.stop; this.filename = runner.filename; this.globallaststep = runner.globallaststep; this.globalstep = runner.globalstep; this.isFileMoved = runner.isFileMoved; } } COM: <s> partial set from another runner infostatus rank status step stop </s>
funcom_train/9132329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertActiveRule(ActiveRule activeRule, String configKey, RulePriority priority, int paramsCount) { assertThat(activeRule.getConfigKey(), is(configKey)); assertThat(activeRule.getPriority(), is(priority)); assertThat(activeRule.getActiveRuleParams().size(), is(paramsCount)); } COM: <s> assert active rule </s>
funcom_train/13246648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPencilmarks(boolean[] pencilmarkArray) { int pencilmarks = 0; if (pencilmarkArray.length != 9) { throw new RuntimeException("Input array is the wrong size"); } for (int i = 0; i < 9; i++) { if (pencilmarkArray[i]) { pencilmarks = pencilmarks | (1 << i); } } this.pencilmarks = pencilmarks; } COM: <s> sets all pencilmarks at once </s>
funcom_train/1760577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAuthenticated() { UserService userService = UserServiceFactory.getUserService(); if (userService.getCurrentUser() != null) { String userEmail = userService.getCurrentUser().getEmail(); AuthenticationToken authToken = store.getUserToken(userEmail); if (authToken != null) { return true; } } return false; } COM: <s> determines whether the current user is authenticated </s>
funcom_train/33137215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createSelectionListener() { selectionListener = new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { Widget widget = event.widget; if (widget == addButton) { addPressed(); } else if (widget == removeButton) { removePressed(); } else if (widget == updateButton) { updatePressed(); } else if (widget == upButton) { upPressed(); } else if (widget == downButton) { downPressed(); } else if (widget == list) { selectionChanged(); } } }; } COM: <s> creates a selection listener </s>
funcom_train/45599404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Script createScript(File scriptFile, String relativeScriptFileName) { Long fileLastModifiedAt = scriptFile.lastModified(); ScriptContentHandle scriptContentHandle = new ScriptContentHandle.UrlScriptContentHandle(FileUtils.getUrl(scriptFile), scriptEncoding, ignoreCarriageReturnsWhenCalculatingCheckSum); return scriptFactory.createScriptWithContent(relativeScriptFileName, fileLastModifiedAt, scriptContentHandle); } COM: <s> creates a script object for the given script file </s>
funcom_train/8278081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getStickyKey(int key) { if (!restrictKey[key] && app.keyInput.isKeyDown(key)) { restrictKey[key] = true; return true; } else if (!app.keyInput.isKeyDown(key) && restrictKey[key]) restrictKey[key] = false; return false; } COM: <s> returns true if a key is down and wasnt down last call </s>
funcom_train/12162421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSmall() throws Exception { DOMOutputBuffer buffer = new DOMOutputBuffer(); buffer.initialise(); protocol.openSmall(buffer, new SmallAttributes()); buffer.appendEncoded("Test"); protocol.closeSmall(buffer, new SmallAttributes()); String expected = "<small>Test</small>"; assertEquals("Protocol string should match", expected, bufferToString(buffer)); } COM: <s> test the small markup </s>
funcom_train/18661376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateApplicationTitle() { final File xmlFile = Settings.pictureCollection.getXmlFile(); if ( xmlFile != null ) { mainWindow.updateApplicationTitleEDT( Settings.jpoResources.getString( "ApplicationTitle" ) + ": " + xmlFile.toString() ); } else { mainWindow.updateApplicationTitleEDT( Settings.jpoResources.getString( "ApplicationTitle" ) ); } } COM: <s> sets the application title to the default tile based on the resourcebundle string </s>
funcom_train/34452632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object unmarshallSimpleArray(String jsonArrayString, Class<?> arrayClass)throws JAJBUnMarshallException{ try { JSONArray jsonArray = (JSONArray)Utility.getJSONBuilder().parse(jsonArrayString).getPrincipalElmenElement(); return this.unmarshallSimpleArray(jsonArray, arrayClass); } catch (Exception e) {throw new JAJBUnMarshallException(e.getMessage(), e);} } COM: <s> converts a string representing a </s>
funcom_train/10538961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Date convertFromDefaultCalendar(Date date, Calendar cal) { cal.clear(); cal.set(date.getYear() + 1900, date.getMonth(), date.getDate(), 0, 0, 0); // normalized time: 00:00:00 return new Date(cal.getTimeInMillis()); } COM: <s> convert a date originally set using the default calendar to a value </s>
funcom_train/1343058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getDocrootPanel() { JPanel p = new JPanel(new BorderLayout()); p.setBorder(BorderFactory.createTitledBorder("Document Root")); docrootTextField = new JTextField(); docrootTextField.setText( prefs.get( ConfigConstants.HTTP_DOCROOT, System.getProperty("user.dir"))); p.add(docrootTextField, BorderLayout.CENTER); JButton b = new JButton("Choose"); b.setActionCommand("choose"); b.addActionListener(this); p.add(b, BorderLayout.EAST); return p; } COM: <s> creates visible representation for the docroot </s>
funcom_train/51575425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveRules() { // // Collect all the rules from combobox // // triggers.removeAllElements(); // // int totalRules = ruleNameChoice.getComponentCount(); // // for (int i = 0; i < totalRules; i++) { // triggers.addElement(ruleNameChoice.getItemAt(i)); // } updateRules = true; this.setVisible(false); } COM: <s> save the rules </s>
funcom_train/2243911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Control getControl(Element controlElement, String commandParam) { String controlType = controlElement.getName(); String controlBuilderName = controlBuilders.getProperty(controlType); ControlBuilder controlBuilder = (ControlBuilder)getApplicationContext().getBean(controlBuilderName); return controlBuilder.build(controlElement, commandParam); } COM: <s> gets the control </s>
funcom_train/3860442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTimeType(int type) { int tempType; tempType = ExtendedTypes.getInstance(). getStandardAlias(properties.getProperty( "dbmonster.jdbc.driver"), type); return (tempType == Types.DATE) || (tempType == Types.TIME) || (tempType == Types.TIMESTAMP); } COM: <s> checks if the type is one of text or date time type </s>
funcom_train/10231121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendServerKeyExchange() throws IOException { sendHandshake(12, m_selectedciphersuite.getKeyExchangeAlgorithm() .generateServerKeyExchange(m_privatekey, m_clientrandom, m_serverrandom)); // LogHolder.log(LogLevel.DEBUG, LogType.MISC, // "[SERVER_KEY_EXCHANGE]"); } COM: <s> send the server key exchange message </s>
funcom_train/50614984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveConfig() throws IOException { cat.info("saving settings to " + configFile); // last files for (int i = 0; i < lastFiles.size(); i++) { String pname = "last.file." + (i + 1); props.remove(pname); props.setProperty(pname, (String) lastFiles.get(i)); } props.setProperty("version", version); props.remove("engine.class.path"); props.store(new FileOutputStream(configFile), "SNTOOL Config"); } COM: <s> saves the current settings </s>
funcom_train/24442642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute copy() { return new Attribute(getId(),getName(),getDescription(),getEntityID(),getDomainID(),getMin(),getMax(),isKey(),getBase()); } COM: <s> copies the attribute </s>
funcom_train/41985414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBookings() { try { this.b2 = new Booking(); b2.setRoom(this.bookingService.getRoomById(11)); b2.setDateFrom(Booking.setFecha(2008, 06, 06)); b2.setDateTo(Booking.setFecha(2008, 06, 13)); this.bookingService.addBooking(b1); this.bookingService.addBooking(b2); assertEquals(2, this.bookingService.getAllBookings().size()); } catch (BookingException be) { } } COM: <s> pre haber 1 room con id 1 </s>
funcom_train/22951400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadVarOptFromAnnotations(TreeEvolution evol) { for(int i=0;i<templates.length;i++) { if(allowInputOptimization != 1 && (templates[i] instanceof ConnectableClassifierConfig || templates[i] instanceof ConnectableModelConfig)) continue; enableVarOptimization(evol, templates[i],i); } } COM: <s> automatically loads variables for optimization from annotations </s>
funcom_train/49017338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrackTime(java.util.List alFiles) { Iterator it = alFiles.iterator(); while (it.hasNext()) { Object o = it.next(); if (o != null && o instanceof File) { addTrackTime((File) o); } else { File file = ((StackItem) o).getFile(); addTrackTime(file); } } } COM: <s> add time of the given set of files </s>
funcom_train/1239869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { int size = in.readInt(); for (int i = 0; i < size; i++) { Object key = in.readObject(); Object value = in.readObject(); put(key, value); } } COM: <s> deserializes this map from the given stream </s>
funcom_train/15686356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillCombo() { teams.removeAllItems(); for (Iterator<Team> iter = menu.teams.iterator(); iter.hasNext();) { Team element = iter.next(); teams.addItem(element); } teams.setEnabled(true); deletebutton.setEnabled(true); if (teams.getItemCount() == 0) { teams.setEnabled(false); deletebutton.setEnabled(false); } } COM: <s> methods that fill the combo with the favourite teams </s>
funcom_train/42570888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_ElementTypeTransformator_element_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ElementTypeTransformator_element_feature", "_UI_ElementTypeTransformator_type"), DescPackage.Literals.ELEMENT_TYPE_TRANSFORMATOR__ELEMENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the element feature </s>
funcom_train/37805812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resortTable() { if( FreetalkMessageTreeTableSortStateBean.isThreaded() ) { return; } final FreetalkMessage root = (FreetalkMessage) getTree().getModel().getRoot(); root.resortChildren(); ((DefaultTreeModel)getTree().getModel()).reload(); } COM: <s> resort table based on settings in sort state bean </s>
funcom_train/50085307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DoubleArrayResult arrangingEnergy(ArrayList<Double> array){ DoubleArrayResult results = new DoubleArrayResult(); int count = array.size(); for(int i = 0; i < count; i++){ double min = array.get(0); int pos = 0; for(int j = 0; j < array.size(); j++){ double value = array.get(j); if( value < min){ min = value; pos = j; } } array.remove(pos); results.add(min); } return results; } COM: <s> put in increasing order the array list </s>
funcom_train/16795250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPreviewCheckbox(PlugInFilterRunner pfr, String label) { if (previewCheckbox!=null) return; //ImagePlus imp = WindowManager.getCurrentImage(); //if (imp!=null && imp.isComposite() && ((CompositeImage)imp).getMode()==CompositeImage.COMPOSITE) // return; previewLabel = label; this.pfr = pfr; addCheckbox(previewLabel, false, true); } COM: <s> add the preview checkbox with user defined label for details see the </s>
funcom_train/4932574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void populateEngine() { // getEngine().put( "engine", getEngine()); // getEngine().put( "GUIClassLoader", // this.getClass().getClassLoader() ); // getEngine().put( "GUIHelper", new unif.GUIHelper() ); // } COM: <s> expose some supporting classes to the generated java application </s>
funcom_train/43235465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addMorpheme(int tag, int phoneme, int nextPosition, int nextTagType) { chart[chartEnd].tag = tag; chart[chartEnd].phoneme = phoneme; chart[chartEnd].nextPosition = nextPosition; chart[chartEnd].nextTagType = nextTagType; chart[chartEnd].state = MORPHEME_STATE_INCOMPLETE; chart[chartEnd].connectionCount = 0; return chartEnd++; } COM: <s> adds a new morpheme to the chart </s>
funcom_train/27942393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map checkDomains(List domains) throws Exception { Map responses = new HashMap(); Iterator i = domains.iterator(); while (i.hasNext()) { GRIDomain domain = (GRIDomain) i.next(); RegistryResponseCheck response = checkDomain(domain); responses.put(domain, response); } return responses; } COM: <s> check for the existance of multiple domains in their appropriate </s>
funcom_train/33527989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedItem(String fontName) { // if a string is given, find the corresponding font, otherwise do // nothing Item item = recentItemsCache.get(fontName); // first in recent items if (item == null) item = itemsCache.get(fontName); // then in regular items if (item != null) setSelectedItem(item); } COM: <s> sets the selected font by the given name </s>
funcom_train/37862713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void splitPath(String path) throws URISyntaxException { encodedCollectionPath = path; if ((encodedCollectionPath != null) && (encodedCollectionPath.length() > 1) && encodedCollectionPath.endsWith("/")) { encodedCollectionPath = encodedCollectionPath.substring(0, encodedCollectionPath.length() - 1); } //TODO : check that collectionPath starts with DBBroker.ROOT_COLLECTION ? } COM: <s> given a java </s>
funcom_train/35839046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getReference(PCSession session, String sNodeID) throws SQLException { String modelName = session.getModelName(); // DBConnection dbcon = getDatabaseManager().requestConnection(modelName); // // String path = path = DBReferenceNode.getReference(dbcon, sNodeID); // // getDatabaseManager().releaseConnection(modelName ,dbcon); return null; } COM: <s> gets the reference node source path </s>
funcom_train/13259759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(final java.io.ObjectOutputStream s) throws java.io.IOException { int expectedModCount = modCount; // Write size s.defaultWriteObject(); // Write inner array size s.writeInt(elements.length); // Writes all elements for (int i = 0; i < size; i++) { s.writeObject(elements[doTranslateIndex(i)]); } if (modCount != expectedModCount) { throw new ConcurrentModificationException(); } } COM: <s> serializes this list </s>
funcom_train/24087789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element addStringElement(Element parent, String name, String value){ Element e = null; // &&(!"".equals(value) if (value != null) { e = parent.addElement(name); if (!"".equals(value)) { e.addText(value); } } return e; } COM: <s> todo move this to a dom4j utility library it is copied from </s>
funcom_train/10798278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertOpen() { if (_closed) { if (_closedException == null) // TRACE not enabled throw new InvalidStateException(_loc .get("closed-factory-notrace")); else throw new InvalidStateException(_loc.get("closed-factory")) .setCause(_closedException); } } COM: <s> throw an exception if the factory is closed </s>
funcom_train/2675885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStreamDirectory(IScope scope) { final StringBuilder result = new StringBuilder(); final IScope app = ScopeUtils.findApplication(scope); final String prefix = "streams/"; while (scope != null && scope != app) { result.insert(0, scope.getName() + "/"); scope = scope.getParent(); } if (result.length() == 0) { return prefix; } else { result.insert(0, prefix).append("/"); return result.toString(); } } COM: <s> generate stream directory based on relative scope path </s>
funcom_train/3115725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(ScribbledText newItem) { // add the new item to the back of items // items.addToBack(newItem); //bubblesort(); //repaintNum(); // get the current DenimWindow DenimWindow win = getDenimWindow(); // get the current DenimSheet DenimSheet sheet = win.getDenimUI().getSheet(); // damage the DenimSheet and have instantanious response sheet.damage(DAMAGE_NOW); return; } COM: <s> shelley add a new item at the bottom of the denim list box </s>
funcom_train/14116661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element findDOMPath(final String name) { if (currentPath != null && name.equals(currentPath.getAttribute(CacheConfiguration.NAME))) { return currentPath; } final NodeList paths = cache.getChildNodes(); for (int i = 0; i < paths.getLength(); i++) { final Element path = (Element) paths.item(i); if (name.equals(path.getAttribute(CacheConfiguration.NAME))) { return path; } } return null; } COM: <s> finds a path in the dom </s>
funcom_train/33622167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonMenuItem2() { if (jRadioButtonMenuItem2 == null) { jRadioButtonMenuItem2 = new JRadioButtonMenuItem(); jRadioButtonMenuItem2.setText("Nearest"); jRadioButtonMenuItem2.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { TextureInfo.MAG_FILTER_PARAM = GL.GL_NEAREST; } }); } return jRadioButtonMenuItem2; } COM: <s> this method initializes j radio button menu item2 </s>
funcom_train/5306224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTickLabelInsets(RectangleInsets insets) { if (insets == null) { throw new IllegalArgumentException("Null 'insets' argument."); } if (!this.tickLabelInsets.equals(insets)) { this.tickLabelInsets = insets; notifyListeners(new AxisChangeEvent(this)); } } COM: <s> sets the insets for the tick labels and sends an </s>
funcom_train/1060136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRadiusXPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ellipse_radiusX_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Ellipse_radiusX_feature", "_UI_Ellipse_type"), Di2Package.Literals.ELLIPSE__RADIUS_X, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the radius x feature </s>
funcom_train/45223199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteMemberAccountsTableModel(int row) { if (row != -1) // At least one Row in Table { fLogger.info("deleteMemberAccountsTableModel:" + selectedMemberAccountIndex + ":" + row); // rowsMemberAccounts.remove(selectedMemberAccountIndex); // tableMemberAccounts.remove(row); // tabModelMemberAccounts.removeRow(row); rowsMemberAccounts.removeElementAt(row); tableMemberAccounts.addNotify(); } } COM: <s> delete member accounts table model </s>
funcom_train/20241002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdDeleteGR() { if (cmdDeleteGR == null) {//GEN-END:|205-getter|0|205-preInit // write pre-init user code here cmdDeleteGR = new Command("Excluir", Command.OK, 0);//GEN-LINE:|205-getter|1|205-postInit // write post-init user code here }//GEN-BEGIN:|205-getter|2| return cmdDeleteGR; } COM: <s> returns an initiliazed instance of cmd delete gr component </s>
funcom_train/15865757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean isDebug(String key) { if( debug.size() > 0 ){ boolean r = debug.containsKey(key); if( !r ){ Iterator i = debug.keySet().iterator(); while( !r && i.hasNext() ){ r = key.matches( (String)i.next() ); } } return r; }else{ return false; } } COM: <s> indicates if the servlet allows debug modus in jetcontext </s>
funcom_train/23716654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem7 () { if (stringItem7 == null) {//GEN-END:|113-getter|0|113-preInit // write pre-init user code here stringItem7 = new StringItem ("Zdobyte punkty:", null);//GEN-LINE:|113-getter|1|113-postInit // write post-init user code here }//GEN-BEGIN:|113-getter|2| return stringItem7; } COM: <s> returns an initiliazed instance of string item7 component </s>
funcom_train/40915114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return this.getGuid() + "#" + this.getType() + "#" + this.getPubDate().toString() + "#" + this.getSearchContext() + "#" + this.getTitle() + "#" + this.getLink() + "#" + Arrays.toString(this.tags); } COM: <s> form the string representation of the object </s>
funcom_train/18592593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionClick(Component c, ComponentLocation loc) { if (loc instanceof JTreeLocation) { TreePath path = convertLocationSafelyToPath((JTree)c, (JTreeLocation)loc); if (path != null) makeVisible(c, path); } super.actionClick(c, loc); } COM: <s> click at the given location </s>
funcom_train/31927114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(MultiKeyHashtable pHash) { Iterator keyIter = pHash.keySet().iterator(); while (keyIter.hasNext()) { String[] keys = (String[]) keyIter.next(); this.put(keys, pHash.get(keys)); } } COM: <s> copies all of the mappings from the specified multi key hashtable to </s>
funcom_train/7685495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFromTextFromCache(String spaceSeparatedRcptIds, String address) { // Potentially blocking call to Contacts provider, lookup up // names: (should usually be cached, though) String value = mCachingNameStore.getContactNames(address); if (TextUtils.isEmpty(value)) { value = mContext.getString(R.string.anonymous_recipient); } mThreadDisplayFrom.put(spaceSeparatedRcptIds, value); return value; } COM: <s> returns the from text using the caching name store </s>
funcom_train/22430687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelView() { if (panelView == null) { panelView = new JPanel(); panelView.setLayout(new CardLayout()); panelView.setPreferredSize(new java.awt.Dimension(278,10)); panelView.add(getScrollTxtBody(), getScrollTxtBody().getName()); panelView.add(getScrollImage(), getScrollImage().getName()); panelView.add(getScrollTableBody(), getScrollTableBody().getName()); show(VIEW_RAW); } return panelView; } COM: <s> this method initializes panel view </s>
funcom_train/25028352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList createList(DefaultListModel listMdl, String[] listElts) { String addElt = null; if (listElts != null) { int listEltsLen = listElts.length; for (int i = 0; i < listEltsLen && (addElt = listElts[i]) != null; i++) { listMdl.addElement(addElt); } } JList list = new JList(listMdl); list.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); list.setLayoutOrientation(JList.VERTICAL); list.setVisibleRowCount(-1); return list; } COM: <s> creates the list of plug ins </s>
funcom_train/1064084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertUMLType(String umlType, boolean useGlib, boolean useC99){ String cType = umlType; if(umlType.equalsIgnoreCase("UnlimitedNatural")){ cType = "signed"; } if(umlType.equalsIgnoreCase("Integer")){ cType = "int"; } if(umlType.equalsIgnoreCase("String")){ if(useGlib){ cType = "GString*"; } else{ cType = "char*"; } } if(umlType.equalsIgnoreCase("Boolean")){ if(useC99){ cType = "_Bool"; } } return cType; } COM: <s> convert an uml type to a c type </s>
funcom_train/17836075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Field parse(final Element templateElement, boolean optional, final ParsingContext context) { final QName templateName = getTemplateName(templateElement, context); try { final Field[] fields = parseFields(templateElement, context); return createMessageTemplate(templateElement, context, templateName, fields); } catch (UnresolvedStaticTemplateReferenceException e) { return null; } } COM: <s> creates a message template object from the dom template element </s>
funcom_train/36441012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getCheckersContentPane() { if (checkersContentPane == null) { checkersContentPane = new JPanel(); checkersContentPane.setLayout(new BorderLayout()); checkersContentPane.add(getJSplitPane(), BorderLayout.CENTER); } return checkersContentPane; } COM: <s> this method initializes checkers content pane </s>
funcom_train/17679955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SqlExp findWhereExp(SqlExp list) { SqlExp e = whereExp; if (e != null) list = list.next = e; for (Join j = joinList; j != null; j = j.next) { list = j.selectExp.findWhereExp(list); } return list; } COM: <s> recursively add all where expressions we can find to list and </s>
funcom_train/13560463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getIntervalAt(int t){ if (Debug.GLOBAL && Debug.INTERVALS_CHECKS) { if(t<0){ throw new IllegalArgumentException("negative time: "+ t); } } T i = (T) _tree.contains(t); if (Debug.GLOBAL && Debug.INTERVALS_CHECKS) { if (i==null) throw new IllegalArgumentException("there is no Interval containing "+t); } return i; } COM: <s> finds the vertex interval containing t in the collection </s>
funcom_train/49789927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDatabaseNotCreated() throws Exception { // the database should not exist IFile db = getProject().getFile(getDatabaseName()); assertFalse(db.exists()); // check the results set try { executeQuery("SELECT * FROM domain_object"); throw new RuntimeException("Unexpectedly could execute query"); } catch (AssertionFailedError e) { // expected } // works fine afterwards testCreatedDatabaseStructure(); assertTrue(db.exists()); } COM: <s> test that the database does not exist before it is tested </s>
funcom_train/41174413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties getDefault() { Properties prop = new Properties(); prop.setProperty("saveDir", System.getProperty("user.home") + File.separator + "Mangas"); prop.setProperty("lang", "en"); prop.setProperty("seriesFolders", String.valueOf(true)); prop.setProperty("createZip", String.valueOf(true)); prop.setProperty("numberOfDownloads", String.valueOf(2)); return prop; } COM: <s> get default set of settings </s>
funcom_train/13272055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecentHomes(List<String> recentHomes) { if (!recentHomes.equals(this.recentHomes)) { List<String> oldRecentHomes = this.recentHomes; this.recentHomes = new ArrayList<String>(recentHomes); this.propertyChangeSupport.firePropertyChange(Property.RECENT_HOMES.name(), oldRecentHomes, getRecentHomes()); } } COM: <s> sets the recent homes list and notifies listeners of this change </s>
funcom_train/7343522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getGetterType(String propertyName) { Class clazz = (Class) getTypes.get(propertyName); if (clazz == null) { throw new ProbeException("There is no READABLE property named '" + propertyName + "' in class '" + className + "'"); } return clazz; } COM: <s> gets the type for a property getter </s>
funcom_train/37711742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testQuoteLastItemEndNewline() throws IOException { String data = "a,junk,line\n" + "quote,last,\"\"\"field\"\"\"\n"; Object[] expectations = new Object[2]; String[] answera = new String[3]; answera[0] = "a"; answera[1] = "junk"; answera[2] = "line"; expectations[0] = answera; String[] answerb = new String[3]; answerb[0] = "quote"; answerb[1] = "last"; answerb[2] = "\"field\""; expectations[1] = answerb; doIt(data, expectations); } COM: <s> test quote as last field on line that ends with </s>
funcom_train/39107264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final static public HTMLHeadElementVector getDefaultLusidStylesheet() { HTMLHeadLink ss = new HTMLHeadLink(Environment.getProperty(STYLESHEET_URL), "stylesheet"); ss.setTYPE("text/css"); HTMLHeadElementVector hev = new HTMLHeadElementVector(); hev.addElement(ss); return hev; } COM: <s> returns link to the default lusid style sheet as defined in the </s>