__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/12414643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompareToZeroNeg() { byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int bSign = -1; BigInteger aNumber = BigInteger.ZERO; BigInteger bNumber = new BigInteger(bSign, bBytes); assertEquals(1, aNumber.compareTo(bNumber)); } COM: <s> compare to big integer a </s>
funcom_train/20885181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttributeWithConverterType() { AttributeWithConverterTypeTestDTO obj = new AttributeWithConverterTypeTestDTO(); obj.attribute = getDateForConverter("28.02.2007:15:21:27"); assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf("2007-02-28T15:21:27.000Z") >= 0); } COM: <s> tests the converter type configuration for an attribute </s>
funcom_train/37658238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TemplateEngine getTemplateEngine() { String className = getOverrideProperty("utfx.tdf.templateEngine.class"); if (className == null) { return null; } else { try { return (TemplateEngine) Class.forName(className).newInstance(); } catch (Exception e) { throw new RuntimeException("Failed to instantiate template engine " + className, e); } } } COM: <s> looks for template engine property key utfx </s>
funcom_train/20020305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() throws InterruptedException { synchronized (lock) { if (shuttingDown) return; shuttingDown = true; } // Timer stop is also invoked from // IdleStateHandler.releaseExternalResources() if any Channels are // created. timer.stop(); ChannelGroup allChannels = new DefaultChannelGroup(); synchronized (pendingRegistrations) { allChannels.addAll(pendingRegistrations.keySet()); } allChannels.addAll(connectionsMap.getAllChannels()); awaitSemiInterruptibly(allChannels.close(), 3); bootstrap.releaseExternalResources(); } COM: <s> shut downs this </s>
funcom_train/20804737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(){ boolean consult=false; File file=new File(margo_dir+File.separator+"examples"+File.separator+"minimalconcession",decisionpb); engine = new SWISubprocessEngine(pl_bin); consult= engine.consultAbsolute(file); if (! consult) { System.out.println(name+": KBase cannot be loaded"); } } COM: <s> load the kbase of the agent </s>
funcom_train/31873721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(String name, Value value){ try{ Class c; if(this.value instanceof java.lang.Class) c = (java.lang.Class)this.value; else c = this.value.getClass(); final Field f = c.getDeclaredField(name); f.set(this.value, value.objectValue()); }catch(Exception ex){ ex.printStackTrace(); } } COM: <s> sets an attribute of the object to the new value </s>
funcom_train/20803862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testFixture (DocumentSentenceProvider sentenceProvider, String[] expectedParagraphs) { for (int i = 0; i < expectedParagraphs.length; i++) { assertEquals (expectedParagraphs[i], sentenceProvider.getText()); assertFalse (sentenceProvider.hasPrevious()); assertEquals ((i != (expectedParagraphs.length - 1)), sentenceProvider.hasNext()); if (i != (expectedParagraphs.length - 1)) { sentenceProvider.next(); } } } COM: <s> tests the output of the sentence provider by moving from start to end </s>
funcom_train/23791653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void acceptMessage(OSCMessage message) { if(message.getAddress().equals(rsp.getAddress()) || message.getAddress().equals("/error")) { try { responded = true; timer.interrupt(); in.removeListener(this); } catch(SecurityException e) { System.err.println("DataNetwork error: cannot shut down Responder thread"); } } } COM: <s> interface method from osclistener to recieve messages </s>
funcom_train/12273339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processLoadedFile(DiskDeviceContext context, FileState state, FileSegment segment) { try { Debug.println("## TestFileProcessor Loaded file=" + state.getPath() + ", fid=" + state.getFileId() + ", cache=" + segment.getTemporaryFile()); } catch (Exception ex) { } } COM: <s> process a cached file just after being loaded </s>
funcom_train/8485285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInterpreterExceptionThrowing() { try { AmbientTalkTest.evalSnippet(ExceptionHandlingTest.class, "snippet1", ctx_); // fail if no exception was thrown by the code. fail(); } catch (XSelectorNotFound e) { // 1. Raising a Java Exception Successfull } catch (InterpreterException e) { e.printStackTrace(); fail("exception: "+ e); } } COM: <s> to avoid improper interference with the interpreter user code should never throw </s>
funcom_train/50429680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawArrow(int x1, int x2, int y1, int y2, int z1, int z2, Graphics2D g) { int a1[] = { x1, y1, z1, x1 }; int b1[] = { x2, y2, z2, x2 }; g.fillPolygon(a1, b1, 4); } COM: <s> this method in is charge of the tip of the arrow for the </s>
funcom_train/2468471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext bc) throws Exception { bundleContext = bc; ServiceReference uiServiceRef = bundleContext .getServiceReference(UIService.class.getName()); uiService = (UIService) bundleContext.getService(uiServiceRef); wizardContainer = uiService.getAccountRegWizardContainer(); icqWizard = new IcqAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(icqWizard); } COM: <s> starts this bundle </s>
funcom_train/22429493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnBase64Encode() { if (btnBase64Encode == null) { btnBase64Encode = new JButton(); btnBase64Encode.setText("Base64 Encode"); btnBase64Encode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { txtDecode.setText(""); txtDecode.setText(getEncoder().getBase64Encode(txtEncode.getText())); } }); } return btnBase64Encode; } COM: <s> this method initializes btn base64 encode </s>
funcom_train/18837087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JavaWsdlMapping getJavaWSDLMapping(String packageType) { JavaWsdlMapping javaWsdlMapping = new JavaWsdlMapping(); PackageMapping packageMapping = new PackageMapping(javaWsdlMapping); javaWsdlMapping.addPackageMapping(packageMapping); packageMapping.setNamespaceURI(Config.NAMESPACE_URI); packageMapping.setPackageType(packageType); return javaWsdlMapping; } COM: <s> setup the required jaxrpc mapping meta data </s>
funcom_train/18135851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(String id, Color color) { if(useGrayScale){ int colorValue = (int) (0.3 * color.getRed() + 0.59 * color.getGreen() + 0.11 * color.getBlue()); color = new Color(colorValue, colorValue, colorValue); } colorMap.put(id, color); } COM: <s> method for setting the color </s>
funcom_train/13547854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(InstructionList iList) { for (Iterator vIt = iList.keySet().iterator(); vIt.hasNext();) { Float time = (Float) vIt.next(); float timefl = time.floatValue(); addAllToTime(timefl, iList.getAllAtTime(timefl)); } } COM: <s> this is used to merge two instruction lists </s>
funcom_train/3416043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureCapacityHelper(int minCapacity) { int oldCapacity = elementData.length; if (minCapacity > oldCapacity) { Object[] oldData = elementData; int newCapacity = (capacityIncrement > 0) ? (oldCapacity + capacityIncrement) : (oldCapacity * 2); if (newCapacity < minCapacity) { newCapacity = minCapacity; } elementData = Arrays.copyOf(elementData, newCapacity); } } COM: <s> this implements the unsynchronized semantics of ensure capacity </s>
funcom_train/38463703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOperator(CriteriaOperator anOperator) { if(anOperator == null) { throw new NullPointerException("Null operator"); } if(CriteriaOperator.AND.equals(anOperator) || CriteriaOperator.OR.equals(anOperator)) { throw new IllegalArgumentException("Illegal operator"); } operator = anOperator; } COM: <s> sets criteria operator </s>
funcom_train/44950945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAqua() { boolean result = false; if (isMacOSX()) { String systemLook = UIManager.getSystemLookAndFeelClassName(); String currentLook = UIManager.getLookAndFeel().getClass().getName(); result = systemLook.equals(currentLook); } return result; } COM: <s> is aqua the current look and feel </s>
funcom_train/145278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintIcon(Component c, Graphics g, int x, int y) { if (leftIcon != null) { leftIcon.paintIcon(c, g, x, y + 1); drawTitleAndRightIcon(c, g, x, y, leftIcon.getIconWidth() + ICON_TEXT_GAP); } else { drawTitleAndRightIcon(c, g, x, y, 0); } } COM: <s> overwrites paint icon to get hold of the coordinates of the icon </s>
funcom_train/50310861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLastButtonPressed(int lastButtonPressed) { int oldLastButtonPressed = this.lastButtonPressed; this.lastButtonPressed = lastButtonPressed; propertyChangeSupport.firePropertyChange("lastButtonPressed", new Integer(oldLastButtonPressed), new Integer(lastButtonPressed)); } COM: <s> setter for property last button pressed </s>
funcom_train/8061069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areChildrenSmallNode(IElement ele) { IElementCollection children = ele.getChildElements(); if (null != children && children.length() > 0) { for (int i = 0; i < children.length(); i++) { if (!isSmallNode(children.item(i))) { return false; } } return true; } return false; } COM: <s> does all of child node are small node </s>
funcom_train/25991450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyUp(int keyCode) { switch (keyCode) { case KeyEvent.KEYCODE_ALT_LEFT: case KeyEvent.KEYCODE_ALT_RIGHT: mAltKey.onRelease(); break; case KeyEvent.KEYCODE_SHIFT_LEFT: case KeyEvent.KEYCODE_SHIFT_RIGHT: mShiftKey.onRelease(); break; default: // Ignore other keyUps break; } } COM: <s> handle a key up event </s>
funcom_train/29919082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getStorageDir() { File file; if (Settings.platform.startsWith("Palm")) { file=new File("/"); } else if (Settings.platform.startsWith("Java")) { file=new File("./"); } else file=getCardVolume(); /* Fallback for emergencies */ if (file == null) file=new File("./"); Vm.debug("Using storage dir "+file.getPath()); return file; } COM: <s> returns the directory to store thigns in or has a bloody good go </s>
funcom_train/18742205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Action getPasteAction() { if (this.pasteAction == null) { Action action = TransferHandler.getPasteAction(); this.pasteAction = new TransferAction(action, Options.PASTE_KEY, Options.PASTE_ACTION_NAME); this.pasteAction.putValue(Action.SMALL_ICON, Icons.PASTE_ICON); this.pasteAction.setEnabled(true); } return this.pasteAction; } COM: <s> lazily creates and returns the action to paste graph elements into the </s>
funcom_train/3292723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int writeline(HttpServletResponse res,String line) { int len=0; len=line.length(); byte templine[]=stringToBytes(line); try { res.getOutputStream().write(templine); // added a flush why is this not done ??? daniel 15 Okt, 1998 res.getOutputStream().flush(); } catch(Exception e) { return -1; } return 0; } COM: <s> write string to the current client socket </s>
funcom_train/21459426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexMin() { int indexMin = 0; double min = getEigenvalue(0).getMagnitude2(); final int N = getNumberOfEigenvalues(); for( int i = 1; i < N; i++ ) { double m = getEigenvalue(i).getMagnitude2(); if( m < min ) { min = m; indexMin = i; } } return indexMin; } COM: <s> returns the index of the eigenvalue which has the smallest magnitude </s>
funcom_train/3080971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireValueChanged() { ListSelectionEvent e = new ListSelectionEvent(this); EventListener[] listeners = listenerList.getListeners(ListSelectionListener.class); for (int index = 0; index < listeners.length; ++index) { ((ListSelectionListener) listeners[index]).valueChanged(e); } } COM: <s> notifies code list selection listener code s that the state of this </s>
funcom_train/49045773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxBinary() { if (jCheckBoxBinary == null) { jCheckBoxBinary = new JCheckBox(); jCheckBoxBinary.setText("Binary"); jCheckBoxBinary.setToolTipText("Calculates binary features such as total pixel number, number of pixels greater than 0, ......"); jCheckBoxBinary.addActionListener(this); jCheckBoxBinary.setActionCommand("parameter"); } return jCheckBoxBinary; } COM: <s> this method initializes j check box binary </s>
funcom_train/33772685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPermission(String label, String accountId, String action) throws SQSException { Map<String, String> params = new HashMap<String, String>(); params.put("Label", label); params.put("AWSAccountId", accountId); params.put("ActionName", action); GetMethod method = new GetMethod(); try { AddPermissionResponse response = makeRequestInt(method, "AddPermission", params, AddPermissionResponse.class); } finally { method.releaseConnection(); } } COM: <s> adds a permission to this message queue </s>
funcom_train/7273617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeOldEntries() { long cutoff = System.currentTimeMillis() - EXPIRY_TIME; // discard outdated info for(Iterator<License> i = licenses.values().iterator(); i.hasNext(); ) { License license = i.next(); if(license.getLastVerifiedTime() < cutoff) { dirty = true; i.remove(); } } } COM: <s> removes any stale entries from the map so that they will automatically </s>
funcom_train/16795729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findMinAndMax() { //ij.IJ.log("findMinAndMax: "+fixedScale); if (fixedScale) return; min = Float.MAX_VALUE; max = -Float.MAX_VALUE; for (int i=0; i < width*height; i++) { float value = pixels[i]; if (!Float.isInfinite(value)) { if (value<min) min = value; if (value>max) max = value; } } minMaxSet = true; showProgress(1.0); } COM: <s> calculates the minimum and maximum pixel value for the entire image </s>
funcom_train/43151740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readAllRows() throws SQLException { for (int i = 0; i < entryCount; i++) { SearchRow row = rows[i]; if (row == null) { row = index.readRow(data, offsets[i], onlyPosition, false); rows[i] = row; } } } COM: <s> ensure all rows are read in memory </s>
funcom_train/3096090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { Model ret = new Model(); ret.curPreset = this.curPreset; ret.historysize = this.historysize; ret.loadAtStartup = this.loadAtStartup; ret.Presets = this.Presets; ret.redo = this.redo; ret.history = this.history; return ret; } COM: <s> no deep copy is made </s>
funcom_train/27822499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getConfigurationNode(String elementName,String attributeName,String attributeValue) { NodeList elementList=m_guiConfiguration.getElementsByTagName(elementName); for (int i=0;i<elementList.getLength();i++) { Element element=(Element)elementList.item(i); if (attributeValue.equals(element.getAttribute(attributeName))) return element; } return null; } COM: <s> returns the element node of the configuration with given element and attribute values </s>
funcom_train/8484134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setLocalField(ATSymbol selector, ATObject value) throws InterpreterException { int index = variableMap_.get(selector); if(index != -1) { // field exists, modify the state vector stateVector_.set(index, value); // ok } else { ATField fld = getLocalCustomField(selector); if (fld != null) { fld.base_writeField(value); // ok } else { // fail throw new XSelectorNotFound(selector, this); } } } COM: <s> set a given field if it exists </s>
funcom_train/41882609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RWColor blend(RWColor c) { int r = (color.red() + c.color.red())/2; int g = (color.green() + c.color.green())/2; int b = (color.blue() + c.color.blue())/2; return new RWColor(r,g,b); } COM: <s> returns a new color which is constructed by averaging each of </s>
funcom_train/34042450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getStopIndexFromInPLI(int inPLI) { Iterator<Stop> stops = stops_.iterator(); int i = 0; while (stops.hasNext()) { Stop s = stops.next(); if (s.getInPLI() == inPLI) { return i; } i++; } return -1; } COM: <s> returns a numeric index of a stop where 0 is the starting timepoint </s>
funcom_train/22616972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) throws ServletException { String configurationFileLocation = BreadcrumbTrailsFilter.DEFAULT_CONFIGURATION_PATH; log.debug("Is custom configuration file path location specified?"); String param = filterConfig.getInitParameter("configurationFileLocation"); if (param != null) { log.debug("Custom configuration file path is not set so using the default path"); configurationFileLocation = param; } configure(configurationFileLocation); } COM: <s> p initializes the filter </s>
funcom_train/16082569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object another) { if (another == null) { return false; } else if (another == this) { return true; } else if (another instanceof RandomTaskPrincipal) { if (((RandomTaskPrincipal)another).getName().equals(name)) { return true; } } return false; } COM: <s> compares this principal to the specified object </s>
funcom_train/34246062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContextLink getChildLink(FmmObject aFmmObject) { for(int i = 0 ; this.getChildContextLinkList().size() > i; i++) { ContextLink lIdeaLink = (ContextLink)this.getChildContextLinkList().get(i); if(lIdeaLink.getContextObject() == aFmmObject) { return lIdeaLink; } } return null; } COM: <s> returns the link object in the child list for the fmm object </s>
funcom_train/33554949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAvhAdminClients(String sortBy, int clientId) { String errorMsg; List clientList = null; try { clientList = clientDaoIF.getAvhAdminClients(sortBy, clientId); } catch (SQLException e) { errorMsg = "SQL error while calling clientDaoIF.getAvhAdminClients"; logger.severe(errorMsg); EwsUtility.printStackTrace(logger, e); } return clientList; } COM: <s> this method returns all the clients users managed by the avh admin </s>
funcom_train/51358563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCmdResetTemplate() { if (cmdResetTemplate == null) { cmdResetTemplate = new JButton(); cmdResetTemplate.setBounds(new Rectangle(120, 300, 151, 31)); cmdResetTemplate.setText("Reset Template"); cmdResetTemplate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { clearTemplateImage(); } }); } return cmdResetTemplate; } COM: <s> this method initializes cmd reset template </s>
funcom_train/14243372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateClassifier(){ Object sel = this.getSelectedItem(); if (sel != null) { MClassifier c = searchForClassifer((String)sel); if (c != null){ this.setClassifier(c); } } Object target = this.getTarget(); if (target != null) { if (getActiveDiagram() instanceof UMLBOTLRuleDiagram){ ((FigBOTLObject)getActiveDiagram().presentationFor(target)).update(); } if (getActiveDiagram() instanceof UMLBOTLObjectSourceDiagram){ ((FigBOTLSourceObject)getActiveDiagram().presentationFor(target)).update(); } } } COM: <s> update the objects classifier </s>
funcom_train/14328150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDate(final long dateLong, final String dateFormatIn) { SimpleDateFormat bartDateFormat = null; if (dateFormatIn == null) { bartDateFormat = new SimpleDateFormat(FDC_defaultFormatDate); } else { bartDateFormat = new SimpleDateFormat(dateFormatIn); } return bartDateFormat.format(new Date(dateLong)); } COM: <s> return date according date long and date format in </s>
funcom_train/5344069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDownload(ManagedDownloader md) { md.initialize(this, fileManager, callback(md)); waiting.add(md); callback(md).addDownload(md); RouterService.schedule(new Runnable() { public void run() { writeSnapshot(); // Save state for crash recovery. } },0,0); } COM: <s> performs common tasks for initializing the download </s>
funcom_train/13415917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateLocation() { if (!getCurrentInput().isMouseButtonDown(1) || picked == null || (picked instanceof AbstractGizmoMesh)) return; // just sets its location to the terrain location, and then update its normal. picked.getLocalTranslation().set(cursorOnTerrain); this.placeOnTerrain(picked); // finally update the picking markers here. updateTerrainMarkers(); } COM: <s> calculates the new location of the mesh </s>
funcom_train/17784928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean transform(Block src, Block target) { boolean ret=false; boolean f_processed=false; for (int i=0; f_processed == false && i < m_rules.size(); i++) { if (m_rules.get(i).isSupported(src)) { ret = m_rules.get(i).transform(this, src, target); f_processed = true; } } return(ret); } COM: <s> this method transforms the supplied model object </s>
funcom_train/49695649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class getWrapperType(Class type) { for (int i = 0; i < primitives.length; i++) { if (primitives[i].equals(type)) { // System.out.println("Found primitive type: " + // primitiveArrays[i]); return primitiveWrappers[i]; } } // if the data type was not found in the array, then it returns the // same data type passed as parameter, which is actually a wrapper // or the Class data type return type; } COM: <s> gets the wrapper type give the primitive type </s>
funcom_train/43245697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsBenefitsAssignable() { System.out.println("isBenefitsAssignable"); InsuranceDG1Object instance = new InsuranceDG1Object(); boolean expResult = true; boolean result = instance.isBenefitsAssignable(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of is benefits assignable method of class org </s>
funcom_train/36994018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean randomWalk(long deltaMilliseconds) { if (!isMoving()) { randomizeGoal(); } if (!moveTowards(this.goalCoordinate, deltaMilliseconds)) { // We can't get any closer to our goal, forget about it stopMoving(); } return isMoving(); } COM: <s> wander about aimlessly </s>
funcom_train/12316815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AnalyzerDescriptor getAnalyzer(String locale) { // get an analyzer from cache AnalyzerDescriptor analyzerDesc = (AnalyzerDescriptor) analyzerDescriptors.get(locale); if (analyzerDesc != null) return analyzerDesc; // obtain configured analyzer for this locale analyzerDesc = new AnalyzerDescriptor(locale); // save analyzer in the cache analyzerDescriptors.put(locale, analyzerDesc); String lang = analyzerDesc.getLang(); if (locale != null && !locale.equals(lang)) analyzerDescriptors.put(lang, analyzerDesc); return analyzerDesc; } COM: <s> obtains analyzer descriptor that indexing and search should use for a given locale </s>
funcom_train/51572232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBackToBackTokenDef() throws Exception { String script = "token = value\ntoken2 = value2"; UncleScriptBuilder builder = parseScript(script); Map<String, String> tokens = builder.getTokens(""); assertEquals(2, tokens.size()); assertEquals("value", tokens.get("token")); assertEquals("value2", tokens.get("token2")); } COM: <s> maybe theres a problem with anything following string </s>
funcom_train/10796022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPrimitive(TypeMirror mirror) { TypeKind kind = mirror.getKind(); return kind == TypeKind.BOOLEAN || kind == TypeKind.BYTE || kind == TypeKind.CHAR || kind == TypeKind.DOUBLE || kind == TypeKind.FLOAT || kind == TypeKind.INT || kind == TypeKind.LONG || kind == TypeKind.SHORT; } COM: <s> affirms if the given type mirrors a primitive </s>
funcom_train/1915451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculate(String db, Transaction tx) throws Exception { if (subquery == null) { return; } Plan p = Planner.createQueryPlan((Select) subquery, db, tx); Scan s = p.open(); ResultRow result = s.next(); ResultSchema schema = s.getSchema(); switch (schema.get(0).type) { case Types.INT: case Types.BOOLEAN: finalValue = new IntegerValue(Integer.parseInt(result.get(0))); break; case Types.FLOAT: finalValue = new FloatValue(Float.parseFloat(result.get(0))); break; default: finalValue = new StringValue(result.get(0)); } } COM: <s> calculate the final value of subquery </s>
funcom_train/3032514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runReplaceBKEdit(BkeditGUI edit) { udebug.dprintln("runReplaceBKEdit()"); client.bkEdit = edit; client.lang = new LangStrings(); client.bkEdit.bk_take_over_screen(); // start up FamilyTree if (client.gedcom != null) client.familytree = MainFrame.createGdbi(client.gedcom, client.lang.curLocale); return; } COM: <s> used when changing language </s>
funcom_train/44011339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpFirstName() { System.out.println("getEmpFirstName"); EmployeeBO instance = new EmployeeBO(); String expResult = ""; String result = instance.getEmpFirstName(); 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 first name method of class edu </s>
funcom_train/51604956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelStartedDate() { if (jPanelStartedDate == null) { jPanelStartedDate = new JPanel(); jPanelStartedDate.setLayout(new BorderLayout()); jPanelStartedDate.add(getDateChooserStarted(), BorderLayout.CENTER); jPanelStartedDate.add(getJButtonEmpty(), BorderLayout.EAST); } return jPanelStartedDate; } COM: <s> this method initializes j panel started date </s>
funcom_train/10347532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getBlendFile(File path) throws Exception { File[] files = path.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { if (files[i].getName().toLowerCase().endsWith(".blend")) { return files[i]; } } } return null; } COM: <s> get the blend file in the actual folder </s>
funcom_train/47729405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFormattedString(float weight, boolean ext) { if (weight <= 0) { return ""; } if ( KILOGRAM.equals(this) ) { if (weight < 1) { String s = WITHOUT_SCALE.format( weight * 1000 ); if (ext) { s += " "+ RESOURCE.getString("WeightUnit.GRAM"); } return s; } } String s = WITH_SCALE.format(weight); if (ext) { s += " "+RESOURCE.getString("WeightUnit."+name()); } return s; } COM: <s> returns the weight as human readable formatted string </s>
funcom_train/11691959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeKeysMatching(MatchPredicate<K> predicate) { synchronized (cache) { Iterator<K> it = cache.keySet().iterator(); while (it.hasNext()) { K key = it.next(); if (predicate.matches(key)) { it.remove(); } } } } COM: <s> clears all cache entries whose key matches the given predicate </s>
funcom_train/9143511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer feedBack = new StringBuffer(); feedBack.append("#"+this.name+"\n"); feedBack.append("\t###Fields### \n\n"); feedBack.append(printComponents(this.getDeclaredFields())+"\n"); feedBack.append("\t###Methods### \n\n"); feedBack.append(printComponents(this.getAllMethods())+"\n"); return feedBack.toString(); } COM: <s> converts the object to a string </s>
funcom_train/14372971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refilter() { final String text = getText(); String[] filters = null; // in CONTAINS mode we treat the string as whitespace delimited if (this.getMode() == CONTAINS) filters = text.split("[ \t]"); // in STARTS_WITH mode we use the string in its entirety else if (this.getMode() == STARTS_WITH) filters = new String[] {text}; setFilterText(filters); } COM: <s> update the filter text from the contents of the document </s>
funcom_train/43235469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int replace(char[] word, short I) { int i = 0; if(word.length == 0) return -1; search(word); i += this.search_end; if(this.search_end == 0 || i < word.length) return -1; else { this.nf[this.search_idx[this.search_end - 1]].node.I = I; return 1; } } COM: <s> replaces the information for the specified word </s>
funcom_train/12712235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rnfr(String fileName) throws IOException { if (_directory.childExists(fileName)) { /** * Set the source name for a rename command */ renameFrom = fileName; output("350 RNFR command succeded, send RNTO command to proceed"); } else { output("550 File specified by RNFR does not exist"); } } COM: <s> set the filename from which we will be renaming </s>
funcom_train/28368078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Double _check(final Double f) { Double a = f; if (proto.min != null) { a = Math.max(((Number) proto.min.value(owner)).doubleValue(), f); } if (proto.max != null) { a = Math.min(((Number) proto.max.value(owner)).doubleValue(), f); } return a; } COM: <s> check the min and max parameter to return a correct value </s>
funcom_train/167205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWaitingNum() throws InterruptedException, IOException { InputStream protocolXML = new FileInputStream(PROTOCOL_XML); JSProtocolParser protocol = new JSProtocolParser(protocolXML); String modelName = protocol.getBaseModel(); JSEntry js = new JSEntry(ID, protocol); Thread resultTaker = new Thread(js); resultTaker.start(); js.send(new FileInputStream(modelName),new FileInputStream(PROTOCOL_XML)); resultTaker.join(); } COM: <s> test get waiting number </s>
funcom_train/50045301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getAsColor(String key) { Color value = (Color) objectCache.get(key); if (value == null) { String defValue = get(key); if (defValue == null) { log.error("No default value for: " + key); return Color.white; } value = ColorUtilities.stringToColor(defValue); objectCache.put(key, value); } return value; } COM: <s> return the preference as a color </s>
funcom_train/26558436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getKeys(Locale locale) { List l = new LinkedList(); Set readTables = new HashSet(); addKeys(l, defaultResourceTable, locale); readTables.add(defaultResourceTable.toLowerCase()); for (Iterator i = tablesByPattern.keySet().iterator(); i.hasNext();) { String table = (String) i.next(); if (readTables.contains(table.toLowerCase())) continue; addKeys(l, table, locale); } return new ListEnumeration(l); } COM: <s> connect to all the resource tables and finds out the available keys for </s>
funcom_train/25506605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DateWidget getDateToField() { if (dateTo == null) { dateTo = new DateWidget(); dateTo.setToolTipText(wordings.toTooltip); dateTo.getDateField().addFocusListener(AutoSelectFocusListener.INSTANCE); dateTo.addPropertyChangeListener(DateWidget.DATE_PROPERTY, consistencyChecker); dateTo.addPropertyChangeListener(DateWidget.CONTENT_VALID_PROPERTY, consistencyChecker); } return dateTo; } COM: <s> this method initializes date to </s>
funcom_train/46395750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doOpenRepBar() { DownvoteTarget dt = getSelectedItem(); if (dt != null) { ReputationPanel rp2 = new ReputationPanel(fctx); UserProfile up = new UserProfile(); up.id = dt.id; up.site = (String)sites.getSelectedItem(); rp2.userProfiles.add(up); rp2.invertColor.setSelected(false); rp2.refreshToggle.setSelected(true); rp2.refreshFeedbackToggle.setSelected(true); ReputationFloat rf = new ReputationFloat(rp2); fctx.panelManager.registerRepFloat(rf); rp2.doRefreshReputation(); rf.setVisible(true); } } COM: <s> open a reputation bar for the currently selected user and site </s>
funcom_train/10482035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubscribed(boolean flag) { // we don't blindly set this to the new value since we only want to // resave the newsrc file if // something changes. if (flag && !subscribed) { subscribed = true; newsrc.setDirty(); } else if (!flag && subscribed) { subscribed = false; newsrc.setDirty(); } } COM: <s> set the subscription status for an article </s>
funcom_train/36994555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decreaseValueBy(final Number decrease) { BigDecimal valDec = new BigDecimal(getValue().toString()); BigDecimal decDec = new BigDecimal(decrease.toString()); valDec = valDec.subtract(decDec); try { setValue(valDec); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("Specified decrease would move value outside of the allowed range."); } } COM: <s> decreases the value represented by this object by the supplied amount </s>
funcom_train/4870988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printInstance(String name, CommandInterpreter out) { for (int i = 0; i < m_archs.length; i++) { InstanceDescription instance = m_archs[i].getInstanceDescription(); if (instance.getName().equalsIgnoreCase(name)) { out.println(instance.getDescription()); return; } } out.println("Instance " + name + " not found"); } COM: <s> prints instance description </s>
funcom_train/2750526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTextMessage(String messageKey, Object[] args, Locale locale) { if (args == null || args.length == 0) { return LocalizedTextUtil.findText(this.getClass(), messageKey, locale); } else { return LocalizedTextUtil.findText(this.getClass(), messageKey, locale, DEFAULT_MESSAGE, args); } } COM: <s> try to resolve the message </s>
funcom_train/50462754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSeperator(int index) { synchronized(items) { items.add(index, DCMenuModel.SEPERATOR); DCMenuModelEvent event = new DCMenuModelEvent(DCMenuModelEvent.ADD_EVENT, index, DCMenuModel.SEPERATOR, this); fireMenuChanged(event); } } COM: <s> add a seperator to this menu model </s>
funcom_train/47906420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean appliesAtPosition(CorpusVersion v, int pos) { for (int i=0;i<_locationSet.length;i++) { if (v.tokAt(pos+_locationSet[i])==this._featVal || v.tagAt(pos+_locationSet[i])==this._featVal) { return true; } } return false; } COM: <s> check if this condition applies at position pos in the corpus version v </s>
funcom_train/33526336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T findById(ID id) throws DataNotFoundException { T entity = getEntityManager().find(getPersistentClass(), id); if (entity == null) { throw new DataNotFoundException("Entity with ID [" + id + "] does not exist"); } getEntityManager().refresh(entity); return entity; } COM: <s> gets a single entity from the database matching the code id code </s>
funcom_train/21971612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int appendOperationName(PerfStatsImpl stats, StringBuffer buffer) { buffer.append("Type=\""); int depth = appendTypeName(stats, buffer); buffer.append('"'); appendParentType(stats, buffer); buffer.append(",name="); stats.appendName(buffer); return depth + 1; } COM: <s> determine jmx operation name for this performance statistics bean </s>
funcom_train/24112981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SymFileCirc30 readCircle30(final InputStream stream) throws IOException { final SymFileCirc30 circle = new SymFileCirc30(); final byte[] array = getBytes(stream, circle.getDataStructureSize()); if (array == null) { return null; } return circle.initFromArray(array) ? circle : null; } COM: <s> reads and returns the circle data structure from the given stream </s>
funcom_train/4925309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSrcMainWebappStaticResources() throws Exception { // Obtain webapp configuration location String alternateConfigurationLocation = this .getPackageRelativePath(this.getClass()) + "/webapp.woof"; // Run the application for woof resource WoofOfficeFloorSource.main("-" + WoofOfficeFloorSource.PROPERTY_WOOF_CONFIGURATION_LOCATION, alternateConfigurationLocation); // Test String response = this.doRequest("/NonWoof.html"); assertEquals( "Incorrect response", "Not a WoOF resource. Also should not be included in resulting built jar.", response); } COM: <s> ensure can retrieve static files from the code src main webapp code </s>
funcom_train/51740624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isClassToBeMarshaled(Class cl) { for( int i=0; i<prefixes.length; i++ ) { // test of exact match // or for class name starting with prefix (as package name) if ( cl.getName().startsWith( prefixes[i]+"." ) || cl.getName().equals( prefixes[i] ) ) return true; } return false; } COM: <s> check if the class name is part of the list of class prefixes </s>
funcom_train/13244253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getError(int heading) { int err = getAngle() - heading; // Handles the wrap-around problem: if (err < -180) err = err + 360; if (err > 180) err = err - 360; System.out.println("Target: " + _heading + " Actual: " + getAngle() + " Error: " + err); return err; } COM: <s> determines the difference between actual compass direction and target heading in degrees </s>
funcom_train/20885194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testElementWithConverterType() { ElementWithConverterTypeTestDTO obj = new ElementWithConverterTypeTestDTO(); obj.element = getDateForConverter("28.02.2007:15:21:27"); assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf("2007-02-28T15:21:27.000Z") >= 0); } COM: <s> tests the converter type configuration for an element </s>
funcom_train/46945720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPaneAnnotation() { if (jTabbedPaneAnnotation == null) { jTabbedPaneAnnotation = new JTabbedPane(); jTabbedPaneAnnotation.addTab("Free Text", null, getJScrollPaneFreeTextAnnotation(), null); jTabbedPaneAnnotation.addTab("Structured", null, getJPanelStructuredAnnotation(), null); jTabbedPaneAnnotation.addTab("Keyword", null, getJPanelKeywordAnnotation(), null); } return jTabbedPaneAnnotation; } COM: <s> this method initializes j tabbed pane annotation </s>
funcom_train/6459977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString (String tableName) { if (proxyFilter == null) { String ali = computeAlias (tableAlias, tableName); String v = value != null ? value.toString () : "null"; if (value instanceof String || value instanceof Timestamp) v = "'" + v + "'"; return ali + this.getColumnName () + this.getTest () + v; } return proxyFilter.toString(tableName); } COM: <s> oracle version differs in that if the proxy filter is set it delegates </s>
funcom_train/25290534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(BufferedImage[] images) { checkForLiveOrCompiled(); int depth = ((ImageComponent3DRetained)this.retained).getDepth(); if (depth != images.length) throw new IllegalArgumentException(Ding3dI18N.getString("ImageComponent3D1")); for (int i=0; i<depth; i++) { ((ImageComponent3DRetained)this.retained).set(i, images[i]); } } COM: <s> sets the array of images in this image component to the </s>
funcom_train/32056972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetScrollableBlockIncrement() { System.out.println("testGetScrollableBlockIncrement"); String name = "test"; String[] files = new String[2]; for (int x = 0; x < 2; x++) files[x] = "file" + x; GPLibraryPanel lPanel = new GPLibraryPanel(name, files, 2); GPLibraryPanel.ScrollablePanel scroll = lPanel.getPanel(); assertTrue(scroll.getScrollableBlockIncrement(new Rectangle(20, 20), 2, 2) == 10); } COM: <s> test of get scrollable block increment of class </s>
funcom_train/43260887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|98-getter|0|98-preInit // write pre-init user code here backCommand = new Command("Takaisin", Command.BACK, 0);//GEN-LINE:|98-getter|1|98-postInit // write post-init user code here }//GEN-BEGIN:|98-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/2465612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintButtonPressed(Graphics g, AbstractButton b){ if ( b.isContentAreaFilled() ) { Dimension size = b.getSize(); g.setColor(getSelectColor()); g.fillRoundRect(0, 0, size.width, size.height, 5, 5); } } COM: <s> overriden to do nothing </s>
funcom_train/599289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGetterMethodName(Class<?> attributeClass, String attribute) { String ret; if (boolean.class.equals(attributeClass)) { ret = GETTER_METHOD_PREFIX_BOOLEAN_IS; } else { ret = GETTER_METHOD_PREFIX; } ret += StringUtils.capitalize(attribute); return ret; } COM: <s> get the attributes getter method name for some attribute class </s>
funcom_train/25032391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadDicomFileOrDirectory(String dicomFileName) { try { File currentFile = FileUtilities.getFileFromNameInsensitiveToCaseIfNecessary(dicomFileName); loadDicomFileOrDirectory(currentFile); } catch (Exception e) { //e.printStackTrace(System.err); if (statusNotificationHandler != null) { statusNotificationHandler.notify(StatusNotificationHandler.READ_FAILED,"Read failed",e); } dispose(); } } COM: <s> p load the named dicom file and display it in the image panel </s>
funcom_train/19372116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Task newInstance( long parentKey) { Date now = new Date(); Task task = new Task(); task.setTitle(Long.toString(now.getTime())); task.setParentKey(parentKey); task.setDateCreated(now); task.setDateModified(now); return task; } COM: <s> instantiate a code task code with the specified </s>
funcom_train/37190872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hide(int type) { boolean proceed = true; if(!compiling) { if(type == RecordFrame.HIDE) super.hide(); else { if(!fromCode && (desktopManager != null) && isVisible()) { proceed = editor.saveChangedDocument(this); if(proceed) { fromCode = true; dispose(); fromCode = false; } else algorithms.getStatusBar().setText(getTitle()+" "+resources.IS_NOT_VALID_STRING); } } } return proceed; } COM: <s> hides or disposes of the frame depending on the type </s>
funcom_train/39138549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onClose() throws IOException { try { this.client.close(false); } catch (Exception xEx) { sLog.debug("unable to cleanly close grid ftp connection - " + xEx.getMessage(), xEx); sLog.warn("unable to cleanly close grid ftp connection - " + xEx.getMessage()); } } COM: <s> called after the stream has been closed </s>
funcom_train/9642910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JList getPrimitivesList() { if (primitivesList == null) { primitivesList = new JList(); primitivesList .setSelectionMode(ListSelectionModel.SINGLE_SELECTION); // primitivesList.setBorder(BorderFactory.createEtchedBorder()); primitivesList.addMouseListener(new PrimitiveDoubleClickListener()); new DragSource().createDefaultDragGestureRecognizer(primitivesList, DnDConstants.ACTION_COPY_OR_MOVE, new DragStartListener()); } return primitivesList; } COM: <s> gets the primitives list </s>
funcom_train/13390264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findHostByPlatform(String regex) { Pattern pattern = Pattern.compile(regex); for (Object o : hostMap.entrySet()) { Map.Entry entry = (Map.Entry) o; String platform = (String) entry.getValue(); Matcher matcher = pattern.matcher(platform); if (matcher.find()) { return (String) entry.getKey(); } } return null; } COM: <s> finds a host whose platform description string contains </s>
funcom_train/29422181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseTimeSliceElements(Element element) { validTime = new TimePrimitive(); validTime = validTime.parseElements(element); this.interpretation = AixmUtil.parseString("interpretation", element); this.sequenceNumber = AixmUtil.parseString("sequenceNumber", element); this.correctionNumber = AixmUtil.parseString("correctionNumber", element); } COM: <s> parse the data out of the element object </s>
funcom_train/39907818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double axisCorr(Odometer.Direction dir){ double theta=Math.atan(Trig.distance(posLeft, posRight)/LIGHT_SENSOR_DIST); double corr=LIGHT_SENSOR_DIST/2.0*Math.sin(theta); double dist; if(dir==Odometer.Direction.X_NEG || dir == Odometer.Direction.X_POS) dist=cPos[1]%30.48; else dist=cPos[0]%30.48; if(dist>30.48/2) dist=30.48/2.0-dist; if(dir == Odometer.Direction.X_NEG || dir == Odometer.Direction.Y_NEG) corr=-corr; corr-=dist; if(Math.abs(corr)>10) corr=0; return corr; } COM: <s> helper for x and y correction computations </s>
funcom_train/21721828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scenarioStarted(String name, Current __current) { /* * the current scene should be set in sam via the RElistener" BUT * this isn't going to work for the garden scenes, because in the re * it's the same scenario with different backgrounds, so need to set * the current scene from sod, where the re is called need to * convert from Rendering Engine name to DM and PC name unless can * check the background as well */ } COM: <s> sets the current scene from re </s>