__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50463148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initNameAndId(LaunchDesc desc, org.w3c.dom.Element element) {
if(element.getTagName().equals(getElementName()) == false)
return;
desc.setName(paraseName(element));
desc.setTitle(parseTitle(element));
desc.setUniqueID(parseUniqueID(element));
}
COM: <s> initialize a launch desc with the attributes from the element </s>
|
funcom_train/4281050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("OntologyQuery".equals(portName)) {
setOntologyQueryEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/8011641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String generateToken() {
HttpSession session = getSession();
try {
byte id[] = session.getId().getBytes();
byte now[] = new Long(System.currentTimeMillis()).toString().getBytes();
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(id);
md.update(now);
return (toHex(md.digest()));
} catch (IllegalStateException e) {
return (null);
} catch (NoSuchAlgorithmException e) {
return (null);
}
}
COM: <s> generate a new transaction token to be used for enforcing a single </s>
|
funcom_train/44860389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateProperties() {
Assert.notNull(connectionFactory, "Cannot connect using a null ConnectionFactory");
Assert.notNull(messageProcessor, "Cannot receive messages using a null MessageProcessor");
Assert.hasText(destinationName, "Cannot connect to a null destination");
Assert.isTrue(pubSubDomain || (subscriberName == null), "Cannot set a subscriberName for a Queue");
}
COM: <s> validates that all required properties have been appropriately set </s>
|
funcom_train/23346385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeNode processMerge(TreeNode node){
debug("start merge");
DefaultMutableTreeNode masterNode = (DefaultMutableTreeNode)node;
// There is no merging here but we will make sure
// the master children are handled correctly
MergeHelpUtilities.mergeNodeChildren("javax.help.NoMerge",
masterNode);
return masterNode;
}
COM: <s> processes no merge </s>
|
funcom_train/39953605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProcessFactory guardCondition(Condition condition) {
if (exceptionHandler!=null) {
throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
}
if (transition==null) {
throw new PvmException("no current transition");
}
ObjectReference<Condition> guardConditionReference = new ObjectReference<Condition>(condition);
transition.setGuardConditionReference(guardConditionReference);
return this;
}
COM: <s> sets the guard condition on the current transition </s>
|
funcom_train/29286339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getInicialList() {
List ret = new ArrayList();
List selection = getSelectedObjects();
for (int i=0; i<selection.size(); i++) {
EditPart part = (EditPart) selection.get(i);
ChangeBoundsRequest r = new ChangeBoundsRequest();
r.setEditParts(part);
r.setType(RequestConstants.REQ_CLONE);
Command c = part.getCommand(r);
if (c != null) {
processDependantCommands(c);
ret.add(c);
}
}
return ret;
}
COM: <s> returns a list of all copy commands without its connections </s>
|
funcom_train/51419228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getTreeAncestor(int generations){
int index = modelStack.size()-generations-1;
if(index<0) throw new RuntimeException("The model object only has "+(modelStack.size()-1)+" levels of ancestors. "+generations+" was requested");
if(index>=modelStack.size()) throw new RuntimeException("Number of generations must be zero or positive, was: "+generations);
return modelStack.elementAt(index);
}
COM: <s> returns the ancestor object of the current node by by climbing the node </s>
|
funcom_train/45248463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getImageDescriptor(Object object) {
if (isDirectory()) {
return WorkbenchImages
.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
} else {
return WorkbenchPlugin.getDefault().getEditorRegistry()
.getImageDescriptor(name);
//TODO: what are the implications for content types? Should I guess?
}
}
COM: <s> returns an image descriptor for this file system element </s>
|
funcom_train/41336809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex) {
paintBackground(context, g, x, y, w, h, null);
}
COM: <s> paints the background of a tab of a tabbed pane </s>
|
funcom_train/3373324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSortedStyle(SelectorMapping mapping, Vector elements) {
int size = elements.size();
if (size > 0) {
int specificity = mapping.getSpecificity();
for (int counter = 0; counter < size; counter++) {
if (specificity >= ((SelectorMapping)elements.elementAt
(counter)).getSpecificity()) {
elements.insertElementAt(mapping, counter);
return;
}
}
}
elements.addElement(mapping);
}
COM: <s> adds code mapping code to code elements code </s>
|
funcom_train/48560526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand() {
if (okCommand == null) {//GEN-END:|384-getter|0|384-preInit
// write pre-init user code here
okCommand = new Command("OK", Command.OK, 0);//GEN-LINE:|384-getter|1|384-postInit
// write post-init user code here
}//GEN-BEGIN:|384-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/2286333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void distributeCards() {
for( int i = 0; i < SOL_STACK_CNT; i++ ) {
ClassicCard c = ((ClassicCard)deck.pop());
c.turnFaceUp();
solStack[ i ].push( c );
for( int j = i+1; j < SOL_STACK_CNT; j++ )
solStack[ j ].push( deck.pop() );
}
}
COM: <s> each time a new game begins we have to distribute the </s>
|
funcom_train/37235679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Counts forSingleHour( int hourOfDay ){
Counts countsForSingleHour = new Counts();
for( Long lkey : this.keySet()){
Calendar key = Calendar.getInstance();
key.setTimeInMillis(lkey);
if( key.get( Calendar.HOUR_OF_DAY) == hourOfDay){
countsForSingleHour.put( key.getTimeInMillis() , this.get(key.getTimeInMillis() ) ) ;
}
}
return countsForSingleHour;
}
COM: <s> for single hour returns all the counts at a specific time of day </s>
|
funcom_train/40768979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sign(String url, String secret) {
//debug
debug("sign: url: " + url + " secret: " + secret);
// removing port for now, rpc method different
url = url.replaceAll(":[0-9]+", "");
String key = getConcatConsumerSecretAndTokenSecret(secret);
String data = getSignatureBaseString(url);
Sha1 sha = new Sha1();
this.oauth_signature = sha.b64_hmac_sha1(key, data);
debug("sign: auth_signature: " + oauth_signature);
}
COM: <s> sign the token </s>
|
funcom_train/6202747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exportCurrentSegment(final SourceTextEntry ste) {
String s1 = ste.getSrcText();
TMXEntry te = Core.getProject().getTranslationInfo(ste);
String s2 = te.isTranslated() ? te.translation : "";
FileUtil.writeScriptFile(s1, OConsts.SOURCE_EXPORT);
FileUtil.writeScriptFile(s2, OConsts.TARGET_EXPORT);
}
COM: <s> export the current source and target segments in text files </s>
|
funcom_train/17204695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean definitelyDifferent(FieldReference that) {
if (this == that) return false;
if (getName() != that.getName() || getDescriptor() != that.getDescriptor()) {
return true;
}
RVMField mine = peekResolvedField();
RVMField theirs = that.peekResolvedField();
if (mine == null || theirs == null) return false;
return mine != theirs;
}
COM: <s> do this and that definitely refer to the different fields </s>
|
funcom_train/24512719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reinit(int startDimension, int stopDimension) {
synchronized (ANIMATION_MUTEX) {
JXCollapsiblePane.this.firePropertyChange(ANIMATION_STATE_KEY, null,
"reinit");
this.startDimension = startDimension;
this.finalDimension = stopDimension;
animateAlpha = animationParams.alphaStart;
currentDimension = -1;
wrapper.showImage();
}
}
COM: <s> reinitializes the timer for scrolling up down the component </s>
|
funcom_train/46332478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unsubscribe(String topicname, Ice.Current curr) {
synchronized (itsClients) {
PubSubClientInfo client = itsClients.get(topicname);
if (client != null) {
itsLogger.debug("Cancelling activity on topic " + topicname);
client.destroy();
itsClients.remove(topicname);
} else {
itsLogger.debug("Received unsubscription request for non-existent topic " + topicname);
}
}
}
COM: <s> cancel activity on the specified topic </s>
|
funcom_train/5160397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getFrontendAutomount()
{
if(umcParams.get(KEY_FRONTEND_AUTOMOUNT)!=null && !umcParams.get(KEY_FRONTEND_AUTOMOUNT).getValue().equals(""))
{
if(umcParams.get(KEY_FRONTEND_AUTOMOUNT).getValue().equals("0"))
return false;
return true;
}
return false;
}
COM: <s> returns the automount flag </s>
|
funcom_train/3340861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeNode getChildBefore(TreeNode aChild) {
if (!this.isNodeChild(aChild))
throw new IllegalArgumentException("not a child of this node");
int index = _children.indexOf(aChild);
if (index == 0) return null;
return (TreeNode) _children.elementAt(index - 1);
}
COM: <s> returns the child in this nodes child array that immediately precedes </s>
|
funcom_train/2040385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCurrentScreenView() {
currentScreenView = screenViews.get(currentScreen.getScreenId());
if (currentScreenView == null) {
currentScreenView = new ScreenView(currentScreen);
screenViews.put(currentScreen.getScreenId(), currentScreenView);
}
}
COM: <s> inits the current screen view </s>
|
funcom_train/31930737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyProperties() {
try {
s_propsCopy = (Properties) MiscOps.deepCopy(s_propsOriginal);
}
catch (BlitzException be) {
LoggerOps.error(getClass(), "Unable to deep copy Properties object", be);
s_propsCopy = (Properties) s_propsOriginal.clone();
}
}
COM: <s> create a local copy of the original properties </s>
|
funcom_train/28365948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calcMaxMinZ(){
z_min = Double.MAX_VALUE;
z_max = - Double.MAX_VALUE;
for(int i =0,j; i < nX; i++){
for(j = 0; j < nY; j++){
if(z_min > gridData[i][j]) z_min = gridData[i][j];
if(z_max < gridData[i][j]) z_max = gridData[i][j];
}
}
}
COM: <s> calculates minimal and maximal z values </s>
|
funcom_train/34968342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeyPassword(char[] keyPassword) {
if (keyPassword != null) {
this.keyPassword = new char[keyPassword.length];
System.arraycopy(keyPassword, 0, this.keyPassword, 0,
keyPassword.length);
} else {
if (this.keyPassword != null) {
Arrays.fill(this.keyPassword, ' ');
}
}
}
COM: <s> sets the key password </s>
|
funcom_train/3471041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopTrack() {
BlockType type = this.viewPanelHelper.getClickedTrack(this.rightClickPosition);
if (type != null) {
if (type.equals(BlockType.AUDIO)) {
this.parentFrame.stopAudio();
} else if (type.equals(BlockType.VIDEO)) {
this.parentFrame.stopVideo();
}
}
}
COM: <s> p stops the track the user has right clicked in </s>
|
funcom_train/40946575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelected(CustomMenuItem item) {
// If we had something selected, unselect
if (item != selected && selected != null) {
selected.setSelected(false);
}
// If we have a valid selection, select it
if (item != null) {
item.setSelected(true);
}
selected = item;
}
COM: <s> set the currently selected item of this menu </s>
|
funcom_train/45114438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String regRead(String keyname, String valuename) throws Exception {
Map<?, ?> result = runRemoteScript(commandCreate("RegRead", keyname, valuename));
processResult("The value of: " + keyname + ", is: " + valuename, result);
return (String) result.get(STDOUT);
}
COM: <s> reads a value from the registry </s>
|
funcom_train/31200986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTile(final TileWidgetWrapper tile) {
// determine to which column to add the the tile
int column = 0;
int size = Integer.MAX_VALUE;
for (int i = 0; i < columns.size(); i++) {
if (columns.get(i).size() < size) {
column = i;
size = columns.get(i).size();
}
}
addTile(tile, column);
}
COM: <s> add the passed tile to the column with fewest cells </s>
|
funcom_train/46055806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showDelete(List result) {
if (printstatus != delete) {
ChangeInfo info = new ChangeInfo(ChangeInfo.DELETE, printoldline, printoldline);
setLast(info, result);
}
printstatus = delete;
lines.add(oldInfo.symbol[printoldline].getSymbol());
anyprinted = true;
printoldline++;
}
COM: <s> showdelete part of printout </s>
|
funcom_train/624807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResolveQnWithPrefix() throws EveException {
ModelPackage uml = new EveRepository().getMetamodel();
QualifiedNameResolver qnr = new QualifiedNameResolver(uml);
try {
qnr.resolveQn(
new QualifiedName(
"org.omg.uml.Foundation.Core.ModelElement",
QualifiedName.DOT_SEPERATOR));
} catch(NameNotResolvedException nnre) {
fail("testResolveQnWithPrefix: ModelElement can't be resolved.");
}
}
COM: <s> tests the resolution of prefixed qualified names in the context </s>
|
funcom_train/48911382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (!(o instanceof Deftemplate))
return false;
Deftemplate t = (Deftemplate) o;
return (m_fullName.equals(t.m_fullName) &&
(m_backchain == t.m_backchain) &&
(m_parent == t.m_parent) &&
m_slots.equals(t.m_slots));
}
COM: <s> compare this deftemplate to another one for equality </s>
|
funcom_train/20586008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Link queryLinkById(Long id) throws SQLException{
Link link = null;
try{
String sql = "select LINKNAME,LINKHREF from FRIEND_LINKS where LINKID = ?";
pstmt = con.prepareStatement(sql);
pstmt.setLong(1, id);
rs = pstmt.executeQuery();
if(rs.next()){
link = new Link(id,rs.getString(1),rs.getString(2));
}
}finally{
DBUtils.CloseRs(rs);
DBUtils.CloseStmt(pstmt);
}
return link;
}
COM: <s> query link by id </s>
|
funcom_train/9146631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double cumulativeProbability(long lowerBound, long upperBound) {
double sum = 0.0;
long start = Math.max(lowerBound,minOutcome());
long last = Math.min(upperBound,maxOutcome());
for (long i = start; i <= last; ++i)
sum += probability(i);
return sum;
}
COM: <s> returns the cumulative probability of all outcomes between the </s>
|
funcom_train/32082476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subtract(int x, int y, int width, int height) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
GdkRectangle gdkRect = new GdkRectangle();
gdkRect.x = x;
gdkRect.y = y;
gdkRect.width = width;
gdkRect.height = height;
int /*long*/ rectRgn = OS.gdk_region_rectangle(gdkRect);
OS.gdk_region_subtract(handle, rectRgn);
OS.gdk_region_destroy(rectRgn);
}
COM: <s> subtracts the given rectangle from the collection of polygons </s>
|
funcom_train/48959980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public DefaultVersion addMilestone(DefaultVersion version) {
if (version != null) {
if (milestones == null) {
milestones = new HashSet<DefaultVersion>();
}
milestones.add(version);
version.setParentProject(null);
version.setParentVersion(this);
}
return version;
}
COM: <s> adds a previously created version to the milestone list </s>
|
funcom_train/20646512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyOfTemplateAddition( String report, String subreport ) {
String r = report + " - " + subreport;
if ( ! m_seenReports.contains( r ) ) {
if ( ! TemplateFactory.isTemplateAvailable( report, subreport ) ) {
m_reports += 1;
}
m_seenReports.add( r );
}
}
COM: <s> notifies the context of a template being added to the </s>
|
funcom_train/11044941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddFactoriesToEIC() {
EndpointInvocationContext eic = new EndpointInvocationContextImpl();
JAXWSMessageReceiver receiver = new JAXWSMessageReceiver();
receiver.addInvocationListenerFactories(eic);
Collection<InvocationListenerFactory> factories = eic.getInvocationListenerFactories();
assertNotNull(factories);
assertEquals(factories.size(), 2);
}
COM: <s> this will verify that the jaxwsmessage receiver is able to find and </s>
|
funcom_train/42901790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadProperties(){
// load properties file
FileInputStream fis;
try {
System.out.println("URadar:\tLooking for .properties file in "+new File("path.temp").getParent());
fis = new FileInputStream("uradar.properties");
props.load(fis);
} catch (FileNotFoundException e1) {
e1.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
// read properties
host = props.getProperty("mysql.host");
db = props.getProperty("mysql.db");
user = props.getProperty("mysql.user");
passwd = props.getProperty("mysql.passwd");
}
COM: <s> load uradar application </s>
|
funcom_train/16394369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createGroup(Group group) {
// check for existing group and create a reasonable exception if necessary
if (getGroup(group.getGroupname()) != null){
ResourceBundle messages = ResourceBundle.getBundle("UserManagement", locale);
throw new InputException(messages.getString("groupExists"));
}
Calendar cal = Calendar.getInstance();
group.setCreationdate(cal.getTime());
session.save(group);
}
COM: <s> creates a new group the creation date is automatically set </s>
|
funcom_train/778123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String compareProtocol( ACLMessage msg1, ACLMessage msg2 ) {
String protocol1 = msg1.getProtocol();
String protocol2 = msg2.getProtocol();
if ( !strEqualsIgnoreCaseNullOK( protocol1, protocol2 ) ) {
return
"first message protocol \"" + protocol1 +
"\" not equal to " +
"second message protocol \"" + protocol2 + "\"";
}
else {
return null;
}
}
COM: <s> compare just the protocol slot of two messages </s>
|
funcom_train/44705491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPreviewURL(PageState state) {
ContentItem item = getContentItem(state);
ContentSection section = getContentSection(state);
ItemResolver itemResolver = section.getItemResolver();
// Pass in the "Live" context since we need it for the preview
return itemResolver.generateItemURL(state, item, section,
CMSDispatcher.PREVIEW);
}
COM: <s> fetch the preview url </s>
|
funcom_train/49079963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintScreen( Graphics g ) {
int y = 0;
if (this.isLayoutVCenter) {
int containerHeight = this.container.getItemHeight( this.screenWidth, this.screenWidth);
int availableHeight = this.screenHeight - this.titleHeight - containerHeight;
if (availableHeight > 0) {
y = (availableHeight / 2);
}
}
this.container.paint( 0, y, 0, this.screenWidth, g );
}
COM: <s> paints the screen </s>
|
funcom_train/29418659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLine(int x1, int y1, int x2, int y2) {
if (gr!=null) gr.drawLine(x1,y1,x2,y2);
else pdf.write(x1).writespace().write(y1).write(" m ").write(x2).writespace().write(y2).write(" l S\n");
}
COM: <s> draws a line from x1 y1 to x2 y2 </s>
|
funcom_train/17012178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
shouldRun = false;
try {
if (infoServer != null) infoServer.stop();
} catch (Exception e) {
LOG.warn("Exception shutting down SecondaryNameNode", e);
}
try {
if (checkpointImage != null) checkpointImage.close();
} catch(IOException e) {
LOG.warn(StringUtils.stringifyException(e));
}
}
COM: <s> shut down this instance of the datanode </s>
|
funcom_train/3843265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showPreferencePage(String id, IPreferencePage page) {
final IPreferenceNode targetNode = new PreferenceNode(id, page);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
final PreferenceDialog dialog =
new PreferenceDialog(getControl().getShell(), manager);
BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.open();
}
});
}
COM: <s> show a single preference pages </s>
|
funcom_train/31648412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSecTalentsAbilities(String oldName, String newName) {
Integer value = null;
if (oldName != null) {
value = (Integer) secondaryTalentsAbilities.get(oldName);
secondaryTalentsAbilities.remove(oldName);
secondaryTalentsAbilities.put(newName, value);
} else if (secondaryTalentsAbilities.containsKey(newName) == false) {
secondaryTalentsAbilities.put(newName, new Integer(0));
}
}
COM: <s> updates mappings in secondary talents map if secondary talents selection changes </s>
|
funcom_train/5868782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processSelection(Radiogroup radiogroup ,Object value){
if(value==null) return;
//radiogroup.setSelectedIndex(-1);
int size =-1;
Object data = null;
size = radiogroup.getItemCount();
for (int i = 0; i < size; i++) {
data = null;
Radio item = radiogroup.getItemAtIndex(i);
data = item.getValue();
if (data != null && value.equals(data)) {
item.setSelected(true);
radiogroup.setSelectedItem(item);
}
}
}
COM: <s> set selected item of listbox by value </s>
|
funcom_train/31683261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsKey(Object keyi) throws IllegalArgumentException {
String key = null;
if (keyi instanceof String) {
key = ((String) keyi).toLowerCase();
} else {
throw new IllegalArgumentException(
"internal programming error: header must be string: " +
keyi);
}
return super.containsKey(key);
}
COM: <s> see if the resource context contains a value for a given key </s>
|
funcom_train/3402139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object put(String key, Object value) {
Accessor sp = getPropertyMap().get(key);
if(sp!=null) {
Object old = sp.get(this);
sp.set(this,value);
return old;
} else {
throw new IllegalArgumentException("Undefined property "+key);
}
}
COM: <s> sets a property </s>
|
funcom_train/49650046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSourceFile(IFile file) {
//IPath path = file.getRawLocation();
//if (path == null)
// return false;
return !file.isDerived() && file.getFileExtension().equals("hx");
/*String pathString = path.toString();
if (pathString.indexOf("/bin/") != -1)
return false;
return LANGUAGE.hasExtension(path.getFileExtension());*/
}
COM: <s> decide whether a file needs to be build using this builder </s>
|
funcom_train/13317987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj != null && obj instanceof TypeInfo) {
TypeInfo otherInfo = (TypeInfo) obj;
if (!className.equals(otherInfo.className)) {
return false;
}
if (!superInterfaces.equals(otherInfo.superInterfaces)) {
return false;
}
return timeStamps.equals(otherInfo.timeStamps);
} else {
return false;
}
}
COM: <s> return true if the two type infos represent the same </s>
|
funcom_train/51451790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BoxLayout(jPanel, BoxLayout.LINE_AXIS));
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
jPanel.add(Box.createHorizontalGlue());
jPanel.add(getJButton());
jPanel.add(Box.createRigidArea(new Dimension(10, 0)));
jPanel.add(getJButton1());
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/39892814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getPanelMapa(), BorderLayout.CENTER);
jContentPane.add(getPanelInformacion(), BorderLayout.EAST);
jContentPane.add(new PanelAccesoRapido(mijuego),BorderLayout.SOUTH);
jContentPane.add(panelSuperior(),BorderLayout.NORTH);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/43866596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reduceEnergy(float reduction) {
getNodeInfo().setEnergy(getNodeInfo().getEnergy() - reduction);
print("Current energy is " + getNodeInfo().getEnergy());
if (getNodeInfo().getEnergy() < 20) {
setRadioOn(false);
print("Low energy, shutting down radio");
}
}
COM: <s> reduces the energy amount based on the reduction indicated </s>
|
funcom_train/13958819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String computedFromAddress() {
if (computedFromAddress == null) {
if (getFromAddress() != null) {
computedFromAddress = getFromAddress();
} else {
computedFromAddress = WOApplication.application().name()+"-"+getHostName()+"@" + getDomainName();
}
}
return computedFromAddress;
}
COM: <s> gets the from address for the appender </s>
|
funcom_train/28125852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteProjects() throws IOException, SAXException {
ProjectGroup results = getSampleData();
ProjectGroup newResults = writeAndReadProjects(results);
assertEquals(2, newResults.getProjects().size());
assertProjectData(newResults, ID1, "Project 1",
"Project 1 Description", 369);
}
COM: <s> tests saving and retrieving several projects </s>
|
funcom_train/39536204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean cellExist(String sourceId){
//getting the cell coordinates in the table corresponding to the given source
int rowIndex=TableRuntime.getRow(sourceId);
int colIndex=TableRuntime.getCol(sourceId);
return rowIndex>=0 && rowIndex<model.getRowCount() &&
colIndex>=0 && colIndex<model.getColumnCount();
}
COM: <s> checks whether the given source if corresponds to an existing table cell </s>
|
funcom_train/37415388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void traverse(int componentClass, HttpStream out) throws IOException {
if( (componentClass & Component.HTML_COMPONENT_MASK) == 0)
return; // Do nothing
/*
* Call the HTML specific paint() method. This is part of the translation we do.
* ie. DHTML component defines this method dfferently, using different signature based on the componentClass
* such as JavaScript or CSS.
*/
paint(out.getHtmlWriter());
}
COM: <s> the traversal method for the tree </s>
|
funcom_train/10417812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSecurityRole(String role) {
synchronized (securityRoles) {
String results[] =new String[securityRoles.length + 1];
for (int i = 0; i < securityRoles.length; i++)
results[i] = securityRoles[i];
results[securityRoles.length] = role;
securityRoles = results;
}
fireContainerEvent("addSecurityRole", role);
}
COM: <s> add a new security role for this web application </s>
|
funcom_train/43382623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scanWhiteSpace() throws NoSuchElementException {
for(int i=mark; i<command.length(); i++) {
mark = i;
if(!isWhiteSpace(command.charAt(i))) {
return;
}
}
mark = command.length();
throw new NoSuchElementException();
}
COM: <s> reads until non white space is reached </s>
|
funcom_train/45388807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRoundRect(Object gfx, int x, int y, int width, int height, int arcWidth, int arcHeight) {
Graphics g =(Graphics)gfx;
g.drawRoundRect(x, y, width, height, arcWidth, arcHeight);
}
COM: <s> draws the rounded corner rectangle with specified height and width </s>
|
funcom_train/891994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueUnbound(HttpSessionBindingEvent event) {
synchronized (ht) {
logCat.info("valueUnbound called");
Iterator iter = ht.values().iterator();
while (iter.hasNext()) {
Object obj = iter.next();
DataSourceFactory qry = (DataSourceFactory) obj;
qry.close();
}
ht.clear();
}
}
COM: <s> receive notification that this session was activated </s>
|
funcom_train/26414374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean receiveFrame(ModbusMessage msg) {
if (debug >= 4) {
System.out.println("Modbus: Receiveing Frame");
System.out.println("Transaction ID: " + msg.transID);
System.out.println("Frame Length: " + msg.length);
System.out.println(ByteUtils.toHex(msg.buff,msg.length));
}
return transport.receiveFrame(msg);
}
COM: <s> method to receive a modbus frame via the transport media </s>
|
funcom_train/36669449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processDirection(int row, int col, AIHelpers.Direction dir) {
int dirBlock = aih.getDupBoard(row, col, dir);
if (dirBlock == AIHelpers.EMPTY_PIECE) {
int length = getSequenceLength(row, col, AIHelpers
.getOppositeDirection(dir));
int points = (int) Math.pow(BASE_POINTS, length);
this.pointBoard.setPointBoard(row + dir.RowOffset(), col
+ dir.ColOffset(), points);
}
}
COM: <s> process each direction </s>
|
funcom_train/47751213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStatistic(String label) {
Statistic e = findStatistic(label);
if (e == null) {
e = new Statistic();
e.label = label;
e.value = 0;
e.cumul = 0;
e.color = IGraphConstant.COLORS[size()
% IGraphConstant.COLORS.length];
add(e);
rebuildGraph();
}
}
COM: <s> add a new statistic in the vector </s>
|
funcom_train/12842982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateArgument(ILaunchConfiguration configuration) {
String arguments= ""; //$NON-NLS-1$
try {
arguments= configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, ""); //$NON-NLS-1$
} catch (CoreException ce) {
ExternalToolsPlugin.getDefault().log(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Error_reading_configuration_7, ce);
}
argumentField.setText(arguments);
}
COM: <s> updates the argument widgets to match the state of the given launch </s>
|
funcom_train/42340370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disableActions() {
txtBrowserURI.setEnabled(false);
btnLaunchBrowser.setEnabled(false);
txtMailTo.setEnabled(false);
btnLaunchEmail.setEnabled(false);
rbEdit.setEnabled(false);
rbOpen.setEnabled(false);
rbPrint.setEnabled(false);
txtFile.setEnabled(false);
btnLaunchApplication.setEnabled(false);
btnFile.setEnabled(false);
}
COM: <s> disable all graphical components until we know </s>
|
funcom_train/44484956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayError(String message) {
if (debug) {
System.err.println(message);
}
final String fMessage = message;
shell.getDisplay().syncExec(new Runnable() {
public void run() {
Exception ex = new Exception(fMessage);
ex.printStackTrace();
Status status = new Status(Status.ERROR,BatikUIPlugin.getDefault().getBundle().getSymbolicName(),Status.OK,fMessage, ex);;
ErrorDialog.openError(shell,"Error",fMessage,status);
}
});
}
COM: <s> displays an error message </s>
|
funcom_train/49789557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAdPageHasContinueButton() throws Exception {
root = loadAndInfer(ExitGateAdSimple.class);
Session session = assertHasSession(root, "Advertising Session");
Frame ad = assertHasFrame(session, "Advertisement");
Gate gate = session.getExitGate();
assertEquals("View Ads Exit Gate", gate.getName());
Button button = assertHasButton(ad, "Continue");
assertGenerated(button);
Event event = button.getOnClick();
assertGenerated(event);
ECARule nav = assertHasNavigateAction(root, event, gate, "resume");
assertGenerated(nav);
}
COM: <s> a button continue will be created in the advertisement </s>
|
funcom_train/36108359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showHelp(PrintStream out){
if(showHelp!=null)try{
//public void printHelp(PrintWriter pw, int width=74, String cmdLineSyntax,
// String header=null, Options options, int leftPad=1,
// int descPad=3, String footer=null)
PrintWriter writer = new PrintWriter(out);
showHelp.setArgumentValue(0, writer);
showHelp.setArgumentValue(2, getUsageHelp());
showHelp.call();
writer.flush();
return;
}catch(Throwable e){
e.printStackTrace();
}
showArgumentsHelp(out);
}
COM: <s> by default called for option only </s>
|
funcom_train/37870876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String selectConfigFile() {
FileDialog dialog = new FileDialog(getControl().getShell(), SWT.OPEN);
dialog.setText("Select a Configuration File");
String[] filterExtensions = { "*.xml", "*.*" };
String[] filterNames = { "XML Files (*.xml)", "All Files (*.*)" };
dialog.setFilterExtensions(filterExtensions);
dialog.setFilterNames(filterNames);
return dialog.open();
}
COM: <s> opens a file dialog so that the configuration file can be selected </s>
|
funcom_train/42452564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LiteralSet buildLiteralSet(List<LiteralCommon<O>> extension) {
// first search if this set was not already created elsewhere
ArrayList<LiteralCommon<O>> toAdd = new ArrayList<LiteralCommon<O>>(this);
toAdd.addAll(extension);
LiteralSet lset = emptySet.get(extension); // acquires read-locks on other LiteralSets
if(lset == null) lset = new LiteralSet(toAdd);
return lset;
}
COM: <s> builds a new literal set relative to this set </s>
|
funcom_train/35680175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMSNSearch() throws Exception {
CixsJaxwsService service = Samples.getMSNSearch();
initJaxwsService(service);
_generator.setProxyTargetType(ProxyTargetType.WEBSERVICE.toString());
_generator.setWebServiceTargetParameters(Samples
.getMSNSearchWebServiceParameters());
_generator.execute();
check(service.getName());
}
COM: <s> test a straight generation with complex web service target </s>
|
funcom_train/12573568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSashForm() {
sashForm = new SashForm(this, SWT.NONE);
sashForm.setOrientation(org.eclipse.swt.SWT.VERTICAL);
createRuleDefinitionComposite();
createTextAreaComposite();
sashForm.setWeights(new int[] {2,1});
}
COM: <s> this method initializes sash form </s>
|
funcom_train/45612099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll( Condition[] meet ){
int ofx=0;
for(int x=0; x<meet.length; x++){
ofx=conditions.size()+x;
conditions.add(ofx, meet[x]);
propsup.fireIndexedPropertyChange("condition", ofx, null, meet[x]);
}
}
COM: <s> adds an array of conditions to be met </s>
|
funcom_train/35442838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEnroqueCorto() {
System.out.println("enroqueCorto");
Partida partida = null;
Fide instance = new Fide();
int[] expResult = null;
int[] result = instance.enroqueCorto(partida);
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 enroque corto method of class controller </s>
|
funcom_train/3930671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(String attributeName, Object attributeValue) {
// if (this.isRunningAsPortlet) {
// this.portletRequestHelper.setAttribute(attributeName,
// attributeValue);
// } else {
// httpServletRequestHelper.setAttribute(attributeName, attributeValue);
// }
this.addAttributeToRequest(attributeName, attributeValue);
}
COM: <s> add attributes to request for jetspeed attributes are available to all </s>
|
funcom_train/1549650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String testBoolean(String value) {
String s = value.toLowerCase();
if (s.equals("true") || s.equals("on") || s.equals("yes")) {
return "true";
} else if (s.equals("false") || s.equals("off") || s.equals("no")) {
return "false";
} else {
return null;
}
}
COM: <s> test whether the string represent by value maps to a boolean </s>
|
funcom_train/20728397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getJFreeReportFile() {
File file1 = null;
try {
file1 = Fileio.getFile("BalanceResult5.xml", "reports", false, false);
} catch (Exception ee) {
Log.log(Log.DEBUG, this, "No file? error=" + ee);
}
return file1;
}//}}}
//{{{ +getJFreeReportTable(String, int) : TableModel
COM: <s> gets the j free report file attribute of the balance report object </s>
|
funcom_train/21015505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintControls(Graphics2D g2) {
g2.setStroke(normalStroke);
g2.setColor(doc.getControlsColor());
KnotworkGraph graph = this.doc.getGraph();
Point2D position, control;
for (KnotworkEdge edge : graph.getEdges()) {
for(KnotworkCurveHandle handle : edge.getHandles()){
position = handle.getPosition();
if(position!=null)
position.draw(g2, 2);
control = handle.getControl();
if(control!=null)
control.draw(g2, 2);
}
}
}
COM: <s> draw control points of cubic splines which guide the curves </s>
|
funcom_train/27960012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trimToSize() {
// Check if the Vector is already trimmed, to save execution time
if (elementCount == elementData.length) return;
// Guess not
Object[] newArray = new Object[elementCount];
System.arraycopy(elementData, 0, newArray, 0, elementCount);
elementData = newArray;
}
COM: <s> trims the vector down to size </s>
|
funcom_train/51818069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getVisibleColumns() {
List visibleColums = new ArrayList(getReport().getColumns());
for (Iterator iterator = getReport().getColumnsGroups().iterator(); iterator.hasNext();) {
DJGroup group = (DJGroup) iterator.next();
if (group.getLayout().isHideColumn()){
visibleColums.remove(group.getColumnToGroupBy());
}
}
return visibleColums;
}
COM: <s> returns a list with the columns that are visible </s>
|
funcom_train/36149751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double LinearCorrelationCoeff() {
double sumX = SumX();
double sumY = SumY();
return (n * SumXY() - sumX * sumY) /
Math.sqrt(n * SumXSq() - Math.pow(sumX, 2)) /
Math.sqrt(n * SumYSq() - Math.pow(sumY, 2));
}
COM: <s> returns the linear correlation coefficient </s>
|
funcom_train/13635512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(SessionID sessionID, String key) throws ConfigError, FieldConvertError {
final String value = interpolate(getSessionProperties(sessionID).getProperty(key));
if (value == null) {
throw new ConfigError(key + " not defined");
}
return value;
}
COM: <s> get a settings string </s>
|
funcom_train/50314138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void redraw (int x, int y, int width, int height, boolean all) {
checkWidget ();
if (width <= 0 || height <= 0) return;
if (!Fox.FXWindow_shown (handle)) return;
Fox.FXWindow_update(handle, x, y, width, height); //TODO: all?
}
COM: <s> causes the rectangular area of the receiver specified by </s>
|
funcom_train/39561196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canAccess(String authenticationString) {
// if no users, return true
if (this.serviceConfiguration.getAuthorizedUsers().size() == 0) {
return true;
}
// if null or veri small, return false
if ((authenticationString == null)
|| (authenticationString.length() < "Basic ".length())) {
return false;
}
// Check if the user exists
return this.serviceConfiguration.getAuthorizedUsers().contains(
authenticationString.substring("Basic ".length()));
}
COM: <s> check if user can access to the wrapper </s>
|
funcom_train/48102292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trackingReceivedResultsEvent(long latency, long rate, long downloadCounter, long logCounter, String trackingFile) {
// display tracking results
mainFrame.setTrackingResults(Long.toString(latency),
Long.toString((long)(rate/1024.0)),
Long.toString(tracker.getTrackingDownloadFileSize()),
trackingFile);
// set counter values
this.downloadCounter = downloadCounter;
this.logCounter = logCounter;
}
COM: <s> show tracking results in the user interface </s>
|
funcom_train/21189536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties getBuildProperties(Element log) {
Properties buildProperties = new Properties();
Iterator propertyIterator = log.getChild("info")
.getChildren("property").iterator();
while (propertyIterator.hasNext()) {
Element property = (Element) propertyIterator.next();
buildProperties.put(property.getAttributeValue("name"), property
.getAttributeValue("value"));
}
return buildProperties;
}
COM: <s> extracts the build properties from the cruise control log </s>
|
funcom_train/43577963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
m_hoursTable.setText(0, 0, "Date");
m_hoursTable.setText(0, 1, "Day");
m_hoursTable.setText(0, 2, "From Hour");
m_hoursTable.setText(0, 3, "To Hour");
m_hoursTable.setText(0, 3, "Total");
mainPanel.add(m_hoursTable);
RootPanel.get("hoursTable").add(mainPanel);
}
COM: <s> this is the entry point method </s>
|
funcom_train/20621406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JProgressBar getProgress() {
if (ivjProgress == null) {
try {
ivjProgress = new JProgressBar();
ivjProgress.setName("Progress");
ivjProgress.setStringPainted(true);
}
catch (Throwable ivjExc) {
handleException(ivjExc);
}
}
return ivjProgress;
}
COM: <s> return the progress property value </s>
|
funcom_train/5553354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AST create() {
AST t = null;
if (theASTNodeTypeClass == null) {
t = new CommonAST();
} else {
try {
t = (AST) theASTNodeTypeClass.newInstance(); // make a new one
} catch (Exception e) {
antlr.Tool.warning("Can't create AST Node " + theASTNodeType);
return null;
}
}
return t;
}
COM: <s> create a new empty ast node if the user did not specify </s>
|
funcom_train/7640547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean updateNHAllocationStackCalls(final ClientData clientData, final int count) {
if (mDisplay.isDisposed() == false) {
mDisplay.asyncExec(new Runnable() {
public void run() {
updateAllocationStackCalls(clientData, count);
}
});
return true;
}
return false;
}
COM: <s> update the native heap panel with the amount of allocation for which the </s>
|
funcom_train/9568560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render(PdfObject object) {
if (object instanceof PRStream) {
PRStream stream = (PRStream)object;
try {
TextAreaOutputStream taos = new TextAreaOutputStream(text);
taos.write(PdfReader.getStreamBytes(stream));
//text.addMouseListener(new StreamEditorAction(stream));
}
catch(IOException e) {
text.setText("The stream could not be read: " + e.getMessage());
}
}
else {
update(null, null);
return;
}
text.repaint();
repaint();
}
COM: <s> renders the content stream of a pdf object or empties the text area </s>
|
funcom_train/50870195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildMenuBar() {
if (menubar == null) {
// create menu bar
menubar = new JMenuBar();
} else {
menubar.removeAll();
}
buildFileMenu();
buildGraphMenu();
buildKnowledgeBaseMenu();
buildExamplesMenu();
menubar.add(Box.createHorizontalGlue());
buildHelpMenu();
this.menubar.updateUI();
}
COM: <s> build the menu bar </s>
|
funcom_train/38574832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveColor(Color color){
for(int col = 0; col < this.getColumnCount(); col++){
for(int row = 0; row < this.getRowCount(); row++){
if(this.getCellRenderer(row, col) instanceof GridTableCellRenderer){
QTableCellRenderer rend = (QTableCellRenderer)this.getCellRenderer(row, col);
rend.setActiveColor(color);
}
}
}
}
COM: <s> set the color of the active cell in the table </s>
|
funcom_train/18525556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() throws IOException, SAXException {
if (dialog != null) {
InputSource is = LanguageFileLoader.getReference().getLanguageInputStream(LanguageFileLoader.SAVE_TC_DIALOG_XML_FILE);
if (is != null) {
getParser().setContentHandler(this);
getParser().setErrorHandler(this);
getParser().parse(is);
}
}
}
COM: <s> parse the savetcdialog </s>
|
funcom_train/46155566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUserFromGroup(String groupID, WonderlandClientID clientID) {
LOGGER.warning("Remove user " + clientID + " from group " + groupID);
Channel channel = groupsRef.get().get(groupID);
if (channel != null) {
channel.leave(clientID.getSession());
}
}
COM: <s> remove the given user from the given group </s>
|
funcom_train/3898521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openResourceEditor(ResourceEntry resourceEntry) {
if(resourceEntry == null) {
return;
}
try {
IEditorInput input = new ResourceEditorInput(resourceEntry);
IWorkbenchPage page = getViewSite().getPage();
page.openEditor(input, RESOURCE_EDITOR_ID);
//page.openEditor(input, TEXT_EDITOR_ID);
}
catch(Exception ex) {
ex.printStackTrace();
}
}
COM: <s> open a resource file for editing </s>
|
funcom_train/20081319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GridJobInfo createInfo(GridJobProfile profile) {
// Check for Nulls
Assert.notNull(profile);
GridJobInfo info = new GridJobInfo(profile.getJobId(), profile.getJob()
.getClass().getSimpleName());
if (profile.isArchived()) {
// If Archived Job, include Archive
info.setArchive(profile.getArchive());
}
return info;
}
COM: <s> creates and returns the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.