__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/6458128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTo(DataOutputStream dos) throws IOException {
dos.writeByte(PROTOCOL_VERSION);
dos.writeLong(messageID);
dos.writeLong(generation);
dos.writeLong(createTime);
dos.writeLong(updateTime);
dos.writeLong(createSession);
dos.writeLong(updateSession);
dos.writeUTF(createUser);
if (updateUser.equals(createUser)) {
dos.writeUTF("");
} else {
dos.writeUTF(updateUser);
}
}
COM: <s> writes the updated information to the given data output stream </s>
|
funcom_train/16839741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PlayerChar getPlayerObject(ResultSet result) {
try {
PlayerChar p = new PlayerChar();
p.setName(result.getString("username"));
switch(result.getInt("status")){
case 0:
p.setMuted(true);
p.setAdminLevel(0);
break;
case 1:
p.setMuted(true);
p.setAdminLevel(0);
break;
case 2:
p.setMuted(false);
p.setAdminLevel(1);
break;
case 3:
p.setMuted(false);
p.setAdminLevel(2);
break;
}
return p;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
COM: <s> returns a playerchar object from a resultset of player data </s>
|
funcom_train/18896677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws BuildException {
try {
log("Running with this config:" + eol + this.toString(), Project.MSG_DEBUG);
setupLog();
if (logger.isDebugEnabled()) {
logger.debug("Running with this config:" + eol + this.toString());
}
interpreter = new ItqlInterpreterBean();
executeQueries();
}
finally {
if (interpreter != null) {
try {
interpreter.close();
}
finally {
interpreter = null;
}
}
}
}
COM: <s> executes the commands </s>
|
funcom_train/5606877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ByteBuffer read(int size) {
if (size < 0) {
return readall();
}
ByteBuffer bytes = ByteBuffer.allocate(size);
readinto(bytes);
// flip()ing here is more convenient as there's no real use
// case for appending to buffers returned from read. readinto
// doesn't/shouldn't flip()
bytes.flip();
return bytes;
}
COM: <s> read and return up to size bytes contained in a byte buffer </s>
|
funcom_train/49822414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Term copy(AbstractMap vMap, int idExecCtx) {
Struct t = new Struct(arity);
t.resolved = resolved;
t.name = name;
t.predicateIndicator = predicateIndicator;
t.primitive = primitive;
for (int c = 0;c < arity;c++) {
t.arg[c] = arg[c].copy(vMap, idExecCtx);
}
return t;
}
COM: <s> gets a copy of this structure </s>
|
funcom_train/46166499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(Object obj) throws FormatException {
Color color = (Color) obj;
int alpha = color.getAlpha();
if (color.getAlpha() == 255) {
return color.getRed() + "," + color.getGreen() + "," + color.getBlue();
} else {
return color.getRed() + "," + color.getGreen() + "," + color.getBlue() + "," + color.getAlpha();
}
}
COM: <s> converts a color object into a string </s>
|
funcom_train/2295621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String info(String property) {
try {
return CmsJspTagInfo.infoTagAction(property, getRequest());
} catch (Throwable t) {
handleException(t);
}
CmsMessageContainer msgContainer = Messages.get().container(Messages.GUI_ERR_INFO_PROP_READ_1, property);
return getMessage(msgContainer);
}
COM: <s> returns an open cms or jvm system info property value same as using </s>
|
funcom_train/4640974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageBasedLight(String name, Vector3 center, Vector3 up, int samples, int lowSamples, String texture) {
sunflow.parameter("center", center);
sunflow.parameter("up", up);
sunflow.parameter("samples", samples);
sunflow.parameter("lowsamples",lowSamples);
sunflow.parameter("texture", texture);
sunflow.light( name, this.LIGHT_IMAGEBASED );
}
COM: <s> sets image based light </s>
|
funcom_train/3369744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyComponentOrientation(ComponentOrientation o) {
super.applyComponentOrientation(o);
if ( popupMenu != null ) {
int ncomponents = getMenuComponentCount();
for (int i = 0 ; i < ncomponents ; ++i) {
getMenuComponent(i).applyComponentOrientation(o);
}
popupMenu.setComponentOrientation(o);
}
}
COM: <s> sets the code component orientation code property of this menu </s>
|
funcom_train/14227587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void callOverloadCeased(final String address) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
GenericProvider gp = (GenericProvider)o;
net.sourceforge.gjtapi.jcc.Provider prov = gp.getJainProvider();
// Notify the jain provider
if (prov != null)
prov.callOverloadCeased(gp.getDomainMgr().getLazyAddress(address));
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
COM: <s> call overload ceased method comment </s>
|
funcom_train/27747055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void javaToNative (Object object, TransferData transferData){
if ((object == null) || !(object instanceof byte[]) || !(isSupportedType(transferData))) {
transferData.result = 0;
return;
}
byte[] buffer = (byte[])object;
transferData.pValue = OS.g_malloc(buffer.length);
OS.memmove(transferData.pValue, buffer, buffer.length);
transferData.length = buffer.length;
transferData.format = 8;
transferData.result = 1;
}
COM: <s> this implementation of code java to native code converts a java </s>
|
funcom_train/14083051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getChildren(String elementName) {
// log.finest("ENTERING getting children for element \"" + elementName + "\"");
ArrayList children = new ArrayList();
BaseElement be = (BaseElement) this.get(elementName);
if (be != null) children = be.getChildren();
// log.finest("RETURN children size \"" + children.size() + "\"");
return children;
}
COM: <s> gets a list of the children of an element </s>
|
funcom_train/7298265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIconFileNameByFileExt(String fileExt) {
// Remove the leading '.' character from the file extension if exists.
fileExt = AppUtility.removeDotFromFileExtension(fileExt);
if (getMimeTypeByFileExt(fileExt) == null) {
return null;
} else {
return getIconFileNameByMimeType(getMimeTypeByFileExt(fileExt));
}
}
COM: <s> returns the icon file name associated with the given file extension </s>
|
funcom_train/34813589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object obj){
Window other = (Window)obj;
int i = other.chromosome.compareTo(chromosome);
if (i !=0 ) return -1*i;
if (other.start< start) return 1;
if (other.start> start) return -1;
if ( (other.stop - other.start) < (stop - start) ) return 1;
if ( (other.stop - other.start) > (stop - start) ) return -1;
return 0;
}
COM: <s> compares by chromosome start position shortest length </s>
|
funcom_train/15718771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIsNext() {
taskValuesPanel.setBorder(BorderFactory.createLineBorder(Data.darkgreen2));
taskValuesPanel.setBackground(new Color(183, 255, 143));
taskValueArea.setBackground(taskValuesPanel.getBackground());
isnext = true;
isIn24H = false;
normal = false;
}
COM: <s> sets the task to be shown as the next one </s>
|
funcom_train/25289854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setURLString(String path) {
if (isLiveOrCompiled()) {
if(!this.getCapability(ALLOW_URL_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("MediaContainer3"));
}
((MediaContainerRetained)this.retained).setURLString(path);
}
COM: <s> set url string </s>
|
funcom_train/2386523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changePhotoViewerMode(){
if(viewer.isUndecorated()){
PhotoViewer viewer2= new PhotoViewer(viewer, false);
viewer2.setVisible(true);
viewer.dispose();
}
else{
PhotoViewer viewer2= new PhotoViewer(viewer, true);
viewer2.setVisible(true);
viewer.dispose();
}
}
COM: <s> change the photo viewer mode full screen into normal mode or the inverse </s>
|
funcom_train/11051475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void evaluateCompleteInterpolatedState() {
// lazy evaluation of the state
if (dirtyState) {
final double oneMinusThetaH = globalCurrentTime - interpolatedTime;
final double theta = (h == 0) ? 0 : (h - oneMinusThetaH) / h;
computeInterpolatedStateAndDerivatives(theta, oneMinusThetaH);
dirtyState = false;
}
}
COM: <s> lazy evaluation of complete interpolated state </s>
|
funcom_train/3010361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TestVO createOne() {
TestVO t = new TestVO();
int id = (int) (Math.random() * Integer.MAX_VALUE);
t.setName("New Object no. " + id);
t.setId(id);
_addToContainer(t);
return t;
}
COM: <s> creates a vo and add it to the containers </s>
|
funcom_train/18203303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeListener( AssemblyListener listener ) {
assert listener != null;
int index = indexOf( listener );
int numMoved = m_listenersSize - index - 1;
if( numMoved > 0 ) {
System.arraycopy( m_listeners, index + 1, m_listeners, index,
numMoved );
}
m_listeners[ --m_listenersSize ] = null; // Let GC do its work
}
COM: <s> removes the specified listener from this assembly </s>
|
funcom_train/11671775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRecognizedProperties(String[] propertyIds) {
int length = propertyIds != null ? propertyIds.length : 0;
for (int i = 0; i < length; i++) {
String propertyId = propertyIds[i];
if (!fRecognizedProperties.contains(propertyId)) {
fRecognizedProperties.addElement(propertyId);
}
}
} // addRecognizedProperties(String[])
COM: <s> allows a parser to add parser specific properties to be recognized </s>
|
funcom_train/11105776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void erase(UIComponent component) {
// Erase the component itself (if needed)
if (component instanceof EditableValueHolder) {
((EditableValueHolder) component).setSubmittedValue(null);
}
// Process the facets and children of this component
Iterator kids = component.getFacetsAndChildren();
while (kids.hasNext()) {
erase((UIComponent) kids.next());
}
}
COM: <s> p private helper method for code erase code that recursively </s>
|
funcom_train/49199933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAudioFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Audio_audioFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Audio_audioFile_feature", "_UI_Audio_type"),
ExhibitionPackage.Literals.AUDIO__AUDIO_FILE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the audio file feature </s>
|
funcom_train/35193727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String update() {
try {
this.crudService = new PromoCRUDService();
PromoCRUD crud = crudService.getPromoCRUDPort();
// Escape characters traitement
uPromo.setCode(SQLProtection.format(uPromo.getCode()));
uPromo.setName(SQLProtection.format(uPromo.getName()));
crud.updatePromo(uPromo);
}
catch (Exception e) {
e.printStackTrace();
}
return "updated";
}
COM: <s> update the u promo promotion </s>
|
funcom_train/5461908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void crawlCreatedProperty(Property property, Resource parentNode, RDFContainer rdfContainer) {
Node propertyValue = getRdfPropertyValue(rdfContainer, property, IcalDataType.DATE_TIME);
addStatement(rdfContainer, parentNode, NCAL.created, propertyValue);
}
COM: <s> crawls the created property </s>
|
funcom_train/10749057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_addShutdownHook() {
// Test for method long java.lang.Runtime.addShutdownHook()
boolean exception = false;
try {
Runtime.getRuntime().addShutdownHook(null);
} catch (NullPointerException npe) {
exception = true;
}
assertTrue("NullPointerException expected!", exception);
}
COM: <s> regression test for harmony 690 </s>
|
funcom_train/5810638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetV1Config() throws UnknownHostException {
SnmpAgentConfig agentConfig = SnmpPeerFactory.getInstance().getAgentConfig(InetAddress.getByName("10.0.0.1"));
assertNotNull(agentConfig);
assertTrue(agentConfig.getVersion() == SnmpAgentConfig.VERSION1);
assertEquals("specificv1", agentConfig.getReadCommunity());
}
COM: <s> this tests getting a v1 config </s>
|
funcom_train/37062873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTimeFormatted() {
StringBuffer buf = new StringBuffer(8);
buf.append( formatInt(getHour()) ).append( ":" ).append( formatInt(getMinute()) ).append( ":" ).append( formatInt(getSeconds()) );
return buf.toString();
}
COM: <s> get the time in format hh mm ss </s>
|
funcom_train/2023593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BuilderParameter getParameter(String parameter) {
int i;
BuilderParameter result;
BuilderParameter param;
result = null;
for (i = 0; i < parameters.size(); i++) {
param = (BuilderParameter) parameters.get(i);
if (param.getParameter().equals(parameter)) {
result = param;
break;
}
}
return result;
}
COM: <s> returns the parameter based on its commandline name can be null </s>
|
funcom_train/6481505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
MessageProcessor msgProcessor = MessageProcessor.getInstance();
allAgentIDs = msgProcessor.getAllAIDList();
allInteractionRecords = msgProcessor.getInteractionRecords();
displayAgentIDs = allAgentIDs;
displayInteractionRecords = allInteractionRecords;
filterPanel = new FilterPanel(allAgentIDs);
filterPanel.setEventHandler(new MyButtonClickProcessor());
populateGraphData();
}
COM: <s> initialises the graph </s>
|
funcom_train/4762873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void center() {
int x, y;
x = (Toolkit.getDefaultToolkit().getScreenSize().width - this
.getWidth()) / 2;
y = (Toolkit.getDefaultToolkit().getScreenSize().height - this
.getHeight()) / 2;
this.setLocation(x, y);
}
COM: <s> code center code places this code properties dialog code in the </s>
|
funcom_train/42089264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassRefPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ClassMap_classRef_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ClassMap_classRef_feature", "_UI_ClassMap_type"),
DecModelPackage.Literals.CLASS_MAP__CLASS_REF,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the class ref feature </s>
|
funcom_train/5339518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Field findField (String fieldname, JavaClass javaclass) {
Field [] fields = javaclass.getFields();
for (int i = 0; i < fields.length; i++) {
if (fields[i].getName().equals(fieldname)) {
return fields[i];
}
}
return null;
}
COM: <s> find a field by name </s>
|
funcom_train/11527488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRequestParams2() {
Map<String, String> requestParamMap = new HashMap<String, String>();
ContextTestRequestWrapper wrapper = new ContextTestRequestWrapper(request, requestParamMap);
FacesContext context = new FacesContextImpl(servletContext, wrapper, response);
PartialViewContext pprContext = context.getPartialViewContext();
assertTrue(pprContext.getExecuteIds().isEmpty());
}
COM: <s> no request param has to result in an empty list </s>
|
funcom_train/41290653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeInstruction(String name){
if(name==null)return true;
name=name.toLowerCase();
if(!isRemovableInstr(name))return false;
boolean res=istruzioni.remove(name)!=null;
if(res)notifica(INSTRUCTION_SET_CHANGED);
return res;
}
COM: <s> removes the given instruction from the list of available instructions </s>
|
funcom_train/3004607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSize() {
// We check if the vector of datas has been set
if ( _datas != null ) {
if ( _canBeNull ) {
return _datas.size() + 1;
}
return _datas.size();
} else {
// If the vector is not defined yet then we return 0
return 0;
}
}
COM: <s> gets the size </s>
|
funcom_train/43813514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float min(float a, float b) {
if (a != a)
return a; // a is NaN
if ((a == 0.0f) && (b == 0.0f)
&& (Float.floatToIntBits(b) == negativeZeroFloatBits)) {
return b;
}
return (a <= b) ? a : b;
}
COM: <s> returns the smaller of two code float code values </s>
|
funcom_train/2586358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(final MouseEvent e) {
final JTableHeader header = (JTableHeader) e.getComponent();
if ((header.getDraggedDistance() > 0) || (header.getResizingColumn() != null)) {
this.renderer.setPressedColumn(-1);
this.sortColumnIndex = -1;
}
}
COM: <s> if the user is dragging or resizing then we clear the sort column </s>
|
funcom_train/8485401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJavaBaseFieldAssignment() {
try {
ATMessage message = new NATMethodInvocation(
AGSymbol.jAlloc("at"),
NATTable.EMPTY,
NATTable.EMPTY);
message.base_arguments__opeql_(NATTable.of(closures.base_length()));
ATObject element = message.base_sendTo(closures, Evaluator.getNil());
element.asClosure().base_apply(NATTable.EMPTY);
} catch (InterpreterException e) {
e.printStackTrace();
fail("exception: "+e);
}
}
COM: <s> tests the assignment of fields on a natively implemented message send parse </s>
|
funcom_train/1147642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand2() {
if (backCommand2 == null) {//GEN-END:|149-getter|0|149-preInit
// write pre-init user code here
backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|149-getter|1|149-postInit
// write post-init user code here
}//GEN-BEGIN:|149-getter|2|
return backCommand2;
}
COM: <s> returns an initiliazed instance of back command2 component </s>
|
funcom_train/29514169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createServerArchive() {
if (DEBUG)
System.out.println("DEBUG (createServerArchive): Creating new server archive");
File newArchiveDir = new File(SyncServerThread.homeDir+File.separator+BASEDIR);
File newHistoryDir = new File(SyncServerThread.homeDir+File.separator+HISTDIR);
newArchiveDir.mkdir();
newHistoryDir.mkdir();
getServerArchive().addSyncBase(newArchiveDir.getAbsolutePath(),"*", 0);
}
COM: <s> used for first initialisation </s>
|
funcom_train/193169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeLastResultInXML ( OutputStream o ) throws JGDError {
if ( results != null ) {
try {
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
Boolean.TRUE);
m.marshal( results , o );
} catch (PropertyException e) {
throw new JGDError( "Error writing last result xml in a marshaller property: "+e.getMessage(), e);
} catch (JAXBException e) {
throw new JGDError( "Error writing last result xml: "+e.getMessage(), e);
}
}
}
COM: <s> write las results in xml into a output stream </s>
|
funcom_train/1304934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hasTag(Set<String> tagNames) {
if (tagNames == null) return -1;
int result = 0;
final List<XmlLite.Tag> tags = getTagsList();
for (XmlLite.Tag tag : tags) {
if (tagNames.contains(tag.name)) break;
++result;
}
return result >= tags.size() ? -1 : result;
}
COM: <s> determine the position at which the current stack has any of the given </s>
|
funcom_train/25187251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLine() {
System.out.println("getLine");
StructureErrorInfo instance = new StructureErrorInfo(1, 2, "1", "2");
int expResult = 1;
int result = instance.getLine();
assertEquals(expResult, result);
}
COM: <s> test of get line method of class structure error info </s>
|
funcom_train/17626717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Object item) {
Iterator it = list.iterator();
while (it.hasNext()) {
IVariable currVariable = (IVariable) it.next();
if ( currVariable != null && currVariable.toString().equals(item.toString()) ) {
return true;
}
}
return false;
}
COM: <s> checks if list contains specified objects string representation </s>
|
funcom_train/34484516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ComplexEntityValue toValue() throws SdaiException {
StaticFields staticFields = StaticFields.get();
if (staticFields.entity_values == null) {
staticFields.entity_values = new ComplexEntityValue();
}
prepareData(staticFields.entity_values);
getAll(staticFields.entity_values);
for (int i = 0; i < staticFields.entity_values.def.noOfPartialEntityTypes; i++) {
staticFields.entity_values.entityValues[i].owner = this;
}
return staticFields.entity_values;
}
COM: <s> wraps this instance to complex entity value object and returns it </s>
|
funcom_train/28134175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireModuleChange(final IProject prj, final String moduleName, final int eventType) {
for (final IModuleChangeStrategy strategy : this.moduleChanges) {
if (strategy.supports(moduleName)) {
switch(eventType) {
case IModuleChangeStrategy.MODULE_ADDED: strategy.moduleAdded(prj);break;
case IModuleChangeStrategy.MODULE_REMOVED: strategy.moduleRemoved(prj);break;
default:break;
}
}
}
}
COM: <s> p fire different strategies depending which module has been added p </s>
|
funcom_train/44011539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddCoupon() {
System.out.println("addCoupon");
CouponBO coup = null;
TransactionBO instance = new TransactionBO();
instance.addCoupon(coup);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of add coupon method of class edu </s>
|
funcom_train/21723105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void directAgentChangeInvolvement(boolean involveAgent) {
// boolean agentInvolvement = getPCcs().agentInvolvementH
// .decideAgentInvolvement();
if (involveAgent) {
// HERE query CM for focus - not in current version
if (!agentIsInEchoes) {
agentNotInvolved = true;
System.out.println("in echoes?");
setAgentGoal("enterECHOES");
} else {
if (!agentNotInvolved) {
setAgentGoal(dontWait);
agentNotInvolved = true;
}
}
} else {
agentNotInvolved = false;
setAgentGoal(wait);
}
}
COM: <s> directs the agents behaviour </s>
|
funcom_train/44846267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderString(Writer writer, final String stringToRender, final Map<String, Object> contextObjects) {
if (StringUtils.isBlank(stringToRender))
return;
VelocityContext ctx = new VelocityContext(contextObjects);
try {
siteHolder.getVelocityEngine().evaluate(ctx, writer, "StaticRenderfield", stringToRender);
} catch (Exception e) {
throw new FatalException("While string rendering: " + e.getMessage(), e);
}
}
COM: <s> the main render method </s>
|
funcom_train/30075723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
Institution institution = (Institution) command;
// delegate the insert to the Business layer
getGpir().storeInstitution(institution);
return new ModelAndView(getSuccessView(), "institutionId", Integer.toString(institution.getId()));
}
COM: <s> method inserts a new code institution code </s>
|
funcom_train/5260690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addComposedOfPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CourseOfAction_composedOf_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CourseOfAction_composedOf_feature", "_UI_CourseOfAction_type"),
BmmPackage.Literals.COURSE_OF_ACTION__COMPOSED_OF,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the composed of feature </s>
|
funcom_train/12163831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOpenCloseMenu() throws Exception {
renderer.openMenu(outputBuffer, menuAttributes);
renderer.closeMenu(outputBuffer, menuAttributes);
assertEquals("openMenu & closeMenu produced unexpected markup",
getExpectedOpenCloseMenuOutput(),
getOutputBufferAsString());
}
COM: <s> tests both the </s>
|
funcom_train/50863569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isCapableOfMission(Person person) {
if (person == null) throw new IllegalArgumentException("person is null");
// Make sure person isn't already on a mission.
if (person.getMind().getMission() == null) {
// Make sure person doesn't have any serious health problems.
if (!person.getPhysicalCondition().hasSeriousMedicalProblems()) return true;
}
return false;
}
COM: <s> checks to see if a person is capable of joining a mission </s>
|
funcom_train/39382980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone(){
if(DEBUG)
logger.debug("entering clone()");
MessageManager mgr = new MessageManager(this.frame,isEditable());
mgr.setData(this.getData());
frame.getStoreManager().addStoreManagementListener(Message.class,mgr);
if(DEBUG)
logger.debug("exiting clone()");
return mgr;
}
COM: <s> creates a deep copy of this component </s>
|
funcom_train/35195479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateDatabase(String username) {
// TODO: again do we have to verify that username is safe?
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(recipients, true));
writer.write(username+"@"+hostname+"\t"+hostname+"/"+username+"/Maildir/");
writer.newLine();
writer.close();
Process p = Runtime.getRuntime().exec("/usr/sbin/postmap /etc/postfix/virtual_mailbox_recipients");
p.waitFor();
if (p.exitValue() == 0) {
return true;
}
return false;
} catch (IOException e) {
return false;
} catch (InterruptedException e) {
return false;
}
}
COM: <s> adds the specified username to the virtual mailbox recipients file </s>
|
funcom_train/8513823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawX(Canvas canvas, Paint paint, float x, float y) {
canvas.drawLine(x - size, y - size, x + size, y + size, paint);
canvas.drawLine(x + size, y - size, x - size, y + size, paint);
}
COM: <s> the graphical representation of an x point shape </s>
|
funcom_train/39108548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getType(String name) {
try {
return ((AttrTypeValue) attribute.get(name)).getType();
// return ((AttrTypeValue) attribute.get(name.toUpperCase())).getType();
}
catch (NullPointerException e) {
return null;
}
}
COM: <s> return type of an attribute </s>
|
funcom_train/17922664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindMacAddressInLine() {
System.out.println("findMacAddressInLine");
String line = "dfgadfgadfgadfg00:0C:29:D1:0f:99dffgfgg";
String expResult = "00:0C:29:D1:0f:99";
String result = MacValidate.findMacAddressInLine(line);
System.out.println(result);
assertEquals(expResult, result);
}
COM: <s> test of find mac address in line method of class eu </s>
|
funcom_train/40622717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumnTruncatable(boolean truncatable) {
TruncationProperty prop = properties.getColumnProperty(
TruncationProperty.TYPE, false);
if (prop == null) {
prop = new TruncationProperty(truncatable);
setColumnProperty(TruncationProperty.TYPE, prop);
} else {
prop.setColumnTruncatable(truncatable);
}
}
COM: <s> set whether or not this column is truncatable </s>
|
funcom_train/2058382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuItem createimportIRCommandFileImportMenu() {
MenuItem importIRCommandFileItem = new MenuItem("import IR Commands from file");
importIRCommandFileItem.setIcon(icon.importFromDB());
importIRCommandFileItem.addSelectionListener(new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent ce) {
importIRCommandFile();
}
});
return importIRCommandFileItem;
}
COM: <s> creates the import ir file menu item </s>
|
funcom_train/16218262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getModeString(int mode) {
switch (mode) {
case CLASS_URL:
return "Class-URL";
case WORKING_DIRECTORY:
return "Working-Directory";
case CLASS_LOADER:
return "Class-Loader";
case SYSTEM_LOADER:
return "System-Loader";
}
return "[UNKNOWN-MODE]";
}
COM: <s> returns the official statement of specified io mode or </s>
|
funcom_train/12305291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAttribute(String dn, String attr) throws MDSException {
try {
BasicAttributes ba = new BasicAttributes();
ba.put( new BasicAttribute(attr) );
ctx.modifyAttributes(dn, DirContext.REMOVE_ATTRIBUTE, ba);
} catch(NamingException e) {
throw new MDSException("Failed to delete attributes for " + dn, e);
}
}
COM: <s> deletes a specific attribute of an entry </s>
|
funcom_train/51591623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date createRandomDate() {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, generator.nextInt(10) + 2000);
c.set(Calendar.DAY_OF_MONTH, generator.nextInt(31) + 1);
c.set(Calendar.MONTH, generator.nextInt(12));
return (c.getTime());
}
COM: <s> create a random date </s>
|
funcom_train/10912413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBorderAndPaddingWidthAfter() {
int margin = 0;
BorderProps bps = (BorderProps) getTrait(Trait.BORDER_AFTER);
if (bps != null) {
margin = bps.width;
}
Integer padWidth = (Integer) getTrait(Trait.PADDING_AFTER);
if (padWidth != null) {
margin += padWidth;
}
return margin;
}
COM: <s> return the sum of region border and padding after </s>
|
funcom_train/41302968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects(RectangleViewPort r) {
return r.width > 0 && r.height > 0 && width > 0 && height > 0
&& r.x < x + width && r.x + r.width > x
&& r.y < y + height && r.y + r.height > y;
}
COM: <s> tests whether or not the specified rectangle intersects this rectangle </s>
|
funcom_train/8088279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void append(String s) {
BufferedWriter writer;
if (m_LogFile == null)
return;
// append output to file
try {
writer = new BufferedWriter(new FileWriter(m_LogFile, true));
writer.write(s);
writer.flush();
writer.close();
}
catch (Exception e) {
// ignored
}
}
COM: <s> appends the given string to the log file without new line </s>
|
funcom_train/41025984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getEntityNamePanel() {
if (entityNamePanel == null) {
entityNamePanel = new JPanel();
entityNamePanel.setLayout(new CardLayout());
entityNamePanel.add(getEntityNameShowPanel(), getEntityNameShowPanel().getName());
entityNamePanel.add(getEntityNameEditPanel(), getEntityNameEditPanel().getName());
}
return entityNamePanel;
}
COM: <s> this method initializes entity name panel </s>
|
funcom_train/37506723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toQueryString() {
String queryString = "";
String amp = "";
for (Enumeration iter = getFieldNames(); iter.hasMoreElements();) {
String nextAttrName = (String) iter.nextElement();
String nextAttrValue = getField(nextAttrName);
queryString = queryString + amp + nextAttrName + "=" + nextAttrValue;
// After first add "&".
amp = "&";
}
return queryString;
}
COM: <s> convert to http query string </s>
|
funcom_train/4561207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendSupplierRFQs() {
if (supplierRFQTable.size() > 0) {
synchronized (supplierRFQTable) {
Enumeration keyIterator = supplierRFQTable.keys();
while (keyIterator.hasMoreElements()) {
String supplierAddress = (String) keyIterator.nextElement();
RFQBundle rfqBundle = (RFQBundle) supplierRFQTable
.get(supplierAddress);
sendMessage(supplierAddress, rfqBundle);
}
supplierRFQTable.clear();
}
}
}
COM: <s> sends any pending rfqs to the suppliers </s>
|
funcom_train/20270912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node findNodeToInsertAfter(Node n) {
Node nodeToInsertAfter = findEnclosingConstructorDeclaration(n);
Node next = nodeToInsertAfter.getNext();
while (next != null && isClassDefiningCall(next)) {
nodeToInsertAfter = next;
next = nodeToInsertAfter.getNext();
}
return nodeToInsertAfter;
}
COM: <s> find the node to insert the markers after </s>
|
funcom_train/14419640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SWTBotShell activatePopupShell() throws QuickFixNotFoundException {
try {
SWTBotShell shell = bot.shell("", 1);
shell.activate();
if (log.isDebugEnabled())
log.debug("Activated quickfix shell.");
return shell;
} catch (Exception e) {
throw new QuickFixNotFoundException("Quickfix popup not found. Giving up.", e);
}
}
COM: <s> this activates the popup shell </s>
|
funcom_train/25792315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isVisible() {
if (m_item != null) {
return m_item.hasFilter();
} else if (getChildCount() > 0) {
// If all children of process group are visible this one is as well.
for (int index = 0; index < getChildCount(); index++) {
ProcessTreeNode node = (ProcessTreeNode) getChildAt(index);
if (!node.isVisible()) {
return false;
}
}
return true;
}
return false;
}
COM: <s> returns is this node is visible </s>
|
funcom_train/48911830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
// TODO This is actually wrong; clone() methods
// <i>must</i> use super.clone() or odd things can happen
// in a multi-classloader environment.
return new Fact(this);
} catch (JessException re) {
// can't happen
return null;
}
}
COM: <s> make a copy of this fact </s>
|
funcom_train/38463702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countPages(Parameters params, Transaction tx) throws StorageException {
int pages = -1;
if(params.pageSize > 0) {
int count = count(params,tx);
pages = count / params.pageSize;
if(count % params.pageSize > 0) {
++pages;
}
}
return pages;
}
COM: <s> counts the number of result pages according to parameters </s>
|
funcom_train/18049826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNewId(){
int oldId = Integer.parseInt(doc.getRootElement().getChild(ELEM_LOCAL_SETTINGS).getAttributeValue(JdcConfig.ATTR_MAX_ID));
int newId = oldId + 1;
doc.getRootElement().getChild(ELEM_LOCAL_SETTINGS).setAttribute(JdcConfig.ATTR_MAX_ID, Integer.toString(newId));
setDirty(true);
return newId;
}
COM: <s> get the max id value out of the configuration xml and increments it </s>
|
funcom_train/7628829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isOnMatchingPlmn(String plmn) {
if (plmn == null) return false;
if (plmn.equals(getSIMOperatorNumeric())) {
return true;
}
if (spdiNetworks != null) {
for (String spdiNet : spdiNetworks) {
if (plmn.equals(spdiNet)) {
return true;
}
}
}
return false;
}
COM: <s> checks if plmn is hplmn or on the spdi networks list </s>
|
funcom_train/17760867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertjbpmGroupId2IdmGroupKey(String jbpmGroupId) {
StringTokenizer st = new StringTokenizer(jbpmGroupId, ".");
String type = DEFAULT_JBPM_GROUP_TYPE;
if (st.countTokens() > 1) {
type = st.nextToken();
}
String name = st.nextToken();
return new GroupKey(name, type).getKey();
}
COM: <s> convert the j bpm group id to idm group key </s>
|
funcom_train/9274199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int rowsInTable(String tableName) throws SQLException {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT COUNT(*) FROM " + tableName);
rs.next();
int count = rs.getInt(1);
conn.commit();
rs.close();
stmt.close();
return count;
}
COM: <s> return the number of rows in the table </s>
|
funcom_train/44433133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFileSize(long file_size) {
getNode(new XMLNode("MediaProfile"))
.getNode(new XMLNode("MediaFormat"))
.getNode(new XMLNode("FileSize", false, PRIO_FILE_SIZE))
.setChild(new XMLCharacters("" + file_size));
}
COM: <s> sets the size of the audio file in bytes </s>
|
funcom_train/4881610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSalvarDadosPessoais () {
if (salvarDadosPessoais == null) {//GEN-END:|125-getter|0|125-preInit
// write pre-init user code here
salvarDadosPessoais = new Command ("SALVAR", "Salvar Dados", Command.OK, 0);//GEN-LINE:|125-getter|1|125-postInit
// write post-init user code here
}//GEN-BEGIN:|125-getter|2|
return salvarDadosPessoais;
}
COM: <s> returns an initiliazed instance of salvar dados pessoais component </s>
|
funcom_train/1239048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAllowedMethods(String text) {
if (text != null) {
StringTokenizer tokenizer = new StringTokenizer(text, " ,+");
if (allowedMethods == null) {
allowedMethods = new Vector();
}
while (tokenizer.hasMoreTokens()) {
allowedMethods.add(tokenizer.nextToken());
}
}
}
COM: <s> add a list of methods to export </s>
|
funcom_train/13557493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayProgressBar() {
(new Thread(new Runnable() {
public void run() {
try {
int totalLength = passport.getTotalLength();
progressBar.setMaximum(totalLength);
while (passport.getBytesRead() <= totalLength) {
Thread.sleep(200);
progressBar.setValue(passport.getBytesRead());
}
} catch (InterruptedException ie) {
/* NOTE: interrupted, end thread. */
} catch (Exception e) {
e.printStackTrace();
}
}
})).start();
}
COM: <s> sets up the progress bar starts up the thread returns immediately </s>
|
funcom_train/3078691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listBuilds(IRequestCycle cycle){
ensureCurrentTab();
long scheduleId = ((Long) cycle.getServiceParameters()[0]).longValue();
com.luntsys.luntbuild.facades.SearchCriteria searchCriteria = new SearchCriteria();
searchCriteria.setScheduleIds(new long[]{scheduleId});
BuildList buildList = (BuildList) getComponent("buildListComponent");
buildList.setSearchCriteria(searchCriteria);
buildList.initPage(cycle);
setAction("listBuilds");
}
COM: <s> list all builds for a particular schedule </s>
|
funcom_train/12127215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintFromLayer(PBounds viewBounds, PNode repaintedLayer) {
TEMP_REPAINT_RECT.setRect(viewBounds);
viewToLocal(TEMP_REPAINT_RECT);
if (getBoundsReference().intersects(TEMP_REPAINT_RECT)) {
PBounds.intersect(TEMP_REPAINT_RECT, getBoundsReference(), TEMP_REPAINT_RECT);
repaintFrom(TEMP_REPAINT_RECT, repaintedLayer);
}
}
COM: <s> repaint from one of the cameras layers </s>
|
funcom_train/34038031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean semanticEventAfter(SemanticEvent se, String msg) {
if (MSG_LINKSCAN==msg && isActive()) scan();
else if (MSG_SET_ACTIVE==msg) setActive(Booleans.parseBoolean(se.getArg(), !isActive()));
else if (Document.MSG_CLOSE==msg && getDocument()==se.getArg()) links.clear();
return super.semanticEventAfter(se,msg);
}
COM: <s> semantic events toggle link scan close document cleans up link list </s>
|
funcom_train/4524152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getHierarchyRect(TimeBarRow row) {
if (!isRowDisplayed(row)) {
return null;
} else {
int y = yForRow(row);
Rectangle rect = new Rectangle(_hierarchyRect.x, y, _hierarchyWidth, _timeBarViewState.getRowHeight(row));
return rect;
}
}
COM: <s> calculate the rectangle for drawing the hierachy marker of a given row </s>
|
funcom_train/1241265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MessageElement getChildElement(QName qname) {
if (children != null) {
for (Iterator i = children.iterator(); i.hasNext();) {
MessageElement child = (MessageElement) i.next();
if (child.getQName().equals(qname))
return child;
}
}
return null;
}
COM: <s> convenience method to get the first matching child for a given qname </s>
|
funcom_train/26096526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Function getFunction() {
if (function != null && function.eIsProxy()) {
InternalEObject oldFunction = (InternalEObject)function;
function = (Function)eResolveProxy(oldFunction);
if (function != oldFunction) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, MCRL2Package.FUNCTION_CALL__FUNCTION, oldFunction, function));
}
}
return function;
}
COM: <s> returns the value of the em b function b em reference </s>
|
funcom_train/4867432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderWeaponInfo(Entity entity, Renderer renderer, Camera camera, TimeUnit alpha) {
Components comps = entity.getComponents();
ItemsEquippedComponent equipped = comps.getComponent(ItemsEquippedComponent.class);
if ( equipped != null ) {
Weapon weapon = equipped.getWeapon();
if ( weapon != null ) {
ReloadComponent reloadComponent = weapon.getReloadComponent();
renderer.drawString(reloadComponent.getAmmoBag() + "/" + reloadComponent.getAmmoInClip(), 10, 20);
}
}
}
COM: <s> renders the weapon information </s>
|
funcom_train/12867105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasInheritDoc(AST comment) {
for (AST child = comment.getFirstChild(); child != null;
child = child.getNextSibling()) {
switch (child.getType()) {
case JavadocTokenTypes.TAG_INLINE_INHERITDOC:
return true;
default:
return false;
} // end switch
} // end for
return false;
} // end hasInheritDoc()
COM: <s> determines whether the description for the given javadoc comment starts with the </s>
|
funcom_train/34784628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveListChangeListener() {
theList.removeListChangeListener(listener);
theList.add("Hello");
theList.set(0, "Bye");
theList.remove(0);
// make sure the listener wasn't notified
assertEquals(0, listener.nItemsAdded);
assertEquals(0, listener.nItemsRemoved);
assertEquals(0, listener.nItemsChanged);
}
COM: <s> test of remove list change listener method of class com </s>
|
funcom_train/2759056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void digUpIterfaces(Class classOrInterface, Set set) {
if(classOrInterface.isInterface()) {
set.add(classOrInterface);
}
if(classOrInterface.getSuperclass() != null) {
digUpIterfaces(classOrInterface.getSuperclass(), set);
}
Class[] interfaces = classOrInterface.getInterfaces();
for(int i = 0; i < interfaces.length; i++) {
digUpIterfaces(interfaces[i], set);
}
}
COM: <s> helper method that digs up all the interfaces for supplied handler </s>
|
funcom_train/1868996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLDAPAttribute() throws GamaLDAPException {
try {
LDAPModification ldapModification = new LDAPModification(
LDAPModification.ADD, m_ldapAttr);
LDAPConnection ldapConnection = GamaLDAPConnectionManager
.getConnection();
ldapConnection.modify(m_dn, ldapModification);
} catch (LDAPException e) {
GamaLDAPException gamaLDAPException = GamaLDAPExceptionFactory
.getGamaLDAPException(e);
throw gamaLDAPException;
} finally {
GamaLDAPConnectionManager.disconnect();
}
}
COM: <s> adds the value to the given attribute creating the attribute if it does </s>
|
funcom_train/4094912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInflowPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EconomicResource_inflow_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EconomicResource_inflow_feature", "_UI_EconomicResource_type"),
ReamodelPackage.Literals.ECONOMIC_RESOURCE__INFLOW,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the inflow feature </s>
|
funcom_train/14462138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllRecords(){
// this.setSheetRecs();
XLSRecord[] rx = new XLSRecord[SheetRecs.size()];
SheetRecs.toArray(rx);
for(int t=0;t<rx.length;t++){
this.removeRecFromVec(rx[t]);
rx[t] = null;
}
SheetRecs.clear();
System.gc();
}
COM: <s> remove all sheet records from sheet </s>
|
funcom_train/4717566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPitchPureData() {
SynMessage msg = new SYN(SYN.PUREDATA).synth(1).voice(1).pitch(261.6256);
assertEquals("FTi", msg.getTypetag());
assertEquals(new Integer(66976), msg.getArguments()[2]);
assertEquals("/SYN/ID1/V1/PITCH", msg.getAddress());
}
COM: <s> voice pitch in hz for pure data </s>
|
funcom_train/26093681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getValue() {
if ( dirty ) {
double sum = 0.0f;
Iterator it = incomingConns.iterator();
while ( it.hasNext() ) {
Connection conn = (Connection) it.next();
sum += conn.read();
}
value = Math.min( Math.max( func.apply( sum ), -Double.MAX_VALUE ), Double.MAX_VALUE );
dirty = false;
}
return value;
}
COM: <s> only calculate value if dirty false otherwise returned cached value </s>
|
funcom_train/11672442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveSettings() {
/*
* Ok, note we ensure we have a .chainsaw directory in the users
* home folder, and create a chainsaw.settings.properties file..
*/
File settingsDir = getSettingsDirectory();
if (!settingsDir.exists()) {
settingsDir.mkdir();
}
saveGlobalSettings(settingsDir);
saveProfileableSetting(settingsDir);
}
COM: <s> creates a save settings event and calls all the settings listeners </s>
|
funcom_train/19318296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInt(String name, int value) throws JMSException {
if(isBodyModifiable()) {
try {
map.put(name, new Integer(value));
}
catch(NullPointerException e) {
throw new JMSException(e.getMessage());
}
}
else {
throw new MessageNotWriteableException("MapMessage read_only");
}
}
COM: <s> sets an code int code value with the specified name into the map </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.