__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/32978636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showMsg(String msg, Color fgColor, Color bgColor)
{ /* showMsg */
msgColor= (fgColor==null) ? Color.black : fgColor;
msgBkgrd= (bgColor==null) ? Color.white : bgColor;
msgTF.setForeground(msgColor);
msgTF.setBackground(msgBkgrd);
msgTF.setText(msg);
} /* showMsg */
COM: <s> show msg draw msg text in text field 1 </s>
|
funcom_train/32734607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildFromTableName(StringBuffer sqlBuffer) {
sqlBuffer.append(this.getTableName());
if (!this.getTableName().equals(this.getTableAlias())) {
sqlBuffer.append(" ");
sqlBuffer.append(this.getTableAlias());
}
}
COM: <s> if there is a table alias this would concatenate the table name and </s>
|
funcom_train/18857881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireSicaChangedEvent() {
// If no list of listener exist, just return
if (listenerList == null)
return;
// Loop on all listener to notify them of the change that occured on sica
for (int i = 0; i < listenerList.size(); i++) {
listenerList.get(i).sicaChanged();
}
}
COM: <s> notify all the registered listener of the sica that it has changed </s>
|
funcom_train/16953757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCommand(Command<E> command, Agent commandingAgent) {
if (command == null || commandingAgent == null) {
throw new IllegalArgumentException();
}
if (!canCommandPhysicalEntity(commandingAgent)) {
throw new IllegalStateException();
}
commands.add(command);
EventBroker.getEventBroker().notifyAll(new CommandIssuedEvent(commandingAgent, this, command));
}
COM: <s> the given agent issues the given command to this vehicle </s>
|
funcom_train/23971856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(Properties props) {
connectionProps = (props == null) ? new Properties()
: (Properties) props.clone();
if (user != null) {
props.setProperty("user", user);
}
if (password != null) {
props.setProperty("password", password);
}
if (loginTimeout != 0) {
props.setProperty("loginTimeout", Integer.toString(loginTimeout));
}
}
COM: <s> sets connection properties </s>
|
funcom_train/17992753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addItemElement(int beforeIndex, Element tdElem) {
if (vertical) {
Element tr = DOM.createTR();
DOM.insertChild(body, tr, beforeIndex);
DOM.appendChild(tr, tdElem);
} else {
Element tr = DOM.getChild(body, 0);
DOM.insertChild(tr, tdElem, beforeIndex);
}
}
COM: <s> physically add the td element of a </s>
|
funcom_train/43370453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws IOException {
log.entering(this.getClass().getName(), "start");
log.finer("starting socket adaptor on port: " + port);
// open the socket
server = new ServerSocket(port);
// start the thread
runThread = new Thread(this);
runThread.start();
log.exiting(this.getClass().getName(), "start");
}
COM: <s> start the adaptor </s>
|
funcom_train/19716852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getFOHypernymILIs(String word) throws Exception {
Hashtable hypers = new Hashtable();
Set concepts = getILIs(word);
if (concepts.isEmpty())
return hypers;
Iterator senses = concepts.iterator();
while(senses.hasNext()) {
String sense = (String) senses.next();
TreeSet hypernyms = getHypernyms(sense, false);
if (!hypernyms.isEmpty())
hypers.put(sense, hypernyms);
}
return hypers;
}
COM: <s> look for the hypernym ilis of a given word </s>
|
funcom_train/48406755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsStrictPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProfileApplication_isStrict_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProfileApplication_isStrict_feature", "_UI_ProfileApplication_type"),
SpemxtcompletePackage.eINSTANCE.getProfileApplication_IsStrict(),
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is strict feature </s>
|
funcom_train/26257082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeModel() {
Log.debug("MappingModel: writeModel");
MappingWriter cw = null;
if (getMappingFileFormat().equals("Castor")) {
cw = new CastorMappingWriter(this);
}
if (getMappingFileFormat().equals("OJB")) {
cw = new OJBMappingWriter(this);
}
try {
cw.writeModel(mappingFile);
} catch(IOException io) {
Log.error("MappingModel: writeModel IOException " + io);
}
Log.debug("MappingModel: writeModel done");
}
COM: <s> describe code write model code method here </s>
|
funcom_train/12164437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRewriteAssetURLChartAsset() throws Exception {
String strURL = "http://host.com/this=that";
MarinerURL url = new MarinerURL(strURL);
ChartAsset asset = new ChartAsset("Test");
String expected = strURL;
doRewriterTest(asset, null, url, expected);
}
COM: <s> test the rewriting with a chart asset </s>
|
funcom_train/7645621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int pos) {
if (pos >= 0) {
if (pos >= bits.length * ELM_SIZE) {
growBits(pos);
}
bits[pos / ELM_SIZE] |= 1L << (pos % ELM_SIZE);
} else {
throw new IndexOutOfBoundsException(Msg.getString("K0006")); //$NON-NLS-1$
}
}
COM: <s> sets the bit at index </s>
|
funcom_train/14653864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChunk(String chunk_name, String chunk_type) {
System.out.println("TESTING: " + chunk_name);
System.out.println("TESTING2: " + getChunkType(chunk_type).getName());
demand = new Chunk(chunk_name, getChunkType(chunk_type), 0);
new Link(demand, rule);
}
COM: <s> add chunk with chunk name and chunk type </s>
|
funcom_train/3024040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isGetter() {
String name = getName();
return ((name.length() > 3) && (name.startsWith("get") && Character.isUpperCase(name.charAt(3))) ||
((name.length() > 2) && name.startsWith("is") && Character.isUpperCase(name.charAt(2))));
}
COM: <s> determine if this is a getter method </s>
|
funcom_train/1911001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getParamBoolean(int index, boolean alternative)
{ try
{ if(params != null
&& index >= 0 && index < params.length
&& params[index].trim().length() != 0)
return Boolean.parseBoolean(params[index]);
else
return alternative;
} catch(NumberFormatException e)
{ return alternative;
}
}
COM: <s> helper get boolean params without exception </s>
|
funcom_train/39885075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLength(long newLength) throws IOException {
openCheck();
if (newLength < 0) {
throw new IllegalArgumentException();
}
fileSystem.truncate(fd.descriptor, newLength);
// if we are in "rws" mode, attempt to sync file+metadata
if (syncMetadata) {
fd.sync();
}
}
COM: <s> sets the length of this file to </s>
|
funcom_train/47161143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReleaseDate(Calendar releaseDate)
{
if ( releaseDate == null )
throw new IllegalArgumentException();
if ( ! this.releaseDate.equals(releaseDate) )
{ Calendar oldValue = this.releaseDate;
this.releaseDate = releaseDate;
this.firePropertyChange(PROPERTY_RELEASE_DATE, oldValue, this.releaseDate);
}
}
COM: <s> initialize the release date </s>
|
funcom_train/24523782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasCollison(int x, int y) {
SceneLayer layer = this.getPrimaryLayer();
if(x >= 0 && x < layer.getCollision().getWidth()) {
if(y >= 0 && y < layer.getCollision().getHeight()) {
return layer.getCollision().isTrue(x, y);
}
}
return true;
}
COM: <s> returns if theres collision at a given location </s>
|
funcom_train/39535777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init(String newValue){
//getting the tag name
newValue=newValue.trim();
String[] splitValues=newValue.split(TagEventsManager.separatorRegex);
if(splitValues!=null && splitValues.length==3){
//getting the tag name
String tagName=splitValues[1];
//getting the string value
String tagValue=splitValues[2];
tagChooserWidget.init(tagName);
valueTextField.setText(tagValue);
}else{
tagChooserWidget.init("");
valueTextField.setText("");
}
}
COM: <s> initializes the widgets with the new provided value </s>
|
funcom_train/30075745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView treeviewHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException {
Map model = new HashMap();
model.put("vos", gpir.getVos());
//model.put("resources", gpir.getResources());
return new ModelAndView("treeviewView", "model", model);
}
COM: <s> custom handler for treeview display </s>
|
funcom_train/7688655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeError() {
//this.href = "ERROR(" + this.text.trim() + ")";
this.href = null;
if (this.label == null) {
this.label = "";
}
this.label = "ERROR(" + this.label + "/" + text.trim() + ")";
}
COM: <s> turn this link reference into one with an error message </s>
|
funcom_train/16297093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItem(String resourcePath) {
if(!webBrowserObject.hasContent()) {
vlcPlayer.load();
clear();
}
File file = Utils.getLocalFile(resourcePath);
if(file != null) {
resourcePath = webBrowserObject.getLocalFileURL(file);
}
webBrowserObject.invokeObjectFunction("playlist.add", resourcePath);
}
COM: <s> add an item to the playlist </s>
|
funcom_train/22237170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void FastSpeedFactor(Object[] factor) {
if (! (factor.length == 1 && factor[0] instanceof Double))
throw new IllegalArgumentException
("\nFastSpeedFactor must be a number") ;
setFastSpeedFactor(((Double)factor[0]).doubleValue()) ;
}
COM: <s> property which sets the fast translation speed factor </s>
|
funcom_train/19977608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invokeSetCommand(String commandName, Object[] params) throws XmlRpcException {
Object result = execute(commandName, params);
Log.Debug(this,
"RPC call to '" + ((XmlRpcClientConfigImpl) getClientConfig()).getServerURL() + "#" + commandName
+ "' returned a: " + result.getClass().getSimpleName() + " [" + result + "]");
return result;
}
COM: <s> invoke a remote set command </s>
|
funcom_train/40014787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumber(int number) {
if ((number < 0) || (number > 9)) {
throw new IllegalArgumentException("number must be between 0 and 9");
}
int old = getNumber();
if (old != number) {
this.number = number;
firePropertyChange(NUMBER, old, number);
}
}
COM: <s> sets the number of bars </s>
|
funcom_train/31692728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeTransitions(State s, ScopeInfo.Action action) {
Iterator itr = s.iterateTransitions();
while(itr.hasNext())
// TODO: why there needs to be two methods "addTransitionWithCheck" and "addTransition"?
addTransitionWithCheck( (Transition)itr.next(), action );
}
COM: <s> for all the transitions leaving from the specified state </s>
|
funcom_train/19457462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateAndDeleteUniDos() throws IOException {
ByteArrayImageLayout imageLayout = new ByteArrayImageLayout(Disk.APPLE_800KB_DISK);
ImageOrder imageOrder = new DosOrder(imageLayout);
FormattedDisk[] disks = UniDosFormatDisk.create(
"createanddelete-test-unidos.dsk", imageOrder); //$NON-NLS-1$
createAndDeleteFiles(disks, "B"); //$NON-NLS-1$
saveDisks(disks);
}
COM: <s> test creating and deleting many files on a uni dos 800 k disk </s>
|
funcom_train/591673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFieldCustomized( int fieldRow ) {
boolean found = false;
for ( Iterator iter2 = subModules.values().iterator(); iter2.hasNext(); ) {
ModuleDraw draw = (ModuleDraw)iter2.next();
found = SearchLib.isFieldCustomized( draw.getModuleName(), table
.getName() + NoI18n._DOT_ + fields.get( fieldRow ).toString() );
if ( found ) {
break;
}
}
return found;
}
COM: <s> check if filed at row field row is customized </s>
|
funcom_train/21844898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addElement(final Value d) {
if (fReadonly)
return 0;
if( this.type != Value.ARRAY )
return 0;
updated = true;
if( d.type == Value.OBJECT || d.type == Value.UNDEFINED )
return 0;
if( d.type == Value.ARRAY ) {
for( int j = 1; j <= d.size(); j++ ) {
if( addElement(d.getElement(j)) == 0 )
return 0;
}
}
else {
getArray().add(d);
}
return getArray().size();
}
COM: <s> add value to the end of the array </s>
|
funcom_train/10598054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String key) {
if (key == null) {
return null;
}
Object value = this.values.get(key);
if (value != null) {
return value.toString();
}
if (this.parent != null) {
return this.parent.getString(key);
}
return null;
}
COM: <s> get a string representation of the value object by key </s>
|
funcom_train/7656030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof X509CRL)) {
return false;
}
X509CRL obj = (X509CRL) other;
try {
return Arrays.equals(getEncoded(), obj.getEncoded());
} catch (CRLException e) {
return false;
}
}
COM: <s> returns whether the specified object equals to this instance </s>
|
funcom_train/45257225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CTabFolder createContainer(Composite parent) {
// use SWT.FLAT style so that an extra 1 pixel border is not reserved
// inside the folder
parent.setLayout(new FillLayout());
final CTabFolder newContainer = new CTabFolder(parent, SWT.BOTTOM
| SWT.FLAT);
newContainer.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
int newPageIndex = newContainer.indexOf((CTabItem) e.item);
pageChange(newPageIndex);
}
});
return newContainer;
}
COM: <s> creates an empty container </s>
|
funcom_train/13532551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Package openPackagesFromStreams (List pkgContents,boolean isFileStream) throws Exception {
Package pkg=null;
for (int i=0; i<pkgContents.size(); i++) {
byte[] pkgCont=(byte[])pkgContents.get(i);
Package p=openPackageFromStream(pkgCont,isFileStream);
if (i==0) {
pkg=p;
}
}
return pkg;
}
COM: <s> opens all the packages represented by their streams and returns first of them </s>
|
funcom_train/21612145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParseTree parse(String rootProductionName, String in) throws MUParserException {
try {
return parser.parse(rootProductionName, in);
} catch (ParserException pe) {
throw new MUParserException("Error while parsing string: '" + in + "'", pe);
}
}
COM: <s> parses a given string on the specified production of i mugrammar i </s>
|
funcom_train/25372574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() throws IOException {
m_structure = null;
m_JSON = null;
setRetrieval(NONE);
if (m_File != null) {
setFile(new File(m_File));
}
else if ((m_URL != null) && !m_URL.equals("http://")) {
setURL(m_URL);
}
}
COM: <s> resets the loader ready to read a new data set </s>
|
funcom_train/4692532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getB_recargar() {
if (b_recargar == null) {
b_recargar = new JButton();
b_recargar.setIcon(new ImageIcon(getClass().getResource("/imagenes/iconic/reload24.png")));
b_recargar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
actualizarCalendario();
}
});
}
return b_recargar;
}
COM: <s> this method initializes b recargar </s>
|
funcom_train/21982736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JBarcode createUPCE(){
JBarcode jbc = new JBarcode(UPCEEncoder.getInstance(), WidthCodedPainter.getInstance(), UPCETextPainter.getInstance());
jbc.setBarHeight(17);
try {
jbc.setXDimension(0.264583333);
} catch (InvalidAtributeException e) {}
jbc.setShowText(true);
jbc.setCheckDigit(true);
jbc.setShowCheckDigit(true);
return jbc;
}
COM: <s> creates a new jbarcode instance to upce barcode type </s>
|
funcom_train/15417208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClusterManager createClusterManager() {
// register with the cluster manager
// TransactionEvent commands are sent around the cluster
ClusterContextManager cm = new ClusterContextManager();
ClusterCommandSecurity sec = new ClusterCommandSecurity();
CommandProcessor p = new CommandProcessor();
p.setUseSessionId(false);
p.setContextManager(cm);
p.setCommandSecurity(sec);
ClusterManager clusterManager = new ClusterManager();
clusterManager.register(PROCESS_KEY, p);
return clusterManager;
}
COM: <s> register the cluster command processor with the cluster manager </s>
|
funcom_train/4921925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unbindFromSocket() {
// Flag to complete processing
this.isComplete = true;
// Wait until unbound server socket (or timed out waiting)
try {
long startTime = System.currentTimeMillis();
while ((!this.isUnbound)
&& ((System.currentTimeMillis() - startTime) < 20000)) {
// Process accepting connections
if (this.selector != null) {
this.selector.wakeup();
}
// Wait some time for accepting connections
Thread.sleep(100);
}
} catch (InterruptedException ex) {
// Assume to be unbound and carry on
}
}
COM: <s> unbinds from the </s>
|
funcom_train/26595038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExecutionPlanForBrowser getExecutionPlanForBrowser() throws DException {
ExecutionPlanForBrowser cplans[] = new ExecutionPlanForBrowser[2];
cplans[0] = leftIterator.getExecutionPlanForBrowser();
cplans[1] = rightIterator.getExecutionPlanForBrowser();
return new ExecutionPlanForBrowser("Union All","Union All Iterator",cplans,null,null,null);
}
COM: <s> this method is responsible to display the iterators hierarchy of a select query </s>
|
funcom_train/5693661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
System.out.println("Accepting connections on port " + port);
while(engine.isAlive()) {
try {
// accept and do as little processing as possible
Socket client = clientConnection.accept();
ClientHandler handler = new ClientHandler(mimeType, ruleFile);
if(handler.welcomeClient(client)) {
client.setTcpNoDelay(true);
addOutputStream(client.getOutputStream());
numberOfConnections++;
}
else {
client.close();
}
}
catch(IOException e) {
// accept next client
}
}
}
COM: <s> parallel execution starts here </s>
|
funcom_train/51362976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CompilerExpression getExpr(Node n) {
Object o = getOut(n);
if (o == null) {
return null;
}
else if (!(o instanceof CompilerExpression)) {
result.error(null, "msg.error.internal.getExpr", null);
return new CompilerExpression(GelloNull.class, true, "null");
}
return (CompilerExpression) o;
}
COM: <s> get the expression for a node </s>
|
funcom_train/6504494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GitComponentReader getComponentReader(String targetTag) throws FileNotFoundException {
if (_components.containsKey(targetTag)) {
return new GitComponentReader((GitComponent) _components.get(targetTag));
} else {
throw new FileNotFoundException("Component "+targetTag+" does not exist.");
}
}
COM: <s> opens a component for read access </s>
|
funcom_train/8371923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCertificateAndKey(String alias, Key key, X509Certificate serverCert) throws KeyStoreException{
// Look up for the issuer cert
X509Certificate caCert = getCertificateForDN(serverCert.getIssuerX500Principal());
System.out.println("---------------------");
System.out.println(caCert.toString());
System.out.println("---------------------");
X509Certificate[] chain = new X509Certificate[2];
chain[0] = serverCert;
chain[1] = caCert;
addCertificateAndKey(alias, key, chain);
}
COM: <s> adds a certificate with its correspondig private key to the store </s>
|
funcom_train/8083022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int clusterProcessedInstance(Instance instance, Instances centers) {
double minDist = Integer.MAX_VALUE;
int bestCluster = 0;
for (int i = 0; i < centers.numInstances(); i++) {
double dist = m_DistanceF.distance(instance, centers.instance(i));
if (dist < minDist) {
minDist = dist;
bestCluster = i;
}
}
;
return bestCluster;
}
COM: <s> clusters an instance </s>
|
funcom_train/31955568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int skipWhite(int length) {
int i;
for (i = 0; i < length; i += 1) {
if (input[offset + i] != ' ' && input[offset + i] != '\t'
&& input[offset + i] != '\n' && input[offset + i] != '\r') {
break;
}
}
offset += i;
return i;
}
COM: <s> skip white space </s>
|
funcom_train/1601165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processCoolActions( Action pAction )
{
// Google search on subject
// Search DB for earlier subjects
List<Clue> clues = pAction.getClues(); //Safe getter
Iterator<Clue> it = clues.iterator();
while( it.hasNext() )
{
Clue aClue = (Clue) it.next();
List<Clue> googleResults = executeGoogleSearch( aClue );
List<Clue> databaseResults = executeDataBaseSearch( aClue );
}
}
COM: <s> subject anything that reaches this method will </s>
|
funcom_train/40794259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer() {
if (spacer == null) {//GEN-END:|217-getter|0|217-preInit
// write pre-init user code here
spacer = new Spacer(16, 20);//GEN-LINE:|217-getter|1|217-postInit
// write post-init user code here
}//GEN-BEGIN:|217-getter|2|
return spacer;
}
COM: <s> returns an initiliazed instance of spacer component </s>
|
funcom_train/11024200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSimpleIntPropertyAndDoubleValue() {
try {
new BeanPropertyValueChangeClosure("intProperty", expectedDoubleValue).execute(new TestBean());
fail("Should have thrown an IllegalArgumentException");
} catch (IllegalArgumentException e) {
/* this is what we expect */
}
}
COM: <s> test execute with simple int property and double value </s>
|
funcom_train/131342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queryWifiMac () {
try {
sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_WIFI_MAC, 0);
os.flush ();
} catch (IOException e) {
throw new PlayerException
("[Wifi] : Couldn't request PLAYER_WIFI_MAC: " +
e.toString (), e);
}
}
COM: <s> configuration request player wifi mac </s>
|
funcom_train/4135819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSeriesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProceedingsBibTexEntry_series_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProceedingsBibTexEntry_series_feature", "_UI_ProceedingsBibTexEntry_type"),
BibtexPackage.Literals.PROCEEDINGS_BIB_TEX_ENTRY__SERIES,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the series feature </s>
|
funcom_train/3172503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String send(int port, String msg) throws IOException {
Socket remote = new Socket((String)null, port);
try {
remote.setSoTimeout(timeout);
IPCHelper.write(remote.getOutputStream(), msg);
return IPCHelper.read(remote.getInputStream(), terminators, 16);
} finally {
remote.close();
}
}
COM: <s> send a string message </s>
|
funcom_train/35838339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UIViewPane createViewPane(View view) {
oView = view;
oViewPane = new UIViewPane(view, this);
oViewPane.setBackground(Color.white);
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
//reduced size by factor of 10 since size is too big - bz
panel.setPreferredSize(new Dimension(60000,60000));
panel.add(oViewPane, BorderLayout.CENTER);
scrollpane.setViewportView(panel);
oContentPane.validate();
oContentPane.repaint();
return oViewPane;
}
COM: <s> create the uiview pane instance with the given view </s>
|
funcom_train/35026706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCameraController(CameraController cameraController) {
// TODO: Check for not null/empty ids
if (Jgf.getApp().isDebug()) {
if (StringUtils.isBlank(cameraController.getId())) {
throw new ConfigException("Cannot add a CameraController with a null id to a CameraControllerSet");
}
}
cameraControllers.put(cameraController.getId(), cameraController);
}
COM: <s> adds a camera to this camera manager </s>
|
funcom_train/25326554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeMainView(MainViews newPanel) {
CardLayout cardLayout = (CardLayout) (cardLayoutPanel.getLayout());
if (newPanel == MainViews.STATISTICS_VIEW) {
statisticsViewPanel.updateStatisticsView();
switchToStatisticsViewAction.setEnabled(false);
switchToTraceSelectionAction.setEnabled(true);
} else {
switchToStatisticsViewAction.setEnabled(true);
switchToTraceSelectionAction.setEnabled(false);
}
cardLayout.show(cardLayoutPanel, newPanel.getName());
}
COM: <s> this function is used to switch between the main panels of the window </s>
|
funcom_train/34342856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getMonto3() {
if (Monto3 == null) {//GEN-END:|47-getter|0|47-preInit
// write pre-init user code here
Monto3 = new TextField("Monto", null, 8, TextField.ANY);//GEN-LINE:|47-getter|1|47-postInit
// write post-init user code here
}//GEN-BEGIN:|47-getter|2|
return Monto3;
}
COM: <s> returns an initiliazed instance of monto3 component </s>
|
funcom_train/46701506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveCSV(OutputStream out, Charset cs, List<UJO> ujoList, Object context) throws IOException, InstantiationException, IllegalAccessException {
final Writer writer = new OutputStreamWriter(out, cs!=null ? cs : UTF_8);
try {
saveCSV(writer, ujoList, context);
} finally {
writer.close();
}
}
COM: <s> save ujo into csv format </s>
|
funcom_train/1491211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doPerform(ComponentContext componentContext, HttpServletRequest request, HttpServletResponse response) throws Exception {
//widget is null in the case of entire page
String widget = (String) componentContext.getAttribute("widget");
if(logger.isDebugEnabled())
logger.debug("widget name:"+widget);
if(StringUtils.isNotEmpty(widget)){
doPerform(widget, request, response);
}
}
COM: <s> this delegates to the correct widget method </s>
|
funcom_train/44448839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(Sensor sensor, int oldValue, int newValue) {
synchronized (this) {
position += Math.abs(newValue - oldValue);
LCD.showNumber(targetPosition);
if ((position >= targetPosition && targetPosition != 127)
|| (targetPosition == 127 && stopper.isPressed(input))) {
motor.stop();
finished = true;
diff = direction * (position - targetPosition);
if (targetPosition == 127)
diff = 0;
}
}
}
COM: <s> implementation of the sensor listener method </s>
|
funcom_train/37564835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(Page that) {
this.url.set(that.url);
this.md5.set(that.md5);
this.nextFetch = that.nextFetch;
this.retries = that.retries;
this.fetchInterval = that.fetchInterval;
this.numOutlinks = that.numOutlinks;
this.score = that.score;
this.nextScore = that.nextScore;
}
COM: <s> copy the contents of another instance into this instance </s>
|
funcom_train/43658018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void completeEntityStatistics(Map entities, String entityName) {
Long quantity = (Long) entities.get(entityName);
if (quantity == null) {
entities.put(entityName, new Long(1));
} else {
entities.put(entityName, new Long(quantity.longValue() + 1));
}
}
COM: <s> increment the statistics on an entity </s>
|
funcom_train/4125583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Locatable locatable) {
if (locatable instanceof Unit) {
return units.contains(locatable);
} else if (locatable instanceof TileItem) {
return tileItemContainer != null && tileItemContainer.contains((TileItem) locatable);
}
logger.warning("Tile.contains(" + locatable + ") Not implemented yet!");
return false;
}
COM: <s> checks if this code tile code contains the specified </s>
|
funcom_train/20443902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand3() {
if (exitCommand3 == null) {//GEN-END:|114-getter|0|114-preInit
// write pre-init user code here
exitCommand3 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|114-getter|1|114-postInit
// write post-init user code here
}//GEN-BEGIN:|114-getter|2|
return exitCommand3;
}
COM: <s> returns an initiliazed instance of exit command3 component </s>
|
funcom_train/34339598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCant1() {
if (cant1 == null) {//GEN-END:|32-getter|0|32-preInit
// write pre-init user code here
cant1 = new TextField("Cant1", null, 5, TextField.NUMERIC);//GEN-LINE:|32-getter|1|32-postInit
// write post-init user code here
}//GEN-BEGIN:|32-getter|2|
return cant1;
}
COM: <s> returns an initiliazed instance of cant1 component </s>
|
funcom_train/2884975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validate() throws SmartFrogInitException {
if (threadPriority < Thread.MIN_PRIORITY ||
threadPriority > Thread.MAX_PRIORITY) {
throw new SmartFrogInitException(ATTR_THREAD_PRIORITY +
" is out of range -must be within "
+ Thread.MIN_PRIORITY + " and " + Thread.MAX_PRIORITY);
}
}
COM: <s> validate our settings bail out if they are invalid </s>
|
funcom_train/16895731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void selectCategoriesForInput (Variable variable) {
if (variable != null) {
fVariable = variable;
}
for (IAssignCategory category : fFromSection.fAllowed) {
if (category.isCategoryForModel( fVariable.getFrom() )) {
updateCategorySelection(fFromSection,category,false);
return;
}
}
/** In case we can't find the appropriate one, just display the first one */
if ( fFromSection.fCurrent == null) {
updateCategorySelection(fFromSection,0,false);
}
}
COM: <s> called when the copy rule changes or is created </s>
|
funcom_train/28268959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String add(GraphElement el, String name, MessageHandler mesHandler) {
if (map.containsKey(name)) {
DefinitionListEntry le = map.get(name);
int i = 1;
for ( ; le.getNext() != null; i++) {
le = le.getNext();
}
name = name.concat("_"+i);
le.setNext(new DefinitionListEntry(el));
mesHandler.addMessage(MessageHandler.REDEFINED_NAME, "", el);
} else map.put(name, new DefinitionListEntry(el));
return name;
}
COM: <s> add a graph element to the list of already defined elements </s>
|
funcom_train/33606717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToRTheta() {
System.out.println("toRTheta");
R2 instance = new R2();
R2 expResult = null;
R2 result = instance.toRTheta();
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 to rtheta method of class r2 </s>
|
funcom_train/28339299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private User getSessionUser() {
// Don't create a session if there isn't one
HttpSession session = ((HttpServletRequest) getRequest())
.getSession(false);
User user = null;
if (session != null) {
user = (User) session.getAttribute(AuthFilter.USER_KEY);
}
return user;
}
COM: <s> helper to look up the user in the session </s>
|
funcom_train/31487489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void sort(Vector v, Comparer c){
Object ov[] = new Object[v.size()];
v.copyInto(ov);
quickSort(ov, 0, ov.length-1, c);
v.removeAllElements();
for(int i = 0; i < ov.length;i++) {
v.addElement(ov[i]);
}
}
COM: <s> sort v according to c </s>
|
funcom_train/9115093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer xbuffer = new StringBuffer(128);
for (int xindex = 0; xindex < properties_.size(); xindex++) {
vCardProperty xcp = (vCardProperty) properties_.get(xindex);
xbuffer.append(xcp.toItem());
}
return xbuffer.toString();
}
COM: <s> return the v card as a readable string </s>
|
funcom_train/2854123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void join (Class clazz) throws CoreXmlException {
if (maxOccur > 1)
throw new CoreXmlException (
"maxOccur is " + maxOccur
+ " but must be 1 for Collector");
setClazz(clazz);
// XXX WON'T WORK UNLESS DEFAULT NAMES ASSIGNED
// findMethods(clazz);
ordering.join (clazz);
}
COM: <s> join this connector and its immediate descendents to its parent </s>
|
funcom_train/9343222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDaysInMonth(final int year) {
int result = 0;
// check leap year
if ((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0)) {
if (this.equals(Month.FEBUARY)) {
result = this.daysInMonth + 1;
} else {
result = this.daysInMonth;
}
} else {
result = this.daysInMonth;
}
return result;
}
COM: <s> example of how the enums can encapsulate operations that they should </s>
|
funcom_train/39873347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clear() {
mEventType = 0;
mBooleanProperties = 0;
mCurrentItemIndex = INVALID_POSITION;
mItemCount = 0;
mFromIndex = 0;
mAddedCount = 0;
mRemovedCount = 0;
mEventTime = 0;
mClassName = null;
mPackageName = null;
mContentDescription = null;
mBeforeText = null;
mParcelableData = null;
mText.clear();
}
COM: <s> clears the state of this instance </s>
|
funcom_train/3990016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addData_wystawieniaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SkierowaniePoradniaSpec_data_wystawienia_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SkierowaniePoradniaSpec_data_wystawienia_feature", "_UI_SkierowaniePoradniaSpec_type"),
PrzychodniaPackage.Literals.SKIEROWANIE_PORADNIA_SPEC__DATA_WYSTAWIENIA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the data wystawienia feature </s>
|
funcom_train/7283057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class loadClassExt(String name) throws ClassNotFoundException {
// make recursive
addAvailable();
// find it
try {
return findClass(name);
}
catch(ClassNotFoundException ex) {
}
// add resources until found
while (true) {
JNLPClassLoader addedTo = addNextResource();
if (addedTo == null)
throw new ClassNotFoundException(name);
try {
return addedTo.findClass(name);
}
catch(ClassNotFoundException ex) {
}
}
}
COM: <s> search for the class by incrementally adding resources to the </s>
|
funcom_train/3290800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MMObjectNode getNewNode(String owner) {
VirtualNode node=new VirtualNode(this);
node.setValue("number",-1);
node.setValue("owner",owner);
node.setValue("otype",oType);
setDefaults(node);
return node;
}
COM: <s> get a new node using this builder as its parent </s>
|
funcom_train/47021201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAbout() {
if (cmdAbout == null) {//GEN-END:|120-getter|0|120-preInit
// write pre-init user code here
cmdAbout = new Command(getLocalizedString("About"), Command.HELP, 15);//GEN-LINE:|120-getter|1|120-postInit
// write post-init user code here
}//GEN-BEGIN:|120-getter|2|
return cmdAbout;
}
COM: <s> returns an initiliazed instance of cmd about component </s>
|
funcom_train/3787288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setCWroi(int rX1, int rY1, int rX2, int rY2)
{ /* setCWroi */
return(setCWroi(rX1, rY1, rX2, rY2, accRowData));
} /* setCWroi */
COM: <s> set cwroi set region of interest roi to computing window cw </s>
|
funcom_train/17818218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Polygon createPoly(Point2D.Double p) {
Polygon pol = new Polygon(p, RectangleOptions.getStroke());
pol.setFillColor(ColorSelectedPanel.getBackColor());
pol.setFillOpacity(ColorSelectedPanel.getBackOpacity());
pol.setOutlineColor(ColorSelectedPanel.getForeColor());
pol.setOutlineOpacity(ColorSelectedPanel.getForeOpacity());
return pol;
}
COM: <s> creates a new polygon and sets its colours and stroke </s>
|
funcom_train/4018652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer() {
if (spacer == null) {//GEN-END:|27-getter|0|27-preInit
// Insert pre-init code here
spacer = new Spacer(1000, 1);//GEN-LINE:|27-getter|1|27-postInit
// Insert post-init code here
}//GEN-BEGIN:|27-getter|2|
return spacer;
}
COM: <s> returns an initiliazed instance of spacer component </s>
|
funcom_train/43267231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getTabbedPane() {
if (tabbedPane == null) {
tabbedPane = new JTabbedPane();
tabbedPane.addTab("Basic", getSearchPanel());
tabbedPane.addTab("Advanced", getRefineSearchPanel());
}
return tabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/38519115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals( Object cobj ) {
if (cobj == this) return (true);
if ((cobj instanceof DBObject)) {
if( dn == ((DBObject)cobj).dn ) return ( true );
if( (dn == null) || ((DBObject)cobj).dn == null ) return( false );
return dn.equals( ((DBObject)cobj).dn );
}
return false;
}
COM: <s> compares to another object </s>
|
funcom_train/23453345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTextDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Profile_textDescription_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Profile_textDescription_feature", "_UI_Profile_type"),
ProfilePackage.Literals.PROFILE__TEXT_DESCRIPTION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the text description feature </s>
|
funcom_train/9494130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkRectangular(long[][] in) {
for (int i = 1; i < in.length; i++) {
if (in[i].length != in[0].length) {
throw MathRuntimeException.createIllegalArgumentException(
"some rows have length {0} while others have length {1}",
in[i].length, in[0].length);
}
}
}
COM: <s> throws illegal argument exception if the input array is not rectangular </s>
|
funcom_train/47116241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getSWTDir() throws LoadingException {
try {
if (this.SWTDir == null) {
// Create a temp dir if needed
File result = File.createTempFile("swtLibs", "");
if (!result.delete())
throw new IOException();
if (!result.mkdir())
throw new IOException();
this.SWTDir = result.getAbsoluteFile();
}
return this.SWTDir;
} catch (IOException e) {
throw new LoadingException(e);
}
}
COM: <s> creates a temporary directory for swt unpacking </s>
|
funcom_train/51640044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean allowAddingImports() {
if (isInJavadoc()) {
// TODO fix
// if (!fContext.isInJavadocFormalReference())
// return false;
if (fProposal.getKind() == CompletionProposal.TYPE_REF && fInvocationContext.getCoreContext().isInJavadocText())
return false;
if (!isJavadocProcessingEnabled())
return false;
}
IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();
return preferenceStore.getBoolean(PreferenceConstants.CODEASSIST_ADDIMPORT);
}
COM: <s> returns code true code if imports may be added </s>
|
funcom_train/27842677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int compare(int inRow1, int inRow2) {
compares++;
for (int level = 0; level < sortingColumns.length; level++) {
int result = compareRowsByColumn(inRow1, inRow2, sortingColumns[level]);
if (result != 0) {
return ascending ? result : -result;
}
}
return 0;
}
COM: <s> compares two rows by the columns set by the sort by columns method </s>
|
funcom_train/1169844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getJLabel9() {
if (jLabelFiveMana == null) {
jLabelFiveMana = new JLabel();
jLabelFiveMana.setText("Five mana:");
jLabelFiveMana.setLayout(null);
jLabelFiveMana.setBounds(10, 156, 127, 13);
}
return jLabelFiveMana;
}
COM: <s> p get jlabel9 </s>
|
funcom_train/10516112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExtraField(ZipExtraField ze) {
if (ze instanceof UnparseableExtraFieldData) {
unparseableExtra = (UnparseableExtraFieldData) ze;
} else {
if (extraFields == null) {
extraFields = new LinkedHashMap();
}
extraFields.put(ze.getHeaderId(), ze);
}
setExtra();
}
COM: <s> adds an extra field replacing an already present extra field </s>
|
funcom_train/19393322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSpinListener(SpinListener listener) {
final SpinListener l = listener;
scroller.addAdjustmentListener(new AdjustmentListener(){
public void adjustmentValueChanged(AdjustmentEvent ae){
switch (ae.getValue()) {
case 0:
l.spinnerSpunUp(new SpinEvent(scroller,
ac, component));
break;
case 2:
l.spinnerSpunDown(new SpinEvent(scroller,
ac, component));
break;
}
ae.getAdjustable().setValue(1);
}
});
}
COM: <s> adds a spin listener to this spin control </s>
|
funcom_train/7658727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(int radix) {
validate1("toString(int radix)", this);
if (radix == 10) {
return bigInt.decString();
// } else if (radix == 16) {
// return bigInt.hexString();
} else {
establishOldRepresentation("toString(int radix)");
return Conversion.bigInteger2String(this, radix);
}
}
COM: <s> returns a string containing a string representation of this </s>
|
funcom_train/14401639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClientProviderInfo getClientProvider(IConfigurationElement config) {
assert config != null;
WbemClientProvider provider;
try {
provider = (WbemClientProvider) config.createExecutableExtension("class");
} catch (CoreException e) {
System.err.println("Could not load client provider: " + e.getMessage());
e.printStackTrace();
return null;
}
String name = config.getAttribute("label");
return new ClientProviderInfo(name, provider);
}
COM: <s> creates a client provider object from a extension point configuration </s>
|
funcom_train/21971058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendToAll( String message ) {
Log.debug( "Consumidor::sendToAll()" );
synchronized ( this ) { //semaphore
for ( PlayerSession session : this.playerList.values() ) {
Log.debug( "Player being notified: " + session.getActiveCharacter().getNome() );
session.writeToConsole( message );
}
}
}
COM: <s> notify all players </s>
|
funcom_train/17681744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getResourceFile(String resourceFile)throws FileNotFoundException{
String partFile = fileSeparator+resourceFile;
Iterator iter = list.iterator();
while (iter.hasNext()){
String testPath = (String)iter.next();
File testFile = new File(testPath+partFile);
if (testFile.exists()){
return testFile;
}
}
throw new FileNotFoundException("The following resource was not found on class path : "+
resourceFile+"\nCommon error is that your class path was not set properly");
}
COM: <s> returns a file object representing the location of a resource file on the </s>
|
funcom_train/39820580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeConnection() {
if ( log.isDebugEnabled() ) {
log.debug(
"closing JDBC connection [" +
batcher.openResourceStatsAsString() + "]"
);
}
try {
if ( !connection.isClosed() ) {
JDBCExceptionReporter.logAndClearWarnings( connection );
}
factory.getConnectionProvider().closeConnection( connection );
connection = null;
}
catch (SQLException sqle) {
throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "Cannot close connection" );
}
}
COM: <s> physically closes the jdbc connection </s>
|
funcom_train/18191459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Position getNextWayPoint() {
double randx = random.nextDouble() * Configuration.dimX;
double randy = random.nextDouble() * Configuration.dimY;
double randz = 0;
if(Main.getRuntime().getTransformator().getNumberOfDimensions() == 3) {
randz = random.nextDouble() * Configuration.dimZ;
}
return new Position(randx, randy, randz);
}
COM: <s> determines the next waypoint where this node moves after having waited </s>
|
funcom_train/33398563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FilterGraphNode propagateDuplicate(FilterGraphNode result) {
for (int i = 0; i < getNumDestLinks(); ++i) {
FilterGraphLink link = getDestLink(i);
if (link != null) {
result.addDestLink(new FilterGraphLink(link.getDestNode()
.duplicate(), link.getDestTrack()));
}
}
return result;
}
COM: <s> intended to be called by subclass implementations of duplicate to </s>
|
funcom_train/26216314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadIWFFileHeader(JDWinDataInputStream winDataInputStream) {
try {
identifier = winDataInputStream.readString(4);
version = winDataInputStream.readWinFloat();
dummy = winDataInputStream.readWinInt();
}
catch (Exception e) {
LOG.severe(e.getMessage());
//e.printStackTrace();
}
} // END loadMD2ModelHeader
COM: <s> load a iwf file from the given data stream </s>
|
funcom_train/15954412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAppendFloat() throws BMLException{
String lsValue = "Good";
DataString ldString = new DataString(fBlank);
ldString.setString(lsValue);
float lFloat = 1.7f;
ldString.append(lFloat);
assertEquals("Good1.7",ldString.toString());
}
COM: <s> test of append method using float </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.