__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/45116523
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void saveToSrcDirectory() throws Exception {
File scenarioSrcFile = getSourceScenarioFile();
if (scenarioSrcFile == null) {
log.log(Level.SEVERE,
"fail to write scenario to src directory, directory is not set in jsystem.properties or does not exist");
return;
}
scenarioSrcFile.getParentFile().mkdirs();
try {
FileUtils.copyFile(scenarioFile, scenarioSrcFile);
} catch (Exception e) {
log.log(Level.SEVERE, "fail to write scenario to src directory", e);
}
}
COM: <s> writes the scenario into the test projects src dir </s>
|
funcom_train/49330793
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addUserMaterial(Material m) {
Preferences prefs = PREFNODE.node("userMaterials");
// Check whether material already exists
if (getUserMaterials().contains(m)) {
return;
}
// Add material using next free key (key is not used when loading)
String mat = m.toStorableString();
for (int i = 0;; i++) {
String key = "material" + i;
if (prefs.get(key, null) == null) {
prefs.put(key, mat);
return;
}
}
}
COM: <s> add a user defined material to the preferences </s>
|
funcom_train/21189708
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void updateCurrentItemFromSelectedTab() {
ScrollingContentPane scp = (ScrollingContentPane) tabbed
.getSelectedComponent();
String currentURL = scp.getContent().getCurrentPage();
setMode(scp.getContent().getMode());
try {
currentItem = currentBook.lookupURL(currentURL);
} catch (NoSuchElementException notInBook) {
}
checkEnableNext();
checkEnablePrevious();
}
COM: <s> updates the current item member based on the currently selected tab and </s>
|
funcom_train/10746943
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testDebuggerLaunch004() {
logWriter.println("==> testDebuggerLaunch started");
String DEBUGGER_NAME = "org.apache.harmony.jpda.tests.jdwp.DebuggerOnDemand.OnthrowLaunchDebugger002";
String isSuspend = "n";
String isOnuncaught = "n";
performTest(DEBUGGER_NAME, isSuspend, isOnuncaught);
logWriter.println("==> testDebuggerLaunch ended");
}
COM: <s> test executes debuggee without establishing synchronization connection </s>
|
funcom_train/19355878
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public OWLReasoner createReasoner(OWLOntologyManager manager) {
try {
return (OWLReasoner) reasonerConstructor.newInstance(manager);
}
catch (InstantiationException e) {
throw new OWLReasonerSetupException(this, e);
}
catch (IllegalAccessException e) {
throw new OWLReasonerSetupException(this, e);
}
catch (InvocationTargetException e) {
throw new OWLReasonerSetupException(this, e);
}
}
COM: <s> creates an instance of the pellet reasoner </s>
|
funcom_train/5677050
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean updateDir ()
{ if (FD!=null) return true;
File dir=new File(DirField.getText()+File.separatorChar);
if (!dir.isDirectory()) return false;
try
{ String s=FileName.canonical(dir.getCanonicalPath());
addUndo(s);
DirField.setText(s);
Chosen.setText(
FileName.chop(16,
DirField.getText()+File.separatorChar+
PatternField.getText(),48));
}
catch (Exception e) { return false; }
return true;
}
COM: <s> update the directory list </s>
|
funcom_train/13297618
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected String checkSintax(String script) throws Exception {
String result = null;
try {
Object obj = new bsh.Interpreter().eval(script);
} catch (TargetError e) {
/*System.out
.println("The script or code called by the script threw an exception: "
+ e.getTarget());*/
return result;
} catch (EvalError e2) {
/* System.out.println("There was an error in evaluating the script:"
+ e2);*/
return e2.toString();
}
return result;
}
COM: <s> check if the sript sintax is correct before allowing saving a script </s>
|
funcom_train/29954581
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetT() {
System.out.println("getT");
double duration = 10;
int nPoints = 101;
ShapeObject instance = new ShapeObject();
double[] result = instance.getT(duration, nPoints);
for (int i=0; i<nPoints; i++) System.out.print(result[i]+", ");
System.out.println("");
}
COM: <s> test of get t method of class hbm </s>
|
funcom_train/2488788
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public UnitTile addpoly(int edge, int tile, int newedge, Controller flow) {
double xnot, ynot, cos, sin;
int ku;
UnitTile newtile;
if (edge == nsides - 1)
ku = 0;
else
ku = edge + 1;
xnot = vertexx[ku];
ynot = vertexy[ku];
cos = normaly[edge];
sin = -normalx[edge];
BasicTile mybasic;
mybasic = BasicTile.createBasicTile(tile, flow.setnum, tile,
flow.csetnum);
double chscale;
chscale = len[edge] / mybasic.lengths[newedge];
newtile = new UnitTile(mybasic, cos, sin, xnot, ynot, newedge, chscale);
return newtile;
}
COM: <s> given a unittile this method finds the new unittile that connects to the </s>
|
funcom_train/11016919
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void cloneStyleFrom(FontRecord source) {
field_1_font_height = source.field_1_font_height;
field_2_attributes = source.field_2_attributes;
field_3_color_palette_index = source.field_3_color_palette_index;
field_4_bold_weight = source.field_4_bold_weight;
field_5_super_sub_script = source.field_5_super_sub_script;
field_6_underline = source.field_6_underline;
field_7_family = source.field_7_family;
field_8_charset = source.field_8_charset;
field_9_zero = source.field_9_zero;
field_11_font_name = source.field_11_font_name;
}
COM: <s> clones all the font style information from another </s>
|
funcom_train/42637768
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void updateMap(List<MapEntry> map, String key, Argument value) {
Argument valueLast = get(map, key);
if (valueLast == null) put(map, key, value);
else {
formulaChanged();
value = new OperatorDependent(new PlusOperator(), valueLast, value);
put(map, key, value);
}
}
COM: <s> updating storage with new value </s>
|
funcom_train/34356552
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void detachProperties(Collection<SSWAPProperty> properties) {
SourceModel sourceModel = assertSourceModel();
if (properties == null) {
return;
}
for (SSWAPProperty property : properties) {
if (property instanceof PropertyImpl) {
// set individual to null (no longer belongs to this individual)
((PropertyImpl) property).setIndividual(null);
// detach it from the model (to prevent any memory leak)
sourceModel.removeDependentModel((PropertyImpl) property);
}
}
}
COM: <s> detaches sswapproperties from this individual and source model </s>
|
funcom_train/49608652
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public GuestContribution updateGuestContribution(String username,EntityManager em,GuestContribution vo) throws Throwable {
try {
return (GuestContribution)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> update a guest contribution </s>
|
funcom_train/4249945
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Double calculateDistance(Double tssDB, Double rssDB, Double frequency) {
// 4Pi and Speed of light in dB meters per second (exact)
Double speedOfLightDB = 32.44;
// Calculate the frequency in dB
Double frequencyDB = 20 * Math.log10(frequency);
// Calculate distance in dB
Double distanceDB = tssDB - rssDB - frequencyDB - speedOfLightDB;
// Calculate the distance in meters
return Math.pow(10, distanceDB/20) * 1000;
}
COM: <s> calculates the distance of separation between the receiver and transmitter </s>
|
funcom_train/36259331
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void hideUpDownButtons() {
upButton.setSelected(false);
downButton.setSelected(false);
this.remove(upButton);
this.remove(downButton);
this.repaint(upButton.getBounds());
this.repaint(downButton.getBounds());
upDownButtonsVisible = false;
}
COM: <s> hide the up down buttons </s>
|
funcom_train/11004938
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public FontRenderContext getFontRenderContext() {
boolean isAntiAliased = RenderingHints.VALUE_TEXT_ANTIALIAS_ON.equals(
getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING));
boolean usesFractionalMetrics = RenderingHints.VALUE_FRACTIONALMETRICS_ON.equals(
getRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS));
return new FontRenderContext(new AffineTransform(), isAntiAliased, usesFractionalMetrics);
}
COM: <s> get the rendering context of the code font code within this </s>
|
funcom_train/25578247
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void notifyDispose() {
// Undocks all pages docked to this window.
// Iterator<PageHolder> phIterator = RiafMgr.global().getPageHolders()
// .iterator();
// PageHolder ph = null;
// while (phIterator.hasNext()) {
// ph = phIterator.next();
// if (childs.contains(ph.getContainer())) {
// RiafMgr.global().undockPage(ph);
// }
// }
getImpl().removeWindowListener(mCloseListener);
unregisterWithDockingManager();
}
COM: <s> called before the window is disposed to unregister the listeners and </s>
|
funcom_train/16914479
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double sample(final PixelMatrix pixelMatrix) {
if (pixelMatrix == null) {
throw new IllegalArgumentException("pixelMatrix must not be null");
}
Image image = pixelMatrix.view(receptiveField);
BufferedImage bufferedImage = toBufferedImage(image);
sample = filter.filter(bufferedImage);
return sample;
}
COM: <s> sample the specified pixel matrix reducing a view of the pixel matrix </s>
|
funcom_train/19096965
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public long getTime() {
if (m_Start == null) return 0;
Calendar stop;
if (m_Stop != null) {
stop = m_Stop;
} else {
stop = new GregorianCalendar();
}
return stop.getTimeInMillis() - m_Start.getTimeInMillis();
}
COM: <s> get the time value in milliseconds </s>
|
funcom_train/12663888
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public CmdModuleArchiveManifest getManifest() throws IOException {
final File file = new File(getBaseDir(), "META-INF" + File.separator + "MANIFEST.MF");
final Manifest manifest = new Manifest(new FileInputStream(file));
return CmdModuleArchiveManifest.create(manifest);
}
COM: <s> gets the manifest file for this module </s>
|
funcom_train/14027302
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public R apply(P... param) {
LinkedList<P> ps = new LinkedList<P>(Arrays.asList(param));
for(int i = 0; i < _indices.length; ++i) {
ps.add(_indices[i], _constants[i]);
}
return _decoree.apply(ps.toArray(param));
}
COM: <s> apply the n k ary decorator i </s>
|
funcom_train/44457839
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void add(Element element) throws IllegalArgumentException {
// Check preconditions
MandatoryArgumentChecker.check("element", element);
Element elementToAdd = (Element) getDataElementBuilder().getDocument().importNode(element, true);
_dataElementBuilder.getDataElement().appendChild(elementToAdd);
}
COM: <s> adds a new code element code to the data element </s>
|
funcom_train/3330116
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public AttributeDecl getReference() {
AttributeDecl result = null;
if (_attributeRef != null) {
result = _schema.getAttribute(_attributeRef);
if (result == null) {
String err = "Unable to find attribute referenced :\" ";
err += _attributeRef;
err +="\"";
throw new IllegalStateException(err);
}
}
return result;
} //-- getReference
COM: <s> returns the attribute decl that this attribute definition references </s>
|
funcom_train/39429256
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void createComposite() {
GridData gridData16 = new org.eclipse.swt.layout.GridData();
composite = new Composite(sShell, SWT.NONE);
createAboutPanel();
gridData16.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData16.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData16.grabExcessHorizontalSpace = true;
gridData16.grabExcessVerticalSpace = true;
composite.setLayoutData(gridData16);
composite.setLayout(new FillLayout());
}
COM: <s> this method initializes composite </s>
|
funcom_train/49052489
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void insert(String key, String value, int position) {
if (pageElements.containsKey(key) && position >= 0 && pageElements.get(key).size() > position) {
pageElements.get(key).add(position, value);
} else {
put(key, value);
}
}
COM: <s> insert the specified value in the specified page module at the </s>
|
funcom_train/25856723
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSearchKeywordInDatasource(String keywords, String ds) throws Exception {
LinkedList<String> kwords = new LinkedList<String>();
kwords.add(keywords);
kwords.add(DS_SEARCH_PREFIX + ds);
ResultPage rp = search(new Keywords(kwords), 10);
if (rp.resultItemList.size()>0) {
ResultItem item = rp.resultItemList.getFirst();
getSeeAlsoItem(ds, 0, item.getURL());
getArraySnippet(ds, 0, item.getURL());
}
}
COM: <s> search for given keywords in one datasource ds </s>
|
funcom_train/545697
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addText(String s) {
int i;
// Shit lines
for(i=0;i<lines.length-1;i++)
lines[i] = lines[i+1];
// Add the new text
lines[i] = s;
//Update the text area
String tmp="";
for(i=0;i<lines.length;i++)
tmp+=lines[i] + "\n";
textArea.setText(tmp);
textArea.refresh();
}
COM: <s> adds the specified line to the text area </s>
|
funcom_train/27835211
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void deleteRow(int row) {
String sql_query = "delete from " + _tableName + " where "
+ getPrimaryKey() + " = "
+ dbRepresentation(getColumnNumber(getPrimaryKey()),
getValueAt(row, getPrimaryKey()));
if (executeUpdate(sql_query)) {
removeRow(row);
}
}
COM: <s> deletes a row by its primary key </s>
|
funcom_train/18321221
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Message decode(InputStream is) throws IOException, IncorrectMessageFormatException {
ObjectInputStream ois = new ObjectInputStream(is);
Message m;
try {
m = (Message)ois.readObject();
} catch (ClassCastException e) {
throw new IncorrectMessageFormatException(e);
} catch (ClassNotFoundException e) {
throw new IncorrectMessageFormatException(e);
}
return m;
}
COM: <s> method code decode code </s>
|
funcom_train/47033952
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testAppendProtocol() {
assertEquals(
"file://C:/Program Files/Aptana", CoreUIUtils.appendProtocol("C:/Program Files/Aptana")); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(
"http://www.google.com", CoreUIUtils.appendProtocol("http://www.google.com")); //$NON-NLS-1$ //$NON-NLS-2$
}
COM: <s> test method for com </s>
|
funcom_train/15918370
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Block flattenAtEach(AtEach stmt, boolean labeled) {
List<Stmt> stmts = new ArrayList<Stmt>();
Expr domain = getPrimaryAndStatements(stmt.domain(), stmts);
stmt = (AtEach) stmt.domain(domain);
stmts.add(label(stmt, labeled));
return syn.createBlock(stmt.position(), stmts);
}
COM: <s> flatten an at each statement </s>
|
funcom_train/11771976
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
jSplitPane.setLeftComponent(getJTreePref());
jSplitPane.setRightComponent(getJPanelLeft());
jSplitPane.setDividerLocation(150);
}
return jSplitPane;
}
COM: <s> this method initializes j split pane </s>
|
funcom_train/28127023
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension getSize() {
int xborder = 0;
int yborder = 0;
if (insets != null) {
xborder = insets.left + insets.right;
yborder = insets.top + insets.bottom;
}
return new Dimension(buffer.width * charWidth + xborder,
buffer.height * charHeight + yborder);
}
COM: <s> return the real size in points of the character display </s>
|
funcom_train/18942837
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Rational square(boolean reduce) {
Rational square;
if (!reduce) {
square = new Rational(Utils.karatsubaSquare(numerator),
Utils.karatsubaSquare(denominator));
} else {
square = Rational.create(Utils.karatsubaSquare(reduced().numerator),
Utils.karatsubaSquare(reduced().denominator.pow(2)));
}
assert square.signum() >= 0;
return square;
}
COM: <s> does not keep any referenced to the result </s>
|
funcom_train/29727697
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void start() {
if (!start.getAndSet(true)) {
lock.lock();
try {
logStartMessage(false);
ctx = ComponentApplicationContext.instance();
// PERMISSION: java.io.RuntimePermission modifyThread
scan(paths);
thread.start();
} finally {
try {
logStartMessage(true);
} finally {
lock.unlock();
}
}
}
}
COM: <s> starts the container </s>
|
funcom_train/45763149
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void initialize( TestParameters tParam, PrintWriter log ) {
String cncstr = (String) tParam.get("CNCSTR") ;
int idx = cncstr.indexOf("host=") + 5 ;
sOfficeHost = cncstr.substring(idx, cncstr.indexOf(",", idx)) ;
}
COM: <s> retrieves host name where star office is started from test </s>
|
funcom_train/2585166
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testImmutable() {
Date d1 = new Date(10L);
Date d2 = new Date(20L);
DateRange r = new DateRange(d1, d2);
d1.setTime(11L);
assertEquals(new Date(10L), r.getLowerDate());
r.getUpperDate().setTime(22L);
assertEquals(new Date(20L), r.getUpperDate());
}
COM: <s> confirm that a date range is immutable </s>
|
funcom_train/1653603
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testEncodePadding() {
byte[][] methodBytesArray = {
//three byte Array -> no padding char expected
{4,4,4},
//two byte Array -> one padding char expected
{4,4},
//one byte Array -> two padding-chars expected
{4}};
String encoded;
for (int i = 0; i<methodBytesArray.length; i++) {
encoded = Base64.encode(methodBytesArray[i],true);
if (i == 0)
//no occurrences expected
assertEquals(encoded.indexOf('='),-1);
else
assertEquals(encoded.indexOf('='),encoded.length()-i);
}
}
COM: <s> test the encode string boolean </s>
|
funcom_train/23384192
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean checkForCircularDependencies(Category newChildCategory) {
if (this.getId() != null && this.equals(newChildCategory)) {
return true;
}
if (this.getId() == null && this != newChildCategory) {
return false;
}
if (this.isRoot()) {
return false;
}
return this.parent.checkForCircularDependencies(newChildCategory);
}
COM: <s> convenience method for dependency check to prevent circular dependencies </s>
|
funcom_train/14328380
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean useCursor(boolean returnKeys, String sqlWord) {
return (resultSetType != ResultSet.TYPE_FORWARD_ONLY
|| resultSetConcurrency != ResultSet.CONCUR_READ_ONLY
|| connection.getUseCursors()
|| cursorName != null)
&& !returnKeys
&& (sqlWord == null || sqlWord.equals("select") || sqlWord.startsWith("exec"));
}
COM: <s> determines whether a cursor should be used based on the requested result </s>
|
funcom_train/51376451
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void expiresAfter(int hr, int min, int sec) {
FastStringBuffer fsb = FastStringBuffer.getInstance();
try {
fsb.append(hr);
fsb.append(":");
fsb.append(min);
fsb.append(":");
fsb.append(sec);
//Stored internally as "hours:minutes:seconds"
expiresAfter = fsb.toString();
} finally {
fsb.release();
fsb = null;
}
}
COM: <s> method to set the time delta from current time when the request will </s>
|
funcom_train/25520389
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ServiceRecord getRecord(Connection notifier) {
if (notifier == null) {
throw new NullPointerException("notifier is null");
}
if (!(notifier instanceof BluetoothConnectionNotifierServiceRecordAccess)) {
throw new IllegalArgumentException("connection is not a Bluetooth notifier");
}
return ((BluetoothConnectionNotifierServiceRecordAccess) notifier).getServiceRecord();
}
COM: <s> gets the service record corresponding to a code btspp code </s>
|
funcom_train/25187809
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testPutGet() {
ReopenMap map = new ReopenMap();
File f = new File("1234L");
map.setFile(1234L, f);
File file = map.getFile(0);
assertEquals("Put get mismatch", f, file);
assertEquals("Size failed", 1, map.getSize());
}
COM: <s> check we can put and get values </s>
|
funcom_train/17922636
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testFormatMilisFromPattern() {
System.out.println("formatMilisFromPattern");
String time = "05:05:55";
long expResult = 18355000L;
long result = TimeHandler.formatMilisFromPattern(time);
System.out.println("String to convert: " + time);
System.out.println("Result: " + result);
assertEquals(expResult, result);
}
COM: <s> test of format milis from pattern method of class eu </s>
|
funcom_train/14270503
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Date getTimeStamp() {
TableRowDataProvider trdp = (TableRowDataProvider)getBean("currentRow");
if (trdp == null) {
return null;
}
Integer timeval = (Integer)trdp.getValue("time_num");
return new Date(1000L * timeval.longValue());
}
COM: <s> convert unix timestamp to java date structure </s>
|
funcom_train/3004189
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private PathItemLocal createItem( String fullName, Serializable prefs ) {
PathItemLocal pathItem = null;
logGraphBegin( "creating Prefs : " + fullName );
try {
pathItem = pathHome().create( fullName, prefs );
} catch( Exception e ) {
handleExceptionAsSystemException( e );
}
return pathItem;
}
COM: <s> creates a new pref </s>
|
funcom_train/11739658
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void startupAction() {
view = new DefaultsPreferencesView(ALL_CONTROL, UNINIT_CONTROL);
view.setTitle("Update DataObjects Superclass");
initController();
view.pack();
view.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
view.setModal(true);
makeCloseableOnEscape();
centerView();
view.setVisible(true);
}
COM: <s> creates and runs superclass update dialog </s>
|
funcom_train/24135848
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private User getUserFromWaitingList(String nick) {
User user = (User)getUserWaitingList().get(nick);
if (user == null) {
user = new User(nick);
getUserWaitingList().put(nick,user);
}
else {
getUserWaitingList().remove(user);
}
return user;
}
COM: <s> gets user from waiting list creates new user if user does not </s>
|
funcom_train/21883958
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String getFilename(final String type, final String name) {
final StringBuffer sb = new StringBuffer();
sb.append("package.").append(type + ".").append(name + ".").append(Constants.PROPERTY_PKG_FILENAME_FIELD);
return getProject().getProperty(sb.toString());
}
COM: <s> returns the package filename </s>
|
funcom_train/43101480
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isRoot(Object handle) {
if (handle instanceof MGeneralizableElement) {
return ((MGeneralizableElement) handle).isRoot();
}
if (handle instanceof MOperation) {
return ((MOperation) handle).isRoot();
}
if (handle instanceof MReception) {
return ((MReception) handle).isRoot();
}
return illegalArgumentBoolean(handle);
}
COM: <s> recognizer for roots </s>
|
funcom_train/19844702
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getObjectImage(int groupID, int objectID) {
if (groupID >= 0 && groupID < objectGroups.size()) {
ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID);
if (objectID >= 0 && objectID < grp.objects.size()) {
GroupObject object = (GroupObject) grp.objects.get(objectID);
if (object == null) {
return null;
}
return object.image;
}
}
return null;
}
COM: <s> retrieve the image source property for a given object </s>
|
funcom_train/2426488
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addFilter(final String columnName, final String condition, final SortOrder order) {
UiUtils.runOnEventThread(new Runnable() {
@Override
public void run() {
int row = tableModel.getRowIndexFor(columnName);
if (row >= 0) {
tableModel.setValueAt(condition, row, 1);
tableModel.setValueAt(order, row, 2);
}
}
});
}
COM: <s> adds a new filter condition to this table </s>
|
funcom_train/5782407
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object dispatchCommand (Command c) throws RemoteException {
if (c.getGatewayUrl().equals (conf.getWanUrl())) {
synchronized (drvRegistry.registry) {
ServerBridgeDriver drv =
(ServerBridgeDriver) drvRegistry.registry.get (c.getServerUrl());
if (drv == null)
throw new RemoteException ("Driver not found for " +
c.getServerUrl());
else
return drv.dispatchCommand(c);
}
} else
return forwardCommand(c);
}
COM: <s> a dispatch command c is performed on the accepting driver </s>
|
funcom_train/19098308
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public PMatch parse(PScanner input, long begin, PContext context) {
if (begin < input.length()
&& context.getDirective().convert(input.charAt(begin))
== context.getDirective().convert(this.character)) {
return PMatch.TRUE;
}
return PMatch.FALSE;
}
COM: <s> determines if there is any input left and returns a succesful match if </s>
|
funcom_train/20149630
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ModelAndView home(HttpServletRequest request, HttpServletResponse response) {
// declare locales
Map<String, Object> model;
List<CategoryDTO> categories;
// init locals
model = new HashMap<String, Object>();
categories = getCategoryDSO().findRootCategories(1);
// find the store categories
if (categories != null && !categories.isEmpty()) {
model.put("categories", categories);
}
// return mav
return new ModelAndView("home", model);
}
COM: <s> home action this is the default action </s>
|
funcom_train/45017853
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getName() {
String n = name;
for (int i = 0; i < 2; i++) {
if (i == 0) {
n = n.replace("V0", s.dim);
n = n.replace("P0", paramName);
} else {
n = n.replace("V" + i, s.offDim);
n = n.replace("P" + i, offParamName);
}
}
return n;
}
COM: <s> returns that canonical name of a scale mode </s>
|
funcom_train/23993277
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getKeyIntValue(String section, String key, int defaultValue) {
String value = getKeyValue(section, key);
if (value == null) {
return defaultValue;
} else {
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
return 0;
}
}
}
COM: <s> gets the key int value attribute of the ini file object </s>
|
funcom_train/50894603
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(Object other) {
if (this == other)
return true;
if (!(other instanceof Signature))
return false;
Signature otherSig = (Signature) other;
if (!otherSig.name.equals(name)
|| otherSig.arguments.length != arguments.length)
return false;
for (int i = 0; i != arguments.length; i++)
if (!arguments[i].equals(otherSig.arguments[i]))
return false;
return returnType.equals(otherSig.returnType);
}
COM: <s> returns whether the given signature equal to this signature ie represent </s>
|
funcom_train/32080145
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setMaximum (int value) {
checkWidget();
if (value < 0) return;
int minimum = (int) OS.RangeBase_Minimum (handle);
if (value <= minimum) return;
int viewSize = (int) OS.ScrollBar_ViewportSize (handle);
if (value - minimum < viewSize) {
viewSize = value - minimum;
OS.ScrollBar_ViewportSize (handle, viewSize);
}
OS.RangeBase_Maximum (handle, value - viewSize);
}
COM: <s> sets the maximum </s>
|
funcom_train/48911343
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JButton getJbtCerrar() {
if (jbtCerrar == null) {
jbtCerrar = new JButton();
jbtCerrar.setBounds(new Rectangle(615, 400, 100, 30));
jbtCerrar.setText("Cerrar");
jbtCerrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
cerrarVenta();
}
});
}
return jbtCerrar;
}
COM: <s> this method initializes jbt cerrar </s>
|
funcom_train/33895863
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean processUpdate(Object model) throws BusinessException {
UserGroup group = (UserGroup) model;
UserGroup oldGroup = (UserGroup) thinkingService.getObject(UserGroup.class, group.getId());
oldGroup.setName(group.getName());
oldGroup.setDescn(group.getDescn());
oldGroup.setRole(group.getRole());
try {
thinkingService.updateObject(oldGroup);
} catch (Exception e) {
addActionError("Update failure! " + e.getMessage());
return false;
}
return true;
}
COM: <s> process update operation </s>
|
funcom_train/24943452
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public long getValueMask() {
long value = 0L;
int msb = getConstant(size - 1);
for (int i = 0; i < 64; i++) {
if (i < size) {
int constant = getConstant(i);
if (constant == ONE) {
value |= (1L << i);
}
} else {
if (isSigned && msb == ONE) {
value |= (1L << i);
}
}
}
return value;
}
COM: <s> gets the current vector of on off states as a mask </s>
|
funcom_train/46469820
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void onDialogOpen(final ActionEvent actionEvent) {
// start conversation on first wizard step
//if (wizard.getStep().compareTo("tabSelectSong") == 0) {
// conversation.begin();
//}
// start a new conversation on first wizard step
JSWizardDialog.open(DIALOG_WIDGET_VAR);
}
COM: <s> called on wizard dialog opening </s>
|
funcom_train/46840862
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addPlugin(K3Plugin plugin) throws UserWarningException {
if (m_plugins.get(plugin.getName()) != null) {
throw new UserWarningException("Plugin named '" + plugin.getName() + "' required more than once!");
}
m_plugins.put(plugin.getName(), plugin);
}
COM: <s> adds a plugin to the list of available plugins </s>
|
funcom_train/4378882
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void createFolderAndSashControls() {
createQuad1Quad234567QuadControls();
for (RaptorTabFolder folder : folders) {
initFolder(folder);
}
sashes[0] = quad9quad12345678;
sashes[1] = quad1quad2345678;
sashes[2] = quad2quad3quad4quad5Sash;
sashes[3] = quad2345quad678Sash;
sashes[4] = quad67quad8Sash;
sashes[5] = quad6quad7Sash;
for (RaptorWindowSashForm sashe : sashes) {
sashe.loadFromPreferences();
sashe.setVisible(false);
sashe.setMaximizedControl(null);
}
}
COM: <s> creates just the folder sash and quad composite controls </s>
|
funcom_train/19826457
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
StringBuffer sb = new StringBuffer("EqualPolygon: "); //NOI18N
for (int i = 0; i < npoints; i++) {
sb.append(' '); //NOI18N
sb.append(xpoints[i]);
sb.append(','); //NOI18N
sb.append(ypoints[i]);
}
return sb.toString();
}
COM: <s> overridden to produce a meaningful result </s>
|
funcom_train/826060
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean importData(Transferable t, Task targetTask) {
if (!canImport(t.getTransferDataFlavors())) {
return false;
}
if (targetTask == null) {
return false;
}
TimeSlotTransferData transferData = getTransferData(t);
transferData.setTargetTaskId(targetTask.getId());
doActionIfNeed(transferData);
transferData.setWasDnDAction();
return true;
}
COM: <s> do import dn d action within selected transferable and target task </s>
|
funcom_train/32777987
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addItem() {
updateStatistics();
_currentLength++;
if (_currentLength > _maximumLength) { // do we have a new record high?
_maximumLength = _currentLength; // yes, store the record length
_maximumLengthAt = presentTime(); // and write down the time for
// it
}
notifyObservers(this, QueueAction.ITEM_ADDED);
}
COM: <s> updates the statistics when a new element is inserted into the underlying queue </s>
|
funcom_train/26593915
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public _BVEPlan getBveExecutionPlan() throws DException {
int length = _OptRepScomma94843605tablereference0.length;
_BVEPlan bvePlan = _OptRepScomma94843605tablereference0[0].
getBveExecutionPlan();
for (int i = 1; i < length; i++) {
bvePlan = BVEPlanMerger.mergeTablePlansWithAnd(bvePlan,
_OptRepScomma94843605tablereference0[i].getBveExecutionPlan());
}
return bvePlan;
}
COM: <s> br merges bve execution plans of under lying table refernces </s>
|
funcom_train/24478594
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void add(byte newByte) {
if (size == array.length) {
byte[] newArray = new byte[array.length + 1024];
System.arraycopy(array, 0, newArray, 0, array.length);
array = newArray;
}
array[size++] = newByte;
}
COM: <s> description of the method </s>
|
funcom_train/31417995
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int compare(GribPDSLevel level){
if (this.equals(level))
return 0;
// check if level is less than this
if (this.index > level.getIndex()) return -1;
if (this.value1 > level.getValue1()) return -1;
if (this.value2 > level.getValue2()) return -1;
return 1;
}
COM: <s> rdg added this method to be used in a comparator for sorting while </s>
|
funcom_train/25056555
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void retrieveSequenceCounts() {
for (DmaFile dmafile : getDmaFileList()) {
Thread filePreparerThread = new Thread(new SeqCountRetriever(dmafile));
filePreparerThread.start();
}
try {
Thread.sleep(5000);
}
catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
COM: <s> retrieve the sequence counts asynchronously as the computation could take long </s>
|
funcom_train/34563790
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void startTimer(final Proc p) {
final long to = context.prop.num(Prop.TIMEOUT);
if(to == 0) return;
timeout = new Thread() {
@Override
public void run() {
Performance.sleep(to * 1000);
p.stop();
}
};
timeout.start();
}
COM: <s> starts a timeout thread for the specified process </s>
|
funcom_train/11654465
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JPanel createEndTimePanel() {
JPanel panel = new JPanel(new BorderLayout(5, 0));
JLabel label = new JLabel(JMeterUtils.getResString("endtime")); // $NON-NLS-1$
panel.add(label, BorderLayout.WEST);
end = new JDateField();
panel.add(end, BorderLayout.CENTER);
return panel;
}
COM: <s> create a panel containing the end time field and corresponding label </s>
|
funcom_train/18648055
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void propertyChange(PropertyChangeEvent evt) {
super.propertyChange(evt);
int index=ViewSupport.getNearestParticipantIndex(getX(),
getScenarioDiagram());
// Recursively find all message event objects and update
// the values associated with the objects in this column
ScenarioBaseEditPart ep=(ScenarioBaseEditPart)getParent();
Participant participant=(Participant)getModel();
updateParticipant(ep, index, participant);
}
COM: <s> this is the property change notification method </s>
|
funcom_train/5078301
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void reveal(EditPart part) {
if (part == null)
return;
EditPart current = part.getParent();
while (current != null) {
ExposeHelper helper = (ExposeHelper)current.getAdapter(ExposeHelper.class);
if (helper != null)
helper.exposeDescendant(part);
current = current.getParent();
}
AccessibleEditPart acc = (AccessibleEditPart)part.getAdapter(AccessibleEditPart.class);
if (acc != null)
getControl().getAccessible().setFocus(acc.getAccessibleID());
}
COM: <s> reveals the specified editpart by using </s>
|
funcom_train/3284647
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void ignoreUser (String uname) {
if (ignoreList.contains (uname))
return;
/* WE MUST NOT remove the user from the invitedBy-state
This would give the anoying user possibility to reinvite this user
if (invitedBy != null && invitedBy.equals (u)) {
invitedBy = null;
invitedTo = null;
} */
ignoreList.addElement (uname);
}
COM: <s> add the username to the ignorelist of this user </s>
|
funcom_train/29580980
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void save(java.awt.Frame frame, byte [] ac, Map env) throws ACCreationException{
JDialog splash=null;
try{
if (!showDialog(frame, env, SAVE_MODE)) return;
splash=issrg.utils.Util.showSplash(frame, "Please, wait...", "Saving Attribute Certificate...");
save(ac);
}finally{
if (splash!=null){
splash.dispose();
}
}
}
COM: <s> this is the default saving behaviour this method gets the content pane </s>
|
funcom_train/7426738
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void clearListeners(final PNode fromParent) {
if (fromParent != null && isListeningTo(fromParent)) {
fromParent.removePropertyChangeListener(PNode.PROPERTY_PARENT, parentListener);
listeningTo.remove(fromParent);
clearListeners(fromParent.getParent());
}
}
COM: <s> clear out all the listeners registered to make sure there are no </s>
|
funcom_train/36681006
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void fillSideCBO(ServerGameInfo serverGameInfo) {
cboSide.removeChildren();
for (int freeSlotNr : serverGameInfo.getFreeSlots()) {
Widget choice = ThingleUtil.addChoice(page, cboSide, freeSlotNr + "");
if (serverGameInfo.isFreeSlot(freeSlotNr)) {
choice.setBoolean("enabled", true);
} else {
choice.setBoolean("enabled", false);
}
}
}
COM: <s> fill the side combobox with slot numbers </s>
|
funcom_train/44869894
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private WCMDisplayCanvasBean getCanvas3() {
if (canvas3 == null) {
canvas3 = new WCMDisplayCanvasBean();
canvas3.setHandleMouseZooms(true);
canvas3.setBorder(BorderFactory.createLineBorder(Color.gray, 1));
canvas3.add(getAxes3(), null);
canvas3.add(getPanner3(), null);
canvas3.add(getGraph3(), null);
canvas3.add(getPoint3(), null);
canvas3.add(getDs3(), null);
canvas3.add(getS0Tick(), null);
}
return canvas3;
}
COM: <s> this method initializes canvas3 </s>
|
funcom_train/1958671
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void resizeComponent(float factor) {
if (factor!=1.0f) {
int height = (int) (getHeight() * factor);
int width = (int) (getWidth() * factor);
setBounds(getX(),getY(),width,height);
} else {
Logger.getLogger(getClass().getName()).warning("resizeComponent with factor 1");
}
}
COM: <s> resizes the component to the new size </s>
|
funcom_train/37607015
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void colorRArrow() {
if (aprra == null) return;
if (this.isOLGreen()) ((Appearance)aprra).setColoringAttributes(JavaDriver.grn3D);
else if (this.isOLYellow()) ((Appearance)aprra).setColoringAttributes(JavaDriver.yel3D);
else ((Appearance)aprra).setColoringAttributes(JavaDriver.red3D);
} // end colorRArrow()
COM: <s> changes the 3 d right arrow color </s>
|
funcom_train/23267791
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetMontoOriginal() {
System.out.println("getMontoOriginal");
Prestamos instance = new Prestamos();
double expResult = 0.0;
double result = instance.getMontoOriginal();
assertEquals(expResult, result, 0);
// 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 monto original method of class capa negocios </s>
|
funcom_train/33798232
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
if (pageIndex > 0) {
return(NO_SUCH_PAGE);
} else {
int x = (int)pageFormat.getImageableX() + 1;
int y = (int)pageFormat.getImageableY() + 1;
g.translate(x,y);
RepaintManager currentManager = RepaintManager.currentManager(compToPrint);
currentManager.setDoubleBufferingEnabled(false);
compToPrint.paint(g);
currentManager.setDoubleBufferingEnabled(true);
return(PAGE_EXISTS);
}
}
COM: <s> prints a specific graphic </s>
|
funcom_train/15490949
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double getAngle(int x1, int y1, int x2, int y2) {
double dx = x2-x1;
double dy = y1-y2;
if (imp!=null) {
Calibration cal = imp.getCalibration();
dx *= cal.pixelWidth;
dy *= cal.pixelHeight;
}
return (180.0/Math.PI)*Math.atan2(dy, dx);
}
COM: <s> returns the angle in degrees between the specified line and a horizontal line </s>
|
funcom_train/42567179
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void disableComponents() {
// Disable all the menu items that were disabled.
fileSaveDatabase.setEnabled(false);
fileSaveAsDatabase.setEnabled(false);
editAddCourse.setEnabled(false);
editEditCourse.setEnabled(false);
editDeleteCourse.setEnabled(false);
tbSaveDatabase.setEnabled(false);
tbSaveAsDatabase.setEnabled(false);
tbAddCourse.setEnabled(false);
tbEditCourse.setEnabled(false);
tbDeleteCourse.setEnabled(false);
// Flip to the initial, unloaded, panel
cardLayout.show(cardPanel, "initial");
}
COM: <s> disable all the enabled buttons </s>
|
funcom_train/7840749
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean changePassword(String name, String password) {
boolean result = false;
HibernateUser user = getUserDAO().findUserByUsername(name);
if (user != null) {
user.setPassword(password.trim());
result = getUserDAO().updateUser(user);
} else {
result = false;
}
return result;
}
COM: <s> change password of user </s>
|
funcom_train/3923441
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getPath() {
Iterator it = classPath.iterator();
StringBuffer scp = new StringBuffer();
while ( it.hasNext() ) {
URL url = (URL) it.next();
scp.append( url.getFile() );
scp.append( File.pathSeparator );
}
return scp.toString();
}
COM: <s> this returns full class search path in a string delimited by file </s>
|
funcom_train/34271662
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean checkTargetReconnection() {
// connection endpoints must be different Shapes
if (newTarget.equals(oldSource))
return false;
// return false, if the connection exists already
for (Object element : newTarget.getTargetConnections()) {
Route conn = (Route) element;
// return false if a oldSource -> newTarget connection exists already
// and it is a differenct instance that the connection-field
if (conn.getSource().equals(oldSource) && !conn.equals(connection))
return false;
}
return true;
}
COM: <s> return true if reconnecting the connection instance to new target is allowed </s>
|
funcom_train/35541834
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void toStringRenames(final StringBuilder sb) {
if (getRenamesSubject() != null) {
sb.append(',');
sb.append("renamesSubject:" + getRenamesSubject());
}
if (getRenamesSubjectRange() != null) {
sb.append(',');
sb.append("renamesSubjectRange:" + getRenamesSubjectRange());
}
}
COM: <s> pretty printing for a renames entry </s>
|
funcom_train/21125551
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int compareTo(Object o) {
if (!(o instanceof Event)) throw new ClassCastException();
Event e = (Event) o;
int res = this.timestamp.compareTo(e.getTimestamp());
if (res == 0) {
return (int) (this.getSequenceNumber() - e.getSequenceNumber());
} else return res;
}
COM: <s> compares two events </s>
|
funcom_train/39854322
|
/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 {
log.info("init() started");
// Do pathSpec and pathList init work.
pathSpec = FilterHelpers.initPathSpec(getClass().getName(), filterConfig);
pathList = FilterHelpers.initPathList(getClass().getName(), filterConfig);
log.info("init() completed");
} // End init().
COM: <s> initialize this filter </s>
|
funcom_train/16839516
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public char peekChar() {
// The next available character if any (which may be an end-of-line). The
// character is not consumed. If buffer is empty return null character.
if (buffer == null || p>buffer.length()) return('\000');
else if (p == buffer.length()) return('\n');
else return buffer.charAt(p);
}
COM: <s> allows you to see what the next character is </s>
|
funcom_train/18845021
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public XORJoin createGatewayJoinXOR(String nodeID, String nodeLabel, int xPosition, int yPosition, PrivateProcessPoolLane lane) {
XORJoin cn = new XORJoin();
cn.setNodeID(nodeID);
cn.setNodeLabel(nodeLabel);
cn.setXPosition(xPosition);
cn.setYPosition(yPosition);
cn.setProcessPoolLane(lane);
return cn;
}
COM: <s> create gateway join merge </s>
|
funcom_train/21105314
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private MJButton getBAdd() {
if (bAdd == null) {
bAdd = new MJButton();
bAdd.setPreferredSize(new java.awt.Dimension(85, 26));
bAdd.setMnemonic(KeyEvent.VK_F2);
bAdd.setText("aF2 Add");
bAdd.addActionListener(new bAddClick());
}
return bAdd;
}
COM: <s> this method initializes b add </s>
|
funcom_train/19696137
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getUrl(String urlStr) throws Exception {
String response = urlStr;
URL url = new URL(urlStr);
ThreadExecutor.enterIO(url);
try {
URLConnection cnx = openProxiedConnection(url);
sendHeader(cnx);
readHeader(cnx);
response = cnx.getURL().toString();
} finally {
ThreadExecutor.leaveIO();
}
return response;
}
COM: <s> get url allow to know if there is some redirect </s>
|
funcom_train/3915223
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetCollection() throws Exception {
registerDefaultDatabase();
Collection collection = xindiceEmbeddedDatabaseManager.getCollection(COLLECTION_NAME);
assertNotNull("Collection was null", collection);
assertEquals("Collection name wrong", COLLECTION_NAME, collection.getName());
collection.close();
}
COM: <s> ensure we can re open the collection </s>
|
funcom_train/3024753
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void transform() {
Enumeration enumx = summaryList.elements();
while (enumx.hasMoreElements()) {
TypeSummary typeSummary = (TypeSummary) enumx.nextElement();
transformOriginal(typeSummary);
}
createClass((TypeSummary) summaryList.elementAt(0), className);
EliminatePackageImportVisitor epiv = new EliminatePackageImportVisitor(getComplexTransform());
epiv.setPackageSummary(getPackageSummary((Summary) summaryList.elementAt(0)));
epiv.visit(null);
}
COM: <s> performs the transform on the rest of the classes </s>
|
funcom_train/44850602
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Locale getLocale() {
//pre: Context not null
if (context == null) {
return new Locale(VSys.dftLanguage, VSys.dftCountry);
}
String lCountry = "";
try {
lCountry = VSys.getVSysProperties().getProperty(VSysConstants.KEY_DFT_COUNTRY);
}
catch (IOException exc) {
lCountry = VSys.dftCountry;
}
return new Locale(getLanguage(), lCountry);
}
COM: <s> returns the locale </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.