__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/36667336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInPortPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SynchroConnection_inPort_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SynchroConnection_inPort_feature", "_UI_SynchroConnection_type"),
DataflowSchemePackage.Literals.SYNCHRO_CONNECTION__IN_PORT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the in port feature </s>
|
funcom_train/29833372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node addNode() {
// logger.info("adding a new node to the graph");
Node node = createNode();
GraphEvent ga = new GraphEvent(node);
listenerManager.preNodeAdded(ga);
doAddNode(node);
// add the node's default attribute
if (defaultNodeAttribute != null) {
node.addAttribute((Attribute) defaultNodeAttribute.copy(), "");
}
listenerManager.postNodeAdded(ga);
// logger.fine("returning the created node and exiting addNode()");
return node;
}
COM: <s> adds a new node to the graph </s>
|
funcom_train/3081500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderEmptyCell(Element cellTD) {
ImageReference icon = treeIcons.getIcon(TreeIcons.ICON_EMPTY);
if (icon != null) {
// keep a reference
imageManager.addImage(icon);
Element imgE = ImageManager.createImgE(rc,null,icon);
cellTD.appendChild(imgE);
}
CssStyle cssStyle = createStyleFromTree(tree);
cellTD.setAttribute("style",cssStyle.renderInline());
cellTD.setAttribute("nowrap","nowrap");
}
COM: <s> renders a tree row cell that has the empty image inside it </s>
|
funcom_train/44798028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURL(final DataAdapterCall call) throws Exception {
final String xpath = "@url";
// try {
return XPathAPI.selectSingleNode(call.getDataAdapterDescriptor(),xpath).getNodeValue();
// } catch (Exception e) {
// LOG.error("Cannot get '" + xpath + "': " + e.getMessage(),e);
// throw(e);
// }
}
COM: <s> extract url attribute out of the data adapter descriptor </s>
|
funcom_train/668067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Folder getFolder(Long folderID) throws DAOObjectNotFoundException {
Session sess = null;
Transaction tx = null;
Folder folder = null;
try {
sess = DAOHibernateUtils.getSession();
tx = sess.beginTransaction();
folder = (Folder) sess.load(Folder.class, folderID);
tx.commit();
} catch (ObjectNotFoundException e) {
// No object with this ID
throw new DAOObjectNotFoundException();
} catch (HibernateException e) {
DAOHibernateUtils.reportException(e);
throw new DAOException();
} finally {
DAOHibernateUtils.closeSession(sess, tx);
}
return folder;
}
COM: <s> get the information regarding the given folder </s>
|
funcom_train/47935285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getDataObject(Factory.ObjectTypes type) {
try {
return config.getDataObjects().get(type).newInstance();
} catch (InstantiationException e) {
throw new WsdlAuditorException("Unable to instantiate RuleExeutor : " + config.getDataObjects().get(type), e);
} catch (IllegalAccessException e) {
throw new WsdlAuditorException("Unable to access RuleExeutor : " + config.getDataObjects().get(type), e);
}
}
COM: <s> gets the data object </s>
|
funcom_train/22233521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrontDistance(double frontDistance) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("LinearFog0"));
if (isLive())
((LinearFogRetained)this.retained).setFrontDistance(frontDistance);
else
((LinearFogRetained)this.retained).initFrontDistance(frontDistance);
}
COM: <s> sets front distance for fog </s>
|
funcom_train/14179991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nextTurnFinal() {
if (!bank.hasBoughtBuildings(-1)) {
finishGame();
} else {
// if the current player still has banks, then it is again his
// turn (only used in removePlayer).
while (!bank.hasBoughtBuildings(turn)) {
turn = (turn < players.size() - 1) ? turn + 1 : 0;
}
status.nextTurn();
setChanged();
notifyObservers(new ObserverMessage(ObserverMessage.TURN_CHANGED,
turn + 1));
}
}
COM: <s> sets the turn to the next player who has bought buildings </s>
|
funcom_train/47027168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initProperties(Hashtable params) {
String host = params.get(PROP_MAILHOST).toString();
String from = params.get(PROP_FROM).toString();
emailProperties.setProperty("mail.host", host);
emailProperties.setProperty("mail.from", from);
}
COM: <s> helper method to copy connection properties from the params hashtable </s>
|
funcom_train/50688087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createResponseHeader() {
getHttpServletResponse().setContentType("text/html");
getHttpServletResponse().setHeader("Cache-Control", "max-age=0");
getHttpServletResponse().setHeader("Cache", "no-cache");
}
COM: <s> creates the default response header </s>
|
funcom_train/49706767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean registerUser(String host, String user) {
log("PV register, user: " + user + '\n');
Boolean result = Boolean.TRUE;
try {
SensorBaseClient.registerUser(host, user);
}
catch (SensorBaseClientException e) {
result = Boolean.FALSE;
log("PV register: " + e.getMessage());
}
return result;
}
COM: <s> registers the user with this host </s>
|
funcom_train/40615934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int deinterleave(int dimensions, long scalar, int dim) {
int bitsPerValue = getBitsPerValue(dimensions);
int value = 0;
for (int i = 0; i < bitsPerValue; i++) {
value |= (scalar >> (dim + (dimensions - 1) * i)) & (1L << i);
}
return value;
}
COM: <s> gets one of the original multi dimensional values from a scalar value </s>
|
funcom_train/15488345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInt(int b) {
ensureCapacity(size + 4);
data[size++] = (byte) (b & 0xFF);
data[size++] = (byte) ((b & 0xFF00) >> 8);
data[size++] = (byte) ((b & 0xFF0000) >> 16);
data[size++] = (byte) ((b & 0xFF000000) >> 24);
}
COM: <s> adds an int 4 bytes </s>
|
funcom_train/36601741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidCycleIndex(int cycleIndex) {
if (cycleIndex >= 0 && cycleIndex < m_cycles.size())
return true;
logger.info("cycle index " + cycleIndex + " is not valid. Number of cycles is " + m_cycles.size() + " in AnimationGroup named " + m_name);
return false;
}
COM: <s> check if the given cycle index is within the limits </s>
|
funcom_train/7618440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) {
throwIfRecycled(bitmap);
native_drawBitmap(mNativeCanvas, bitmap.ni(), left, top,
paint != null ? paint.mNativePaint : 0, bitmap.isAutoScalingEnabled(),
bitmap.getDensityScale());
}
COM: <s> draw the specified bitmap with its top left corner at x y using </s>
|
funcom_train/13867832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertData(int offset, String arg) {
try {
XMLParserImpl.insertData(this.getJsObject(), offset, arg);
} catch (JavaScriptException e) {
throw new DOMNodeException(DOMException.INVALID_MODIFICATION_ERR, e, this);
}
}
COM: <s> this function delegates to the native method code insert data code in </s>
|
funcom_train/25581909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendCluster(ClusterLink cl, ClusterMirror mirror) {
//Get the first Treeitem of the Tree
Treeitem root = (Treeitem) getFellow("domain");
//get the domain child
Treechildren rootChildren = root.getTreechildren();
ClusterTreeitem clusterItem = this.prepareClusterItem(cl, mirror);
// after that, just append the childs into their parent nodes in the tree
rootChildren.appendChild(clusterItem);
}
COM: <s> append a cluster on the tree </s>
|
funcom_train/11620186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _populatePalmAgentImpl(String userAgent, AgentImpl agentObj) {
agentObj.setType(TYPE_PDA);
if (userAgent.indexOf("Blazer") != -1)
agentObj.setAgent(AGENT_BLAZER);
else if (userAgent.indexOf("Xiino") != -1)
agentObj.setAgent(AGENT_XIINO);
agentObj.setPlatform(PLATFORM_PALM);
}
COM: <s> returns the agent entry for the palm </s>
|
funcom_train/8084538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector getBeanConnectionRelation(MetaBean meta) {
Vector result;
Object key;
if (meta == null)
key = REGULAR_CONNECTION;
else
key = meta;
// not yet in there?
if (!m_BeanConnectionRelation.containsKey(key)) {
m_BeanConnectionRelation.put(key, new Vector());
}
result = (Vector) m_BeanConnectionRelation.get(key);
return result;
}
COM: <s> returns the relation for the given meta bean for the regular connections </s>
|
funcom_train/45760349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyUnmodified() {
ParcelDescriptorDataObject obj = (ParcelDescriptorDataObject)getDataObject();
SaveCookie save = (SaveCookie)obj.getCookie(SaveCookie.class);
if (save != null) {
// You must implement this method on the object:
obj.removeSaveCookie(save);
obj.setModified(false);
}
super.notifyUnmodified();
}
COM: <s> called when the document becomes unmodified </s>
|
funcom_train/3143775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getTempDir() {
if (tmpDir == null) {
Random rnd = new Random();
do {
tmpDir = new File(project.getBaseDir() + "/" + Integer.toHexString(rnd.nextInt() % 0x7FFFFFFF) + ".tmp");
} while (tmpDir.exists());
tmpDir.mkdir();
tmpDir.deleteOnExit();
}
return tmpDir;
}
COM: <s> returns a temporary directory </s>
|
funcom_train/9832815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Wire add(Wire a, Wire b, Wire ci, String name) {
Wire s = wire(a.getWidth(), name + "_o");
return add_o(a, b, ci, s, wire(1, name + "_co"), name);
}
COM: <s> constructs a new adder with no carry out and with a new wire </s>
|
funcom_train/19765454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getItem_lac() {
if (item_lac == null) {//GEN-END:|40-getter|0|40-preInit
// write pre-init user code here
item_lac = new StringItem("lac", null);//GEN-LINE:|40-getter|1|40-postInit
// write post-init user code here
}//GEN-BEGIN:|40-getter|2|
return item_lac;
}
COM: <s> returns an initiliazed instance of item lac component </s>
|
funcom_train/32057229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetScale() {
System.out.println("testSetScale");
double d = 5;
GPGraph graph = null;
CellView[] views = null;
RealGraphCellRenderer x = new RealGraphCellRenderer(graph, views);
x.setScale(d);
// return is void so no need for assertEquals()
}
COM: <s> test of set scale method of class real graph cell renderer </s>
|
funcom_train/18938348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExecutorResult getResult( ExecutorHandle handle ) throws ExecutorException {
ExecutorResult result = null;
Process processToWait = null;
try {
/* Get the reference to the process will return ther result */
processToWait = this.getProcess( handle );
/* get the process output */
result = this.catchOutput( processToWait );
this.removeFromProcesses( handle );
} catch ( InterruptedException e ) {
throw new ExecutorException( "Cannot get the result of command execution.", e );
}
return result;
}
COM: <s> yet to be implemented </s>
|
funcom_train/25714692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public OperatorID getID(Identifier ident, OperatorType type) throws java.lang.Exception {
int ns = getNamespaceID(ident.getNameSpace());
int id = getSymbolID(ns, ident.getName(), type);
return OperatorID.Create(id);
}
COM: <s> get operator id from identifier type </s>
|
funcom_train/39423801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyNewPerson(PersonElement personElement) {
// Prep the model to ensure that required components are in place
if(!abElement.isSetPeople())
abElement.setPeople(new AddressBookElement.People());
AddressBookElement.People p = abElement.getPeople();
p.getPerson().add(personElement);
}
COM: <s> add a new person element to the document model </s>
|
funcom_train/3672488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean clickedOnPoint(Point2D a_clickP){
if(a_clickP == null)
return false;
Point2D l_closestP = this.determineClosestPoint(a_clickP);
return (l_closestP != null && l_closestP.distance(a_clickP) < md_tolerance);
}//clickedOnPoint
COM: <s> determines wheter a click was made onto a point considering the set </s>
|
funcom_train/45628572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPath getContainerFullPath() {
if (allowNewContainerName) {
String pathName = containerName;// containerNameField.getText();
if (pathName == null || pathName.length() < 1) {
return null;
}
// The user may not have made this absolute so do it for them
return (new Path(TextProcessor.deprocess(pathName))).makeAbsolute();
}
if (selectedContainer == null)
return null;
return selectedContainer.getFullPath();
}
COM: <s> returns the currently entered container name </s>
|
funcom_train/32761464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setYNumMajorTicks(int count) {
numMajorTicks = count;
if (numMajorTicks > 0) {
axis.setTickUnit(new NumberTickUnit((getMaxYLimit() - getMinYLimit()) / (numMajorTicks - 1)), true, true);
}
else {
axis.setAutoTickUnitSelection(true, true);
}
}
COM: <s> set the number of major ticks on the y axis </s>
|
funcom_train/18890948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertBytesEnclosedAt(int offset, byte[] content) throws ModifyException{
if (insertHash.isUnique(offset)==false){
throw new ModifyException("There can be only one insert per offset");
}
flb.append( (long)offset | MASK_INSERT_BYTE_ENCLOSED);
fob.append(content);
}
COM: <s> insert the byte content into xml and surround it with and </s>
|
funcom_train/22411640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadPropertyNames() {
propertyNames = new HashMap();
for (Iterator it = properties.keySet().iterator(); it.hasNext();) {
String key = (String) it.next();
propertyNames.put(key, getPropertyName(key));
}
}
COM: <s> load property names </s>
|
funcom_train/4744489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIcon(int applID) {
String result = "";
File icon = new File(this.getIconsPath()
+ File.separator + "icons"
+ File.separator + applID + ".jpg");
if (icon.exists()) {
result = "icons/" + applID + ".jpg";
} else {
result = "images/style/cims_logo.jpg";
}
return result;
}
COM: <s> return the path to the icon for a given application </s>
|
funcom_train/25608473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSizeAndLocation(){
WinBoundsElement element = (WinBoundsElement)GUIState.getElement("mainWindowBounds");
if(element==null){
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
setSize(Math.min(1024,dim.width-50),Math.min(768, dim.height-50));
setLocation(0,0);
}else{
setSize(element.w, element.h);
setLocation(element.x, element.y);
}
}
COM: <s> determine the size and location using the guistate class which reads </s>
|
funcom_train/39414152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void synchScope(FieldElementObj f) {
String bname = f.getName();
if (bname.endsWith(PROXY_TARGET_APPENDIX)) {
// synchronize the web scope with the proxy
String proxyName = bname.substring(0, bname.length() - PROXY_TARGET_APPENDIX.length());
this.beanScopeMap.put(bname, beanScopeMap.get(proxyName));
}
}
COM: <s> make sure the renamed target class retains the original scope attribute </s>
|
funcom_train/14356204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TableCellRenderer getCellRenderer(Class type) {
// try to create one from the factory
TableCellRenderer renderer = getRendererFactory().createTableCellRenderer(type);
// if that fails, recursively try again with the superclass
if (renderer == null && type != null)
renderer = getCellRenderer(type.getSuperclass());
// if that fails, just use the default Object renderer
if (renderer == null)
renderer = super.getDefaultRenderer(Object.class);
return renderer;
}
COM: <s> helper method to lookup a cell renderer based on type </s>
|
funcom_train/22203924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkInstance(Topic inst, Topic cls, VariableSet ret) throws TologProcessingException {
m_log.debug("Check if " + inst.getID() + " is instance of " + cls.getID());
Iterator it = inst.getTypes().iterator();
while (it.hasNext()) {
Topic type = (Topic)it.next();
if (cls.equals(type)) {
m_log.debug("Yes!");
addResultsRow(ret, new Object[] {inst, cls});
return;
}
}
m_log.debug("No!");
}
COM: <s> checks if the topic code inst code has the topic </s>
|
funcom_train/50018837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addURI(String s) throws InvalidURIException {
if (!isURI(s)) throw new InvalidURIException(s);
PrefixTreeNode node = (PrefixTreeNode) m_TreeRoots.get(s.charAt(0));
if (null == node) {
node = new PrefixTreeNode(s.charAt(0));
m_TreeRoots.put(s.charAt(0), node);
}
node.addChild(s, 1);
m_bPrefixesValid = false;
}
COM: <s> adds an uri to the prefix tree </s>
|
funcom_train/18244163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IAssemblyTilingSequence getSequence(String pSequence) throws SeqdataException {
IAssemblyTilingSequence ret = null;
for (int i = 0; i < this.tilingRows.size(); i++) {
IAssemblyTilingRow row = (IAssemblyTilingRow) this.tilingRows.get(i);
ret = row.getSequence(pSequence);
if (ret != null) {
break;
}
}
return ret;
}
COM: <s> return the specified code iassembly tiling sequence code from </s>
|
funcom_train/44165916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element toXMLElement() {
Element result = createMessage(getXMLElementTagName(),
"settlement", settlement.getId());
Document doc = result.getOwnerDocument();
result.appendChild(agreement.toXMLElement(null, doc));
result.appendChild(unit.toXMLElement(null, doc));
return result;
}
COM: <s> convert this diplomacy message to xml </s>
|
funcom_train/3556228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() throws IllegalStateException {
// if current element is not set
if (_currentElem == null) {
throw new IllegalStateException();
}
// remove current element
TokenizerProperty prop = _currentElem._property;
_currentElem = null;
SequenceStore.this.searchString(prop.getImages()[0], true);
}
COM: <s> remove the current special sequence entry from the collection </s>
|
funcom_train/1835433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTextLine (YamlLine line) {
StringBuilder sb = new StringBuilder ();
sb.append (line.getTag ().isEmpty () ? "" : String.format ("!%s ", line.getTag ()))
.append (line.getAnchor ().isEmpty () ? "" : String.format ("&%s ", line.getAnchor ()))
.append (line.getValue ());
return sb.toString ();
}
COM: <s> transforms yaml line to yaml text string </s>
|
funcom_train/32191186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isHideForSearch(String conceptID) {
if (hideConcepts == null) {
hideConcepts = new HashSet<String>();
String methodologyID = ZOntologyUtils.createExternalID("ISO24744", "MethodologyElement");
Collection<String> subClasses = null;
try {
subClasses = ontologyUtils.getSubConcepts(methodologyID);
} catch (ZOntologyUtilsException e) {
e.printStackTrace();
}
if (subClasses != null) {
hideConcepts.addAll(subClasses);
}
}
return hideConcepts.contains(conceptID);
}
COM: <s> is the code concept id code hidden for searches </s>
|
funcom_train/9159947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object next() throws java.util.NoSuchElementException {
Object element = null;
if (nextElement != null) {
element = nextElement;
nextElement = null;
}
else {
element = getNextElement();
if (element == null) {
throw new java.util.NoSuchElementException();
}
}
return element;
}
COM: <s> returns the next element </s>
|
funcom_train/22187265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawGlyph(Font.Glyph source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int argb) {
backbuffer.drawGlyph(source, dx, dy, cx1, cy1, cx2, cy2, argb);
}
COM: <s> draw an unscaled glyph onto the backbuffer where </s>
|
funcom_train/1837857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(MindmapVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/29615261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int badkpv(byte[] caller, byte[] name, byte[] comp, int[] size, int[] divby, byte[] type) throws Exception {
return(perror(jspice_badkpv(caller, name, comp, size, divby, type)));
}
COM: <s> determine if a kernel pool variable is present and if so </s>
|
funcom_train/15954914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSecond() {
DataTime lDataTime1 = new DataTime(fHour,fMinute,fSecond,fTimeZone);
int lSecond = 8;
lDataTime1.setSecond(lSecond);
assertEquals(lSecond,lDataTime1.getSecond());
}
COM: <s> test of set second method </s>
|
funcom_train/44158256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element createElementService(String name, Enum style, Enum use) {
Element e = m_doc.createElementNS(WSDDConstants.URI_WSDD, "service");
e.setAttribute("name", name);
e.setAttribute(
"provider", ProxyBeanProvider.WSDD_PROXY_BEAN_PROVIDER_DEFINITION);
e.setAttribute("style", style.toString());
e.setAttribute("use", use.toString());
return e;
}
COM: <s> creates element service with its attributes but without its children </s>
|
funcom_train/32353434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TYPE getFolderType(final String folderName) {
if (folderName.startsWith(NAMEVAL_TRADI)) {
return TYPE.TRADI;
}
if (folderName.startsWith(NAMEVAL_MULTI)) {
return TYPE.MULTI;
}
if (folderName.startsWith(NAMEVAL_UNKNOWN)) {
return TYPE.MYSTERY;
}
if (folderName.startsWith(NAMEVAL_LETTER)) {
return TYPE.LETTER;
}
if (folderName.startsWith(NAMEVAL_WEBCAM)) {
return TYPE.WEBCAM;
}
return TYPE.UNDEFINED;
}
COM: <s> getter for the cache </s>
|
funcom_train/48145923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFreeChart getXYZBubbleChart(String title, String xLabel, String yLabel, JTable table, int numberOfSeries, int[][] pairs, String other){
dataTable = table;
columnModel = dataTable.getColumnModel();
no_series = numberOfSeries;
setOtherCondition(other);
XYZDataset dataset = createXYZDatasetFromTable(numberOfSeries, pairs);
JFreeChart chart = createXYZBubbleChart(title, xLabel, yLabel, dataset);
return chart;
}
COM: <s> given xyz data this method will generate a bubble chart </s>
|
funcom_train/25883647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Intent getClickIntent(Uri uri) {
long taskId = ContentUris.parseId(uri);
Uri taskUri = ContentUris.appendId(TaskProvider.Tasks.CONTENT_URI.buildUpon(), taskId).build();
return new Intent(Intent.ACTION_VIEW, taskUri);
}
COM: <s> return the intent generated when a list item is clicked </s>
|
funcom_train/50150978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection SQLDBClose(Connection c) {
try {
if (c!=null)
c.close();
c=null;
}
catch (SQLException e) { // If we have any problems closing the SQL connection
String title="Close Connection Error";
String msg="Error closing connection:\n";
msg+="SQLException: " + e.getMessage() + "\n";
msg+="SQLState: " + e.getSQLState() + "\n";
msg+="VendorError: " + e.getErrorCode();
System.out.println(title + "\n" + msg);
}
return c;
}
COM: <s> close the connection when done </s>
|
funcom_train/22429039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getTxtProxyChainSkipName() {
if (txtProxyChainSkipName == null) {
txtProxyChainSkipName = new JTextArea();
txtProxyChainSkipName.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 11));
txtProxyChainSkipName.setMinimumSize(new java.awt.Dimension(0,32));
txtProxyChainSkipName.setRows(2);
}
return txtProxyChainSkipName;
}
COM: <s> this method initializes txt proxy chain skip name </s>
|
funcom_train/29954608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCommentParam() {
System.out.println("setCommentParam");
CommentParamObject CommentParam= new CommentParamObject();
ParametersSetObject instance = new ParametersSetObject();
instance.setCommentParam(CommentParam);
CommentParamObject result = instance.getCommentParam();
System.out.println(result);
assertEquals(CommentParam, result);
}
COM: <s> test of set comment param method of class hbm </s>
|
funcom_train/51349037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public int getFlags(final String path) {
if (path == null)
throw new IllegalArgumentException();
final Integer flags = watched.get(path);
if (flags == null){
if (DEBUG)
log.debug("path=" + path + " : Not watched");
return NONE;
}
if (DEBUG)
log.debug("path=" + path + " : " + flagString(flags));
return flags;
}
COM: <s> return the flags used to watch the path </s>
|
funcom_train/19794419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveAttachFile(int rows, JTable tbListMail, String filenameAttach, String dectination) throws Exception {
MailStructureDTO mailAttach = ((TableMailDataDTO) tbListMail.getModel()).getRealData().get(rows);
// mailTmp.connectServer();
_mailTmp.saveAttachFile(mailAttach, filenameAttach, dectination);
}
COM: <s> save attach file to computer </s>
|
funcom_train/5369334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (player != null) {
play.setIcon(new ImageIcon(getClass().getResource("/images/Play16.gif")));
//play.setText("Play");
playing = false;
player.stop();
setMediaTime(new Time(0));
}
}
COM: <s> stop the music completely and set the mediatime back to 0 </s>
|
funcom_train/7683932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Intent getTestIntent(String senderUriString) {
Account account = new Account(this.getInstrumentation().getTargetContext());
account.setSenderUri(senderUriString);
Intent i = new Intent(Intent.ACTION_MAIN);
i.putExtra("account", account); // AccountSetupNames.EXTRA_ACCOUNT == "account"
return i;
}
COM: <s> create an intent with the account in it </s>
|
funcom_train/13848129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean groupsOverlap(String[] possibilities) {
/* Match if we're interested in any group, or if we're
* interested in none and there are no possibilities.
*/
if (groups == null) return true;
for (int i = 0; i < possibilities.length; i++) {
if (groups.contains(possibilities[i])) return true;
}//end loop
return false;
}//end groupsOverlap
COM: <s> indicate whether any of the group names in the given array match </s>
|
funcom_train/20656063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getAboutMenuItem() {
if (aboutMenuItem == null) {
aboutMenuItem = new JMenuItem();
aboutMenuItem.setText("About");
aboutMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JDialog aboutDialog = getAboutDialog();
aboutDialog.pack();
aboutDialog.setBounds(400, 250, 200, 100);
aboutDialog.setVisible(true);
}
});
}
return aboutMenuItem;
}
COM: <s> this method initializes j menu item </s>
|
funcom_train/50531404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getExit_menuitem() {
if (exit_menuitem == null) {
exit_menuitem = new JMenuItem();
exit_menuitem.setText(I18n.getString("exit"));
exit_menuitem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return exit_menuitem;
}
COM: <s> this method initializes exit menuitem </s>
|
funcom_train/5341479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupConstants() {
MAIN_PANEL = null;
DATA_MODEL = new LibraryTableModel();
TABLE = new LimeJTable(DATA_MODEL);
((LibraryTableModel)DATA_MODEL).setTable(TABLE);
Action[] aa = new Action[] {
LAUNCH_ACTION,
ENQUEUE_ACTION,
DELETE_ACTION,
ANNOTATE_ACTION,
RESUME_ACTION
};
BUTTON_ROW = new ButtonRow(aa, ButtonRow.X_AXIS, ButtonRow.NO_GLUE);
}
COM: <s> set up the constants </s>
|
funcom_train/11652942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateGui(final SampleResult oneSample) {
log.debug("Start : updateGui2");
final int xPos = model.getSampleCount();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Graphics g = getGraphics();
if (g != null) {
drawSample(xPos * PLOT_X_WIDTH, oneSample, g);
}
}
});
log.debug("End : updateGui2");
}
COM: <s> redraws the gui if no rescaling of the graph is needed </s>
|
funcom_train/39865195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int valueOfBasicConstrains() {
Extension extn = getExtensionByOID("2.5.29.19");
BasicConstraints bc = null;
if ((extn == null)
|| ((bc = extn.getBasicConstraintsValue()) == null)) {
return Integer.MAX_VALUE;
}
return bc.getPathLenConstraint();
}
COM: <s> returns the value of basic constraints extension oid 2 </s>
|
funcom_train/3424945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPublicId(String id) {
if (isReadOnly()) {
throw new DOMException(
DOMException.NO_MODIFICATION_ALLOWED_ERR,
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null));
}
if (needsSyncData()) {
synchronizeData();
}
publicId = id;
} // setPublicId(String)
COM: <s> non dom the public identifier for this notation </s>
|
funcom_train/31995665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void packet0xa2() {
try {
int uid = readInt(); //1-4 = Character's Serial
short maxMana = readShort(); //5-6 = Character's Max Mana Points
short currentMana = readShort(); //7-8 = Character's Current Mana Points
cc.updateMana(uid,currentMana,maxMana);
} catch(IOException e) {
}
}
COM: <s> mana health update intelligence and mana </s>
|
funcom_train/49009266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel2() {
if (jPanel2 == null) {
GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
gridBagConstraints3.anchor = GridBagConstraints.EAST;
gridBagConstraints3.insets = new Insets(0, 0, 10, 0);
gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
jLabel1 = new JLabel();
jLabel1.setText("by zzzhc");
jPanel2 = new JPanel();
jPanel2.setLayout(new GridBagLayout());
jPanel2.add(jLabel1, gridBagConstraints3);
}
return jPanel2;
}
COM: <s> this method initializes j panel2 </s>
|
funcom_train/14156856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendDiscovery(String tagToLookFor) {
Logs.debugMsg_1("Sending discovery request for adv containing tag <" + tagToLookFor + "> ...");
getDiscoSvc().getRemoteAdvertisements(null,
DiscoveryService.ADV,
tagToLookFor,
null,
Settings.getMaxDiscoveryResp());
}
COM: <s> send a discovery request in this group to get specific </s>
|
funcom_train/46754076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueUnitRef(DisplayModel valueUnitRef) {
if (Converter.isDifferent(this.valueUnitRef, valueUnitRef)) {
DisplayModel oldvalueUnitRef= new DisplayModel(this);
oldvalueUnitRef.copyAllFrom(this.valueUnitRef);
this.valueUnitRef.copyAllFrom(valueUnitRef);
setModified("valueUnitRef");
firePropertyChange(String.valueOf(PARAMETERS_VALUEUNITREFID), oldvalueUnitRef, valueUnitRef);
}
}
COM: <s> quantitative values stored in the parameter are measure in these units </s>
|
funcom_train/35564238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireInput(String input) throws IllegalStateException {
if (! m_enabled)
throw new IllegalStateException("Disabled devices cannot fire");
Iterator it = m_listeners.iterator();
while (it.hasNext()) {
Listener l = (Listener)it.next();
l.gotInput(input);
}
}
COM: <s> immediately fires a textual input to all listeners attached </s>
|
funcom_train/45622856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProjectsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VCBuildType_projects_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VCBuildType_projects_feature", "_UI_VCBuildType_type"),
MSBPackage.eINSTANCE.getVCBuildType_Projects(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the projects feature </s>
|
funcom_train/27680447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(InputStream is) {
init();
if (is != null) {
in = is;
readHeader();
if (!err()) {
readContents();
if (frameCount < 0)
status = STATUS_FORMAT_ERROR;
}
} else {
status = STATUS_OPEN_ERROR;
}
try {
is.close();
} catch (IOException e) {}
return status;
}
COM: <s> reads gif image from stream </s>
|
funcom_train/1797232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInlinePositions(Boolean inlinePositions) {
if (inlinePositions == null) {
inlinePositions = false;
}
// check if setting to existing value
if (!this.inlinePositions.equals(inlinePositions)) {
// set to new value for customer parameter
this.inlinePositions = inlinePositions;
setStringCustomParameter("positions",
!inlinePositions ? null : inlinePositions.toString());
}
}
COM: <s> sets the flag to inline positions under the portfolio feed </s>
|
funcom_train/4013782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyPages(Vector<PageDef> pages){
if(pages != null){
this.pages = new Vector<PageDef>();
for(int i=0; i<pages.size(); i++) //Should have atleast one page is why we are not checking for nulls.
this.pages.addElement(new PageDef((PageDef)pages.elementAt(i),this));
}
}
COM: <s> copies a given list of pages into this form </s>
|
funcom_train/42135014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEncoding() {
String packetType = getPacketTypes();
if (packetType == null) {
packetType = DEFAULT_PACKET_TYPE;
}
// String encoding = (String) Server.getMediaEncodings().get(Integer
// .valueOf(packetType));
// if (encoding != null) {
// return encoding;
// }
return DEFAULT_ENCODING;
}
COM: <s> returns the encoding of the stream </s>
|
funcom_train/41508882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SVNURL removePathTail() throws SVNException {
String newPath = SVNPathUtil.removeTail(myPath);
String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), newPath);
return parseURIDecoded(url);
}
COM: <s> constructs a new b svnurl b representation removing a tail path </s>
|
funcom_train/35838740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setFontFace(PCSession session, String sViewID, Vector vtPositions, String sFontFace) throws SQLException {
//
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// boolean successful = DBViewNode.setFontFace(dbcon, sViewID, vtPositions, sFontFace);
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return true;
}
COM: <s> set the font face for the given node position objects </s>
|
funcom_train/16380589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RevisionType_date_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RevisionType_date_feature", "_UI_RevisionType_type"),
CTEPackage.Literals.REVISION_TYPE__DATE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the date feature </s>
|
funcom_train/39376391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean accept(Component aComponent) {
if (!super.accept(aComponent)) {
return false;
} else if (aComponent instanceof JTextComponent) {
JTextComponent textComponent = (JTextComponent) aComponent;
return textComponent.isEditable();
} else if (aComponent instanceof JScrollBar) {
return false;
} else if (aComponent instanceof JRootPane) {
return false;
} else {
return true;
}
}
COM: <s> determines whether a component is an acceptable choice as the new </s>
|
funcom_train/15623392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doPrint(Level verbosityLevel, String printString) {
String print=null;
if (onlyOneLevel && (verbosityLevel.intValue() == this.currVerbosity.intValue())){
print=formatString(printString);
return;
}
else if (verbosityLevel.intValue() >= this.currVerbosity.intValue()){
print=formatString(printString);
}
if (print!=null){
logger.log(verbosityLevel,print);
}
}
COM: <s> prints a message according to the configuration of this </s>
|
funcom_train/18808878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Number getChipValue(final Comparable chipx, final Comparable chipy) {
final int rowIndex = this.data.getRowIndex(chipx);
if (rowIndex < 0) {
return null;
}
final int colIndex = this.data.getColumnIndex(chipy);
if (colIndex < 0) {
return null;
}
return this.data.getValue(rowIndex, colIndex);
}
COM: <s> returns the value for a given chip x and y or null </s>
|
funcom_train/23044593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExpansionConditionUsagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Expansion_expansionConditionUsage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Expansion_expansionConditionUsage_feature", "_UI_Expansion_type"),
ConceptPackage.Literals.EXPANSION__EXPANSION_CONDITION_USAGE,
false,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the expansion condition usage feature </s>
|
funcom_train/51538306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int skipBytes(int n) throws EOFException, IOException {
if (n <= 0)
return (0);
long file_length = this.length();
long file_position = this.getFilePointer();
int skip_length = (int) Math.min(n, file_length - file_position);
long total_skipped = skipInternal(native_fd, skip_length);
return ((int) total_skipped);
}
COM: <s> this method attempts to skip and discard the specified number of bytes </s>
|
funcom_train/18655628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabDescription(String labDescription) {
if (labDescription != null) {
labDescriptionLabel.setText(
GUIProperties.STUDENT_LAB_DESCRIPTION_TEXT + labDescription);
} else {
//String is null, so use ""
labDescriptionLabel.setText(
GUIProperties.STUDENT_LAB_DESCRIPTION_TEXT + "");
}
}
COM: <s> sets the lab description label text to </s>
|
funcom_train/12273886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColors(Color barColor, Color borderColor, Color textColor) {
// set the colors used by the progress bar components
if (barColor != null) {
barClr = barColor;
}
if (borderColor != null) {
borderClr = borderColor;
}
if (textColor != null) {
textClr = textColor;
}
}
COM: <s> set the colors </s>
|
funcom_train/8497502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void showProperties() {
//
// SortedSet<RDFProperty> props = this.getProperties(RDFProperty.DEFAULT_SUBJECT);
// System.out.print(props);
// Iterator<RDFProperty> iter = props.iterator();
// while (iter.hasNext()) {
// System.out.println(">>> " + iter.next().toString());
// }
// System.out.println(">>>\n");
//
// } // End of `showProperties` method.
COM: <s> lists out the current properties on the standard output </s>
|
funcom_train/19253897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelectedRowCount() {
final int[] sel = new int[1];
SwingUtilities.invokeSync(new Runnable() {
public void run() {
if (!SwingWTUtils.isSWTControlAvailable(ppeer))
sel[0] = 0;
else
sel[0] = ppeer.getSelectionCount();
}
});
return sel[0];
}
COM: <s> returns the number of selected rows </s>
|
funcom_train/19421905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRowAsCsv() {
StringBuffer buffer = new StringBuffer();
if (curRecord != null) {
String separator = "";
for (int i=0; i<metaData.getColumnCount(); i++) {
buffer.append(separator);
buffer.append("\"");
buffer.append(getString(metaData.getColumnName(i+1).toLowerCase()));
buffer.append("\"");
separator = ",";
}
}
return buffer.toString();
}
COM: <s> p retrieves the entire row formatted as </s>
|
funcom_train/48266824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
try {
_myThread = null;
if (_myTCPClients != null) {
Enumeration en = _myTCPClients.elements();
while (en.hasMoreElements()) {
remove((TCPClient) en.nextElement());
}
_myTCPClients = null;
}
if (_myServerSocket != null) {
_myServerSocket.close();
_myServerSocket = null;
}
} catch (IOException e) {
SNetwork.printError("TCPServer.dispose", "IOException " + e);
}
}
COM: <s> kill the server </s>
|
funcom_train/4378213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() throws MediaException {
if (player == null) {
return;
}
// this is important to unregister event reception from player,
// otherwise the radio player would go on forever.
player.removePlayerListener(this);
player.stop();
Vector tracklist = playlist.getTracklist();
playerStopped(player, tracklist);
player.close();
playlist.getTracklist().removeAllElements();
fireRadioPlayerEvent(new RadioPlayerEvent(RadioPlayerEvent.RADIO_OFF));
}
COM: <s> shut down radio </s>
|
funcom_train/16770485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
channel = this.fos.getChannel();
if (!append) {
try {
// write the flv file type header
writeHeader();
// write intermediate onMetaData tag, will be replaced later
writeMetadataTag(0, -1, -1);
} catch (IOException e) {
log.warn("Exception writing header or intermediate meta data", e);
}
}
}
COM: <s> initialize the writer </s>
|
funcom_train/13686030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SpecLine getLine(int line) {
SpecLine l = null;
if (getLines() != null && getLines().size() > 0) {
try {
l = getLines().get(line - 1);
} catch (IndexOutOfBoundsException e) {
l = getLines().get(getLines().size() - 1);
}
}
return l;
}
COM: <s> returns a specific line of the spec </s>
|
funcom_train/25435988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFormatedParams() {
String result = "(";
for (int x = 0; x < currentParams.length; x++)
if (x > 0)
result += ", " + currentParams[x];
else
result += currentParams[x];
return result + ")";
}
COM: <s> returns the params type and name with comma separated for the current </s>
|
funcom_train/3312976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caretUpdate(CaretEvent ce){
int tempSize = tPane.getFontSizeAtPostion(ce.getDot());
String tempFont = tPane.getFontAtPosition(ce.getDot());
if(tempSize != fontSize){
cFrame.getFontSizeBox().setSelectedItem(new Integer(tempSize));
fontSize = tempSize;
}
if(!tempFont.equals(font)){
cFrame.getFontBox().setSelectedIndex(cFrame.getFontIndex(tempFont));
font = new String(tempFont);
}
}
COM: <s> this method is inherited from the caret listener interface </s>
|
funcom_train/22919644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transform(BufferedImage dest, ImageDescriptor imd, ImageOp op) {
final int width = dest.getWidth();
final int height = dest.getHeight();
for(int y=0; y<height; y++) {
for(int x=0; x<width; x++) {
dest.setRGB(x, y, op.exec(imd, x, y));
}
}
}
COM: <s> applies the operation to each pixel of the destination image </s>
|
funcom_train/35541784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getStorageLengthFromPicture(final String picture, final boolean isSignSeparate) {
Map < Character, Integer > charNum =
PictureUtil.getPictureCharOccurences(picture, '$');
return PictureUtil.calcLengthFromPicture(charNum, isSignSeparate, "USD", '$', true);
}
COM: <s> helper to calculate z os storage length from a picture clause </s>
|
funcom_train/12658950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeAudioData(byte[] audioData, int length) {
lock.lock();
try {
if (audioData == null) {
return;
}
this.audioData = Arrays.copyOf(audioData, length);
lockCondition.signal();
} finally {
lock.unlock();
}
}
COM: <s> stores audio data to the consumer </s>
|
funcom_train/45608793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPrincipalWindow() {
createWindowCenter(windowPrincipal, 580, 330,constants.about());
windowPrincipal.addItem(addPanel());
configurePrincipalWindow();
windowPrincipal.addCloseClickHandler(new CloseClickHandler() {
public void onCloseClick(CloseClientEvent event) {
windowPrincipal.destroy();
}
});
canvasPrincipal.addChild(windowPrincipal);
canvasPrincipal.show();
}
COM: <s> configure the principal window by adding the grid indicated </s>
|
funcom_train/42398771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getPositiveNumberInitParameter(final String name) throws ServletException {
final String value = this.getInitParameter(name);
if (Tester.isNullOrEmpty(value)) {
this.throwInitParameterIsMissing(name);
}
int number = 0;
try {
number = Integer.parseInt(value);
if (number < 0) {
this.throwInitParameterDoesntContainAPositiveNumber(name, value);
}
} catch (final NumberFormatException badNumber) {
this.throwInitParameterDoesntContainAPositiveNumber(name, value);
}
return number;
}
COM: <s> convenience method that fetches the named init parameter and then </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.