__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/7668064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharBuffer append(CharSequence csq, int start, int end){
if (csq == null) {
csq = "null"; //$NON-NLS-1$
}
CharSequence cs = csq.subSequence(start, end);
if (cs.length() > 0) {
return put(cs.toString());
}
return this;
}
COM: <s> writes chars of the given </s>
|
funcom_train/17914801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDeviceName(String name) {
if (name == null) {
throw new IllegalArgumentException("Illegal device name setting: null");
}
name = name.trim();
if (name.equals("")) {
throw new IllegalArgumentException("Illegal device name: empty");
}
deviceName = name.toLowerCase();
}
COM: <s> set the device this identifier set represents </s>
|
funcom_train/39166228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showCategoryTimes() {
log.debug("Time spent by categories:");
Enumeration categNames = m_categorySums.keys();
String categ;
while (categNames.hasMoreElements()) {
categ = (String)categNames.nextElement();
showCategoryTime(categ);
} // while
} // showCategoryTimes
COM: <s> prints the time for all the categories of activities </s>
|
funcom_train/26365147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Color getColor(String RGB) {
int red;
int green;
int blue;
try{
red = (Integer.decode("0x" + RGB.substring(0,2))).intValue();
green = (Integer.decode("0x" + RGB.substring(2,4))).intValue();
blue = (Integer.decode("0x" + RGB.substring(4,6))).intValue();
return new Color(red,green,blue);
}
catch (Exception e){
//Default to black on none RGB values
return Color.black;
}
}
COM: <s> converts a string formatted as rrggbb to an awt </s>
|
funcom_train/2656392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupXmlBeans() {
String channel = "snashot";
String release = "Snapshot-20070922_1258";
releaseBean = new ReleaseXmlBean("snapshot", release);
releaseBean.addmodule(getCoreModule(release));
channelBean = new ChannelXmlBean();
channelBean.setName(channel);
channelBean.setCurrentRelease(releaseBean);
}
COM: <s> this will produce the objects that create a release xml document </s>
|
funcom_train/28750948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpeciesid(Long newVal) {
if ((newVal != null && this.speciesid != null && (newVal.compareTo(this.speciesid) == 0)) ||
(newVal == null && this.speciesid == null && speciesid_is_initialized)) {
return;
}
this.speciesid = newVal;
speciesid_is_modified = true;
speciesid_is_initialized = true;
}
COM: <s> setter method for speciesid </s>
|
funcom_train/41445643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProperty(Property property) {
if (property == null) throw new NullPointerException("property is null");
if (properties.containsKey(property.getName())) throw new IllegalArgumentException("A property with the name " + property.getName() + " is already present");
properties.put(property.getName(), property);
}
COM: <s> add a property to this code config properties code object </s>
|
funcom_train/30075466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyPropertiesFrom(Contact contact){
super.copyPropertiesFrom(contact);
setFirstName(contact.getFirstName());
setLastName(contact.getLastName());
setEmail(contact.getEmail());
setPhone(contact.getPhone());
setAddress1(contact.getAddress1());
setAddress2(contact.getAddress2());
setCity(contact.getCity());
setState(contact.getState());
setCountry(contact.getCountry());
setZip(contact.getZip());
setUrl(contact.getUrl());
}
COM: <s> method to copy properties from another code contact code </s>
|
funcom_train/8461591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(byte b, Collection c) {
if ((c != null) && (c.size() > 0)) {
StringBuffer sb = new StringBuffer();
Iterator it = c.iterator();
while (it.hasNext()) {
String s = (String) it.next();
sb.append(s);
if (it.hasNext())
sb.append(lineSeparator);
}
set(b, sb.toString());
} else
remove(b);
}
COM: <s> set the whole content of field b br </s>
|
funcom_train/17640576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T getXmlFileObj() {
if (m_xmlFileObj == null) {
try {
loadXmlFileObject();
} catch (JAXBException ex) {
LOGGER.log(Level.SEVERE, null, ex);
} catch (XMLStreamException ex) {
LOGGER.log(Level.SEVERE, null, ex);
} catch (FileNotFoundException ex) {
LOGGER.log(Level.SEVERE, null, ex);
}
}
return m_xmlFileObj;
}
COM: <s> retrieves the t object </s>
|
funcom_train/29651702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRender() throws Exception {
RqpPort port = new RqpStub();
ItemRendering rendering = new ItemRendering();
try {
port.render(rendering);
fail("The exception org.apache.axis.NoEndPointException should have been thrown.");
} catch (org.apache.axis.NoEndPointException exception) {
if (!exception.getClass().getName().equals(
"org.apache.axis.NoEndPointException")) {
fail("The exception org.apache.axis.NoEndPointException should have been thrown.");
}
}
}
COM: <s> method test render </s>
|
funcom_train/11727837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkSupportedOption(String descriptorKey) throws RepositoryException, NotExecutableException {
String value = getHelper().getRepository().getDescriptor(descriptorKey);
if (value == null || ! Boolean.valueOf(value).booleanValue()) {
throw new NotExecutableException (
"Repository feature not supported: " + descriptorKey);
}
}
COM: <s> throws a code not executable exception code if the repository does </s>
|
funcom_train/47969710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void flushInBuffer(boolean endOfInput) throws IOException {
// Prepare to read from the input buffer
inBuffer.flip();
CoderResult result = decoder.decode(inBuffer, outBuffer, endOfInput);
while (result.isOverflow()) {
flushOutBuffer();
result = decoder.decode(inBuffer, outBuffer, endOfInput);
}
// Remove processed input from the input buffer, and position for writing
inBuffer.compact();
}
COM: <s> flush the input buffer byte buffer as much as possible </s>
|
funcom_train/44350618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextPosition(int plotSizex, int plotSizey, int panelWidth, int panelHeight) {
// Positions for next plot
posx += plotSizex;
if( (posx + plotSizex) > panelWidth ) { // Out of screen?
posx = 0;
posy += plotSizey;
}
if( (posy + plotSizey) > panelHeight ) { // Out of screen?
posx = 0;
posy = 0;
}
}
COM: <s> prepare coordinates for next plot </s>
|
funcom_train/47184550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long addPatient(PatientBean p) throws DBException, FormValidationException {
new AddPatientValidator().validate(p);
long newMID = patientDAO.addEmptyPatient();
p.setMID(newMID);
String pwd = authDAO.addUser(newMID, Role.PATIENT, RandomPassword.getRandomPassword());
p.setPassword(pwd);
patientDAO.editPatient(p, loggedInMID);
return newMID;
}
COM: <s> creates a new patient returns the new mid </s>
|
funcom_train/20629114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyPingListeners( Object ping ) {
Vector l;
// Copy listener vector so it won't
// change while firing
synchronized ( this ) {
l = ( Vector ) pingListeners.clone();
}
for ( int i = 0; i < l.size(); i++ ) {
PingServerListener psl = ( PingServerListener ) l.elementAt( i );
psl.notifyPing( ping );
}
}
COM: <s> notifies all the listeners with a ping message </s>
|
funcom_train/19321647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Throwable getCause() {
// NOTE:
// Override this method (if using j2sdk1.4) becuase the constructor that
// could pass an extra cause is never use, hence if this method is allow
// to inherit from jdk1.4's Exception then the cause get might be null.
// besides, the jmx1.2 api docs says this method should be in this class anyway.
return error;
}
COM: <s> returns the actual </s>
|
funcom_train/12647040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte buf[], int pos, int len) throws IOException {
int count = 0;
while (count < len) {
int n = super.read(buf, pos + count, len - count);
if (n < 0) {
return count;
}
count += n;
Thread.currentThread().yield();
}
return count;
}
COM: <s> a blocking read </s>
|
funcom_train/11729343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheckPermission() throws Exception {
testRootNode.addNode(nodeName2, testNodeType);
superuser.save();
Session readOnly = getHelper().getReadOnlySession();
try {
permissionCheckReadOnly(readOnly);
permissionCheckReadWrite(superuser);
} finally {
readOnly.logout();
}
}
COM: <s> tests if code session </s>
|
funcom_train/14011783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isOrientationVertical(SplitPane splitPane) {
Integer orientationValue = (Integer) splitPane.getRenderProperty(SplitPane.PROPERTY_ORIENTATION);
int orientation = orientationValue == null ? SplitPane.ORIENTATION_HORIZONTAL : orientationValue.intValue();
return orientation == SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM ||
orientation == SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP;
}
COM: <s> determines if the orientation of a code split pane code is horizontal </s>
|
funcom_train/20741432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getPathToDisplay() {
String result = "";
String path = FilenameUtils.getName(getPath());
result += StringUtils.isBlank(path) ? "" : path;
String revision = getRevision();
result += StringUtils.isBlank(revision) ? "" : " #" + revision;
return result.trim();
}
COM: <s> gets the current path adapted to display </s>
|
funcom_train/23307103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Group buildGroupFromAttributes( Attributes atts ) throws NamingException {
Group retGroup = null;
if ( atts != null ) {
retGroup = new Group();
//retGroup.setGivenGroupId( getSingleStringAttributeValue( atts, PosixGroup.GIDNUMBER ) );
retGroup.setGivenGroupName( getSingleStringAttributeValue( atts, Group.PREFIX_NAME ) );
}
return retGroup;
}
COM: <s> build a group based on the supplied attributes </s>
|
funcom_train/1989970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void bindList(final JList list, final Field field) {
list.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
Object item = list.getSelectedValue();
runAction(field, item);
}
}
});
}
COM: <s> binding for a jlist </s>
|
funcom_train/51809738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BusinessObjectList refresh() throws BusinessException, IntegrationException {
if(this.requestName==null)
throw new BusinessException(this.getClass().getName()+"::refresh: Operation name is not defined: impossible to refresh the list");
BusinessObjectList bol = BusinessObjectList.getBusinessObjectList(this.factory, this.getDataSourceName(), this.requestName, this.requestProperties);
this.events = bol.events;
return bol;
}
COM: <s> refreshes the list of </s>
|
funcom_train/38382688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeGraph(String filename, Graph g) {
OutputStream os = null;
try {
os = new FileOutputStream(filename);
} catch (FileNotFoundException e) {
fail(e.getMessage());
}
//OutputStreamWriter osr = new OutputStreamWriter(os);
SRFGenerator parser = new SRFGenerator();
try {
parser.generate(os, g);
} catch (Exception e) {
Assert.fail(e.getMessage());
}
}
COM: <s> writes a graph to a srf file </s>
|
funcom_train/21358164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int column) {
String result = null;
switch(column) {
case SPECTRUMID:
result = "Spectrum id";
break;
case PRECURSOR_MZ:
result = "Precursor m/z";
break;
case PRECURSOR_CHARGE:
result = "Precursor charge";
break;
case PRECURSOR_INTENSITY:
result = "Precursor Intensity";
break;
case MS_LEVEL:
result = "MS level";
break;
}
return result;
}
COM: <s> returns a default name for the column using spreadsheet conventions </s>
|
funcom_train/32010816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceMetadata getServiceMetadata() throws DPWSException {
WSTransferInvoker transfertServCall;
metadata = null;
transfertServCall = new WSTransferInvoker(this.getDefaultEndpoint());
transfertServCall.InvokeGet(new myCallback(this));
if (metadata != null)
metadata.setServiceEndpoint(this);
return metadata;
}
COM: <s> method constructing the metadata associated to the service </s>
|
funcom_train/32080771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage (Image image) {
checkWidget ();
if ((style & SWT.SEPARATOR) != 0) return;
if (image != null && image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
this.image = image;
int imageHandle = OS.gcnew_Image ();
OS.Image_Stretch (imageHandle, OS.Stretch_None);
OS.Image_Source (imageHandle, image != null ? image.handle : 0);
OS.ContentControl_Content (handle, imageHandle);
OS.GCHandle_Free (imageHandle);
}
COM: <s> sets the receivers image to the argument which may be </s>
|
funcom_train/18551758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File pFile) {
if (pFile.isDirectory()) {
return true;
}
String extension = getExtension(pFile);
if (extension != null) {
if (extension.equals(Statics.CLASS_EXTENSION)
|| extension.equals(Statics.JAR_EXTENSION)) {
return true;
} else {
return false;
}
}
return false;
}
COM: <s> checks if a file is acceptable </s>
|
funcom_train/26491192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupLogs() {
try {
ClientIdentity cid = new ClientIdentity("meSendSMS");
// Setup the log.
LogService logService = (LogService)ServiceManager.lookupService("log", LogService.class, cid);
log = logService.getLog("meSendSMS");
} catch(Exception ex) {}
}
COM: <s> sets up the logs for normal logging and user event logging </s>
|
funcom_train/7641391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRunWithLog() {
mRunner.setLogOnly(true);
mRunner.run(new EmptyListener());
assertStringsEquals(String.format("am instrument -w -r -e log true %s/%s", TEST_PACKAGE,
TEST_RUNNER), mMockDevice.getLastShellCommand());
}
COM: <s> test the building of the instrumentation runner command with log set </s>
|
funcom_train/3304201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
drillDownAdapter = new DrillDownAdapter(viewer);
contentProvider = new ViewContentProvider();
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setSorter(new NameSorter());
viewer.setInput(getViewSite());
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
}
COM: <s> this is a callback that will allow us </s>
|
funcom_train/15723724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntityComparator1() {
EntityComparator<IEntity> comparator = new EntityComparator<IEntity>();
IEntity dir1 = EntityFactory.createDirEntity(new File("aaa"), null, null);
IEntity dir2 = EntityFactory.createDirEntity(new File("bbb"), null, null);
assertTrue("Incorrect comparing (dir&dir)", comparator.compare(dir1, dir2) == -1);
}
COM: <s> tests entity comparator dir dir </s>
|
funcom_train/2876656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makePath(Vector pathVector) throws RemoteException, SmartFrogResolutionException {
Vector classpathFlat = RunJavaUtils.recursivelyFlatten(pathVector);
Iterator entries = classpathFlat.iterator();
StringBuffer result = new StringBuffer();
while (entries.hasNext()) {
Object entry = entries.next();
processOnePathEntry(result, entry);
}
return result.toString();
}
COM: <s> turn a path vector into a flat path string use the given separator </s>
|
funcom_train/28444078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instruction copy() {
Instruction i = null;
// "Constant" instruction, no need to duplicate
if (InstructionConstants.INSTRUCTIONS[this.getOpcode()] != null) {
i = this;
} else {
try {
i = (Instruction) clone();
} catch (CloneNotSupportedException e) {
x.java.lang.System.err().println(e);
}
}
return i;
}
COM: <s> use with caution since branch instructions have a target reference which </s>
|
funcom_train/25647158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findIndexOfEvent(TestStatusEvent event) {
int index = -1;
for (Object vector : dataVector) {
TestStatusEvent resultEvent = (TestStatusEvent) ((Vector) vector).get(0);
if (resultEvent.getTestSetId().equalsIgnoreCase(event.getTestSetId())) {
index = dataVector.indexOf(vector);
break;
}
}
return index;
}
COM: <s> finds the correct row of event in table </s>
|
funcom_train/1030016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug20242() throws Exception {
if (versionMeetsMinimum(5, 0)) {
try {
Class.forName("org.jboss.resource.adapter.jdbc.ValidConnectionChecker");
} catch (Exception ex) {
return; // class not available for testing
}
MysqlXADataSource xaDs = new MysqlXADataSource();
xaDs.setUrl(dbUrl);
MysqlValidConnectionChecker checker = new MysqlValidConnectionChecker();
assertNull(checker.isValidConnection(xaDs.getXAConnection().getConnection()));
}
}
COM: <s> tests fix for bug 20242 mysql valid connection checker for jboss doesnt </s>
|
funcom_train/41576168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getOutputString() {
if (outputString == null) {//GEN-END:|100-getter|0|100-preInit
// write pre-init user code here
outputString = new StringItem("Output:", "");//GEN-LINE:|100-getter|1|100-postInit
// write post-init user code here
}//GEN-BEGIN:|100-getter|2|
return outputString;
}
COM: <s> returns an initiliazed instance of output string component </s>
|
funcom_train/37558122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDataToTable(int row, int column, String data) {
if (dataVector[row][column].equals("")) {
dataVector[row][column] = data;
} else {
dataVector[row][column] = dataVector[row][column] +
", " + data;
}
}
COM: <s> adds a piece of data to the table in its correct position </s>
|
funcom_train/43557369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatShort(short shortVal){
String hexStr = Integer.toHexString(shortVal);
StringBuffer buf = new StringBuffer("0000");
int start = 4 - hexStr.length(); // >= 0
buf.replace(start, 4, hexStr);
return buf.toString();
}
COM: <s> short val 0 length 4 string </s>
|
funcom_train/4509965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long getUserID(JID user) throws UserNotFoundException {
// User's id are only for local users
XMPPServer server = XMPPServer.getInstance();
if (!server.isLocal(user)) {
throw new UserNotFoundException("Cannot load user of remote server: " + user.toString());
}
return getUserID(user.getNode());
}
COM: <s> returns the clearspace user id the user by jid </s>
|
funcom_train/5395392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStoreString() {
System.out.println("storeString");
SimpleType type = null;
String data = "";
DataOutputStream dos = null;
TableManager instance = new TableManager();
instance.storeString(type, data, dos);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of store string method of class org </s>
|
funcom_train/48148808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillBoxPlot(Graphics g, double x, double r, int y) {
g.fillRect(xGraph(x - r), y - 3, xGraph(x + r) - xGraph(x - r), 6);
g.drawLine(xGraph(x), y - 6, xGraph(x), y + 6);
}
COM: <s> the following method fills a symmetric horizontal boxplot centered at x </s>
|
funcom_train/29031245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while (true) {
QueueMessage<T> m = null;
try {
m = this.queue.take();
} catch (InterruptedException e) {
logger.debug("caught InterruptedException:", e);
}
if (m == null) {
continue;
}
if (m.isSentinel()) {
break;
}
try {
this.consumer.consume(m.getContent());
} catch (Exception e) {
logger.error("caught Exception", e);
}
}
}
COM: <s> the threads run method </s>
|
funcom_train/11076212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String select() {
LOG.info("Select Bird: name=" + name + " size=" + size);
BirdController controller = (BirdController)
VariableResolverUtils.resolveVariable(FacesContext.getCurrentInstance(), "birdController");
controller.setStatus("Selected bird is " + name);
return null;
}
COM: <s> selects this bird in the controller </s>
|
funcom_train/49050885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateLangstring() throws Exception {
String lang = "en_CA";
String content = "eh?";
Langstring eh = MetadataEditor.createLangstring (lang, content);
assertTrue (eh instanceof Langstring);
assertNotNull (eh.getLang());
assertEquals (eh.getLang(), lang);
assertNotNull (eh.getValue());
assertEquals (eh.getValue(), content);
} // end testCreateLangstring().
COM: <s> test the static for creating langstring instances </s>
|
funcom_train/7825892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyFromObserved(int eventCode) {
// handle events from Place
switch (eventCode) {
case Place.TOKENS:
tokenView.setTokenCount(place.getTokens());
observerList.notifyAllSubscribers( REDRAW );
break;
case Place.NAME_CHANGE:
label.setText(place.getName());
observerList.notifyAllSubscribers( REDRAW );
break;
}
}
COM: <s> this method is called when observed wants to notify all its observers of </s>
|
funcom_train/36243214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task getFragment(IExosTaskEventListener listener, int accountId, ExosFragmentListEntry entry){
log.debug("get fragment (by entry): "+entry.getFragmentUrl());
try{
GetFragmentTask task = new GetFragmentTask(listener, accountId, entry);
queue.addTask(task);
return task;
} catch (Exception ex) {
log.fatal(ex.getMessage(), ex);
}
return null;
}
COM: <s> returns a fragment for the provided exos fragment list entry </s>
|
funcom_train/43244872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNumberOfConnectionsFromPool() {
System.out.println("setNumberOfConnectionsFromPool");
long numberOfConnectionsFromPool = 0L;
ServerStatusObject instance = new ServerStatusObject();
instance.setNumberOfConnectionsFromPool(numberOfConnectionsFromPool);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set number of connections from pool method of class org </s>
|
funcom_train/25920956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePress(int x, int y, int button) throws GUIException {
currentImage = clickedButton;
try {
updateListener.putRegionToUpdate(new WidgetUpdate(this, new SDLRect(getX(),getY(),getWidth(), getHeight())));
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> mouse listener interface implementation sets the clicked button image </s>
|
funcom_train/25457571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getCBtempLoss() {
if (CBtempLoss == null) {
CBtempLoss = new JCheckBox();
CBtempLoss.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e)
{
blnTempLoss = CBtempLoss.isSelected();
parentPane.addOrRemovePanel(blnTempLoss, "l");
}
});
}
return CBtempLoss;
}
COM: <s> this method initializes cbtemp loss </s>
|
funcom_train/6273327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Format getLastTickLabelFormat() {
if (formatObjects[index] == null) {
SimpleDateFormat df = new SimpleDateFormat(standardTickFormats[index], Graph.getLocale());
df.setTimeZone(Graph.getTimeZone());
formatObjects[index] = df;
}
return formatObjects[index];
}
COM: <s> accepts time with milliseconds fractional part </s>
|
funcom_train/32209121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceContent(int offset, int len, String str) {
if (len != str.length())
System.err.println("Error: replaceContent called with len != str.length(); this would result in bad errors");
else {
Element e = getCharacterElement(offset);
try {
getContent().remove(offset, len);
getContent().insertString(offset, str);
}
catch (BadLocationException ble) {}
fireChangeEvent(e);
}
}
COM: <s> replace some of the content with the given text </s>
|
funcom_train/28280000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeBounds() {
// if we don't remember the dialog bounds then reset
// to be the defaults (behaves like inplace outline view)
Rectangle oldBounds = restoreBounds();
if (oldBounds != null) {
dialogShell.setBounds(oldBounds);
return;
}
Point size = dialogShell.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
Point location = getDefaultLocation(size);
dialogShell.setBounds(new Rectangle(location.x, location.y, size.x, size.y));
}
COM: <s> initialize the shells bounds </s>
|
funcom_train/5669258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackground(Color color) {
super.setBackground(color);
_background = color;
// Set the background of any components that already exist.
Component[] components = getComponents();
for (int i = 0; i < components.length; i++) {
if (!(components[i] instanceof JTextField)) {
components[i].setBackground(_background);
}
}
}
COM: <s> set the background color for all the widgets </s>
|
funcom_train/20605645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SafetyInfo getSubinfo(String key) {
// We don't expect this method to be used with '*' key.
checkArgument(! key.equals("*"));
if (starSubinfo != null) {
return starSubinfo;
} else {
return (nonstarSubinfos.containsKey(key)) ? nonstarSubinfos.get(key) : EMPTY_INSTANCE;
}
}
COM: <s> gets the safety info corresponding to the data for the given key </s>
|
funcom_train/17930772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newInternalFrame (String ifcode, JInternalFrame iframe) {
JRadioButtonMenuItem rbmenuItem = new JRadioButtonMenuItem(iframe.getTitle());
rbmenuItem.setActionCommand(ifcode);
iframe.setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE);
iframe.addInternalFrameListener(this);
desktop.add(iframe);
internalFrames.put(ifcode, iframe);
rbmenuItem.addActionListener(this);
ifItemsGroup.add(rbmenuItem);
ifItems.put(ifcode, rbmenuItem);
}
COM: <s> performs some operations which initialize the internal frame </s>
|
funcom_train/38287722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showHighlight() {
if (!this.showHighlight)
return;
if (this.revertColor == null) {
this.revertColor = getHostBackground();
this.wasOpaque = getHostFigure().isOpaque();
getHostFigure().setOpaque(true);
setHostBackground(ColorConstants.titleInactiveBackground);
}
}
COM: <s> highlights host figure associated with editpart where policy is </s>
|
funcom_train/7971881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension forReviewLabel(ReviewLabel rl, Object... param) {
int size = 1;
int fontsize = (int) ((size + .5) * (FONT_SIZE_MULTIPLE - 2));
return RenderingUtils.getLabelSize(rl.getText(), "", "", fontsize,
rl.getWidth(), rl.isBold(), rl.isCentered());
}
COM: <s> calculates the size of the review label </s>
|
funcom_train/43373521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() throws SQLException {
log.debug("transaction commit begins");
if (conn != null) {
conn.commit();
log.debug("commit end");
conn.close();
myTxController.set(null);
log.debug("closed");
conn = null;
}
}
COM: <s> p transaction commits p </s>
|
funcom_train/48902530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getScene( Frame<Tag> frame ) {
int num = frame.getNumber();
String scene = sceneNames.get( num );
if( scene != null ) return scene;
SortedMap<Integer,String> head = sceneNames.headMap( num );
if( head.isEmpty() ) return null;
return sceneNames.get( head.lastKey() );
}
COM: <s> get the scene that a frame belongs to </s>
|
funcom_train/1557857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startTransparentFill(StringBuilder sb){
if(!compact)
sb.append("\n");
if(fillType != ExportFrame.FILL_NONE) // filldraw
sb.append("filldraw(");
else if(compactcse5) // normal draw
sb.append("D(");
else
sb.append("draw(");
}
COM: <s> begins an object drawn by the filldraw command </s>
|
funcom_train/47732911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUninterestingFileTypes() {
for (int i = 0; i < exportTypeList.size(); i++) {
if (exportTypeList.get(i) instanceof ExportFileType) {
String descr = ((ExportFileType) exportTypeList.get(i))
.getDescription();
if (descr.contains("BMP") || descr.contains("GIF")
|| descr.contains("JPEG")) {
exportTypeList.remove(i);
}
}
}
}
COM: <s> quick hack to remove file types which are nor very interesting for r2cat </s>
|
funcom_train/16531626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getClassName() {
/*
* obtain the file name
* e.g. (using the example above)
* CandyJar.java
*/
String javaClass = filename.substring(filename.lastIndexOf(File.separator) + 1, filename.length());
/*
* remove everything after the .
* e.g.
* CandyJar
*/
String className = javaClass.substring(0, javaClass.indexOf('.'));
return className;
}
COM: <s> get the name of the current class that is loaded in the editor </s>
|
funcom_train/2358505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(int [] ngram, long value, long [][] funcs) {
if (ngram == null) return;
int qValue = quantize(value);
for (int i = 1; i <= qValue; i++) {
int hash = hashNgram(ngram, 0, ngram.length, i);
bf.add(hash, funcs);
}
}
COM: <s> adds an ngram along with an associated value to the bloom filter </s>
|
funcom_train/24473223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unmaximizeGraphPanel() {
if (XBayaGUI.this.graphPanelMaximized) {
XBayaGUI.this.graphPanelMaximized = false;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
XBayaGUI.this.mainSplitPane
.setDividerLocation(XBayaGUI.this.previousMainDividerLocation);
XBayaGUI.this.rightSplitPane
.setDividerLocation(XBayaGUI.this.previousRightDividerLocation);
}
});
}
}
COM: <s> set the size of the graph panel to the original </s>
|
funcom_train/24507509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void signatureFromDigestedContent() throws Exception {
if (isDebugEnable) log("signatureFromDigestedContent");
displayMessageToUser(bundle.getString("signing"));
String result;
try {
digitalSignatureClient.start();
result = digitalSignatureClient.executeDigitalSignature(this);
} catch (Exception e) {
sinekartaError(e);
return;
} finally {
digitalSignatureClient.close();
}
executeJS("sinekartaSignEnd", result);
displayMessageToUser(bundle.getString("signed"));
}
COM: <s> signature from digested content </s>
|
funcom_train/24570683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onValidateForm() {
start.validate(editForm);
finish.validate(editForm);
stopTimeStart.validate(editForm);
stopTimeFinish.validate(editForm);
if (result.getFinished().booleanValue()) {
if (result.getStart() == null || result.getFinish() == null){
editForm.recordError(messages.get("finishNotValid"));
}
}
}
COM: <s> computing team total for stage </s>
|
funcom_train/44695353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e) {
if (transformOperation != null) {
int x = e.getX();
int y = e.getY();
int dx = x - startX;
int dy = y - startY;
startX = x;
startY = y;
transformOperation.transform(
getSelectedIDs(),
documentManager,
new Point2D.Double(dx, dy),
new Point2D.Double(x, y));
}
else
finished = true;
}
COM: <s> processes the mouse drag event </s>
|
funcom_train/39998324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(Connection connection, FinancesDatabase fd) throws SQLException{
PreparedStatement stmt = connection.prepareStatement(fd.getSql("Expense.insert"));
stmt.setDouble(1, amount);
stmt.setInt(2, year);
stmt.setInt(3, month);
stmt.setInt(4, day);
stmt.setString(5, description);
stmt.execute();
stmt.close();
expenseID = selectID(connection, fd);
}
COM: <s> insert an expense into the database </s>
|
funcom_train/25647134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String text) {
try {
remove(0, getLength());
insertString(0, text, null);
} catch ( BadLocationException e ) {
throw new IllegalStateException("Caught " + e.getClass().getName() +
": " + e.getMessage());
}
}
COM: <s> set the contents of the document by removing any existing text and </s>
|
funcom_train/21437734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyResidues(Residue current, HashSet<Residue> tocopy) {
// copy structures
Vector<Glycan> cloned_structures = extractView(tocopy);
// paste structures
if( canAddStructures(current,cloned_structures) && addStructuresPVT(current,cloned_structures) )
fireDocumentChanged();
}
COM: <s> merge the structures formed by the residues in </s>
|
funcom_train/3598426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPointersTo(NOMElement to_element) {
if (to_element==null) { return null; }
if (lazy_loading) { loadRequestedPointersTo(to_element); }
HashSet hs = (HashSet) pointer_hash.get(to_element);
if (hs==null) { return null; }
return (List) new ArrayList(hs);
}
COM: <s> return the reverse index of pointers to the given element </s>
|
funcom_train/27746994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(Font f) {
super.setFont(f);
if (topLeft != null && !topLeft.isDisposed()) topLeft.setFont(f);
if (topCenter != null && !topCenter.isDisposed()) topCenter.setFont(f);
if (topRight != null && !topRight.isDisposed()) topRight.setFont(f);
layout();
}
COM: <s> set the widget font </s>
|
funcom_train/20825557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int askNumber(final ActionEvent event, final String title, final String message) {
Component parent = new PopupParentFinder().getParent(event);
Object value = JOptionPane.showInputDialog(
parent,
message,
title,
JOptionPane.QUESTION_MESSAGE,
null,
null,
"5"); //$NON-NLS-1$
int result = 0;
if (value != JOptionPane.UNINITIALIZED_VALUE) {
result = Util.toInt((String) value);
}
return result;
}
COM: <s> get the number of cues to be added or inserted from the </s>
|
funcom_train/38352963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putPopulation(IndividualList population) {
getInPort(0).put(population);
// send event if listeners are present
if (individualListEventListeners.size() > 0) {
//create event
IndividualListEvent evt = new IndividualListEvent(this, population);
//send event
for (Iterator iter = individualListEventListeners.iterator(); iter.hasNext();) {
((IndividualListEventListener)iter.next()).individualList(evt);
}
}
}
COM: <s> initializes the start operator with a population and fires </s>
|
funcom_train/12127281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDimension getCanvasDelta() {
Point2D last = inputManager.getLastCanvasPosition();
Point2D current = inputManager.getCurrentCanvasPosition();
return new PDimension(current.getX() - last.getX(), current.getY() - last.getY());
}
COM: <s> return the delta between the last and current mouse position in pcanvas </s>
|
funcom_train/18288519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean configurationIsValid() {
// A simplistic view of whether or not this is a valid configuration
Preferences prefs = EclipseMECorePlugin.getDefault().getPluginPreferences();
File antennaJar = new File(prefs.getString(IEclipseMECoreConstants.PREF_ANTENNA_JAR));
File wtkRoot = new File(prefs.getString(IEclipseMECoreConstants.PREF_WTK_ROOT));
return
antennaJar.exists() && antennaJar.isFile() &&
wtkRoot.exists() && wtkRoot.isDirectory();
}
COM: <s> return a boolean indicating whether or not the configuration is valid </s>
|
funcom_train/40409392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAllForAdExtension() throws Exception {
// Create selector.
CampaignAdExtensionSelector selector = new CampaignAdExtensionSelector();
selector.setAdExtensionIds(new long[] {adExtensionId});
CampaignAdExtensionPage page = service.get(selector);
assertNotNull(page);
assertNotNull(page.getEntries());
assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1);
}
COM: <s> test getting all campaign ad extensions for an ad extension </s>
|
funcom_train/4514556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addButtonToLastGroup(AbstractCommandButton commandButton) {
if (this.groupTitles.size() == 0)
return -1;
int groupIndex = this.groupTitles.size() - 1;
commandButton.setDisplayState(this.currState);
return this.addButtonToGroup(this.groupTitles.get(groupIndex),
this.buttons.get(groupIndex).size(), commandButton);
}
COM: <s> adds a new button to the specified button group </s>
|
funcom_train/7866549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAclRole(String scope, String email, String resourceId) throws Exception {
if (scope == null || email == null || resourceId == null) {
throw new RuntimeException("null passed in for required parameters");
}
URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId + URL_ACL + "/" + scope + "%3A" + email);
service.delete(url);
}
COM: <s> remove an acl role from a object </s>
|
funcom_train/13392219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInterfaceBundles(ClassBundle[] bundles) {
if(bundles == null) {
interfaceBundle = new ClassBundle[0];
} else {
interfaceBundle = new ClassBundle[bundles.length];
System.arraycopy(bundles, 0, interfaceBundle, 0, bundles.length);
}
}
COM: <s> set the interfaces as class bundle object containing the class name and </s>
|
funcom_train/625382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Instance callLetProperty(Instance inst, APropertyCall call) {
APathName propertyName = (APathName) call.getPathName();
try {
Classifier cl = inst.getRuntimeType().getClassifier();
Binding b = env.lookupProperty(call, cl, propertyName.getName());
return (Instance) b.getValue();
} catch (BindingNotFoundException e) {
throw new FeatureInvocationException();
}
}
COM: <s> calls a property defined by a let expression </s>
|
funcom_train/12180283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElement(ODOMElement policyDefinition) {
if (policyDefinition == null) {
throw new IllegalArgumentException(
"Cannot display a null policy definition");
}
if (this.policyDefinition != null) {
this.policyDefinition.removeChangeListener(odomChangeListener);
}
this.policyDefinition = policyDefinition;
this.policyDefinition.addChangeListener(odomChangeListener);
updateAttributeControls();
updatePropertyControls();
}
COM: <s> set the code odomelement code for the policy definition that is to </s>
|
funcom_train/26275442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer(t.toString());
result.append(Field.END_OF_FIELD);
for (Iterator i = repeatTimes.iterator(); i.hasNext();) {
result.append( i.next());
result.append(Field.END_OF_FIELD);
}
return result.toString();
}
COM: <s> returns a string representation of this description </s>
|
funcom_train/40026945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SubjectManager loadManager(File fileName) {
if (fileName.exists()) {
FileInputStream fis = null;
ObjectInputStream in = null;
try {
fis = new FileInputStream(fileName);
in = new ObjectInputStream(fis);
manager = (SubjectManager)in.readObject();
in.close();
}
catch(IOException ex) {
ex.printStackTrace();
} catch(ClassNotFoundException ex) {
ex.printStackTrace();
}
} else {
manager = new SubjectManager();
}
return manager;
}
COM: <s> load the serialized subject manager file </s>
|
funcom_train/7966439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EvIndividual getBestResult() {
if(algorithm == null) {
throw new IllegalStateException(
"Get best result method of EvolutionaryTask required to call setAlgorithm(EvolutionaryAlgorithm) first.");
}
if(algorithm.getBestResult() == null) {
throw new IllegalStateException(
"Get best result method of EvolutionaryTask required to call run() first.");
}
return algorithm.getBestResult();
}
COM: <s> return best result individual </s>
|
funcom_train/38533917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selected() {
Environment.structure.setStructure(treeModel, expands, scrollbarValue, this);
// if editorpanesource == null, then this has been disposed.
if ( jTabbedPane1.getSelectedIndex() == 0 && editorPaneSource != null ) {
//focus();
editorPaneSource.requestFocus();
}
}
COM: <s> gets called when the panel is selected in the panltoolcontainer </s>
|
funcom_train/8708745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessage() {
String msg = super.getMessage();
String ec = getErrorCode();
if ((msg == null) && (ec == null)) {
return null;
}
if ((msg != null) && (ec != null)) {
return (msg + ", error code: " + ec);
}
return ((msg != null) ? msg : ("error code: " + ec));
}
COM: <s> returns a detailed message string describing this exception </s>
|
funcom_train/21503356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSignedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FixedPointDataType_signed_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FixedPointDataType_signed_feature", "_UI_FixedPointDataType_type"),
DMLPackage.Literals.FIXED_POINT_DATA_TYPE__SIGNED,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the signed feature </s>
|
funcom_train/50066785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int emitJump(int opcode) {
if (fatcode) {
if (opcode == goto_ || opcode == jsr) {
emitop4(opcode + goto_w - goto_, 0);
} else {
emitop2(negate(opcode), 8);
emitop4(goto_w, 0);
}
return cp - 5;
} else {
emitop2(opcode, 0);
return cp - 3;
}
}
COM: <s> emit a jump instruction </s>
|
funcom_train/13515128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessage(int errorCode, AbstractList params) {
String errorCodeStr = Integer.toString(errorCode);
String message;
try {
ErrorMessages errorMessages = ErrorMessages.getInstance();
message = errorMessages.getMessage(errorCodeStr, params);
} catch (Exception e) {
message = "";
}
return message;
}
COM: <s> this method returns the error message corresponding to the error code </s>
|
funcom_train/49252608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resolveEntities() {
if (model != null) {
if (model.getTables() != null) {
for (Table table : model.getTables()) {
if (table.getRandomSeed() == -1) {
table.setRandomSeed(randomSeed);
}
}
}
model.resolveEntities();
}
}
COM: <s> resolve the referenced entities in the project make sure the metadata </s>
|
funcom_train/32886466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSelectedEnum(final EnumSet enumSet) {
for (final Iterator iter = enumSet.iterator(); iter.hasNext(); ) {
final JCheckBox checkBox = this.mHashMap.get(iter.next());
checkBox.setSelected(true);
} // end for
} // end
COM: <s> select the radio button which represent the enum value </s>
|
funcom_train/20397372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setLengthsOfDists(int[] ls){
if((ls==null)||(ls.length != getNumberOfCP()))
return false;
else{
for(int i=0; i < ls.length; i++)
setLengthOfDist(i+1, ls[i]);
}
return true;
}
COM: <s> method for set all lengths of laps </s>
|
funcom_train/15411682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int queryBindHash() {
int hash = DefaultExpressionList.class.getName().hashCode();
for (int i = 0, size = list.size(); i < size; i++) {
SpiExpression expression = list.get(i);
hash = hash * 31 + expression.queryBindHash();
}
return hash;
}
COM: <s> calculate a hash based on the expressions </s>
|
funcom_train/33598663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCaptureAudio() {
if (captureAudio == null) {//GEN-END:|54-getter|0|54-preInit
// write pre-init user code here
captureAudio = new Command("capture", Command.OK, 0);//GEN-LINE:|54-getter|1|54-postInit
// write post-init user code here
}//GEN-BEGIN:|54-getter|2|
return captureAudio;
}
COM: <s> returns an initiliazed instance of capture audio component </s>
|
funcom_train/24928023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double estimatedRelativeProfit(final String underlying) {
try {
final double a = this.lastPrices.get(underlying);
final double b = this.targetPrices.get(underlying);
return (b-a) / a;
} catch(NullPointerException npe) {
throw new NoSuchElementException("No underlying " + underlying);
}
}
COM: <s> underlyings from mercado continuo should be appended with </s>
|
funcom_train/16319629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
if(evt.getSource().equals(jButtonSPL)){
result=1;
}else if(evt.getSource().equals(jButtonPAS)){
result=2;
}else if(evt.getSource().equals(jButtonSRR)){
result=3;
}else if(evt.getSource().equals(jButtonTemplate)){
result=4;
}else if(evt.getSource().equals(jButtonSchema)){
result=5;
}
setVisible(false);
}
COM: <s> set public fields to selection </s>
|
funcom_train/27975493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanUp() {
// Close all the gates
super.cleanUp();
// Drain the socket pool and close the sockets
for ( Iterator iter = socketPool.drain().iterator(); iter.hasNext(); ) {
Socket socket = (Socket) iter.next();
closeSocket( socket );
}
}
COM: <s> closes all code gate code s and closes all pooled outgoing connections </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.