__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/41975676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String register(){
Attribute attribute = new Attribute();
attribute.put(UserAttributeKind.EMAIL,this.email);
attribute.put(UserAttributeKind.PASSWORD,this.password);
attribute.put(UserAttributeKind.NICK_NAME, this.nickname);
try {
this.login_user = this.userService.register(attribute);
if(this.login_user == null)return "failure";
return "correct";
} catch (DataBaseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "failure";
}
}
COM: <s> method to respond to user register </s>
|
funcom_train/47399463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTimeout(long currTime) {
boolean bActive = true;
int maxIdleTime = m_user.getMaxIdleTime();
if(maxIdleTime > 0) {
long currIdleTimeMillis = currTime - m_lastAccessTime;
long maxIdleTimeMillis = maxIdleTime * 1000L;
bActive = currIdleTimeMillis <= maxIdleTimeMillis;
}
return !bActive;
}
COM: <s> it checks the request timeout </s>
|
funcom_train/8022200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPassword() {
System.out.println("setPassword");
String password = "";
Config instance = new Config();
instance.setPassword(password);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set password method of class vgrabber </s>
|
funcom_train/17141047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String writeToString() {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < dimension; ++i) {
builder.append(Float.toString(coordinates[i]));
if (i != dimension - 1) {
builder.append("|");
}
}
return builder.toString();
}
COM: <s> writes vector to a string of the form x1 x2 x3 </s>
|
funcom_train/19241936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int indexOfMedia(MediaId mediaId, List list) {
int index = -1;
for (int i = 0; i < list.size(); i++) {
Media media = (Media) list.get(i);
if (media.getId().equals(mediaId.toString())) {
index = i;
break;
}
}
return index;
}
COM: <s> find an audio media object by id </s>
|
funcom_train/51206768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection listAllQualites() throws EJBException {
System.out.println("listing all qualites ");
Collection<QualiteValue> qualitesValue = new ArrayList<QualiteValue>();
try {
Collection qualites = getQualiteHome().findAll();
for (Iterator iter = qualites.iterator(); iter.hasNext();) {
QualiteLocal qualiteLocal = (QualiteLocal) iter.next();
qualitesValue.add(qualiteLocal.getQualiteValue());
}
} catch (FinderException e) {
throw new EJBException(e);
}
return qualitesValue;
}
COM: <s> business method list all qualites </s>
|
funcom_train/45355473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isConnectionFactory(Context ctx, NameClassPair pair) throws Exception {
Object obj = null;
try {
obj = ctx.lookup(pair.getName());
} catch (Exception e) {
return false;
}
Class theClass = obj.getClass();
Class[] interfaces = theClass.getInterfaces();
for (int i = 0; i < interfaces.length; i++)
if (isConnectionFactory(interfaces[i]))
return true;
return false;
}
COM: <s> tests if a given pair is a connection factory </s>
|
funcom_train/43817147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String lookForMatchingUserAgent(SortedSet userAgentsSet, String userAgent) {
int tollerance = net.sourceforge.wurfl.core.utils.StringUtils.indexOfOrLength(userAgent, "/", userAgent.indexOf("Nokia"));
String match = net.sourceforge.wurfl.core.utils.StringUtils.risMatch(userAgentsSet, userAgent, tollerance);
return match;
}
COM: <s> apply ris with fs first slash after nokia string as a threshold </s>
|
funcom_train/47160852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object visitScoped(SimpleNode node, Object data) {
ScopeImpl newScope = new ScopeImpl();
newScope.setParent(currentScope);
currentScope = newScope;
node.setScope(currentScope);
Object value = super.visit(node, data);
currentScope = (ScopeImpl)newScope.getParent();
return value;
}
COM: <s> visits the given abstract syntax tree using a new scope </s>
|
funcom_train/3577140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertPathToThisSystem(String path){
String sep = System.getProperty("file.separator");
if(sep.equals("/")){
int change = path.indexOf("\\");
while(change != -1){
path = path.substring(0, change) + "/" +
path.substring(change + 1, path.length());
change = path.indexOf("\\");
}
} else {
int change = path.indexOf("/");
while(change != -1){
path = path.substring(0, change) + "\\" +
path.substring(change + 1, path.length());
change = path.indexOf("/");
}
}
return path;
}
COM: <s> convert the given path to the system format </s>
|
funcom_train/14444209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beforeLookupAction(ValueObject parentVO) {
SubjectHierarchyLevelVO vo = (SubjectHierarchyLevelVO)parentVO;
treeLevelDataLocator.getTreeNodeParams().put(
ApplicationConsts.PROGRESSIVE_HIE02,
vo.getProgressiveHie02REG16()
);
treeLevelDataLocator.getTreeNodeParams().put(
ApplicationConsts.COMPANY_CODE_SYS01,
vo.getCompanyCodeSys01REG16()
);
}
COM: <s> method called before code validation and on lookup button click </s>
|
funcom_train/16412528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Image getScaledImage(Image srcImg, int w, int h) {
BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = resizedImg.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2.drawImage(srcImg, 0, 0, w, h, Color.white, null);
g2.dispose();
return resizedImg;
}
COM: <s> resizes an image using a graphics2 d object backed by a buffered image </s>
|
funcom_train/3421075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
// call handlers
if(fDTDGrammar != null )
fDTDGrammar.textDecl(version, encoding, augs);
if (fDTDHandler != null) {
fDTDHandler.textDecl(version, encoding, augs);
}
}
COM: <s> notifies of the presence of a text decl line in an entity </s>
|
funcom_train/31625428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStepAttribute(String key, String value) throws DBException {
StepAttributes sa = new StepAttributes();
sa.setField(StepAttributes.FLD_STEPID, getId());
sa.setField(StepAttributes.FLD_ATTRIBUTEKEY, key);
sa.setField(StepAttributes.FLD_ATTRIBUTEVALUE, value);
sa.update();
clearAttribMap();
}
COM: <s> update an attribute for the step </s>
|
funcom_train/13260046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix4 mult( Matrix4 m ) {
Matrix4 res = new Matrix4( 0.0f );
for ( int r = 0; r < 4; r++ ) {
for ( int c = 0; c < 4; c++ ) {
float sum = 0.0f;
for ( int i = 0; i < 4; i++ ) {
sum += this.get( r, i ) * m.get( i, c );
}
res.set( r, c, sum );
}
}
return res;
}
COM: <s> multiplies the matrix by another matrix </s>
|
funcom_train/22384668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void excise(String dim) {
synchronized(getSpace()) {
ZZCell cm = s(dim, -1);
ZZCell cp = s(dim, 1);
if(cm!=null && cp!=null) {
cm.disconnect(dim, 1);
cp.disconnect(dim, -1);
cm.connect(dim, cp);
}
else if(cm!=null)
cm.disconnect(dim, 1);
else if(cp!=null)
cp.disconnect(dim, -1);
}
}
COM: <s> delete this cell from a rank along a dimension </s>
|
funcom_train/4484324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInit() throws ServletException {
StrutsConfigReloadFilterStub filter = new StrutsConfigReloadFilterStub();
filter.init(this.config);
StrutsResourcesReloaderStub rd = (StrutsResourcesReloaderStub) filter.getResourceReloader();
List<ResourceListener> listeners = rd.getListeners();
assertEquals(1, listeners.size());
assertFalse(rd.hasModified());
}
COM: <s> test method for </s>
|
funcom_train/1939853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPage(String pageName) {
boolean found = false;
if (StringUtils.isBlank(pageName)) {
// page names without characters aren't allowed
return found;
}
try {
for (PageFactory pageFactory : loader) {
if (StringUtils.equals(pageName, pageFactory.getPageName())) {
found = true;
break;
}
}
} catch (ServiceConfigurationError e) {
log.error(e);
}
return found;
}
COM: <s> returns whether a page with the given name exists </s>
|
funcom_train/18583248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Section getDocumentSectionByType(String type) {
Set sections = this.getActs();
Section ret = null;
for (Object elem : sections) {
Section section = (Section) elem;
if (section.getCode().getCode().equalsIgnoreCase(type)) {
ret = section;
}
}
return ret;
}
COM: <s> returns a specific document section according to the specified type </s>
|
funcom_train/9298983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DeltaSet getRealConfig(DeltaSet indexc) {
DeltaSet realc = new DeltaSet();
for (Iterator iter = indexc.iterator(); iter.hasNext();) {
Integer element = (Integer) iter.next();
realc.add(this.fOriginalConfig[element.intValue()]);
}
return realc;
}
COM: <s> retrieves the original elements of the test case according to </s>
|
funcom_train/4809550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean doCommand(Base b) {
defendTarget = getTargetFrom(b.getLocation());
if(defendTarget.isEnemyOccupied(b.getOwner())) {
ListIterator<Ownable> i = defendTarget.getOccupants().listIterator(0);
Ownable x;
if(i.hasNext())
x = i.next();
else
return true;
while(x.getHealth() <= 0 && i.hasNext())
x = i.next();
x.getAttacked(b);
return true;
}
else
return true;
}
COM: <s> if tile defend target is enemy occupied base b attacks that location </s>
|
funcom_train/4232926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pageLoaded() {
String location = htmlRenderer.getPage().toString();
try {
properties.setProperty("location", URLEncoder.encode(location, "UTF-8"));
} catch (UnsupportedEncodingException ignore) { }
locationField.setText(location);
setDescription(getTitle());
reloadMenuItem.setEnabled(true);
autoReloadMenu.setEnabled(true);
}
COM: <s> called when the page has been loaded </s>
|
funcom_train/36756440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsValidPlan() {
// System.out.println("isValidPlan");
//
// Plan plan = null;
// Degree instance = null;
//
// boolean expResult = true;
// boolean result = instance.isValidPlan(plan);
// 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 is valid plan method of class csis543 tfinal project </s>
|
funcom_train/17279613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(CompletionResultSet resultSet) {
assert (SwingUtilities.isEventDispatchThread());
assert !cancelled : "refresh() called on canceled task"; // NOI18N
if (queryInvoked) {
assert (resultSet != null);
refreshResultSet = resultSet;
refreshImpl();
} else {
query.preQueryUpdate(component);
}
}
COM: <s> called by completion infrastructure in awt thread once there </s>
|
funcom_train/48406322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ContainerUseRelationship_parent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ContainerUseRelationship_parent_feature", "_UI_ContainerUseRelationship_type"),
SpemxtcompletePackage.eINSTANCE.getContainerUseRelationship_Parent(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the parent feature </s>
|
funcom_train/22205497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getObjectsInScope(Collection scope, Collection objects) {
if (objects == null) {
return getObjectsInScope(scope);
} else {
ArrayList ret = new ArrayList(objects);
Mango.removeIf(ret, new Not(new InScopeTester(scope)));
return Collections.unmodifiableCollection(ret);
}
}
COM: <s> gets the all topic map objects in the specified scope </s>
|
funcom_train/44172152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean convert(StringBuffer buf, IHeadList f, int precedence) {
if (f.size() == 1) {
fFactory.tagStart(buf, "mrow");
fFactory.convert(buf, f.get(0), 0);
fFactory.tag(buf, "mo", fOperator);
fFactory.tagEnd(buf, "mrow");
return true;
}
return false;
}
COM: <s> converts a given function into the corresponding math ml output </s>
|
funcom_train/24431872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numbersOfNotNulls(GameField field) {
int tmp = 0;
for (int i = 0; i < field.getStones().length; i++)
for (int j = 0; j < field.getStones()[0].length; j++) {
if (field.getStones()[i][j] != 0)
tmp += 1;
}
return tmp;
}
COM: <s> die methode prueft ob das spielfeld leer ist </s>
|
funcom_train/36081833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fromAxes(fVector3 uAxis, fVector3 vAxis, fVector3 wAxis) {
m00 = uAxis.x;
m10 = uAxis.y;
m20 = uAxis.z;
m01 = vAxis.x;
m11 = vAxis.y;
m21 = vAxis.z;
m02 = wAxis.x;
m12 = wAxis.y;
m22 = wAxis.z;
}
COM: <s> recreate matrix using the provided axis </s>
|
funcom_train/9704854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseSource(Document doc, File outputFile) throws Exception {
OutputStream outStream = new FileOutputStream(outputFile);
XSLTTemplateProcessor.parse(outStream,
doc,
this.sourceTemplateCache.newTransformer());
outStream.write('\n');
outStream.write('\n');
outStream.flush();
outStream.close();
}
COM: <s> writes the output file </s>
|
funcom_train/4374868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void subAppend(LoggingEvent event) {
long n = System.currentTimeMillis();
if (n >= nextCheck) {
now.setTime(n);
nextCheck = rc.getNextCheckMillis(now);
try {
rollOver();
}
catch(IOException ioe) {
LogLog.error("rollOver() failed.", ioe);
}
}
super.subAppend(event);
}
COM: <s> this method differentiates daily rolling file appender from its </s>
|
funcom_train/13892786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean noMatchForTagInAttributes(AttributeSet attr, HTML.Tag t, Object tagValue) {
if (attr != null && attr.isDefined(t)) {
Object newValue = attr.getAttribute(t);
if ((tagValue == null) ? (newValue == null) : (newValue != null && tagValue.equals(newValue))) {
return false;
}
}
return true;
}
COM: <s> searches the attribute set for a tag both of which </s>
|
funcom_train/4962762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRandomAction(Object state) {
int nTrans = model_.getNumActions();
BitSet tried = done_.get(state);
int index = rand_.nextInt(nTrans);
while (tried.cardinality() < nTrans) {
while (tried.get(index)) {
index = rand_.nextInt(nTrans);
}
tried.set(index);
return index;
}
return -1;
}
COM: <s> returns a random unexplored action for the state from todo map </s>
|
funcom_train/17769539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addImplicitCollection(Class ownerType, String fieldName, Class itemType) {
if (implicitCollectionMapper == null) {
throw new InitializationException("No " + ImplicitCollectionMapper.class.getName() + " available");
}
implicitCollectionMapper.add(ownerType, fieldName, null, itemType);
}
COM: <s> adds implicit collection which is used for all items of the given </s>
|
funcom_train/45806345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Collection getCharacteristicsInScope(Collection objects, Collection scope) {
Iterator it = objects.iterator();
Collection objectsInScope = new ArrayList();
while (it.hasNext()) {
ScopedIF scopedObj = (ScopedIF) it.next();
if (scopedObj.getScope().equals(scope))
objectsInScope.add(scopedObj);
}
return objectsInScope;
}
COM: <s> internal return all objects that are in the given scope </s>
|
funcom_train/39965567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateHighCard() {
type = HandValueType.HIGH_CARD;
rankings[0] = type.getValue();
// Get the five highest values.
int index = 1;
for (Card card : cards) {
rankings[index++] = card.getRank();
if (index > 5) {
break;
}
}
}
COM: <s> calculates the hand value based on the highest card and four kickers </s>
|
funcom_train/4127107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNation(Nation newNation) {
Nation oldNation = getNation();
nationID = newNation.getId();
getGame().getNationOptions().getNations().put(oldNation, NationState.AVAILABLE);
getGame().getNationOptions().getNations().put(newNation, NationState.NOT_AVAILABLE);
}
COM: <s> sets the nation for this player </s>
|
funcom_train/972658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object primero, Object segundo) {
try{
Clientes first = (Clientes) primero;
Clientes second = (Clientes) segundo;
if( first.id == second.id){
return 1;
}else{
return 0;
}
}catch(Exception E){
System.out.println("Objects passed not Client objects.");
return -1;
}
}
COM: <s> compare by mathching ids </s>
|
funcom_train/17047126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MultiParseSettings buildSettings(String compoundParserId, String[] atnParserFlow) {
MultiParseSettings result = null;
final CompoundParser cp = id2CompoundParser.get(compoundParserId);
if (cp != null) {
result = ParseSettingsFactory.getInitialSettings(compoundParserId, atnParserFlow);
}
return result;
}
COM: <s> build settings that encompasses all of the identified compound parsers </s>
|
funcom_train/46122342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DetachedCriteria getInvestigationGeometryFilter(final Geometry geometry) {
final DetachedCriteria dc = DetachedCriteria.forClass(Event.class, "event");
dc.createCriteria("event.investigations").add(Restrictions.eqProperty("id", "investigation.id"));
dc.createCriteria("event.geography").add(SpatialRestrictions.withinOrFilter("geometry", geometry, 1000, true));
dc.setProjection(Projections.property("id"));
// dc.setComment(" */ /*+ ORDERED ");
return dc;
}
COM: <s> get the subquery for filtering based on events </s>
|
funcom_train/4467734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GraphicObject translate(final int xLag, final int yLag) {
if ( xLag!=0 || yLag!=0) {
final JavaScriptObject matrixTranslated = getTranslationMatrix( xLag, yLag);
position.translate(xLag,yLag);
center.translate(xLag, yLag);
bounds.translate(xLag,yLag);
applyModification(matrixTranslated);
setBounds();
}
return this;
}
COM: <s> does a translation of this object </s>
|
funcom_train/27682682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Relationship getRelationship(String name) {
RelationshipDescriptor rd;
// Retrieve the relationship descriptor
rd = getRelationshipDescriptor(name);
// Do lazy initialization here, try to find the
// relationship for the descriptor, if not found,
// create a new one.
if (! relationships.containsKey(name)) {
relationships.put(name, new Relationship(rd, this));
}
return (Relationship) relationships.get(name);
}
COM: <s> returns a relationship object for a particular relationship </s>
|
funcom_train/22168684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element createEmptyItem(Document doc) {
// Create the element and assign its attributes
Element item = doc.createElement("item");
String itemId = getId();
item.setAttribute("id", itemId);
item.setAttribute("data_type", getType());
// Return the item element
return item;
}
COM: <s> create an empty element with its attributes id and type </s>
|
funcom_train/13438344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IconNode addObject(Object child) {
IconNode parentNode = null;
TreePath parentPath = tree.getSelectionPath();
if (parentPath == null) {
parentNode = rootNode;
} else {
parentNode = (IconNode)
(parentPath.getLastPathComponent());
}
return addObject(parentNode, child, true);
}
COM: <s> add child to the currently selected node </s>
|
funcom_train/32056620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRendererComponent() {
System.out.println("testGetRendererComponent");
JGraph jgraph = new JGraph();
CellView cellview = null;
boolean flag = false, flag1 = false, flag2 = false;
VertexRenderer vertRend = new VertexRenderer();
vertRend.getRendererComponent(jgraph, cellview, flag, flag1, flag2);
}
COM: <s> this function tests get renderer component function of default graph cell class </s>
|
funcom_train/41164277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoParagraphCheckList2 update(CoParagraphCheckList2 entity) {
EntityManagerHelper.log("updating CoParagraphCheckList2 instance", Level.INFO, null);
try {
CoParagraphCheckList2 result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved co paragraph check list2 entity and return it or </s>
|
funcom_train/35683054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeProjectPreferences() throws BackingStoreException {
Properties props = getPersistProperties();
if (props != null) {
storeProperties(getProjectPreferences(), getPersistProperties());
try {
getProjectPreferences().flush();
} catch (BackingStoreException e) {
logCoreException(e, getPluginId());
}
}
}
COM: <s> saves the user choices reflected by the model in a preference node </s>
|
funcom_train/2802396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assignIcons() {
mBttModifyField.setIcon(IconLoader.getCheckOutIcon());
mBttUpdateField.setIcon(IconLoader.getCheckInIcon());
mBttSave.setIcon(IconLoader.getSaveIcon());
mBttClose.setIcon(IconLoader.getCancelIcon());
mButtonViewXml.setIcon(IconLoader.getTextIcon());
}
COM: <s> assigns to the various buttons the associated icons </s>
|
funcom_train/35066162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDisplay() {
userAnnotationTextField.setText(userAnnotation);
firstVersionLabel.setText(firstVersionText);
if (theBug == null) {
return;
}
int comboIndex = theBug.getUserDesignationKeyIndex();
if (comboIndex == -1) {
FindbugsPlugin.getDefault()
.logError("Cannot find user designation");
} else {
designationComboBox.select(comboIndex);
}
}
COM: <s> updates the control using the current window size and the contents of the </s>
|
funcom_train/24926880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BufferedImage bottomTrimmed(MobileDeviceInfo deviceInfo, BufferedImage img) {
int trimmedHeight = getTrimmedHeight(deviceInfo, img);
BufferedImage returnValue = new BufferedImage(img.getWidth(),
trimmedHeight,
BufferedImage.TYPE_INT_RGB);
Graphics g = returnValue.createGraphics();
g.drawImage(img, 0, 0, null);
return returnValue;
}
COM: <s> returns a trimmed at the bottom image </s>
|
funcom_train/18107819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(String inputFilePath, String outputFilePath) throws ParseContentException{
try{
//write into file
String content = parse(inputFilePath);
FileUtil.writeString(outputFilePath, content, KIMClientConstants.DEFAULT_ENCODING);
}
catch(Exception e){
log.error("Error occured in MSExcelParser ", e);
e.printStackTrace();
throw new ParseContentException(e);
}
}
COM: <s> parse content of xls file to txt file </s>
|
funcom_train/22439571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void waitForDone() {
if (_proc == null) {
return;
}
try {
_out.close();
_err.close();
final int status = _proc.waitFor();
if (status != 0) {
VSSPlugin.log(IStatus.WARNING, "SS.EXE returned with status = " + status);
}
} catch (Exception e) {
VSSPlugin.log(IStatus.ERROR, "Unable to run command " + toString(), e);
setError(ITeamStatusConstants.IO_FAILED_STATUS);
}
}
COM: <s> closes the streams and wait for process to complete </s>
|
funcom_train/17893334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPropertyErrors() {
ActionControl control = new ActionControl();
assertNotNull(control.getPropertyErrors());
assertTrue(control.getPropertyErrors().isEmpty());
Map<String, ErrorCode> propErrs = new TreeMap<String, ErrorCode>();
propErrs.put("property2", ErrorCode.INVAL_ALIAS);
control.setPropertyErrors(propErrs);
ErrorCode code = control.getPropertyErrors().get("property2");
assertNotNull(code);
assertTrue(code == ErrorCode.INVAL_ALIAS);
}
COM: <s> test that the setting of the property errors collection is valid </s>
|
funcom_train/46577516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) return;
Collection<TopicNode> nodes = new Vector<TopicNode>();
for (Topic topic : selectionModel.getSelected()) {
nodes.add(new TopicNode(data.getTopicManager(), topic));
}
topicProvider.provide(nodes);
}
COM: <s> handle table selection change by calling topic provider for the new </s>
|
funcom_train/27705939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Dialog getDialog() {
Container parent;
for( parent = comboBox.getParent(); parent != null && !( parent instanceof Dialog )
&& !( parent instanceof Window ); parent = parent.getParent() ) {
;
}
if( parent instanceof Dialog ) {
return (Dialog)parent;
}
else {
return null;
}
}
COM: <s> copied directly from basic combo popup </s>
|
funcom_train/22233640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getNormalIndices(int index, int normalIndices[]) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_NORMAL_INDEX_READ))
throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray13"));
((IndexedGeometryArrayRetained)this.retained).getNormalIndices(index, normalIndices);
}
COM: <s> retrieves the normal indices associated with the vertices starting at </s>
|
funcom_train/20081540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findMaxExposure() {
maxexposureBlue = maxexposureRed = maxexposureGreen = 0;
for (int x = 0; x <fullWidth; x++) {
for (int y = 0; y < fullHeight; y++) {
maxexposureBlue = Math.max(maxexposureBlue, exposureBlue[x][y]);
maxexposureRed = Math.max(maxexposureRed, exposureRed[x][y]);
maxexposureGreen = Math.max(maxexposureGreen,
exposureGreen[x][y]);
}
}
}
COM: <s> find the largest exposure values for normalization </s>
|
funcom_train/10906820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClip(Shape cl) {
PDFData data = getPDFData();
Shape clip = data.clip;
if (clip != null) {
Area newClip = new Area(clip);
newClip.intersect(new Area(cl));
data.clip = new GeneralPath(newClip);
} else {
data.clip = cl;
}
}
COM: <s> set the current clip </s>
|
funcom_train/51342302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextPartitionId(final String scaleOutIndexName) {
final IMetadataService mds = getFederation().getMetadataService();
if (mds == null) {
throw new RuntimeException("Metadata service not discovered.");
}
try {
// obtain new partition identifier from the metadata service (RMI)
final int newPartitionId = mds.nextPartitionId(scaleOutIndexName);
return newPartitionId;
} catch (Throwable t) {
throw new RuntimeException(t);
}
}
COM: <s> requests a new index partition identifier from the </s>
|
funcom_train/36075642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteFromSessionId(String session_id) {
try {
Connection con = null;
PreparedStatement ps = null;
con = DBUtil.getConnection();
ps = con.prepareStatement(deleteSQL1);
ps.setString(1, session_id);
ps.executeUpdate();
} catch (SQLException ex) {
logger.log(Level.SEVERE, null, ex);
}
}
COM: <s> delete categories object </s>
|
funcom_train/10628846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOneOne() {
BigInteger aNumber = BigInteger.ONE;
BigInteger bNumber = BigInteger.ONE;
BigInteger result = aNumber.and(bNumber);
assertTrue(result.equals(BigInteger.ONE));
assertEquals("incorrect sign", 1, result.signum());
}
COM: <s> and for one and one </s>
|
funcom_train/51533577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadImages() {
try {
String name = null;
while (!landmarksLoaded) {
synchronized (this) {
wait();
}
}
imageManager.loadImagesCache(landmarkStore.getCategories());
imageManager.loadImagesCache(PRELOAD_IMAGES);
commandAction(ProgressScreen_nextCommand, null);
} catch (Exception ioe) {
ioe.printStackTrace();
}
}
COM: <s> load all images </s>
|
funcom_train/21155866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestStop(){
final String METHOD="requestStop()";
if ( TRC_LOGGER.isDebugMinEnabled()){
TRC_LOGGER.debugMin(METHOD+"|entry");
}
requestStop = true;
selector.wakeup();
if ( TRC_LOGGER.isDebugMinEnabled()){
TRC_LOGGER.debugMin(METHOD+"|exit");
}
}
COM: <s> make selector thread stop </s>
|
funcom_train/25576783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createBoxLabel(String textBundleKey, Icon icon) {
if(orientation == LEFT_TO_RIGHT){
boxHeaderLabel = new I18nLabel(textBundleKey, icon, I18nLabel.LEFT);
boxHeaderLabel.setBorder(BorderFactory.createEmptyBorder(0,7,0,0));
}
else {
boxHeaderLabel = new I18nLabel(textBundleKey, icon, I18nLabel.RIGHT);
boxHeaderLabel.setBorder(BorderFactory.createEmptyBorder(0,0,0,7));
boxHeaderLabel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
}
}
COM: <s> initializes the tool bar components </s>
|
funcom_train/31910501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* public void setShapePainter(int index, ShapePainter shapePainter) {
if (shapePainter == null) {
return;
}
if (this.shape != shapePainter.getShape()) {
shapePainter.setShape(shape);
}
if (painters == null || index >= painters.length) {
throw new IllegalArgumentException("Bad index: "+index);
}
painters[index] = shapePainter;
}*/
COM: <s> sets to the specified index the specified shape painter </s>
|
funcom_train/11038269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWrappedDataHandler() throws Exception {
URL xmlAttachment = new URL("file:./test-resources/soapmessage.xml");
DataHandler dh = new DataHandler(xmlAttachment);
assertTrue(dh.getContentType().equals("application/xml"));
WrappedDataHandler wrappedDH = new WrappedDataHandler(dh, "text/xml");
assertTrue(wrappedDH.getContentType() != null);
assertTrue(wrappedDH.getContentType().equals("text/xml"));
}
COM: <s> verify that the wrapped data handler maintains the correct content type value </s>
|
funcom_train/2464152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NodeList getPidfChilds(Element element, String childName) {
NodeList res;
res = element.getElementsByTagNameNS(NS_VALUE, childName);
if (res.getLength() == 0) {
res = element.getElementsByTagNameNS(ANY_NS, childName);
}
return res;
}
COM: <s> gets the list of the descendant of an element in the pidf namespace </s>
|
funcom_train/45852122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerParticipant(Participant participant, String protocol, String url) {
RegisterType request = new RegisterType();
request.setParticipantProtocolService(getEndpoint(url, participant.getId()));
request.setProtocolIdentifier(protocol);
RegistrationService service = getService(participant.getCoordinationContext().getRegistrationService());
RegisterResponseType response = service.register(request);
participant.setCoordinatorProtocolService(response.getCoordinatorProtocolService());
}
COM: <s> invokes coordinator register to register this participant </s>
|
funcom_train/46815904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveRow(int start, int end, int to) {
int shift = to - start;
int first, last;
if (shift < 0) {
first = to;
last = end;
}
else {
first = start;
last = to + end - start;
}
rotate(dataList, first, last + 1, shift);
fireTableRowsUpdated(first, last);
}
COM: <s> moves one or more rows from the inclusive range code start code to </s>
|
funcom_train/16706865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printCategory(int pos) {
int id = keyList2id[ICorpusResolver.KCATEGORIES][pos];
System.out.println("Category #" + pos + ", id = " + id + ": "
+ resolver.resolveCategory(id));
System.out.println("Documents: ");
Set<Integer> docs = labelIndex.get(id);
if (docs == null) {
System.out.println("[empty]");
return;
}
int i = 0;
for (int doc : docs) {
i++;
System.out.println(i + ". " + resolver.resolveDocRef(doc));
}
}
COM: <s> prints the given category </s>
|
funcom_train/375162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJHeaderAnnotatedBindingWithPacket() {
JBinding[] bindings = AnnotatedBinding.inspectJHeaderClass(
MyHeader.class, errors);
JBinding bindEthernet = bindings[0];
System.out.println(bindEthernet.toString());
JPacket packet = TestUtils.getPcapPacket("tests/test-afs.pcap", 0);
assertTrue("ethernet binding", bindEthernet.isBound(packet, 0));
}
COM: <s> test j header annotated binding with packet </s>
|
funcom_train/29700258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveDocument(OutputStream out) throws Exception {
XMLOutputter outputter = new XMLOutputter(INDENT_STRING, ADD_NEWLINES);
Logger.getLogger(Constants.LOG4J_CONFIGURATION_CATEGORY)
.debug("Instantiated org.jdom.output.XMLOutputter.");
outputter.output(xmlDocument, out);
Logger.getLogger(Constants.LOG4J_CONFIGURATION_CATEGORY)
.debug("Output Document to output stream.");
}
COM: <s> saves the document to the specified java </s>
|
funcom_train/39849176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rebuildColumns() {
// build the column click managers
columnClickTrackers = new ColumnClickTracker[table.getColumnCount()];
for(int i = 0; i < columnClickTrackers.length; i++) {
columnClickTrackers[i] = new ColumnClickTracker(i);
}
primaryColumn = -1;
recentlyClickedColumns.clear();
}
COM: <s> when the column model is changed this resets the column clicks and </s>
|
funcom_train/3454511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() {
try {
String name = "//"+remoteHost+":"+port+"/cpm.server.Server_Interface";
server = (Server_Interface)Naming.lookup(name);
checkVersion(server.getVersion());
} catch (Exception e) {
Debug.printError(Debug.NORM,"Error connecting to server" ,e);
this.communicationErrorOccured(e);
}
}
COM: <s> connects to server and compares the version between server and client code </s>
|
funcom_train/51604753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelBorder() {
if (jPanelBorder == null) {
jPanelBorder = new JPanel();
jPanelBorder.setLayout(new BorderLayout());
jPanelBorder.setBorder(BorderFactory.createEmptyBorder(0, 10, 10,
10));
jPanelBorder.add(jLabelTitle, BorderLayout.CENTER);
}
return jPanelBorder;
}
COM: <s> this method initializes j panel border </s>
|
funcom_train/19318220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBoolean(String name, boolean value) throws JMSException {
if(isBodyModifiable()) {
try {
map.put(name, new Boolean(value));
}
catch(NullPointerException e) {
throw new JMSException(e.getMessage());
}
}
else {
throw new MessageNotWriteableException("MapMesage read_only");
}
}
COM: <s> sets a code boolean code value with the specified name into the </s>
|
funcom_train/41162669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoUnit entity) {
EntityManagerHelper.log("saving CoUnit instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co unit entity </s>
|
funcom_train/43245326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECTwoRelationship() {
System.out.println("getECTwoRelationship");
EmergencyContactDG4Object instance = new EmergencyContactDG4Object();
String expResult = "";
String result = instance.getECTwoRelationship();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get ectwo relationship method of class org </s>
|
funcom_train/26509355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String maybequote(Object o) {
String result = o.toString();
if (result.indexOf(columnsep)!=-1 ||
result.startsWith(" ") || result.endsWith(" ")) {
int i=result.indexOf(quotechar);
if (i!=-1) {
String oldresult=result;
result="";
do{
result+=oldresult.substring(0,i-1)+quotechar+quotechar;
oldresult=oldresult.substring(i+1);
i=oldresult.indexOf(quotechar);
} while (i!=-1);
result+=oldresult;
}
result=quotechar+result+quotechar;
}
return result;
}
COM: <s> returns the maybe quoted string representation of its argument </s>
|
funcom_train/28116629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void mergeSuites(TestSuite suite, Test test) {
if (test instanceof TestSuite) {
Enumeration iter = ((TestSuite) test).tests();
while (iter.hasMoreElements()) {
mergeSuites(suite, (Test) iter.nextElement());
}
} else {
suite.addTest(test);
}
}
COM: <s> removes nested test suite instances from code test code adding the </s>
|
funcom_train/13524545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAnchorString() {
switch (anchor) {
case NORTH:
return "NORTH";
case NORTHEAST:
return "NORTHEAST";
case EAST:
return "EAST";
case SOUTHEAST:
return "SOUTHEAST";
case SOUTH:
return "SOUTH";
case SOUTHWEST:
return "SOUTHWEST";
case WEST:
return "WEST";
case CENTER:
return "CENTER";
default:
return "NORTHWEST";
}
}
COM: <s> returns a string representation of the anchor parameter of this constraints </s>
|
funcom_train/19318380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setString(String name, String value) throws JMSException {
if(isBodyModifiable()) {
try {
map.put(name, value);
}
catch(NullPointerException e) {
throw new JMSException(e.getMessage());
}
}
else {
throw new MessageNotWriteableException("MapMessage read_only");
}
}
COM: <s> sets a code string code value with the specified name into the map </s>
|
funcom_train/19244101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testQedeqSampleScript1() throws Exception {
final QedeqBo bo = check(new SixDynamicModel(), getDocDir(), "sample/qedeq_sample1.xml");
assertEquals(0, bo.getErrors().size());
assertEquals(0, bo.getWarnings().size());
}
COM: <s> test sample script for heuristic errors with default model </s>
|
funcom_train/3064356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object x) {
// This test is just an optimization, which may or may not help
if (x == this)
return true;
if (!(x instanceof BigInteger))
return false;
BigInteger xInt = (BigInteger) x;
if (xInt.signum != signum || xInt.mag.length != mag.length)
return false;
for (int i=0; i<mag.length; i++)
if (xInt.mag[i] != mag[i])
return false;
return true;
}
COM: <s> compares this big integer with the specified object for equality </s>
|
funcom_train/10517551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getFile(String name) throws FileNotFoundException {
URL url = getClass().getResource(name);
if (url == null){
throw new FileNotFoundException("Unable to load '" + name + "' from classpath");
}
return new File(FILE_UTILS.fromURI(url.toExternalForm()));
}
COM: <s> load the file from the caller classloader that loaded this class </s>
|
funcom_train/34341840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getComandoSalida() {
if (ComandoSalida == null) {//GEN-END:|15-getter|0|15-preInit
// write pre-init user code here
ComandoSalida = new Command("Salir", Command.EXIT, 0);//GEN-LINE:|15-getter|1|15-postInit
// write post-init user code here
}//GEN-BEGIN:|15-getter|2|
return ComandoSalida;
}
COM: <s> returns an initiliazed instance of comando salida component </s>
|
funcom_train/38305755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getURLBase() {
if (!loaded)
return(null);
int i,j;
i = nextIndexOf(0, "<base href=\"");
if (i > 0) {
j = nextIndexOf(i, "\"");
fetchURLpos = j;
String href = new String(htmlDoc, i, (j-1-i));
try {
return(new URL(href));
} catch (MalformedURLException mue) {
}
}
return(url);
}
COM: <s> gets the base url of the document if one is currently loaded </s>
|
funcom_train/28631477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void containsClass() {
Package p = getClassesPackage();
assertEquals("Classes", p.getName());
Class aa = (Class)p.getMember("AA");
assertNotNull("Class AA not found!", aa);
assertEquals("Visibility is not private!","private", aa.getVisibility().toString());
}
COM: <s> test that the class aa has the visibility private </s>
|
funcom_train/25305429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void constructor() {
// création du paramètre
ApplicationPluginParameter param1 = new ApplicationPluginParameter();
param1.setName("param1");
param1.setDescription("Description de param1");
// ajout du paramètre
this.addParameter(param1);
this.getModel().setClassAuthor("AKKA Technologies");
this.getModel().setClassVersion("0.1");
this.getModel().setClassOwner("CNES");
}
COM: <s> the common part of constructor </s>
|
funcom_train/13394233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObjectClassName(String objectClassName) {
try {
m_objectClass = Class.forName(objectClassName);
} catch (Exception e) {
s_log.error("Error setting the objectClassName. Make sure you specified a valid class name.", e);
m_objectClass = null;
throw new RuntimeException(e);
}
}
COM: <s> set the object class name </s>
|
funcom_train/7518254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(ProcessoAndamento entity) {
EntityManagerHelper.log("saving ProcessoAndamento instance",
Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved processo andamento entity </s>
|
funcom_train/20969118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSet() {
CodeThatShouldFail codeThatShouldFail = new CodeThatShouldFail() {
public void doTheFaultyThing() {
testedArray.set(-1,null);
}
};
Assert.exceptionOn(codeThatShouldFail, IllegalArgumentException.class);
codeThatShouldFail = new CodeThatShouldFail() {
public void doTheFaultyThing() {
testedArray.set(BASE_SIZE,null);
}
};
Assert.exceptionOn(codeThatShouldFail, IllegalArgumentException.class);
}
COM: <s> test method for ar </s>
|
funcom_train/7754321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processWindowEvent (WindowEvent e) {
super.processWindowEvent (e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
if (cancelButton.isVisible () )
cancelButton.doClick ();
else if (closeButton.isVisible () )
closeButton.doClick ();
else {
viewerValue = CLOSE_OPTION;
setVisible (false);
}
}
}
COM: <s> make sure that closing the window simulates clicking the cancel button </s>
|
funcom_train/16614697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(long ms) {
StringBuffer result = new StringBuffer();
if (ms > 3600000) {
result.append(ms / 3600000 + "hr ");
ms %= 3600000;
}
if (ms > 60000) {
result.append(ms / 60000 + "m ");
ms %= 60000;
}
result.append(new DecimalFormat("##.#").format((double) ms / 1000.0) + "s");
return result.toString();
}
COM: <s> convert time in ms to hours minutes seconds </s>
|
funcom_train/9769789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test(expected=IllegalArgumentException.class) public void testConstructorOnly2() {
Combo[] combos = new Combo[] {this.dragon_white, this.dragon_green, this.dragon_red_pair, this.circle_222, this.circle_999};
new Scoreentry_ALL_DRAGON_TRIPLETS(combos);
}
COM: <s> check if it fails if one dragon triplet is missing </s>
|
funcom_train/4628615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
// Initialize the test fixture for each test
// that is run.
iLogListener = new ILogListener() {
public void logging(IStatus status, String plugin){
if(plugin.equals("edu.lmu.cs.tUnit")) {
outputMessage = status.getMessage();
}
}
};
TUnitPlugin.getDefault().getLog().addLogListener(iLogListener);
// Delay for 3 seconds
waitForJobs();
delay(3000);
}
COM: <s> ensure the system state before the test </s>
|
funcom_train/16742493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void read(final AbstractDecoder pDec) throws IOException {
LOG.info("Reading " + _fileName);
pDec.setEndianess(StreamDecoder.LITTLE_ENDIAN);
readHeader(pDec);
final BitmapDescriptor[] lDescriptors = readDescriptors(pDec);
fillDescriptors(pDec, lDescriptors);
pDec.close();
LOG.info("Done reading icon file");
}
COM: <s> read the ico file </s>
|
funcom_train/18631753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveProperties() {
try {
Debug.debug("Saving JChat properties");
props.store(new FileOutputStream(jchatPropertiesFile), "JChatIRC Properties");
Debug.info("Saved JChat properties");
return true;
} catch (IOException e) {
Debug.error("Failed to store JChat properties", e);
return false;
}
}
COM: <s> saves the jchat properties to disk </s>
|
funcom_train/2967116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setColor(Color color) {
boolean changed = false;
if (color != null) {
if (m_shapeSelected && !m_shapeColor.equals(color)) {
m_shapeColor = color;
changed = true;
}
if (m_textSelected && !m_textColor.equals(color)) {
m_textColor = color;
changed = true;
}
}
return changed;
}
COM: <s> changes shapes color iff shape is selected or and text color iff text </s>
|
funcom_train/5437267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read() throws IOException {
if(cfd == null) {
throw new IOException("CaptureFile must be open()ed first.");
}
int rc = _read(cfd);
if(rc == CF_READ_ERROR) {
throw new IOException("Error reading capture file.");
}
return rc;
}
COM: <s> reads the contents of the capture file </s>
|
End of preview. Expand
in Dataset Viewer.
YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/datasets-cards)
funcom-java-long
funcom-java-long is a dataset for code summarization presented by Bansal et al. It includes 170k Java methods and summaries for training and 8,192 Java methods in test set. This dataset is extracted from jm52m and is cleaned and deduplicated. The example prompt for fine-tuning is as follows.
- TDAT: <method code> COMMENT: <comment> <!endofdoc>
funcom_test.tar.gz -- a compressed directory for test set with the text inside this folder whose filename = function id
funcom_train.tar.gz -- a compressed directory for training set with the text inside this folder whose filename = function id
funcom_val.tar.gz -- a compressed directory for validation set with the text inside this folder whose filename = function id
train.bin; val.bin -- bin files for training in the format above.
test.bin; bin file with the test data in the format above.
- Downloads last month
- 16