__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/21503632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDirectFeedthroughExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InputDefinition_directFeedthroughExpression_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InputDefinition_directFeedthroughExpression_feature", "_UI_InputDefinition_type"),
DMLPackage.Literals.INPUT_DEFINITION__DIRECT_FEEDTHROUGH_EXPRESSION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the direct feedthrough expression feature </s>
|
funcom_train/8995053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RuleBaseObject getRuleBaseObjectByRuleSeqNo(File kbFile, String ruleSeqNo) throws ApplicationException {
RuleMemberFactory factory = new RuleMemberFactory();
Rule rule = this.getRuleByRuleSeqNo(kbFile, ruleSeqNo);
return factory.getRuleData(rule);
}
COM: <s> get rule base object by rule seq no </s>
|
funcom_train/34479390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchToCommit(SerializableRef commitRef) throws SdaiException {
if(Implementation.remoteSupport) {
if(bridgeSession == null) {
throw new SdaiException(SdaiException.SY_ERR, "Not connected to sqlBridge");
}
unlinkRemoteRepositories();
bridgeSession.switchToCommit(commitRef);
linkRemoteRepositories();
} else {
throw new SdaiException(SdaiException.FN_NAVL, AdditionalMessages.RC_NAVL);
}
}
COM: <s> switches remote repositories to specified commit point </s>
|
funcom_train/31477230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draggedTo(int x, int y) {
int bonus =
orientation == VERTICAL ?
(int)(((double)(y - draggedBeginY) / (double)(upperBound - lowerBound)) * maximum) :
(int)(((double)(x - draggedBeginX) / (double)(upperBound - lowerBound)) * maximum);
setValue(draggBeginValue + bonus);
}
COM: <s> calculates the relative position to the start dragging position </s>
|
funcom_train/20043444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _getGopherProxyAddress() {
String gopherProxyAddress = oObj.getGopherProxyAddress();
String expectedGopherProxyAddress = (String)
expectedProxies.get("gopherProxyAddress");
tRes.tested("getGopherProxyAddress()",
gopherProxyAddress.equals(expectedGopherProxyAddress));
}
COM: <s> calls code get gopher proxy address code and verifies its result with </s>
|
funcom_train/40107212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _generatePrefixes(final Reifiable reifiable) {
if (reifiable instanceof Typed) {
_getTopicReference(((Typed) reifiable).getType());
}
if (reifiable instanceof Scoped) {
_generateTopicReferences(((Scoped) reifiable).getScope());
}
if (reifiable.getReifier() != null) {
_getTopicReference(reifiable.getReifier());
}
}
COM: <s> generates the prefixes for the specified construct </s>
|
funcom_train/5793745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OnmsNode findNodeByID(Integer nodeid){
Logger log = getLog();
if (nodeid==null) throw new IllegalArgumentException("OssDaoOpenNMSImpl().findNodeByLabel: Illegal value: nodeid null or empty ");
OnmsNode node=null;
try {
node = (OnmsNode)this.nodeCacheByID.get(nodeid);
} catch (Exception ex){
log.error("\tOssDaoOpenNMSImpl().findNodeByLabel ERROR : ", ex);
}
return node; //null if not found
}
COM: <s> returns the onms node for the supplied node id </s>
|
funcom_train/44782119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleDialogEvent(DialogEvent e) {
if(e.getEventId() == DialogEvent.CLOSE) {
getDialog().close(true);
} else if(e.getEventId() == DialogEvent.CLOSED ||
e.getEventId() == DialogEvent.DISPOSED) {
ApplicationEventManager.getInstance().removeApplicationEventListener(this);
}
}
COM: <s> if the event has id close the controller tells the dialog to close </s>
|
funcom_train/32943497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean moveMapElementDown(String complexElementName, String simpleElementName) {
MapType mt;
try {
mt = (MapType) getElement(complexElementName).getValue();
return mt.moveElementDown(crawlerSettings, simpleElementName);
}
catch (AttributeNotFoundException e) {
log.error("Could not find map with name " + complexElementName, e);
return false;
}
}
COM: <s> move a map element down </s>
|
funcom_train/34314408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAllNeurons(Collection<Neuron> neurons) {
if (neurons == null) {
throw new IllegalArgumentException("Neurons collection should not be null.");
}
Neuron[] items = neurons.toArray(new Neuron[0]);
boolean nothingAdded = true;
for (Neuron item : items) {
nothingAdded &= !this.addNeuron(item);
}
return !nothingAdded;
}
COM: <s> adds connections to all specified </s>
|
funcom_train/16676905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getMinimumRatioFor(Rectangle bounds) {
float part = 0, whole = 0;
if (getSash( ).isVertical( )) {
part = children[0].getMinimumWidth( );
whole = bounds.width;
}
else {
part = children[0].getMinimumHeight( );
whole = bounds.height;
}
return (part != 0) ? part / whole : IPageLayout.RATIO_MIN;
}
COM: <s> obtain the minimum ratio required to display the control on the br </s>
|
funcom_train/48411175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addDropHandler(com.smartgwt.client.widgets.events.DropHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.DropEvent.getType()) == 0) setupDropEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.DropEvent.getType());
}
COM: <s> add a on drop handler </s>
|
funcom_train/9859774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeButton() {
((ADTreeModel.Node) getPath().getParentPath().getLastPathComponent()).removeSubNode((ADTreeModel.Node) getPath().getLastPathComponent());
aEditor.aCurrentEditPanel = null;
aEditor.setSelectionPath(getPath().getParentPath());
}
COM: <s> this function is called if the remove button was pressed </s>
|
funcom_train/51616515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumberingLen( int numberingLen ) {
if( numberingLen <= 0 ) return;
this.numberingLen = numberingLen;
char[] chFormat = new char[numberingLen];
for( int i=0; i<numberingLen; i++ )
chFormat[i] = '0';
String strFormat = new String(chFormat);
numFormat = new DecimalFormat( strFormat );
}
COM: <s> set how many digits to have at a minimum in the filename </s>
|
funcom_train/39913991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLabel7() {
System.out.println("getLabel7");
Page1 instance = new Page1();
Label expResult = null;
Label result = instance.getLabel7();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get label7 method of class timesheetmanagement </s>
|
funcom_train/10345396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initMaps() {
int i;
ASN1ObjectIdentifier oid;
if (a2oid_ == null) {
a2oid_ = new HashMap();
oid2a_ = new HashMap();
for (i = 0; i < keys_.length; i++) {
oid = new ASN1ObjectIdentifier(oids_[i]);
a2oid_.put(keys_[i], oid);
oid2a_.put(oid, keys_[i]);
}
}
}
COM: <s> this method initializes the hashmaps which are needed to create the </s>
|
funcom_train/50077216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(32);
sb.append(this.getClass().getName());
sb.append(" [");
sb.append("name=");
sb.append(getName());
sb.append("]");
return sb.toString();
}
COM: <s> returns a string representation of the object </s>
|
funcom_train/26065766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyKeyPadGridOnItemClickListener() {
this.keyBoardGrid.setOnItemClickListener(new OnItemClickListener(){
@Override
public void onItemClick(final AdapterView<?> arg0, final View v, final int arg2, final long arg3) {
/* Extract the Caption of the Button. */
final String theCaption = ((Button)v).getText().toString();
SDStreet.this.handleButtonClickByCaption(theCaption);
}
});
}
COM: <s> applies a on item click listener to the number pad grid </s>
|
funcom_train/44872598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setYMin(double ymin) {
CoordinateRect cr = this.getCoordinateRect();
if (ymin < cr.getYmax()) {
cr.setLimitsLazy(cr.getXmin(), cr.getXmax(), ymin, cr.getYmax());
} else {
cr.setLimitsLazy(cr.getXmin(), cr.getXmax(), ymin, ymin + 1);
}
cr.setRestoreBuffer();
}
COM: <s> set the min value for the y axis </s>
|
funcom_train/49719609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ProjectTree getProjectTree(String pathWay) {
if (treeJPanel == null) {
String datatype = "mzXML";
// String xmlPath = "";
DefaultMutableTreeNode top = new DefaultMutableTreeNode(getProjectName(pathWay));
treeJPanel = new ProjectTree(this, top, datatype, pathWay);
}
return treeJPanel;
}
COM: <s> this method initializes j tree </s>
|
funcom_train/3174338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float get(String key, float def) {
// Get property by key
String result = get(key,(String)null);
// .. existing ?
if (result==null)
return def;
// .. number ?
try {
return Float.valueOf(result.trim()).floatValue();
} catch (NumberFormatException ex) {
}
return def;
}
COM: <s> returns float parameter to key </s>
|
funcom_train/31160318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLibrary(String libraryClassname) throws ClassNotFoundException, InvalidLibraryException {
// Class library = Class.forName(libraryClassname);
Class library = getClass().getClassLoader().loadClass(libraryClassname);
if (library.getSuperclass().equals(alice.tuprolog.Library.class))
libraries.add(libraryClassname);
else
throw new InvalidLibraryException(libraryClassname,-1,-1);
}
COM: <s> add a library to the manager </s>
|
funcom_train/18861278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleAdd() {
FormPropertyType formProperty = StrutsConfigFactory.eINSTANCE
.createFormPropertyType();
formProperty.setName("name");
formProperty.setType("type");
Command cmd = AddCommand.create(getEditingDomain(), getFormBean(),
StrutsConfigPackage.eINSTANCE.getFormBeanType_FormProperties(),
formProperty);
if (cmd.canExecute()) {
getEditingDomain().getCommandStack().execute(cmd);
}
}
COM: <s> adds a prototype form property element to the form bean element </s>
|
funcom_train/22285546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getURL(String src) {
//String urlStr = getKey(src);
URL url = getURLResource(src);
if (url != null) return url;
try {
url = getURL(base, src);
// check URL
InputStream in = url.openStream();
if (in != null) {
in.close();
}
return url;
} catch(Exception e) {
URL urlRsc = getResourceURL(src);
return (urlRsc != null) ? urlRsc : url;
}
}
COM: <s> construct the absolute url for a resource </s>
|
funcom_train/49823945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection(String projectId) {
if (Log.isDebugEnabled()) {
Log.debug("PV-MAIN: got put ProjectInfoPanel + " + projectId + " on show");
}
ProjectInfoPanel pif = (ProjectInfoPanel) list.find(infoPanel).getInstance();
pif.setProject(projectId);
show(infoPanel, false);
}
COM: <s> sets selection of project on the project information panel </s>
|
funcom_train/33212259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getBounds() {
Rectangle r = null;
if (m_vectDrawable != null)
for (Enumeration<CarteDrawable> e = m_vectDrawable.elements() ; e.hasMoreElements() ;)
if (r==null)
r = new Rectangle(((CarteDrawable) e.nextElement()).getBounds());
else
r.add(((CarteDrawable) e.nextElement()).getBounds());
return r;
}
COM: <s> get the bounds of what is drawn </s>
|
funcom_train/118957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CellView getNextViewAt(CellView current, int x, int y) {
Object[] sel =
graphLayoutCache.order(getSelectionModel().getSelectables());
CellView[] cells = graphLayoutCache.getMapping(sel);
CellView cell = getNextViewAt(cells, current, x, y);
return cell;
}
COM: <s> returns the next view at the specified location wrt </s>
|
funcom_train/19648908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(int type) throws IllegalArgumentException {
// Convert the type to a string
switch (type) {
case TYPE_SHOCKWAVE:
this.embedTypeString = "application/x-shockwave-flash";
break;
default:
throw new IllegalArgumentException("type invalid: Unrecognized type");
}
// Save the new type
this.embedType = type;
}
COM: <s> set the type of embedded </s>
|
funcom_train/29874138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getm_SideTwoNameLabel()
{
if (m_SideTwoNameLabel == null)
{
m_SideTwoNameLabel = new JLabel();
m_SideTwoNameLabel.setPreferredSize(new Dimension(200,25));
m_SideTwoNameLabel.setBorder(BorderFactory.createEtchedBorder());
}
return m_SideTwoNameLabel;
}
COM: <s> this method initializes m side two name label </s>
|
funcom_train/36670840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createTempJobFolder() {
log.info("Creating temporary work directory " + tmpPrefix);
File tmp = new File(tmpPrefix);
boolean tmpOK = tmp.mkdir();
boolean workOK = true;
// return true only if both directories could be created
return (tmpOK && workOK);
}
COM: <s> attempt to create a directory on the filesystem for job specific content </s>
|
funcom_train/50716435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fadeOut(double fadeLength){
Enumeration enum = this.phraseList.elements();
while(enum.hasMoreElements()){
Phrase nextPhrase = (Phrase)enum.nextElement();
//make the correction for phrases that don't end at the same time as the CPhrase does
nextPhrase.fadeOut(fadeLength,(this.getEndTime() - nextPhrase.getEndTime()));
}
}
COM: <s> linearly fades out the cphrase </s>
|
funcom_train/22277538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void describeClassInfo(ClassInfo info) {
info.addClass("netscape.application.Rect", 1);
info.addField(X_KEY, INT_TYPE);
info.addField(Y_KEY, INT_TYPE);
info.addField(WIDTH_KEY, INT_TYPE);
info.addField(HEIGHT_KEY, INT_TYPE);
}
COM: <s> describes the rect class coding information </s>
|
funcom_train/26220434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyReplace(MonadicOperator fun) {
for(int i=1; i <= this.getRows(); i++){
for(int j=1; j <= this.getCols(); j++) {
this.setEntry(i, j, fun.apply(this.getEntry(i, j)));
}
}
}
COM: <s> sets this matrix to the result of applying a specified function </s>
|
funcom_train/48655654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(RevenueSource rsbo, Connection conn) throws Exception{
// check the dirty flag in the object. if it is dirty,
// run update or insert
if (rsbo.isDirty()) {
if (rsbo.isInDB()) {
update(rsbo, conn);
}else{
insert(rsbo, conn);
}
// set the dirty flag to false now that we've saved it
rsbo.setDirty(false);
}
}
COM: <s> saves the repair object to the database </s>
|
funcom_train/28425037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
TableArray ta = new TableArray();
Iterator it = keySet().iterator();
while ( it.hasNext() ) {
Point p = ( Point ) it.next();
ta.put( p, get( p.x, p.y ) );
}
return ta;
}
COM: <s> clone this table array </s>
|
funcom_train/7508306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getServerName() {
String name = getHttpServletRequest().getServerName();
String clean = "";
try {
clean = ESAPI.validator().getValidInput("HTTP server name: " + name, name, "HTTPServerName", 100, false);
} catch (ValidationException e) {
// already logged
}
return clean;
}
COM: <s> returns the server name host header from the http servlet request after </s>
|
funcom_train/12811895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void recordCollectionOrClassMapping(String s){
//See the super class "ConfigurationDefaultHandler"
//This method duplicates the super method, with a new feature for entries
super.recordCollectionOrClassMapping(s);
//If the element name equals "class_mapping", record the class mapping in entries configuration (exactly in entries mapping)
if(str.equals("class_mapping")){
configurationEntry.getMapping().setTypeMapping(s);
}
}
COM: <s> record the collection or class mapping element </s>
|
funcom_train/43407848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTextField getTxtProductTypeID() {
if (txtProductTypeID == null) {
txtProductTypeID = new JTextField();
txtProductTypeID.setColumns(8);
txtProductTypeID.setEditable(false);
ProductTypeManager productTypeManager = ServiceLocator.getProductTypeManager();
txtProductTypeID.setText(productTypeManager.getNewProductTypeID() + "");
txtProductTypeID.setBounds(new java.awt.Rectangle(0,15,141,21));
}
return txtProductTypeID;
}
COM: <s> this method initializes j text field </s>
|
funcom_train/18150062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreAdmitTestInd(BL preAdmitTestInd) {
if(preAdmitTestInd instanceof org.hl7.hibernate.ClonableCollection)
preAdmitTestInd = ((org.hl7.hibernate.ClonableCollection<BL>) preAdmitTestInd).cloneHibernateCollectionIfNecessary();
_preAdmitTestInd = preAdmitTestInd;
}
COM: <s> sets the property pre admit test ind </s>
|
funcom_train/2324515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean forEach(cern.colt.function.tfloat.FloatProcedure procedure) {
float[] theElements = buffer.elements();
int theSize = (int) size();
for (int i = 0; i < theSize;)
if (!procedure.apply(theElements[i++]))
return false;
return true;
}
COM: <s> applies a procedure to each element of the receiver if any </s>
|
funcom_train/48229156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(char[] cs, int first, int size) {
ensureCapacity(this.size + size);
int maxFill = buffer.length - tail;
if (size < maxFill) {
System.arraycopy(cs, first, buffer, tail, size);
} else {
System.arraycopy(cs, first, buffer, tail, maxFill);
System.arraycopy(cs, first, buffer, 0, size - maxFill);
}
tail = (tail + size) % buffer.length;
this.size += size;
}
COM: <s> adds a part of the given array of characters to this queue </s>
|
funcom_train/23362810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadPlugins() {
pickingPlugin = new MyPickingGraphMousePlugin();
animatedPickingPlugin = new AnimatedPickingGraphMousePlugin();
translatingPlugin = new TranslatingGraphMousePlugin(
InputEvent.BUTTON1_MASK);
scalingPlugin = new ScalingGraphMousePlugin(
new CrossoverScalingControl(), 0, in, out);
rotatingPlugin = new RotatingGraphMousePlugin();
shearingPlugin = new ShearingGraphMousePlugin();
editingPlugin = new MyEditingGraphMousePlugin();
add(scalingPlugin);
setMode(Mode.EDITING);
}
COM: <s> create the plugins and load the plugins for transforming mode </s>
|
funcom_train/47314289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getNotStopButton() {
if (notStopButton == null) {
notStopButton = new JButton();
notStopButton.setText(localization
.getProperty("loc-Gui2007-notStopButton"));
notStopButton.setForeground(Color.RED);
notStopButton
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
emergencyStop();
}
});
}
return notStopButton;
}
COM: <s> this method initializes not stop button </s>
|
funcom_train/18472298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeKeywords(long id, String keywords)
throws SQLException
{
m_changeKeywordsStmt.clearParameters();
m_changeKeywordsStmt.setString(1, keywords);
m_changeKeywordsStmt.setLong(2, id);
m_changeKeywordsStmt.executeUpdate();
// Invalidate caches
//
COM: <s> changes object keywords </s>
|
funcom_train/44660543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFinishSuccessMessage() {
ActionCommand callingCommand = getCallingCommand();
if (callingCommand != null) {
String[] successMessageKeys = new String[] { callingCommand.getId() + "." + SUCCESS_FINISH_MESSAGE_KEY,
DEFAULT_FINISH_SUCCESS_MESSAGE_KEY };
return getMessage(successMessageKeys, getFinishSuccessMessageArguments());
}
return getMessage(DEFAULT_FINISH_SUCCESS_MESSAGE_KEY);
}
COM: <s> returns the message to use upon succesful finish </s>
|
funcom_train/46039220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String pop() {
List<Object[]> stack = stackHolder.get();
if (stack.size() == 0) {
return null;
} else {
Object[] o = stack.remove(stack.size() - 1);
if ( o != null && o.length > 0 ) {
return (String) o[0];
}
return null;
}
}
COM: <s> remove a node name from the stack on the current thread </s>
|
funcom_train/16914195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void goStraight(double amount) {
if (amount == 0) {
return;
}
if (!isBlocked()) {
double radians = getHeadingRadians();
setX(getX() + (float) (amount * Math.cos(radians)));
setY(getY() - (float) (amount * Math.sin(radians)));
}
}
COM: <s> move the entity in a straight line relative to its current heading </s>
|
funcom_train/34787976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onSaveClusters() {
Frame frame = JOptionPane.getFrameForComponent(getContentComponent());
try {
ExperimentUtil.saveAllExperimentClusters(frame, getExperiment(), getData(), getClusters());
} catch (Exception e) {
JOptionPane.showMessageDialog(frame, "Can not save clusters!", e.toString(), JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
}
}
COM: <s> saves all clusters </s>
|
funcom_train/1853350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComponent drawPic(String datafile, final String label) {
Graph g = null;
try {
g = new GraphMLReader().readGraph(datafile);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
return drawPic(g, label);
}
COM: <s> to draw the picture based on the data file </s>
|
funcom_train/27845263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProcessUnconsumedEventWithNoParent() {
MockViewSupport viewSupport = new MockViewSupport();
ViewSupport.setViewSupport(viewSupport);
DefaultContext context = new DefaultContext();
ActionController childController = new ActionController();
ActionEvent inEvent = new ActionEvent(new Object(), "test");
context.setLocale(Locale.UK);
childController.setContext(context);
childController.processEvent(inEvent);
assertTrue(viewSupport.isErrorShowing());
}
COM: <s> tests process unconsumed event with no parent </s>
|
funcom_train/19296005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getArimaMenuBar() {
if (arimaMenuBar == null) {
arimaMenuBar = new JMenuBar();
arimaMenuBar.add(getSpecMenu());
arimaMenuBar.add(getEstMenu());
arimaMenuBar.add(getModelCheckMenu());
arimaMenuBar.add(getForecastMenu());
}
return arimaMenuBar;
}
COM: <s> this method initializes j jmenu bar </s>
|
funcom_train/2879355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCaseTCP14() throws Throwable {
Integer expected = new Integer(1000);
application = deployExpectingSuccess(FILES + "tcp14.sf", "tcp14");
assertNotNull(application);
Integer actual = (Integer) (application.sfResolve("test"));
assertEquals(expected, actual);
}
COM: <s> tests product function </s>
|
funcom_train/19421601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(String key, Object record) throws IllegalArgumentException {
if (!open) {
throw new IllegalArgumentException("Database \"" + databaseName + "\": Database is not open.");
}
if (data.containsKey(key)) {
throw new IllegalArgumentException("Database \"" + databaseName + "\": Record already exists in database; key=\"" + key + "\".");
}
data.put(key, record);
}
COM: <s> p inserts a single record into the database using the specified key </s>
|
funcom_train/19351189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected OWLDataType createDatatype(OWLOntology onto, URI uri) throws SAXException {
/* Get a new class */
OWLDataType entity = null;
try {
// logger.debug( "Creating: " + subj );
entity = factory.getOWLConcreteDataType( uri );
AddDataType ae = new AddDataType(onto, entity, null);
applyChange( ae );
definitelyDatatypes.add( uri );
} catch (OWLException e) {
logger.warn(e);
}
return entity;
}
COM: <s> method create datatype </s>
|
funcom_train/265864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String toConditionalIntString(double d) {
Object[] obs={new Double(d)};
if (d<10.0)
return MessageFormat.format("{0,number,0.#}",obs);
else
return MessageFormat.format("{0,number,##0}",obs);
}
COM: <s> conditionally converts a double into a formatted string </s>
|
funcom_train/1578236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadConstant(final double value) {
if ( value == 0 ) {
addCode(2, Opcode.DCONST_0);
} else if ( value == 1 ) {
addCode(2, Opcode.DCONST_1);
} else {
ConstantInfo info = ConstantDoubleInfo.make(mCp, value);
mInstructions.new LoadConstantInstruction(2, info, true);
}
}
COM: <s> generates code that loads a constant double value onto the stack </s>
|
funcom_train/170568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reload() {
setKeeper(Commons.getModel().getVerein().getTorwartTrainer());
setCoTrainer(Commons.getModel().getVerein().getCoTrainer());
setTrainer(Commons.getModel().getTrainer().getTrainer() - 1);
}
COM: <s> populate the staff with ho actual value called after each ho refresh command </s>
|
funcom_train/22052715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEditMode(boolean fEditMode) {
// if ( fEditMode )
// Misc.debug( this, "Turn edit mode for BRTableModel on" );
// else
// Misc.debug( this, "Turn edit mode for BRTableModel off" );
m_fEditMode = fEditMode;
}
COM: <s> set the table enabled for editing or not </s>
|
funcom_train/40611560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table getTableOrView(Session session, String name) {
Table table = tablesAndViews.get(name);
if (table == null) {
if (session != null) {
table = session.findLocalTempTable(name);
}
if (table == null) {
throw DbException.get(ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1, name);
}
}
return table;
}
COM: <s> get the table or view with the given name </s>
|
funcom_train/22782998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents() {
// build root component
tag2Menu.put(tagTreeRoot, this);
menu2Tag.put(this, tagTreeRoot);
// register listeners
tagTreeRoot.addListener((CollectionListener<TagGroup, TagGroup>) this);
tagTreeRoot.addListener((BeanListener<TagGroup>) this);
// build up submenu
buildSubTree(this, tagTreeRoot);
}
COM: <s> build up swing components </s>
|
funcom_train/31106511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getSecurityRoles() {
Set roles = new TreeSet();
String rolesString = _props.getProperty( SECURITY_ROLES_PROP, "" );
StringTokenizer tokens =
new StringTokenizer( rolesString, ", " );
while (tokens.hasMoreTokens()) {
roles.add( tokens.nextToken() );
}
return roles;
}
COM: <s> get the security roles defined for this bundle </s>
|
funcom_train/39186222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
img = ip.createImage();
ImageCanvas ic = new PlotsCanvas(this);
win = new ImageWindow(this, ic);
while(ic.getMagnification()<1.0)
ic.zoomIn(0,0);
Dimension d = win.getSize();
int w = getWidth()+20;
int h = getHeight()+20;
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
if (w>screen.width)
w = screen.width-20;
if (h>(screen.height+100))
h = screen.height-100;
win.setSize(w, h);
win.validate();
repaintWindow();
IJ.showStatus("");
}
COM: <s> overrides image plus </s>
|
funcom_train/18033291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrimitiveSeries getScenario(final int index) {
final Array1D<Double> tmpSlicedRow = myResults.sliceRow(index, 0);
return new PrimitiveSeries() {
public int size() {
return tmpSlicedRow.size() + 1;
}
@Override
public double value(final int index) {
if (index == 0) {
return myInitialValue;
} else {
return tmpSlicedRow.doubleValue(index - 1);
}
}
};
}
COM: <s> a series representing one scenario </s>
|
funcom_train/3703079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
//// 1. Quick test of class.
if (obj instanceof Access == false) {
return (false);
}
//// 2. Do a tuple comparison.
Access svcAA = this;
Access svcBB = (Access) obj;
return (svcAA.toTuple().equals(svcBB.toTuple()));
} // of method
COM: <s> strict equals comparison looks for exact matches </s>
|
funcom_train/1512512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String save() throws Exception{
if( this.getComment() != null ){
if( this.getComment().getId() == null || this.getComment().getId() == 0 ){
this.getCommentService().insert(getComment());
}else{
this.getCommentService().update(getComment());
}
}
return "success";
}
COM: <s> save the comments </s>
|
funcom_train/5480641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processCommandsForPitch(String currentPitch,String newPitch) throws TextPrinterException {
if (!currentPitch.equals(newPitch))
if (!newPitch.equals("")) {
String mappedPitch=getBestPitchCommand(newPitch);
if (mappedPitch==null) return;
mappedPitch=this.replaceParameter(mappedPitch,newPitch);
executeCommand(this.CMD_PITCH,mappedPitch);
}
}
COM: <s> enable new pitch </s>
|
funcom_train/44215988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Robot getRobot(Component c) throws IllegalStateException, AWTException {
Window w;
if(c instanceof Window)
w = (Window)c;
else
w = SwingUtilities.windowForComponent(c);
if(w == null)
throw new IllegalStateException("Window not found for Component: " + c);
GraphicsDevice gd = w.getGraphicsConfiguration().getDevice();
if(! robots.containsKey(gd)) {
Robot r = new Robot(gd);
r.setAutoDelay(0);
r.setAutoWaitForIdle(true);
robots.put(gd, r);
}
return (Robot)robots.get(gd);
}
COM: <s> return a robot for the given component </s>
|
funcom_train/12906253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean consistentWith(PartialBindingSet other) {
Iterator <PartialBinding> i = entries.iterator();
while(i.hasNext()) {
PartialBinding oneOfMine = i.next();
if (!other.consistentWith(oneOfMine, this)) {
return false;
}
}
return true;
}
COM: <s> two partial binding sets are consitant if all of the component </s>
|
funcom_train/20617696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateEmailAddress(String macAddress, String eMailAddress) {
Connection con = db.iDisplayClientConnenction();
Statement stmt = null;
try {
stmt = con.createStatement();
String postgresqlQuery = "UPDATE idisplayclientuser SET "
+ "emailaddress = '" + eMailAddress + "' "
+ "WHERE macaddress = '" + macAddress + "'";
stmt.execute(postgresqlQuery);
stmt.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
COM: <s> changes the e mail address </s>
|
funcom_train/12924180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readRate(final int value) {
final int rate;
switch (value) {
case 0:
rate = SoundRate.KHZ_5K;
break;
case Coder.BIT2:
rate = SoundRate.KHZ_11K;
break;
case Coder.BIT3:
rate = SoundRate.KHZ_22K;
break;
case Coder.BIT2 | Coder.BIT3:
rate = SoundRate.KHZ_44K;
break;
default:
rate = 0;
break;
}
return rate;
}
COM: <s> convert the code representing the rate into actual khz </s>
|
funcom_train/24187378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateBounds(Val value, int child, U newLb, U newUb) {
Integer index = valuePointer.get(value);
// set the new bounds
lb.get(index).set(child, newLb);
ub.get(index).set(child, newUb);
// recalculate the global upper and lower bounds
computeLB(value);
computeUB(value);
}
COM: <s> updates the bounds </s>
|
funcom_train/7612323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void assertOffScreenAbove(View origin, View view) {
int[] xy = new int[2];
view.getLocationOnScreen(xy);
int[] xyRoot = new int[2];
origin.getLocationOnScreen(xyRoot);
int y = xy[1] - xyRoot[1];
assertTrue("view should have y location less than that of origin view",
y < 0);
}
COM: <s> assert that view is above the visible screen </s>
|
funcom_train/26598530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close()throws DException{
try{
for (int i = 0; i < list.size(); i++) {
((RandomAccessFile)list.get(i)).close() ;
}
}
catch(Exception fnfe) {
throw new DException("DSE2025",new Object[] {fnfe.getMessage()});
}
}
COM: <s> it closes all power files which are created for the database </s>
|
funcom_train/10190268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onTimeout(Timer to)
{ try
{ if (to.equals(clearing_to))
{ printEventLog("Clearing timeout expired",LogLevel.HIGH);
m_sipProvider.removeSipProviderListener(m_transactionID);
changeState(STATE_TERMINATED);
transaction_listener=null;
//clearing_to=null;
}
}
catch (Exception e)
{ printException(e,LogLevel.HIGH);
}
}
COM: <s> method derived from interface timer listener </s>
|
funcom_train/9373792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadEFLinearFixed(int fileid, int recordNum, Message onLoaded) {
Message response
= obtainMessage(EVENT_GET_RECORD_SIZE_DONE,
new LoadLinearFixedContext(fileid, recordNum, onLoaded));
phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid),
0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response);
}
COM: <s> load a record from a sim linear fixed ef </s>
|
funcom_train/7510743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerEditRowButton(JButton button) {
if (editButton != null) {
throw new IllegalStateException("'editButton' already registered ("
+ editButton.getText() + ").");
}
if (button == null) {
throw new IllegalStateException("Internal error. Parameter 'button' must be not null.");
}
if (addOnly) {
button.setVisible(false);
return;
}
this.editButton = button;
button.setActionCommand("edit");
button.setName("edit");
Utils.addCheckedListener(button, this);
}
COM: <s> register edit button on dialog </s>
|
funcom_train/24194912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Identifier computeLowestID(BTNode node) {
Identifier lowestKnownID = node.getID().clone();
for (BTNode child : node.getChildren()) {
computeLowestID(child, lowestKnownID);
}
if (node.getGuard() != null) {
Identifier guardLowestIdentifier = computeLowestID(node.getGuard());
if (guardLowestIdentifier.getValue() < lowestKnownID.getValue()) {
lowestKnownID.setValue(guardLowestIdentifier.getValue());
}
}
return lowestKnownID;
}
COM: <s> computes the lowest id of a whole branch of a bt including guards </s>
|
funcom_train/33943107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String s) {
if (s == null)
s = "";
switch (this.dataType) {
case ID:
case INT:
try {
this.i = Integer.parseInt(s);
}
catch (NumberFormatException e) {
this.i = 0;
}
break;
case BOOLEAN:
this.b = s.equalsIgnoreCase("true");
break;
case PRICE:
case PERCENT:
case QUANTITY:
case DOUBLE:
this.d = DataUtils.StringToDouble(s);
break;
case DATE:
case STRING:
case TEXT:
this.s = s;
break;
}
}
COM: <s> sets the value as string </s>
|
funcom_train/19309618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getContextMessage() {
if (this.locator == null) {
return null;
}
return " Context: " + this.locator.getSystemId() + "\n"
+ " (Line " + this.locator.getLineNumber() + ", Column "
+ this.locator.getColumnNumber() + ")";
}
COM: <s> provides a formatted string showing the current locator context which </s>
|
funcom_train/22276148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
if(directory == null) throw new IllegalStateException("Initialized without setting directory to" +
" persist to.");
XStream xStream = xstreamFactory == null ? new XStream() : xstreamFactory.create();
StreamStrategy strategy = new FileStreamStrategy(directory, xStream);
list = new XmlArrayList(strategy);
}
COM: <s> initializes this xstream repository </s>
|
funcom_train/2289513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsUUID publishResource(String resourcename) throws Exception {
CmsUUID publishHistoryId = OpenCms.getPublishManager().publishResource(
this,
resourcename,
false,
new CmsShellReport(m_context.getLocale()));
OpenCms.getPublishManager().waitWhileRunning();
return publishHistoryId;
}
COM: <s> publishes a single resource printing messages to a shell report </s>
|
funcom_train/1477839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void dispatch(HttpServletRequest request, HttpServletResponse response, String newURL) {
try {
request.getRequestDispatcher(newURL).forward(request, response);
} catch (Exception se) {
debugToClient(response, "IOException with request dispatcher for redirection to " + newURL + ":<br>" + se.getMessage());
se.printStackTrace();
}
}
COM: <s> perform the dispatch to the given url </s>
|
funcom_train/37189193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getCoordinates(int ithcurve,int ithpoint) {
ArrayList abscisse = (ArrayList)columns.get(0);
ArrayList ordonnee = (ArrayList)columns.get(ithcurve+1);
String abs = ((String)abscisse.get(ithpoint)).replaceAll(",",".");
String ord = ((String)ordonnee.get(ithpoint)).replaceAll(",",".");
return new Point2D.Double(
(new Double(abs)).doubleValue(),//abscisse du ith point
(new Double(ord)).doubleValue() //ordonnee du ith point
);
}
COM: <s> return the coordinates of ith curve ith point </s>
|
funcom_train/17387341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sendingText(String text) {
Enumeration<OutgoingTextPlugin> e = outgoingTextPlugins.elements();
while (e.hasMoreElements()) {
OutgoingTextPlugin plugin = (OutgoingTextPlugin) e.nextElement();
if (((OutgoingTextCallback) plugin.getCallback()).sendingText(text, plugin.getData()) == false)
return false;
}
return true;
}
COM: <s> delay is up text is about to be sent </s>
|
funcom_train/49319709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
if (_resultComponent instanceof PrintableWithDialog) {
try {
((PrintableWithDialog) _resultComponent).print();
} catch (Exception e) {
DialogUtil.error(e);
}
} else {
DialogUtil.error(_I18N.getString("printingNotSupportedForObjType"));
}
}
COM: <s> pop up a dialog for printing the query results </s>
|
funcom_train/45538543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWidth() {
int result= 2;
if (fElementImage.getImage() != null)
result+= fElementImage.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
if (fTextVisible && fElementText.getText().length() > 0)
result+= fElementText.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
return result;
}
COM: <s> returns the width of this element </s>
|
funcom_train/35461033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPropagationToAllChildren() throws Exception {
enhanceAndCheck("dcl a aligned, 2 b, 2 c fixed bin;",
"(DATA_ITEM (NAME a) (ALIGNMENT ALIGNED)"
+ " (DATA_ITEM (LEVEL 2) (NAME b) (ALIGNMENT ALIGNED))"
+ " (DATA_ITEM (LEVEL 2) (NAME c) (ARITHMETIC FIXED BINARY) (ALIGNMENT ALIGNED)))"
);
}
COM: <s> alignment should propagate to all children </s>
|
funcom_train/27825108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getReferencedEntities() throws KAONException {
synchronized (getLock()) {
Property references=m_oimodel.getProperty(KAONVocabularyAdaptor.INSTANCE.getReferences());
if (!references.isInOIModel())
throw new KAONException("Lexical layer is not included in associated OI-model");
return getFromPropertyValues(references);
}
}
COM: <s> returns all named entities referenced by this instance </s>
|
funcom_train/25191615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyMessageListeners (final Message message) {
if (removeMessages) {
messages.remove (message);
}
if (messageListeners != null) {
if (notifyPool == null) {
createThreadPool ();
}
for (MessageListener listener : messageListeners) {
notifyPool.addTask (new NotifyTask (listener, message));
}
}
}
COM: <s> notifies message listeners when a message is added to the queue </s>
|
funcom_train/46161358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deactivate() {
//TODO Fix this to be recipient aware.
// String date = new SimpleDateFormat("h:mm a").format(new Date());
//
// String msg = "--- User " + recipient.getUser() + " has left the world at " +
// date + " ---\n";
// messageTextArea.append(msg);
messageTextField.setEnabled(false);
sendButton.setEnabled(false);
}
COM: <s> deactivates the chat by displaying a message and turning off the gui </s>
|
funcom_train/13712756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSource() {
int iChar;
char cchar;
StringBuffer result = new StringBuffer();
try {
while ((iChar = keep.read()) != -1) {
result.append((char)iChar);
}
} catch (Exception e) {
return ("fails");
}
return result.toString();
}
COM: <s> use this method to get the htmlsourcecode of the html collection as string </s>
|
funcom_train/50067780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkCompatibleAbstracts(int pos, Type t1, Type t2, Type site) {
Symbol sym = firstIncompatibility(t1, t2, site);
if (sym != null) {
log.error(pos, "types.incompatible.diff.ret", t1.toJava(), t2
.toJava(), sym.name + "(" + t2.memberType(sym).argtypes()
+ ")");
return false;
}
return true;
}
COM: <s> check that classes or interfaces do not each define an abstract method </s>
|
funcom_train/49789414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRightFormInference() throws Exception {
Frame home = assertHasFrame(root, "Home");
InputForm right = assertHasInputForm(home, "form right");
// contents of left
assertHasLabel(right, "c");
assertHasLabel(right, "d");
assertHasLabel(right, "e");
assertHasInputTextField(right, "a");
assertHasNoLabel(right, "b");
}
COM: <s> because were connected by sync wires the right form will have </s>
|
funcom_train/18805393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int result = 193;
result = 37 * result + ObjectUtils.hashCode(this.position);
result = 37 * result + ObjectUtils.hashCode(this.horizontalAlignment);
result = 37 * result + ObjectUtils.hashCode(this.verticalAlignment);
result = 37 * result + ObjectUtils.hashCode(this.spacer);
return result;
}
COM: <s> returns a hashcode for the title </s>
|
funcom_train/8094426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNode(String sNodeName) throws Exception {
int iNode = 0;
while (iNode < m_Instances.numAttributes()) {
if (m_Instances.attribute(iNode).name().equals(sNodeName)) {
return iNode;
}
iNode++;
}
throw new Exception("Could not find node [[" + sNodeName + "]]");
} // getNode
COM: <s> get node finds the index of the node with name s node name </s>
|
funcom_train/42643765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setViewZoom(float viewZoom) {
boolean changed = userZoom != viewZoom;
if (changed) {
// apply the change
oldUserZoom = userZoom;
userZoom = viewZoom;
// propagate the changes to the sub components.
for (AbstractPageViewComponent pageViewComponent : pageComponents) {
if (pageViewComponent != null) {
pageViewComponent.invalidate();
}
}
}
return changed;
}
COM: <s> sets the zoom factor of the page visualization </s>
|
funcom_train/21483550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddMissingEntry() throws Exception {
Element element = new Element("key", "value");
// Make sure the entry does not exist
assertNull(blockingCache.get("key"));
// Put the entry
blockingCache.put(element);
// Check the entry is in the cache
assertEquals(1, blockingCache.getKeys().size());
assertEquals(element, blockingCache.get("key"));
}
COM: <s> tests looking up a missing entry then adding it </s>
|
funcom_train/18785140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createContentToken(boolean whiteStart, final int whiteStartPosition, final int diff) {
if (whiteStart) {
try {
final int whiteEndPosition = fCurrentPosition - diff;
int count = whiteEndPosition - whiteStartPosition;
if (count > 0) {
fWikiModel.append(new ContentToken(new String(fSource, whiteStartPosition, count)));
}
} finally {
fWhiteStart = false;
}
}
}
COM: <s> copy the content in the resulting content token </s>
|
funcom_train/22285398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassLoader getClassLoader() {
try {
Class c = null;
if (loader instanceof ClassLoader) {
c = Class.forName("marimba.gui.PresentationClassLoader");
} else {
c = Class.forName("marimba.gui.NCPresentationClassLoader");
}
Object o = c.newInstance();
NCPresentationClassLoader pcl = (NCPresentationClassLoader)o;
return pcl.getClassLoader(this);
} catch (Throwable t) {
return getClass().getClassLoader();
}
}
COM: <s> get the class loader object for this presentation </s>
|
funcom_train/41455623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int result;
result = (scheme != null ? scheme.hashCode() : 0);
result = 31 * result + (host != null ? host.hashCode() : 0);
result = 31 * result + getPort();
result = 31 * result + (path != null ? path.hashCode() : 0);
return result;
}
COM: <s> returns a hash code value for the object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.