__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/11728121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDateParent() throws RepositoryException {
property1.setValue(value.getDate());
node.save();
Value orig = superuser.getValueFactory().createValue(value.getDate());
assertEquals("Date node property not saved", orig, property1.getValue());
}
COM: <s> test the persistence of a property modified with an date parameter and </s>
|
funcom_train/22783687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initChooser() {
File currentDirectory = null;
if (chooser != null) {
currentDirectory = chooser.getCurrentDirectory();
}
chooser = new JFileChooser();
ImportDialogFileFilter filter = new ImportDialogFileFilter();
chooser.setFileFilter(filter);
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setMultiSelectionEnabled(false);
chooser.setDialogTitle("Select path to export");
chooser.setCurrentDirectory(currentDirectory);
}
COM: <s> initialize the file chooser </s>
|
funcom_train/1549318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeAll(Collection<?> coll) {
boolean result = false;
if (coll != null) {
Iterator i = coll.iterator();
while (i.hasNext()) {
boolean changed = remove((E) i.next(), 1);
result = result || changed;
}
}
return result;
}
COM: <s> removes objects from the bag according to their count in the specified collection </s>
|
funcom_train/50879693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearSelection(){
if (getGISDisplay() != null){
if (getGISDisplay().getDrawModel() != null){
if (getGISDisplay().getDrawModel() instanceof SelectDrawModel){
SelectDrawModel tempSelectDrawModel = (SelectDrawModel) getGISDisplay().getDrawModel();
tempSelectDrawModel.reset();
}
}
}
}
COM: <s> utility class to clear the selection </s>
|
funcom_train/2918923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if ( o==null ) {
return false;
}
NFAConfiguration other = (NFAConfiguration)o;
return this.state==other.state &&
this.alt==other.alt &&
this.context.equals(other.context)&&
this.semanticContext.equals(other.semanticContext);
}
COM: <s> an nfa configuration is equal to another if both have </s>
|
funcom_train/4918428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFlatMarshall() throws Throwable {
// Create the marshaller
XmlMarshaller marshaller = this.createFlatMarshaller();
// Create the root object
RootObject object = new RootObject();
// Marshall the object
marshaller.marshall(object, new WriterXmlOutput(this.writer));
// Validate the output
assertEquals("Incorrect XML",
"<root boolean=\"true\"><byte>1</byte></root>", this.writer
.toString());
}
COM: <s> ensures able to do a flat marshall of an object </s>
|
funcom_train/41421929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void outputRequestCompleted(String pid, String tid) {
// TODO: Implement MiniOS::outputRequestCompleted()
// get thread from hash table//thread.setInput();
MiniThread thread =null;
if (processesList.get(pid)!=null){
thread = processesList.get(pid).getThread(tid);
}
//if (thread == null)
// move thread from block to ready Q
getScheduler().unblockThread(thread);
}
COM: <s> b un implemented b invoked when the output request made by the given </s>
|
funcom_train/26383102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean isEmpty() {
if (empty!=null) return empty;
if (persistentProperties!=null && !persistentProperties.isEmpty())
empty=Boolean.FALSE;
else if (matchProperties.hasMatches())
empty=Boolean.FALSE;
else if (dependents!=null)
empty=dependents.isEmpty();
return empty;
}
COM: <s> returns whether this persister has anything to persist </s>
|
funcom_train/1797354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initRequestFactory(String applicationName) {
if (applicationName != null) {
requestFactory.setHeader("User-Agent",
applicationName + " " + getServiceVersion());
} else {
requestFactory.setHeader("User-Agent", getServiceVersion());
}
}
COM: <s> sets the headers in the request factory with the appropriate user agent </s>
|
funcom_train/3653001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLReader getReader() {
XMLReader reader = (XMLReader)threadMap.get(Thread.currentThread());
if (null == reader) {
synchronized (threadMap) {
reader = (XMLReader)threadMap.get(Thread.currentThread());
if (null == reader) {
reader = (XMLReader)checkOut();
threadMap.put(Thread.currentThread(), reader);
}
}
}
return reader;
}
COM: <s> gets the current xmlreader for the calling thread </s>
|
funcom_train/44771303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDoubleValue(Document doc, String fieldName, Object internalValue) {
double doubleVal = ((Double) internalValue).doubleValue();
doc.add(new Field(FieldNames.PROPERTIES,
FieldNames.createNamedValue(fieldName, DoubleField.doubleToString(doubleVal)),
false,
true,
false));
}
COM: <s> adds the double value to the document as the named field </s>
|
funcom_train/28972454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setComponent(final Component jc) {
final Dimension prefDim = jc.getPreferredSize();
BufferedImage nue = new BufferedImage(prefDim.width, prefDim.height + 2,
BufferedImage.TYPE_INT_ARGB_PRE);
SwingUtilities.paintComponent(nue.getGraphics(), jc, this, 0, 0, prefDim.width, prefDim.height + 2);
setImg(nue);
}
COM: <s> set the cell renderer we will proxy </s>
|
funcom_train/38463714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if(o == null) {
return false;
}
if(!(o instanceof Variable)) {
return false;
}
Variable v = (Variable)o;
if(!name.equalsIgnoreCase(v.name)) {
return false;
}
if(!cls.equals(v.cls)) {
return false;
}
return true;
}
COM: <s> indicates whether some other variable is equal to this one </s>
|
funcom_train/22189706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readConfiguration() {
IDialogSettings s = getDialogSettings();
String sSearchText = s.get(SearchData.SRCH_TEXT);
if (sSearchText != null)
m_txtSearchText.setText(sSearchText);
Set keys = m_mapCheckBoxes.keySet();
Iterator iter = keys.iterator();
while (iter.hasNext())
{
String sKey = (String) iter.next();
Button btnCheck = (Button) m_mapCheckBoxes.get(sKey);
btnCheck.setSelection(s.getBoolean(sKey));
}
}
COM: <s> initializes itself from the stored page settings </s>
|
funcom_train/46974859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modified(Object obj) {
_log.debug("modified() called.");
if (obj._is_a(ModelHelper.id())) {
try {
_generator.generate();
} catch (MISConnectionError e) {
_log.error("MetricsSourceData not found.");
} catch (MetricsSourceDataNotFound e) {
_log.error("MIS Connection Error.");
}
} else {
_log.error("Object was not a model instance.");
}
}
COM: <s> model object modified recalculate metrics group for the project </s>
|
funcom_train/27820422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
Node node = (Node) super.clone();
node.id = null;
node.inputs = new HashSet();
node.outputs = new HashSet();
return node;
} catch (CloneNotSupportedException e) {
// shouldn't happen!
log.error(e);
}
return null;
}
COM: <s> the cloned node has no id inputs or outputs </s>
|
funcom_train/2881041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException {
try {
if (mbeanServer.isInstanceOf(remoteName, "javax.management.NotificationBroadcaster")) {
mbeanServer.removeNotificationListener(remoteName, listener);
}
} catch (RuntimeConnectionException ce) {} catch (InstanceNotFoundException infe) {}
}
COM: <s> removes a listener from a registered mbean </s>
|
funcom_train/3839993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
GameServer.getLogger().debug("Thread started");
ServerErrorMessage sem = new ServerErrorMessage(99, 4);
RemoveClient rc = new RemoveClient(_cc, "Identification time out", sem,
RemoveClient.DisconnectionType.SERVER);
ActionListManager.getInstance().pushNewAction(rc);
GameServer.getLogger().debug("Thread stopped");
}
COM: <s> checks if this client correctly identified </s>
|
funcom_train/22525972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveChangedFiles(File[] files, File destFolder) {
for(File file : files) {
File newFile = new File(destFolder, file.getName());
if(file.isDirectory()) {
saveChangedFiles(file.listFiles(), new File(destFolder, file.getName()));
}
else {
fChangedFiles.put(file, newFile);
}
}
}
COM: <s> save a flat list of all about to be changed files </s>
|
funcom_train/37597906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadResource_(String s) throws Exception {
java.net.URL u = Configuror.INSTANCE.render(this.getClass(), s, true);
if (u == null) {
throw new IllegalArgumentException("null resource_ using: " + s);
}
props = new Props(u);
}
COM: <s> try this classs class loader otherwise configurors </s>
|
funcom_train/31096602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBody(BodyAreaContainer area) {
this.body = area;
area.setPage(this);
((BodyAreaContainer)area).getMainReferenceArea().setPage(this);
((BodyAreaContainer)area).getBeforeFloatReferenceArea().setPage(this);
((BodyAreaContainer)area).getFootnoteReferenceArea().setPage(this);
}
COM: <s> ensure that page is set not only on b </s>
|
funcom_train/375166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAllClassAnnotatedBindingWithPacket() {
JBinding[] bindings = AnnotatedBinding.inspectClass(
BindNetworkFamily.class, errors);
assertTrue("no bindings found", bindings.length > 0);
JBinding bindEthernet = bindings[0];
JPacket packet = TestUtils.getPcapPacket("tests/test-afs.pcap", 0);
System.out.println(bindEthernet.toString());
assertTrue(bindEthernet.toString(), bindEthernet.isBound(packet, 0));
}
COM: <s> test all class annotated binding with packet </s>
|
funcom_train/34648702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleTableSelectionChanged() {
IStructuredSelection selection = (IStructuredSelection) configsViewer.getSelection();
if (selection.isEmpty()) {
removeButton.setEnabled(false);
}
else {
if (selection.getFirstElement() instanceof IBeansConfig
&& ((IBeansConfig) selection.getFirstElement()).getType() == IBeansConfig.Type.MANUAL) {
removeButton.setEnabled(true);
}
else {
removeButton.setEnabled(false);
}
}
}
COM: <s> the user has selected a different configuration in table </s>
|
funcom_train/37584601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public int read() throws IOException {
byte[] bbuf = new byte[1];
int readResult = read(bbuf, 0, 1);
if (readResult == -1) { return readResult; }
else if (readResult == 1) { return bbuf[0]; }
else { throw new IOException("Unexpected read result: " + readResult); }
}
COM: <s> delegate to the more general </s>
|
funcom_train/4014631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCondition(){
if(formDef != null && enabled){
verticalPanel.remove(addConditionLink);
ConditionWidget conditionWidget = new ConditionWidget(formDef,this,true,questionDef);
verticalPanel.add(conditionWidget);
verticalPanel.add(addConditionLink);
if(!(rdEnable.getValue() == true||rdDisable.getValue() == true||rdShow.getValue() == true||rdHide.getValue() == true)){
rdEnable.setValue(true);
updateMakeRequired();
}
}
}
COM: <s> adds a new condition </s>
|
funcom_train/21087668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPlanchePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Invocation_planche_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Invocation_planche_feature",
"_UI_Invocation_type"),
SNI_Package.Literals.INVOCATION__PLANCHE, true, false,
false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null, null));
}
COM: <s> this adds a property descriptor for the planche feature </s>
|
funcom_train/33391736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullRequestUrl() {
HttpServletRequest r = getHttpRequest();
UrlBuilder builder = new UrlBuilder(r.getContextPath());
builder.scheme(r.getScheme()).serverName(r.getServerName()).port(r.getServerPort());
builder.requestURI(r.getRequestURI()).pathInfo(r.getPathInfo());
builder.queryString(r.getQueryString());
return builder.buildUrl();
}
COM: <s> indicates the url that the user agent used for this request </s>
|
funcom_train/10801963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeQueryMetaData(QueryMetaData meta) {
if (meta == null)
return false;
if (_locking) {
synchronized (this) {
return _queries.remove(getQueryKey(meta)) != null;
}
} else {
return _queries.remove(getQueryKey(meta)) != null;
}
}
COM: <s> remove the given query metadata from the repository </s>
|
funcom_train/50340292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMainlineIndexed(int index) {
RayTrack ray = null;
for (int i=0; (i<rayList.size()) && (ray==null); i++) {
RayTrack r = rayList.get(i);
if (r.getConnectionIndex() == index) ray = r;
}
if (ray==null) return false;
TrackSegment tr = ray.getConnect();
if (tr==null) return false;
return tr.getMainline();
}
COM: <s> methods to test if ray is a mainline track or not </s>
|
funcom_train/5673425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHtmlText() throws SMIMEException {
String returnString;
Tidy tidy = new Tidy();
tidy.setWraplen(1000);
ByteArrayOutputStream out = new ByteArrayOutputStream();
tidy.pprint(doc, out);
try {
returnString = out.toString("ISO-8859-1");
out.close();
} catch (Exception e) {
throw SMIMEException.getInstance(this, e, "getHtmlText");
}
return returnString;
}
COM: <s> returns html text document passed throught jtidy html parser </s>
|
funcom_train/11296939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(Object val) {
if (val == null) {
controlNullOperand();
return "";
} else if (val instanceof Double) {
Double dval = (Double) val;
if (Double.isNaN(dval)) {
return "";
} else {
return dval.toString();
}
} else {
return val.toString();
}
}
COM: <s> coerce to a string </s>
|
funcom_train/22890975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object data) {
String text = null;
if (data == null)
{
this.setBackground((Color) EXQLModuleManager.instance().getPreference(
EXQLConstants.TABLE_NULL_INDICATOR_BACKGROUND).getValue());
text = "";
}
else
{
if (dbColumn != null)
{
text = EditorAndRenderFactory.renderValueForColumn(data, dbColumn);
}
else
{
text = data.toString();
}
}
this.setText(text);
}
COM: <s> sets the value for this component </s>
|
funcom_train/16174681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/31145897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nbWrite(byte b[]) throws IOException {
if (eof) throw new EOFException("EOF on "+toString());
int n = nbSocketWrite(b, 0, b.length);
if (n < 0) {
eof = true;
throw new EOFException("EOF on "+toString());
}
return n;
}
COM: <s> perform a nonblocking write of up to code b </s>
|
funcom_train/1917456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int processExtendedHeader(ByteBuffer data, byte version) {
// TODO Verify that we have an syncsfe int
int extsize = 0;
byte[] exthead = new byte[4];
data.get(exthead);
if (version == Id3v2Tag.ID3V23) {
extsize = readSize(data, Id3v2Tag.ID3V23);
// The extended header size excludes those first four bytes.
data.position(data.position() + (extsize));
} else {
extsize = readSyncsafeInteger(data);
data.position(data.position() + (extsize));
}
return extsize;
}
COM: <s> this method is used to skip the extended header in the reading process </s>
|
funcom_train/44495657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String primaryKeysToString() {
String retString = "";
Iterator it = this.primaryKeys.iterator();
while (it.hasNext()) {
retString = StringUtil.comma(retString, "'" + it.next() + "'");
}
if (retString.length() > 0) {
retString = "(" + retString + ")";
}
return retString;
}
COM: <s> returns the calculated code primary keys code of this code criterion ref code </s>
|
funcom_train/46377913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void comboBoxChanged(JComboBox box, ConfigType type) {
// Fetch the currently selected item in the combo box and update the
// settings.
int index = box.getSelectedIndex();
if (index == -1) {
LOGGER.warning("No item is selected for " + type);
return;
}
currentParams.setElement(type, index);
// Apply the settings to the avatar
apply();
}
COM: <s> handles when a selection on the given combo box is made </s>
|
funcom_train/16147336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveToFile(Document document, String fileName) throws Exception{
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.transform(new DOMSource(document), new StreamResult(new File(fileName)));
}
COM: <s> save given document into a xml file </s>
|
funcom_train/14116662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDOMRevision(final String number, final String added, final String removed, final String binaryStatus) {
final Element revision = document.createElement(CacheConfiguration.REVISION);
revision.setAttribute(CacheConfiguration.NUMBER, number);
revision.setAttribute(CacheConfiguration.ADDED, added);
revision.setAttribute(CacheConfiguration.REMOVED, removed);
revision.setAttribute(CacheConfiguration.BINARY_STATUS, binaryStatus);
currentPath.appendChild(revision);
}
COM: <s> adds a revision to the current path in the dom </s>
|
funcom_train/31871406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNestedModelEntry() {
_engine.executeProcess(_model, _processObject);
String[] expectedStates = new String[] {"stateModel.join", "stateModel.concurrentNested", "SimpleModel.start"};
StateAssertionUtil.assertActiveStatesAre("After execution", expectedStates, _processObject.getActiveStates());
}
COM: <s> test that a nested model on a forked branch is entered properly </s>
|
funcom_train/20692603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Long getPageID(HttpServletRequest req) {
String strPageID = "";
if (path != null) {
StringTokenizer parser = new StringTokenizer(path, "/");
if (parser.hasMoreTokens())
parser.nextToken();
if (parser.hasMoreTokens())
strPageID = parser.nextToken();
} else
strPageID = getParameter(req, "pageID");
Long pageID = null;
try {
pageID = new Long(strPageID);
} catch (NumberFormatException error) {
}
return pageID;
}
COM: <s> determine the id of a page from path info pathinfo has form </s>
|
funcom_train/44838535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object findEntity(Entity object) throws EntityException {
Object returnObject = null;
try {
returnObject = entityManager.findEntity(object);
} catch (RemoteException rex) {
System.out.println("Error on the remote server" + rex);
throw new EntityException("Error on the remote server" + rex);
}
return returnObject;
}
COM: <s> find an entity </s>
|
funcom_train/7292472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int majorSolarTerm(int days) {
astro.setTime(daysToMillis(days));
// Compute (floor(solarLongitude / (pi/6)) + 2) % 12
int term = ((int) Math.floor(6 * astro.getSunLongitude() / Math.PI) + 2) % 12;
if (term < 1) {
term += 12;
}
return term;
}
COM: <s> return the major solar term on or before a given date </s>
|
funcom_train/22665091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getSpChat() {
if (spChat == null) {
spChat = new JScrollPane();
spChat.setBounds(new Rectangle(24, 501, 591, 193));
spChat.setViewportView(getLstChat());
spChat.setBorder(BorderFactory.createLineBorder(Color.gray, 1));
spChat.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
spChat.setViewportView(getLstChat());
}
return spChat;
}
COM: <s> this method initializes sp chat </s>
|
funcom_train/22360622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Faction o1, Faction o2) {
Faction f1 = o1;
Faction f2 = o2;
int t1 = f1.getTrustLevel();
int t2 = f2.getTrustLevel();
return (t2 == t1 && sameTrustSubCmp != null) ? sameTrustSubCmp.compare(o1, o2) : (t2 - t1);
}
COM: <s> compares the exact trust levels of the two factions </s>
|
funcom_train/9810412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void NotifyNetworkListeners(SIChangeEvent event) {
if (event == null) return;
SIElement element = event.getSIElement();
if (element == null || !(element instanceof Network)) return;
TransportImpl transport = (TransportImpl) transports[transports.length - 1];
if (transport == null) return;
SIChangeType ct = event.getChangeType();
NetworkChangeEvent sdce = new NetworkChangeEvent(transport, ct,
(Network) element);
transport.notifyNetworkListeners(sdce);
}
COM: <s> notify the network listeners </s>
|
funcom_train/5724346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WebDAVResource resolveParent(WebDAVPath childPath) throws WebDAVException {
WebDAVPath parentPath = childPath.getParent();
WebDAVResource parentResource;
try {
parentResource = getRoot().resolvePath(parentPath);
} catch (WebDAVException e) {
if (e.getStatusCode() == WebDAVStatusCodes.SC_NOT_FOUND) {
e.setStatusCode(WebDAVStatusCodes.SC_CONFLICT);
}
throw e;
}
return parentResource;
}
COM: <s> resolves the parent resource of a given one </s>
|
funcom_train/22028534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTime(int index) {
Object [] vals = DateTimeList.getSelectedValues();
selectedDateTime = (String) vals[index];
String time = null;
if (selectedDateTime != null) {
int i = selectedDateTime.indexOf("/");
if (i > 0) {
time = selectedDateTime.substring(i+1).trim();
}
}
return time;
}
COM: <s> get the time of the index th selected image </s>
|
funcom_train/39530118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editPreferences() {
PreferencesFacade preferencesFacade = new PreferencesFacade(
getDrawingSpecifications(), preferedUnit, rtfExportPreferences,
clipboardPreferences);
// Maybe facade should be an interface, and the workflow itself would be
// the facade.
PreferencesEditor preferencesEditor = new PreferencesEditor(frame,
preferencesFacade);
preferencesEditor.initializePreferences(preferencesFacade);
int ok = preferencesEditor.askForPreferences();
if (ok == JOptionPane.OK_OPTION) {
preferencesEditor.updatePreferences(preferencesFacade);
firePreferencesChange();
}
getEditor().invalidateView();
}
COM: <s> ugly system for editing preferences </s>
|
funcom_train/27768764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void list(PrintStream out){
for(Iterator it = root.children(); it != null && it.hasNext();){
Tree.Node node = (Tree.Node)it.next();
printRaw(node, out, node.getKey());
}
}
COM: <s> list the contents of this tree to the specified print stream </s>
|
funcom_train/9987721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AclEntry changeAclRole(AclRole role, AclScope scope, String resourceId) throws Exception {
if (role == null || scope == null || resourceId == null) {
throw new DocumentListException("null passed in for required parameters");
}
URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId + URL_ACL);
return service.update(url, scope, role);
}
COM: <s> change the acl role of a file </s>
|
funcom_train/29617858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisTextField getJFaoCodeField() {
if (jFaoCodeField == null) {
jFaoCodeField = new MgisTextField();
jFaoCodeField.setBounds(564, 20, 45, 20);
jFaoCodeField.setEditable(false);
jFaoCodeField.setText(m_pdf.getAccession().getICltacc().substring(2));
}
return jFaoCodeField;
}
COM: <s> this method initializes j fao code field </s>
|
funcom_train/6204868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createContents(Composite parent) {
composite = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
viewer = new TreeViewer(composite);
viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
viewer.setContentProvider(new TemplateContentProvider(getTemplateManager()));
viewer.setLabelProvider(new TemplateLabelProvider());
viewer.setAutoExpandLevel(2);
List categories = new ArrayList(templateManager.getCategories().values());
Collections.sort(categories);
viewer.setInput(categories);
}
COM: <s> create the contents of the panel </s>
|
funcom_train/2624910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getScale() {
PTS1[0] = 0; // x1
PTS1[1] = 0; // y1
PTS1[2] = 1; // x2
PTS1[3] = 0; // y2
transform(PTS1, 0, PTS2, 0, 2);
return Point2D.distance(PTS2[0], PTS2[1], PTS2[2], PTS2[3]);
}
COM: <s> returns the scale applied to this transform </s>
|
funcom_train/23778994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Image _decorateImage(Image argImage, Object argElement) {
if (argElement instanceof IEslinkElement) {
IResource res = ((IEslinkElement)argElement).getResource();
if (res != null) argElement = res;
}
if (_labelDecorators != null && argImage != null) {
for (ILabelDecorator ld : _labelDecorators) {
argImage = ld.decorateImage(argImage, argElement);
}
}
return argImage;
}
COM: <s> decorates image using all registered decorators </s>
|
funcom_train/34068141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem createMenuItem(String label, int shortkey, String methodName) {
JMenuItem menuitem = new JMenuItem(label);
menuitems.put(label, menuitem);
delegate(menuitem, methodName);
if (shortkey != -1) {
int mask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
menuitem.setAccelerator(KeyStroke.getKeyStroke(shortkey, mask));
}
return menuitem;
}
COM: <s> creates a new menu item with the specified title and shortkey </s>
|
funcom_train/49954842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearForm() {
tbfname.setText("");
tblname.setText("");
tbemail.setText("");
tbusername.setText("");
tbpassword.setText("");
tbconfirmpassword.setText("");
lbdepartment.clear();
int indexSelected = 0;
for (int i = 0; i < DeptEnum.list().size(); i++) {
lbdepartment.addItem(DeptEnum.list().get(i).value);
}
lbdepartment.setSelectedIndex(indexSelected);
}
COM: <s> clear this form </s>
|
funcom_train/18058109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent le) {
// if it's the first of many events
if (le.getValueIsAdjusting())
return;
// if the explain frame is not up yet
if (explainFrame == null)
return;
// it's been up but is not right now
if (!explainFrame.isVisible())
return;
// go explain it.
explainCounters();
}
COM: <s> the value changed event handler </s>
|
funcom_train/12924154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLoopCount(final Integer aNumber) {
if ((aNumber != null)
&& ((aNumber < 0) || (aNumber > Coder.USHORT_MAX))) {
throw new IllegalArgumentRangeException(0,
Coder.USHORT_MAX, aNumber);
}
loopCount = aNumber;
}
COM: <s> sets the number of times the sound is repeated </s>
|
funcom_train/43417117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initBaseInfo() throws IOException {
if (!"FORM".equals(getId())) {
throw new IOException("not a valid IFF format");
}
// Determine the sub id
subId = new byte[CHUNK_ID_LENGTH];
memory.copyBytesToArray(subId, 0, CHUNK_HEADER_LENGTH,
Chunk.CHUNK_ID_LENGTH);
}
COM: <s> initialize the id field </s>
|
funcom_train/15627476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void activateAndRaiseMapView(@NotNull final MapView<G, A, R> mapView) {
mapManager.setCurrentMap(mapView.getMapControl());
mapView.activate();
final JInternalFrame internalFrame = mapView.getInternalFrame();
internalFrame.moveToFront();
setSelectedFrame(internalFrame);
}
COM: <s> activates and raises the given map view </s>
|
funcom_train/3710933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeValues (Object object) {
Arrays.fill (values, 0.0);
Enumeration list = comp_database.getComponentList();
Function f;
while (list.hasMoreElements()) {
f = (Function)list.nextElement();
f.addRawValues (wav.getValues(), values);
}
setChanged();
notifyObservers (object);
}
COM: <s> gets data arrays from all functions in this object and adds </s>
|
funcom_train/40872243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRegistryProxy(RegistryProxy registryProxy) throws ParentProxyNotFoundException {
CountrysideProxy countrysideProxy = this.getCountrysideProxy(registryProxy.getJid().getBareJid());
if (countrysideProxy != null)
countrysideProxy.addRegistryProxy(registryProxy);
else
throw new ParentProxyNotFoundException("parent countryside proxy null for " + registryProxy.getJid());
}
COM: <s> add a registry proxy to a countryside proxy </s>
|
funcom_train/42274740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendBufferToNode(ByteBuffer buf, NodeHandle nh) {
m_reporter.log(
m_node.getId().toStringFull(),
nh.getId().toStringFull(),
EveType.UPLOAD, "");
m_myapp.sendBufferToNode(buf, nh);
}
COM: <s> send a buffer through my app uses app sockets </s>
|
funcom_train/42259681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText() {
final StringBuilder sb = new StringBuilder();
final Interface[] children = getChildrenInternal();
if (children != null) {
for (final Interface child : children) {
String string;
if (child != null && (string = child.getText()) != null) {
sb.append(string);
sb.append("\r\n");
}
}
}
if (sb.length() > 2) {
sb.setLength(sb.length() - 2);
}
return sb.toString();
}
COM: <s> finds all the text in it searches all his children for it </s>
|
funcom_train/885070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* protected void resize(int width, int height) {
// Replace attributes in document:
MutableAttributeSet attr = new SimpleAttributeSet();
attr.addAttribute(HTML.Attribute.WIDTH, Integer.toString(width));
attr.addAttribute(HTML.Attribute.HEIGHT, Integer.toString(height));
((StyledDocument) getDocument()).setCharacterAttributes(getElement()
.getStartOffset(), getElement().getEndOffset(), attr, false);
}*/
COM: <s> change the size of this image </s>
|
funcom_train/30206444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateAgainstAcl(ObjectSystemData osd, Permission permission){
if(osd == null){
throw new CinnamonException("error.object.not.found");
}
log.debug("looking up acl");
Acl acl = osd.getAcl();
if (acl == null) {
throw new CinnamonException("error.acl.invalid");
}
if (check_acl_entries(acl, permission, osd)) {
log.debug("check_acl_entries returned true.");
return;
}
// no sufficient permission entry found
throw new CinnamonException("error.missing.permission." + permission.getName());
}
COM: <s> validate a permission against an objects acl </s>
|
funcom_train/26233152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUploadedFileName() {
try {
return filePath.substring(((filePath.lastIndexOf("\\") != -1)
? filePath.lastIndexOf("\\")
: filePath.lastIndexOf("/")) + 1);
}
catch (Exception e) {
return "";
}
}
COM: <s> get the code uploaded file name code </s>
|
funcom_train/37850217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convertDnsNamesToIp( Map namesToIP){
convertDnsNamesToIp ( this._remote_ip, namesToIP );
for (Iterator ite = this._days.iterator (); ite.hasNext (); ){
DayData day = (DayData)ite.next ();
convertDnsNamesToIp( day._remote_ip, namesToIP );
}
}
COM: <s> the following 2 methods are only needed to pass from jxla 1 </s>
|
funcom_train/3080560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int column, int row, Cell cell) {
Coordinate position = new Coordinate(column, row);
// If a cell exists at the specified coordinate, remove it.
Cell existingCell = get(column, row);
if (existingCell != null) {
remove(existingCell);
}
cells.put(position, cell);
cell.setPosition(position);
super.add(cell, -1);
}
COM: <s> adds a cell at a specified coordinate </s>
|
funcom_train/47855292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startNetVisu() {
if ((layout == null) || (color == null) || (vis == null))
return;
logger.debug("restarting layout !");
shouldBeRunning = true;
prefuseDisplay.setEnabled(true);
if (layout != null) {
vis.putAction("layout", layout);
vis.run("layout");
}
if (color != null) {
vis.putAction("color", color);
vis.run("color");
}
prefuseDisplay.setVisible(true);
}
COM: <s> starts all the prefuse actions start to layout and paint </s>
|
funcom_train/7674095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addUsersToWorklist(int reg, int latticeValue) {
if (latticeValue == VARYING) {
for (SsaInsn insn: ssaMeth.getUseListForRegister(reg)) {
varyingWorklist.add(insn);
}
} else {
for (SsaInsn insn: ssaMeth.getUseListForRegister(reg)) {
ssaWorklist.add(insn);
}
}
}
COM: <s> adds an ssa registers uses to the ssa worklist </s>
|
funcom_train/48447980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteByName(String className, Object key) {
// Look up the object in this JVM
Object lookedUp = loadByName(className, key);
// Gotta remove it from all associations before delete worx
((BaseORObject) lookedUp).removeFromAssociations();
// Call the super
super.delete(lookedUp, true);
}
COM: <s> to remedy the classcast problem in the delete method above create an </s>
|
funcom_train/3026898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTypeName(FileSummary summary) {
if (summary == null) {
return "No summary";
}
Iterator iter = summary.getTypes();
if (iter == null) {
return "No types";
}
TypeSummary first = (TypeSummary) iter.next();
String name = first.getName();
if (name == null) {
return "No name";
}
return name;
}
COM: <s> gets the type name attribute of the framework file summary loader object </s>
|
funcom_train/8116188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NodeList getNodeList(final Document doc, final String xPath){
if (doc == null || "".equals(StringUtils.trimToEmpty(xPath))){
return null;
}
try {
final NodeList nodeList = XPathAPI.selectNodeList(doc, xPath);
return nodeList;
} catch (TransformerException e) {
LOGGER.debug("TransformerException", e);
}
return null;
}
COM: <s> get a list of nodes from the </s>
|
funcom_train/6263340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel makeBottomPanel() {
JPanel bp = new JPanel();
bp.setLayout( new BorderLayout( 5, 5 ) );
JPanel bulkPanel = makeBulkPanel();
JPanel jobControlPanel = makeJobControlPanel();
bp.add( bulkPanel, BorderLayout.WEST );
bp.add( jobControlPanel, BorderLayout.EAST );
return bp;
}
COM: <s> make the panel at the bottom of the frame </s>
|
funcom_train/15910803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (withAnalysis) {
runWithAnalysis();
return;
}
run = true;
long i=0;
if (machine.getFrequency()==0) {
// Run at maximum rate
while (run) {
machine.runOneTick();
i++;
}
}
else {
// Run at a given rate
int sleep;
int period = (int)(1.0/machine.getFrequency()*1000.0);
while(run) {
timer.reset();
machine.runOneTick();
i++;
sleep = period-timer.getIntTime();
if (sleep>0)
try {
Thread.sleep(sleep);
}
catch (InterruptedException e) {
break;
}
}
}
}
COM: <s> machines main loop </s>
|
funcom_train/44131564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() throws JMSException {
Thread.currentThread().setContextClassLoader(contextClassLoader);
if (sessionManager.getSession().getTransacted()) {
sessionManager.getSession().commit();
} else {
log.warn("session " + getId() + " is not transacted");
}
try {
if (isAudit()) {
getAuditLog().commit();
}
} catch (JMSException ex) {
log.error("cannot log audit during commit: " + ex.getMessage(), ex);
}
}
COM: <s> commit the current transaction </s>
|
funcom_train/43479470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPorts() {
new Thread() {
@Override
public void run() {
@SuppressWarnings("rawtypes")
Enumeration pList = CommPortIdentifier.getPortIdentifiers();
while (pList.hasMoreElements()) {
CommPortIdentifier cpi = (CommPortIdentifier) pList.nextElement();
if (cpi.getPortType() == CommPortIdentifier.PORT_SERIAL)
if (!portExists(cpi.getName()))
portList.addItem(cpi.getName());
}
}
}.start();
}
COM: <s> get list of ports available on this particular computer </s>
|
funcom_train/14384068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource getDataSource() throws DatabaseConnectionException {
if (dataSource == null)
try {
if (properties == null) {
throw new IllegalStateException("Illegal configured properties " + properties);
}
dataSource = (BasicDataSource) BasicDataSourceFactory.createDataSource(properties);
} catch (Exception e) {
String message = "Could not get a instance for BasicDataSource.";
LogUtil.writeErrToLog(message, e);
throw new DatabaseConnectionException(message, e);
}
return dataSource;
}
COM: <s> ritorna il data source fornito dal pool di dbcp di jakarta commons </s>
|
funcom_train/8131471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void defTitle() {
String titel = title();
if (titel == null)
addHeaderLine("<title>" + getClass().getName().substring(getClass().getName().lastIndexOf('.') + 1) + "</title>");
else
addHeaderLine("<title>" + title() + "</title>");
}
COM: <s> function to write title to the html </s>
|
funcom_train/16831345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toSentenceString(Sentence s) {
StringBuilder sb = new StringBuilder();
for (int wordNum = start(), end = end(); wordNum <= end; wordNum++) {
sb.append(s.get(wordNum));
if (wordNum != end) {
sb.append(" ");
}
}
return sb.toString();
}
COM: <s> print out as a string the subpart of a sentence covered </s>
|
funcom_train/13712277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendProgramChange(ProgramChange programChange){
try{
sendEvent(programChange);
}catch (InvalidMidiDataException e){
if (programChange.getNumber() > 127 || programChange.getNumber() < 0){
throw new InvalidMidiDataException("You tried to send the program number " + programChange.getNumber()
+ ". With midi you only have the program numbers 0 - 127 available.");
}
}
}
COM: <s> with this method you can send program changes to your midi output </s>
|
funcom_train/36547438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStringFromDocument( Document doc ) {
try {
DOMSource domSource = new DOMSource( doc );
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult( writer );
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.transform( domSource, result );
return writer.toString();
} catch ( TransformerException ex ) {
ex.printStackTrace();
return null;
}
} // end method getStringFromDocument( )
COM: <s> convert a document to a string xml </s>
|
funcom_train/13993276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddParserIfRequired06() throws Exception {
ComponentFactory componentFactory = new ComponentFactory();
ComponentConfig config = new ComponentConfig(PROPERTY, TITLE);
HashMap parsers = new HashMap();
parsers.put(DEFAULT_TYPE, PARSER);
try {
getParserMap(componentFactory, config, parsers);
fail("no exception thrown");
} catch (Exception ignored) {
}
}
COM: <s> tests that an exception occurs if parser is added if the fallback </s>
|
funcom_train/17184077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processRequest(HttpServletRequest req, HttpServletResponse resp)
{
try {
handler.handleRequest(req.getInputStream(), req.getRemoteAddr());
/*InputStream is = new Base64.InputStream(req.getInputStream());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int ch = 0;
while ((ch = is.read()) >= 0)
{
baos.write(ch);
}
System.out.println(baos.toString());*/
resp.getWriter().println("OK");
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> handles the clients request and returns ok via http if there </s>
|
funcom_train/15739628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLeadingSpace() throws IOException {
CharArrayReader reader = new CharArrayReader(
" #include \"foo.h\" ".toCharArray());
CParser parser = new CParser();
parser.parse(reader);
String[] includes = parser.getIncludes();
assertEquals(includes.length, 1);
assertEquals("foo.h", includes[0]);
}
COM: <s> checks parsing when line contains leading whitespace </s>
|
funcom_train/40885331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getVertices (float[] vertices) {
if (vertices.length < getNumVertices() * getVertexSize() / 4)
throw new IllegalArgumentException("not enough room in vertices array, has " + vertices.length + " floats, needs "
+ getNumVertices() * getVertexSize() / 4);
int pos = getVerticesBuffer().position();
getVerticesBuffer().position(0);
getVerticesBuffer().get(vertices, 0, getNumVertices() * getVertexSize() / 4);
getVerticesBuffer().position(pos);
}
COM: <s> copies the vertices from the mesh to the float array </s>
|
funcom_train/8381549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpGuice() {
setUpEmail();
StringBuffer moduleNames = new StringBuffer(" ");
for (Module module : modules) {
moduleNames.append(module.getClass().getName()).append(" ");
}
logger.info("Setting up injection with modules [" + moduleNames.toString() + "]");
injector = Guice.createInjector(modules);
injector.injectMembers(this);
}
COM: <s> sets up the configuration and then the injector </s>
|
funcom_train/20044673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _convertNumberToString() {
double dValue = 1.56;
int key = 15;
String gString = oObj.convertNumberToString(key,dValue);
log.println("Getting: "+gString);
tRes.tested("convertNumberToString",gString!=null);
}
COM: <s> tries to convert a number to a string </s>
|
funcom_train/20436719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPartOfNodes(Graph<Node, Edge> graph) {
if (partOfsAdded == false) {
for (String partOf : getPartOf()) {
Node subNode = new Node(partOf,null);
subNode.setParent(this);
graph.addEdge(new PartOfEdge(), subNode, this,
EdgeType.DIRECTED);
}
partOfsAdded = true;
}
}
COM: <s> create and add the nodes that are listed as part of this node </s>
|
funcom_train/36617717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MultiStatus lock(String scope, String type, int timeout, Element owner) throws WebDAVException {
// remove any lock tokens in the context so we don't try to
// do a refresh by mistake.
getRequestContext().precondition((String) null);
return impl.lock(context, scope, type, timeout, owner);
}
COM: <s> lock this resource based on the given parameters </s>
|
funcom_train/50847114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetBlob() throws Exception {
String parameterName = getParameterName();
int parameterIndex = getParameterIndex();
InputStream inputStream = null;
long length = 0L;
CallableStatement instance = null;
//instance.setBlob(parameterName, inputStream, length);
// TODO review the generated test code and remove the default call to fail.
stubTestResult();
}
COM: <s> test of set blob method of interface java </s>
|
funcom_train/36915453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVariable(String variable, String value) {
try {
setVariable.setString(1, value);
setVariable.setString(2, variable);
setVariable.execute();
} catch (SQLException ex) {
Logger.getLogger(MySQLVariableDAO.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> updates a varible in the database </s>
|
funcom_train/8085286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getModelValueAt(int rowIndex, int columnIndex) {
Object result;
result = super.getModel().getValueAt(rowIndex, columnIndex);
// since this is called in the super-class we have to use the original
// index!
if (((ArffTableModel) getModel()).isMissingAt(rowIndex, columnIndex))
result = null;
return result;
}
COM: <s> returns the value at the given position </s>
|
funcom_train/4291495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearChoice(Choice choice) throws Qvtr2Exception{
Qvtr2OperationalLCB lcb = new Qvtr2OperationalLCB(originalLaunchConfig);
lcb.convertForPath(folderManager.computeWorkingDirForStep(engineStatus.getTransformationStep()));
lcb.setLocalWorkingDir(folderManager.computeWorkingDirForStep(engineStatus.getTransformationStep()));
IQvtr2LaunchConfiguration<IQvtoLaunchConfiguration> slc = lcb.build();
this.choiceStrategy.clearChoice(slc, choice);
}
COM: <s> clears a choice from the current choice model </s>
|
funcom_train/1365969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getSampleCountryList() {
List nameList = new ArrayList();
for (int i = 0; i < 6; i++) {
SampleBoundaryOptionObject sboo = new SampleBoundaryOptionObject();
sboo.setId(String.valueOf(i));
sboo.setName("country" + i);
nameList.add(sboo);
}
return nameList;
}
COM: <s> this method executes a dummy database operation </s>
|
funcom_train/44013092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double innerEvaluate(Object o1, Object o2) {
if (o1 == null || o2 == null)
return 0;
else if (o1.equals(o2))
return 1.0;
else if (this.getMode() == null || this.getMode().length() == 0
|| MAINSUI.equals(this.getMode()))
return mainSuiCheck(o1, o2);
else if (TUI.equals(this.getMode()))
return tuiCheck(o1, o2);
else {
log.error("invalid mode");
throw new RuntimeException("invalid mode");
}
}
COM: <s> concepts have overlapping semantic types yes return 1 else return 0 </s>
|
funcom_train/11102839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void indirectStream() {
try {
FacesContext context = FacesContext.getCurrentInstance();
ResponseStream stream =
(new ResponseFactory()).getResponseStream(context, "application/x-binary");
for (int i = 0; i < 10; i++) {
stream.write(i);
}
} catch (IOException e) {
throw new FacesException(e);
}
}
COM: <s> p create binary output indirecty via a factory </s>
|
funcom_train/22962331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Annotation getPropertyEditor(Field field) {
List<Annotation> editors = Annotations.like(Editor.class, field);
if (editors.size() > 1) {
throw new ConfigurationException("Properties can have only one editor (found " + editors.size() + ": " + editors + ") for field: " + field.getName());
}
return editors.isEmpty() ? null : editors.get(0);
}
COM: <s> p retrieves custom editor annotations if any for the given </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.