__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/41772764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dischargeNeed(int quantity) throws SQLException{
int resCount=0;
String contractID;
D1.retReadyDisch(owner);
D1.retTotalRes(owner);
Iterator<String> i = D1.toDisch.listIterator();
while (i.hasNext() && resCount<=quantity) {
contractID=i.next();
OR.addRes(owner, D1.retRes(contractID));
D1.setDelivered(contractID);
resCount = resCount+D1.retRes(contractID);
System.out.println("Contract discharged from supply.");
}
}
COM: <s> discharge contracts as needed to make up for deficit </s>
|
funcom_train/22027039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel createTempPanel() {
JPanel temp = new JPanel();
JButton cancelButton = new JButton("Cancel");
temp.setLayout(new BoxLayout(temp, BoxLayout.Y_AXIS));
temp.setBorder(BorderFactory.createEmptyBorder(10,20,10,10));
temp.add(Box.createVerticalGlue());
JLabel text = new JLabel("Searching, please wait...");
text.setAlignmentX(Component.CENTER_ALIGNMENT);
temp.add(text);
cancelButton.addActionListener(this);
cancelButton.setActionCommand("cancel");
cancelButton.setAlignmentX(Component.CENTER_ALIGNMENT);
temp.add(cancelButton);
temp.add(Box.createVerticalGlue());
return temp;
}
COM: <s> create a temporary panel that can be used to cancel the search </s>
|
funcom_train/28170845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClone() {
System.out.println("clone");
BezierPath.Node instance = new BezierPath.Node();
Object expResult = null;
Object result = instance.clone();
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 clone method of class org </s>
|
funcom_train/10596041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
if (this.hashCode == 0) {
final int len = this.keys.size();
for(int i=0; i < len; i++) {
this.hashCode += this.keys.get(i).hashCode();
}
if (len % 2 == 0) this.hashCode++;
}
return this.hashCode;
}
COM: <s> generate a hash code </s>
|
funcom_train/48131833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configure() {
LogManager manager = LogManager.getLogManager();
String className = getClass().getName();
String level = manager.getProperty(className + ".level");
setLevel((level == null) ? Level.INFO : Level.parse(level));
// String filter = manager.getProperty(className + ".filter");
// String formatter =
// manager.getProperty(className + ".formatter");
}
COM: <s> sets some basic configurations related with logging </s>
|
funcom_train/2878891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
// the body of the thread
try {
for (Enumeration en = messages.elements();
en.hasMoreElements() && !terminated; ) {
printer.printIt(en.nextElement().toString());
if (frequency > 0) Thread.sleep (frequency);
}
} catch (Exception e) {
} finally {
sfTerminate(TerminationRecord.normal(null));
}
}
COM: <s> main processing method for the generator object implements runnable </s>
|
funcom_train/47509491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Sigilo entity) {
EntityManagerHelper.log("saving Sigilo instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved sigilo entity </s>
|
funcom_train/25436714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAdd() {
AuditLog auditLog = new AuditLog();
auditLog.setLogTime(new Date());
auditLog.setLogType("TEST");
auditLog.setMessage("test log added");
auditLog.setUser(this.userDAO.getUser(1L));
auditLog.setStatus("SUCCESS");
this.auditLogDAO.add(auditLog);
super.assertNotNull("id is null", auditLog.getId());
System.out.println("audit log id:"+auditLog.getId());
}
COM: <s> test case for add </s>
|
funcom_train/7980028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long getEarliestWakeUpTimeSlot(){
long earliest = Long.MAX_VALUE;
for(int i=0 ; i < valence ; i++){
if(wakeUpTime[i]>-1 && wakeUpTime[i]<earliest){
earliest = wakeUpTime[i];
}
}
return earliest;
}
COM: <s> returns the earliest time when a wake up slot will become available </s>
|
funcom_train/2387466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset () {
connected = false;
if (reader != null) {
try { reader.close (); }
catch (Throwable e) { }
reader = null;
}
if (is != null) {
try { is.close (); }
catch (Throwable e) { }
is = null;
}
if (connection != null) {
try { connection.close (); }
catch (Throwable e) { }
connection = null;
}
}
COM: <s> closes the connection and associated streams </s>
|
funcom_train/20644284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
// if mapping is not valid return false
if (! isMappingCorrect(getMyMapping(), null)) return false;
// look if all my workplace are valid
if (getWorkSheet() == null) return false;
if (! getWorkSheet().isValidAndChildrensToo()) return false;
return true;
}
COM: <s> return true if this tarif is valid </s>
|
funcom_train/32979918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookupFieldIdx(String fieldName)
{ /* lookupFieldIdx */
int
idx= -1; /* failure default */
for(int i=0; i<tCols; i++)
if(fieldName.equalsIgnoreCase(tFields[i]))
{
idx= i;
break;
}
return(idx);
} /* lookupFieldIdx */
COM: <s> lookup field idx lookup column index of field if exists </s>
|
funcom_train/20356768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String processTemplateInclusion(ParserInput parserInput, ParserOutput parserOutput, Topic templateTopic, String raw, String name) throws Exception {
if (templateTopic == null) {
return "[[" + name + "]]";
}
// FIXME - disable section editing
parserInput.getTempParams().put(TEMPLATE_INCLUSION, "true");
return templateTopic.getTopicContent();
}
COM: <s> given a template call of the form name parse the template </s>
|
funcom_train/2586830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLogContext() {
final LogContext ctx = Log.createContext((String) null);
assertEquals("Context = null", ctx, Log.createContext((String) null));
final LogContext ctx2 = Log.createContext("Test");
assertEquals("Context Test", ctx2, Log.createContext("Test"));
}
COM: <s> tests the log context </s>
|
funcom_train/7275319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRangeSatisfiable(long low, long high) {
// This must be synchronized so that downloaders writing
// to the verifying file do not cause concurrent mod
// exceptions.
synchronized(_verifyingFile) {
for(Range interval : _verifyingFile.getVerifiedBlocks()) {
if (low >= interval.getLow() && high <= interval.getHigh())
return true;
}
}
return false;
}
COM: <s> determines whether or not the given range is satisfied by this </s>
|
funcom_train/41165953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoWordsCompleteE1 entity) {
EntityManagerHelper.log("saving CoWordsCompleteE1 instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co words complete e1 entity </s>
|
funcom_train/37083560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enableTabbedPanes(boolean justFirstSpecies) {
boolean enable = !justFirstSpecies;
for (int i = 1; i < getTabbedPane().getTabCount(); i++)
getTabbedPane().setEnabledAt(i,enable);
getTabbedPane().setSelectedIndex(0);
}
COM: <s> disable beyond first tab if just first species true </s>
|
funcom_train/22023602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void step() {
if(notstarted) {
notstarted = false;
startTime = System.nanoTime();
oldTime = startTime;
}
else {
frameTime = System.nanoTime()-oldTime;
oldTime = System.nanoTime();
fps = 1000000000f/(frameTime);
if(stats && !stop) {
frames++;
mean+=fps;
if((frames & (1<<div+LOGSIZE)) != 0) {
logoffset++;
div++;
}
if((frames&((1<<div)-1)) == 0) {
log((int) (frames>>div));
}
}
}
}
COM: <s> updates the fps </s>
|
funcom_train/5078386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Dimension getChildSize(IFigure child, int wHint, int hHint) {
if (child instanceof PinnablePaletteStackFigure) {
return ((PinnablePaletteStackFigure) child).getHeaderPreferredSize(
wHint, hHint);
} else {
return child.getPreferredSize(wHint, hHint);
}
}
COM: <s> overridden to handle code pinnable palette stack figure code </s>
|
funcom_train/44946229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object r1, Object r2) {
Collator collator = Collator.getInstance(Locale.getDefault());
InstanceStoreRole role1 = (InstanceStoreRole)r1;
InstanceStoreRole role2 = (InstanceStoreRole)r2;
return collator.compare(
role1.toStringRepresentation(),
role2.toStringRepresentation());
}
COM: <s> compares its two arguments for lexicographic order </s>
|
funcom_train/39800950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected StringValue createWeekOfYearStringValue(Locale locale) {
StringValue wsv = new StringValue() {
public String getString(Object value) {
if (value instanceof Calendar) {
value = ((Calendar) value).get(Calendar.WEEK_OF_YEAR);
}
return StringValues.TO_STRING.getString(value);
}
};
return wsv;
}
COM: <s> creates and returns a string value used for rendering the week of year </s>
|
funcom_train/7542304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTabEquivalent() {
String tab;
if (" "
.equals(getCoreFormatterOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR))) {
int size = getTabSize();
StringBuffer buf = new StringBuffer();
for (int i = 0; i < size; i++)
buf.append(' ');
tab = buf.toString();
} else
tab = "\t"; //$NON-NLS-1$
return tab;
}
COM: <s> returns a tab equivalent either as a tab character or as spaces </s>
|
funcom_train/20338290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
_currentIndex = 0;
m = 0;
w = 0;
pm = 0;
dm = 0;
zpm = 0;
for (int i = 1; i <= _length; i++) {
_pP[i] = i;
_pZ[i] = i;
_pD[i] = -1;
}
_pD[1] = 0;
_pZ[_length + 1] = m = _length + 1;
_pZ[0] = _pZ[_length + 1];
}
COM: <s> initialize the iteration process </s>
|
funcom_train/4014974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DesignWidgetWrapper addNewDropdownList(boolean select){
ListBox lb = new ListBox(false);
DOM.setStyleAttribute(lb.getElement(), "height","25"+PurcConstants.UNITS);
DOM.setStyleAttribute(lb.getElement(), "width","200"+PurcConstants.UNITS);
DesignWidgetWrapper wrapper = addNewWidget(lb,select);
return wrapper;
}
COM: <s> adds a new drop downlist box to the selected page </s>
|
funcom_train/26462009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run( TestResult result ) {
String cls = getClass().getName().substring( getClass().getPackage().getName().length() + 1 );
print( "\nRunning " + cls + "." + getName() + "() on " + server.getName() + " version " + server.getVersion() );
super.run( result );
}
COM: <s> override default run method in test case and print extra information </s>
|
funcom_train/33683409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBox1() {
if (jCheckBox1 == null) {
jCheckBox1 = new JCheckBox();
jCheckBox1.setToolTipText("This brief description will be added to the biclustering results file");
jCheckBox1.setBounds(24, 226, 194, 24);
jCheckBox1.setText("Add description line");
jCheckBox1.setEnabled(false);
}
return jCheckBox1;
}
COM: <s> this method initializes j check box1 </s>
|
funcom_train/23184499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDependencyViewerLabel( Composite parent ) {
GridData gridData = new GridData( SWT.FILL, SWT.FILL, true, false, 2, 1 );
dependencyViewerLabel = new Label( parent, SWT.NONE );
dependencyViewerLabel.setText( Messages.getString( "wizard.project.page.dependencies.dependencies" ) );
dependencyViewerLabel.setLayoutData( gridData );
}
COM: <s> creates the label describing the content nature of the dependency viewer </s>
|
funcom_train/40730588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExcludedCategories(final String categories) {
propertyValidators.add(new PropertyValidator() {
void validate() {
excludedCategoryIds = parseCategories(categories, "none");
if (LOGGER.isLoggable(Level.CONFIG))
LOGGER.config("EXCLUDED CATEGORIES: " + excludedCategoryIds);
}
});
}
COM: <s> sets the categories to exclude </s>
|
funcom_train/4404044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performInitialisation() {
// try {
((InitialisationOperator_Population) (this.getTemplate().getObjectProperty("PopulationInitialisationOperator"))).initialise(this);
// }
// catch ( NullPointerException e )
// {
// Display.error("[\""+this.getName()+"\"]
// "+this.getClass().getName()+"::performInitialisation(.) - no operator
// available");
// }
}
COM: <s> initialise the population </s>
|
funcom_train/26338598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int utilizeImprovementForProject(Improvement improvement) {
ByteBuffer intBuf = ByteBuffer.allocateDirect(Protocol.intSize);
intBuf.order(ByteOrder.nativeOrder());
intBuf.putInt(0, improvement.getId());
return (JavaBridge.serverCall(Protocol.sBuyCityProject, getPlayer().getIndex(), getIndex(), intBuf));
}
COM: <s> utilizes an improvement for the improvement currently under </s>
|
funcom_train/33686444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isMoveValid(IBoardState boardState, INextMove nextMove, Player currentPlayer) {
List<IBoardSpace> boardSpaces = boardState.getAllEmptySpaces();
for (IBoardSpace space : boardSpaces) {
if (space.getXCoordinate() == nextMove.getXCoordinate() &&
space.getYCoordinate() == nextMove.getYCoordinate()) {
return true;
}
}
// If no match, we return false
return false;
}
COM: <s> checks if the requested move is a valid move </s>
|
funcom_train/36171406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseXml(String rFileName) {
filesParsed.clear();
classList.clear();
if (!rFileName.substring(rFileName.length()-4, rFileName.length()).equals(".xml"))
rFileName += ".xml";
try {
Scanner fin = new Scanner(new File(rFileName));
fin.useDelimiter("\n");
while (fin.hasNext("<class>")) {
classList.add(parseClass(fin));
}
fin.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
COM: <s> builds classes based on stored info </s>
|
funcom_train/29312594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode addNumberCategory(Object category) {
DefaultMutableTreeNode categoryNode = new DefaultMutableTreeNode(category);
categoryNode.setAllowsChildren(true);
treeModel.insertNodeInto(categoryNode, rootNode, rootNode.getChildCount());
treeModel.reload();
// Make sure the user can see the lovely new node.
tree.scrollPathToVisible(new TreePath(categoryNode.getPath()));
return categoryNode;
}
COM: <s> add number category </s>
|
funcom_train/31104029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endDocument() throws XNIException {
int count = fValueStores.size();
for (int i = 0; i < count; i++) {
ValueStoreBase valueStore = (ValueStoreBase)fValueStores.elementAt(i);
valueStore.endDocument();
}
} // endDocument()
COM: <s> check identity constraints </s>
|
funcom_train/18902972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node getObjectNode(Node subject, Node predicate) {
ClosableIterator it = reificationGraph.find(subject, predicate, null);
try {
if (it.hasNext()) {
return ((Triple) it.next()).getObject();
}
}
finally {
it.close();
}
return null;
}
COM: <s> returns the object value of a given triple or null if not found </s>
|
funcom_train/986537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem() {
if (stringItem == null) {//GEN-END:|52-getter|0|52-preInit
// write pre-init user code here
stringItem = new StringItem("", "Su saldo es 250000");//GEN-LINE:|52-getter|1|52-postInit
// write post-init user code here
}//GEN-BEGIN:|52-getter|2|
return stringItem;
}
COM: <s> returns an initiliazed instance of string item component </s>
|
funcom_train/3740158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEmail(AllUser user) throws UserManagerException {
String ret=null;
try {
Session sess= HibernateUtil.currentSession();
if (user.getUser()==null) {
ret = user.getDeletedUser().getEmail();
} else {
ret = user.getUser().getEmail(); }
} catch (HibernateException e) {
throw new UserManagerException();
}
return ret;
}
COM: <s> return email field of the given user </s>
|
funcom_train/18112260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getToolAddSiblingButton() {
if (toolAddSiblingButton == null) {
toolAddSiblingButton = new JButton();
toolAddSiblingButton.setIcon(new ImageIcon(getClass().getResource("/icons/add_sibling.gif")));
toolAddSiblingButton.setPreferredSize(new java.awt.Dimension(20,20));
toolAddSiblingButton.setToolTipText("Add sibling node");
toolAddSiblingButton.addActionListener(this);
}
return toolAddSiblingButton;
}
COM: <s> this method initializes tool add sibling button </s>
|
funcom_train/17567857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVerifyThreshold() {
try {
//Try to get the parameters from Fingerprint SDK.
return fingerprintSDK.getVerificationThreshold();
} catch (GrFingerJavaException e) {
//If fails to load the parameters, writes error to log and returns 0
ui.writeLog(e.getMessage());
return 0;
}
}
COM: <s> returns the current verification threshold </s>
|
funcom_train/41021297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void publishMessageForUser(MWMessage.MessageID msgID, int userId, CardBeanList choice) {
MWMessage msg = new MWMessage(msgID);
msg.setReceiverID(userId);
SpellBean spell = new SpellBean();
spell.setChoiceBeans(choice);
msg.setSpell(spell);
for (Integer id : listeners.keySet()) {
listeners.get(id).sendMessage(msg);
}
}
COM: <s> send message to a specific user with object array </s>
|
funcom_train/13580565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MathTransform getMathTransform() {
MathTransform mt = null;
CoordinateReferenceSystem sourceCRS;
try {
sourceCRS = CRS.parseWKT(fromCoordinateSystem);
final CoordinateReferenceSystem targetCRS = CRS.parseWKT(toCoordinateSystem);
mt = CRS.findMathTransform(sourceCRS, targetCRS, true);
} catch (FactoryException e) {
e.printStackTrace();
}
return mt;
}
COM: <s> gets the mathematical transformation to convert a value say a coordinate from </s>
|
funcom_train/12316651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List analyzeText(Analyzer analyzer, String fieldName, String text) {
List words = new ArrayList(1);
Reader reader = new StringReader(text);
TokenStream tStream = analyzer.tokenStream(fieldName, reader);
Token tok;
try {
while (null != (tok = tStream.next())) {
words.add(tok.termText());
}
reader.close();
} catch (IOException ioe) {
}
return words;
}
COM: <s> get a list of tokens corresponding to a search word or phrase </s>
|
funcom_train/4527894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canStartNameNode(Configuration conf) throws IOException {
NameNode nn2 = null;
try {
nn2 = NameNode.createNameNode(new String[]{}, conf);
} catch(IOException e) {
if (e instanceof java.net.BindException)
return false;
throw e;
}
stopNameNode(nn2);
return true;
}
COM: <s> check whether the name node can be started </s>
|
funcom_train/3561714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(Object sender) {
checkModel();
compares = 0;
// n2sort();
// qsort(0, indexes.length-1);
shuttlesort((int[])indexes.clone(), indexes, 0, indexes.length);
//System.out.println("Compares: "+compares);
}
COM: <s> sorts the table </s>
|
funcom_train/30009156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateStatus() {
StringBuffer buf = new StringBuffer();
buf.append("Query Time: ");
buf.append((double) query_time / 1000.0);
buf.append(" seconds. Row Count: ");
buf.append(total_row_count);
status_text.setText(new String(buf));
}
COM: <s> updates the status bar </s>
|
funcom_train/18136839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void focusLost(FocusEvent e) {
UndoableAction action = null;
if (e.getSource() == nameField) {
action = new ChangeSpecificationElementName(dependency, nameField
.getText());
} else if (e.getSource() == descriptionField) {
action = new ChangeSpecificationElementDescription(dependency,
descriptionField.getText());
}
if (action != null) {
try {
editor.executeAction(action);
} catch (ActionExecutionException e1) {
EBioFlowLogger.error("Cannot execute action", e1);
}
}
}
COM: <s> method for when focus in text field is lost </s>
|
funcom_train/41424037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean elementSelectorHasUnbindedPrefixes() {
String[] elementSelectorParts = elementSelector.split("/");
for (int i = 0; i < elementSelectorParts.length; i++) {
// get index of :
int index = elementSelectorParts[i].indexOf(':');
if (index >= 0) {
String prefix = elementSelectorParts[i].substring(0, index);
if (namespaceContext == null || !namespaceContext.getNamespaces().containsKey(prefix)) {
return true;
}
}
}
return false;
}
COM: <s> checks if the element selector has steps with unbinded namespaces </s>
|
funcom_train/39102819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataModel fireGrabFocusEvent() {
if (!fireGrabFocusEvents) {
return null;
}
TreePath path = getSelectedPath();
if (path != null) {
DataModel m = ((TreeHook) path.getLastPathComponent()).getDataModel();
if (m != null) {
m.grabFocus();
return m;
}
}
return null;
}
COM: <s> fire grab focus event on selected model </s>
|
funcom_train/48093421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createTransmitter() {
try {
if(rtpMgr==null)
return "RTP manager is still null!!";
SendStream sendStream = rtpMgr.createSendStream(dataOutput, 0);
sendStream.start();
} catch (Exception e) {
return e.getMessage();
}
return null;
}
COM: <s> use the rtpmanager api to create sessions for each media </s>
|
funcom_train/7534141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(String fileString) throws Exception {
// [email protected]
fa.createParentDirs(fileString);
OutputStream fos = fa.openOutputStreamElement(fileString);
JavaSystem.saveProperties(
stringProps,
HsqlDatabaseProperties.PRODUCT_NAME + " "
+ HsqlDatabaseProperties.THIS_FULL_VERSION, fos);
fos.close();
return;
}
COM: <s> saves the properties using jdk2 method if present otherwise jdk1 </s>
|
funcom_train/2883595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCaseCTN5() throws Throwable {
if (failedSolver()) return;
Context cxt = parseToContext("ctn5.sf");
Context foo1c = resolveCD(cxt, "foo1");
Context fooc = resolveCD(foo1c, "foo");
assertContextResolves(fooc,"bar4","73");
}
COM: <s> test case ctn5 </s>
|
funcom_train/4820051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCoverageOfTags(String t) {
String queryString = "select count(distinct item) from Result result join result.tags tages join result.item item where "
+ "tages.tags like :tags";
Session session = HibernateSessionFactory.getSession();
Query queryObject = session.createQuery(queryString);
queryObject.setParameter("tags", "%" + t + "%");
session.flush();
session.clear();
return (Integer) queryObject.uniqueResult();
}
COM: <s> the coverage of tag t defined as the number of different objects tagged </s>
|
funcom_train/4515272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawNumber(Graphics g, String number, Font font) {
BasicColor c = (BasicColor) colors;
AttributedString num = new AttributedString(number);
if (font != null) {
num.addAttribute(TextAttribute.FONT, font);
}
drawNumber(g, num, x, y - radius, c.numbers);
}
COM: <s> draws a number at 12 oclock </s>
|
funcom_train/50812938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspException {
// Prepare the textual content and ending element of this hyperlink
StringBuffer results = new StringBuffer();
if (text != null)
results.append(text);
results.append("</a>");
// Render the remainder to the output stream
TagUtils.getInstance().write(pageContext, results.toString());
// Evaluate the remainder of this page
return(EVAL_PAGE);
}
COM: <s> render the end of the hyperlink </s>
|
funcom_train/50863611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performDisembarkToSettlementPhase(Person person, Settlement disembarkSettlement) {
// Put towed vehicle and crew in settlement if necessary.
if (hasVehicle()) disembarkTowedVehicles(person, getRover(), disembarkSettlement);
super.performDisembarkToSettlementPhase(person, disembarkSettlement);
}
COM: <s> performs the disembark to settlement phase of the mission </s>
|
funcom_train/9298169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WebModule getWebModule(IModule module) {
if (module == null)
return null;
String memento = module.getId();
List<WebModule> modules = getWebModules();
int size = modules.size();
for (int i = 0; i < size; i++) {
WebModule webModule = modules.get(i);
if (memento.equals(webModule.getMemento())) {
return webModule;
}
}
return null;
}
COM: <s> returns the given module from the config </s>
|
funcom_train/15405274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClassAdapterDetectEnhancement detect(ClassLoader classLoader, byte[] classfileBuffer) {
ClassAdapterDetectEnhancement detect = new ClassAdapterDetectEnhancement(classLoader, enhanceContext);
// skip what we can...
ClassReader cr = new ClassReader(classfileBuffer);
cr.accept(detect, ClassReader.SKIP_CODE + ClassReader.SKIP_DEBUG + ClassReader.SKIP_FRAMES);
return detect;
}
COM: <s> read the bytes quickly trying to detect if it needs entity or </s>
|
funcom_train/43988784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAccessToBeanAdapterModels() {
BeanAdapter<TestBean> adapter = new BeanAdapter<TestBean>(new TestBean());
ValueModel valueModel = adapter.getValueModel("readWriteObjectProperty");
checkAccess(valueModel, null, "BeanAdapter's ValueModel");
}
COM: <s> checks reflection access to value models returned by the bean adapter </s>
|
funcom_train/29690197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XYSeries extractTimeSerie(String quantityName) {
XYSeries xySeries = new XYSeries(quantityName);
TYValuePairIterator iter = sample.getTYValuePairIterator(quantityName);
while (iter.hasNext()) {
TYValuePair tyvp = iter.next();
xySeries.add(new XYDataItem(tyvp.tValue, tyvp.yValue));
}
return xySeries;
}
COM: <s> extracts a time serie from the sample of data points acquired during the </s>
|
funcom_train/8214610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertDocument(String filename) {
BufferedReader br;
try {
br = new BufferedReader(new FileReader(filename));
Document doc = new Document(br, this);
documents.put(filename.substring(filename.lastIndexOf('/') + 1), doc);
if (corpusUpdated == false) updateCorpus();
//System.out.println(doc.sumof_n_kj);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> inserts new documents into corpus </s>
|
funcom_train/35341068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initSign(Key signingKey) throws XMLSignatureException {
initializeAlgorithm(true);
Map map=(Map)keysSigning.get();
if (map.get(this.algorithmURI)==signingKey) {
return;
}
map.put(this.algorithmURI,signingKey);
this._signatureAlgorithm.engineInitSign(signingKey);
}
COM: <s> proxy method for </s>
|
funcom_train/8407122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(int index, Collection coll) {
int size = getList().size();
boolean result = false;
if (index > size) {
getList().addAll(Collections.nCopies(index - size, null));
result = true;
}
return (getList().addAll(index, coll) | result);
}
COM: <s> decorate the add all method to perform the growth behaviour </s>
|
funcom_train/34670911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteTriples() throws Exception {
List<Triple> testTriples = getTriples(2, 2, 2);
_writer.add(testTriples, true);
_writer.delete(testTriples, true);
assertEquals("Wrong number of triples",
0,
_reader.countTriples(null, null, null, -1));
}
COM: <s> test deleting some triples </s>
|
funcom_train/27842895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProperty(String inKey, Object inObject) {
if (LOG.isDebugEnabled()) {
LOG.debug("addProperty: " + inKey + ", " + inObject);
}
if (inKey == null) {
throw new IllegalArgumentException("Can't use a null key.");
}
properties.put(inKey, inObject);
}
COM: <s> store an arbitrary object under a known key </s>
|
funcom_train/44452240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRule(ActionEvent event) {
RuleBean rule = new RuleBean(getUniqueRuleName());
addRule(rule);
currRule = rule.getName();
changeLogger.logChange(new Change(Change.ChangeType.RULE_ADD, null, (RuleBean) rule));
}
COM: <s> action listener method for adding new rules </s>
|
funcom_train/35848524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testErrorThrownInIsAsynchronous() {
try {
Model.getFacade().isAsynchronous(new Object());
assertTrue("Error was not thrown", false);
} catch (Throwable e) {
if (e instanceof IllegalArgumentException
|| e instanceof ClassCastException) {
// one of the expected errors, just ignore
} else {
throw new RuntimeException(e);
}
}
}
COM: <s> test that the correct error is thrown for is asynchronous </s>
|
funcom_train/2939621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatRecursiveTreeItem(TreeItem item, boolean status) {
TreeItem parentItem = item.getParentItem();
if (parentItem != null) {
Object parentObject = parentItem.getData();
if (parentObject != null) {
status = checkChildItemsStatus(parentItem, parentObject, status);
formatTreeItems(parentItem, parentObject, status);
}
}
}
COM: <s> calls resursive up to the root tree item the method format tree items </s>
|
funcom_train/11324426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDeployableSourceListingAsHtml() {
String listingAsString = deployableSourceListing.toString();
if (listingAsString.length() == 0) {
listingAsString = "<li><span style=\"color:blue\">No jars or folders were found with deployable resources.</span></li>";
}
return listingAsString;
}
COM: <s> return the html representation of the list of deployable sources </s>
|
funcom_train/34068181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File showFileDialog(boolean save) {
ComboFileDialog dialog = new ComboFileDialog();
dialog.setTitle(save ? settings.getText("editor.savemodel") : settings.getText("editor.openmodel"));
dialog.addFilter(settings.getText("editor.filedescription"), "xml");
if (save) {
return dialog.showSaveDialog(frame, "xml");
} else {
return dialog.showOpenDialog(frame);
}
}
COM: <s> shows a file dialog for opening or saving ferrari3 d model files xml </s>
|
funcom_train/2483467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStatusString() {
String ret = "";
switch (status) {
case EIBNETIP_Constants.E_NO_ERROR:
ret = "Disconnect successful";
break;
case EIBNETIP_Constants.E_CONNECTION_ID:
ret = "Wrong connection id";
break;
default:
ret = "Disconnect error";
break;
}
return ret;
}
COM: <s> this method returns a human readable status message </s>
|
funcom_train/15931519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
int count = 0;
QNode h = traversalHead();
for (QNode p = h.next; p != null && p.isData; p = p.next) {
Object x = p.get();
if (x != null && x != p) {
if (++count == Integer.MAX_VALUE) // saturated
break;
}
}
return count;
}
COM: <s> returns the number of elements in this queue </s>
|
funcom_train/8436111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forEachPair(EachTermPairAction etpa) {
Iterator<String> i = termPairs.iterator();
while(i.hasNext()) {
String s = i.next();
String []ss = s.split(glue);
etpa.doAction(ss[0],ss[1]);
}
}
COM: <s> apply an action to each term pair occuring in this set </s>
|
funcom_train/50479401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isApplicable(IResource r) {
String relativeName = r.getFullPath().toString();
for (Iterator it = getFileFilters().iterator(); it.hasNext();) {
String regExp = (String) it.next();
if (relativeName.matches(regExp)) {
return false;
}
}
return true;
}
COM: <s> called by a builder before the file is processed </s>
|
funcom_train/32366798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Clob buildClob(File f) throws IOException {
StringBuffer nexusString = new StringBuffer();
char[] buf = new char[8192];
InputStreamReader in = new InputStreamReader(new FileInputStream(f.getAbsolutePath()), "UTF8");
int nr;
while ((nr = in.read(buf)) > 0) {
nexusString.append(new String(buf, 0, nr));
}
Clob nexusContent = Hibernate.createClob(nexusString.toString());
return nexusContent;
}
COM: <s> given a nexus file read its contents into a </s>
|
funcom_train/25073931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performDefaultGlobalParameterChanges() {
Config.setDefaultEpisodesCount(sliderEpisodes.getValue());
Config.setDefaultMaxTickNumber(sliderMaxTicks.getValue());
Config.setDefaultWorldSizeX(sliderWorldSizeX.getValue());
Config.setDefaultWorldSizeY(sliderWorldSizeY.getValue());
log.debug("new Default Vals Saved");
}
COM: <s> performs the default global parameter changes </s>
|
funcom_train/50079161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String arrayToDelimitedString(String[] values, String delimiter) {
if (values.length > 0) {
StringBuffer delimitedString = new StringBuffer(values[0]);
for (int i = 1; i < values.length; i++) {
delimitedString.append(delimiter);
delimitedString.append(values[i]);
}
return delimitedString.toString();
} else {
return null;
}
}
COM: <s> serializes an array of strings into a single string with values delimited </s>
|
funcom_train/291379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static protected void setupClass() throws Exception {
servletContext = ServletLifecycle.getServletContext();
applicationFactory = (ApplicationFactory) FactoryFinder
.getFactory(FactoryFinder.APPLICATION_FACTORY);
application = applicationFactory.getApplication();
conversationViewRootAttributes = new HashMap<String, Map>();
seamFilter = createSeamFilter();
FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY,
MockFacesContextFactory.class.getName());
for (ELResolver elResolver : getELResolvers()) {
application.addELResolver(elResolver);
}
}
COM: <s> setup this test class instance must be run for each test class instance </s>
|
funcom_train/10948076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFilterArray() throws Exception {
File fileA = newFile("A");
File fileB = newFile("B");
IOFileFilter filter = FileFilterUtils.nameFileFilter("A");
File[] filtered = FileFilterUtils.filter(filter, fileA, fileB);
assertEquals(1, filtered.length);
assertEquals(fileA, filtered[0]);
}
COM: <s> test method for </s>
|
funcom_train/18218301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConfigFixedFieldsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ValueSpecificationRetrievedValueBugzillaMetrics_configFixedFields_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ValueSpecificationRetrievedValueBugzillaMetrics_configFixedFields_feature", "_UI_ValueSpecificationRetrievedValueBugzillaMetrics_type"),
QualityModelPackage.Literals.VALUE_SPECIFICATION_RETRIEVED_VALUE_BUGZILLA_METRICS__CONFIG_FIXED_FIELDS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the config fixed fields feature </s>
|
funcom_train/11654068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Container makeTitlePanel() {
VerticalPanel titlePanel = new VerticalPanel();
titlePanel.add(createTitleLabel());
VerticalPanel contentPanel = new VerticalPanel();
contentPanel.setBorder(BorderFactory.createEtchedBorder());
contentPanel.add(getNamePanel());
contentPanel.add(getCommentPanel());
titlePanel.add(contentPanel);
return titlePanel;
}
COM: <s> create a standard title section for jmeter components </s>
|
funcom_train/5436822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMulticastAddress() {
if (DEBUG) System.out.println("CLASS: InetAddress.isMulticastAddress()");
int len = address.length;
/* IPv4 address check for class D address */
if (len == 4)
return ((address[0] & 0xF0) == 0xE0);
/* IPv6 address check */
if (len == 16)
return (address[0] == (byte) 0xFF);
/* address is not a Multicast Address */
return false;
}
COM: <s> utility routine to check if the inet address is a </s>
|
funcom_train/33773923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getObjects(S3Bucket bucket, S3Object[] objects) {
String[] objectKeys = new String[objects.length];
for (int i = 0; i < objects.length; i++) {
objectKeys[i] = objects[i].getKey();
}
return getObjects(bucket, objectKeys);
}
COM: <s> retrieves multiple objects details and data from a bucket and sends </s>
|
funcom_train/29506111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuItemMetricsLimit() {
if (menuItemMetricsLimit == null) {
menuItemMetricsLimit = new JMenuItem();
menuItemMetricsLimit.setActionCommand("Adjust Metrics Limit");
menuItemMetricsLimit.setText("Adjust Metrics Limit...");
menuItemMetricsLimit.addActionListener(PrincipalActionFactory.makeOpenMetricsLimit(null,getFontText()));
}
return menuItemMetricsLimit;
}
COM: <s> this method initializes menu item metrics limit </s>
|
funcom_train/36680109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initScriptObjects() {
BeanShell bsh = BeanShell.get();
for (Player p : game.getAllPlayers()) {
String colorName = ColorUtil.toString(p.getColor());
bsh.set("p_" + colorName, p);
}
bsh.set("game", game);
bsh.set("map", map);
}
COM: <s> add objects to beanshell accessible by their name </s>
|
funcom_train/31677847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printErr(final String s) {
try {
int length = jOutputDoc.getLength();
if (length > maxDocSize) {
jOutputDoc.remove(0, length - maxDocSize);
length = jOutputDoc.getLength();
}
jOutputDoc.insertString(length, s, errorAtr);
jOutputPane.setCaretPosition(jOutputDoc.getLength());
} catch (final BadLocationException ble) {
System.out.println("Couldn't write to Output Pane");
}
}
COM: <s> print text to error pane </s>
|
funcom_train/46703146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Appendable printComment(MetaTable table, Appendable out) throws IOException {
out.append("COMMENT ON TABLE ");
printFullTableName(table, out);
out.append(" IS '");
escape(MetaTable.COMMENT.of(table), out);
out.append("'");
return out;
}
COM: <s> print a comment to a database table </s>
|
funcom_train/5338499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteLine(int row) {
synchronized (lines) {
char[] lastLine = lines[row];
if (row < lines.length - 1) {
System.arraycopy(lines, row + 1, lines, row,
lines.length - row - 1);
}
lines[lines.length - 1] = lastLine;
clearLine(lastLine);
}
redrawScreen();
}
COM: <s> delete the line given by the row index </s>
|
funcom_train/40107076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _writeFileHeader() throws IOException {
super.newline();
super.newline();
_out.write("/*");
super.newline();
_out.write(" * ");
_out.write("Generated by TMAPIX I/O <http://www.tmapix.org/>");
super.newline();
_out.write(" */");
}
COM: <s> writes the header comment with the optional title author license etc </s>
|
funcom_train/21821164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Shell getShell() {
if (shell != null) {
return shell;
} else if (targetPart != null) {
return targetPart.getSite().getShell();
} else {
IWorkbench workbench = PerforcePlugin.getDefault().getWorkbench();
if (workbench == null)
return null;
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window == null)
return null;
return window.getShell();
}
}
COM: <s> convenience method for getting the current shell </s>
|
funcom_train/28969428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumnConfigs(final RCPAdvancedViewerColumn<ROW_TYPE, ?>[] columnConfigs) {
if (getSWTControl() != null && !getSWTControl().isDisposed()) {
throw new IllegalArgumentException("table already spawned, cant change columns any more!");
}
// TODO support dynamic reconfiguration even after spawn here
m_columnConfigs = columnConfigs;
}
COM: <s> may only be called before the table actually was spawned </s>
|
funcom_train/48151230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDomainValue(double x) {
//System.out.println("IntervalData getDomainValue domain.getIndex(x) = " + domain.getIndex(x));
//System.out.println("IntervalData getDomainValue domain.getValue(domain.getIndex(x) = " + domain.getValue(domain.getIndex(x)));
return domain.getValue(domain.getIndex(x));
}
COM: <s> this method returns the domain value midpoint closest to given value of </s>
|
funcom_train/49938620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hexSizeActionPerformed(ActionEvent e) {
Context.HexSize size = btnNormalSize.isSelected() ? Context.HexSize.NORMAL : Context.HexSize.BIG;
ctx.put(Context.Property.HEX_SIZE, size.toString());
GamePanel.setHexSize(size);
}
COM: <s> sets new hexagons size </s>
|
funcom_train/4521168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Perfiles entity) {
LogUtil.log("saving Perfiles instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved perfiles entity </s>
|
funcom_train/38949963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ParseExpression(String eqtn){
currCharNum = 0;
elementCount = 0;
currChar = eqtn.charAt(currCharNum);
//the main loop
while (currCharNum <= eqtn.length() - 1) {
lastScanned = parseNext(eqtn);
if (lastScanned != null){
list.add(lastScanned);
}
elementCount++;
currCharNum += lengthLast;
//System.out.println(basicCalcObj.printList(list));
}
}
COM: <s> takes the equation to be parsed and stores its resulting list of </s>
|
funcom_train/7732662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int activate() {
if (receiving) {
return 0;
}
connector.activate();
receiving = true;
sending = true;
autoPaused = false;
timer = new Timer();
timer.schedule(this, 0, INTERVAL);
tit = System.currentTimeMillis();
spdTit = tit;
return 1;
}
COM: <s> start receiving gps data </s>
|
funcom_train/22546286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readMetadataXML(String fileName) {
String ret = "";
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document doc = factory.newDocumentBuilder().parse(getMetadataFileName(fileName));
ret = XMLUtilities.getXML(doc);
} catch (Exception e) {
e.printStackTrace();
}
return ret;
}
COM: <s> reads the metadata xml file that is created for a shared file </s>
|
funcom_train/28426738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseOption(String option) throws TestException {
if (option.equalsIgnoreCase("-verbose"))
setVerbose(true);
else if (option.equalsIgnoreCase("-gui"))
setGuiEnabled(true);
else {
System.err.println(describeUsage());
throw new TestException("Unrecognised option: '" + option + "'",
TestException.ILLEGAL_ARGUMENTS);
}
}
COM: <s> parses a command line option </s>
|
funcom_train/22286579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeView(TextView view) {
for (int i = nviews; --i >= 0; ) {
if (views[i] == view) {
if (i == nviews - 1)
views[i] = null;
else
System.arraycopy(views, i + 1, views, i, nviews - i - 1);
nviews -= 1;
}
}
}
COM: <s> removes a text view from views </s>
|
funcom_train/26216276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JDVertex3D getViewDirection() {
// calculating view direction
JDVertex3D direction = new JDVertex3D();
direction.x = getViewVector().x - getEyePosition().x;
direction.y = getViewVector().y - getEyePosition().y;
direction.z = getViewVector().z - getEyePosition().z;
return direction;
} // END getViewDirection
COM: <s> returns the viewing direction of the camera </s>
|
funcom_train/25971699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(String description, double longitud, double latitud) {
myDB.execSQL("INSERT INTO " + DATABASE_TABLE + " (description, longitud, latitud)"
+ " VALUES ('" + description + "','" + longitud + "','" + latitud + "');");
}
COM: <s> insert location in data base </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.