__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11746354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initEventBridgeParameters(Map<String, String> properties) { String eventBridgeFactoryName = properties .get(BaseRemoteService.EVENT_BRIDGE_FACTORY_PROPERTY); if (eventBridgeFactoryName != null) { Map<String, String> eventBridgeParameters = new HashMap<String, String>( properties); eventBridgeParameters.remove(BaseRemoteService.EVENT_BRIDGE_FACTORY_PROPERTY); this.eventBridgeFactoryName = eventBridgeFactoryName; this.eventBridgeParameters = eventBridgeParameters; } } COM: <s> initializes event bridge parameters for remote clients peer to peer communications </s>
funcom_train/43097985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeClassifier(Object handle, Object classifier) { if (handle instanceof MInstance && classifier instanceof MClassifier) { ((MInstance) handle).removeClassifier((MClassifier) classifier); return; } throw new IllegalArgumentException("handle: " + handle + " or classifier: " + classifier); } COM: <s> this method classifier from an instance </s>
funcom_train/37758103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean passwordLogin(byte[] password) throws IOException { if ((server_auths & 1 << SSH_AUTH_PASSWORD) == 0) { throw new SSHException("password authentication not supported"); } pout.reset(); pout.write(SSH_CMSG_AUTH_PASSWORD); pout.writeString(password); out.write(pout.toBinaryPacket()); return readSuccess(); } COM: <s> attempt password authentication </s>
funcom_train/18345718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleUseLines(ActionEvent e) { JCheckBox check = (JCheckBox)e.getSource(); if (check.isSelected()) { useLines = true; prefs.setProperty("FBUseLines", "TRUE"); } else { useLines = false; prefs.setProperty("FBUseLines", "FALSE"); } prefsChanged = true; // Update the display. updateDisplay(); } COM: <s> method that handles the user clicking on the use lines check box </s>
funcom_train/4378222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playRadio() { if (!mobileSession.isSubscriber()) { fireStatusEvent(new StatusEvent(StatusEvent.SUBSCRIBER_ONLY)); return; } if (playlist == null) { return; } radioPlayer.addRadioPlayerEventListener(this); try { radioPlayer.play(playlist); } catch (Exception e) { e.printStackTrace(); RSFMUtils.debug("Exception when trying to play radio: "+e.getMessage(), this); } } COM: <s> play radio as soon as possible </s>
funcom_train/25290868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSharpenTextureFunc(float[] lod, float[] pts) { checkForLiveOrCompiled(); if (((lod != null) && (pts != null) && (lod.length == pts.length)) || ((lod == null) && (pts == null))) { ((TextureRetained)this.retained).initSharpenTextureFunc(lod, pts); } else { throw new IllegalStateException( Ding3dI18N.getString("Texture22")); } } COM: <s> sets the sharpen texture lod function for this texture object </s>
funcom_train/1695025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testMutualSupertypes(TypeToken<?>... types) { for (int i = 0; i < types.length; i++) { for (int j = i + 1; j < types.length; j++) { assertFalse(types[i].equals(types[j])); assertTrue(isSupertype(types[i], types[j])); assertTrue(isSupertype(types[i], types[j])); } } } COM: <s> tests that the types given are not equal but they are eachothers supertype </s>
funcom_train/23067479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void flushDeletions() throws IOException{ final IndexTransactionObject ito = getIndexTransactionObject(); if (ito == null) { return; } log.debug("flushing " + ito.deletions.size() + " deletions for " + this); withReader(new ReaderCallback() { public Object withReader(IndexReader reader) throws Exception { for (Iterator iter = ito.deletions.iterator(); iter.hasNext();) { Term term = (Term) iter.next(); reader.delete(term); iter.remove(); } return null; } }); } COM: <s> get a reader do the flush and </s>
funcom_train/2579248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point translateJava2DToScreen(Point2D java2DPoint) { Insets insets = getInsets(); int x = (int) (java2DPoint.getX() * this.scaleX + insets.left); int y = (int) (java2DPoint.getY() * this.scaleY + insets.top); return new Point(x, y); } COM: <s> translates a java2 d point on the chart to a screen location </s>
funcom_train/11357855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(URI baseUri) throws IOException, NoRobotException { URI uri = resolveURI(baseUri, "robots.txt"); baseURI = baseUri; robotsURI = uri; rules = null; wildcardRules = null; // fetch baseUrl+"robots.txt" if (!contentLoader.exists(uri)) { return; } InputStream instream = contentLoader.load(uri); doParseText(instream); } COM: <s> head to a website and suck in their robots </s>
funcom_train/2677124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double frameDuration() { switch (layerDescription) { case 3: // Layer 1 return 384 / (getSampleRate() * 0.001); case 2: case 1: if (audioVersionId == 3) { // MPEG 1, Layer 2 and 3 return 1152 / (getSampleRate() * 0.001); } else { // MPEG 2 or 2.5, Layer 2 and 3 return 576 / (getSampleRate() * 0.001); } default: // Unknown return -1; } } COM: <s> return the duration of the frame for this header </s>
funcom_train/7803732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(int exitCode, long delay) { this.exitCode = exitCode; traceLog.log(INFO, 1, "Calling shutdown with code: "+exitCode+" in "+(delay/1000)+" secs"); final long d = delay; final int e = exitCode; Runnable r = new Runnable() { public void run() { try {Thread.sleep(d);} catch (InterruptedException x) {} shutdown(); System.exit(e); }}; (new Thread(r)).start(); } COM: <s> stop the oss with supplied exitcode </s>
funcom_train/1938233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertTestData(File flatXMLFile) throws FileNotFoundException, IOException, DatabaseUnitException, SQLException { IDataSet testDataSet = new FlatXmlDataSet(new FileInputStream(flatXMLFile)); DatabaseOperation.REFRESH.execute(getDatabaseConnection(),testDataSet); testDataSets.add(testDataSet); } COM: <s> dbunit flat xmlfile </s>
funcom_train/30005071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getInfoLabel() { if (this.infoLabel == null) { this.infoLabel = new JLabel(LanguageController.getInstance().getString(this.plugin, "Test_Execution_Child_Sequence_End_Panel_Info_Label") + ((TestSequence)this.path.getLastPathComponent()).getName()); } return this.infoLabel; } COM: <s> gets the info label </s>
funcom_train/2731696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean scanBool() throws InputMismatchException { skipWhites(); if (lookahead == 't') { next(); match('r'); next(); match('u'); next(); match('e'); next(); return true; } else if (lookahead == 'f') { next(); match('a'); next(); match('l'); next(); match('s'); next(); match('e'); next(); return false; } throw new InputMismatchException( "Expected boolean but found " + (char) lookahead); } COM: <s> converts the current token into a boolean </s>
funcom_train/22233463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPolygonOffset(float polygonOffset) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_OFFSET_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes10")); if (isLive()) ((PolygonAttributesRetained)this.retained).setPolygonOffset(polygonOffset); else ((PolygonAttributesRetained)this.retained).initPolygonOffset(polygonOffset); } COM: <s> sets the constant polygon offset to the specified value </s>
funcom_train/45192162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() { if (innerFrame.session() == null) { WEvent event = WEvent.current(); event.session().addFrame(innerFrame); StringBuilder out = event.scriptBuffer(); out.append("wa.openWindow('"); out.append(innerFrame.frameId()); out.append("');\n"); } } COM: <s> open this window on the browser </s>
funcom_train/4800292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpeedAbs(double xspeed, double yspeed) { if (xspeed < 0.0) { xdir = -1; this.xspeed = -xspeed; } else if (xspeed == 0.0) { xdir = 0; this.xspeed = 0; } else { xdir = 1; this.xspeed = xspeed; } if (yspeed < 0.0) { ydir = -1; this.yspeed = -yspeed; } else if (yspeed == 0.0) { ydir = 0; this.yspeed = 0; } else { ydir = 1; this.yspeed = yspeed; } } COM: <s> set absolute speed </s>
funcom_train/40519962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWSDLAdvertContent(String key) throws RemoteException { //WSDLHandler handler = (WSDLHandler) ServerConfiguration.getDefaultAPI (WSDLHandler.class); GetWSDLAdvertContent message = new GetWSDLAdvertContent(key); message.accept(handler); if (message.errorThrown()) { throw new RemoteException( "getWSDLAdvertContent failed on server side", new RegistryException(message.getErrors())); } return (String) message.getResult(); } COM: <s> return the wsdl content of the advert identified by the given key </s>
funcom_train/28283551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateContext(InteractionContext context) { activeContext.getContextMap().put(context.getHandleIdentifier(), context); if (contextFiles != null) { contextFiles.add(getFileForContext(context.getHandleIdentifier())); } if (!activationHistorySuppressed) { processActivityMetaContextEvent(new InteractionEvent(InteractionEvent.Kind.COMMAND, ACTIVITY_STRUCTURE_KIND, context.getHandleIdentifier(), ACTIVITY_ORIGIN_ID, null, ACTIVITY_DELTA_ACTIVATED, 1f)); } } COM: <s> public for testing activiate via handle </s>
funcom_train/16796229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getY(double y, int imageHeight) { if (invertY || (Analyzer.getMeasurements()&Measurements.INVERT_Y)!=0) { if (yOrigin!=0.0) return (yOrigin-y)*pixelHeight; else return (imageHeight-y-1)*pixelHeight; } else return (y-yOrigin)*pixelHeight; } COM: <s> converts a y coodinate in pixels to physical units e </s>
funcom_train/44011385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpPhone() { System.out.println("getEmpPhone"); EmployeeBO instance = new EmployeeBO(); String expResult = ""; String result = instance.getEmpPhone(); 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 emp phone method of class edu </s>
funcom_train/665513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { initializeThreads(); initializeHandler(); if ( handler == null ) { return; } constructEndPoints(); for( Iterator i = endpoints.values().iterator(); i.hasNext(); ) { EndPoint currentEndPoint = (EndPoint) i.next(); currentEndPoint.start(); } } COM: <s> this method is called to start the web server </s>
funcom_train/18876230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isByComputation(String dataName) { Element e = getElement(String.format("//dataMap[@name='%s']", dataName)); //$NON-NLS-1$ return e != null && e.getAttribute("origin").equalsIgnoreCase("internal"); //$NON-NLS-1$ //$NON-NLS-2$ } COM: <s> return true if the field is computed and not read in nmea message </s>
funcom_train/2903269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void switchApplicationWorkspace(String target, JXWindow ewin){ int next = XMLTag.parseInteger(target); if((next<1) || (next==ewin.getWorkspaceID())){ return; } JXRequest[] req = new JXRequest[1]; MothTask it = (MothTask)MothSupportedTask.getTaskDescription(MothSupportedTask.SWITCH_WINDOW_WORKSPACE); it.setWorkspace(next); it.setWindow(ewin); req[0] = new JXRequest(MothSupportedTask.MOTH_ID, it); makeRequest(req); windowClosed(ewin); windowOpened(ewin); frameMenu.setVisible(false); } COM: <s> switch application window to another workspace </s>
funcom_train/51615983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(DataRepresentation representation, Object object) throws WriteError { Iterator i = ((Map)object).entrySet().iterator(); while (i.hasNext()) { Map.Entry entry = (Map.Entry)i.next(); value_type.put(representation, entry.getKey(), entry.getValue()); } } COM: <s> writes a map of objects to some data representation </s>
funcom_train/50066682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void emitop(int op, int sdiff) { if (pendingJumps != null) resolvePending(); if (alive) { if (pendingStatPos != Position.NOPOS) markStatBegin(); if (debugCode) System.err.println(cp + ":" + stacksize + ": " + mnem(op)); emit1(op); if (sdiff <= -1000) { stacksize = stacksize + sdiff + 1000; alive = false; assert stacksize == 0; } else { stacksize = stacksize + sdiff; assert stacksize >= 0; if (stacksize > max_stack) max_stack = stacksize; } } } COM: <s> emit an opcode adjust stacksize by sdiff </s>
funcom_train/1942203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getSystemIDByIdentifier(String identifier) throws SQLException { long ret = -1; Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT system_id FROM System WHERE identifier='" + identifier + "'"); if (rs.next()) ret = rs.getLong("system_id"); stmt.close(); return ret; } COM: <s> queries the database for a system id </s>
funcom_train/40059813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int compareDouble(String grade1, String grade2) { int result; try { result = (new Double(grade1)).doubleValue() > (new Double(grade2)).doubleValue() ? 1 : -1; } catch (Exception formatException) { // in case either grade1 or grade2 cannot be parsed as Double result = compareString(grade1, grade2); } return result; } // compareDouble COM: <s> compare two strings as double values </s>
funcom_train/40062776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GroundAtoms getClosure() { GroundAtoms closure = model.getSignature().createGroundAtoms(); for (UserPredicate pred : model.getHiddenPredicates()) { interpreter.assign(closure.getGroundAtomsOf(pred).getRelationVariable(), closures.get(pred)); } return closure; } COM: <s> determines all hidden ground atoms which have active features </s>
funcom_train/18808417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int column) { if (this.model == null) { return null; } if (column < 1) { return this.model.getX(0, row); } else { return this.model.getY(row, column - 1); } } COM: <s> returns a value of the specified cell </s>
funcom_train/8060188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { Utils.log("AirView.surfaceChanged(): ", width, ", ", height); this.surfaceWidth = width; this.halfSurfaceWidth = width / 2; synchronized(holder) { thread.setSurfaceSize(width, height); } } COM: <s> callback invoked when the surface dimensions change </s>
funcom_train/4179055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TestCase buildTest(final Matcher matcher) { Validate.notNull(matcher, "The matcher cannot be null."); if (matcher.group(TEST_NAME) == null) { throw new RuntimeException("The test name cannot be null."); } TestCase test = new TestCase(matcher.group(TEST_NAME)); test.start(startTime); test.done(Integer.valueOf(matcher.group(NUM_TESTS)), Integer.valueOf(matcher.group(NUM_FAILURES))); return test; } COM: <s> creates a new test from the data contained in matched fields </s>
funcom_train/25382534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ErrorSummary getError(AbstractJobTask jobTask) throws UniversalWorkerException { try { return this.tasksMap.get(jobTask.getJobTaskId()).getError(); } catch (NullPointerException ex) { throw new UniversalWorkerException(Status.CLIENT_ERROR_NOT_FOUND, "The job does not exist."); } } COM: <s> get the error </s>
funcom_train/19311260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChild(final Marker child) throws FoTreeException { if (this.childParsingStatus >= Table.CHILD_PARSING_DONE_WITH_MARKERS) { throwException("Marker children must be first children."); } this.childParsingStatus = Table.CHILD_PARSING_STARTED; this.children.add(child); } COM: <s> validate and add a marker child </s>
funcom_train/13995484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subscribe() { EventBroker.getInstance().subscribeCreate(type, this); EventBroker.getInstance().subscribeAttributeChange(type, attributeKey, this); for (Iterator it = list.getIdentifierList().iterator(); it.hasNext();) { subscribeDelete((Key) it.next()); } } COM: <s> subscribes this code blobject list updater code in the </s>
funcom_train/15685552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(Substitution other) { setBehaviour(other.getBehaviour()); setRedCardCriteria(other.getRedCardCriteria()); setMatchMinuteCriteria(other.getMatchMinuteCriteria()); setOrderType(other.getOrderType()); setObjectPlayerID(other.getObjectPlayerID()); setPlayerOrderId(other.getPlayerOrderId()); setSubjectPlayerID(other.getSubjectPlayerID()); setPos(other.getPos()); setStanding(other.getStanding()); } COM: <s> merges the data from the given code substitution code into this </s>
funcom_train/25797061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Movie parseMovieDetails(String response, Movie movie) { String[] fields = response.split("<field>"); try { movie.tagline = Connection.trim(fields[1]); movie.plot = Connection.trim(fields[2]); movie.numVotes = Connection.trimInt(fields[3]); movie.studio = Connection.trim(fields[4]); movie.rated = Connection.trim(fields[5]); movie.trailerUrl = Connection.trim(fields[6]); } catch (Exception e) { System.err.println("ERROR: " + e.getMessage()); System.err.println("response = " + response); e.printStackTrace(); } return movie; } COM: <s> updates a movie object with some more details </s>
funcom_train/39402693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getJTextAreaRemarks() { if (jTextAreaRemarks == null) { jTextAreaRemarks = new JTextArea(); jTextAreaRemarks.setToolTipText(getMainFrame().getI18N().translate("Opmerkingen")); jTextAreaRemarks.addFocusListener(new FocusStyle()); jTextAreaRemarks.setMargin(new Insets(3,3,3,3)); jTextAreaRemarks.addKeyListener(new KeyListener()); jTextAreaRemarks.setLineWrap(true); jTextAreaRemarks.setWrapStyleWord(true); } return jTextAreaRemarks; } COM: <s> this method initializes j text area remarks </s>
funcom_train/4831926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayGameScreen() { setContentView(R.layout.arrange_ships_tutorial); btnCancel = (Button) findViewById(R.id.ButtonDone); btnRotate = (Button) findViewById(R.id.ButtonRotate); btnShowLastInstruction = (Button) findViewById(R.id.ButtonShowLastInstruction); boardGrid = (GridView) findViewById(R.id.GridViewMoveShips); boardGrid.setAdapter(moveShipsAdapter); } COM: <s> displays the game screen </s>
funcom_train/1804971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateTime toDateTime() { if (!isDateTimeOnly()) { throw new IllegalStateException("This is a valid range, with distinct " + "start and end date. It cannot be converted to one DateTime value. " + "(Check with isDateTimeOnly() first): " + this); } return start; } COM: <s> converts empty ranges into </s>
funcom_train/48423940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPart( PartCategory partCategory, PartEntry part ) { if( partCategory == null ) { throw new InvalidParameterException( "Invalid category: \"" + partCategory + "\"" ); } if( part == null ) { throw new InvalidParameterException( "Invalid part: \"" + part + "\"" ); } storePart( parts, partCategory, part ); storePart( availableParts, partCategory, part ); } COM: <s> add a part of a given category to the total part set </s>
funcom_train/7965441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUpSingleEvaluation() { EasyMock.expect(slaveManagerMock.getAvailableSlaves(2)) .andReturn(slaves); EasyMock.expect(populationDistributorMock.distribute( population, slaves)) .andReturn(distributedPopulation); EasyMock.expect(taskManagerMock.enableDistribution( distributedPopulation, objectiveFunctionList)) .andReturn(populationEvaluatedSignalMock); } COM: <s> sets up mock for single evaluation </s>
funcom_train/47678500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getComponentHelptext(Component p_component) { try { return org.openide.util.NbBundle.getMessage(DBConnectionDialog.class, HELPTEXT_PREFIX + p_component.getName()); } catch (MissingResourceException p_ex) { //return an empty string if the bundle or string could not be found. return ""; } } COM: <s> get the defined helptext form the bundle file </s>
funcom_train/12194000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Header build() { onComplete.completed(this); // Create a sorted version of the entry list. // This sorts in natural (lowest to highest order) so it relies on // the fact that we created negated qvalues as documented in addEntry. List sortedAcceptableEntryList = new ArrayList(acceptableEntryList); Collections.sort(sortedAcceptableEntryList, new AcceptComparator()); return new Header(sortedAcceptableEntryList); } COM: <s> creates a sorted accept header from the headers added </s>
funcom_train/15555629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancelButton() { if (cancelButton == null) { cancelButton = new JButton(); cancelButton.setText(GEEClient.language.getString("cancel")); cancelButton.setLocation(153, 140); cancelButton.setSize(110, 25); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancel(); } }); } return cancelButton; } COM: <s> this method initializes j button1 </s>
funcom_train/12126592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScrollDirector(PScrollDirector scrollDirector) { if (this.scrollDirector != null) { this.scrollDirector.unInstall(); } this.scrollDirector = scrollDirector; if (scrollDirector != null) { this.scrollDirector.install(this, (PCanvas) getView()); } } COM: <s> set the scroll director on this viewport </s>
funcom_train/41575996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getMaxTextVal() { if (maxTextVal == null) {//GEN-END:|59-getter|0|59-preInit // write pre-init user code here maxTextVal = new TextField("Maximum Cell Value: ", "undefined", 32, TextField.ANY);//GEN-LINE:|59-getter|1|59-postInit // write post-init user code here }//GEN-BEGIN:|59-getter|2| return maxTextVal; } COM: <s> returns an initiliazed instance of max text val component </s>
funcom_train/18109948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField1() { if (jTextField1 == null) { jTextField1 = new JTextField(); jTextField1.setColumns(25); jTextField1.setText("Attribute Value"); jTextField1.setEditable(false); jTextField1.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 12)); jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER); } return jTextField1; } COM: <s> this method initializes j text field1 </s>
funcom_train/16768819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleOpen(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { log.debug("handleOpen"); // Skip sent data skipData(req); // TODO: should we evaluate the pathinfo? RTMPTConnection connection = createConnection(); connection.setServlet(this); if (connection.getId() != 0) { // Return connection id to client returnMessage(connection.getId() + "\n", resp); } else { // no more clients are available for serving returnMessage((byte) 0, resp); } } COM: <s> start a new rtmpt session </s>
funcom_train/50714732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFGColor() { IPreferenceStore store = ObjBenchPlugin.getDefault() .getPreferenceStore(); RGB rgb = PreferenceConverter.getColor(store, OBPreferencePage.P_FG_COLOR); fgColor = new Color(null, rgb); setForeground(fgColor); nameLabel.setForeground(fgColor); classLabel.setForeground(fgColor); } COM: <s> sets the foreground color to the preferred color </s>
funcom_train/38810150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__OrgJdomElement_getChild_String_OrgJdomNamespace() { Element element = new Element("element"); Element child = new Element("child"); Namespace ns = Namespace.getNamespace("urn:foo"); Element childNS = new Element("child", ns); element.addContent(child); element.addContent(childNS); assertEquals("incorrect child returned", element.getChild("child", ns), childNS); } COM: <s> test get content by child name and namespace </s>
funcom_train/39379288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSearch(String value) { // Search for user entered value List list = getCustomerService().getCustomersForName(value); table.setRowList(list); // Set the parameter in the pagination link, // so in the next page, we can fill the table again. table.getControlLink().setParameter("nameSearch", value); } COM: <s> search the customer by name and create the table control </s>
funcom_train/41768148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exitProgram() { if (controller.isCollectionChanged()) { int i = JOptionPane.showConfirmDialog(frame, "Do you want to save your changes?", "Collection has been modified", JOptionPane.YES_NO_CANCEL_OPTION); if (i == 2) return; else if (i == 0) { saveAs(); } } frame.dispose(); } COM: <s> exit the program </s>
funcom_train/20045356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _BackGraphicURL() { log.println("Testing with custom Property tester") ; testProperty("BackGraphicURL", util.utils.getFullTestURL("crazy-blue.jpg"), util.utils.getFullTestURL("space-metal.jpg")) ; } COM: <s> only image file url can be used as a value </s>
funcom_train/1560372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoPoint Min(String label, GeoFunction f, NumberValue a, NumberValue b){ AlgoFunctionMin algo = new AlgoFunctionMin(cons, label, f, a, b); GeoPoint minpoint = algo.getPoint(); return minpoint; }//Min(GeoFunction,a,b) COM: <s> min function left right </s>
funcom_train/13561664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double executeExpression(double value, String label) throws EvaluationException { double temp = value; //Apply hedges if needed for (Enumeration<Hedge> en = hedges.elements() ; en.hasMoreElements() ;){ temp = en.nextElement().hedgeIt(temp); } //Perform evaluation if(LV!=null && MF!=null){ if(temp>0.0){ try { LV.set(label, MF, temp); } catch(Exception e){ throw new EvaluationException(e.getMessage());} } } else{ throw new EvaluationException(" - Missing linguistic variable or membership function: "); } return temp; } COM: <s> execute this fuzzy expression with the given value and label </s>
funcom_train/44129305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int joinProcess() throws InterruptedException, IOException { p.waitFor(); ist.join(); est.join(); p.getOutputStream().close(); p.getInputStream().close(); p.getErrorStream().close(); int pExitValue = p.exitValue(); p = null; ist = null; est = null; logger.debug("finished executing"); return (pExitValue); } COM: <s> waits for the process to terminate </s>
funcom_train/49824509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetImage() { // Delete Image from Disk File outputFile = new File("pictures/"+this.userID+".jpg"); if (outputFile.exists()) { if (!outputFile.delete()) { Debug.print("Failed to Delete Current Image File"); } } parent.showProfile(parent.getCurrentPerson()); // Dispose of Editor Window disposeEditor(); } COM: <s> deletes a current profile photo if it exists </s>
funcom_train/23712297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws Exception { //String configDir = "file:///android_asset"; ManagementFactory.setManagementServiceImplClass("org.coos.messaging.android.AndroidManagementServiceImpl"); plugin = PluginFactory.createPluginWithTCPTransport(pluginName, endpointClassName, null, null, hostIp, hostPort, this); plugin.connect(); } COM: <s> call to start the container </s>
funcom_train/22951125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveLearningVectors() { savedVectors = new double[learning_vectors][inputsNumber]; savedVectorsOutput = new double[learning_vectors]; for(int i=0;i<learning_vectors;i++) { System.arraycopy(inputVect[i], 0, savedVectors[i], 0, inputsNumber); } System.arraycopy(target, 0, savedVectorsOutput, 0, learning_vectors); } COM: <s> saves learning vectors to internal use for determining which model to use </s>
funcom_train/3859913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStaticClassRef() { Type typeA = testModel.lookupType(TestClassA.class.getName()); Type typeB = testModel.lookupType(TestClassB.class.getName()); assertNotNull(typeA); assertNotNull(typeB); assertTrue(typeA.dependsOn(typeB)); } COM: <s> if a class references another one statically by accessing the classes name </s>
funcom_train/10585995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RootBeanDefinition createBeanDefinition(Class componentClass, String initMethod, boolean requiresSettings) { final RootBeanDefinition beanDef = new RootBeanDefinition(); beanDef.setBeanClass(componentClass); fillBeanDefinition(beanDef, initMethod, requiresSettings); return beanDef; } COM: <s> helper method to create a new bean definition </s>
funcom_train/39566850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public I_AddressPair getAddressPairByPA(I_NetworkAddress pa){ //System.err.println("Search addresspair for "+pa); Enumeration keys= table.keys(); int i=0; while(keys.hasMoreElements()) { I_AddressPair ap = ((KeyVaultEntry) table.get(keys.nextElement())).getAddressPair(); if(ap.getPhysicalAddress().equals(pa)){ //System.err.println("Found: "+ap); return ap; } i++; } //System.err.println("not found"); return null; } COM: <s> get the addresspair according to the physical address </s>
funcom_train/5659746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleMouseEvent(int x) { thumbPos = Math.max(x, minThumbPos); thumbPos = Math.min(thumbPos, maxThumbPos); if (thumbPos > minThumbPos) percent = (((double)thumbPos - minThumbPos) / (maxThumbPos - minThumbPos)); else percent = 0; value = (int)(Math.round(percent * (double)(maxValue - minValue))) + minValue; repaint(); } COM: <s> handle the mouse event </s>
funcom_train/9523215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandCapacity(int minimumCapacity) { int newCapacity = (value.length + 1) * 2; if (newCapacity < 0) { newCapacity = Integer.MAX_VALUE; } else if (minimumCapacity > newCapacity) { newCapacity = minimumCapacity; } char newValue[] = new char[newCapacity]; System.arraycopy(value, 0, newValue, 0, count); value = newValue; shared = false; } COM: <s> this implements the expansion semantics of ensure capacity but is </s>
funcom_train/11317121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void acceptForEachMemberAffiliation(String name, MemberAffiliationVisitor mav) { Map<Entity, PubSubAffiliation> affils = this.nodeAffiliations.get(name); for (Entity jid : affils.keySet()) { PubSubAffiliation affil = affils.get(jid); mav.visit(jid, affil); } } COM: <s> call the visitor with the each member jid and its associated affiliation </s>
funcom_train/2631713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Figure object) { if (objectStack == null) { objectStack = new Figure[INITIAL_ARRAY_SIZE]; } else if (objectStack.length <= nextIndex) { Figure[] newObjectStack = new Figure[objectStack.length * 2]; System.arraycopy(objectStack, 0, newObjectStack, 0, objectStack.length); objectStack = newObjectStack; } objectStack[nextIndex] = object; ++nextIndex; } COM: <s> adds an object to the container for later drawing </s>
funcom_train/12773840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class BasicRecursionHandler implements RecursionHandler { private final HashSet<CallerSiteContext> recursiveCallSites = HashSetFactory.make(); public boolean isRecursive(CallerSiteContext callSite) { return recursiveCallSites.contains(callSite); } public void makeRecursive(Collection<CallerSiteContext> callSites) { recursiveCallSites.addAll(callSites); } public RecursionHandler makeNew() { return new BasicRecursionHandler(); } } COM: <s> handles method recursion by only collapsing cycles of recursive </s>
funcom_train/49645536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRule(String symbol, StockEventType type, BigDecimal threshold, String account) { ConcurrentLinkedQueue<Rule> queue = this.rules.get(getKey(symbol, type)); if (queue!=null) { queue.remove(new Rule(threshold, account)); } } COM: <s> removes rule from analyzer active rule set </s>
funcom_train/16482188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IXMLElement getMetaCardTag( int metaCardID ) { Iterator i = ((Vector) xml.getChildrenNamed( "metacard" ) ).iterator( ); IXMLElement output = null; while ( i.hasNext() ) { output = (IXMLElement) i.next( ); if ( metaCardID == output.getAttribute("id", -1) ) return output; } return null; } COM: <s> returns the tag corresponding to the first meta card with the given id </s>
funcom_train/35894620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String cleanFancyCharacters(String instring) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < instring.length(); i++) { char achar = instring.charAt(i); int charval = (char) achar; if ((charval == 10) || (charval >= 32 && charval <= 126)) { sb.append(achar); } } return sb.toString(); } COM: <s> strips any character that does not have ascii value between 32 and 126 </s>
funcom_train/23046487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refactorProperty(Property property) { // check if a standard text entry is in the collection deleteDummies(); // invoke the refactoring //new RefactorEnvEntryAction(selectedEditPart, envEntry).run(); //RefactorEnvEntryAction refAction = new RefactorEnvEntryAction(selectedEditPart, envEntry, changeListeners); //refAction.run(); // the model update will be executed by the model change object in the EnventryDelegate } COM: <s> refactors the table model property the emf model property </s>
funcom_train/8222589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Signature getSignature(HttpUrl url, int index) { String[] signatures = _model.getUrlProperties(url, "SIGNATURE"); if (signatures == null) return null; try { return new Signature(signatures[index]); } catch (MalformedURLException mue) { _logger.severe("Malformed URL reading a signature! " + mue.getMessage()); return null; } } COM: <s> gets the signature </s>
funcom_train/45539081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateWithOverEndEvent(HighlightedPosition position, DocumentEvent event) { String newText= event.getText(); if (newText == null) newText= ""; //$NON-NLS-1$ int eventNewLength= newText.length(); int includedLength= 0; while (includedLength < eventNewLength && SCInfoAdditions.isJSCIdentifierPart(newText.charAt(includedLength))) includedLength++; position.setLength(event.getOffset() - position.getOffset() + includedLength); } COM: <s> update the given position with the given event </s>
funcom_train/49318399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _addToFavorites() { Catalog selectedCatalog = getSelectedCatalog(); if (selectedCatalog == null) { return; } _rootCatDir.addCatalog(0, selectedCatalog); _rootCatDir.save(); _updateTreeModel(); setSelectedCatalog(selectedCatalog, true); _expandAll(); } COM: <s> add the selected catalog to the favorites list </s>
funcom_train/10522740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXmlBeanReturnType() throws Exception { XStoogeRowDocument.XStoogeRow customerXmlObj = testCtrl.getAUserXmlBean("moe"); assertNotNull(customerXmlObj); assertEquals(1, customerXmlObj.getSTOOGEPECKINGORDER()); assertEquals("moe", customerXmlObj.getSTOOGENAME()); assertEquals("medium", customerXmlObj.getSTOOGEPANTSIZE().toString()); } COM: <s> test xml bean return type </s>
funcom_train/27817384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFileFromLine(String line) { if (line == null) throw new NullPointerException("Line can't be null"); StringTokenizer st = new StringTokenizer(line); if (st.countTokens() < 3) { return ""; // can't find valid command } st.nextToken(); return st.nextToken(); } COM: <s> returns filename from a http line </s>
funcom_train/43773017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean tryTransfer(E e, long timeout, TimeUnit unit) throws InterruptedException { if(xfer(e, true, TIMED, unit.toNanos(timeout)) == null) return true; if(!Thread.interrupted()) return false; throw new InterruptedException(); } COM: <s> transfers the element to a consumer if it is possible to do so </s>
funcom_train/4219719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug12104() throws Exception { if (versionMeetsMinimum(4, 1)) { createTable("testBug12104", "(field1 GEOMETRY)", "MyISAM"); try { this.stmt .executeUpdate("INSERT INTO testBug12104 VALUES (GeomFromText('POINT(1 1)'))"); this.pstmt = this.conn .prepareStatement("SELECT field1 FROM testBug12104"); this.rs = this.pstmt.executeQuery(); assertTrue(this.rs.next()); System.out.println(this.rs.getObject(1)); } finally { } } } COM: <s> tests fix for bug 12104 geometry types not handled with server side </s>
funcom_train/25467547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void preferences(){ OSMPreferencesForm form; try { form = new OSMPreferencesForm(this); form.setTitle(R.string.LoginOSM); form.show(); } catch (IOException e) { Message msg = new Message(); msg.obj=e.getMessage(); // TODO verify why he was not using view.handlerDialog.sendMessage as he normally should ! // this.handlerDialog.handleMessage(msg); this.displayErrorMessage(msg); } } COM: <s> set the osm login preferences using osmpreferences form </s>
funcom_train/7751475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItem() { if (jMenuItem == null) { jMenuItem = new JMenuItem(); jMenuItem.setText("License"); jMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { JFrame frame = new ViewTextFile("About", "LICENSE"); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } }); } return jMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/25637609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateHelpFile() { String title = configuration.getText("doclet.Window_Help_title"); Content body = getBody(true, getWindowTitle(title)); addTop(body); addNavLinks(true, body); addHelpFileContents(body); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); } COM: <s> generate the help file contents </s>
funcom_train/5669157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackground(Color color) { super.setBackground(color); // For some incomprehensible reason, it is possible for this // to be null, even though it is set to non-null in the constructor. if (_progress != null) { _progressPanel.setBackground(color); } } COM: <s> set the background color </s>
funcom_train/1903401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetXMLListing() { boolean status = true; try { if (regMetacat != null) { String results = regMetacat.getXMLListing(); regMetacat.closeRegistry(); } } catch (Exception e) { System.err.println(e); e.printStackTrace(System.err); } assertTrue(status); } COM: <s> test the registry get xmllisting </s>
funcom_train/31842637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualsAndHashcode(){ assertEquals(true,requirement1.equals(requirement1)); assertEquals(false, requirement1.equals(requirement2)); assertEquals(true, requirement1.hashCode()==requirement1.hashCode()); assertEquals(false, requirement1.hashCode()==requirement2.hashCode()); } COM: <s> requirement test test equals and hashcode </s>
funcom_train/14500719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateUpperRightRectangleCoordinatesFromImage() { visible_sig_rectangle_urx = (int) (visible_sig_rectangle_llx + custom_image.getWidth()); visible_sig_rectangle_ury = (int) (visible_sig_rectangle_lly + custom_image.getHeight()); } COM: <s> set upper right coordinates of the rectangle from given image </s>
funcom_train/3474212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PopUpCatcher (Environment env) { super(env); waitingInstances = new PriorityListPopUpCatcherObserver(); // just "window opened" events WindowEventMask eventMask = new WindowEventMask(env, WindowEventMask.ALL_EXCLUDED); eventMask.setIncluded (WindowEvent.WINDOW_OPENED, true); setAWTEventMask (eventMask); } COM: <s> creates a new pop up catcher with a specified env </s>
funcom_train/49638345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assignIfValid(InputStream stream, Record record) { if (stream == null && record == null) { throw new IllegalStateException("Either stream or record " + "must be defined"); } log.trace("Assigned stream: " + stream + " and record: " + record + " to Payload"); this.stream = stream; this.record = record; } COM: <s> helper for assignment that ensures that at least one of the core </s>
funcom_train/2840586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insert(Object x) { logger.debug("insert(x=" + x + ") - start"); synchronized(putLock_) { LinkedNode p = new LinkedNode(x); synchronized(last_) { last_.next = p; last_ = p; } if (waitingForTake_ > 0) putLock_.notify(); } } COM: <s> main mechanics for put offer </s>
funcom_train/10822315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataOutputStream prepareAppendKey(int length) throws IOException { if (state != State.READY) { throw new IllegalStateException("Incorrect state to start a new key: " + state.name()); } initDataBlock(); DataOutputStream ret = new KeyRegister(length); state = State.IN_KEY; return ret; } COM: <s> obtain an output stream for writing a key into tfile </s>
funcom_train/46620834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TextField getBuildFileTextField() { if (iBuildFileTextField == null) { try { iBuildFileTextField = new TextField(); iBuildFileTextField.setName("BuildFileTextField"); iBuildFileTextField.setBackground(SystemColor.textHighlightText); } catch (Throwable iExc) { handleException(iExc); } } return iBuildFileTextField; } COM: <s> return the build file text field property value </s>
funcom_train/22234799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize(ConfigCommand command) { if (command.argc != 3) { syntaxError("Incorrect number of arguments to " + command.commandName) ; } if (!(command.argv[2] instanceof Double)) { syntaxError("The second argument to " + command.commandName + " must be a GraphicsDevice index") ; } frameBufferNumber = ((Double)command.argv[2]).intValue() ; } COM: <s> initializes this object </s>
funcom_train/28757743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPageforeground(String newVal) { if ((newVal != null && this.pageforeground != null && (newVal.compareTo(this.pageforeground) == 0)) || (newVal == null && this.pageforeground == null && pageforeground_is_initialized)) { return; } this.pageforeground = newVal; pageforeground_is_modified = true; pageforeground_is_initialized = true; } COM: <s> setter method for pageforeground </s>
funcom_train/20215966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getPinFormString() { if (pinFormString == null) {//GEN-END:|153-getter|0|153-preInit // write pre-init user code here pinFormString = new StringItem("", "This application is protected.");//GEN-LINE:|153-getter|1|153-postInit // write post-init user code here }//GEN-BEGIN:|153-getter|2| return pinFormString; } COM: <s> returns an initiliazed instance of pin form string component </s>
funcom_train/50862500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToggleWorkTime(double time) { toggleRunningWorkTime += time; if (toggleRunningWorkTime >= TOGGLE_RUNNING_WORK_TIME_REQUIRED) { toggleRunningWorkTime = 0D; toggle = !toggle; if (toggle) logger.info(getType() + " turned on."); else logger.info(getType() + " turned off."); } } COM: <s> adds work time to toggling the power source on or off </s>
funcom_train/41506712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean keepConnection(SVNRepository repository) { if (!ourAllowPersistentConnections) { return false; } String protocol = repository.getLocation().getProtocol(); return myIsKeepConnections && !"svn".equalsIgnoreCase(protocol) && !"svn+ssh".equalsIgnoreCase(protocol); } COM: <s> says if the given b svnrepository b driver object should </s>
funcom_train/23028299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nextPositionNoRepeats() { SegmentList childSegmentList = currentSegment().getSegmentList(); if (!childSegmentList.isEmpty()) { segmentList = childSegmentList; position = 0; return Transition.ADD_AS_CHILD; } if (nextSibling()) { return Transition.ADD_AT_SAME_LEVEL; } else { int level = 0; while (true) { if (hasParent()) { moveToParent(); level--; if (nextSibling()) { return level; } } else { return Integer.MAX_VALUE; } } } } COM: <s> if called repeatedly from the first segment position each segment </s>
funcom_train/2884416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readWireForm(ByteBuffer buf) throws IOException, WireFormException, ClassNotFoundException { this.wireForm = buf; this.bytes = buf.array(); if( wireForm.getInt(0) != getType() ) throw new WireFormException("Incorrect type in wire form - can not read as " + this.getClass()); } COM: <s> top level read wire form method </s>
funcom_train/22366300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void trayIconAdvice() { // For some reason, in Linux systems display message causes Swing freeze if (!getOsManager().isLinux() && isTrayInitialized()) { getTrayIcon().displayMessage(Constants.APP_NAME, I18nUtils.getString("TRAY_ICON_MESSAGE"), TrayIcon.MessageType.INFO); } } COM: <s> tray icon advice </s>